summaryrefslogtreecommitdiff
path: root/searx/static/themes/simple
diff options
context:
space:
mode:
Diffstat (limited to 'searx/static/themes/simple')
-rw-r--r--searx/static/themes/simple/.jshintignore1
-rw-r--r--searx/static/themes/simple/css/searx-rtl.css2177
-rw-r--r--searx/static/themes/simple/css/searx-rtl.min.css1
-rw-r--r--searx/static/themes/simple/css/searx.css2173
-rw-r--r--searx/static/themes/simple/css/searx.min.css1
-rw-r--r--searx/static/themes/simple/fonts/ion.css139
-rw-r--r--searx/static/themes/simple/fonts/ion.eotbin0 -> 4094 bytes
-rw-r--r--searx/static/themes/simple/fonts/ion.html268
-rw-r--r--searx/static/themes/simple/fonts/ion.svg105
-rw-r--r--searx/static/themes/simple/fonts/ion.ttfbin0 -> 3936 bytes
-rw-r--r--searx/static/themes/simple/fonts/ion.woffbin0 -> 4856 bytes
-rw-r--r--searx/static/themes/simple/fonts/ion.woff2bin0 -> 2112 bytes
-rw-r--r--searx/static/themes/simple/gruntfile.js161
-rw-r--r--searx/static/themes/simple/img/favicon.pngbin0 -> 1474 bytes
-rw-r--r--searx/static/themes/simple/img/logo_searx_a.pngbin0 -> 8390 bytes
-rw-r--r--searx/static/themes/simple/img/searx.pngbin0 -> 2130 bytes
-rw-r--r--searx/static/themes/simple/img/searx_logo.svg203
-rw-r--r--searx/static/themes/simple/js/searx.head.js40
-rw-r--r--searx/static/themes/simple/js/searx.head.min.js4
-rw-r--r--searx/static/themes/simple/js/searx.head.min.js.map1
-rw-r--r--searx/static/themes/simple/js/searx.js1573
-rw-r--r--searx/static/themes/simple/js/searx.min.js25
-rw-r--r--searx/static/themes/simple/js/searx.min.js.map1
-rw-r--r--searx/static/themes/simple/js/searx_head/00_init.js40
-rw-r--r--searx/static/themes/simple/js/searx_src/00_searx_toolkit.js164
-rw-r--r--searx/static/themes/simple/js/searx_src/autocomplete.js536
-rw-r--r--searx/static/themes/simple/js/searx_src/searx_imageresult.js151
-rw-r--r--searx/static/themes/simple/js/searx_src/searx_keyboard.js366
-rw-r--r--searx/static/themes/simple/js/searx_src/searx_mapresult.js176
-rw-r--r--searx/static/themes/simple/js/searx_src/searx_results.js63
-rw-r--r--searx/static/themes/simple/js/searx_src/searx_search.js117
-rw-r--r--searx/static/themes/simple/leaflet/images/layers-2x.pngbin0 -> 1259 bytes
-rw-r--r--searx/static/themes/simple/leaflet/images/layers.pngbin0 -> 696 bytes
-rw-r--r--searx/static/themes/simple/leaflet/images/marker-icon-2x-green.pngbin0 -> 3753 bytes
-rw-r--r--searx/static/themes/simple/leaflet/images/marker-icon-2x-orange.pngbin0 -> 3691 bytes
-rw-r--r--searx/static/themes/simple/leaflet/images/marker-icon-2x-red.pngbin0 -> 3692 bytes
-rw-r--r--searx/static/themes/simple/leaflet/images/marker-icon-2x.pngbin0 -> 2464 bytes
-rw-r--r--searx/static/themes/simple/leaflet/images/marker-icon-green.pngbin0 -> 1696 bytes
-rw-r--r--searx/static/themes/simple/leaflet/images/marker-icon-orange.pngbin0 -> 1714 bytes
-rw-r--r--searx/static/themes/simple/leaflet/images/marker-icon-red.pngbin0 -> 1690 bytes
-rw-r--r--searx/static/themes/simple/leaflet/images/marker-icon.pngbin0 -> 1466 bytes
-rw-r--r--searx/static/themes/simple/leaflet/images/marker-shadow.pngbin0 -> 618 bytes
-rw-r--r--searx/static/themes/simple/leaflet/leaflet.css636
-rw-r--r--searx/static/themes/simple/leaflet/leaflet.js5
-rw-r--r--searx/static/themes/simple/less/autocomplete.less69
-rw-r--r--searx/static/themes/simple/less/code.less83
-rw-r--r--searx/static/themes/simple/less/definitions.less135
-rw-r--r--searx/static/themes/simple/less/index.less43
-rw-r--r--searx/static/themes/simple/less/ion.less181
-rw-r--r--searx/static/themes/simple/less/mixins.less62
-rw-r--r--searx/static/themes/simple/less/normalize.less341
-rw-r--r--searx/static/themes/simple/less/preferences.less103
-rw-r--r--searx/static/themes/simple/less/search.less264
-rw-r--r--searx/static/themes/simple/less/stats.less8
-rw-r--r--searx/static/themes/simple/less/style-rtl.less6
-rw-r--r--searx/static/themes/simple/less/style.less721
-rw-r--r--searx/static/themes/simple/less/toolkit.less468
-rw-r--r--searx/static/themes/simple/less/toolkit_loader.less41
-rw-r--r--searx/static/themes/simple/magnet.svg1
-rw-r--r--searx/static/themes/simple/package.json20
60 files changed, 11673 insertions, 0 deletions
diff --git a/searx/static/themes/simple/.jshintignore b/searx/static/themes/simple/.jshintignore
new file mode 100644
index 000000000..3b2b7148f
--- /dev/null
+++ b/searx/static/themes/simple/.jshintignore
@@ -0,0 +1 @@
+js/searx_src/autocomplete.js
diff --git a/searx/static/themes/simple/css/searx-rtl.css b/searx/static/themes/simple/css/searx-rtl.css
new file mode 100644
index 000000000..2e904e5eb
--- /dev/null
+++ b/searx/static/themes/simple/css/searx-rtl.css
@@ -0,0 +1,2177 @@
+/*! searx | 06-08-2019 | https://github.com/asciimoo/searx */
+/*
+* searx, A privacy-respecting, hackable metasearch engine
+*
+* To convert "style.less" to "style.css" run: $make styles
+*/
+/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
+/* Document
+ ========================================================================== */
+/**
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
+ */
+html {
+ line-height: 1.15;
+ /* 1 */
+ -webkit-text-size-adjust: 100%;
+ /* 2 */
+}
+/* Sections
+ ========================================================================== */
+/**
+ * Remove the margin in all browsers.
+ */
+body {
+ margin: 0;
+}
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+/* Grouping content
+ ========================================================================== */
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+hr {
+ box-sizing: content-box;
+ /* 1 */
+ height: 0;
+ /* 1 */
+ overflow: visible;
+ /* 2 */
+}
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+pre {
+ font-family: monospace, monospace;
+ /* 1 */
+ font-size: 1em;
+ /* 2 */
+}
+/* Text-level semantics
+ ========================================================================== */
+/**
+ * Remove the gray background on active links in IE 10.
+ */
+a {
+ background-color: transparent;
+}
+/**
+ * 1. Remove the bottom border in Chrome 57-
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+abbr[title] {
+ border-bottom: none;
+ /* 1 */
+ text-decoration: underline;
+ /* 2 */
+ text-decoration: underline dotted;
+ /* 2 */
+}
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+b,
+strong {
+ font-weight: bolder;
+}
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+code,
+kbd,
+samp {
+ font-family: monospace, monospace;
+ /* 1 */
+ font-size: 1em;
+ /* 2 */
+}
+/**
+ * Add the correct font size in all browsers.
+ */
+small {
+ font-size: 80%;
+}
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+sub {
+ bottom: -0.25em;
+}
+sup {
+ top: -0.5em;
+}
+/* Embedded content
+ ========================================================================== */
+/**
+ * Remove the border on images inside links in IE 10.
+ */
+img {
+ border-style: none;
+}
+/* Forms
+ ========================================================================== */
+/**
+ * 1. Change the font styles in all browsers.
+ * 2. Remove the margin in Firefox and Safari.
+ */
+button,
+input,
+optgroup,
+select,
+textarea {
+ font-family: inherit;
+ /* 1 */
+ font-size: 100%;
+ /* 1 */
+ line-height: 1.15;
+ /* 1 */
+ margin: 0;
+ /* 2 */
+}
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+button,
+input {
+ /* 1 */
+ overflow: visible;
+}
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+button,
+select {
+ /* 1 */
+ text-transform: none;
+}
+/**
+ * Correct the inability to style clickable types in iOS and Safari.
+ */
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
+ -webkit-appearance: button;
+}
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+ border-style: none;
+ padding: 0;
+}
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+ outline: 1px dotted ButtonText;
+}
+/**
+ * Correct the padding in Firefox.
+ */
+fieldset {
+ padding: 0.35em 0.75em 0.625em;
+}
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ * `fieldset` elements in all browsers.
+ */
+legend {
+ box-sizing: border-box;
+ /* 1 */
+ color: inherit;
+ /* 2 */
+ display: table;
+ /* 1 */
+ max-width: 100%;
+ /* 1 */
+ padding: 0;
+ /* 3 */
+ white-space: normal;
+ /* 1 */
+}
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+progress {
+ vertical-align: baseline;
+}
+/**
+ * Remove the default vertical scrollbar in IE 10+.
+ */
+textarea {
+ overflow: auto;
+}
+/**
+ * 1. Add the correct box sizing in IE 10.
+ * 2. Remove the padding in IE 10.
+ */
+[type="checkbox"],
+[type="radio"] {
+ box-sizing: border-box;
+ /* 1 */
+ padding: 0;
+ /* 2 */
+}
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+ height: auto;
+}
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+[type="search"] {
+ -webkit-appearance: textfield;
+ /* 1 */
+ outline-offset: -2px;
+ /* 2 */
+}
+/**
+ * Remove the inner padding in Chrome and Safari on macOS.
+ */
+[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+::-webkit-file-upload-button {
+ -webkit-appearance: button;
+ /* 1 */
+ font: inherit;
+ /* 2 */
+}
+/* Interactive
+ ========================================================================== */
+/*
+ * Add the correct display in Edge, IE 10+, and Firefox.
+ */
+details {
+ display: block;
+}
+/*
+ * Add the correct display in all browsers.
+ */
+summary {
+ display: list-item;
+}
+/* Misc
+ ========================================================================== */
+/**
+ * Add the correct display in IE 10+.
+ */
+template {
+ display: none;
+}
+/**
+ * Add the correct display in IE 10.
+ */
+[hidden] {
+ display: none;
+}
+/*
+ * searx, A privacy-respecting, hackable metasearch engine
+ *
+ * To change the colors of the site, simple edit this variables
+ */
+/*
+* searx, A privacy-respecting, hackable metasearch engine
+*/
+.highlight .hll {
+ background-color: #ffffcc;
+}
+.highlight {
+ background: #f8f8f8;
+}
+.highlight .c {
+ color: #408080;
+ font-style: italic;
+}
+/* Comment */
+.highlight .err {
+ border: 1px solid #FF0000;
+}
+/* Error */
+.highlight .k {
+ color: #008000;
+ font-weight: bold;
+}
+/* Keyword */
+.highlight .o {
+ color: #666666;
+}
+/* Operator */
+.highlight .cm {
+ color: #408080;
+ font-style: italic;
+}
+/* Comment.Multiline */
+.highlight .cp {
+ color: #BC7A00;
+}
+/* Comment.Preproc */
+.highlight .c1 {
+ color: #408080;
+ font-style: italic;
+}
+/* Comment.Single */
+.highlight .cs {
+ color: #408080;
+ font-style: italic;
+}
+/* Comment.Special */
+.highlight .gd {
+ color: #A00000;
+}
+/* Generic.Deleted */
+.highlight .ge {
+ font-style: italic;
+}
+/* Generic.Emph */
+.highlight .gr {
+ color: #FF0000;
+}
+/* Generic.Error */
+.highlight .gh {
+ color: #000080;
+ font-weight: bold;
+}
+/* Generic.Heading */
+.highlight .gi {
+ color: #00A000;
+}
+/* Generic.Inserted */
+.highlight .go {
+ color: #888888;
+}
+/* Generic.Output */
+.highlight .gp {
+ color: #000080;
+ font-weight: bold;
+}
+/* Generic.Prompt */
+.highlight .gs {
+ font-weight: bold;
+}
+/* Generic.Strong */
+.highlight .gu {
+ color: #800080;
+ font-weight: bold;
+}
+/* Generic.Subheading */
+.highlight .gt {
+ color: #0044DD;
+}
+/* Generic.Traceback */
+.highlight .kc {
+ color: #008000;
+ font-weight: bold;
+}
+/* Keyword.Constant */
+.highlight .kd {
+ color: #008000;
+ font-weight: bold;
+}
+/* Keyword.Declaration */
+.highlight .kn {
+ color: #008000;
+ font-weight: bold;
+}
+/* Keyword.Namespace */
+.highlight .kp {
+ color: #008000;
+}
+/* Keyword.Pseudo */
+.highlight .kr {
+ color: #008000;
+ font-weight: bold;
+}
+/* Keyword.Reserved */
+.highlight .kt {
+ color: #B00040;
+}
+/* Keyword.Type */
+.highlight .m {
+ color: #666666;
+}
+/* Literal.Number */
+.highlight .s {
+ color: #BA2121;
+}
+/* Literal.String */
+.highlight .na {
+ color: #7D9029;
+}
+/* Name.Attribute */
+.highlight .nb {
+ color: #008000;
+}
+/* Name.Builtin */
+.highlight .nc {
+ color: #0000FF;
+ font-weight: bold;
+}
+/* Name.Class */
+.highlight .no {
+ color: #880000;
+}
+/* Name.Constant */
+.highlight .nd {
+ color: #AA22FF;
+}
+/* Name.Decorator */
+.highlight .ni {
+ color: #999999;
+ font-weight: bold;
+}
+/* Name.Entity */
+.highlight .ne {
+ color: #D2413A;
+ font-weight: bold;
+}
+/* Name.Exception */
+.highlight .nf {
+ color: #0000FF;
+}
+/* Name.Function */
+.highlight .nl {
+ color: #A0A000;
+}
+/* Name.Label */
+.highlight .nn {
+ color: #0000FF;
+ font-weight: bold;
+}
+/* Name.Namespace */
+.highlight .nt {
+ color: #008000;
+ font-weight: bold;
+}
+/* Name.Tag */
+.highlight .nv {
+ color: #19177C;
+}
+/* Name.Variable */
+.highlight .ow {
+ color: #AA22FF;
+ font-weight: bold;
+}
+/* Operator.Word */
+.highlight .w {
+ color: #bbbbbb;
+}
+/* Text.Whitespace */
+.highlight .mf {
+ color: #666666;
+}
+/* Literal.Number.Float */
+.highlight .mh {
+ color: #666666;
+}
+/* Literal.Number.Hex */
+.highlight .mi {
+ color: #666666;
+}
+/* Literal.Number.Integer */
+.highlight .mo {
+ color: #666666;
+}
+/* Literal.Number.Oct */
+.highlight .sb {
+ color: #BA2121;
+}
+/* Literal.String.Backtick */
+.highlight .sc {
+ color: #BA2121;
+}
+/* Literal.String.Char */
+.highlight .sd {
+ color: #BA2121;
+ font-style: italic;
+}
+/* Literal.String.Doc */
+.highlight .s2 {
+ color: #BA2121;
+}
+/* Literal.String.Double */
+.highlight .se {
+ color: #BB6622;
+ font-weight: bold;
+}
+/* Literal.String.Escape */
+.highlight .sh {
+ color: #BA2121;
+}
+/* Literal.String.Heredoc */
+.highlight .si {
+ color: #BB6688;
+ font-weight: bold;
+}
+/* Literal.String.Interpol */
+.highlight .sx {
+ color: #008000;
+}
+/* Literal.String.Other */
+.highlight .sr {
+ color: #BB6688;
+}
+/* Literal.String.Regex */
+.highlight .s1 {
+ color: #BA2121;
+}
+/* Literal.String.Single */
+.highlight .ss {
+ color: #19177C;
+}
+/* Literal.String.Symbol */
+.highlight .bp {
+ color: #008000;
+}
+/* Name.Builtin.Pseudo */
+.highlight .vc {
+ color: #19177C;
+}
+/* Name.Variable.Class */
+.highlight .vg {
+ color: #19177C;
+}
+/* Name.Variable.Global */
+.highlight .vi {
+ color: #19177C;
+}
+/* Name.Variable.Instance */
+.highlight .il {
+ color: #666666;
+}
+/* Literal.Number.Integer.Long */
+.highlight pre {
+ overflow: auto;
+}
+.highlight .lineno {
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ cursor: default;
+}
+.highlight .lineno::selection {
+ background: transparent;
+ /* WebKit/Blink Browsers */
+}
+.highlight .lineno::-moz-selection {
+ background: transparent;
+ /* Gecko Browsers */
+}
+html.no-js .hide_if_nojs {
+ display: none;
+}
+html.js .show_if_nojs {
+ display: none;
+}
+.center {
+ text-align: center;
+}
+.right {
+ float: right ;
+}
+.left {
+ float: left;
+}
+.invisible {
+ display: none !important;
+}
+.list-unstyled {
+ list-style-type: none;
+}
+.list-unstyled li {
+ margin-top: 4px;
+ margin-bottom: 4px;
+}
+.danger {
+ background-color: #fae1e1;
+}
+.badge {
+ display: inline-block;
+ color: #fff;
+ background-color: #777;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: baseline;
+ min-width: 10px;
+ padding: 1px 5px;
+ border-radius: 5px;
+}
+kbd {
+ padding: 2px 4px;
+ margin: 1px;
+ font-size: 90%;
+ color: white;
+ background: black;
+}
+table {
+ width: 100%;
+}
+table.striped tr {
+ border-bottom: 1px solid #ececec;
+}
+th {
+ padding: 0.4em;
+}
+td {
+ padding: 0 4px;
+}
+tr:hover {
+ background: #ececec;
+}
+div.selectable_url {
+ border: 1px solid #888;
+ padding: 4px;
+ color: #444;
+ width: 100%;
+ display: block;
+ margin: 0.1em;
+ overflow: hidden;
+ height: 1.2em;
+ line-height: 1.2em;
+}
+div.selectable_url pre {
+ display: block;
+ font-size: 0.8em;
+ word-break: break-all;
+ margin: 0.1em;
+ -webkit-user-select: all;
+ -moz-user-select: all;
+ -ms-user-select: element;
+ user-select: all;
+}
+.dialog-error {
+ position: relative;
+ width: 70%;
+ padding: 1em 1em 1em 2.7em;
+ margin: 0em 8% 1em 8%;
+ border: 1px solid black;
+ border-radius: 4px;
+ text-align: left;
+ color: #db3434;
+ background: #fae1e1;
+ border-color: #db3434;
+}
+.dialog-error:before {
+ position: absolute;
+ top: 0.5em;
+ left: 0.5em;
+ font-family: "ion";
+ font-size: 1.5em;
+}
+.dialog-error .close {
+ float: right;
+ position: relative;
+ top: -3px;
+ color: inherit;
+ font-size: 1.5em;
+}
+.dialog-error ul,
+.dialog-error ol,
+.dialog-error p {
+ margin: 1px 0 0 0;
+}
+.dialog-error table {
+ width: auto;
+}
+.dialog-error tr {
+ vertical-align: text-top;
+}
+.dialog-error tr:hover {
+ background: transparent;
+}
+.dialog-error td {
+ padding: 0 1em 0 0;
+}
+.dialog-error h4 {
+ margin-top: 0.3em;
+ margin-bottom: 0.3em;
+}
+.dialog-error:before {
+ content: "\f110";
+}
+.dialog-warning {
+ position: relative;
+ width: 70%;
+ padding: 1em 1em 1em 2.7em;
+ margin: 0em 8% 1em 8%;
+ border: 1px solid black;
+ border-radius: 4px;
+ text-align: left;
+ color: #dbba34;
+ background: #faf5e1;
+ border-color: #dbba34;
+}
+.dialog-warning:before {
+ position: absolute;
+ top: 0.5em;
+ left: 0.5em;
+ font-family: "ion";
+ font-size: 1.5em;
+}
+.dialog-warning .close {
+ float: right;
+ position: relative;
+ top: -3px;
+ color: inherit;
+ font-size: 1.5em;
+}
+.dialog-warning ul,
+.dialog-warning ol,
+.dialog-warning p {
+ margin: 1px 0 0 0;
+}
+.dialog-warning table {
+ width: auto;
+}
+.dialog-warning tr {
+ vertical-align: text-top;
+}
+.dialog-warning tr:hover {
+ background: transparent;
+}
+.dialog-warning td {
+ padding: 0 1em 0 0;
+}
+.dialog-warning h4 {
+ margin-top: 0.3em;
+ margin-bottom: 0.3em;
+}
+.dialog-warning:before {
+ content: "\f10f";
+}
+.dialog-modal {
+ position: relative;
+ width: 70%;
+ padding: 1em 1em 1em 2.7em;
+ margin: 0em 8% 1em 8%;
+ border: 1px solid black;
+ border-radius: 4px;
+ text-align: left;
+ background: white;
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ /* bring your own prefixes */
+ transform: translate(-50%, -50%);
+ z-index: 100000;
+ margin: 0 50% 0 0;
+ box-shadow: 0 0 1em;
+}
+.dialog-modal:before {
+ position: absolute;
+ top: 0.5em;
+ left: 0.5em;
+ font-family: "ion";
+ font-size: 1.5em;
+}
+.dialog-modal .close {
+ float: right;
+ position: relative;
+ top: -3px;
+ color: inherit;
+ font-size: 1.5em;
+}
+.dialog-modal ul,
+.dialog-modal ol,
+.dialog-modal p {
+ margin: 1px 0 0 0;
+}
+.dialog-modal table {
+ width: auto;
+}
+.dialog-modal tr {
+ vertical-align: text-top;
+}
+.dialog-modal tr:hover {
+ background: transparent;
+}
+.dialog-modal td {
+ padding: 0 1em 0 0;
+}
+.dialog-modal h4 {
+ margin-top: 0.3em;
+ margin-bottom: 0.3em;
+}
+.btn-collapse {
+ cursor: pointer;
+}
+.scrollx {
+ overflow-x: auto;
+ overflow-y: hidden;
+ display: block;
+ padding: 0;
+ margin: 0;
+ border: none;
+}
+/* -- tabs --*/
+.tabs .tabs > label {
+ font-size: 90%;
+}
+.tabs {
+ display: -webkit-box;
+ display: -moz-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ flex-wrap: wrap;
+ width: 100%;
+ min-width: 100%;
+}
+.tabs > * {
+ order: 2;
+}
+.tabs > input[type=radio] {
+ display: none;
+}
+.tabs > label {
+ order: 1;
+ padding: 0.7em;
+ margin: 0 0.7em;
+ letter-spacing: 0.5px;
+ text-transform: uppercase;
+ border: solid white;
+ border-width: 0px 0px 2px 0;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ cursor: pointer;
+}
+.tabs > label:hover {
+ border-bottom: 2px solid #084999;
+}
+.tabs > section {
+ min-width: 100%;
+ padding: 0.7rem 0;
+ box-sizing: border-box;
+ border-top: 1px solid black;
+ display: none;
+}
+.tabs > label:last-of-type {
+ border-bottom: 2px solid #084999;
+ background: #3498DB;
+ color: #FFF;
+ font-weight: bold;
+ letter-spacing: -0.1px;
+}
+.tabs > section:last-of-type {
+ display: block;
+}
+html body .tabs > input:checked ~ section {
+ display: none;
+}
+html body .tabs > input:checked ~ label {
+ position: inherited;
+ background: inherit;
+ border-bottom: 2px solid transparent;
+ font-weight: normal;
+ color: inherit;
+}
+html body .tabs > input:checked ~ label:hover {
+ border-bottom: 2px solid #084999;
+}
+html body .tabs > input:checked + label {
+ border-bottom: 2px solid #084999;
+ background: #3498DB;
+ color: #FFF;
+ font-weight: bold;
+ letter-spacing: -0.1px;
+}
+html body .tabs > input:checked + label + section {
+ display: block;
+}
+/* -- select -- */
+select {
+ height: 28px;
+ margin: 0 1em 0 0;
+ padding: 2px 8px 2px 0 !important;
+ color: #222;
+ font-size: 12px;
+ z-index: 2;
+}
+select:hover,
+select:focus {
+ cursor: pointer;
+}
+@supports ((background-position-x: 100%) and ((appearance: none) or (-webkit-appearance: none) or (-moz-appearance: none))) {
+ select {
+ appearance: none;
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ border: none;
+ border-bottom: 1px solid #d7d7d7;
+ background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI1MTJweCIgaGVpZ2h0PSI1MTJweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDUxMiA1MTIiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTI4LDE5MiAyNTYsMzIwIDM4NCwxOTIiLz48L2c+PC9zdmc+Cg==) no-repeat;
+ background-position-x: 105%;
+ background-size: 2em;
+ background-origin: content-box;
+ outline: medium none;
+ }
+ select:hover,
+ select:focus {
+ border-bottom: 1px solid #3498DB;
+ }
+}
+/* -- checkbox-onoff -- */
+@supports (border-radius: 50px) {
+ .checkbox-onoff {
+ display: inline-block;
+ width: 40px;
+ height: 10px;
+ background: #dcdcdc;
+ margin: 8px auto;
+ position: relative;
+ border-radius: 50px;
+ }
+ .checkbox-onoff label {
+ display: block;
+ width: 20px;
+ height: 20px;
+ position: absolute;
+ top: -5px;
+ cursor: pointer;
+ border-radius: 50px;
+ box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.3);
+ transition: all 0.4s ease;
+ left: 27px;
+ background-color: #3498DB;
+ }
+ .checkbox-onoff input[type=checkbox] {
+ visibility: hidden;
+ }
+ .checkbox-onoff input[type=checkbox]:checked + label {
+ left: -5px;
+ background: #dcdcdc;
+ }
+}
+/* -- checkbox --*/
+@supports (transform: rotate(-45deg)) {
+ .checkbox {
+ width: 20px;
+ position: relative;
+ margin: 20px auto;
+ }
+ .checkbox label {
+ width: 20px;
+ height: 20px;
+ cursor: pointer;
+ position: absolute;
+ top: 0;
+ left: 0;
+ background: white;
+ border-radius: 4px;
+ box-shadow: inset 0px 1px 1px white, 0px 1px 4px rgba(0, 0, 0, 0.5);
+ }
+ .checkbox label:after {
+ content: '';
+ width: 9px;
+ height: 5px;
+ position: absolute;
+ top: 4px;
+ left: 4px;
+ border: 3px solid #333;
+ border-top: none;
+ border-right: none;
+ background: transparent;
+ opacity: 0;
+ transform: rotate(-45deg);
+ }
+ .checkbox input[type=checkbox] {
+ visibility: hidden;
+ }
+ .checkbox input[type=checkbox]:checked + label:after {
+ border-color: #3498DB;
+ opacity: 1;
+ }
+ .checkbox input[disabled] + label {
+ background-color: transparent !important;
+ box-shadow: none !important;
+ cursor: inherit;
+ }
+ .checkbox input:not(:checked):not([readonly]):not([disabled]) + label:hover::after {
+ opacity: 0.5;
+ }
+}
+@media screen and (max-width: 50em) {
+ .tabs > label {
+ width: 100%;
+ }
+}
+/* -- loader -- */
+.loader,
+.loader:after {
+ border-radius: 50%;
+ width: 2em;
+ height: 2em;
+}
+.loader {
+ margin: 1em auto;
+ font-size: 10px;
+ position: relative;
+ text-indent: -9999em;
+ border-top: 0.5em solid rgba(0, 0, 0, 0.2);
+ border-right: 0.5em solid rgba(0, 0, 0, 0.2);
+ border-bottom: 0.5em solid rgba(0, 0, 0, 0.2);
+ border-left: 0.5em solid rgba(255, 255, 255, 0);
+ -webkit-transform: translateZ(0);
+ -ms-transform: translateZ(0);
+ transform: translateZ(0);
+ -webkit-animation: load8 1.2s infinite linear;
+ animation: load8 1.2s infinite linear;
+}
+@-webkit-keyframes load8 {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
+@keyframes load8 {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
+/*! Autocomplete.js v2.6.3 | license MIT | (c) 2017, Baptiste Donaux | http://autocomplete-js.com */
+.autocomplete {
+ position: absolute;
+ max-height: 0;
+ overflow-y: hidden;
+ text-align: left;
+}
+.autocomplete:active,
+.autocomplete:focus,
+.autocomplete:hover {
+ background-color: white;
+}
+.autocomplete:empty {
+ display: none;
+}
+.autocomplete > ul {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+}
+.autocomplete > ul > li {
+ cursor: pointer;
+ padding: 5px 0 5px 10px;
+}
+.autocomplete > ul > li.active,
+.autocomplete > ul > li:active,
+.autocomplete > ul > li:focus {
+ background-color: #3498DB;
+}
+.autocomplete > ul > li.active a:active,
+.autocomplete > ul > li:active a:active,
+.autocomplete > ul > li:focus a:active,
+.autocomplete > ul > li.active a:focus,
+.autocomplete > ul > li:active a:focus,
+.autocomplete > ul > li:focus a:focus,
+.autocomplete > ul > li.active a:hover,
+.autocomplete > ul > li:active a:hover,
+.autocomplete > ul > li:focus a:hover {
+ text-decoration: none;
+}
+.autocomplete > ul > li.locked {
+ cursor: inherit;
+}
+.autocomplete.open {
+ display: block;
+ background-color: white;
+ border: 1px solid #3498DB;
+ max-height: 500px;
+ overflow-y: auto;
+ z-index: 100;
+}
+.autocomplete.open:empty {
+ display: none;
+}
+@media screen and (max-width: 50em) {
+ .autocomplete {
+ bottom: 0;
+ }
+ .autocomplete > ul > li {
+ padding: 7px 0 7px 10px;
+ border-bottom: 1px solid #E8E7E6;
+ text-align: left;
+ }
+}
+@font-face {
+ font-family: "ion";
+ src: url("../fonts/ion.eot?ce7a0ead692560b4405a96d5b8471f51");
+ src: url("../fonts/ion.eot?#iefix") format("embedded-opentype"), url("../fonts/ion.woff2?ce7a0ead692560b4405a96d5b8471f51") format("woff2"), url("../fonts/ion.woff?ce7a0ead692560b4405a96d5b8471f51") format("woff"), url("../fonts/ion.ttf?ce7a0ead692560b4405a96d5b8471f51") format("truetype"), url("../fonts/ion.svg?ce7a0ead692560b4405a96d5b8471f51#ion") format("svg");
+ font-weight: normal;
+ font-style: normal;
+}
+.ion-icon {
+ display: inline-block;
+ vertical-align: middle;
+ line-height: 1;
+ font-weight: normal;
+ font-style: normal;
+ speak: none;
+ text-decoration: inherit;
+ text-transform: none;
+ text-rendering: auto;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+.ion-icon:before {
+ font-family: "ion";
+}
+.ion-navicon-round:before {
+ content: "\f101";
+}
+.ion-search:before {
+ content: "\f102";
+}
+.ion-play:before {
+ content: "\f103";
+}
+.ion-link:before {
+ content: "\f104";
+}
+.ion-chevron-up:before {
+ content: "\f105";
+}
+.ion-chevron-left:before {
+ content: "\f106";
+}
+.ion-chevron-right:before {
+ content: "\f107";
+}
+.ion-arrow-down-a:before {
+ content: "\f108";
+}
+.ion-arrow-up-a:before {
+ content: "\f109";
+}
+.ion-arrow-swap:before {
+ content: "\f10a";
+}
+.ion-arrow-dropdown:before {
+ content: "\f10b";
+}
+.ion-globe:before {
+ content: "\f10c";
+}
+.ion-time:before {
+ content: "\f10d";
+}
+.ion-location:before {
+ content: "\f10e";
+}
+.ion-warning:before {
+ content: "\f10f";
+}
+.ion-error:before {
+ content: "\f110";
+}
+.ion-film-outline:before {
+ content: "\f111";
+}
+.ion-music-note:before {
+ content: "\f112";
+}
+.ion-more-vertical:before {
+ content: "\f113";
+}
+.ion-magnet:before {
+ content: "\f114";
+}
+.ion-close:before {
+ content: "\f115";
+}
+.ion-icon-big {
+ display: inline-block;
+ vertical-align: middle;
+ line-height: 1;
+ font-weight: normal;
+ font-style: normal;
+ speak: none;
+ text-decoration: inherit;
+ text-transform: none;
+ text-rendering: auto;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ font-size: 149%;
+}
+.ion-icon-big:before {
+ font-family: "ion";
+}
+.index {
+ text-align: center;
+}
+.index .title {
+ background: url('../img/searx.png') no-repeat;
+ width: 100%;
+ min-height: 80px;
+ background-position: center;
+}
+.index h1 {
+ font-size: 5em;
+ visibility: hidden;
+}
+.index #search {
+ margin: 0 auto;
+ background: inherit;
+ border: inherit;
+}
+.index .search_filters {
+ display: block;
+ margin: 1em 0;
+}
+.index .category label {
+ padding: 6px 10px;
+ border-bottom: initial !important;
+}
+@media screen and (max-width: 75em) {
+ div.title h1 {
+ font-size: 1em;
+ }
+}
+#main_preferences form {
+ width: 100%;
+}
+#main_preferences fieldset {
+ margin: 8px;
+ border: none;
+}
+#main_preferences legend {
+ margin: 0;
+ padding: 5px 0 0 0;
+ display: block;
+ float: left;
+ width: 300px;
+}
+#main_preferences .value {
+ margin: 0;
+ padding: 0;
+ float: left;
+ width: 15em;
+}
+#main_preferences .description {
+ margin: 0;
+ padding: 5px 0 0 0;
+ float: left;
+ width: 50%;
+ color: #909090;
+ font-size: 90%;
+}
+#main_preferences select {
+ width: 200px;
+ font-size: inherit !important;
+}
+#main_preferences table {
+ border-collapse: collapse;
+}
+#main_preferences table td {
+ text-align: center;
+}
+#main_preferences table.cookies {
+ width: auto;
+}
+#main_preferences table.cookies th,
+#main_preferences table.cookies td {
+ text-align: left;
+ padding: 0.25em;
+}
+#main_preferences table.cookies th:first-child,
+#main_preferences table.cookies td:first-child {
+ padding-right: 4em;
+}
+#main_preferences table.cookies > tbody > tr:nth-child(even) > th,
+#main_preferences table.cookies > tbody > tr:nth-child(even) > td {
+ background-color: #ececec;
+}
+#main_preferences .name,
+#main_preferences .shortcut {
+ text-align: left;
+}
+#main_preferences .preferences_back {
+ background: none repeat scroll 0 0 #3498DB;
+ color: white;
+ border: 0 none;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ cursor: pointer;
+ display: inline-block;
+ margin: 2px 4px;
+ padding: 0.5em;
+}
+#main_preferences .preferences_back a {
+ display: block;
+ color: #FFF;
+}
+#main_preferences .preferences_back a::first-letter {
+ text-transform: uppercase;
+}
+#main_preferences div.selectable_url pre {
+ width: 100%;
+}
+@media screen and (max-width: 75em) {
+ .preferences_back {
+ clear: both;
+ }
+}
+/*
+* searx, A privacy-respecting, hackable metasearch engine
+*/
+#search {
+ padding: 0 2em;
+ margin: 0;
+ background: #f7f7f7;
+ border-bottom: 1px solid #d7d7d7;
+}
+#search_wrapper {
+ padding: 10px 0;
+}
+.search_box {
+ margin: 0 12px 0 0;
+ display: inline-flex;
+ flex-direction: row;
+ white-space: nowrap;
+ /*
+ &:has(q:focus) {
+ box-shadow: 0px 0px 5px #CCC;
+}
+*/
+}
+#clear_search {
+ display: block;
+ border-collapse: separate;
+ box-sizing: border-box;
+ width: 1.8em;
+ margin: 0;
+ padding: 2px;
+ height: 2.2em;
+ background: none repeat scroll 0 0 #FFF;
+ border-top: 1px solid #3498DB;
+ border-bottom: 1px solid #3498DB;
+ border-right: none;
+ border-left: none;
+ border-radius: 0px;
+ outline: none;
+ color: #222;
+ font-size: 16px;
+ z-index: 10000;
+}
+#clear_search:hover {
+ color: #3498DB;
+}
+#clear_search.empty * {
+ display: none;
+}
+#q::-ms-clear,
+#q::-webkit-search-cancel-button {
+ display: none;
+}
+#q,
+#send_search {
+ display: block !important;
+ border-collapse: separate;
+ box-sizing: border-box;
+ margin: 0;
+ padding: 2px;
+ height: 2.2em;
+ background: none repeat scroll 0 0 #FFF;
+ border: 1px solid #3498DB;
+ border-radius: 0px;
+ outline: none;
+ color: #222;
+ font-size: 16px;
+ z-index: 2;
+}
+#q {
+ outline: medium none;
+ padding-left: 8px;
+ padding-right: 0px !important;
+ border-right: none;
+ width: 40em;
+}
+#send_search {
+ border-left: none;
+ width: 2.2em;
+}
+#send_search:hover {
+ cursor: pointer;
+ background-color: #3498DB;
+ color: #ECF0F1;
+}
+.no-js #send_search {
+ width: auto !important;
+}
+.search_filters {
+ display: inline-block;
+ vertical-align: middle;
+}
+@media screen and (max-width: 75em) {
+ #categories {
+ font-size: 90%;
+ clear: both;
+ }
+ #categories .checkbox_container {
+ margin-top: 2px;
+ margin: auto;
+ }
+ html.touch #main_index #categories_container,
+ html.touch #main_results #categories_container {
+ width: 1000px;
+ width: -moz-max-content;
+ width: -webkit-max-content;
+ width: max-content;
+ }
+ html.touch #main_index #categories_container .category,
+ html.touch #main_results #categories_container .category {
+ display: inline-block;
+ width: auto;
+ }
+ html.touch #main_index #categories,
+ html.touch #main_results #categories {
+ width: 100%;
+ margin: 0;
+ text-align: left;
+ overflow-x: scroll;
+ overflow-y: hidden;
+ -webkit-overflow-scrolling: touch;
+ }
+}
+@media screen and (max-width: 50em) {
+ #search {
+ width: 100%;
+ margin: 0;
+ padding: 0.1em 0 0 0;
+ }
+ #search_wrapper {
+ width: 100%;
+ margin: 0 0 0.7em 0;
+ padding: 0;
+ }
+ .search_box {
+ width: 99%;
+ margin: 0.1em;
+ padding: 0 0.1em 0 0;
+ display: flex;
+ flex-direction: row;
+ }
+ #q {
+ width: auto !important;
+ flex: 1;
+ }
+ .search_filters {
+ display: block;
+ margin: 0.5em;
+ }
+ .language,
+ .time_range {
+ width: 45%;
+ }
+ .category {
+ display: block;
+ width: 90%;
+ }
+ .category label {
+ border-bottom: 0;
+ }
+}
+#categories {
+ margin: 0 10px 0 0;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+#categories::-webkit-scrollbar {
+ width: 0;
+ height: 0;
+}
+.category {
+ display: inline-block;
+ position: relative;
+ margin: 0 3px;
+ padding: 0px;
+ /*label:hover {
+ border-bottom: 2px solid @color-categories-item-border-unselected-hover;
+ }*/
+}
+.category input {
+ display: none;
+}
+.category label {
+ cursor: pointer;
+ padding: 4px 10px;
+ margin: 0;
+ display: block;
+ text-transform: capitalize;
+ font-size: 0.9em;
+ border-bottom: 2px solid transparent;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+.category input[type="checkbox"]:focus + label {
+ box-shadow: 0px 0px 8px #3498DB;
+}
+.category input[type="checkbox"]:checked + label {
+ background: #3498DB;
+ color: #FFF;
+ border-bottom: 2px solid #084999;
+}
+#categories_container {
+ position: relative;
+}
+#categories_container .help {
+ position: absolute;
+ width: 100%;
+ bottom: -20px;
+ overflow: hidden;
+ opacity: 0;
+ transition: opacity 1s ease;
+ font-size: 0.8em;
+ text-position: center;
+ background: white;
+}
+#categories_container:hover .help {
+ opacity: 0.8;
+ transition: opacity 1s ease;
+}
+html {
+ font-family: arial, sans-serif;
+ font-size: 0.9em;
+ -webkit-text-size-adjust: 100%;
+ -ms-text-size-adjust: 100%;
+ -moz-text-size-adjust: 100%;
+ text-size-adjust: 100%;
+ color: #444;
+ padding: 0;
+ margin: 0;
+}
+body,
+main {
+ padding: 0;
+ margin: 0;
+}
+main {
+ width: 100%;
+}
+footer {
+ bottom: 0;
+ width: 100%;
+ height: 50px;
+}
+#main_preferences,
+#main_about,
+#main_stats {
+ margin: 3em;
+ width: auto;
+}
+footer {
+ bottom: 0;
+ height: 3em;
+ margin: 1em 0;
+ padding: 1em 0;
+ clear: both;
+ width: 100%;
+ text-align: center;
+}
+footer p {
+ font-size: 0.9em;
+}
+#main_preferences h1,
+#main_stats h1 {
+ background: url('../img/searx.png') no-repeat;
+ background-size: auto 75%;
+ min-height: 40px;
+ margin: 0 auto;
+}
+#main_preferences h1 span,
+#main_stats h1 span {
+ visibility: hidden;
+}
+input[type="submit"],
+#results button[type="submit"] {
+ padding: 0.5rem;
+ margin: 2px 4px;
+ display: inline-block;
+ background: #3498DB;
+ color: #FFF;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ border: 0;
+ cursor: pointer;
+}
+a {
+ text-decoration: none;
+ color: #29314d;
+}
+a:visited {
+ color: #684898;
+}
+a:visited .highlight {
+ color: #684898;
+}
+article[data-vim-selected] {
+ background: #f7f7f7;
+}
+article[data-vim-selected]::before {
+ position: absolute;
+ left: 1em;
+ padding: 2px;
+ content: ">";
+ font-weight: bold;
+ color: #3498DB;
+}
+article.result-images[data-vim-selected] {
+ background: #3498DB;
+}
+article.result-images[data-vim-selected]::before {
+ display: none;
+ content: "";
+}
+.result {
+ margin: 19px 0 18px 0;
+ padding: 0;
+}
+.result h3 {
+ font-size: 1.1em;
+ word-wrap: break-word;
+ margin: 5px 0 1px 0;
+ padding: 0;
+ margin-bottom: 0;
+}
+.result h3 a {
+ color: #084999;
+ font-weight: normal;
+ font-size: 1.1em;
+}
+.result h3 a:visited {
+ color: #684898;
+}
+.result h3 a:focus,
+.result h3 a:hover {
+ text-decoration: underline;
+ border: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ outline: none;
+}
+.result .cache_link,
+.result .proxyfied_link {
+ font-size: 0.9em !important;
+}
+.result .content,
+.result .stat,
+.result .altlink {
+ font-size: 0.9em;
+ margin: 0;
+ padding: 0;
+ max-width: 54em;
+ word-wrap: break-word;
+ line-height: 1.24;
+}
+.result .content .highlight,
+.result .stat .highlight,
+.result .altlink .highlight {
+ color: #000000;
+ background: inherit;
+ font-weight: bold;
+}
+.result .codelines .highlight {
+ color: inherit;
+ background: inherit;
+ font-weight: normal;
+}
+.result .url {
+ font-size: 0.9em;
+ margin: 0 0 3px 0;
+ padding: 0;
+ max-width: 54em;
+ word-wrap: break-word;
+ color: #25a55b;
+}
+.result .published_date {
+ font-size: 0.8em;
+ color: #888;
+}
+.result img.thumbnail {
+ float: left;
+ padding: 0 5px 10px 0;
+ width: 20em;
+ min-width: 20em;
+ min-height: 8em;
+}
+.result img.image {
+ float: left;
+ padding: 0 5px 10px 0;
+ width: 100px;
+ max-height: 100px;
+ object-fit: scale-down;
+ object-position: right top;
+}
+.result .break {
+ clear: both;
+}
+.category-social .image {
+ width: auto !important;
+ min-width: 48px;
+ min-height: 48px;
+ padding: 0 5px 25px 0 !important;
+}
+.result-videos .content {
+ overflow: hidden;
+}
+.engines {
+ float: right;
+ color: #888;
+}
+.engines span {
+ font-size: smaller;
+ margin: 0 0.5em 0 0;
+}
+.small_font {
+ font-size: 0.8em;
+}
+.highlight {
+ color: #094089;
+ background: inherit;
+ font-weight: bold;
+}
+.result-images {
+ display: inline-block;
+ margin: 0;
+ padding: 0;
+ position: relative;
+ max-height: 200px;
+}
+.result-images img {
+ float: inherit;
+ margin: 0;
+ padding: 0;
+ border: none;
+ max-height: 200px;
+ background: #084999;
+}
+.result-images span a {
+ display: none;
+ color: #FFF;
+}
+.result-images:hover span a {
+ display: block;
+ position: absolute;
+ bottom: 0;
+ right: 0;
+ padding: 4px;
+ margin: 0 0 4px 4px;
+ background-color: rgba(0, 0, 0, 0.6);
+ font-size: 0.7em;
+}
+.torrent_result {
+ border-left: 10px solid lightgray;
+ padding-left: 3px;
+}
+.torrent_result p {
+ margin: 3px;
+ font-size: 0.8em;
+}
+.torrent_result a {
+ color: #084999;
+}
+.torrent_result a:hover {
+ text-decoration: underline;
+}
+.torrent_result a:visited {
+ color: #684898;
+}
+#results {
+ margin: 2em 2em 20px 2em;
+ padding: 0;
+ width: 50em;
+}
+#suggestions .wrapper {
+ display: flex;
+ flex-flow: row wrap;
+ justify-content: flex-end;
+}
+#suggestions .wrapper form {
+ display: inline-block;
+ flex: 1 1 50%;
+}
+#suggestions,
+#answers,
+#corrections {
+ max-width: 50em;
+}
+#suggestions input,
+#answers input,
+#infoboxes input,
+#corrections input {
+ padding: 0;
+ margin: 3px;
+ font-size: 0.9em;
+ display: inline-block;
+ background: transparent;
+ color: #444;
+ cursor: pointer;
+}
+#suggestions input[type="submit"],
+#answers input[type="submit"],
+#infoboxes input[type="submit"],
+#corrections input[type="submit"],
+#suggestions .infobox .url a,
+#answers .infobox .url a,
+#infoboxes .infobox .url a,
+#corrections .infobox .url a {
+ color: #084999;
+ text-decoration: none;
+ font-size: 0.9rem;
+}
+#suggestions input[type="submit"]:hover,
+#answers input[type="submit"]:hover,
+#infoboxes input[type="submit"]:hover,
+#corrections input[type="submit"]:hover,
+#suggestions .infobox .url a:hover,
+#answers .infobox .url a:hover,
+#infoboxes .infobox .url a:hover,
+#corrections .infobox .url a:hover {
+ text-decoration: underline;
+}
+#corrections {
+ display: flex;
+ flex-flow: row wrap;
+ margin: 1em 0;
+}
+#corrections h4,
+#corrections input[type="submit"] {
+ display: inline-block;
+ margin: 0 0.5em 0 0;
+}
+#corrections input[type="submit"]::after {
+ content: ", ";
+}
+#suggestions .title,
+#search_url .title,
+#apis .title {
+ margin: 2em 0 0.5em 0;
+ color: #444;
+}
+#answers {
+ margin: 10px 8px 10px 8px;
+ border: 1px solid #ddd;
+ padding: 0.9em;
+ box-shadow: 0px 0px 5px #CCC;
+}
+#answers h4 {
+ display: none;
+}
+#answers .answer {
+ display: block;
+ font-size: 1.2em;
+ font-weight: bold;
+}
+#answers form,
+#infoboxes form {
+ min-width: 210px;
+}
+#sidebar {
+ position: absolute;
+ top: 100px;
+ left: 57em;
+ margin: 0px 2px 5px 5px;
+ padding: 0px 2px 2px;
+ max-width: 25em;
+ word-wrap: break-word;
+}
+#sidebar .infobox {
+ margin: 10px 0 10px;
+ border: 1px solid #ddd;
+ padding: 0.9em;
+ font-size: 0.9em;
+ box-shadow: 0px 0px 5px #CCC;
+}
+#sidebar .infobox h2 {
+ margin: 0 0 .5em 0;
+}
+#sidebar .infobox img {
+ max-width: 100%;
+ max-height: 12em;
+ display: block;
+ margin: 0;
+ padding: 0;
+}
+#sidebar .infobox dl {
+ margin: 0.5em 0;
+}
+#sidebar .infobox dt {
+ display: inline;
+ margin: 0.5em 0.25em 0.5em 0;
+ padding: 0;
+ font-weight: bold;
+}
+#sidebar .infobox dd {
+ display: inline;
+ margin: 0.5em 0;
+ padding: 0;
+}
+#sidebar .infobox input {
+ font-size: 1em;
+}
+#sidebar .infobox br {
+ clear: both;
+}
+#sidebar .infobox .attributes,
+#sidebar .infobox .urls {
+ clear: both;
+}
+#search_url {
+ margin-top: 8px;
+}
+#search_url div.selectable_url pre {
+ width: 200em;
+}
+#linkto_preferences {
+ position: absolute;
+ right: 10px;
+ top: 0.9em;
+ padding: 0;
+ border: 0;
+ display: block;
+ font-size: 1.2em;
+ color: #222;
+}
+#linkto_preferences a:link *,
+#linkto_preferences a:hover *,
+#linkto_preferences a:visited *,
+#linkto_preferences a:active * {
+ color: #222;
+}
+#pagination {
+ clear: both;
+}
+#pagination br {
+ clear: both;
+}
+#apis {
+ margin-top: 8px;
+ clear: both;
+}
+#backToTop {
+ border: 1px solid #ddd;
+ margin: 0 0 0 2em;
+ padding: 0;
+ font-size: 1em;
+ box-shadow: 0px 0px 5px #CCC;
+ background: white;
+ position: fixed;
+ bottom: 85px;
+ left: 50em;
+ transition: opacity 0.5s;
+ opacity: 0;
+}
+#backToTop a {
+ display: block;
+ margin: 0;
+ padding: 0.6em;
+}
+@media screen and (max-width: 75em) {
+ #main_preferences,
+ #main_about,
+ #main_stats {
+ margin: 0.5em;
+ width: auto;
+ }
+ #suggestions,
+ #answers {
+ margin-top: 1em;
+ }
+ #infoboxes {
+ position: inherit;
+ max-width: inherit;
+ }
+ #infoboxes .infobox {
+ clear: both;
+ }
+ #infoboxes .infobox img {
+ float: left;
+ max-width: 10em;
+ margin: 0.5em 0.5em 0.5em 0;
+ }
+ #sidebar {
+ position: static;
+ max-width: 50em;
+ margin: 0 0 2px 0;
+ padding: 0;
+ float: none;
+ border: none;
+ width: auto;
+ }
+ #sidebar input {
+ border: 0;
+ }
+ #apis {
+ display: none;
+ }
+ #search_url {
+ display: none;
+ }
+ .result {
+ border-bottom: 1px solid #E8E7E6;
+ margin: 0;
+ padding-top: 8px;
+ padding-bottom: 6px;
+ }
+ .result h3 {
+ margin: 0 0 1px 0;
+ }
+ .result .thumbnail {
+ max-width: 98%;
+ }
+ .result .url span.url {
+ display: block;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ width: 100%;
+ }
+ .result .url a {
+ float: right;
+ padding: 0 0.5em;
+ }
+ .result .engines {
+ float: right;
+ padding: 0 0 3px 0;
+ }
+ .result-images {
+ border-bottom: none !important;
+ }
+ .image_result {
+ max-width: 98%;
+ }
+ .image_result img {
+ max-width: 98%;
+ }
+}
+#main_results div#results.only_template_images {
+ flex-direction: column;
+ width: auto;
+ display: flex;
+}
+#main_results div#results.only_template_images #sidebar {
+ position: relative;
+ top: auto;
+ order: 2;
+}
+#main_results div#results.only_template_images #urls {
+ position: relative;
+ order: 1;
+}
+#main_results div#results.only_template_images #backToTop {
+ right: 0.5em;
+ left: auto;
+}
+#main_results div#results.only_template_images #pagination {
+ position: relative;
+ order: 3;
+}
+@media screen and (max-width: 50em) {
+ article[data-vim-selected]::before {
+ display: none;
+ content: "";
+ }
+ #linkto_preferences {
+ display: none;
+ postion: fixed !important;
+ top: 100px;
+ right: 0px;
+ }
+ #sidebar {
+ margin: 0 5px 2px 5px;
+ }
+ #corrections {
+ margin: 1em 5px 1em 5px;
+ }
+ #results {
+ margin: 0;
+ padding: 0;
+ width: initial;
+ }
+ #backToTop {
+ left: 40em;
+ bottom: 35px;
+ }
+ .result {
+ padding: 8px 10px 6px 10px;
+ }
+ .result-images {
+ margin: 0;
+ padding: 0;
+ border: none;
+ }
+}
+@media screen and (max-width: 35em) {
+ .result-videos img.thumbnail {
+ float: none !important;
+ }
+ .result-videos .content {
+ overflow: inherit;
+ }
+}
+#search_submit {
+ left: 1px;
+ right: auto;
+}
diff --git a/searx/static/themes/simple/css/searx-rtl.min.css b/searx/static/themes/simple/css/searx-rtl.min.css
new file mode 100644
index 000000000..fc54981b0
--- /dev/null
+++ b/searx/static/themes/simple/css/searx-rtl.min.css
@@ -0,0 +1 @@
+/*! searx | 06-08-2019 | https://github.com/asciimoo/searx *//*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */button,hr,input{overflow:visible}[type=checkbox],[type=radio],legend{padding:0;box-sizing:border-box}.badge,.center{text-align:center}.badge,progress,sub,sup{vertical-align:baseline}.autocomplete>ul,.list-unstyled{list-style-type:none}.tabs>section,legend{box-sizing:border-box}#main_preferences h1 span,#main_stats h1 span,.index h1{visibility:hidden}#apis,#pagination,#pagination br,#sidebar .infobox .attributes,#sidebar .infobox .urls,#sidebar .infobox br,.result .break,footer{clear:both}html{line-height:1.15}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}.highlight pre,textarea{overflow:auto}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:ButtonText dotted 1px}fieldset{padding:.35em .75em .625em}legend{color:inherit;display:table;max-width:100%;white-space:normal}.badge,.search_box{white-space:nowrap}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.highlight .c,.highlight .cm,.highlight .ge,.highlight .sd{font-style:italic}.dialog-error:before,.dialog-modal:before,.dialog-warning:before,.ion-icon-big:before,.ion-icon:before{font-family:ion}details{display:block}summary{display:list-item}[hidden],html.js .show_if_nojs,html.no-js .hide_if_nojs,template{display:none}.highlight .hll{background-color:#ffc}.highlight .c{color:#408080}.highlight .err{border:1px solid red}.highlight .k{color:green;font-weight:700}.highlight .o{color:#666}.highlight .cm{color:#408080}.highlight .cp{color:#BC7A00}.highlight .c1,.highlight .cs{color:#408080;font-style:italic}.highlight .gd{color:#A00000}.highlight .gr{color:red}.highlight .gh{color:navy;font-weight:700}.highlight .gi{color:#00A000}.highlight .go{color:#888}.highlight .gp{color:navy;font-weight:700}.highlight .gs{font-weight:700}.highlight .gu{color:purple;font-weight:700}.highlight .gt{color:#04D}.highlight .kc,.highlight .kd,.highlight .kn{color:green;font-weight:700}.highlight .kp{color:green}.highlight .kr{color:green;font-weight:700}.highlight .kt{color:#B00040}.highlight .m{color:#666}.highlight .s{color:#BA2121}.highlight .na{color:#7D9029}.highlight .nb{color:green}.highlight .nc{color:#00F;font-weight:700}.highlight .no{color:#800}.highlight .nd{color:#A2F}.highlight .ni{color:#999;font-weight:700}.highlight .ne{color:#D2413A;font-weight:700}.highlight .nf{color:#00F}.highlight .nl{color:#A0A000}.highlight .nn{color:#00F;font-weight:700}.highlight .nt{color:green;font-weight:700}.highlight .nv{color:#19177C}.highlight .ow{color:#A2F;font-weight:700}.highlight .w{color:#bbb}.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#666}.highlight .s2,.highlight .sb,.highlight .sc{color:#BA2121}.highlight .sd{color:#BA2121}.highlight .se{color:#B62;font-weight:700}.highlight .sh{color:#BA2121}.highlight .si{color:#B68;font-weight:700}.highlight .sx{color:green}.highlight .sr{color:#B68}.highlight .s1{color:#BA2121}.highlight .ss{color:#19177C}.highlight .bp{color:green}.highlight .vc,.highlight .vg,.highlight .vi{color:#19177C}.highlight .il{color:#666}.badge,kbd{color:#fff}.highlight .lineno{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.btn-collapse,.tabs>label,select:focus,select:hover{cursor:pointer}.highlight .lineno::selection{background:0 0}.highlight .lineno::-moz-selection{background:0 0}.right{float:right}.left{float:left}.invisible{display:none!important}.list-unstyled li{margin-top:4px;margin-bottom:4px}.danger{background-color:#fae1e1}.badge{display:inline-block;background-color:#777;min-width:10px;padding:1px 5px;border-radius:5px}.dialog-error tr,.dialog-modal tr,.dialog-warning tr{vertical-align:text-top}kbd{padding:2px 4px;margin:1px;font-size:90%;background:#000}table{width:100%}table.striped tr{border-bottom:1px solid #ececec}th{padding:.4em}td{padding:0 4px}tr:hover{background:#ececec}div.selectable_url{border:1px solid #888;padding:4px;color:#444;width:100%;display:block;margin:.1em;overflow:hidden;height:1.2em;line-height:1.2em}div.selectable_url pre{display:block;font-size:.8em;word-break:break-all;margin:.1em;-webkit-user-select:all;-moz-user-select:all;-ms-user-select:element;user-select:all}#categories,.tabs>label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-touch-callout:none;-khtml-user-select:none}.dialog-error{position:relative;width:70%;padding:1em 1em 1em 2.7em;margin:0 8% 1em;border:1px solid #db3434;border-radius:4px;text-align:left;color:#db3434;background:#fae1e1}.dialog-error:before{position:absolute;top:.5em;left:.5em;font-size:1.5em;content:"\f110"}.dialog-error .close{float:right;position:relative;top:-3px;color:inherit;font-size:1.5em}.dialog-error ol,.dialog-error p,.dialog-error ul{margin:1px 0 0}.dialog-error table{width:auto}.dialog-error tr:hover{background:0 0}.dialog-error td{padding:0 1em 0 0}.dialog-error h4{margin-top:.3em;margin-bottom:.3em}.dialog-warning{position:relative;width:70%;padding:1em 1em 1em 2.7em;margin:0 8% 1em;border:1px solid #dbba34;border-radius:4px;text-align:left;color:#dbba34;background:#faf5e1}.dialog-warning:before{position:absolute;top:.5em;left:.5em;font-size:1.5em;content:"\f10f"}.dialog-warning .close{float:right;position:relative;top:-3px;color:inherit;font-size:1.5em}.dialog-warning ol,.dialog-warning p,.dialog-warning ul{margin:1px 0 0}.dialog-warning table{width:auto}.dialog-warning tr:hover{background:0 0}.dialog-warning td{padding:0 1em 0 0}.dialog-warning h4{margin-top:.3em;margin-bottom:.3em}.dialog-modal{width:70%;padding:1em 1em 1em 2.7em;border:1px solid #000;border-radius:4px;text-align:left;background:#fff;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:100000;margin:0 50% 0 0;box-shadow:0 0 1em}.dialog-modal:before{position:absolute;top:.5em;left:.5em;font-size:1.5em}.dialog-modal .close{float:right;position:relative;top:-3px;color:inherit;font-size:1.5em}.dialog-modal ol,.dialog-modal p,.dialog-modal ul{margin:1px 0 0}.dialog-modal table{width:auto}.dialog-modal tr:hover{background:0 0}.dialog-modal td{padding:0 1em 0 0}.dialog-modal h4{margin-top:.3em;margin-bottom:.3em}.scrollx{overflow-x:auto;overflow-y:hidden;display:block;padding:0;margin:0;border:none}.tabs .tabs>label{font-size:90%}.tabs{display:-webkit-box;display:-moz-box;display:-webkit-flex;display:-ms-flexbox;display:flex;flex-wrap:wrap;width:100%;min-width:100%}.tabs>*{order:2}.tabs>input[type=radio]{display:none}.tabs>label{order:1;padding:.7em;margin:0 .7em;letter-spacing:.5px;text-transform:uppercase;border:solid #fff;border-width:0 0 2px;user-select:none}.tabs>label:hover,.tabs>label:last-of-type{border-bottom:2px solid #084999}.tabs>section{min-width:100%;padding:.7rem 0;border-top:1px solid #000;display:none}.tabs>label:last-of-type{background:#3498DB;color:#FFF;font-weight:700;letter-spacing:-.1px}.tabs>section:last-of-type{display:block}html body .tabs>input:checked~section{display:none}html body .tabs>input:checked~label{position:inherited;background:inherit;border-bottom:2px solid transparent;font-weight:400;color:inherit}html body .tabs>input:checked~label:hover{border-bottom:2px solid #084999}html body .tabs>input:checked+label{border-bottom:2px solid #084999;background:#3498DB;color:#FFF;font-weight:700;letter-spacing:-.1px}html body .tabs>input:checked+label+section{display:block}select{height:28px;margin:0 1em 0 0;padding:2px 8px 2px 0!important;color:#222;font-size:12px;z-index:2}@supports ((background-position-x:100%) and ((appearance:none) or (-webkit-appearance:none) or (-moz-appearance:none))){select{appearance:none;-webkit-appearance:none;-moz-appearance:none;border:none;border-bottom:1px solid #d7d7d7;background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI1MTJweCIgaGVpZ2h0PSI1MTJweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDUxMiA1MTIiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTI4LDE5MiAyNTYsMzIwIDM4NCwxOTIiLz48L2c+PC9zdmc+Cg==) no-repeat;background-position-x:105%;background-size:2em;background-origin:content-box;outline:0}select:focus,select:hover{border-bottom:1px solid #3498DB}}@supports (border-radius:50px){.checkbox-onoff{display:inline-block;width:40px;height:10px;background:#dcdcdc;margin:8px auto;position:relative;border-radius:50px}.checkbox-onoff label{display:block;width:20px;height:20px;position:absolute;top:-5px;cursor:pointer;border-radius:50px;box-shadow:0 3px 5px 0 rgba(0,0,0,.3);transition:all .4s ease;left:27px;background-color:#3498DB}.checkbox-onoff input[type=checkbox]{visibility:hidden}.checkbox-onoff input[type=checkbox]:checked+label{left:-5px;background:#dcdcdc}}@supports (transform:rotate(-45deg)){.checkbox{width:20px;position:relative;margin:20px auto}.checkbox label{width:20px;height:20px;cursor:pointer;position:absolute;top:0;left:0;background:#fff;border-radius:4px;box-shadow:inset 0 1px 1px #fff,0 1px 4px rgba(0,0,0,.5)}.checkbox label:after{content:'';width:9px;height:5px;position:absolute;top:4px;left:4px;border:3px solid #333;border-top:none;border-right:none;background:0 0;opacity:0;transform:rotate(-45deg)}.checkbox input[type=checkbox]{visibility:hidden}.checkbox input[type=checkbox]:checked+label:after{border-color:#3498DB;opacity:1}.checkbox input[disabled]+label{background-color:transparent!important;box-shadow:none!important;cursor:inherit}.checkbox input:not(:checked):not([readonly]):not([disabled])+label:hover::after{opacity:.5}}@media screen and (max-width:50em){.tabs>label{width:100%}}.loader,.loader:after{border-radius:50%;width:2em;height:2em}.loader{margin:1em auto;font-size:10px;position:relative;text-indent:-9999em;border-top:.5em solid rgba(0,0,0,.2);border-right:.5em solid rgba(0,0,0,.2);border-bottom:.5em solid rgba(0,0,0,.2);border-left:.5em solid rgba(255,255,255,0);-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:load8 1.2s infinite linear;animation:load8 1.2s infinite linear}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}/*! Autocomplete.js v2.6.3 | license MIT | (c) 2017, Baptiste Donaux | http://autocomplete-js.com */.autocomplete{position:absolute;max-height:0;overflow-y:hidden;text-align:left}#categories_container,.category{position:relative}.autocomplete:active,.autocomplete:focus,.autocomplete:hover{background-color:#fff}#send_search:hover,.autocomplete>ul>li.active,.autocomplete>ul>li:active,.autocomplete>ul>li:focus{background-color:#3498DB}.autocomplete:empty{display:none}.autocomplete>ul{margin:0;padding:0}.autocomplete>ul>li{cursor:pointer;padding:5px 0 5px 10px}.autocomplete>ul>li.active a:active,.autocomplete>ul>li.active a:focus,.autocomplete>ul>li.active a:hover,.autocomplete>ul>li:active a:active,.autocomplete>ul>li:active a:focus,.autocomplete>ul>li:active a:hover,.autocomplete>ul>li:focus a:active,.autocomplete>ul>li:focus a:focus,.autocomplete>ul>li:focus a:hover{text-decoration:none}.autocomplete>ul>li.locked{cursor:inherit}.autocomplete.open{display:block;background-color:#fff;border:1px solid #3498DB;max-height:500px;overflow-y:auto;z-index:100}.autocomplete.open:empty{display:none}.ion-icon,.ion-icon-big{display:inline-block;line-height:1;font-weight:400;font-style:normal;speak:none;text-decoration:inherit;text-transform:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:middle}@media screen and (max-width:50em){.autocomplete{bottom:0}.autocomplete>ul>li{padding:7px 0 7px 10px;border-bottom:1px solid #E8E7E6;text-align:left}}#main_preferences table td,.index{text-align:center}@font-face{font-family:ion;src:url(../fonts/ion.eot?ce7a0ead692560b4405a96d5b8471f51);src:url(../fonts/ion.eot?#iefix) format("embedded-opentype"),url(../fonts/ion.woff2?ce7a0ead692560b4405a96d5b8471f51) format("woff2"),url(../fonts/ion.woff?ce7a0ead692560b4405a96d5b8471f51) format("woff"),url(../fonts/ion.ttf?ce7a0ead692560b4405a96d5b8471f51) format("truetype"),url(../fonts/ion.svg?ce7a0ead692560b4405a96d5b8471f51#ion) format("svg");font-weight:400;font-style:normal}.ion-navicon-round:before{content:"\f101"}.ion-search:before{content:"\f102"}.ion-play:before{content:"\f103"}.ion-link:before{content:"\f104"}.ion-chevron-up:before{content:"\f105"}.ion-chevron-left:before{content:"\f106"}.ion-chevron-right:before{content:"\f107"}.ion-arrow-down-a:before{content:"\f108"}.ion-arrow-up-a:before{content:"\f109"}.ion-arrow-swap:before{content:"\f10a"}.ion-arrow-dropdown:before{content:"\f10b"}.ion-globe:before{content:"\f10c"}.ion-time:before{content:"\f10d"}.ion-location:before{content:"\f10e"}.ion-warning:before{content:"\f10f"}.ion-error:before{content:"\f110"}.ion-film-outline:before{content:"\f111"}.ion-music-note:before{content:"\f112"}.ion-more-vertical:before{content:"\f113"}.ion-magnet:before{content:"\f114"}.ion-close:before{content:"\f115"}.ion-icon-big{font-size:149%}.index .title{background:url(../img/searx.png) center no-repeat;width:100%;min-height:80px}.index h1{font-size:5em}.index #search{margin:0 auto;background:inherit;border:inherit}.index .search_filters{display:block;margin:1em 0}.index .category label{padding:6px 10px;border-bottom:initial!important}@media screen and (max-width:75em){div.title h1{font-size:1em}.preferences_back{clear:both}}#main_preferences form{width:100%}#main_preferences fieldset{margin:8px;border:none}#main_preferences legend{margin:0;padding:5px 0 0;display:block;float:left;width:300px}#main_preferences .value{margin:0;padding:0;float:left;width:15em}#main_preferences .description{margin:0;padding:5px 0 0;float:left;width:50%;color:#909090;font-size:90%}#main_preferences select{width:200px;font-size:inherit!important}#main_preferences table{border-collapse:collapse}#main_preferences table.cookies{width:auto}#main_preferences div.selectable_url pre,footer,main{width:100%}#main_preferences table.cookies td,#main_preferences table.cookies th{text-align:left;padding:.25em}#main_preferences table.cookies td:first-child,#main_preferences table.cookies th:first-child{padding-right:4em}#main_preferences table.cookies>tbody>tr:nth-child(even)>td,#main_preferences table.cookies>tbody>tr:nth-child(even)>th{background-color:#ececec}#main_preferences .name,#main_preferences .shortcut{text-align:left}#main_preferences .preferences_back{background:#3498DB;color:#fff;border:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;cursor:pointer;display:inline-block;margin:2px 4px;padding:.5em}#main_preferences .preferences_back a{display:block;color:#FFF}#main_preferences .preferences_back a::first-letter{text-transform:uppercase}#search{padding:0 2em;margin:0;background:#f7f7f7;border-bottom:1px solid #d7d7d7}#search_wrapper{padding:10px 0}.search_box{margin:0 12px 0 0;display:inline-flex;flex-direction:row}#clear_search,#q,#send_search{border-collapse:separate;box-sizing:border-box;margin:0;padding:2px;height:2.2em;background:#FFF;color:#222;font-size:16px;outline:0}#clear_search{display:block;width:1.8em;border-top:1px solid #3498DB;border-bottom:1px solid #3498DB;border-right:none;border-left:none;border-radius:0;z-index:10000}#clear_search:hover{color:#3498DB}#clear_search.empty *{display:none}#q::-ms-clear,#q::-webkit-search-cancel-button{display:none}#q,#send_search{display:block!important;border:1px solid #3498DB;border-radius:0;z-index:2}#q{outline:0;padding-left:8px;padding-right:0!important;border-right:none;width:40em}#send_search{border-left:none;width:2.2em}#send_search:hover{cursor:pointer;color:#ECF0F1}.no-js #send_search{width:auto!important}.search_filters{display:inline-block;vertical-align:middle}@media screen and (max-width:75em){#categories{font-size:90%;clear:both}#categories .checkbox_container{margin:auto}html.touch #main_index #categories_container,html.touch #main_results #categories_container{width:1000px;width:-moz-max-content;width:-webkit-max-content;width:max-content}html.touch #main_index #categories_container .category,html.touch #main_results #categories_container .category{display:inline-block;width:auto}html.touch #main_index #categories,html.touch #main_results #categories{width:100%;margin:0;text-align:left;overflow-x:scroll;overflow-y:hidden;-webkit-overflow-scrolling:touch}}@media screen and (max-width:50em){#search{width:100%;margin:0;padding:.1em 0 0}#search_wrapper{width:100%;margin:0 0 .7em;padding:0}.search_box{width:99%;margin:.1em;padding:0 .1em 0 0;display:flex;flex-direction:row}#q{width:auto!important;flex:1}.search_filters{display:block;margin:.5em}.language,.time_range{width:45%}.category{display:block;width:90%}.category label{border-bottom:0}}#categories{margin:0 10px 0 0;user-select:none}#categories::-webkit-scrollbar{width:0;height:0}.category{display:inline-block;margin:0 3px;padding:0}.category input{display:none}.category label{cursor:pointer;padding:4px 10px;margin:0;display:block;text-transform:capitalize;font-size:.9em;border-bottom:2px solid transparent;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body,html,main{padding:0;margin:0}.category input[type=checkbox]:focus+label{box-shadow:0 0 8px #3498DB}.category input[type=checkbox]:checked+label{background:#3498DB;color:#FFF;border-bottom:2px solid #084999}#categories_container .help{position:absolute;width:100%;bottom:-20px;overflow:hidden;opacity:0;transition:opacity 1s ease;font-size:.8em;text-position:center;background:#fff}footer p,html{font-size:.9em}#categories_container:hover .help{opacity:.8;transition:opacity 1s ease}html{font-family:arial,sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;color:#444}#main_about,#main_preferences,#main_stats{margin:3em;width:auto}footer{bottom:0;height:3em;margin:1em 0;padding:1em 0;text-align:center}#main_preferences h1,#main_stats h1{background:url(../img/searx.png) no-repeat;background-size:auto 75%;min-height:40px;margin:0 auto}#results button[type=submit],input[type=submit]{padding:.5rem;margin:2px 4px;display:inline-block;background:#3498DB;color:#FFF;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;border:0;cursor:pointer}a{text-decoration:none;color:#29314d}a:visited,a:visited .highlight{color:#684898}article[data-vim-selected]{background:#f7f7f7}article[data-vim-selected]::before{position:absolute;left:1em;padding:2px;content:">";font-weight:700;color:#3498DB}article.result-images[data-vim-selected]{background:#3498DB}article.result-images[data-vim-selected]::before{display:none;content:""}.result{margin:19px 0 18px;padding:0}.result h3{font-size:1.1em;word-wrap:break-word;margin:5px 0 0;padding:0}.result h3 a{color:#084999;font-weight:400;font-size:1.1em}.result h3 a:visited{color:#684898}.result h3 a:focus,.result h3 a:hover{text-decoration:underline;border:none;-webkit-box-shadow:none;box-shadow:none;outline:0}.result .cache_link,.result .proxyfied_link{font-size:.9em!important}.result .altlink,.result .content,.result .stat,.result .url{font-size:.9em;padding:0;max-width:54em;word-wrap:break-word}.result .altlink,.result .content,.result .stat{margin:0;line-height:1.24}.result .altlink .highlight,.result .content .highlight,.result .stat .highlight{color:#000;background:inherit;font-weight:700}.result .codelines .highlight{color:inherit;background:inherit;font-weight:400}.result .url{margin:0 0 3px;color:#25a55b}.result .published_date{font-size:.8em;color:#888}.result img.thumbnail{float:left;padding:0 5px 10px 0;width:20em;min-width:20em;min-height:8em}.result img.image{float:left;padding:0 5px 10px 0;width:100px;max-height:100px;object-fit:scale-down;object-position:right top}.category-social .image{width:auto!important;min-width:48px;min-height:48px;padding:0 5px 25px 0!important}.result-videos .content{overflow:hidden}.engines{float:right;color:#888}.engines span{font-size:smaller;margin:0 .5em 0 0}.result-images,.result-images img{margin:0;padding:0;max-height:200px}.small_font{font-size:.8em}.highlight{color:#094089;background:inherit;font-weight:700}.result-images{display:inline-block;position:relative}.result-images img{float:inherit;border:none;background:#084999}.result-images span a{display:none;color:#FFF}.result-images:hover span a{display:block;position:absolute;bottom:0;right:0;padding:4px;margin:0 0 4px 4px;background-color:rgba(0,0,0,.6);font-size:.7em}.torrent_result{border-left:10px solid #d3d3d3;padding-left:3px}#answers,#backToTop,#sidebar .infobox{border:1px solid #ddd;box-shadow:0 0 5px #CCC}.torrent_result p{margin:3px;font-size:.8em}.torrent_result a{color:#084999}.torrent_result a:hover{text-decoration:underline}.torrent_result a:visited{color:#684898}#results{margin:2em 2em 20px;padding:0;width:50em}#suggestions .wrapper{display:flex;flex-flow:row wrap;justify-content:flex-end}#suggestions .wrapper form{display:inline-block;flex:1 1 50%}#answers,#corrections,#suggestions{max-width:50em}#answers input,#corrections input,#infoboxes input,#suggestions input{padding:0;margin:3px;font-size:.9em;display:inline-block;background:0 0;color:#444;cursor:pointer}#answers .infobox .url a,#answers input[type=submit],#corrections .infobox .url a,#corrections input[type=submit],#infoboxes .infobox .url a,#infoboxes input[type=submit],#suggestions .infobox .url a,#suggestions input[type=submit]{color:#084999;text-decoration:none;font-size:.9rem}#answers .infobox .url a:hover,#answers input[type=submit]:hover,#corrections .infobox .url a:hover,#corrections input[type=submit]:hover,#infoboxes .infobox .url a:hover,#infoboxes input[type=submit]:hover,#suggestions .infobox .url a:hover,#suggestions input[type=submit]:hover{text-decoration:underline}#corrections{display:flex;flex-flow:row wrap;margin:1em 0}#corrections h4,#corrections input[type=submit]{display:inline-block;margin:0 .5em 0 0}#corrections input[type=submit]::after{content:", "}#apis .title,#search_url .title,#suggestions .title{margin:2em 0 .5em;color:#444}#answers{margin:10px 8px;padding:.9em}#answers h4{display:none}#answers .answer{display:block;font-size:1.2em;font-weight:700}#answers form,#infoboxes form{min-width:210px}#sidebar{position:absolute;top:100px;left:57em;margin:0 2px 5px 5px;padding:0 2px 2px;max-width:25em;word-wrap:break-word}#sidebar .infobox{margin:10px 0;padding:.9em;font-size:.9em}#sidebar .infobox h2{margin:0 0 .5em}#sidebar .infobox img{max-width:100%;max-height:12em;display:block;margin:0;padding:0}#sidebar .infobox dl{margin:.5em 0}#sidebar .infobox dt{display:inline;margin:.5em .25em .5em 0;padding:0;font-weight:700}#sidebar .infobox dd{display:inline;margin:.5em 0;padding:0}#apis,#search_url{margin-top:8px}#sidebar .infobox input{font-size:1em}#search_url div.selectable_url pre{width:200em}#linkto_preferences{position:absolute;right:10px;top:.9em;padding:0;border:0;display:block;font-size:1.2em;color:#222}#linkto_preferences a:active *,#linkto_preferences a:hover *,#linkto_preferences a:link *,#linkto_preferences a:visited *{color:#222}#backToTop{margin:0 0 0 2em;padding:0;font-size:1em;background:#fff;position:fixed;bottom:85px;left:50em;transition:opacity .5s;opacity:0}#backToTop a{display:block;margin:0;padding:.6em}@media screen and (max-width:75em){#main_about,#main_preferences,#main_stats{margin:.5em;width:auto}#answers,#suggestions{margin-top:1em}#infoboxes{position:inherit;max-width:inherit}#infoboxes .infobox{clear:both}#infoboxes .infobox img{float:left;max-width:10em;margin:.5em .5em .5em 0}#sidebar{position:static;max-width:50em;margin:0 0 2px;padding:0;float:none;border:none;width:auto}.image_result,.image_result img,.result .thumbnail{max-width:98%}#sidebar input{border:0}#apis,#search_url{display:none}.result{border-bottom:1px solid #E8E7E6;margin:0;padding-top:8px;padding-bottom:6px}.result h3{margin:0 0 1px}.result .url span.url{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;width:100%}.result .url a{float:right;padding:0 .5em}.result .engines{float:right;padding:0 0 3px}.result-images{border-bottom:none!important}}#main_results div#results.only_template_images{flex-direction:column;width:auto;display:flex}#main_results div#results.only_template_images #sidebar{position:relative;top:auto;order:2}#main_results div#results.only_template_images #urls{position:relative;order:1}#main_results div#results.only_template_images #backToTop{right:.5em;left:auto}#main_results div#results.only_template_images #pagination{position:relative;order:3}@media screen and (max-width:50em){article[data-vim-selected]::before{display:none;content:""}#linkto_preferences{display:none;postion:fixed!important;top:100px;right:0}#sidebar{margin:0 5px 2px}#corrections{margin:1em 5px}#results{margin:0;padding:0;width:initial}#backToTop{left:40em;bottom:35px}.result{padding:8px 10px 6px}.result-images{margin:0;padding:0;border:none}}@media screen and (max-width:35em){.result-videos img.thumbnail{float:none!important}.result-videos .content{overflow:inherit}}#search_submit{left:1px;right:auto} \ No newline at end of file
diff --git a/searx/static/themes/simple/css/searx.css b/searx/static/themes/simple/css/searx.css
new file mode 100644
index 000000000..697f46b0e
--- /dev/null
+++ b/searx/static/themes/simple/css/searx.css
@@ -0,0 +1,2173 @@
+/*! searx | 06-08-2019 | https://github.com/asciimoo/searx */
+/*
+* searx, A privacy-respecting, hackable metasearch engine
+*
+* To convert "style.less" to "style.css" run: $make styles
+*/
+/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
+/* Document
+ ========================================================================== */
+/**
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
+ */
+html {
+ line-height: 1.15;
+ /* 1 */
+ -webkit-text-size-adjust: 100%;
+ /* 2 */
+}
+/* Sections
+ ========================================================================== */
+/**
+ * Remove the margin in all browsers.
+ */
+body {
+ margin: 0;
+}
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+/* Grouping content
+ ========================================================================== */
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+hr {
+ box-sizing: content-box;
+ /* 1 */
+ height: 0;
+ /* 1 */
+ overflow: visible;
+ /* 2 */
+}
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+pre {
+ font-family: monospace, monospace;
+ /* 1 */
+ font-size: 1em;
+ /* 2 */
+}
+/* Text-level semantics
+ ========================================================================== */
+/**
+ * Remove the gray background on active links in IE 10.
+ */
+a {
+ background-color: transparent;
+}
+/**
+ * 1. Remove the bottom border in Chrome 57-
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+abbr[title] {
+ border-bottom: none;
+ /* 1 */
+ text-decoration: underline;
+ /* 2 */
+ text-decoration: underline dotted;
+ /* 2 */
+}
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+b,
+strong {
+ font-weight: bolder;
+}
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+code,
+kbd,
+samp {
+ font-family: monospace, monospace;
+ /* 1 */
+ font-size: 1em;
+ /* 2 */
+}
+/**
+ * Add the correct font size in all browsers.
+ */
+small {
+ font-size: 80%;
+}
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+sub {
+ bottom: -0.25em;
+}
+sup {
+ top: -0.5em;
+}
+/* Embedded content
+ ========================================================================== */
+/**
+ * Remove the border on images inside links in IE 10.
+ */
+img {
+ border-style: none;
+}
+/* Forms
+ ========================================================================== */
+/**
+ * 1. Change the font styles in all browsers.
+ * 2. Remove the margin in Firefox and Safari.
+ */
+button,
+input,
+optgroup,
+select,
+textarea {
+ font-family: inherit;
+ /* 1 */
+ font-size: 100%;
+ /* 1 */
+ line-height: 1.15;
+ /* 1 */
+ margin: 0;
+ /* 2 */
+}
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+button,
+input {
+ /* 1 */
+ overflow: visible;
+}
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+button,
+select {
+ /* 1 */
+ text-transform: none;
+}
+/**
+ * Correct the inability to style clickable types in iOS and Safari.
+ */
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
+ -webkit-appearance: button;
+}
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+ border-style: none;
+ padding: 0;
+}
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+ outline: 1px dotted ButtonText;
+}
+/**
+ * Correct the padding in Firefox.
+ */
+fieldset {
+ padding: 0.35em 0.75em 0.625em;
+}
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ * `fieldset` elements in all browsers.
+ */
+legend {
+ box-sizing: border-box;
+ /* 1 */
+ color: inherit;
+ /* 2 */
+ display: table;
+ /* 1 */
+ max-width: 100%;
+ /* 1 */
+ padding: 0;
+ /* 3 */
+ white-space: normal;
+ /* 1 */
+}
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+progress {
+ vertical-align: baseline;
+}
+/**
+ * Remove the default vertical scrollbar in IE 10+.
+ */
+textarea {
+ overflow: auto;
+}
+/**
+ * 1. Add the correct box sizing in IE 10.
+ * 2. Remove the padding in IE 10.
+ */
+[type="checkbox"],
+[type="radio"] {
+ box-sizing: border-box;
+ /* 1 */
+ padding: 0;
+ /* 2 */
+}
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+ height: auto;
+}
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+[type="search"] {
+ -webkit-appearance: textfield;
+ /* 1 */
+ outline-offset: -2px;
+ /* 2 */
+}
+/**
+ * Remove the inner padding in Chrome and Safari on macOS.
+ */
+[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+::-webkit-file-upload-button {
+ -webkit-appearance: button;
+ /* 1 */
+ font: inherit;
+ /* 2 */
+}
+/* Interactive
+ ========================================================================== */
+/*
+ * Add the correct display in Edge, IE 10+, and Firefox.
+ */
+details {
+ display: block;
+}
+/*
+ * Add the correct display in all browsers.
+ */
+summary {
+ display: list-item;
+}
+/* Misc
+ ========================================================================== */
+/**
+ * Add the correct display in IE 10+.
+ */
+template {
+ display: none;
+}
+/**
+ * Add the correct display in IE 10.
+ */
+[hidden] {
+ display: none;
+}
+/*
+ * searx, A privacy-respecting, hackable metasearch engine
+ *
+ * To change the colors of the site, simple edit this variables
+ */
+/*
+* searx, A privacy-respecting, hackable metasearch engine
+*/
+.highlight .hll {
+ background-color: #ffffcc;
+}
+.highlight {
+ background: #f8f8f8;
+}
+.highlight .c {
+ color: #408080;
+ font-style: italic;
+}
+/* Comment */
+.highlight .err {
+ border: 1px solid #FF0000;
+}
+/* Error */
+.highlight .k {
+ color: #008000;
+ font-weight: bold;
+}
+/* Keyword */
+.highlight .o {
+ color: #666666;
+}
+/* Operator */
+.highlight .cm {
+ color: #408080;
+ font-style: italic;
+}
+/* Comment.Multiline */
+.highlight .cp {
+ color: #BC7A00;
+}
+/* Comment.Preproc */
+.highlight .c1 {
+ color: #408080;
+ font-style: italic;
+}
+/* Comment.Single */
+.highlight .cs {
+ color: #408080;
+ font-style: italic;
+}
+/* Comment.Special */
+.highlight .gd {
+ color: #A00000;
+}
+/* Generic.Deleted */
+.highlight .ge {
+ font-style: italic;
+}
+/* Generic.Emph */
+.highlight .gr {
+ color: #FF0000;
+}
+/* Generic.Error */
+.highlight .gh {
+ color: #000080;
+ font-weight: bold;
+}
+/* Generic.Heading */
+.highlight .gi {
+ color: #00A000;
+}
+/* Generic.Inserted */
+.highlight .go {
+ color: #888888;
+}
+/* Generic.Output */
+.highlight .gp {
+ color: #000080;
+ font-weight: bold;
+}
+/* Generic.Prompt */
+.highlight .gs {
+ font-weight: bold;
+}
+/* Generic.Strong */
+.highlight .gu {
+ color: #800080;
+ font-weight: bold;
+}
+/* Generic.Subheading */
+.highlight .gt {
+ color: #0044DD;
+}
+/* Generic.Traceback */
+.highlight .kc {
+ color: #008000;
+ font-weight: bold;
+}
+/* Keyword.Constant */
+.highlight .kd {
+ color: #008000;
+ font-weight: bold;
+}
+/* Keyword.Declaration */
+.highlight .kn {
+ color: #008000;
+ font-weight: bold;
+}
+/* Keyword.Namespace */
+.highlight .kp {
+ color: #008000;
+}
+/* Keyword.Pseudo */
+.highlight .kr {
+ color: #008000;
+ font-weight: bold;
+}
+/* Keyword.Reserved */
+.highlight .kt {
+ color: #B00040;
+}
+/* Keyword.Type */
+.highlight .m {
+ color: #666666;
+}
+/* Literal.Number */
+.highlight .s {
+ color: #BA2121;
+}
+/* Literal.String */
+.highlight .na {
+ color: #7D9029;
+}
+/* Name.Attribute */
+.highlight .nb {
+ color: #008000;
+}
+/* Name.Builtin */
+.highlight .nc {
+ color: #0000FF;
+ font-weight: bold;
+}
+/* Name.Class */
+.highlight .no {
+ color: #880000;
+}
+/* Name.Constant */
+.highlight .nd {
+ color: #AA22FF;
+}
+/* Name.Decorator */
+.highlight .ni {
+ color: #999999;
+ font-weight: bold;
+}
+/* Name.Entity */
+.highlight .ne {
+ color: #D2413A;
+ font-weight: bold;
+}
+/* Name.Exception */
+.highlight .nf {
+ color: #0000FF;
+}
+/* Name.Function */
+.highlight .nl {
+ color: #A0A000;
+}
+/* Name.Label */
+.highlight .nn {
+ color: #0000FF;
+ font-weight: bold;
+}
+/* Name.Namespace */
+.highlight .nt {
+ color: #008000;
+ font-weight: bold;
+}
+/* Name.Tag */
+.highlight .nv {
+ color: #19177C;
+}
+/* Name.Variable */
+.highlight .ow {
+ color: #AA22FF;
+ font-weight: bold;
+}
+/* Operator.Word */
+.highlight .w {
+ color: #bbbbbb;
+}
+/* Text.Whitespace */
+.highlight .mf {
+ color: #666666;
+}
+/* Literal.Number.Float */
+.highlight .mh {
+ color: #666666;
+}
+/* Literal.Number.Hex */
+.highlight .mi {
+ color: #666666;
+}
+/* Literal.Number.Integer */
+.highlight .mo {
+ color: #666666;
+}
+/* Literal.Number.Oct */
+.highlight .sb {
+ color: #BA2121;
+}
+/* Literal.String.Backtick */
+.highlight .sc {
+ color: #BA2121;
+}
+/* Literal.String.Char */
+.highlight .sd {
+ color: #BA2121;
+ font-style: italic;
+}
+/* Literal.String.Doc */
+.highlight .s2 {
+ color: #BA2121;
+}
+/* Literal.String.Double */
+.highlight .se {
+ color: #BB6622;
+ font-weight: bold;
+}
+/* Literal.String.Escape */
+.highlight .sh {
+ color: #BA2121;
+}
+/* Literal.String.Heredoc */
+.highlight .si {
+ color: #BB6688;
+ font-weight: bold;
+}
+/* Literal.String.Interpol */
+.highlight .sx {
+ color: #008000;
+}
+/* Literal.String.Other */
+.highlight .sr {
+ color: #BB6688;
+}
+/* Literal.String.Regex */
+.highlight .s1 {
+ color: #BA2121;
+}
+/* Literal.String.Single */
+.highlight .ss {
+ color: #19177C;
+}
+/* Literal.String.Symbol */
+.highlight .bp {
+ color: #008000;
+}
+/* Name.Builtin.Pseudo */
+.highlight .vc {
+ color: #19177C;
+}
+/* Name.Variable.Class */
+.highlight .vg {
+ color: #19177C;
+}
+/* Name.Variable.Global */
+.highlight .vi {
+ color: #19177C;
+}
+/* Name.Variable.Instance */
+.highlight .il {
+ color: #666666;
+}
+/* Literal.Number.Integer.Long */
+.highlight pre {
+ overflow: auto;
+}
+.highlight .lineno {
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ cursor: default;
+}
+.highlight .lineno::selection {
+ background: transparent;
+ /* WebKit/Blink Browsers */
+}
+.highlight .lineno::-moz-selection {
+ background: transparent;
+ /* Gecko Browsers */
+}
+html.no-js .hide_if_nojs {
+ display: none;
+}
+html.js .show_if_nojs {
+ display: none;
+}
+.center {
+ text-align: center;
+}
+.right {
+ float: right ;
+}
+.left {
+ float: left;
+}
+.invisible {
+ display: none !important;
+}
+.list-unstyled {
+ list-style-type: none;
+}
+.list-unstyled li {
+ margin-top: 4px;
+ margin-bottom: 4px;
+}
+.danger {
+ background-color: #fae1e1;
+}
+.badge {
+ display: inline-block;
+ color: #fff;
+ background-color: #777;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: baseline;
+ min-width: 10px;
+ padding: 1px 5px;
+ border-radius: 5px;
+}
+kbd {
+ padding: 2px 4px;
+ margin: 1px;
+ font-size: 90%;
+ color: white;
+ background: black;
+}
+table {
+ width: 100%;
+}
+table.striped tr {
+ border-bottom: 1px solid #ececec;
+}
+th {
+ padding: 0.4em;
+}
+td {
+ padding: 0 4px;
+}
+tr:hover {
+ background: #ececec;
+}
+div.selectable_url {
+ border: 1px solid #888;
+ padding: 4px;
+ color: #444;
+ width: 100%;
+ display: block;
+ margin: 0.1em;
+ overflow: hidden;
+ height: 1.2em;
+ line-height: 1.2em;
+}
+div.selectable_url pre {
+ display: block;
+ font-size: 0.8em;
+ word-break: break-all;
+ margin: 0.1em;
+ -webkit-user-select: all;
+ -moz-user-select: all;
+ -ms-user-select: element;
+ user-select: all;
+}
+.dialog-error {
+ position: relative;
+ width: 70%;
+ padding: 1em 1em 1em 2.7em;
+ margin: 0em 8% 1em 8%;
+ border: 1px solid black;
+ border-radius: 4px;
+ text-align: left;
+ color: #db3434;
+ background: #fae1e1;
+ border-color: #db3434;
+}
+.dialog-error:before {
+ position: absolute;
+ top: 0.5em;
+ left: 0.5em;
+ font-family: "ion";
+ font-size: 1.5em;
+}
+.dialog-error .close {
+ float: right;
+ position: relative;
+ top: -3px;
+ color: inherit;
+ font-size: 1.5em;
+}
+.dialog-error ul,
+.dialog-error ol,
+.dialog-error p {
+ margin: 1px 0 0 0;
+}
+.dialog-error table {
+ width: auto;
+}
+.dialog-error tr {
+ vertical-align: text-top;
+}
+.dialog-error tr:hover {
+ background: transparent;
+}
+.dialog-error td {
+ padding: 0 1em 0 0;
+}
+.dialog-error h4 {
+ margin-top: 0.3em;
+ margin-bottom: 0.3em;
+}
+.dialog-error:before {
+ content: "\f110";
+}
+.dialog-warning {
+ position: relative;
+ width: 70%;
+ padding: 1em 1em 1em 2.7em;
+ margin: 0em 8% 1em 8%;
+ border: 1px solid black;
+ border-radius: 4px;
+ text-align: left;
+ color: #dbba34;
+ background: #faf5e1;
+ border-color: #dbba34;
+}
+.dialog-warning:before {
+ position: absolute;
+ top: 0.5em;
+ left: 0.5em;
+ font-family: "ion";
+ font-size: 1.5em;
+}
+.dialog-warning .close {
+ float: right;
+ position: relative;
+ top: -3px;
+ color: inherit;
+ font-size: 1.5em;
+}
+.dialog-warning ul,
+.dialog-warning ol,
+.dialog-warning p {
+ margin: 1px 0 0 0;
+}
+.dialog-warning table {
+ width: auto;
+}
+.dialog-warning tr {
+ vertical-align: text-top;
+}
+.dialog-warning tr:hover {
+ background: transparent;
+}
+.dialog-warning td {
+ padding: 0 1em 0 0;
+}
+.dialog-warning h4 {
+ margin-top: 0.3em;
+ margin-bottom: 0.3em;
+}
+.dialog-warning:before {
+ content: "\f10f";
+}
+.dialog-modal {
+ position: relative;
+ width: 70%;
+ padding: 1em 1em 1em 2.7em;
+ margin: 0em 8% 1em 8%;
+ border: 1px solid black;
+ border-radius: 4px;
+ text-align: left;
+ background: white;
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ /* bring your own prefixes */
+ transform: translate(-50%, -50%);
+ z-index: 100000;
+ margin: 0 50% 0 0;
+ box-shadow: 0 0 1em;
+}
+.dialog-modal:before {
+ position: absolute;
+ top: 0.5em;
+ left: 0.5em;
+ font-family: "ion";
+ font-size: 1.5em;
+}
+.dialog-modal .close {
+ float: right;
+ position: relative;
+ top: -3px;
+ color: inherit;
+ font-size: 1.5em;
+}
+.dialog-modal ul,
+.dialog-modal ol,
+.dialog-modal p {
+ margin: 1px 0 0 0;
+}
+.dialog-modal table {
+ width: auto;
+}
+.dialog-modal tr {
+ vertical-align: text-top;
+}
+.dialog-modal tr:hover {
+ background: transparent;
+}
+.dialog-modal td {
+ padding: 0 1em 0 0;
+}
+.dialog-modal h4 {
+ margin-top: 0.3em;
+ margin-bottom: 0.3em;
+}
+.btn-collapse {
+ cursor: pointer;
+}
+.scrollx {
+ overflow-x: auto;
+ overflow-y: hidden;
+ display: block;
+ padding: 0;
+ margin: 0;
+ border: none;
+}
+/* -- tabs --*/
+.tabs .tabs > label {
+ font-size: 90%;
+}
+.tabs {
+ display: -webkit-box;
+ display: -moz-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ flex-wrap: wrap;
+ width: 100%;
+ min-width: 100%;
+}
+.tabs > * {
+ order: 2;
+}
+.tabs > input[type=radio] {
+ display: none;
+}
+.tabs > label {
+ order: 1;
+ padding: 0.7em;
+ margin: 0 0.7em;
+ letter-spacing: 0.5px;
+ text-transform: uppercase;
+ border: solid white;
+ border-width: 0px 0px 2px 0;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ cursor: pointer;
+}
+.tabs > label:hover {
+ border-bottom: 2px solid #084999;
+}
+.tabs > section {
+ min-width: 100%;
+ padding: 0.7rem 0;
+ box-sizing: border-box;
+ border-top: 1px solid black;
+ display: none;
+}
+.tabs > label:last-of-type {
+ border-bottom: 2px solid #084999;
+ background: #3498DB;
+ color: #FFF;
+ font-weight: bold;
+ letter-spacing: -0.1px;
+}
+.tabs > section:last-of-type {
+ display: block;
+}
+html body .tabs > input:checked ~ section {
+ display: none;
+}
+html body .tabs > input:checked ~ label {
+ position: inherited;
+ background: inherit;
+ border-bottom: 2px solid transparent;
+ font-weight: normal;
+ color: inherit;
+}
+html body .tabs > input:checked ~ label:hover {
+ border-bottom: 2px solid #084999;
+}
+html body .tabs > input:checked + label {
+ border-bottom: 2px solid #084999;
+ background: #3498DB;
+ color: #FFF;
+ font-weight: bold;
+ letter-spacing: -0.1px;
+}
+html body .tabs > input:checked + label + section {
+ display: block;
+}
+/* -- select -- */
+select {
+ height: 28px;
+ margin: 0 1em 0 0;
+ padding: 2px 8px 2px 0 !important;
+ color: #222;
+ font-size: 12px;
+ z-index: 2;
+}
+select:hover,
+select:focus {
+ cursor: pointer;
+}
+@supports ((background-position-x: 100%) and ((appearance: none) or (-webkit-appearance: none) or (-moz-appearance: none))) {
+ select {
+ appearance: none;
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ border: none;
+ border-bottom: 1px solid #d7d7d7;
+ background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI1MTJweCIgaGVpZ2h0PSI1MTJweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDUxMiA1MTIiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTI4LDE5MiAyNTYsMzIwIDM4NCwxOTIiLz48L2c+PC9zdmc+Cg==) no-repeat;
+ background-position-x: 105%;
+ background-size: 2em;
+ background-origin: content-box;
+ outline: medium none;
+ }
+ select:hover,
+ select:focus {
+ border-bottom: 1px solid #3498DB;
+ }
+}
+/* -- checkbox-onoff -- */
+@supports (border-radius: 50px) {
+ .checkbox-onoff {
+ display: inline-block;
+ width: 40px;
+ height: 10px;
+ background: #dcdcdc;
+ margin: 8px auto;
+ position: relative;
+ border-radius: 50px;
+ }
+ .checkbox-onoff label {
+ display: block;
+ width: 20px;
+ height: 20px;
+ position: absolute;
+ top: -5px;
+ cursor: pointer;
+ border-radius: 50px;
+ box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.3);
+ transition: all 0.4s ease;
+ left: 27px;
+ background-color: #3498DB;
+ }
+ .checkbox-onoff input[type=checkbox] {
+ visibility: hidden;
+ }
+ .checkbox-onoff input[type=checkbox]:checked + label {
+ left: -5px;
+ background: #dcdcdc;
+ }
+}
+/* -- checkbox --*/
+@supports (transform: rotate(-45deg)) {
+ .checkbox {
+ width: 20px;
+ position: relative;
+ margin: 20px auto;
+ }
+ .checkbox label {
+ width: 20px;
+ height: 20px;
+ cursor: pointer;
+ position: absolute;
+ top: 0;
+ left: 0;
+ background: white;
+ border-radius: 4px;
+ box-shadow: inset 0px 1px 1px white, 0px 1px 4px rgba(0, 0, 0, 0.5);
+ }
+ .checkbox label:after {
+ content: '';
+ width: 9px;
+ height: 5px;
+ position: absolute;
+ top: 4px;
+ left: 4px;
+ border: 3px solid #333;
+ border-top: none;
+ border-right: none;
+ background: transparent;
+ opacity: 0;
+ transform: rotate(-45deg);
+ }
+ .checkbox input[type=checkbox] {
+ visibility: hidden;
+ }
+ .checkbox input[type=checkbox]:checked + label:after {
+ border-color: #3498DB;
+ opacity: 1;
+ }
+ .checkbox input[disabled] + label {
+ background-color: transparent !important;
+ box-shadow: none !important;
+ cursor: inherit;
+ }
+ .checkbox input:not(:checked):not([readonly]):not([disabled]) + label:hover::after {
+ opacity: 0.5;
+ }
+}
+@media screen and (max-width: 50em) {
+ .tabs > label {
+ width: 100%;
+ }
+}
+/* -- loader -- */
+.loader,
+.loader:after {
+ border-radius: 50%;
+ width: 2em;
+ height: 2em;
+}
+.loader {
+ margin: 1em auto;
+ font-size: 10px;
+ position: relative;
+ text-indent: -9999em;
+ border-top: 0.5em solid rgba(0, 0, 0, 0.2);
+ border-right: 0.5em solid rgba(0, 0, 0, 0.2);
+ border-bottom: 0.5em solid rgba(0, 0, 0, 0.2);
+ border-left: 0.5em solid rgba(255, 255, 255, 0);
+ -webkit-transform: translateZ(0);
+ -ms-transform: translateZ(0);
+ transform: translateZ(0);
+ -webkit-animation: load8 1.2s infinite linear;
+ animation: load8 1.2s infinite linear;
+}
+@-webkit-keyframes load8 {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
+@keyframes load8 {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
+/*! Autocomplete.js v2.6.3 | license MIT | (c) 2017, Baptiste Donaux | http://autocomplete-js.com */
+.autocomplete {
+ position: absolute;
+ max-height: 0;
+ overflow-y: hidden;
+ text-align: left;
+}
+.autocomplete:active,
+.autocomplete:focus,
+.autocomplete:hover {
+ background-color: white;
+}
+.autocomplete:empty {
+ display: none;
+}
+.autocomplete > ul {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+}
+.autocomplete > ul > li {
+ cursor: pointer;
+ padding: 5px 0 5px 10px;
+}
+.autocomplete > ul > li.active,
+.autocomplete > ul > li:active,
+.autocomplete > ul > li:focus {
+ background-color: #3498DB;
+}
+.autocomplete > ul > li.active a:active,
+.autocomplete > ul > li:active a:active,
+.autocomplete > ul > li:focus a:active,
+.autocomplete > ul > li.active a:focus,
+.autocomplete > ul > li:active a:focus,
+.autocomplete > ul > li:focus a:focus,
+.autocomplete > ul > li.active a:hover,
+.autocomplete > ul > li:active a:hover,
+.autocomplete > ul > li:focus a:hover {
+ text-decoration: none;
+}
+.autocomplete > ul > li.locked {
+ cursor: inherit;
+}
+.autocomplete.open {
+ display: block;
+ background-color: white;
+ border: 1px solid #3498DB;
+ max-height: 500px;
+ overflow-y: auto;
+ z-index: 100;
+}
+.autocomplete.open:empty {
+ display: none;
+}
+@media screen and (max-width: 50em) {
+ .autocomplete {
+ bottom: 0;
+ }
+ .autocomplete > ul > li {
+ padding: 7px 0 7px 10px;
+ border-bottom: 1px solid #E8E7E6;
+ text-align: left;
+ }
+}
+@font-face {
+ font-family: "ion";
+ src: url("../fonts/ion.eot?ce7a0ead692560b4405a96d5b8471f51");
+ src: url("../fonts/ion.eot?#iefix") format("embedded-opentype"), url("../fonts/ion.woff2?ce7a0ead692560b4405a96d5b8471f51") format("woff2"), url("../fonts/ion.woff?ce7a0ead692560b4405a96d5b8471f51") format("woff"), url("../fonts/ion.ttf?ce7a0ead692560b4405a96d5b8471f51") format("truetype"), url("../fonts/ion.svg?ce7a0ead692560b4405a96d5b8471f51#ion") format("svg");
+ font-weight: normal;
+ font-style: normal;
+}
+.ion-icon {
+ display: inline-block;
+ vertical-align: middle;
+ line-height: 1;
+ font-weight: normal;
+ font-style: normal;
+ speak: none;
+ text-decoration: inherit;
+ text-transform: none;
+ text-rendering: auto;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+.ion-icon:before {
+ font-family: "ion";
+}
+.ion-navicon-round:before {
+ content: "\f101";
+}
+.ion-search:before {
+ content: "\f102";
+}
+.ion-play:before {
+ content: "\f103";
+}
+.ion-link:before {
+ content: "\f104";
+}
+.ion-chevron-up:before {
+ content: "\f105";
+}
+.ion-chevron-left:before {
+ content: "\f106";
+}
+.ion-chevron-right:before {
+ content: "\f107";
+}
+.ion-arrow-down-a:before {
+ content: "\f108";
+}
+.ion-arrow-up-a:before {
+ content: "\f109";
+}
+.ion-arrow-swap:before {
+ content: "\f10a";
+}
+.ion-arrow-dropdown:before {
+ content: "\f10b";
+}
+.ion-globe:before {
+ content: "\f10c";
+}
+.ion-time:before {
+ content: "\f10d";
+}
+.ion-location:before {
+ content: "\f10e";
+}
+.ion-warning:before {
+ content: "\f10f";
+}
+.ion-error:before {
+ content: "\f110";
+}
+.ion-film-outline:before {
+ content: "\f111";
+}
+.ion-music-note:before {
+ content: "\f112";
+}
+.ion-more-vertical:before {
+ content: "\f113";
+}
+.ion-magnet:before {
+ content: "\f114";
+}
+.ion-close:before {
+ content: "\f115";
+}
+.ion-icon-big {
+ display: inline-block;
+ vertical-align: middle;
+ line-height: 1;
+ font-weight: normal;
+ font-style: normal;
+ speak: none;
+ text-decoration: inherit;
+ text-transform: none;
+ text-rendering: auto;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ font-size: 149%;
+}
+.ion-icon-big:before {
+ font-family: "ion";
+}
+.index {
+ text-align: center;
+}
+.index .title {
+ background: url('../img/searx.png') no-repeat;
+ width: 100%;
+ min-height: 80px;
+ background-position: center;
+}
+.index h1 {
+ font-size: 5em;
+ visibility: hidden;
+}
+.index #search {
+ margin: 0 auto;
+ background: inherit;
+ border: inherit;
+}
+.index .search_filters {
+ display: block;
+ margin: 1em 0;
+}
+.index .category label {
+ padding: 6px 10px;
+ border-bottom: initial !important;
+}
+@media screen and (max-width: 75em) {
+ div.title h1 {
+ font-size: 1em;
+ }
+}
+#main_preferences form {
+ width: 100%;
+}
+#main_preferences fieldset {
+ margin: 8px;
+ border: none;
+}
+#main_preferences legend {
+ margin: 0;
+ padding: 5px 0 0 0;
+ display: block;
+ float: left;
+ width: 300px;
+}
+#main_preferences .value {
+ margin: 0;
+ padding: 0;
+ float: left;
+ width: 15em;
+}
+#main_preferences .description {
+ margin: 0;
+ padding: 5px 0 0 0;
+ float: left;
+ width: 50%;
+ color: #909090;
+ font-size: 90%;
+}
+#main_preferences select {
+ width: 200px;
+ font-size: inherit !important;
+}
+#main_preferences table {
+ border-collapse: collapse;
+}
+#main_preferences table td {
+ text-align: center;
+}
+#main_preferences table.cookies {
+ width: auto;
+}
+#main_preferences table.cookies th,
+#main_preferences table.cookies td {
+ text-align: left;
+ padding: 0.25em;
+}
+#main_preferences table.cookies th:first-child,
+#main_preferences table.cookies td:first-child {
+ padding-right: 4em;
+}
+#main_preferences table.cookies > tbody > tr:nth-child(even) > th,
+#main_preferences table.cookies > tbody > tr:nth-child(even) > td {
+ background-color: #ececec;
+}
+#main_preferences .name,
+#main_preferences .shortcut {
+ text-align: left;
+}
+#main_preferences .preferences_back {
+ background: none repeat scroll 0 0 #3498DB;
+ color: white;
+ border: 0 none;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ cursor: pointer;
+ display: inline-block;
+ margin: 2px 4px;
+ padding: 0.5em;
+}
+#main_preferences .preferences_back a {
+ display: block;
+ color: #FFF;
+}
+#main_preferences .preferences_back a::first-letter {
+ text-transform: uppercase;
+}
+#main_preferences div.selectable_url pre {
+ width: 100%;
+}
+@media screen and (max-width: 75em) {
+ .preferences_back {
+ clear: both;
+ }
+}
+/*
+* searx, A privacy-respecting, hackable metasearch engine
+*/
+#search {
+ padding: 0 2em;
+ margin: 0;
+ background: #f7f7f7;
+ border-bottom: 1px solid #d7d7d7;
+}
+#search_wrapper {
+ padding: 10px 0;
+}
+.search_box {
+ margin: 0 12px 0 0;
+ display: inline-flex;
+ flex-direction: row;
+ white-space: nowrap;
+ /*
+ &:has(q:focus) {
+ box-shadow: 0px 0px 5px #CCC;
+}
+*/
+}
+#clear_search {
+ display: block;
+ border-collapse: separate;
+ box-sizing: border-box;
+ width: 1.8em;
+ margin: 0;
+ padding: 2px;
+ height: 2.2em;
+ background: none repeat scroll 0 0 #FFF;
+ border-top: 1px solid #3498DB;
+ border-bottom: 1px solid #3498DB;
+ border-right: none;
+ border-left: none;
+ border-radius: 0px;
+ outline: none;
+ color: #222;
+ font-size: 16px;
+ z-index: 10000;
+}
+#clear_search:hover {
+ color: #3498DB;
+}
+#clear_search.empty * {
+ display: none;
+}
+#q::-ms-clear,
+#q::-webkit-search-cancel-button {
+ display: none;
+}
+#q,
+#send_search {
+ display: block !important;
+ border-collapse: separate;
+ box-sizing: border-box;
+ margin: 0;
+ padding: 2px;
+ height: 2.2em;
+ background: none repeat scroll 0 0 #FFF;
+ border: 1px solid #3498DB;
+ border-radius: 0px;
+ outline: none;
+ color: #222;
+ font-size: 16px;
+ z-index: 2;
+}
+#q {
+ outline: medium none;
+ padding-left: 8px;
+ padding-right: 0px !important;
+ border-right: none;
+ width: 40em;
+}
+#send_search {
+ border-left: none;
+ width: 2.2em;
+}
+#send_search:hover {
+ cursor: pointer;
+ background-color: #3498DB;
+ color: #ECF0F1;
+}
+.no-js #send_search {
+ width: auto !important;
+}
+.search_filters {
+ display: inline-block;
+ vertical-align: middle;
+}
+@media screen and (max-width: 75em) {
+ #categories {
+ font-size: 90%;
+ clear: both;
+ }
+ #categories .checkbox_container {
+ margin-top: 2px;
+ margin: auto;
+ }
+ html.touch #main_index #categories_container,
+ html.touch #main_results #categories_container {
+ width: 1000px;
+ width: -moz-max-content;
+ width: -webkit-max-content;
+ width: max-content;
+ }
+ html.touch #main_index #categories_container .category,
+ html.touch #main_results #categories_container .category {
+ display: inline-block;
+ width: auto;
+ }
+ html.touch #main_index #categories,
+ html.touch #main_results #categories {
+ width: 100%;
+ margin: 0;
+ text-align: left;
+ overflow-x: scroll;
+ overflow-y: hidden;
+ -webkit-overflow-scrolling: touch;
+ }
+}
+@media screen and (max-width: 50em) {
+ #search {
+ width: 100%;
+ margin: 0;
+ padding: 0.1em 0 0 0;
+ }
+ #search_wrapper {
+ width: 100%;
+ margin: 0 0 0.7em 0;
+ padding: 0;
+ }
+ .search_box {
+ width: 99%;
+ margin: 0.1em;
+ padding: 0 0.1em 0 0;
+ display: flex;
+ flex-direction: row;
+ }
+ #q {
+ width: auto !important;
+ flex: 1;
+ }
+ .search_filters {
+ display: block;
+ margin: 0.5em;
+ }
+ .language,
+ .time_range {
+ width: 45%;
+ }
+ .category {
+ display: block;
+ width: 90%;
+ }
+ .category label {
+ border-bottom: 0;
+ }
+}
+#categories {
+ margin: 0 10px 0 0;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+#categories::-webkit-scrollbar {
+ width: 0;
+ height: 0;
+}
+.category {
+ display: inline-block;
+ position: relative;
+ margin: 0 3px;
+ padding: 0px;
+ /*label:hover {
+ border-bottom: 2px solid @color-categories-item-border-unselected-hover;
+ }*/
+}
+.category input {
+ display: none;
+}
+.category label {
+ cursor: pointer;
+ padding: 4px 10px;
+ margin: 0;
+ display: block;
+ text-transform: capitalize;
+ font-size: 0.9em;
+ border-bottom: 2px solid transparent;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+.category input[type="checkbox"]:focus + label {
+ box-shadow: 0px 0px 8px #3498DB;
+}
+.category input[type="checkbox"]:checked + label {
+ background: #3498DB;
+ color: #FFF;
+ border-bottom: 2px solid #084999;
+}
+#categories_container {
+ position: relative;
+}
+#categories_container .help {
+ position: absolute;
+ width: 100%;
+ bottom: -20px;
+ overflow: hidden;
+ opacity: 0;
+ transition: opacity 1s ease;
+ font-size: 0.8em;
+ text-position: center;
+ background: white;
+}
+#categories_container:hover .help {
+ opacity: 0.8;
+ transition: opacity 1s ease;
+}
+html {
+ font-family: arial, sans-serif;
+ font-size: 0.9em;
+ -webkit-text-size-adjust: 100%;
+ -ms-text-size-adjust: 100%;
+ -moz-text-size-adjust: 100%;
+ text-size-adjust: 100%;
+ color: #444;
+ padding: 0;
+ margin: 0;
+}
+body,
+main {
+ padding: 0;
+ margin: 0;
+}
+main {
+ width: 100%;
+}
+footer {
+ bottom: 0;
+ width: 100%;
+ height: 50px;
+}
+#main_preferences,
+#main_about,
+#main_stats {
+ margin: 3em;
+ width: auto;
+}
+footer {
+ bottom: 0;
+ height: 3em;
+ margin: 1em 0;
+ padding: 1em 0;
+ clear: both;
+ width: 100%;
+ text-align: center;
+}
+footer p {
+ font-size: 0.9em;
+}
+#main_preferences h1,
+#main_stats h1 {
+ background: url('../img/searx.png') no-repeat;
+ background-size: auto 75%;
+ min-height: 40px;
+ margin: 0 auto;
+}
+#main_preferences h1 span,
+#main_stats h1 span {
+ visibility: hidden;
+}
+input[type="submit"],
+#results button[type="submit"] {
+ padding: 0.5rem;
+ margin: 2px 4px;
+ display: inline-block;
+ background: #3498DB;
+ color: #FFF;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ border: 0;
+ cursor: pointer;
+}
+a {
+ text-decoration: none;
+ color: #29314d;
+}
+a:visited {
+ color: #684898;
+}
+a:visited .highlight {
+ color: #684898;
+}
+article[data-vim-selected] {
+ background: #f7f7f7;
+}
+article[data-vim-selected]::before {
+ position: absolute;
+ left: 1em;
+ padding: 2px;
+ content: ">";
+ font-weight: bold;
+ color: #3498DB;
+}
+article.result-images[data-vim-selected] {
+ background: #3498DB;
+}
+article.result-images[data-vim-selected]::before {
+ display: none;
+ content: "";
+}
+.result {
+ margin: 19px 0 18px 0;
+ padding: 0;
+}
+.result h3 {
+ font-size: 1.1em;
+ word-wrap: break-word;
+ margin: 5px 0 1px 0;
+ padding: 0;
+ margin-bottom: 0;
+}
+.result h3 a {
+ color: #084999;
+ font-weight: normal;
+ font-size: 1.1em;
+}
+.result h3 a:visited {
+ color: #684898;
+}
+.result h3 a:focus,
+.result h3 a:hover {
+ text-decoration: underline;
+ border: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ outline: none;
+}
+.result .cache_link,
+.result .proxyfied_link {
+ font-size: 0.9em !important;
+}
+.result .content,
+.result .stat,
+.result .altlink {
+ font-size: 0.9em;
+ margin: 0;
+ padding: 0;
+ max-width: 54em;
+ word-wrap: break-word;
+ line-height: 1.24;
+}
+.result .content .highlight,
+.result .stat .highlight,
+.result .altlink .highlight {
+ color: #000000;
+ background: inherit;
+ font-weight: bold;
+}
+.result .codelines .highlight {
+ color: inherit;
+ background: inherit;
+ font-weight: normal;
+}
+.result .url {
+ font-size: 0.9em;
+ margin: 0 0 3px 0;
+ padding: 0;
+ max-width: 54em;
+ word-wrap: break-word;
+ color: #25a55b;
+}
+.result .published_date {
+ font-size: 0.8em;
+ color: #888;
+}
+.result img.thumbnail {
+ float: left;
+ padding: 0 5px 10px 0;
+ width: 20em;
+ min-width: 20em;
+ min-height: 8em;
+}
+.result img.image {
+ float: left;
+ padding: 0 5px 10px 0;
+ width: 100px;
+ max-height: 100px;
+ object-fit: scale-down;
+ object-position: right top;
+}
+.result .break {
+ clear: both;
+}
+.category-social .image {
+ width: auto !important;
+ min-width: 48px;
+ min-height: 48px;
+ padding: 0 5px 25px 0 !important;
+}
+.result-videos .content {
+ overflow: hidden;
+}
+.engines {
+ float: right;
+ color: #888;
+}
+.engines span {
+ font-size: smaller;
+ margin: 0 0.5em 0 0;
+}
+.small_font {
+ font-size: 0.8em;
+}
+.highlight {
+ color: #094089;
+ background: inherit;
+ font-weight: bold;
+}
+.result-images {
+ display: inline-block;
+ margin: 0;
+ padding: 0;
+ position: relative;
+ max-height: 200px;
+}
+.result-images img {
+ float: inherit;
+ margin: 0;
+ padding: 0;
+ border: none;
+ max-height: 200px;
+ background: #084999;
+}
+.result-images span a {
+ display: none;
+ color: #FFF;
+}
+.result-images:hover span a {
+ display: block;
+ position: absolute;
+ bottom: 0;
+ right: 0;
+ padding: 4px;
+ margin: 0 0 4px 4px;
+ background-color: rgba(0, 0, 0, 0.6);
+ font-size: 0.7em;
+}
+.torrent_result {
+ border-left: 10px solid lightgray;
+ padding-left: 3px;
+}
+.torrent_result p {
+ margin: 3px;
+ font-size: 0.8em;
+}
+.torrent_result a {
+ color: #084999;
+}
+.torrent_result a:hover {
+ text-decoration: underline;
+}
+.torrent_result a:visited {
+ color: #684898;
+}
+#results {
+ margin: 2em 2em 20px 2em;
+ padding: 0;
+ width: 50em;
+}
+#suggestions .wrapper {
+ display: flex;
+ flex-flow: row wrap;
+ justify-content: flex-end;
+}
+#suggestions .wrapper form {
+ display: inline-block;
+ flex: 1 1 50%;
+}
+#suggestions,
+#answers,
+#corrections {
+ max-width: 50em;
+}
+#suggestions input,
+#answers input,
+#infoboxes input,
+#corrections input {
+ padding: 0;
+ margin: 3px;
+ font-size: 0.9em;
+ display: inline-block;
+ background: transparent;
+ color: #444;
+ cursor: pointer;
+}
+#suggestions input[type="submit"],
+#answers input[type="submit"],
+#infoboxes input[type="submit"],
+#corrections input[type="submit"],
+#suggestions .infobox .url a,
+#answers .infobox .url a,
+#infoboxes .infobox .url a,
+#corrections .infobox .url a {
+ color: #084999;
+ text-decoration: none;
+ font-size: 0.9rem;
+}
+#suggestions input[type="submit"]:hover,
+#answers input[type="submit"]:hover,
+#infoboxes input[type="submit"]:hover,
+#corrections input[type="submit"]:hover,
+#suggestions .infobox .url a:hover,
+#answers .infobox .url a:hover,
+#infoboxes .infobox .url a:hover,
+#corrections .infobox .url a:hover {
+ text-decoration: underline;
+}
+#corrections {
+ display: flex;
+ flex-flow: row wrap;
+ margin: 1em 0;
+}
+#corrections h4,
+#corrections input[type="submit"] {
+ display: inline-block;
+ margin: 0 0.5em 0 0;
+}
+#corrections input[type="submit"]::after {
+ content: ", ";
+}
+#suggestions .title,
+#search_url .title,
+#apis .title {
+ margin: 2em 0 0.5em 0;
+ color: #444;
+}
+#answers {
+ margin: 10px 8px 10px 8px;
+ border: 1px solid #ddd;
+ padding: 0.9em;
+ box-shadow: 0px 0px 5px #CCC;
+}
+#answers h4 {
+ display: none;
+}
+#answers .answer {
+ display: block;
+ font-size: 1.2em;
+ font-weight: bold;
+}
+#answers form,
+#infoboxes form {
+ min-width: 210px;
+}
+#sidebar {
+ position: absolute;
+ top: 100px;
+ left: 57em;
+ margin: 0px 2px 5px 5px;
+ padding: 0px 2px 2px;
+ max-width: 25em;
+ word-wrap: break-word;
+}
+#sidebar .infobox {
+ margin: 10px 0 10px;
+ border: 1px solid #ddd;
+ padding: 0.9em;
+ font-size: 0.9em;
+ box-shadow: 0px 0px 5px #CCC;
+}
+#sidebar .infobox h2 {
+ margin: 0 0 .5em 0;
+}
+#sidebar .infobox img {
+ max-width: 100%;
+ max-height: 12em;
+ display: block;
+ margin: 0;
+ padding: 0;
+}
+#sidebar .infobox dl {
+ margin: 0.5em 0;
+}
+#sidebar .infobox dt {
+ display: inline;
+ margin: 0.5em 0.25em 0.5em 0;
+ padding: 0;
+ font-weight: bold;
+}
+#sidebar .infobox dd {
+ display: inline;
+ margin: 0.5em 0;
+ padding: 0;
+}
+#sidebar .infobox input {
+ font-size: 1em;
+}
+#sidebar .infobox br {
+ clear: both;
+}
+#sidebar .infobox .attributes,
+#sidebar .infobox .urls {
+ clear: both;
+}
+#search_url {
+ margin-top: 8px;
+}
+#search_url div.selectable_url pre {
+ width: 200em;
+}
+#linkto_preferences {
+ position: absolute;
+ right: 10px;
+ top: 0.9em;
+ padding: 0;
+ border: 0;
+ display: block;
+ font-size: 1.2em;
+ color: #222;
+}
+#linkto_preferences a:link *,
+#linkto_preferences a:hover *,
+#linkto_preferences a:visited *,
+#linkto_preferences a:active * {
+ color: #222;
+}
+#pagination {
+ clear: both;
+}
+#pagination br {
+ clear: both;
+}
+#apis {
+ margin-top: 8px;
+ clear: both;
+}
+#backToTop {
+ border: 1px solid #ddd;
+ margin: 0 0 0 2em;
+ padding: 0;
+ font-size: 1em;
+ box-shadow: 0px 0px 5px #CCC;
+ background: white;
+ position: fixed;
+ bottom: 85px;
+ left: 50em;
+ transition: opacity 0.5s;
+ opacity: 0;
+}
+#backToTop a {
+ display: block;
+ margin: 0;
+ padding: 0.6em;
+}
+@media screen and (max-width: 75em) {
+ #main_preferences,
+ #main_about,
+ #main_stats {
+ margin: 0.5em;
+ width: auto;
+ }
+ #suggestions,
+ #answers {
+ margin-top: 1em;
+ }
+ #infoboxes {
+ position: inherit;
+ max-width: inherit;
+ }
+ #infoboxes .infobox {
+ clear: both;
+ }
+ #infoboxes .infobox img {
+ float: left;
+ max-width: 10em;
+ margin: 0.5em 0.5em 0.5em 0;
+ }
+ #sidebar {
+ position: static;
+ max-width: 50em;
+ margin: 0 0 2px 0;
+ padding: 0;
+ float: none;
+ border: none;
+ width: auto;
+ }
+ #sidebar input {
+ border: 0;
+ }
+ #apis {
+ display: none;
+ }
+ #search_url {
+ display: none;
+ }
+ .result {
+ border-bottom: 1px solid #E8E7E6;
+ margin: 0;
+ padding-top: 8px;
+ padding-bottom: 6px;
+ }
+ .result h3 {
+ margin: 0 0 1px 0;
+ }
+ .result .thumbnail {
+ max-width: 98%;
+ }
+ .result .url span.url {
+ display: block;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ width: 100%;
+ }
+ .result .url a {
+ float: right;
+ padding: 0 0.5em;
+ }
+ .result .engines {
+ float: right;
+ padding: 0 0 3px 0;
+ }
+ .result-images {
+ border-bottom: none !important;
+ }
+ .image_result {
+ max-width: 98%;
+ }
+ .image_result img {
+ max-width: 98%;
+ }
+}
+#main_results div#results.only_template_images {
+ flex-direction: column;
+ width: auto;
+ display: flex;
+}
+#main_results div#results.only_template_images #sidebar {
+ position: relative;
+ top: auto;
+ order: 2;
+}
+#main_results div#results.only_template_images #urls {
+ position: relative;
+ order: 1;
+}
+#main_results div#results.only_template_images #backToTop {
+ right: 0.5em;
+ left: auto;
+}
+#main_results div#results.only_template_images #pagination {
+ position: relative;
+ order: 3;
+}
+@media screen and (max-width: 50em) {
+ article[data-vim-selected]::before {
+ display: none;
+ content: "";
+ }
+ #linkto_preferences {
+ display: none;
+ postion: fixed !important;
+ top: 100px;
+ right: 0px;
+ }
+ #sidebar {
+ margin: 0 5px 2px 5px;
+ }
+ #corrections {
+ margin: 1em 5px 1em 5px;
+ }
+ #results {
+ margin: 0;
+ padding: 0;
+ width: initial;
+ }
+ #backToTop {
+ left: 40em;
+ bottom: 35px;
+ }
+ .result {
+ padding: 8px 10px 6px 10px;
+ }
+ .result-images {
+ margin: 0;
+ padding: 0;
+ border: none;
+ }
+}
+@media screen and (max-width: 35em) {
+ .result-videos img.thumbnail {
+ float: none !important;
+ }
+ .result-videos .content {
+ overflow: inherit;
+ }
+}
diff --git a/searx/static/themes/simple/css/searx.min.css b/searx/static/themes/simple/css/searx.min.css
new file mode 100644
index 000000000..5dc9fd30b
--- /dev/null
+++ b/searx/static/themes/simple/css/searx.min.css
@@ -0,0 +1 @@
+/*! searx | 06-08-2019 | https://github.com/asciimoo/searx *//*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */button,hr,input{overflow:visible}[type=checkbox],[type=radio],legend{padding:0;box-sizing:border-box}.badge,.center{text-align:center}.badge,progress,sub,sup{vertical-align:baseline}.autocomplete>ul,.list-unstyled{list-style-type:none}.tabs>section,legend{box-sizing:border-box}#main_preferences h1 span,#main_stats h1 span,.index h1{visibility:hidden}#apis,#pagination,#pagination br,#sidebar .infobox .attributes,#sidebar .infobox .urls,#sidebar .infobox br,.result .break,footer{clear:both}html{line-height:1.15}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}.highlight pre,textarea{overflow:auto}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:ButtonText dotted 1px}fieldset{padding:.35em .75em .625em}legend{color:inherit;display:table;max-width:100%;white-space:normal}.badge,.search_box{white-space:nowrap}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.highlight .c,.highlight .cm,.highlight .ge,.highlight .sd{font-style:italic}.dialog-error:before,.dialog-modal:before,.dialog-warning:before,.ion-icon-big:before,.ion-icon:before{font-family:ion}details{display:block}summary{display:list-item}[hidden],html.js .show_if_nojs,html.no-js .hide_if_nojs,template{display:none}.highlight .hll{background-color:#ffc}.highlight .c{color:#408080}.highlight .err{border:1px solid red}.highlight .k{color:green;font-weight:700}.highlight .o{color:#666}.highlight .cm{color:#408080}.highlight .cp{color:#BC7A00}.highlight .c1,.highlight .cs{color:#408080;font-style:italic}.highlight .gd{color:#A00000}.highlight .gr{color:red}.highlight .gh{color:navy;font-weight:700}.highlight .gi{color:#00A000}.highlight .go{color:#888}.highlight .gp{color:navy;font-weight:700}.highlight .gs{font-weight:700}.highlight .gu{color:purple;font-weight:700}.highlight .gt{color:#04D}.highlight .kc,.highlight .kd,.highlight .kn{color:green;font-weight:700}.highlight .kp{color:green}.highlight .kr{color:green;font-weight:700}.highlight .kt{color:#B00040}.highlight .m{color:#666}.highlight .s{color:#BA2121}.highlight .na{color:#7D9029}.highlight .nb{color:green}.highlight .nc{color:#00F;font-weight:700}.highlight .no{color:#800}.highlight .nd{color:#A2F}.highlight .ni{color:#999;font-weight:700}.highlight .ne{color:#D2413A;font-weight:700}.highlight .nf{color:#00F}.highlight .nl{color:#A0A000}.highlight .nn{color:#00F;font-weight:700}.highlight .nt{color:green;font-weight:700}.highlight .nv{color:#19177C}.highlight .ow{color:#A2F;font-weight:700}.highlight .w{color:#bbb}.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#666}.highlight .s2,.highlight .sb,.highlight .sc{color:#BA2121}.highlight .sd{color:#BA2121}.highlight .se{color:#B62;font-weight:700}.highlight .sh{color:#BA2121}.highlight .si{color:#B68;font-weight:700}.highlight .sx{color:green}.highlight .sr{color:#B68}.highlight .s1{color:#BA2121}.highlight .ss{color:#19177C}.highlight .bp{color:green}.highlight .vc,.highlight .vg,.highlight .vi{color:#19177C}.highlight .il{color:#666}.badge,kbd{color:#fff}.highlight .lineno{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.btn-collapse,.tabs>label,select:focus,select:hover{cursor:pointer}.highlight .lineno::selection{background:0 0}.highlight .lineno::-moz-selection{background:0 0}.right{float:right}.left{float:left}.invisible{display:none!important}.list-unstyled li{margin-top:4px;margin-bottom:4px}.danger{background-color:#fae1e1}.badge{display:inline-block;background-color:#777;min-width:10px;padding:1px 5px;border-radius:5px}.dialog-error tr,.dialog-modal tr,.dialog-warning tr{vertical-align:text-top}kbd{padding:2px 4px;margin:1px;font-size:90%;background:#000}table{width:100%}table.striped tr{border-bottom:1px solid #ececec}th{padding:.4em}td{padding:0 4px}tr:hover{background:#ececec}div.selectable_url{border:1px solid #888;padding:4px;color:#444;width:100%;display:block;margin:.1em;overflow:hidden;height:1.2em;line-height:1.2em}div.selectable_url pre{display:block;font-size:.8em;word-break:break-all;margin:.1em;-webkit-user-select:all;-moz-user-select:all;-ms-user-select:element;user-select:all}#categories,.tabs>label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-touch-callout:none;-khtml-user-select:none}.dialog-error{position:relative;width:70%;padding:1em 1em 1em 2.7em;margin:0 8% 1em;border:1px solid #db3434;border-radius:4px;text-align:left;color:#db3434;background:#fae1e1}.dialog-error:before{position:absolute;top:.5em;left:.5em;font-size:1.5em;content:"\f110"}.dialog-error .close{float:right;position:relative;top:-3px;color:inherit;font-size:1.5em}.dialog-error ol,.dialog-error p,.dialog-error ul{margin:1px 0 0}.dialog-error table{width:auto}.dialog-error tr:hover{background:0 0}.dialog-error td{padding:0 1em 0 0}.dialog-error h4{margin-top:.3em;margin-bottom:.3em}.dialog-warning{position:relative;width:70%;padding:1em 1em 1em 2.7em;margin:0 8% 1em;border:1px solid #dbba34;border-radius:4px;text-align:left;color:#dbba34;background:#faf5e1}.dialog-warning:before{position:absolute;top:.5em;left:.5em;font-size:1.5em;content:"\f10f"}.dialog-warning .close{float:right;position:relative;top:-3px;color:inherit;font-size:1.5em}.dialog-warning ol,.dialog-warning p,.dialog-warning ul{margin:1px 0 0}.dialog-warning table{width:auto}.dialog-warning tr:hover{background:0 0}.dialog-warning td{padding:0 1em 0 0}.dialog-warning h4{margin-top:.3em;margin-bottom:.3em}.dialog-modal{width:70%;padding:1em 1em 1em 2.7em;border:1px solid #000;border-radius:4px;text-align:left;background:#fff;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:100000;margin:0 50% 0 0;box-shadow:0 0 1em}.dialog-modal:before{position:absolute;top:.5em;left:.5em;font-size:1.5em}.dialog-modal .close{float:right;position:relative;top:-3px;color:inherit;font-size:1.5em}.dialog-modal ol,.dialog-modal p,.dialog-modal ul{margin:1px 0 0}.dialog-modal table{width:auto}.dialog-modal tr:hover{background:0 0}.dialog-modal td{padding:0 1em 0 0}.dialog-modal h4{margin-top:.3em;margin-bottom:.3em}.scrollx{overflow-x:auto;overflow-y:hidden;display:block;padding:0;margin:0;border:none}.tabs .tabs>label{font-size:90%}.tabs{display:-webkit-box;display:-moz-box;display:-webkit-flex;display:-ms-flexbox;display:flex;flex-wrap:wrap;width:100%;min-width:100%}.tabs>*{order:2}.tabs>input[type=radio]{display:none}.tabs>label{order:1;padding:.7em;margin:0 .7em;letter-spacing:.5px;text-transform:uppercase;border:solid #fff;border-width:0 0 2px;user-select:none}.tabs>label:hover,.tabs>label:last-of-type{border-bottom:2px solid #084999}.tabs>section{min-width:100%;padding:.7rem 0;border-top:1px solid #000;display:none}.tabs>label:last-of-type{background:#3498DB;color:#FFF;font-weight:700;letter-spacing:-.1px}.tabs>section:last-of-type{display:block}html body .tabs>input:checked~section{display:none}html body .tabs>input:checked~label{position:inherited;background:inherit;border-bottom:2px solid transparent;font-weight:400;color:inherit}html body .tabs>input:checked~label:hover{border-bottom:2px solid #084999}html body .tabs>input:checked+label{border-bottom:2px solid #084999;background:#3498DB;color:#FFF;font-weight:700;letter-spacing:-.1px}html body .tabs>input:checked+label+section{display:block}select{height:28px;margin:0 1em 0 0;padding:2px 8px 2px 0!important;color:#222;font-size:12px;z-index:2}@supports ((background-position-x:100%) and ((appearance:none) or (-webkit-appearance:none) or (-moz-appearance:none))){select{appearance:none;-webkit-appearance:none;-moz-appearance:none;border:none;border-bottom:1px solid #d7d7d7;background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI1MTJweCIgaGVpZ2h0PSI1MTJweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDUxMiA1MTIiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTI4LDE5MiAyNTYsMzIwIDM4NCwxOTIiLz48L2c+PC9zdmc+Cg==) no-repeat;background-position-x:105%;background-size:2em;background-origin:content-box;outline:0}select:focus,select:hover{border-bottom:1px solid #3498DB}}@supports (border-radius:50px){.checkbox-onoff{display:inline-block;width:40px;height:10px;background:#dcdcdc;margin:8px auto;position:relative;border-radius:50px}.checkbox-onoff label{display:block;width:20px;height:20px;position:absolute;top:-5px;cursor:pointer;border-radius:50px;box-shadow:0 3px 5px 0 rgba(0,0,0,.3);transition:all .4s ease;left:27px;background-color:#3498DB}.checkbox-onoff input[type=checkbox]{visibility:hidden}.checkbox-onoff input[type=checkbox]:checked+label{left:-5px;background:#dcdcdc}}@supports (transform:rotate(-45deg)){.checkbox{width:20px;position:relative;margin:20px auto}.checkbox label{width:20px;height:20px;cursor:pointer;position:absolute;top:0;left:0;background:#fff;border-radius:4px;box-shadow:inset 0 1px 1px #fff,0 1px 4px rgba(0,0,0,.5)}.checkbox label:after{content:'';width:9px;height:5px;position:absolute;top:4px;left:4px;border:3px solid #333;border-top:none;border-right:none;background:0 0;opacity:0;transform:rotate(-45deg)}.checkbox input[type=checkbox]{visibility:hidden}.checkbox input[type=checkbox]:checked+label:after{border-color:#3498DB;opacity:1}.checkbox input[disabled]+label{background-color:transparent!important;box-shadow:none!important;cursor:inherit}.checkbox input:not(:checked):not([readonly]):not([disabled])+label:hover::after{opacity:.5}}@media screen and (max-width:50em){.tabs>label{width:100%}}.loader,.loader:after{border-radius:50%;width:2em;height:2em}.loader{margin:1em auto;font-size:10px;position:relative;text-indent:-9999em;border-top:.5em solid rgba(0,0,0,.2);border-right:.5em solid rgba(0,0,0,.2);border-bottom:.5em solid rgba(0,0,0,.2);border-left:.5em solid rgba(255,255,255,0);-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:load8 1.2s infinite linear;animation:load8 1.2s infinite linear}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}/*! Autocomplete.js v2.6.3 | license MIT | (c) 2017, Baptiste Donaux | http://autocomplete-js.com */.autocomplete{position:absolute;max-height:0;overflow-y:hidden;text-align:left}#categories_container,.category{position:relative}.autocomplete:active,.autocomplete:focus,.autocomplete:hover{background-color:#fff}#send_search:hover,.autocomplete>ul>li.active,.autocomplete>ul>li:active,.autocomplete>ul>li:focus{background-color:#3498DB}.autocomplete:empty{display:none}.autocomplete>ul{margin:0;padding:0}.autocomplete>ul>li{cursor:pointer;padding:5px 0 5px 10px}.autocomplete>ul>li.active a:active,.autocomplete>ul>li.active a:focus,.autocomplete>ul>li.active a:hover,.autocomplete>ul>li:active a:active,.autocomplete>ul>li:active a:focus,.autocomplete>ul>li:active a:hover,.autocomplete>ul>li:focus a:active,.autocomplete>ul>li:focus a:focus,.autocomplete>ul>li:focus a:hover{text-decoration:none}.autocomplete>ul>li.locked{cursor:inherit}.autocomplete.open{display:block;background-color:#fff;border:1px solid #3498DB;max-height:500px;overflow-y:auto;z-index:100}.autocomplete.open:empty{display:none}.ion-icon,.ion-icon-big{display:inline-block;line-height:1;font-weight:400;font-style:normal;speak:none;text-decoration:inherit;text-transform:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:middle}@media screen and (max-width:50em){.autocomplete{bottom:0}.autocomplete>ul>li{padding:7px 0 7px 10px;border-bottom:1px solid #E8E7E6;text-align:left}}#main_preferences table td,.index{text-align:center}@font-face{font-family:ion;src:url(../fonts/ion.eot?ce7a0ead692560b4405a96d5b8471f51);src:url(../fonts/ion.eot?#iefix) format("embedded-opentype"),url(../fonts/ion.woff2?ce7a0ead692560b4405a96d5b8471f51) format("woff2"),url(../fonts/ion.woff?ce7a0ead692560b4405a96d5b8471f51) format("woff"),url(../fonts/ion.ttf?ce7a0ead692560b4405a96d5b8471f51) format("truetype"),url(../fonts/ion.svg?ce7a0ead692560b4405a96d5b8471f51#ion) format("svg");font-weight:400;font-style:normal}.ion-navicon-round:before{content:"\f101"}.ion-search:before{content:"\f102"}.ion-play:before{content:"\f103"}.ion-link:before{content:"\f104"}.ion-chevron-up:before{content:"\f105"}.ion-chevron-left:before{content:"\f106"}.ion-chevron-right:before{content:"\f107"}.ion-arrow-down-a:before{content:"\f108"}.ion-arrow-up-a:before{content:"\f109"}.ion-arrow-swap:before{content:"\f10a"}.ion-arrow-dropdown:before{content:"\f10b"}.ion-globe:before{content:"\f10c"}.ion-time:before{content:"\f10d"}.ion-location:before{content:"\f10e"}.ion-warning:before{content:"\f10f"}.ion-error:before{content:"\f110"}.ion-film-outline:before{content:"\f111"}.ion-music-note:before{content:"\f112"}.ion-more-vertical:before{content:"\f113"}.ion-magnet:before{content:"\f114"}.ion-close:before{content:"\f115"}.ion-icon-big{font-size:149%}.index .title{background:url(../img/searx.png) center no-repeat;width:100%;min-height:80px}.index h1{font-size:5em}.index #search{margin:0 auto;background:inherit;border:inherit}.index .search_filters{display:block;margin:1em 0}.index .category label{padding:6px 10px;border-bottom:initial!important}@media screen and (max-width:75em){div.title h1{font-size:1em}.preferences_back{clear:both}}#main_preferences form{width:100%}#main_preferences fieldset{margin:8px;border:none}#main_preferences legend{margin:0;padding:5px 0 0;display:block;float:left;width:300px}#main_preferences .value{margin:0;padding:0;float:left;width:15em}#main_preferences .description{margin:0;padding:5px 0 0;float:left;width:50%;color:#909090;font-size:90%}#main_preferences select{width:200px;font-size:inherit!important}#main_preferences table{border-collapse:collapse}#main_preferences table.cookies{width:auto}#main_preferences div.selectable_url pre,footer,main{width:100%}#main_preferences table.cookies td,#main_preferences table.cookies th{text-align:left;padding:.25em}#main_preferences table.cookies td:first-child,#main_preferences table.cookies th:first-child{padding-right:4em}#main_preferences table.cookies>tbody>tr:nth-child(even)>td,#main_preferences table.cookies>tbody>tr:nth-child(even)>th{background-color:#ececec}#main_preferences .name,#main_preferences .shortcut{text-align:left}#main_preferences .preferences_back{background:#3498DB;color:#fff;border:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;cursor:pointer;display:inline-block;margin:2px 4px;padding:.5em}#main_preferences .preferences_back a{display:block;color:#FFF}#main_preferences .preferences_back a::first-letter{text-transform:uppercase}#search{padding:0 2em;margin:0;background:#f7f7f7;border-bottom:1px solid #d7d7d7}#search_wrapper{padding:10px 0}.search_box{margin:0 12px 0 0;display:inline-flex;flex-direction:row}#clear_search,#q,#send_search{border-collapse:separate;box-sizing:border-box;margin:0;padding:2px;height:2.2em;background:#FFF;color:#222;font-size:16px;outline:0}#clear_search{display:block;width:1.8em;border-top:1px solid #3498DB;border-bottom:1px solid #3498DB;border-right:none;border-left:none;border-radius:0;z-index:10000}#clear_search:hover{color:#3498DB}#clear_search.empty *{display:none}#q::-ms-clear,#q::-webkit-search-cancel-button{display:none}#q,#send_search{display:block!important;border:1px solid #3498DB;border-radius:0;z-index:2}#q{outline:0;padding-left:8px;padding-right:0!important;border-right:none;width:40em}#send_search{border-left:none;width:2.2em}#send_search:hover{cursor:pointer;color:#ECF0F1}.no-js #send_search{width:auto!important}.search_filters{display:inline-block;vertical-align:middle}@media screen and (max-width:75em){#categories{font-size:90%;clear:both}#categories .checkbox_container{margin:auto}html.touch #main_index #categories_container,html.touch #main_results #categories_container{width:1000px;width:-moz-max-content;width:-webkit-max-content;width:max-content}html.touch #main_index #categories_container .category,html.touch #main_results #categories_container .category{display:inline-block;width:auto}html.touch #main_index #categories,html.touch #main_results #categories{width:100%;margin:0;text-align:left;overflow-x:scroll;overflow-y:hidden;-webkit-overflow-scrolling:touch}}@media screen and (max-width:50em){#search{width:100%;margin:0;padding:.1em 0 0}#search_wrapper{width:100%;margin:0 0 .7em;padding:0}.search_box{width:99%;margin:.1em;padding:0 .1em 0 0;display:flex;flex-direction:row}#q{width:auto!important;flex:1}.search_filters{display:block;margin:.5em}.language,.time_range{width:45%}.category{display:block;width:90%}.category label{border-bottom:0}}#categories{margin:0 10px 0 0;user-select:none}#categories::-webkit-scrollbar{width:0;height:0}.category{display:inline-block;margin:0 3px;padding:0}.category input{display:none}.category label{cursor:pointer;padding:4px 10px;margin:0;display:block;text-transform:capitalize;font-size:.9em;border-bottom:2px solid transparent;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body,html,main{padding:0;margin:0}.category input[type=checkbox]:focus+label{box-shadow:0 0 8px #3498DB}.category input[type=checkbox]:checked+label{background:#3498DB;color:#FFF;border-bottom:2px solid #084999}#categories_container .help{position:absolute;width:100%;bottom:-20px;overflow:hidden;opacity:0;transition:opacity 1s ease;font-size:.8em;text-position:center;background:#fff}footer p,html{font-size:.9em}#categories_container:hover .help{opacity:.8;transition:opacity 1s ease}html{font-family:arial,sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;color:#444}#main_about,#main_preferences,#main_stats{margin:3em;width:auto}footer{bottom:0;height:3em;margin:1em 0;padding:1em 0;text-align:center}#main_preferences h1,#main_stats h1{background:url(../img/searx.png) no-repeat;background-size:auto 75%;min-height:40px;margin:0 auto}#results button[type=submit],input[type=submit]{padding:.5rem;margin:2px 4px;display:inline-block;background:#3498DB;color:#FFF;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;border:0;cursor:pointer}a{text-decoration:none;color:#29314d}a:visited,a:visited .highlight{color:#684898}article[data-vim-selected]{background:#f7f7f7}article[data-vim-selected]::before{position:absolute;left:1em;padding:2px;content:">";font-weight:700;color:#3498DB}article.result-images[data-vim-selected]{background:#3498DB}article.result-images[data-vim-selected]::before{display:none;content:""}.result{margin:19px 0 18px;padding:0}.result h3{font-size:1.1em;word-wrap:break-word;margin:5px 0 0;padding:0}.result h3 a{color:#084999;font-weight:400;font-size:1.1em}.result h3 a:visited{color:#684898}.result h3 a:focus,.result h3 a:hover{text-decoration:underline;border:none;-webkit-box-shadow:none;box-shadow:none;outline:0}.result .cache_link,.result .proxyfied_link{font-size:.9em!important}.result .altlink,.result .content,.result .stat,.result .url{font-size:.9em;padding:0;max-width:54em;word-wrap:break-word}.result .altlink,.result .content,.result .stat{margin:0;line-height:1.24}.result .altlink .highlight,.result .content .highlight,.result .stat .highlight{color:#000;background:inherit;font-weight:700}.result .codelines .highlight{color:inherit;background:inherit;font-weight:400}.result .url{margin:0 0 3px;color:#25a55b}.result .published_date{font-size:.8em;color:#888}.result img.thumbnail{float:left;padding:0 5px 10px 0;width:20em;min-width:20em;min-height:8em}.result img.image{float:left;padding:0 5px 10px 0;width:100px;max-height:100px;object-fit:scale-down;object-position:right top}.category-social .image{width:auto!important;min-width:48px;min-height:48px;padding:0 5px 25px 0!important}.result-videos .content{overflow:hidden}.engines{float:right;color:#888}.engines span{font-size:smaller;margin:0 .5em 0 0}.result-images,.result-images img{margin:0;padding:0;max-height:200px}.small_font{font-size:.8em}.highlight{color:#094089;background:inherit;font-weight:700}.result-images{display:inline-block;position:relative}.result-images img{float:inherit;border:none;background:#084999}.result-images span a{display:none;color:#FFF}.result-images:hover span a{display:block;position:absolute;bottom:0;right:0;padding:4px;margin:0 0 4px 4px;background-color:rgba(0,0,0,.6);font-size:.7em}.torrent_result{border-left:10px solid #d3d3d3;padding-left:3px}#answers,#backToTop,#sidebar .infobox{border:1px solid #ddd;box-shadow:0 0 5px #CCC}.torrent_result p{margin:3px;font-size:.8em}.torrent_result a{color:#084999}.torrent_result a:hover{text-decoration:underline}.torrent_result a:visited{color:#684898}#results{margin:2em 2em 20px;padding:0;width:50em}#suggestions .wrapper{display:flex;flex-flow:row wrap;justify-content:flex-end}#suggestions .wrapper form{display:inline-block;flex:1 1 50%}#answers,#corrections,#suggestions{max-width:50em}#answers input,#corrections input,#infoboxes input,#suggestions input{padding:0;margin:3px;font-size:.9em;display:inline-block;background:0 0;color:#444;cursor:pointer}#answers .infobox .url a,#answers input[type=submit],#corrections .infobox .url a,#corrections input[type=submit],#infoboxes .infobox .url a,#infoboxes input[type=submit],#suggestions .infobox .url a,#suggestions input[type=submit]{color:#084999;text-decoration:none;font-size:.9rem}#answers .infobox .url a:hover,#answers input[type=submit]:hover,#corrections .infobox .url a:hover,#corrections input[type=submit]:hover,#infoboxes .infobox .url a:hover,#infoboxes input[type=submit]:hover,#suggestions .infobox .url a:hover,#suggestions input[type=submit]:hover{text-decoration:underline}#corrections{display:flex;flex-flow:row wrap;margin:1em 0}#corrections h4,#corrections input[type=submit]{display:inline-block;margin:0 .5em 0 0}#corrections input[type=submit]::after{content:", "}#apis .title,#search_url .title,#suggestions .title{margin:2em 0 .5em;color:#444}#answers{margin:10px 8px;padding:.9em}#answers h4{display:none}#answers .answer{display:block;font-size:1.2em;font-weight:700}#answers form,#infoboxes form{min-width:210px}#sidebar{position:absolute;top:100px;left:57em;margin:0 2px 5px 5px;padding:0 2px 2px;max-width:25em;word-wrap:break-word}#sidebar .infobox{margin:10px 0;padding:.9em;font-size:.9em}#sidebar .infobox h2{margin:0 0 .5em}#sidebar .infobox img{max-width:100%;max-height:12em;display:block;margin:0;padding:0}#sidebar .infobox dl{margin:.5em 0}#sidebar .infobox dt{display:inline;margin:.5em .25em .5em 0;padding:0;font-weight:700}#sidebar .infobox dd{display:inline;margin:.5em 0;padding:0}#apis,#search_url{margin-top:8px}#sidebar .infobox input{font-size:1em}#search_url div.selectable_url pre{width:200em}#linkto_preferences{position:absolute;right:10px;top:.9em;padding:0;border:0;display:block;font-size:1.2em;color:#222}#linkto_preferences a:active *,#linkto_preferences a:hover *,#linkto_preferences a:link *,#linkto_preferences a:visited *{color:#222}#backToTop{margin:0 0 0 2em;padding:0;font-size:1em;background:#fff;position:fixed;bottom:85px;left:50em;transition:opacity .5s;opacity:0}#backToTop a{display:block;margin:0;padding:.6em}@media screen and (max-width:75em){#main_about,#main_preferences,#main_stats{margin:.5em;width:auto}#answers,#suggestions{margin-top:1em}#infoboxes{position:inherit;max-width:inherit}#infoboxes .infobox{clear:both}#infoboxes .infobox img{float:left;max-width:10em;margin:.5em .5em .5em 0}#sidebar{position:static;max-width:50em;margin:0 0 2px;padding:0;float:none;border:none;width:auto}.image_result,.image_result img,.result .thumbnail{max-width:98%}#sidebar input{border:0}#apis,#search_url{display:none}.result{border-bottom:1px solid #E8E7E6;margin:0;padding-top:8px;padding-bottom:6px}.result h3{margin:0 0 1px}.result .url span.url{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;width:100%}.result .url a{float:right;padding:0 .5em}.result .engines{float:right;padding:0 0 3px}.result-images{border-bottom:none!important}}#main_results div#results.only_template_images{flex-direction:column;width:auto;display:flex}#main_results div#results.only_template_images #sidebar{position:relative;top:auto;order:2}#main_results div#results.only_template_images #urls{position:relative;order:1}#main_results div#results.only_template_images #backToTop{right:.5em;left:auto}#main_results div#results.only_template_images #pagination{position:relative;order:3}@media screen and (max-width:50em){article[data-vim-selected]::before{display:none;content:""}#linkto_preferences{display:none;postion:fixed!important;top:100px;right:0}#sidebar{margin:0 5px 2px}#corrections{margin:1em 5px}#results{margin:0;padding:0;width:initial}#backToTop{left:40em;bottom:35px}.result{padding:8px 10px 6px}.result-images{margin:0;padding:0;border:none}}@media screen and (max-width:35em){.result-videos img.thumbnail{float:none!important}.result-videos .content{overflow:inherit}} \ No newline at end of file
diff --git a/searx/static/themes/simple/fonts/ion.css b/searx/static/themes/simple/fonts/ion.css
new file mode 100644
index 000000000..ebf6c6259
--- /dev/null
+++ b/searx/static/themes/simple/fonts/ion.css
@@ -0,0 +1,139 @@
+/* Generated by grunt-webfont */
+
+
+@font-face {
+ font-family:"ion";
+ src:url("../fonts/ion.eot?ce7a0ead692560b4405a96d5b8471f51");
+ src:url("../fonts/ion.eot?#iefix") format("embedded-opentype"),
+ url("../fonts/ion.woff2?ce7a0ead692560b4405a96d5b8471f51") format("woff2"),
+ url("../fonts/ion.woff?ce7a0ead692560b4405a96d5b8471f51") format("woff"),
+ url("../fonts/ion.ttf?ce7a0ead692560b4405a96d5b8471f51") format("truetype"),
+ url("../fonts/ion.svg?ce7a0ead692560b4405a96d5b8471f51#ion") format("svg");
+ font-weight:normal;
+ font-style:normal;
+}
+
+.ion-icon {
+
+ font-family:"ion";
+
+ display:inline-block;
+ vertical-align:middle;
+ line-height:1;
+ font-weight:normal;
+ font-style:normal;
+ speak:none;
+ text-decoration:inherit;
+ text-transform:none;
+ text-rendering:auto;
+ -webkit-font-smoothing:antialiased;
+ -moz-osx-font-smoothing:grayscale;
+}
+
+
+/* Icons */
+
+
+.ion-navicon-round:before {
+ content:"\f101";
+}
+
+
+.ion-search:before {
+ content:"\f102";
+}
+
+
+.ion-play:before {
+ content:"\f103";
+}
+
+
+.ion-link:before {
+ content:"\f104";
+}
+
+
+.ion-chevron-up:before {
+ content:"\f105";
+}
+
+
+.ion-chevron-left:before {
+ content:"\f106";
+}
+
+
+.ion-chevron-right:before {
+ content:"\f107";
+}
+
+
+.ion-arrow-down-a:before {
+ content:"\f108";
+}
+
+
+.ion-arrow-up-a:before {
+ content:"\f109";
+}
+
+
+.ion-arrow-swap:before {
+ content:"\f10a";
+}
+
+
+.ion-arrow-dropdown:before {
+ content:"\f10b";
+}
+
+
+.ion-globe:before {
+ content:"\f10c";
+}
+
+
+.ion-time:before {
+ content:"\f10d";
+}
+
+
+.ion-location:before {
+ content:"\f10e";
+}
+
+
+.ion-warning:before {
+ content:"\f10f";
+}
+
+
+.ion-error:before {
+ content:"\f110";
+}
+
+
+.ion-film-outline:before {
+ content:"\f111";
+}
+
+
+.ion-music-note:before {
+ content:"\f112";
+}
+
+
+.ion-more-vertical:before {
+ content:"\f113";
+}
+
+
+.ion-magnet:before {
+ content:"\f114";
+}
+
+
+.ion-close:before {
+ content:"\f115";
+}
diff --git a/searx/static/themes/simple/fonts/ion.eot b/searx/static/themes/simple/fonts/ion.eot
new file mode 100644
index 000000000..96b3ee98c
--- /dev/null
+++ b/searx/static/themes/simple/fonts/ion.eot
Binary files differ
diff --git a/searx/static/themes/simple/fonts/ion.html b/searx/static/themes/simple/fonts/ion.html
new file mode 100644
index 000000000..d92237994
--- /dev/null
+++ b/searx/static/themes/simple/fonts/ion.html
@@ -0,0 +1,268 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>ion</title>
+ <style>
+ body {
+ margin:0;
+ padding:10px 20px;
+ background:#fff;
+ color:#222;
+ }
+ h1, div, footer {
+ font-family:"Helvetica Neue", Arial, sans-serif;
+ }
+ h1 {
+ margin:0 0 20px;
+ font-size:32px;
+ font-weight:normal;
+ }
+ h1 small {
+ font-size: 0.8em;
+ padding-left: 2em;
+ }
+ .icons {
+ margin-bottom:40px;
+ -webkit-column-count:5;
+ -moz-column-count:5;
+ column-count:5;
+ -webkit-column-gap:20px;
+ -moz-column-gap:20px;
+ column-gap:20px;
+ }
+ .icons__item,
+ .icons__item i {
+ line-height:2em;
+ cursor:pointer;
+ overflow:hidden;
+ }
+ .icons__item:hover {
+ color:#3c90be;
+ }
+ .icons__item i {
+ display:inline-block;
+ width:32px;
+ text-align:center;
+ }
+ .icons__item:hover i {
+ -webkit-transform:scale(1.5);
+ transform:scale(1.5);
+ }
+ footer {
+ margin-top:40px;
+ font-size:14px;
+ color:#999;
+ }
+
+ /* Generated by grunt-webfont */
+
+
+@font-face {
+ font-family:"ion";
+ src:url("ion.eot?ce7a0ead692560b4405a96d5b8471f51");
+ src:url("ion.eot?#iefix") format("embedded-opentype"),
+ url("ion.woff2?ce7a0ead692560b4405a96d5b8471f51") format("woff2"),
+ url("ion.woff?ce7a0ead692560b4405a96d5b8471f51") format("woff"),
+ url("ion.ttf?ce7a0ead692560b4405a96d5b8471f51") format("truetype"),
+ url("ion.svg?ce7a0ead692560b4405a96d5b8471f51#ion") format("svg");
+ font-weight:normal;
+ font-style:normal;
+}
+
+.ion-icon {
+
+ font-family:"ion";
+
+ display:inline-block;
+ vertical-align:middle;
+ line-height:1;
+ font-weight:normal;
+ font-style:normal;
+ speak:none;
+ text-decoration:inherit;
+ text-transform:none;
+ text-rendering:auto;
+ -webkit-font-smoothing:antialiased;
+ -moz-osx-font-smoothing:grayscale;
+}
+
+
+/* Icons */
+
+
+.ion-navicon-round:before {
+ content:"\f101";
+}
+
+
+.ion-search:before {
+ content:"\f102";
+}
+
+
+.ion-play:before {
+ content:"\f103";
+}
+
+
+.ion-link:before {
+ content:"\f104";
+}
+
+
+.ion-chevron-up:before {
+ content:"\f105";
+}
+
+
+.ion-chevron-left:before {
+ content:"\f106";
+}
+
+
+.ion-chevron-right:before {
+ content:"\f107";
+}
+
+
+.ion-arrow-down-a:before {
+ content:"\f108";
+}
+
+
+.ion-arrow-up-a:before {
+ content:"\f109";
+}
+
+
+.ion-arrow-swap:before {
+ content:"\f10a";
+}
+
+
+.ion-arrow-dropdown:before {
+ content:"\f10b";
+}
+
+
+.ion-globe:before {
+ content:"\f10c";
+}
+
+
+.ion-time:before {
+ content:"\f10d";
+}
+
+
+.ion-location:before {
+ content:"\f10e";
+}
+
+
+.ion-warning:before {
+ content:"\f10f";
+}
+
+
+.ion-error:before {
+ content:"\f110";
+}
+
+
+.ion-film-outline:before {
+ content:"\f111";
+}
+
+
+.ion-music-note:before {
+ content:"\f112";
+}
+
+
+.ion-more-vertical:before {
+ content:"\f113";
+}
+
+
+.ion-magnet:before {
+ content:"\f114";
+}
+
+
+.ion-close:before {
+ content:"\f115";
+}
+
+ </style>
+ </head>
+ <body>
+ <h1>ion</h1>
+
+ <div class="icons" id="icons">
+
+ <div class="icons__item" data-name="navicon-round"><i class="ion-icon ion-navicon-round"></i> ion-navicon-round</div>
+
+ <div class="icons__item" data-name="search"><i class="ion-icon ion-search"></i> ion-search</div>
+
+ <div class="icons__item" data-name="play"><i class="ion-icon ion-play"></i> ion-play</div>
+
+ <div class="icons__item" data-name="link"><i class="ion-icon ion-link"></i> ion-link</div>
+
+ <div class="icons__item" data-name="chevron-up"><i class="ion-icon ion-chevron-up"></i> ion-chevron-up</div>
+
+ <div class="icons__item" data-name="chevron-left"><i class="ion-icon ion-chevron-left"></i> ion-chevron-left</div>
+
+ <div class="icons__item" data-name="chevron-right"><i class="ion-icon ion-chevron-right"></i> ion-chevron-right</div>
+
+ <div class="icons__item" data-name="arrow-down-a"><i class="ion-icon ion-arrow-down-a"></i> ion-arrow-down-a</div>
+
+ <div class="icons__item" data-name="arrow-up-a"><i class="ion-icon ion-arrow-up-a"></i> ion-arrow-up-a</div>
+
+ <div class="icons__item" data-name="arrow-swap"><i class="ion-icon ion-arrow-swap"></i> ion-arrow-swap</div>
+
+ <div class="icons__item" data-name="arrow-dropdown"><i class="ion-icon ion-arrow-dropdown"></i> ion-arrow-dropdown</div>
+
+ <div class="icons__item" data-name="globe"><i class="ion-icon ion-globe"></i> ion-globe</div>
+
+ <div class="icons__item" data-name="time"><i class="ion-icon ion-time"></i> ion-time</div>
+
+ <div class="icons__item" data-name="location"><i class="ion-icon ion-location"></i> ion-location</div>
+
+ <div class="icons__item" data-name="warning"><i class="ion-icon ion-warning"></i> ion-warning</div>
+
+ <div class="icons__item" data-name="error"><i class="ion-icon ion-error"></i> ion-error</div>
+
+ <div class="icons__item" data-name="film-outline"><i class="ion-icon ion-film-outline"></i> ion-film-outline</div>
+
+ <div class="icons__item" data-name="music-note"><i class="ion-icon ion-music-note"></i> ion-music-note</div>
+
+ <div class="icons__item" data-name="more-vertical"><i class="ion-icon ion-more-vertical"></i> ion-more-vertical</div>
+
+ <div class="icons__item" data-name="magnet"><i class="ion-icon ion-magnet"></i> ion-magnet</div>
+
+ <div class="icons__item" data-name="close"><i class="ion-icon ion-close"></i> ion-close</div>
+
+ </div>
+
+
+
+ <h1>Usage</h1>
+ <pre><code>&lt;i class=&quot;ion-icon ion-<span id="name">name</span>&quot;&gt;&lt;/i&gt;</code></pre>
+
+
+ <footer>Generated by <a href="https://github.com/sapegin/grunt-webfont">grunt-webfont</a>.</footer>
+
+ <script>
+ (function() {
+ document.getElementById('icons').onclick = function(e) {
+ e = e || window.event;
+ var name = e.target.getAttribute('data-name') || e.target.parentNode.getAttribute('data-name');
+ document.getElementById('name').innerHTML = name;
+
+ }
+ })();
+ </script>
+ </body>
+</html>
diff --git a/searx/static/themes/simple/fonts/ion.svg b/searx/static/themes/simple/fonts/ion.svg
new file mode 100644
index 000000000..97ca930bb
--- /dev/null
+++ b/searx/static/themes/simple/fonts/ion.svg
@@ -0,0 +1,105 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<!--
+2018-8-11: Created with FontForge (http://fontforge.org)
+-->
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
+<metadata>
+Created by FontForge 20170924 at Sat Aug 11 14:26:20 2018
+ By alexandre,,,
+
+</metadata>
+<defs>
+<font id="ion" horiz-adv-x="512" >
+ <font-face
+ font-family="ion"
+ font-weight="400"
+ font-stretch="normal"
+ units-per-em="512"
+ panose-1="2 0 5 9 0 0 0 0 0 0"
+ ascent="448"
+ descent="-64"
+ bbox="27.2368 -31.9632 479.993 415.9"
+ underline-thickness="25.6"
+ underline-position="-51.2"
+ unicode-range="U+F101-F115"
+ />
+ <missing-glyph />
+ <glyph glyph-name="arrow-down-a" unicode="&#xf108;"
+d="M256.5 -0.5l-192 192h112v192h160v-192h112z" />
+ <glyph glyph-name="arrow-dropdown" unicode="&#xf10b;"
+d="M128 256h256l-128 -128z" />
+ <glyph glyph-name="arrow-swap" unicode="&#xf10a;"
+d="M64 120c0 4.40039 3.59961 8 8 8h248v64l128 -96l-128 -96v64h-248c-4.40039 0 -8 3.59961 -8 8v48zM448 264c0 -4.40039 -3.59961 -8 -8 -8h-248v-64l-128 96l128 96v-64h248c4.40039 0 8 -3.59961 8 -8v-48z" />
+ <glyph glyph-name="arrow-up-a" unicode="&#xf109;"
+d="M256.5 383.5l192 -192h-112v-192h-160v192h-112z" />
+ <glyph glyph-name="chevron-left" unicode="&#xf106;"
+d="M213.7 192l167.2 -174.2c4.19922 -4.2998 4.09961 -11.3994 -0.200195 -15.7998l-29.9004 -30.5996c-4.2998 -4.40039 -11.2998 -4.5 -15.5 -0.200195l-204.2 212.7c-2.09961 2.19922 -3.09961 5.09961 -3 8.09961c-0.199219 2.90039 0.800781 5.90039 3 8.09961
+l204.2 212.601c4.2002 4.2998 11.2002 4.2002 15.5 -0.200195l29.9004 -30.5996c4.2998 -4.40039 4.39941 -11.5 0.200195 -15.8008l-167.2 -174.1v0v0z" />
+ <glyph glyph-name="chevron-right" unicode="&#xf107;"
+d="M298.3 192v0v0l-167.2 174.1c-4.19922 4.30078 -4.09961 11.4004 0.200195 15.8008l29.9004 30.5996c4.2998 4.40039 11.2998 4.5 15.5 0.200195l204.2 -212.7c2.19922 -2.2002 3.19922 -5.2002 3 -8.09961c0.0996094 -3 -0.900391 -5.90039 -3 -8.10059l-204.2 -212.6
+c-4.2002 -4.2998 -11.2002 -4.2002 -15.5 0.200195l-29.9004 30.5996c-4.2998 4.40039 -4.39941 11.5 -0.200195 15.7998z" />
+ <glyph glyph-name="chevron-up" unicode="&#xf105;"
+d="M256 234.3l-174.2 -167.2c-4.2998 -4.19922 -11.3994 -4.09961 -15.7998 0.200195l-30.5996 29.9004c-4.40039 4.2998 -4.5 11.2998 -0.200195 15.5l212.7 204.2c2.19922 2.09961 5.09961 3.09961 8.09961 3c2.90039 0.199219 5.90039 -0.800781 8.09961 -3l212.7 -204.2
+c4.2998 -4.2002 4.2002 -11.2002 -0.200195 -15.5l-30.5996 -29.9004c-4.40039 -4.2998 -11.5 -4.39941 -15.7998 -0.200195l-174.2 167.2v0v0z" />
+ <glyph glyph-name="close" unicode="&#xf115;"
+d="M405 311.202l-119.202 -119.202l119.202 -119.202l-29.7979 -29.7979l-119.202 119.202l-119.202 -119.202l-29.7979 29.7979l119.202 119.202l-119.202 119.202l29.7979 29.7979l119.202 -119.202l119.202 119.202z" />
+ <glyph glyph-name="error" unicode="&#xf110;"
+d="M256 400c114.4 0 208 -93.6006 208 -208s-93.5996 -208 -208 -208s-208 93.6006 -208 208s93.5996 208 208 208zM280 88v40h-48v-40h48zM280 176v128h-48v-128h48z" />
+ <glyph glyph-name="film-outline" unicode="&#xf111;"
+d="M56 360h400v-336h-400v336zM128 40v48h-56v-48h56zM128 104v48h-56v-48h56zM128 168v48h-56v-48h56zM128 232v48h-56v-48h56zM128 296v48h-56v-48h56zM368 40v144h-224v-144h224zM368 200v144h-224v-144h224zM440 40v48h-56v-48h56zM440 104v48h-56v-48h56zM440 168v48
+h-56v-48h56zM440 232v48h-56v-48h56zM440 296v48h-56v-48h56z" />
+ <glyph glyph-name="globe" unicode="&#xf10c;"
+d="M256 400c114.875 0 208 -93.125 208 -208s-93.125 -208 -208 -208c-114.876 0 -208 93.125 -208 208s93.124 208 208 208zM234.451 15.001c6.04297 15.0449 19.9453 28.6484 7.27344 39.1172c-8.17285 6.75 -15.6123 13.6279 -23.1104 21.125
+c-2.47461 2.47363 -9.9082 19.7109 -8.35156 22.3916c5.10254 8.78613 5.76367 14.8613 8.12988 24.7236c2.94336 12.2627 -3.33398 15.4434 -13.3828 21.8389c-15.2256 9.68848 -28.9629 22.4844 -43.3213 33.4941c-7.11719 5.45508 -17.4365 10.0986 -20.0195 18.9521
+c-2.64062 9.05078 -3.97363 20.2598 -9.40039 28.0781c-13.9277 20.0752 -11.5791 34.9678 -9.93945 58.7627c0.449219 6.52637 -1.30371 15.6572 -2.01367 24.1748c-27.5654 -32.2354 -42.6016 -72.7891 -42.6016 -115.659c0 -47.6221 18.5439 -92.3926 52.2178 -126.067
+c28.541 -28.54 65.0557 -46.2061 104.52 -50.9316zM382.067 65.9326c23.0352 23.0381 38.9873 51.2695 46.7686 82.0527c-8.34668 -1.19141 -18.3838 2.22754 -18.3838 2.22754s-21.7363 23.707 -23.5244 44.5723c-1.85645 21.667 0.498047 38.3945 -2.89551 56.8105
+c-2.87988 15.624 -19.2803 31.5 -26.6729 46.3018c-6.9209 13.8555 -13.7334 27.7031 -20.2646 41.7451c2.25098 -0.848633 4.90039 -1.40234 6.96484 -2.62305c4.99902 0.636719 9.43066 1.22949 13.4629 1.59082c-22.5381 15.6758 -48.2725 25.8418 -75.5225 29.7998
+v-8.33887l3.55273 -9.27734l-13.7783 -12.9951l-8.67578 2.79492l-9.92383 10.2334l-9.94336 11.8008l-14.084 5.66016c-15.7236 -2.36133 -30.9346 -6.78711 -45.3105 -13.1523c0.360352 -2.30762 0.662109 -4.64453 0.662109 -7.13281
+c7.17383 2.98926 15.2764 5.04883 22.4502 8.03906c2.96289 1.23438 12.7529 -7.1748 15.6221 -8.96777c-4.0957 -4.70996 -20.5576 -15.4434 -21.3574 -21.3574c-0.316406 -2.33984 6.50586 -6.06348 6.45117 -9.69141
+c-0.0878906 -5.74609 -0.173828 -11.4912 -0.259766 -17.2373c3.24414 2.76172 20.0342 20.3672 21.9404 20.8594c12.7256 3.2832 34.3916 -17.7646 36.249 -25.1934c1.8584 -7.42871 -21.6514 -23.6826 -32.6113 -34.0469
+c-8.39941 -7.94434 -24.8086 -12.5137 -19.8037 -24.2285c1.62695 -3.80957 10.0508 -20.0156 5.21191 -24.0586c-5.92188 -4.94824 -14.7686 8.97656 -17.3418 12.0938c-8.15332 9.87695 -25.626 6.02539 -37.9082 6.47852c0 -17.4209 -0.757812 -31.1885 14.9229 -42.9971
+c15.1943 -11.4434 29.5967 -24.7061 47.0771 -32.3389c12.7637 -5.57129 35.7158 6.53613 47.0205 -1.41699c15.8672 -11.165 29.3066 -21.624 47.1611 -29.375c7.93359 -3.44531 32.418 -19.8828 25.3525 -30.7812c-4.96582 -7.66211 -9.87305 -14.8848 -13.5771 -23.2168
+c-3.70703 -8.34375 -12.5957 -18.876 -19.6924 -24.3525c-8.15918 -6.29199 -16.9551 -17.1455 -21.8955 -29.3623c34.8574 6.5957 66.9229 23.4482 92.5566 49.0811z" />
+ <glyph glyph-name="link" unicode="&#xf104;"
+d="M256.5 240h-0.5v0h0.5zM368.5 288c44.2002 0 79.5 -35.2998 79.5 -79.5v-32c0 -44.2002 -35.2998 -80.5 -79.5 -80.5h-112c-32.7002 0 -61 19.7998 -73.5996 48c-4.40039 10 -6.90039 21 -6.90039 32.5v31.5h48v-31.5c0 -17.5996 14.9004 -32.5 32.5 -32.5h112
+c17.5996 0 31.5 14.9004 31.5 32.5v32c0 17.5996 -13.9004 31.5 -31.5 31.5h-0.5h-16.4004c-5.59961 31 -31.5996 48 -31.5996 48h48.5zM329.6 240c4.10059 -9.59961 6.40039 -20.2998 6.40039 -31.5v-32v-0.5h-48v0.5v32c0 17.5996 -13.9004 31.5 -31.5 31.5h-0.5h-111.5
+c-17.5996 0 -32.5 -13.9004 -32.5 -31.5v-32c0 -17.5996 14.9004 -32.5 32.5 -32.5h15.4004c6.2998 -31 32.0996 -48 32.0996 -48h-47.5c-44.2002 0 -80.5 36.2998 -80.5 80.5v32c0 44.2002 36.2998 79.5 80.5 79.5h112c33 0 61 -19.7002 73.0996 -48z" />
+ <glyph glyph-name="location" unicode="&#xf10e;"
+d="M256 384c65.9004 0 119.3 -53.7002 119.3 -120c0 -114.6 -119.3 -264 -119.3 -264s-119.3 149.4 -119.3 264c0 66.2998 53.3994 120 119.3 120zM256 205.8c31.2002 0 56.4004 25.4004 56.4004 56.7002c0 31.4004 -25.2002 56.7998 -56.4004 56.7998
+c-31.0996 0 -56.4004 -25.5 -56.4004 -56.7998s25.2002 -56.7002 56.4004 -56.7002z" />
+ <glyph glyph-name="magnet" unicode="&#xf114;"
+d="M27.7061 117.644h86.2139v-67.7236h-86.2256zM184.326 327c0 -0.199219 0.166992 -0.366211 0.367188 -0.366211c27.7676 0 67.3604 -3.08398 67.3604 -42.7246v-141.625c0 -0.197266 0.163086 -0.362305 0.358398 -0.366211
+c28.75 -0.636719 57.4912 0.0107422 86.2236 0c0.208984 -0.000976562 0.366211 0.183594 0.367188 0.364258c0.238281 50.8672 0 101.591 0 150.867c-0.250977 43.4795 -13.5273 70.627 -43.2588 92.6426c-33.1963 25.7178 -71.71 27.2451 -112.575 27.3818
+c-40.8711 -0.136719 -79.3877 -1.66406 -112.583 -27.3818c-29.7207 -22.0166 -42.9971 -49.1611 -43.248 -92.6445c0 -49.2715 -0.227539 -99.999 0 -150.876c0.000976562 -0.208984 0.185547 -0.365234 0.367188 -0.365234c28.7324 0.0224609 57.4854 -0.625 86.2236 0
+c0.196289 0.00390625 0.358398 0.170898 0.358398 0.366211v141.625c0 39.6406 39.6045 42.7363 67.3604 42.7363c0.200195 0 0.367188 0.166992 0.367188 0.366211s-0.166992 0.366211 -0.367188 0.366211c-27.6299 0 -68.0938 -3.06348 -68.0938 -43.4688v-141.266
+c-28.2832 -0.604492 -56.9688 0.0244141 -85.4844 0.0078125c-0.223633 50.5547 0.00195312 101.386 0.00195312 150.508c0.249023 43.3125 13.4043 70.168 42.957 92.0605c32.9863 25.5547 71.2646 27.0957 112.144 27.2324
+c40.8623 -0.136719 79.1436 -1.67773 112.13 -27.2324c29.5645 -21.8926 42.7188 -48.7461 42.9678 -92.0625c0 -49.1631 0.238281 -99.6865 0.00195312 -150.495c-28.3008 0.00585938 -56.9746 -0.62793 -85.4844 -0.0078125v141.267
+c0 40.4043 -40.4521 43.457 -68.0938 43.457c-0.200195 0 -0.367188 -0.166992 -0.367188 -0.366211zM184.692 327.005c27.7061 0 67.7236 -3.07227 67.7236 -43.1006v-141.615c28.7422 -0.639648 57.4834 0.0117188 86.2256 0c0.232422 50.8633 0 101.586 0 150.854
+c-0.255859 43.4033 -13.4746 70.3994 -43.1133 92.3574c-33.0938 25.6348 -71.4932 27.1709 -112.36 27.3105c-40.8672 -0.139648 -79.2666 -1.67578 -112.36 -27.3105c-29.6377 -21.958 -42.8574 -48.9541 -43.1016 -92.3574c0 -49.2686 -0.232422 -99.9912 0 -150.866
+c28.7422 0.0234375 57.4834 -0.62793 86.2139 0v141.615c0 40.0293 40.0293 43.1123 67.7236 43.1123zM252.463 117.644h86.2021v-67.7236h-86.2021v67.7236z" />
+ <glyph glyph-name="more-vertical" unicode="&#xf113;"
+d="M296 312c0 -22.002 -17.998 -40 -40 -40s-40 17.998 -40 40s17.998 40 40 40s40 -17.998 40 -40zM296 72c0 -22.002 -17.998 -40 -40 -40s-40 17.998 -40 40s17.998 40 40 40s40 -17.998 40 -40zM296 192c0 -22.002 -17.998 -40 -40 -40s-40 17.998 -40 40
+s17.998 40 40 40s40 -17.998 40 -40z" />
+ <glyph glyph-name="music-note" unicode="&#xf112;"
+d="M426 415.9c12.0996 0 22 -9.5 22.0996 -21.2002v-302.8c0 -24.7002 -3 -42.9004 -12 -54.9004h-0.199219c-9.10059 -15 -25 -21 -43.2002 -21h-37.2002c-28.2998 0 -51.2002 19.9004 -51.2002 48s22.9004 48 51.2002 48h60.5v192l-208 -38v-232
+c0 -8.2998 -3.40039 -27 -13 -41.0996c-1 -1.80078 -2.09961 -3.40039 -3.40039 -5c-0.5 -0.600586 -0.899414 -1.5 -1.5 -2.10059c-0.0996094 -0.0996094 -0.299805 -0.0996094 -0.399414 -0.200195c-9.40039 -10.5996 -23 -17.5 -38.2998 -17.5h-36.2002
+c-28.2002 0 -51.2998 20 -51.2998 48s23.0996 48 51.0996 48v-0.0996094h61v286.5c1 14.5 13.5 27.9004 27.2998 31.5996l217.601 33.2002s2.89941 0.600586 5.09961 0.600586z" />
+ <glyph glyph-name="navicon-round" unicode="&#xf101;"
+d="M417.4 224c16.8994 0 30.5996 -14.2998 30.5996 -32s-13.7002 -32 -30.5996 -32h-322.801c-16.8994 0 -30.5996 14.2998 -30.5996 32s13.7002 32 30.5996 32h322.801zM417.4 352c16.8994 0 30.5996 -14.2998 30.5996 -32s-13.7002 -32 -30.5996 -32h-322.801
+c-16.8994 0 -30.5996 14.2998 -30.5996 32s13.7002 32 30.5996 32h322.801zM417.4 96c16.8994 0 30.5996 -14.2998 30.5996 -32s-13.7002 -32 -30.5996 -32h-322.801c-16.8994 0 -30.5996 14.2998 -30.5996 32s13.7002 32 30.5996 32h322.801z" />
+ <glyph glyph-name="play" unicode="&#xf103;"
+d="M405.2 215.1c6.59961 -5.59961 10.7998 -13.7998 10.7998 -23.0996s-4.2002 -17.5996 -10.7998 -23.0996l-278.101 -165.5c-3.69922 -2 -7.09961 -3.40039 -11.1992 -3.40039c-10.9004 0 -19.8008 9 -19.8008 20h-0.0996094v344h0.0996094c0 11 8.90039 20 19.8008 20
+c4 0 7.5 -1.2002 10.8994 -3.2002z" />
+ <glyph glyph-name="search" unicode="&#xf102;"
+d="M445 61.2998c4 -4 4 -10.3994 0 -14.5l-43.2998 -43.7998c-1.90039 -2 -4.60059 -3.09961 -7.2998 -3.09961c-2.7002 0 -5.40039 1.19922 -7.30078 3.09961l-84.3994 85.5996c-24.6006 -14.6992 -52.2002 -22.3994 -80.1006 -22.3994
+c-87.3994 0 -158.6 71.2998 -158.6 158.899c0 87.6006 71.2002 158.9 158.6 158.9c87.4004 0 158.601 -71.2998 158.601 -158.9c0 -27 -7.2002 -53.7998 -21 -77.8994zM222.6 322.1c-53.3994 0 -96.7998 -43.5 -96.7998 -97s43.4004 -97 96.7998 -97
+c53.4004 0 96.8008 43.5 96.8008 97s-43.4004 97 -96.8008 97z" />
+ <glyph glyph-name="time" unicode="&#xf10d;"
+d="M256 405c117.149 0 213 -95.8506 213 -213s-94.7891 -213 -213 -213s-213 95.8506 -213 213s94.7891 213 213 213zM256 21.5996c93.7178 0 170.4 76.6826 170.4 170.4s-76.6826 170.4 -170.4 170.4s-170.4 -76.6836 -170.4 -170.4s76.6826 -170.4 170.4 -170.4z
+M266.65 298.5v-111.824l95.8496 -56.4434l-15.9746 -26.625l-111.825 67.0928v127.8h31.9502z" />
+ <glyph glyph-name="warning" unicode="&#xf10f;"
+d="M476.7 25.7998c2.7998 -4.89941 4.7998 -13 1.7998 -17.8994c-2.90039 -4.90039 -8.2002 -7.90039 -14 -7.90039h-417.1c-5.80078 0 -11.1006 3 -14 7.90039c-2.90039 4.89941 -0.900391 12.8994 1.89941 17.8994l206.601 349.5c2.7998 5 8.19922 8.7002 14.0996 8.7002
+c5.7998 0 11.2002 -3.7002 14.0996 -8.7002zM288 48v48h-64v-48h64zM288 128v144h-64v-144h64z" />
+ </font>
+</defs></svg>
diff --git a/searx/static/themes/simple/fonts/ion.ttf b/searx/static/themes/simple/fonts/ion.ttf
new file mode 100644
index 000000000..ccc5482b5
--- /dev/null
+++ b/searx/static/themes/simple/fonts/ion.ttf
Binary files differ
diff --git a/searx/static/themes/simple/fonts/ion.woff b/searx/static/themes/simple/fonts/ion.woff
new file mode 100644
index 000000000..0b7fe877a
--- /dev/null
+++ b/searx/static/themes/simple/fonts/ion.woff
Binary files differ
diff --git a/searx/static/themes/simple/fonts/ion.woff2 b/searx/static/themes/simple/fonts/ion.woff2
new file mode 100644
index 000000000..30b902da2
--- /dev/null
+++ b/searx/static/themes/simple/fonts/ion.woff2
Binary files differ
diff --git a/searx/static/themes/simple/gruntfile.js b/searx/static/themes/simple/gruntfile.js
new file mode 100644
index 000000000..c372ec730
--- /dev/null
+++ b/searx/static/themes/simple/gruntfile.js
@@ -0,0 +1,161 @@
+module.exports = function(grunt) {
+
+ const path = require('path');
+
+ grunt.initConfig({
+ pkg: grunt.file.readJSON('package.json'),
+ watch: {
+ scripts: {
+ files: ['<%= jshint.files %>', 'less/*.less'],
+ tasks: ['jshint', 'concat', 'uglify', 'webfont', 'less:development', 'less:production']
+ }
+ },
+ jshint: {
+ files: ['js/searx_src/*.js', 'js/searx_header/*.js'],
+ options: {
+ reporterOutput: "",
+ proto: true,
+ // options here to override JSHint defaults
+ globals: {
+ browser: true,
+ jQuery: false,
+ devel: true
+ }
+ }
+ },
+ concat: {
+ head_and_body: {
+ options: {
+ separator: ';'
+ },
+ files: {
+ 'js/searx.head.js': ['js/searx_head/*.js'],
+ 'js/searx.js': ['js/searx_src/*.js']
+ }
+ }
+ },
+ uglify: {
+ options: {
+ banner: '/*! simple/searx.min.js | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n',
+ output: {
+ comments: 'some'
+ },
+ ie8: false,
+ warnings: true,
+ compress: false,
+ mangle: true,
+ sourceMap: true
+ },
+ dist: {
+ files: {
+ 'js/searx.head.min.js': ['js/searx.head.js'],
+ 'js/searx.min.js': ['js/searx.js']
+ }
+ }
+ },
+ less: {
+ development: {
+ options: {
+ paths: ["less"],
+ banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n'
+ },
+ files: {
+ "css/searx.css": "less/style.less",
+ "css/searx-rtl.css": "less/style-rtl.less"
+ }
+ },
+ production: {
+ options: {
+ paths: ["less"],
+ plugins: [
+ new (require('less-plugin-clean-css'))({
+ advanced: true,
+ compatibility: '*'
+ })
+ ],
+ banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n'
+ },
+ files: {
+ "css/searx.min.css": "less/style.less",
+ "css/searx-rtl.min.css": "less/style-rtl.less"
+ }
+ },
+ },
+ webfont: {
+ icons: {
+ // src: 'node_modules/ionicons-npm/src/*.svg',
+ src: [
+ 'node_modules/ionicons-npm/src/navicon-round.svg',
+ 'node_modules/ionicons-npm/src/search.svg',
+ 'node_modules/ionicons-npm/src/play.svg',
+ 'node_modules/ionicons-npm/src/link.svg',
+ 'node_modules/ionicons-npm/src/chevron-up.svg',
+ 'node_modules/ionicons-npm/src/chevron-left.svg',
+ 'node_modules/ionicons-npm/src/chevron-right.svg',
+ 'node_modules/ionicons-npm/src/arrow-down-a.svg',
+ 'node_modules/ionicons-npm/src/arrow-up-a.svg',
+ 'node_modules/ionicons-npm/src/arrow-swap.svg',
+ 'node_modules/ionicons-npm/src/telephone.svg',
+ 'node_modules/ionicons-npm/src/android-arrow-dropdown.svg',
+ 'node_modules/ionicons-npm/src/android-globe.svg',
+ 'node_modules/ionicons-npm/src/android-time.svg',
+ 'node_modules/ionicons-npm/src/location.svg',
+ 'node_modules/ionicons-npm/src/alert-circled.svg',
+ 'node_modules/ionicons-npm/src/android-alert.svg',
+ 'node_modules/ionicons-npm/src/ios-film-outline.svg',
+ 'node_modules/ionicons-npm/src/music-note.svg',
+ 'node_modules/ionicons-npm/src/ion-close-round.svg',
+ 'node_modules/ionicons-npm/src/android-more-vertical.svg',
+ 'magnet.svg',
+ 'node_modules/ionicons-npm/src/android-close.svg',
+ ],
+ dest: 'fonts',
+ destLess: 'less',
+ options: {
+ font: 'ion',
+ hashes : true,
+ syntax: 'bem',
+ styles : 'font,icon',
+ types : 'eot,woff2,woff,ttf,svg',
+ order : 'eot,woff2,woff,ttf,svg',
+ stylesheets : ['css', 'less'],
+ relativeFontPath : '../fonts/',
+ autoHint : false,
+ normalize : false,
+ // ligatures : true,
+ optimize : true,
+ // fontHeight : 400,
+ rename : function(name) {
+ basename = path.basename(name);
+ if (basename === 'android-alert.svg') {
+ return 'error.svg';
+ }
+ if (basename === 'alert-circled.svg') {
+ return 'warning.svg';
+ }
+ if (basename === 'ion-close-round.svg') {
+ return 'close.svg';
+ }
+ return basename.replace(/(ios|md|android)-/i, '');
+ },
+ templateOptions: {
+ baseClass: 'ion-icon',
+ classPrefix: 'ion-'
+ }
+ }
+ }
+ }
+ });
+
+ grunt.loadNpmTasks('grunt-contrib-watch');
+ grunt.loadNpmTasks('grunt-contrib-uglify');
+ grunt.loadNpmTasks('grunt-contrib-jshint');
+ grunt.loadNpmTasks('grunt-contrib-concat');
+ grunt.loadNpmTasks('grunt-contrib-less');
+ grunt.loadNpmTasks('grunt-contrib-cssmin');
+ grunt.loadNpmTasks('grunt-webfont');
+
+ grunt.registerTask('test', ['jshint']);
+
+ grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'less:development', 'less:production']);
+};
diff --git a/searx/static/themes/simple/img/favicon.png b/searx/static/themes/simple/img/favicon.png
new file mode 100644
index 000000000..36be5fc01
--- /dev/null
+++ b/searx/static/themes/simple/img/favicon.png
Binary files differ
diff --git a/searx/static/themes/simple/img/logo_searx_a.png b/searx/static/themes/simple/img/logo_searx_a.png
new file mode 100644
index 000000000..2db081710
--- /dev/null
+++ b/searx/static/themes/simple/img/logo_searx_a.png
Binary files differ
diff --git a/searx/static/themes/simple/img/searx.png b/searx/static/themes/simple/img/searx.png
new file mode 100644
index 000000000..98538da3a
--- /dev/null
+++ b/searx/static/themes/simple/img/searx.png
Binary files differ
diff --git a/searx/static/themes/simple/img/searx_logo.svg b/searx/static/themes/simple/img/searx_logo.svg
new file mode 100644
index 000000000..67a2d4588
--- /dev/null
+++ b/searx/static/themes/simple/img/searx_logo.svg
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="744.09448819"
+ height="1052.3622047"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="searx_logo.svg"
+ inkscape:export-filename="/home/a/magnif.png"
+ inkscape:export-xdpi="203.1774"
+ inkscape:export-ydpi="203.1774">
+ <defs
+ id="defs4">
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient3857">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3859" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop3861" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3790">
+ <stop
+ style="stop-color:#a9a9a9;stop-opacity:1;"
+ offset="0"
+ id="stop3792" />
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="1"
+ id="stop3794" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3790"
+ id="radialGradient3798"
+ cx="294.45947"
+ cy="208.37973"
+ fx="294.45947"
+ fy="208.37973"
+ r="107.58125"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3857"
+ id="linearGradient3865"
+ x1="120.68947"
+ y1="239.61774"
+ x2="120.68947"
+ y2="602.17517"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3790"
+ id="linearGradient3912"
+ x1="186.74416"
+ y1="354.42426"
+ x2="255.84358"
+ y2="254.35953"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.2227304,0,0,0.89945099,-289.31433,113.40259)" />
+ <filter
+ inkscape:collect="always"
+ id="filter4024"
+ x="-0.12996517"
+ width="1.2599303"
+ y="-0.14709377"
+ height="1.2941875">
+ <feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="6.4759344"
+ id="feGaussianBlur4026" />
+ </filter>
+ <filter
+ inkscape:collect="always"
+ id="filter3983"
+ x="-1.0608404"
+ width="3.1216809"
+ y="-0.31017202"
+ height="1.620344">
+ <feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="9.392858"
+ id="feGaussianBlur3985" />
+ </filter>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.979899"
+ inkscape:cx="30.708726"
+ inkscape:cy="948.08556"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1364"
+ inkscape:window-height="663"
+ inkscape:window-x="0"
+ inkscape:window-y="30"
+ inkscape:window-maximized="0"
+ showguides="true"
+ inkscape:guide-bbox="true" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ d="m 70.523181,34.870671 c -7.11959,15.242893 -10.17798,31.779192 -8.22563,48.814566 5.01677,43.774133 41.675309,79.324503 91.536109,95.162893 -6.62576,-22.40752 -5.34093,-44.9362 2.6395,-65.84431 C 108.73618,98.821131 74.828141,70.195435 70.523181,34.870671 z"
+ id="path3814-0-7"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ d="m 303.77876,36.21406 c 7.11959,15.242893 10.17798,31.779192 8.22563,48.814566 -5.01677,43.774134 -41.67531,79.324504 -91.53611,95.162894 6.62576,-22.40752 5.34093,-44.9362 -2.6395,-65.84431 47.73698,-14.18269 81.64502,-42.808386 85.94998,-78.13315 z"
+ id="path3814-0"
+ inkscape:connector-curvature="0" />
+ <path
+ transform="matrix(0.6556593,-0.75505688,0.75505688,0.6556593,0,0)"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ d="m -5.0905523,259.06055 18.4167573,0 c 6.220455,0 11.228257,16.68196 11.228257,37.40349 l 0,172.83701 c 0,20.72153 -5.007802,37.40349 -11.228257,37.40349 l -18.4167573,0 c -6.2204547,0 -11.2282577,-16.68196 -11.2282577,-37.40349 l 0,-172.83701 c 0,-20.72153 5.007803,-37.40349 11.2282577,-37.40349 z"
+ id="rect3804" />
+ <path
+ sodipodi:type="arc"
+ style="fill:url(#radialGradient3798);fill-opacity:1;fill-rule:nonzero;stroke:none"
+ id="path2987"
+ sodipodi:cx="294.45947"
+ sodipodi:cy="208.37973"
+ sodipodi:rx="107.58125"
+ sodipodi:ry="107.58125"
+ d="m 402.04073,208.37973 a 107.58125,107.58125 0 1 1 -215.16251,0 107.58125,107.58125 0 1 1 215.16251,0 z"
+ transform="translate(-107.07617,-60.609153)" />
+ <path
+ sodipodi:type="arc"
+ style="fill:url(#linearGradient3865);fill-opacity:1;fill-rule:nonzero;stroke:none"
+ id="path3757"
+ sodipodi:cx="131.82491"
+ sodipodi:cy="299.29346"
+ sodipodi:rx="101.52033"
+ sodipodi:ry="101.52033"
+ d="m 233.34524,299.29346 a 101.52033,101.52033 0 1 1 -203.040667,0 101.52033,101.52033 0 1 1 203.040667,0 z"
+ transform="matrix(0.76865672,0,0,0.76865672,85.80266,-82.535889)" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#1a1a1a;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ id="path3800"
+ sodipodi:cx="183.34268"
+ sodipodi:cy="156.35687"
+ sodipodi:rx="27.274118"
+ sodipodi:ry="27.274118"
+ d="m 210.6168,156.35687 a 27.274118,27.274118 0 1 1 -54.54824,0 27.274118,27.274118 0 1 1 54.54824,0 z"
+ transform="translate(5,-7.1428572)" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ id="path3802"
+ sodipodi:cx="197.9899"
+ sodipodi:cy="203.32896"
+ sodipodi:rx="5.5558391"
+ sodipodi:ry="5.5558391"
+ d="m 203.54574,203.32896 a 5.5558391,5.5558391 0 1 1 -11.11168,0 5.5558391,5.5558391 0 1 1 11.11168,0 z"
+ transform="translate(1.4847712,-63.564549)" />
+ <rect
+ style="fill:#ffffff;fill-opacity:0.82211531000000004;fill-rule:nonzero;stroke:none;filter:url(#filter4024)"
+ id="rect3916"
+ width="2.2392972"
+ height="159.43797"
+ x="19.525793"
+ y="337.8396"
+ rx="2.8666623"
+ ry="9.0007057"
+ transform="matrix(0.74466525,-0.84318084,0.84318084,0.74466525,-35.543204,-26.349917)" />
+ </g>
+</svg>
diff --git a/searx/static/themes/simple/js/searx.head.js b/searx/static/themes/simple/js/searx.head.js
new file mode 100644
index 000000000..3ac61c8ae
--- /dev/null
+++ b/searx/static/themes/simple/js/searx.head.js
@@ -0,0 +1,40 @@
+/**
+* searx is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Affero General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* searx is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Affero General Public License for more details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with searx. If not, see < http://www.gnu.org/licenses/ >.
+*
+* (C) 2019 by Alexandre Flament
+*
+*/
+(function(w, d) {
+ 'use strict';
+
+ // add data- properties
+ var script = d.currentScript || (function() {
+ var scripts = d.getElementsByTagName('script');
+ return scripts[scripts.length - 1];
+ })();
+
+ // try to detect touch screen
+ w.searx = {
+ touch: (("ontouchstart" in w) || w.DocumentTouch && document instanceof DocumentTouch) || false,
+ method: script.getAttribute('data-method'),
+ autocompleter: script.getAttribute('data-autocompleter') === 'true',
+ search_on_category_select: script.getAttribute('data-search-on-category-select') === 'true',
+ infinite_scroll: script.getAttribute('data-infinite-scroll') === 'true',
+ static_path: script.getAttribute('data-static-path'),
+ no_item_found: script.getAttribute('data-no-item-found')
+ }
+
+ // update the css
+ d.getElementsByTagName("html")[0].className = (w.searx.touch)?"js touch":"js";
+})(window, document); \ No newline at end of file
diff --git a/searx/static/themes/simple/js/searx.head.min.js b/searx/static/themes/simple/js/searx.head.min.js
new file mode 100644
index 000000000..00c711c79
--- /dev/null
+++ b/searx/static/themes/simple/js/searx.head.min.js
@@ -0,0 +1,4 @@
+/*! simple/searx.min.js | 06-08-2019 | https://github.com/asciimoo/searx */
+
+(function(t,e){"use strict";var a=e.currentScript||function(){var t=e.getElementsByTagName("script");return t[t.length-1]}();t.searx={touch:"ontouchstart"in t||t.DocumentTouch&&document instanceof DocumentTouch||false,method:a.getAttribute("data-method"),autocompleter:a.getAttribute("data-autocompleter")==="true",search_on_category_select:a.getAttribute("data-search-on-category-select")==="true",infinite_scroll:a.getAttribute("data-infinite-scroll")==="true",static_path:a.getAttribute("data-static-path"),no_item_found:a.getAttribute("data-no-item-found")};e.getElementsByTagName("html")[0].className=t.searx.touch?"js touch":"js"})(window,document);
+//# sourceMappingURL=searx.head.min.js.map \ No newline at end of file
diff --git a/searx/static/themes/simple/js/searx.head.min.js.map b/searx/static/themes/simple/js/searx.head.min.js.map
new file mode 100644
index 000000000..d19ad5a44
--- /dev/null
+++ b/searx/static/themes/simple/js/searx.head.min.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["searx.head.js"],"names":["w","d","script","currentScript","scripts","getElementsByTagName","length","searx","touch","DocumentTouch","document","method","getAttribute","autocompleter","search_on_category_select","infinite_scroll","static_path","no_item_found","className","window"],"mappings":";;CAiBA,SAAUA,EAAGC,GACT,aAGA,IAAIC,EAASD,EAAEE,eAAkB,WAC7B,IAAIC,EAAUH,EAAEI,qBAAqB,UACrC,OAAOD,EAAQA,EAAQE,OAAS,GAFH,GAMjCN,EAAEO,MAAQ,CACNC,MAAS,iBAAkBR,GAAMA,EAAES,eAAiBC,oBAAoBD,eAAkB,MAC1FE,OAAQT,EAAOU,aAAa,eAC5BC,cAAeX,EAAOU,aAAa,wBAA0B,OAC7DE,0BAA2BZ,EAAOU,aAAa,oCAAsC,OACrFG,gBAAiBb,EAAOU,aAAa,0BAA4B,OACjEI,YAAad,EAAOU,aAAa,oBACjCK,cAAef,EAAOU,aAAa,uBAIvCX,EAAEI,qBAAqB,QAAQ,GAAGa,UAAalB,EAAEO,MAAW,MAAE,WAAW,MArB7E,CAsBGY,OAAQT","file":"searx.head.min.js"} \ No newline at end of file
diff --git a/searx/static/themes/simple/js/searx.js b/searx/static/themes/simple/js/searx.js
new file mode 100644
index 000000000..e191f2487
--- /dev/null
+++ b/searx/static/themes/simple/js/searx.js
@@ -0,0 +1,1573 @@
+/**
+* searx is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Affero General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* searx is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Affero General Public License for more details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with searx. If not, see < http://www.gnu.org/licenses/ >.
+*
+* (C) 2017 by Alexandre Flament, <alex@al-f.net>
+*
+*/
+window.searx = (function(w, d) {
+
+ 'use strict';
+
+ // not invented here tookit with bugs fixed elsewhere
+ // purposes : be just good enough and as small as possible
+
+ // from https://plainjs.com/javascript/events/live-binding-event-handlers-14/
+ if (w.Element) {
+ (function(ElementPrototype) {
+ ElementPrototype.matches = ElementPrototype.matches ||
+ ElementPrototype.matchesSelector ||
+ ElementPrototype.webkitMatchesSelector ||
+ ElementPrototype.msMatchesSelector ||
+ function(selector) {
+ var node = this, nodes = (node.parentNode || node.document).querySelectorAll(selector), i = -1;
+ while (nodes[++i] && nodes[i] != node);
+ return !!nodes[i];
+ };
+ })(Element.prototype);
+ }
+
+ function callbackSafe(callback, el, e) {
+ try {
+ callback.call(el, e);
+ } catch (exception) {
+ console.log(exception);
+ }
+ }
+
+ var searx = window.searx || {};
+
+ searx.on = function(obj, eventType, callback, useCapture) {
+ useCapture = useCapture || false;
+ if (typeof obj !== 'string') {
+ // obj HTMLElement, HTMLDocument
+ obj.addEventListener(eventType, callback, useCapture);
+ } else {
+ // obj is a selector
+ d.addEventListener(eventType, function(e) {
+ var el = e.target || e.srcElement, found = false;
+ while (el && el.matches && el !== d && !(found = el.matches(obj))) el = el.parentElement;
+ if (found) callbackSafe(callback, el, e);
+ }, useCapture);
+ }
+ };
+
+ searx.ready = function(callback) {
+ if (document.readyState != 'loading') {
+ callback.call(w);
+ } else {
+ w.addEventListener('DOMContentLoaded', callback.bind(w));
+ }
+ };
+
+ searx.http = function(method, url, callback) {
+ var req = new XMLHttpRequest(),
+ resolve = function() {},
+ reject = function() {},
+ promise = {
+ then: function(callback) { resolve = callback; return promise; },
+ catch: function(callback) { reject = callback; return promise; }
+ };
+
+ try {
+ req.open(method, url, true);
+
+ // On load
+ req.onload = function() {
+ if (req.status == 200) {
+ resolve(req.response, req.responseType);
+ } else {
+ reject(Error(req.statusText));
+ }
+ };
+
+ // Handle network errors
+ req.onerror = function() {
+ reject(Error("Network Error"));
+ };
+
+ req.onabort = function() {
+ reject(Error("Transaction is aborted"));
+ };
+
+ // Make the request
+ req.send();
+ } catch (ex) {
+ reject(ex);
+ }
+
+ return promise;
+ };
+
+ searx.loadStyle = function(src) {
+ var path = searx.static_path + src,
+ id = "style_" + src.replace('.', '_'),
+ s = d.getElementById(id);
+ if (s === null) {
+ s = d.createElement('link');
+ s.setAttribute('id', id);
+ s.setAttribute('rel', 'stylesheet');
+ s.setAttribute('type', 'text/css');
+ s.setAttribute('href', path);
+ d.body.appendChild(s);
+ }
+ };
+
+ searx.loadScript = function(src, callback) {
+ var path = searx.static_path + src,
+ id = "script_" + src.replace('.', '_'),
+ s = d.getElementById(id);
+ if (s === null) {
+ s = d.createElement('script');
+ s.setAttribute('id', id);
+ s.setAttribute('src', path);
+ s.onload = callback;
+ s.onerror = function() {
+ s.setAttribute('error', '1');
+ };
+ d.body.appendChild(s);
+ } else if (!s.hasAttribute('error')) {
+ try {
+ callback.apply(s, []);
+ } catch (exception) {
+ console.log(exception);
+ }
+ } else {
+ console.log("callback not executed : script '" + path + "' not loaded.");
+ }
+ };
+
+ searx.insertBefore = function (newNode, referenceNode) {
+ element.parentNode.insertBefore(newNode, referenceNode);
+ };
+
+ searx.insertAfter = function(newNode, referenceNode) {
+ referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
+ };
+
+ searx.on('.close', 'click', function(e) {
+ var el = e.target || e.srcElement;
+ this.parentNode.classList.add('invisible');
+ });
+
+ return searx;
+})(window, document);
+;(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.AutoComplete = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+/*
+ * @license MIT
+ *
+ * Autocomplete.js v2.6.3
+ * Developed by Baptiste Donaux
+ * http://autocomplete-js.com
+ *
+ * (c) 2017, Baptiste Donaux
+ */
+"use strict";
+var ConditionOperator;
+(function (ConditionOperator) {
+ ConditionOperator[ConditionOperator["AND"] = 0] = "AND";
+ ConditionOperator[ConditionOperator["OR"] = 1] = "OR";
+})(ConditionOperator || (ConditionOperator = {}));
+var EventType;
+(function (EventType) {
+ EventType[EventType["KEYDOWN"] = 0] = "KEYDOWN";
+ EventType[EventType["KEYUP"] = 1] = "KEYUP";
+})(EventType || (EventType = {}));
+/**
+ * Core
+ *
+ * @class
+ * @author Baptiste Donaux <baptiste.donaux@gmail.com> @baptistedonaux
+ */
+var AutoComplete = (function () {
+ // Constructor
+ function AutoComplete(params, selector) {
+ if (params === void 0) { params = {}; }
+ if (selector === void 0) { selector = "[data-autocomplete]"; }
+ if (Array.isArray(selector)) {
+ selector.forEach(function (s) {
+ new AutoComplete(params, s);
+ });
+ }
+ else if (typeof selector == "string") {
+ var elements = document.querySelectorAll(selector);
+ Array.prototype.forEach.call(elements, function (input) {
+ new AutoComplete(params, input);
+ });
+ }
+ else {
+ var specificParams = AutoComplete.merge(AutoComplete.defaults, params, {
+ DOMResults: document.createElement("div")
+ });
+ AutoComplete.prototype.create(specificParams, selector);
+ return specificParams;
+ }
+ }
+ AutoComplete.prototype.create = function (params, element) {
+ params.Input = element;
+ if (params.Input.nodeName.match(/^INPUT$/i) && (params.Input.hasAttribute("type") === false || params.Input.getAttribute("type").match(/^TEXT|SEARCH$/i))) {
+ params.Input.setAttribute("autocomplete", "off");
+ params._Position(params);
+ params.Input.parentNode.appendChild(params.DOMResults);
+ params.$Listeners = {
+ blur: params._Blur.bind(params),
+ destroy: AutoComplete.prototype.destroy.bind(null, params),
+ focus: params._Focus.bind(params),
+ keyup: AutoComplete.prototype.event.bind(null, params, EventType.KEYUP),
+ keydown: AutoComplete.prototype.event.bind(null, params, EventType.KEYDOWN),
+ position: params._Position.bind(params)
+ };
+ for (var event in params.$Listeners) {
+ params.Input.addEventListener(event, params.$Listeners[event]);
+ }
+ }
+ };
+ AutoComplete.prototype.getEventsByType = function (params, type) {
+ var mappings = {};
+ for (var key in params.KeyboardMappings) {
+ var event = EventType.KEYUP;
+ if (params.KeyboardMappings[key].Event !== undefined) {
+ event = params.KeyboardMappings[key].Event;
+ }
+ if (event == type) {
+ mappings[key] = params.KeyboardMappings[key];
+ }
+ }
+ return mappings;
+ };
+ AutoComplete.prototype.event = function (params, type, event) {
+ var eventIdentifier = function (condition) {
+ if ((match === true && mapping.Operator == ConditionOperator.AND) || (match === false && mapping.Operator == ConditionOperator.OR)) {
+ condition = AutoComplete.merge({
+ Not: false
+ }, condition);
+ if (condition.hasOwnProperty("Is")) {
+ if (condition.Is == event.keyCode) {
+ match = !condition.Not;
+ }
+ else {
+ match = condition.Not;
+ }
+ }
+ else if (condition.hasOwnProperty("From") && condition.hasOwnProperty("To")) {
+ if (event.keyCode >= condition.From && event.keyCode <= condition.To) {
+ match = !condition.Not;
+ }
+ else {
+ match = condition.Not;
+ }
+ }
+ }
+ };
+ for (var name in AutoComplete.prototype.getEventsByType(params, type)) {
+ var mapping = AutoComplete.merge({
+ Operator: ConditionOperator.AND
+ }, params.KeyboardMappings[name]), match = ConditionOperator.AND == mapping.Operator;
+ mapping.Conditions.forEach(eventIdentifier);
+ if (match === true) {
+ mapping.Callback.call(params, event);
+ }
+ }
+ };
+ AutoComplete.prototype.makeRequest = function (params, callback) {
+ var propertyHttpHeaders = Object.getOwnPropertyNames(params.HttpHeaders), request = new XMLHttpRequest(), method = params._HttpMethod(), url = params._Url(), queryParams = params._Pre(), queryParamsStringify = encodeURIComponent(params._QueryArg()) + "=" + encodeURIComponent(queryParams);
+ if (method.match(/^GET$/i)) {
+ if (url.indexOf("?") !== -1) {
+ url += "&" + queryParamsStringify;
+ }
+ else {
+ url += "?" + queryParamsStringify;
+ }
+ }
+ request.open(method, url, true);
+ for (var i = propertyHttpHeaders.length - 1; i >= 0; i--) {
+ request.setRequestHeader(propertyHttpHeaders[i], params.HttpHeaders[propertyHttpHeaders[i]]);
+ }
+ request.onreadystatechange = function () {
+ if (request.readyState == 4 && request.status == 200) {
+ params.$Cache[queryParams] = request.response;
+ callback(request.response);
+ }
+ };
+ return request;
+ };
+ AutoComplete.prototype.ajax = function (params, request, timeout) {
+ if (timeout === void 0) { timeout = true; }
+ if (params.$AjaxTimer) {
+ window.clearTimeout(params.$AjaxTimer);
+ }
+ if (timeout === true) {
+ params.$AjaxTimer = window.setTimeout(AutoComplete.prototype.ajax.bind(null, params, request, false), params.Delay);
+ }
+ else {
+ if (params.Request) {
+ params.Request.abort();
+ }
+ params.Request = request;
+ params.Request.send(params._QueryArg() + "=" + params._Pre());
+ }
+ };
+ AutoComplete.prototype.cache = function (params, callback) {
+ var response = params._Cache(params._Pre());
+ if (response === undefined) {
+ var request = AutoComplete.prototype.makeRequest(params, callback);
+ AutoComplete.prototype.ajax(params, request);
+ }
+ else {
+ callback(response);
+ }
+ };
+ AutoComplete.prototype.destroy = function (params) {
+ for (var event in params.$Listeners) {
+ params.Input.removeEventListener(event, params.$Listeners[event]);
+ }
+ params.DOMResults.parentNode.removeChild(params.DOMResults);
+ };
+ return AutoComplete;
+}());
+AutoComplete.merge = function () {
+ var merge = {}, tmp;
+ for (var i = 0; i < arguments.length; i++) {
+ for (tmp in arguments[i]) {
+ merge[tmp] = arguments[i][tmp];
+ }
+ }
+ return merge;
+};
+AutoComplete.defaults = {
+ Delay: 150,
+ EmptyMessage: "No result here",
+ Highlight: {
+ getRegex: function (value) {
+ return new RegExp(value, "ig");
+ },
+ transform: function (value) {
+ return "<strong>" + value + "</strong>";
+ }
+ },
+ HttpHeaders: {
+ "Content-type": "application/x-www-form-urlencoded"
+ },
+ Limit: 0,
+ MinChars: 0,
+ HttpMethod: "GET",
+ QueryArg: "q",
+ Url: null,
+ KeyboardMappings: {
+ "Enter": {
+ Conditions: [{
+ Is: 13,
+ Not: false
+ }],
+ Callback: function (event) {
+ if (this.DOMResults.getAttribute("class").indexOf("open") != -1) {
+ var liActive = this.DOMResults.querySelector("li.active");
+ if (liActive !== null) {
+ event.preventDefault();
+ this._Select(liActive);
+ this.DOMResults.setAttribute("class", "autocomplete");
+ }
+ }
+ },
+ Operator: ConditionOperator.AND,
+ Event: EventType.KEYDOWN
+ },
+ "KeyUpAndDown_down": {
+ Conditions: [{
+ Is: 38,
+ Not: false
+ },
+ {
+ Is: 40,
+ Not: false
+ }],
+ Callback: function (event) {
+ event.preventDefault();
+ },
+ Operator: ConditionOperator.OR,
+ Event: EventType.KEYDOWN
+ },
+ "KeyUpAndDown_up": {
+ Conditions: [{
+ Is: 38,
+ Not: false
+ },
+ {
+ Is: 40,
+ Not: false
+ }],
+ Callback: function (event) {
+ event.preventDefault();
+ var first = this.DOMResults.querySelector("li:first-child:not(.locked)"), last = this.DOMResults.querySelector("li:last-child:not(.locked)"), active = this.DOMResults.querySelector("li.active");
+ if (active) {
+ var currentIndex = Array.prototype.indexOf.call(active.parentNode.children, active), position = currentIndex + (event.keyCode - 39), lisCount = this.DOMResults.getElementsByTagName("li").length;
+ if (position < 0) {
+ position = lisCount - 1;
+ }
+ else if (position >= lisCount) {
+ position = 0;
+ }
+ active.classList.remove("active");
+ active.parentElement.children.item(position).classList.add("active");
+ }
+ else if (last && event.keyCode == 38) {
+ last.classList.add("active");
+ }
+ else if (first) {
+ first.classList.add("active");
+ }
+ },
+ Operator: ConditionOperator.OR,
+ Event: EventType.KEYUP
+ },
+ "AlphaNum": {
+ Conditions: [{
+ Is: 13,
+ Not: true
+ }, {
+ From: 35,
+ To: 40,
+ Not: true
+ }],
+ Callback: function () {
+ var oldValue = this.Input.getAttribute("data-autocomplete-old-value"), currentValue = this._Pre();
+ if (currentValue !== "" && currentValue.length >= this._MinChars()) {
+ if (!oldValue || currentValue != oldValue) {
+ this.DOMResults.setAttribute("class", "autocomplete open");
+ }
+ AutoComplete.prototype.cache(this, function (response) {
+ this._Render(this._Post(response));
+ this._Open();
+ }.bind(this));
+ }
+ },
+ Operator: ConditionOperator.AND,
+ Event: EventType.KEYUP
+ }
+ },
+ DOMResults: null,
+ Request: null,
+ Input: null,
+ /**
+ * Return the message when no result returns
+ */
+ _EmptyMessage: function () {
+ var emptyMessage = "";
+ if (this.Input.hasAttribute("data-autocomplete-empty-message")) {
+ emptyMessage = this.Input.getAttribute("data-autocomplete-empty-message");
+ }
+ else if (this.EmptyMessage !== false) {
+ emptyMessage = this.EmptyMessage;
+ }
+ else {
+ emptyMessage = "";
+ }
+ return emptyMessage;
+ },
+ /**
+ * Returns the maximum number of results
+ */
+ _Limit: function () {
+ var limit = this.Input.getAttribute("data-autocomplete-limit");
+ if (isNaN(limit) || limit === null) {
+ return this.Limit;
+ }
+ return parseInt(limit, 10);
+ },
+ /**
+ * Returns the minimum number of characters entered before firing ajax
+ */
+ _MinChars: function () {
+ var minchars = this.Input.getAttribute("data-autocomplete-minchars");
+ if (isNaN(minchars) || minchars === null) {
+ return this.MinChars;
+ }
+ return parseInt(minchars, 10);
+ },
+ /**
+ * Apply transformation on labels response
+ */
+ _Highlight: function (label) {
+ return label.replace(this.Highlight.getRegex(this._Pre()), this.Highlight.transform);
+ },
+ /**
+ * Returns the HHTP method to use
+ */
+ _HttpMethod: function () {
+ if (this.Input.hasAttribute("data-autocomplete-method")) {
+ return this.Input.getAttribute("data-autocomplete-method");
+ }
+ return this.HttpMethod;
+ },
+ /**
+ * Returns the query param to use
+ */
+ _QueryArg: function () {
+ if (this.Input.hasAttribute("data-autocomplete-param-name")) {
+ return this.Input.getAttribute("data-autocomplete-param-name");
+ }
+ return this.QueryArg;
+ },
+ /**
+ * Returns the URL to use for AJAX request
+ */
+ _Url: function () {
+ if (this.Input.hasAttribute("data-autocomplete")) {
+ return this.Input.getAttribute("data-autocomplete");
+ }
+ return this.Url;
+ },
+ /**
+ * Manage the close
+ */
+ _Blur: function (now) {
+ if (now === true) {
+ this.DOMResults.setAttribute("class", "autocomplete");
+ this.Input.setAttribute("data-autocomplete-old-value", this.Input.value);
+ }
+ else {
+ var params = this;
+ setTimeout(function () {
+ params._Blur(true);
+ }, 150);
+ }
+ },
+ /**
+ * Manage the cache
+ */
+ _Cache: function (value) {
+ return this.$Cache[value];
+ },
+ /**
+ * Manage the open
+ */
+ _Focus: function () {
+ var oldValue = this.Input.getAttribute("data-autocomplete-old-value");
+ if ((!oldValue || this.Input.value != oldValue) && this._MinChars() <= this.Input.value.length) {
+ this.DOMResults.setAttribute("class", "autocomplete open");
+ }
+ },
+ /**
+ * Bind all results item if one result is opened
+ */
+ _Open: function () {
+ var params = this;
+ Array.prototype.forEach.call(this.DOMResults.getElementsByTagName("li"), function (li) {
+ if (li.getAttribute("class") != "locked") {
+ li.onclick = function (event) {
+ params._Select(li);
+ };
+ li.onmouseenter = function () {
+ var active = params.DOMResults.querySelector("li.active");
+ if (active !== li) {
+ if (active !== null) {
+ active.classList.remove("active");
+ }
+ li.classList.add("active");
+ }
+ };
+ }
+ });
+ },
+ /**
+ * Position the results HTML element
+ */
+ _Position: function () {
+ this.DOMResults.setAttribute("class", "autocomplete");
+ this.DOMResults.setAttribute("style", "top:" + (this.Input.offsetTop + this.Input.offsetHeight) + "px;left:" + this.Input.offsetLeft + "px;width:" + this.Input.clientWidth + "px;");
+ },
+ /**
+ * Execute the render of results DOM element
+ */
+ _Render: function (response) {
+ var ul;
+ if (typeof response == "string") {
+ ul = this._RenderRaw(response);
+ }
+ else {
+ ul = this._RenderResponseItems(response);
+ }
+ if (this.DOMResults.hasChildNodes()) {
+ this.DOMResults.removeChild(this.DOMResults.childNodes[0]);
+ }
+ this.DOMResults.appendChild(ul);
+ },
+ /**
+ * ResponseItems[] rendering
+ */
+ _RenderResponseItems: function (response) {
+ var ul = document.createElement("ul"), li = document.createElement("li"), limit = this._Limit();
+ // Order
+ if (limit < 0) {
+ response = response.reverse();
+ }
+ else if (limit === 0) {
+ limit = response.length;
+ }
+ for (var item = 0; item < Math.min(Math.abs(limit), response.length); item++) {
+ li.innerHTML = response[item].Label;
+ li.setAttribute("data-autocomplete-value", response[item].Value);
+ ul.appendChild(li);
+ li = document.createElement("li");
+ }
+ return ul;
+ },
+ /**
+ * string response rendering (RAW HTML)
+ */
+ _RenderRaw: function (response) {
+ var ul = document.createElement("ul"), li = document.createElement("li");
+ if (response.length > 0) {
+ this.DOMResults.innerHTML = response;
+ }
+ else {
+ var emptyMessage = this._EmptyMessage();
+ if (emptyMessage !== "") {
+ li.innerHTML = emptyMessage;
+ li.setAttribute("class", "locked");
+ ul.appendChild(li);
+ }
+ }
+ return ul;
+ },
+ /**
+ * Deal with request response
+ */
+ _Post: function (response) {
+ try {
+ var returnResponse = [];
+ //JSON return
+ var json = JSON.parse(response);
+ if (Object.keys(json).length === 0) {
+ return "";
+ }
+ if (Array.isArray(json)) {
+ for (var i = 0; i < Object.keys(json).length; i++) {
+ returnResponse[returnResponse.length] = { "Value": json[i], "Label": this._Highlight(json[i]) };
+ }
+ }
+ else {
+ for (var value in json) {
+ returnResponse.push({
+ "Value": value,
+ "Label": this._Highlight(json[value])
+ });
+ }
+ }
+ return returnResponse;
+ }
+ catch (event) {
+ //HTML return
+ return response;
+ }
+ },
+ /**
+ * Return the autocomplete value to send (before request)
+ */
+ _Pre: function () {
+ return this.Input.value;
+ },
+ /**
+ * Choice one result item
+ */
+ _Select: function (item) {
+ console.log('test test test');
+ if (item.hasAttribute("data-autocomplete-value")) {
+ this.Input.value = item.getAttribute("data-autocomplete-value");
+ }
+ else {
+ this.Input.value = item.innerHTML;
+ }
+ this.Input.setAttribute("data-autocomplete-old-value", this.Input.value);
+ },
+ $AjaxTimer: null,
+ $Cache: {},
+ $Listeners: {}
+};
+module.exports = AutoComplete;
+
+},{}]},{},[1])(1)
+});
+;/**
+*
+* Google Image Layout v0.0.1
+* Description, by Anh Trinh.
+* Heavily modified for searx
+* http://trinhtrunganh.com
+*
+* @license Free to use under the MIT License.
+*
+*/
+(function(w, d) {
+ 'use strict';
+
+ function ImageLayout(container_selector, results_selector, img_selector, maxHeight) {
+ this.container_selector = container_selector;
+ this.results_selector = results_selector;
+ this.img_selector = img_selector;
+ this.margin = 10;
+ this.maxHeight = maxHeight;
+ this._alignAllDone = true;
+ }
+
+ /**
+ * Get the height that make all images fit the container
+ *
+ * width = w1 + w2 + w3 + ... = r1*h + r2*h + r3*h + ...
+ *
+ * @param {[type]} images the images to be calculated
+ * @param {[type]} width the container witdth
+ * @param {[type]} margin the margin between each image
+ *
+ * @return {[type]} the height
+ */
+ ImageLayout.prototype._getHeigth = function(images, width) {
+ var r = 0,
+ img;
+
+ width -= images.length * this.margin;
+ for (var i = 0; i < images.length; i++) {
+ img = images[i];
+ if ((img.naturalWidth > 0) && (img.naturalHeight > 0)) {
+ r += img.naturalWidth / img.naturalHeight;
+ } else {
+ // assume that not loaded images are square
+ r += 1;
+ }
+ }
+
+ return width / r; //have to round down because Firefox will automatically roundup value with number of decimals > 3
+ };
+
+ ImageLayout.prototype._setSize = function(images, height) {
+ var img, imgWidth, imagesLength = images.length;
+ for (var i = 0; i < imagesLength; i++) {
+ img = images[i];
+ if ((img.naturalWidth > 0) && (img.naturalHeight > 0)) {
+ imgWidth = height * img.naturalWidth / img.naturalHeight;
+ } else {
+ // not loaded image : make it square as _getHeigth said it
+ imgWidth = height;
+ }
+ img.style.width = imgWidth + 'px';
+ img.style.height = height + 'px';
+ img.style.marginLeft = '3px';
+ img.style.marginTop = '3px';
+ img.style.marginRight = this.margin - 7 + 'px'; // -4 is the negative margin of the inline element
+ img.style.marginBottom = this.margin - 7 + 'px';
+ }
+ };
+
+ ImageLayout.prototype._alignImgs = function(imgGroup) {
+ var slice, h,
+ containerWidth = d.querySelector(this.container_selector).clientWidth;
+
+ w: while (imgGroup.length > 0) {
+ for (var i = 1; i <= imgGroup.length; i++) {
+ slice = imgGroup.slice(0, i);
+ h = this._getHeigth(slice, containerWidth);
+ if (h < this.maxHeight) {
+ this._setSize(slice, h);
+ imgGroup = imgGroup.slice(i);
+ continue w;
+ }
+ }
+ this._setSize(slice, Math.min(this.maxHeight, h));
+ break;
+ }
+ };
+
+ ImageLayout.prototype.align = function(results_selector) {
+ var results_selectorNode = d.querySelectorAll(this.results_selector),
+ results_length = results_selectorNode.length,
+ previous = null,
+ current = null,
+ imgGroup = [];
+ for (var i = 0; i < results_length; i++) {
+ current = results_selectorNode[i];
+ if (current.previousElementSibling !== previous && imgGroup.length > 0) {
+ // the current image is not conected to previous one
+ // so the current image is the start of a new group of images.
+ // so call _alignImgs to align the current group
+ this._alignImgs(imgGroup);
+ // and start a new empty group of images
+ imgGroup = [];
+ }
+ // add the current image to the group (only the img tag)
+ imgGroup.push(current.querySelector(this.img_selector));
+ // update the previous variable
+ previous = current;
+ }
+ // align the remaining images
+ if (imgGroup.length > 0) {
+ this._alignImgs(imgGroup);
+ }
+ };
+
+ ImageLayout.prototype.watch = function() {
+ var i, img, imgGroup, imgNodeLength,
+ obj = this,
+ results_nodes = d.querySelectorAll(this.results_selector),
+ results_length = results_nodes.length;
+
+ function align(e) {
+ obj.align();
+ }
+
+ function throttleAlign(e) {
+ if (obj._alignAllDone) {
+ obj._alignAllDone = false;
+ setTimeout(function() {
+ obj.align();
+ obj._alignAllDone = true;
+ }, 100);
+ }
+ }
+
+ w.addEventListener('resize', throttleAlign);
+ w.addEventListener('pageshow', align);
+
+ for (i = 0; i < results_length; i++) {
+ img = results_nodes[i].querySelector(this.img_selector);
+ if (typeof img !== 'undefined') {
+ img.addEventListener('load', throttleAlign);
+ img.addEventListener('error', throttleAlign);
+ }
+ }
+ };
+
+ w.searx.ImageLayout = ImageLayout;
+
+})(window, document);
+;searx.ready(function() {
+
+ searx.on('.result', 'click', function() {
+ highlightResult(this)(true);
+ });
+
+ searx.on('.result a', 'focus', function(e) {
+ var el = e.target;
+ while (el !== undefined) {
+ if (el.classList.contains('result')) {
+ if (el.getAttribute("data-vim-selected") === null) {
+ highlightResult(el)(true);
+ }
+ break;
+ }
+ el = el.parentNode;
+ }
+ }, true);
+
+ var vimKeys = {
+ 27: {
+ key: 'Escape',
+ fun: removeFocus,
+ des: 'remove focus from the focused input',
+ cat: 'Control'
+ },
+ 73: {
+ key: 'i',
+ fun: searchInputFocus,
+ des: 'focus on the search input',
+ cat: 'Control'
+ },
+ 66: {
+ key: 'b',
+ fun: scrollPage(-window.innerHeight),
+ des: 'scroll one page up',
+ cat: 'Navigation'
+ },
+ 70: {
+ key: 'f',
+ fun: scrollPage(window.innerHeight),
+ des: 'scroll one page down',
+ cat: 'Navigation'
+ },
+ 85: {
+ key: 'u',
+ fun: scrollPage(-window.innerHeight / 2),
+ des: 'scroll half a page up',
+ cat: 'Navigation'
+ },
+ 68: {
+ key: 'd',
+ fun: scrollPage(window.innerHeight / 2),
+ des: 'scroll half a page down',
+ cat: 'Navigation'
+ },
+ 71: {
+ key: 'g',
+ fun: scrollPageTo(-document.body.scrollHeight, 'top'),
+ des: 'scroll to the top of the page',
+ cat: 'Navigation'
+ },
+ 86: {
+ key: 'v',
+ fun: scrollPageTo(document.body.scrollHeight, 'bottom'),
+ des: 'scroll to the bottom of the page',
+ cat: 'Navigation'
+ },
+ 75: {
+ key: 'k',
+ fun: highlightResult('up'),
+ des: 'select previous search result',
+ cat: 'Results'
+ },
+ 74: {
+ key: 'j',
+ fun: highlightResult('down'),
+ des: 'select next search result',
+ cat: 'Results'
+ },
+ 80: {
+ key: 'p',
+ fun: pageButtonClick(0),
+ des: 'go to previous page',
+ cat: 'Results'
+ },
+ 78: {
+ key: 'n',
+ fun: pageButtonClick(1),
+ des: 'go to next page',
+ cat: 'Results'
+ },
+ 79: {
+ key: 'o',
+ fun: openResult(false),
+ des: 'open search result',
+ cat: 'Results'
+ },
+ 84: {
+ key: 't',
+ fun: openResult(true),
+ des: 'open the result in a new tab',
+ cat: 'Results'
+ },
+ 82: {
+ key: 'r',
+ fun: reloadPage,
+ des: 'reload page from the server',
+ cat: 'Control'
+ },
+ 72: {
+ key: 'h',
+ fun: toggleHelp,
+ des: 'toggle help window',
+ cat: 'Other'
+ }
+ };
+
+ searx.on(document, "keydown", function(e) {
+ // check for modifiers so we don't break browser's hotkeys
+ if (vimKeys.hasOwnProperty(e.keyCode) && !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) {
+ var tagName = e.target.tagName.toLowerCase();
+ if (e.keyCode === 27) {
+ if (tagName === 'input' || tagName === 'select' || tagName === 'textarea') {
+ vimKeys[e.keyCode].fun();
+ }
+ } else {
+ if (e.target === document.body || tagName === 'a' || tagName === 'button') {
+ e.preventDefault();
+ vimKeys[e.keyCode].fun();
+ }
+ }
+ }
+ });
+
+ function highlightResult(which) {
+ return function(noScroll) {
+ var current = document.querySelector('.result[data-vim-selected]'),
+ effectiveWhich = which;
+ if (current === null) {
+ // no selection : choose the first one
+ current = document.querySelector('.result');
+ if (current === null) {
+ // no first one : there are no results
+ return;
+ }
+ // replace up/down actions by selecting first one
+ if (which === "down" || which === "up") {
+ effectiveWhich = current;
+ }
+ }
+
+ var next, results = document.querySelectorAll('.result');
+
+ if (typeof effectiveWhich !== 'string') {
+ next = effectiveWhich;
+ } else {
+ switch (effectiveWhich) {
+ case 'visible':
+ var top = document.documentElement.scrollTop || document.body.scrollTop;
+ var bot = top + document.documentElement.clientHeight;
+
+ for (var i = 0; i < results.length; i++) {
+ next = results[i];
+ var etop = next.offsetTop;
+ var ebot = etop + next.clientHeight;
+
+ if ((ebot <= bot) && (etop > top)) {
+ break;
+ }
+ }
+ break;
+ case 'down':
+ next = current.nextElementSibling;
+ if (next === null) {
+ next = results[0];
+ }
+ break;
+ case 'up':
+ next = current.previousElementSibling;
+ if (next === null) {
+ next = results[results.length - 1];
+ }
+ break;
+ case 'bottom':
+ next = results[results.length - 1];
+ break;
+ case 'top':
+ /* falls through */
+ default:
+ next = results[0];
+ }
+ }
+
+ if (next) {
+ current.removeAttribute('data-vim-selected');
+ next.setAttribute('data-vim-selected', 'true');
+ var link = next.querySelector('h3 a') || next.querySelector('a');
+ if (link !== null) {
+ link.focus();
+ }
+ if (!noScroll) {
+ scrollPageToSelected();
+ }
+ }
+ };
+ }
+
+ function reloadPage() {
+ document.location.reload(true);
+ }
+
+ function removeFocus() {
+ if (document.activeElement) {
+ document.activeElement.blur();
+ }
+ }
+
+ function pageButtonClick(num) {
+ return function() {
+ var buttons = $('div#pagination button[type="submit"]');
+ if (buttons.length !== 2) {
+ console.log('page navigation with this theme is not supported');
+ return;
+ }
+ if (num >= 0 && num < buttons.length) {
+ buttons[num].click();
+ } else {
+ console.log('pageButtonClick(): invalid argument');
+ }
+ };
+ }
+
+ function scrollPageToSelected() {
+ var sel = document.querySelector('.result[data-vim-selected]');
+ if (sel === null) {
+ return;
+ }
+ var wtop = document.documentElement.scrollTop || document.body.scrollTop,
+ wheight = document.documentElement.clientHeight,
+ etop = sel.offsetTop,
+ ebot = etop + sel.clientHeight,
+ offset = 120;
+ // first element ?
+ if ((sel.previousElementSibling === null) && (ebot < wheight)) {
+ // set to the top of page if the first element
+ // is fully included in the viewport
+ window.scroll(window.scrollX, 0);
+ return;
+ }
+ if (wtop > (etop - offset)) {
+ window.scroll(window.scrollX, etop - offset);
+ } else {
+ var wbot = wtop + wheight;
+ if (wbot < (ebot + offset)) {
+ window.scroll(window.scrollX, ebot - wheight + offset);
+ }
+ }
+ }
+
+ function scrollPage(amount) {
+ return function() {
+ window.scrollBy(0, amount);
+ highlightResult('visible')();
+ };
+ }
+
+ function scrollPageTo(position, nav) {
+ return function() {
+ window.scrollTo(0, position);
+ highlightResult(nav)();
+ };
+ }
+
+ function searchInputFocus() {
+ window.scrollTo(0, 0);
+ document.querySelector('#q').focus();
+ }
+
+ function openResult(newTab) {
+ return function() {
+ var link = document.querySelector('.result[data-vim-selected] h3 a');
+ if (link !== null) {
+ var url = link.getAttribute('href');
+ if (newTab) {
+ window.open(url);
+ } else {
+ window.location.href = url;
+ }
+ }
+ };
+ }
+
+ function initHelpContent(divElement) {
+ var categories = {};
+
+ for (var k in vimKeys) {
+ var key = vimKeys[k];
+ categories[key.cat] = categories[key.cat] || [];
+ categories[key.cat].push(key);
+ }
+
+ var sorted = Object.keys(categories).sort(function(a, b) {
+ return categories[b].length - categories[a].length;
+ });
+
+ if (sorted.length === 0) {
+ return;
+ }
+
+ var html = '<a href="#" class="close" aria-label="close" title="close">×</a>';
+ html += '<h3>How to navigate searx with Vim-like hotkeys</h3>';
+ html += '<table>';
+
+ for (var i = 0; i < sorted.length; i++) {
+ var cat = categories[sorted[i]];
+
+ var lastCategory = i === (sorted.length - 1);
+ var first = i % 2 === 0;
+
+ if (first) {
+ html += '<tr>';
+ }
+ html += '<td>';
+
+ html += '<h4>' + cat[0].cat + '</h4>';
+ html += '<ul class="list-unstyled">';
+
+ for (var cj in cat) {
+ html += '<li><kbd>' + cat[cj].key + '</kbd> ' + cat[cj].des + '</li>';
+ }
+
+ html += '</ul>';
+ html += '</td>'; // col-sm-*
+
+ if (!first || lastCategory) {
+ html += '</tr>'; // row
+ }
+ }
+
+ html += '</table>';
+
+ divElement.innerHTML = html;
+ }
+
+ function toggleHelp() {
+ var helpPanel = document.querySelector('#vim-hotkeys-help');
+ console.log(helpPanel);
+ if (helpPanel === undefined || helpPanel === null) {
+ // first call
+ helpPanel = document.createElement('div');
+ helpPanel.id = 'vim-hotkeys-help';
+ helpPanel.className='dialog-modal';
+ helpPanel.style='width: 40%';
+ initHelpContent(helpPanel);
+ var body = document.getElementsByTagName('body')[0];
+ body.appendChild(helpPanel);
+ } else {
+ // togggle hidden
+ helpPanel.classList.toggle('invisible');
+ return;
+ }
+
+ }
+
+});
+;/**
+* searx is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Affero General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* searx is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Affero General Public License for more details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with searx. If not, see < http://www.gnu.org/licenses/ >.
+*
+* (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
+* (C) 2017 by Alexandre Flament, <alex@al-f.net>
+*/
+(function (w, d, searx) {
+ 'use strict';
+
+ searx.ready(function () {
+ searx.on('.searx_overpass_request', 'click', function(event) {
+ // no more request
+ this.classList.remove("searx_overpass_request");
+
+ //
+ var overpass_url = "https://overpass-api.de/api/interpreter?data=";
+ var query_start = overpass_url + "[out:json][timeout:25];(";
+ var query_end = ");out meta;";
+
+ var osm_id = this.dataset.osmId;
+ var osm_type = this.dataset.osmType;
+ var result_table = d.querySelector("#" + this.dataset.resultTable);
+ var result_table_loadicon = d.querySelector("#" + this.dataset.resultTableLoadicon);
+
+ // tags which can be ignored
+ var osm_ignore_tags = [ "addr:city", "addr:country", "addr:housenumber", "addr:postcode", "addr:street" ];
+
+ if(osm_id && osm_type && result_table) {
+ var query = null;
+ switch(osm_type) {
+ case 'node':
+ query = query_start + "node(" + osm_id + ");" + query_end;
+ break;
+ case 'way':
+ query = query_start + "way(" + osm_id + ");" + query_end;
+ break;
+ case 'relation':
+ query = query_start + "relation(" + osm_id + ");" + query_end;
+ break;
+ default:
+ break;
+ }
+ if(query) {
+ // console.log(query);
+ searx.http( 'GET', query ).then(function(html, contentType) {
+ html = JSON.parse(html);
+ if(html && html.elements && html.elements[0]) {
+ var element = html.elements[0];
+ var newHtml = "";
+ for (var row in element.tags) {
+ if(element.tags.name === null || osm_ignore_tags.indexOf(row) == -1) {
+ newHtml += "<tr><td>" + row + "</td><td>";
+ switch(row) {
+ case "phone":
+ case "fax":
+ newHtml += "<a href=\"tel:" + element.tags[row].replace(/ /g,'') + "\">" + element.tags[row] + "</a>";
+ break;
+ case "email":
+ newHtml += "<a href=\"mailto:" + element.tags[row] + "\">" + element.tags[row] + "</a>";
+ break;
+ case "website":
+ case "url":
+ newHtml += "<a href=\"" + element.tags[row] + "\">" + element.tags[row] + "</a>";
+ break;
+ case "wikidata":
+ newHtml += "<a href=\"https://www.wikidata.org/wiki/" + element.tags[row] + "\">" + element.tags[row] + "</a>";
+ break;
+ case "wikipedia":
+ if(element.tags[row].indexOf(":") != -1) {
+ newHtml += "<a href=\"https://" + element.tags[row].substring(0,element.tags[row].indexOf(":")) + ".wikipedia.org/wiki/" + element.tags[row].substring(element.tags[row].indexOf(":")+1) + "\">" + element.tags[row] + "</a>";
+ break;
+ }
+ /* jshint ignore:start */
+ default:
+ /* jshint ignore:end */
+ newHtml += element.tags[row];
+ break;
+ }
+ newHtml += "</td></tr>";
+ }
+ }
+ result_table_loadicon.parentNode.removeChild(result_table_loadicon);
+ result_table.classList.remove('invisible');
+ result_table.querySelector("tbody").innerHTML = newHtml;
+ }
+ })
+ .catch(function() {
+ result_table_loadicon.classList.remove('invisible');
+ result_table_loadicon.innerHTML = "could not load data!";
+ });
+ }
+ }
+
+ // this event occour only once per element
+ event.preventDefault();
+ });
+
+ searx.on('.searx_init_map', 'click', function(event) {
+ // no more request
+ this.classList.remove("searx_init_map");
+
+ //
+ var leaflet_target = this.dataset.leafletTarget;
+ var map_lon = parseFloat(this.dataset.mapLon);
+ var map_lat = parseFloat(this.dataset.mapLat);
+ var map_zoom = parseFloat(this.dataset.mapZoom);
+ var map_boundingbox = JSON.parse(this.dataset.mapBoundingbox);
+ var map_geojson = JSON.parse(this.dataset.mapGeojson);
+
+ searx.loadStyle('leaflet/leaflet.css');
+ searx.loadScript('leaflet/leaflet.js', function() {
+ var map_bounds = null;
+ if(map_boundingbox) {
+ var southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]);
+ var northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]);
+ map_bounds = L.latLngBounds(southWest, northEast);
+ }
+
+ // init map
+ var map = L.map(leaflet_target);
+ // create the tile layer with correct attribution
+ var osmMapnikUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
+ var osmMapnikAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
+ var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib});
+ var osmWikimediaUrl='https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png';
+ var osmWikimediaAttrib = 'Wikimedia maps beta | Maps data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
+ var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib});
+ // init map view
+ if(map_bounds) {
+ // TODO hack: https://github.com/Leaflet/Leaflet/issues/2021
+ // Still useful ?
+ setTimeout(function () {
+ map.fitBounds(map_bounds, {
+ maxZoom:17
+ });
+ }, 0);
+ } else if (map_lon && map_lat) {
+ if(map_zoom) {
+ map.setView(new L.latLng(map_lat, map_lon),map_zoom);
+ } else {
+ map.setView(new L.latLng(map_lat, map_lon),8);
+ }
+ }
+
+ map.addLayer(osmMapnik);
+
+ var baseLayers = {
+ "OSM Mapnik": osmMapnik/*,
+ "OSM Wikimedia": osmWikimedia*/
+ };
+
+ L.control.layers(baseLayers).addTo(map);
+
+ if(map_geojson) {
+ L.geoJson(map_geojson).addTo(map);
+ } /*else if(map_bounds) {
+ L.rectangle(map_bounds, {color: "#ff7800", weight: 3, fill:false}).addTo(map);
+ }*/
+ });
+
+ // this event occour only once per element
+ event.preventDefault();
+ });
+ });
+})(window, document, window.searx);
+;/**
+* searx is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Affero General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* searx is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Affero General Public License for more details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with searx. If not, see < http://www.gnu.org/licenses/ >.
+*
+* (C) 2017 by Alexandre Flament, <alex@al-f.net>
+*/
+(function(w, d, searx) {
+ 'use strict';
+
+ searx.ready(function() {
+ searx.image_thumbnail_layout = new searx.ImageLayout('#urls', '#urls .result-images', 'img.image_thumbnail', 200);
+ searx.image_thumbnail_layout.watch();
+
+ searx.on('.btn-collapse', 'click', function(event) {
+ var btnLabelCollapsed = this.getAttribute('data-btn-text-collapsed');
+ var btnLabelNotCollapsed = this.getAttribute('data-btn-text-not-collapsed');
+ var target = this.getAttribute('data-target');
+ var targetElement = d.querySelector(target);
+ var html = this.innerHTML;
+ if (this.classList.contains('collapsed')) {
+ html = html.replace(btnLabelCollapsed, btnLabelNotCollapsed);
+ } else {
+ html = html.replace(btnLabelNotCollapsed, btnLabelCollapsed);
+ }
+ this.innerHTML = html;
+ this.classList.toggle('collapsed');
+ targetElement.classList.toggle('invisible');
+ });
+
+ searx.on('.media-loader', 'click', function(event) {
+ var target = this.getAttribute('data-target');
+ var iframe_load = d.querySelector(target + ' > iframe');
+ var srctest = iframe_load.getAttribute('src');
+ if (srctest === null || srctest === undefined || srctest === false) {
+ iframe_load.setAttribute('src', iframe_load.getAttribute('data-src'));
+ }
+ });
+
+ w.addEventListener('scroll', function() {
+ var e = d.getElementById('backToTop'),
+ scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
+ if (e !== null) {
+ if (scrollTop >= 200) {
+ e.style.opacity = 1;
+ } else {
+ e.style.opacity = 0;
+ }
+ }
+ });
+
+ });
+
+})(window, document, window.searx);
+;/**
+* searx is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Affero General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* searx is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Affero General Public License for more details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with searx. If not, see < http://www.gnu.org/licenses/ >.
+*
+* (C) 2017 by Alexandre Flament, <alex@al-f.net>
+*/
+(function(w, d, searx) {
+ 'use strict';
+
+ var firstFocus = true, qinput_id = "q", qinput;
+
+ function placeCursorAtEnd(element) {
+ if (element.setSelectionRange) {
+ var len = element.value.length;
+ element.setSelectionRange(len, len);
+ }
+ }
+
+ function submitIfQuery() {
+ if (qinput.value.length > 0) {
+ var search = document.getElementById('search');
+ setTimeout(search.submit.bind(search), 0);
+ }
+ }
+
+ function createClearButton(qinput) {
+ var cs = document.getElementById('clear_search');
+ var updateClearButton = function() {
+ if (qinput.value.length === 0) {
+ cs.classList.add("empty");
+ } else {
+ cs.classList.remove("empty");
+ }
+ };
+
+ // update status, event listener
+ updateClearButton();
+ cs.addEventListener('click', function() {
+ qinput.value='';
+ qinput.focus();
+ updateClearButton();
+ });
+ qinput.addEventListener('keyup', updateClearButton, false);
+ }
+
+ searx.ready(function() {
+ qinput = d.getElementById(qinput_id);
+
+ function placeCursorAtEndOnce(e) {
+ if (firstFocus) {
+ placeCursorAtEnd(qinput);
+ firstFocus = false;
+ } else {
+ // e.preventDefault();
+ }
+ }
+
+ if (qinput !== null) {
+ // clear button
+ createClearButton(qinput);
+
+ // autocompleter
+ if (searx.autocompleter) {
+ searx.autocomplete = AutoComplete.call(w, {
+ Url: "./autocompleter",
+ EmptyMessage: searx.no_item_found,
+ HttpMethod: searx.method,
+ MinChars: 4,
+ Delay: 300,
+ }, "#" + qinput_id);
+
+ // hack, see : https://github.com/autocompletejs/autocomplete.js/issues/37
+ w.addEventListener('resize', function() {
+ var event = new CustomEvent("position");
+ qinput.dispatchEvent(event);
+ });
+ }
+
+ qinput.addEventListener('focus', placeCursorAtEndOnce, false);
+ qinput.focus();
+ }
+
+ // vanilla js version of search_on_category_select.js
+ if (qinput !== null && searx.search_on_category_select) {
+ d.querySelector('.help').className='invisible';
+
+ searx.on('#categories input', 'change', function(e) {
+ var i, categories = d.querySelectorAll('#categories input[type="checkbox"]');
+ for(i=0; i<categories.length; i++) {
+ if (categories[i] !== this && categories[i].checked) {
+ categories[i].click();
+ }
+ }
+ if (! this.checked) {
+ this.click();
+ }
+ submitIfQuery();
+ return false;
+ });
+
+ searx.on(d.getElementById('time_range'), 'change', submitIfQuery);
+ searx.on(d.getElementById('language'), 'change', submitIfQuery);
+ }
+
+ });
+
+})(window, document, window.searx);
diff --git a/searx/static/themes/simple/js/searx.min.js b/searx/static/themes/simple/js/searx.min.js
new file mode 100644
index 000000000..42e8a845c
--- /dev/null
+++ b/searx/static/themes/simple/js/searx.min.js
@@ -0,0 +1,25 @@
+/*! simple/searx.min.js | 06-08-2019 | https://github.com/asciimoo/searx */
+
+window.searx=function(t,a){"use strict";if(t.Element){(function(e){e.matches=e.matches||e.matchesSelector||e.webkitMatchesSelector||e.msMatchesSelector||function(e){var t=this,n=(t.parentNode||t.document).querySelectorAll(e),i=-1;while(n[++i]&&n[i]!=t);return!!n[i]}})(Element.prototype)}function o(e,t,n){try{e.call(t,n)}catch(e){console.log(e)}}var s=window.searx||{};s.on=function(i,e,r,t){t=t||false;if(typeof i!=="string"){i.addEventListener(e,r,t)}else{a.addEventListener(e,function(e){var t=e.target||e.srcElement,n=false;while(t&&t.matches&&t!==a&&!(n=t.matches(i)))t=t.parentElement;if(n)o(r,t,e)},t)}};s.ready=function(e){if(document.readyState!="loading"){e.call(t)}else{t.addEventListener("DOMContentLoaded",e.bind(t))}};s.http=function(e,t,n){var i=new XMLHttpRequest,r=function(){},a=function(){},o={then:function(e){r=e;return o},catch:function(e){a=e;return o}};try{i.open(e,t,true);i.onload=function(){if(i.status==200){r(i.response,i.responseType)}else{a(Error(i.statusText))}};i.onerror=function(){a(Error("Network Error"))};i.onabort=function(){a(Error("Transaction is aborted"))};i.send()}catch(e){a(e)}return o};s.loadStyle=function(e){var t=s.static_path+e,n="style_"+e.replace(".","_"),i=a.getElementById(n);if(i===null){i=a.createElement("link");i.setAttribute("id",n);i.setAttribute("rel","stylesheet");i.setAttribute("type","text/css");i.setAttribute("href",t);a.body.appendChild(i)}};s.loadScript=function(e,t){var n=s.static_path+e,i="script_"+e.replace(".","_"),r=a.getElementById(i);if(r===null){r=a.createElement("script");r.setAttribute("id",i);r.setAttribute("src",n);r.onload=t;r.onerror=function(){r.setAttribute("error","1")};a.body.appendChild(r)}else if(!r.hasAttribute("error")){try{t.apply(r,[])}catch(e){console.log(e)}}else{console.log("callback not executed : script '"+n+"' not loaded.")}};s.insertBefore=function(e,t){element.parentNode.insertBefore(e,t)};s.insertAfter=function(e,t){t.parentNode.insertBefore(e,t.nextSibling)};s.on(".close","click",function(e){var t=e.target||e.srcElement;this.parentNode.classList.add("invisible")});return s}(window,document);(function(e){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=e()}else if(typeof define==="function"&&define.amd){define([],e)}else{var t;if(typeof window!=="undefined"){t=window}else if(typeof global!=="undefined"){t=global}else if(typeof self!=="undefined"){t=self}else{t=this}t.AutoComplete=e()}})(function(){var e,t,n;return function a(o,s,l){function u(n,e){if(!s[n]){if(!o[n]){var t=typeof require=="function"&&require;if(!e&&t)return t(n,!0);if(c)return c(n,!0);var i=new Error("Cannot find module '"+n+"'");throw i.code="MODULE_NOT_FOUND",i}var r=s[n]={exports:{}};o[n][0].call(r.exports,function(e){var t=o[n][1][e];return u(t?t:e)},r,r.exports,a,o,s,l)}return s[n].exports}var c=typeof require=="function"&&require;for(var e=0;e<l.length;e++)u(l[e]);return u}({1:[function(e,t,n){
+/*
+ * @license MIT
+ *
+ * Autocomplete.js v2.6.3
+ * Developed by Baptiste Donaux
+ * http://autocomplete-js.com
+ *
+ * (c) 2017, Baptiste Donaux
+ */
+"use strict";var l;(function(e){e[e["AND"]=0]="AND";e[e["OR"]=1]="OR"})(l||(l={}));var a;(function(e){e[e["KEYDOWN"]=0]="KEYDOWN";e[e["KEYUP"]=1]="KEYUP"})(a||(a={}));var i=function(){function s(t,e){if(t===void 0){t={}}if(e===void 0){e="[data-autocomplete]"}if(Array.isArray(e)){e.forEach(function(e){new s(t,e)})}else if(typeof e=="string"){var n=document.querySelectorAll(e);Array.prototype.forEach.call(n,function(e){new s(t,e)})}else{var i=s.merge(s.defaults,t,{DOMResults:document.createElement("div")});s.prototype.create(i,e);return i}}s.prototype.create=function(e,t){e.Input=t;if(e.Input.nodeName.match(/^INPUT$/i)&&(e.Input.hasAttribute("type")===false||e.Input.getAttribute("type").match(/^TEXT|SEARCH$/i))){e.Input.setAttribute("autocomplete","off");e._Position(e);e.Input.parentNode.appendChild(e.DOMResults);e.$Listeners={blur:e._Blur.bind(e),destroy:s.prototype.destroy.bind(null,e),focus:e._Focus.bind(e),keyup:s.prototype.event.bind(null,e,a.KEYUP),keydown:s.prototype.event.bind(null,e,a.KEYDOWN),position:e._Position.bind(e)};for(var n in e.$Listeners){e.Input.addEventListener(n,e.$Listeners[n])}}};s.prototype.getEventsByType=function(e,t){var n={};for(var i in e.KeyboardMappings){var r=a.KEYUP;if(e.KeyboardMappings[i].Event!==undefined){r=e.KeyboardMappings[i].Event}if(r==t){n[i]=e.KeyboardMappings[i]}}return n};s.prototype.event=function(e,t,n){var i=function(e){if(o===true&&a.Operator==l.AND||o===false&&a.Operator==l.OR){e=s.merge({Not:false},e);if(e.hasOwnProperty("Is")){if(e.Is==n.keyCode){o=!e.Not}else{o=e.Not}}else if(e.hasOwnProperty("From")&&e.hasOwnProperty("To")){if(n.keyCode>=e.From&&n.keyCode<=e.To){o=!e.Not}else{o=e.Not}}}};for(var r in s.prototype.getEventsByType(e,t)){var a=s.merge({Operator:l.AND},e.KeyboardMappings[r]),o=l.AND==a.Operator;a.Conditions.forEach(i);if(o===true){a.Callback.call(e,n)}}};s.prototype.makeRequest=function(e,t){var n=Object.getOwnPropertyNames(e.HttpHeaders),i=new XMLHttpRequest,r=e._HttpMethod(),a=e._Url(),o=e._Pre(),s=encodeURIComponent(e._QueryArg())+"="+encodeURIComponent(o);if(r.match(/^GET$/i)){if(a.indexOf("?")!==-1){a+="&"+s}else{a+="?"+s}}i.open(r,a,true);for(var l=n.length-1;l>=0;l--){i.setRequestHeader(n[l],e.HttpHeaders[n[l]])}i.onreadystatechange=function(){if(i.readyState==4&&i.status==200){e.$Cache[o]=i.response;t(i.response)}};return i};s.prototype.ajax=function(e,t,n){if(n===void 0){n=true}if(e.$AjaxTimer){window.clearTimeout(e.$AjaxTimer)}if(n===true){e.$AjaxTimer=window.setTimeout(s.prototype.ajax.bind(null,e,t,false),e.Delay)}else{if(e.Request){e.Request.abort()}e.Request=t;e.Request.send(e._QueryArg()+"="+e._Pre())}};s.prototype.cache=function(e,t){var n=e._Cache(e._Pre());if(n===undefined){var i=s.prototype.makeRequest(e,t);s.prototype.ajax(e,i)}else{t(n)}};s.prototype.destroy=function(e){for(var t in e.$Listeners){e.Input.removeEventListener(t,e.$Listeners[t])}e.DOMResults.parentNode.removeChild(e.DOMResults)};return s}();i.merge=function(){var e={},t;for(var n=0;n<arguments.length;n++){for(t in arguments[n]){e[t]=arguments[n][t]}}return e};i.defaults={Delay:150,EmptyMessage:"No result here",Highlight:{getRegex:function(e){return new RegExp(e,"ig")},transform:function(e){return"<strong>"+e+"</strong>"}},HttpHeaders:{"Content-type":"application/x-www-form-urlencoded"},Limit:0,MinChars:0,HttpMethod:"GET",QueryArg:"q",Url:null,KeyboardMappings:{Enter:{Conditions:[{Is:13,Not:false}],Callback:function(e){if(this.DOMResults.getAttribute("class").indexOf("open")!=-1){var t=this.DOMResults.querySelector("li.active");if(t!==null){e.preventDefault();this._Select(t);this.DOMResults.setAttribute("class","autocomplete")}}},Operator:l.AND,Event:a.KEYDOWN},KeyUpAndDown_down:{Conditions:[{Is:38,Not:false},{Is:40,Not:false}],Callback:function(e){e.preventDefault()},Operator:l.OR,Event:a.KEYDOWN},KeyUpAndDown_up:{Conditions:[{Is:38,Not:false},{Is:40,Not:false}],Callback:function(e){e.preventDefault();var t=this.DOMResults.querySelector("li:first-child:not(.locked)"),n=this.DOMResults.querySelector("li:last-child:not(.locked)"),i=this.DOMResults.querySelector("li.active");if(i){var r=Array.prototype.indexOf.call(i.parentNode.children,i),a=r+(e.keyCode-39),o=this.DOMResults.getElementsByTagName("li").length;if(a<0){a=o-1}else if(a>=o){a=0}i.classList.remove("active");i.parentElement.children.item(a).classList.add("active")}else if(n&&e.keyCode==38){n.classList.add("active")}else if(t){t.classList.add("active")}},Operator:l.OR,Event:a.KEYUP},AlphaNum:{Conditions:[{Is:13,Not:true},{From:35,To:40,Not:true}],Callback:function(){var e=this.Input.getAttribute("data-autocomplete-old-value"),t=this._Pre();if(t!==""&&t.length>=this._MinChars()){if(!e||t!=e){this.DOMResults.setAttribute("class","autocomplete open")}i.prototype.cache(this,function(e){this._Render(this._Post(e));this._Open()}.bind(this))}},Operator:l.AND,Event:a.KEYUP}},DOMResults:null,Request:null,Input:null,_EmptyMessage:function(){var e="";if(this.Input.hasAttribute("data-autocomplete-empty-message")){e=this.Input.getAttribute("data-autocomplete-empty-message")}else if(this.EmptyMessage!==false){e=this.EmptyMessage}else{e=""}return e},_Limit:function(){var e=this.Input.getAttribute("data-autocomplete-limit");if(isNaN(e)||e===null){return this.Limit}return parseInt(e,10)},_MinChars:function(){var e=this.Input.getAttribute("data-autocomplete-minchars");if(isNaN(e)||e===null){return this.MinChars}return parseInt(e,10)},_Highlight:function(e){return e.replace(this.Highlight.getRegex(this._Pre()),this.Highlight.transform)},_HttpMethod:function(){if(this.Input.hasAttribute("data-autocomplete-method")){return this.Input.getAttribute("data-autocomplete-method")}return this.HttpMethod},_QueryArg:function(){if(this.Input.hasAttribute("data-autocomplete-param-name")){return this.Input.getAttribute("data-autocomplete-param-name")}return this.QueryArg},_Url:function(){if(this.Input.hasAttribute("data-autocomplete")){return this.Input.getAttribute("data-autocomplete")}return this.Url},_Blur:function(e){if(e===true){this.DOMResults.setAttribute("class","autocomplete");this.Input.setAttribute("data-autocomplete-old-value",this.Input.value)}else{var t=this;setTimeout(function(){t._Blur(true)},150)}},_Cache:function(e){return this.$Cache[e]},_Focus:function(){var e=this.Input.getAttribute("data-autocomplete-old-value");if((!e||this.Input.value!=e)&&this._MinChars()<=this.Input.value.length){this.DOMResults.setAttribute("class","autocomplete open")}},_Open:function(){var n=this;Array.prototype.forEach.call(this.DOMResults.getElementsByTagName("li"),function(t){if(t.getAttribute("class")!="locked"){t.onclick=function(e){n._Select(t)};t.onmouseenter=function(){var e=n.DOMResults.querySelector("li.active");if(e!==t){if(e!==null){e.classList.remove("active")}t.classList.add("active")}}}})},_Position:function(){this.DOMResults.setAttribute("class","autocomplete");this.DOMResults.setAttribute("style","top:"+(this.Input.offsetTop+this.Input.offsetHeight)+"px;left:"+this.Input.offsetLeft+"px;width:"+this.Input.clientWidth+"px;")},_Render:function(e){var t;if(typeof e=="string"){t=this._RenderRaw(e)}else{t=this._RenderResponseItems(e)}if(this.DOMResults.hasChildNodes()){this.DOMResults.removeChild(this.DOMResults.childNodes[0])}this.DOMResults.appendChild(t)},_RenderResponseItems:function(e){var t=document.createElement("ul"),n=document.createElement("li"),i=this._Limit();if(i<0){e=e.reverse()}else if(i===0){i=e.length}for(var r=0;r<Math.min(Math.abs(i),e.length);r++){n.innerHTML=e[r].Label;n.setAttribute("data-autocomplete-value",e[r].Value);t.appendChild(n);n=document.createElement("li")}return t},_RenderRaw:function(e){var t=document.createElement("ul"),n=document.createElement("li");if(e.length>0){this.DOMResults.innerHTML=e}else{var i=this._EmptyMessage();if(i!==""){n.innerHTML=i;n.setAttribute("class","locked");t.appendChild(n)}}return t},_Post:function(t){try{var e=[];var n=JSON.parse(t);if(Object.keys(n).length===0){return""}if(Array.isArray(n)){for(var i=0;i<Object.keys(n).length;i++){e[e.length]={Value:n[i],Label:this._Highlight(n[i])}}}else{for(var r in n){e.push({Value:r,Label:this._Highlight(n[r])})}}return e}catch(e){return t}},_Pre:function(){return this.Input.value},_Select:function(e){console.log("test test test");if(e.hasAttribute("data-autocomplete-value")){this.Input.value=e.getAttribute("data-autocomplete-value")}else{this.Input.value=e.innerHTML}this.Input.setAttribute("data-autocomplete-old-value",this.Input.value)},$AjaxTimer:null,$Cache:{},$Listeners:{}};t.exports=i},{}]},{},[1])(1)});
+/**
+*
+* Google Image Layout v0.0.1
+* Description, by Anh Trinh.
+* Heavily modified for searx
+* http://trinhtrunganh.com
+*
+* @license Free to use under the MIT License.
+*
+*/
+(function(u,c){"use strict";function e(e,t,n,i){this.container_selector=e;this.results_selector=t;this.img_selector=n;this.margin=10;this.maxHeight=i;this._alignAllDone=true}e.prototype._getHeigth=function(e,t){var n=0,i;t-=e.length*this.margin;for(var r=0;r<e.length;r++){i=e[r];if(i.naturalWidth>0&&i.naturalHeight>0){n+=i.naturalWidth/i.naturalHeight}else{n+=1}}return t/n};e.prototype._setSize=function(e,t){var n,i,r=e.length;for(var a=0;a<r;a++){n=e[a];if(n.naturalWidth>0&&n.naturalHeight>0){i=t*n.naturalWidth/n.naturalHeight}else{i=t}n.style.width=i+"px";n.style.height=t+"px";n.style.marginLeft="3px";n.style.marginTop="3px";n.style.marginRight=this.margin-7+"px";n.style.marginBottom=this.margin-7+"px"}};e.prototype._alignImgs=function(e){var t,n,i=c.querySelector(this.container_selector).clientWidth;e:while(e.length>0){for(var r=1;r<=e.length;r++){t=e.slice(0,r);n=this._getHeigth(t,i);if(n<this.maxHeight){this._setSize(t,n);e=e.slice(r);continue e}}this._setSize(t,Math.min(this.maxHeight,n));break}};e.prototype.align=function(e){var t=c.querySelectorAll(this.results_selector),n=t.length,i=null,r=null,a=[];for(var o=0;o<n;o++){r=t[o];if(r.previousElementSibling!==i&&a.length>0){this._alignImgs(a);a=[]}a.push(r.querySelector(this.img_selector));i=r}if(a.length>0){this._alignImgs(a)}};e.prototype.watch=function(){var e,t,n,i,r=this,a=c.querySelectorAll(this.results_selector),o=a.length;function s(e){r.align()}function l(e){if(r._alignAllDone){r._alignAllDone=false;setTimeout(function(){r.align();r._alignAllDone=true},100)}}u.addEventListener("resize",l);u.addEventListener("pageshow",s);for(e=0;e<o;e++){t=a[e].querySelector(this.img_selector);if(typeof t!=="undefined"){t.addEventListener("load",l);t.addEventListener("error",l)}}};u.searx.ImageLayout=e})(window,document);searx.ready(function(){searx.on(".result","click",function(){n(this)(true)});searx.on(".result a","focus",function(e){var t=e.target;while(t!==undefined){if(t.classList.contains("result")){if(t.getAttribute("data-vim-selected")===null){n(t)(true)}break}t=t.parentNode}},true);var d={27:{key:"Escape",fun:t,des:"remove focus from the focused input",cat:"Control"},73:{key:"i",fun:o,des:"focus on the search input",cat:"Control"},66:{key:"b",fun:r(-window.innerHeight),des:"scroll one page up",cat:"Navigation"},70:{key:"f",fun:r(window.innerHeight),des:"scroll one page down",cat:"Navigation"},85:{key:"u",fun:r(-window.innerHeight/2),des:"scroll half a page up",cat:"Navigation"},68:{key:"d",fun:r(window.innerHeight/2),des:"scroll half a page down",cat:"Navigation"},71:{key:"g",fun:a(-document.body.scrollHeight,"top"),des:"scroll to the top of the page",cat:"Navigation"},86:{key:"v",fun:a(document.body.scrollHeight,"bottom"),des:"scroll to the bottom of the page",cat:"Navigation"},75:{key:"k",fun:n("up"),des:"select previous search result",cat:"Results"},74:{key:"j",fun:n("down"),des:"select next search result",cat:"Results"},80:{key:"p",fun:i(0),des:"go to previous page",cat:"Results"},78:{key:"n",fun:i(1),des:"go to next page",cat:"Results"},79:{key:"o",fun:s(false),des:"open search result",cat:"Results"},84:{key:"t",fun:s(true),des:"open the result in a new tab",cat:"Results"},82:{key:"r",fun:e,des:"reload page from the server",cat:"Control"},72:{key:"h",fun:u,des:"toggle help window",cat:"Other"}};searx.on(document,"keydown",function(e){if(d.hasOwnProperty(e.keyCode)&&!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey){var t=e.target.tagName.toLowerCase();if(e.keyCode===27){if(t==="input"||t==="select"||t==="textarea"){d[e.keyCode].fun()}}else{if(e.target===document.body||t==="a"||t==="button"){e.preventDefault();d[e.keyCode].fun()}}}});function n(d){return function(e){var t=document.querySelector(".result[data-vim-selected]"),n=d;if(t===null){t=document.querySelector(".result");if(t===null){return}if(d==="down"||d==="up"){n=t}}var i,r=document.querySelectorAll(".result");if(typeof n!=="string"){i=n}else{switch(n){case"visible":var a=document.documentElement.scrollTop||document.body.scrollTop;var o=a+document.documentElement.clientHeight;for(var s=0;s<r.length;s++){i=r[s];var l=i.offsetTop;var u=l+i.clientHeight;if(u<=o&&l>a){break}}break;case"down":i=t.nextElementSibling;if(i===null){i=r[0]}break;case"up":i=t.previousElementSibling;if(i===null){i=r[r.length-1]}break;case"bottom":i=r[r.length-1];break;case"top":default:i=r[0]}}if(i){t.removeAttribute("data-vim-selected");i.setAttribute("data-vim-selected","true");var c=i.querySelector("h3 a")||i.querySelector("a");if(c!==null){c.focus()}if(!e){f()}}}}function e(){document.location.reload(true)}function t(){if(document.activeElement){document.activeElement.blur()}}function i(t){return function(){var e=$('div#pagination button[type="submit"]');if(e.length!==2){console.log("page navigation with this theme is not supported");return}if(t>=0&&t<e.length){e[t].click()}else{console.log("pageButtonClick(): invalid argument")}}}function f(){var e=document.querySelector(".result[data-vim-selected]");if(e===null){return}var t=document.documentElement.scrollTop||document.body.scrollTop,n=document.documentElement.clientHeight,i=e.offsetTop,r=i+e.clientHeight,a=120;if(e.previousElementSibling===null&&r<n){window.scroll(window.scrollX,0);return}if(t>i-a){window.scroll(window.scrollX,i-a)}else{var o=t+n;if(o<r+a){window.scroll(window.scrollX,r-n+a)}}}function r(e){return function(){window.scrollBy(0,e);n("visible")()}}function a(e,t){return function(){window.scrollTo(0,e);n(t)()}}function o(){window.scrollTo(0,0);document.querySelector("#q").focus()}function s(n){return function(){var e=document.querySelector(".result[data-vim-selected] h3 a");if(e!==null){var t=e.getAttribute("href");if(n){window.open(t)}else{window.location.href=t}}}}function l(e){var n={};for(var t in d){var i=d[t];n[i.cat]=n[i.cat]||[];n[i.cat].push(i)}var r=Object.keys(n).sort(function(e,t){return n[t].length-n[e].length});if(r.length===0){return}var a='<a href="#" class="close" aria-label="close" title="close">×</a>';a+="<h3>How to navigate searx with Vim-like hotkeys</h3>";a+="<table>";for(var o=0;o<r.length;o++){var s=n[r[o]];var l=o===r.length-1;var u=o%2===0;if(u){a+="<tr>"}a+="<td>";a+="<h4>"+s[0].cat+"</h4>";a+='<ul class="list-unstyled">';for(var c in s){a+="<li><kbd>"+s[c].key+"</kbd> "+s[c].des+"</li>"}a+="</ul>";a+="</td>";if(!u||l){a+="</tr>"}}a+="</table>";e.innerHTML=a}function u(){var e=document.querySelector("#vim-hotkeys-help");console.log(e);if(e===undefined||e===null){e=document.createElement("div");e.id="vim-hotkeys-help";e.className="dialog-modal";e.style="width: 40%";l(e);var t=document.getElementsByTagName("body")[0];t.appendChild(e)}else{e.classList.toggle("invisible");return}}});(function(e,c,v){"use strict";v.ready(function(){v.on(".searx_overpass_request","click",function(e){this.classList.remove("searx_overpass_request");var t="https://overpass-api.de/api/interpreter?data=";var n=t+"[out:json][timeout:25];(";var i=");out meta;";var r=this.dataset.osmId;var a=this.dataset.osmType;var o=c.querySelector("#"+this.dataset.resultTable);var s=c.querySelector("#"+this.dataset.resultTableLoadicon);var l=["addr:city","addr:country","addr:housenumber","addr:postcode","addr:street"];if(r&&a&&o){var u=null;switch(a){case"node":u=n+"node("+r+");"+i;break;case"way":u=n+"way("+r+");"+i;break;case"relation":u=n+"relation("+r+");"+i;break;default:break}if(u){v.http("GET",u).then(function(e,t){e=JSON.parse(e);if(e&&e.elements&&e.elements[0]){var n=e.elements[0];var i="";for(var r in n.tags){if(n.tags.name===null||l.indexOf(r)==-1){i+="<tr><td>"+r+"</td><td>";switch(r){case"phone":case"fax":i+='<a href="tel:'+n.tags[r].replace(/ /g,"")+'">'+n.tags[r]+"</a>";break;case"email":i+='<a href="mailto:'+n.tags[r]+'">'+n.tags[r]+"</a>";break;case"website":case"url":i+='<a href="'+n.tags[r]+'">'+n.tags[r]+"</a>";break;case"wikidata":i+='<a href="https://www.wikidata.org/wiki/'+n.tags[r]+'">'+n.tags[r]+"</a>";break;case"wikipedia":if(n.tags[r].indexOf(":")!=-1){i+='<a href="https://'+n.tags[r].substring(0,n.tags[r].indexOf(":"))+".wikipedia.org/wiki/"+n.tags[r].substring(n.tags[r].indexOf(":")+1)+'">'+n.tags[r]+"</a>";break}default:i+=n.tags[r];break}i+="</td></tr>"}}s.parentNode.removeChild(s);o.classList.remove("invisible");o.querySelector("tbody").innerHTML=i}}).catch(function(){s.classList.remove("invisible");s.innerHTML="could not load data!"})}}e.preventDefault()});v.on(".searx_init_map","click",function(e){this.classList.remove("searx_init_map");var d=this.dataset.leafletTarget;var f=parseFloat(this.dataset.mapLon);var p=parseFloat(this.dataset.mapLat);var h=parseFloat(this.dataset.mapZoom);var m=JSON.parse(this.dataset.mapBoundingbox);var g=JSON.parse(this.dataset.mapGeojson);v.loadStyle("leaflet/leaflet.css");v.loadScript("leaflet/leaflet.js",function(){var e=null;if(m){var t=L.latLng(m[0],m[2]);var n=L.latLng(m[1],m[3]);e=L.latLngBounds(t,n)}var i=L.map(d);var r="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";var a='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';var o=new L.TileLayer(r,{minZoom:1,maxZoom:19,attribution:a});var s="https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png";var l='Wikimedia maps beta | Maps data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';var u=new L.TileLayer(s,{minZoom:1,maxZoom:19,attribution:l});if(e){setTimeout(function(){i.fitBounds(e,{maxZoom:17})},0)}else if(f&&p){if(h){i.setView(new L.latLng(p,f),h)}else{i.setView(new L.latLng(p,f),8)}}i.addLayer(o);var c={"OSM Mapnik":o};L.control.layers(c).addTo(i);if(g){L.geoJson(g).addTo(i)}});e.preventDefault()})})})(window,document,window.searx);(function(e,o,t){"use strict";t.ready(function(){t.image_thumbnail_layout=new t.ImageLayout("#urls","#urls .result-images","img.image_thumbnail",200);t.image_thumbnail_layout.watch();t.on(".btn-collapse","click",function(e){var t=this.getAttribute("data-btn-text-collapsed");var n=this.getAttribute("data-btn-text-not-collapsed");var i=this.getAttribute("data-target");var r=o.querySelector(i);var a=this.innerHTML;if(this.classList.contains("collapsed")){a=a.replace(t,n)}else{a=a.replace(n,t)}this.innerHTML=a;this.classList.toggle("collapsed");r.classList.toggle("invisible")});t.on(".media-loader","click",function(e){var t=this.getAttribute("data-target");var n=o.querySelector(t+" > iframe");var i=n.getAttribute("src");if(i===null||i===undefined||i===false){n.setAttribute("src",n.getAttribute("data-src"))}});e.addEventListener("scroll",function(){var e=o.getElementById("backToTop"),t=document.documentElement.scrollTop||document.body.scrollTop;if(e!==null){if(t>=200){e.style.opacity=1}else{e.style.opacity=0}}})})})(window,document,window.searx);(function(t,i,n){"use strict";var r=true,a="q",o;function s(e){if(e.setSelectionRange){var t=e.value.length;e.setSelectionRange(t,t)}}function l(){if(o.value.length>0){var e=document.getElementById("search");setTimeout(e.submit.bind(e),0)}}function u(e){var t=document.getElementById("clear_search");var n=function(){if(e.value.length===0){t.classList.add("empty")}else{t.classList.remove("empty")}};n();t.addEventListener("click",function(){e.value="";e.focus();n()});e.addEventListener("keyup",n,false)}n.ready(function(){o=i.getElementById(a);function e(e){if(r){s(o);r=false}else{}}if(o!==null){u(o);if(n.autocompleter){n.autocomplete=AutoComplete.call(t,{Url:"./autocompleter",EmptyMessage:n.no_item_found,HttpMethod:n.method,MinChars:4,Delay:300},"#"+a);t.addEventListener("resize",function(){var e=new CustomEvent("position");o.dispatchEvent(e)})}o.addEventListener("focus",e,false);o.focus()}if(o!==null&&n.search_on_category_select){i.querySelector(".help").className="invisible";n.on("#categories input","change",function(e){var t,n=i.querySelectorAll('#categories input[type="checkbox"]');for(t=0;t<n.length;t++){if(n[t]!==this&&n[t].checked){n[t].click()}}if(!this.checked){this.click()}l();return false});n.on(i.getElementById("time_range"),"change",l);n.on(i.getElementById("language"),"change",l)}})})(window,document,window.searx);
+//# sourceMappingURL=searx.min.js.map \ No newline at end of file
diff --git a/searx/static/themes/simple/js/searx.min.js.map b/searx/static/themes/simple/js/searx.min.js.map
new file mode 100644
index 000000000..d7a1eeac8
--- /dev/null
+++ b/searx/static/themes/simple/js/searx.min.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["searx.js"],"names":["window","searx","w","d","Element","ElementPrototype","matches","matchesSelector","webkitMatchesSelector","msMatchesSelector","selector","node","this","nodes","parentNode","document","querySelectorAll","i","prototype","callbackSafe","callback","el","e","call","exception","console","log","on","obj","eventType","useCapture","addEventListener","target","srcElement","found","parentElement","ready","readyState","bind","http","method","url","req","XMLHttpRequest","resolve","reject","promise","then","catch","open","onload","status","response","responseType","Error","statusText","onerror","onabort","send","ex","loadStyle","src","path","static_path","id","replace","s","getElementById","createElement","setAttribute","body","appendChild","loadScript","hasAttribute","apply","insertBefore","newNode","referenceNode","element","insertAfter","nextSibling","classList","add","f","exports","module","define","amd","g","global","self","AutoComplete","t","n","r","o","u","a","require","code","l","length","1","ConditionOperator","EventType","params","Array","isArray","forEach","elements","input","specificParams","merge","defaults","DOMResults","create","Input","nodeName","match","getAttribute","_Position","$Listeners","blur","_Blur","destroy","focus","_Focus","keyup","event","KEYUP","keydown","KEYDOWN","position","getEventsByType","type","mappings","key","KeyboardMappings","Event","undefined","eventIdentifier","condition","mapping","Operator","AND","OR","Not","hasOwnProperty","Is","keyCode","From","To","name","Conditions","Callback","makeRequest","propertyHttpHeaders","Object","getOwnPropertyNames","HttpHeaders","request","_HttpMethod","_Url","queryParams","_Pre","queryParamsStringify","encodeURIComponent","_QueryArg","indexOf","setRequestHeader","onreadystatechange","$Cache","ajax","timeout","$AjaxTimer","clearTimeout","setTimeout","Delay","Request","abort","cache","_Cache","removeEventListener","removeChild","tmp","arguments","EmptyMessage","Highlight","getRegex","value","RegExp","transform","Content-type","Limit","MinChars","HttpMethod","QueryArg","Url","Enter","liActive","querySelector","preventDefault","_Select","KeyUpAndDown_down","KeyUpAndDown_up","first","last","active","currentIndex","children","lisCount","getElementsByTagName","remove","item","AlphaNum","oldValue","currentValue","_MinChars","_Render","_Post","_Open","_EmptyMessage","emptyMessage","_Limit","limit","isNaN","parseInt","minchars","_Highlight","label","now","li","onclick","onmouseenter","offsetTop","offsetHeight","offsetLeft","clientWidth","ul","_RenderRaw","_RenderResponseItems","hasChildNodes","childNodes","reverse","Math","min","abs","innerHTML","Label","Value","returnResponse","json","JSON","parse","keys","push","ImageLayout","container_selector","results_selector","img_selector","maxHeight","margin","_alignAllDone","_getHeigth","images","width","img","naturalWidth","naturalHeight","_setSize","height","imgWidth","imagesLength","style","marginLeft","marginTop","marginRight","marginBottom","_alignImgs","imgGroup","slice","h","containerWidth","align","results_selectorNode","results_length","previous","current","previousElementSibling","watch","imgNodeLength","results_nodes","throttleAlign","highlightResult","contains","vimKeys","27","fun","removeFocus","des","cat","73","searchInputFocus","66","scrollPage","innerHeight","70","85","68","71","scrollPageTo","scrollHeight","86","75","74","80","pageButtonClick","78","79","openResult","84","82","reloadPage","72","toggleHelp","ctrlKey","altKey","shiftKey","metaKey","tagName","toLowerCase","which","noScroll","effectiveWhich","next","results","top","documentElement","scrollTop","bot","clientHeight","etop","ebot","nextElementSibling","removeAttribute","link","scrollPageToSelected","location","reload","activeElement","num","buttons","$","click","sel","wtop","wheight","offset","scroll","scrollX","wbot","amount","scrollBy","nav","scrollTo","newTab","href","initHelpContent","divElement","categories","k","sorted","sort","b","html","lastCategory","cj","helpPanel","className","toggle","overpass_url","query_start","query_end","osm_id","dataset","osmId","osm_type","osmType","result_table","resultTable","result_table_loadicon","resultTableLoadicon","osm_ignore_tags","query","contentType","newHtml","row","tags","substring","leaflet_target","leafletTarget","map_lon","parseFloat","mapLon","map_lat","mapLat","map_zoom","mapZoom","map_boundingbox","mapBoundingbox","map_geojson","mapGeojson","map_bounds","southWest","L","latLng","northEast","latLngBounds","map","osmMapnikUrl","osmMapnikAttrib","osmMapnik","TileLayer","minZoom","maxZoom","attribution","osmWikimediaUrl","osmWikimediaAttrib","osmWikimedia","fitBounds","setView","addLayer","baseLayers","OSM Mapnik","control","layers","addTo","geoJson","image_thumbnail_layout","btnLabelCollapsed","btnLabelNotCollapsed","targetElement","iframe_load","srctest","opacity","firstFocus","qinput_id","qinput","placeCursorAtEnd","setSelectionRange","len","submitIfQuery","search","submit","createClearButton","cs","updateClearButton","placeCursorAtEndOnce","autocompleter","autocomplete","no_item_found","CustomEvent","dispatchEvent","search_on_category_select","checked"],"mappings":";;AAiBAA,OAAOC,MAAQ,SAAUC,EAAGC,GAE1B,aAMA,GAAID,EAAEE,QAAS,EACb,SAAUC,GACRA,EAAiBC,QAAUD,EAAiBC,SAC5CD,EAAiBE,iBACjBF,EAAiBG,uBACjBH,EAAiBI,mBACjB,SAASC,GACP,IAAIC,EAAOC,KAAMC,GAASF,EAAKG,YAAcH,EAAKI,UAAUC,iBAAiBN,GAAWO,GAAK,EAC7F,MAAOJ,IAAQI,IAAMJ,EAAMI,IAAMN,GACjC,QAASE,EAAMI,KARnB,CAUGb,QAAQc,WAGb,SAASC,EAAaC,EAAUC,EAAIC,GAClC,IACEF,EAASG,KAAKF,EAAIC,GAClB,MAAOE,GACPC,QAAQC,IAAIF,IAIhB,IAAIvB,EAAQD,OAAOC,OAAS,GAE5BA,EAAM0B,GAAK,SAASC,EAAKC,EAAWT,EAAUU,GAC5CA,EAAaA,GAAc,MAC3B,UAAWF,IAAQ,SAAU,CAE3BA,EAAIG,iBAAiBF,EAAWT,EAAUU,OACrC,CAEL3B,EAAE4B,iBAAiBF,EAAW,SAASP,GACrC,IAAID,EAAKC,EAAEU,QAAUV,EAAEW,WAAYC,EAAQ,MAC3C,MAAOb,GAAMA,EAAGf,SAAWe,IAAOlB,KAAO+B,EAAQb,EAAGf,QAAQsB,IAAOP,EAAKA,EAAGc,cAC3E,GAAID,EAAOf,EAAaC,EAAUC,EAAIC,IACrCQ,KAIP7B,EAAMmC,MAAQ,SAAShB,GACrB,GAAIL,SAASsB,YAAc,UAAW,CACpCjB,EAASG,KAAKrB,OACT,CACLA,EAAE6B,iBAAiB,mBAAoBX,EAASkB,KAAKpC,MAIzDD,EAAMsC,KAAO,SAASC,EAAQC,EAAKrB,GACjC,IAAIsB,EAAM,IAAIC,eACdC,EAAU,aACVC,EAAS,aACTC,EAAU,CACRC,KAAM,SAAS3B,GAAYwB,EAAUxB,EAAU,OAAO0B,GACtDE,MAAO,SAAS5B,GAAYyB,EAASzB,EAAU,OAAO0B,IAGxD,IACEJ,EAAIO,KAAKT,EAAQC,EAAK,MAGtBC,EAAIQ,OAAS,WACX,GAAIR,EAAIS,QAAU,IAAK,CACrBP,EAAQF,EAAIU,SAAUV,EAAIW,kBACrB,CACLR,EAAOS,MAAMZ,EAAIa,eAKrBb,EAAIc,QAAU,WACZX,EAAOS,MAAM,mBAGfZ,EAAIe,QAAU,WACZZ,EAAOS,MAAM,4BAIfZ,EAAIgB,OACJ,MAAOC,GACPd,EAAOc,GAGT,OAAOb,GAGT7C,EAAM2D,UAAY,SAASC,GACzB,IAAIC,EAAO7D,EAAM8D,YAAcF,EAC/BG,EAAK,SAAWH,EAAII,QAAQ,IAAK,KACjCC,EAAI/D,EAAEgE,eAAeH,GACrB,GAAIE,IAAM,KAAM,CACdA,EAAI/D,EAAEiE,cAAc,QACpBF,EAAEG,aAAa,KAAML,GACrBE,EAAEG,aAAa,MAAO,cACtBH,EAAEG,aAAa,OAAQ,YACvBH,EAAEG,aAAa,OAAQP,GACvB3D,EAAEmE,KAAKC,YAAYL,KAIvBjE,EAAMuE,WAAa,SAASX,EAAKzC,GAC/B,IAAI0C,EAAO7D,EAAM8D,YAAcF,EAC/BG,EAAK,UAAYH,EAAII,QAAQ,IAAK,KAClCC,EAAI/D,EAAEgE,eAAeH,GACrB,GAAIE,IAAM,KAAM,CACdA,EAAI/D,EAAEiE,cAAc,UACpBF,EAAEG,aAAa,KAAML,GACrBE,EAAEG,aAAa,MAAOP,GACtBI,EAAEhB,OAAS9B,EACX8C,EAAEV,QAAU,WACVU,EAAEG,aAAa,QAAS,MAE1BlE,EAAEmE,KAAKC,YAAYL,QACd,IAAKA,EAAEO,aAAa,SAAU,CACnC,IACErD,EAASsD,MAAMR,EAAG,IAClB,MAAO1C,GACPC,QAAQC,IAAIF,QAET,CACLC,QAAQC,IAAI,mCAAqCoC,EAAO,mBAI5D7D,EAAM0E,aAAe,SAAUC,EAASC,GACtCC,QAAQhE,WAAW6D,aAAaC,EAASC,IAG3C5E,EAAM8E,YAAc,SAASH,EAASC,GACpCA,EAAc/D,WAAW6D,aAAaC,EAASC,EAAcG,cAG/D/E,EAAM0B,GAAG,SAAU,QAAS,SAASL,GACnC,IAAID,EAAKC,EAAEU,QAAUV,EAAEW,WACvBrB,KAAKE,WAAWmE,UAAUC,IAAI,eAGhC,OAAOjF,EAjJM,CAkJZD,OAAQe,WACV,SAAUoE,GAAG,UAAUC,UAAU,iBAAiBC,SAAS,YAAY,CAACA,OAAOD,QAAQD,SAAS,UAAUG,SAAS,YAAYA,OAAOC,IAAI,CAACD,OAAO,GAAGH,OAAO,CAAC,IAAIK,EAAE,UAAUxF,SAAS,YAAY,CAACwF,EAAExF,YAAY,UAAUyF,SAAS,YAAY,CAACD,EAAEC,YAAY,UAAUC,OAAO,YAAY,CAACF,EAAEE,SAAS,CAACF,EAAE5E,KAAK4E,EAAEG,aAAeR,MAAjU,CAAwU,WAAW,IAAIG,EAAOD,EAAOD,EAAQ,OAAO,SAAU9D,EAAEsE,EAAEC,EAAEC,GAAG,SAAS5B,EAAE6B,EAAEC,GAAG,IAAIH,EAAEE,GAAG,CAAC,IAAIH,EAAEG,GAAG,CAAC,IAAIE,SAASC,SAAS,YAAYA,QAAQ,IAAIF,GAAGC,EAAE,OAAOA,EAAEF,GAAG,GAAG,GAAG9E,EAAE,OAAOA,EAAE8E,GAAG,GAAG,IAAIZ,EAAE,IAAI7B,MAAM,uBAAuByC,EAAE,KAAK,MAAMZ,EAAEgB,KAAK,mBAAmBhB,EAAE,IAAIiB,EAAEP,EAAEE,GAAG,CAACX,QAAQ,IAAIQ,EAAEG,GAAG,GAAGxE,KAAK6E,EAAEhB,QAAQ,SAAS9D,GAAG,IAAIuE,EAAED,EAAEG,GAAG,GAAGzE,GAAG,OAAO4C,EAAE2B,EAAEA,EAAEvE,IAAI8E,EAAEA,EAAEhB,QAAQ9D,EAAEsE,EAAEC,EAAEC,GAAG,OAAOD,EAAEE,GAAGX,QAAQ,IAAInE,SAASiF,SAAS,YAAYA,QAAQ,IAAI,IAAIH,EAAE,EAAEA,EAAED,EAAEO,OAAON,IAAI7B,EAAE4B,EAAEC,IAAI,OAAO7B,EAAvb,CAA2b,CAACoC,EAAE,CAAC,SAASJ,EAAQb,EAAOD;;;;;;;;;;AAU50B,aACA,IAAImB,GACJ,SAAWA,GACPA,EAAkBA,EAAkB,OAAS,GAAK,MAClDA,EAAkBA,EAAkB,MAAQ,GAAK,MAFrD,CAGGA,IAAsBA,EAAoB,KAC7C,IAAIC,GACJ,SAAWA,GACPA,EAAUA,EAAU,WAAa,GAAK,UACtCA,EAAUA,EAAU,SAAW,GAAK,SAFxC,CAGGA,IAAcA,EAAY,KAO7B,IAAIb,EAAgB,WAEhB,SAASA,EAAac,EAAQ/F,GAC1B,GAAI+F,SAAgB,EAAG,CAAEA,EAAS,GAClC,GAAI/F,SAAkB,EAAG,CAAEA,EAAW,sBACtC,GAAIgG,MAAMC,QAAQjG,GAAW,CACzBA,EAASkG,QAAQ,SAAU1C,GACvB,IAAIyB,EAAac,EAAQvC,UAG5B,UAAWxD,GAAY,SAAU,CAClC,IAAImG,EAAW9F,SAASC,iBAAiBN,GACzCgG,MAAMxF,UAAU0F,QAAQrF,KAAKsF,EAAU,SAAUC,GAC7C,IAAInB,EAAac,EAAQK,SAG5B,CACD,IAAIC,EAAiBpB,EAAaqB,MAAMrB,EAAasB,SAAUR,EAAQ,CACnES,WAAYnG,SAASqD,cAAc,SAEvCuB,EAAazE,UAAUiG,OAAOJ,EAAgBrG,GAC9C,OAAOqG,GAGfpB,EAAazE,UAAUiG,OAAS,SAAUV,EAAQ3B,GAC9C2B,EAAOW,MAAQtC,EACf,GAAI2B,EAAOW,MAAMC,SAASC,MAAM,cAAgBb,EAAOW,MAAM3C,aAAa,UAAY,OAASgC,EAAOW,MAAMG,aAAa,QAAQD,MAAM,mBAAoB,CACvJb,EAAOW,MAAM/C,aAAa,eAAgB,OAC1CoC,EAAOe,UAAUf,GACjBA,EAAOW,MAAMtG,WAAWyD,YAAYkC,EAAOS,YAC3CT,EAAOgB,WAAa,CAChBC,KAAMjB,EAAOkB,MAAMrF,KAAKmE,GACxBmB,QAASjC,EAAazE,UAAU0G,QAAQtF,KAAK,KAAMmE,GACnDoB,MAAOpB,EAAOqB,OAAOxF,KAAKmE,GAC1BsB,MAAOpC,EAAazE,UAAU8G,MAAM1F,KAAK,KAAMmE,EAAQD,EAAUyB,OACjEC,QAASvC,EAAazE,UAAU8G,MAAM1F,KAAK,KAAMmE,EAAQD,EAAU2B,SACnEC,SAAU3B,EAAOe,UAAUlF,KAAKmE,IAEpC,IAAK,IAAIuB,KAASvB,EAAOgB,WAAY,CACjChB,EAAOW,MAAMrF,iBAAiBiG,EAAOvB,EAAOgB,WAAWO,OAInErC,EAAazE,UAAUmH,gBAAkB,SAAU5B,EAAQ6B,GACvD,IAAIC,EAAW,GACf,IAAK,IAAIC,KAAO/B,EAAOgC,iBAAkB,CACrC,IAAIT,EAAQxB,EAAUyB,MACtB,GAAIxB,EAAOgC,iBAAiBD,GAAKE,QAAUC,UAAW,CAClDX,EAAQvB,EAAOgC,iBAAiBD,GAAKE,MAEzC,GAAIV,GAASM,EAAM,CACfC,EAASC,GAAO/B,EAAOgC,iBAAiBD,IAGhD,OAAOD,GAEX5C,EAAazE,UAAU8G,MAAQ,SAAUvB,EAAQ6B,EAAMN,GACnD,IAAIY,EAAkB,SAAUC,GAC5B,GAAKvB,IAAU,MAAQwB,EAAQC,UAAYxC,EAAkByC,KAAS1B,IAAU,OAASwB,EAAQC,UAAYxC,EAAkB0C,GAAK,CAChIJ,EAAYlD,EAAaqB,MAAM,CAC3BkC,IAAK,OACNL,GACH,GAAIA,EAAUM,eAAe,MAAO,CAChC,GAAIN,EAAUO,IAAMpB,EAAMqB,QAAS,CAC/B/B,GAASuB,EAAUK,QAElB,CACD5B,EAAQuB,EAAUK,UAGrB,GAAIL,EAAUM,eAAe,SAAWN,EAAUM,eAAe,MAAO,CACzE,GAAInB,EAAMqB,SAAWR,EAAUS,MAAQtB,EAAMqB,SAAWR,EAAUU,GAAI,CAClEjC,GAASuB,EAAUK,QAElB,CACD5B,EAAQuB,EAAUK,QAKlC,IAAK,IAAIM,KAAQ7D,EAAazE,UAAUmH,gBAAgB5B,EAAQ6B,GAAO,CACnE,IAAIQ,EAAUnD,EAAaqB,MAAM,CAC7B+B,SAAUxC,EAAkByC,KAC7BvC,EAAOgC,iBAAiBe,IAAQlC,EAAQf,EAAkByC,KAAOF,EAAQC,SAC5ED,EAAQW,WAAW7C,QAAQgC,GAC3B,GAAItB,IAAU,KAAM,CAChBwB,EAAQY,SAASnI,KAAKkF,EAAQuB,MAI1CrC,EAAazE,UAAUyI,YAAc,SAAUlD,EAAQrF,GACnD,IAAIwI,EAAsBC,OAAOC,oBAAoBrD,EAAOsD,aAAcC,EAAU,IAAIrH,eAAkBH,EAASiE,EAAOwD,cAAexH,EAAMgE,EAAOyD,OAAQC,EAAc1D,EAAO2D,OAAQC,EAAuBC,mBAAmB7D,EAAO8D,aAAe,IAAMD,mBAAmBH,GACpR,GAAI3H,EAAO8E,MAAM,UAAW,CACxB,GAAI7E,EAAI+H,QAAQ,QAAU,EAAG,CACzB/H,GAAO,IAAM4H,MAEZ,CACD5H,GAAO,IAAM4H,GAGrBL,EAAQ/G,KAAKT,EAAQC,EAAK,MAC1B,IAAK,IAAIxB,EAAI2I,EAAoBvD,OAAS,EAAGpF,GAAK,EAAGA,IAAK,CACtD+I,EAAQS,iBAAiBb,EAAoB3I,GAAIwF,EAAOsD,YAAYH,EAAoB3I,KAE5F+I,EAAQU,mBAAqB,WACzB,GAAIV,EAAQ3H,YAAc,GAAK2H,EAAQ7G,QAAU,IAAK,CAClDsD,EAAOkE,OAAOR,GAAeH,EAAQ5G,SACrChC,EAAS4I,EAAQ5G,YAGzB,OAAO4G,GAEXrE,EAAazE,UAAU0J,KAAO,SAAUnE,EAAQuD,EAASa,GACrD,GAAIA,SAAiB,EAAG,CAAEA,EAAU,KACpC,GAAIpE,EAAOqE,WAAY,CACnB9K,OAAO+K,aAAatE,EAAOqE,YAE/B,GAAID,IAAY,KAAM,CAClBpE,EAAOqE,WAAa9K,OAAOgL,WAAWrF,EAAazE,UAAU0J,KAAKtI,KAAK,KAAMmE,EAAQuD,EAAS,OAAQvD,EAAOwE,WAE5G,CACD,GAAIxE,EAAOyE,QAAS,CAChBzE,EAAOyE,QAAQC,QAEnB1E,EAAOyE,QAAUlB,EACjBvD,EAAOyE,QAAQxH,KAAK+C,EAAO8D,YAAc,IAAM9D,EAAO2D,UAG9DzE,EAAazE,UAAUkK,MAAQ,SAAU3E,EAAQrF,GAC7C,IAAIgC,EAAWqD,EAAO4E,OAAO5E,EAAO2D,QACpC,GAAIhH,IAAauF,UAAW,CACxB,IAAIqB,EAAUrE,EAAazE,UAAUyI,YAAYlD,EAAQrF,GACzDuE,EAAazE,UAAU0J,KAAKnE,EAAQuD,OAEnC,CACD5I,EAASgC,KAGjBuC,EAAazE,UAAU0G,QAAU,SAAUnB,GACvC,IAAK,IAAIuB,KAASvB,EAAOgB,WAAY,CACjChB,EAAOW,MAAMkE,oBAAoBtD,EAAOvB,EAAOgB,WAAWO,IAE9DvB,EAAOS,WAAWpG,WAAWyK,YAAY9E,EAAOS,aAEpD,OAAOvB,EAhJQ,GAkJnBA,EAAaqB,MAAQ,WACjB,IAAIA,EAAQ,GAAIwE,EAChB,IAAK,IAAIvK,EAAI,EAAGA,EAAIwK,UAAUpF,OAAQpF,IAAK,CACvC,IAAKuK,KAAOC,UAAUxK,GAAI,CACtB+F,EAAMwE,GAAOC,UAAUxK,GAAGuK,IAGlC,OAAOxE,GAEXrB,EAAasB,SAAW,CACpBgE,MAAO,IACPS,aAAc,iBACdC,UAAW,CACPC,SAAU,SAAUC,GAChB,OAAO,IAAIC,OAAOD,EAAO,OAE7BE,UAAW,SAAUF,GACjB,MAAO,WAAaA,EAAQ,cAGpC9B,YAAa,CACTiC,eAAgB,qCAEpBC,MAAO,EACPC,SAAU,EACVC,WAAY,MACZC,SAAU,IACVC,IAAK,KACL5D,iBAAkB,CACd6D,MAAS,CACL7C,WAAY,CAAC,CACLL,GAAI,GACJF,IAAK,QAEbQ,SAAU,SAAU1B,GAChB,GAAIpH,KAAKsG,WAAWK,aAAa,SAASiD,QAAQ,UAAY,EAAG,CAC7D,IAAI+B,EAAW3L,KAAKsG,WAAWsF,cAAc,aAC7C,GAAID,IAAa,KAAM,CACnBvE,EAAMyE,iBACN7L,KAAK8L,QAAQH,GACb3L,KAAKsG,WAAW7C,aAAa,QAAS,mBAIlD0E,SAAUxC,EAAkByC,IAC5BN,MAAOlC,EAAU2B,SAErBwE,kBAAqB,CACjBlD,WAAY,CAAC,CACLL,GAAI,GACJF,IAAK,OAET,CACIE,GAAI,GACJF,IAAK,QAEbQ,SAAU,SAAU1B,GAChBA,EAAMyE,kBAEV1D,SAAUxC,EAAkB0C,GAC5BP,MAAOlC,EAAU2B,SAErByE,gBAAmB,CACfnD,WAAY,CAAC,CACLL,GAAI,GACJF,IAAK,OAET,CACIE,GAAI,GACJF,IAAK,QAEbQ,SAAU,SAAU1B,GAChBA,EAAMyE,iBACN,IAAII,EAAQjM,KAAKsG,WAAWsF,cAAc,+BAAgCM,EAAOlM,KAAKsG,WAAWsF,cAAc,8BAA+BO,EAASnM,KAAKsG,WAAWsF,cAAc,aACrL,GAAIO,EAAQ,CACR,IAAIC,EAAetG,MAAMxF,UAAUsJ,QAAQjJ,KAAKwL,EAAOjM,WAAWmM,SAAUF,GAAS3E,EAAW4E,GAAgBhF,EAAMqB,QAAU,IAAK6D,EAAWtM,KAAKsG,WAAWiG,qBAAqB,MAAM9G,OAC3L,GAAI+B,EAAW,EAAG,CACdA,EAAW8E,EAAW,OAErB,GAAI9E,GAAY8E,EAAU,CAC3B9E,EAAW,EAEf2E,EAAO9H,UAAUmI,OAAO,UACxBL,EAAO5K,cAAc8K,SAASI,KAAKjF,GAAUnD,UAAUC,IAAI,eAE1D,GAAI4H,GAAQ9E,EAAMqB,SAAW,GAAI,CAClCyD,EAAK7H,UAAUC,IAAI,eAElB,GAAI2H,EAAO,CACZA,EAAM5H,UAAUC,IAAI,YAG5B6D,SAAUxC,EAAkB0C,GAC5BP,MAAOlC,EAAUyB,OAErBqF,SAAY,CACR7D,WAAY,CAAC,CACLL,GAAI,GACJF,IAAK,MACN,CACCI,KAAM,GACNC,GAAI,GACJL,IAAK,OAEbQ,SAAU,WACN,IAAI6D,EAAW3M,KAAKwG,MAAMG,aAAa,+BAAgCiG,EAAe5M,KAAKwJ,OAC3F,GAAIoD,IAAiB,IAAMA,EAAanH,QAAUzF,KAAK6M,YAAa,CAChE,IAAKF,GAAYC,GAAgBD,EAAU,CACvC3M,KAAKsG,WAAW7C,aAAa,QAAS,qBAE1CsB,EAAazE,UAAUkK,MAAMxK,KAAM,SAAUwC,GACzCxC,KAAK8M,QAAQ9M,KAAK+M,MAAMvK,IACxBxC,KAAKgN,SACPtL,KAAK1B,SAGfmI,SAAUxC,EAAkByC,IAC5BN,MAAOlC,EAAUyB,QAGzBf,WAAY,KACZgE,QAAS,KACT9D,MAAO,KAIPyG,cAAe,WACX,IAAIC,EAAe,GACnB,GAAIlN,KAAKwG,MAAM3C,aAAa,mCAAoC,CAC5DqJ,EAAelN,KAAKwG,MAAMG,aAAa,wCAEtC,GAAI3G,KAAK8K,eAAiB,MAAO,CAClCoC,EAAelN,KAAK8K,iBAEnB,CACDoC,EAAe,GAEnB,OAAOA,GAKXC,OAAQ,WACJ,IAAIC,EAAQpN,KAAKwG,MAAMG,aAAa,2BACpC,GAAI0G,MAAMD,IAAUA,IAAU,KAAM,CAChC,OAAOpN,KAAKqL,MAEhB,OAAOiC,SAASF,EAAO,KAK3BP,UAAW,WACP,IAAIU,EAAWvN,KAAKwG,MAAMG,aAAa,8BACvC,GAAI0G,MAAME,IAAaA,IAAa,KAAM,CACtC,OAAOvN,KAAKsL,SAEhB,OAAOgC,SAASC,EAAU,KAK9BC,WAAY,SAAUC,GAClB,OAAOA,EAAMpK,QAAQrD,KAAK+K,UAAUC,SAAShL,KAAKwJ,QAASxJ,KAAK+K,UAAUI,YAK9E9B,YAAa,WACT,GAAIrJ,KAAKwG,MAAM3C,aAAa,4BAA6B,CACrD,OAAO7D,KAAKwG,MAAMG,aAAa,4BAEnC,OAAO3G,KAAKuL,YAKhB5B,UAAW,WACP,GAAI3J,KAAKwG,MAAM3C,aAAa,gCAAiC,CACzD,OAAO7D,KAAKwG,MAAMG,aAAa,gCAEnC,OAAO3G,KAAKwL,UAKhBlC,KAAM,WACF,GAAItJ,KAAKwG,MAAM3C,aAAa,qBAAsB,CAC9C,OAAO7D,KAAKwG,MAAMG,aAAa,qBAEnC,OAAO3G,KAAKyL,KAKhB1E,MAAO,SAAU2G,GACb,GAAIA,IAAQ,KAAM,CACd1N,KAAKsG,WAAW7C,aAAa,QAAS,gBACtCzD,KAAKwG,MAAM/C,aAAa,8BAA+BzD,KAAKwG,MAAMyE,WAEjE,CACD,IAAIpF,EAAS7F,KACboK,WAAW,WACPvE,EAAOkB,MAAM,OACd,OAMX0D,OAAQ,SAAUQ,GACd,OAAOjL,KAAK+J,OAAOkB,IAKvB/D,OAAQ,WACJ,IAAIyF,EAAW3M,KAAKwG,MAAMG,aAAa,+BACvC,KAAMgG,GAAY3M,KAAKwG,MAAMyE,OAAS0B,IAAa3M,KAAK6M,aAAe7M,KAAKwG,MAAMyE,MAAMxF,OAAQ,CAC5FzF,KAAKsG,WAAW7C,aAAa,QAAS,uBAM9CuJ,MAAO,WACH,IAAInH,EAAS7F,KACb8F,MAAMxF,UAAU0F,QAAQrF,KAAKX,KAAKsG,WAAWiG,qBAAqB,MAAO,SAAUoB,GAC/E,GAAIA,EAAGhH,aAAa,UAAY,SAAU,CACxCgH,EAAGC,QAAU,SAAUxG,GACjBvB,EAAOiG,QAAQ6B,IAEnBA,EAAGE,aAAe,WACd,IAAI1B,EAAStG,EAAOS,WAAWsF,cAAc,aAC7C,GAAIO,IAAWwB,EAAI,CACf,GAAIxB,IAAW,KAAM,CACjBA,EAAO9H,UAAUmI,OAAO,UAE5BmB,EAAGtJ,UAAUC,IAAI,gBASrCsC,UAAW,WACP5G,KAAKsG,WAAW7C,aAAa,QAAS,gBACtCzD,KAAKsG,WAAW7C,aAAa,QAAS,QAAUzD,KAAKwG,MAAMsH,UAAY9N,KAAKwG,MAAMuH,cAAgB,WAAa/N,KAAKwG,MAAMwH,WAAa,YAAchO,KAAKwG,MAAMyH,YAAc,QAKlLnB,QAAS,SAAUtK,GACf,IAAI0L,EACJ,UAAW1L,GAAY,SAAU,CAC7B0L,EAAKlO,KAAKmO,WAAW3L,OAEpB,CACD0L,EAAKlO,KAAKoO,qBAAqB5L,GAEnC,GAAIxC,KAAKsG,WAAW+H,gBAAiB,CACjCrO,KAAKsG,WAAWqE,YAAY3K,KAAKsG,WAAWgI,WAAW,IAE3DtO,KAAKsG,WAAW3C,YAAYuK,IAKhCE,qBAAsB,SAAU5L,GAC5B,IAAI0L,EAAK/N,SAASqD,cAAc,MAAOmK,EAAKxN,SAASqD,cAAc,MAAO4J,EAAQpN,KAAKmN,SAEvF,GAAIC,EAAQ,EAAG,CACX5K,EAAWA,EAAS+L,eAEnB,GAAInB,IAAU,EAAG,CAClBA,EAAQ5K,EAASiD,OAErB,IAAK,IAAIgH,EAAO,EAAGA,EAAO+B,KAAKC,IAAID,KAAKE,IAAItB,GAAQ5K,EAASiD,QAASgH,IAAQ,CAC1EkB,EAAGgB,UAAYnM,EAASiK,GAAMmC,MAC9BjB,EAAGlK,aAAa,0BAA2BjB,EAASiK,GAAMoC,OAC1DX,EAAGvK,YAAYgK,GACfA,EAAKxN,SAASqD,cAAc,MAEhC,OAAO0K,GAKXC,WAAY,SAAU3L,GAClB,IAAI0L,EAAK/N,SAASqD,cAAc,MAAOmK,EAAKxN,SAASqD,cAAc,MACnE,GAAIhB,EAASiD,OAAS,EAAG,CACrBzF,KAAKsG,WAAWqI,UAAYnM,MAE3B,CACD,IAAI0K,EAAelN,KAAKiN,gBACxB,GAAIC,IAAiB,GAAI,CACrBS,EAAGgB,UAAYzB,EACfS,EAAGlK,aAAa,QAAS,UACzByK,EAAGvK,YAAYgK,IAGvB,OAAOO,GAKXnB,MAAO,SAAUvK,GACb,IACI,IAAIsM,EAAiB,GAErB,IAAIC,EAAOC,KAAKC,MAAMzM,GACtB,GAAIyG,OAAOiG,KAAKH,GAAMtJ,SAAW,EAAG,CAChC,MAAO,GAEX,GAAIK,MAAMC,QAAQgJ,GAAO,CACrB,IAAK,IAAI1O,EAAI,EAAGA,EAAI4I,OAAOiG,KAAKH,GAAMtJ,OAAQpF,IAAK,CAC/CyO,EAAeA,EAAerJ,QAAU,CAAEoJ,MAASE,EAAK1O,GAAIuO,MAAS5O,KAAKwN,WAAWuB,EAAK1O,UAG7F,CACD,IAAK,IAAI4K,KAAS8D,EAAM,CACpBD,EAAeK,KAAK,CAChBN,MAAS5D,EACT2D,MAAS5O,KAAKwN,WAAWuB,EAAK9D,OAI1C,OAAO6D,EAEX,MAAO1H,GAEH,OAAO5E,IAMfgH,KAAM,WACF,OAAOxJ,KAAKwG,MAAMyE,OAKtBa,QAAS,SAAUW,GACtB5L,QAAQC,IAAI,kBACL,GAAI2L,EAAK5I,aAAa,2BAA4B,CAC9C7D,KAAKwG,MAAMyE,MAAQwB,EAAK9F,aAAa,+BAEpC,CACD3G,KAAKwG,MAAMyE,MAAQwB,EAAKkC,UAE5B3O,KAAKwG,MAAM/C,aAAa,8BAA+BzD,KAAKwG,MAAMyE,QAEtEf,WAAY,KACZH,OAAQ,GACRlD,WAAY,IAEhBpC,EAAOD,QAAUO,GAEf,KAAK,GAAG,CAAC,GAthB0W,CAshBtW;;;;;;;;;;;CAYf,SAAUzF,EAAGC,GACX,aAEA,SAAS6P,EAAYC,EAAoBC,EAAkBC,EAAcC,GACvExP,KAAKqP,mBAAqBA,EAC1BrP,KAAKsP,iBAAmBA,EACxBtP,KAAKuP,aAAeA,EACpBvP,KAAKyP,OAAS,GACdzP,KAAKwP,UAAYA,EACjBxP,KAAK0P,cAAgB,KAcvBN,EAAY9O,UAAUqP,WAAa,SAASC,EAAQC,GAClD,IAAI3K,EAAI,EACR4K,EAEAD,GAASD,EAAOnK,OAASzF,KAAKyP,OAC9B,IAAK,IAAIpP,EAAI,EAAGA,EAAIuP,EAAOnK,OAAQpF,IAAK,CACtCyP,EAAMF,EAAOvP,GACb,GAAKyP,EAAIC,aAAe,GAAOD,EAAIE,cAAgB,EAAI,CACrD9K,GAAK4K,EAAIC,aAAeD,EAAIE,kBACvB,CAEL9K,GAAK,GAIT,OAAO2K,EAAQ3K,GAGjBkK,EAAY9O,UAAU2P,SAAW,SAASL,EAAQM,GAChD,IAAIJ,EAAKK,EAAUC,EAAeR,EAAOnK,OACzC,IAAK,IAAIpF,EAAI,EAAGA,EAAI+P,EAAc/P,IAAK,CACrCyP,EAAMF,EAAOvP,GACb,GAAKyP,EAAIC,aAAe,GAAOD,EAAIE,cAAgB,EAAI,CACrDG,EAAWD,EAASJ,EAAIC,aAAeD,EAAIE,kBACtC,CAELG,EAAWD,EAEbJ,EAAIO,MAAMR,MAAQM,EAAW,KAC7BL,EAAIO,MAAMH,OAASA,EAAS,KAC5BJ,EAAIO,MAAMC,WAAa,MACvBR,EAAIO,MAAME,UAAY,MACtBT,EAAIO,MAAMG,YAAcxQ,KAAKyP,OAAS,EAAI,KAC1CK,EAAIO,MAAMI,aAAezQ,KAAKyP,OAAS,EAAI,OAI/CL,EAAY9O,UAAUoQ,WAAa,SAASC,GAC1C,IAAIC,EAAOC,EACXC,EAAiBvR,EAAEqM,cAAc5L,KAAKqP,oBAAoBpB,YAE1D3O,EAAG,MAAOqR,EAASlL,OAAS,EAAG,CAC7B,IAAK,IAAIpF,EAAI,EAAGA,GAAKsQ,EAASlL,OAAQpF,IAAK,CACzCuQ,EAAQD,EAASC,MAAM,EAAGvQ,GAC1BwQ,EAAI7Q,KAAK2P,WAAWiB,EAAOE,GAC3B,GAAID,EAAI7Q,KAAKwP,UAAW,CACtBxP,KAAKiQ,SAASW,EAAOC,GACrBF,EAAWA,EAASC,MAAMvQ,GAC1B,SAASf,GAGbU,KAAKiQ,SAASW,EAAOpC,KAAKC,IAAIzO,KAAKwP,UAAWqB,IAC9C,QAIJzB,EAAY9O,UAAUyQ,MAAQ,SAASzB,GACrC,IAAI0B,EAAuBzR,EAAEa,iBAAiBJ,KAAKsP,kBACnD2B,EAAiBD,EAAqBvL,OACtCyL,EAAW,KACXC,EAAU,KACVR,EAAW,GACX,IAAK,IAAItQ,EAAI,EAAGA,EAAI4Q,EAAgB5Q,IAAK,CACvC8Q,EAAUH,EAAqB3Q,GAC/B,GAAI8Q,EAAQC,yBAA2BF,GAAYP,EAASlL,OAAS,EAAG,CAItEzF,KAAK0Q,WAAWC,GAEhBA,EAAW,GAGbA,EAASxB,KAAKgC,EAAQvF,cAAc5L,KAAKuP,eAEzC2B,EAAWC,EAGb,GAAIR,EAASlL,OAAS,EAAG,CACvBzF,KAAK0Q,WAAWC,KAIpBvB,EAAY9O,UAAU+Q,MAAQ,WAC5B,IAAIhR,EAAGyP,EAAKa,EAAUW,EACtBtQ,EAAMhB,KACNuR,EAAgBhS,EAAEa,iBAAiBJ,KAAKsP,kBACxC2B,EAAiBM,EAAc9L,OAE/B,SAASsL,EAAMrQ,GACbM,EAAI+P,QAGN,SAASS,EAAc9Q,GACrB,GAAIM,EAAI0O,cAAe,CACrB1O,EAAI0O,cAAgB,MACpBtF,WAAW,WACTpJ,EAAI+P,QACJ/P,EAAI0O,cAAgB,MACnB,MAIPpQ,EAAE6B,iBAAiB,SAAUqQ,GAC7BlS,EAAE6B,iBAAiB,WAAY4P,GAE/B,IAAK1Q,EAAI,EAAGA,EAAI4Q,EAAgB5Q,IAAK,CACnCyP,EAAMyB,EAAclR,GAAGuL,cAAc5L,KAAKuP,cAC1C,UAAWO,IAAQ,YAAa,CAC9BA,EAAI3O,iBAAiB,OAAQqQ,GAC7B1B,EAAI3O,iBAAiB,QAASqQ,MAKpClS,EAAED,MAAM+P,YAAcA,GA1IxB,CA4IGhQ,OAAQe,UACVd,MAAMmC,MAAM,WAEXnC,MAAM0B,GAAG,UAAW,QAAS,WAC3B0Q,EAAgBzR,KAAhByR,CAAsB,QAGxBpS,MAAM0B,GAAG,YAAa,QAAS,SAASL,GACtC,IAAID,EAAKC,EAAEU,OACX,MAAOX,IAAOsH,UAAW,CACvB,GAAItH,EAAG4D,UAAUqN,SAAS,UAAW,CACnC,GAAIjR,EAAGkG,aAAa,uBAAyB,KAAM,CACjD8K,EAAgBhR,EAAhBgR,CAAoB,MAEtB,MAEFhR,EAAKA,EAAGP,aAET,MAEH,IAAIyR,EAAU,CACZC,GAAI,CACFhK,IAAK,SACLiK,IAAKC,EACLC,IAAK,sCACLC,IAAK,WAEPC,GAAI,CACFrK,IAAK,IACLiK,IAAKK,EACLH,IAAK,4BACLC,IAAK,WAEPG,GAAI,CACFvK,IAAK,IACLiK,IAAKO,GAAYhT,OAAOiT,aACxBN,IAAK,qBACLC,IAAK,cAEPM,GAAI,CACF1K,IAAK,IACLiK,IAAKO,EAAWhT,OAAOiT,aACvBN,IAAK,uBACLC,IAAK,cAEPO,GAAI,CACF3K,IAAK,IACLiK,IAAKO,GAAYhT,OAAOiT,YAAc,GACtCN,IAAK,wBACLC,IAAK,cAEPQ,GAAI,CACF5K,IAAK,IACLiK,IAAKO,EAAWhT,OAAOiT,YAAc,GACrCN,IAAK,0BACLC,IAAK,cAEPS,GAAI,CACF7K,IAAK,IACLiK,IAAKa,GAAcvS,SAASuD,KAAKiP,aAAc,OAC/CZ,IAAK,gCACLC,IAAK,cAEPY,GAAI,CACFhL,IAAK,IACLiK,IAAKa,EAAavS,SAASuD,KAAKiP,aAAc,UAC9CZ,IAAK,mCACLC,IAAK,cAEPa,GAAI,CACFjL,IAAK,IACLiK,IAAKJ,EAAgB,MACrBM,IAAK,gCACLC,IAAK,WAEPc,GAAI,CACFlL,IAAK,IACLiK,IAAKJ,EAAgB,QACrBM,IAAK,4BACLC,IAAK,WAEPe,GAAI,CACFnL,IAAK,IACLiK,IAAKmB,EAAgB,GACrBjB,IAAK,sBACLC,IAAK,WAEPiB,GAAI,CACFrL,IAAK,IACLiK,IAAKmB,EAAgB,GACrBjB,IAAK,kBACLC,IAAK,WAEPkB,GAAI,CACFtL,IAAK,IACLiK,IAAKsB,EAAW,OAChBpB,IAAK,qBACLC,IAAK,WAEPoB,GAAI,CACFxL,IAAK,IACLiK,IAAKsB,EAAW,MAChBpB,IAAK,+BACLC,IAAK,WAEPqB,GAAI,CACFzL,IAAK,IACLiK,IAAKyB,EACLvB,IAAK,8BACLC,IAAK,WAEPuB,GAAI,CACF3L,IAAK,IACLiK,IAAK2B,EACLzB,IAAK,qBACLC,IAAK,UAIT3S,MAAM0B,GAAGZ,SAAU,UAAW,SAASO,GAErC,GAAIiR,EAAQpJ,eAAe7H,EAAE+H,WAAa/H,EAAE+S,UAAY/S,EAAEgT,SAAWhT,EAAEiT,WAAajT,EAAEkT,QAAS,CAC7F,IAAIC,EAAUnT,EAAEU,OAAOyS,QAAQC,cAC/B,GAAIpT,EAAE+H,UAAY,GAAI,CACpB,GAAIoL,IAAY,SAAWA,IAAY,UAAYA,IAAY,WAAY,CACzElC,EAAQjR,EAAE+H,SAASoJ,WAEhB,CACL,GAAInR,EAAEU,SAAWjB,SAASuD,MAAQmQ,IAAY,KAAOA,IAAY,SAAU,CACzEnT,EAAEmL,iBACF8F,EAAQjR,EAAE+H,SAASoJ,WAM3B,SAASJ,EAAgBsC,GACvB,OAAO,SAASC,GACd,IAAI7C,EAAUhR,SAASyL,cAAc,8BACrCqI,EAAiBF,EACjB,GAAI5C,IAAY,KAAM,CAEpBA,EAAUhR,SAASyL,cAAc,WACjC,GAAIuF,IAAY,KAAM,CAEpB,OAGF,GAAI4C,IAAU,QAAUA,IAAU,KAAM,CACtCE,EAAiB9C,GAIrB,IAAI+C,EAAMC,EAAUhU,SAASC,iBAAiB,WAE9C,UAAW6T,IAAmB,SAAU,CACtCC,EAAOD,MACF,CACL,OAAQA,GACN,IAAK,UACL,IAAIG,EAAMjU,SAASkU,gBAAgBC,WAAanU,SAASuD,KAAK4Q,UAC9D,IAAIC,EAAMH,EAAMjU,SAASkU,gBAAgBG,aAEzC,IAAK,IAAInU,EAAI,EAAGA,EAAI8T,EAAQ1O,OAAQpF,IAAK,CACvC6T,EAAOC,EAAQ9T,GACf,IAAIoU,EAAOP,EAAKpG,UAChB,IAAI4G,EAAOD,EAAOP,EAAKM,aAEvB,GAAKE,GAAQH,GAASE,EAAOL,EAAM,CACjC,OAGJ,MACA,IAAK,OACLF,EAAO/C,EAAQwD,mBACf,GAAIT,IAAS,KAAM,CACjBA,EAAOC,EAAQ,GAEjB,MACA,IAAK,KACLD,EAAO/C,EAAQC,uBACf,GAAI8C,IAAS,KAAM,CACjBA,EAAOC,EAAQA,EAAQ1O,OAAS,GAElC,MACA,IAAK,SACLyO,EAAOC,EAAQA,EAAQ1O,OAAS,GAChC,MACA,IAAK,MAEL,QACAyO,EAAOC,EAAQ,IAInB,GAAID,EAAM,CACR/C,EAAQyD,gBAAgB,qBACxBV,EAAKzQ,aAAa,oBAAqB,QACvC,IAAIoR,EAAOX,EAAKtI,cAAc,SAAWsI,EAAKtI,cAAc,KAC5D,GAAIiJ,IAAS,KAAM,CACjBA,EAAK5N,QAEP,IAAK+M,EAAU,CACbc,OAMR,SAASxB,IACPnT,SAAS4U,SAASC,OAAO,MAG3B,SAASlD,IACP,GAAI3R,SAAS8U,cAAe,CAC1B9U,SAAS8U,cAAcnO,QAI3B,SAASkM,EAAgBkC,GACvB,OAAO,WACL,IAAIC,EAAUC,EAAE,wCAChB,GAAID,EAAQ1P,SAAW,EAAG,CACxB5E,QAAQC,IAAI,oDACZ,OAEF,GAAIoU,GAAO,GAAKA,EAAMC,EAAQ1P,OAAQ,CACpC0P,EAAQD,GAAKG,YACR,CACLxU,QAAQC,IAAI,yCAKlB,SAASgU,IACP,IAAIQ,EAAMnV,SAASyL,cAAc,8BACjC,GAAI0J,IAAQ,KAAM,CAChB,OAEF,IAAIC,EAAOpV,SAASkU,gBAAgBC,WAAanU,SAASuD,KAAK4Q,UAC/DkB,EAAUrV,SAASkU,gBAAgBG,aACnCC,EAAOa,EAAIxH,UACX4G,EAAOD,EAAOa,EAAId,aAClBiB,EAAS,IAET,GAAKH,EAAIlE,yBAA2B,MAAUsD,EAAOc,EAAU,CAG7DpW,OAAOsW,OAAOtW,OAAOuW,QAAS,GAC9B,OAEF,GAAIJ,EAAQd,EAAOgB,EAAS,CAC1BrW,OAAOsW,OAAOtW,OAAOuW,QAASlB,EAAOgB,OAChC,CACL,IAAIG,EAAOL,EAAOC,EAClB,GAAII,EAAQlB,EAAOe,EAAS,CAC1BrW,OAAOsW,OAAOtW,OAAOuW,QAASjB,EAAOc,EAAUC,KAKrD,SAASrD,EAAWyD,GAClB,OAAO,WACLzW,OAAO0W,SAAS,EAAGD,GACnBpE,EAAgB,UAAhBA,IAIJ,SAASiB,EAAalL,EAAUuO,GAC9B,OAAO,WACL3W,OAAO4W,SAAS,EAAGxO,GACnBiK,EAAgBsE,EAAhBtE,IAIJ,SAASS,IACP9S,OAAO4W,SAAS,EAAG,GACnB7V,SAASyL,cAAc,MAAM3E,QAG/B,SAASkM,EAAW8C,GAClB,OAAO,WACL,IAAIpB,EAAO1U,SAASyL,cAAc,mCAClC,GAAIiJ,IAAS,KAAM,CACjB,IAAIhT,EAAMgT,EAAKlO,aAAa,QAC5B,GAAIsP,EAAQ,CACV7W,OAAOiD,KAAKR,OACP,CACLzC,OAAO2V,SAASmB,KAAOrU,KAM/B,SAASsU,EAAgBC,GACvB,IAAIC,EAAa,GAEjB,IAAK,IAAIC,KAAK3E,EAAS,CACrB,IAAI/J,EAAM+J,EAAQ2E,GAClBD,EAAWzO,EAAIoK,KAAOqE,EAAWzO,EAAIoK,MAAQ,GAC7CqE,EAAWzO,EAAIoK,KAAK7C,KAAKvH,GAG3B,IAAI2O,EAAStN,OAAOiG,KAAKmH,GAAYG,KAAK,SAASnR,EAAGoR,GACpD,OAAOJ,EAAWI,GAAGhR,OAAS4Q,EAAWhR,GAAGI,SAG9C,GAAI8Q,EAAO9Q,SAAW,EAAG,CACvB,OAGH,IAAIiR,EAAO,mEACVA,GAAQ,uDACVA,GAAQ,UAEN,IAAK,IAAIrW,EAAI,EAAGA,EAAIkW,EAAO9Q,OAAQpF,IAAK,CACtC,IAAI2R,EAAMqE,EAAWE,EAAOlW,IAE5B,IAAIsW,EAAetW,IAAOkW,EAAO9Q,OAAS,EAC1C,IAAIwG,EAAQ5L,EAAI,IAAM,EAEtB,GAAI4L,EAAO,CACTyK,GAAQ,OAEVA,GAAQ,OAERA,GAAQ,OAAS1E,EAAI,GAAGA,IAAM,QAC9B0E,GAAQ,6BAER,IAAK,IAAIE,KAAM5E,EAAK,CAClB0E,GAAQ,YAAc1E,EAAI4E,GAAIhP,IAAM,UAAYoK,EAAI4E,GAAI7E,IAAM,QAGhE2E,GAAQ,QACRA,GAAQ,QAER,IAAKzK,GAAS0K,EAAc,CAC1BD,GAAQ,SAIdA,GAAQ,WAENN,EAAWzH,UAAY+H,EAGzB,SAASlD,IACR,IAAIqD,EAAY1W,SAASyL,cAAc,qBACvC/K,QAAQC,IAAI+V,GACb,GAAIA,IAAc9O,WAAa8O,IAAc,KAAM,CAElDA,EAAY1W,SAASqD,cAAc,OAChCqT,EAAUzT,GAAK,mBACjByT,EAAUC,UAAU,eACpBD,EAAUxG,MAAM,aACjB8F,EAAgBU,GAChB,IAAInT,EAAOvD,SAASoM,qBAAqB,QAAQ,GACjD7I,EAAKC,YAAYkT,OACX,CAENA,EAAUxS,UAAU0S,OAAO,aAC3B,YAuBH,SAAWzX,EAAGC,EAAGF,GACf,aAEAA,EAAMmC,MAAM,WACVnC,EAAM0B,GAAG,0BAA2B,QAAS,SAASqG,GAEpDpH,KAAKqE,UAAUmI,OAAO,0BAGtB,IAAIwK,EAAe,gDACnB,IAAIC,EAAcD,EAAe,2BACjC,IAAIE,EAAY,cAEhB,IAAIC,EAASnX,KAAKoX,QAAQC,MAC1B,IAAIC,EAAWtX,KAAKoX,QAAQG,QAC5B,IAAIC,EAAejY,EAAEqM,cAAc,IAAM5L,KAAKoX,QAAQK,aACtD,IAAIC,EAAwBnY,EAAEqM,cAAc,IAAM5L,KAAKoX,QAAQO,qBAG/D,IAAIC,EAAkB,CAAE,YAAa,eAAgB,mBAAoB,gBAAiB,eAE1F,GAAGT,GAAUG,GAAYE,EAAc,CACrC,IAAIK,EAAQ,KACZ,OAAOP,GACL,IAAK,OACLO,EAAQZ,EAAc,QAAUE,EAAS,KAAOD,EAChD,MACA,IAAK,MACLW,EAAQZ,EAAc,OAASE,EAAS,KAAOD,EAC/C,MACA,IAAK,WACLW,EAAQZ,EAAc,YAAcE,EAAS,KAAOD,EACpD,MACA,QACA,MAEF,GAAGW,EAAO,CAERxY,EAAMsC,KAAM,MAAOkW,GAAQ1V,KAAK,SAASuU,EAAMoB,GAC7CpB,EAAO1H,KAAKC,MAAMyH,GAClB,GAAGA,GAAQA,EAAKzQ,UAAYyQ,EAAKzQ,SAAS,GAAI,CAC5C,IAAI/B,EAAUwS,EAAKzQ,SAAS,GAC5B,IAAI8R,EAAU,GACd,IAAK,IAAIC,KAAO9T,EAAQ+T,KAAM,CAC5B,GAAG/T,EAAQ+T,KAAKrP,OAAS,MAAQgP,EAAgBhO,QAAQoO,KAAS,EAAG,CACnED,GAAW,WAAaC,EAAM,YAC9B,OAAOA,GACL,IAAK,QACL,IAAK,MACLD,GAAW,gBAAmB7T,EAAQ+T,KAAKD,GAAK3U,QAAQ,KAAK,IAAM,KAAQa,EAAQ+T,KAAKD,GAAO,OAC/F,MACA,IAAK,QACLD,GAAW,mBAAsB7T,EAAQ+T,KAAKD,GAAO,KAAQ9T,EAAQ+T,KAAKD,GAAO,OACjF,MACA,IAAK,UACL,IAAK,MACLD,GAAW,YAAe7T,EAAQ+T,KAAKD,GAAO,KAAQ9T,EAAQ+T,KAAKD,GAAO,OAC1E,MACA,IAAK,WACLD,GAAW,0CAA6C7T,EAAQ+T,KAAKD,GAAO,KAAQ9T,EAAQ+T,KAAKD,GAAO,OACxG,MACA,IAAK,YACL,GAAG9T,EAAQ+T,KAAKD,GAAKpO,QAAQ,OAAS,EAAG,CACvCmO,GAAW,oBAAuB7T,EAAQ+T,KAAKD,GAAKE,UAAU,EAAEhU,EAAQ+T,KAAKD,GAAKpO,QAAQ,MAAQ,uBAAyB1F,EAAQ+T,KAAKD,GAAKE,UAAUhU,EAAQ+T,KAAKD,GAAKpO,QAAQ,KAAK,GAAK,KAAQ1F,EAAQ+T,KAAKD,GAAO,OACvN,MAGF,QAEAD,GAAW7T,EAAQ+T,KAAKD,GACxB,MAEFD,GAAW,cAGtBL,EAAsBxX,WAAWyK,YAAY+M,GACtCF,EAAanT,UAAUmI,OAAO,aAC9BgL,EAAa5L,cAAc,SAAS+C,UAAYoJ,KAGnD3V,MAAM,WACLsV,EAAsBrT,UAAUmI,OAAO,aACvCkL,EAAsB/I,UAAY,0BAMxCvH,EAAMyE,mBAGRxM,EAAM0B,GAAG,kBAAmB,QAAS,SAASqG,GAE5CpH,KAAKqE,UAAUmI,OAAO,kBAGtB,IAAI2L,EAAiBnY,KAAKoX,QAAQgB,cAClC,IAAIC,EAAUC,WAAWtY,KAAKoX,QAAQmB,QACtC,IAAIC,EAAUF,WAAWtY,KAAKoX,QAAQqB,QACtC,IAAIC,EAAWJ,WAAWtY,KAAKoX,QAAQuB,SACvC,IAAIC,EAAkB5J,KAAKC,MAAMjP,KAAKoX,QAAQyB,gBAC9C,IAAIC,EAAc9J,KAAKC,MAAMjP,KAAKoX,QAAQ2B,YAE1C1Z,EAAM2D,UAAU,uBAChB3D,EAAMuE,WAAW,qBAAsB,WACrC,IAAIoV,EAAa,KACjB,GAAGJ,EAAiB,CAClB,IAAIK,EAAYC,EAAEC,OAAOP,EAAgB,GAAIA,EAAgB,IAC7D,IAAIQ,EAAYF,EAAEC,OAAOP,EAAgB,GAAIA,EAAgB,IAC7DI,EAAaE,EAAEG,aAAaJ,EAAWG,GAIzC,IAAIE,EAAMJ,EAAEI,IAAInB,GAEhB,IAAIoB,EAAa,qDACjB,IAAIC,EAAgB,gFACpB,IAAIC,EAAY,IAAIP,EAAEQ,UAAUH,EAAc,CAACI,QAAS,EAAGC,QAAS,GAAIC,YAAaL,IACrF,IAAIM,EAAgB,sDACpB,IAAIC,EAAqB,uGACzB,IAAIC,EAAe,IAAId,EAAEQ,UAAUI,EAAiB,CAACH,QAAS,EAAGC,QAAS,GAAIC,YAAaE,IAE3F,GAAGf,EAAY,CAGb5O,WAAW,WACTkP,EAAIW,UAAUjB,EAAY,CACxBY,QAAQ,MAET,QACE,GAAIvB,GAAWG,EAAS,CAC7B,GAAGE,EAAU,CACXY,EAAIY,QAAQ,IAAIhB,EAAEC,OAAOX,EAASH,GAASK,OACtC,CACLY,EAAIY,QAAQ,IAAIhB,EAAEC,OAAOX,EAASH,GAAS,IAI/CiB,EAAIa,SAASV,GAEb,IAAIW,EAAa,CACfC,aAAcZ,GAIhBP,EAAEoB,QAAQC,OAAOH,GAAYI,MAAMlB,GAEnC,GAAGR,EAAa,CACdI,EAAEuB,QAAQ3B,GAAa0B,MAAMlB,MAOjClS,EAAMyE,sBA3JZ,CA8JGzM,OAAQe,SAAUf,OAAOC,QAiB5B,SAAUC,EAAGC,EAAGF,GACd,aAEAA,EAAMmC,MAAM,WACVnC,EAAMqb,uBAAyB,IAAIrb,EAAM+P,YAAY,QAAS,uBAAwB,sBAAuB,KAC7G/P,EAAMqb,uBAAuBrJ,QAE7BhS,EAAM0B,GAAG,gBAAiB,QAAS,SAASqG,GAC1C,IAAIuT,EAAoB3a,KAAK2G,aAAa,2BAC1C,IAAIiU,EAAuB5a,KAAK2G,aAAa,+BAC7C,IAAIvF,EAASpB,KAAK2G,aAAa,eAC/B,IAAIkU,EAAgBtb,EAAEqM,cAAcxK,GACpC,IAAIsV,EAAO1W,KAAK2O,UAChB,GAAI3O,KAAKqE,UAAUqN,SAAS,aAAc,CACxCgF,EAAOA,EAAKrT,QAAQsX,EAAmBC,OAClC,CACLlE,EAAOA,EAAKrT,QAAQuX,EAAsBD,GAE5C3a,KAAK2O,UAAY+H,EACjB1W,KAAKqE,UAAU0S,OAAO,aACtB8D,EAAcxW,UAAU0S,OAAO,eAGjC1X,EAAM0B,GAAG,gBAAiB,QAAS,SAASqG,GAC1C,IAAIhG,EAASpB,KAAK2G,aAAa,eAC/B,IAAImU,EAAcvb,EAAEqM,cAAcxK,EAAS,aAC3C,IAAI2Z,EAAUD,EAAYnU,aAAa,OACvC,GAAIoU,IAAY,MAAQA,IAAYhT,WAAagT,IAAY,MAAO,CAClED,EAAYrX,aAAa,MAAOqX,EAAYnU,aAAa,gBAI7DrH,EAAE6B,iBAAiB,SAAU,WAC3B,IAAIT,EAAInB,EAAEgE,eAAe,aACzB+Q,EAAYnU,SAASkU,gBAAgBC,WAAanU,SAASuD,KAAK4Q,UAChE,GAAI5T,IAAM,KAAM,CACd,GAAI4T,GAAa,IAAK,CACpB5T,EAAE2P,MAAM2K,QAAU,MACb,CACLta,EAAE2P,MAAM2K,QAAU,SAvC5B,CA8CG5b,OAAQe,SAAUf,OAAOC,QAiB5B,SAAUC,EAAGC,EAAGF,GACd,aAEA,IAAI4b,EAAa,KAAMC,EAAY,IAAKC,EAExC,SAASC,EAAiBlX,GACxB,GAAIA,EAAQmX,kBAAmB,CAC7B,IAAIC,EAAMpX,EAAQ+G,MAAMxF,OACxBvB,EAAQmX,kBAAkBC,EAAKA,IAInC,SAASC,IACP,GAAIJ,EAAOlQ,MAAMxF,OAAU,EAAG,CAC5B,IAAI+V,EAASrb,SAASoD,eAAe,UACrC6G,WAAWoR,EAAOC,OAAO/Z,KAAK8Z,GAAS,IAI3C,SAASE,EAAkBP,GACzB,IAAIQ,EAAKxb,SAASoD,eAAe,gBACjC,IAAIqY,EAAoB,WACtB,GAAIT,EAAOlQ,MAAMxF,SAAW,EAAG,CACpCkW,EAAGtX,UAAUC,IAAI,aACL,CACZqX,EAAGtX,UAAUmI,OAAO,WAKjBoP,IACAD,EAAGxa,iBAAiB,QAAS,WAC3Bga,EAAOlQ,MAAM,GACbkQ,EAAOlU,QACP2U,MAEFT,EAAOha,iBAAiB,QAASya,EAAmB,OAGtDvc,EAAMmC,MAAM,WACV2Z,EAAS5b,EAAEgE,eAAe2X,GAE1B,SAASW,EAAqBnb,GAC5B,GAAIua,EAAY,CACdG,EAAiBD,GACjBF,EAAa,UACR,GAKT,GAAIE,IAAW,KAAM,CAEnBO,EAAkBP,GAGlB,GAAI9b,EAAMyc,cAAe,CACvBzc,EAAM0c,aAAehX,aAAapE,KAAKrB,EAAG,CACxCmM,IAAK,kBACLX,aAAczL,EAAM2c,cACpBzQ,WAAYlM,EAAMuC,OAClB0J,SAAU,EACVjB,MAAO,KACN,IAAM6Q,GAGT5b,EAAE6B,iBAAiB,SAAU,WAC3B,IAAIiG,EAAQ,IAAI6U,YAAY,YAC5Bd,EAAOe,cAAc9U,KAIzB+T,EAAOha,iBAAiB,QAAS0a,EAAsB,OACvDV,EAAOlU,QAIT,GAAIkU,IAAW,MAAQ9b,EAAM8c,0BAA2B,CACtD5c,EAAEqM,cAAc,SAASkL,UAAU,YAEnCzX,EAAM0B,GAAG,oBAAqB,SAAU,SAASL,GAC/C,IAAIL,EAAGgW,EAAa9W,EAAEa,iBAAiB,sCACvC,IAAIC,EAAE,EAAGA,EAAEgW,EAAW5Q,OAAQpF,IAAK,CACjC,GAAIgW,EAAWhW,KAAOL,MAAQqW,EAAWhW,GAAG+b,QAAS,CACnD/F,EAAWhW,GAAGgV,SAGlB,IAAMrV,KAAKoc,QAAS,CAClBpc,KAAKqV,QAEPkG,IACA,OAAO,QAGTlc,EAAM0B,GAAGxB,EAAEgE,eAAe,cAAe,SAAUgY,GACnDlc,EAAM0B,GAAGxB,EAAEgE,eAAe,YAAa,SAAUgY,OA/FvD,CAoGGnc,OAAQe,SAAUf,OAAOC","file":"searx.min.js"} \ No newline at end of file
diff --git a/searx/static/themes/simple/js/searx_head/00_init.js b/searx/static/themes/simple/js/searx_head/00_init.js
new file mode 100644
index 000000000..3ac61c8ae
--- /dev/null
+++ b/searx/static/themes/simple/js/searx_head/00_init.js
@@ -0,0 +1,40 @@
+/**
+* searx is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Affero General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* searx is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Affero General Public License for more details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with searx. If not, see < http://www.gnu.org/licenses/ >.
+*
+* (C) 2019 by Alexandre Flament
+*
+*/
+(function(w, d) {
+ 'use strict';
+
+ // add data- properties
+ var script = d.currentScript || (function() {
+ var scripts = d.getElementsByTagName('script');
+ return scripts[scripts.length - 1];
+ })();
+
+ // try to detect touch screen
+ w.searx = {
+ touch: (("ontouchstart" in w) || w.DocumentTouch && document instanceof DocumentTouch) || false,
+ method: script.getAttribute('data-method'),
+ autocompleter: script.getAttribute('data-autocompleter') === 'true',
+ search_on_category_select: script.getAttribute('data-search-on-category-select') === 'true',
+ infinite_scroll: script.getAttribute('data-infinite-scroll') === 'true',
+ static_path: script.getAttribute('data-static-path'),
+ no_item_found: script.getAttribute('data-no-item-found')
+ }
+
+ // update the css
+ d.getElementsByTagName("html")[0].className = (w.searx.touch)?"js touch":"js";
+})(window, document); \ No newline at end of file
diff --git a/searx/static/themes/simple/js/searx_src/00_searx_toolkit.js b/searx/static/themes/simple/js/searx_src/00_searx_toolkit.js
new file mode 100644
index 000000000..dbef4be73
--- /dev/null
+++ b/searx/static/themes/simple/js/searx_src/00_searx_toolkit.js
@@ -0,0 +1,164 @@
+/**
+* searx is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Affero General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* searx is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Affero General Public License for more details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with searx. If not, see < http://www.gnu.org/licenses/ >.
+*
+* (C) 2017 by Alexandre Flament, <alex@al-f.net>
+*
+*/
+window.searx = (function(w, d) {
+
+ 'use strict';
+
+ // not invented here tookit with bugs fixed elsewhere
+ // purposes : be just good enough and as small as possible
+
+ // from https://plainjs.com/javascript/events/live-binding-event-handlers-14/
+ if (w.Element) {
+ (function(ElementPrototype) {
+ ElementPrototype.matches = ElementPrototype.matches ||
+ ElementPrototype.matchesSelector ||
+ ElementPrototype.webkitMatchesSelector ||
+ ElementPrototype.msMatchesSelector ||
+ function(selector) {
+ var node = this, nodes = (node.parentNode || node.document).querySelectorAll(selector), i = -1;
+ while (nodes[++i] && nodes[i] != node);
+ return !!nodes[i];
+ };
+ })(Element.prototype);
+ }
+
+ function callbackSafe(callback, el, e) {
+ try {
+ callback.call(el, e);
+ } catch (exception) {
+ console.log(exception);
+ }
+ }
+
+ var searx = window.searx || {};
+
+ searx.on = function(obj, eventType, callback, useCapture) {
+ useCapture = useCapture || false;
+ if (typeof obj !== 'string') {
+ // obj HTMLElement, HTMLDocument
+ obj.addEventListener(eventType, callback, useCapture);
+ } else {
+ // obj is a selector
+ d.addEventListener(eventType, function(e) {
+ var el = e.target || e.srcElement, found = false;
+ while (el && el.matches && el !== d && !(found = el.matches(obj))) el = el.parentElement;
+ if (found) callbackSafe(callback, el, e);
+ }, useCapture);
+ }
+ };
+
+ searx.ready = function(callback) {
+ if (document.readyState != 'loading') {
+ callback.call(w);
+ } else {
+ w.addEventListener('DOMContentLoaded', callback.bind(w));
+ }
+ };
+
+ searx.http = function(method, url, callback) {
+ var req = new XMLHttpRequest(),
+ resolve = function() {},
+ reject = function() {},
+ promise = {
+ then: function(callback) { resolve = callback; return promise; },
+ catch: function(callback) { reject = callback; return promise; }
+ };
+
+ try {
+ req.open(method, url, true);
+
+ // On load
+ req.onload = function() {
+ if (req.status == 200) {
+ resolve(req.response, req.responseType);
+ } else {
+ reject(Error(req.statusText));
+ }
+ };
+
+ // Handle network errors
+ req.onerror = function() {
+ reject(Error("Network Error"));
+ };
+
+ req.onabort = function() {
+ reject(Error("Transaction is aborted"));
+ };
+
+ // Make the request
+ req.send();
+ } catch (ex) {
+ reject(ex);
+ }
+
+ return promise;
+ };
+
+ searx.loadStyle = function(src) {
+ var path = searx.static_path + src,
+ id = "style_" + src.replace('.', '_'),
+ s = d.getElementById(id);
+ if (s === null) {
+ s = d.createElement('link');
+ s.setAttribute('id', id);
+ s.setAttribute('rel', 'stylesheet');
+ s.setAttribute('type', 'text/css');
+ s.setAttribute('href', path);
+ d.body.appendChild(s);
+ }
+ };
+
+ searx.loadScript = function(src, callback) {
+ var path = searx.static_path + src,
+ id = "script_" + src.replace('.', '_'),
+ s = d.getElementById(id);
+ if (s === null) {
+ s = d.createElement('script');
+ s.setAttribute('id', id);
+ s.setAttribute('src', path);
+ s.onload = callback;
+ s.onerror = function() {
+ s.setAttribute('error', '1');
+ };
+ d.body.appendChild(s);
+ } else if (!s.hasAttribute('error')) {
+ try {
+ callback.apply(s, []);
+ } catch (exception) {
+ console.log(exception);
+ }
+ } else {
+ console.log("callback not executed : script '" + path + "' not loaded.");
+ }
+ };
+
+ searx.insertBefore = function (newNode, referenceNode) {
+ element.parentNode.insertBefore(newNode, referenceNode);
+ };
+
+ searx.insertAfter = function(newNode, referenceNode) {
+ referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
+ };
+
+ searx.on('.close', 'click', function(e) {
+ var el = e.target || e.srcElement;
+ this.parentNode.classList.add('invisible');
+ });
+
+ return searx;
+})(window, document);
diff --git a/searx/static/themes/simple/js/searx_src/autocomplete.js b/searx/static/themes/simple/js/searx_src/autocomplete.js
new file mode 100644
index 000000000..b95fbcfb2
--- /dev/null
+++ b/searx/static/themes/simple/js/searx_src/autocomplete.js
@@ -0,0 +1,536 @@
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.AutoComplete = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+/*
+ * @license MIT
+ *
+ * Autocomplete.js v2.6.3
+ * Developed by Baptiste Donaux
+ * http://autocomplete-js.com
+ *
+ * (c) 2017, Baptiste Donaux
+ */
+"use strict";
+var ConditionOperator;
+(function (ConditionOperator) {
+ ConditionOperator[ConditionOperator["AND"] = 0] = "AND";
+ ConditionOperator[ConditionOperator["OR"] = 1] = "OR";
+})(ConditionOperator || (ConditionOperator = {}));
+var EventType;
+(function (EventType) {
+ EventType[EventType["KEYDOWN"] = 0] = "KEYDOWN";
+ EventType[EventType["KEYUP"] = 1] = "KEYUP";
+})(EventType || (EventType = {}));
+/**
+ * Core
+ *
+ * @class
+ * @author Baptiste Donaux <baptiste.donaux@gmail.com> @baptistedonaux
+ */
+var AutoComplete = (function () {
+ // Constructor
+ function AutoComplete(params, selector) {
+ if (params === void 0) { params = {}; }
+ if (selector === void 0) { selector = "[data-autocomplete]"; }
+ if (Array.isArray(selector)) {
+ selector.forEach(function (s) {
+ new AutoComplete(params, s);
+ });
+ }
+ else if (typeof selector == "string") {
+ var elements = document.querySelectorAll(selector);
+ Array.prototype.forEach.call(elements, function (input) {
+ new AutoComplete(params, input);
+ });
+ }
+ else {
+ var specificParams = AutoComplete.merge(AutoComplete.defaults, params, {
+ DOMResults: document.createElement("div")
+ });
+ AutoComplete.prototype.create(specificParams, selector);
+ return specificParams;
+ }
+ }
+ AutoComplete.prototype.create = function (params, element) {
+ params.Input = element;
+ if (params.Input.nodeName.match(/^INPUT$/i) && (params.Input.hasAttribute("type") === false || params.Input.getAttribute("type").match(/^TEXT|SEARCH$/i))) {
+ params.Input.setAttribute("autocomplete", "off");
+ params._Position(params);
+ params.Input.parentNode.appendChild(params.DOMResults);
+ params.$Listeners = {
+ blur: params._Blur.bind(params),
+ destroy: AutoComplete.prototype.destroy.bind(null, params),
+ focus: params._Focus.bind(params),
+ keyup: AutoComplete.prototype.event.bind(null, params, EventType.KEYUP),
+ keydown: AutoComplete.prototype.event.bind(null, params, EventType.KEYDOWN),
+ position: params._Position.bind(params)
+ };
+ for (var event in params.$Listeners) {
+ params.Input.addEventListener(event, params.$Listeners[event]);
+ }
+ }
+ };
+ AutoComplete.prototype.getEventsByType = function (params, type) {
+ var mappings = {};
+ for (var key in params.KeyboardMappings) {
+ var event = EventType.KEYUP;
+ if (params.KeyboardMappings[key].Event !== undefined) {
+ event = params.KeyboardMappings[key].Event;
+ }
+ if (event == type) {
+ mappings[key] = params.KeyboardMappings[key];
+ }
+ }
+ return mappings;
+ };
+ AutoComplete.prototype.event = function (params, type, event) {
+ var eventIdentifier = function (condition) {
+ if ((match === true && mapping.Operator == ConditionOperator.AND) || (match === false && mapping.Operator == ConditionOperator.OR)) {
+ condition = AutoComplete.merge({
+ Not: false
+ }, condition);
+ if (condition.hasOwnProperty("Is")) {
+ if (condition.Is == event.keyCode) {
+ match = !condition.Not;
+ }
+ else {
+ match = condition.Not;
+ }
+ }
+ else if (condition.hasOwnProperty("From") && condition.hasOwnProperty("To")) {
+ if (event.keyCode >= condition.From && event.keyCode <= condition.To) {
+ match = !condition.Not;
+ }
+ else {
+ match = condition.Not;
+ }
+ }
+ }
+ };
+ for (var name in AutoComplete.prototype.getEventsByType(params, type)) {
+ var mapping = AutoComplete.merge({
+ Operator: ConditionOperator.AND
+ }, params.KeyboardMappings[name]), match = ConditionOperator.AND == mapping.Operator;
+ mapping.Conditions.forEach(eventIdentifier);
+ if (match === true) {
+ mapping.Callback.call(params, event);
+ }
+ }
+ };
+ AutoComplete.prototype.makeRequest = function (params, callback) {
+ var propertyHttpHeaders = Object.getOwnPropertyNames(params.HttpHeaders), request = new XMLHttpRequest(), method = params._HttpMethod(), url = params._Url(), queryParams = params._Pre(), queryParamsStringify = encodeURIComponent(params._QueryArg()) + "=" + encodeURIComponent(queryParams);
+ if (method.match(/^GET$/i)) {
+ if (url.indexOf("?") !== -1) {
+ url += "&" + queryParamsStringify;
+ }
+ else {
+ url += "?" + queryParamsStringify;
+ }
+ }
+ request.open(method, url, true);
+ for (var i = propertyHttpHeaders.length - 1; i >= 0; i--) {
+ request.setRequestHeader(propertyHttpHeaders[i], params.HttpHeaders[propertyHttpHeaders[i]]);
+ }
+ request.onreadystatechange = function () {
+ if (request.readyState == 4 && request.status == 200) {
+ params.$Cache[queryParams] = request.response;
+ callback(request.response);
+ }
+ };
+ return request;
+ };
+ AutoComplete.prototype.ajax = function (params, request, timeout) {
+ if (timeout === void 0) { timeout = true; }
+ if (params.$AjaxTimer) {
+ window.clearTimeout(params.$AjaxTimer);
+ }
+ if (timeout === true) {
+ params.$AjaxTimer = window.setTimeout(AutoComplete.prototype.ajax.bind(null, params, request, false), params.Delay);
+ }
+ else {
+ if (params.Request) {
+ params.Request.abort();
+ }
+ params.Request = request;
+ params.Request.send(params._QueryArg() + "=" + params._Pre());
+ }
+ };
+ AutoComplete.prototype.cache = function (params, callback) {
+ var response = params._Cache(params._Pre());
+ if (response === undefined) {
+ var request = AutoComplete.prototype.makeRequest(params, callback);
+ AutoComplete.prototype.ajax(params, request);
+ }
+ else {
+ callback(response);
+ }
+ };
+ AutoComplete.prototype.destroy = function (params) {
+ for (var event in params.$Listeners) {
+ params.Input.removeEventListener(event, params.$Listeners[event]);
+ }
+ params.DOMResults.parentNode.removeChild(params.DOMResults);
+ };
+ return AutoComplete;
+}());
+AutoComplete.merge = function () {
+ var merge = {}, tmp;
+ for (var i = 0; i < arguments.length; i++) {
+ for (tmp in arguments[i]) {
+ merge[tmp] = arguments[i][tmp];
+ }
+ }
+ return merge;
+};
+AutoComplete.defaults = {
+ Delay: 150,
+ EmptyMessage: "No result here",
+ Highlight: {
+ getRegex: function (value) {
+ return new RegExp(value, "ig");
+ },
+ transform: function (value) {
+ return "<strong>" + value + "</strong>";
+ }
+ },
+ HttpHeaders: {
+ "Content-type": "application/x-www-form-urlencoded"
+ },
+ Limit: 0,
+ MinChars: 0,
+ HttpMethod: "GET",
+ QueryArg: "q",
+ Url: null,
+ KeyboardMappings: {
+ "Enter": {
+ Conditions: [{
+ Is: 13,
+ Not: false
+ }],
+ Callback: function (event) {
+ if (this.DOMResults.getAttribute("class").indexOf("open") != -1) {
+ var liActive = this.DOMResults.querySelector("li.active");
+ if (liActive !== null) {
+ event.preventDefault();
+ this._Select(liActive);
+ this.DOMResults.setAttribute("class", "autocomplete");
+ }
+ }
+ },
+ Operator: ConditionOperator.AND,
+ Event: EventType.KEYDOWN
+ },
+ "KeyUpAndDown_down": {
+ Conditions: [{
+ Is: 38,
+ Not: false
+ },
+ {
+ Is: 40,
+ Not: false
+ }],
+ Callback: function (event) {
+ event.preventDefault();
+ },
+ Operator: ConditionOperator.OR,
+ Event: EventType.KEYDOWN
+ },
+ "KeyUpAndDown_up": {
+ Conditions: [{
+ Is: 38,
+ Not: false
+ },
+ {
+ Is: 40,
+ Not: false
+ }],
+ Callback: function (event) {
+ event.preventDefault();
+ var first = this.DOMResults.querySelector("li:first-child:not(.locked)"), last = this.DOMResults.querySelector("li:last-child:not(.locked)"), active = this.DOMResults.querySelector("li.active");
+ if (active) {
+ var currentIndex = Array.prototype.indexOf.call(active.parentNode.children, active), position = currentIndex + (event.keyCode - 39), lisCount = this.DOMResults.getElementsByTagName("li").length;
+ if (position < 0) {
+ position = lisCount - 1;
+ }
+ else if (position >= lisCount) {
+ position = 0;
+ }
+ active.classList.remove("active");
+ active.parentElement.children.item(position).classList.add("active");
+ }
+ else if (last && event.keyCode == 38) {
+ last.classList.add("active");
+ }
+ else if (first) {
+ first.classList.add("active");
+ }
+ },
+ Operator: ConditionOperator.OR,
+ Event: EventType.KEYUP
+ },
+ "AlphaNum": {
+ Conditions: [{
+ Is: 13,
+ Not: true
+ }, {
+ From: 35,
+ To: 40,
+ Not: true
+ }],
+ Callback: function () {
+ var oldValue = this.Input.getAttribute("data-autocomplete-old-value"), currentValue = this._Pre();
+ if (currentValue !== "" && currentValue.length >= this._MinChars()) {
+ if (!oldValue || currentValue != oldValue) {
+ this.DOMResults.setAttribute("class", "autocomplete open");
+ }
+ AutoComplete.prototype.cache(this, function (response) {
+ this._Render(this._Post(response));
+ this._Open();
+ }.bind(this));
+ }
+ },
+ Operator: ConditionOperator.AND,
+ Event: EventType.KEYUP
+ }
+ },
+ DOMResults: null,
+ Request: null,
+ Input: null,
+ /**
+ * Return the message when no result returns
+ */
+ _EmptyMessage: function () {
+ var emptyMessage = "";
+ if (this.Input.hasAttribute("data-autocomplete-empty-message")) {
+ emptyMessage = this.Input.getAttribute("data-autocomplete-empty-message");
+ }
+ else if (this.EmptyMessage !== false) {
+ emptyMessage = this.EmptyMessage;
+ }
+ else {
+ emptyMessage = "";
+ }
+ return emptyMessage;
+ },
+ /**
+ * Returns the maximum number of results
+ */
+ _Limit: function () {
+ var limit = this.Input.getAttribute("data-autocomplete-limit");
+ if (isNaN(limit) || limit === null) {
+ return this.Limit;
+ }
+ return parseInt(limit, 10);
+ },
+ /**
+ * Returns the minimum number of characters entered before firing ajax
+ */
+ _MinChars: function () {
+ var minchars = this.Input.getAttribute("data-autocomplete-minchars");
+ if (isNaN(minchars) || minchars === null) {
+ return this.MinChars;
+ }
+ return parseInt(minchars, 10);
+ },
+ /**
+ * Apply transformation on labels response
+ */
+ _Highlight: function (label) {
+ return label.replace(this.Highlight.getRegex(this._Pre()), this.Highlight.transform);
+ },
+ /**
+ * Returns the HHTP method to use
+ */
+ _HttpMethod: function () {
+ if (this.Input.hasAttribute("data-autocomplete-method")) {
+ return this.Input.getAttribute("data-autocomplete-method");
+ }
+ return this.HttpMethod;
+ },
+ /**
+ * Returns the query param to use
+ */
+ _QueryArg: function () {
+ if (this.Input.hasAttribute("data-autocomplete-param-name")) {
+ return this.Input.getAttribute("data-autocomplete-param-name");
+ }
+ return this.QueryArg;
+ },
+ /**
+ * Returns the URL to use for AJAX request
+ */
+ _Url: function () {
+ if (this.Input.hasAttribute("data-autocomplete")) {
+ return this.Input.getAttribute("data-autocomplete");
+ }
+ return this.Url;
+ },
+ /**
+ * Manage the close
+ */
+ _Blur: function (now) {
+ if (now === true) {
+ this.DOMResults.setAttribute("class", "autocomplete");
+ this.Input.setAttribute("data-autocomplete-old-value", this.Input.value);
+ }
+ else {
+ var params = this;
+ setTimeout(function () {
+ params._Blur(true);
+ }, 150);
+ }
+ },
+ /**
+ * Manage the cache
+ */
+ _Cache: function (value) {
+ return this.$Cache[value];
+ },
+ /**
+ * Manage the open
+ */
+ _Focus: function () {
+ var oldValue = this.Input.getAttribute("data-autocomplete-old-value");
+ if ((!oldValue || this.Input.value != oldValue) && this._MinChars() <= this.Input.value.length) {
+ this.DOMResults.setAttribute("class", "autocomplete open");
+ }
+ },
+ /**
+ * Bind all results item if one result is opened
+ */
+ _Open: function () {
+ var params = this;
+ Array.prototype.forEach.call(this.DOMResults.getElementsByTagName("li"), function (li) {
+ if (li.getAttribute("class") != "locked") {
+ li.onclick = function (event) {
+ params._Select(li);
+ };
+ li.onmouseenter = function () {
+ var active = params.DOMResults.querySelector("li.active");
+ if (active !== li) {
+ if (active !== null) {
+ active.classList.remove("active");
+ }
+ li.classList.add("active");
+ }
+ };
+ }
+ });
+ },
+ /**
+ * Position the results HTML element
+ */
+ _Position: function () {
+ this.DOMResults.setAttribute("class", "autocomplete");
+ this.DOMResults.setAttribute("style", "top:" + (this.Input.offsetTop + this.Input.offsetHeight) + "px;left:" + this.Input.offsetLeft + "px;width:" + this.Input.clientWidth + "px;");
+ },
+ /**
+ * Execute the render of results DOM element
+ */
+ _Render: function (response) {
+ var ul;
+ if (typeof response == "string") {
+ ul = this._RenderRaw(response);
+ }
+ else {
+ ul = this._RenderResponseItems(response);
+ }
+ if (this.DOMResults.hasChildNodes()) {
+ this.DOMResults.removeChild(this.DOMResults.childNodes[0]);
+ }
+ this.DOMResults.appendChild(ul);
+ },
+ /**
+ * ResponseItems[] rendering
+ */
+ _RenderResponseItems: function (response) {
+ var ul = document.createElement("ul"), li = document.createElement("li"), limit = this._Limit();
+ // Order
+ if (limit < 0) {
+ response = response.reverse();
+ }
+ else if (limit === 0) {
+ limit = response.length;
+ }
+ for (var item = 0; item < Math.min(Math.abs(limit), response.length); item++) {
+ li.innerHTML = response[item].Label;
+ li.setAttribute("data-autocomplete-value", response[item].Value);
+ ul.appendChild(li);
+ li = document.createElement("li");
+ }
+ return ul;
+ },
+ /**
+ * string response rendering (RAW HTML)
+ */
+ _RenderRaw: function (response) {
+ var ul = document.createElement("ul"), li = document.createElement("li");
+ if (response.length > 0) {
+ this.DOMResults.innerHTML = response;
+ }
+ else {
+ var emptyMessage = this._EmptyMessage();
+ if (emptyMessage !== "") {
+ li.innerHTML = emptyMessage;
+ li.setAttribute("class", "locked");
+ ul.appendChild(li);
+ }
+ }
+ return ul;
+ },
+ /**
+ * Deal with request response
+ */
+ _Post: function (response) {
+ try {
+ var returnResponse = [];
+ //JSON return
+ var json = JSON.parse(response);
+ if (Object.keys(json).length === 0) {
+ return "";
+ }
+ if (Array.isArray(json)) {
+ for (var i = 0; i < Object.keys(json).length; i++) {
+ returnResponse[returnResponse.length] = { "Value": json[i], "Label": this._Highlight(json[i]) };
+ }
+ }
+ else {
+ for (var value in json) {
+ returnResponse.push({
+ "Value": value,
+ "Label": this._Highlight(json[value])
+ });
+ }
+ }
+ return returnResponse;
+ }
+ catch (event) {
+ //HTML return
+ return response;
+ }
+ },
+ /**
+ * Return the autocomplete value to send (before request)
+ */
+ _Pre: function () {
+ return this.Input.value;
+ },
+ /**
+ * Choice one result item
+ */
+ _Select: function (item) {
+ console.log('test test test');
+ if (item.hasAttribute("data-autocomplete-value")) {
+ this.Input.value = item.getAttribute("data-autocomplete-value");
+ }
+ else {
+ this.Input.value = item.innerHTML;
+ }
+ this.Input.setAttribute("data-autocomplete-old-value", this.Input.value);
+ },
+ $AjaxTimer: null,
+ $Cache: {},
+ $Listeners: {}
+};
+module.exports = AutoComplete;
+
+},{}]},{},[1])(1)
+});
diff --git a/searx/static/themes/simple/js/searx_src/searx_imageresult.js b/searx/static/themes/simple/js/searx_src/searx_imageresult.js
new file mode 100644
index 000000000..7bbfc1454
--- /dev/null
+++ b/searx/static/themes/simple/js/searx_src/searx_imageresult.js
@@ -0,0 +1,151 @@
+/**
+*
+* Google Image Layout v0.0.1
+* Description, by Anh Trinh.
+* Heavily modified for searx
+* http://trinhtrunganh.com
+*
+* @license Free to use under the MIT License.
+*
+*/
+(function(w, d) {
+ 'use strict';
+
+ function ImageLayout(container_selector, results_selector, img_selector, maxHeight) {
+ this.container_selector = container_selector;
+ this.results_selector = results_selector;
+ this.img_selector = img_selector;
+ this.margin = 10;
+ this.maxHeight = maxHeight;
+ this._alignAllDone = true;
+ }
+
+ /**
+ * Get the height that make all images fit the container
+ *
+ * width = w1 + w2 + w3 + ... = r1*h + r2*h + r3*h + ...
+ *
+ * @param {[type]} images the images to be calculated
+ * @param {[type]} width the container witdth
+ * @param {[type]} margin the margin between each image
+ *
+ * @return {[type]} the height
+ */
+ ImageLayout.prototype._getHeigth = function(images, width) {
+ var r = 0,
+ img;
+
+ width -= images.length * this.margin;
+ for (var i = 0; i < images.length; i++) {
+ img = images[i];
+ if ((img.naturalWidth > 0) && (img.naturalHeight > 0)) {
+ r += img.naturalWidth / img.naturalHeight;
+ } else {
+ // assume that not loaded images are square
+ r += 1;
+ }
+ }
+
+ return width / r; //have to round down because Firefox will automatically roundup value with number of decimals > 3
+ };
+
+ ImageLayout.prototype._setSize = function(images, height) {
+ var img, imgWidth, imagesLength = images.length;
+ for (var i = 0; i < imagesLength; i++) {
+ img = images[i];
+ if ((img.naturalWidth > 0) && (img.naturalHeight > 0)) {
+ imgWidth = height * img.naturalWidth / img.naturalHeight;
+ } else {
+ // not loaded image : make it square as _getHeigth said it
+ imgWidth = height;
+ }
+ img.style.width = imgWidth + 'px';
+ img.style.height = height + 'px';
+ img.style.marginLeft = '3px';
+ img.style.marginTop = '3px';
+ img.style.marginRight = this.margin - 7 + 'px'; // -4 is the negative margin of the inline element
+ img.style.marginBottom = this.margin - 7 + 'px';
+ }
+ };
+
+ ImageLayout.prototype._alignImgs = function(imgGroup) {
+ var slice, h,
+ containerWidth = d.querySelector(this.container_selector).clientWidth;
+
+ w: while (imgGroup.length > 0) {
+ for (var i = 1; i <= imgGroup.length; i++) {
+ slice = imgGroup.slice(0, i);
+ h = this._getHeigth(slice, containerWidth);
+ if (h < this.maxHeight) {
+ this._setSize(slice, h);
+ imgGroup = imgGroup.slice(i);
+ continue w;
+ }
+ }
+ this._setSize(slice, Math.min(this.maxHeight, h));
+ break;
+ }
+ };
+
+ ImageLayout.prototype.align = function(results_selector) {
+ var results_selectorNode = d.querySelectorAll(this.results_selector),
+ results_length = results_selectorNode.length,
+ previous = null,
+ current = null,
+ imgGroup = [];
+ for (var i = 0; i < results_length; i++) {
+ current = results_selectorNode[i];
+ if (current.previousElementSibling !== previous && imgGroup.length > 0) {
+ // the current image is not conected to previous one
+ // so the current image is the start of a new group of images.
+ // so call _alignImgs to align the current group
+ this._alignImgs(imgGroup);
+ // and start a new empty group of images
+ imgGroup = [];
+ }
+ // add the current image to the group (only the img tag)
+ imgGroup.push(current.querySelector(this.img_selector));
+ // update the previous variable
+ previous = current;
+ }
+ // align the remaining images
+ if (imgGroup.length > 0) {
+ this._alignImgs(imgGroup);
+ }
+ };
+
+ ImageLayout.prototype.watch = function() {
+ var i, img, imgGroup, imgNodeLength,
+ obj = this,
+ results_nodes = d.querySelectorAll(this.results_selector),
+ results_length = results_nodes.length;
+
+ function align(e) {
+ obj.align();
+ }
+
+ function throttleAlign(e) {
+ if (obj._alignAllDone) {
+ obj._alignAllDone = false;
+ setTimeout(function() {
+ obj.align();
+ obj._alignAllDone = true;
+ }, 100);
+ }
+ }
+
+ w.addEventListener('resize', throttleAlign);
+ w.addEventListener('pageshow', align);
+
+ for (i = 0; i < results_length; i++) {
+ img = results_nodes[i].querySelector(this.img_selector);
+ if (typeof img !== 'undefined') {
+ img.addEventListener('load', throttleAlign);
+ img.addEventListener('error', throttleAlign);
+ }
+ }
+ };
+
+ w.searx.ImageLayout = ImageLayout;
+
+})(window, document);
diff --git a/searx/static/themes/simple/js/searx_src/searx_keyboard.js b/searx/static/themes/simple/js/searx_src/searx_keyboard.js
new file mode 100644
index 000000000..657d9ec93
--- /dev/null
+++ b/searx/static/themes/simple/js/searx_src/searx_keyboard.js
@@ -0,0 +1,366 @@
+searx.ready(function() {
+
+ searx.on('.result', 'click', function() {
+ highlightResult(this)(true);
+ });
+
+ searx.on('.result a', 'focus', function(e) {
+ var el = e.target;
+ while (el !== undefined) {
+ if (el.classList.contains('result')) {
+ if (el.getAttribute("data-vim-selected") === null) {
+ highlightResult(el)(true);
+ }
+ break;
+ }
+ el = el.parentNode;
+ }
+ }, true);
+
+ var vimKeys = {
+ 27: {
+ key: 'Escape',
+ fun: removeFocus,
+ des: 'remove focus from the focused input',
+ cat: 'Control'
+ },
+ 73: {
+ key: 'i',
+ fun: searchInputFocus,
+ des: 'focus on the search input',
+ cat: 'Control'
+ },
+ 66: {
+ key: 'b',
+ fun: scrollPage(-window.innerHeight),
+ des: 'scroll one page up',
+ cat: 'Navigation'
+ },
+ 70: {
+ key: 'f',
+ fun: scrollPage(window.innerHeight),
+ des: 'scroll one page down',
+ cat: 'Navigation'
+ },
+ 85: {
+ key: 'u',
+ fun: scrollPage(-window.innerHeight / 2),
+ des: 'scroll half a page up',
+ cat: 'Navigation'
+ },
+ 68: {
+ key: 'd',
+ fun: scrollPage(window.innerHeight / 2),
+ des: 'scroll half a page down',
+ cat: 'Navigation'
+ },
+ 71: {
+ key: 'g',
+ fun: scrollPageTo(-document.body.scrollHeight, 'top'),
+ des: 'scroll to the top of the page',
+ cat: 'Navigation'
+ },
+ 86: {
+ key: 'v',
+ fun: scrollPageTo(document.body.scrollHeight, 'bottom'),
+ des: 'scroll to the bottom of the page',
+ cat: 'Navigation'
+ },
+ 75: {
+ key: 'k',
+ fun: highlightResult('up'),
+ des: 'select previous search result',
+ cat: 'Results'
+ },
+ 74: {
+ key: 'j',
+ fun: highlightResult('down'),
+ des: 'select next search result',
+ cat: 'Results'
+ },
+ 80: {
+ key: 'p',
+ fun: pageButtonClick(0),
+ des: 'go to previous page',
+ cat: 'Results'
+ },
+ 78: {
+ key: 'n',
+ fun: pageButtonClick(1),
+ des: 'go to next page',
+ cat: 'Results'
+ },
+ 79: {
+ key: 'o',
+ fun: openResult(false),
+ des: 'open search result',
+ cat: 'Results'
+ },
+ 84: {
+ key: 't',
+ fun: openResult(true),
+ des: 'open the result in a new tab',
+ cat: 'Results'
+ },
+ 82: {
+ key: 'r',
+ fun: reloadPage,
+ des: 'reload page from the server',
+ cat: 'Control'
+ },
+ 72: {
+ key: 'h',
+ fun: toggleHelp,
+ des: 'toggle help window',
+ cat: 'Other'
+ }
+ };
+
+ searx.on(document, "keydown", function(e) {
+ // check for modifiers so we don't break browser's hotkeys
+ if (vimKeys.hasOwnProperty(e.keyCode) && !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) {
+ var tagName = e.target.tagName.toLowerCase();
+ if (e.keyCode === 27) {
+ if (tagName === 'input' || tagName === 'select' || tagName === 'textarea') {
+ vimKeys[e.keyCode].fun();
+ }
+ } else {
+ if (e.target === document.body || tagName === 'a' || tagName === 'button') {
+ e.preventDefault();
+ vimKeys[e.keyCode].fun();
+ }
+ }
+ }
+ });
+
+ function highlightResult(which) {
+ return function(noScroll) {
+ var current = document.querySelector('.result[data-vim-selected]'),
+ effectiveWhich = which;
+ if (current === null) {
+ // no selection : choose the first one
+ current = document.querySelector('.result');
+ if (current === null) {
+ // no first one : there are no results
+ return;
+ }
+ // replace up/down actions by selecting first one
+ if (which === "down" || which === "up") {
+ effectiveWhich = current;
+ }
+ }
+
+ var next, results = document.querySelectorAll('.result');
+
+ if (typeof effectiveWhich !== 'string') {
+ next = effectiveWhich;
+ } else {
+ switch (effectiveWhich) {
+ case 'visible':
+ var top = document.documentElement.scrollTop || document.body.scrollTop;
+ var bot = top + document.documentElement.clientHeight;
+
+ for (var i = 0; i < results.length; i++) {
+ next = results[i];
+ var etop = next.offsetTop;
+ var ebot = etop + next.clientHeight;
+
+ if ((ebot <= bot) && (etop > top)) {
+ break;
+ }
+ }
+ break;
+ case 'down':
+ next = current.nextElementSibling;
+ if (next === null) {
+ next = results[0];
+ }
+ break;
+ case 'up':
+ next = current.previousElementSibling;
+ if (next === null) {
+ next = results[results.length - 1];
+ }
+ break;
+ case 'bottom':
+ next = results[results.length - 1];
+ break;
+ case 'top':
+ /* falls through */
+ default:
+ next = results[0];
+ }
+ }
+
+ if (next) {
+ current.removeAttribute('data-vim-selected');
+ next.setAttribute('data-vim-selected', 'true');
+ var link = next.querySelector('h3 a') || next.querySelector('a');
+ if (link !== null) {
+ link.focus();
+ }
+ if (!noScroll) {
+ scrollPageToSelected();
+ }
+ }
+ };
+ }
+
+ function reloadPage() {
+ document.location.reload(true);
+ }
+
+ function removeFocus() {
+ if (document.activeElement) {
+ document.activeElement.blur();
+ }
+ }
+
+ function pageButtonClick(num) {
+ return function() {
+ var buttons = $('div#pagination button[type="submit"]');
+ if (buttons.length !== 2) {
+ console.log('page navigation with this theme is not supported');
+ return;
+ }
+ if (num >= 0 && num < buttons.length) {
+ buttons[num].click();
+ } else {
+ console.log('pageButtonClick(): invalid argument');
+ }
+ };
+ }
+
+ function scrollPageToSelected() {
+ var sel = document.querySelector('.result[data-vim-selected]');
+ if (sel === null) {
+ return;
+ }
+ var wtop = document.documentElement.scrollTop || document.body.scrollTop,
+ wheight = document.documentElement.clientHeight,
+ etop = sel.offsetTop,
+ ebot = etop + sel.clientHeight,
+ offset = 120;
+ // first element ?
+ if ((sel.previousElementSibling === null) && (ebot < wheight)) {
+ // set to the top of page if the first element
+ // is fully included in the viewport
+ window.scroll(window.scrollX, 0);
+ return;
+ }
+ if (wtop > (etop - offset)) {
+ window.scroll(window.scrollX, etop - offset);
+ } else {
+ var wbot = wtop + wheight;
+ if (wbot < (ebot + offset)) {
+ window.scroll(window.scrollX, ebot - wheight + offset);
+ }
+ }
+ }
+
+ function scrollPage(amount) {
+ return function() {
+ window.scrollBy(0, amount);
+ highlightResult('visible')();
+ };
+ }
+
+ function scrollPageTo(position, nav) {
+ return function() {
+ window.scrollTo(0, position);
+ highlightResult(nav)();
+ };
+ }
+
+ function searchInputFocus() {
+ window.scrollTo(0, 0);
+ document.querySelector('#q').focus();
+ }
+
+ function openResult(newTab) {
+ return function() {
+ var link = document.querySelector('.result[data-vim-selected] h3 a');
+ if (link !== null) {
+ var url = link.getAttribute('href');
+ if (newTab) {
+ window.open(url);
+ } else {
+ window.location.href = url;
+ }
+ }
+ };
+ }
+
+ function initHelpContent(divElement) {
+ var categories = {};
+
+ for (var k in vimKeys) {
+ var key = vimKeys[k];
+ categories[key.cat] = categories[key.cat] || [];
+ categories[key.cat].push(key);
+ }
+
+ var sorted = Object.keys(categories).sort(function(a, b) {
+ return categories[b].length - categories[a].length;
+ });
+
+ if (sorted.length === 0) {
+ return;
+ }
+
+ var html = '<a href="#" class="close" aria-label="close" title="close">×</a>';
+ html += '<h3>How to navigate searx with Vim-like hotkeys</h3>';
+ html += '<table>';
+
+ for (var i = 0; i < sorted.length; i++) {
+ var cat = categories[sorted[i]];
+
+ var lastCategory = i === (sorted.length - 1);
+ var first = i % 2 === 0;
+
+ if (first) {
+ html += '<tr>';
+ }
+ html += '<td>';
+
+ html += '<h4>' + cat[0].cat + '</h4>';
+ html += '<ul class="list-unstyled">';
+
+ for (var cj in cat) {
+ html += '<li><kbd>' + cat[cj].key + '</kbd> ' + cat[cj].des + '</li>';
+ }
+
+ html += '</ul>';
+ html += '</td>'; // col-sm-*
+
+ if (!first || lastCategory) {
+ html += '</tr>'; // row
+ }
+ }
+
+ html += '</table>';
+
+ divElement.innerHTML = html;
+ }
+
+ function toggleHelp() {
+ var helpPanel = document.querySelector('#vim-hotkeys-help');
+ console.log(helpPanel);
+ if (helpPanel === undefined || helpPanel === null) {
+ // first call
+ helpPanel = document.createElement('div');
+ helpPanel.id = 'vim-hotkeys-help';
+ helpPanel.className='dialog-modal';
+ helpPanel.style='width: 40%';
+ initHelpContent(helpPanel);
+ var body = document.getElementsByTagName('body')[0];
+ body.appendChild(helpPanel);
+ } else {
+ // togggle hidden
+ helpPanel.classList.toggle('invisible');
+ return;
+ }
+
+ }
+
+});
diff --git a/searx/static/themes/simple/js/searx_src/searx_mapresult.js b/searx/static/themes/simple/js/searx_src/searx_mapresult.js
new file mode 100644
index 000000000..869d07da0
--- /dev/null
+++ b/searx/static/themes/simple/js/searx_src/searx_mapresult.js
@@ -0,0 +1,176 @@
+/**
+* searx is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Affero General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* searx is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Affero General Public License for more details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with searx. If not, see < http://www.gnu.org/licenses/ >.
+*
+* (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
+* (C) 2017 by Alexandre Flament, <alex@al-f.net>
+*/
+(function (w, d, searx) {
+ 'use strict';
+
+ searx.ready(function () {
+ searx.on('.searx_overpass_request', 'click', function(event) {
+ // no more request
+ this.classList.remove("searx_overpass_request");
+
+ //
+ var overpass_url = "https://overpass-api.de/api/interpreter?data=";
+ var query_start = overpass_url + "[out:json][timeout:25];(";
+ var query_end = ");out meta;";
+
+ var osm_id = this.dataset.osmId;
+ var osm_type = this.dataset.osmType;
+ var result_table = d.querySelector("#" + this.dataset.resultTable);
+ var result_table_loadicon = d.querySelector("#" + this.dataset.resultTableLoadicon);
+
+ // tags which can be ignored
+ var osm_ignore_tags = [ "addr:city", "addr:country", "addr:housenumber", "addr:postcode", "addr:street" ];
+
+ if(osm_id && osm_type && result_table) {
+ var query = null;
+ switch(osm_type) {
+ case 'node':
+ query = query_start + "node(" + osm_id + ");" + query_end;
+ break;
+ case 'way':
+ query = query_start + "way(" + osm_id + ");" + query_end;
+ break;
+ case 'relation':
+ query = query_start + "relation(" + osm_id + ");" + query_end;
+ break;
+ default:
+ break;
+ }
+ if(query) {
+ // console.log(query);
+ searx.http( 'GET', query ).then(function(html, contentType) {
+ html = JSON.parse(html);
+ if(html && html.elements && html.elements[0]) {
+ var element = html.elements[0];
+ var newHtml = "";
+ for (var row in element.tags) {
+ if(element.tags.name === null || osm_ignore_tags.indexOf(row) == -1) {
+ newHtml += "<tr><td>" + row + "</td><td>";
+ switch(row) {
+ case "phone":
+ case "fax":
+ newHtml += "<a href=\"tel:" + element.tags[row].replace(/ /g,'') + "\">" + element.tags[row] + "</a>";
+ break;
+ case "email":
+ newHtml += "<a href=\"mailto:" + element.tags[row] + "\">" + element.tags[row] + "</a>";
+ break;
+ case "website":
+ case "url":
+ newHtml += "<a href=\"" + element.tags[row] + "\">" + element.tags[row] + "</a>";
+ break;
+ case "wikidata":
+ newHtml += "<a href=\"https://www.wikidata.org/wiki/" + element.tags[row] + "\">" + element.tags[row] + "</a>";
+ break;
+ case "wikipedia":
+ if(element.tags[row].indexOf(":") != -1) {
+ newHtml += "<a href=\"https://" + element.tags[row].substring(0,element.tags[row].indexOf(":")) + ".wikipedia.org/wiki/" + element.tags[row].substring(element.tags[row].indexOf(":")+1) + "\">" + element.tags[row] + "</a>";
+ break;
+ }
+ /* jshint ignore:start */
+ default:
+ /* jshint ignore:end */
+ newHtml += element.tags[row];
+ break;
+ }
+ newHtml += "</td></tr>";
+ }
+ }
+ result_table_loadicon.parentNode.removeChild(result_table_loadicon);
+ result_table.classList.remove('invisible');
+ result_table.querySelector("tbody").innerHTML = newHtml;
+ }
+ })
+ .catch(function() {
+ result_table_loadicon.classList.remove('invisible');
+ result_table_loadicon.innerHTML = "could not load data!";
+ });
+ }
+ }
+
+ // this event occour only once per element
+ event.preventDefault();
+ });
+
+ searx.on('.searx_init_map', 'click', function(event) {
+ // no more request
+ this.classList.remove("searx_init_map");
+
+ //
+ var leaflet_target = this.dataset.leafletTarget;
+ var map_lon = parseFloat(this.dataset.mapLon);
+ var map_lat = parseFloat(this.dataset.mapLat);
+ var map_zoom = parseFloat(this.dataset.mapZoom);
+ var map_boundingbox = JSON.parse(this.dataset.mapBoundingbox);
+ var map_geojson = JSON.parse(this.dataset.mapGeojson);
+
+ searx.loadStyle('leaflet/leaflet.css');
+ searx.loadScript('leaflet/leaflet.js', function() {
+ var map_bounds = null;
+ if(map_boundingbox) {
+ var southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]);
+ var northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]);
+ map_bounds = L.latLngBounds(southWest, northEast);
+ }
+
+ // init map
+ var map = L.map(leaflet_target);
+ // create the tile layer with correct attribution
+ var osmMapnikUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
+ var osmMapnikAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
+ var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib});
+ var osmWikimediaUrl='https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png';
+ var osmWikimediaAttrib = 'Wikimedia maps beta | Maps data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
+ var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib});
+ // init map view
+ if(map_bounds) {
+ // TODO hack: https://github.com/Leaflet/Leaflet/issues/2021
+ // Still useful ?
+ setTimeout(function () {
+ map.fitBounds(map_bounds, {
+ maxZoom:17
+ });
+ }, 0);
+ } else if (map_lon && map_lat) {
+ if(map_zoom) {
+ map.setView(new L.latLng(map_lat, map_lon),map_zoom);
+ } else {
+ map.setView(new L.latLng(map_lat, map_lon),8);
+ }
+ }
+
+ map.addLayer(osmMapnik);
+
+ var baseLayers = {
+ "OSM Mapnik": osmMapnik/*,
+ "OSM Wikimedia": osmWikimedia*/
+ };
+
+ L.control.layers(baseLayers).addTo(map);
+
+ if(map_geojson) {
+ L.geoJson(map_geojson).addTo(map);
+ } /*else if(map_bounds) {
+ L.rectangle(map_bounds, {color: "#ff7800", weight: 3, fill:false}).addTo(map);
+ }*/
+ });
+
+ // this event occour only once per element
+ event.preventDefault();
+ });
+ });
+})(window, document, window.searx);
diff --git a/searx/static/themes/simple/js/searx_src/searx_results.js b/searx/static/themes/simple/js/searx_src/searx_results.js
new file mode 100644
index 000000000..b13da8391
--- /dev/null
+++ b/searx/static/themes/simple/js/searx_src/searx_results.js
@@ -0,0 +1,63 @@
+/**
+* searx is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Affero General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* searx is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Affero General Public License for more details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with searx. If not, see < http://www.gnu.org/licenses/ >.
+*
+* (C) 2017 by Alexandre Flament, <alex@al-f.net>
+*/
+(function(w, d, searx) {
+ 'use strict';
+
+ searx.ready(function() {
+ searx.image_thumbnail_layout = new searx.ImageLayout('#urls', '#urls .result-images', 'img.image_thumbnail', 200);
+ searx.image_thumbnail_layout.watch();
+
+ searx.on('.btn-collapse', 'click', function(event) {
+ var btnLabelCollapsed = this.getAttribute('data-btn-text-collapsed');
+ var btnLabelNotCollapsed = this.getAttribute('data-btn-text-not-collapsed');
+ var target = this.getAttribute('data-target');
+ var targetElement = d.querySelector(target);
+ var html = this.innerHTML;
+ if (this.classList.contains('collapsed')) {
+ html = html.replace(btnLabelCollapsed, btnLabelNotCollapsed);
+ } else {
+ html = html.replace(btnLabelNotCollapsed, btnLabelCollapsed);
+ }
+ this.innerHTML = html;
+ this.classList.toggle('collapsed');
+ targetElement.classList.toggle('invisible');
+ });
+
+ searx.on('.media-loader', 'click', function(event) {
+ var target = this.getAttribute('data-target');
+ var iframe_load = d.querySelector(target + ' > iframe');
+ var srctest = iframe_load.getAttribute('src');
+ if (srctest === null || srctest === undefined || srctest === false) {
+ iframe_load.setAttribute('src', iframe_load.getAttribute('data-src'));
+ }
+ });
+
+ w.addEventListener('scroll', function() {
+ var e = d.getElementById('backToTop'),
+ scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
+ if (e !== null) {
+ if (scrollTop >= 200) {
+ e.style.opacity = 1;
+ } else {
+ e.style.opacity = 0;
+ }
+ }
+ });
+
+ });
+
+})(window, document, window.searx);
diff --git a/searx/static/themes/simple/js/searx_src/searx_search.js b/searx/static/themes/simple/js/searx_src/searx_search.js
new file mode 100644
index 000000000..580d98d6a
--- /dev/null
+++ b/searx/static/themes/simple/js/searx_src/searx_search.js
@@ -0,0 +1,117 @@
+/**
+* searx is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Affero General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* searx is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Affero General Public License for more details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with searx. If not, see < http://www.gnu.org/licenses/ >.
+*
+* (C) 2017 by Alexandre Flament, <alex@al-f.net>
+*/
+(function(w, d, searx) {
+ 'use strict';
+
+ var firstFocus = true, qinput_id = "q", qinput;
+
+ function placeCursorAtEnd(element) {
+ if (element.setSelectionRange) {
+ var len = element.value.length;
+ element.setSelectionRange(len, len);
+ }
+ }
+
+ function submitIfQuery() {
+ if (qinput.value.length > 0) {
+ var search = document.getElementById('search');
+ setTimeout(search.submit.bind(search), 0);
+ }
+ }
+
+ function createClearButton(qinput) {
+ var cs = document.getElementById('clear_search');
+ var updateClearButton = function() {
+ if (qinput.value.length === 0) {
+ cs.classList.add("empty");
+ } else {
+ cs.classList.remove("empty");
+ }
+ };
+
+ // update status, event listener
+ updateClearButton();
+ cs.addEventListener('click', function() {
+ qinput.value='';
+ qinput.focus();
+ updateClearButton();
+ });
+ qinput.addEventListener('keyup', updateClearButton, false);
+ }
+
+ searx.ready(function() {
+ qinput = d.getElementById(qinput_id);
+
+ function placeCursorAtEndOnce(e) {
+ if (firstFocus) {
+ placeCursorAtEnd(qinput);
+ firstFocus = false;
+ } else {
+ // e.preventDefault();
+ }
+ }
+
+ if (qinput !== null) {
+ // clear button
+ createClearButton(qinput);
+
+ // autocompleter
+ if (searx.autocompleter) {
+ searx.autocomplete = AutoComplete.call(w, {
+ Url: "./autocompleter",
+ EmptyMessage: searx.no_item_found,
+ HttpMethod: searx.method,
+ MinChars: 4,
+ Delay: 300,
+ }, "#" + qinput_id);
+
+ // hack, see : https://github.com/autocompletejs/autocomplete.js/issues/37
+ w.addEventListener('resize', function() {
+ var event = new CustomEvent("position");
+ qinput.dispatchEvent(event);
+ });
+ }
+
+ qinput.addEventListener('focus', placeCursorAtEndOnce, false);
+ qinput.focus();
+ }
+
+ // vanilla js version of search_on_category_select.js
+ if (qinput !== null && searx.search_on_category_select) {
+ d.querySelector('.help').className='invisible';
+
+ searx.on('#categories input', 'change', function(e) {
+ var i, categories = d.querySelectorAll('#categories input[type="checkbox"]');
+ for(i=0; i<categories.length; i++) {
+ if (categories[i] !== this && categories[i].checked) {
+ categories[i].click();
+ }
+ }
+ if (! this.checked) {
+ this.click();
+ }
+ submitIfQuery();
+ return false;
+ });
+
+ searx.on(d.getElementById('time_range'), 'change', submitIfQuery);
+ searx.on(d.getElementById('language'), 'change', submitIfQuery);
+ }
+
+ });
+
+})(window, document, window.searx);
diff --git a/searx/static/themes/simple/leaflet/images/layers-2x.png b/searx/static/themes/simple/leaflet/images/layers-2x.png
new file mode 100644
index 000000000..200c333dc
--- /dev/null
+++ b/searx/static/themes/simple/leaflet/images/layers-2x.png
Binary files differ
diff --git a/searx/static/themes/simple/leaflet/images/layers.png b/searx/static/themes/simple/leaflet/images/layers.png
new file mode 100644
index 000000000..1a72e5784
--- /dev/null
+++ b/searx/static/themes/simple/leaflet/images/layers.png
Binary files differ
diff --git a/searx/static/themes/simple/leaflet/images/marker-icon-2x-green.png b/searx/static/themes/simple/leaflet/images/marker-icon-2x-green.png
new file mode 100644
index 000000000..7446bb031
--- /dev/null
+++ b/searx/static/themes/simple/leaflet/images/marker-icon-2x-green.png
Binary files differ
diff --git a/searx/static/themes/simple/leaflet/images/marker-icon-2x-orange.png b/searx/static/themes/simple/leaflet/images/marker-icon-2x-orange.png
new file mode 100644
index 000000000..ecd67736f
--- /dev/null
+++ b/searx/static/themes/simple/leaflet/images/marker-icon-2x-orange.png
Binary files differ
diff --git a/searx/static/themes/simple/leaflet/images/marker-icon-2x-red.png b/searx/static/themes/simple/leaflet/images/marker-icon-2x-red.png
new file mode 100644
index 000000000..1d2e197c6
--- /dev/null
+++ b/searx/static/themes/simple/leaflet/images/marker-icon-2x-red.png
Binary files differ
diff --git a/searx/static/themes/simple/leaflet/images/marker-icon-2x.png b/searx/static/themes/simple/leaflet/images/marker-icon-2x.png
new file mode 100644
index 000000000..88f9e5018
--- /dev/null
+++ b/searx/static/themes/simple/leaflet/images/marker-icon-2x.png
Binary files differ
diff --git a/searx/static/themes/simple/leaflet/images/marker-icon-green.png b/searx/static/themes/simple/leaflet/images/marker-icon-green.png
new file mode 100644
index 000000000..f48ef41df
--- /dev/null
+++ b/searx/static/themes/simple/leaflet/images/marker-icon-green.png
Binary files differ
diff --git a/searx/static/themes/simple/leaflet/images/marker-icon-orange.png b/searx/static/themes/simple/leaflet/images/marker-icon-orange.png
new file mode 100644
index 000000000..d0d22205c
--- /dev/null
+++ b/searx/static/themes/simple/leaflet/images/marker-icon-orange.png
Binary files differ
diff --git a/searx/static/themes/simple/leaflet/images/marker-icon-red.png b/searx/static/themes/simple/leaflet/images/marker-icon-red.png
new file mode 100644
index 000000000..7a92b9e04
--- /dev/null
+++ b/searx/static/themes/simple/leaflet/images/marker-icon-red.png
Binary files differ
diff --git a/searx/static/themes/simple/leaflet/images/marker-icon.png b/searx/static/themes/simple/leaflet/images/marker-icon.png
new file mode 100644
index 000000000..950edf246
--- /dev/null
+++ b/searx/static/themes/simple/leaflet/images/marker-icon.png
Binary files differ
diff --git a/searx/static/themes/simple/leaflet/images/marker-shadow.png b/searx/static/themes/simple/leaflet/images/marker-shadow.png
new file mode 100644
index 000000000..9fd297953
--- /dev/null
+++ b/searx/static/themes/simple/leaflet/images/marker-shadow.png
Binary files differ
diff --git a/searx/static/themes/simple/leaflet/leaflet.css b/searx/static/themes/simple/leaflet/leaflet.css
new file mode 100644
index 000000000..d1b47a125
--- /dev/null
+++ b/searx/static/themes/simple/leaflet/leaflet.css
@@ -0,0 +1,636 @@
+/* required styles */
+
+.leaflet-pane,
+.leaflet-tile,
+.leaflet-marker-icon,
+.leaflet-marker-shadow,
+.leaflet-tile-container,
+.leaflet-pane > svg,
+.leaflet-pane > canvas,
+.leaflet-zoom-box,
+.leaflet-image-layer,
+.leaflet-layer {
+ position: absolute;
+ left: 0;
+ top: 0;
+ }
+.leaflet-container {
+ overflow: hidden;
+ }
+.leaflet-tile,
+.leaflet-marker-icon,
+.leaflet-marker-shadow {
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
+ -webkit-user-drag: none;
+ }
+/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
+.leaflet-safari .leaflet-tile {
+ image-rendering: -webkit-optimize-contrast;
+ }
+/* hack that prevents hw layers "stretching" when loading new tiles */
+.leaflet-safari .leaflet-tile-container {
+ width: 1600px;
+ height: 1600px;
+ -webkit-transform-origin: 0 0;
+ }
+.leaflet-marker-icon,
+.leaflet-marker-shadow {
+ display: block;
+ }
+/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
+/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
+.leaflet-container .leaflet-overlay-pane svg,
+.leaflet-container .leaflet-marker-pane img,
+.leaflet-container .leaflet-shadow-pane img,
+.leaflet-container .leaflet-tile-pane img,
+.leaflet-container img.leaflet-image-layer {
+ max-width: none !important;
+ max-height: none !important;
+ }
+
+.leaflet-container.leaflet-touch-zoom {
+ -ms-touch-action: pan-x pan-y;
+ touch-action: pan-x pan-y;
+ }
+.leaflet-container.leaflet-touch-drag {
+ -ms-touch-action: pinch-zoom;
+ /* Fallback for FF which doesn't support pinch-zoom */
+ touch-action: none;
+ touch-action: pinch-zoom;
+}
+.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
+ -ms-touch-action: none;
+ touch-action: none;
+}
+.leaflet-container {
+ -webkit-tap-highlight-color: transparent;
+}
+.leaflet-container a {
+ -webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
+}
+.leaflet-tile {
+ filter: inherit;
+ visibility: hidden;
+ }
+.leaflet-tile-loaded {
+ visibility: inherit;
+ }
+.leaflet-zoom-box {
+ width: 0;
+ height: 0;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ z-index: 800;
+ }
+/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
+.leaflet-overlay-pane svg {
+ -moz-user-select: none;
+ }
+
+.leaflet-pane { z-index: 400; }
+
+.leaflet-tile-pane { z-index: 200; }
+.leaflet-overlay-pane { z-index: 400; }
+.leaflet-shadow-pane { z-index: 500; }
+.leaflet-marker-pane { z-index: 600; }
+.leaflet-tooltip-pane { z-index: 650; }
+.leaflet-popup-pane { z-index: 700; }
+
+.leaflet-map-pane canvas { z-index: 100; }
+.leaflet-map-pane svg { z-index: 200; }
+
+.leaflet-vml-shape {
+ width: 1px;
+ height: 1px;
+ }
+.lvml {
+ behavior: url(#default#VML);
+ display: inline-block;
+ position: absolute;
+ }
+
+
+/* control positioning */
+
+.leaflet-control {
+ position: relative;
+ z-index: 800;
+ pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
+ pointer-events: auto;
+ }
+.leaflet-top,
+.leaflet-bottom {
+ position: absolute;
+ z-index: 1000;
+ pointer-events: none;
+ }
+.leaflet-top {
+ top: 0;
+ }
+.leaflet-right {
+ right: 0;
+ }
+.leaflet-bottom {
+ bottom: 0;
+ }
+.leaflet-left {
+ left: 0;
+ }
+.leaflet-control {
+ float: left;
+ clear: both;
+ }
+.leaflet-right .leaflet-control {
+ float: right;
+ }
+.leaflet-top .leaflet-control {
+ margin-top: 10px;
+ }
+.leaflet-bottom .leaflet-control {
+ margin-bottom: 10px;
+ }
+.leaflet-left .leaflet-control {
+ margin-left: 10px;
+ }
+.leaflet-right .leaflet-control {
+ margin-right: 10px;
+ }
+
+
+/* zoom and fade animations */
+
+.leaflet-fade-anim .leaflet-tile {
+ will-change: opacity;
+ }
+.leaflet-fade-anim .leaflet-popup {
+ opacity: 0;
+ -webkit-transition: opacity 0.2s linear;
+ -moz-transition: opacity 0.2s linear;
+ -o-transition: opacity 0.2s linear;
+ transition: opacity 0.2s linear;
+ }
+.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
+ opacity: 1;
+ }
+.leaflet-zoom-animated {
+ -webkit-transform-origin: 0 0;
+ -ms-transform-origin: 0 0;
+ transform-origin: 0 0;
+ }
+.leaflet-zoom-anim .leaflet-zoom-animated {
+ will-change: transform;
+ }
+.leaflet-zoom-anim .leaflet-zoom-animated {
+ -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
+ -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
+ -o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1);
+ transition: transform 0.25s cubic-bezier(0,0,0.25,1);
+ }
+.leaflet-zoom-anim .leaflet-tile,
+.leaflet-pan-anim .leaflet-tile {
+ -webkit-transition: none;
+ -moz-transition: none;
+ -o-transition: none;
+ transition: none;
+ }
+
+.leaflet-zoom-anim .leaflet-zoom-hide {
+ visibility: hidden;
+ }
+
+
+/* cursors */
+
+.leaflet-interactive {
+ cursor: pointer;
+ }
+.leaflet-grab {
+ cursor: -webkit-grab;
+ cursor: -moz-grab;
+ }
+.leaflet-crosshair,
+.leaflet-crosshair .leaflet-interactive {
+ cursor: crosshair;
+ }
+.leaflet-popup-pane,
+.leaflet-control {
+ cursor: auto;
+ }
+.leaflet-dragging .leaflet-grab,
+.leaflet-dragging .leaflet-grab .leaflet-interactive,
+.leaflet-dragging .leaflet-marker-draggable {
+ cursor: move;
+ cursor: -webkit-grabbing;
+ cursor: -moz-grabbing;
+ }
+
+/* marker & overlays interactivity */
+.leaflet-marker-icon,
+.leaflet-marker-shadow,
+.leaflet-image-layer,
+.leaflet-pane > svg path,
+.leaflet-tile-container {
+ pointer-events: none;
+ }
+
+.leaflet-marker-icon.leaflet-interactive,
+.leaflet-image-layer.leaflet-interactive,
+.leaflet-pane > svg path.leaflet-interactive {
+ pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
+ pointer-events: auto;
+ }
+
+/* visual tweaks */
+
+.leaflet-container {
+ background: #ddd;
+ outline: 0;
+ }
+.leaflet-container a {
+ color: #0078A8;
+ }
+.leaflet-container a.leaflet-active {
+ outline: 2px solid orange;
+ }
+.leaflet-zoom-box {
+ border: 2px dotted #38f;
+ background: rgba(255,255,255,0.5);
+ }
+
+
+/* general typography */
+.leaflet-container {
+ font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
+ }
+
+
+/* general toolbar styles */
+
+.leaflet-bar {
+ box-shadow: 0 1px 5px rgba(0,0,0,0.65);
+ border-radius: 4px;
+ }
+.leaflet-bar a,
+.leaflet-bar a:hover {
+ background-color: #fff;
+ border-bottom: 1px solid #ccc;
+ width: 26px;
+ height: 26px;
+ line-height: 26px;
+ display: block;
+ text-align: center;
+ text-decoration: none;
+ color: black;
+ }
+.leaflet-bar a,
+.leaflet-control-layers-toggle {
+ background-position: 50% 50%;
+ background-repeat: no-repeat;
+ display: block;
+ }
+.leaflet-bar a:hover {
+ background-color: #f4f4f4;
+ }
+.leaflet-bar a:first-child {
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+ }
+.leaflet-bar a:last-child {
+ border-bottom-left-radius: 4px;
+ border-bottom-right-radius: 4px;
+ border-bottom: none;
+ }
+.leaflet-bar a.leaflet-disabled {
+ cursor: default;
+ background-color: #f4f4f4;
+ color: #bbb;
+ }
+
+.leaflet-touch .leaflet-bar a {
+ width: 30px;
+ height: 30px;
+ line-height: 30px;
+ }
+.leaflet-touch .leaflet-bar a:first-child {
+ border-top-left-radius: 2px;
+ border-top-right-radius: 2px;
+ }
+.leaflet-touch .leaflet-bar a:last-child {
+ border-bottom-left-radius: 2px;
+ border-bottom-right-radius: 2px;
+ }
+
+/* zoom control */
+
+.leaflet-control-zoom-in,
+.leaflet-control-zoom-out {
+ font: bold 18px 'Lucida Console', Monaco, monospace;
+ text-indent: 1px;
+ }
+
+.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {
+ font-size: 22px;
+ }
+
+
+/* layers control */
+
+.leaflet-control-layers {
+ box-shadow: 0 1px 5px rgba(0,0,0,0.4);
+ background: #fff;
+ border-radius: 5px;
+ }
+.leaflet-control-layers-toggle {
+ background-image: url(images/layers.png);
+ width: 36px;
+ height: 36px;
+ }
+.leaflet-retina .leaflet-control-layers-toggle {
+ background-image: url(images/layers-2x.png);
+ background-size: 26px 26px;
+ }
+.leaflet-touch .leaflet-control-layers-toggle {
+ width: 44px;
+ height: 44px;
+ }
+.leaflet-control-layers .leaflet-control-layers-list,
+.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
+ display: none;
+ }
+.leaflet-control-layers-expanded .leaflet-control-layers-list {
+ display: block;
+ position: relative;
+ }
+.leaflet-control-layers-expanded {
+ padding: 6px 10px 6px 6px;
+ color: #333;
+ background: #fff;
+ }
+.leaflet-control-layers-scrollbar {
+ overflow-y: scroll;
+ overflow-x: hidden;
+ padding-right: 5px;
+ }
+.leaflet-control-layers-selector {
+ margin-top: 2px;
+ position: relative;
+ top: 1px;
+ }
+.leaflet-control-layers label {
+ display: block;
+ }
+.leaflet-control-layers-separator {
+ height: 0;
+ border-top: 1px solid #ddd;
+ margin: 5px -10px 5px -6px;
+ }
+
+/* Default icon URLs */
+.leaflet-default-icon-path {
+ background-image: url(images/marker-icon.png);
+ }
+
+
+/* attribution and scale controls */
+
+.leaflet-container .leaflet-control-attribution {
+ background: #fff;
+ background: rgba(255, 255, 255, 0.7);
+ margin: 0;
+ }
+.leaflet-control-attribution,
+.leaflet-control-scale-line {
+ padding: 0 5px;
+ color: #333;
+ }
+.leaflet-control-attribution a {
+ text-decoration: none;
+ }
+.leaflet-control-attribution a:hover {
+ text-decoration: underline;
+ }
+.leaflet-container .leaflet-control-attribution,
+.leaflet-container .leaflet-control-scale {
+ font-size: 11px;
+ }
+.leaflet-left .leaflet-control-scale {
+ margin-left: 5px;
+ }
+.leaflet-bottom .leaflet-control-scale {
+ margin-bottom: 5px;
+ }
+.leaflet-control-scale-line {
+ border: 2px solid #777;
+ border-top: none;
+ line-height: 1.1;
+ padding: 2px 5px 1px;
+ font-size: 11px;
+ white-space: nowrap;
+ overflow: hidden;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+
+ background: #fff;
+ background: rgba(255, 255, 255, 0.5);
+ }
+.leaflet-control-scale-line:not(:first-child) {
+ border-top: 2px solid #777;
+ border-bottom: none;
+ margin-top: -2px;
+ }
+.leaflet-control-scale-line:not(:first-child):not(:last-child) {
+ border-bottom: 2px solid #777;
+ }
+
+.leaflet-touch .leaflet-control-attribution,
+.leaflet-touch .leaflet-control-layers,
+.leaflet-touch .leaflet-bar {
+ box-shadow: none;
+ }
+.leaflet-touch .leaflet-control-layers,
+.leaflet-touch .leaflet-bar {
+ border: 2px solid rgba(0,0,0,0.2);
+ background-clip: padding-box;
+ }
+
+
+/* popup */
+
+.leaflet-popup {
+ position: absolute;
+ text-align: center;
+ margin-bottom: 20px;
+ }
+.leaflet-popup-content-wrapper {
+ padding: 1px;
+ text-align: left;
+ border-radius: 12px;
+ }
+.leaflet-popup-content {
+ margin: 13px 19px;
+ line-height: 1.4;
+ }
+.leaflet-popup-content p {
+ margin: 18px 0;
+ }
+.leaflet-popup-tip-container {
+ width: 40px;
+ height: 20px;
+ position: absolute;
+ left: 50%;
+ margin-left: -20px;
+ overflow: hidden;
+ pointer-events: none;
+ }
+.leaflet-popup-tip {
+ width: 17px;
+ height: 17px;
+ padding: 1px;
+
+ margin: -10px auto 0;
+
+ -webkit-transform: rotate(45deg);
+ -moz-transform: rotate(45deg);
+ -ms-transform: rotate(45deg);
+ -o-transform: rotate(45deg);
+ transform: rotate(45deg);
+ }
+.leaflet-popup-content-wrapper,
+.leaflet-popup-tip {
+ background: white;
+ color: #333;
+ box-shadow: 0 3px 14px rgba(0,0,0,0.4);
+ }
+.leaflet-container a.leaflet-popup-close-button {
+ position: absolute;
+ top: 0;
+ right: 0;
+ padding: 4px 4px 0 0;
+ border: none;
+ text-align: center;
+ width: 18px;
+ height: 14px;
+ font: 16px/14px Tahoma, Verdana, sans-serif;
+ color: #c3c3c3;
+ text-decoration: none;
+ font-weight: bold;
+ background: transparent;
+ }
+.leaflet-container a.leaflet-popup-close-button:hover {
+ color: #999;
+ }
+.leaflet-popup-scrolled {
+ overflow: auto;
+ border-bottom: 1px solid #ddd;
+ border-top: 1px solid #ddd;
+ }
+
+.leaflet-oldie .leaflet-popup-content-wrapper {
+ zoom: 1;
+ }
+.leaflet-oldie .leaflet-popup-tip {
+ width: 24px;
+ margin: 0 auto;
+
+ -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
+ filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
+ }
+.leaflet-oldie .leaflet-popup-tip-container {
+ margin-top: -1px;
+ }
+
+.leaflet-oldie .leaflet-control-zoom,
+.leaflet-oldie .leaflet-control-layers,
+.leaflet-oldie .leaflet-popup-content-wrapper,
+.leaflet-oldie .leaflet-popup-tip {
+ border: 1px solid #999;
+ }
+
+
+/* div icon */
+
+.leaflet-div-icon {
+ background: #fff;
+ border: 1px solid #666;
+ }
+
+
+/* Tooltip */
+/* Base styles for the element that has a tooltip */
+.leaflet-tooltip {
+ position: absolute;
+ padding: 6px;
+ background-color: #fff;
+ border: 1px solid #fff;
+ border-radius: 3px;
+ color: #222;
+ white-space: nowrap;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ pointer-events: none;
+ box-shadow: 0 1px 3px rgba(0,0,0,0.4);
+ }
+.leaflet-tooltip.leaflet-clickable {
+ cursor: pointer;
+ pointer-events: auto;
+ }
+.leaflet-tooltip-top:before,
+.leaflet-tooltip-bottom:before,
+.leaflet-tooltip-left:before,
+.leaflet-tooltip-right:before {
+ position: absolute;
+ pointer-events: none;
+ border: 6px solid transparent;
+ background: transparent;
+ content: "";
+ }
+
+/* Directions */
+
+.leaflet-tooltip-bottom {
+ margin-top: 6px;
+}
+.leaflet-tooltip-top {
+ margin-top: -6px;
+}
+.leaflet-tooltip-bottom:before,
+.leaflet-tooltip-top:before {
+ left: 50%;
+ margin-left: -6px;
+ }
+.leaflet-tooltip-top:before {
+ bottom: 0;
+ margin-bottom: -12px;
+ border-top-color: #fff;
+ }
+.leaflet-tooltip-bottom:before {
+ top: 0;
+ margin-top: -12px;
+ margin-left: -6px;
+ border-bottom-color: #fff;
+ }
+.leaflet-tooltip-left {
+ margin-left: -6px;
+}
+.leaflet-tooltip-right {
+ margin-left: 6px;
+}
+.leaflet-tooltip-left:before,
+.leaflet-tooltip-right:before {
+ top: 50%;
+ margin-top: -6px;
+ }
+.leaflet-tooltip-left:before {
+ right: 0;
+ margin-right: -12px;
+ border-left-color: #fff;
+ }
+.leaflet-tooltip-right:before {
+ left: 0;
+ margin-left: -12px;
+ border-right-color: #fff;
+ }
diff --git a/searx/static/themes/simple/leaflet/leaflet.js b/searx/static/themes/simple/leaflet/leaflet.js
new file mode 100644
index 000000000..02ae624a7
--- /dev/null
+++ b/searx/static/themes/simple/leaflet/leaflet.js
@@ -0,0 +1,5 @@
+/* @preserve
+ * Leaflet 1.3.3+Detached: b22aef4aa71afd640bf8e91915b78899bf64ff89.b22aef4, a JS library for interactive maps. http://leafletjs.com
+ * (c) 2010-2018 Vladimir Agafonkin, (c) 2010-2011 CloudMade
+ */
+!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.L={})}(this,function(t){"use strict";function i(t){var i,e,n,o;for(e=1,n=arguments.length;e<n;e++){o=arguments[e];for(i in o)t[i]=o[i]}return t}function e(t,i){var e=Array.prototype.slice;if(t.bind)return t.bind.apply(t,e.call(arguments,1));var n=e.call(arguments,2);return function(){return t.apply(i,n.length?n.concat(e.call(arguments)):arguments)}}function n(t){return t._leaflet_id=t._leaflet_id||++ei,t._leaflet_id}function o(t,i,e){var n,o,s,r;return r=function(){n=!1,o&&(s.apply(e,o),o=!1)},s=function(){n?o=arguments:(t.apply(e,arguments),setTimeout(r,i),n=!0)}}function s(t,i,e){var n=i[1],o=i[0],s=n-o;return t===n&&e?t:((t-o)%s+s)%s+o}function r(){return!1}function a(t,i){var e=Math.pow(10,void 0===i?6:i);return Math.round(t*e)/e}function h(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function u(t){return h(t).split(/\s+/)}function l(t,i){t.hasOwnProperty("options")||(t.options=t.options?ii(t.options):{});for(var e in i)t.options[e]=i[e];return t.options}function c(t,i,e){var n=[];for(var o in t)n.push(encodeURIComponent(e?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(i&&-1!==i.indexOf("?")?"&":"?")+n.join("&")}function _(t,i){return t.replace(ni,function(t,e){var n=i[e];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(i)),n})}function d(t,i){for(var e=0;e<t.length;e++)if(t[e]===i)return e;return-1}function p(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}function m(t){var i=+new Date,e=Math.max(0,16-(i-ri));return ri=i+e,window.setTimeout(t,e)}function f(t,i,n){if(!n||ai!==m)return ai.call(window,e(t,i));t.call(i)}function g(t){t&&hi.call(window,t)}function v(){}function y(t){if("undefined"!=typeof L&&L&&L.Mixin){t=oi(t)?t:[t];for(var i=0;i<t.length;i++)t[i]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}function x(t,i,e){this.x=e?Math.round(t):t,this.y=e?Math.round(i):i}function w(t,i,e){return t instanceof x?t:oi(t)?new x(t[0],t[1]):void 0===t||null===t?t:"object"==typeof t&&"x"in t&&"y"in t?new x(t.x,t.y):new x(t,i,e)}function P(t,i){if(t)for(var e=i?[t,i]:t,n=0,o=e.length;n<o;n++)this.extend(e[n])}function b(t,i){return!t||t instanceof P?t:new P(t,i)}function T(t,i){if(t)for(var e=i?[t,i]:t,n=0,o=e.length;n<o;n++)this.extend(e[n])}function z(t,i){return t instanceof T?t:new T(t,i)}function M(t,i,e){if(isNaN(t)||isNaN(i))throw new Error("Invalid LatLng object: ("+t+", "+i+")");this.lat=+t,this.lng=+i,void 0!==e&&(this.alt=+e)}function C(t,i,e){return t instanceof M?t:oi(t)&&"object"!=typeof t[0]?3===t.length?new M(t[0],t[1],t[2]):2===t.length?new M(t[0],t[1]):null:void 0===t||null===t?t:"object"==typeof t&&"lat"in t?new M(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===i?null:new M(t,i,e)}function S(t,i,e,n){if(oi(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=i,this._c=e,this._d=n}function Z(t,i,e,n){return new S(t,i,e,n)}function E(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function k(t,i){var e,n,o,s,r,a,h="";for(e=0,o=t.length;e<o;e++){for(n=0,s=(r=t[e]).length;n<s;n++)a=r[n],h+=(n?"L":"M")+a.x+" "+a.y;h+=i?Ji?"z":"x":""}return h||"M0 0"}function A(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}function B(t,i,e,n){return"touchstart"===i?O(t,e,n):"touchmove"===i?W(t,e,n):"touchend"===i&&H(t,e,n),this}function I(t,i,e){var n=t["_leaflet_"+i+e];return"touchstart"===i?t.removeEventListener(te,n,!1):"touchmove"===i?t.removeEventListener(ie,n,!1):"touchend"===i&&(t.removeEventListener(ee,n,!1),t.removeEventListener(ne,n,!1)),this}function O(t,i,n){var o=e(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(oe.indexOf(t.target.tagName)<0))return;Pt(t)}j(t,i)});t["_leaflet_touchstart"+n]=o,t.addEventListener(te,o,!1),re||(document.documentElement.addEventListener(te,R,!0),document.documentElement.addEventListener(ie,N,!0),document.documentElement.addEventListener(ee,D,!0),document.documentElement.addEventListener(ne,D,!0),re=!0)}function R(t){se[t.pointerId]=t,ae++}function N(t){se[t.pointerId]&&(se[t.pointerId]=t)}function D(t){delete se[t.pointerId],ae--}function j(t,i){t.touches=[];for(var e in se)t.touches.push(se[e]);t.changedTouches=[t],i(t)}function W(t,i,e){var n=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&j(t,i)};t["_leaflet_touchmove"+e]=n,t.addEventListener(ie,n,!1)}function H(t,i,e){var n=function(t){j(t,i)};t["_leaflet_touchend"+e]=n,t.addEventListener(ee,n,!1),t.addEventListener(ne,n,!1)}function F(t,i,e){function n(t){var i;if(Vi){if(!bi||"mouse"===t.pointerType)return;i=ae}else i=t.touches.length;if(!(i>1)){var e=Date.now(),n=e-(s||e);r=t.touches?t.touches[0]:t,a=n>0&&n<=h,s=e}}function o(t){if(a&&!r.cancelBubble){if(Vi){if(!bi||"mouse"===t.pointerType)return;var e,n,o={};for(n in r)e=r[n],o[n]=e&&e.bind?e.bind(r):e;r=o}r.type="dblclick",i(r),s=null}}var s,r,a=!1,h=250;return t[le+he+e]=n,t[le+ue+e]=o,t[le+"dblclick"+e]=i,t.addEventListener(he,n,!1),t.addEventListener(ue,o,!1),t.addEventListener("dblclick",i,!1),this}function U(t,i){var e=t[le+he+i],n=t[le+ue+i],o=t[le+"dblclick"+i];return t.removeEventListener(he,e,!1),t.removeEventListener(ue,n,!1),bi||t.removeEventListener("dblclick",o,!1),this}function V(t){return"string"==typeof t?document.getElementById(t):t}function q(t,i){var e=t.style[i]||t.currentStyle&&t.currentStyle[i];if((!e||"auto"===e)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);e=n?n[i]:null}return"auto"===e?null:e}function G(t,i,e){var n=document.createElement(t);return n.className=i||"",e&&e.appendChild(n),n}function K(t){var i=t.parentNode;i&&i.removeChild(t)}function Y(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function X(t){var i=t.parentNode;i.lastChild!==t&&i.appendChild(t)}function J(t){var i=t.parentNode;i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function $(t,i){if(void 0!==t.classList)return t.classList.contains(i);var e=et(t);return e.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(e)}function Q(t,i){if(void 0!==t.classList)for(var e=u(i),n=0,o=e.length;n<o;n++)t.classList.add(e[n]);else if(!$(t,i)){var s=et(t);it(t,(s?s+" ":"")+i)}}function tt(t,i){void 0!==t.classList?t.classList.remove(i):it(t,h((" "+et(t)+" ").replace(" "+i+" "," ")))}function it(t,i){void 0===t.className.baseVal?t.className=i:t.className.baseVal=i}function et(t){return void 0===t.className.baseVal?t.className:t.className.baseVal}function nt(t,i){"opacity"in t.style?t.style.opacity=i:"filter"in t.style&&ot(t,i)}function ot(t,i){var e=!1,n="DXImageTransform.Microsoft.Alpha";try{e=t.filters.item(n)}catch(t){if(1===i)return}i=Math.round(100*i),e?(e.Enabled=100!==i,e.Opacity=i):t.style.filter+=" progid:"+n+"(opacity="+i+")"}function st(t){for(var i=document.documentElement.style,e=0;e<t.length;e++)if(t[e]in i)return t[e];return!1}function rt(t,i,e){var n=i||new x(0,0);t.style[ce]=(Ri?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(e?" scale("+e+")":"")}function at(t,i){t._leaflet_pos=i,ji?rt(t,i):(t.style.left=i.x+"px",t.style.top=i.y+"px")}function ht(t){return t._leaflet_pos||new x(0,0)}function ut(){mt(window,"dragstart",Pt)}function lt(){ft(window,"dragstart",Pt)}function ct(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(_t(),me=t,fe=t.style.outline,t.style.outline="none",mt(window,"keydown",_t))}function _t(){me&&(me.style.outline=fe,me=void 0,fe=void 0,ft(window,"keydown",_t))}function dt(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function pt(t){var i=t.getBoundingClientRect();return{x:i.width/t.offsetWidth||1,y:i.height/t.offsetHeight||1,boundingClientRect:i}}function mt(t,i,e,n){if("object"==typeof i)for(var o in i)gt(t,o,i[o],e);else for(var s=0,r=(i=u(i)).length;s<r;s++)gt(t,i[s],e,n);return this}function ft(t,i,e,n){if("object"==typeof i)for(var o in i)vt(t,o,i[o],e);else if(i)for(var s=0,r=(i=u(i)).length;s<r;s++)vt(t,i[s],e,n);else{for(var a in t[ye])vt(t,a,t[ye][a]);delete t[ye]}return this}function gt(t,i,e,o){var s=i+n(e)+(o?"_"+n(o):"");if(t[ye]&&t[ye][s])return this;var r=function(i){return e.call(o||t,i||window.event)},a=r;Vi&&0===i.indexOf("touch")?B(t,i,r,s):!qi||"dblclick"!==i||!F||Vi&&Ei?"addEventListener"in t?"mousewheel"===i?t.addEventListener("onwheel"in t?"wheel":"mousewheel",r,!1):"mouseenter"===i||"mouseleave"===i?(r=function(i){i=i||window.event,Ct(t,i)&&a(i)},t.addEventListener("mouseenter"===i?"mouseover":"mouseout",r,!1)):("click"===i&&zi&&(r=function(t){St(t,a)}),t.addEventListener(i,r,!1)):"attachEvent"in t&&t.attachEvent("on"+i,r):F(t,r,s),t[ye]=t[ye]||{},t[ye][s]=r}function vt(t,i,e,o){var s=i+n(e)+(o?"_"+n(o):""),r=t[ye]&&t[ye][s];if(!r)return this;Vi&&0===i.indexOf("touch")?I(t,i,s):!qi||"dblclick"!==i||!U||Vi&&Ei?"removeEventListener"in t?"mousewheel"===i?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",r,!1):t.removeEventListener("mouseenter"===i?"mouseover":"mouseleave"===i?"mouseout":i,r,!1):"detachEvent"in t&&t.detachEvent("on"+i,r):U(t,s),t[ye][s]=null}function yt(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Mt(t),this}function xt(t){return gt(t,"mousewheel",yt),this}function wt(t){return mt(t,"mousedown touchstart dblclick",yt),gt(t,"click",zt),this}function Pt(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Lt(t){return Pt(t),yt(t),this}function bt(t,i){if(!i)return new x(t.clientX,t.clientY);var e=pt(i),n=e.boundingClientRect;return new x((t.clientX-n.left)/e.x-i.clientLeft,(t.clientY-n.top)/e.y-i.clientTop)}function Tt(t){return bi?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/xe:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function zt(t){we[t.type]=!0}function Mt(t){var i=we[t.type];return we[t.type]=!1,i}function Ct(t,i){var e=i.relatedTarget;if(!e)return!0;try{for(;e&&e!==t;)e=e.parentNode}catch(t){return!1}return e!==t}function St(t,i){var e=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,n=ge&&e-ge;n&&n>100&&n<500||t.target._simulatedClick&&!t._simulated?Lt(t):(ge=e,i(t))}function Zt(t,i){if(!i||!t.length)return t.slice();var e=i*i;return t=Bt(t,e),t=kt(t,e)}function Et(t,i,e){return Math.sqrt(Dt(t,i,e,!0))}function kt(t,i){var e=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(e);n[0]=n[e-1]=1,At(t,n,i,0,e-1);var o,s=[];for(o=0;o<e;o++)n[o]&&s.push(t[o]);return s}function At(t,i,e,n,o){var s,r,a,h=0;for(r=n+1;r<=o-1;r++)(a=Dt(t[r],t[n],t[o],!0))>h&&(s=r,h=a);h>e&&(i[s]=1,At(t,i,e,n,s),At(t,i,e,s,o))}function Bt(t,i){for(var e=[t[0]],n=1,o=0,s=t.length;n<s;n++)Nt(t[n],t[o])>i&&(e.push(t[n]),o=n);return o<s-1&&e.push(t[s-1]),e}function It(t,i,e,n,o){var s,r,a,h=n?ke:Rt(t,e),u=Rt(i,e);for(ke=u;;){if(!(h|u))return[t,i];if(h&u)return!1;a=Rt(r=Ot(t,i,s=h||u,e,o),e),s===h?(t=r,h=a):(i=r,u=a)}}function Ot(t,i,e,n,o){var s,r,a=i.x-t.x,h=i.y-t.y,u=n.min,l=n.max;return 8&e?(s=t.x+a*(l.y-t.y)/h,r=l.y):4&e?(s=t.x+a*(u.y-t.y)/h,r=u.y):2&e?(s=l.x,r=t.y+h*(l.x-t.x)/a):1&e&&(s=u.x,r=t.y+h*(u.x-t.x)/a),new x(s,r,o)}function Rt(t,i){var e=0;return t.x<i.min.x?e|=1:t.x>i.max.x&&(e|=2),t.y<i.min.y?e|=4:t.y>i.max.y&&(e|=8),e}function Nt(t,i){var e=i.x-t.x,n=i.y-t.y;return e*e+n*n}function Dt(t,i,e,n){var o,s=i.x,r=i.y,a=e.x-s,h=e.y-r,u=a*a+h*h;return u>0&&((o=((t.x-s)*a+(t.y-r)*h)/u)>1?(s=e.x,r=e.y):o>0&&(s+=a*o,r+=h*o)),a=t.x-s,h=t.y-r,n?a*a+h*h:new x(s,r)}function jt(t){return!oi(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Wt(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),jt(t)}function Ht(t,i,e){var n,o,s,r,a,h,u,l,c,_=[1,4,2,8];for(o=0,u=t.length;o<u;o++)t[o]._code=Rt(t[o],i);for(r=0;r<4;r++){for(l=_[r],n=[],o=0,s=(u=t.length)-1;o<u;s=o++)a=t[o],h=t[s],a._code&l?h._code&l||((c=Ot(h,a,l,i,e))._code=Rt(c,i),n.push(c)):(h._code&l&&((c=Ot(h,a,l,i,e))._code=Rt(c,i),n.push(c)),n.push(a));t=n}return t}function Ft(t,i){var e,n,o,s,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,h=[],u=i&&i.pointToLayer,l=i&&i.coordsToLatLng||Ut;if(!a&&!r)return null;switch(r.type){case"Point":return e=l(a),u?u(t,e):new $e(e);case"MultiPoint":for(o=0,s=a.length;o<s;o++)e=l(a[o]),h.push(u?u(t,e):new $e(e));return new Ke(h);case"LineString":case"MultiLineString":return n=Vt(a,"LineString"===r.type?0:1,l),new nn(n,i);case"Polygon":case"MultiPolygon":return n=Vt(a,"Polygon"===r.type?1:2,l),new on(n,i);case"GeometryCollection":for(o=0,s=r.geometries.length;o<s;o++){var c=Ft({geometry:r.geometries[o],type:"Feature",properties:t.properties},i);c&&h.push(c)}return new Ke(h);default:throw new Error("Invalid GeoJSON object.")}}function Ut(t){return new M(t[1],t[0],t[2])}function Vt(t,i,e){for(var n,o=[],s=0,r=t.length;s<r;s++)n=i?Vt(t[s],i-1,e):(e||Ut)(t[s]),o.push(n);return o}function qt(t,i){return i="number"==typeof i?i:6,void 0!==t.alt?[a(t.lng,i),a(t.lat,i),a(t.alt,i)]:[a(t.lng,i),a(t.lat,i)]}function Gt(t,i,e,n){for(var o=[],s=0,r=t.length;s<r;s++)o.push(i?Gt(t[s],i-1,e,n):qt(t[s],n));return!i&&e&&o.push(o[0]),o}function Kt(t,e){return t.feature?i({},t.feature,{geometry:e}):Yt(e)}function Yt(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}function Xt(t,i){return new sn(t,i)}function Jt(t,i){return new mn(t,i)}function $t(t){return Xi?new vn(t):null}function Qt(t){return Ji||$i?new Pn(t):null}var ti=Object.freeze;Object.freeze=function(t){return t};var ii=Object.create||function(){function t(){}return function(i){return t.prototype=i,new t}}(),ei=0,ni=/\{ *([\w_-]+) *\}/g,oi=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},si="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",ri=0,ai=window.requestAnimationFrame||p("RequestAnimationFrame")||m,hi=window.cancelAnimationFrame||p("CancelAnimationFrame")||p("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)},ui=(Object.freeze||Object)({freeze:ti,extend:i,create:ii,bind:e,lastId:ei,stamp:n,throttle:o,wrapNum:s,falseFn:r,formatNum:a,trim:h,splitWords:u,setOptions:l,getParamString:c,template:_,isArray:oi,indexOf:d,emptyImageUrl:si,requestFn:ai,cancelFn:hi,requestAnimFrame:f,cancelAnimFrame:g});v.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},n=e.__super__=this.prototype,o=ii(n);o.constructor=e,e.prototype=o;for(var s in this)this.hasOwnProperty(s)&&"prototype"!==s&&"__super__"!==s&&(e[s]=this[s]);return t.statics&&(i(e,t.statics),delete t.statics),t.includes&&(y(t.includes),i.apply(null,[o].concat(t.includes)),delete t.includes),o.options&&(t.options=i(ii(o.options),t.options)),i(o,t),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,i=o._initHooks.length;t<i;t++)o._initHooks[t].call(this)}},e},v.include=function(t){return i(this.prototype,t),this},v.mergeOptions=function(t){return i(this.prototype.options,t),this},v.addInitHook=function(t){var i=Array.prototype.slice.call(arguments,1),e="function"==typeof t?t:function(){this[t].apply(this,i)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(e),this};var li={on:function(t,i,e){if("object"==typeof t)for(var n in t)this._on(n,t[n],i);else for(var o=0,s=(t=u(t)).length;o<s;o++)this._on(t[o],i,e);return this},off:function(t,i,e){if(t)if("object"==typeof t)for(var n in t)this._off(n,t[n],i);else for(var o=0,s=(t=u(t)).length;o<s;o++)this._off(t[o],i,e);else delete this._events;return this},_on:function(t,i,e){this._events=this._events||{};var n=this._events[t];n||(n=[],this._events[t]=n),e===this&&(e=void 0);for(var o={fn:i,ctx:e},s=n,r=0,a=s.length;r<a;r++)if(s[r].fn===i&&s[r].ctx===e)return;s.push(o)},_off:function(t,i,e){var n,o,s;if(this._events&&(n=this._events[t]))if(i){if(e===this&&(e=void 0),n)for(o=0,s=n.length;o<s;o++){var a=n[o];if(a.ctx===e&&a.fn===i)return a.fn=r,this._firingCount&&(this._events[t]=n=n.slice()),void n.splice(o,1)}}else{for(o=0,s=n.length;o<s;o++)n[o].fn=r;delete this._events[t]}},fire:function(t,e,n){if(!this.listens(t,n))return this;var o=i({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var s=this._events[t];if(s){this._firingCount=this._firingCount+1||1;for(var r=0,a=s.length;r<a;r++){var h=s[r];h.fn.call(h.ctx||this,o)}this._firingCount--}}return n&&this._propagateEvent(o),this},listens:function(t,i){var e=this._events&&this._events[t];if(e&&e.length)return!0;if(i)for(var n in this._eventParents)if(this._eventParents[n].listens(t,i))return!0;return!1},once:function(t,i,n){if("object"==typeof t){for(var o in t)this.once(o,t[o],i);return this}var s=e(function(){this.off(t,i,n).off(t,s,n)},this);return this.on(t,i,n).on(t,s,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[n(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[n(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target,propagatedFrom:t.target},t),!0)}};li.addEventListener=li.on,li.removeEventListener=li.clearAllEventListeners=li.off,li.addOneTimeEventListener=li.once,li.fireEvent=li.fire,li.hasEventListeners=li.listens;var ci=v.extend(li),_i=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};x.prototype={clone:function(){return new x(this.x,this.y)},add:function(t){return this.clone()._add(w(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(w(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new x(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new x(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=_i(this.x),this.y=_i(this.y),this},distanceTo:function(t){var i=(t=w(t)).x-this.x,e=t.y-this.y;return Math.sqrt(i*i+e*e)},equals:function(t){return(t=w(t)).x===this.x&&t.y===this.y},contains:function(t){return t=w(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+a(this.x)+", "+a(this.y)+")"}},P.prototype={extend:function(t){return t=w(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new x((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new x(this.min.x,this.max.y)},getTopRight:function(){return new x(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var i,e;return(t="number"==typeof t[0]||t instanceof x?w(t):b(t))instanceof P?(i=t.min,e=t.max):i=e=t,i.x>=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=b(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>=i.x&&n.x<=e.x,r=o.y>=i.y&&n.y<=e.y;return s&&r},overlaps:function(t){t=b(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>i.x&&n.x<e.x,r=o.y>i.y&&n.y<e.y;return s&&r},isValid:function(){return!(!this.min||!this.max)}},T.prototype={extend:function(t){var i,e,n=this._southWest,o=this._northEast;if(t instanceof M)i=t,e=t;else{if(!(t instanceof T))return t?this.extend(C(t)||z(t)):this;if(i=t._southWest,e=t._northEast,!i||!e)return this}return n||o?(n.lat=Math.min(i.lat,n.lat),n.lng=Math.min(i.lng,n.lng),o.lat=Math.max(e.lat,o.lat),o.lng=Math.max(e.lng,o.lng)):(this._southWest=new M(i.lat,i.lng),this._northEast=new M(e.lat,e.lng)),this},pad:function(t){var i=this._southWest,e=this._northEast,n=Math.abs(i.lat-e.lat)*t,o=Math.abs(i.lng-e.lng)*t;return new T(new M(i.lat-n,i.lng-o),new M(e.lat+n,e.lng+o))},getCenter:function(){return new M((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new M(this.getNorth(),this.getWest())},getSouthEast:function(){return new M(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof M||"lat"in t?C(t):z(t);var i,e,n=this._southWest,o=this._northEast;return t instanceof T?(i=t.getSouthWest(),e=t.getNorthEast()):i=e=t,i.lat>=n.lat&&e.lat<=o.lat&&i.lng>=n.lng&&e.lng<=o.lng},intersects:function(t){t=z(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=i.lat&&n.lat<=e.lat,r=o.lng>=i.lng&&n.lng<=e.lng;return s&&r},overlaps:function(t){t=z(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>i.lat&&n.lat<e.lat,r=o.lng>i.lng&&n.lng<e.lng;return s&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,i){return!!t&&(t=z(t),this._southWest.equals(t.getSouthWest(),i)&&this._northEast.equals(t.getNorthEast(),i))},isValid:function(){return!(!this._southWest||!this._northEast)}},M.prototype={equals:function(t,i){return!!t&&(t=C(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===i?1e-9:i))},toString:function(t){return"LatLng("+a(this.lat,t)+", "+a(this.lng,t)+")"},distanceTo:function(t){return pi.distance(this,C(t))},wrap:function(){return pi.wrapLatLng(this)},toBounds:function(t){var i=180*t/40075017,e=i/Math.cos(Math.PI/180*this.lat);return z([this.lat-i,this.lng-e],[this.lat+i,this.lng+e])},clone:function(){return new M(this.lat,this.lng,this.alt)}};var di={latLngToPoint:function(t,i){var e=this.projection.project(t),n=this.scale(i);return this.transformation._transform(e,n)},pointToLatLng:function(t,i){var e=this.scale(i),n=this.transformation.untransform(t,e);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var i=this.projection.bounds,e=this.scale(t);return new P(this.transformation.transform(i.min,e),this.transformation.transform(i.max,e))},infinite:!1,wrapLatLng:function(t){var i=this.wrapLng?s(t.lng,this.wrapLng,!0):t.lng;return new M(this.wrapLat?s(t.lat,this.wrapLat,!0):t.lat,i,t.alt)},wrapLatLngBounds:function(t){var i=t.getCenter(),e=this.wrapLatLng(i),n=i.lat-e.lat,o=i.lng-e.lng;if(0===n&&0===o)return t;var s=t.getSouthWest(),r=t.getNorthEast();return new T(new M(s.lat-n,s.lng-o),new M(r.lat-n,r.lng-o))}},pi=i({},di,{wrapLng:[-180,180],R:6371e3,distance:function(t,i){var e=Math.PI/180,n=t.lat*e,o=i.lat*e,s=Math.sin((i.lat-t.lat)*e/2),r=Math.sin((i.lng-t.lng)*e/2),a=s*s+Math.cos(n)*Math.cos(o)*r*r,h=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*h}}),mi={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var i=Math.PI/180,e=this.MAX_LATITUDE,n=Math.max(Math.min(e,t.lat),-e),o=Math.sin(n*i);return new x(this.R*t.lng*i,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var i=180/Math.PI;return new M((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*i,t.x*i/this.R)},bounds:function(){var t=6378137*Math.PI;return new P([-t,-t],[t,t])}()};S.prototype={transform:function(t,i){return this._transform(t.clone(),i)},_transform:function(t,i){return i=i||1,t.x=i*(this._a*t.x+this._b),t.y=i*(this._c*t.y+this._d),t},untransform:function(t,i){return i=i||1,new x((t.x/i-this._b)/this._a,(t.y/i-this._d)/this._c)}};var fi,gi,vi,yi=i({},pi,{code:"EPSG:3857",projection:mi,transformation:function(){var t=.5/(Math.PI*mi.R);return Z(t,.5,-t,.5)}()}),xi=i({},yi,{code:"EPSG:900913"}),wi=document.documentElement.style,Pi="ActiveXObject"in window,Li=Pi&&!document.addEventListener,bi="msLaunchUri"in navigator&&!("documentMode"in document),Ti=A("webkit"),zi=A("android"),Mi=A("android 2")||A("android 3"),Ci=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Si=zi&&A("Google")&&Ci<537&&!("AudioNode"in window),Zi=!!window.opera,Ei=A("chrome"),ki=A("gecko")&&!Ti&&!Zi&&!Pi,Ai=!Ei&&A("safari"),Bi=A("phantom"),Ii="OTransition"in wi,Oi=0===navigator.platform.indexOf("Win"),Ri=Pi&&"transition"in wi,Ni="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Mi,Di="MozPerspective"in wi,ji=!window.L_DISABLE_3D&&(Ri||Ni||Di)&&!Ii&&!Bi,Wi="undefined"!=typeof orientation||A("mobile"),Hi=Wi&&Ti,Fi=Wi&&Ni,Ui=!window.PointerEvent&&window.MSPointerEvent,Vi=!(!window.PointerEvent&&!Ui),qi=!window.L_NO_TOUCH&&(Vi||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Gi=Wi&&Zi,Ki=Wi&&ki,Yi=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Xi=!!document.createElement("canvas").getContext,Ji=!(!document.createElementNS||!E("svg").createSVGRect),$i=!Ji&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}(),Qi=(Object.freeze||Object)({ie:Pi,ielt9:Li,edge:bi,webkit:Ti,android:zi,android23:Mi,androidStock:Si,opera:Zi,chrome:Ei,gecko:ki,safari:Ai,phantom:Bi,opera12:Ii,win:Oi,ie3d:Ri,webkit3d:Ni,gecko3d:Di,any3d:ji,mobile:Wi,mobileWebkit:Hi,mobileWebkit3d:Fi,msPointer:Ui,pointer:Vi,touch:qi,mobileOpera:Gi,mobileGecko:Ki,retina:Yi,canvas:Xi,svg:Ji,vml:$i}),te=Ui?"MSPointerDown":"pointerdown",ie=Ui?"MSPointerMove":"pointermove",ee=Ui?"MSPointerUp":"pointerup",ne=Ui?"MSPointerCancel":"pointercancel",oe=["INPUT","SELECT","OPTION"],se={},re=!1,ae=0,he=Ui?"MSPointerDown":Vi?"pointerdown":"touchstart",ue=Ui?"MSPointerUp":Vi?"pointerup":"touchend",le="_leaflet_",ce=st(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),_e=st(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===_e||"OTransition"===_e?_e+"End":"transitionend";if("onselectstart"in document)fi=function(){mt(window,"selectstart",Pt)},gi=function(){ft(window,"selectstart",Pt)};else{var pe=st(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);fi=function(){if(pe){var t=document.documentElement.style;vi=t[pe],t[pe]="none"}},gi=function(){pe&&(document.documentElement.style[pe]=vi,vi=void 0)}}var me,fe,ge,ve=(Object.freeze||Object)({TRANSFORM:ce,TRANSITION:_e,TRANSITION_END:de,get:V,getStyle:q,create:G,remove:K,empty:Y,toFront:X,toBack:J,hasClass:$,addClass:Q,removeClass:tt,setClass:it,getClass:et,setOpacity:nt,testProp:st,setTransform:rt,setPosition:at,getPosition:ht,disableTextSelection:fi,enableTextSelection:gi,disableImageDrag:ut,enableImageDrag:lt,preventOutline:ct,restoreOutline:_t,getSizedParentNode:dt,getScale:pt}),ye="_leaflet_events",xe=Oi&&Ei?2*window.devicePixelRatio:ki?window.devicePixelRatio:1,we={},Pe=(Object.freeze||Object)({on:mt,off:ft,stopPropagation:yt,disableScrollPropagation:xt,disableClickPropagation:wt,preventDefault:Pt,stop:Lt,getMousePosition:bt,getWheelDelta:Tt,fakeStop:zt,skipped:Mt,isExternalTarget:Ct,addListener:mt,removeListener:ft}),Le=ci.extend({run:function(t,i,e,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=e||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=ht(t),this._offset=i.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=f(this._animate,this),this._step()},_step:function(t){var i=+new Date-this._startTime,e=1e3*this._duration;i<e?this._runFrame(this._easeOut(i/e),t):(this._runFrame(1),this._complete())},_runFrame:function(t,i){var e=this._startPos.add(this._offset.multiplyBy(t));i&&e._round(),at(this._el,e),this.fire("step")},_complete:function(){g(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),be=ci.extend({options:{crs:yi,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,i){i=l(this,i),this._initContainer(t),this._initLayout(),this._onResize=e(this._onResize,this),this._initEvents(),i.maxBounds&&this.setMaxBounds(i.maxBounds),void 0!==i.zoom&&(this._zoom=this._limitZoom(i.zoom)),i.center&&void 0!==i.zoom&&this.setView(C(i.center),i.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this.callInitHooks(),this._zoomAnimated=_e&&ji&&!Gi&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),mt(this._proxy,de,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,n){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(C(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=i({animate:n.animate},n.zoom),n.pan=i({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e),this)},setZoom:function(t,i){return this._loaded?this.setView(this.getCenter(),t,{zoom:i}):(this._zoom=t,this)},zoomIn:function(t,i){return t=t||(ji?this.options.zoomDelta:1),this.setZoom(this._zoom+t,i)},zoomOut:function(t,i){return t=t||(ji?this.options.zoomDelta:1),this.setZoom(this._zoom-t,i)},setZoomAround:function(t,i,e){var n=this.getZoomScale(i),o=this.getSize().divideBy(2),s=(t instanceof x?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/n),r=this.containerPointToLatLng(o.add(s));return this.setView(r,i,{zoom:e})},_getBoundsCenterZoom:function(t,i){i=i||{},t=t.getBounds?t.getBounds():z(t);var e=w(i.paddingTopLeft||i.padding||[0,0]),n=w(i.paddingBottomRight||i.padding||[0,0]),o=this.getBoundsZoom(t,!1,e.add(n));if((o="number"==typeof i.maxZoom?Math.min(i.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var s=n.subtract(e).divideBy(2),r=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(r.add(a).divideBy(2).add(s),o),zoom:o}},fitBounds:function(t,i){if(!(t=z(t)).isValid())throw new Error("Bounds are not valid.");var e=this._getBoundsCenterZoom(t,i);return this.setView(e.center,e.zoom,i)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,i){return this.setView(t,this._zoom,{pan:i})},panBy:function(t,i){if(t=w(t).round(),i=i||{},!t.x&&!t.y)return this.fire("moveend");if(!0!==i.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Le,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),i.noMoveStart||this.fire("movestart"),!1!==i.animate){Q(this._mapPane,"leaflet-pan-anim");var e=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,e,i.duration||.25,i.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,i,e){function n(t){var i=(g*g-m*m+(t?-1:1)*x*x*v*v)/(2*(t?g:m)*x*v),e=Math.sqrt(i*i+1)-i;return e<1e-9?-18:Math.log(e)}function o(t){return(Math.exp(t)-Math.exp(-t))/2}function s(t){return(Math.exp(t)+Math.exp(-t))/2}function r(t){return o(t)/s(t)}function a(t){return m*(s(w)/s(w+y*t))}function h(t){return m*(s(w)*r(w+y*t)-o(w))/x}function u(t){return 1-Math.pow(1-t,1.5)}function l(){var e=(Date.now()-P)/b,n=u(e)*L;e<=1?(this._flyToFrame=f(l,this),this._move(this.unproject(c.add(_.subtract(c).multiplyBy(h(n)/v)),p),this.getScaleZoom(m/a(n),p),{flyTo:!0})):this._move(t,i)._moveEnd(!0)}if(!1===(e=e||{}).animate||!ji)return this.setView(t,i,e);this._stop();var c=this.project(this.getCenter()),_=this.project(t),d=this.getSize(),p=this._zoom;t=C(t),i=void 0===i?p:i;var m=Math.max(d.x,d.y),g=m*this.getZoomScale(p,i),v=_.distanceTo(c)||1,y=1.42,x=y*y,w=n(0),P=Date.now(),L=(n(1)-w)/y,b=e.duration?1e3*e.duration:1e3*L*.8;return this._moveStart(!0,e.noMoveStart),l.call(this),this},flyToBounds:function(t,i){var e=this._getBoundsCenterZoom(t,i);return this.flyTo(e.center,e.zoom,i)},setMaxBounds:function(t){return(t=z(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var i=this.options.minZoom;return this.options.minZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var i=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var e=this.getCenter(),n=this._limitCenter(e,this._zoom,z(t));return e.equals(n)||this.panTo(n,i),this._enforcingBounds=!1,this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},!0===t?{animate:!0}:t);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),s=n.divideBy(2).round(),r=o.divideBy(2).round(),a=s.subtract(r);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(e(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:o})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=e(this._handleGeolocationResponse,this),o=e(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,o,t):navigator.geolocation.getCurrentPosition(n,o,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var i=t.code,e=t.message||(1===i?"permission denied":2===i?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:i,message:"Geolocation error: "+e+"."})},_handleGeolocationResponse:function(t){var i=new M(t.coords.latitude,t.coords.longitude),e=i.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var o=this.getBoundsZoom(e);this.setView(i,n.maxZoom?Math.min(o,n.maxZoom):o)}var s={latlng:i,bounds:e,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)},addHandler:function(t,i){if(!i)return this;var e=this[t]=new i(this);return this._handlers.push(e),this.options[t]&&e.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),K(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(g(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)K(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,i){var e=G("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),i||this._mapPane);return t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new T(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,i,e){t=z(t),e=w(e||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),h=this.getSize().subtract(e),u=b(this.project(a,n),this.project(r,n)).getSize(),l=ji?this.options.zoomSnap:1,c=h.x/u.x,_=h.y/u.y,d=i?Math.max(c,_):Math.min(c,_);return n=this.getScaleZoom(d,n),l&&(n=Math.round(n/(l/100))*(l/100),n=i?Math.ceil(n/l)*l:Math.floor(n/l)*l),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new x(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,i){var e=this._getTopLeftPoint(t,i);return new P(e,e.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,i){var e=this.options.crs;return i=void 0===i?this._zoom:i,e.scale(t)/e.scale(i)},getScaleZoom:function(t,i){var e=this.options.crs;i=void 0===i?this._zoom:i;var n=e.zoom(t*e.scale(i));return isNaN(n)?1/0:n},project:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.latLngToPoint(C(t),i)},unproject:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.pointToLatLng(w(t),i)},layerPointToLatLng:function(t){var i=w(t).add(this.getPixelOrigin());return this.unproject(i)},latLngToLayerPoint:function(t){return this.project(C(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(C(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(z(t))},distance:function(t,i){return this.options.crs.distance(C(t),C(i))},containerPointToLayerPoint:function(t){return w(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return w(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var i=this.containerPointToLayerPoint(w(t));return this.layerPointToLatLng(i)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(C(t)))},mouseEventToContainerPoint:function(t){return bt(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var i=this._container=V(t);if(!i)throw new Error("Map container not found.");if(i._leaflet_id)throw new Error("Map container is already initialized.");mt(i,"scroll",this._onScroll,this),this._containerId=n(i)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&ji,Q(t,"leaflet-container"+(qi?" leaflet-touch":"")+(Yi?" leaflet-retina":"")+(Li?" leaflet-oldie":"")+(Ai?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var i=q(t,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),at(this._mapPane,new x(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Q(t.markerPane,"leaflet-zoom-hide"),Q(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,i){at(this._mapPane,new x(0,0));var e=!this._loaded;this._loaded=!0,i=this._limitZoom(i),this.fire("viewprereset");var n=this._zoom!==i;this._moveStart(n,!1)._move(t,i)._moveEnd(n),this.fire("viewreset"),e&&this.fire("load")},_moveStart:function(t,i){return t&&this.fire("zoomstart"),i||this.fire("movestart"),this},_move:function(t,i,e){void 0===i&&(i=this._zoom);var n=this._zoom!==i;return this._zoom=i,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||e&&e.pinch)&&this.fire("zoom",e),this.fire("move",e)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return g(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){at(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[n(this._container)]=this;var i=t?ft:mt;i(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this),this.options.trackResize&&i(window,"resize",this._onResize,this),ji&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){g(this._resizeRequest),this._resizeRequest=f(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,i){for(var e,o=[],s="mouseout"===i||"mouseover"===i,r=t.target||t.srcElement,a=!1;r;){if((e=this._targets[n(r)])&&("click"===i||"preclick"===i)&&!t._simulated&&this._draggableMoved(e)){a=!0;break}if(e&&e.listens(i,!0)){if(s&&!Ct(r,t))break;if(o.push(e),s)break}if(r===this._container)break;r=r.parentNode}return o.length||a||s||!Ct(r,t)||(o=[this]),o},_handleDOMEvent:function(t){if(this._loaded&&!Mt(t)){var i=t.type;"mousedown"!==i&&"keypress"!==i||ct(t.target||t.srcElement),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var o=i({},t);o.type="preclick",this._fireDOMEvent(o,o.type,n)}if(!t._stopped&&(n=(n||[]).concat(this._findEventTargets(t,e))).length){var s=n[0];"contextmenu"===e&&s.listens(e,!0)&&Pt(t);var r={originalEvent:t};if("keypress"!==t.type){var a=s.getLatLng&&(!s._radius||s._radius<=10);r.containerPoint=a?this.latLngToContainerPoint(s.getLatLng()):this.mouseEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=a?s.getLatLng():this.layerPointToLatLng(r.layerPoint)}for(var h=0;h<n.length;h++)if(n[h].fire(e,r,!0),r.originalEvent._stopped||!1===n[h].options.bubblingMouseEvents&&-1!==d(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,i=this._handlers.length;t<i;t++)this._handlers[t].disable()},whenReady:function(t,i){return this._loaded?t.call(i||this,{target:this}):this.on("load",t,i),this},_getMapPanePos:function(){return ht(this._mapPane)||new x(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,i){return(t&&void 0!==i?this._getNewPixelOrigin(t,i):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,i){var e=this.getSize()._divideBy(2);return this.project(t,i)._subtract(e)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,i,e){var n=this._getNewPixelOrigin(e,i);return this.project(t,i)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,i,e){var n=this._getNewPixelOrigin(e,i);return b([this.project(t.getSouthWest(),i)._subtract(n),this.project(t.getNorthWest(),i)._subtract(n),this.project(t.getSouthEast(),i)._subtract(n),this.project(t.getNorthEast(),i)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,i,e){if(!e)return t;var n=this.project(t,i),o=this.getSize().divideBy(2),s=new P(n.subtract(o),n.add(o)),r=this._getBoundsOffset(s,e,i);return r.round().equals([0,0])?t:this.unproject(n.add(r),i)},_limitOffset:function(t,i){if(!i)return t;var e=this.getPixelBounds(),n=new P(e.min.add(t),e.max.add(t));return t.add(this._getBoundsOffset(n,i))},_getBoundsOffset:function(t,i,e){var n=b(this.project(i.getNorthEast(),e),this.project(i.getSouthWest(),e)),o=n.min.subtract(t.min),s=n.max.subtract(t.max);return new x(this._rebound(o.x,-s.x),this._rebound(o.y,-s.y))},_rebound:function(t,i){return t+i>0?Math.round(t-i)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(i))},_limitZoom:function(t){var i=this.getMinZoom(),e=this.getMaxZoom(),n=ji?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(i,Math.min(e,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){tt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,i){var e=this._getCenterOffset(t)._trunc();return!(!0!==(i&&i.animate)&&!this.getSize().contains(e))&&(this.panBy(e,i),!0)},_createAnimProxy:function(){var t=this._proxy=G("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var i=ce,e=this._proxy.style[i];rt(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var t=this.getCenter(),i=this.getZoom();rt(this._proxy,this.project(t,i),this.getZoomScale(i,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){K(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,i,e){if(this._animatingZoom)return!0;if(e=e||{},!this._zoomAnimated||!1===e.animate||this._nothingToAnimate()||Math.abs(i-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==e.animate&&!this.getSize().contains(o))&&(f(function(){this._moveStart(!0,!1)._animateZoom(t,i,!0)},this),!0)},_animateZoom:function(t,i,n,o){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,Q(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:o}),setTimeout(e(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&tt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),f(function(){this._moveEnd(!0)},this))}}),Te=v.extend({options:{position:"topright"},initialize:function(t){l(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),e=this.getPosition(),n=t._controlCorners[e];return Q(i,"leaflet-control"),-1!==e.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this},remove:function(){return this._map?(K(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),ze=function(t){return new Te(t)};be.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){function t(t,o){var s=e+t+" "+e+o;i[t+o]=G("div",s,n)}var i=this._controlCorners={},e="leaflet-",n=this._controlContainer=G("div",e+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)K(this._controlCorners[t]);K(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Me=Te.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,i,e,n){return e<n?-1:n<e?1:0}},initialize:function(t,i,e){l(this,e),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in i)this._addLayer(i[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var i=0;i<this._layers.length;i++)this._layers[i].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Te.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,i){return this._addLayer(t,i),this._map?this._update():this},addOverlay:function(t,i){return this._addLayer(t,i,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var i=this._getLayer(n(t));return i&&this._layers.splice(this._layers.indexOf(i),1),this._map?this._update():this},expand:function(){Q(this._container,"leaflet-control-layers-expanded"),this._form.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._form.clientHeight?(Q(this._form,"leaflet-control-layers-scrollbar"),this._form.style.height=t+"px"):tt(this._form,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return tt(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",i=this._container=G("div",t),e=this.options.collapsed;i.setAttribute("aria-haspopup",!0),wt(i),xt(i);var n=this._form=G("form",t+"-list");e&&(this._map.on("click",this.collapse,this),zi||mt(i,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=G("a",t+"-toggle",i);o.href="#",o.title="Layers",qi?(mt(o,"click",Lt),mt(o,"click",this.expand,this)):mt(o,"focus",this.expand,this),e||this.expand(),this._baseLayersList=G("div",t+"-base",n),this._separator=G("div",t+"-separator",n),this._overlaysList=G("div",t+"-overlays",n),i.appendChild(n)},_getLayer:function(t){for(var i=0;i<this._layers.length;i++)if(this._layers[i]&&n(this._layers[i].layer)===t)return this._layers[i]},_addLayer:function(t,i,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:i,overlay:n}),this.options.sortLayers&&this._layers.sort(e(function(t,i){return this.options.sortFunction(t.layer,i.layer,t.name,i.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Y(this._baseLayersList),Y(this._overlaysList),this._layerControlInputs=[];var t,i,e,n,o=0;for(e=0;e<this._layers.length;e++)n=this._layers[e],this._addItem(n),i=i||n.overlay,t=t||!n.overlay,o+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&o>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=i&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var i=this._getLayer(n(t.target)),e=i.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;e&&this._map.fire(e,i)},_createRadioElement:function(t,i){var e='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(i?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=e,n.firstChild},_addItem:function(t){var i,e=document.createElement("label"),o=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=o):i=this._createRadioElement("leaflet-base-layers",o),this._layerControlInputs.push(i),i.layerId=n(t.layer),mt(i,"click",this._onInputClick,this);var s=document.createElement("span");s.innerHTML=" "+t.name;var r=document.createElement("div");return e.appendChild(r),r.appendChild(i),r.appendChild(s),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){var t,i,e=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=e.length-1;s>=0;s--)t=e[s],i=this._getLayer(t.layerId).layer,t.checked?n.push(i):t.checked||o.push(i);for(s=0;s<o.length;s++)this._map.hasLayer(o[s])&&this._map.removeLayer(o[s]);for(s=0;s<n.length;s++)this._map.hasLayer(n[s])||this._map.addLayer(n[s]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,i,e=this._layerControlInputs,n=this._map.getZoom(),o=e.length-1;o>=0;o--)t=e[o],i=this._getLayer(t.layerId).layer,t.disabled=void 0!==i.options.minZoom&&n<i.options.minZoom||void 0!==i.options.maxZoom&&n>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Ce=Te.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",e=G("div",i+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,i,e,n,o){var s=G("a",e,n);return s.innerHTML=t,s.href="#",s.title=i,s.setAttribute("role","button"),s.setAttribute("aria-label",i),wt(s),mt(s,"click",Lt),mt(s,"click",o,this),mt(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";tt(this._zoomInButton,i),tt(this._zoomOutButton,i),(this._disabled||t._zoom===t.getMinZoom())&&Q(this._zoomOutButton,i),(this._disabled||t._zoom===t.getMaxZoom())&&Q(this._zoomInButton,i)}});be.mergeOptions({zoomControl:!0}),be.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ce,this.addControl(this.zoomControl))});var Se=Te.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i=G("div","leaflet-control-scale"),e=this.options;return this._addScales(e,"leaflet-control-scale-line",i),t.on(e.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,e){t.metric&&(this._mScale=G("div",i,e)),t.imperial&&(this._iScale=G("div",i,e))},_update:function(){var t=this._map,i=t.getSize().y/2,e=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t),e=i<1e3?i+" m":i/1e3+" km";this._updateScale(this._mScale,e,i/t)},_updateImperial:function(t){var i,e,n,o=3.2808399*t;o>5280?(i=o/5280,e=this._getRoundNum(i),this._updateScale(this._iScale,e+" mi",e/i)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,i,e){t.style.width=Math.round(this.options.maxWidth*e)+"px",t.innerHTML=i},_getRoundNum:function(t){var i=Math.pow(10,(Math.floor(t)+"").length-1),e=t/i;return e=e>=10?10:e>=5?5:e>=3?3:e>=2?2:1,i*e}}),Ze=Te.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){l(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=G("div","leaflet-control-attribution"),wt(this._container);for(var i in t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var i in this._attributions)this._attributions[i]&&t.push(i);var e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(" | ")}}});be.mergeOptions({attributionControl:!0}),be.addInitHook(function(){this.options.attributionControl&&(new Ze).addTo(this)});Te.Layers=Me,Te.Zoom=Ce,Te.Scale=Se,Te.Attribution=Ze,ze.layers=function(t,i,e){return new Me(t,i,e)},ze.zoom=function(t){return new Ce(t)},ze.scale=function(t){return new Se(t)},ze.attribution=function(t){return new Ze(t)};var Ee=v.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Ee.addTo=function(t,i){return t.addHandler(i,this),this};var ke,Ae={Events:li},Be=qi?"touchstart mousedown":"mousedown",Ie={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},Oe={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},Re=ci.extend({options:{clickTolerance:3},initialize:function(t,i,e,n){l(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=e},enable:function(){this._enabled||(mt(this._dragStartTarget,Be,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Re._dragging===this&&this.finishDrag(),ft(this._dragStartTarget,Be,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!$(this._element,"leaflet-zoom-anim")&&!(Re._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(Re._dragging=this,this._preventOutline&&ct(this._element),ut(),fi(),this._moving)))){this.fire("down");var i=t.touches?t.touches[0]:t,e=dt(this._element);this._startPoint=new x(i.clientX,i.clientY),this._parentScale=pt(e),mt(document,Oe[t.type],this._onMove,this),mt(document,Ie[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var i=t.touches&&1===t.touches.length?t.touches[0]:t,e=new x(i.clientX,i.clientY)._subtract(this._startPoint);(e.x||e.y)&&(Math.abs(e.x)+Math.abs(e.y)<this.options.clickTolerance||(e.x/=this._parentScale.x,e.y/=this._parentScale.y,Pt(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=ht(this._element).subtract(e),Q(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),Q(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(e),this._moving=!0,g(this._animRequest),this._lastEvent=t,this._animRequest=f(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),at(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){tt(document.body,"leaflet-dragging"),this._lastTarget&&(tt(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var t in Oe)ft(document,Oe[t],this._onMove,this),ft(document,Ie[t],this._onUp,this);lt(),gi(),this._moved&&this._moving&&(g(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,Re._dragging=!1}}),Ne=(Object.freeze||Object)({simplify:Zt,pointToSegmentDistance:Et,closestPointOnSegment:function(t,i,e){return Dt(t,i,e)},clipSegment:It,_getEdgeIntersection:Ot,_getBitCode:Rt,_sqClosestPointOnSegment:Dt,isFlat:jt,_flat:Wt}),De=(Object.freeze||Object)({clipPolygon:Ht}),je={project:function(t){return new x(t.lng,t.lat)},unproject:function(t){return new M(t.y,t.x)},bounds:new P([-180,-90],[180,90])},We={R:6378137,R_MINOR:6356752.314245179,bounds:new P([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var i=Math.PI/180,e=this.R,n=t.lat*i,o=this.R_MINOR/e,s=Math.sqrt(1-o*o),r=s*Math.sin(n),a=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),s/2);return n=-e*Math.log(Math.max(a,1e-10)),new x(t.lng*i*e,n)},unproject:function(t){for(var i,e=180/Math.PI,n=this.R,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),r=Math.exp(-t.y/n),a=Math.PI/2-2*Math.atan(r),h=0,u=.1;h<15&&Math.abs(u)>1e-7;h++)i=s*Math.sin(a),i=Math.pow((1-i)/(1+i),s/2),a+=u=Math.PI/2-2*Math.atan(r*i)-a;return new M(a*e,t.x*e/n)}},He=(Object.freeze||Object)({LonLat:je,Mercator:We,SphericalMercator:mi}),Fe=i({},pi,{code:"EPSG:3395",projection:We,transformation:function(){var t=.5/(Math.PI*We.R);return Z(t,.5,-t,.5)}()}),Ue=i({},pi,{code:"EPSG:4326",projection:je,transformation:Z(1/180,1,-1/180,.5)}),Ve=i({},di,{projection:je,transformation:Z(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,i){var e=i.lng-t.lng,n=i.lat-t.lat;return Math.sqrt(e*e+n*n)},infinite:!0});di.Earth=pi,di.EPSG3395=Fe,di.EPSG3857=yi,di.EPSG900913=xi,di.EPSG4326=Ue,di.Simple=Ve;var qe=ci.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[n(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[n(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var i=t.target;if(i.hasLayer(this)){if(this._map=i,this._zoomAnimated=i._zoomAnimated,this.getEvents){var e=this.getEvents();i.on(e,this),this.once("remove",function(){i.off(e,this)},this)}this.onAdd(i),this.getAttribution&&i.attributionControl&&i.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),i.fire("layeradd",{layer:this})}}});be.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var i=n(t);return this._layers[i]?this:(this._layers[i]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var i=n(t);return this._layers[i]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[i],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&n(t)in this._layers},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},_addLayers:function(t){for(var i=0,e=(t=t?oi(t)?t:[t]:[]).length;i<e;i++)this.addLayer(t[i])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[n(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var i=n(t);this._zoomBoundLayers[i]&&(delete this._zoomBoundLayers[i],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,i=-1/0,e=this._getZoomSpan();for(var n in this._zoomBoundLayers){var o=this._zoomBoundLayers[n].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),i=void 0===o.maxZoom?i:Math.max(i,o.maxZoom)}this._layersMaxZoom=i===-1/0?void 0:i,this._layersMinZoom=t===1/0?void 0:t,e!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Ge=qe.extend({initialize:function(t,i){l(this,i),this._layers={};var e,n;if(t)for(e=0,n=t.length;e<n;e++)this.addLayer(t[e])},addLayer:function(t){var i=this.getLayerId(t);return this._layers[i]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var i=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[i]&&this._map.removeLayer(this._layers[i]),delete this._layers[i],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var i,e,n=Array.prototype.slice.call(arguments,1);for(i in this._layers)(e=this._layers[i])[t]&&e[t].apply(e,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return n(t)}}),Ke=Ge.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Ge.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Ge.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new T;for(var i in this._layers){var e=this._layers[i];t.extend(e.getBounds?e.getBounds():e.getLatLng())}return t}}),Ye=v.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){l(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,i){var e=this._getIconUrl(t);if(!e){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(e,i&&"IMG"===i.tagName?i:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,i){var e=this.options,n=e[i+"Size"];"number"==typeof n&&(n=[n,n]);var o=w(n),s=w("shadow"===i&&e.shadowAnchor||e.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+i+" "+(e.className||""),s&&(t.style.marginLeft=-s.x+"px",t.style.marginTop=-s.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,i){return i=i||document.createElement("img"),i.src=t,i},_getIconUrl:function(t){return Yi&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),Xe=Ye.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return Xe.imagePath||(Xe.imagePath=this._detectIconPath()),(this.options.imagePath||Xe.imagePath)+Ye.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=G("div","leaflet-default-icon-path",document.body),i=q(t,"background-image")||q(t,"backgroundImage");return document.body.removeChild(t),i=null===i||0!==i.indexOf("url")?"":i.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Je=Ee.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Re(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),Q(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&tt(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var i=this._marker,e=i._map,n=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,s=ht(i._icon),r=e.getPixelBounds(),a=e.getPixelOrigin(),h=b(r.min._subtract(a).add(o),r.max._subtract(a).subtract(o));if(!h.contains(s)){var u=w((Math.max(h.max.x,s.x)-h.max.x)/(r.max.x-h.max.x)-(Math.min(h.min.x,s.x)-h.min.x)/(r.min.x-h.min.x),(Math.max(h.max.y,s.y)-h.max.y)/(r.max.y-h.max.y)-(Math.min(h.min.y,s.y)-h.min.y)/(r.min.y-h.min.y)).multiplyBy(n);e.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),at(i._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=f(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(g(this._panRequest),this._panRequest=f(this._adjustPan.bind(this,t)))},_onDrag:function(t){var i=this._marker,e=i._shadow,n=ht(i._icon),o=i._map.layerPointToLatLng(n);e&&at(e,n),i._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,i.fire("move",t).fire("drag",t)},_onDragEnd:function(t){g(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),$e=qe.extend({options:{icon:new Xe,interactive:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",bubblingMouseEvents:!1},initialize:function(t,i){l(this,i),this._latlng=C(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var i=this._latlng;return this._latlng=C(t),this.update(),this.fire("move",{oldLatLng:i,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,i="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),e=t.icon.createIcon(this._icon),n=!1;e!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(e.title=t.title),"IMG"===e.tagName&&(e.alt=t.alt||"")),Q(e,i),t.keyboard&&(e.tabIndex="0"),this._icon=e,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),s=!1;o!==this._shadow&&(this._removeShadow(),s=!0),o&&(Q(o,i),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&s&&this.getPane("shadowPane").appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),K(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&K(this._shadow),this._shadow=null},_setPos:function(t){at(this._icon,t),this._shadow&&at(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(i)},_initInteraction:function(){if(this.options.interactive&&(Q(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Je)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Je(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;nt(this._icon,t),this._shadow&&nt(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),Qe=qe.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return l(this,t),this._renderer&&this._renderer._updateStyle(this),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),tn=Qe.extend({options:{fill:!0,radius:10},initialize:function(t,i){l(this,i),this._latlng=C(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=C(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var i=t&&t.radius||this._radius;return Qe.prototype.setStyle.call(this,t),this.setRadius(i),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,i=this._radiusY||t,e=this._clickTolerance(),n=[t+e,i+e];this._pxBounds=new P(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),en=tn.extend({initialize:function(t,e,n){if("number"==typeof e&&(e=i({},n,{radius:e})),l(this,e),this._latlng=C(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new T(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Qe.prototype.setStyle,_project:function(){var t=this._latlng.lng,i=this._latlng.lat,e=this._map,n=e.options.crs;if(n.distance===pi.distance){var o=Math.PI/180,s=this._mRadius/pi.R/o,r=e.project([i+s,t]),a=e.project([i-s,t]),h=r.add(a).divideBy(2),u=e.unproject(h).lat,l=Math.acos((Math.cos(s*o)-Math.sin(i*o)*Math.sin(u*o))/(Math.cos(i*o)*Math.cos(u*o)))/o;(isNaN(l)||0===l)&&(l=s/Math.cos(Math.PI/180*i)),this._point=h.subtract(e.getPixelOrigin()),this._radius=isNaN(l)?0:h.x-e.project([u,t-l]).x,this._radiusY=h.y-r.y}else{var c=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=e.latLngToLayerPoint(this._latlng),this._radius=this._point.x-e.latLngToLayerPoint(c).x}this._updateBounds()}}),nn=Qe.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,i){l(this,i),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var i,e,n=1/0,o=null,s=Dt,r=0,a=this._parts.length;r<a;r++)for(var h=this._parts[r],u=1,l=h.length;u<l;u++){var c=s(t,i=h[u-1],e=h[u],!0);c<n&&(n=c,o=s(t,i,e))}return o&&(o.distance=Math.sqrt(n)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,i,e,n,o,s,r,a=this._rings[0],h=a.length;if(!h)return null;for(t=0,i=0;t<h-1;t++)i+=a[t].distanceTo(a[t+1])/2;if(0===i)return this._map.layerPointToLatLng(a[0]);for(t=0,n=0;t<h-1;t++)if(o=a[t],s=a[t+1],e=o.distanceTo(s),(n+=e)>i)return r=(n-i)/e,this._map.layerPointToLatLng([s.x-r*(s.x-o.x),s.y-r*(s.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,i){return i=i||this._defaultShape(),t=C(t),i.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new T,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return jt(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var i=[],e=jt(t),n=0,o=t.length;n<o;n++)e?(i[n]=C(t[n]),this._bounds.extend(i[n])):i[n]=this._convertLatLngs(t[n]);return i},_project:function(){var t=new P;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t);var i=this._clickTolerance(),e=new x(i,i);this._bounds.isValid()&&t.isValid()&&(t.min._subtract(e),t.max._add(e),this._pxBounds=t)},_projectLatlngs:function(t,i,e){var n,o,s=t[0]instanceof M,r=t.length;if(s){for(o=[],n=0;n<r;n++)o[n]=this._map.latLngToLayerPoint(t[n]),e.extend(o[n]);i.push(o)}else for(n=0;n<r;n++)this._projectLatlngs(t[n],i,e)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var i,e,n,o,s,r,a,h=this._parts;for(i=0,n=0,o=this._rings.length;i<o;i++)for(e=0,s=(a=this._rings[i]).length;e<s-1;e++)(r=It(a[e],a[e+1],t,e,!0))&&(h[n]=h[n]||[],h[n].push(r[0]),r[1]===a[e+1]&&e!==s-2||(h[n].push(r[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,i=this.options.smoothFactor,e=0,n=t.length;e<n;e++)t[e]=Zt(t[e],i)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,i){var e,n,o,s,r,a,h=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(e=0,s=this._parts.length;e<s;e++)for(n=0,o=(r=(a=this._parts[e]).length)-1;n<r;o=n++)if((i||0!==n)&&Et(t,a[o],a[n])<=h)return!0;return!1}});nn._flat=Wt;var on=nn.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,i,e,n,o,s,r,a,h,u=this._rings[0],l=u.length;if(!l)return null;for(s=r=a=0,t=0,i=l-1;t<l;i=t++)e=u[t],n=u[i],o=e.y*n.x-n.y*e.x,r+=(e.x+n.x)*o,a+=(e.y+n.y)*o,s+=3*o;return h=0===s?u[0]:[r/s,a/s],this._map.layerPointToLatLng(h)},_convertLatLngs:function(t){var i=nn.prototype._convertLatLngs.call(this,t),e=i.length;return e>=2&&i[0]instanceof M&&i[0].equals(i[e-1])&&i.pop(),i},_setLatLngs:function(t){nn.prototype._setLatLngs.call(this,t),jt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return jt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,i=this.options.weight,e=new x(i,i);if(t=new P(t.min.subtract(e),t.max.add(e)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,o=0,s=this._rings.length;o<s;o++)(n=Ht(this._rings[o],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var i,e,n,o,s,r,a,h,u=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(s=0,r=(h=(i=this._parts[o]).length)-1;s<h;r=s++)e=i[s],n=i[r],e.y>t.y!=n.y>t.y&&t.x<(n.x-e.x)*(t.y-e.y)/(n.y-e.y)+e.x&&(u=!u);return u||nn.prototype._containsPoint.call(this,t,!0)}}),sn=Ke.extend({initialize:function(t,i){l(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,e,n,o=oi(t)?t:t.features;if(o){for(i=0,e=o.length;i<e;i++)((n=o[i]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var s=this.options;if(s.filter&&!s.filter(t))return this;var r=Ft(t,s);return r?(r.feature=Yt(t),r.defaultOptions=r.options,this.resetStyle(r),s.onEachFeature&&s.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return t.options=i({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this},setStyle:function(t){return this.eachLayer(function(i){this._setLayerStyle(i,t)},this)},_setLayerStyle:function(t,i){"function"==typeof i&&(i=i(t.feature)),t.setStyle&&t.setStyle(i)}}),rn={toGeoJSON:function(t){return Kt(this,{type:"Point",coordinates:qt(this.getLatLng(),t)})}};$e.include(rn),en.include(rn),tn.include(rn),nn.include({toGeoJSON:function(t){var i=!jt(this._latlngs),e=Gt(this._latlngs,i?1:0,!1,t);return Kt(this,{type:(i?"Multi":"")+"LineString",coordinates:e})}}),on.include({toGeoJSON:function(t){var i=!jt(this._latlngs),e=i&&!jt(this._latlngs[0]),n=Gt(this._latlngs,e?2:i?1:0,!0,t);return i||(n=[n]),Kt(this,{type:(e?"Multi":"")+"Polygon",coordinates:n})}}),Ge.include({toMultiPoint:function(t){var i=[];return this.eachLayer(function(e){i.push(e.toGeoJSON(t).geometry.coordinates)}),Kt(this,{type:"MultiPoint",coordinates:i})},toGeoJSON:function(t){var i=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===i)return this.toMultiPoint(t);var e="GeometryCollection"===i,n=[];return this.eachLayer(function(i){if(i.toGeoJSON){var o=i.toGeoJSON(t);if(e)n.push(o.geometry);else{var s=Yt(o);"FeatureCollection"===s.type?n.push.apply(n,s.features):n.push(s)}}}),e?Kt(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var an=Xt,hn=qe.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,i,e){this._url=t,this._bounds=z(i),l(this,e)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Q(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){K(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&X(this._image),this},bringToBack:function(){return this._map&&J(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=z(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,i=this._image=t?this._url:G("img");Q(i,"leaflet-image-layer"),this._zoomAnimated&&Q(i,"leaflet-zoom-animated"),this.options.className&&Q(i,this.options.className),i.onselectstart=r,i.onmousemove=r,i.onload=e(this.fire,this,"load"),i.onerror=e(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=i.src:(i.src=this._url,i.alt=this.options.alt)},_animateZoom:function(t){var i=this._map.getZoomScale(t.zoom),e=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;rt(this._image,e,i)},_reset:function(){var t=this._image,i=new P(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),e=i.getSize();at(t,i.min),t.style.width=e.x+"px",t.style.height=e.y+"px"},_updateOpacity:function(){nt(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),un=hn.extend({options:{autoplay:!0,loop:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,i=this._image=t?this._url:G("video");if(Q(i,"leaflet-image-layer"),this._zoomAnimated&&Q(i,"leaflet-zoom-animated"),i.onselectstart=r,i.onmousemove=r,i.onloadeddata=e(this.fire,this,"load"),t){for(var n=i.getElementsByTagName("source"),o=[],s=0;s<n.length;s++)o.push(n[s].src);this._url=n.length>0?o:[i.src]}else{oi(this._url)||(this._url=[this._url]),i.autoplay=!!this.options.autoplay,i.loop=!!this.options.loop;for(var a=0;a<this._url.length;a++){var h=G("source");h.src=this._url[a],i.appendChild(h)}}}}),ln=qe.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,i){l(this,t),this._source=i},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&nt(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&nt(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(nt(this._container,0),this._removeTimeout=setTimeout(e(K,void 0,this._container),200)):K(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=C(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&X(this._container),this},bringToBack:function(){return this._map&&J(this._container),this},_updateContent:function(){if(this._content){var t=this._contentNode,i="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof i)t.innerHTML=i;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(i)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),i=w(this.options.offset),e=this._getAnchor();this._zoomAnimated?at(this._container,t.add(e)):i=i.add(t).add(e);var n=this._containerBottom=-i.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+i.x;this._container.style.bottom=n+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}}),cn=ln.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){ln.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Qe||this._source.on("preclick",yt))},onRemove:function(t){ln.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Qe||this._source.off("preclick",yt))},getEvents:function(){var t=ln.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",i=this._container=G("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),e=this._wrapper=G("div",t+"-content-wrapper",i);if(this._contentNode=G("div",t+"-content",e),wt(e),xt(this._contentNode),mt(e,"contextmenu",yt),this._tipContainer=G("div",t+"-tip-container",i),this._tip=G("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=G("a",t+"-close-button",i);n.href="#close",n.innerHTML="&#215;",mt(n,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,i=t.style;i.width="",i.whiteSpace="nowrap";var e=t.offsetWidth;e=Math.min(e,this.options.maxWidth),e=Math.max(e,this.options.minWidth),i.width=e+1+"px",i.whiteSpace="",i.height="";var n=t.offsetHeight,o=this.options.maxHeight;o&&n>o?(i.height=o+"px",Q(t,"leaflet-popup-scrolled")):tt(t,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),e=this._getAnchor();at(this._container,i.add(e))},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){var t=this._map,i=parseInt(q(this._container,"marginBottom"),10)||0,e=this._container.offsetHeight+i,n=this._containerWidth,o=new x(this._containerLeft,-e-this._containerBottom);o._add(ht(this._container));var s=t.layerPointToContainerPoint(o),r=w(this.options.autoPanPadding),a=w(this.options.autoPanPaddingTopLeft||r),h=w(this.options.autoPanPaddingBottomRight||r),u=t.getSize(),l=0,c=0;s.x+n+h.x>u.x&&(l=s.x+n-u.x+h.x),s.x-l-a.x<0&&(l=s.x-a.x),s.y+e+h.y>u.y&&(c=s.y+e-u.y+h.y),s.y-c-a.y<0&&(c=s.y-a.y),(l||c)&&t.fire("autopanstart").panBy([l,c])}},_onCloseButtonClick:function(t){this._close(),Lt(t)},_getAnchor:function(){return w(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});be.mergeOptions({closePopupOnClick:!0}),be.include({openPopup:function(t,i,e){return t instanceof cn||(t=new cn(e).setContent(t)),i&&t.setLatLng(i),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),qe.include({bindPopup:function(t,i){return t instanceof cn?(l(t,i),this._popup=t,t._source=this):(this._popup&&!i||(this._popup=new cn(i,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,i){if(t instanceof qe||(i=t,t=this),t instanceof Ke)for(var e in this._layers){t=this._layers[e];break}return i||(i=t.getCenter?t.getCenter():t.getLatLng()),this._popup&&this._map&&(this._popup._source=t,this._popup.update(),this._map.openPopup(this._popup,i)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var i=t.layer||t.target;this._popup&&this._map&&(Lt(t),i instanceof Qe?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===i?this.closePopup():this.openPopup(i,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var _n=ln.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){ln.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){ln.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=ln.prototype.getEvents.call(this);return qi&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=G("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i=this._map,e=this._container,n=i.latLngToContainerPoint(i.getCenter()),o=i.layerPointToContainerPoint(t),s=this.options.direction,r=e.offsetWidth,a=e.offsetHeight,h=w(this.options.offset),u=this._getAnchor();"top"===s?t=t.add(w(-r/2+h.x,-a+h.y+u.y,!0)):"bottom"===s?t=t.subtract(w(r/2-h.x,-h.y,!0)):"center"===s?t=t.subtract(w(r/2+h.x,a/2-u.y+h.y,!0)):"right"===s||"auto"===s&&o.x<n.x?(s="right",t=t.add(w(h.x+u.x,u.y-a/2+h.y,!0))):(s="left",t=t.subtract(w(r+u.x-h.x,a/2-u.y-h.y,!0))),tt(e,"leaflet-tooltip-right"),tt(e,"leaflet-tooltip-left"),tt(e,"leaflet-tooltip-top"),tt(e,"leaflet-tooltip-bottom"),Q(e,"leaflet-tooltip-"+s),at(e,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&nt(this._container,t)},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(i)},_getAnchor:function(){return w(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});be.include({openTooltip:function(t,i,e){return t instanceof _n||(t=new _n(e).setContent(t)),i&&t.setLatLng(i),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),qe.include({bindTooltip:function(t,i){return t instanceof _n?(l(t,i),this._tooltip=t,t._source=this):(this._tooltip&&!i||(this._tooltip=new _n(i,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var i=t?"off":"on",e={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?e.add=this._openTooltip:(e.mouseover=this._openTooltip,e.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(e.mousemove=this._moveTooltip),qi&&(e.click=this._openTooltip)),this[i](e),this._tooltipHandlersAdded=!t}},openTooltip:function(t,i){if(t instanceof qe||(i=t,t=this),t instanceof Ke)for(var e in this._layers){t=this._layers[e];break}return i||(i=t.getCenter?t.getCenter():t.getLatLng()),this._tooltip&&this._map&&(this._tooltip._source=t,this._tooltip.update(),this._map.openTooltip(this._tooltip,i),this._tooltip.options.interactive&&this._tooltip._container&&(Q(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(tt(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var i=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(i,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var i,e,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(i=this._map.mouseEventToContainerPoint(t.originalEvent),e=this._map.containerPointToLayerPoint(i),n=this._map.layerPointToLatLng(e)),this._tooltip.setLatLng(n)}});var dn=Ye.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:document.createElement("div"),e=this.options;if(i.innerHTML=!1!==e.html?e.html:"",e.bgPos){var n=w(e.bgPos);i.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(i,"icon"),i},createShadow:function(){return null}});Ye.Default=Xe;var pn=qe.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Wi,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){l(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),K(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(X(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(J(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=o(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof x?t:new x(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var i,e=this.getPane().children,n=-t(-1/0,1/0),o=0,s=e.length;o<s;o++)i=e[o].style.zIndex,e[o]!==this._container&&i&&(n=t(n,+i));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Li){nt(this._container,this.options.opacity);var t=+new Date,i=!1,e=!1;for(var n in this._tiles){var o=this._tiles[n];if(o.current&&o.loaded){var s=Math.min(1,(t-o.loaded)/200);nt(o.el,s),s<1?i=!0:(o.active?e=!0:this._onOpaqueTile(o),o.active=!0)}}e&&!this._noPrune&&this._pruneTiles(),i&&(g(this._fadeFrame),this._fadeFrame=f(this._updateOpacity,this))}},_onOpaqueTile:r,_initContainer:function(){this._container||(this._container=G("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,i=this.options.maxZoom;if(void 0!==t){for(var e in this._levels)this._levels[e].el.children.length||e===t?(this._levels[e].el.style.zIndex=i-Math.abs(t-e),this._onUpdateLevel(e)):(K(this._levels[e].el),this._removeTilesAtZoom(e),this._onRemoveLevel(e),delete this._levels[e]);var n=this._levels[t],o=this._map;return n||((n=this._levels[t]={}).el=G("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=i,n.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,o.getCenter(),o.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:r,_onRemoveLevel:r,_onCreateLevel:r,_pruneTiles:function(){if(this._map){var t,i,e=this._map.getZoom();if(e>this.options.maxZoom||e<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(i=this._tiles[t]).retain=i.current;for(t in this._tiles)if((i=this._tiles[t]).current&&!i.active){var n=i.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var i in this._tiles)this._tiles[i].coords.z===t&&this._removeTile(i)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)K(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,i,e,n){var o=Math.floor(t/2),s=Math.floor(i/2),r=e-1,a=new x(+o,+s);a.z=+r;var h=this._tileCoordsToKey(a),u=this._tiles[h];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),r>n&&this._retainParent(o,s,r,n))},_retainChildren:function(t,i,e,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*i;s<2*i+2;s++){var r=new x(o,s);r.z=e+1;var a=this._tileCoordsToKey(r),h=this._tiles[a];h&&h.active?h.retain=!0:(h&&h.loaded&&(h.retain=!0),e+1<n&&this._retainChildren(o,s,e+1,n))}},_resetView:function(t){var i=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),i,i)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var i=this.options;return void 0!==i.minNativeZoom&&t<i.minNativeZoom?i.minNativeZoom:void 0!==i.maxNativeZoom&&i.maxNativeZoom<t?i.maxNativeZoom:t},_setView:function(t,i,e,n){var o=this._clampZoom(Math.round(i));(void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom)&&(o=void 0);var s=this.options.updateWhenZooming&&o!==this._tileZoom;n&&!s||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),e||this._pruneTiles(),this._noPrune=!!e),this._setZoomTransforms(t,i)},_setZoomTransforms:function(t,i){for(var e in this._levels)this._setZoomTransform(this._levels[e],t,i)},_setZoomTransform:function(t,i,e){var n=this._map.getZoomScale(e,t.zoom),o=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(i,e)).round();ji?rt(t.el,o,n):at(t.el,o)},_resetGrid:function(){var t=this._map,i=t.options.crs,e=this._tileSize=this.getTileSize(),n=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=i.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,i.wrapLng[0]],n).x/e.x),Math.ceil(t.project([0,i.wrapLng[1]],n).x/e.y)],this._wrapY=i.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([i.wrapLat[0],0],n).y/e.x),Math.ceil(t.project([i.wrapLat[1],0],n).y/e.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var i=this._map,e=i._animatingZoom?Math.max(i._animateToZoom,i.getZoom()):i.getZoom(),n=i.getZoomScale(e,this._tileZoom),o=i.project(t,this._tileZoom).floor(),s=i.getSize().divideBy(2*n);return new P(o.subtract(s),o.add(s))},_update:function(t){var i=this._map;if(i){var e=this._clampZoom(i.getZoom());if(void 0===t&&(t=i.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(n),s=o.getCenter(),r=[],a=this.options.keepBuffer,h=new P(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var l=this._tiles[u].coords;l.z===this._tileZoom&&h.contains(new x(l.x,l.y))||(this._tiles[u].current=!1)}if(Math.abs(e-this._tileZoom)>1)this._setView(t,e);else{for(var c=o.min.y;c<=o.max.y;c++)for(var _=o.min.x;_<=o.max.x;_++){var d=new x(_,c);if(d.z=this._tileZoom,this._isValidTile(d)){var p=this._tiles[this._tileCoordsToKey(d)];p?p.current=!0:r.push(d)}}if(r.sort(function(t,i){return t.distanceTo(s)-i.distanceTo(s)}),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(_=0;_<r.length;_++)this._addTile(r[_],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var i=this._map.options.crs;if(!i.infinite){var e=this._globalTileRange;if(!i.wrapLng&&(t.x<e.min.x||t.x>e.max.x)||!i.wrapLat&&(t.y<e.min.y||t.y>e.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return z(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,e=this.getTileSize(),n=t.scaleBy(e),o=n.add(e);return[i.unproject(n,t.z),i.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var i=this._tileCoordsToNwSe(t),e=new T(i[0],i[1]);return this.options.noWrap||(e=this._map.wrapLatLngBounds(e)),e},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),e=new x(+i[0],+i[1]);return e.z=+i[2],e},_removeTile:function(t){var i=this._tiles[t];i&&(Si||i.el.setAttribute("src",si),K(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){Q(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=r,t.onmousemove=r,Li&&this.options.opacity<1&&nt(t,this.options.opacity),zi&&!Mi&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,i){var n=this._getTilePos(t),o=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),e(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&f(e(this._tileReady,this,t,null,s)),at(s,n),this._tiles[o]={el:s,coords:t,current:!0},i.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,i,n){if(this._map&&n.getAttribute("src")!==si){i&&this.fire("tileerror",{error:i,tile:n,coords:t});var o=this._tileCoordsToKey(t);(n=this._tiles[o])&&(n.loaded=+new Date,this._map._fadeAnimated?(nt(n.el,0),g(this._fadeFrame),this._fadeFrame=f(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),i||(Q(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Li||!this._map._fadeAnimated?f(this._pruneTiles,this):setTimeout(e(this._pruneTiles,this),250)))}},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new x(this._wrapX?s(t.x,this._wrapX):t.x,this._wrapY?s(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new P(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),mn=pn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,i){this._url=t,(i=l(this,i)).detectRetina&&Yi&&i.maxZoom>0&&(i.tileSize=Math.floor(i.tileSize/2),i.zoomReverse?(i.zoomOffset--,i.minZoom++):(i.zoomOffset++,i.maxZoom--),i.minZoom=Math.max(0,i.minZoom)),"string"==typeof i.subdomains&&(i.subdomains=i.subdomains.split("")),zi||this.on("tileunload",this._onTileRemove)},setUrl:function(t,i){return this._url=t,i||this.redraw(),this},createTile:function(t,i){var n=document.createElement("img");return mt(n,"load",e(this._tileOnLoad,this,i,n)),mt(n,"error",e(this._tileOnError,this,i,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Yi?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return _(this._url,i(e,this.options))},_tileOnLoad:function(t,i){Li?setTimeout(e(t,this,null,i),0):t(null,i)},_tileOnError:function(t,i,e){var n=this.options.errorTileUrl;n&&i.getAttribute("src")!==n&&(i.src=n),t(e,i)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,i=this.options.maxZoom,e=this.options.zoomReverse,n=this.options.zoomOffset;return e&&(t=i-t),t+n},_getSubdomain:function(t){var i=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[i]},_abortLoading:function(){var t,i;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((i=this._tiles[t].el).onload=r,i.onerror=r,i.complete||(i.src=si,K(i),delete this._tiles[t]))}}),fn=mn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=i({},this.defaultWmsParams);for(var o in e)o in this.options||(n[o]=e[o]);var s=(e=l(this,e)).detectRetina&&Yi?2:1,r=this.getTileSize();n.width=r.x*s,n.height=r.y*s,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var i=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[i]=this._crs.code,mn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var i=this._tileCoordsToNwSe(t),e=this._crs,n=b(e.project(i[0]),e.project(i[1])),o=n.min,s=n.max,r=(this._wmsVersion>=1.3&&this._crs===Ue?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=mn.prototype.getTileUrl.call(this,t);return a+c(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});mn.WMS=fn,Jt.wms=function(t,i){return new fn(t,i)};var gn=qe.extend({options:{padding:.1,tolerance:0},initialize:function(t){l(this,t),n(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&Q(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,i){var e=this._map.getZoomScale(i,this._zoom),n=ht(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,i),r=this._map.project(t,i).subtract(s),a=o.multiplyBy(-e).add(n).add(o).subtract(r);ji?rt(this._container,a,e):at(this._container,a)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,i=this._map.getSize(),e=this._map.containerPointToLayerPoint(i.multiplyBy(-t)).round();this._bounds=new P(e,e.add(i.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),vn=gn.extend({getEvents:function(){var t=gn.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){gn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");mt(t,"mousemove",o(this._onMouseMove,32,this),this),mt(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),mt(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){g(this._redrawRequest),delete this._ctx,K(this._container),ft(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){this._redrawBounds=null;for(var t in this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){this._drawnLayers={},gn.prototype._update.call(this);var t=this._bounds,i=this._container,e=t.getSize(),n=Yi?2:1;at(i,t.min),i.width=n*e.x,i.height=n*e.y,i.style.width=e.x+"px",i.style.height=e.y+"px",Yi&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){gn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[n(t)]=t;var i=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=i),this._drawLast=i,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var i=t._order,e=i.next,o=i.prev;e?e.prev=o:this._drawLast=o,o?o.next=e:this._drawFirst=e,delete this._drawnLayers[t._leaflet_id],delete t._order,delete this._layers[n(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var i,e=t.options.dashArray.split(","),n=[];for(i=0;i<e.length;i++)n.push(Number(e[i]));t.options._dashArray=n}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||f(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var i=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new P,this._redrawBounds.extend(t._pxBounds.min.subtract([i,i])),this._redrawBounds.extend(t._pxBounds.max.add([i,i]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var i=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,i.x,i.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,i=this._redrawBounds;if(this._ctx.save(),i){var e=i.getSize();this._ctx.beginPath(),this._ctx.rect(i.min.x,i.min.y,e.x,e.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!i||t._pxBounds&&t._pxBounds.intersects(i))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,i){if(this._drawing){var e,n,o,s,r=t._parts,a=r.length,h=this._ctx;if(a){for(this._drawnLayers[t._leaflet_id]=t,h.beginPath(),e=0;e<a;e++){for(n=0,o=r[e].length;n<o;n++)s=r[e][n],h[n?"lineTo":"moveTo"](s.x,s.y);i&&h.closePath()}this._fillStroke(h,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var i=t._point,e=this._ctx,n=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||n)/n;this._drawnLayers[t._leaflet_id]=t,1!==o&&(e.save(),e.scale(1,o)),e.beginPath(),e.arc(i.x,i.y/o,n,0,2*Math.PI,!1),1!==o&&e.restore(),this._fillStroke(e,t)}},_fillStroke:function(t,i){var e=i.options;e.fill&&(t.globalAlpha=e.fillOpacity,t.fillStyle=e.fillColor||e.color,t.fill(e.fillRule||"evenodd")),e.stroke&&0!==e.weight&&(t.setLineDash&&t.setLineDash(i.options&&i.options._dashArray||[]),t.globalAlpha=e.opacity,t.lineWidth=e.weight,t.strokeStyle=e.color,t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.stroke())},_onClick:function(t){for(var i,e,n=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(i=o.layer).options.interactive&&i._containsPoint(n)&&!this._map._draggableMoved(i)&&(e=i);e&&(zt(t),this._fireEvent([e],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var i=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,i)}},_handleMouseOut:function(t){var i=this._hoveredLayer;i&&(tt(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,i){for(var e,n,o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&(n=e);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(Q(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,i,e){this._map._fireDOMEvent(i,e||i.type,t)},_bringToFront:function(t){var i=t._order,e=i.next,n=i.prev;e&&(e.prev=n,n?n.next=e:e&&(this._drawFirst=e),i.prev=this._drawLast,this._drawLast.next=i,i.next=null,this._drawLast=i,this._requestRedraw(t))},_bringToBack:function(t){var i=t._order,e=i.next,n=i.prev;n&&(n.next=e,e?e.prev=n:n&&(this._drawLast=n),i.prev=null,i.next=this._drawFirst,this._drawFirst.prev=i,this._drawFirst=i,this._requestRedraw(t))}}),yn=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),xn={_initContainer:function(){this._container=G("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(gn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=yn("shape");Q(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=yn("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[n(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;K(i),t.removeInteractiveTarget(i),delete this._layers[n(t)]},_updateStyle:function(t){var i=t._stroke,e=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(i||(i=t._stroke=yn("stroke")),o.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,n.dashArray?i.dashStyle=oi(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):i.dashStyle="",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(o.removeChild(i),t._stroke=null),n.fill?(e||(e=t._fill=yn("fill")),o.appendChild(e),e.color=n.fillColor||n.color,e.opacity=n.fillOpacity):e&&(o.removeChild(e),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),e=Math.round(t._radius),n=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+e+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){X(t._container)},_bringToBack:function(t){J(t._container)}},wn=$i?yn:E,Pn=gn.extend({getEvents:function(){var t=gn.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=wn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=wn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){K(this._container),ft(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){gn.prototype._update.call(this);var t=this._bounds,i=t.getSize(),e=this._container;this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,e.setAttribute("width",i.x),e.setAttribute("height",i.y)),at(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update")}},_initPath:function(t){var i=t._path=wn("path");t.options.className&&Q(i,t.options.className),t.options.interactive&&Q(i,"leaflet-interactive"),this._updateStyle(t),this._layers[n(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){K(t._path),t.removeInteractiveTarget(t._path),delete this._layers[n(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,e=t.options;i&&(e.stroke?(i.setAttribute("stroke",e.color),i.setAttribute("stroke-opacity",e.opacity),i.setAttribute("stroke-width",e.weight),i.setAttribute("stroke-linecap",e.lineCap),i.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?i.setAttribute("stroke-dasharray",e.dashArray):i.removeAttribute("stroke-dasharray"),e.dashOffset?i.setAttribute("stroke-dashoffset",e.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),e.fill?(i.setAttribute("fill",e.fillColor||e.color),i.setAttribute("fill-opacity",e.fillOpacity),i.setAttribute("fill-rule",e.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,k(t._parts,i))},_updateCircle:function(t){var i=t._point,e=Math.max(Math.round(t._radius),1),n="a"+e+","+(Math.max(Math.round(t._radiusY),1)||e)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(i.x-e)+","+i.y+n+2*e+",0 "+n+2*-e+",0 ";this._setPath(t,o)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){X(t._path)},_bringToBack:function(t){J(t._path)}});$i&&Pn.include(xn),be.include({getRenderer:function(t){var i=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return i||(i=this._renderer=this._createRenderer()),this.hasLayer(i)||this.addLayer(i),i},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=this._createRenderer({pane:t}),this._paneRenderers[t]=i),i},_createRenderer:function(t){return this.options.preferCanvas&&$t(t)||Qt(t)}});var Ln=on.extend({initialize:function(t,i){on.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=z(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Pn.create=wn,Pn.pointsToPath=k,sn.geometryToLayer=Ft,sn.coordsToLatLng=Ut,sn.coordsToLatLngs=Vt,sn.latLngToCoords=qt,sn.latLngsToCoords=Gt,sn.getFeature=Kt,sn.asFeature=Yt,be.mergeOptions({boxZoom:!0});var bn=Ee.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){mt(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){ft(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){K(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),fi(),ut(),this._startPoint=this._map.mouseEventToContainerPoint(t),mt(document,{contextmenu:Lt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=G("div","leaflet-zoom-box",this._container),Q(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new P(this._point,this._startPoint),e=i.getSize();at(this._box,i.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(K(this._box),tt(this._container,"leaflet-crosshair")),gi(),lt(),ft(document,{contextmenu:Lt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(e(this._resetState,this),0);var i=new T(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});be.addInitHook("addHandler","boxZoom",bn),be.mergeOptions({doubleClickZoom:!0});var Tn=Ee.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,e=i.getZoom(),n=i.options.zoomDelta,o=t.originalEvent.shiftKey?e-n:e+n;"center"===i.options.doubleClickZoom?i.setZoom(o):i.setZoomAround(t.containerPoint,o)}});be.addInitHook("addHandler","doubleClickZoom",Tn),be.mergeOptions({dragging:!0,inertia:!Mi,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var zn=Ee.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Re(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}Q(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){tt(this._map._container,"leaflet-grab"),tt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var i=z(this._map.options.maxBounds);this._offsetLimit=b(this._map.latLngToContainerPoint(i.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(i.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var i=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(e),this._times.push(i),this._prunePositions(i)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),i=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=i.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,i){return t-(t-i)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),i=this._offsetLimit;t.x<i.min.x&&(t.x=this._viscousLimit(t.x,i.min.x)),t.y<i.min.y&&(t.y=this._viscousLimit(t.y,i.min.y)),t.x>i.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),e=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-i+e)%t+i-e,s=(n+i+e)%t-i-e,r=Math.abs(o+e)<Math.abs(s+e)?o:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var i=this._map,e=i.options,n=!e.inertia||this._times.length<2;if(i.fire("dragend",t),n)i.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),s=(this._lastTime-this._times[0])/1e3,r=e.easeLinearity,a=o.multiplyBy(r/s),h=a.distanceTo([0,0]),u=Math.min(e.inertiaMaxSpeed,h),l=a.multiplyBy(u/h),c=u/(e.inertiaDeceleration*r),_=l.multiplyBy(-c/2).round();_.x||_.y?(_=i._limitOffset(_,i.options.maxBounds),f(function(){i.panBy(_,{duration:c,easeLinearity:r,noMoveStart:!0,animate:!0})})):i.fire("moveend")}}});be.addInitHook("addHandler","dragging",zn),be.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Mn=Ee.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),mt(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),ft(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,i=document.documentElement,e=t.scrollTop||i.scrollTop,n=t.scrollLeft||i.scrollLeft;this._map._container.focus(),window.scrollTo(n,e)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var i,e,n=this._panKeys={},o=this.keyCodes;for(i=0,e=o.left.length;i<e;i++)n[o.left[i]]=[-1*t,0];for(i=0,e=o.right.length;i<e;i++)n[o.right[i]]=[t,0];for(i=0,e=o.down.length;i<e;i++)n[o.down[i]]=[0,t];for(i=0,e=o.up.length;i<e;i++)n[o.up[i]]=[0,-1*t]},_setZoomDelta:function(t){var i,e,n=this._zoomKeys={},o=this.keyCodes;for(i=0,e=o.zoomIn.length;i<e;i++)n[o.zoomIn[i]]=t;for(i=0,e=o.zoomOut.length;i<e;i++)n[o.zoomOut[i]]=-t},_addHooks:function(){mt(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){ft(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var i,e=t.keyCode,n=this._map;if(e in this._panKeys)n._panAnim&&n._panAnim._inProgress||(i=this._panKeys[e],t.shiftKey&&(i=w(i).multiplyBy(3)),n.panBy(i),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds));else if(e in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else{if(27!==e||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}Lt(t)}}});be.addInitHook("addHandler","keyboard",Mn),be.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Cn=Ee.extend({addHooks:function(){mt(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){ft(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var i=Tt(t),n=this._map.options.wheelDebounceTime;this._delta+=i,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var o=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(e(this._performZoom,this),o),Lt(t)},_performZoom:function(){var t=this._map,i=t.getZoom(),e=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,s=e?Math.ceil(o/e)*e:o,r=t._limitZoom(i+(this._delta>0?s:-s))-i;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(i+r):t.setZoomAround(this._lastMousePos,i+r))}});be.addInitHook("addHandler","scrollWheelZoom",Cn),be.mergeOptions({tap:!0,tapTolerance:15});var Sn=Ee.extend({addHooks:function(){mt(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){ft(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Pt(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],n=i.target;this._startPos=this._newPos=new x(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&Q(n,"leaflet-active"),this._holdTimeout=setTimeout(e(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),this._simulateEvent("mousedown",i),mt(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),ft(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],e=i.target;e&&e.tagName&&"a"===e.tagName.toLowerCase()&&tt(e,"leaflet-active"),this._simulateEvent("mouseup",i),this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var i=t.touches[0];this._newPos=new x(i.clientX,i.clientY),this._simulateEvent("mousemove",i)},_simulateEvent:function(t,i){var e=document.createEvent("MouseEvents");e._simulated=!0,i.target._simulatedClick=!0,e.initMouseEvent(t,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),i.target.dispatchEvent(e)}});qi&&!Vi&&be.addInitHook("addHandler","tap",Sn),be.mergeOptions({touchZoom:qi&&!Mi,bounceAtZoomLimits:!0});var Zn=Ee.extend({addHooks:function(){Q(this._map._container,"leaflet-touch-zoom"),mt(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){tt(this._map._container,"leaflet-touch-zoom"),ft(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var e=i.mouseEventToContainerPoint(t.touches[0]),n=i.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=i.getSize()._divideBy(2),this._startLatLng=i.containerPointToLatLng(this._centerPoint),"center"!==i.options.touchZoom&&(this._pinchStartLatLng=i.containerPointToLatLng(e.add(n)._divideBy(2))),this._startDist=e.distanceTo(n),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),mt(document,"touchmove",this._onTouchMove,this),mt(document,"touchend",this._onTouchEnd,this),Pt(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var i=this._map,n=i.mouseEventToContainerPoint(t.touches[0]),o=i.mouseEventToContainerPoint(t.touches[1]),s=n.distanceTo(o)/this._startDist;if(this._zoom=i.getScaleZoom(s,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&s<1||this._zoom>i.getMaxZoom()&&s>1)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var r=n._add(o)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===r.x&&0===r.y)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(i._moveStart(!0,!1),this._moved=!0),g(this._animRequest);var a=e(i._move,i,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=f(a,this,!0),Pt(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,g(this._animRequest),ft(document,"touchmove",this._onTouchMove),ft(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});be.addInitHook("addHandler","touchZoom",Zn),be.BoxZoom=bn,be.DoubleClickZoom=Tn,be.Drag=zn,be.Keyboard=Mn,be.ScrollWheelZoom=Cn,be.Tap=Sn,be.TouchZoom=Zn,Object.freeze=ti,t.version="1.3.3+HEAD.b22aef4",t.Control=Te,t.control=ze,t.Browser=Qi,t.Evented=ci,t.Mixin=Ae,t.Util=ui,t.Class=v,t.Handler=Ee,t.extend=i,t.bind=e,t.stamp=n,t.setOptions=l,t.DomEvent=Pe,t.DomUtil=ve,t.PosAnimation=Le,t.Draggable=Re,t.LineUtil=Ne,t.PolyUtil=De,t.Point=x,t.point=w,t.Bounds=P,t.bounds=b,t.Transformation=S,t.transformation=Z,t.Projection=He,t.LatLng=M,t.latLng=C,t.LatLngBounds=T,t.latLngBounds=z,t.CRS=di,t.GeoJSON=sn,t.geoJSON=Xt,t.geoJson=an,t.Layer=qe,t.LayerGroup=Ge,t.layerGroup=function(t,i){return new Ge(t,i)},t.FeatureGroup=Ke,t.featureGroup=function(t){return new Ke(t)},t.ImageOverlay=hn,t.imageOverlay=function(t,i,e){return new hn(t,i,e)},t.VideoOverlay=un,t.videoOverlay=function(t,i,e){return new un(t,i,e)},t.DivOverlay=ln,t.Popup=cn,t.popup=function(t,i){return new cn(t,i)},t.Tooltip=_n,t.tooltip=function(t,i){return new _n(t,i)},t.Icon=Ye,t.icon=function(t){return new Ye(t)},t.DivIcon=dn,t.divIcon=function(t){return new dn(t)},t.Marker=$e,t.marker=function(t,i){return new $e(t,i)},t.TileLayer=mn,t.tileLayer=Jt,t.GridLayer=pn,t.gridLayer=function(t){return new pn(t)},t.SVG=Pn,t.svg=Qt,t.Renderer=gn,t.Canvas=vn,t.canvas=$t,t.Path=Qe,t.CircleMarker=tn,t.circleMarker=function(t,i){return new tn(t,i)},t.Circle=en,t.circle=function(t,i,e){return new en(t,i,e)},t.Polyline=nn,t.polyline=function(t,i){return new nn(t,i)},t.Polygon=on,t.polygon=function(t,i){return new on(t,i)},t.Rectangle=Ln,t.rectangle=function(t,i){return new Ln(t,i)},t.Map=be,t.map=function(t,i){return new be(t,i)};var En=window.L;t.noConflict=function(){return window.L=En,this},window.L=t}); \ No newline at end of file
diff --git a/searx/static/themes/simple/less/autocomplete.less b/searx/static/themes/simple/less/autocomplete.less
new file mode 100644
index 000000000..93f7df1ef
--- /dev/null
+++ b/searx/static/themes/simple/less/autocomplete.less
@@ -0,0 +1,69 @@
+/*! Autocomplete.js v2.6.3 | license MIT | (c) 2017, Baptiste Donaux | http://autocomplete-js.com */
+
+@background_color: white;
+
+.autocomplete {
+ position: absolute;
+ max-height: 0;
+ overflow-y: hidden;
+ text-align: left;
+
+ &:active, &:focus, &:hover {
+ background-color: @background_color;
+ }
+
+ &:empty {
+ display: none;
+ }
+
+ > ul {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+
+ > li {
+ cursor: pointer;
+ padding: 5px 0 5px 10px;
+
+ &.active, &:active, &:focus {
+ background-color: @color-base;
+
+ a:active, a:focus, a:hover {
+ text-decoration: none;
+ }
+ }
+
+ &.locked {
+ cursor: inherit;
+ }
+ }
+ }
+
+ &.open {
+ display: block;
+ background-color: @background_color;
+ border: 1px solid @color-base;
+ max-height: 500px;
+ overflow-y: auto;
+ z-index:100;
+
+ &:empty {
+ display: none;
+ }
+ }
+}
+
+
+@media screen and (max-width: @results-width) {
+
+ .autocomplete {
+ bottom: 0;
+ }
+
+ .autocomplete > ul > li {
+ padding: 7px 0 7px 10px;
+ border-bottom: 1px solid @color-result-top-border;
+ text-align: left;
+ }
+
+}
diff --git a/searx/static/themes/simple/less/code.less b/searx/static/themes/simple/less/code.less
new file mode 100644
index 000000000..a688dd98d
--- /dev/null
+++ b/searx/static/themes/simple/less/code.less
@@ -0,0 +1,83 @@
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #f8f8f8; }
+.highlight .c { color: #408080; font-style: italic } /* Comment */
+.highlight .err { border: 1px solid #FF0000 } /* Error */
+.highlight .k { color: #008000; font-weight: bold } /* Keyword */
+.highlight .o { color: #666666 } /* Operator */
+.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */
+.highlight .cp { color: #BC7A00 } /* Comment.Preproc */
+.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */
+.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .gr { color: #FF0000 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #888888 } /* Generic.Output */
+.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
+.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #008000 } /* Keyword.Pseudo */
+.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #B00040 } /* Keyword.Type */
+.highlight .m { color: #666666 } /* Literal.Number */
+.highlight .s { color: #BA2121 } /* Literal.String */
+.highlight .na { color: #7D9029 } /* Name.Attribute */
+.highlight .nb { color: #008000 } /* Name.Builtin */
+.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
+.highlight .no { color: #880000 } /* Name.Constant */
+.highlight .nd { color: #AA22FF } /* Name.Decorator */
+.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
+.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #0000FF } /* Name.Function */
+.highlight .nl { color: #A0A000 } /* Name.Label */
+.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
+.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
+.highlight .nv { color: #19177C } /* Name.Variable */
+.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
+.highlight .mf { color: #666666 } /* Literal.Number.Float */
+.highlight .mh { color: #666666 } /* Literal.Number.Hex */
+.highlight .mi { color: #666666 } /* Literal.Number.Integer */
+.highlight .mo { color: #666666 } /* Literal.Number.Oct */
+.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
+.highlight .sc { color: #BA2121 } /* Literal.String.Char */
+.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
+.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
+.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
+.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
+.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
+.highlight .sx { color: #008000 } /* Literal.String.Other */
+.highlight .sr { color: #BB6688 } /* Literal.String.Regex */
+.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
+.highlight .ss { color: #19177C } /* Literal.String.Symbol */
+.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
+.highlight .vc { color: #19177C } /* Name.Variable.Class */
+.highlight .vg { color: #19177C } /* Name.Variable.Global */
+.highlight .vi { color: #19177C } /* Name.Variable.Instance */
+.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
+
+.highlight pre {
+ overflow: auto;
+}
+
+.highlight .lineno {
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ cursor: default;
+
+ &::selection {
+ background: transparent; /* WebKit/Blink Browsers */
+ }
+ &::-moz-selection {
+ background: transparent; /* Gecko Browsers */
+ }
+}
diff --git a/searx/static/themes/simple/less/definitions.less b/searx/static/themes/simple/less/definitions.less
new file mode 100644
index 000000000..7a43720b8
--- /dev/null
+++ b/searx/static/themes/simple/less/definitions.less
@@ -0,0 +1,135 @@
+/*
+ * searx, A privacy-respecting, hackable metasearch engine
+ *
+ * To change the colors of the site, simple edit this variables
+ */
+
+/// Basic Colors
+
+@color-base: #3498DB;
+@color-base-dark: #084999;
+@color-base-light: #ECF0F1;
+@color-highlight: #094089;
+@color-black: #000000;
+
+///
+@color-error: #db3434;
+@color-error-background: lighten(@color-error, 40%);
+
+@color-warning: #dbba34;
+@color-warning-background: lighten(@color-warning, 40%);
+
+/// General
+
+@color-font: #444;
+@color-font-light: #888;
+
+@color-red: #25a55b;
+
+@color-url-font: #29314d;
+@color-url-visited-font: #684898;
+@results-width: 50em;
+@search-width: 40em;
+
+//
+@color-a-font: @color-base;
+@color-a-font-hover: @color-base;
+
+
+/// Start-Screen
+
+
+
+/// Search-Input
+
+@color-search-border: @color-base;
+@color-search-background: #FFF;
+@color-search-font: #222;
+
+/// Autocompleter
+
+@color-autocompleter-choices-background: #FFF;
+@color-autocompleter-choices-border: @color-base;
+@color-autocompleter-choices-border-left-right: @color-base;
+@color-autocompleter-choices-border-bottom: @color-base;
+
+@color-autocompleter-choices-font: #444;
+
+/// Answers
+@color-answers-border: @color-base-dark;
+
+// Selected
+@color-autocompleter-selected-background: #444;
+@color-autocompleter-selected-font: #FFF;
+@color-autocompleter-selected-queried-font: #9FCFFF;
+
+/// Categories
+
+@color-categories-item-selected: @color-base;
+@color-categories-item-selected-font: #FFF;
+
+@color-categories-item-border-selected: @color-base-dark;
+@color-categories-item-border-unselected: #E8E7E6;
+@color-categories-item-border-unselected-hover: @color-base;
+
+
+/// Results
+
+@color-suggestions-button-background: @color-base;
+@color-suggestions-button-font: #FFF;
+
+@color-download-button-background: @color-base;
+@color-download-button-font: #FFF;
+
+@color-result-search-background: @color-base-light;
+
+@color-result-definition-border: gray;
+@color-result-torrent-border: lightgray;
+@color-result-top-border: #E8E7E6;
+
+// Link to result
+@color-result-link-font: @color-base-dark;
+@color-result-link-visited-font: @color-url-visited-font;
+
+// Url to result
+@color-result-url-font: @color-red;
+
+// Publish Date
+@color-result-publishdate-font: @color-font-light;
+
+// Images
+@color-result-image-span-background-hover: rgba(0, 0, 0, 0.6);
+@color-result-image-span-font: #FFF;
+
+// Search-URL
+@color-result-search-url-border: #888;
+@color-result-search-url-font: #444;
+
+
+/// Settings
+
+@color-settings-fieldset: @color-base;
+@color-settings-table-striped: #dbdbdb;
+@color-settings-tr-hover: #ececec;
+
+// Labels
+@color-settings-label-allowed-background: #E74C3C;
+@color-settings-label-allowed-font: #FFF;
+
+@color-settings-label-deny-background: #2ECC71;
+@color-settings-label-deny-font: @color-font;
+
+@color-settings-return-background: @color-base;
+@color-settings-return-font: #FFF;
+
+/// Other
+
+@color-engines-font: @color-font-light;
+@color-percentage-div-background: #444;
+
+/// Load fonts from this directory.
+@icon-font-path: "../../../fonts/";
+//** File name for all font files.
+@icon-font-name: "glyphicons-halflings-regular";
+//** Element ID within SVG icon file.
+@icon-font-svg-id: "glyphicons_halflingsregular";
diff --git a/searx/static/themes/simple/less/index.less b/searx/static/themes/simple/less/index.less
new file mode 100644
index 000000000..e1efdac90
--- /dev/null
+++ b/searx/static/themes/simple/less/index.less
@@ -0,0 +1,43 @@
+.index {
+
+ text-align: center;
+
+ .title {
+ background: url('../img/searx.png') no-repeat;
+ width: 100%;
+ min-height: 80px;
+ background-position: center;
+ }
+
+ h1 {
+ font-size: 5em;
+ visibility: hidden;
+ }
+
+ #search {
+ margin: 0 auto;
+ background: inherit;
+ border: inherit;
+ }
+
+ .search_filters {
+ display: block;
+ margin: 1em 0;
+ }
+
+ .category label {
+ padding: 6px 10px;
+ border-bottom: initial !important;
+ }
+
+}
+
+@media screen and (max-width: 75em) {
+
+ div.title {
+ h1 {
+ font-size: 1em;
+ }
+ }
+
+}
diff --git a/searx/static/themes/simple/less/ion.less b/searx/static/themes/simple/less/ion.less
new file mode 100644
index 000000000..c9e715591
--- /dev/null
+++ b/searx/static/themes/simple/less/ion.less
@@ -0,0 +1,181 @@
+// Generated by grunt-webfont
+
+
+@font-face {
+ font-family:"ion";
+ src:url("../fonts/ion.eot?ce7a0ead692560b4405a96d5b8471f51");
+ src:url("../fonts/ion.eot?#iefix") format("embedded-opentype"),
+ url("../fonts/ion.woff2?ce7a0ead692560b4405a96d5b8471f51") format("woff2"),
+ url("../fonts/ion.woff?ce7a0ead692560b4405a96d5b8471f51") format("woff"),
+ url("../fonts/ion.ttf?ce7a0ead692560b4405a96d5b8471f51") format("truetype"),
+ url("../fonts/ion.svg?ce7a0ead692560b4405a96d5b8471f51#ion") format("svg");
+ font-weight:normal;
+ font-style:normal;
+}
+
+.ion-icon {
+ &:before {
+ font-family:"ion";
+ }
+ display:inline-block;
+ vertical-align:middle;
+ line-height:1;
+ font-weight:normal;
+ font-style:normal;
+ speak:none;
+ text-decoration:inherit;
+ text-transform:none;
+ text-rendering:auto;
+ -webkit-font-smoothing:antialiased;
+ -moz-osx-font-smoothing:grayscale;
+}
+
+
+// Icons
+
+.ion-navicon-round {
+ &:before {
+ content:"\f101";
+ }
+}
+
+
+.ion-search {
+ &:before {
+ content:"\f102";
+ }
+}
+
+
+.ion-play {
+ &:before {
+ content:"\f103";
+ }
+}
+
+
+.ion-link {
+ &:before {
+ content:"\f104";
+ }
+}
+
+
+.ion-chevron-up {
+ &:before {
+ content:"\f105";
+ }
+}
+
+
+.ion-chevron-left {
+ &:before {
+ content:"\f106";
+ }
+}
+
+
+.ion-chevron-right {
+ &:before {
+ content:"\f107";
+ }
+}
+
+
+.ion-arrow-down-a {
+ &:before {
+ content:"\f108";
+ }
+}
+
+
+.ion-arrow-up-a {
+ &:before {
+ content:"\f109";
+ }
+}
+
+
+.ion-arrow-swap {
+ &:before {
+ content:"\f10a";
+ }
+}
+
+
+.ion-arrow-dropdown {
+ &:before {
+ content:"\f10b";
+ }
+}
+
+
+.ion-globe {
+ &:before {
+ content:"\f10c";
+ }
+}
+
+
+.ion-time {
+ &:before {
+ content:"\f10d";
+ }
+}
+
+
+.ion-location {
+ &:before {
+ content:"\f10e";
+ }
+}
+
+
+.ion-warning {
+ &:before {
+ content:"\f10f";
+ }
+}
+
+
+.ion-error {
+ &:before {
+ content:"\f110";
+ }
+}
+
+
+.ion-film-outline {
+ &:before {
+ content:"\f111";
+ }
+}
+
+
+.ion-music-note {
+ &:before {
+ content:"\f112";
+ }
+}
+
+
+.ion-more-vertical {
+ &:before {
+ content:"\f113";
+ }
+}
+
+
+.ion-magnet {
+ &:before {
+ content:"\f114";
+ }
+}
+
+
+.ion-close {
+ &:before {
+ content:"\f115";
+ }
+}
+
diff --git a/searx/static/themes/simple/less/mixins.less b/searx/static/themes/simple/less/mixins.less
new file mode 100644
index 000000000..b3aa4e13d
--- /dev/null
+++ b/searx/static/themes/simple/less/mixins.less
@@ -0,0 +1,62 @@
+/*
+* searx, A privacy-respecting, hackable metasearch engine
+*/
+
+// Mixins
+.text-size-adjust (@property: 100%) {
+ -webkit-text-size-adjust: @property;
+ -ms-text-size-adjust: @property;
+ -moz-text-size-adjust: @property;
+ text-size-adjust: @property;
+}
+
+.rounded-corners (@radius: 4px) {
+ -webkit-border-radius: @radius;
+ -moz-border-radius: @radius;
+ border-radius: @radius;
+}
+
+// disable user selection
+.disable-user-select () {
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+// select all on focus
+.select-all-on-focus() {
+ -webkit-user-select: all;
+ -moz-user-select: all;
+ -ms-user-select: element;
+ user-select: all;
+}
+
+// see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Advanced_layouts_with_flexbox
+.flexbox() {
+ display: -webkit-box;
+ display: -moz-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+}
+
+.inline-flex() {
+ display: -webkit-inline-box;
+ display: -moz-inline-box;
+ display: -webkit-inline-flex;
+ display: -ms-inline-flexbox;
+ display: inline-flex;
+}
+
+.flex-direction-row() {
+ -webkit-box-direction: normal;
+ -webkit-box-orient: horizontal;
+ -moz-box-direction: normal;
+ -moz-box-orient: horizontal;
+ -webkit-flex-direction: row;
+ -ms-flex-direction: row;
+ flex-direction: row;
+}
diff --git a/searx/static/themes/simple/less/normalize.less b/searx/static/themes/simple/less/normalize.less
new file mode 100644
index 000000000..47b010e47
--- /dev/null
+++ b/searx/static/themes/simple/less/normalize.less
@@ -0,0 +1,341 @@
+/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
+
+/* Document
+ ========================================================================== */
+
+/**
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
+ */
+
+html {
+ line-height: 1.15; /* 1 */
+ -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/* Sections
+ ========================================================================== */
+
+/**
+ * Remove the margin in all browsers.
+ */
+
+body {
+ margin: 0;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+
+h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+
+/* Grouping content
+ ========================================================================== */
+
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+
+hr {
+ box-sizing: content-box; /* 1 */
+ height: 0; /* 1 */
+ overflow: visible; /* 2 */
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+pre {
+ font-family: monospace, monospace; /* 1 */
+ font-size: 1em; /* 2 */
+}
+
+/* Text-level semantics
+ ========================================================================== */
+
+/**
+ * Remove the gray background on active links in IE 10.
+ */
+
+a {
+ background-color: transparent;
+}
+
+/**
+ * 1. Remove the bottom border in Chrome 57-
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+
+abbr[title] {
+ border-bottom: none; /* 1 */
+ text-decoration: underline; /* 2 */
+ text-decoration: underline dotted; /* 2 */
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+ font-weight: bolder;
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+code,
+kbd,
+samp {
+ font-family: monospace, monospace; /* 1 */
+ font-size: 1em; /* 2 */
+}
+
+/**
+ * Add the correct font size in all browsers.
+ */
+
+small {
+ font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+sup {
+ top: -0.5em;
+}
+
+/* Embedded content
+ ========================================================================== */
+
+/**
+ * Remove the border on images inside links in IE 10.
+ */
+
+img {
+ border-style: none;
+}
+
+/* Forms
+ ========================================================================== */
+
+/**
+ * 1. Change the font styles in all browsers.
+ * 2. Remove the margin in Firefox and Safari.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+ font-family: inherit; /* 1 */
+ font-size: 100%; /* 1 */
+ line-height: 1.15; /* 1 */
+ margin: 0; /* 2 */
+}
+
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+
+button,
+input { /* 1 */
+ overflow: visible;
+}
+
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+
+button,
+select { /* 1 */
+ text-transform: none;
+}
+
+/**
+ * Correct the inability to style clickable types in iOS and Safari.
+ */
+
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
+ -webkit-appearance: button;
+}
+
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+ border-style: none;
+ padding: 0;
+}
+
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+ outline: 1px dotted ButtonText;
+}
+
+/**
+ * Correct the padding in Firefox.
+ */
+
+fieldset {
+ padding: 0.35em 0.75em 0.625em;
+}
+
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ * `fieldset` elements in all browsers.
+ */
+
+legend {
+ box-sizing: border-box; /* 1 */
+ color: inherit; /* 2 */
+ display: table; /* 1 */
+ max-width: 100%; /* 1 */
+ padding: 0; /* 3 */
+ white-space: normal; /* 1 */
+}
+
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+
+progress {
+ vertical-align: baseline;
+}
+
+/**
+ * Remove the default vertical scrollbar in IE 10+.
+ */
+
+textarea {
+ overflow: auto;
+}
+
+/**
+ * 1. Add the correct box sizing in IE 10.
+ * 2. Remove the padding in IE 10.
+ */
+
+[type="checkbox"],
+[type="radio"] {
+ box-sizing: border-box; /* 1 */
+ padding: 0; /* 2 */
+}
+
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+ height: auto;
+}
+
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+
+[type="search"] {
+ -webkit-appearance: textfield; /* 1 */
+ outline-offset: -2px; /* 2 */
+}
+
+/**
+ * Remove the inner padding in Chrome and Safari on macOS.
+ */
+
+[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+ -webkit-appearance: button; /* 1 */
+ font: inherit; /* 2 */
+}
+
+/* Interactive
+ ========================================================================== */
+
+/*
+ * Add the correct display in Edge, IE 10+, and Firefox.
+ */
+
+details {
+ display: block;
+}
+
+/*
+ * Add the correct display in all browsers.
+ */
+
+summary {
+ display: list-item;
+}
+
+/* Misc
+ ========================================================================== */
+
+/**
+ * Add the correct display in IE 10+.
+ */
+
+template {
+ display: none;
+}
+
+/**
+ * Add the correct display in IE 10.
+ */
+
+[hidden] {
+ display: none;
+}
diff --git a/searx/static/themes/simple/less/preferences.less b/searx/static/themes/simple/less/preferences.less
new file mode 100644
index 000000000..e1e88b51f
--- /dev/null
+++ b/searx/static/themes/simple/less/preferences.less
@@ -0,0 +1,103 @@
+#main_preferences {
+ form {
+ width: 100%;
+ }
+
+ fieldset {
+ margin: 8px;
+ border: none;
+ }
+
+ legend {
+ margin: 0;
+ padding: 5px 0 0 0;
+ display: block;
+ float:left;
+ width: 300px;
+ }
+
+ .value {
+ margin: 0;
+ padding: 0;
+ float:left;
+ width: 15em;
+ }
+
+ .description {
+ margin: 0;
+ padding: 5px 0 0 0;
+ float:left;
+ width: 50%;
+ color: darken(#dcdcdc, 30%);
+ font-size: 90%;
+ }
+
+ select {
+ width: 200px;
+ font-size: inherit !important;
+ }
+
+ table {
+ border-collapse: collapse;
+ }
+
+ table td {
+ text-align: center;
+ }
+
+ table.cookies {
+ width: auto;
+
+ th, td {
+ text-align: left;
+ padding: 0.25em;
+ }
+
+ th:first-child, td:first-child {
+ padding-right: 4em;
+ }
+
+ &>tbody>tr:nth-child(even)>th,
+ &>tbody>tr:nth-child(even)>td {
+ background-color: @color-settings-tr-hover;
+ }
+ }
+
+ .name, .shortcut {
+ text-align: left;
+ }
+
+ .preferences_back {
+ background: none repeat scroll 0 0 @color-settings-return-background;
+ color: white;
+ border: 0 none;
+ .rounded-corners;
+ cursor: pointer;
+ display: inline-block;
+ margin: 2px 4px;
+ padding: 0.5em;
+
+ a {
+ display: block;
+ color: @color-settings-return-font;
+ }
+
+ a::first-letter {
+ text-transform: uppercase;
+ }
+ }
+
+
+ div.selectable_url {
+ pre {
+ width: 100%;
+ }
+ }
+
+}
+
+@media screen and (max-width: 75em) {
+ .preferences_back {
+ clear: both;
+ }
+}
diff --git a/searx/static/themes/simple/less/search.less b/searx/static/themes/simple/less/search.less
new file mode 100644
index 000000000..dbcfc932e
--- /dev/null
+++ b/searx/static/themes/simple/less/search.less
@@ -0,0 +1,264 @@
+/*
+* searx, A privacy-respecting, hackable metasearch engine
+*/
+
+#search {
+ padding: 0 2em;
+ margin: 0;
+ background: #f7f7f7;
+ border-bottom: 1px solid #d7d7d7;
+}
+
+#search_wrapper {
+ padding: 10px 0;
+}
+
+.search_box {
+ margin: 0 12px 0 0;
+ display: inline-flex;
+ flex-direction: row;
+
+ white-space: nowrap;
+ /*
+ &:has(q:focus) {
+ box-shadow: 0px 0px 5px #CCC;
+}
+*/
+}
+
+#clear_search {
+ display: block;
+ border-collapse: separate;
+ box-sizing: border-box;
+ width: 1.8em;
+
+ margin: 0;
+ padding: 2px;
+ height: 2.2em;
+ background: none repeat scroll 0 0 @color-search-background;
+ border-top: 1px solid @color-search-border;
+ border-bottom: 1px solid @color-search-border;
+ border-right: none;
+ border-left: none;
+ border-radius: 0px;
+ outline: none;
+ color: @color-search-font;
+ font-size: 16px;
+ z-index: 10000;
+
+ &:hover {
+ color: @color-search-border;
+ }
+
+ &.empty * {
+ display: none;
+ }
+}
+
+#q::-ms-clear, #q::-webkit-search-cancel-button {
+ display: none;
+}
+
+#q, #send_search {
+ display: block !important;
+ border-collapse: separate;
+ box-sizing: border-box;
+
+ margin: 0;
+ padding: 2px;
+ height: 2.2em;
+ background: none repeat scroll 0 0 @color-search-background;
+ border: 1px solid @color-search-border;
+ border-radius: 0px;
+ outline: none;
+ color: @color-search-font;
+ font-size: 16px;
+ z-index: 2;
+}
+
+#q {
+ outline: medium none;
+ padding-left: 8px;
+ padding-right: 0px !important;
+ border-right: none;
+ width: @search-width;
+}
+
+#send_search {
+ border-left: none;
+ width: 2.2em;
+
+ &:hover {
+ cursor: pointer;
+ background-color: @color-search-border;
+ color: @color-base-light;
+ }
+}
+
+.no-js #send_search {
+ width: auto !important;
+}
+
+.search_filters {
+ display: inline-block;
+ vertical-align: middle;
+}
+
+@media screen and (max-width: 75em) {
+
+ #categories {
+ font-size: 90%;
+ clear: both;
+
+ .checkbox_container {
+ margin-top: 2px;
+ margin: auto;
+ }
+ }
+
+ html.touch {
+ #main_index, #main_results {
+
+ #categories_container {
+ width: 1000px;
+ width: -moz-max-content;
+ width: -webkit-max-content;
+ width: max-content;
+
+ .category {
+ display: inline-block;
+ width: auto;
+ }
+ }
+
+ #categories {
+ width: 100%;
+ margin: 0;
+ text-align: left;
+ overflow-x: scroll;
+ overflow-y: hidden;
+ -webkit-overflow-scrolling: touch;
+ }
+ }
+ }
+
+}
+
+@media screen and (max-width: @results-width) {
+
+ #search {
+ width: 100%;
+ margin: 0;
+ padding: 0.1em 0 0 0;
+ }
+
+ #search_wrapper {
+ width: 100%;
+ margin: 0 0 0.7em 0;
+ padding: 0;
+ }
+
+ .search_box {
+ // hack, should bew 100% ?
+ width: 99%;
+ margin: 0.1em;
+ padding: 0 0.1em 0 0;
+ display: flex;
+ flex-direction: row;
+ }
+
+ #q {
+ width: auto !important;
+ flex: 1;
+ }
+
+ .search_filters {
+ display: block;
+ margin: 0.5em;
+ }
+
+ .language, .time_range {
+ width: 45%;
+ }
+
+ .category {
+ display: block;
+ width: 90%;
+
+ label {
+ border-bottom: 0;
+ }
+ }
+
+}
+
+#categories {
+ margin: 0 10px 0 0;
+ .disable-user-select;
+
+ &::-webkit-scrollbar {
+ width: 0;
+ height: 0;
+ }
+}
+
+.category {
+ display: inline-block;
+ position: relative;
+ margin: 0 3px;
+ padding: 0px;
+
+ input {
+ display: none;
+ }
+
+ label {
+ cursor: pointer;
+ padding: 4px 10px;
+ margin: 0;
+ display: block;
+ text-transform: capitalize;
+ font-size: 0.9em;
+ border-bottom: 2px solid transparent;
+ .disable-user-select;
+ }
+
+ input[type="checkbox"]:focus + label {
+ box-shadow: 0px 0px 8px #3498DB;
+ }
+
+ /*label:hover {
+ border-bottom: 2px solid @color-categories-item-border-unselected-hover;
+ }*/
+
+ input[type="checkbox"]:checked + label {
+ background: @color-categories-item-selected;
+ color: @color-categories-item-selected-font;
+ border-bottom: 2px solid @color-categories-item-border-selected;
+ }
+}
+
+#categories_container {
+
+ position: relative;
+
+ .help {
+ position: absolute;
+ width: 100%;
+ bottom: -20px;
+ overflow: hidden;
+
+ opacity: 0;
+ transition: opacity 1s ease;
+
+ font-size: 0.8em;
+ text-position: center;
+ background: white;
+ }
+
+ &:hover .help {
+ opacity: 0.8;
+ transition: opacity 1s ease;
+ }
+
+}
diff --git a/searx/static/themes/simple/less/stats.less b/searx/static/themes/simple/less/stats.less
new file mode 100644
index 000000000..c134bd0ec
--- /dev/null
+++ b/searx/static/themes/simple/less/stats.less
@@ -0,0 +1,8 @@
+.percentage {
+ position: relative;
+ width: 300px;
+
+ div {
+ background: @color-percentage-div-background;
+ }
+}
diff --git a/searx/static/themes/simple/less/style-rtl.less b/searx/static/themes/simple/less/style-rtl.less
new file mode 100644
index 000000000..2b68bcfde
--- /dev/null
+++ b/searx/static/themes/simple/less/style-rtl.less
@@ -0,0 +1,6 @@
+@import "style.less";
+
+#search_submit {
+ left: 1px;
+ right:auto;
+}
diff --git a/searx/static/themes/simple/less/style.less b/searx/static/themes/simple/less/style.less
new file mode 100644
index 000000000..9f69f7a80
--- /dev/null
+++ b/searx/static/themes/simple/less/style.less
@@ -0,0 +1,721 @@
+/*
+* searx, A privacy-respecting, hackable metasearch engine
+*
+* To convert "style.less" to "style.css" run: $make styles
+*/
+
+@import "normalize.less";
+
+@import "definitions.less";
+
+@import "mixins.less";
+
+@import "code.less";
+
+@import "toolkit.less";
+
+@import "autocomplete.less";
+
+// ion-icon
+@import "ion.less";
+
+.ion-icon-big {
+ .ion-icon;
+ font-size: 149%;
+}
+
+// for index.html template
+@import "index.less";
+
+// for preferences.html template
+@import "preferences.less";
+
+// Search-Field
+@import "search.less";
+
+// Main LESS-Code
+html {
+ font-family: arial, sans-serif;
+ font-size: 0.9em;
+ .text-size-adjust;
+ color: @color-font;
+ padding: 0;
+ margin: 0;
+}
+
+body, main {
+ padding: 0;
+ margin: 0;
+}
+
+main {
+ width: 100%;
+ // position: absolute;
+}
+
+footer {
+ // position:absolute;
+ bottom:0;
+ width:100%;
+ height:50px;
+}
+
+#main_preferences, #main_about, #main_stats {
+ margin: 3em;
+ width: auto;
+}
+
+footer {
+ bottom: 0;
+ height: 3em;
+ margin: 1em 0;
+ padding: 1em 0;
+ clear: both;
+ width: 100%;
+ text-align: center;
+
+ p {
+ font-size: 0.9em;
+ }
+}
+
+#main_preferences h1, #main_stats h1 {
+ background: url('../img/searx.png') no-repeat;
+ background-size: auto 75%;
+ min-height: 40px;
+ margin: 0 auto;
+
+ span {
+ visibility: hidden;
+ }
+}
+
+input[type="submit"], #results button[type="submit"] {
+ padding: 0.5rem;
+ margin: 2px 4px;
+ display: inline-block;
+ background: @color-download-button-background;
+ color: @color-download-button-font;
+ .rounded-corners;
+ border: 0;
+ cursor: pointer;
+}
+
+a {
+ text-decoration: none;
+ color: @color-url-font;
+
+ &:visited {
+ color: @color-url-visited-font;
+
+ .highlight {
+ color: @color-url-visited-font;
+ }
+ }
+}
+
+article[data-vim-selected] {
+ background: #f7f7f7;
+}
+
+article[data-vim-selected]::before {
+ position: absolute;
+ left: 1em;
+ padding: 2px;
+ content: ">";
+ font-weight: bold;
+ color: @color-base;
+}
+
+article.result-images[data-vim-selected] {
+ background: @color-base;
+}
+
+article.result-images[data-vim-selected]::before {
+ display: none;
+ content: "";
+}
+
+.result {
+ margin: 19px 0 18px 0;
+ padding: 0;
+
+ h3 {
+ font-size: 1.1em;
+ word-wrap:break-word;
+ margin: 5px 0 1px 0;
+ padding: 0;
+ margin-bottom: 0;
+
+ a {
+ color: @color-result-link-font;
+ font-weight: normal;
+ font-size: 1.1em;
+
+ &:visited {
+ color: @color-result-link-visited-font;
+ }
+
+ &:focus, &:hover {
+ text-decoration: underline;
+ border: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ outline:none;
+ }
+ }
+ }
+
+ .cache_link, .proxyfied_link {
+ font-size: 0.9em !important;
+ }
+
+ .content, .stat, .altlink {
+ font-size: 0.9em;
+ margin: 0;
+ padding: 0;
+ max-width: 54em;
+ word-wrap:break-word;
+ line-height: 1.24;
+
+ .highlight {
+ color: @color-black;
+ background: inherit;
+ font-weight: bold;
+ }
+ }
+
+ .codelines {
+ .highlight {
+ color: inherit;
+ background: inherit;
+ font-weight: normal;
+ }
+ }
+
+ .url {
+ font-size: 0.9em;
+ margin: 0 0 3px 0;
+ padding: 0;
+ max-width: 54em;
+ word-wrap:break-word;
+ color: @color-result-url-font;
+ }
+
+ .published_date {
+ font-size: 0.8em;
+ color: @color-result-publishdate-font;
+ }
+
+ img {
+
+ &.thumbnail {
+ float: left;
+ padding: 0 5px 10px 0;
+ width: 20em;
+ min-width: 20em;
+ min-height: 8em;
+ // background: @color-base-light;
+ }
+
+ &.image {
+ float: left;
+ padding: 0 5px 10px 0;
+ width: 100px;
+ max-height: 100px;
+ object-fit: scale-down;
+ object-position: right top;
+ }
+
+ }
+
+ .break {
+ clear: both;
+ }
+
+}
+
+.category-social .image {
+ width: auto !important;
+ min-width: 48px;
+ min-height: 48px;
+ padding: 0 5px 25px 0 !important;
+}
+
+.result-videos .content {
+ overflow: hidden;
+}
+
+.engines {
+ float: right;
+ color: @color-engines-font;
+
+ span {
+ font-size: smaller;
+ margin: 0 0.5em 0 0;
+ }
+}
+
+.small_font {
+ font-size: 0.8em;
+}
+
+.highlight {
+ color: @color-highlight;
+ background: inherit;
+ font-weight: bold;
+}
+
+.result-images {
+ display: inline-block;
+ margin: 0;
+ padding: 0;
+ position: relative;
+ max-height: 200px;
+
+ img {
+ float: inherit;
+ margin: 0;
+ padding: 0;
+ border: none;
+ max-height: 200px;
+ background: @color-base-dark;
+ }
+
+ span a {
+ display: none;
+ color: @color-result-image-span-font;
+ }
+
+ &:hover span a {
+ display: block;
+ position: absolute;
+ bottom: 0;
+ right: 0;
+ padding: 4px;
+ margin: 0 0 4px 4px;
+ background-color: @color-result-image-span-background-hover;
+ font-size: 0.7em;
+ }
+}
+
+.torrent_result {
+ border-left: 10px solid @color-result-torrent-border;
+ padding-left: 3px;
+
+ p {
+ margin: 3px;
+ font-size: 0.8em;
+ }
+
+ a {
+ color: @color-result-link-font;
+
+ &:hover {
+ text-decoration: underline;
+ }
+
+ &:visited {
+ color: @color-result-link-visited-font;
+ }
+ }
+}
+
+#results {
+ margin: 2em 2em 20px 2em;
+ padding: 0;
+ width: @results-width;
+}
+
+#suggestions {
+
+ .wrapper {
+ display: flex;
+ flex-flow: row wrap;
+ justify-content: flex-end;
+
+ form {
+ display: inline-block;
+ flex: 1 1 50%;
+ }
+ }
+}
+
+#suggestions, #answers, #corrections {
+ max-width: @results-width;
+}
+
+#suggestions, #answers, #infoboxes, #corrections {
+
+ input {
+ padding: 0;
+ margin: 3px;
+ font-size: 0.9em;
+ display: inline-block;
+ background: transparent;
+ color: @color-result-search-url-font;
+ cursor: pointer;
+ }
+
+ input[type="submit"], .infobox .url a {
+ color: @color-result-link-font;
+ text-decoration: none;
+ font-size: 0.9rem;
+
+ &:hover {
+ text-decoration: underline;
+ }
+ }
+
+}
+
+#corrections {
+ display: flex;
+ flex-flow: row wrap;
+ margin: 1em 0;
+
+ h4, input[type="submit"] {
+ display: inline-block;
+ margin: 0 0.5em 0 0;
+ }
+
+ input[type="submit"]::after {
+ content: ", "
+ }
+
+}
+
+#suggestions .title, #search_url .title, #apis .title {
+ margin: 2em 0 0.5em 0;
+ color: @color-font;
+}
+
+#answers {
+ margin: 10px 8px 10px 8px;
+ border: 1px solid #ddd;
+ padding: 0.9em;
+ box-shadow: 0px 0px 5px #CCC;
+
+ h4 {
+ display: none;
+ }
+
+ .answer {
+ display: block;
+ font-size: 1.2em;
+ font-weight: bold;
+ }
+}
+
+#answers, #infoboxes {
+ form {
+ min-width: 210px;
+ }
+}
+
+#sidebar {
+ position: absolute;
+ top: 100px;
+ left: 57em;
+
+ margin: 0px 2px 5px 5px;
+ padding: 0px 2px 2px;
+ max-width: 25em;
+ word-wrap: break-word;
+
+ .infobox {
+ margin: 10px 0 10px;
+ border: 1px solid #ddd;
+ padding: 0.9em;
+ font-size: 0.9em;
+ box-shadow: 0px 0px 5px #CCC;
+
+ h2 {
+ margin: 0 0 .5em 0;
+ }
+
+ img {
+ max-width: 100%;
+ max-height: 12em;
+ display: block;
+ margin: 0;
+ padding: 0;
+ }
+
+ dl {
+ margin: 0.5em 0;
+ }
+
+ dt {
+ display: inline;
+ margin: 0.5em 0.25em 0.5em 0;
+ padding: 0;
+ font-weight: bold;
+ }
+
+ dd {
+ display: inline;
+ margin: 0.5em 0;
+ padding: 0;
+ }
+
+ input {
+ font-size: 1em;
+ }
+
+ br {
+ clear: both;
+ }
+
+ .attributes, .urls {
+ clear: both;
+ }
+
+ }
+}
+
+#search_url {
+ margin-top: 8px;
+
+ div.selectable_url {
+ pre {
+ width: 200em;
+ }
+ }
+}
+
+#linkto_preferences {
+ position: absolute;
+ right: 10px;
+ top: 0.9em;
+ padding: 0;
+ border: 0;
+ display: block;
+
+ font-size: 1.2em;
+ color: @color-search-font;
+
+ a:link *, a:hover *, a:visited *, a:active * {
+ color: @color-search-font;
+ }
+}
+
+#pagination {
+ clear: both;
+
+ br {
+ clear: both;
+ }
+}
+
+#apis {
+ margin-top: 8px;
+ clear: both;
+}
+
+#backToTop {
+ border: 1px solid #ddd;
+ margin: 0 0 0 2em;
+ padding: 0;
+ font-size: 1em;
+ box-shadow: 0px 0px 5px #CCC;
+ background: white;
+ position: fixed;
+ bottom: 85px;
+ left: @results-width;
+ transition: opacity 0.5s;
+ opacity: 0;
+
+ a {
+ display: block;
+ margin: 0;
+ padding: 0.6em;
+ }
+}
+
+@media screen and (max-width: 75em) {
+
+ #main_preferences, #main_about, #main_stats {
+ margin: 0.5em;
+ width: auto;
+ }
+
+ #suggestions, #answers {
+ margin-top: 1em;
+ }
+
+ #infoboxes {
+ position: inherit;
+ max-width: inherit;
+
+ .infobox {
+ clear:both;
+
+ img {
+ float: left;
+ max-width: 10em;
+ margin: 0.5em 0.5em 0.5em 0;
+ }
+ }
+
+ }
+
+ #sidebar {
+ position: static;
+ max-width: @results-width;
+ margin: 0 0 2px 0;
+ padding: 0;
+ float: none;
+ border: none;
+ width: auto;
+
+ input {
+ border: 0;
+ }
+ }
+
+ #apis {
+ display: none;
+ }
+
+ #search_url {
+ display: none;
+ }
+
+ .result {
+ border-bottom: 1px solid @color-result-top-border;
+ margin: 0;
+ padding-top: 8px;
+ padding-bottom: 6px;
+
+ h3 {
+ margin: 0 0 1px 0;
+ }
+
+ .thumbnail {
+ max-width: 98%;
+ }
+
+ .url {
+
+ span.url {
+ display: block;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ width: 100%;
+ }
+
+ a {
+ float: right;
+ padding: 0 0.5em;
+ }
+
+ }
+
+ .engines {
+ float: right;
+ padding: 0 0 3px 0;
+ }
+ }
+
+ .result-images {
+ border-bottom: none !important;
+ }
+
+ .image_result {
+ max-width: 98%;
+ img {
+ max-width: 98%;
+ }
+ }
+}
+
+
+#main_results div#results.only_template_images {
+ flex-direction: column;
+ width: auto;
+ display: flex;
+
+ #sidebar {
+ position: relative;
+ top: auto;
+ order: 2;
+ }
+
+ #urls {
+ position: relative;
+ order: 1;
+ }
+
+ #backToTop {
+ right: 0.5em;
+ left: auto;
+ }
+
+ #pagination {
+ position: relative;
+ order: 3;
+ }
+}
+
+
+@media screen and (max-width: @results-width) {
+
+ article[data-vim-selected]::before {
+ display: none;
+ content: "";
+ }
+
+ #linkto_preferences {
+ display: none;
+ postion: fixed !important;
+ top: 100px;
+ right: 0px;
+ }
+
+ #sidebar {
+ margin: 0 5px 2px 5px;
+ }
+
+ #corrections {
+ margin: 1em 5px 1em 5px;
+ }
+
+ #results {
+ margin: 0;
+ padding: 0;
+ width: initial;
+ }
+
+ #backToTop {
+ left: 40em;
+ bottom: 35px;
+ }
+
+ .result {
+ padding: 8px 10px 6px 10px;
+ }
+
+ .result-images {
+ margin: 0;
+ padding: 0;
+ border: none;
+ }
+
+}
+
+@media screen and (max-width: 35em) {
+
+ .result-videos {
+
+ img.thumbnail {
+ float: none !important;
+ }
+ .content {
+ overflow: inherit;
+ }
+
+ }
+
+}
diff --git a/searx/static/themes/simple/less/toolkit.less b/searx/static/themes/simple/less/toolkit.less
new file mode 100644
index 000000000..46ea17b3a
--- /dev/null
+++ b/searx/static/themes/simple/less/toolkit.less
@@ -0,0 +1,468 @@
+// other solution : http://stackoverflow.com/questions/1577598/how-to-hide-parts-of-html-when-javascript-is-disabled/13857783#13857783
+html.no-js .hide_if_nojs {
+ display: none;
+}
+
+html.js .show_if_nojs {
+ display: none;
+}
+
+.center {
+ text-align: center;
+}
+
+.right {
+ float: right ;
+}
+
+.left {
+ float: left;
+}
+
+.invisible {
+ display: none !important;
+}
+
+.list-unstyled {
+ list-style-type: none;
+
+ li {
+ margin-top: 4px;
+ margin-bottom: 4px;
+ }
+}
+
+.danger {
+ background-color: @color-error-background;
+}
+
+.badge {
+ display: inline-block;
+ color: #fff;
+ background-color: #777;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: baseline;
+ min-width: 10px;
+ padding: 1px 5px;
+ border-radius: 5px;
+}
+
+// kbd
+kbd {
+ padding: 2px 4px;
+ margin: 1px;
+ font-size: 90%;
+ color: white;
+ background: black;
+}
+
+// table
+table {
+
+ width: 100%;
+
+ &.striped {
+ tr {
+ border-bottom: 1px solid @color-settings-tr-hover;
+ }
+ }
+}
+
+th {
+ padding: 0.4em;
+}
+
+td {
+ padding: 0 4px;
+}
+
+tr {
+ &:hover {
+ background: @color-settings-tr-hover;
+ }
+}
+
+// pre
+.pre() {
+ display: block;
+ font-size: 0.8em;
+ word-break: break-all;
+ margin: 0.1em;
+ .select-all-on-focus();
+}
+
+div.selectable_url {
+ display: block;
+ border: 1px solid @color-result-search-url-border;
+ padding: 4px;
+ color: @color-result-search-url-font;
+ width: 100%;
+ display: block;
+ margin: 0.1em;
+ overflow: hidden;
+ height: 1.2em;
+ line-height: 1.2em;
+
+ pre {
+ .pre();
+ }
+}
+
+// dialog
+.dialog() {
+ position: relative;
+ width: 70%;
+ padding: 1em 1em 1em 2.7em;
+ margin: 0em 8% 1em 8%;
+ border: 1px solid black;
+ border-radius: 4px;
+ text-align: left;
+
+ &:before {
+ position: absolute;
+ top: 0.5em;
+ left: 0.5em;
+ font-family:"ion";
+ font-size: 1.5em;
+ }
+
+ .close {
+ float:right;
+ position: relative;
+ top: -3px;
+ color: inherit;
+ font-size: 1.5em;
+ }
+
+ ul, ol, p {
+ margin: 1px 0 0 0;
+ }
+
+ table {
+ width: auto;
+ }
+
+ tr {
+ vertical-align: text-top;
+
+ &:hover {
+ background: transparent;
+ }
+ }
+
+ td {
+ padding: 0 1em 0 0;
+ }
+
+
+ h4 {
+ margin-top: 0.3em;
+ margin-bottom: 0.3em;
+ }
+
+}
+
+.dialog-error {
+ .dialog();
+ color: @color-error;
+ background: @color-error-background;
+ border-color: @color-error;
+ .ion-error();
+}
+
+.dialog-warning {
+ .dialog();
+ color: @color-warning;
+ background: @color-warning-background;
+ border-color: @color-warning;
+ .ion-warning();
+}
+
+.dialog-modal {
+ .dialog();
+ background: white;
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ /* bring your own prefixes */
+ transform: translate(-50%, -50%);
+ z-index: 100000;
+ margin: 0 50% 0 0;
+ box-shadow: 0 0 1em;
+}
+
+// btn-collapse
+.btn-collapse {
+ cursor: pointer;
+}
+
+//
+.scrollx {
+ overflow-x: auto;
+ overflow-y: hidden;
+ display: block;
+ padding: 0;
+ margin: 0;
+ border: none;
+}
+
+/* -- tabs --*/
+.tabs .tabs > label {
+ font-size: 90%;
+}
+
+.tabs {
+ .flexbox();
+ flex-wrap: wrap;
+ width: 100%;
+ min-width: 100%;
+
+ & > * {
+ order: 2;
+ }
+
+ & > input[type=radio] {
+ display: none;
+ }
+
+ & > label {
+ order: 1;
+ padding: 0.7em;
+ margin: 0 0.7em;
+ letter-spacing:0.5px;
+ text-transform: uppercase;
+
+ border: solid white;
+ border-width: 0px 0px 2px 0;
+
+ .disable-user-select();
+ cursor: pointer;
+ }
+
+ & > label:hover {
+ border-bottom: 2px solid @color-categories-item-border-selected;
+ }
+
+ & > section {
+ min-width: 100%;
+ padding: 0.7rem 0;
+ box-sizing: border-box;
+ border-top: 1px solid black;
+ display: none;
+ }
+
+ // default selection
+ & > label:last-of-type {
+ border-bottom: 2px solid @color-categories-item-border-selected;
+ background: @color-categories-item-selected;
+ color: @color-categories-item-selected-font;
+ font-weight: bold;
+ letter-spacing:-0.1px;
+ }
+
+ & > section:last-of-type {
+ display: block;
+ }
+
+}
+
+html body .tabs > input:checked {
+ ~ section {
+ display: none;
+ }
+ ~ label {
+ position: inherited;
+ background: inherit;
+ border-bottom: 2px solid transparent;
+ font-weight: normal;
+ color: inherit;
+
+ &:hover {
+ border-bottom: 2px solid @color-categories-item-border-selected;
+ }
+ }
+ + label {
+ border-bottom: 2px solid @color-categories-item-border-selected;
+ background: @color-categories-item-selected;
+ color: @color-categories-item-selected-font;
+ font-weight: bold;
+ letter-spacing:-0.1px;
+ }
+ + label + section {
+ display: block;
+ }
+}
+
+/* -- select -- */
+select {
+ height: 28px;
+ margin: 0 1em 0 0;
+ padding: 2px 8px 2px 0 !important;
+ color: @color-search-font;
+ font-size: 12px;
+ z-index: 2;
+
+ &:hover, &:focus {
+ cursor: pointer;
+ }
+}
+
+@supports ((background-position-x: 100%) and ((appearance: none) or (-webkit-appearance: none) or (-moz-appearance: none))) {
+
+ select {
+ appearance: none;
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ border: none;
+ border-bottom: 1px solid #d7d7d7;
+ background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI1MTJweCIgaGVpZ2h0PSI1MTJweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDUxMiA1MTIiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTI4LDE5MiAyNTYsMzIwIDM4NCwxOTIiLz48L2c+PC9zdmc+Cg==) no-repeat;
+ background-position-x: 105%;
+ background-size: 2em;
+ background-origin: content-box;
+ outline: medium none;
+
+ &:hover, &:focus {
+ border-bottom: 1px solid @color-search-border;
+ }
+
+ }
+
+}
+
+/* -- checkbox-onoff -- */
+@supports (border-radius: 50px) {
+ .checkbox-onoff {
+ display: inline-block;
+ width: 40px;
+ height: 10px;
+ background: #dcdcdc;
+ margin: 8px auto;
+ position: relative;
+ border-radius: 50px;
+ label {
+ display: block;
+ width: 20px;
+ height: 20px;
+ position: absolute;
+ top: -5px;
+ cursor: pointer;
+ border-radius: 50px;
+ box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.3);
+ transition: all 0.4s ease;
+
+ left: 27px;
+ background-color: #3498DB;
+ }
+ input[type=checkbox] {
+ visibility: hidden;
+ &:checked + label {
+ left: -5px;
+ background: #dcdcdc;
+ }
+ }
+ }
+}
+
+/* -- checkbox --*/
+@supports (transform: rotate(-45deg)) {
+ .checkbox {
+ width: 20px;
+ position: relative;
+ margin: 20px auto;
+ label {
+ width: 20px;
+ height: 20px;
+ cursor: pointer;
+ position: absolute;
+ top: 0;
+ left: 0;
+ background: white;
+ border-radius: 4px;
+ box-shadow: inset 0px 1px 1px white, 0px 1px 4px rgba(0,0,0,0.5);
+ &:after {
+ content: '';
+ width: 9px;
+ height: 5px;
+ position: absolute;
+ top: 4px;
+ left: 4px;
+ border: 3px solid #333;
+ border-top: none;
+ border-right: none;
+ background: transparent;
+ opacity: 0;
+ transform: rotate(-45deg);
+ }
+ }
+
+ input[type=checkbox] {
+ visibility: hidden;
+ &:checked + label:after {
+ border-color: #3498DB;
+ opacity: 1;
+ }
+ }
+
+ // disabled : can''t be focused, show only the check mark
+ input[disabled] + label {
+ background-color: transparent !important;
+ box-shadow: none !important;
+ cursor: inherit;;
+ }
+
+ // if not checked and possible to checked then display a "light" check mark on hover
+ input:not(:checked):not([readonly]):not([disabled]) + label:hover::after {
+ opacity: 0.5;
+ }
+ }
+}
+
+@media screen and (max-width: 50em) {
+ .tabs > label {
+ width: 100%;
+ }
+}
+
+/* -- loader -- */
+.loader,
+.loader:after {
+ border-radius: 50%;
+ width: 2em;
+ height: 2em;
+}
+.loader {
+ margin: 1em auto;
+ font-size: 10px;
+ position: relative;
+ text-indent: -9999em;
+ border-top: 0.5em solid rgba(0, 0, 0, 0.2);
+ border-right: 0.5em solid rgba(0, 0, 0, 0.2);
+ border-bottom: 0.5em solid rgba(0, 0, 0, 0.2);
+ border-left: 0.5em solid rgba(255, 255, 255, 0);
+ -webkit-transform: translateZ(0);
+ -ms-transform: translateZ(0);
+ transform: translateZ(0);
+ -webkit-animation: load8 1.2s infinite linear;
+ animation: load8 1.2s infinite linear;
+}
+@-webkit-keyframes load8 {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
+@keyframes load8 {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+} \ No newline at end of file
diff --git a/searx/static/themes/simple/less/toolkit_loader.less b/searx/static/themes/simple/less/toolkit_loader.less
new file mode 100644
index 000000000..7ef19c19b
--- /dev/null
+++ b/searx/static/themes/simple/less/toolkit_loader.less
@@ -0,0 +1,41 @@
+.loader,
+.loader:after {
+ border-radius: 50%;
+ width: 10em;
+ height: 10em;
+}
+.loader {
+ margin: 60px auto;
+ font-size: 10px;
+ position: relative;
+ text-indent: -9999em;
+ border-top: 1.1em solid rgba(255, 255, 255, 0.2);
+ border-right: 1.1em solid rgba(255, 255, 255, 0.2);
+ border-bottom: 1.1em solid rgba(255, 255, 255, 0.2);
+ border-left: 1.1em solid #ffffff;
+ -webkit-transform: translateZ(0);
+ -ms-transform: translateZ(0);
+ transform: translateZ(0);
+ -webkit-animation: load8 1.1s infinite linear;
+ animation: load8 1.1s infinite linear;
+}
+@-webkit-keyframes load8 {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
+@keyframes load8 {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+} \ No newline at end of file
diff --git a/searx/static/themes/simple/magnet.svg b/searx/static/themes/simple/magnet.svg
new file mode 100644
index 000000000..1a1defdb8
--- /dev/null
+++ b/searx/static/themes/simple/magnet.svg
@@ -0,0 +1 @@
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" width="31mm" height="44mm" viewBox="0 0 31 44" version="1.1"><metadata><rdf:RDF><cc:Work><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/><cc:license rdf:resource="https://www.gnu.org/licenses/agpl-3.0.en.html"/><dc:creator><cc:Agent><dc:title>Alexandre Flament</dc:title></cc:Agent></dc:creator></cc:Work></rdf:RDF></metadata><g fill="#000"><path d="M2.381 28.39H9.79v5.82H2.38z" stroke-width=".049"/><path d="M15.872 10.398c2.381 0 5.82.264 5.82 3.704v12.17c2.47.055 4.94-.001 7.41 0 .02-4.371 0-8.73 0-12.964-.022-3.73-1.158-6.05-3.705-7.937-2.844-2.203-6.144-2.335-9.656-2.347-3.512.012-6.812.144-9.656 2.347-2.547 1.887-3.683 4.207-3.704 7.937 0 4.234-.02 8.593 0 12.965 2.47-.002 4.94.054 7.409 0v-12.17c0-3.44 3.44-3.705 5.82-3.705" stroke="#000" stroke-width=".063" stroke-linecap="butt" stroke-linejoin="miter" stroke-opacity="1"/><path d="M21.696 28.39h7.408v5.82h-7.408z" stroke-width=".049"/></g></svg>
diff --git a/searx/static/themes/simple/package.json b/searx/static/themes/simple/package.json
new file mode 100644
index 000000000..5150e8153
--- /dev/null
+++ b/searx/static/themes/simple/package.json
@@ -0,0 +1,20 @@
+{
+ "devDependencies": {
+ "grunt": "~1.0.3",
+ "grunt-contrib-concat": "~1.0.1",
+ "grunt-contrib-cssmin": "^2.2.1",
+ "grunt-contrib-jshint": "~1.1.0",
+ "grunt-contrib-less": "^1.4.1",
+ "grunt-contrib-uglify": "~3.4.0",
+ "grunt-contrib-watch": "~1.1.0",
+ "grunt-webfont": "^1.7.1",
+ "ionicons-npm": "^2.0.1",
+ "jslint": "^0.12.0",
+ "less-plugin-clean-css": "^1.5.1"
+ },
+ "scripts": {
+ "build": "npm install && grunt",
+ "start": "grunt watch",
+ "test": "grunt"
+ }
+}