on master help sign in
[enh] add simple theme (WIP)
commit10a24bdc2c3870f07ec62dd710841628d325aaf6 authorAlexandre Flament <alex@al-f.net> dateSun 12 Feb 2017, 15:06 (10 years ago) parent4f6586d
85 files changed+11902−6
.gitattributes+10 .travis.yml+3−2 manage.sh+7−3 searx/plugins/doai_rewrite.py+1 searx/plugins/https_rewrite.py+1 searx/plugins/infinite_scroll.py+1 searx/plugins/search_on_category_select.py+1 searx/plugins/tracker_url_remover.py+1 searx/static/themes/simple/.jshintignore+1 searx/static/themes/simple/css/searx-rtl.css+2049 searx/static/themes/simple/css/searx-rtl.min.css+1 searx/static/themes/simple/css/searx.css+2045 searx/static/themes/simple/css/searx.min.css+1 searx/static/themes/simple/fonts/ion.css+134 searx/static/themes/simple/fonts/ion.eot searx/static/themes/simple/fonts/ion.html+261 searx/static/themes/simple/fonts/ion.svg+97 searx/static/themes/simple/fonts/ion.ttf searx/static/themes/simple/fonts/ion.woff searx/static/themes/simple/fonts/ion.woff2 searx/static/themes/simple/gruntfile.js+150 searx/static/themes/simple/img/favicon.png searx/static/themes/simple/img/loader.gif searx/static/themes/simple/img/logo_searx_a.png searx/static/themes/simple/img/searx.png searx/static/themes/simple/img/searx_logo.svg+203 searx/static/themes/simple/js/searx.js+1534 searx/static/themes/simple/js/searx.min.js+4 searx/static/themes/simple/js/searx.min.js.map+1 searx/static/themes/simple/js/searx_src/00_searx_toolkit.js+155 searx/static/themes/simple/js/searx_src/autocomplete.js+536 searx/static/themes/simple/js/searx_src/searx_imageresult.js+151 searx/static/themes/simple/js/searx_src/searx_keyboard.js+360 searx/static/themes/simple/js/searx_src/searx_mapresult.js+175 searx/static/themes/simple/js/searx_src/searx_results.js+63 searx/static/themes/simple/js/searx_src/searx_search.js+94 searx/static/themes/simple/leaflet/images/layers-2x.png searx/static/themes/simple/leaflet/images/layers.png searx/static/themes/simple/leaflet/images/marker-icon-2x-green.png searx/static/themes/simple/leaflet/images/marker-icon-2x-orange.png searx/static/themes/simple/leaflet/images/marker-icon-2x-red.png searx/static/themes/simple/leaflet/images/marker-icon-2x.png searx/static/themes/simple/leaflet/images/marker-icon-green.png searx/static/themes/simple/leaflet/images/marker-icon-orange.png searx/static/themes/simple/leaflet/images/marker-icon-red.png searx/static/themes/simple/leaflet/images/marker-icon.png searx/static/themes/simple/leaflet/images/marker-shadow.png searx/static/themes/simple/leaflet/leaflet.css+624 searx/static/themes/simple/leaflet/leaflet.js+9 searx/static/themes/simple/less/autocomplete.less+67 searx/static/themes/simple/less/code.less+83 searx/static/themes/simple/less/definitions.less+135 searx/static/themes/simple/less/index.less+43 searx/static/themes/simple/less/ion.less+174 searx/static/themes/simple/less/mixins.less+62 searx/static/themes/simple/less/normalize.less+447 searx/static/themes/simple/less/preferences.less+78 searx/static/themes/simple/less/search.less+232 searx/static/themes/simple/less/stats.less+8 searx/static/themes/simple/less/style-rtl.less+6 searx/static/themes/simple/less/style.less+709 searx/static/themes/simple/less/toolkit.less+346 searx/static/themes/simple/magnet.svg+1 searx/static/themes/simple/package.json+20 searx/templates/oscar/preferences.html+1−1 searx/templates/simple/404.html+9 searx/templates/simple/about.html+4 searx/templates/simple/base.html+61 searx/templates/simple/categories.html+8 searx/templates/simple/index.html+12 searx/templates/simple/infobox.html+46 searx/templates/simple/languages.html+8 searx/templates/simple/macros.html+86 searx/templates/simple/preferences.html+190 searx/templates/simple/result_templates/code.html+13 searx/templates/simple/result_templates/default.html+17 searx/templates/simple/result_templates/images.html+4 searx/templates/simple/result_templates/map.html+71 searx/templates/simple/result_templates/torrent.html+24 searx/templates/simple/result_templates/videos.html+15 searx/templates/simple/results.html+151 searx/templates/simple/search.html+16 searx/templates/simple/simple.spec.txt+40 searx/templates/simple/stats.html+25 searx/templates/simple/time-range.html+17
.gitattributesnew file+10
@@ -0,0 +1,10 @@
1+searx/static/css/bootstrap.min.css -diff
2+searx/static/js/bootstrap.min.js -diff
3+searx/static/themes/oscar/css/logicodev.min.css -diff
4+searx/static/themes/oscar/css/leaflet.min.css -diff
5+searx/static/themes/oscar/css/pointhi.min.css -diff
6+searx/static/themes/oscar/js/searx.min.js -diff
7+searx/static/themes/simple/css/searx.min.css -diff
8+searx/static/themes/simple/css/searx-rtl.min.css -diff
9+searx/static/themes/simple/js/searx.min.js -diff
10+searx/static/themes/simple/js/searx.min.js.map -diff
.travis.yml+3−2
@@ -13,10 +13,11 @@ python:
1313before_install:
1414 - "export DISPLAY=:99.0"
1515 - "sh -e /etc/init.d/xvfb start"
16− - npm install less grunt-cli
16+ - npm install less less-plugin-clean-css grunt-cli
1717 - ( cd searx/static/themes/oscar;npm install; cd - )
18+ - ( cd searx/static/themes/simple;npm install; cd - )
1819 - mkdir -p ~/drivers; export PATH=~/drivers:$PATH;
19− - GECKODRIVER_URL="https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-linux64.tar.gz";
20+ - GECKODRIVER_URL="https://github.com/mozilla/geckodriver/releases/download/v0.14.0/geckodriver-v0.14.0-linux64.tar.gz";
2021 - FILE=`mktemp`; wget "$GECKODRIVER_URL" -qO $FILE && tar xz -C ~/drivers -f $FILE geckodriver; rm $FILE; chmod 777 ~/drivers/geckodriver;
2122install:
2223 - ./manage.sh update_dev_packages
manage.sh+7−3
@@ -22,7 +22,7 @@ check_geckodriver() {
2222 if [ -z $NOTFOUND ]; then
2323 return
2424 fi
25− GECKODRIVER_VERSION="v0.11.1"
25+ GECKODRIVER_VERSION="v0.14.0"
2626 PLATFORM=`python -c "import platform; print platform.system().lower(), platform.architecture()[0]"`
2727 case $PLATFORM in
2828 "linux 32bit" | "linux2 32bit") ARCH="linux32";;
@@ -49,7 +49,7 @@ pep8_check() {
4949 # ignored rules:
5050 # E402 module level import not at top of file
5151 # W503 line break before binary operator
52− pep8 --max-line-length=120 --ignore "E402,W503" "$SEARX_DIR" "$BASE_DIR/tests"
52+ pep8 --exclude=searx/static --max-line-length=120 --ignore "E402,W503" "$SEARX_DIR" "$BASE_DIR/tests"
5353}
5454
5555unit_tests() {
@@ -79,7 +79,8 @@ tests() {
7979}
8080
8181build_style() {
82− lessc -x "$BASE_DIR/searx/static/$1" "$BASE_DIR/searx/static/$2"
82+ # lessc -x "$BASE_DIR/searx/static/$1" "$BASE_DIR/searx/static/$2"
83+ lessc --clean-css="--s1 --advanced --compatibility=ie9" "$BASE_DIR/searx/static/$1" "$BASE_DIR/searx/static/$2"
8384}
8485
8586styles() {
@@ -92,10 +93,13 @@ styles() {
9293 build_style themes/oscar/less/pointhi/oscar.less themes/oscar/css/pointhi.min.css
9394 build_style themes/oscar/less/logicodev/oscar.less themes/oscar/css/logicodev.min.css
9495 build_style themes/pix-art/less/style.less themes/pix-art/css/style.css
96+ build_style themes/simple/less/style.less themes/simple/css/searx.min.css
97+ build_style themes/simple/less/style-rtl.less themes/simple/css/searx-rtl.min.css
9598}
9699
97100grunt_build() {
98101 grunt --gruntfile "$SEARX_DIR/static/themes/oscar/gruntfile.js"
102+ grunt --gruntfile "$SEARX_DIR/static/themes/simple/gruntfile.js"
99103}
100104
101105locales() {
searx/plugins/doai_rewrite.py+1
@@ -7,6 +7,7 @@ regex = re.compile(r'10\.\d{4,9}/[^\s]+')
77name = gettext('DOAI rewrite')
88description = gettext('Avoid paywalls by redirecting to open-access versions of publications when available')
99default_on = False
10+preference_section = 'privacy'
1011
1112
1213def extract_doi(url):
searx/plugins/https_rewrite.py+1
@@ -31,6 +31,7 @@ if sys.version_info[0] == 3:
3131name = "HTTPS rewrite"
3232description = gettext('Rewrite HTTP links to HTTPS if possible')
3333default_on = True
34+preference_section = 'privacy'
3435
3536if 'SEARX_HTTPS_REWRITE_PATH' in environ:
3637 rules_path = environ['SEARX_rules_path']
searx/plugins/infinite_scroll.py+1
@@ -3,6 +3,7 @@ from flask_babel import gettext
33name = gettext('Infinite scroll')
44description = gettext('Automatically load next page when scrolling to bottom of current page')
55default_on = False
6+preference_section = 'ui'
67
78js_dependencies = ('plugins/js/infinite_scroll.js',)
89css_dependencies = ('plugins/css/infinite_scroll.css',)
searx/plugins/search_on_category_select.py+1
@@ -19,5 +19,6 @@ name = gettext('Search on category select')
1919description = gettext('Perform search immediately if a category selected. '
2020 'Disable to select multiple categories. (JavaScript required)')
2121default_on = True
22+preference_section = 'ui'
2223
2324js_dependencies = ('plugins/js/search_on_category_select.js',)
searx/plugins/tracker_url_remover.py+1
@@ -26,6 +26,7 @@ regexes = {re.compile(r'utm_[^&]+&?'),
2626name = gettext('Tracker URL remover')
2727description = gettext('Remove trackers arguments from the returned URL')
2828default_on = True
29+preference_section = 'privacy'
2930
3031
3132def on_result(request, search, result):
searx/static/themes/simple/.jshintignorenew file+1
@@ -0,0 +1 @@
1+js/searx_src/autocomplete.js
searx/static/themes/simple/css/searx-rtl.cssnew file+2049
@@ -0,0 +1,2049 @@
1+/*! searx | 06-08-2017 | https://github.com/asciimoo/searx */
2+/*
3+* searx, A privacy-respecting, hackable metasearch engine
4+*
5+* To convert "style.less" to "style.css" run: $make styles
6+*/
7+/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
8+/* Document
9+ ========================================================================== */
10+/**
11+ * 1. Correct the line height in all browsers.
12+ * 2. Prevent adjustments of font size after orientation changes in
13+ * IE on Windows Phone and in iOS.
14+ */
15+html {
16+ line-height: 1.15;
17+ /* 1 */
18+ -ms-text-size-adjust: 100%;
19+ /* 2 */
20+ -webkit-text-size-adjust: 100%;
21+ /* 2 */
22+}
23+/* Sections
24+ ========================================================================== */
25+/**
26+ * Remove the margin in all browsers (opinionated).
27+ */
28+body {
29+ margin: 0;
30+}
31+/**
32+ * Add the correct display in IE 9-.
33+ */
34+article,
35+aside,
36+footer,
37+header,
38+nav,
39+section {
40+ display: block;
41+}
42+/**
43+ * Correct the font size and margin on `h1` elements within `section` and
44+ * `article` contexts in Chrome, Firefox, and Safari.
45+ */
46+h1 {
47+ font-size: 2em;
48+ margin: 0.67em 0;
49+}
50+/* Grouping content
51+ ========================================================================== */
52+/**
53+ * Add the correct display in IE 9-.
54+ * 1. Add the correct display in IE.
55+ */
56+figcaption,
57+figure,
58+main {
59+ /* 1 */
60+ display: block;
61+}
62+/**
63+ * Add the correct margin in IE 8.
64+ */
65+figure {
66+ margin: 1em 40px;
67+}
68+/**
69+ * 1. Add the correct box sizing in Firefox.
70+ * 2. Show the overflow in Edge and IE.
71+ */
72+hr {
73+ box-sizing: content-box;
74+ /* 1 */
75+ height: 0;
76+ /* 1 */
77+ overflow: visible;
78+ /* 2 */
79+}
80+/**
81+ * 1. Correct the inheritance and scaling of font size in all browsers.
82+ * 2. Correct the odd `em` font sizing in all browsers.
83+ */
84+pre {
85+ font-family: monospace, monospace;
86+ /* 1 */
87+ font-size: 1em;
88+ /* 2 */
89+}
90+/* Text-level semantics
91+ ========================================================================== */
92+/**
93+ * 1. Remove the gray background on active links in IE 10.
94+ * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
95+ */
96+a {
97+ background-color: transparent;
98+ /* 1 */
99+ -webkit-text-decoration-skip: objects;
100+ /* 2 */
101+}
102+/**
103+ * 1. Remove the bottom border in Chrome 57- and Firefox 39-.
104+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
105+ */
106+abbr[title] {
107+ border-bottom: none;
108+ /* 1 */
109+ text-decoration: underline;
110+ /* 2 */
111+ text-decoration: underline dotted;
112+ /* 2 */
113+}
114+/**
115+ * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
116+ */
117+b,
118+strong {
119+ font-weight: inherit;
120+}
121+/**
122+ * Add the correct font weight in Chrome, Edge, and Safari.
123+ */
124+b,
125+strong {
126+ font-weight: bolder;
127+}
128+/**
129+ * 1. Correct the inheritance and scaling of font size in all browsers.
130+ * 2. Correct the odd `em` font sizing in all browsers.
131+ */
132+code,
133+kbd,
134+samp {
135+ font-family: monospace, monospace;
136+ /* 1 */
137+ font-size: 1em;
138+ /* 2 */
139+}
140+/**
141+ * Add the correct font style in Android 4.3-.
142+ */
143+dfn {
144+ font-style: italic;
145+}
146+/**
147+ * Add the correct background and color in IE 9-.
148+ */
149+mark {
150+ background-color: #ff0;
151+ color: #000;
152+}
153+/**
154+ * Add the correct font size in all browsers.
155+ */
156+small {
157+ font-size: 80%;
158+}
159+/**
160+ * Prevent `sub` and `sup` elements from affecting the line height in
161+ * all browsers.
162+ */
163+sub,
164+sup {
165+ font-size: 75%;
166+ line-height: 0;
167+ position: relative;
168+ vertical-align: baseline;
169+}
170+sub {
171+ bottom: -0.25em;
172+}
173+sup {
174+ top: -0.5em;
175+}
176+/* Embedded content
177+ ========================================================================== */
178+/**
179+ * Add the correct display in IE 9-.
180+ */
181+audio,
182+video {
183+ display: inline-block;
184+}
185+/**
186+ * Add the correct display in iOS 4-7.
187+ */
188+audio:not([controls]) {
189+ display: none;
190+ height: 0;
191+}
192+/**
193+ * Remove the border on images inside links in IE 10-.
194+ */
195+img {
196+ border-style: none;
197+}
198+/**
199+ * Hide the overflow in IE.
200+ */
201+svg:not(:root) {
202+ overflow: hidden;
203+}
204+/* Forms
205+ ========================================================================== */
206+/**
207+ * 1. Change the font styles in all browsers (opinionated).
208+ * 2. Remove the margin in Firefox and Safari.
209+ */
210+button,
211+input,
212+optgroup,
213+select,
214+textarea {
215+ font-family: sans-serif;
216+ /* 1 */
217+ font-size: 100%;
218+ /* 1 */
219+ line-height: 1.15;
220+ /* 1 */
221+ margin: 0;
222+ /* 2 */
223+}
224+/**
225+ * Show the overflow in IE.
226+ * 1. Show the overflow in Edge.
227+ */
228+button,
229+input {
230+ /* 1 */
231+ overflow: visible;
232+}
233+/**
234+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
235+ * 1. Remove the inheritance of text transform in Firefox.
236+ */
237+button,
238+select {
239+ /* 1 */
240+ text-transform: none;
241+}
242+/**
243+ * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
244+ * controls in Android 4.
245+ * 2. Correct the inability to style clickable types in iOS and Safari.
246+ */
247+button,
248+html [type="button"],
249+[type="reset"],
250+[type="submit"] {
251+ -webkit-appearance: button;
252+ /* 2 */
253+}
254+/**
255+ * Remove the inner border and padding in Firefox.
256+ */
257+button::-moz-focus-inner,
258+[type="button"]::-moz-focus-inner,
259+[type="reset"]::-moz-focus-inner,
260+[type="submit"]::-moz-focus-inner {
261+ border-style: none;
262+ padding: 0;
263+}
264+/**
265+ * Restore the focus styles unset by the previous rule.
266+ */
267+button:-moz-focusring,
268+[type="button"]:-moz-focusring,
269+[type="reset"]:-moz-focusring,
270+[type="submit"]:-moz-focusring {
271+ outline: 1px dotted ButtonText;
272+}
273+/**
274+ * Correct the padding in Firefox.
275+ */
276+fieldset {
277+ padding: 0.35em 0.75em 0.625em;
278+}
279+/**
280+ * 1. Correct the text wrapping in Edge and IE.
281+ * 2. Correct the color inheritance from `fieldset` elements in IE.
282+ * 3. Remove the padding so developers are not caught out when they zero out
283+ * `fieldset` elements in all browsers.
284+ */
285+legend {
286+ box-sizing: border-box;
287+ /* 1 */
288+ color: inherit;
289+ /* 2 */
290+ display: table;
291+ /* 1 */
292+ max-width: 100%;
293+ /* 1 */
294+ padding: 0;
295+ /* 3 */
296+ white-space: normal;
297+ /* 1 */
298+}
299+/**
300+ * 1. Add the correct display in IE 9-.
301+ * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
302+ */
303+progress {
304+ display: inline-block;
305+ /* 1 */
306+ vertical-align: baseline;
307+ /* 2 */
308+}
309+/**
310+ * Remove the default vertical scrollbar in IE.
311+ */
312+textarea {
313+ overflow: auto;
314+}
315+/**
316+ * 1. Add the correct box sizing in IE 10-.
317+ * 2. Remove the padding in IE 10-.
318+ */
319+[type="checkbox"],
320+[type="radio"] {
321+ box-sizing: border-box;
322+ /* 1 */
323+ padding: 0;
324+ /* 2 */
325+}
326+/**
327+ * Correct the cursor style of increment and decrement buttons in Chrome.
328+ */
329+[type="number"]::-webkit-inner-spin-button,
330+[type="number"]::-webkit-outer-spin-button {
331+ height: auto;
332+}
333+/**
334+ * 1. Correct the odd appearance in Chrome and Safari.
335+ * 2. Correct the outline style in Safari.
336+ */
337+[type="search"] {
338+ -webkit-appearance: textfield;
339+ /* 1 */
340+ outline-offset: -2px;
341+ /* 2 */
342+}
343+/**
344+ * Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
345+ */
346+[type="search"]::-webkit-search-cancel-button,
347+[type="search"]::-webkit-search-decoration {
348+ -webkit-appearance: none;
349+}
350+/**
351+ * 1. Correct the inability to style clickable types in iOS and Safari.
352+ * 2. Change font properties to `inherit` in Safari.
353+ */
354+::-webkit-file-upload-button {
355+ -webkit-appearance: button;
356+ /* 1 */
357+ font: inherit;
358+ /* 2 */
359+}
360+/* Interactive
361+ ========================================================================== */
362+/*
363+ * Add the correct display in IE 9-.
364+ * 1. Add the correct display in Edge, IE, and Firefox.
365+ */
366+details,
367+menu {
368+ display: block;
369+}
370+/*
371+ * Add the correct display in all browsers.
372+ */
373+summary {
374+ display: list-item;
375+}
376+/* Scripting
377+ ========================================================================== */
378+/**
379+ * Add the correct display in IE 9-.
380+ */
381+canvas {
382+ display: inline-block;
383+}
384+/**
385+ * Add the correct display in IE.
386+ */
387+template {
388+ display: none;
389+}
390+/* Hidden
391+ ========================================================================== */
392+/**
393+ * Add the correct display in IE 10-.
394+ */
395+[hidden] {
396+ display: none;
397+}
398+/*
399+ * searx, A privacy-respecting, hackable metasearch engine
400+ *
401+ * To change the colors of the site, simple edit this variables
402+ */
403+/*
404+* searx, A privacy-respecting, hackable metasearch engine
405+*/
406+.highlight .hll {
407+ background-color: #ffffcc;
408+}
409+.highlight {
410+ background: #f8f8f8;
411+}
412+.highlight .c {
413+ color: #408080;
414+ font-style: italic;
415+}
416+/* Comment */
417+.highlight .err {
418+ border: 1px solid #FF0000;
419+}
420+/* Error */
421+.highlight .k {
422+ color: #008000;
423+ font-weight: bold;
424+}
425+/* Keyword */
426+.highlight .o {
427+ color: #666666;
428+}
429+/* Operator */
430+.highlight .cm {
431+ color: #408080;
432+ font-style: italic;
433+}
434+/* Comment.Multiline */
435+.highlight .cp {
436+ color: #BC7A00;
437+}
438+/* Comment.Preproc */
439+.highlight .c1 {
440+ color: #408080;
441+ font-style: italic;
442+}
443+/* Comment.Single */
444+.highlight .cs {
445+ color: #408080;
446+ font-style: italic;
447+}
448+/* Comment.Special */
449+.highlight .gd {
450+ color: #A00000;
451+}
452+/* Generic.Deleted */
453+.highlight .ge {
454+ font-style: italic;
455+}
456+/* Generic.Emph */
457+.highlight .gr {
458+ color: #FF0000;
459+}
460+/* Generic.Error */
461+.highlight .gh {
462+ color: #000080;
463+ font-weight: bold;
464+}
465+/* Generic.Heading */
466+.highlight .gi {
467+ color: #00A000;
468+}
469+/* Generic.Inserted */
470+.highlight .go {
471+ color: #888888;
472+}
473+/* Generic.Output */
474+.highlight .gp {
475+ color: #000080;
476+ font-weight: bold;
477+}
478+/* Generic.Prompt */
479+.highlight .gs {
480+ font-weight: bold;
481+}
482+/* Generic.Strong */
483+.highlight .gu {
484+ color: #800080;
485+ font-weight: bold;
486+}
487+/* Generic.Subheading */
488+.highlight .gt {
489+ color: #0044DD;
490+}
491+/* Generic.Traceback */
492+.highlight .kc {
493+ color: #008000;
494+ font-weight: bold;
495+}
496+/* Keyword.Constant */
497+.highlight .kd {
498+ color: #008000;
499+ font-weight: bold;
500+}
501+/* Keyword.Declaration */
502+.highlight .kn {
503+ color: #008000;
504+ font-weight: bold;
505+}
506+/* Keyword.Namespace */
507+.highlight .kp {
508+ color: #008000;
509+}
510+/* Keyword.Pseudo */
511+.highlight .kr {
512+ color: #008000;
513+ font-weight: bold;
514+}
515+/* Keyword.Reserved */
516+.highlight .kt {
517+ color: #B00040;
518+}
519+/* Keyword.Type */
520+.highlight .m {
521+ color: #666666;
522+}
523+/* Literal.Number */
524+.highlight .s {
525+ color: #BA2121;
526+}
527+/* Literal.String */
528+.highlight .na {
529+ color: #7D9029;
530+}
531+/* Name.Attribute */
532+.highlight .nb {
533+ color: #008000;
534+}
535+/* Name.Builtin */
536+.highlight .nc {
537+ color: #0000FF;
538+ font-weight: bold;
539+}
540+/* Name.Class */
541+.highlight .no {
542+ color: #880000;
543+}
544+/* Name.Constant */
545+.highlight .nd {
546+ color: #AA22FF;
547+}
548+/* Name.Decorator */
549+.highlight .ni {
550+ color: #999999;
551+ font-weight: bold;
552+}
553+/* Name.Entity */
554+.highlight .ne {
555+ color: #D2413A;
556+ font-weight: bold;
557+}
558+/* Name.Exception */
559+.highlight .nf {
560+ color: #0000FF;
561+}
562+/* Name.Function */
563+.highlight .nl {
564+ color: #A0A000;
565+}
566+/* Name.Label */
567+.highlight .nn {
568+ color: #0000FF;
569+ font-weight: bold;
570+}
571+/* Name.Namespace */
572+.highlight .nt {
573+ color: #008000;
574+ font-weight: bold;
575+}
576+/* Name.Tag */
577+.highlight .nv {
578+ color: #19177C;
579+}
580+/* Name.Variable */
581+.highlight .ow {
582+ color: #AA22FF;
583+ font-weight: bold;
584+}
585+/* Operator.Word */
586+.highlight .w {
587+ color: #bbbbbb;
588+}
589+/* Text.Whitespace */
590+.highlight .mf {
591+ color: #666666;
592+}
593+/* Literal.Number.Float */
594+.highlight .mh {
595+ color: #666666;
596+}
597+/* Literal.Number.Hex */
598+.highlight .mi {
599+ color: #666666;
600+}
601+/* Literal.Number.Integer */
602+.highlight .mo {
603+ color: #666666;
604+}
605+/* Literal.Number.Oct */
606+.highlight .sb {
607+ color: #BA2121;
608+}
609+/* Literal.String.Backtick */
610+.highlight .sc {
611+ color: #BA2121;
612+}
613+/* Literal.String.Char */
614+.highlight .sd {
615+ color: #BA2121;
616+ font-style: italic;
617+}
618+/* Literal.String.Doc */
619+.highlight .s2 {
620+ color: #BA2121;
621+}
622+/* Literal.String.Double */
623+.highlight .se {
624+ color: #BB6622;
625+ font-weight: bold;
626+}
627+/* Literal.String.Escape */
628+.highlight .sh {
629+ color: #BA2121;
630+}
631+/* Literal.String.Heredoc */
632+.highlight .si {
633+ color: #BB6688;
634+ font-weight: bold;
635+}
636+/* Literal.String.Interpol */
637+.highlight .sx {
638+ color: #008000;
639+}
640+/* Literal.String.Other */
641+.highlight .sr {
642+ color: #BB6688;
643+}
644+/* Literal.String.Regex */
645+.highlight .s1 {
646+ color: #BA2121;
647+}
648+/* Literal.String.Single */
649+.highlight .ss {
650+ color: #19177C;
651+}
652+/* Literal.String.Symbol */
653+.highlight .bp {
654+ color: #008000;
655+}
656+/* Name.Builtin.Pseudo */
657+.highlight .vc {
658+ color: #19177C;
659+}
660+/* Name.Variable.Class */
661+.highlight .vg {
662+ color: #19177C;
663+}
664+/* Name.Variable.Global */
665+.highlight .vi {
666+ color: #19177C;
667+}
668+/* Name.Variable.Instance */
669+.highlight .il {
670+ color: #666666;
671+}
672+/* Literal.Number.Integer.Long */
673+.highlight pre {
674+ overflow: auto;
675+}
676+.highlight .lineno {
677+ -webkit-touch-callout: none;
678+ -webkit-user-select: none;
679+ -khtml-user-select: none;
680+ -moz-user-select: none;
681+ -ms-user-select: none;
682+ user-select: none;
683+ cursor: default;
684+}
685+.highlight .lineno::selection {
686+ background: transparent;
687+ /* WebKit/Blink Browsers */
688+}
689+.highlight .lineno::-moz-selection {
690+ background: transparent;
691+ /* Gecko Browsers */
692+}
693+html.no-js .hide_if_nojs {
694+ display: none;
695+}
696+html.js .show_if_nojs {
697+ display: none;
698+}
699+.center {
700+ text-align: center;
701+}
702+.right {
703+ float: right ;
704+}
705+.left {
706+ float: left;
707+}
708+.invisible {
709+ display: none;
710+}
711+.danger {
712+ background-color: #fae1e1;
713+}
714+.badge {
715+ display: inline-block;
716+ color: #fff;
717+ background-color: #777;
718+ text-align: center;
719+ white-space: nowrap;
720+ vertical-align: baseline;
721+ min-width: 10px;
722+ padding: 1px 5px;
723+ border-radius: 5px;
724+}
725+table {
726+ width: 100%;
727+}
728+table.striped tr {
729+ border-bottom: 1px solid #ececec;
730+}
731+th {
732+ padding: 0.4em;
733+}
734+td {
735+ padding: 0 4px;
736+}
737+tr:hover {
738+ background: #ececec;
739+}
740+.dialog-error {
741+ position: relative;
742+ width: 70%;
743+ padding: 1em 1em 1em 2.7em;
744+ margin: 0em 8% 1em 8%;
745+ border: 1px solid black;
746+ border-radius: 4px;
747+ text-align: left;
748+ color: #db3434;
749+ background: #fae1e1;
750+ border-color: #db3434;
751+}
752+.dialog-error:before {
753+ position: absolute;
754+ top: 0.5em;
755+ left: 0.5em;
756+ font-family: "ion";
757+ font-size: 1.5em;
758+}
759+.dialog-error .close {
760+ float: right;
761+ position: relative;
762+ top: -3px;
763+ color: inherit;
764+ font-size: 1.5em;
765+}
766+.dialog-error ul,
767+.dialog-error ol,
768+.dialog-error p {
769+ margin: 1px 0 0 0;
770+}
771+.dialog-error:before {
772+ content: "\f110";
773+}
774+.dialog-warning {
775+ position: relative;
776+ width: 70%;
777+ padding: 1em 1em 1em 2.7em;
778+ margin: 0em 8% 1em 8%;
779+ border: 1px solid black;
780+ border-radius: 4px;
781+ text-align: left;
782+ color: #dbba34;
783+ background: #faf5e1;
784+ border-color: #dbba34;
785+}
786+.dialog-warning:before {
787+ position: absolute;
788+ top: 0.5em;
789+ left: 0.5em;
790+ font-family: "ion";
791+ font-size: 1.5em;
792+}
793+.dialog-warning .close {
794+ float: right;
795+ position: relative;
796+ top: -3px;
797+ color: inherit;
798+ font-size: 1.5em;
799+}
800+.dialog-warning ul,
801+.dialog-warning ol,
802+.dialog-warning p {
803+ margin: 1px 0 0 0;
804+}
805+.dialog-warning:before {
806+ content: "\f10f";
807+}
808+.btn-collapse {
809+ cursor: pointer;
810+}
811+.scrollx {
812+ overflow-x: auto;
813+ overflow-y: hidden;
814+ display: block;
815+ padding: 0;
816+ margin: 0;
817+ border: none;
818+}
819+.tabs .tabs > label {
820+ font-size: 90%;
821+}
822+.tabs {
823+ display: -webkit-box;
824+ display: -moz-box;
825+ display: -webkit-flex;
826+ display: -ms-flexbox;
827+ display: flex;
828+ flex-wrap: wrap;
829+ width: 100%;
830+ min-width: 100%;
831+}
832+.tabs > * {
833+ order: 2;
834+}
835+.tabs > input[type=radio] {
836+ display: none;
837+}
838+.tabs > label {
839+ order: 1;
840+ padding: 0.7em;
841+ margin: 0 0.7em;
842+ letter-spacing: 0.5px;
843+ text-transform: uppercase;
844+ border: solid white;
845+ border-width: 0px 0px 2px 0;
846+ -webkit-touch-callout: none;
847+ -webkit-user-select: none;
848+ -khtml-user-select: none;
849+ -moz-user-select: none;
850+ -ms-user-select: none;
851+ user-select: none;
852+ cursor: pointer;
853+}
854+.tabs > label:hover {
855+ border-bottom: 2px solid #084999;
856+}
857+.tabs > section {
858+ min-width: 100%;
859+ padding: 0.7rem 0;
860+ box-sizing: border-box;
861+ border-top: 1px solid black;
862+ display: none;
863+}
864+.tabs > label:last-of-type {
865+ border-bottom: 2px solid #084999;
866+ background: #3498DB;
867+ color: #FFF;
868+ font-weight: bold;
869+ letter-spacing: -0.1px;
870+}
871+.tabs > section:last-of-type {
872+ display: block;
873+}
874+html body .tabs > input:checked ~ section {
875+ display: none;
876+}
877+html body .tabs > input:checked ~ label {
878+ position: inherited;
879+ background: inherit;
880+ border-bottom: 2px solid transparent;
881+ font-weight: normal;
882+ color: inherit;
883+}
884+html body .tabs > input:checked ~ label:hover {
885+ border-bottom: 2px solid #084999;
886+}
887+html body .tabs > input:checked + label {
888+ border-bottom: 2px solid #084999;
889+ background: #3498DB;
890+ color: #FFF;
891+ font-weight: bold;
892+ letter-spacing: -0.1px;
893+}
894+html body .tabs > input:checked + label + section {
895+ display: block;
896+}
897+select {
898+ height: 28px;
899+ margin: 0 1em 0 0;
900+ padding: 2px 8px 2px 0 !important;
901+ color: #222;
902+ font-size: 12px;
903+ z-index: 2;
904+}
905+select:hover,
906+select:focus {
907+ cursor: pointer;
908+}
909+@supports ((background-position-x: 100%) and ((appearance: none) or (-webkit-appearance: none) or (-moz-appearance: none))) {
910+ select {
911+ appearance: none;
912+ -webkit-appearance: none;
913+ -moz-appearance: none;
914+ border: none;
915+ border-bottom: 1px solid #d7d7d7;
916+ background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI1MTJweCIgaGVpZ2h0PSI1MTJweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDUxMiA1MTIiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTI4LDE5MiAyNTYsMzIwIDM4NCwxOTIiLz48L2c+PC9zdmc+Cg==) no-repeat;
917+ background-position-x: 105%;
918+ background-size: 2em;
919+ background-origin: content-box;
920+ outline: medium none;
921+ }
922+ select:hover,
923+ select:focus {
924+ border-bottom: 1px solid #3498DB;
925+ }
926+}
927+@supports (border-radius: 50px) {
928+ .checkbox-onoff {
929+ display: inline-block;
930+ width: 40px;
931+ height: 10px;
932+ background: #dcdcdc;
933+ margin: 8px auto;
934+ position: relative;
935+ border-radius: 50px;
936+ }
937+ .checkbox-onoff label {
938+ display: block;
939+ width: 20px;
940+ height: 20px;
941+ position: absolute;
942+ top: -5px;
943+ cursor: pointer;
944+ border-radius: 50px;
945+ box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.3);
946+ transition: all 0.4s ease;
947+ left: 27px;
948+ background-color: #3498DB;
949+ }
950+ .checkbox-onoff input[type=checkbox] {
951+ visibility: hidden;
952+ }
953+ .checkbox-onoff input[type=checkbox]:checked + label {
954+ left: -5px;
955+ background: #dcdcdc;
956+ }
957+}
958+@supports (transform: rotate(-45deg)) {
959+ .checkbox {
960+ width: 20px;
961+ position: relative;
962+ margin: 20px auto;
963+ }
964+ .checkbox label {
965+ width: 20px;
966+ height: 20px;
967+ cursor: pointer;
968+ position: absolute;
969+ top: 0;
970+ left: 0;
971+ background: white;
972+ border-radius: 4px;
973+ box-shadow: inset 0px 1px 1px white, 0px 1px 4px rgba(0, 0, 0, 0.5);
974+ }
975+ .checkbox label:after {
976+ content: '';
977+ width: 9px;
978+ height: 5px;
979+ position: absolute;
980+ top: 4px;
981+ left: 4px;
982+ border: 3px solid #333;
983+ border-top: none;
984+ border-right: none;
985+ background: transparent;
986+ opacity: 0;
987+ transform: rotate(-45deg);
988+ }
989+ .checkbox input[type=checkbox] {
990+ visibility: hidden;
991+ }
992+ .checkbox input[type=checkbox]:checked + label:after {
993+ border-color: #3498DB;
994+ opacity: 1;
995+ }
996+ .checkbox input[disabled] + label {
997+ background-color: transparent !important;
998+ box-shadow: none !important;
999+ cursor: inherit;
1000+ }
1001+ .checkbox input:not(:checked):not([readonly]):not([disabled]) + label:hover::after {
1002+ opacity: 0.5;
1003+ }
1004+}
1005+@media screen and (max-width: 50em) {
1006+ .tabs > label {
1007+ width: 100%;
1008+ }
1009+}
1010+.autocomplete {
1011+ position: absolute;
1012+ max-height: 0;
1013+ overflow-y: hidden;
1014+ text-align: left;
1015+}
1016+.autocomplete:active,
1017+.autocomplete:focus,
1018+.autocomplete:hover {
1019+ background-color: white;
1020+}
1021+.autocomplete:empty {
1022+ display: none;
1023+}
1024+.autocomplete > ul {
1025+ list-style-type: none;
1026+ margin: 0;
1027+ padding: 0;
1028+}
1029+.autocomplete > ul > li {
1030+ cursor: pointer;
1031+ padding: 5px 0 5px 10px;
1032+}
1033+.autocomplete > ul > li.active,
1034+.autocomplete > ul > li:active,
1035+.autocomplete > ul > li:focus {
1036+ background-color: #3498DB;
1037+}
1038+.autocomplete > ul > li.active a:active,
1039+.autocomplete > ul > li:active a:active,
1040+.autocomplete > ul > li:focus a:active,
1041+.autocomplete > ul > li.active a:focus,
1042+.autocomplete > ul > li:active a:focus,
1043+.autocomplete > ul > li:focus a:focus,
1044+.autocomplete > ul > li.active a:hover,
1045+.autocomplete > ul > li:active a:hover,
1046+.autocomplete > ul > li:focus a:hover {
1047+ text-decoration: none;
1048+}
1049+.autocomplete > ul > li.locked {
1050+ cursor: inherit;
1051+}
1052+.autocomplete.open {
1053+ display: block;
1054+ background-color: white;
1055+ border: 1px solid #3498DB;
1056+ max-height: 500px;
1057+ overflow-y: auto;
1058+ z-index: 100;
1059+}
1060+.autocomplete.open:empty {
1061+ display: none;
1062+}
1063+@media screen and (max-width: 50em) {
1064+ .autocomplete {
1065+ bottom: 0;
1066+ }
1067+ .autocomplete > ul > li {
1068+ padding: 7px 0 7px 10px;
1069+ border-bottom: 1px solid #E8E7E6;
1070+ text-align: left;
1071+ }
1072+}
1073+@font-face {
1074+ font-family: "ion";
1075+ src: url("../fonts/ion.eot?94af7082ea096aefe3a7b6642834716e");
1076+ src: url("../fonts/ion.eot?#iefix") format("embedded-opentype"), url("../fonts/ion.woff2?94af7082ea096aefe3a7b6642834716e") format("woff2"), url("../fonts/ion.woff?94af7082ea096aefe3a7b6642834716e") format("woff"), url("../fonts/ion.ttf?94af7082ea096aefe3a7b6642834716e") format("truetype"), url("../fonts/ion.svg?94af7082ea096aefe3a7b6642834716e#ion") format("svg");
1077+ font-weight: normal;
1078+ font-style: normal;
1079+}
1080+.ion-icon {
1081+ display: inline-block;
1082+ vertical-align: middle;
1083+ line-height: 1;
1084+ font-weight: normal;
1085+ font-style: normal;
1086+ speak: none;
1087+ text-decoration: inherit;
1088+ text-transform: none;
1089+ text-rendering: auto;
1090+ -webkit-font-smoothing: antialiased;
1091+ -moz-osx-font-smoothing: grayscale;
1092+}
1093+.ion-icon:before {
1094+ font-family: "ion";
1095+}
1096+.ion-navicon-round:before {
1097+ content: "\f101";
1098+}
1099+.ion-search:before {
1100+ content: "\f102";
1101+}
1102+.ion-play:before {
1103+ content: "\f103";
1104+}
1105+.ion-link:before {
1106+ content: "\f104";
1107+}
1108+.ion-chevron-up:before {
1109+ content: "\f105";
1110+}
1111+.ion-chevron-left:before {
1112+ content: "\f106";
1113+}
1114+.ion-chevron-right:before {
1115+ content: "\f107";
1116+}
1117+.ion-arrow-down-a:before {
1118+ content: "\f108";
1119+}
1120+.ion-arrow-up-a:before {
1121+ content: "\f109";
1122+}
1123+.ion-arrow-swap:before {
1124+ content: "\f10a";
1125+}
1126+.ion-arrow-dropdown:before {
1127+ content: "\f10b";
1128+}
1129+.ion-globe:before {
1130+ content: "\f10c";
1131+}
1132+.ion-time:before {
1133+ content: "\f10d";
1134+}
1135+.ion-location:before {
1136+ content: "\f10e";
1137+}
1138+.ion-warning:before {
1139+ content: "\f10f";
1140+}
1141+.ion-error:before {
1142+ content: "\f110";
1143+}
1144+.ion-film-outline:before {
1145+ content: "\f111";
1146+}
1147+.ion-music-note:before {
1148+ content: "\f112";
1149+}
1150+.ion-more-vertical:before {
1151+ content: "\f113";
1152+}
1153+.ion-magnet:before {
1154+ content: "\f114";
1155+}
1156+.ion-icon-big {
1157+ display: inline-block;
1158+ vertical-align: middle;
1159+ line-height: 1;
1160+ font-weight: normal;
1161+ font-style: normal;
1162+ speak: none;
1163+ text-decoration: inherit;
1164+ text-transform: none;
1165+ text-rendering: auto;
1166+ -webkit-font-smoothing: antialiased;
1167+ -moz-osx-font-smoothing: grayscale;
1168+ font-size: 149%;
1169+}
1170+.ion-icon-big:before {
1171+ font-family: "ion";
1172+}
1173+.index {
1174+ text-align: center;
1175+}
1176+.index .title {
1177+ background: url('../img/searx.png') no-repeat;
1178+ width: 100%;
1179+ min-height: 80px;
1180+ background-position: center;
1181+}
1182+.index h1 {
1183+ font-size: 5em;
1184+ visibility: hidden;
1185+}
1186+.index #search {
1187+ margin: 0 auto;
1188+ background: inherit;
1189+ border: inherit;
1190+}
1191+.index .search_filters {
1192+ display: block;
1193+ margin: 1em 0;
1194+}
1195+.index .category label {
1196+ padding: 6px 10px;
1197+ border-bottom: initial !important;
1198+}
1199+@media screen and (max-width: 75em) {
1200+ div.title h1 {
1201+ font-size: 1em;
1202+ }
1203+}
1204+#main_preferences form {
1205+ width: 100%;
1206+}
1207+#main_preferences fieldset {
1208+ margin: 8px;
1209+ border: none;
1210+}
1211+#main_preferences legend {
1212+ margin: 0;
1213+ padding: 5px 0 0 0;
1214+ display: block;
1215+ float: left;
1216+ width: 300px;
1217+}
1218+#main_preferences .value {
1219+ margin: 0;
1220+ padding: 0;
1221+ float: left;
1222+ width: 15em;
1223+}
1224+#main_preferences .description {
1225+ margin: 0;
1226+ padding: 5px 0 0 0;
1227+ float: left;
1228+ width: 50%;
1229+ color: #909090;
1230+ font-size: 90%;
1231+}
1232+#main_preferences select {
1233+ width: 200px;
1234+ font-size: inherit !important;
1235+}
1236+#main_preferences table {
1237+ border-collapse: collapse;
1238+}
1239+#main_preferences table td {
1240+ text-align: center;
1241+}
1242+#main_preferences .name,
1243+#main_preferences .shortcut {
1244+ text-align: left;
1245+}
1246+#main_preferences .preferences_back {
1247+ background: none repeat scroll 0 0 #3498DB;
1248+ color: white;
1249+ border: 0 none;
1250+ -webkit-border-radius: 4px;
1251+ -moz-border-radius: 4px;
1252+ border-radius: 4px;
1253+ cursor: pointer;
1254+ display: inline-block;
1255+ margin: 2px 4px;
1256+ padding: 0.5em;
1257+}
1258+#main_preferences .preferences_back a {
1259+ display: block;
1260+ color: #FFF;
1261+}
1262+#main_preferences .preferences_back a::first-letter {
1263+ text-transform: uppercase;
1264+}
1265+@media screen and (max-width: 75em) {
1266+ .preferences_back {
1267+ clear: both;
1268+ }
1269+}
1270+/*
1271+* searx, A privacy-respecting, hackable metasearch engine
1272+*/
1273+#search {
1274+ padding: 0 2em;
1275+ margin: 0;
1276+ background: #f7f7f7;
1277+ border-bottom: 1px solid #d7d7d7;
1278+}
1279+#search_wrapper {
1280+ padding: 10px 0;
1281+}
1282+.search_box {
1283+ margin: 0 12px 0 0;
1284+ display: inline-flex;
1285+ flex-direction: row;
1286+ white-space: nowrap;
1287+ /*
1288+ &:has(q:focus) {
1289+ box-shadow: 0px 0px 5px #CCC;
1290+}
1291+*/
1292+}
1293+#q,
1294+#send_search {
1295+ display: block !important;
1296+ border-collapse: separate;
1297+ box-sizing: border-box;
1298+ position: relative;
1299+ margin: 0;
1300+ padding: 2px;
1301+ height: 2.2em;
1302+ background: none repeat scroll 0 0 #FFF;
1303+ border: 1px solid #3498DB;
1304+ border-radius: 0px;
1305+ outline: none;
1306+ color: #222;
1307+ font-size: 16px;
1308+ z-index: 2;
1309+}
1310+#q {
1311+ outline: medium none;
1312+ padding-left: 8px;
1313+ padding-right: 0px !important;
1314+ border-right: none;
1315+ width: 40em;
1316+}
1317+#send_search {
1318+ border-left: none;
1319+ width: 2.2em;
1320+}
1321+#send_search:hover {
1322+ cursor: pointer;
1323+ background-color: #3498DB;
1324+ color: #ECF0F1;
1325+}
1326+.no-js #send_search {
1327+ width: auto !important;
1328+}
1329+.search_filters {
1330+ display: inline-block;
1331+ vertical-align: middle;
1332+}
1333+@media screen and (max-width: 75em) {
1334+ #categories {
1335+ font-size: 90%;
1336+ clear: both;
1337+ }
1338+ #categories .checkbox_container {
1339+ margin-top: 2px;
1340+ margin: auto;
1341+ }
1342+ html.touch #main_index #categories_container,
1343+ html.touch #main_results #categories_container {
1344+ width: 1000px;
1345+ width: -moz-max-content;
1346+ width: -webkit-max-content;
1347+ width: max-content;
1348+ }
1349+ html.touch #main_index #categories_container .category,
1350+ html.touch #main_results #categories_container .category {
1351+ display: inline-block;
1352+ width: auto;
1353+ }
1354+ html.touch #main_index #categories,
1355+ html.touch #main_results #categories {
1356+ width: 100%;
1357+ margin: 0;
1358+ text-align: left;
1359+ overflow-x: scroll;
1360+ overflow-y: hidden;
1361+ -webkit-overflow-scrolling: touch;
1362+ }
1363+}
1364+@media screen and (max-width: 50em) {
1365+ #search {
1366+ width: 100%;
1367+ margin: 0;
1368+ padding: 0.1em 0 0 0;
1369+ }
1370+ #search_wrapper {
1371+ width: 100%;
1372+ margin: 0 0 0.7em 0;
1373+ padding: 0;
1374+ }
1375+ .search_box {
1376+ width: 99%;
1377+ margin: 0.1em;
1378+ padding: 0 0.1em 0 0;
1379+ display: flex;
1380+ flex-direction: row;
1381+ }
1382+ #q {
1383+ width: auto !important;
1384+ flex: 1;
1385+ }
1386+ .search_filters {
1387+ display: block;
1388+ margin: 0.5em;
1389+ }
1390+ .language,
1391+ .time_range {
1392+ width: 45%;
1393+ }
1394+ .category {
1395+ display: block;
1396+ width: 90%;
1397+ }
1398+ .category label {
1399+ border-bottom: 0;
1400+ }
1401+}
1402+#categories {
1403+ margin: 0 10px 0 0;
1404+ -webkit-touch-callout: none;
1405+ -webkit-user-select: none;
1406+ -khtml-user-select: none;
1407+ -moz-user-select: none;
1408+ -ms-user-select: none;
1409+ user-select: none;
1410+}
1411+#categories::-webkit-scrollbar {
1412+ width: 0;
1413+ height: 0;
1414+}
1415+.category {
1416+ display: inline-block;
1417+ position: relative;
1418+ margin: 0 3px;
1419+ padding: 0px;
1420+ /*label:hover {
1421+ border-bottom: 2px solid @color-categories-item-border-unselected-hover;
1422+ }*/
1423+}
1424+.category input {
1425+ display: none;
1426+}
1427+.category label {
1428+ cursor: pointer;
1429+ padding: 4px 10px;
1430+ margin: 0;
1431+ display: block;
1432+ text-transform: capitalize;
1433+ font-size: 0.9em;
1434+ border-bottom: 2px solid transparent;
1435+ -webkit-touch-callout: none;
1436+ -webkit-user-select: none;
1437+ -khtml-user-select: none;
1438+ -moz-user-select: none;
1439+ -ms-user-select: none;
1440+ user-select: none;
1441+}
1442+.category input[type="checkbox"]:focus + label {
1443+ box-shadow: 0px 0px 8px #3498DB;
1444+}
1445+.category input[type="checkbox"]:checked + label {
1446+ background: #3498DB;
1447+ color: #FFF;
1448+ border-bottom: 2px solid #084999;
1449+}
1450+#categories_container {
1451+ position: relative;
1452+}
1453+#categories_container .help {
1454+ position: absolute;
1455+ width: 100%;
1456+ bottom: -20px;
1457+ overflow: hidden;
1458+ opacity: 0;
1459+ transition: opacity 1s ease;
1460+ font-size: 0.8em;
1461+ text-position: center;
1462+ background: white;
1463+}
1464+#categories_container:hover .help {
1465+ opacity: 0.8;
1466+ transition: opacity 1s ease;
1467+}
1468+html {
1469+ font-family: arial, sans-serif;
1470+ font-size: 0.9em;
1471+ -webkit-text-size-adjust: 100%;
1472+ -ms-text-size-adjust: 100%;
1473+ -moz-text-size-adjust: 100%;
1474+ text-size-adjust: 100%;
1475+ color: #444;
1476+ padding: 0;
1477+ margin: 0;
1478+}
1479+body,
1480+main {
1481+ padding: 0;
1482+ margin: 0;
1483+}
1484+main {
1485+ width: 100%;
1486+}
1487+footer {
1488+ bottom: 0;
1489+ width: 100%;
1490+ height: 50px;
1491+}
1492+#main_preferences,
1493+#main_about,
1494+#main_stats {
1495+ margin: 3em;
1496+ width: auto;
1497+}
1498+footer {
1499+ bottom: 0;
1500+ height: 3em;
1501+ margin: 1em 0;
1502+ padding: 1em 0;
1503+ clear: both;
1504+ width: 100%;
1505+ text-align: center;
1506+}
1507+footer p {
1508+ font-size: 0.9em;
1509+}
1510+#main_preferences h1,
1511+#main_stats h1 {
1512+ background: url('../img/searx.png') no-repeat;
1513+ background-size: auto 75%;
1514+ min-height: 40px;
1515+ margin: 0 auto;
1516+}
1517+#main_preferences h1 span,
1518+#main_stats h1 span {
1519+ visibility: hidden;
1520+}
1521+input[type="submit"],
1522+#results button[type="submit"] {
1523+ padding: 0.5rem;
1524+ margin: 2px 4px;
1525+ display: inline-block;
1526+ background: #3498DB;
1527+ color: #FFF;
1528+ -webkit-border-radius: 4px;
1529+ -moz-border-radius: 4px;
1530+ border-radius: 4px;
1531+ border: 0;
1532+ cursor: pointer;
1533+}
1534+a {
1535+ text-decoration: none;
1536+ color: #29314d;
1537+}
1538+a:visited {
1539+ color: #684898;
1540+}
1541+a:visited .highlight {
1542+ color: #684898;
1543+}
1544+article[data-vim-selected] {
1545+ background: #f7f7f7;
1546+}
1547+article[data-vim-selected]::before {
1548+ position: absolute;
1549+ left: 1em;
1550+ padding: 2px;
1551+ content: ">";
1552+ font-weight: bold;
1553+ color: #3498DB;
1554+}
1555+article.result-images[data-vim-selected] {
1556+ background: #3498DB;
1557+}
1558+article.result-images[data-vim-selected]::before {
1559+ display: none;
1560+ content: "";
1561+}
1562+.result {
1563+ margin: 19px 0 18px 0;
1564+ padding: 0;
1565+}
1566+.result h3 {
1567+ font-size: 1.1em;
1568+ word-wrap: break-word;
1569+ margin: 5px 0 1px 0;
1570+ padding: 0;
1571+ margin-bottom: 0;
1572+}
1573+.result h3 a {
1574+ color: #084999;
1575+ font-weight: normal;
1576+ font-size: 1.1em;
1577+}
1578+.result h3 a:visited {
1579+ color: #684898;
1580+}
1581+.result h3 a:focus,
1582+.result h3 a:hover {
1583+ text-decoration: underline;
1584+ border: none;
1585+ -webkit-box-shadow: none;
1586+ box-shadow: none;
1587+ outline: none;
1588+}
1589+.result .cache_link,
1590+.result .proxyfied_link {
1591+ font-size: 0.9em !important;
1592+}
1593+.result .content,
1594+.result .stat,
1595+.result .altlink {
1596+ font-size: 0.9em;
1597+ margin: 0;
1598+ padding: 0;
1599+ max-width: 54em;
1600+ word-wrap: break-word;
1601+ line-height: 1.24;
1602+}
1603+.result .content .highlight,
1604+.result .stat .highlight,
1605+.result .altlink .highlight {
1606+ color: #000000;
1607+ background: inherit;
1608+ font-weight: bold;
1609+}
1610+.result .codelines .highlight {
1611+ color: inherit;
1612+ background: inherit;
1613+ font-weight: normal;
1614+}
1615+.result .url {
1616+ font-size: 0.9em;
1617+ margin: 0 0 3px 0;
1618+ padding: 0;
1619+ max-width: 54em;
1620+ word-wrap: break-word;
1621+ color: #25a55b;
1622+}
1623+.result .published_date {
1624+ font-size: 0.8em;
1625+ color: #888;
1626+}
1627+.result img.thumbnail {
1628+ float: left;
1629+ padding: 0 5px 10px 0;
1630+ width: 20em;
1631+ min-width: 20em;
1632+ min-height: 8em;
1633+}
1634+.result img.image {
1635+ float: left;
1636+ padding: 0 5px 10px 0;
1637+ width: 100px;
1638+ max-height: 100px;
1639+ object-fit: scale-down;
1640+ object-position: right top;
1641+}
1642+.result .break {
1643+ clear: both;
1644+}
1645+.category-social .image {
1646+ width: auto !important;
1647+ min-width: 48px;
1648+ min-height: 48px;
1649+ padding: 0 5px 25px 0 !important;
1650+}
1651+.result-videos .content {
1652+ overflow: hidden;
1653+}
1654+.engines {
1655+ float: right;
1656+ color: #888;
1657+}
1658+.engines span {
1659+ font-size: smaller;
1660+ margin: 0 0.5em 0 0;
1661+}
1662+.small_font {
1663+ font-size: 0.8em;
1664+}
1665+.highlight {
1666+ color: #094089;
1667+ background: inherit;
1668+ font-weight: bold;
1669+}
1670+.result-images {
1671+ display: inline-block;
1672+ margin: 0;
1673+ padding: 0;
1674+ position: relative;
1675+ max-height: 200px;
1676+}
1677+.result-images img {
1678+ float: inherit;
1679+ margin: 0;
1680+ padding: 0;
1681+ border: none;
1682+ max-height: 200px;
1683+ background: #084999;
1684+}
1685+.result-images span a {
1686+ display: none;
1687+ color: #FFF;
1688+}
1689+.result-images:hover span a {
1690+ display: block;
1691+ position: absolute;
1692+ bottom: 0;
1693+ right: 0;
1694+ padding: 4px;
1695+ margin: 0 0 4px 4px;
1696+ background-color: rgba(0, 0, 0, 0.6);
1697+ font-size: 0.7em;
1698+}
1699+.torrent_result {
1700+ border-left: 10px solid lightgray;
1701+ padding-left: 3px;
1702+}
1703+.torrent_result p {
1704+ margin: 3px;
1705+ font-size: 0.8em;
1706+}
1707+.torrent_result a {
1708+ color: #084999;
1709+}
1710+.torrent_result a:hover {
1711+ text-decoration: underline;
1712+}
1713+.torrent_result a:visited {
1714+ color: #684898;
1715+}
1716+#results {
1717+ margin: 2em 2em 20px 2em;
1718+ padding: 0;
1719+ width: 50em;
1720+}
1721+#suggestions .wrapper {
1722+ display: flex;
1723+ flex-flow: row wrap;
1724+ justify-content: flex-end;
1725+}
1726+#suggestions .wrapper form {
1727+ display: inline-block;
1728+ flex: 1 1 50%;
1729+}
1730+#suggestions,
1731+#answers,
1732+#corrections {
1733+ max-width: 50em;
1734+}
1735+#suggestions input,
1736+#answers input,
1737+#infoboxes input,
1738+#corrections input {
1739+ padding: 0;
1740+ margin: 3px;
1741+ font-size: 0.9em;
1742+ display: inline-block;
1743+ background: transparent;
1744+ color: #444;
1745+ cursor: pointer;
1746+}
1747+#suggestions input[type="submit"],
1748+#answers input[type="submit"],
1749+#infoboxes input[type="submit"],
1750+#corrections input[type="submit"],
1751+#suggestions .infobox .url a,
1752+#answers .infobox .url a,
1753+#infoboxes .infobox .url a,
1754+#corrections .infobox .url a {
1755+ color: #084999;
1756+ text-decoration: none;
1757+ font-size: 0.9rem;
1758+}
1759+#suggestions input[type="submit"]:hover,
1760+#answers input[type="submit"]:hover,
1761+#infoboxes input[type="submit"]:hover,
1762+#corrections input[type="submit"]:hover,
1763+#suggestions .infobox .url a:hover,
1764+#answers .infobox .url a:hover,
1765+#infoboxes .infobox .url a:hover,
1766+#corrections .infobox .url a:hover {
1767+ text-decoration: underline;
1768+}
1769+#corrections {
1770+ display: flex;
1771+ flex-flow: row wrap;
1772+ margin: 1em 0;
1773+}
1774+#corrections h4,
1775+#corrections input[type="submit"] {
1776+ display: inline-block;
1777+ margin: 0 0.5em 0 0;
1778+}
1779+#corrections input[type="submit"]::after {
1780+ content: ", ";
1781+}
1782+#suggestions .title,
1783+#search_url .title,
1784+#apis .title {
1785+ margin: 2em 0 0.5em 0;
1786+ color: #444;
1787+}
1788+#answers {
1789+ margin: 10px 8px 10px 8px;
1790+ border: 1px solid #ddd;
1791+ padding: 0.9em;
1792+ box-shadow: 0px 0px 5px #CCC;
1793+}
1794+#answers h4 {
1795+ display: none;
1796+}
1797+#answers .answer {
1798+ display: block;
1799+ font-size: 1.2em;
1800+ font-weight: bold;
1801+}
1802+#answers form,
1803+#infoboxes form {
1804+ min-width: 210px;
1805+}
1806+#sidebar {
1807+ position: absolute;
1808+ top: 100px;
1809+ left: 57em;
1810+ margin: 0px 2px 5px 5px;
1811+ padding: 0px 2px 2px;
1812+ max-width: 25em;
1813+ word-wrap: break-word;
1814+}
1815+#sidebar .infobox {
1816+ margin: 10px 0 10px;
1817+ border: 1px solid #ddd;
1818+ padding: 0.9em;
1819+ font-size: 0.9em;
1820+ box-shadow: 0px 0px 5px #CCC;
1821+}
1822+#sidebar .infobox h2 {
1823+ margin: 0 0 .5em 0;
1824+}
1825+#sidebar .infobox img {
1826+ max-width: 100%;
1827+ max-height: 12em;
1828+ display: block;
1829+ margin: 0;
1830+ padding: 0;
1831+}
1832+#sidebar .infobox dl {
1833+ margin: 0.5em 0;
1834+}
1835+#sidebar .infobox dt {
1836+ display: inline;
1837+ margin: 0.5em 0.25em 0.5em 0;
1838+ padding: 0;
1839+ font-weight: bold;
1840+}
1841+#sidebar .infobox dd {
1842+ display: inline;
1843+ margin: 0.5em 0;
1844+ padding: 0;
1845+}
1846+#sidebar .infobox input {
1847+ font-size: 1em;
1848+}
1849+#sidebar .infobox br {
1850+ clear: both;
1851+}
1852+#sidebar .infobox .attributes,
1853+#sidebar .infobox .urls {
1854+ clear: both;
1855+}
1856+#search_url {
1857+ margin-top: 8px;
1858+}
1859+#search_url div {
1860+ border: 1px solid #888;
1861+ padding: 4px;
1862+ color: #444;
1863+ width: 100%;
1864+ display: block;
1865+ margin: 0.1em;
1866+ overflow: hidden;
1867+ height: 1.2em;
1868+ line-height: 1.2em;
1869+}
1870+#search_url div pre {
1871+ display: block;
1872+ width: 200em;
1873+ font-size: 0.8em;
1874+ word-break: break-all;
1875+ margin: 0.1em;
1876+ -webkit-user-select: all;
1877+ -moz-user-select: all;
1878+ -ms-user-select: all;
1879+ user-select: all;
1880+}
1881+#linkto_preferences {
1882+ position: absolute;
1883+ right: 10px;
1884+ top: 0.9em;
1885+ padding: 0;
1886+ border: 0;
1887+ display: block;
1888+ font-size: 1.2em;
1889+ color: #222;
1890+}
1891+#linkto_preferences a:link *,
1892+#linkto_preferences a:hover *,
1893+#linkto_preferences a:visited *,
1894+#linkto_preferences a:active * {
1895+ color: #222;
1896+}
1897+#pagination {
1898+ clear: both;
1899+}
1900+#pagination br {
1901+ clear: both;
1902+}
1903+#apis {
1904+ margin-top: 8px;
1905+ clear: both;
1906+}
1907+#backToTop {
1908+ border: 1px solid #ddd;
1909+ margin: 0 0 0 2em;
1910+ padding: 0;
1911+ font-size: 1em;
1912+ box-shadow: 0px 0px 5px #CCC;
1913+ background: white;
1914+ position: fixed;
1915+ bottom: 85px;
1916+ left: 50em;
1917+ transition: opacity 0.5s;
1918+ opacity: 0;
1919+}
1920+#backToTop a {
1921+ display: block;
1922+ margin: 0;
1923+ padding: 0.6em;
1924+}
1925+@media screen and (max-width: 75em) {
1926+ #main_preferences,
1927+ #main_about,
1928+ #main_stats {
1929+ margin: 0.5em;
1930+ width: auto;
1931+ }
1932+ #suggestions,
1933+ #answers {
1934+ margin-top: 1em;
1935+ }
1936+ #infoboxes {
1937+ position: inherit;
1938+ max-width: inherit;
1939+ }
1940+ #infoboxes .infobox {
1941+ clear: both;
1942+ }
1943+ #infoboxes .infobox img {
1944+ float: left;
1945+ max-width: 10em;
1946+ margin: 0.5em 0.5em 0.5em 0;
1947+ }
1948+ #sidebar {
1949+ position: static;
1950+ max-width: 50em;
1951+ margin: 0 0 2px 0;
1952+ padding: 0;
1953+ float: none;
1954+ border: none;
1955+ width: auto;
1956+ }
1957+ #sidebar input {
1958+ border: 0;
1959+ }
1960+ #apis {
1961+ display: none;
1962+ }
1963+ #search_url {
1964+ display: none;
1965+ }
1966+ .result {
1967+ border-bottom: 1px solid #E8E7E6;
1968+ margin: 0;
1969+ padding-top: 8px;
1970+ padding-bottom: 6px;
1971+ }
1972+ .result h3 {
1973+ margin: 0 0 1px 0;
1974+ }
1975+ .result .thumbnail {
1976+ max-width: 98%;
1977+ }
1978+ .result .url span.url {
1979+ display: block;
1980+ white-space: nowrap;
1981+ text-overflow: ellipsis;
1982+ overflow: hidden;
1983+ width: 100%;
1984+ }
1985+ .result .url a {
1986+ float: right;
1987+ padding: 0 0.5em;
1988+ }
1989+ .result .engines {
1990+ float: right;
1991+ padding: 0 0 3px 0;
1992+ }
1993+ .result-images {
1994+ border-bottom: none !important;
1995+ }
1996+ .image_result {
1997+ max-width: 98%;
1998+ }
1999+ .image_result img {
2000+ max-width: 98%;
2001+ }
2002+}
2003+@media screen and (max-width: 50em) {
2004+ article[data-vim-selected]::before {
2005+ display: none;
2006+ content: "";
2007+ }
2008+ #linkto_preferences {
2009+ display: none;
2010+ postion: fixed !important;
2011+ top: 100px;
2012+ right: 0px;
2013+ }
2014+ #sidebar {
2015+ margin: 0 5px 2px 5px;
2016+ }
2017+ #corrections {
2018+ margin: 1em 5px 1em 5px;
2019+ }
2020+ #results {
2021+ margin: 0;
2022+ padding: 0;
2023+ width: initial;
2024+ }
2025+ #backToTop {
2026+ left: 40em;
2027+ bottom: 35px;
2028+ }
2029+ .result {
2030+ padding: 8px 10px 6px 10px;
2031+ }
2032+ .result-images {
2033+ margin: 0;
2034+ padding: 0;
2035+ border: none;
2036+ }
2037+}
2038+@media screen and (max-width: 35em) {
2039+ .result-videos img.thumbnail {
2040+ float: none !important;
2041+ }
2042+ .result-videos .content {
2043+ overflow: inherit;
2044+ }
2045+}
2046+#search_submit {
2047+ left: 1px;
2048+ right: auto;
2049+}
searx/static/themes/simple/css/searx-rtl.min.cssnew file+1
@@ -0,0 +1 @@
1+/*! searx | 06-08-2017 | https://github.com/asciimoo/searx *//*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */button,hr,input{overflow:visible}audio,canvas,progress,video{display:inline-block}[type=checkbox],[type=radio],legend{padding:0;box-sizing:border-box}.badge,.center{text-align:center}.badge,progress,sub,sup{vertical-align:baseline}#q,#send_search,.tabs>section,legend{box-sizing:border-box}#apis,#pagination,#pagination br,#sidebar .infobox .attributes,#sidebar .infobox .urls,#sidebar .infobox br,.result .break,footer{clear:both}html{line-height:1.15}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}.highlight pre,textarea{overflow:auto}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=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-cancel-button,[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-warning:before,.ion-icon-big:before,.ion-icon:before{font-family:ion}summary{display:list-item}.invisible,[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}.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}#categories,.tabs>label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-touch-callout:none;-khtml-user-select:none}.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}.danger{background-color:#fae1e1}.badge{display:inline-block;color:#fff;background-color:#777;min-width:10px;padding:1px 5px;border-radius:5px}table{width:100%}table.striped tr{border-bottom:1px solid #ececec}th{padding:.4em}td{padding:0 4px}.dialog-error,.dialog-warning{width:70%;padding:1em 1em 1em 2.7em;text-align:left}tr:hover{background:#ececec}.dialog-error{position:relative;margin:0 8% 1em;border:1px solid #db3434;border-radius:4px;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-warning{position:relative;margin:0 8% 1em;border:1px solid #dbba34;border-radius:4px;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}.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{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{border-bottom:2px solid #084999;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}}#main_preferences form,.index .title,footer,main{width:100%}.autocomplete{position:absolute;max-height:0;overflow-y:hidden;text-align:left}#categories_container,#q,#send_search,.category{position:relative}.autocomplete:active,.autocomplete:focus,.autocomplete:hover{background-color:#fff}.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: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){.tabs>label{width:100%}.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?94af7082ea096aefe3a7b6642834716e);src:url(../fonts/ion.eot?#iefix) format("embedded-opentype"),url(../fonts/ion.woff2?94af7082ea096aefe3a7b6642834716e) format("woff2"),url(../fonts/ion.woff?94af7082ea096aefe3a7b6642834716e) format("woff"),url(../fonts/ion.ttf?94af7082ea096aefe3a7b6642834716e) format("truetype"),url(../fonts/ion.svg?94af7082ea096aefe3a7b6642834716e#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-icon-big{font-size:149%}.index .title{background:url(../img/searx.png) center no-repeat;min-height:80px}.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}.preferences_back{clear:both}}#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 .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}#q,#send_search{display:block!important;border-collapse:separate;margin:0;padding:2px;height:2.2em;background:#FFF;border:1px solid #3498DB;border-radius:0;outline:0;color:#222;font-size:16px;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;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: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}}#search_url div,.result-videos .content{overflow:hidden}@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}#main_preferences h1 span,#main_stats h1 span{visibility:hidden}#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}.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{border:1px solid #888;padding:4px;color:#444;width:100%;display:block;margin:.1em;height:1.2em;line-height:1.2em}#search_url div pre{display:block;width:200em;font-size:.8em;word-break:break-all;margin:.1em;-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all}#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}}@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}
searx/static/themes/simple/css/searx.cssnew file+2045
@@ -0,0 +1,2045 @@
1+/*! searx | 06-08-2017 | https://github.com/asciimoo/searx */
2+/*
3+* searx, A privacy-respecting, hackable metasearch engine
4+*
5+* To convert "style.less" to "style.css" run: $make styles
6+*/
7+/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
8+/* Document
9+ ========================================================================== */
10+/**
11+ * 1. Correct the line height in all browsers.
12+ * 2. Prevent adjustments of font size after orientation changes in
13+ * IE on Windows Phone and in iOS.
14+ */
15+html {
16+ line-height: 1.15;
17+ /* 1 */
18+ -ms-text-size-adjust: 100%;
19+ /* 2 */
20+ -webkit-text-size-adjust: 100%;
21+ /* 2 */
22+}
23+/* Sections
24+ ========================================================================== */
25+/**
26+ * Remove the margin in all browsers (opinionated).
27+ */
28+body {
29+ margin: 0;
30+}
31+/**
32+ * Add the correct display in IE 9-.
33+ */
34+article,
35+aside,
36+footer,
37+header,
38+nav,
39+section {
40+ display: block;
41+}
42+/**
43+ * Correct the font size and margin on `h1` elements within `section` and
44+ * `article` contexts in Chrome, Firefox, and Safari.
45+ */
46+h1 {
47+ font-size: 2em;
48+ margin: 0.67em 0;
49+}
50+/* Grouping content
51+ ========================================================================== */
52+/**
53+ * Add the correct display in IE 9-.
54+ * 1. Add the correct display in IE.
55+ */
56+figcaption,
57+figure,
58+main {
59+ /* 1 */
60+ display: block;
61+}
62+/**
63+ * Add the correct margin in IE 8.
64+ */
65+figure {
66+ margin: 1em 40px;
67+}
68+/**
69+ * 1. Add the correct box sizing in Firefox.
70+ * 2. Show the overflow in Edge and IE.
71+ */
72+hr {
73+ box-sizing: content-box;
74+ /* 1 */
75+ height: 0;
76+ /* 1 */
77+ overflow: visible;
78+ /* 2 */
79+}
80+/**
81+ * 1. Correct the inheritance and scaling of font size in all browsers.
82+ * 2. Correct the odd `em` font sizing in all browsers.
83+ */
84+pre {
85+ font-family: monospace, monospace;
86+ /* 1 */
87+ font-size: 1em;
88+ /* 2 */
89+}
90+/* Text-level semantics
91+ ========================================================================== */
92+/**
93+ * 1. Remove the gray background on active links in IE 10.
94+ * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
95+ */
96+a {
97+ background-color: transparent;
98+ /* 1 */
99+ -webkit-text-decoration-skip: objects;
100+ /* 2 */
101+}
102+/**
103+ * 1. Remove the bottom border in Chrome 57- and Firefox 39-.
104+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
105+ */
106+abbr[title] {
107+ border-bottom: none;
108+ /* 1 */
109+ text-decoration: underline;
110+ /* 2 */
111+ text-decoration: underline dotted;
112+ /* 2 */
113+}
114+/**
115+ * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
116+ */
117+b,
118+strong {
119+ font-weight: inherit;
120+}
121+/**
122+ * Add the correct font weight in Chrome, Edge, and Safari.
123+ */
124+b,
125+strong {
126+ font-weight: bolder;
127+}
128+/**
129+ * 1. Correct the inheritance and scaling of font size in all browsers.
130+ * 2. Correct the odd `em` font sizing in all browsers.
131+ */
132+code,
133+kbd,
134+samp {
135+ font-family: monospace, monospace;
136+ /* 1 */
137+ font-size: 1em;
138+ /* 2 */
139+}
140+/**
141+ * Add the correct font style in Android 4.3-.
142+ */
143+dfn {
144+ font-style: italic;
145+}
146+/**
147+ * Add the correct background and color in IE 9-.
148+ */
149+mark {
150+ background-color: #ff0;
151+ color: #000;
152+}
153+/**
154+ * Add the correct font size in all browsers.
155+ */
156+small {
157+ font-size: 80%;
158+}
159+/**
160+ * Prevent `sub` and `sup` elements from affecting the line height in
161+ * all browsers.
162+ */
163+sub,
164+sup {
165+ font-size: 75%;
166+ line-height: 0;
167+ position: relative;
168+ vertical-align: baseline;
169+}
170+sub {
171+ bottom: -0.25em;
172+}
173+sup {
174+ top: -0.5em;
175+}
176+/* Embedded content
177+ ========================================================================== */
178+/**
179+ * Add the correct display in IE 9-.
180+ */
181+audio,
182+video {
183+ display: inline-block;
184+}
185+/**
186+ * Add the correct display in iOS 4-7.
187+ */
188+audio:not([controls]) {
189+ display: none;
190+ height: 0;
191+}
192+/**
193+ * Remove the border on images inside links in IE 10-.
194+ */
195+img {
196+ border-style: none;
197+}
198+/**
199+ * Hide the overflow in IE.
200+ */
201+svg:not(:root) {
202+ overflow: hidden;
203+}
204+/* Forms
205+ ========================================================================== */
206+/**
207+ * 1. Change the font styles in all browsers (opinionated).
208+ * 2. Remove the margin in Firefox and Safari.
209+ */
210+button,
211+input,
212+optgroup,
213+select,
214+textarea {
215+ font-family: sans-serif;
216+ /* 1 */
217+ font-size: 100%;
218+ /* 1 */
219+ line-height: 1.15;
220+ /* 1 */
221+ margin: 0;
222+ /* 2 */
223+}
224+/**
225+ * Show the overflow in IE.
226+ * 1. Show the overflow in Edge.
227+ */
228+button,
229+input {
230+ /* 1 */
231+ overflow: visible;
232+}
233+/**
234+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
235+ * 1. Remove the inheritance of text transform in Firefox.
236+ */
237+button,
238+select {
239+ /* 1 */
240+ text-transform: none;
241+}
242+/**
243+ * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
244+ * controls in Android 4.
245+ * 2. Correct the inability to style clickable types in iOS and Safari.
246+ */
247+button,
248+html [type="button"],
249+[type="reset"],
250+[type="submit"] {
251+ -webkit-appearance: button;
252+ /* 2 */
253+}
254+/**
255+ * Remove the inner border and padding in Firefox.
256+ */
257+button::-moz-focus-inner,
258+[type="button"]::-moz-focus-inner,
259+[type="reset"]::-moz-focus-inner,
260+[type="submit"]::-moz-focus-inner {
261+ border-style: none;
262+ padding: 0;
263+}
264+/**
265+ * Restore the focus styles unset by the previous rule.
266+ */
267+button:-moz-focusring,
268+[type="button"]:-moz-focusring,
269+[type="reset"]:-moz-focusring,
270+[type="submit"]:-moz-focusring {
271+ outline: 1px dotted ButtonText;
272+}
273+/**
274+ * Correct the padding in Firefox.
275+ */
276+fieldset {
277+ padding: 0.35em 0.75em 0.625em;
278+}
279+/**
280+ * 1. Correct the text wrapping in Edge and IE.
281+ * 2. Correct the color inheritance from `fieldset` elements in IE.
282+ * 3. Remove the padding so developers are not caught out when they zero out
283+ * `fieldset` elements in all browsers.
284+ */
285+legend {
286+ box-sizing: border-box;
287+ /* 1 */
288+ color: inherit;
289+ /* 2 */
290+ display: table;
291+ /* 1 */
292+ max-width: 100%;
293+ /* 1 */
294+ padding: 0;
295+ /* 3 */
296+ white-space: normal;
297+ /* 1 */
298+}
299+/**
300+ * 1. Add the correct display in IE 9-.
301+ * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
302+ */
303+progress {
304+ display: inline-block;
305+ /* 1 */
306+ vertical-align: baseline;
307+ /* 2 */
308+}
309+/**
310+ * Remove the default vertical scrollbar in IE.
311+ */
312+textarea {
313+ overflow: auto;
314+}
315+/**
316+ * 1. Add the correct box sizing in IE 10-.
317+ * 2. Remove the padding in IE 10-.
318+ */
319+[type="checkbox"],
320+[type="radio"] {
321+ box-sizing: border-box;
322+ /* 1 */
323+ padding: 0;
324+ /* 2 */
325+}
326+/**
327+ * Correct the cursor style of increment and decrement buttons in Chrome.
328+ */
329+[type="number"]::-webkit-inner-spin-button,
330+[type="number"]::-webkit-outer-spin-button {
331+ height: auto;
332+}
333+/**
334+ * 1. Correct the odd appearance in Chrome and Safari.
335+ * 2. Correct the outline style in Safari.
336+ */
337+[type="search"] {
338+ -webkit-appearance: textfield;
339+ /* 1 */
340+ outline-offset: -2px;
341+ /* 2 */
342+}
343+/**
344+ * Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
345+ */
346+[type="search"]::-webkit-search-cancel-button,
347+[type="search"]::-webkit-search-decoration {
348+ -webkit-appearance: none;
349+}
350+/**
351+ * 1. Correct the inability to style clickable types in iOS and Safari.
352+ * 2. Change font properties to `inherit` in Safari.
353+ */
354+::-webkit-file-upload-button {
355+ -webkit-appearance: button;
356+ /* 1 */
357+ font: inherit;
358+ /* 2 */
359+}
360+/* Interactive
361+ ========================================================================== */
362+/*
363+ * Add the correct display in IE 9-.
364+ * 1. Add the correct display in Edge, IE, and Firefox.
365+ */
366+details,
367+menu {
368+ display: block;
369+}
370+/*
371+ * Add the correct display in all browsers.
372+ */
373+summary {
374+ display: list-item;
375+}
376+/* Scripting
377+ ========================================================================== */
378+/**
379+ * Add the correct display in IE 9-.
380+ */
381+canvas {
382+ display: inline-block;
383+}
384+/**
385+ * Add the correct display in IE.
386+ */
387+template {
388+ display: none;
389+}
390+/* Hidden
391+ ========================================================================== */
392+/**
393+ * Add the correct display in IE 10-.
394+ */
395+[hidden] {
396+ display: none;
397+}
398+/*
399+ * searx, A privacy-respecting, hackable metasearch engine
400+ *
401+ * To change the colors of the site, simple edit this variables
402+ */
403+/*
404+* searx, A privacy-respecting, hackable metasearch engine
405+*/
406+.highlight .hll {
407+ background-color: #ffffcc;
408+}
409+.highlight {
410+ background: #f8f8f8;
411+}
412+.highlight .c {
413+ color: #408080;
414+ font-style: italic;
415+}
416+/* Comment */
417+.highlight .err {
418+ border: 1px solid #FF0000;
419+}
420+/* Error */
421+.highlight .k {
422+ color: #008000;
423+ font-weight: bold;
424+}
425+/* Keyword */
426+.highlight .o {
427+ color: #666666;
428+}
429+/* Operator */
430+.highlight .cm {
431+ color: #408080;
432+ font-style: italic;
433+}
434+/* Comment.Multiline */
435+.highlight .cp {
436+ color: #BC7A00;
437+}
438+/* Comment.Preproc */
439+.highlight .c1 {
440+ color: #408080;
441+ font-style: italic;
442+}
443+/* Comment.Single */
444+.highlight .cs {
445+ color: #408080;
446+ font-style: italic;
447+}
448+/* Comment.Special */
449+.highlight .gd {
450+ color: #A00000;
451+}
452+/* Generic.Deleted */
453+.highlight .ge {
454+ font-style: italic;
455+}
456+/* Generic.Emph */
457+.highlight .gr {
458+ color: #FF0000;
459+}
460+/* Generic.Error */
461+.highlight .gh {
462+ color: #000080;
463+ font-weight: bold;
464+}
465+/* Generic.Heading */
466+.highlight .gi {
467+ color: #00A000;
468+}
469+/* Generic.Inserted */
470+.highlight .go {
471+ color: #888888;
472+}
473+/* Generic.Output */
474+.highlight .gp {
475+ color: #000080;
476+ font-weight: bold;
477+}
478+/* Generic.Prompt */
479+.highlight .gs {
480+ font-weight: bold;
481+}
482+/* Generic.Strong */
483+.highlight .gu {
484+ color: #800080;
485+ font-weight: bold;
486+}
487+/* Generic.Subheading */
488+.highlight .gt {
489+ color: #0044DD;
490+}
491+/* Generic.Traceback */
492+.highlight .kc {
493+ color: #008000;
494+ font-weight: bold;
495+}
496+/* Keyword.Constant */
497+.highlight .kd {
498+ color: #008000;
499+ font-weight: bold;
500+}
501+/* Keyword.Declaration */
502+.highlight .kn {
503+ color: #008000;
504+ font-weight: bold;
505+}
506+/* Keyword.Namespace */
507+.highlight .kp {
508+ color: #008000;
509+}
510+/* Keyword.Pseudo */
511+.highlight .kr {
512+ color: #008000;
513+ font-weight: bold;
514+}
515+/* Keyword.Reserved */
516+.highlight .kt {
517+ color: #B00040;
518+}
519+/* Keyword.Type */
520+.highlight .m {
521+ color: #666666;
522+}
523+/* Literal.Number */
524+.highlight .s {
525+ color: #BA2121;
526+}
527+/* Literal.String */
528+.highlight .na {
529+ color: #7D9029;
530+}
531+/* Name.Attribute */
532+.highlight .nb {
533+ color: #008000;
534+}
535+/* Name.Builtin */
536+.highlight .nc {
537+ color: #0000FF;
538+ font-weight: bold;
539+}
540+/* Name.Class */
541+.highlight .no {
542+ color: #880000;
543+}
544+/* Name.Constant */
545+.highlight .nd {
546+ color: #AA22FF;
547+}
548+/* Name.Decorator */
549+.highlight .ni {
550+ color: #999999;
551+ font-weight: bold;
552+}
553+/* Name.Entity */
554+.highlight .ne {
555+ color: #D2413A;
556+ font-weight: bold;
557+}
558+/* Name.Exception */
559+.highlight .nf {
560+ color: #0000FF;
561+}
562+/* Name.Function */
563+.highlight .nl {
564+ color: #A0A000;
565+}
566+/* Name.Label */
567+.highlight .nn {
568+ color: #0000FF;
569+ font-weight: bold;
570+}
571+/* Name.Namespace */
572+.highlight .nt {
573+ color: #008000;
574+ font-weight: bold;
575+}
576+/* Name.Tag */
577+.highlight .nv {
578+ color: #19177C;
579+}
580+/* Name.Variable */
581+.highlight .ow {
582+ color: #AA22FF;
583+ font-weight: bold;
584+}
585+/* Operator.Word */
586+.highlight .w {
587+ color: #bbbbbb;
588+}
589+/* Text.Whitespace */
590+.highlight .mf {
591+ color: #666666;
592+}
593+/* Literal.Number.Float */
594+.highlight .mh {
595+ color: #666666;
596+}
597+/* Literal.Number.Hex */
598+.highlight .mi {
599+ color: #666666;
600+}
601+/* Literal.Number.Integer */
602+.highlight .mo {
603+ color: #666666;
604+}
605+/* Literal.Number.Oct */
606+.highlight .sb {
607+ color: #BA2121;
608+}
609+/* Literal.String.Backtick */
610+.highlight .sc {
611+ color: #BA2121;
612+}
613+/* Literal.String.Char */
614+.highlight .sd {
615+ color: #BA2121;
616+ font-style: italic;
617+}
618+/* Literal.String.Doc */
619+.highlight .s2 {
620+ color: #BA2121;
621+}
622+/* Literal.String.Double */
623+.highlight .se {
624+ color: #BB6622;
625+ font-weight: bold;
626+}
627+/* Literal.String.Escape */
628+.highlight .sh {
629+ color: #BA2121;
630+}
631+/* Literal.String.Heredoc */
632+.highlight .si {
633+ color: #BB6688;
634+ font-weight: bold;
635+}
636+/* Literal.String.Interpol */
637+.highlight .sx {
638+ color: #008000;
639+}
640+/* Literal.String.Other */
641+.highlight .sr {
642+ color: #BB6688;
643+}
644+/* Literal.String.Regex */
645+.highlight .s1 {
646+ color: #BA2121;
647+}
648+/* Literal.String.Single */
649+.highlight .ss {
650+ color: #19177C;
651+}
652+/* Literal.String.Symbol */
653+.highlight .bp {
654+ color: #008000;
655+}
656+/* Name.Builtin.Pseudo */
657+.highlight .vc {
658+ color: #19177C;
659+}
660+/* Name.Variable.Class */
661+.highlight .vg {
662+ color: #19177C;
663+}
664+/* Name.Variable.Global */
665+.highlight .vi {
666+ color: #19177C;
667+}
668+/* Name.Variable.Instance */
669+.highlight .il {
670+ color: #666666;
671+}
672+/* Literal.Number.Integer.Long */
673+.highlight pre {
674+ overflow: auto;
675+}
676+.highlight .lineno {
677+ -webkit-touch-callout: none;
678+ -webkit-user-select: none;
679+ -khtml-user-select: none;
680+ -moz-user-select: none;
681+ -ms-user-select: none;
682+ user-select: none;
683+ cursor: default;
684+}
685+.highlight .lineno::selection {
686+ background: transparent;
687+ /* WebKit/Blink Browsers */
688+}
689+.highlight .lineno::-moz-selection {
690+ background: transparent;
691+ /* Gecko Browsers */
692+}
693+html.no-js .hide_if_nojs {
694+ display: none;
695+}
696+html.js .show_if_nojs {
697+ display: none;
698+}
699+.center {
700+ text-align: center;
701+}
702+.right {
703+ float: right ;
704+}
705+.left {
706+ float: left;
707+}
708+.invisible {
709+ display: none;
710+}
711+.danger {
712+ background-color: #fae1e1;
713+}
714+.badge {
715+ display: inline-block;
716+ color: #fff;
717+ background-color: #777;
718+ text-align: center;
719+ white-space: nowrap;
720+ vertical-align: baseline;
721+ min-width: 10px;
722+ padding: 1px 5px;
723+ border-radius: 5px;
724+}
725+table {
726+ width: 100%;
727+}
728+table.striped tr {
729+ border-bottom: 1px solid #ececec;
730+}
731+th {
732+ padding: 0.4em;
733+}
734+td {
735+ padding: 0 4px;
736+}
737+tr:hover {
738+ background: #ececec;
739+}
740+.dialog-error {
741+ position: relative;
742+ width: 70%;
743+ padding: 1em 1em 1em 2.7em;
744+ margin: 0em 8% 1em 8%;
745+ border: 1px solid black;
746+ border-radius: 4px;
747+ text-align: left;
748+ color: #db3434;
749+ background: #fae1e1;
750+ border-color: #db3434;
751+}
752+.dialog-error:before {
753+ position: absolute;
754+ top: 0.5em;
755+ left: 0.5em;
756+ font-family: "ion";
757+ font-size: 1.5em;
758+}
759+.dialog-error .close {
760+ float: right;
761+ position: relative;
762+ top: -3px;
763+ color: inherit;
764+ font-size: 1.5em;
765+}
766+.dialog-error ul,
767+.dialog-error ol,
768+.dialog-error p {
769+ margin: 1px 0 0 0;
770+}
771+.dialog-error:before {
772+ content: "\f110";
773+}
774+.dialog-warning {
775+ position: relative;
776+ width: 70%;
777+ padding: 1em 1em 1em 2.7em;
778+ margin: 0em 8% 1em 8%;
779+ border: 1px solid black;
780+ border-radius: 4px;
781+ text-align: left;
782+ color: #dbba34;
783+ background: #faf5e1;
784+ border-color: #dbba34;
785+}
786+.dialog-warning:before {
787+ position: absolute;
788+ top: 0.5em;
789+ left: 0.5em;
790+ font-family: "ion";
791+ font-size: 1.5em;
792+}
793+.dialog-warning .close {
794+ float: right;
795+ position: relative;
796+ top: -3px;
797+ color: inherit;
798+ font-size: 1.5em;
799+}
800+.dialog-warning ul,
801+.dialog-warning ol,
802+.dialog-warning p {
803+ margin: 1px 0 0 0;
804+}
805+.dialog-warning:before {
806+ content: "\f10f";
807+}
808+.btn-collapse {
809+ cursor: pointer;
810+}
811+.scrollx {
812+ overflow-x: auto;
813+ overflow-y: hidden;
814+ display: block;
815+ padding: 0;
816+ margin: 0;
817+ border: none;
818+}
819+.tabs .tabs > label {
820+ font-size: 90%;
821+}
822+.tabs {
823+ display: -webkit-box;
824+ display: -moz-box;
825+ display: -webkit-flex;
826+ display: -ms-flexbox;
827+ display: flex;
828+ flex-wrap: wrap;
829+ width: 100%;
830+ min-width: 100%;
831+}
832+.tabs > * {
833+ order: 2;
834+}
835+.tabs > input[type=radio] {
836+ display: none;
837+}
838+.tabs > label {
839+ order: 1;
840+ padding: 0.7em;
841+ margin: 0 0.7em;
842+ letter-spacing: 0.5px;
843+ text-transform: uppercase;
844+ border: solid white;
845+ border-width: 0px 0px 2px 0;
846+ -webkit-touch-callout: none;
847+ -webkit-user-select: none;
848+ -khtml-user-select: none;
849+ -moz-user-select: none;
850+ -ms-user-select: none;
851+ user-select: none;
852+ cursor: pointer;
853+}
854+.tabs > label:hover {
855+ border-bottom: 2px solid #084999;
856+}
857+.tabs > section {
858+ min-width: 100%;
859+ padding: 0.7rem 0;
860+ box-sizing: border-box;
861+ border-top: 1px solid black;
862+ display: none;
863+}
864+.tabs > label:last-of-type {
865+ border-bottom: 2px solid #084999;
866+ background: #3498DB;
867+ color: #FFF;
868+ font-weight: bold;
869+ letter-spacing: -0.1px;
870+}
871+.tabs > section:last-of-type {
872+ display: block;
873+}
874+html body .tabs > input:checked ~ section {
875+ display: none;
876+}
877+html body .tabs > input:checked ~ label {
878+ position: inherited;
879+ background: inherit;
880+ border-bottom: 2px solid transparent;
881+ font-weight: normal;
882+ color: inherit;
883+}
884+html body .tabs > input:checked ~ label:hover {
885+ border-bottom: 2px solid #084999;
886+}
887+html body .tabs > input:checked + label {
888+ border-bottom: 2px solid #084999;
889+ background: #3498DB;
890+ color: #FFF;
891+ font-weight: bold;
892+ letter-spacing: -0.1px;
893+}
894+html body .tabs > input:checked + label + section {
895+ display: block;
896+}
897+select {
898+ height: 28px;
899+ margin: 0 1em 0 0;
900+ padding: 2px 8px 2px 0 !important;
901+ color: #222;
902+ font-size: 12px;
903+ z-index: 2;
904+}
905+select:hover,
906+select:focus {
907+ cursor: pointer;
908+}
909+@supports ((background-position-x: 100%) and ((appearance: none) or (-webkit-appearance: none) or (-moz-appearance: none))) {
910+ select {
911+ appearance: none;
912+ -webkit-appearance: none;
913+ -moz-appearance: none;
914+ border: none;
915+ border-bottom: 1px solid #d7d7d7;
916+ background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI1MTJweCIgaGVpZ2h0PSI1MTJweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDUxMiA1MTIiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTI4LDE5MiAyNTYsMzIwIDM4NCwxOTIiLz48L2c+PC9zdmc+Cg==) no-repeat;
917+ background-position-x: 105%;
918+ background-size: 2em;
919+ background-origin: content-box;
920+ outline: medium none;
921+ }
922+ select:hover,
923+ select:focus {
924+ border-bottom: 1px solid #3498DB;
925+ }
926+}
927+@supports (border-radius: 50px) {
928+ .checkbox-onoff {
929+ display: inline-block;
930+ width: 40px;
931+ height: 10px;
932+ background: #dcdcdc;
933+ margin: 8px auto;
934+ position: relative;
935+ border-radius: 50px;
936+ }
937+ .checkbox-onoff label {
938+ display: block;
939+ width: 20px;
940+ height: 20px;
941+ position: absolute;
942+ top: -5px;
943+ cursor: pointer;
944+ border-radius: 50px;
945+ box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.3);
946+ transition: all 0.4s ease;
947+ left: 27px;
948+ background-color: #3498DB;
949+ }
950+ .checkbox-onoff input[type=checkbox] {
951+ visibility: hidden;
952+ }
953+ .checkbox-onoff input[type=checkbox]:checked + label {
954+ left: -5px;
955+ background: #dcdcdc;
956+ }
957+}
958+@supports (transform: rotate(-45deg)) {
959+ .checkbox {
960+ width: 20px;
961+ position: relative;
962+ margin: 20px auto;
963+ }
964+ .checkbox label {
965+ width: 20px;
966+ height: 20px;
967+ cursor: pointer;
968+ position: absolute;
969+ top: 0;
970+ left: 0;
971+ background: white;
972+ border-radius: 4px;
973+ box-shadow: inset 0px 1px 1px white, 0px 1px 4px rgba(0, 0, 0, 0.5);
974+ }
975+ .checkbox label:after {
976+ content: '';
977+ width: 9px;
978+ height: 5px;
979+ position: absolute;
980+ top: 4px;
981+ left: 4px;
982+ border: 3px solid #333;
983+ border-top: none;
984+ border-right: none;
985+ background: transparent;
986+ opacity: 0;
987+ transform: rotate(-45deg);
988+ }
989+ .checkbox input[type=checkbox] {
990+ visibility: hidden;
991+ }
992+ .checkbox input[type=checkbox]:checked + label:after {
993+ border-color: #3498DB;
994+ opacity: 1;
995+ }
996+ .checkbox input[disabled] + label {
997+ background-color: transparent !important;
998+ box-shadow: none !important;
999+ cursor: inherit;
1000+ }
1001+ .checkbox input:not(:checked):not([readonly]):not([disabled]) + label:hover::after {
1002+ opacity: 0.5;
1003+ }
1004+}
1005+@media screen and (max-width: 50em) {
1006+ .tabs > label {
1007+ width: 100%;
1008+ }
1009+}
1010+.autocomplete {
1011+ position: absolute;
1012+ max-height: 0;
1013+ overflow-y: hidden;
1014+ text-align: left;
1015+}
1016+.autocomplete:active,
1017+.autocomplete:focus,
1018+.autocomplete:hover {
1019+ background-color: white;
1020+}
1021+.autocomplete:empty {
1022+ display: none;
1023+}
1024+.autocomplete > ul {
1025+ list-style-type: none;
1026+ margin: 0;
1027+ padding: 0;
1028+}
1029+.autocomplete > ul > li {
1030+ cursor: pointer;
1031+ padding: 5px 0 5px 10px;
1032+}
1033+.autocomplete > ul > li.active,
1034+.autocomplete > ul > li:active,
1035+.autocomplete > ul > li:focus {
1036+ background-color: #3498DB;
1037+}
1038+.autocomplete > ul > li.active a:active,
1039+.autocomplete > ul > li:active a:active,
1040+.autocomplete > ul > li:focus a:active,
1041+.autocomplete > ul > li.active a:focus,
1042+.autocomplete > ul > li:active a:focus,
1043+.autocomplete > ul > li:focus a:focus,
1044+.autocomplete > ul > li.active a:hover,
1045+.autocomplete > ul > li:active a:hover,
1046+.autocomplete > ul > li:focus a:hover {
1047+ text-decoration: none;
1048+}
1049+.autocomplete > ul > li.locked {
1050+ cursor: inherit;
1051+}
1052+.autocomplete.open {
1053+ display: block;
1054+ background-color: white;
1055+ border: 1px solid #3498DB;
1056+ max-height: 500px;
1057+ overflow-y: auto;
1058+ z-index: 100;
1059+}
1060+.autocomplete.open:empty {
1061+ display: none;
1062+}
1063+@media screen and (max-width: 50em) {
1064+ .autocomplete {
1065+ bottom: 0;
1066+ }
1067+ .autocomplete > ul > li {
1068+ padding: 7px 0 7px 10px;
1069+ border-bottom: 1px solid #E8E7E6;
1070+ text-align: left;
1071+ }
1072+}
1073+@font-face {
1074+ font-family: "ion";
1075+ src: url("../fonts/ion.eot?94af7082ea096aefe3a7b6642834716e");
1076+ src: url("../fonts/ion.eot?#iefix") format("embedded-opentype"), url("../fonts/ion.woff2?94af7082ea096aefe3a7b6642834716e") format("woff2"), url("../fonts/ion.woff?94af7082ea096aefe3a7b6642834716e") format("woff"), url("../fonts/ion.ttf?94af7082ea096aefe3a7b6642834716e") format("truetype"), url("../fonts/ion.svg?94af7082ea096aefe3a7b6642834716e#ion") format("svg");
1077+ font-weight: normal;
1078+ font-style: normal;
1079+}
1080+.ion-icon {
1081+ display: inline-block;
1082+ vertical-align: middle;
1083+ line-height: 1;
1084+ font-weight: normal;
1085+ font-style: normal;
1086+ speak: none;
1087+ text-decoration: inherit;
1088+ text-transform: none;
1089+ text-rendering: auto;
1090+ -webkit-font-smoothing: antialiased;
1091+ -moz-osx-font-smoothing: grayscale;
1092+}
1093+.ion-icon:before {
1094+ font-family: "ion";
1095+}
1096+.ion-navicon-round:before {
1097+ content: "\f101";
1098+}
1099+.ion-search:before {
1100+ content: "\f102";
1101+}
1102+.ion-play:before {
1103+ content: "\f103";
1104+}
1105+.ion-link:before {
1106+ content: "\f104";
1107+}
1108+.ion-chevron-up:before {
1109+ content: "\f105";
1110+}
1111+.ion-chevron-left:before {
1112+ content: "\f106";
1113+}
1114+.ion-chevron-right:before {
1115+ content: "\f107";
1116+}
1117+.ion-arrow-down-a:before {
1118+ content: "\f108";
1119+}
1120+.ion-arrow-up-a:before {
1121+ content: "\f109";
1122+}
1123+.ion-arrow-swap:before {
1124+ content: "\f10a";
1125+}
1126+.ion-arrow-dropdown:before {
1127+ content: "\f10b";
1128+}
1129+.ion-globe:before {
1130+ content: "\f10c";
1131+}
1132+.ion-time:before {
1133+ content: "\f10d";
1134+}
1135+.ion-location:before {
1136+ content: "\f10e";
1137+}
1138+.ion-warning:before {
1139+ content: "\f10f";
1140+}
1141+.ion-error:before {
1142+ content: "\f110";
1143+}
1144+.ion-film-outline:before {
1145+ content: "\f111";
1146+}
1147+.ion-music-note:before {
1148+ content: "\f112";
1149+}
1150+.ion-more-vertical:before {
1151+ content: "\f113";
1152+}
1153+.ion-magnet:before {
1154+ content: "\f114";
1155+}
1156+.ion-icon-big {
1157+ display: inline-block;
1158+ vertical-align: middle;
1159+ line-height: 1;
1160+ font-weight: normal;
1161+ font-style: normal;
1162+ speak: none;
1163+ text-decoration: inherit;
1164+ text-transform: none;
1165+ text-rendering: auto;
1166+ -webkit-font-smoothing: antialiased;
1167+ -moz-osx-font-smoothing: grayscale;
1168+ font-size: 149%;
1169+}
1170+.ion-icon-big:before {
1171+ font-family: "ion";
1172+}
1173+.index {
1174+ text-align: center;
1175+}
1176+.index .title {
1177+ background: url('../img/searx.png') no-repeat;
1178+ width: 100%;
1179+ min-height: 80px;
1180+ background-position: center;
1181+}
1182+.index h1 {
1183+ font-size: 5em;
1184+ visibility: hidden;
1185+}
1186+.index #search {
1187+ margin: 0 auto;
1188+ background: inherit;
1189+ border: inherit;
1190+}
1191+.index .search_filters {
1192+ display: block;
1193+ margin: 1em 0;
1194+}
1195+.index .category label {
1196+ padding: 6px 10px;
1197+ border-bottom: initial !important;
1198+}
1199+@media screen and (max-width: 75em) {
1200+ div.title h1 {
1201+ font-size: 1em;
1202+ }
1203+}
1204+#main_preferences form {
1205+ width: 100%;
1206+}
1207+#main_preferences fieldset {
1208+ margin: 8px;
1209+ border: none;
1210+}
1211+#main_preferences legend {
1212+ margin: 0;
1213+ padding: 5px 0 0 0;
1214+ display: block;
1215+ float: left;
1216+ width: 300px;
1217+}
1218+#main_preferences .value {
1219+ margin: 0;
1220+ padding: 0;
1221+ float: left;
1222+ width: 15em;
1223+}
1224+#main_preferences .description {
1225+ margin: 0;
1226+ padding: 5px 0 0 0;
1227+ float: left;
1228+ width: 50%;
1229+ color: #909090;
1230+ font-size: 90%;
1231+}
1232+#main_preferences select {
1233+ width: 200px;
1234+ font-size: inherit !important;
1235+}
1236+#main_preferences table {
1237+ border-collapse: collapse;
1238+}
1239+#main_preferences table td {
1240+ text-align: center;
1241+}
1242+#main_preferences .name,
1243+#main_preferences .shortcut {
1244+ text-align: left;
1245+}
1246+#main_preferences .preferences_back {
1247+ background: none repeat scroll 0 0 #3498DB;
1248+ color: white;
1249+ border: 0 none;
1250+ -webkit-border-radius: 4px;
1251+ -moz-border-radius: 4px;
1252+ border-radius: 4px;
1253+ cursor: pointer;
1254+ display: inline-block;
1255+ margin: 2px 4px;
1256+ padding: 0.5em;
1257+}
1258+#main_preferences .preferences_back a {
1259+ display: block;
1260+ color: #FFF;
1261+}
1262+#main_preferences .preferences_back a::first-letter {
1263+ text-transform: uppercase;
1264+}
1265+@media screen and (max-width: 75em) {
1266+ .preferences_back {
1267+ clear: both;
1268+ }
1269+}
1270+/*
1271+* searx, A privacy-respecting, hackable metasearch engine
1272+*/
1273+#search {
1274+ padding: 0 2em;
1275+ margin: 0;
1276+ background: #f7f7f7;
1277+ border-bottom: 1px solid #d7d7d7;
1278+}
1279+#search_wrapper {
1280+ padding: 10px 0;
1281+}
1282+.search_box {
1283+ margin: 0 12px 0 0;
1284+ display: inline-flex;
1285+ flex-direction: row;
1286+ white-space: nowrap;
1287+ /*
1288+ &:has(q:focus) {
1289+ box-shadow: 0px 0px 5px #CCC;
1290+}
1291+*/
1292+}
1293+#q,
1294+#send_search {
1295+ display: block !important;
1296+ border-collapse: separate;
1297+ box-sizing: border-box;
1298+ position: relative;
1299+ margin: 0;
1300+ padding: 2px;
1301+ height: 2.2em;
1302+ background: none repeat scroll 0 0 #FFF;
1303+ border: 1px solid #3498DB;
1304+ border-radius: 0px;
1305+ outline: none;
1306+ color: #222;
1307+ font-size: 16px;
1308+ z-index: 2;
1309+}
1310+#q {
1311+ outline: medium none;
1312+ padding-left: 8px;
1313+ padding-right: 0px !important;
1314+ border-right: none;
1315+ width: 40em;
1316+}
1317+#send_search {
1318+ border-left: none;
1319+ width: 2.2em;
1320+}
1321+#send_search:hover {
1322+ cursor: pointer;
1323+ background-color: #3498DB;
1324+ color: #ECF0F1;
1325+}
1326+.no-js #send_search {
1327+ width: auto !important;
1328+}
1329+.search_filters {
1330+ display: inline-block;
1331+ vertical-align: middle;
1332+}
1333+@media screen and (max-width: 75em) {
1334+ #categories {
1335+ font-size: 90%;
1336+ clear: both;
1337+ }
1338+ #categories .checkbox_container {
1339+ margin-top: 2px;
1340+ margin: auto;
1341+ }
1342+ html.touch #main_index #categories_container,
1343+ html.touch #main_results #categories_container {
1344+ width: 1000px;
1345+ width: -moz-max-content;
1346+ width: -webkit-max-content;
1347+ width: max-content;
1348+ }
1349+ html.touch #main_index #categories_container .category,
1350+ html.touch #main_results #categories_container .category {
1351+ display: inline-block;
1352+ width: auto;
1353+ }
1354+ html.touch #main_index #categories,
1355+ html.touch #main_results #categories {
1356+ width: 100%;
1357+ margin: 0;
1358+ text-align: left;
1359+ overflow-x: scroll;
1360+ overflow-y: hidden;
1361+ -webkit-overflow-scrolling: touch;
1362+ }
1363+}
1364+@media screen and (max-width: 50em) {
1365+ #search {
1366+ width: 100%;
1367+ margin: 0;
1368+ padding: 0.1em 0 0 0;
1369+ }
1370+ #search_wrapper {
1371+ width: 100%;
1372+ margin: 0 0 0.7em 0;
1373+ padding: 0;
1374+ }
1375+ .search_box {
1376+ width: 99%;
1377+ margin: 0.1em;
1378+ padding: 0 0.1em 0 0;
1379+ display: flex;
1380+ flex-direction: row;
1381+ }
1382+ #q {
1383+ width: auto !important;
1384+ flex: 1;
1385+ }
1386+ .search_filters {
1387+ display: block;
1388+ margin: 0.5em;
1389+ }
1390+ .language,
1391+ .time_range {
1392+ width: 45%;
1393+ }
1394+ .category {
1395+ display: block;
1396+ width: 90%;
1397+ }
1398+ .category label {
1399+ border-bottom: 0;
1400+ }
1401+}
1402+#categories {
1403+ margin: 0 10px 0 0;
1404+ -webkit-touch-callout: none;
1405+ -webkit-user-select: none;
1406+ -khtml-user-select: none;
1407+ -moz-user-select: none;
1408+ -ms-user-select: none;
1409+ user-select: none;
1410+}
1411+#categories::-webkit-scrollbar {
1412+ width: 0;
1413+ height: 0;
1414+}
1415+.category {
1416+ display: inline-block;
1417+ position: relative;
1418+ margin: 0 3px;
1419+ padding: 0px;
1420+ /*label:hover {
1421+ border-bottom: 2px solid @color-categories-item-border-unselected-hover;
1422+ }*/
1423+}
1424+.category input {
1425+ display: none;
1426+}
1427+.category label {
1428+ cursor: pointer;
1429+ padding: 4px 10px;
1430+ margin: 0;
1431+ display: block;
1432+ text-transform: capitalize;
1433+ font-size: 0.9em;
1434+ border-bottom: 2px solid transparent;
1435+ -webkit-touch-callout: none;
1436+ -webkit-user-select: none;
1437+ -khtml-user-select: none;
1438+ -moz-user-select: none;
1439+ -ms-user-select: none;
1440+ user-select: none;
1441+}
1442+.category input[type="checkbox"]:focus + label {
1443+ box-shadow: 0px 0px 8px #3498DB;
1444+}
1445+.category input[type="checkbox"]:checked + label {
1446+ background: #3498DB;
1447+ color: #FFF;
1448+ border-bottom: 2px solid #084999;
1449+}
1450+#categories_container {
1451+ position: relative;
1452+}
1453+#categories_container .help {
1454+ position: absolute;
1455+ width: 100%;
1456+ bottom: -20px;
1457+ overflow: hidden;
1458+ opacity: 0;
1459+ transition: opacity 1s ease;
1460+ font-size: 0.8em;
1461+ text-position: center;
1462+ background: white;
1463+}
1464+#categories_container:hover .help {
1465+ opacity: 0.8;
1466+ transition: opacity 1s ease;
1467+}
1468+html {
1469+ font-family: arial, sans-serif;
1470+ font-size: 0.9em;
1471+ -webkit-text-size-adjust: 100%;
1472+ -ms-text-size-adjust: 100%;
1473+ -moz-text-size-adjust: 100%;
1474+ text-size-adjust: 100%;
1475+ color: #444;
1476+ padding: 0;
1477+ margin: 0;
1478+}
1479+body,
1480+main {
1481+ padding: 0;
1482+ margin: 0;
1483+}
1484+main {
1485+ width: 100%;
1486+}
1487+footer {
1488+ bottom: 0;
1489+ width: 100%;
1490+ height: 50px;
1491+}
1492+#main_preferences,
1493+#main_about,
1494+#main_stats {
1495+ margin: 3em;
1496+ width: auto;
1497+}
1498+footer {
1499+ bottom: 0;
1500+ height: 3em;
1501+ margin: 1em 0;
1502+ padding: 1em 0;
1503+ clear: both;
1504+ width: 100%;
1505+ text-align: center;
1506+}
1507+footer p {
1508+ font-size: 0.9em;
1509+}
1510+#main_preferences h1,
1511+#main_stats h1 {
1512+ background: url('../img/searx.png') no-repeat;
1513+ background-size: auto 75%;
1514+ min-height: 40px;
1515+ margin: 0 auto;
1516+}
1517+#main_preferences h1 span,
1518+#main_stats h1 span {
1519+ visibility: hidden;
1520+}
1521+input[type="submit"],
1522+#results button[type="submit"] {
1523+ padding: 0.5rem;
1524+ margin: 2px 4px;
1525+ display: inline-block;
1526+ background: #3498DB;
1527+ color: #FFF;
1528+ -webkit-border-radius: 4px;
1529+ -moz-border-radius: 4px;
1530+ border-radius: 4px;
1531+ border: 0;
1532+ cursor: pointer;
1533+}
1534+a {
1535+ text-decoration: none;
1536+ color: #29314d;
1537+}
1538+a:visited {
1539+ color: #684898;
1540+}
1541+a:visited .highlight {
1542+ color: #684898;
1543+}
1544+article[data-vim-selected] {
1545+ background: #f7f7f7;
1546+}
1547+article[data-vim-selected]::before {
1548+ position: absolute;
1549+ left: 1em;
1550+ padding: 2px;
1551+ content: ">";
1552+ font-weight: bold;
1553+ color: #3498DB;
1554+}
1555+article.result-images[data-vim-selected] {
1556+ background: #3498DB;
1557+}
1558+article.result-images[data-vim-selected]::before {
1559+ display: none;
1560+ content: "";
1561+}
1562+.result {
1563+ margin: 19px 0 18px 0;
1564+ padding: 0;
1565+}
1566+.result h3 {
1567+ font-size: 1.1em;
1568+ word-wrap: break-word;
1569+ margin: 5px 0 1px 0;
1570+ padding: 0;
1571+ margin-bottom: 0;
1572+}
1573+.result h3 a {
1574+ color: #084999;
1575+ font-weight: normal;
1576+ font-size: 1.1em;
1577+}
1578+.result h3 a:visited {
1579+ color: #684898;
1580+}
1581+.result h3 a:focus,
1582+.result h3 a:hover {
1583+ text-decoration: underline;
1584+ border: none;
1585+ -webkit-box-shadow: none;
1586+ box-shadow: none;
1587+ outline: none;
1588+}
1589+.result .cache_link,
1590+.result .proxyfied_link {
1591+ font-size: 0.9em !important;
1592+}
1593+.result .content,
1594+.result .stat,
1595+.result .altlink {
1596+ font-size: 0.9em;
1597+ margin: 0;
1598+ padding: 0;
1599+ max-width: 54em;
1600+ word-wrap: break-word;
1601+ line-height: 1.24;
1602+}
1603+.result .content .highlight,
1604+.result .stat .highlight,
1605+.result .altlink .highlight {
1606+ color: #000000;
1607+ background: inherit;
1608+ font-weight: bold;
1609+}
1610+.result .codelines .highlight {
1611+ color: inherit;
1612+ background: inherit;
1613+ font-weight: normal;
1614+}
1615+.result .url {
1616+ font-size: 0.9em;
1617+ margin: 0 0 3px 0;
1618+ padding: 0;
1619+ max-width: 54em;
1620+ word-wrap: break-word;
1621+ color: #25a55b;
1622+}
1623+.result .published_date {
1624+ font-size: 0.8em;
1625+ color: #888;
1626+}
1627+.result img.thumbnail {
1628+ float: left;
1629+ padding: 0 5px 10px 0;
1630+ width: 20em;
1631+ min-width: 20em;
1632+ min-height: 8em;
1633+}
1634+.result img.image {
1635+ float: left;
1636+ padding: 0 5px 10px 0;
1637+ width: 100px;
1638+ max-height: 100px;
1639+ object-fit: scale-down;
1640+ object-position: right top;
1641+}
1642+.result .break {
1643+ clear: both;
1644+}
1645+.category-social .image {
1646+ width: auto !important;
1647+ min-width: 48px;
1648+ min-height: 48px;
1649+ padding: 0 5px 25px 0 !important;
1650+}
1651+.result-videos .content {
1652+ overflow: hidden;
1653+}
1654+.engines {
1655+ float: right;
1656+ color: #888;
1657+}
1658+.engines span {
1659+ font-size: smaller;
1660+ margin: 0 0.5em 0 0;
1661+}
1662+.small_font {
1663+ font-size: 0.8em;
1664+}
1665+.highlight {
1666+ color: #094089;
1667+ background: inherit;
1668+ font-weight: bold;
1669+}
1670+.result-images {
1671+ display: inline-block;
1672+ margin: 0;
1673+ padding: 0;
1674+ position: relative;
1675+ max-height: 200px;
1676+}
1677+.result-images img {
1678+ float: inherit;
1679+ margin: 0;
1680+ padding: 0;
1681+ border: none;
1682+ max-height: 200px;
1683+ background: #084999;
1684+}
1685+.result-images span a {
1686+ display: none;
1687+ color: #FFF;
1688+}
1689+.result-images:hover span a {
1690+ display: block;
1691+ position: absolute;
1692+ bottom: 0;
1693+ right: 0;
1694+ padding: 4px;
1695+ margin: 0 0 4px 4px;
1696+ background-color: rgba(0, 0, 0, 0.6);
1697+ font-size: 0.7em;
1698+}
1699+.torrent_result {
1700+ border-left: 10px solid lightgray;
1701+ padding-left: 3px;
1702+}
1703+.torrent_result p {
1704+ margin: 3px;
1705+ font-size: 0.8em;
1706+}
1707+.torrent_result a {
1708+ color: #084999;
1709+}
1710+.torrent_result a:hover {
1711+ text-decoration: underline;
1712+}
1713+.torrent_result a:visited {
1714+ color: #684898;
1715+}
1716+#results {
1717+ margin: 2em 2em 20px 2em;
1718+ padding: 0;
1719+ width: 50em;
1720+}
1721+#suggestions .wrapper {
1722+ display: flex;
1723+ flex-flow: row wrap;
1724+ justify-content: flex-end;
1725+}
1726+#suggestions .wrapper form {
1727+ display: inline-block;
1728+ flex: 1 1 50%;
1729+}
1730+#suggestions,
1731+#answers,
1732+#corrections {
1733+ max-width: 50em;
1734+}
1735+#suggestions input,
1736+#answers input,
1737+#infoboxes input,
1738+#corrections input {
1739+ padding: 0;
1740+ margin: 3px;
1741+ font-size: 0.9em;
1742+ display: inline-block;
1743+ background: transparent;
1744+ color: #444;
1745+ cursor: pointer;
1746+}
1747+#suggestions input[type="submit"],
1748+#answers input[type="submit"],
1749+#infoboxes input[type="submit"],
1750+#corrections input[type="submit"],
1751+#suggestions .infobox .url a,
1752+#answers .infobox .url a,
1753+#infoboxes .infobox .url a,
1754+#corrections .infobox .url a {
1755+ color: #084999;
1756+ text-decoration: none;
1757+ font-size: 0.9rem;
1758+}
1759+#suggestions input[type="submit"]:hover,
1760+#answers input[type="submit"]:hover,
1761+#infoboxes input[type="submit"]:hover,
1762+#corrections input[type="submit"]:hover,
1763+#suggestions .infobox .url a:hover,
1764+#answers .infobox .url a:hover,
1765+#infoboxes .infobox .url a:hover,
1766+#corrections .infobox .url a:hover {
1767+ text-decoration: underline;
1768+}
1769+#corrections {
1770+ display: flex;
1771+ flex-flow: row wrap;
1772+ margin: 1em 0;
1773+}
1774+#corrections h4,
1775+#corrections input[type="submit"] {
1776+ display: inline-block;
1777+ margin: 0 0.5em 0 0;
1778+}
1779+#corrections input[type="submit"]::after {
1780+ content: ", ";
1781+}
1782+#suggestions .title,
1783+#search_url .title,
1784+#apis .title {
1785+ margin: 2em 0 0.5em 0;
1786+ color: #444;
1787+}
1788+#answers {
1789+ margin: 10px 8px 10px 8px;
1790+ border: 1px solid #ddd;
1791+ padding: 0.9em;
1792+ box-shadow: 0px 0px 5px #CCC;
1793+}
1794+#answers h4 {
1795+ display: none;
1796+}
1797+#answers .answer {
1798+ display: block;
1799+ font-size: 1.2em;
1800+ font-weight: bold;
1801+}
1802+#answers form,
1803+#infoboxes form {
1804+ min-width: 210px;
1805+}
1806+#sidebar {
1807+ position: absolute;
1808+ top: 100px;
1809+ left: 57em;
1810+ margin: 0px 2px 5px 5px;
1811+ padding: 0px 2px 2px;
1812+ max-width: 25em;
1813+ word-wrap: break-word;
1814+}
1815+#sidebar .infobox {
1816+ margin: 10px 0 10px;
1817+ border: 1px solid #ddd;
1818+ padding: 0.9em;
1819+ font-size: 0.9em;
1820+ box-shadow: 0px 0px 5px #CCC;
1821+}
1822+#sidebar .infobox h2 {
1823+ margin: 0 0 .5em 0;
1824+}
1825+#sidebar .infobox img {
1826+ max-width: 100%;
1827+ max-height: 12em;
1828+ display: block;
1829+ margin: 0;
1830+ padding: 0;
1831+}
1832+#sidebar .infobox dl {
1833+ margin: 0.5em 0;
1834+}
1835+#sidebar .infobox dt {
1836+ display: inline;
1837+ margin: 0.5em 0.25em 0.5em 0;
1838+ padding: 0;
1839+ font-weight: bold;
1840+}
1841+#sidebar .infobox dd {
1842+ display: inline;
1843+ margin: 0.5em 0;
1844+ padding: 0;
1845+}
1846+#sidebar .infobox input {
1847+ font-size: 1em;
1848+}
1849+#sidebar .infobox br {
1850+ clear: both;
1851+}
1852+#sidebar .infobox .attributes,
1853+#sidebar .infobox .urls {
1854+ clear: both;
1855+}
1856+#search_url {
1857+ margin-top: 8px;
1858+}
1859+#search_url div {
1860+ border: 1px solid #888;
1861+ padding: 4px;
1862+ color: #444;
1863+ width: 100%;
1864+ display: block;
1865+ margin: 0.1em;
1866+ overflow: hidden;
1867+ height: 1.2em;
1868+ line-height: 1.2em;
1869+}
1870+#search_url div pre {
1871+ display: block;
1872+ width: 200em;
1873+ font-size: 0.8em;
1874+ word-break: break-all;
1875+ margin: 0.1em;
1876+ -webkit-user-select: all;
1877+ -moz-user-select: all;
1878+ -ms-user-select: all;
1879+ user-select: all;
1880+}
1881+#linkto_preferences {
1882+ position: absolute;
1883+ right: 10px;
1884+ top: 0.9em;
1885+ padding: 0;
1886+ border: 0;
1887+ display: block;
1888+ font-size: 1.2em;
1889+ color: #222;
1890+}
1891+#linkto_preferences a:link *,
1892+#linkto_preferences a:hover *,
1893+#linkto_preferences a:visited *,
1894+#linkto_preferences a:active * {
1895+ color: #222;
1896+}
1897+#pagination {
1898+ clear: both;
1899+}
1900+#pagination br {
1901+ clear: both;
1902+}
1903+#apis {
1904+ margin-top: 8px;
1905+ clear: both;
1906+}
1907+#backToTop {
1908+ border: 1px solid #ddd;
1909+ margin: 0 0 0 2em;
1910+ padding: 0;
1911+ font-size: 1em;
1912+ box-shadow: 0px 0px 5px #CCC;
1913+ background: white;
1914+ position: fixed;
1915+ bottom: 85px;
1916+ left: 50em;
1917+ transition: opacity 0.5s;
1918+ opacity: 0;
1919+}
1920+#backToTop a {
1921+ display: block;
1922+ margin: 0;
1923+ padding: 0.6em;
1924+}
1925+@media screen and (max-width: 75em) {
1926+ #main_preferences,
1927+ #main_about,
1928+ #main_stats {
1929+ margin: 0.5em;
1930+ width: auto;
1931+ }
1932+ #suggestions,
1933+ #answers {
1934+ margin-top: 1em;
1935+ }
1936+ #infoboxes {
1937+ position: inherit;
1938+ max-width: inherit;
1939+ }
1940+ #infoboxes .infobox {
1941+ clear: both;
1942+ }
1943+ #infoboxes .infobox img {
1944+ float: left;
1945+ max-width: 10em;
1946+ margin: 0.5em 0.5em 0.5em 0;
1947+ }
1948+ #sidebar {
1949+ position: static;
1950+ max-width: 50em;
1951+ margin: 0 0 2px 0;
1952+ padding: 0;
1953+ float: none;
1954+ border: none;
1955+ width: auto;
1956+ }
1957+ #sidebar input {
1958+ border: 0;
1959+ }
1960+ #apis {
1961+ display: none;
1962+ }
1963+ #search_url {
1964+ display: none;
1965+ }
1966+ .result {
1967+ border-bottom: 1px solid #E8E7E6;
1968+ margin: 0;
1969+ padding-top: 8px;
1970+ padding-bottom: 6px;
1971+ }
1972+ .result h3 {
1973+ margin: 0 0 1px 0;
1974+ }
1975+ .result .thumbnail {
1976+ max-width: 98%;
1977+ }
1978+ .result .url span.url {
1979+ display: block;
1980+ white-space: nowrap;
1981+ text-overflow: ellipsis;
1982+ overflow: hidden;
1983+ width: 100%;
1984+ }
1985+ .result .url a {
1986+ float: right;
1987+ padding: 0 0.5em;
1988+ }
1989+ .result .engines {
1990+ float: right;
1991+ padding: 0 0 3px 0;
1992+ }
1993+ .result-images {
1994+ border-bottom: none !important;
1995+ }
1996+ .image_result {
1997+ max-width: 98%;
1998+ }
1999+ .image_result img {
2000+ max-width: 98%;
2001+ }
2002+}
2003+@media screen and (max-width: 50em) {
2004+ article[data-vim-selected]::before {
2005+ display: none;
2006+ content: "";
2007+ }
2008+ #linkto_preferences {
2009+ display: none;
2010+ postion: fixed !important;
2011+ top: 100px;
2012+ right: 0px;
2013+ }
2014+ #sidebar {
2015+ margin: 0 5px 2px 5px;
2016+ }
2017+ #corrections {
2018+ margin: 1em 5px 1em 5px;
2019+ }
2020+ #results {
2021+ margin: 0;
2022+ padding: 0;
2023+ width: initial;
2024+ }
2025+ #backToTop {
2026+ left: 40em;
2027+ bottom: 35px;
2028+ }
2029+ .result {
2030+ padding: 8px 10px 6px 10px;
2031+ }
2032+ .result-images {
2033+ margin: 0;
2034+ padding: 0;
2035+ border: none;
2036+ }
2037+}
2038+@media screen and (max-width: 35em) {
2039+ .result-videos img.thumbnail {
2040+ float: none !important;
2041+ }
2042+ .result-videos .content {
2043+ overflow: inherit;
2044+ }
2045+}
searx/static/themes/simple/css/searx.min.cssnew file+1
@@ -0,0 +1 @@
1+/*! searx | 06-08-2017 | https://github.com/asciimoo/searx *//*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */button,hr,input{overflow:visible}audio,canvas,progress,video{display:inline-block}[type=checkbox],[type=radio],legend{padding:0;box-sizing:border-box}.badge,.center{text-align:center}.badge,progress,sub,sup{vertical-align:baseline}#q,#send_search,.tabs>section,legend{box-sizing:border-box}#apis,#pagination,#pagination br,#sidebar .infobox .attributes,#sidebar .infobox .urls,#sidebar .infobox br,.result .break,footer{clear:both}html{line-height:1.15}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}.highlight pre,textarea{overflow:auto}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=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-cancel-button,[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-warning:before,.ion-icon-big:before,.ion-icon:before{font-family:ion}summary{display:list-item}.invisible,[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}.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}#categories,.tabs>label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-touch-callout:none;-khtml-user-select:none}.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}.danger{background-color:#fae1e1}.badge{display:inline-block;color:#fff;background-color:#777;min-width:10px;padding:1px 5px;border-radius:5px}table{width:100%}table.striped tr{border-bottom:1px solid #ececec}th{padding:.4em}td{padding:0 4px}.dialog-error,.dialog-warning{width:70%;padding:1em 1em 1em 2.7em;text-align:left}tr:hover{background:#ececec}.dialog-error{position:relative;margin:0 8% 1em;border:1px solid #db3434;border-radius:4px;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-warning{position:relative;margin:0 8% 1em;border:1px solid #dbba34;border-radius:4px;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}.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{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{border-bottom:2px solid #084999;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}}#main_preferences form,.index .title,footer,main{width:100%}.autocomplete{position:absolute;max-height:0;overflow-y:hidden;text-align:left}#categories_container,#q,#send_search,.category{position:relative}.autocomplete:active,.autocomplete:focus,.autocomplete:hover{background-color:#fff}.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: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){.tabs>label{width:100%}.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?94af7082ea096aefe3a7b6642834716e);src:url(../fonts/ion.eot?#iefix) format("embedded-opentype"),url(../fonts/ion.woff2?94af7082ea096aefe3a7b6642834716e) format("woff2"),url(../fonts/ion.woff?94af7082ea096aefe3a7b6642834716e) format("woff"),url(../fonts/ion.ttf?94af7082ea096aefe3a7b6642834716e) format("truetype"),url(../fonts/ion.svg?94af7082ea096aefe3a7b6642834716e#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-icon-big{font-size:149%}.index .title{background:url(../img/searx.png) center no-repeat;min-height:80px}.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}.preferences_back{clear:both}}#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 .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}#q,#send_search{display:block!important;border-collapse:separate;margin:0;padding:2px;height:2.2em;background:#FFF;border:1px solid #3498DB;border-radius:0;outline:0;color:#222;font-size:16px;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;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: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}}#search_url div,.result-videos .content{overflow:hidden}@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}#main_preferences h1 span,#main_stats h1 span{visibility:hidden}#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}.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{border:1px solid #888;padding:4px;color:#444;width:100%;display:block;margin:.1em;height:1.2em;line-height:1.2em}#search_url div pre{display:block;width:200em;font-size:.8em;word-break:break-all;margin:.1em;-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all}#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}}@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}}
searx/static/themes/simple/fonts/ion.cssnew file+134
@@ -0,0 +1,134 @@
1+/* Generated by grunt-webfont */
2+
3+
4+@font-face {
5+ font-family:"ion";
6+ src:url("../fonts/ion.eot?94af7082ea096aefe3a7b6642834716e");
7+ src:url("../fonts/ion.eot?#iefix") format("embedded-opentype"),
8+ url("../fonts/ion.woff2?94af7082ea096aefe3a7b6642834716e") format("woff2"),
9+ url("../fonts/ion.woff?94af7082ea096aefe3a7b6642834716e") format("woff"),
10+ url("../fonts/ion.ttf?94af7082ea096aefe3a7b6642834716e") format("truetype"),
11+ url("../fonts/ion.svg?94af7082ea096aefe3a7b6642834716e#ion") format("svg");
12+ font-weight:normal;
13+ font-style:normal;
14+}
15+
16+.ion-icon {
17+
18+ font-family:"ion";
19+
20+ display:inline-block;
21+ vertical-align:middle;
22+ line-height:1;
23+ font-weight:normal;
24+ font-style:normal;
25+ speak:none;
26+ text-decoration:inherit;
27+ text-transform:none;
28+ text-rendering:auto;
29+ -webkit-font-smoothing:antialiased;
30+ -moz-osx-font-smoothing:grayscale;
31+}
32+
33+
34+/* Icons */
35+
36+
37+.ion-navicon-round:before {
38+ content:"\f101";
39+}
40+
41+
42+.ion-search:before {
43+ content:"\f102";
44+}
45+
46+
47+.ion-play:before {
48+ content:"\f103";
49+}
50+
51+
52+.ion-link:before {
53+ content:"\f104";
54+}
55+
56+
57+.ion-chevron-up:before {
58+ content:"\f105";
59+}
60+
61+
62+.ion-chevron-left:before {
63+ content:"\f106";
64+}
65+
66+
67+.ion-chevron-right:before {
68+ content:"\f107";
69+}
70+
71+
72+.ion-arrow-down-a:before {
73+ content:"\f108";
74+}
75+
76+
77+.ion-arrow-up-a:before {
78+ content:"\f109";
79+}
80+
81+
82+.ion-arrow-swap:before {
83+ content:"\f10a";
84+}
85+
86+
87+.ion-arrow-dropdown:before {
88+ content:"\f10b";
89+}
90+
91+
92+.ion-globe:before {
93+ content:"\f10c";
94+}
95+
96+
97+.ion-time:before {
98+ content:"\f10d";
99+}
100+
101+
102+.ion-location:before {
103+ content:"\f10e";
104+}
105+
106+
107+.ion-warning:before {
108+ content:"\f10f";
109+}
110+
111+
112+.ion-error:before {
113+ content:"\f110";
114+}
115+
116+
117+.ion-film-outline:before {
118+ content:"\f111";
119+}
120+
121+
122+.ion-music-note:before {
123+ content:"\f112";
124+}
125+
126+
127+.ion-more-vertical:before {
128+ content:"\f113";
129+}
130+
131+
132+.ion-magnet:before {
133+ content:"\f114";
134+}
searx/static/themes/simple/fonts/ion.eotnew file

Binary file not shown.

searx/static/themes/simple/fonts/ion.htmlnew file+261
@@ -0,0 +1,261 @@
1+<!doctype html>
2+<html>
3+ <head>
4+ <meta charset="utf-8">
5+ <title>ion</title>
6+ <style>
7+ body {
8+ margin:0;
9+ padding:10px 20px;
10+ background:#fff;
11+ color:#222;
12+ }
13+ h1, div, footer {
14+ font-family:"Helvetica Neue", Arial, sans-serif;
15+ }
16+ h1 {
17+ margin:0 0 20px;
18+ font-size:32px;
19+ font-weight:normal;
20+ }
21+ h1 small {
22+ font-size: 0.8em;
23+ padding-left: 2em;
24+ }
25+ .icons {
26+ margin-bottom:40px;
27+ -webkit-column-count:5;
28+ -moz-column-count:5;
29+ column-count:5;
30+ -webkit-column-gap:20px;
31+ -moz-column-gap:20px;
32+ column-gap:20px;
33+ }
34+ .icons__item,
35+ .icons__item i {
36+ line-height:2em;
37+ cursor:pointer;
38+ overflow:hidden;
39+ }
40+ .icons__item:hover {
41+ color:#3c90be;
42+ }
43+ .icons__item i {
44+ display:inline-block;
45+ width:32px;
46+ text-align:center;
47+ }
48+ .icons__item:hover i {
49+ -webkit-transform:scale(1.5);
50+ transform:scale(1.5);
51+ }
52+ footer {
53+ margin-top:40px;
54+ font-size:14px;
55+ color:#999;
56+ }
57+
58+ /* Generated by grunt-webfont */
59+
60+
61+@font-face {
62+ font-family:"ion";
63+ src:url("ion.eot?94af7082ea096aefe3a7b6642834716e");
64+ src:url("ion.eot?#iefix") format("embedded-opentype"),
65+ url("ion.woff2?94af7082ea096aefe3a7b6642834716e") format("woff2"),
66+ url("ion.woff?94af7082ea096aefe3a7b6642834716e") format("woff"),
67+ url("ion.ttf?94af7082ea096aefe3a7b6642834716e") format("truetype"),
68+ url("ion.svg?94af7082ea096aefe3a7b6642834716e#ion") format("svg");
69+ font-weight:normal;
70+ font-style:normal;
71+}
72+
73+.ion-icon {
74+
75+ font-family:"ion";
76+
77+ display:inline-block;
78+ vertical-align:middle;
79+ line-height:1;
80+ font-weight:normal;
81+ font-style:normal;
82+ speak:none;
83+ text-decoration:inherit;
84+ text-transform:none;
85+ text-rendering:auto;
86+ -webkit-font-smoothing:antialiased;
87+ -moz-osx-font-smoothing:grayscale;
88+}
89+
90+
91+/* Icons */
92+
93+
94+.ion-navicon-round:before {
95+ content:"\f101";
96+}
97+
98+
99+.ion-search:before {
100+ content:"\f102";
101+}
102+
103+
104+.ion-play:before {
105+ content:"\f103";
106+}
107+
108+
109+.ion-link:before {
110+ content:"\f104";
111+}
112+
113+
114+.ion-chevron-up:before {
115+ content:"\f105";
116+}
117+
118+
119+.ion-chevron-left:before {
120+ content:"\f106";
121+}
122+
123+
124+.ion-chevron-right:before {
125+ content:"\f107";
126+}
127+
128+
129+.ion-arrow-down-a:before {
130+ content:"\f108";
131+}
132+
133+
134+.ion-arrow-up-a:before {
135+ content:"\f109";
136+}
137+
138+
139+.ion-arrow-swap:before {
140+ content:"\f10a";
141+}
142+
143+
144+.ion-arrow-dropdown:before {
145+ content:"\f10b";
146+}
147+
148+
149+.ion-globe:before {
150+ content:"\f10c";
151+}
152+
153+
154+.ion-time:before {
155+ content:"\f10d";
156+}
157+
158+
159+.ion-location:before {
160+ content:"\f10e";
161+}
162+
163+
164+.ion-warning:before {
165+ content:"\f10f";
166+}
167+
168+
169+.ion-error:before {
170+ content:"\f110";
171+}
172+
173+
174+.ion-film-outline:before {
175+ content:"\f111";
176+}
177+
178+
179+.ion-music-note:before {
180+ content:"\f112";
181+}
182+
183+
184+.ion-more-vertical:before {
185+ content:"\f113";
186+}
187+
188+
189+.ion-magnet:before {
190+ content:"\f114";
191+}
192+
193+ </style>
194+ </head>
195+ <body>
196+ <h1>ion</h1>
197+
198+ <div class="icons" id="icons">
199+
200+ <div class="icons__item" data-name="navicon-round"><i class="ion-icon ion-navicon-round"></i> ion-navicon-round</div>
201+
202+ <div class="icons__item" data-name="search"><i class="ion-icon ion-search"></i> ion-search</div>
203+
204+ <div class="icons__item" data-name="play"><i class="ion-icon ion-play"></i> ion-play</div>
205+
206+ <div class="icons__item" data-name="link"><i class="ion-icon ion-link"></i> ion-link</div>
207+
208+ <div class="icons__item" data-name="chevron-up"><i class="ion-icon ion-chevron-up"></i> ion-chevron-up</div>
209+
210+ <div class="icons__item" data-name="chevron-left"><i class="ion-icon ion-chevron-left"></i> ion-chevron-left</div>
211+
212+ <div class="icons__item" data-name="chevron-right"><i class="ion-icon ion-chevron-right"></i> ion-chevron-right</div>
213+
214+ <div class="icons__item" data-name="arrow-down-a"><i class="ion-icon ion-arrow-down-a"></i> ion-arrow-down-a</div>
215+
216+ <div class="icons__item" data-name="arrow-up-a"><i class="ion-icon ion-arrow-up-a"></i> ion-arrow-up-a</div>
217+
218+ <div class="icons__item" data-name="arrow-swap"><i class="ion-icon ion-arrow-swap"></i> ion-arrow-swap</div>
219+
220+ <div class="icons__item" data-name="arrow-dropdown"><i class="ion-icon ion-arrow-dropdown"></i> ion-arrow-dropdown</div>
221+
222+ <div class="icons__item" data-name="globe"><i class="ion-icon ion-globe"></i> ion-globe</div>
223+
224+ <div class="icons__item" data-name="time"><i class="ion-icon ion-time"></i> ion-time</div>
225+
226+ <div class="icons__item" data-name="location"><i class="ion-icon ion-location"></i> ion-location</div>
227+
228+ <div class="icons__item" data-name="warning"><i class="ion-icon ion-warning"></i> ion-warning</div>
229+
230+ <div class="icons__item" data-name="error"><i class="ion-icon ion-error"></i> ion-error</div>
231+
232+ <div class="icons__item" data-name="film-outline"><i class="ion-icon ion-film-outline"></i> ion-film-outline</div>
233+
234+ <div class="icons__item" data-name="music-note"><i class="ion-icon ion-music-note"></i> ion-music-note</div>
235+
236+ <div class="icons__item" data-name="more-vertical"><i class="ion-icon ion-more-vertical"></i> ion-more-vertical</div>
237+
238+ <div class="icons__item" data-name="magnet"><i class="ion-icon ion-magnet"></i> ion-magnet</div>
239+
240+ </div>
241+
242+
243+
244+ <h1>Usage</h1>
245+ <pre><code>&lt;i class=&quot;ion-icon ion-<span id="name">name</span>&quot;&gt;&lt;/i&gt;</code></pre>
246+
247+
248+ <footer>Generated by <a href="https://github.com/sapegin/grunt-webfont">grunt-webfont</a>.</footer>
249+
250+ <script>
251+ (function() {
252+ document.getElementById('icons').onclick = function(e) {
253+ e = e || window.event;
254+ var name = e.target.getAttribute('data-name') || e.target.parentNode.getAttribute('data-name');
255+ document.getElementById('name').innerHTML = name;
256+
257+ }
258+ })();
259+ </script>
260+ </body>
261+</html>
searx/static/themes/simple/fonts/ion.svgnew file+97
@@ -0,0 +1,97 @@
1+<?xml version="1.0" standalone="no"?>
2+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3+<!--
4+2017-5-26: Created.
5+-->
6+<svg xmlns="http://www.w3.org/2000/svg">
7+<metadata>
8+Created by FontForge 20120731 at Fri May 26 22:22:55 2017
9+ By alexandre,,,
10+
11+</metadata>
12+<defs>
13+<font id="ion" horiz-adv-x="512" >
14+ <font-face
15+ font-family="ion"
16+ font-weight="500"
17+ font-stretch="normal"
18+ units-per-em="512"
19+ panose-1="2 0 6 9 0 0 0 0 0 0"
20+ ascent="448"
21+ descent="-64"
22+ bbox="31.9799 -31.9632 479.993 415.9"
23+ underline-thickness="25.6"
24+ underline-position="-51.2"
25+ unicode-range="U+F101-F114"
26+ />
27+ <missing-glyph />
28+ <glyph glyph-name="arrow-down-a" unicode="&#xf108;"
29+d="M256.5 -0.5l-192 192h112v192h160v-192h112z" />
30+ <glyph glyph-name="arrow-dropdown" unicode="&#xf10b;"
31+d="M128 256h256l-128 -128z" />
32+ <glyph glyph-name="arrow-swap" unicode="&#xf10a;"
33+d="M64 120c0 4.40039 3.59961 7.99999 8 7.99999h248v64l128 -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" />
34+ <glyph glyph-name="arrow-up-a" unicode="&#xf109;"
35+d="M256.5 383.5l192 -192h-112v-192h-160v192h-112z" />
36+ <glyph glyph-name="chevron-left" unicode="&#xf106;"
37+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.200191l-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
38+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" />
39+ <glyph glyph-name="chevron-right" unicode="&#xf107;"
40+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
41+c-4.2002 -4.29981 -11.2002 -4.2002 -15.5 0.200191l-29.9004 30.5996c-4.2998 4.40039 -4.39941 11.5 -0.200195 15.7998z" />
42+ <glyph glyph-name="chevron-up" unicode="&#xf105;"
43+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
44+c4.2998 -4.2002 4.20016 -11.2002 -0.200226 -15.5l-30.5996 -29.9004c-4.40039 -4.2998 -11.5 -4.39941 -15.7998 -0.200195l-174.2 167.2v0v0z" />
45+ <glyph glyph-name="error" unicode="&#xf110;"
46+d="M256 400c114.4 0 208 -93.6006 208 -208c0 -114.399 -93.5996 -208 -208 -208s-208 93.6006 -208 208c0 114.399 93.5996 208 208 208zM280 88v40h-48v-40h48zM280 176v128h-48v-128h48z" />
47+ <glyph glyph-name="film-outline" unicode="&#xf111;"
48+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
49+h-56v-48h56zM440 232v48h-56v-48h56zM440 296v48h-56v-48h56z" />
50+ <glyph glyph-name="globe" unicode="&#xf10c;"
51+d="M256 400c114.875 0 208 -93.125 208 -208c0 -114.875 -93.125 -208 -208 -208c-114.876 0 -208 93.125 -208 208c0 114.875 93.124 208 208 208zM234.451 15.001c6.04297 15.0449 19.9453 28.6484 7.27342 39.1172c-8.17285 6.75 -15.6123 13.6279 -23.1104 21.125
52+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.3223 33.4941c-7.11621 5.45508 -17.4355 10.0986 -20.0186 18.9521
53+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
54+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
55+c-2.87988 15.624 -19.2803 31.5 -26.6729 46.3018c-6.92188 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
56+v-8.33887l3.55273 -9.27734l-13.7793 -12.9951l-8.6748 2.79492l-9.92383 10.2334l-9.94434 11.8008l-14.084 5.66016c-15.7227 -2.36133 -30.9336 -6.78711 -45.3096 -13.1523c0.360352 -2.30762 0.662109 -4.64453 0.662109 -7.13281
57+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.317383 -2.33984 6.50586 -6.06348 6.45117 -9.69141
58+c-0.0878906 -5.74609 -0.173828 -11.4912 -0.259766 -17.2373c3.24414 2.76172 20.0332 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
59+c-8.39941 -7.94434 -24.8086 -12.5137 -19.8037 -24.2285c1.62695 -3.80957 10.0498 -20.0156 5.21191 -24.0586c-5.92188 -4.94824 -14.7686 8.97656 -17.3418 12.0938c-8.1543 9.87695 -25.626 6.02539 -37.9082 6.47852c0 -17.4209 -0.757812 -31.1885 14.9219 -42.9971
60+c15.1953 -11.4434 29.5977 -24.7061 47.0781 -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
61+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" />
62+ <glyph glyph-name="link" unicode="&#xf104;"
63+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
64+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
65+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" />
66+ <glyph glyph-name="location" unicode="&#xf10e;"
67+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
68+c-31.0996 0 -56.4004 -25.5 -56.4004 -56.7998s25.2002 -56.7002 56.4004 -56.7002z" />
69+ <glyph glyph-name="magnet" unicode="&#xf114;"
70+d="M270.208 177.19h0.0126953v87.8721c0.345703 4.8125 -3.85254 22.8994 -14.0674 35.1738c-10.4697 12.5312 -23.6543 22.3496 -51.3662 22.7588c-27.7246 -0.396484 -40.8955 -10.2275 -51.3789 -22.7588c-10.1895 -12.2744 -14.4131 -30.3486 -14.0674 -35.1738
71+v-87.8848h-64v87.8848c0.371094 21.8369 7.83398 48.7422 27.8271 74.7773c19.6865 25.7666 55.2188 47.6035 101.645 47.207c46.3877 0.421875 81.9199 -21.415 101.619 -47.1943c19.9941 -26.0352 27.4434 -52.9277 27.8018 -74.7646v-87.8975h-64.0254zM334.233 99.3789
72+h0.0253906l-64.0508 -0.0126953v65.0244h64.0254v-65.0117zM75.3408 99.3662v65.0244h64v-65.0244h-64z" />
73+ <glyph glyph-name="more-vertical" unicode="&#xf113;"
74+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
75+s17.998 40 40 40s40 -17.998 40 -40z" />
76+ <glyph glyph-name="music-note" unicode="&#xf112;"
77+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
78+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.0996103 -0.399414 -0.200196c-9.40039 -10.5996 -23 -17.5 -38.2998 -17.5h-36.2002
79+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" />
80+ <glyph glyph-name="navicon-round" unicode="&#xf101;"
81+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
82+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" />
83+ <glyph glyph-name="play" unicode="&#xf103;"
84+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.09962 -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
85+c4 0 7.49999 -1.2002 10.8994 -3.2002z" />
86+ <glyph glyph-name="search" unicode="&#xf102;"
87+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
88+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
89+c53.4004 0 96.8008 43.5 96.8008 97s-43.4004 97 -96.8008 97z" />
90+ <glyph glyph-name="time" unicode="&#xf10d;"
91+d="M256 405c117.149 0 213 -95.8506 213 -213c0 -117.149 -94.7891 -213 -213 -213s-213 95.8506 -213 213c0 117.149 94.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.4
92+s76.6826 -170.4 170.4 -170.4zM266.65 298.5v-111.824l95.8496 -56.4434l-15.9746 -26.625l-111.825 67.0928v127.8h31.9502z" />
93+ <glyph glyph-name="warning" unicode="&#xf10f;"
94+d="M476.7 25.7998c2.7998 -4.89941 4.7998 -13 1.7998 -17.8994c-2.90039 -4.90039 -8.20016 -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.1992 8.7002 14.0996 8.7002
95+c5.7998 0 11.2002 -3.7002 14.0996 -8.7002zM288 48v48h-64v-48h64zM288 128v144h-64v-144h64z" />
96+ </font>
97+</defs></svg>
searx/static/themes/simple/fonts/ion.ttfnew file

Binary file not shown.

searx/static/themes/simple/fonts/ion.woffnew file

Binary file not shown.

searx/static/themes/simple/fonts/ion.woff2new file

Binary file not shown.

searx/static/themes/simple/gruntfile.jsnew file+150
@@ -0,0 +1,150 @@
1+module.exports = function(grunt) {
2+
3+ const path = require('path');
4+
5+ grunt.initConfig({
6+ pkg: grunt.file.readJSON('package.json'),
7+ watch: {
8+ scripts: {
9+ files: ['<%= jshint.files %>', 'less/*.less'],
10+ tasks: ['jshint', 'concat', 'uglify', 'webfont', 'less:development', 'less:production']
11+ }
12+ },
13+ concat: {
14+ options: {
15+ separator: ';'
16+ },
17+ dist: {
18+ src: ['js/searx_src/*.js'],
19+ dest: 'js/searx.js'
20+ }
21+ },
22+ uglify: {
23+ options: {
24+ banner: '/*! simple/searx.min.js | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n',
25+ preserveComments: 'some',
26+ sourceMap: true
27+ },
28+ dist: {
29+ files: {
30+ 'js/searx.min.js': ['<%= concat.dist.dest %>']
31+ }
32+ }
33+ },
34+ jshint: {
35+ files: ['js/searx_src/*.js'],
36+ options: {
37+ proto: true,
38+ // options here to override JSHint defaults
39+ globals: {
40+ browser: true,
41+ jQuery: false,
42+ devel: true
43+ }
44+ }
45+ },
46+ less: {
47+ development: {
48+ options: {
49+ paths: ["less"],
50+ banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n'
51+ },
52+ files: {
53+ "css/searx.css": "less/style.less",
54+ "css/searx-rtl.css": "less/style-rtl.less"
55+ }
56+ },
57+ production: {
58+ options: {
59+ paths: ["less"],
60+ plugins: [
61+ new (require('less-plugin-clean-css'))({
62+ advanced: true,
63+ compatibility: 'ie8'
64+ })
65+ ],
66+ banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n'
67+ },
68+ files: {
69+ "css/searx.min.css": "less/style.less",
70+ "css/searx-rtl.min.css": "less/style-rtl.less"
71+ }
72+ },
73+ },
74+ webfont: {
75+ icons: {
76+ // src: 'node_modules/ionicons-npm/src/*.svg',
77+ src: [
78+ 'node_modules/ionicons-npm/src/navicon-round.svg',
79+ 'node_modules/ionicons-npm/src/search.svg',
80+ 'node_modules/ionicons-npm/src/play.svg',
81+ 'node_modules/ionicons-npm/src/link.svg',
82+ 'node_modules/ionicons-npm/src/chevron-up.svg',
83+ 'node_modules/ionicons-npm/src/chevron-left.svg',
84+ 'node_modules/ionicons-npm/src/chevron-right.svg',
85+ 'node_modules/ionicons-npm/src/arrow-down-a.svg',
86+ 'node_modules/ionicons-npm/src/arrow-up-a.svg',
87+ 'node_modules/ionicons-npm/src/arrow-swap.svg',
88+ 'node_modules/ionicons-npm/src/telephone.svg',
89+ 'node_modules/ionicons-npm/src/android-arrow-dropdown.svg',
90+ 'node_modules/ionicons-npm/src/android-globe.svg',
91+ 'node_modules/ionicons-npm/src/android-time.svg',
92+ 'node_modules/ionicons-npm/src/location.svg',
93+ 'node_modules/ionicons-npm/src/alert-circled.svg',
94+ 'node_modules/ionicons-npm/src/android-alert.svg',
95+ 'node_modules/ionicons-npm/src/ios-film-outline.svg',
96+ 'node_modules/ionicons-npm/src/music-note.svg',
97+ 'node_modules/ionicons-npm/src/ion-close-round.svg',
98+ 'node_modules/ionicons-npm/src/android-more-vertical.svg',
99+ 'magnet.svg'
100+ ],
101+ dest: 'fonts',
102+ destLess: 'less',
103+ options: {
104+ font: 'ion',
105+ hashes : true,
106+ syntax: 'bem',
107+ styles : 'font,icon',
108+ types : 'eot,woff2,woff,ttf,svg',
109+ order : 'eot,woff2,woff,ttf,svg',
110+ stylesheets : ['css', 'less'],
111+ relativeFontPath : '../fonts/',
112+ autoHint : false,
113+ normalize : false,
114+ // ligatures : true,
115+ optimize : true,
116+ // fontHeight : 400,
117+ rename : function(name) {
118+ basename = path.basename(name);
119+ if (basename === 'android-alert.svg') {
120+ return 'error.svg';
121+ }
122+ if (basename === 'alert-circled.svg') {
123+ return 'warning.svg';
124+ }
125+ if (basename === 'ion-close-round.svg') {
126+ return 'close.svg';
127+ }
128+ return basename.replace(/(ios|md|android)-/i, '');
129+ },
130+ templateOptions: {
131+ baseClass: 'ion-icon',
132+ classPrefix: 'ion-'
133+ }
134+ }
135+ }
136+ }
137+ });
138+
139+ grunt.loadNpmTasks('grunt-contrib-watch');
140+ grunt.loadNpmTasks('grunt-contrib-uglify');
141+ grunt.loadNpmTasks('grunt-contrib-jshint');
142+ grunt.loadNpmTasks('grunt-contrib-concat');
143+ grunt.loadNpmTasks('grunt-contrib-less');
144+ grunt.loadNpmTasks('grunt-contrib-cssmin');
145+ grunt.loadNpmTasks('grunt-webfont');
146+
147+ grunt.registerTask('test', ['jshint']);
148+
149+ grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'less:development', 'less:production']);
150+};
searx/static/themes/simple/img/favicon.pngnew file

Binary file not shown.

searx/static/themes/simple/img/loader.gifnew file

Binary file not shown.

searx/static/themes/simple/img/logo_searx_a.pngnew file

Binary file not shown.

searx/static/themes/simple/img/searx.pngnew file

Binary file not shown.

searx/static/themes/simple/img/searx_logo.svgnew file+203
@@ -0,0 +1,203 @@
1+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+<!-- Created with Inkscape (http://www.inkscape.org/) -->
3+
4+<svg
5+ xmlns:dc="http://purl.org/dc/elements/1.1/"
6+ xmlns:cc="http://creativecommons.org/ns#"
7+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8+ xmlns:svg="http://www.w3.org/2000/svg"
9+ xmlns="http://www.w3.org/2000/svg"
10+ xmlns:xlink="http://www.w3.org/1999/xlink"
11+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13+ width="744.09448819"
14+ height="1052.3622047"
15+ id="svg2"
16+ version="1.1"
17+ inkscape:version="0.48.4 r9939"
18+ sodipodi:docname="searx_logo.svg"
19+ inkscape:export-filename="/home/a/magnif.png"
20+ inkscape:export-xdpi="203.1774"
21+ inkscape:export-ydpi="203.1774">
22+ <defs
23+ id="defs4">
24+ <linearGradient
25+ inkscape:collect="always"
26+ id="linearGradient3857">
27+ <stop
28+ style="stop-color:#ffffff;stop-opacity:1;"
29+ offset="0"
30+ id="stop3859" />
31+ <stop
32+ style="stop-color:#ffffff;stop-opacity:0;"
33+ offset="1"
34+ id="stop3861" />
35+ </linearGradient>
36+ <linearGradient
37+ id="linearGradient3790">
38+ <stop
39+ style="stop-color:#a9a9a9;stop-opacity:1;"
40+ offset="0"
41+ id="stop3792" />
42+ <stop
43+ style="stop-color:#000000;stop-opacity:1;"
44+ offset="1"
45+ id="stop3794" />
46+ </linearGradient>
47+ <radialGradient
48+ inkscape:collect="always"
49+ xlink:href="#linearGradient3790"
50+ id="radialGradient3798"
51+ cx="294.45947"
52+ cy="208.37973"
53+ fx="294.45947"
54+ fy="208.37973"
55+ r="107.58125"
56+ gradientUnits="userSpaceOnUse" />
57+ <linearGradient
58+ inkscape:collect="always"
59+ xlink:href="#linearGradient3857"
60+ id="linearGradient3865"
61+ x1="120.68947"
62+ y1="239.61774"
63+ x2="120.68947"
64+ y2="602.17517"
65+ gradientUnits="userSpaceOnUse" />
66+ <linearGradient
67+ inkscape:collect="always"
68+ xlink:href="#linearGradient3790"
69+ id="linearGradient3912"
70+ x1="186.74416"
71+ y1="354.42426"
72+ x2="255.84358"
73+ y2="254.35953"
74+ gradientUnits="userSpaceOnUse"
75+ gradientTransform="matrix(1.2227304,0,0,0.89945099,-289.31433,113.40259)" />
76+ <filter
77+ inkscape:collect="always"
78+ id="filter4024"
79+ x="-0.12996517"
80+ width="1.2599303"
81+ y="-0.14709377"
82+ height="1.2941875">
83+ <feGaussianBlur
84+ inkscape:collect="always"
85+ stdDeviation="6.4759344"
86+ id="feGaussianBlur4026" />
87+ </filter>
88+ <filter
89+ inkscape:collect="always"
90+ id="filter3983"
91+ x="-1.0608404"
92+ width="3.1216809"
93+ y="-0.31017202"
94+ height="1.620344">
95+ <feGaussianBlur
96+ inkscape:collect="always"
97+ stdDeviation="9.392858"
98+ id="feGaussianBlur3985" />
99+ </filter>
100+ </defs>
101+ <sodipodi:namedview
102+ id="base"
103+ pagecolor="#ffffff"
104+ bordercolor="#666666"
105+ borderopacity="1.0"
106+ inkscape:pageopacity="0.0"
107+ inkscape:pageshadow="2"
108+ inkscape:zoom="1.979899"
109+ inkscape:cx="30.708726"
110+ inkscape:cy="948.08556"
111+ inkscape:document-units="px"
112+ inkscape:current-layer="layer1"
113+ showgrid="false"
114+ inkscape:window-width="1364"
115+ inkscape:window-height="663"
116+ inkscape:window-x="0"
117+ inkscape:window-y="30"
118+ inkscape:window-maximized="0"
119+ showguides="true"
120+ inkscape:guide-bbox="true" />
121+ <metadata
122+ id="metadata7">
123+ <rdf:RDF>
124+ <cc:Work
125+ rdf:about="">
126+ <dc:format>image/svg+xml</dc:format>
127+ <dc:type
128+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
129+ <dc:title />
130+ </cc:Work>
131+ </rdf:RDF>
132+ </metadata>
133+ <g
134+ inkscape:label="Layer 1"
135+ inkscape:groupmode="layer"
136+ id="layer1">
137+ <path
138+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
139+ 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"
140+ id="path3814-0-7"
141+ inkscape:connector-curvature="0" />
142+ <path
143+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
144+ 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"
145+ id="path3814-0"
146+ inkscape:connector-curvature="0" />
147+ <path
148+ transform="matrix(0.6556593,-0.75505688,0.75505688,0.6556593,0,0)"
149+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
150+ 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"
151+ id="rect3804" />
152+ <path
153+ sodipodi:type="arc"
154+ style="fill:url(#radialGradient3798);fill-opacity:1;fill-rule:nonzero;stroke:none"
155+ id="path2987"
156+ sodipodi:cx="294.45947"
157+ sodipodi:cy="208.37973"
158+ sodipodi:rx="107.58125"
159+ sodipodi:ry="107.58125"
160+ 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"
161+ transform="translate(-107.07617,-60.609153)" />
162+ <path
163+ sodipodi:type="arc"
164+ style="fill:url(#linearGradient3865);fill-opacity:1;fill-rule:nonzero;stroke:none"
165+ id="path3757"
166+ sodipodi:cx="131.82491"
167+ sodipodi:cy="299.29346"
168+ sodipodi:rx="101.52033"
169+ sodipodi:ry="101.52033"
170+ 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"
171+ transform="matrix(0.76865672,0,0,0.76865672,85.80266,-82.535889)" />
172+ <path
173+ sodipodi:type="arc"
174+ style="fill:#1a1a1a;fill-opacity:1;fill-rule:nonzero;stroke:none"
175+ id="path3800"
176+ sodipodi:cx="183.34268"
177+ sodipodi:cy="156.35687"
178+ sodipodi:rx="27.274118"
179+ sodipodi:ry="27.274118"
180+ 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"
181+ transform="translate(5,-7.1428572)" />
182+ <path
183+ sodipodi:type="arc"
184+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
185+ id="path3802"
186+ sodipodi:cx="197.9899"
187+ sodipodi:cy="203.32896"
188+ sodipodi:rx="5.5558391"
189+ sodipodi:ry="5.5558391"
190+ 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"
191+ transform="translate(1.4847712,-63.564549)" />
192+ <rect
193+ style="fill:#ffffff;fill-opacity:0.82211531000000004;fill-rule:nonzero;stroke:none;filter:url(#filter4024)"
194+ id="rect3916"
195+ width="2.2392972"
196+ height="159.43797"
197+ x="19.525793"
198+ y="337.8396"
199+ rx="2.8666623"
200+ ry="9.0007057"
201+ transform="matrix(0.74466525,-0.84318084,0.84318084,0.74466525,-35.543204,-26.349917)" />
202+ </g>
203+</svg>
searx/static/themes/simple/js/searx.jsnew file+1534
@@ -0,0 +1,1534 @@
1+/**
2+* searx is free software: you can redistribute it and/or modify
3+* it under the terms of the GNU Affero General Public License as published by
4+* the Free Software Foundation, either version 3 of the License, or
5+* (at your option) any later version.
6+*
7+* searx is distributed in the hope that it will be useful,
8+* but WITHOUT ANY WARRANTY; without even the implied warranty of
9+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10+* GNU Affero General Public License for more details.
11+*
12+* You should have received a copy of the GNU Affero General Public License
13+* along with searx. If not, see < http://www.gnu.org/licenses/ >.
14+*
15+* (C) 2017 by Alexandre Flament, <alex@al-f.net>
16+*
17+*/
18+(function(w, d, searx) {
19+
20+ 'use strict';
21+
22+ // not invented here tookit with bugs fixed elsewhere
23+ // purposes : be just good enough and as small as possible
24+
25+ // from https://plainjs.com/javascript/events/live-binding-event-handlers-14/
26+ if (w.Element) {
27+ (function(ElementPrototype) {
28+ ElementPrototype.matches = ElementPrototype.matches ||
29+ ElementPrototype.matchesSelector ||
30+ ElementPrototype.webkitMatchesSelector ||
31+ ElementPrototype.msMatchesSelector ||
32+ function(selector) {
33+ var node = this, nodes = (node.parentNode || node.document).querySelectorAll(selector), i = -1;
34+ while (nodes[++i] && nodes[i] != node);
35+ return !!nodes[i];
36+ };
37+ })(Element.prototype);
38+ }
39+
40+ function callbackSafe(callback, el, e) {
41+ try {
42+ callback.call(el, e);
43+ } catch (exception) {
44+ console.log(exception);
45+ }
46+ }
47+
48+ searx = searx || {};
49+
50+ searx.on = function(obj, eventType, callback, useCapture) {
51+ useCapture = useCapture || false;
52+ if (typeof obj !== 'string') {
53+ // obj HTMLElement, HTMLDocument
54+ obj.addEventListener(eventType, callback, useCapture);
55+ } else {
56+ // obj is a selector
57+ d.addEventListener(eventType, function(e) {
58+ var el = e.target || e.srcElement, found = false;
59+ while (el && el.matches && el !== d && !(found = el.matches(obj))) el = el.parentElement;
60+ if (found) callbackSafe(callback, el, e);
61+ }, useCapture);
62+ }
63+ };
64+
65+ searx.ready = function(callback) {
66+ if (document.readyState != 'loading') {
67+ callback.call(w);
68+ } else {
69+ w.addEventListener('DOMContentLoaded', callback.bind(w));
70+ }
71+ };
72+
73+ searx.http = function(method, url, callback) {
74+ var req = new XMLHttpRequest(),
75+ resolve = function() {},
76+ reject = function() {},
77+ promise = {
78+ then: function(callback) { resolve = callback; return promise; },
79+ catch: function(callback) { reject = callback; return promise; }
80+ };
81+
82+ try {
83+ req.open(method, url, true);
84+
85+ // On load
86+ req.onload = function() {
87+ if (req.status == 200) {
88+ resolve(req.response, req.responseType);
89+ } else {
90+ reject(Error(req.statusText));
91+ }
92+ };
93+
94+ // Handle network errors
95+ req.onerror = function() {
96+ reject(Error("Network Error"));
97+ };
98+
99+ req.onabort = function() {
100+ reject(Error("Transaction is aborted"));
101+ };
102+
103+ // Make the request
104+ req.send();
105+ } catch (ex) {
106+ reject(ex);
107+ }
108+
109+ return promise;
110+ };
111+
112+ searx.loadStyle = function(src) {
113+ var path = searx.staticPath + src,
114+ id = "style_" + src.replace('.', '_'),
115+ s = d.getElementById(id);
116+ if (s === null) {
117+ s = d.createElement('link');
118+ s.setAttribute('id', id);
119+ s.setAttribute('rel', 'stylesheet');
120+ s.setAttribute('type', 'text/css');
121+ s.setAttribute('href', path);
122+ d.body.appendChild(s);
123+ }
124+ };
125+
126+ searx.loadScript = function(src, callback) {
127+ var path = searx.staticPath + src,
128+ id = "script_" + src.replace('.', '_'),
129+ s = d.getElementById(id);
130+ if (s === null) {
131+ s = d.createElement('script');
132+ s.setAttribute('id', id);
133+ s.setAttribute('src', path);
134+ s.onload = callback;
135+ s.onerror = function() {
136+ s.setAttribute('error', '1');
137+ };
138+ d.body.appendChild(s);
139+ } else if (!s.hasAttribute('error')) {
140+ try {
141+ callback.apply(s, []);
142+ } catch (exception) {
143+ console.log(exception);
144+ }
145+ } else {
146+ console.log("callback not executed : script '" + path + "' not loaded.");
147+ }
148+ };
149+
150+ searx.on('.close', 'click', function(e) {
151+ var el = e.target || e.srcElement;
152+ this.parentNode.style.display="None";
153+ });
154+ return searx;
155+})(window, document, window.searx);
156+;(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){
157+/*
158+ * @license MIT
159+ *
160+ * Autocomplete.js v2.6.3
161+ * Developed by Baptiste Donaux
162+ * http://autocomplete-js.com
163+ *
164+ * (c) 2017, Baptiste Donaux
165+ */
166+"use strict";
167+var ConditionOperator;
168+(function (ConditionOperator) {
169+ ConditionOperator[ConditionOperator["AND"] = 0] = "AND";
170+ ConditionOperator[ConditionOperator["OR"] = 1] = "OR";
171+})(ConditionOperator || (ConditionOperator = {}));
172+var EventType;
173+(function (EventType) {
174+ EventType[EventType["KEYDOWN"] = 0] = "KEYDOWN";
175+ EventType[EventType["KEYUP"] = 1] = "KEYUP";
176+})(EventType || (EventType = {}));
177+/**
178+ * Core
179+ *
180+ * @class
181+ * @author Baptiste Donaux <baptiste.donaux@gmail.com> @baptistedonaux
182+ */
183+var AutoComplete = (function () {
184+ // Constructor
185+ function AutoComplete(params, selector) {
186+ if (params === void 0) { params = {}; }
187+ if (selector === void 0) { selector = "[data-autocomplete]"; }
188+ if (Array.isArray(selector)) {
189+ selector.forEach(function (s) {
190+ new AutoComplete(params, s);
191+ });
192+ }
193+ else if (typeof selector == "string") {
194+ var elements = document.querySelectorAll(selector);
195+ Array.prototype.forEach.call(elements, function (input) {
196+ new AutoComplete(params, input);
197+ });
198+ }
199+ else {
200+ var specificParams = AutoComplete.merge(AutoComplete.defaults, params, {
201+ DOMResults: document.createElement("div")
202+ });
203+ AutoComplete.prototype.create(specificParams, selector);
204+ return specificParams;
205+ }
206+ }
207+ AutoComplete.prototype.create = function (params, element) {
208+ params.Input = element;
209+ if (params.Input.nodeName.match(/^INPUT$/i) && (params.Input.hasAttribute("type") === false || params.Input.getAttribute("type").match(/^TEXT|SEARCH$/i))) {
210+ params.Input.setAttribute("autocomplete", "off");
211+ params._Position(params);
212+ params.Input.parentNode.appendChild(params.DOMResults);
213+ params.$Listeners = {
214+ blur: params._Blur.bind(params),
215+ destroy: AutoComplete.prototype.destroy.bind(null, params),
216+ focus: params._Focus.bind(params),
217+ keyup: AutoComplete.prototype.event.bind(null, params, EventType.KEYUP),
218+ keydown: AutoComplete.prototype.event.bind(null, params, EventType.KEYDOWN),
219+ position: params._Position.bind(params)
220+ };
221+ for (var event in params.$Listeners) {
222+ params.Input.addEventListener(event, params.$Listeners[event]);
223+ }
224+ }
225+ };
226+ AutoComplete.prototype.getEventsByType = function (params, type) {
227+ var mappings = {};
228+ for (var key in params.KeyboardMappings) {
229+ var event = EventType.KEYUP;
230+ if (params.KeyboardMappings[key].Event !== undefined) {
231+ event = params.KeyboardMappings[key].Event;
232+ }
233+ if (event == type) {
234+ mappings[key] = params.KeyboardMappings[key];
235+ }
236+ }
237+ return mappings;
238+ };
239+ AutoComplete.prototype.event = function (params, type, event) {
240+ var eventIdentifier = function (condition) {
241+ if ((match === true && mapping.Operator == ConditionOperator.AND) || (match === false && mapping.Operator == ConditionOperator.OR)) {
242+ condition = AutoComplete.merge({
243+ Not: false
244+ }, condition);
245+ if (condition.hasOwnProperty("Is")) {
246+ if (condition.Is == event.keyCode) {
247+ match = !condition.Not;
248+ }
249+ else {
250+ match = condition.Not;
251+ }
252+ }
253+ else if (condition.hasOwnProperty("From") && condition.hasOwnProperty("To")) {
254+ if (event.keyCode >= condition.From && event.keyCode <= condition.To) {
255+ match = !condition.Not;
256+ }
257+ else {
258+ match = condition.Not;
259+ }
260+ }
261+ }
262+ };
263+ for (var name in AutoComplete.prototype.getEventsByType(params, type)) {
264+ var mapping = AutoComplete.merge({
265+ Operator: ConditionOperator.AND
266+ }, params.KeyboardMappings[name]), match = ConditionOperator.AND == mapping.Operator;
267+ mapping.Conditions.forEach(eventIdentifier);
268+ if (match === true) {
269+ mapping.Callback.call(params, event);
270+ }
271+ }
272+ };
273+ AutoComplete.prototype.makeRequest = function (params, callback) {
274+ var propertyHttpHeaders = Object.getOwnPropertyNames(params.HttpHeaders), request = new XMLHttpRequest(), method = params._HttpMethod(), url = params._Url(), queryParams = params._Pre(), queryParamsStringify = encodeURIComponent(params._QueryArg()) + "=" + encodeURIComponent(queryParams);
275+ if (method.match(/^GET$/i)) {
276+ if (url.indexOf("?") !== -1) {
277+ url += "&" + queryParamsStringify;
278+ }
279+ else {
280+ url += "?" + queryParamsStringify;
281+ }
282+ }
283+ request.open(method, url, true);
284+ for (var i = propertyHttpHeaders.length - 1; i >= 0; i--) {
285+ request.setRequestHeader(propertyHttpHeaders[i], params.HttpHeaders[propertyHttpHeaders[i]]);
286+ }
287+ request.onreadystatechange = function () {
288+ if (request.readyState == 4 && request.status == 200) {
289+ params.$Cache[queryParams] = request.response;
290+ callback(request.response);
291+ }
292+ };
293+ return request;
294+ };
295+ AutoComplete.prototype.ajax = function (params, request, timeout) {
296+ if (timeout === void 0) { timeout = true; }
297+ if (params.$AjaxTimer) {
298+ window.clearTimeout(params.$AjaxTimer);
299+ }
300+ if (timeout === true) {
301+ params.$AjaxTimer = window.setTimeout(AutoComplete.prototype.ajax.bind(null, params, request, false), params.Delay);
302+ }
303+ else {
304+ if (params.Request) {
305+ params.Request.abort();
306+ }
307+ params.Request = request;
308+ params.Request.send(params._QueryArg() + "=" + params._Pre());
309+ }
310+ };
311+ AutoComplete.prototype.cache = function (params, callback) {
312+ var response = params._Cache(params._Pre());
313+ if (response === undefined) {
314+ var request = AutoComplete.prototype.makeRequest(params, callback);
315+ AutoComplete.prototype.ajax(params, request);
316+ }
317+ else {
318+ callback(response);
319+ }
320+ };
321+ AutoComplete.prototype.destroy = function (params) {
322+ for (var event in params.$Listeners) {
323+ params.Input.removeEventListener(event, params.$Listeners[event]);
324+ }
325+ params.DOMResults.parentNode.removeChild(params.DOMResults);
326+ };
327+ return AutoComplete;
328+}());
329+AutoComplete.merge = function () {
330+ var merge = {}, tmp;
331+ for (var i = 0; i < arguments.length; i++) {
332+ for (tmp in arguments[i]) {
333+ merge[tmp] = arguments[i][tmp];
334+ }
335+ }
336+ return merge;
337+};
338+AutoComplete.defaults = {
339+ Delay: 150,
340+ EmptyMessage: "No result here",
341+ Highlight: {
342+ getRegex: function (value) {
343+ return new RegExp(value, "ig");
344+ },
345+ transform: function (value) {
346+ return "<strong>" + value + "</strong>";
347+ }
348+ },
349+ HttpHeaders: {
350+ "Content-type": "application/x-www-form-urlencoded"
351+ },
352+ Limit: 0,
353+ MinChars: 0,
354+ HttpMethod: "GET",
355+ QueryArg: "q",
356+ Url: null,
357+ KeyboardMappings: {
358+ "Enter": {
359+ Conditions: [{
360+ Is: 13,
361+ Not: false
362+ }],
363+ Callback: function (event) {
364+ if (this.DOMResults.getAttribute("class").indexOf("open") != -1) {
365+ var liActive = this.DOMResults.querySelector("li.active");
366+ if (liActive !== null) {
367+ event.preventDefault();
368+ this._Select(liActive);
369+ this.DOMResults.setAttribute("class", "autocomplete");
370+ }
371+ }
372+ },
373+ Operator: ConditionOperator.AND,
374+ Event: EventType.KEYDOWN
375+ },
376+ "KeyUpAndDown_down": {
377+ Conditions: [{
378+ Is: 38,
379+ Not: false
380+ },
381+ {
382+ Is: 40,
383+ Not: false
384+ }],
385+ Callback: function (event) {
386+ event.preventDefault();
387+ },
388+ Operator: ConditionOperator.OR,
389+ Event: EventType.KEYDOWN
390+ },
391+ "KeyUpAndDown_up": {
392+ Conditions: [{
393+ Is: 38,
394+ Not: false
395+ },
396+ {
397+ Is: 40,
398+ Not: false
399+ }],
400+ Callback: function (event) {
401+ event.preventDefault();
402+ 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");
403+ if (active) {
404+ var currentIndex = Array.prototype.indexOf.call(active.parentNode.children, active), position = currentIndex + (event.keyCode - 39), lisCount = this.DOMResults.getElementsByTagName("li").length;
405+ if (position < 0) {
406+ position = lisCount - 1;
407+ }
408+ else if (position >= lisCount) {
409+ position = 0;
410+ }
411+ active.classList.remove("active");
412+ active.parentElement.children.item(position).classList.add("active");
413+ }
414+ else if (last && event.keyCode == 38) {
415+ last.classList.add("active");
416+ }
417+ else if (first) {
418+ first.classList.add("active");
419+ }
420+ },
421+ Operator: ConditionOperator.OR,
422+ Event: EventType.KEYUP
423+ },
424+ "AlphaNum": {
425+ Conditions: [{
426+ Is: 13,
427+ Not: true
428+ }, {
429+ From: 35,
430+ To: 40,
431+ Not: true
432+ }],
433+ Callback: function () {
434+ var oldValue = this.Input.getAttribute("data-autocomplete-old-value"), currentValue = this._Pre();
435+ if (currentValue !== "" && currentValue.length >= this._MinChars()) {
436+ if (!oldValue || currentValue != oldValue) {
437+ this.DOMResults.setAttribute("class", "autocomplete open");
438+ }
439+ AutoComplete.prototype.cache(this, function (response) {
440+ this._Render(this._Post(response));
441+ this._Open();
442+ }.bind(this));
443+ }
444+ },
445+ Operator: ConditionOperator.AND,
446+ Event: EventType.KEYUP
447+ }
448+ },
449+ DOMResults: null,
450+ Request: null,
451+ Input: null,
452+ /**
453+ * Return the message when no result returns
454+ */
455+ _EmptyMessage: function () {
456+ var emptyMessage = "";
457+ if (this.Input.hasAttribute("data-autocomplete-empty-message")) {
458+ emptyMessage = this.Input.getAttribute("data-autocomplete-empty-message");
459+ }
460+ else if (this.EmptyMessage !== false) {
461+ emptyMessage = this.EmptyMessage;
462+ }
463+ else {
464+ emptyMessage = "";
465+ }
466+ return emptyMessage;
467+ },
468+ /**
469+ * Returns the maximum number of results
470+ */
471+ _Limit: function () {
472+ var limit = this.Input.getAttribute("data-autocomplete-limit");
473+ if (isNaN(limit) || limit === null) {
474+ return this.Limit;
475+ }
476+ return parseInt(limit, 10);
477+ },
478+ /**
479+ * Returns the minimum number of characters entered before firing ajax
480+ */
481+ _MinChars: function () {
482+ var minchars = this.Input.getAttribute("data-autocomplete-minchars");
483+ if (isNaN(minchars) || minchars === null) {
484+ return this.MinChars;
485+ }
486+ return parseInt(minchars, 10);
487+ },
488+ /**
489+ * Apply transformation on labels response
490+ */
491+ _Highlight: function (label) {
492+ return label.replace(this.Highlight.getRegex(this._Pre()), this.Highlight.transform);
493+ },
494+ /**
495+ * Returns the HHTP method to use
496+ */
497+ _HttpMethod: function () {
498+ if (this.Input.hasAttribute("data-autocomplete-method")) {
499+ return this.Input.getAttribute("data-autocomplete-method");
500+ }
501+ return this.HttpMethod;
502+ },
503+ /**
504+ * Returns the query param to use
505+ */
506+ _QueryArg: function () {
507+ if (this.Input.hasAttribute("data-autocomplete-param-name")) {
508+ return this.Input.getAttribute("data-autocomplete-param-name");
509+ }
510+ return this.QueryArg;
511+ },
512+ /**
513+ * Returns the URL to use for AJAX request
514+ */
515+ _Url: function () {
516+ if (this.Input.hasAttribute("data-autocomplete")) {
517+ return this.Input.getAttribute("data-autocomplete");
518+ }
519+ return this.Url;
520+ },
521+ /**
522+ * Manage the close
523+ */
524+ _Blur: function (now) {
525+ if (now === true) {
526+ this.DOMResults.setAttribute("class", "autocomplete");
527+ this.Input.setAttribute("data-autocomplete-old-value", this.Input.value);
528+ }
529+ else {
530+ var params = this;
531+ setTimeout(function () {
532+ params._Blur(true);
533+ }, 150);
534+ }
535+ },
536+ /**
537+ * Manage the cache
538+ */
539+ _Cache: function (value) {
540+ return this.$Cache[value];
541+ },
542+ /**
543+ * Manage the open
544+ */
545+ _Focus: function () {
546+ var oldValue = this.Input.getAttribute("data-autocomplete-old-value");
547+ if ((!oldValue || this.Input.value != oldValue) && this._MinChars() <= this.Input.value.length) {
548+ this.DOMResults.setAttribute("class", "autocomplete open");
549+ }
550+ },
551+ /**
552+ * Bind all results item if one result is opened
553+ */
554+ _Open: function () {
555+ var params = this;
556+ Array.prototype.forEach.call(this.DOMResults.getElementsByTagName("li"), function (li) {
557+ if (li.getAttribute("class") != "locked") {
558+ li.onclick = function (event) {
559+ params._Select(li);
560+ };
561+ li.onmouseenter = function () {
562+ var active = params.DOMResults.querySelector("li.active");
563+ if (active !== li) {
564+ if (active !== null) {
565+ active.classList.remove("active");
566+ }
567+ li.classList.add("active");
568+ }
569+ };
570+ }
571+ });
572+ },
573+ /**
574+ * Position the results HTML element
575+ */
576+ _Position: function () {
577+ this.DOMResults.setAttribute("class", "autocomplete");
578+ this.DOMResults.setAttribute("style", "top:" + (this.Input.offsetTop + this.Input.offsetHeight) + "px;left:" + this.Input.offsetLeft + "px;width:" + this.Input.clientWidth + "px;");
579+ },
580+ /**
581+ * Execute the render of results DOM element
582+ */
583+ _Render: function (response) {
584+ var ul;
585+ if (typeof response == "string") {
586+ ul = this._RenderRaw(response);
587+ }
588+ else {
589+ ul = this._RenderResponseItems(response);
590+ }
591+ if (this.DOMResults.hasChildNodes()) {
592+ this.DOMResults.removeChild(this.DOMResults.childNodes[0]);
593+ }
594+ this.DOMResults.appendChild(ul);
595+ },
596+ /**
597+ * ResponseItems[] rendering
598+ */
599+ _RenderResponseItems: function (response) {
600+ var ul = document.createElement("ul"), li = document.createElement("li"), limit = this._Limit();
601+ // Order
602+ if (limit < 0) {
603+ response = response.reverse();
604+ }
605+ else if (limit === 0) {
606+ limit = response.length;
607+ }
608+ for (var item = 0; item < Math.min(Math.abs(limit), response.length); item++) {
609+ li.innerHTML = response[item].Label;
610+ li.setAttribute("data-autocomplete-value", response[item].Value);
611+ ul.appendChild(li);
612+ li = document.createElement("li");
613+ }
614+ return ul;
615+ },
616+ /**
617+ * string response rendering (RAW HTML)
618+ */
619+ _RenderRaw: function (response) {
620+ var ul = document.createElement("ul"), li = document.createElement("li");
621+ if (response.length > 0) {
622+ this.DOMResults.innerHTML = response;
623+ }
624+ else {
625+ var emptyMessage = this._EmptyMessage();
626+ if (emptyMessage !== "") {
627+ li.innerHTML = emptyMessage;
628+ li.setAttribute("class", "locked");
629+ ul.appendChild(li);
630+ }
631+ }
632+ return ul;
633+ },
634+ /**
635+ * Deal with request response
636+ */
637+ _Post: function (response) {
638+ try {
639+ var returnResponse = [];
640+ //JSON return
641+ var json = JSON.parse(response);
642+ if (Object.keys(json).length === 0) {
643+ return "";
644+ }
645+ if (Array.isArray(json)) {
646+ for (var i = 0; i < Object.keys(json).length; i++) {
647+ returnResponse[returnResponse.length] = { "Value": json[i], "Label": this._Highlight(json[i]) };
648+ }
649+ }
650+ else {
651+ for (var value in json) {
652+ returnResponse.push({
653+ "Value": value,
654+ "Label": this._Highlight(json[value])
655+ });
656+ }
657+ }
658+ return returnResponse;
659+ }
660+ catch (event) {
661+ //HTML return
662+ return response;
663+ }
664+ },
665+ /**
666+ * Return the autocomplete value to send (before request)
667+ */
668+ _Pre: function () {
669+ return this.Input.value;
670+ },
671+ /**
672+ * Choice one result item
673+ */
674+ _Select: function (item) {
675+ console.log('test test test');
676+ if (item.hasAttribute("data-autocomplete-value")) {
677+ this.Input.value = item.getAttribute("data-autocomplete-value");
678+ }
679+ else {
680+ this.Input.value = item.innerHTML;
681+ }
682+ this.Input.setAttribute("data-autocomplete-old-value", this.Input.value);
683+ },
684+ $AjaxTimer: null,
685+ $Cache: {},
686+ $Listeners: {}
687+};
688+module.exports = AutoComplete;
689+
690+},{}]},{},[1])(1)
691+});
692+;/**
693+*
694+* Google Image Layout v0.0.1
695+* Description, by Anh Trinh.
696+* Heavily modified for searx
697+* http://trinhtrunganh.com
698+*
699+* @license Free to use under the MIT License.
700+*
701+*/
702+(function(w, d) {
703+ 'use strict';
704+
705+ function ImageLayout(container_selector, results_selector, img_selector, maxHeight) {
706+ this.container_selector = container_selector;
707+ this.results_selector = results_selector;
708+ this.img_selector = img_selector;
709+ this.margin = 10;
710+ this.maxHeight = maxHeight;
711+ this._alignAllDone = true;
712+ }
713+
714+ /**
715+ * Get the height that make all images fit the container
716+ *
717+ * width = w1 + w2 + w3 + ... = r1*h + r2*h + r3*h + ...
718+ *
719+ * @param {[type]} images the images to be calculated
720+ * @param {[type]} width the container witdth
721+ * @param {[type]} margin the margin between each image
722+ *
723+ * @return {[type]} the height
724+ */
725+ ImageLayout.prototype._getHeigth = function(images, width) {
726+ var r = 0,
727+ img;
728+
729+ width -= images.length * this.margin;
730+ for (var i = 0; i < images.length; i++) {
731+ img = images[i];
732+ if ((img.naturalWidth > 0) && (img.naturalHeight > 0)) {
733+ r += img.naturalWidth / img.naturalHeight;
734+ } else {
735+ // assume that not loaded images are square
736+ r += 1;
737+ }
738+ }
739+
740+ return width / r; //have to round down because Firefox will automatically roundup value with number of decimals > 3
741+ };
742+
743+ ImageLayout.prototype._setSize = function(images, height) {
744+ var img, imgWidth, imagesLength = images.length;
745+ for (var i = 0; i < imagesLength; i++) {
746+ img = images[i];
747+ if ((img.naturalWidth > 0) && (img.naturalHeight > 0)) {
748+ imgWidth = height * img.naturalWidth / img.naturalHeight;
749+ } else {
750+ // not loaded image : make it square as _getHeigth said it
751+ imgWidth = height;
752+ }
753+ img.style.width = imgWidth + 'px';
754+ img.style.height = height + 'px';
755+ img.style.marginLeft = '3px';
756+ img.style.marginTop = '3px';
757+ img.style.marginRight = this.margin - 7 + 'px'; // -4 is the negative margin of the inline element
758+ img.style.marginBottom = this.margin - 7 + 'px';
759+ }
760+ };
761+
762+ ImageLayout.prototype._alignImgs = function(imgGroup) {
763+ var slice, h,
764+ containerWidth = d.querySelector(this.container_selector).clientWidth;
765+
766+ w: while (imgGroup.length > 0) {
767+ for (var i = 1; i <= imgGroup.length; i++) {
768+ slice = imgGroup.slice(0, i);
769+ h = this._getHeigth(slice, containerWidth);
770+ if (h < this.maxHeight) {
771+ this._setSize(slice, h);
772+ imgGroup = imgGroup.slice(i);
773+ continue w;
774+ }
775+ }
776+ this._setSize(slice, Math.min(this.maxHeight, h));
777+ break;
778+ }
779+ };
780+
781+ ImageLayout.prototype.align = function(results_selector) {
782+ var results_selectorNode = d.querySelectorAll(this.results_selector),
783+ results_length = results_selectorNode.length,
784+ previous = null,
785+ current = null,
786+ imgGroup = [];
787+ for (var i = 0; i < results_length; i++) {
788+ current = results_selectorNode[i];
789+ if (current.previousElementSibling !== previous && imgGroup.length > 0) {
790+ // the current image is not conected to previous one
791+ // so the current image is the start of a new group of images.
792+ // so call _alignImgs to align the current group
793+ this._alignImgs(imgGroup);
794+ // and start a new empty group of images
795+ imgGroup = [];
796+ }
797+ // add the current image to the group (only the img tag)
798+ imgGroup.push(current.querySelector(this.img_selector));
799+ // update the previous variable
800+ previous = current;
801+ }
802+ // align the remaining images
803+ if (imgGroup.length > 0) {
804+ this._alignImgs(imgGroup);
805+ }
806+ };
807+
808+ ImageLayout.prototype.watch = function() {
809+ var i, img, imgGroup, imgNodeLength,
810+ obj = this,
811+ results_nodes = d.querySelectorAll(this.results_selector),
812+ results_length = results_nodes.length;
813+
814+ function align(e) {
815+ obj.align();
816+ }
817+
818+ function throttleAlign(e) {
819+ if (obj._alignAllDone) {
820+ obj._alignAllDone = false;
821+ setTimeout(function() {
822+ obj.align();
823+ obj._alignAllDone = true;
824+ }, 100);
825+ }
826+ }
827+
828+ w.addEventListener('resize', throttleAlign);
829+ w.addEventListener('pageshow', align);
830+
831+ for (i = 0; i < results_length; i++) {
832+ img = results_nodes[i].querySelector(this.img_selector);
833+ if (typeof img !== 'undefined') {
834+ img.addEventListener('load', throttleAlign);
835+ img.addEventListener('error', throttleAlign);
836+ }
837+ }
838+ };
839+
840+ w.searx.ImageLayout = ImageLayout;
841+
842+})(window, document);
843+;searx.ready(function() {
844+
845+ searx.on('.result', 'click', function() {
846+ highlightResult(this)(true);
847+ });
848+
849+ searx.on('.result a', 'focus', function(e) {
850+ var el = e.target;
851+ while (el !== undefined) {
852+ if (el.classList.contains('result')) {
853+ if (el.getAttribute("data-vim-selected") === null) {
854+ highlightResult(el)(true);
855+ }
856+ break;
857+ }
858+ el = el.parentNode;
859+ }
860+ }, true);
861+
862+ var vimKeys = {
863+ 27: {
864+ key: 'Escape',
865+ fun: removeFocus,
866+ des: 'remove focus from the focused input',
867+ cat: 'Control'
868+ },
869+ 73: {
870+ key: 'i',
871+ fun: searchInputFocus,
872+ des: 'focus on the search input',
873+ cat: 'Control'
874+ },
875+ 66: {
876+ key: 'b',
877+ fun: scrollPage(-window.innerHeight),
878+ des: 'scroll one page up',
879+ cat: 'Navigation'
880+ },
881+ 70: {
882+ key: 'f',
883+ fun: scrollPage(window.innerHeight),
884+ des: 'scroll one page down',
885+ cat: 'Navigation'
886+ },
887+ 85: {
888+ key: 'u',
889+ fun: scrollPage(-window.innerHeight / 2),
890+ des: 'scroll half a page up',
891+ cat: 'Navigation'
892+ },
893+ 68: {
894+ key: 'd',
895+ fun: scrollPage(window.innerHeight / 2),
896+ des: 'scroll half a page down',
897+ cat: 'Navigation'
898+ },
899+ 71: {
900+ key: 'g',
901+ fun: scrollPageTo(-document.body.scrollHeight, 'top'),
902+ des: 'scroll to the top of the page',
903+ cat: 'Navigation'
904+ },
905+ 86: {
906+ key: 'v',
907+ fun: scrollPageTo(document.body.scrollHeight, 'bottom'),
908+ des: 'scroll to the bottom of the page',
909+ cat: 'Navigation'
910+ },
911+ 75: {
912+ key: 'k',
913+ fun: highlightResult('up'),
914+ des: 'select previous search result',
915+ cat: 'Results'
916+ },
917+ 74: {
918+ key: 'j',
919+ fun: highlightResult('down'),
920+ des: 'select next search result',
921+ cat: 'Results'
922+ },
923+ 80: {
924+ key: 'p',
925+ fun: pageButtonClick(0),
926+ des: 'go to previous page',
927+ cat: 'Results'
928+ },
929+ 78: {
930+ key: 'n',
931+ fun: pageButtonClick(1),
932+ des: 'go to next page',
933+ cat: 'Results'
934+ },
935+ 79: {
936+ key: 'o',
937+ fun: openResult(false),
938+ des: 'open search result',
939+ cat: 'Results'
940+ },
941+ 84: {
942+ key: 't',
943+ fun: openResult(true),
944+ des: 'open the result in a new tab',
945+ cat: 'Results'
946+ },
947+ 82: {
948+ key: 'r',
949+ fun: reloadPage,
950+ des: 'reload page from the server',
951+ cat: 'Control'
952+ },
953+ 72: {
954+ key: 'h',
955+ fun: toggleHelp,
956+ des: 'toggle help window',
957+ cat: 'Other'
958+ }
959+ };
960+
961+ searx.on(document, "keyup", function(e) {
962+ // check for modifiers so we don't break browser's hotkeys
963+ if (vimKeys.hasOwnProperty(e.keyCode) && !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) {
964+ var tagName = e.target.tagName.toLowerCase();
965+ if (e.keyCode === 27) {
966+ if (tagName === 'input' || tagName === 'select' || tagName === 'textarea') {
967+ vimKeys[e.keyCode].fun();
968+ }
969+ } else {
970+ if (e.target === document.body || tagName === 'a' || tagName === 'button') {
971+ vimKeys[e.keyCode].fun();
972+ }
973+ }
974+ }
975+ });
976+
977+ function highlightResult(which) {
978+ return function(noScroll) {
979+ var current = document.querySelector('.result[data-vim-selected]'),
980+ effectiveWhich = which;
981+ if (current === null) {
982+ // no selection : choose the first one
983+ current = document.querySelector('.result');
984+ if (current === null) {
985+ // no first one : there are no results
986+ return;
987+ }
988+ // replace up/down actions by selecting first one
989+ if (which === "down" || which === "up") {
990+ effectiveWhich = current;
991+ }
992+ }
993+
994+ var next, results = document.querySelectorAll('.result');
995+
996+ if (typeof effectiveWhich !== 'string') {
997+ next = effectiveWhich;
998+ } else {
999+ switch (effectiveWhich) {
1000+ case 'visible':
1001+ var top = document.documentElement.scrollTop || document.body.scrollTop;
1002+ var bot = top + document.documentElement.clientHeight;
1003+
1004+ for (var i = 0; i < results.length; i++) {
1005+ next = results[i];
1006+ var etop = next.offsetTop;
1007+ var ebot = etop + next.clientHeight;
1008+
1009+ if ((ebot <= bot) && (etop > top)) {
1010+ break;
1011+ }
1012+ }
1013+ break;
1014+ case 'down':
1015+ next = current.nextElementSibling;
1016+ if (next === null) {
1017+ next = results[0];
1018+ }
1019+ break;
1020+ case 'up':
1021+ next = current.previousElementSibling;
1022+ if (next === null) {
1023+ next = results[results.length - 1];
1024+ }
1025+ break;
1026+ case 'bottom':
1027+ next = results[results.length - 1];
1028+ break;
1029+ case 'top':
1030+ /* falls through */
1031+ default:
1032+ next = results[0];
1033+ }
1034+ }
1035+
1036+ if (next) {
1037+ current.removeAttribute('data-vim-selected');
1038+ next.setAttribute('data-vim-selected', 'true');
1039+ var link = next.querySelector('h3 a') || next.querySelector('a');
1040+ if (link !== null) {
1041+ link.focus();
1042+ }
1043+ if (!noScroll) {
1044+ scrollPageToSelected();
1045+ }
1046+ }
1047+ };
1048+ }
1049+
1050+ function reloadPage() {
1051+ document.location.reload(true);
1052+ }
1053+
1054+ function removeFocus() {
1055+ if (document.activeElement) {
1056+ document.activeElement.blur();
1057+ }
1058+ }
1059+
1060+ function pageButtonClick(num) {
1061+ return function() {
1062+ var buttons = $('div#pagination button[type="submit"]');
1063+ if (buttons.length !== 2) {
1064+ console.log('page navigation with this theme is not supported');
1065+ return;
1066+ }
1067+ if (num >= 0 && num < buttons.length) {
1068+ buttons[num].click();
1069+ } else {
1070+ console.log('pageButtonClick(): invalid argument');
1071+ }
1072+ };
1073+ }
1074+
1075+ function scrollPageToSelected() {
1076+ var sel = document.querySelector('.result[data-vim-selected]');
1077+ if (sel === null) {
1078+ return;
1079+ }
1080+ var wtop = document.documentElement.scrollTop || document.body.scrollTop,
1081+ wheight = document.documentElement.clientHeight,
1082+ etop = sel.offsetTop,
1083+ ebot = etop + sel.clientHeight,
1084+ offset = 120;
1085+ // first element ?
1086+ if ((sel.previousElementSibling === null) && (ebot < wheight)) {
1087+ // set to the top of page if the first element
1088+ // is fully included in the viewport
1089+ window.scroll(window.scrollX, 0);
1090+ return;
1091+ }
1092+ if (wtop > (etop - offset)) {
1093+ window.scroll(window.scrollX, etop - offset);
1094+ } else {
1095+ var wbot = wtop + wheight;
1096+ if (wbot < (ebot + offset)) {
1097+ window.scroll(window.scrollX, ebot - wheight + offset);
1098+ }
1099+ }
1100+ }
1101+
1102+ function scrollPage(amount) {
1103+ return function() {
1104+ window.scrollBy(0, amount);
1105+ highlightResult('visible')();
1106+ };
1107+ }
1108+
1109+ function scrollPageTo(position, nav) {
1110+ return function() {
1111+ window.scrollTo(0, position);
1112+ highlightResult(nav)();
1113+ };
1114+ }
1115+
1116+ function searchInputFocus() {
1117+ window.scrollTo(0, 0);
1118+ document.querySelector('#q').focus();
1119+ }
1120+
1121+ function openResult(newTab) {
1122+ return function() {
1123+ var link = document.querySelector('.result[data-vim-selected] h3 a');
1124+ if (link !== null) {
1125+ var url = link.getAttribute('href');
1126+ if (newTab) {
1127+ window.open(url);
1128+ } else {
1129+ window.location.href = url;
1130+ }
1131+ }
1132+ };
1133+ }
1134+
1135+ function toggleHelp() {
1136+ var helpPanel = document.querySelector('#vim-hotkeys-help');
1137+ if (helpPanel.length) {
1138+ helpPanel.classList.toggle('hidden');
1139+ return;
1140+ }
1141+
1142+ var categories = {};
1143+
1144+ for (var k in vimKeys) {
1145+ var key = vimKeys[k];
1146+ categories[key.cat] = categories[key.cat] || [];
1147+ categories[key.cat].push(key);
1148+ }
1149+
1150+ var sorted = Object.keys(categories).sort(function(a, b) {
1151+ return categories[b].length - categories[a].length;
1152+ });
1153+
1154+ if (sorted.length === 0) {
1155+ return;
1156+ }
1157+
1158+ var html = '<div id="vim-hotkeys-help" class="well vim-hotkeys-help">';
1159+ html += '<div class="container-fluid">';
1160+
1161+ html += '<div class="row">';
1162+ html += '<div class="col-sm-12">';
1163+ html += '<h3>How to navigate searx with Vim-like hotkeys</h3>';
1164+ html += '</div>'; // col-sm-12
1165+ html += '</div>'; // row
1166+
1167+ for (var i = 0; i < sorted.length; i++) {
1168+ var cat = categories[sorted[i]];
1169+
1170+ var lastCategory = i === (sorted.length - 1);
1171+ var first = i % 2 === 0;
1172+
1173+ if (first) {
1174+ html += '<div class="row dflex">';
1175+ }
1176+ html += '<div class="col-sm-' + (first && lastCategory ? 12 : 6) + ' dflex">';
1177+
1178+ html += '<div class="panel panel-default iflex">';
1179+ html += '<div class="panel-heading">' + cat[0].cat + '</div>';
1180+ html += '<div class="panel-body">';
1181+ html += '<ul class="list-unstyled">';
1182+
1183+ for (var cj in cat) {
1184+ html += '<li><kbd>' + cat[cj].key + '</kbd> ' + cat[cj].des + '</li>';
1185+ }
1186+
1187+ html += '</ul>';
1188+ html += '</div>'; // panel-body
1189+ html += '</div>'; // panel
1190+ html += '</div>'; // col-sm-*
1191+
1192+ if (!first || lastCategory) {
1193+ html += '</div>'; // row
1194+ }
1195+ }
1196+
1197+ html += '</div>'; // container-fluid
1198+ html += '</div>'; // vim-hotkeys-help
1199+
1200+ $('body').append(html);
1201+ }
1202+});
1203+;/**
1204+* searx is free software: you can redistribute it and/or modify
1205+* it under the terms of the GNU Affero General Public License as published by
1206+* the Free Software Foundation, either version 3 of the License, or
1207+* (at your option) any later version.
1208+*
1209+* searx is distributed in the hope that it will be useful,
1210+* but WITHOUT ANY WARRANTY; without even the implied warranty of
1211+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1212+* GNU Affero General Public License for more details.
1213+*
1214+* You should have received a copy of the GNU Affero General Public License
1215+* along with searx. If not, see < http://www.gnu.org/licenses/ >.
1216+*
1217+* (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
1218+* (C) 2017 by Alexandre Flament, <alex@al-f.net>
1219+*/
1220+(function (w, d, searx) {
1221+ 'use strict';
1222+
1223+ searx.ready(function () {
1224+ searx.on('.searx_overpass_request', 'click', function(event) {
1225+ // no more request
1226+ this.classList.remove("searx_overpass_request");
1227+
1228+ //
1229+ var overpass_url = "https://overpass-api.de/api/interpreter?data=";
1230+ var query_start = overpass_url + "[out:json][timeout:25];(";
1231+ var query_end = ");out meta;";
1232+
1233+ var osm_id = this.dataset.osmId;
1234+ var osm_type = this.dataset.osmType;
1235+ var result_table = d.querySelector("#" + this.dataset.resultTable);
1236+ var result_table_loadicon = d.querySelector("#" + this.dataset.resultTableLoadicon);
1237+
1238+ // tags which can be ignored
1239+ var osm_ignore_tags = [ "addr:city", "addr:country", "addr:housenumber", "addr:postcode", "addr:street" ];
1240+
1241+ if(osm_id && osm_type && result_table) {
1242+ var query = null;
1243+ switch(osm_type) {
1244+ case 'node':
1245+ query = query_start + "node(" + osm_id + ");" + query_end;
1246+ break;
1247+ case 'way':
1248+ query = query_start + "way(" + osm_id + ");" + query_end;
1249+ break;
1250+ case 'relation':
1251+ query = query_start + "relation(" + osm_id + ");" + query_end;
1252+ break;
1253+ default:
1254+ break;
1255+ }
1256+ if(query) {
1257+ // console.log(query);
1258+ searx.http( 'GET', query ).then(function(html, contentType) {
1259+ html = JSON.parse(html);
1260+ if(html && html.elements && html.elements[0]) {
1261+ var element = html.elements[0];
1262+ var newHtml = "";
1263+ for (var row in element.tags) {
1264+ if(element.tags.name === null || osm_ignore_tags.indexOf(row) == -1) {
1265+ newHtml += "<tr><td>" + row + "</td><td>";
1266+ switch(row) {
1267+ case "phone":
1268+ case "fax":
1269+ newHtml += "<a href=\"tel:" + element.tags[row].replace(/ /g,'') + "\">" + element.tags[row] + "</a>";
1270+ break;
1271+ case "email":
1272+ newHtml += "<a href=\"mailto:" + element.tags[row] + "\">" + element.tags[row] + "</a>";
1273+ break;
1274+ case "website":
1275+ case "url":
1276+ newHtml += "<a href=\"" + element.tags[row] + "\">" + element.tags[row] + "</a>";
1277+ break;
1278+ case "wikidata":
1279+ newHtml += "<a href=\"https://www.wikidata.org/wiki/" + element.tags[row] + "\">" + element.tags[row] + "</a>";
1280+ break;
1281+ case "wikipedia":
1282+ if(element.tags[row].indexOf(":") != -1) {
1283+ 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>";
1284+ break;
1285+ }
1286+ /* jshint ignore:start */
1287+ default:
1288+ /* jshint ignore:end */
1289+ newHtml += element.tags[row];
1290+ break;
1291+ }
1292+ newHtml += "</td></tr>";
1293+ }
1294+ }
1295+ result_table_loadicon.classList.add('invisible');
1296+ result_table.classList.remove('invisible');
1297+ result_table.querySelector("tbody").innerHTML = newHtml;
1298+ }
1299+ })
1300+ .catch(function() {
1301+ result_table_loadicon.innerHTML = result_table_loadicon.innerHTML + "<p class=\"text-muted\">could not load data!</p>";
1302+ });
1303+ }
1304+ }
1305+
1306+ // this event occour only once per element
1307+ event.preventDefault();
1308+ });
1309+
1310+ searx.on('.searx_init_map', 'click', function(event) {
1311+ // no more request
1312+ this.classList.remove("searx_init_map");
1313+
1314+ //
1315+ var leaflet_target = this.dataset.leafletTarget;
1316+ var map_lon = parseFloat(this.dataset.mapLon);
1317+ var map_lat = parseFloat(this.dataset.mapLat);
1318+ var map_zoom = parseFloat(this.dataset.mapZoom);
1319+ var map_boundingbox = JSON.parse(this.dataset.mapBoundingbox);
1320+ var map_geojson = JSON.parse(this.dataset.mapGeojson);
1321+
1322+ searx.loadStyle('leaflet/leaflet.css');
1323+ searx.loadScript('leaflet/leaflet.js', function() {
1324+ var map_bounds = null;
1325+ if(map_boundingbox) {
1326+ var southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]);
1327+ var northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]);
1328+ map_bounds = L.latLngBounds(southWest, northEast);
1329+ }
1330+
1331+ // init map
1332+ var map = L.map(leaflet_target);
1333+ // create the tile layer with correct attribution
1334+ var osmMapnikUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
1335+ var osmMapnikAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
1336+ var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib});
1337+ var osmWikimediaUrl='https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png';
1338+ var osmWikimediaAttrib = 'Wikimedia maps beta | Maps data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
1339+ var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib});
1340+ // init map view
1341+ if(map_bounds) {
1342+ // TODO hack: https://github.com/Leaflet/Leaflet/issues/2021
1343+ // Still useful ?
1344+ setTimeout(function () {
1345+ map.fitBounds(map_bounds, {
1346+ maxZoom:17
1347+ });
1348+ }, 0);
1349+ } else if (map_lon && map_lat) {
1350+ if(map_zoom) {
1351+ map.setView(new L.latLng(map_lat, map_lon),map_zoom);
1352+ } else {
1353+ map.setView(new L.latLng(map_lat, map_lon),8);
1354+ }
1355+ }
1356+
1357+ map.addLayer(osmMapnik);
1358+
1359+ var baseLayers = {
1360+ "OSM Mapnik": osmMapnik/*,
1361+ "OSM Wikimedia": osmWikimedia*/
1362+ };
1363+
1364+ L.control.layers(baseLayers).addTo(map);
1365+
1366+ if(map_geojson) {
1367+ L.geoJson(map_geojson).addTo(map);
1368+ } /*else if(map_bounds) {
1369+ L.rectangle(map_bounds, {color: "#ff7800", weight: 3, fill:false}).addTo(map);
1370+ }*/
1371+ });
1372+
1373+ // this event occour only once per element
1374+ event.preventDefault();
1375+ });
1376+ });
1377+})(window, document, window.searx);
1378+;/**
1379+* searx is free software: you can redistribute it and/or modify
1380+* it under the terms of the GNU Affero General Public License as published by
1381+* the Free Software Foundation, either version 3 of the License, or
1382+* (at your option) any later version.
1383+*
1384+* searx is distributed in the hope that it will be useful,
1385+* but WITHOUT ANY WARRANTY; without even the implied warranty of
1386+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1387+* GNU Affero General Public License for more details.
1388+*
1389+* You should have received a copy of the GNU Affero General Public License
1390+* along with searx. If not, see < http://www.gnu.org/licenses/ >.
1391+*
1392+* (C) 2017 by Alexandre Flament, <alex@al-f.net>
1393+*/
1394+(function(w, d, searx) {
1395+ 'use strict';
1396+
1397+ searx.ready(function() {
1398+ searx.image_thumbnail_layout = new searx.ImageLayout('#urls', '#urls .result-images', 'img.image_thumbnail', 200);
1399+ searx.image_thumbnail_layout.watch();
1400+
1401+ searx.on('.btn-collapse', 'click', function(event) {
1402+ var btnLabelCollapsed = this.getAttribute('data-btn-text-collapsed');
1403+ var btnLabelNotCollapsed = this.getAttribute('data-btn-text-not-collapsed');
1404+ var target = this.getAttribute('data-target');
1405+ var targetElement = d.querySelector(target);
1406+ var html = this.innerHTML;
1407+ if (this.classList.contains('collapsed')) {
1408+ html = html.replace(btnLabelCollapsed, btnLabelNotCollapsed);
1409+ } else {
1410+ html = html.replace(btnLabelNotCollapsed, btnLabelCollapsed);
1411+ }
1412+ this.innerHTML = html;
1413+ this.classList.toggle('collapsed');
1414+ targetElement.classList.toggle('invisible');
1415+ });
1416+
1417+ searx.on('.media-loader', 'click', function(event) {
1418+ var target = this.getAttribute('data-target');
1419+ var iframe_load = d.querySelector(target + ' > iframe');
1420+ var srctest = iframe_load.getAttribute('src');
1421+ if (srctest === null || srctest === undefined || srctest === false) {
1422+ iframe_load.setAttribute('src', iframe_load.getAttribute('data-src'));
1423+ }
1424+ });
1425+
1426+ w.addEventListener('scroll', function() {
1427+ var e = d.getElementById('backToTop'),
1428+ scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
1429+ if (e !== null) {
1430+ if (scrollTop >= 200) {
1431+ e.style.opacity = 1;
1432+ } else {
1433+ e.style.opacity = 0;
1434+ }
1435+ }
1436+ });
1437+
1438+ });
1439+
1440+})(window, document, window.searx);
1441+;/**
1442+* searx is free software: you can redistribute it and/or modify
1443+* it under the terms of the GNU Affero General Public License as published by
1444+* the Free Software Foundation, either version 3 of the License, or
1445+* (at your option) any later version.
1446+*
1447+* searx is distributed in the hope that it will be useful,
1448+* but WITHOUT ANY WARRANTY; without even the implied warranty of
1449+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1450+* GNU Affero General Public License for more details.
1451+*
1452+* You should have received a copy of the GNU Affero General Public License
1453+* along with searx. If not, see < http://www.gnu.org/licenses/ >.
1454+*
1455+* (C) 2017 by Alexandre Flament, <alex@al-f.net>
1456+*/
1457+(function(w, d, searx) {
1458+ 'use strict';
1459+
1460+ var firstFocus = true, qinput_id = "q", qinput;
1461+
1462+ function placeCursorAtEnd(element) {
1463+ if (element.setSelectionRange) {
1464+ var len = element.value.length;
1465+ element.setSelectionRange(len, len);
1466+ }
1467+ }
1468+
1469+ function submitIfQuery() {
1470+ if (qinput.value.length > 0) {
1471+ var search = document.getElementById('search');
1472+ setTimeout(search.submit.bind(search), 0);
1473+ }
1474+ }
1475+
1476+ searx.ready(function() {
1477+ qinput = d.getElementById(qinput_id);
1478+
1479+ function placeCursorAtEndOnce(e) {
1480+ if (firstFocus) {
1481+ placeCursorAtEnd(qinput);
1482+ firstFocus = false;
1483+ } else {
1484+ // e.preventDefault();
1485+ }
1486+ }
1487+
1488+ if (qinput !== null) {
1489+ // autocompleter
1490+ if (searx.autocompleter) {
1491+ searx.autocomplete = AutoComplete.call(w, {
1492+ Url: "./autocompleter",
1493+ EmptyMessage: searx.noItemFound,
1494+ HttpMethod: searx.method,
1495+ MinChars: 4,
1496+ Delay: 300,
1497+ }, "#" + qinput_id);
1498+
1499+ // hack, see : https://github.com/autocompletejs/autocomplete.js/issues/37
1500+ w.addEventListener('resize', function() {
1501+ var event = new CustomEvent("position");
1502+ qinput.dispatchEvent(event);
1503+ });
1504+ }
1505+
1506+ qinput.addEventListener('focus', placeCursorAtEndOnce, false);
1507+ qinput.focus();
1508+ }
1509+
1510+ // vanilla js version of search_on_category_select.js
1511+ if (qinput !== null && searx.search_on_category_select) {
1512+ d.querySelector('.help').className='invisible';
1513+
1514+ searx.on('#categories input', 'change', function(e) {
1515+ var i, categories = d.querySelectorAll('#categories input[type="checkbox"]');
1516+ for(i=0; i<categories.length; i++) {
1517+ if (categories[i] !== this && categories[i].checked) {
1518+ categories[i].click();
1519+ }
1520+ }
1521+ if (! this.checked) {
1522+ this.click();
1523+ }
1524+ submitIfQuery();
1525+ return false;
1526+ });
1527+
1528+ searx.on(d.getElementById('time_range'), 'change', submitIfQuery);
1529+ searx.on(d.getElementById('language'), 'change', submitIfQuery);
1530+ }
1531+
1532+ });
1533+
1534+})(window, document, window.searx);
searx/static/themes/simple/js/searx.min.jsnew file+4
@@ -0,0 +1,4 @@
1+/*! simple/searx.min.js | 06-08-2017 | https://github.com/asciimoo/searx */
2+
3+!function(t,e,n){"use strict";function o(t,e,n){try{t.call(e,n)}catch(t){console.log(t)}}t.Element&&function(t){t.matches=t.matches||t.matchesSelector||t.webkitMatchesSelector||t.msMatchesSelector||function(t){for(var e=this,n=(e.parentNode||e.document).querySelectorAll(t),o=-1;n[++o]&&n[o]!=e;);return!!n[o]}}(Element.prototype),n=n||{},n.on=function(t,n,a,i){i=i||!1,"string"!=typeof t?t.addEventListener(n,a,i):e.addEventListener(n,function(n){for(var i=n.target||n.srcElement,r=!1;i&&i.matches&&i!==e&&!(r=i.matches(t));)i=i.parentElement;r&&o(a,i,n)},i)},n.ready=function(e){"loading"!=document.readyState?e.call(t):t.addEventListener("DOMContentLoaded",e.bind(t))},n.http=function(t,e,n){var o=new XMLHttpRequest,a=function(){},i=function(){},r={then:function(t){return a=t,r},catch:function(t){return i=t,r}};try{o.open(t,e,!0),o.onload=function(){200==o.status?a(o.response,o.responseType):i(Error(o.statusText))},o.onerror=function(){i(Error("Network Error"))},o.onabort=function(){i(Error("Transaction is aborted"))},o.send()}catch(t){i(t)}return r},n.loadStyle=function(t){var o=n.staticPath+t,a="style_"+t.replace(".","_"),i=e.getElementById(a);null===i&&((i=e.createElement("link")).setAttribute("id",a),i.setAttribute("rel","stylesheet"),i.setAttribute("type","text/css"),i.setAttribute("href",o),e.body.appendChild(i))},n.loadScript=function(t,o){var a=n.staticPath+t,i="script_"+t.replace(".","_"),r=e.getElementById(i);if(null===r)(r=e.createElement("script")).setAttribute("id",i),r.setAttribute("src",a),r.onload=o,r.onerror=function(){r.setAttribute("error","1")},e.body.appendChild(r);else if(r.hasAttribute("error"))console.log("callback not executed : script '"+a+"' not loaded.");else try{o.apply(r,[])}catch(t){console.log(t)}},n.on(".close","click",function(t){t.target||t.srcElement;this.parentNode.style.display="None"})}(window,document,window.searx),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).AutoComplete=t()}}(function(){return function t(e,n,o){function a(r,s){if(!n[r]){if(!e[r]){var l="function"==typeof require&&require;if(!s&&l)return l(r,!0);if(i)return i(r,!0);var u=new Error("Cannot find module '"+r+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[r]={exports:{}};e[r][0].call(c.exports,function(t){var n=e[r][1][t];return a(n||t)},c,c.exports,t,e,n,o)}return n[r].exports}for(var i="function"==typeof require&&require,r=0;r<o.length;r++)a(o[r]);return a}({1:[function(t,e,n){"use strict";var o;!function(t){t[t.AND=0]="AND",t[t.OR=1]="OR"}(o||(o={}));var a;!function(t){t[t.KEYDOWN=0]="KEYDOWN",t[t.KEYUP=1]="KEYUP"}(a||(a={}));var i=function(){function t(e,n){if(void 0===e&&(e={}),void 0===n&&(n="[data-autocomplete]"),Array.isArray(n))n.forEach(function(n){new t(e,n)});else{if("string"!=typeof n){var o=t.merge(t.defaults,e,{DOMResults:document.createElement("div")});return t.prototype.create(o,n),o}var a=document.querySelectorAll(n);Array.prototype.forEach.call(a,function(n){new t(e,n)})}}return t.prototype.create=function(e,n){if(e.Input=n,e.Input.nodeName.match(/^INPUT$/i)&&(!1===e.Input.hasAttribute("type")||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:t.prototype.destroy.bind(null,e),focus:e._Focus.bind(e),keyup:t.prototype.event.bind(null,e,a.KEYUP),keydown:t.prototype.event.bind(null,e,a.KEYDOWN),position:e._Position.bind(e)};for(var o in e.$Listeners)e.Input.addEventListener(o,e.$Listeners[o])}},t.prototype.getEventsByType=function(t,e){var n={};for(var o in t.KeyboardMappings){var i=a.KEYUP;void 0!==t.KeyboardMappings[o].Event&&(i=t.KeyboardMappings[o].Event),i==e&&(n[o]=t.KeyboardMappings[o])}return n},t.prototype.event=function(e,n,a){for(var i in t.prototype.getEventsByType(e,n)){var r=t.merge({Operator:o.AND},e.KeyboardMappings[i]),s=o.AND==r.Operator;r.Conditions.forEach(function(e){(!0===s&&r.Operator==o.AND||!1===s&&r.Operator==o.OR)&&((e=t.merge({Not:!1},e)).hasOwnProperty("Is")?s=e.Is==a.keyCode?!e.Not:e.Not:e.hasOwnProperty("From")&&e.hasOwnProperty("To")&&(s=a.keyCode>=e.From&&a.keyCode<=e.To?!e.Not:e.Not))}),!0===s&&r.Callback.call(e,a)}},t.prototype.makeRequest=function(t,e){var n=Object.getOwnPropertyNames(t.HttpHeaders),o=new XMLHttpRequest,a=t._HttpMethod(),i=t._Url(),r=t._Pre(),s=encodeURIComponent(t._QueryArg())+"="+encodeURIComponent(r);a.match(/^GET$/i)&&(-1!==i.indexOf("?")?i+="&"+s:i+="?"+s),o.open(a,i,!0);for(var l=n.length-1;l>=0;l--)o.setRequestHeader(n[l],t.HttpHeaders[n[l]]);return o.onreadystatechange=function(){4==o.readyState&&200==o.status&&(t.$Cache[r]=o.response,e(o.response))},o},t.prototype.ajax=function(e,n,o){void 0===o&&(o=!0),e.$AjaxTimer&&window.clearTimeout(e.$AjaxTimer),!0===o?e.$AjaxTimer=window.setTimeout(t.prototype.ajax.bind(null,e,n,!1),e.Delay):(e.Request&&e.Request.abort(),e.Request=n,e.Request.send(e._QueryArg()+"="+e._Pre()))},t.prototype.cache=function(e,n){var o=e._Cache(e._Pre());if(void 0===o){var a=t.prototype.makeRequest(e,n);t.prototype.ajax(e,a)}else n(o)},t.prototype.destroy=function(t){for(var e in t.$Listeners)t.Input.removeEventListener(e,t.$Listeners[e]);t.DOMResults.parentNode.removeChild(t.DOMResults)},t}();i.merge=function(){for(var t,e={},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(t){return new RegExp(t,"ig")},transform:function(t){return"<strong>"+t+"</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:!1}],Callback:function(t){if(-1!=this.DOMResults.getAttribute("class").indexOf("open")){var e=this.DOMResults.querySelector("li.active");null!==e&&(t.preventDefault(),this._Select(e),this.DOMResults.setAttribute("class","autocomplete"))}},Operator:o.AND,Event:a.KEYDOWN},KeyUpAndDown_down:{Conditions:[{Is:38,Not:!1},{Is:40,Not:!1}],Callback:function(t){t.preventDefault()},Operator:o.OR,Event:a.KEYDOWN},KeyUpAndDown_up:{Conditions:[{Is:38,Not:!1},{Is:40,Not:!1}],Callback:function(t){t.preventDefault();var e=this.DOMResults.querySelector("li:first-child:not(.locked)"),n=this.DOMResults.querySelector("li:last-child:not(.locked)"),o=this.DOMResults.querySelector("li.active");if(o){var a=Array.prototype.indexOf.call(o.parentNode.children,o)+(t.keyCode-39),i=this.DOMResults.getElementsByTagName("li").length;a<0?a=i-1:a>=i&&(a=0),o.classList.remove("active"),o.parentElement.children.item(a).classList.add("active")}else n&&38==t.keyCode?n.classList.add("active"):e&&e.classList.add("active")},Operator:o.OR,Event:a.KEYUP},AlphaNum:{Conditions:[{Is:13,Not:!0},{From:35,To:40,Not:!0}],Callback:function(){var t=this.Input.getAttribute("data-autocomplete-old-value"),e=this._Pre();""!==e&&e.length>=this._MinChars()&&(t&&e==t||this.DOMResults.setAttribute("class","autocomplete open"),i.prototype.cache(this,function(t){this._Render(this._Post(t)),this._Open()}.bind(this)))},Operator:o.AND,Event:a.KEYUP}},DOMResults:null,Request:null,Input:null,_EmptyMessage:function(){return this.Input.hasAttribute("data-autocomplete-empty-message")?this.Input.getAttribute("data-autocomplete-empty-message"):!1!==this.EmptyMessage?this.EmptyMessage:""},_Limit:function(){var t=this.Input.getAttribute("data-autocomplete-limit");return isNaN(t)||null===t?this.Limit:parseInt(t,10)},_MinChars:function(){var t=this.Input.getAttribute("data-autocomplete-minchars");return isNaN(t)||null===t?this.MinChars:parseInt(t,10)},_Highlight:function(t){return t.replace(this.Highlight.getRegex(this._Pre()),this.Highlight.transform)},_HttpMethod:function(){return this.Input.hasAttribute("data-autocomplete-method")?this.Input.getAttribute("data-autocomplete-method"):this.HttpMethod},_QueryArg:function(){return this.Input.hasAttribute("data-autocomplete-param-name")?this.Input.getAttribute("data-autocomplete-param-name"):this.QueryArg},_Url:function(){return this.Input.hasAttribute("data-autocomplete")?this.Input.getAttribute("data-autocomplete"):this.Url},_Blur:function(t){if(!0===t)this.DOMResults.setAttribute("class","autocomplete"),this.Input.setAttribute("data-autocomplete-old-value",this.Input.value);else{var e=this;setTimeout(function(){e._Blur(!0)},150)}},_Cache:function(t){return this.$Cache[t]},_Focus:function(){var t=this.Input.getAttribute("data-autocomplete-old-value");(!t||this.Input.value!=t)&&this._MinChars()<=this.Input.value.length&&this.DOMResults.setAttribute("class","autocomplete open")},_Open:function(){var t=this;Array.prototype.forEach.call(this.DOMResults.getElementsByTagName("li"),function(e){"locked"!=e.getAttribute("class")&&(e.onclick=function(n){t._Select(e)},e.onmouseenter=function(){var n=t.DOMResults.querySelector("li.active");n!==e&&(null!==n&&n.classList.remove("active"),e.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(t){var e;e="string"==typeof t?this._RenderRaw(t):this._RenderResponseItems(t),this.DOMResults.hasChildNodes()&&this.DOMResults.removeChild(this.DOMResults.childNodes[0]),this.DOMResults.appendChild(e)},_RenderResponseItems:function(t){var e=document.createElement("ul"),n=document.createElement("li"),o=this._Limit();o<0?t=t.reverse():0===o&&(o=t.length);for(var a=0;a<Math.min(Math.abs(o),t.length);a++)n.innerHTML=t[a].Label,n.setAttribute("data-autocomplete-value",t[a].Value),e.appendChild(n),n=document.createElement("li");return e},_RenderRaw:function(t){var e=document.createElement("ul"),n=document.createElement("li");if(t.length>0)this.DOMResults.innerHTML=t;else{var o=this._EmptyMessage();""!==o&&(n.innerHTML=o,n.setAttribute("class","locked"),e.appendChild(n))}return e},_Post:function(t){try{var e=[],n=JSON.parse(t);if(0===Object.keys(n).length)return"";if(Array.isArray(n))for(var o=0;o<Object.keys(n).length;o++)e[e.length]={Value:n[o],Label:this._Highlight(n[o])};else for(var a in n)e.push({Value:a,Label:this._Highlight(n[a])});return e}catch(e){return t}},_Pre:function(){return this.Input.value},_Select:function(t){console.log("test test test"),t.hasAttribute("data-autocomplete-value")?this.Input.value=t.getAttribute("data-autocomplete-value"):this.Input.value=t.innerHTML,this.Input.setAttribute("data-autocomplete-old-value",this.Input.value)},$AjaxTimer:null,$Cache:{},$Listeners:{}},e.exports=i},{}]},{},[1])(1)}),function(t,e){"use strict";function n(t,e,n,o){this.container_selector=t,this.results_selector=e,this.img_selector=n,this.margin=10,this.maxHeight=o,this._alignAllDone=!0}n.prototype._getHeigth=function(t,e){var n,o=0;e-=t.length*this.margin;for(var a=0;a<t.length;a++)(n=t[a]).naturalWidth>0&&n.naturalHeight>0?o+=n.naturalWidth/n.naturalHeight:o+=1;return e/o},n.prototype._setSize=function(t,e){for(var n,o,a=t.length,i=0;i<a;i++)o=(n=t[i]).naturalWidth>0&&n.naturalHeight>0?e*n.naturalWidth/n.naturalHeight:e,n.style.width=o+"px",n.style.height=e+"px",n.style.marginLeft="3px",n.style.marginTop="3px",n.style.marginRight=this.margin-7+"px",n.style.marginBottom=this.margin-7+"px"},n.prototype._alignImgs=function(t){var n,o,a=e.querySelector(this.container_selector).clientWidth;t:for(;t.length>0;){for(var i=1;i<=t.length;i++)if(n=t.slice(0,i),(o=this._getHeigth(n,a))<this.maxHeight){this._setSize(n,o),t=t.slice(i);continue t}this._setSize(n,Math.min(this.maxHeight,o));break}},n.prototype.align=function(t){for(var n=e.querySelectorAll(this.results_selector),o=n.length,a=null,i=null,r=[],s=0;s<o;s++)(i=n[s]).previousElementSibling!==a&&r.length>0&&(this._alignImgs(r),r=[]),r.push(i.querySelector(this.img_selector)),a=i;r.length>0&&this._alignImgs(r)},n.prototype.watch=function(){function n(t){i._alignAllDone&&(i._alignAllDone=!1,setTimeout(function(){i.align(),i._alignAllDone=!0},100))}var o,a,i=this,r=e.querySelectorAll(this.results_selector),s=r.length;for(t.addEventListener("resize",n),t.addEventListener("pageshow",function(t){i.align()}),o=0;o<s;o++)void 0!==(a=r[o].querySelector(this.img_selector))&&(a.addEventListener("load",n),a.addEventListener("error",n))},t.searx.ImageLayout=n}(window,document),searx.ready(function(){function t(t){return function(e){var o=document.querySelector(".result[data-vim-selected]"),a=t;if(null===o){if(null===(o=document.querySelector(".result")))return;"down"!==t&&"up"!==t||(a=o)}var i,r=document.querySelectorAll(".result");if("string"!=typeof a)i=a;else switch(a){case"visible":for(var s=document.documentElement.scrollTop||document.body.scrollTop,l=s+document.documentElement.clientHeight,u=0;u<r.length;u++){var c=(i=r[u]).offsetTop;if(c+i.clientHeight<=l&&c>s)break}break;case"down":null===(i=o.nextElementSibling)&&(i=r[0]);break;case"up":null===(i=o.previousElementSibling)&&(i=r[r.length-1]);break;case"bottom":i=r[r.length-1];break;case"top":default:i=r[0]}if(i){o.removeAttribute("data-vim-selected"),i.setAttribute("data-vim-selected","true");var d=i.querySelector("h3 a")||i.querySelector("a");null!==d&&d.focus(),e||n()}}}function e(t){return function(){var e=$('div#pagination button[type="submit"]');2===e.length?t>=0&&t<e.length?e[t].click():console.log("pageButtonClick(): invalid argument"):console.log("page navigation with this theme is not supported")}}function n(){var t=document.querySelector(".result[data-vim-selected]");if(null!==t){var e=document.documentElement.scrollTop||document.body.scrollTop,n=document.documentElement.clientHeight,o=t.offsetTop,a=o+t.clientHeight;null===t.previousElementSibling&&a<n?window.scroll(window.scrollX,0):e>o-120?window.scroll(window.scrollX,o-120):e+n<a+120&&window.scroll(window.scrollX,a-n+120)}}function o(e){return function(){window.scrollBy(0,e),t("visible")()}}function a(e,n){return function(){window.scrollTo(0,e),t(n)()}}function i(t){return function(){var e=document.querySelector(".result[data-vim-selected] h3 a");if(null!==e){var n=e.getAttribute("href");t?window.open(n):window.location.href=n}}}searx.on(".result","click",function(){t(this)(!0)}),searx.on(".result a","focus",function(e){for(var n=e.target;void 0!==n;){if(n.classList.contains("result")){null===n.getAttribute("data-vim-selected")&&t(n)(!0);break}n=n.parentNode}},!0);var r={27:{key:"Escape",fun:function(){document.activeElement&&document.activeElement.blur()},des:"remove focus from the focused input",cat:"Control"},73:{key:"i",fun:function(){window.scrollTo(0,0),document.querySelector("#q").focus()},des:"focus on the search input",cat:"Control"},66:{key:"b",fun:o(-window.innerHeight),des:"scroll one page up",cat:"Navigation"},70:{key:"f",fun:o(window.innerHeight),des:"scroll one page down",cat:"Navigation"},85:{key:"u",fun:o(-window.innerHeight/2),des:"scroll half a page up",cat:"Navigation"},68:{key:"d",fun:o(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:t("up"),des:"select previous search result",cat:"Results"},74:{key:"j",fun:t("down"),des:"select next search result",cat:"Results"},80:{key:"p",fun:e(0),des:"go to previous page",cat:"Results"},78:{key:"n",fun:e(1),des:"go to next page",cat:"Results"},79:{key:"o",fun:i(!1),des:"open search result",cat:"Results"},84:{key:"t",fun:i(!0),des:"open the result in a new tab",cat:"Results"},82:{key:"r",fun:function(){document.location.reload(!0)},des:"reload page from the server",cat:"Control"},72:{key:"h",fun:function(){var t=document.querySelector("#vim-hotkeys-help");if(t.length)t.classList.toggle("hidden");else{var e={};for(var n in r){var o=r[n];e[o.cat]=e[o.cat]||[],e[o.cat].push(o)}var a=Object.keys(e).sort(function(t,n){return e[n].length-e[t].length});if(0!==a.length){var i='<div id="vim-hotkeys-help" class="well vim-hotkeys-help">';i+='<div class="container-fluid">',i+='<div class="row">',i+='<div class="col-sm-12">',i+="<h3>How to navigate searx with Vim-like hotkeys</h3>",i+="</div>",i+="</div>";for(var s=0;s<a.length;s++){var l=e[a[s]],u=s===a.length-1,c=s%2==0;c&&(i+='<div class="row dflex">'),i+='<div class="col-sm-'+(c&&u?12:6)+' dflex">',i+='<div class="panel panel-default iflex">',i+='<div class="panel-heading">'+l[0].cat+"</div>",i+='<div class="panel-body">',i+='<ul class="list-unstyled">';for(var d in l)i+="<li><kbd>"+l[d].key+"</kbd> "+l[d].des+"</li>";i+="</ul>",i+="</div>",i+="</div>",i+="</div>",c&&!u||(i+="</div>")}i+="</div>",i+="</div>",$("body").append(i)}}},des:"toggle help window",cat:"Other"}};searx.on(document,"keyup",function(t){if(r.hasOwnProperty(t.keyCode)&&!t.ctrlKey&&!t.altKey&&!t.shiftKey&&!t.metaKey){var e=t.target.tagName.toLowerCase();27===t.keyCode?"input"!==e&&"select"!==e&&"textarea"!==e||r[t.keyCode].fun():t.target!==document.body&&"a"!==e&&"button"!==e||r[t.keyCode].fun()}})}),function(t,e,n){"use strict";n.ready(function(){n.on(".searx_overpass_request","click",function(t){this.classList.remove("searx_overpass_request");var o="https://overpass-api.de/api/interpreter?data=[out:json][timeout:25];(",a=this.dataset.osmId,i=this.dataset.osmType,r=e.querySelector("#"+this.dataset.resultTable),s=e.querySelector("#"+this.dataset.resultTableLoadicon),l=["addr:city","addr:country","addr:housenumber","addr:postcode","addr:street"];if(a&&i&&r){var u=null;switch(i){case"node":u=o+"node("+a+"););out meta;";break;case"way":u=o+"way("+a+"););out meta;";break;case"relation":u=o+"relation("+a+"););out meta;"}u&&n.http("GET",u).then(function(t,e){if((t=JSON.parse(t))&&t.elements&&t.elements[0]){var n=t.elements[0],o="";for(var a in n.tags)if(null===n.tags.name||-1==l.indexOf(a)){switch(o+="<tr><td>"+a+"</td><td>",a){case"phone":case"fax":o+='<a href="tel:'+n.tags[a].replace(/ /g,"")+'">'+n.tags[a]+"</a>";break;case"email":o+='<a href="mailto:'+n.tags[a]+'">'+n.tags[a]+"</a>";break;case"website":case"url":o+='<a href="'+n.tags[a]+'">'+n.tags[a]+"</a>";break;case"wikidata":o+='<a href="https://www.wikidata.org/wiki/'+n.tags[a]+'">'+n.tags[a]+"</a>";break;case"wikipedia":if(-1!=n.tags[a].indexOf(":")){o+='<a href="https://'+n.tags[a].substring(0,n.tags[a].indexOf(":"))+".wikipedia.org/wiki/"+n.tags[a].substring(n.tags[a].indexOf(":")+1)+'">'+n.tags[a]+"</a>";break}default:o+=n.tags[a]}o+="</td></tr>"}s.classList.add("invisible"),r.classList.remove("invisible"),r.querySelector("tbody").innerHTML=o}}).catch(function(){s.innerHTML=s.innerHTML+'<p class="text-muted">could not load data!</p>'})}t.preventDefault()}),n.on(".searx_init_map","click",function(t){this.classList.remove("searx_init_map");var e=this.dataset.leafletTarget,o=parseFloat(this.dataset.mapLon),a=parseFloat(this.dataset.mapLat),i=parseFloat(this.dataset.mapZoom),r=JSON.parse(this.dataset.mapBoundingbox),s=JSON.parse(this.dataset.mapGeojson);n.loadStyle("leaflet/leaflet.css"),n.loadScript("leaflet/leaflet.js",function(){var t=null;if(r){var n=L.latLng(r[0],r[2]),l=L.latLng(r[1],r[3]);t=L.latLngBounds(n,l)}var u=L.map(e),c=new L.TileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{minZoom:1,maxZoom:19,attribution:'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors'});new L.TileLayer("https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png",{minZoom:1,maxZoom:19,attribution:'Wikimedia maps beta | Maps data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors'});t?setTimeout(function(){u.fitBounds(t,{maxZoom:17})},0):o&&a&&(i?u.setView(new L.latLng(a,o),i):u.setView(new L.latLng(a,o),8)),u.addLayer(c);var d={"OSM Mapnik":c};L.control.layers(d).addTo(u),s&&L.geoJson(s).addTo(u)}),t.preventDefault()})})}(window,document,window.searx),function(t,e,n){"use strict";n.ready(function(){n.image_thumbnail_layout=new n.ImageLayout("#urls","#urls .result-images","img.image_thumbnail",200),n.image_thumbnail_layout.watch(),n.on(".btn-collapse","click",function(t){var n=this.getAttribute("data-btn-text-collapsed"),o=this.getAttribute("data-btn-text-not-collapsed"),a=this.getAttribute("data-target"),i=e.querySelector(a),r=this.innerHTML;r=this.classList.contains("collapsed")?r.replace(n,o):r.replace(o,n),this.innerHTML=r,this.classList.toggle("collapsed"),i.classList.toggle("invisible")}),n.on(".media-loader","click",function(t){var n=this.getAttribute("data-target"),o=e.querySelector(n+" > iframe"),a=o.getAttribute("src");null!==a&&void 0!==a&&!1!==a||o.setAttribute("src",o.getAttribute("data-src"))}),t.addEventListener("scroll",function(){var t=e.getElementById("backToTop"),n=document.documentElement.scrollTop||document.body.scrollTop;null!==t&&(t.style.opacity=n>=200?1:0)})})}(window,document,window.searx),function(t,e,n){"use strict";function o(t){if(t.setSelectionRange){var e=t.value.length;t.setSelectionRange(e,e)}}function a(){if(i.value.length>0){var t=document.getElementById("search");setTimeout(t.submit.bind(t),0)}}var i,r=!0;n.ready(function(){null!==(i=e.getElementById("q"))&&(n.autocompleter&&(n.autocomplete=AutoComplete.call(t,{Url:"./autocompleter",EmptyMessage:n.noItemFound,HttpMethod:n.method,MinChars:4,Delay:300},"#q"),t.addEventListener("resize",function(){var t=new CustomEvent("position");i.dispatchEvent(t)})),i.addEventListener("focus",function(t){r&&(o(i),r=!1)},!1),i.focus()),null!==i&&n.search_on_category_select&&(e.querySelector(".help").className="invisible",n.on("#categories input","change",function(t){var n,o=e.querySelectorAll('#categories input[type="checkbox"]');for(n=0;n<o.length;n++)o[n]!==this&&o[n].checked&&o[n].click();return this.checked||this.click(),a(),!1}),n.on(e.getElementById("time_range"),"change",a),n.on(e.getElementById("language"),"change",a))})}(window,document,window.searx);
4+//# sourceMappingURL=searx.min.js.map
searx/static/themes/simple/js/searx.min.js.mapnew file+1
@@ -0,0 +1 @@
1+{"version":3,"sources":["searx.js"],"names":["w","d","searx","callbackSafe","callback","el","e","call","exception","console","log","Element","ElementPrototype","matches","matchesSelector","webkitMatchesSelector","msMatchesSelector","selector","node","this","nodes","parentNode","document","querySelectorAll","i","prototype","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","staticPath","id","replace","s","getElementById","createElement","setAttribute","body","appendChild","loadScript","hasAttribute","apply","style","display","window","f","exports","module","define","amd","global","self","AutoComplete","t","n","r","o","u","a","require","code","l","length","1","ConditionOperator","EventType","params","Array","isArray","forEach","specificParams","merge","defaults","DOMResults","create","elements","input","element","Input","nodeName","match","getAttribute","_Position","$Listeners","blur","_Blur","destroy","focus","_Focus","keyup","event","KEYUP","keydown","KEYDOWN","position","getEventsByType","type","mappings","key","KeyboardMappings","undefined","Event","name","mapping","Operator","AND","Conditions","condition","OR","Not","hasOwnProperty","Is","keyCode","From","To","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","children","lisCount","getElementsByTagName","classList","remove","item","add","AlphaNum","oldValue","currentValue","_MinChars","_Render","_Post","_Open","_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","emptyMessage","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","marginLeft","marginTop","marginRight","marginBottom","_alignImgs","imgGroup","slice","h","containerWidth","align","results_selectorNode","results_length","previous","current","previousElementSibling","watch","throttleAlign","results_nodes","highlightResult","which","noScroll","effectiveWhich","next","results","top","documentElement","scrollTop","bot","clientHeight","etop","nextElementSibling","removeAttribute","link","scrollPageToSelected","pageButtonClick","num","buttons","$","click","sel","wtop","wheight","ebot","scroll","scrollX","scrollPage","amount","scrollBy","scrollPageTo","nav","scrollTo","openResult","newTab","location","href","contains","vimKeys","27","fun","activeElement","des","cat","73","66","innerHeight","70","85","68","71","scrollHeight","86","75","74","80","78","79","84","82","reload","72","helpPanel","toggle","categories","k","sorted","sort","b","html","lastCategory","cj","append","ctrlKey","altKey","shiftKey","metaKey","tagName","toLowerCase","query_start","overpass_url","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","osmMapnik","TileLayer","minZoom","maxZoom","attribution","fitBounds","setView","addLayer","baseLayers","OSM Mapnik","control","layers","addTo","geoJson","image_thumbnail_layout","btnLabelCollapsed","btnLabelNotCollapsed","targetElement","iframe_load","srctest","opacity","placeCursorAtEnd","setSelectionRange","len","submitIfQuery","qinput","search","submit","firstFocus","autocompleter","autocomplete","noItemFound","CustomEvent","dispatchEvent","search_on_category_select","className","checked"],"mappings":";;CAiBA,SAAUA,EAAGC,EAAGC,GAEd,aAoBA,SAASC,EAAaC,EAAUC,EAAIC,GAClC,IACEF,EAASG,KAAKF,EAAIC,GAClB,MAAOE,GACPC,QAAQC,IAAIF,IAlBZR,EAAEW,SACJ,SAAUC,GACRA,EAAiBC,QAAUD,EAAiBC,SAC5CD,EAAiBE,iBACjBF,EAAiBG,uBACjBH,EAAiBI,mBACjB,SAASC,GAEP,IADA,IAAIC,EAAOC,KAAMC,GAASF,EAAKG,YAAcH,EAAKI,UAAUC,iBAAiBN,GAAWO,GAAK,EACtFJ,IAAQI,IAAMJ,EAAMI,IAAMN,IACjC,QAASE,EAAMI,IARnB,CAUGb,QAAQc,WAWbvB,EAAQA,MAERA,EAAMwB,GAAK,SAASC,EAAKC,EAAWxB,EAAUyB,GAC5CA,EAAaA,IAAc,EACR,iBAARF,EAETA,EAAIG,iBAAiBF,EAAWxB,EAAUyB,GAG1C5B,EAAE6B,iBAAiBF,EAAW,SAAStB,GAErC,IADA,IAAID,EAAKC,EAAEyB,QAAUzB,EAAE0B,WAAYC,GAAQ,EACpC5B,GAAMA,EAAGQ,SAAWR,IAAOJ,KAAOgC,EAAQ5B,EAAGQ,QAAQc,KAAOtB,EAAKA,EAAG6B,cACvED,GAAO9B,EAAaC,EAAUC,EAAIC,IACrCuB,IAIP3B,EAAMiC,MAAQ,SAAS/B,GACM,WAAvBkB,SAASc,WACXhC,EAASG,KAAKP,GAEdA,EAAE8B,iBAAiB,mBAAoB1B,EAASiC,KAAKrC,KAIzDE,EAAMoC,KAAO,SAASC,EAAQC,EAAKpC,GACjC,IAAIqC,EAAM,IAAIC,eACdC,EAAU,aACVC,EAAS,aACTC,GACEC,KAAM,SAAS1C,GAAgC,OAApBuC,EAAUvC,EAAiByC,GACtDE,MAAO,SAAS3C,GAA+B,OAAnBwC,EAASxC,EAAiByC,IAGxD,IACEJ,EAAIO,KAAKT,EAAQC,GAAK,GAGtBC,EAAIQ,OAAS,WACO,KAAdR,EAAIS,OACNP,EAAQF,EAAIU,SAAUV,EAAIW,cAE1BR,EAAOS,MAAMZ,EAAIa,cAKrBb,EAAIc,QAAU,WACZX,EAAOS,MAAM,mBAGfZ,EAAIe,QAAU,WACZZ,EAAOS,MAAM,4BAIfZ,EAAIgB,OACJ,MAAOC,GACPd,EAAOc,GAGT,OAAOb,GAGT3C,EAAMyD,UAAY,SAASC,GACzB,IAAIC,EAAO3D,EAAM4D,WAAaF,EAC9BG,EAAK,SAAWH,EAAII,QAAQ,IAAK,KACjCC,EAAIhE,EAAEiE,eAAeH,GACX,OAANE,KACFA,EAAIhE,EAAEkE,cAAc,SAClBC,aAAa,KAAML,GACrBE,EAAEG,aAAa,MAAO,cACtBH,EAAEG,aAAa,OAAQ,YACvBH,EAAEG,aAAa,OAAQP,GACvB5D,EAAEoE,KAAKC,YAAYL,KAIvB/D,EAAMqE,WAAa,SAASX,EAAKxD,GAC/B,IAAIyD,EAAO3D,EAAM4D,WAAaF,EAC9BG,EAAK,UAAYH,EAAII,QAAQ,IAAK,KAClCC,EAAIhE,EAAEiE,eAAeH,GACrB,GAAU,OAANE,GACFA,EAAIhE,EAAEkE,cAAc,WAClBC,aAAa,KAAML,GACrBE,EAAEG,aAAa,MAAOP,GACtBI,EAAEhB,OAAS7C,EACX6D,EAAEV,QAAU,WACVU,EAAEG,aAAa,QAAS,MAE1BnE,EAAEoE,KAAKC,YAAYL,QACd,GAAKA,EAAEO,aAAa,SAOzB/D,QAAQC,IAAI,mCAAqCmD,EAAO,sBANxD,IACEzD,EAASqE,MAAMR,MACf,MAAOzD,GACPC,QAAQC,IAAIF,KAOlBN,EAAMwB,GAAG,SAAU,QAAS,SAASpB,GAC1BA,EAAEyB,QAAUzB,EAAE0B,WACvBb,KAAKE,WAAWqD,MAAMC,QAAQ,SAtIlC,CAyIGC,OAAQtD,SAAUsD,OAAO1E,OAC3B,SAAU2E,GAAG,GAAoB,iBAAVC,SAAoC,oBAATC,OAAsBA,OAAOD,QAAQD,SAAS,GAAmB,mBAATG,QAAqBA,OAAOC,IAAKD,UAAUH,OAAO,EAA0B,oBAATD,OAAwBA,OAA+B,oBAATM,OAAwBA,OAA6B,oBAAPC,KAAsBA,KAAYhE,MAAOiE,aAAeP,KAAjU,CAAwU,WAAqC,OAAO,SAAUvE,EAAE+E,EAAEC,EAAEC,GAAG,SAAStB,EAAEuB,EAAEC,GAAG,IAAIH,EAAEE,GAAG,CAAC,IAAIH,EAAEG,GAAG,CAAC,IAAIE,EAAkB,mBAATC,SAAqBA,QAAQ,IAAIF,GAAGC,EAAE,OAAOA,EAAEF,GAAE,GAAI,GAAGhE,EAAE,OAAOA,EAAEgE,GAAE,GAAI,IAAIX,EAAE,IAAIxB,MAAM,uBAAuBmC,EAAE,KAAK,MAAMX,EAAEe,KAAK,mBAAmBf,EAAE,IAAIgB,EAAEP,EAAEE,IAAIV,YAAYO,EAAEG,GAAG,GAAGjF,KAAKsF,EAAEf,QAAQ,SAASxE,GAAG,IAAIgF,EAAED,EAAEG,GAAG,GAAGlF,GAAG,OAAO2D,EAAEqB,GAAIhF,IAAIuF,EAAEA,EAAEf,QAAQxE,EAAE+E,EAAEC,EAAEC,GAAG,OAAOD,EAAEE,GAAGV,QAAkD,IAAI,IAA1CtD,EAAkB,mBAATmE,SAAqBA,QAAgBH,EAAE,EAAEA,EAAED,EAAEO,OAAON,IAAIvB,EAAEsB,EAAEC,IAAI,OAAOvB,EAAvb,EAA4b8B,GAAG,SAASJ,EAAQZ,EAAOD,GAU50B,aACA,IAAIkB,GACJ,SAAWA,GACPA,EAAkBA,EAAuB,IAAI,GAAK,MAClDA,EAAkBA,EAAsB,GAAI,GAAK,KAFrD,CAGGA,IAAsBA,OACzB,IAAIC,GACJ,SAAWA,GACPA,EAAUA,EAAmB,QAAI,GAAK,UACtCA,EAAUA,EAAiB,MAAI,GAAK,QAFxC,CAGGA,IAAcA,OAOjB,IAAIb,EAAgB,WAEhB,SAASA,EAAac,EAAQjF,GAG1B,QAFe,IAAXiF,IAAqBA,WACR,IAAbjF,IAAuBA,EAAW,uBAClCkF,MAAMC,QAAQnF,GACdA,EAASoF,QAAQ,SAAUpC,GACvB,IAAImB,EAAac,EAAQjC,SAG5B,CAAA,GAAuB,iBAAZhD,EAMX,CACD,IAAIqF,EAAiBlB,EAAamB,MAAMnB,EAAaoB,SAAUN,GAC3DO,WAAYnF,SAAS6C,cAAc,SAGvC,OADAiB,EAAa3D,UAAUiF,OAAOJ,EAAgBrF,GACvCqF,EAVP,IAAIK,EAAWrF,SAASC,iBAAiBN,GACzCkF,MAAM1E,UAAU4E,QAAQ9F,KAAKoG,EAAU,SAAUC,GAC7C,IAAIxB,EAAac,EAAQU,MAmIrC,OAxHAxB,EAAa3D,UAAUiF,OAAS,SAAUR,EAAQW,GAE9C,GADAX,EAAOY,MAAQD,EACXX,EAAOY,MAAMC,SAASC,MAAM,eAAsD,IAAtCd,EAAOY,MAAMtC,aAAa,SAAqB0B,EAAOY,MAAMG,aAAa,QAAQD,MAAM,mBAAoB,CACvJd,EAAOY,MAAM1C,aAAa,eAAgB,OAC1C8B,EAAOgB,UAAUhB,GACjBA,EAAOY,MAAMzF,WAAWiD,YAAY4B,EAAOO,YAC3CP,EAAOiB,YACHC,KAAMlB,EAAOmB,MAAMhF,KAAK6D,GACxBoB,QAASlC,EAAa3D,UAAU6F,QAAQjF,KAAK,KAAM6D,GACnDqB,MAAOrB,EAAOsB,OAAOnF,KAAK6D,GAC1BuB,MAAOrC,EAAa3D,UAAUiG,MAAMrF,KAAK,KAAM6D,EAAQD,EAAU0B,OACjEC,QAASxC,EAAa3D,UAAUiG,MAAMrF,KAAK,KAAM6D,EAAQD,EAAU4B,SACnEC,SAAU5B,EAAOgB,UAAU7E,KAAK6D,IAEpC,IAAK,IAAIwB,KAASxB,EAAOiB,WACrBjB,EAAOY,MAAMhF,iBAAiB4F,EAAOxB,EAAOiB,WAAWO,MAInEtC,EAAa3D,UAAUsG,gBAAkB,SAAU7B,EAAQ8B,GACvD,IAAIC,KACJ,IAAK,IAAIC,KAAOhC,EAAOiC,iBAAkB,CACrC,IAAIT,EAAQzB,EAAU0B,WACqBS,IAAvClC,EAAOiC,iBAAiBD,GAAKG,QAC7BX,EAAQxB,EAAOiC,iBAAiBD,GAAKG,OAErCX,GAASM,IACTC,EAASC,GAAOhC,EAAOiC,iBAAiBD,IAGhD,OAAOD,GAEX7C,EAAa3D,UAAUiG,MAAQ,SAAUxB,EAAQ8B,EAAMN,GAwBnD,IAAK,IAAIY,KAAQlD,EAAa3D,UAAUsG,gBAAgB7B,EAAQ8B,GAAO,CACnE,IAAIO,EAAUnD,EAAamB,OACvBiC,SAAUxC,EAAkByC,KAC7BvC,EAAOiC,iBAAiBG,IAAQtB,EAAQhB,EAAkByC,KAAOF,EAAQC,SAC5ED,EAAQG,WAAWrC,QA3BD,SAAUsC,KACb,IAAV3B,GAAkBuB,EAAQC,UAAYxC,EAAkByC,MAAmB,IAAVzB,GAAmBuB,EAAQC,UAAYxC,EAAkB4C,OAC3HD,EAAYvD,EAAamB,OACrBsC,KAAK,GACNF,IACWG,eAAe,MAErB9B,EADA2B,EAAUI,IAAMrB,EAAMsB,SACbL,EAAUE,IAGXF,EAAUE,IAGjBF,EAAUG,eAAe,SAAWH,EAAUG,eAAe,QAE9D9B,EADAU,EAAMsB,SAAWL,EAAUM,MAAQvB,EAAMsB,SAAWL,EAAUO,IACrDP,EAAUE,IAGXF,EAAUE,SAUhB,IAAV7B,GACAuB,EAAQY,SAAS5I,KAAK2F,EAAQwB,KAI1CtC,EAAa3D,UAAU2H,YAAc,SAAUlD,EAAQ9F,GACnD,IAAIiJ,EAAsBC,OAAOC,oBAAoBrD,EAAOsD,aAAcC,EAAU,IAAI/G,eAAkBH,EAAS2D,EAAOwD,cAAelH,EAAM0D,EAAOyD,OAAQC,EAAc1D,EAAO2D,OAAQC,EAAuBC,mBAAmB7D,EAAO8D,aAAe,IAAMD,mBAAmBH,GAChRrH,EAAOyE,MAAM,aACa,IAAtBxE,EAAIyH,QAAQ,KACZzH,GAAO,IAAMsH,EAGbtH,GAAO,IAAMsH,GAGrBL,EAAQzG,KAAKT,EAAQC,GAAK,GAC1B,IAAK,IAAIhB,EAAI6H,EAAoBvD,OAAS,EAAGtE,GAAK,EAAGA,IACjDiI,EAAQS,iBAAiBb,EAAoB7H,GAAI0E,EAAOsD,YAAYH,EAAoB7H,KAQ5F,OANAiI,EAAQU,mBAAqB,WACC,GAAtBV,EAAQrH,YAAqC,KAAlBqH,EAAQvG,SACnCgD,EAAOkE,OAAOR,GAAeH,EAAQtG,SACrC/C,EAASqJ,EAAQtG,YAGlBsG,GAEXrE,EAAa3D,UAAU4I,KAAO,SAAUnE,EAAQuD,EAASa,QACrC,IAAZA,IAAsBA,GAAU,GAChCpE,EAAOqE,YACP3F,OAAO4F,aAAatE,EAAOqE,aAEf,IAAZD,EACApE,EAAOqE,WAAa3F,OAAO6F,WAAWrF,EAAa3D,UAAU4I,KAAKhI,KAAK,KAAM6D,EAAQuD,GAAS,GAAQvD,EAAOwE,QAGzGxE,EAAOyE,SACPzE,EAAOyE,QAAQC,QAEnB1E,EAAOyE,QAAUlB,EACjBvD,EAAOyE,QAAQlH,KAAKyC,EAAO8D,YAAc,IAAM9D,EAAO2D,UAG9DzE,EAAa3D,UAAUoJ,MAAQ,SAAU3E,EAAQ9F,GAC7C,IAAI+C,EAAW+C,EAAO4E,OAAO5E,EAAO2D,QACpC,QAAiBzB,IAAbjF,EAAwB,CACxB,IAAIsG,EAAUrE,EAAa3D,UAAU2H,YAAYlD,EAAQ9F,GACzDgF,EAAa3D,UAAU4I,KAAKnE,EAAQuD,QAGpCrJ,EAAS+C,IAGjBiC,EAAa3D,UAAU6F,QAAU,SAAUpB,GACvC,IAAK,IAAIwB,KAASxB,EAAOiB,WACrBjB,EAAOY,MAAMiE,oBAAoBrD,EAAOxB,EAAOiB,WAAWO,IAE9DxB,EAAOO,WAAWpF,WAAW2J,YAAY9E,EAAOO,aAE7CrB,EAhJQ,GAkJnBA,EAAamB,MAAQ,WAEjB,IAAK,IADW0E,EAAZ1E,KACK/E,EAAI,EAAGA,EAAI0J,UAAUpF,OAAQtE,IAClC,IAAKyJ,KAAOC,UAAU1J,GAClB+E,EAAM0E,GAAOC,UAAU1J,GAAGyJ,GAGlC,OAAO1E,GAEXnB,EAAaoB,UACTkE,MAAO,IACPS,aAAc,iBACdC,WACIC,SAAU,SAAUC,GAChB,OAAO,IAAIC,OAAOD,EAAO,OAE7BE,UAAW,SAAUF,GACjB,MAAO,WAAaA,EAAQ,cAGpC9B,aACIiC,eAAgB,qCAEpBC,MAAO,EACPC,SAAU,EACVC,WAAY,MACZC,SAAU,IACVC,IAAK,KACL3D,kBACI4D,OACIrD,aACQK,GAAI,GACJF,KAAK,IAEbM,SAAU,SAAUzB,GAChB,IAA8D,GAA1DvG,KAAKsF,WAAWQ,aAAa,SAASgD,QAAQ,QAAe,CAC7D,IAAI+B,EAAW7K,KAAKsF,WAAWwF,cAAc,aAC5B,OAAbD,IACAtE,EAAMwE,iBACN/K,KAAKgL,QAAQH,GACb7K,KAAKsF,WAAWrC,aAAa,QAAS,mBAIlDoE,SAAUxC,EAAkByC,IAC5BJ,MAAOpC,EAAU4B,SAErBuE,mBACI1D,aACQK,GAAI,GACJF,KAAK,IAGLE,GAAI,GACJF,KAAK,IAEbM,SAAU,SAAUzB,GAChBA,EAAMwE,kBAEV1D,SAAUxC,EAAkB4C,GAC5BP,MAAOpC,EAAU4B,SAErBwE,iBACI3D,aACQK,GAAI,GACJF,KAAK,IAGLE,GAAI,GACJF,KAAK,IAEbM,SAAU,SAAUzB,GAChBA,EAAMwE,iBACN,IAAII,EAAQnL,KAAKsF,WAAWwF,cAAc,+BAAgCM,EAAOpL,KAAKsF,WAAWwF,cAAc,8BAA+BO,EAASrL,KAAKsF,WAAWwF,cAAc,aACrL,GAAIO,EAAQ,CACR,IAAqF1E,EAAlE3B,MAAM1E,UAAUwI,QAAQ1J,KAAKiM,EAAOnL,WAAWoL,SAAUD,IAAoC9E,EAAMsB,QAAU,IAAK0D,EAAWvL,KAAKsF,WAAWkG,qBAAqB,MAAM7G,OACvLgC,EAAW,EACXA,EAAW4E,EAAW,EAEjB5E,GAAY4E,IACjB5E,EAAW,GAEf0E,EAAOI,UAAUC,OAAO,UACxBL,EAAOtK,cAAcuK,SAASK,KAAKhF,GAAU8E,UAAUG,IAAI,eAEtDR,GAAyB,IAAjB7E,EAAMsB,QACnBuD,EAAKK,UAAUG,IAAI,UAEdT,GACLA,EAAMM,UAAUG,IAAI,WAG5BvE,SAAUxC,EAAkB4C,GAC5BP,MAAOpC,EAAU0B,OAErBqF,UACItE,aACQK,GAAI,GACJF,KAAK,IAELI,KAAM,GACNC,GAAI,GACJL,KAAK,IAEbM,SAAU,WACN,IAAI8D,EAAW9L,KAAK2F,MAAMG,aAAa,+BAAgCiG,EAAe/L,KAAK0I,OACtE,KAAjBqD,GAAuBA,EAAapH,QAAU3E,KAAKgM,cAC9CF,GAAYC,GAAgBD,GAC7B9L,KAAKsF,WAAWrC,aAAa,QAAS,qBAE1CgB,EAAa3D,UAAUoJ,MAAM1J,KAAM,SAAUgC,GACzChC,KAAKiM,QAAQjM,KAAKkM,MAAMlK,IACxBhC,KAAKmM,SACPjL,KAAKlB,SAGfqH,SAAUxC,EAAkByC,IAC5BJ,MAAOpC,EAAU0B,QAGzBlB,WAAY,KACZkE,QAAS,KACT7D,MAAO,KAIPyG,cAAe,WAWX,OATIpM,KAAK2F,MAAMtC,aAAa,mCACTrD,KAAK2F,MAAMG,aAAa,oCAEZ,IAAtB9F,KAAKgK,aACKhK,KAAKgK,aAGL,IAOvBqC,OAAQ,WACJ,IAAIC,EAAQtM,KAAK2F,MAAMG,aAAa,2BACpC,OAAIyG,MAAMD,IAAoB,OAAVA,EACTtM,KAAKuK,MAETiC,SAASF,EAAO,KAK3BN,UAAW,WACP,IAAIS,EAAWzM,KAAK2F,MAAMG,aAAa,8BACvC,OAAIyG,MAAME,IAA0B,OAAbA,EACZzM,KAAKwK,SAETgC,SAASC,EAAU,KAK9BC,WAAY,SAAUC,GAClB,OAAOA,EAAM9J,QAAQ7C,KAAKiK,UAAUC,SAASlK,KAAK0I,QAAS1I,KAAKiK,UAAUI,YAK9E9B,YAAa,WACT,OAAIvI,KAAK2F,MAAMtC,aAAa,4BACjBrD,KAAK2F,MAAMG,aAAa,4BAE5B9F,KAAKyK,YAKhB5B,UAAW,WACP,OAAI7I,KAAK2F,MAAMtC,aAAa,gCACjBrD,KAAK2F,MAAMG,aAAa,gCAE5B9F,KAAK0K,UAKhBlC,KAAM,WACF,OAAIxI,KAAK2F,MAAMtC,aAAa,qBACjBrD,KAAK2F,MAAMG,aAAa,qBAE5B9F,KAAK2K,KAKhBzE,MAAO,SAAU0G,GACb,IAAY,IAARA,EACA5M,KAAKsF,WAAWrC,aAAa,QAAS,gBACtCjD,KAAK2F,MAAM1C,aAAa,8BAA+BjD,KAAK2F,MAAMwE,WAEjE,CACD,IAAIpF,EAAS/E,KACbsJ,WAAW,WACPvE,EAAOmB,OAAM,IACd,OAMXyD,OAAQ,SAAUQ,GACd,OAAOnK,KAAKiJ,OAAOkB,IAKvB9D,OAAQ,WACJ,IAAIyF,EAAW9L,KAAK2F,MAAMG,aAAa,iCACjCgG,GAAY9L,KAAK2F,MAAMwE,OAAS2B,IAAa9L,KAAKgM,aAAehM,KAAK2F,MAAMwE,MAAMxF,QACpF3E,KAAKsF,WAAWrC,aAAa,QAAS,sBAM9CkJ,MAAO,WACH,IAAIpH,EAAS/E,KACbgF,MAAM1E,UAAU4E,QAAQ9F,KAAKY,KAAKsF,WAAWkG,qBAAqB,MAAO,SAAUqB,GAC/C,UAA5BA,EAAG/G,aAAa,WAClB+G,EAAGC,QAAU,SAAUvG,GACjBxB,EAAOiG,QAAQ6B,IAEnBA,EAAGE,aAAe,WACd,IAAI1B,EAAStG,EAAOO,WAAWwF,cAAc,aACzCO,IAAWwB,IACI,OAAXxB,GACAA,EAAOI,UAAUC,OAAO,UAE5BmB,EAAGpB,UAAUG,IAAI,gBASrC7F,UAAW,WACP/F,KAAKsF,WAAWrC,aAAa,QAAS,gBACtCjD,KAAKsF,WAAWrC,aAAa,QAAS,QAAUjD,KAAK2F,MAAMqH,UAAYhN,KAAK2F,MAAMsH,cAAgB,WAAajN,KAAK2F,MAAMuH,WAAa,YAAclN,KAAK2F,MAAMwH,YAAc,QAKlLlB,QAAS,SAAUjK,GACf,IAAIoL,EAEAA,EADmB,iBAAZpL,EACFhC,KAAKqN,WAAWrL,GAGhBhC,KAAKsN,qBAAqBtL,GAE/BhC,KAAKsF,WAAWiI,iBAChBvN,KAAKsF,WAAWuE,YAAY7J,KAAKsF,WAAWkI,WAAW,IAE3DxN,KAAKsF,WAAWnC,YAAYiK,IAKhCE,qBAAsB,SAAUtL,GAC5B,IAAIoL,EAAKjN,SAAS6C,cAAc,MAAO6J,EAAK1M,SAAS6C,cAAc,MAAOsJ,EAAQtM,KAAKqM,SAEnFC,EAAQ,EACRtK,EAAWA,EAASyL,UAEL,IAAVnB,IACLA,EAAQtK,EAAS2C,QAErB,IAAK,IAAIgH,EAAO,EAAGA,EAAO+B,KAAKC,IAAID,KAAKE,IAAItB,GAAQtK,EAAS2C,QAASgH,IAClEkB,EAAGgB,UAAY7L,EAAS2J,GAAMmC,MAC9BjB,EAAG5J,aAAa,0BAA2BjB,EAAS2J,GAAMoC,OAC1DX,EAAGjK,YAAY0J,GACfA,EAAK1M,SAAS6C,cAAc,MAEhC,OAAOoK,GAKXC,WAAY,SAAUrL,GAClB,IAAIoL,EAAKjN,SAAS6C,cAAc,MAAO6J,EAAK1M,SAAS6C,cAAc,MACnE,GAAIhB,EAAS2C,OAAS,EAClB3E,KAAKsF,WAAWuI,UAAY7L,MAE3B,CACD,IAAIgM,EAAehO,KAAKoM,gBACH,KAAjB4B,IACAnB,EAAGgB,UAAYG,EACfnB,EAAG5J,aAAa,QAAS,UACzBmK,EAAGjK,YAAY0J,IAGvB,OAAOO,GAKXlB,MAAO,SAAUlK,GACb,IACI,IAAIiM,KAEAC,EAAOC,KAAKC,MAAMpM,GACtB,GAAiC,IAA7BmG,OAAOkG,KAAKH,GAAMvJ,OAClB,MAAO,GAEX,GAAIK,MAAMC,QAAQiJ,GACd,IAAK,IAAI7N,EAAI,EAAGA,EAAI8H,OAAOkG,KAAKH,GAAMvJ,OAAQtE,IAC1C4N,EAAeA,EAAetJ,SAAYoJ,MAASG,EAAK7N,GAAIyN,MAAS9N,KAAK0M,WAAWwB,EAAK7N,UAI9F,IAAK,IAAI8J,KAAS+D,EACdD,EAAeK,MACXP,MAAS5D,EACT2D,MAAS9N,KAAK0M,WAAWwB,EAAK/D,MAI1C,OAAO8D,EAEX,MAAO1H,GAEH,OAAOvE,IAMf0G,KAAM,WACF,OAAO1I,KAAK2F,MAAMwE,OAKtBa,QAAS,SAAUW,GACtBrM,QAAQC,IAAI,kBACDoM,EAAKtI,aAAa,2BAClBrD,KAAK2F,MAAMwE,MAAQwB,EAAK7F,aAAa,2BAGrC9F,KAAK2F,MAAMwE,MAAQwB,EAAKkC,UAE5B7N,KAAK2F,MAAM1C,aAAa,8BAA+BjD,KAAK2F,MAAMwE,QAEtEf,WAAY,KACZH,UACAjD,eAEJpC,EAAOD,QAAUM,YAEN,IAAI,KAYf,SAAUpF,EAAGC,GACX,aAEA,SAASyP,EAAYC,EAAoBC,EAAkBC,EAAcC,GACvE3O,KAAKwO,mBAAqBA,EAC1BxO,KAAKyO,iBAAmBA,EACxBzO,KAAK0O,aAAeA,EACpB1O,KAAK4O,OAAS,GACd5O,KAAK2O,UAAYA,EACjB3O,KAAK6O,eAAgB,EAcvBN,EAAYjO,UAAUwO,WAAa,SAASC,EAAQC,GAClD,IACAC,EADI7K,EAAI,EAGR4K,GAASD,EAAOpK,OAAS3E,KAAK4O,OAC9B,IAAK,IAAIvO,EAAI,EAAGA,EAAI0O,EAAOpK,OAAQtE,KACjC4O,EAAMF,EAAO1O,IACJ6O,aAAe,GAAOD,EAAIE,cAAgB,EACjD/K,GAAK6K,EAAIC,aAAeD,EAAIE,cAG5B/K,GAAK,EAIT,OAAO4K,EAAQ5K,GAGjBmK,EAAYjO,UAAU8O,SAAW,SAASL,EAAQM,GAEhD,IAAK,IADDJ,EAAKK,EAAUC,EAAeR,EAAOpK,OAChCtE,EAAI,EAAGA,EAAIkP,EAAclP,IAG9BiP,GAFFL,EAAMF,EAAO1O,IACJ6O,aAAe,GAAOD,EAAIE,cAAgB,EACtCE,EAASJ,EAAIC,aAAeD,EAAIE,cAGhCE,EAEbJ,EAAI1L,MAAMyL,MAAQM,EAAW,KAC7BL,EAAI1L,MAAM8L,OAASA,EAAS,KAC5BJ,EAAI1L,MAAMiM,WAAa,MACvBP,EAAI1L,MAAMkM,UAAY,MACtBR,EAAI1L,MAAMmM,YAAc1P,KAAK4O,OAAS,EAAI,KAC1CK,EAAI1L,MAAMoM,aAAe3P,KAAK4O,OAAS,EAAI,MAI/CL,EAAYjO,UAAUsP,WAAa,SAASC,GAC1C,IAAIC,EAAOC,EACXC,EAAiBlR,EAAEgM,cAAc9K,KAAKwO,oBAAoBrB,YAE1DtO,EAAG,KAAOgR,EAASlL,OAAS,GAAG,CAC7B,IAAK,IAAItE,EAAI,EAAGA,GAAKwP,EAASlL,OAAQtE,IAGpC,GAFAyP,EAAQD,EAASC,MAAM,EAAGzP,IAC1B0P,EAAI/P,KAAK8O,WAAWgB,EAAOE,IACnBhQ,KAAK2O,UAAW,CACtB3O,KAAKoP,SAASU,EAAOC,GACrBF,EAAWA,EAASC,MAAMzP,GAC1B,SAASxB,EAGbmB,KAAKoP,SAASU,EAAOpC,KAAKC,IAAI3N,KAAK2O,UAAWoB,IAC9C,QAIJxB,EAAYjO,UAAU2P,MAAQ,SAASxB,GAMrC,IAAK,IALDyB,EAAuBpR,EAAEsB,iBAAiBJ,KAAKyO,kBACnD0B,EAAiBD,EAAqBvL,OACtCyL,EAAW,KACXC,EAAU,KACVR,KACSxP,EAAI,EAAGA,EAAI8P,EAAgB9P,KAClCgQ,EAAUH,EAAqB7P,IACnBiQ,yBAA2BF,GAAYP,EAASlL,OAAS,IAInE3E,KAAK4P,WAAWC,GAEhBA,MAGFA,EAASvB,KAAK+B,EAAQvF,cAAc9K,KAAK0O,eAEzC0B,EAAWC,EAGTR,EAASlL,OAAS,GACpB3E,KAAK4P,WAAWC,IAIpBtB,EAAYjO,UAAUiQ,MAAQ,WAU5B,SAASC,EAAcrR,GACjBqB,EAAIqO,gBACNrO,EAAIqO,eAAgB,EACpBvF,WAAW,WACT9I,EAAIyP,QACJzP,EAAIqO,eAAgB,GACnB,MAfP,IAAIxO,EAAG4O,EACPzO,EAAMR,KACNyQ,EAAgB3R,EAAEsB,iBAAiBJ,KAAKyO,kBACxC0B,EAAiBM,EAAc9L,OAmB/B,IAHA9F,EAAE8B,iBAAiB,SAAU6P,GAC7B3R,EAAE8B,iBAAiB,WAfnB,SAAexB,GACbqB,EAAIyP,UAgBD5P,EAAI,EAAGA,EAAI8P,EAAgB9P,SAEX,KADnB4O,EAAMwB,EAAcpQ,GAAGyK,cAAc9K,KAAK0O,iBAExCO,EAAItO,iBAAiB,OAAQ6P,GAC7BvB,EAAItO,iBAAiB,QAAS6P,KAKpC3R,EAAEE,MAAMwP,YAAcA,EA1IxB,CA4IG9K,OAAQtD,UACVpB,MAAMiC,MAAM,WAsIX,SAAS0P,EAAgBC,GACvB,OAAO,SAASC,GACd,IAAIP,EAAUlQ,SAAS2K,cAAc,8BACrC+F,EAAiBF,EACjB,GAAgB,OAAZN,EAAkB,CAGpB,GAAgB,QADhBA,EAAUlQ,SAAS2K,cAAc,YAG/B,OAGY,SAAV6F,GAA8B,OAAVA,IACtBE,EAAiBR,GAIrB,IAAIS,EAAMC,EAAU5Q,SAASC,iBAAiB,WAE9C,GAA8B,iBAAnByQ,EACTC,EAAOD,OAEP,OAAQA,GACN,IAAK,UAIL,IAAK,IAHDG,EAAM7Q,SAAS8Q,gBAAgBC,WAAa/Q,SAAS+C,KAAKgO,UAC1DC,EAAMH,EAAM7Q,SAAS8Q,gBAAgBG,aAEhC/Q,EAAI,EAAGA,EAAI0Q,EAAQpM,OAAQtE,IAAK,CAEvC,IAAIgR,GADJP,EAAOC,EAAQ1Q,IACC2M,UAGhB,GAFWqE,EAAOP,EAAKM,cAEVD,GAASE,EAAOL,EAC3B,MAGJ,MACA,IAAK,OAEQ,QADbF,EAAOT,EAAQiB,sBAEbR,EAAOC,EAAQ,IAEjB,MACA,IAAK,KAEQ,QADbD,EAAOT,EAAQC,0BAEbQ,EAAOC,EAAQA,EAAQpM,OAAS,IAElC,MACA,IAAK,SACLmM,EAAOC,EAAQA,EAAQpM,OAAS,GAChC,MACA,IAAK,MAEL,QACAmM,EAAOC,EAAQ,GAInB,GAAID,EAAM,CACRT,EAAQkB,gBAAgB,qBACxBT,EAAK7N,aAAa,oBAAqB,QACvC,IAAIuO,EAAOV,EAAKhG,cAAc,SAAWgG,EAAKhG,cAAc,KAC/C,OAAT0G,GACFA,EAAKpL,QAEFwK,GACHa,MAgBR,SAASC,EAAgBC,GACvB,OAAO,WACL,IAAIC,EAAUC,EAAE,wCACO,IAAnBD,EAAQjN,OAIRgN,GAAO,GAAKA,EAAMC,EAAQjN,OAC5BiN,EAAQD,GAAKG,QAEbxS,QAAQC,IAAI,uCANZD,QAAQC,IAAI,qDAWlB,SAASkS,IACP,IAAIM,EAAM5R,SAAS2K,cAAc,8BACjC,GAAY,OAARiH,EAAJ,CAGA,IAAIC,EAAO7R,SAAS8Q,gBAAgBC,WAAa/Q,SAAS+C,KAAKgO,UAC/De,EAAU9R,SAAS8Q,gBAAgBG,aACnCC,EAAOU,EAAI/E,UACXkF,EAAOb,EAAOU,EAAIX,aAGkB,OAA/BW,EAAIzB,wBAAqC4B,EAAOD,EAGnDxO,OAAO0O,OAAO1O,OAAO2O,QAAS,GAG5BJ,EAAQX,EARH,IASP5N,OAAO0O,OAAO1O,OAAO2O,QAASf,EATvB,KAWIW,EAAOC,EACNC,EAZL,KAaLzO,OAAO0O,OAAO1O,OAAO2O,QAASF,EAAOD,EAbhC,MAkBX,SAASI,EAAWC,GAClB,OAAO,WACL7O,OAAO8O,SAAS,EAAGD,GACnB5B,EAAgB,cAIpB,SAAS8B,EAAa7L,EAAU8L,GAC9B,OAAO,WACLhP,OAAOiP,SAAS,EAAG/L,GACnB+J,EAAgB+B,MASpB,SAASE,EAAWC,GAClB,OAAO,WACL,IAAIpB,EAAOrR,SAAS2K,cAAc,mCAClC,GAAa,OAAT0G,EAAe,CACjB,IAAInQ,EAAMmQ,EAAK1L,aAAa,QACxB8M,EACFnP,OAAO5B,KAAKR,GAEZoC,OAAOoP,SAASC,KAAOzR,IA5R/BtC,MAAMwB,GAAG,UAAW,QAAS,WAC3BmQ,EAAgB1Q,OAAM,KAGxBjB,MAAMwB,GAAG,YAAa,QAAS,SAASpB,GAEtC,IADA,IAAID,EAAKC,EAAEyB,YACGqG,IAAP/H,GAAkB,CACvB,GAAIA,EAAGuM,UAAUsH,SAAS,UAAW,CACU,OAAzC7T,EAAG4G,aAAa,sBAClB4K,EAAgBxR,IAAI,GAEtB,MAEFA,EAAKA,EAAGgB,cAET,GAEH,IAAI8S,GACFC,IACElM,IAAK,SACLmM,IA6LJ,WACM/S,SAASgT,eACXhT,SAASgT,cAAclN,QA9LvBmN,IAAK,sCACLC,IAAK,WAEPC,IACEvM,IAAK,IACLmM,IAqPJ,WACEzP,OAAOiP,SAAS,EAAG,GACnBvS,SAAS2K,cAAc,MAAM1E,SAtP3BgN,IAAK,4BACLC,IAAK,WAEPE,IACExM,IAAK,IACLmM,IAAKb,GAAY5O,OAAO+P,aACxBJ,IAAK,qBACLC,IAAK,cAEPI,IACE1M,IAAK,IACLmM,IAAKb,EAAW5O,OAAO+P,aACvBJ,IAAK,uBACLC,IAAK,cAEPK,IACE3M,IAAK,IACLmM,IAAKb,GAAY5O,OAAO+P,YAAc,GACtCJ,IAAK,wBACLC,IAAK,cAEPM,IACE5M,IAAK,IACLmM,IAAKb,EAAW5O,OAAO+P,YAAc,GACrCJ,IAAK,0BACLC,IAAK,cAEPO,IACE7M,IAAK,IACLmM,IAAKV,GAAcrS,SAAS+C,KAAK2Q,aAAc,OAC/CT,IAAK,gCACLC,IAAK,cAEPS,IACE/M,IAAK,IACLmM,IAAKV,EAAarS,SAAS+C,KAAK2Q,aAAc,UAC9CT,IAAK,mCACLC,IAAK,cAEPU,IACEhN,IAAK,IACLmM,IAAKxC,EAAgB,MACrB0C,IAAK,gCACLC,IAAK,WAEPW,IACEjN,IAAK,IACLmM,IAAKxC,EAAgB,QACrB0C,IAAK,4BACLC,IAAK,WAEPY,IACElN,IAAK,IACLmM,IAAKxB,EAAgB,GACrB0B,IAAK,sBACLC,IAAK,WAEPa,IACEnN,IAAK,IACLmM,IAAKxB,EAAgB,GACrB0B,IAAK,kBACLC,IAAK,WAEPc,IACEpN,IAAK,IACLmM,IAAKP,GAAW,GAChBS,IAAK,qBACLC,IAAK,WAEPe,IACErN,IAAK,IACLmM,IAAKP,GAAW,GAChBS,IAAK,+BACLC,IAAK,WAEPgB,IACEtN,IAAK,IACLmM,IAqGJ,WACE/S,SAAS0S,SAASyB,QAAO,IArGvBlB,IAAK,8BACLC,IAAK,WAEPkB,IACExN,IAAK,IACLmM,IAoLJ,WACE,IAAIsB,EAAYrU,SAAS2K,cAAc,qBACvC,GAAI0J,EAAU7P,OACZ6P,EAAU/I,UAAUgJ,OAAO,cAD7B,CAKA,IAAIC,KAEJ,IAAK,IAAIC,KAAK3B,EAAS,CACrB,IAAIjM,EAAMiM,EAAQ2B,GAClBD,EAAW3N,EAAIsM,KAAOqB,EAAW3N,EAAIsM,SACrCqB,EAAW3N,EAAIsM,KAAK/E,KAAKvH,GAG3B,IAAI6N,EAASzM,OAAOkG,KAAKqG,GAAYG,KAAK,SAAStQ,EAAGuQ,GACpD,OAAOJ,EAAWI,GAAGnQ,OAAS+P,EAAWnQ,GAAGI,SAG9C,GAAsB,IAAlBiQ,EAAOjQ,OAAX,CAIA,IAAIoQ,EAAO,4DACXA,GAAQ,gCAERA,GAAQ,oBACRA,GAAQ,0BACRA,GAAQ,uDACRA,GAAQ,SACRA,GAAQ,SAER,IAAK,IAAI1U,EAAI,EAAGA,EAAIuU,EAAOjQ,OAAQtE,IAAK,CACtC,IAAIgT,EAAMqB,EAAWE,EAAOvU,IAExB2U,EAAe3U,IAAOuU,EAAOjQ,OAAS,EACtCwG,EAAQ9K,EAAI,GAAM,EAElB8K,IACF4J,GAAQ,2BAEVA,GAAQ,uBAAyB5J,GAAS6J,EAAe,GAAK,GAAK,WAEnED,GAAQ,0CACRA,GAAQ,8BAAgC1B,EAAI,GAAGA,IAAM,SACrD0B,GAAQ,2BACRA,GAAQ,6BAER,IAAK,IAAIE,KAAM5B,EACb0B,GAAQ,YAAc1B,EAAI4B,GAAIlO,IAAM,UAAYsM,EAAI4B,GAAI7B,IAAM,QAGhE2B,GAAQ,QACRA,GAAQ,SACRA,GAAQ,SACRA,GAAQ,SAEH5J,IAAS6J,IACZD,GAAQ,UAIZA,GAAQ,SACRA,GAAQ,SAERlD,EAAE,QAAQqD,OAAOH,MApPf3B,IAAK,qBACLC,IAAK,UAITtU,MAAMwB,GAAGJ,SAAU,QAAS,SAAShB,GAEnC,GAAI6T,EAAQrL,eAAexI,EAAE0I,WAAa1I,EAAEgW,UAAYhW,EAAEiW,SAAWjW,EAAEkW,WAAalW,EAAEmW,QAAS,CAC7F,IAAIC,EAAUpW,EAAEyB,OAAO2U,QAAQC,cACb,KAAdrW,EAAE0I,QACY,UAAZ0N,GAAmC,WAAZA,GAAoC,aAAZA,GACjDvC,EAAQ7T,EAAE0I,SAASqL,MAGjB/T,EAAEyB,SAAWT,SAAS+C,MAAoB,MAAZqS,GAA+B,WAAZA,GACnDvC,EAAQ7T,EAAE0I,SAASqL,WAyP7B,SAAWrU,EAAGC,EAAGC,GACf,aAEAA,EAAMiC,MAAM,WACVjC,EAAMwB,GAAG,0BAA2B,QAAS,SAASgG,GAEpDvG,KAAKyL,UAAUC,OAAO,0BAGtB,IACI+J,EAAcC,wEAGdC,EAAS3V,KAAK4V,QAAQC,MACtBC,EAAW9V,KAAK4V,QAAQG,QACxBC,EAAelX,EAAEgM,cAAc,IAAM9K,KAAK4V,QAAQK,aAClDC,EAAwBpX,EAAEgM,cAAc,IAAM9K,KAAK4V,QAAQO,qBAG3DC,GAAoB,YAAa,eAAgB,mBAAoB,gBAAiB,eAE1F,GAAGT,GAAUG,GAAYE,EAAc,CACrC,IAAIK,EAAQ,KACZ,OAAOP,GACL,IAAK,OACLO,EAAQZ,EAAc,QAAUE,EAAS,gBACzC,MACA,IAAK,MACLU,EAAQZ,EAAc,OAASE,EAAS,gBACxC,MACA,IAAK,WACLU,EAAQZ,EAAc,YAAcE,EAAS,gBAK5CU,GAEDtX,EAAMoC,KAAM,MAAOkV,GAAQ1U,KAAK,SAASoT,EAAMuB,GAE7C,IADAvB,EAAO5G,KAAKC,MAAM2G,KACPA,EAAKvP,UAAYuP,EAAKvP,SAAS,GAAI,CAC5C,IAAIE,EAAUqP,EAAKvP,SAAS,GACxB+Q,EAAU,GACd,IAAK,IAAIC,KAAO9Q,EAAQ+Q,KACtB,GAAyB,OAAtB/Q,EAAQ+Q,KAAKtP,OAAkD,GAAjCiP,EAAgBtN,QAAQ0N,GAAY,CAEnE,OADAD,GAAW,WAAaC,EAAM,YACvBA,GACL,IAAK,QACL,IAAK,MACLD,GAAW,gBAAmB7Q,EAAQ+Q,KAAKD,GAAK3T,QAAQ,KAAK,IAAM,KAAQ6C,EAAQ+Q,KAAKD,GAAO,OAC/F,MACA,IAAK,QACLD,GAAW,mBAAsB7Q,EAAQ+Q,KAAKD,GAAO,KAAQ9Q,EAAQ+Q,KAAKD,GAAO,OACjF,MACA,IAAK,UACL,IAAK,MACLD,GAAW,YAAe7Q,EAAQ+Q,KAAKD,GAAO,KAAQ9Q,EAAQ+Q,KAAKD,GAAO,OAC1E,MACA,IAAK,WACLD,GAAW,0CAA6C7Q,EAAQ+Q,KAAKD,GAAO,KAAQ9Q,EAAQ+Q,KAAKD,GAAO,OACxG,MACA,IAAK,YACL,IAAsC,GAAnC9Q,EAAQ+Q,KAAKD,GAAK1N,QAAQ,KAAY,CACvCyN,GAAW,oBAAuB7Q,EAAQ+Q,KAAKD,GAAKE,UAAU,EAAEhR,EAAQ+Q,KAAKD,GAAK1N,QAAQ,MAAQ,uBAAyBpD,EAAQ+Q,KAAKD,GAAKE,UAAUhR,EAAQ+Q,KAAKD,GAAK1N,QAAQ,KAAK,GAAK,KAAQpD,EAAQ+Q,KAAKD,GAAO,OACvN,MAGF,QAEAD,GAAW7Q,EAAQ+Q,KAAKD,GAG1BD,GAAW,aAGfL,EAAsBzK,UAAUG,IAAI,aACpCoK,EAAavK,UAAUC,OAAO,aAC9BsK,EAAalL,cAAc,SAAS+C,UAAY0I,KAGnD3U,MAAM,WACLsU,EAAsBrI,UAAYqI,EAAsBrI,UAAY,mDAM1EtH,EAAMwE,mBAGRhM,EAAMwB,GAAG,kBAAmB,QAAS,SAASgG,GAE5CvG,KAAKyL,UAAUC,OAAO,kBAGtB,IAAIiL,EAAiB3W,KAAK4V,QAAQgB,cAC9BC,EAAUC,WAAW9W,KAAK4V,QAAQmB,QAClCC,EAAUF,WAAW9W,KAAK4V,QAAQqB,QAClCC,EAAWJ,WAAW9W,KAAK4V,QAAQuB,SACnCC,EAAkBjJ,KAAKC,MAAMpO,KAAK4V,QAAQyB,gBAC1CC,EAAcnJ,KAAKC,MAAMpO,KAAK4V,QAAQ2B,YAE1CxY,EAAMyD,UAAU,uBAChBzD,EAAMqE,WAAW,qBAAsB,WACrC,IAAIoU,EAAa,KACjB,GAAGJ,EAAiB,CAClB,IAAIK,EAAYC,EAAEC,OAAOP,EAAgB,GAAIA,EAAgB,IACzDQ,EAAYF,EAAEC,OAAOP,EAAgB,GAAIA,EAAgB,IAC7DI,EAAaE,EAAEG,aAAaJ,EAAWG,GAIzC,IAAIE,EAAMJ,EAAEI,IAAInB,GAIZoB,EAAY,IAAIL,EAAEM,UAFL,sDAE8BC,QAAS,EAAGC,QAAS,GAAIC,YADpD,kFAID,IAAIT,EAAEM,UAFL,uDAEiCC,QAAS,EAAGC,QAAS,GAAIC,YADrD,yGAGtBX,EAGDlO,WAAW,WACTwO,EAAIM,UAAUZ,GACZU,QAAQ,MAET,GACMrB,GAAWG,IACjBE,EACDY,EAAIO,QAAQ,IAAIX,EAAEC,OAAOX,EAASH,GAASK,GAE3CY,EAAIO,QAAQ,IAAIX,EAAEC,OAAOX,EAASH,GAAS,IAI/CiB,EAAIQ,SAASP,GAEb,IAAIQ,GACFC,aAAcT,GAIhBL,EAAEe,QAAQC,OAAOH,GAAYI,MAAMb,GAEhCR,GACDI,EAAEkB,QAAQtB,GAAaqB,MAAMb,KAOjCvR,EAAMwE,qBA1JZ,CA6JGtH,OAAQtD,SAAUsD,OAAO1E,OAiB5B,SAAUF,EAAGC,EAAGC,GACd,aAEAA,EAAMiC,MAAM,WACVjC,EAAM8Z,uBAAyB,IAAI9Z,EAAMwP,YAAY,QAAS,uBAAwB,sBAAuB,KAC7GxP,EAAM8Z,uBAAuBtI,QAE7BxR,EAAMwB,GAAG,gBAAiB,QAAS,SAASgG,GAC1C,IAAIuS,EAAoB9Y,KAAK8F,aAAa,2BACtCiT,EAAuB/Y,KAAK8F,aAAa,+BACzClF,EAASZ,KAAK8F,aAAa,eAC3BkT,EAAgBla,EAAEgM,cAAclK,GAChCmU,EAAO/U,KAAK6N,UAEdkH,EADE/U,KAAKyL,UAAUsH,SAAS,aACnBgC,EAAKlS,QAAQiW,EAAmBC,GAEhChE,EAAKlS,QAAQkW,EAAsBD,GAE5C9Y,KAAK6N,UAAYkH,EACjB/U,KAAKyL,UAAUgJ,OAAO,aACtBuE,EAAcvN,UAAUgJ,OAAO,eAGjC1V,EAAMwB,GAAG,gBAAiB,QAAS,SAASgG,GAC1C,IAAI3F,EAASZ,KAAK8F,aAAa,eAC3BmT,EAAcna,EAAEgM,cAAclK,EAAS,aACvCsY,EAAUD,EAAYnT,aAAa,OACvB,OAAZoT,QAAgCjS,IAAZiS,IAAqC,IAAZA,GAC/CD,EAAYhW,aAAa,MAAOgW,EAAYnT,aAAa,eAI7DjH,EAAE8B,iBAAiB,SAAU,WAC3B,IAAIxB,EAAIL,EAAEiE,eAAe,aACzBmO,EAAY/Q,SAAS8Q,gBAAgBC,WAAa/Q,SAAS+C,KAAKgO,UACtD,OAAN/R,IAEAA,EAAEoE,MAAM4V,QADNjI,GAAa,IACG,EAEA,OAvC5B,CA8CGzN,OAAQtD,SAAUsD,OAAO1E,OAiB5B,SAAUF,EAAGC,EAAGC,GACd,aAIA,SAASqa,EAAiB1T,GACxB,GAAIA,EAAQ2T,kBAAmB,CAC7B,IAAIC,EAAM5T,EAAQyE,MAAMxF,OACxBe,EAAQ2T,kBAAkBC,EAAKA,IAInC,SAASC,IACP,GAAIC,EAAOrP,MAAMxF,OAAU,EAAG,CAC5B,IAAI8U,EAAStZ,SAAS4C,eAAe,UACrCuG,WAAWmQ,EAAOC,OAAOxY,KAAKuY,GAAS,IAZ3C,IAAwCD,EAApCG,GAAa,EAgBjB5a,EAAMiC,MAAM,WAYK,QAXfwY,EAAS1a,EAAEiE,eAjBsB,QA8B3BhE,EAAM6a,gBACR7a,EAAM8a,aAAe5V,aAAa7E,KAAKP,GACrC8L,IAAK,kBACLX,aAAcjL,EAAM+a,YACpBrP,WAAY1L,EAAMqC,OAClBoJ,SAAU,EACVjB,MAAO,KACN,MAGH1K,EAAE8B,iBAAiB,SAAU,WAC3B,IAAI4F,EAAQ,IAAIwT,YAAY,YAC5BP,EAAOQ,cAAczT,MAIzBiT,EAAO7Y,iBAAiB,QA3B1B,SAA8BxB,GACxBwa,IACFP,EAAiBI,GACjBG,GAAa,KAwBwC,GACvDH,EAAOpT,SAIM,OAAXoT,GAAmBza,EAAMkb,4BAC3Bnb,EAAEgM,cAAc,SAASoP,UAAU,YAEnCnb,EAAMwB,GAAG,oBAAqB,SAAU,SAASpB,GAC/C,IAAIkB,EAAGqU,EAAa5V,EAAEsB,iBAAiB,sCACvC,IAAIC,EAAE,EAAGA,EAAEqU,EAAW/P,OAAQtE,IACxBqU,EAAWrU,KAAOL,MAAQ0U,EAAWrU,GAAG8Z,SAC1CzF,EAAWrU,GAAGyR,QAOlB,OAJM9R,KAAKma,SACTna,KAAK8R,QAEPyH,KACO,IAGTxa,EAAMwB,GAAGzB,EAAEiE,eAAe,cAAe,SAAUwW,GACnDxa,EAAMwB,GAAGzB,EAAEiE,eAAe,YAAa,SAAUwW,MAxEvD,CA6EG9V,OAAQtD,SAAUsD,OAAO1E","file":"searx.min.js"}
searx/static/themes/simple/js/searx_src/00_searx_toolkit.jsnew file+155
@@ -0,0 +1,155 @@
1+/**
2+* searx is free software: you can redistribute it and/or modify
3+* it under the terms of the GNU Affero General Public License as published by
4+* the Free Software Foundation, either version 3 of the License, or
5+* (at your option) any later version.
6+*
7+* searx is distributed in the hope that it will be useful,
8+* but WITHOUT ANY WARRANTY; without even the implied warranty of
9+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10+* GNU Affero General Public License for more details.
11+*
12+* You should have received a copy of the GNU Affero General Public License
13+* along with searx. If not, see < http://www.gnu.org/licenses/ >.
14+*
15+* (C) 2017 by Alexandre Flament, <alex@al-f.net>
16+*
17+*/
18+(function(w, d, searx) {
19+
20+ 'use strict';
21+
22+ // not invented here tookit with bugs fixed elsewhere
23+ // purposes : be just good enough and as small as possible
24+
25+ // from https://plainjs.com/javascript/events/live-binding-event-handlers-14/
26+ if (w.Element) {
27+ (function(ElementPrototype) {
28+ ElementPrototype.matches = ElementPrototype.matches ||
29+ ElementPrototype.matchesSelector ||
30+ ElementPrototype.webkitMatchesSelector ||
31+ ElementPrototype.msMatchesSelector ||
32+ function(selector) {
33+ var node = this, nodes = (node.parentNode || node.document).querySelectorAll(selector), i = -1;
34+ while (nodes[++i] && nodes[i] != node);
35+ return !!nodes[i];
36+ };
37+ })(Element.prototype);
38+ }
39+
40+ function callbackSafe(callback, el, e) {
41+ try {
42+ callback.call(el, e);
43+ } catch (exception) {
44+ console.log(exception);
45+ }
46+ }
47+
48+ searx = searx || {};
49+
50+ searx.on = function(obj, eventType, callback, useCapture) {
51+ useCapture = useCapture || false;
52+ if (typeof obj !== 'string') {
53+ // obj HTMLElement, HTMLDocument
54+ obj.addEventListener(eventType, callback, useCapture);
55+ } else {
56+ // obj is a selector
57+ d.addEventListener(eventType, function(e) {
58+ var el = e.target || e.srcElement, found = false;
59+ while (el && el.matches && el !== d && !(found = el.matches(obj))) el = el.parentElement;
60+ if (found) callbackSafe(callback, el, e);
61+ }, useCapture);
62+ }
63+ };
64+
65+ searx.ready = function(callback) {
66+ if (document.readyState != 'loading') {
67+ callback.call(w);
68+ } else {
69+ w.addEventListener('DOMContentLoaded', callback.bind(w));
70+ }
71+ };
72+
73+ searx.http = function(method, url, callback) {
74+ var req = new XMLHttpRequest(),
75+ resolve = function() {},
76+ reject = function() {},
77+ promise = {
78+ then: function(callback) { resolve = callback; return promise; },
79+ catch: function(callback) { reject = callback; return promise; }
80+ };
81+
82+ try {
83+ req.open(method, url, true);
84+
85+ // On load
86+ req.onload = function() {
87+ if (req.status == 200) {
88+ resolve(req.response, req.responseType);
89+ } else {
90+ reject(Error(req.statusText));
91+ }
92+ };
93+
94+ // Handle network errors
95+ req.onerror = function() {
96+ reject(Error("Network Error"));
97+ };
98+
99+ req.onabort = function() {
100+ reject(Error("Transaction is aborted"));
101+ };
102+
103+ // Make the request
104+ req.send();
105+ } catch (ex) {
106+ reject(ex);
107+ }
108+
109+ return promise;
110+ };
111+
112+ searx.loadStyle = function(src) {
113+ var path = searx.staticPath + src,
114+ id = "style_" + src.replace('.', '_'),
115+ s = d.getElementById(id);
116+ if (s === null) {
117+ s = d.createElement('link');
118+ s.setAttribute('id', id);
119+ s.setAttribute('rel', 'stylesheet');
120+ s.setAttribute('type', 'text/css');
121+ s.setAttribute('href', path);
122+ d.body.appendChild(s);
123+ }
124+ };
125+
126+ searx.loadScript = function(src, callback) {
127+ var path = searx.staticPath + src,
128+ id = "script_" + src.replace('.', '_'),
129+ s = d.getElementById(id);
130+ if (s === null) {
131+ s = d.createElement('script');
132+ s.setAttribute('id', id);
133+ s.setAttribute('src', path);
134+ s.onload = callback;
135+ s.onerror = function() {
136+ s.setAttribute('error', '1');
137+ };
138+ d.body.appendChild(s);
139+ } else if (!s.hasAttribute('error')) {
140+ try {
141+ callback.apply(s, []);
142+ } catch (exception) {
143+ console.log(exception);
144+ }
145+ } else {
146+ console.log("callback not executed : script '" + path + "' not loaded.");
147+ }
148+ };
149+
150+ searx.on('.close', 'click', function(e) {
151+ var el = e.target || e.srcElement;
152+ this.parentNode.style.display="None";
153+ });
154+ return searx;
155+})(window, document, window.searx);
searx/static/themes/simple/js/searx_src/autocomplete.jsnew file+536
@@ -0,0 +1,536 @@
1+(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){
2+/*
3+ * @license MIT
4+ *
5+ * Autocomplete.js v2.6.3
6+ * Developed by Baptiste Donaux
7+ * http://autocomplete-js.com
8+ *
9+ * (c) 2017, Baptiste Donaux
10+ */
11+"use strict";
12+var ConditionOperator;
13+(function (ConditionOperator) {
14+ ConditionOperator[ConditionOperator["AND"] = 0] = "AND";
15+ ConditionOperator[ConditionOperator["OR"] = 1] = "OR";
16+})(ConditionOperator || (ConditionOperator = {}));
17+var EventType;
18+(function (EventType) {
19+ EventType[EventType["KEYDOWN"] = 0] = "KEYDOWN";
20+ EventType[EventType["KEYUP"] = 1] = "KEYUP";
21+})(EventType || (EventType = {}));
22+/**
23+ * Core
24+ *
25+ * @class
26+ * @author Baptiste Donaux <baptiste.donaux@gmail.com> @baptistedonaux
27+ */
28+var AutoComplete = (function () {
29+ // Constructor
30+ function AutoComplete(params, selector) {
31+ if (params === void 0) { params = {}; }
32+ if (selector === void 0) { selector = "[data-autocomplete]"; }
33+ if (Array.isArray(selector)) {
34+ selector.forEach(function (s) {
35+ new AutoComplete(params, s);
36+ });
37+ }
38+ else if (typeof selector == "string") {
39+ var elements = document.querySelectorAll(selector);
40+ Array.prototype.forEach.call(elements, function (input) {
41+ new AutoComplete(params, input);
42+ });
43+ }
44+ else {
45+ var specificParams = AutoComplete.merge(AutoComplete.defaults, params, {
46+ DOMResults: document.createElement("div")
47+ });
48+ AutoComplete.prototype.create(specificParams, selector);
49+ return specificParams;
50+ }
51+ }
52+ AutoComplete.prototype.create = function (params, element) {
53+ params.Input = element;
54+ if (params.Input.nodeName.match(/^INPUT$/i) && (params.Input.hasAttribute("type") === false || params.Input.getAttribute("type").match(/^TEXT|SEARCH$/i))) {
55+ params.Input.setAttribute("autocomplete", "off");
56+ params._Position(params);
57+ params.Input.parentNode.appendChild(params.DOMResults);
58+ params.$Listeners = {
59+ blur: params._Blur.bind(params),
60+ destroy: AutoComplete.prototype.destroy.bind(null, params),
61+ focus: params._Focus.bind(params),
62+ keyup: AutoComplete.prototype.event.bind(null, params, EventType.KEYUP),
63+ keydown: AutoComplete.prototype.event.bind(null, params, EventType.KEYDOWN),
64+ position: params._Position.bind(params)
65+ };
66+ for (var event in params.$Listeners) {
67+ params.Input.addEventListener(event, params.$Listeners[event]);
68+ }
69+ }
70+ };
71+ AutoComplete.prototype.getEventsByType = function (params, type) {
72+ var mappings = {};
73+ for (var key in params.KeyboardMappings) {
74+ var event = EventType.KEYUP;
75+ if (params.KeyboardMappings[key].Event !== undefined) {
76+ event = params.KeyboardMappings[key].Event;
77+ }
78+ if (event == type) {
79+ mappings[key] = params.KeyboardMappings[key];
80+ }
81+ }
82+ return mappings;
83+ };
84+ AutoComplete.prototype.event = function (params, type, event) {
85+ var eventIdentifier = function (condition) {
86+ if ((match === true && mapping.Operator == ConditionOperator.AND) || (match === false && mapping.Operator == ConditionOperator.OR)) {
87+ condition = AutoComplete.merge({
88+ Not: false
89+ }, condition);
90+ if (condition.hasOwnProperty("Is")) {
91+ if (condition.Is == event.keyCode) {
92+ match = !condition.Not;
93+ }
94+ else {
95+ match = condition.Not;
96+ }
97+ }
98+ else if (condition.hasOwnProperty("From") && condition.hasOwnProperty("To")) {
99+ if (event.keyCode >= condition.From && event.keyCode <= condition.To) {
100+ match = !condition.Not;
101+ }
102+ else {
103+ match = condition.Not;
104+ }
105+ }
106+ }
107+ };
108+ for (var name in AutoComplete.prototype.getEventsByType(params, type)) {
109+ var mapping = AutoComplete.merge({
110+ Operator: ConditionOperator.AND
111+ }, params.KeyboardMappings[name]), match = ConditionOperator.AND == mapping.Operator;
112+ mapping.Conditions.forEach(eventIdentifier);
113+ if (match === true) {
114+ mapping.Callback.call(params, event);
115+ }
116+ }
117+ };
118+ AutoComplete.prototype.makeRequest = function (params, callback) {
119+ var propertyHttpHeaders = Object.getOwnPropertyNames(params.HttpHeaders), request = new XMLHttpRequest(), method = params._HttpMethod(), url = params._Url(), queryParams = params._Pre(), queryParamsStringify = encodeURIComponent(params._QueryArg()) + "=" + encodeURIComponent(queryParams);
120+ if (method.match(/^GET$/i)) {
121+ if (url.indexOf("?") !== -1) {
122+ url += "&" + queryParamsStringify;
123+ }
124+ else {
125+ url += "?" + queryParamsStringify;
126+ }
127+ }
128+ request.open(method, url, true);
129+ for (var i = propertyHttpHeaders.length - 1; i >= 0; i--) {
130+ request.setRequestHeader(propertyHttpHeaders[i], params.HttpHeaders[propertyHttpHeaders[i]]);
131+ }
132+ request.onreadystatechange = function () {
133+ if (request.readyState == 4 && request.status == 200) {
134+ params.$Cache[queryParams] = request.response;
135+ callback(request.response);
136+ }
137+ };
138+ return request;
139+ };
140+ AutoComplete.prototype.ajax = function (params, request, timeout) {
141+ if (timeout === void 0) { timeout = true; }
142+ if (params.$AjaxTimer) {
143+ window.clearTimeout(params.$AjaxTimer);
144+ }
145+ if (timeout === true) {
146+ params.$AjaxTimer = window.setTimeout(AutoComplete.prototype.ajax.bind(null, params, request, false), params.Delay);
147+ }
148+ else {
149+ if (params.Request) {
150+ params.Request.abort();
151+ }
152+ params.Request = request;
153+ params.Request.send(params._QueryArg() + "=" + params._Pre());
154+ }
155+ };
156+ AutoComplete.prototype.cache = function (params, callback) {
157+ var response = params._Cache(params._Pre());
158+ if (response === undefined) {
159+ var request = AutoComplete.prototype.makeRequest(params, callback);
160+ AutoComplete.prototype.ajax(params, request);
161+ }
162+ else {
163+ callback(response);
164+ }
165+ };
166+ AutoComplete.prototype.destroy = function (params) {
167+ for (var event in params.$Listeners) {
168+ params.Input.removeEventListener(event, params.$Listeners[event]);
169+ }
170+ params.DOMResults.parentNode.removeChild(params.DOMResults);
171+ };
172+ return AutoComplete;
173+}());
174+AutoComplete.merge = function () {
175+ var merge = {}, tmp;
176+ for (var i = 0; i < arguments.length; i++) {
177+ for (tmp in arguments[i]) {
178+ merge[tmp] = arguments[i][tmp];
179+ }
180+ }
181+ return merge;
182+};
183+AutoComplete.defaults = {
184+ Delay: 150,
185+ EmptyMessage: "No result here",
186+ Highlight: {
187+ getRegex: function (value) {
188+ return new RegExp(value, "ig");
189+ },
190+ transform: function (value) {
191+ return "<strong>" + value + "</strong>";
192+ }
193+ },
194+ HttpHeaders: {
195+ "Content-type": "application/x-www-form-urlencoded"
196+ },
197+ Limit: 0,
198+ MinChars: 0,
199+ HttpMethod: "GET",
200+ QueryArg: "q",
201+ Url: null,
202+ KeyboardMappings: {
203+ "Enter": {
204+ Conditions: [{
205+ Is: 13,
206+ Not: false
207+ }],
208+ Callback: function (event) {
209+ if (this.DOMResults.getAttribute("class").indexOf("open") != -1) {
210+ var liActive = this.DOMResults.querySelector("li.active");
211+ if (liActive !== null) {
212+ event.preventDefault();
213+ this._Select(liActive);
214+ this.DOMResults.setAttribute("class", "autocomplete");
215+ }
216+ }
217+ },
218+ Operator: ConditionOperator.AND,
219+ Event: EventType.KEYDOWN
220+ },
221+ "KeyUpAndDown_down": {
222+ Conditions: [{
223+ Is: 38,
224+ Not: false
225+ },
226+ {
227+ Is: 40,
228+ Not: false
229+ }],
230+ Callback: function (event) {
231+ event.preventDefault();
232+ },
233+ Operator: ConditionOperator.OR,
234+ Event: EventType.KEYDOWN
235+ },
236+ "KeyUpAndDown_up": {
237+ Conditions: [{
238+ Is: 38,
239+ Not: false
240+ },
241+ {
242+ Is: 40,
243+ Not: false
244+ }],
245+ Callback: function (event) {
246+ event.preventDefault();
247+ 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");
248+ if (active) {
249+ var currentIndex = Array.prototype.indexOf.call(active.parentNode.children, active), position = currentIndex + (event.keyCode - 39), lisCount = this.DOMResults.getElementsByTagName("li").length;
250+ if (position < 0) {
251+ position = lisCount - 1;
252+ }
253+ else if (position >= lisCount) {
254+ position = 0;
255+ }
256+ active.classList.remove("active");
257+ active.parentElement.children.item(position).classList.add("active");
258+ }
259+ else if (last && event.keyCode == 38) {
260+ last.classList.add("active");
261+ }
262+ else if (first) {
263+ first.classList.add("active");
264+ }
265+ },
266+ Operator: ConditionOperator.OR,
267+ Event: EventType.KEYUP
268+ },
269+ "AlphaNum": {
270+ Conditions: [{
271+ Is: 13,
272+ Not: true
273+ }, {
274+ From: 35,
275+ To: 40,
276+ Not: true
277+ }],
278+ Callback: function () {
279+ var oldValue = this.Input.getAttribute("data-autocomplete-old-value"), currentValue = this._Pre();
280+ if (currentValue !== "" && currentValue.length >= this._MinChars()) {
281+ if (!oldValue || currentValue != oldValue) {
282+ this.DOMResults.setAttribute("class", "autocomplete open");
283+ }
284+ AutoComplete.prototype.cache(this, function (response) {
285+ this._Render(this._Post(response));
286+ this._Open();
287+ }.bind(this));
288+ }
289+ },
290+ Operator: ConditionOperator.AND,
291+ Event: EventType.KEYUP
292+ }
293+ },
294+ DOMResults: null,
295+ Request: null,
296+ Input: null,
297+ /**
298+ * Return the message when no result returns
299+ */
300+ _EmptyMessage: function () {
301+ var emptyMessage = "";
302+ if (this.Input.hasAttribute("data-autocomplete-empty-message")) {
303+ emptyMessage = this.Input.getAttribute("data-autocomplete-empty-message");
304+ }
305+ else if (this.EmptyMessage !== false) {
306+ emptyMessage = this.EmptyMessage;
307+ }
308+ else {
309+ emptyMessage = "";
310+ }
311+ return emptyMessage;
312+ },
313+ /**
314+ * Returns the maximum number of results
315+ */
316+ _Limit: function () {
317+ var limit = this.Input.getAttribute("data-autocomplete-limit");
318+ if (isNaN(limit) || limit === null) {
319+ return this.Limit;
320+ }
321+ return parseInt(limit, 10);
322+ },
323+ /**
324+ * Returns the minimum number of characters entered before firing ajax
325+ */
326+ _MinChars: function () {
327+ var minchars = this.Input.getAttribute("data-autocomplete-minchars");
328+ if (isNaN(minchars) || minchars === null) {
329+ return this.MinChars;
330+ }
331+ return parseInt(minchars, 10);
332+ },
333+ /**
334+ * Apply transformation on labels response
335+ */
336+ _Highlight: function (label) {
337+ return label.replace(this.Highlight.getRegex(this._Pre()), this.Highlight.transform);
338+ },
339+ /**
340+ * Returns the HHTP method to use
341+ */
342+ _HttpMethod: function () {
343+ if (this.Input.hasAttribute("data-autocomplete-method")) {
344+ return this.Input.getAttribute("data-autocomplete-method");
345+ }
346+ return this.HttpMethod;
347+ },
348+ /**
349+ * Returns the query param to use
350+ */
351+ _QueryArg: function () {
352+ if (this.Input.hasAttribute("data-autocomplete-param-name")) {
353+ return this.Input.getAttribute("data-autocomplete-param-name");
354+ }
355+ return this.QueryArg;
356+ },
357+ /**
358+ * Returns the URL to use for AJAX request
359+ */
360+ _Url: function () {
361+ if (this.Input.hasAttribute("data-autocomplete")) {
362+ return this.Input.getAttribute("data-autocomplete");
363+ }
364+ return this.Url;
365+ },
366+ /**
367+ * Manage the close
368+ */
369+ _Blur: function (now) {
370+ if (now === true) {
371+ this.DOMResults.setAttribute("class", "autocomplete");
372+ this.Input.setAttribute("data-autocomplete-old-value", this.Input.value);
373+ }
374+ else {
375+ var params = this;
376+ setTimeout(function () {
377+ params._Blur(true);
378+ }, 150);
379+ }
380+ },
381+ /**
382+ * Manage the cache
383+ */
384+ _Cache: function (value) {
385+ return this.$Cache[value];
386+ },
387+ /**
388+ * Manage the open
389+ */
390+ _Focus: function () {
391+ var oldValue = this.Input.getAttribute("data-autocomplete-old-value");
392+ if ((!oldValue || this.Input.value != oldValue) && this._MinChars() <= this.Input.value.length) {
393+ this.DOMResults.setAttribute("class", "autocomplete open");
394+ }
395+ },
396+ /**
397+ * Bind all results item if one result is opened
398+ */
399+ _Open: function () {
400+ var params = this;
401+ Array.prototype.forEach.call(this.DOMResults.getElementsByTagName("li"), function (li) {
402+ if (li.getAttribute("class") != "locked") {
403+ li.onclick = function (event) {
404+ params._Select(li);
405+ };
406+ li.onmouseenter = function () {
407+ var active = params.DOMResults.querySelector("li.active");
408+ if (active !== li) {
409+ if (active !== null) {
410+ active.classList.remove("active");
411+ }
412+ li.classList.add("active");
413+ }
414+ };
415+ }
416+ });
417+ },
418+ /**
419+ * Position the results HTML element
420+ */
421+ _Position: function () {
422+ this.DOMResults.setAttribute("class", "autocomplete");
423+ this.DOMResults.setAttribute("style", "top:" + (this.Input.offsetTop + this.Input.offsetHeight) + "px;left:" + this.Input.offsetLeft + "px;width:" + this.Input.clientWidth + "px;");
424+ },
425+ /**
426+ * Execute the render of results DOM element
427+ */
428+ _Render: function (response) {
429+ var ul;
430+ if (typeof response == "string") {
431+ ul = this._RenderRaw(response);
432+ }
433+ else {
434+ ul = this._RenderResponseItems(response);
435+ }
436+ if (this.DOMResults.hasChildNodes()) {
437+ this.DOMResults.removeChild(this.DOMResults.childNodes[0]);
438+ }
439+ this.DOMResults.appendChild(ul);
440+ },
441+ /**
442+ * ResponseItems[] rendering
443+ */
444+ _RenderResponseItems: function (response) {
445+ var ul = document.createElement("ul"), li = document.createElement("li"), limit = this._Limit();
446+ // Order
447+ if (limit < 0) {
448+ response = response.reverse();
449+ }
450+ else if (limit === 0) {
451+ limit = response.length;
452+ }
453+ for (var item = 0; item < Math.min(Math.abs(limit), response.length); item++) {
454+ li.innerHTML = response[item].Label;
455+ li.setAttribute("data-autocomplete-value", response[item].Value);
456+ ul.appendChild(li);
457+ li = document.createElement("li");
458+ }
459+ return ul;
460+ },
461+ /**
462+ * string response rendering (RAW HTML)
463+ */
464+ _RenderRaw: function (response) {
465+ var ul = document.createElement("ul"), li = document.createElement("li");
466+ if (response.length > 0) {
467+ this.DOMResults.innerHTML = response;
468+ }
469+ else {
470+ var emptyMessage = this._EmptyMessage();
471+ if (emptyMessage !== "") {
472+ li.innerHTML = emptyMessage;
473+ li.setAttribute("class", "locked");
474+ ul.appendChild(li);
475+ }
476+ }
477+ return ul;
478+ },
479+ /**
480+ * Deal with request response
481+ */
482+ _Post: function (response) {
483+ try {
484+ var returnResponse = [];
485+ //JSON return
486+ var json = JSON.parse(response);
487+ if (Object.keys(json).length === 0) {
488+ return "";
489+ }
490+ if (Array.isArray(json)) {
491+ for (var i = 0; i < Object.keys(json).length; i++) {
492+ returnResponse[returnResponse.length] = { "Value": json[i], "Label": this._Highlight(json[i]) };
493+ }
494+ }
495+ else {
496+ for (var value in json) {
497+ returnResponse.push({
498+ "Value": value,
499+ "Label": this._Highlight(json[value])
500+ });
501+ }
502+ }
503+ return returnResponse;
504+ }
505+ catch (event) {
506+ //HTML return
507+ return response;
508+ }
509+ },
510+ /**
511+ * Return the autocomplete value to send (before request)
512+ */
513+ _Pre: function () {
514+ return this.Input.value;
515+ },
516+ /**
517+ * Choice one result item
518+ */
519+ _Select: function (item) {
520+ console.log('test test test');
521+ if (item.hasAttribute("data-autocomplete-value")) {
522+ this.Input.value = item.getAttribute("data-autocomplete-value");
523+ }
524+ else {
525+ this.Input.value = item.innerHTML;
526+ }
527+ this.Input.setAttribute("data-autocomplete-old-value", this.Input.value);
528+ },
529+ $AjaxTimer: null,
530+ $Cache: {},
531+ $Listeners: {}
532+};
533+module.exports = AutoComplete;
534+
535+},{}]},{},[1])(1)
536+});
searx/static/themes/simple/js/searx_src/searx_imageresult.jsnew file+151
@@ -0,0 +1,151 @@
1+/**
2+*
3+* Google Image Layout v0.0.1
4+* Description, by Anh Trinh.
5+* Heavily modified for searx
6+* http://trinhtrunganh.com
7+*
8+* @license Free to use under the MIT License.
9+*
10+*/
11+(function(w, d) {
12+ 'use strict';
13+
14+ function ImageLayout(container_selector, results_selector, img_selector, maxHeight) {
15+ this.container_selector = container_selector;
16+ this.results_selector = results_selector;
17+ this.img_selector = img_selector;
18+ this.margin = 10;
19+ this.maxHeight = maxHeight;
20+ this._alignAllDone = true;
21+ }
22+
23+ /**
24+ * Get the height that make all images fit the container
25+ *
26+ * width = w1 + w2 + w3 + ... = r1*h + r2*h + r3*h + ...
27+ *
28+ * @param {[type]} images the images to be calculated
29+ * @param {[type]} width the container witdth
30+ * @param {[type]} margin the margin between each image
31+ *
32+ * @return {[type]} the height
33+ */
34+ ImageLayout.prototype._getHeigth = function(images, width) {
35+ var r = 0,
36+ img;
37+
38+ width -= images.length * this.margin;
39+ for (var i = 0; i < images.length; i++) {
40+ img = images[i];
41+ if ((img.naturalWidth > 0) && (img.naturalHeight > 0)) {
42+ r += img.naturalWidth / img.naturalHeight;
43+ } else {
44+ // assume that not loaded images are square
45+ r += 1;
46+ }
47+ }
48+
49+ return width / r; //have to round down because Firefox will automatically roundup value with number of decimals > 3
50+ };
51+
52+ ImageLayout.prototype._setSize = function(images, height) {
53+ var img, imgWidth, imagesLength = images.length;
54+ for (var i = 0; i < imagesLength; i++) {
55+ img = images[i];
56+ if ((img.naturalWidth > 0) && (img.naturalHeight > 0)) {
57+ imgWidth = height * img.naturalWidth / img.naturalHeight;
58+ } else {
59+ // not loaded image : make it square as _getHeigth said it
60+ imgWidth = height;
61+ }
62+ img.style.width = imgWidth + 'px';
63+ img.style.height = height + 'px';
64+ img.style.marginLeft = '3px';
65+ img.style.marginTop = '3px';
66+ img.style.marginRight = this.margin - 7 + 'px'; // -4 is the negative margin of the inline element
67+ img.style.marginBottom = this.margin - 7 + 'px';
68+ }
69+ };
70+
71+ ImageLayout.prototype._alignImgs = function(imgGroup) {
72+ var slice, h,
73+ containerWidth = d.querySelector(this.container_selector).clientWidth;
74+
75+ w: while (imgGroup.length > 0) {
76+ for (var i = 1; i <= imgGroup.length; i++) {
77+ slice = imgGroup.slice(0, i);
78+ h = this._getHeigth(slice, containerWidth);
79+ if (h < this.maxHeight) {
80+ this._setSize(slice, h);
81+ imgGroup = imgGroup.slice(i);
82+ continue w;
83+ }
84+ }
85+ this._setSize(slice, Math.min(this.maxHeight, h));
86+ break;
87+ }
88+ };
89+
90+ ImageLayout.prototype.align = function(results_selector) {
91+ var results_selectorNode = d.querySelectorAll(this.results_selector),
92+ results_length = results_selectorNode.length,
93+ previous = null,
94+ current = null,
95+ imgGroup = [];
96+ for (var i = 0; i < results_length; i++) {
97+ current = results_selectorNode[i];
98+ if (current.previousElementSibling !== previous && imgGroup.length > 0) {
99+ // the current image is not conected to previous one
100+ // so the current image is the start of a new group of images.
101+ // so call _alignImgs to align the current group
102+ this._alignImgs(imgGroup);
103+ // and start a new empty group of images
104+ imgGroup = [];
105+ }
106+ // add the current image to the group (only the img tag)
107+ imgGroup.push(current.querySelector(this.img_selector));
108+ // update the previous variable
109+ previous = current;
110+ }
111+ // align the remaining images
112+ if (imgGroup.length > 0) {
113+ this._alignImgs(imgGroup);
114+ }
115+ };
116+
117+ ImageLayout.prototype.watch = function() {
118+ var i, img, imgGroup, imgNodeLength,
119+ obj = this,
120+ results_nodes = d.querySelectorAll(this.results_selector),
121+ results_length = results_nodes.length;
122+
123+ function align(e) {
124+ obj.align();
125+ }
126+
127+ function throttleAlign(e) {
128+ if (obj._alignAllDone) {
129+ obj._alignAllDone = false;
130+ setTimeout(function() {
131+ obj.align();
132+ obj._alignAllDone = true;
133+ }, 100);
134+ }
135+ }
136+
137+ w.addEventListener('resize', throttleAlign);
138+ w.addEventListener('pageshow', align);
139+
140+ for (i = 0; i < results_length; i++) {
141+ img = results_nodes[i].querySelector(this.img_selector);
142+ if (typeof img !== 'undefined') {
143+ img.addEventListener('load', throttleAlign);
144+ img.addEventListener('error', throttleAlign);
145+ }
146+ }
147+ };
148+
149+ w.searx.ImageLayout = ImageLayout;
150+
151+})(window, document);
searx/static/themes/simple/js/searx_src/searx_keyboard.jsnew file+360
@@ -0,0 +1,360 @@
1+searx.ready(function() {
2+
3+ searx.on('.result', 'click', function() {
4+ highlightResult(this)(true);
5+ });
6+
7+ searx.on('.result a', 'focus', function(e) {
8+ var el = e.target;
9+ while (el !== undefined) {
10+ if (el.classList.contains('result')) {
11+ if (el.getAttribute("data-vim-selected") === null) {
12+ highlightResult(el)(true);
13+ }
14+ break;
15+ }
16+ el = el.parentNode;
17+ }
18+ }, true);
19+
20+ var vimKeys = {
21+ 27: {
22+ key: 'Escape',
23+ fun: removeFocus,
24+ des: 'remove focus from the focused input',
25+ cat: 'Control'
26+ },
27+ 73: {
28+ key: 'i',
29+ fun: searchInputFocus,
30+ des: 'focus on the search input',
31+ cat: 'Control'
32+ },
33+ 66: {
34+ key: 'b',
35+ fun: scrollPage(-window.innerHeight),
36+ des: 'scroll one page up',
37+ cat: 'Navigation'
38+ },
39+ 70: {
40+ key: 'f',
41+ fun: scrollPage(window.innerHeight),
42+ des: 'scroll one page down',
43+ cat: 'Navigation'
44+ },
45+ 85: {
46+ key: 'u',
47+ fun: scrollPage(-window.innerHeight / 2),
48+ des: 'scroll half a page up',
49+ cat: 'Navigation'
50+ },
51+ 68: {
52+ key: 'd',
53+ fun: scrollPage(window.innerHeight / 2),
54+ des: 'scroll half a page down',
55+ cat: 'Navigation'
56+ },
57+ 71: {
58+ key: 'g',
59+ fun: scrollPageTo(-document.body.scrollHeight, 'top'),
60+ des: 'scroll to the top of the page',
61+ cat: 'Navigation'
62+ },
63+ 86: {
64+ key: 'v',
65+ fun: scrollPageTo(document.body.scrollHeight, 'bottom'),
66+ des: 'scroll to the bottom of the page',
67+ cat: 'Navigation'
68+ },
69+ 75: {
70+ key: 'k',
71+ fun: highlightResult('up'),
72+ des: 'select previous search result',
73+ cat: 'Results'
74+ },
75+ 74: {
76+ key: 'j',
77+ fun: highlightResult('down'),
78+ des: 'select next search result',
79+ cat: 'Results'
80+ },
81+ 80: {
82+ key: 'p',
83+ fun: pageButtonClick(0),
84+ des: 'go to previous page',
85+ cat: 'Results'
86+ },
87+ 78: {
88+ key: 'n',
89+ fun: pageButtonClick(1),
90+ des: 'go to next page',
91+ cat: 'Results'
92+ },
93+ 79: {
94+ key: 'o',
95+ fun: openResult(false),
96+ des: 'open search result',
97+ cat: 'Results'
98+ },
99+ 84: {
100+ key: 't',
101+ fun: openResult(true),
102+ des: 'open the result in a new tab',
103+ cat: 'Results'
104+ },
105+ 82: {
106+ key: 'r',
107+ fun: reloadPage,
108+ des: 'reload page from the server',
109+ cat: 'Control'
110+ },
111+ 72: {
112+ key: 'h',
113+ fun: toggleHelp,
114+ des: 'toggle help window',
115+ cat: 'Other'
116+ }
117+ };
118+
119+ searx.on(document, "keyup", function(e) {
120+ // check for modifiers so we don't break browser's hotkeys
121+ if (vimKeys.hasOwnProperty(e.keyCode) && !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) {
122+ var tagName = e.target.tagName.toLowerCase();
123+ if (e.keyCode === 27) {
124+ if (tagName === 'input' || tagName === 'select' || tagName === 'textarea') {
125+ vimKeys[e.keyCode].fun();
126+ }
127+ } else {
128+ if (e.target === document.body || tagName === 'a' || tagName === 'button') {
129+ vimKeys[e.keyCode].fun();
130+ }
131+ }
132+ }
133+ });
134+
135+ function highlightResult(which) {
136+ return function(noScroll) {
137+ var current = document.querySelector('.result[data-vim-selected]'),
138+ effectiveWhich = which;
139+ if (current === null) {
140+ // no selection : choose the first one
141+ current = document.querySelector('.result');
142+ if (current === null) {
143+ // no first one : there are no results
144+ return;
145+ }
146+ // replace up/down actions by selecting first one
147+ if (which === "down" || which === "up") {
148+ effectiveWhich = current;
149+ }
150+ }
151+
152+ var next, results = document.querySelectorAll('.result');
153+
154+ if (typeof effectiveWhich !== 'string') {
155+ next = effectiveWhich;
156+ } else {
157+ switch (effectiveWhich) {
158+ case 'visible':
159+ var top = document.documentElement.scrollTop || document.body.scrollTop;
160+ var bot = top + document.documentElement.clientHeight;
161+
162+ for (var i = 0; i < results.length; i++) {
163+ next = results[i];
164+ var etop = next.offsetTop;
165+ var ebot = etop + next.clientHeight;
166+
167+ if ((ebot <= bot) && (etop > top)) {
168+ break;
169+ }
170+ }
171+ break;
172+ case 'down':
173+ next = current.nextElementSibling;
174+ if (next === null) {
175+ next = results[0];
176+ }
177+ break;
178+ case 'up':
179+ next = current.previousElementSibling;
180+ if (next === null) {
181+ next = results[results.length - 1];
182+ }
183+ break;
184+ case 'bottom':
185+ next = results[results.length - 1];
186+ break;
187+ case 'top':
188+ /* falls through */
189+ default:
190+ next = results[0];
191+ }
192+ }
193+
194+ if (next) {
195+ current.removeAttribute('data-vim-selected');
196+ next.setAttribute('data-vim-selected', 'true');
197+ var link = next.querySelector('h3 a') || next.querySelector('a');
198+ if (link !== null) {
199+ link.focus();
200+ }
201+ if (!noScroll) {
202+ scrollPageToSelected();
203+ }
204+ }
205+ };
206+ }
207+
208+ function reloadPage() {
209+ document.location.reload(true);
210+ }
211+
212+ function removeFocus() {
213+ if (document.activeElement) {
214+ document.activeElement.blur();
215+ }
216+ }
217+
218+ function pageButtonClick(num) {
219+ return function() {
220+ var buttons = $('div#pagination button[type="submit"]');
221+ if (buttons.length !== 2) {
222+ console.log('page navigation with this theme is not supported');
223+ return;
224+ }
225+ if (num >= 0 && num < buttons.length) {
226+ buttons[num].click();
227+ } else {
228+ console.log('pageButtonClick(): invalid argument');
229+ }
230+ };
231+ }
232+
233+ function scrollPageToSelected() {
234+ var sel = document.querySelector('.result[data-vim-selected]');
235+ if (sel === null) {
236+ return;
237+ }
238+ var wtop = document.documentElement.scrollTop || document.body.scrollTop,
239+ wheight = document.documentElement.clientHeight,
240+ etop = sel.offsetTop,
241+ ebot = etop + sel.clientHeight,
242+ offset = 120;
243+ // first element ?
244+ if ((sel.previousElementSibling === null) && (ebot < wheight)) {
245+ // set to the top of page if the first element
246+ // is fully included in the viewport
247+ window.scroll(window.scrollX, 0);
248+ return;
249+ }
250+ if (wtop > (etop - offset)) {
251+ window.scroll(window.scrollX, etop - offset);
252+ } else {
253+ var wbot = wtop + wheight;
254+ if (wbot < (ebot + offset)) {
255+ window.scroll(window.scrollX, ebot - wheight + offset);
256+ }
257+ }
258+ }
259+
260+ function scrollPage(amount) {
261+ return function() {
262+ window.scrollBy(0, amount);
263+ highlightResult('visible')();
264+ };
265+ }
266+
267+ function scrollPageTo(position, nav) {
268+ return function() {
269+ window.scrollTo(0, position);
270+ highlightResult(nav)();
271+ };
272+ }
273+
274+ function searchInputFocus() {
275+ window.scrollTo(0, 0);
276+ document.querySelector('#q').focus();
277+ }
278+
279+ function openResult(newTab) {
280+ return function() {
281+ var link = document.querySelector('.result[data-vim-selected] h3 a');
282+ if (link !== null) {
283+ var url = link.getAttribute('href');
284+ if (newTab) {
285+ window.open(url);
286+ } else {
287+ window.location.href = url;
288+ }
289+ }
290+ };
291+ }
292+
293+ function toggleHelp() {
294+ var helpPanel = document.querySelector('#vim-hotkeys-help');
295+ if (helpPanel.length) {
296+ helpPanel.classList.toggle('hidden');
297+ return;
298+ }
299+
300+ var categories = {};
301+
302+ for (var k in vimKeys) {
303+ var key = vimKeys[k];
304+ categories[key.cat] = categories[key.cat] || [];
305+ categories[key.cat].push(key);
306+ }
307+
308+ var sorted = Object.keys(categories).sort(function(a, b) {
309+ return categories[b].length - categories[a].length;
310+ });
311+
312+ if (sorted.length === 0) {
313+ return;
314+ }
315+
316+ var html = '<div id="vim-hotkeys-help" class="well vim-hotkeys-help">';
317+ html += '<div class="container-fluid">';
318+
319+ html += '<div class="row">';
320+ html += '<div class="col-sm-12">';
321+ html += '<h3>How to navigate searx with Vim-like hotkeys</h3>';
322+ html += '</div>'; // col-sm-12
323+ html += '</div>'; // row
324+
325+ for (var i = 0; i < sorted.length; i++) {
326+ var cat = categories[sorted[i]];
327+
328+ var lastCategory = i === (sorted.length - 1);
329+ var first = i % 2 === 0;
330+
331+ if (first) {
332+ html += '<div class="row dflex">';
333+ }
334+ html += '<div class="col-sm-' + (first && lastCategory ? 12 : 6) + ' dflex">';
335+
336+ html += '<div class="panel panel-default iflex">';
337+ html += '<div class="panel-heading">' + cat[0].cat + '</div>';
338+ html += '<div class="panel-body">';
339+ html += '<ul class="list-unstyled">';
340+
341+ for (var cj in cat) {
342+ html += '<li><kbd>' + cat[cj].key + '</kbd> ' + cat[cj].des + '</li>';
343+ }
344+
345+ html += '</ul>';
346+ html += '</div>'; // panel-body
347+ html += '</div>'; // panel
348+ html += '</div>'; // col-sm-*
349+
350+ if (!first || lastCategory) {
351+ html += '</div>'; // row
352+ }
353+ }
354+
355+ html += '</div>'; // container-fluid
356+ html += '</div>'; // vim-hotkeys-help
357+
358+ $('body').append(html);
359+ }
360+});
searx/static/themes/simple/js/searx_src/searx_mapresult.jsnew file+175
@@ -0,0 +1,175 @@
1+/**
2+* searx is free software: you can redistribute it and/or modify
3+* it under the terms of the GNU Affero General Public License as published by
4+* the Free Software Foundation, either version 3 of the License, or
5+* (at your option) any later version.
6+*
7+* searx is distributed in the hope that it will be useful,
8+* but WITHOUT ANY WARRANTY; without even the implied warranty of
9+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10+* GNU Affero General Public License for more details.
11+*
12+* You should have received a copy of the GNU Affero General Public License
13+* along with searx. If not, see < http://www.gnu.org/licenses/ >.
14+*
15+* (C) 2014 by Thomas Pointhuber, <thomas.pointhuber@gmx.at>
16+* (C) 2017 by Alexandre Flament, <alex@al-f.net>
17+*/
18+(function (w, d, searx) {
19+ 'use strict';
20+
21+ searx.ready(function () {
22+ searx.on('.searx_overpass_request', 'click', function(event) {
23+ // no more request
24+ this.classList.remove("searx_overpass_request");
25+
26+ //
27+ var overpass_url = "https://overpass-api.de/api/interpreter?data=";
28+ var query_start = overpass_url + "[out:json][timeout:25];(";
29+ var query_end = ");out meta;";
30+
31+ var osm_id = this.dataset.osmId;
32+ var osm_type = this.dataset.osmType;
33+ var result_table = d.querySelector("#" + this.dataset.resultTable);
34+ var result_table_loadicon = d.querySelector("#" + this.dataset.resultTableLoadicon);
35+
36+ // tags which can be ignored
37+ var osm_ignore_tags = [ "addr:city", "addr:country", "addr:housenumber", "addr:postcode", "addr:street" ];
38+
39+ if(osm_id && osm_type && result_table) {
40+ var query = null;
41+ switch(osm_type) {
42+ case 'node':
43+ query = query_start + "node(" + osm_id + ");" + query_end;
44+ break;
45+ case 'way':
46+ query = query_start + "way(" + osm_id + ");" + query_end;
47+ break;
48+ case 'relation':
49+ query = query_start + "relation(" + osm_id + ");" + query_end;
50+ break;
51+ default:
52+ break;
53+ }
54+ if(query) {
55+ // console.log(query);
56+ searx.http( 'GET', query ).then(function(html, contentType) {
57+ html = JSON.parse(html);
58+ if(html && html.elements && html.elements[0]) {
59+ var element = html.elements[0];
60+ var newHtml = "";
61+ for (var row in element.tags) {
62+ if(element.tags.name === null || osm_ignore_tags.indexOf(row) == -1) {
63+ newHtml += "<tr><td>" + row + "</td><td>";
64+ switch(row) {
65+ case "phone":
66+ case "fax":
67+ newHtml += "<a href=\"tel:" + element.tags[row].replace(/ /g,'') + "\">" + element.tags[row] + "</a>";
68+ break;
69+ case "email":
70+ newHtml += "<a href=\"mailto:" + element.tags[row] + "\">" + element.tags[row] + "</a>";
71+ break;
72+ case "website":
73+ case "url":
74+ newHtml += "<a href=\"" + element.tags[row] + "\">" + element.tags[row] + "</a>";
75+ break;
76+ case "wikidata":
77+ newHtml += "<a href=\"https://www.wikidata.org/wiki/" + element.tags[row] + "\">" + element.tags[row] + "</a>";
78+ break;
79+ case "wikipedia":
80+ if(element.tags[row].indexOf(":") != -1) {
81+ 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>";
82+ break;
83+ }
84+ /* jshint ignore:start */
85+ default:
86+ /* jshint ignore:end */
87+ newHtml += element.tags[row];
88+ break;
89+ }
90+ newHtml += "</td></tr>";
91+ }
92+ }
93+ result_table_loadicon.classList.add('invisible');
94+ result_table.classList.remove('invisible');
95+ result_table.querySelector("tbody").innerHTML = newHtml;
96+ }
97+ })
98+ .catch(function() {
99+ result_table_loadicon.innerHTML = result_table_loadicon.innerHTML + "<p class=\"text-muted\">could not load data!</p>";
100+ });
101+ }
102+ }
103+
104+ // this event occour only once per element
105+ event.preventDefault();
106+ });
107+
108+ searx.on('.searx_init_map', 'click', function(event) {
109+ // no more request
110+ this.classList.remove("searx_init_map");
111+
112+ //
113+ var leaflet_target = this.dataset.leafletTarget;
114+ var map_lon = parseFloat(this.dataset.mapLon);
115+ var map_lat = parseFloat(this.dataset.mapLat);
116+ var map_zoom = parseFloat(this.dataset.mapZoom);
117+ var map_boundingbox = JSON.parse(this.dataset.mapBoundingbox);
118+ var map_geojson = JSON.parse(this.dataset.mapGeojson);
119+
120+ searx.loadStyle('leaflet/leaflet.css');
121+ searx.loadScript('leaflet/leaflet.js', function() {
122+ var map_bounds = null;
123+ if(map_boundingbox) {
124+ var southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]);
125+ var northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]);
126+ map_bounds = L.latLngBounds(southWest, northEast);
127+ }
128+
129+ // init map
130+ var map = L.map(leaflet_target);
131+ // create the tile layer with correct attribution
132+ var osmMapnikUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
133+ var osmMapnikAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
134+ var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib});
135+ var osmWikimediaUrl='https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png';
136+ var osmWikimediaAttrib = 'Wikimedia maps beta | Maps data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
137+ var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib});
138+ // init map view
139+ if(map_bounds) {
140+ // TODO hack: https://github.com/Leaflet/Leaflet/issues/2021
141+ // Still useful ?
142+ setTimeout(function () {
143+ map.fitBounds(map_bounds, {
144+ maxZoom:17
145+ });
146+ }, 0);
147+ } else if (map_lon && map_lat) {
148+ if(map_zoom) {
149+ map.setView(new L.latLng(map_lat, map_lon),map_zoom);
150+ } else {
151+ map.setView(new L.latLng(map_lat, map_lon),8);
152+ }
153+ }
154+
155+ map.addLayer(osmMapnik);
156+
157+ var baseLayers = {
158+ "OSM Mapnik": osmMapnik/*,
159+ "OSM Wikimedia": osmWikimedia*/
160+ };
161+
162+ L.control.layers(baseLayers).addTo(map);
163+
164+ if(map_geojson) {
165+ L.geoJson(map_geojson).addTo(map);
166+ } /*else if(map_bounds) {
167+ L.rectangle(map_bounds, {color: "#ff7800", weight: 3, fill:false}).addTo(map);
168+ }*/
169+ });
170+
171+ // this event occour only once per element
172+ event.preventDefault();
173+ });
174+ });
175+})(window, document, window.searx);
searx/static/themes/simple/js/searx_src/searx_results.jsnew file+63
@@ -0,0 +1,63 @@
1+/**
2+* searx is free software: you can redistribute it and/or modify
3+* it under the terms of the GNU Affero General Public License as published by
4+* the Free Software Foundation, either version 3 of the License, or
5+* (at your option) any later version.
6+*
7+* searx is distributed in the hope that it will be useful,
8+* but WITHOUT ANY WARRANTY; without even the implied warranty of
9+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10+* GNU Affero General Public License for more details.
11+*
12+* You should have received a copy of the GNU Affero General Public License
13+* along with searx. If not, see < http://www.gnu.org/licenses/ >.
14+*
15+* (C) 2017 by Alexandre Flament, <alex@al-f.net>
16+*/
17+(function(w, d, searx) {
18+ 'use strict';
19+
20+ searx.ready(function() {
21+ searx.image_thumbnail_layout = new searx.ImageLayout('#urls', '#urls .result-images', 'img.image_thumbnail', 200);
22+ searx.image_thumbnail_layout.watch();
23+
24+ searx.on('.btn-collapse', 'click', function(event) {
25+ var btnLabelCollapsed = this.getAttribute('data-btn-text-collapsed');
26+ var btnLabelNotCollapsed = this.getAttribute('data-btn-text-not-collapsed');
27+ var target = this.getAttribute('data-target');
28+ var targetElement = d.querySelector(target);
29+ var html = this.innerHTML;
30+ if (this.classList.contains('collapsed')) {
31+ html = html.replace(btnLabelCollapsed, btnLabelNotCollapsed);
32+ } else {
33+ html = html.replace(btnLabelNotCollapsed, btnLabelCollapsed);
34+ }
35+ this.innerHTML = html;
36+ this.classList.toggle('collapsed');
37+ targetElement.classList.toggle('invisible');
38+ });
39+
40+ searx.on('.media-loader', 'click', function(event) {
41+ var target = this.getAttribute('data-target');
42+ var iframe_load = d.querySelector(target + ' > iframe');
43+ var srctest = iframe_load.getAttribute('src');
44+ if (srctest === null || srctest === undefined || srctest === false) {
45+ iframe_load.setAttribute('src', iframe_load.getAttribute('data-src'));
46+ }
47+ });
48+
49+ w.addEventListener('scroll', function() {
50+ var e = d.getElementById('backToTop'),
51+ scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
52+ if (e !== null) {
53+ if (scrollTop >= 200) {
54+ e.style.opacity = 1;
55+ } else {
56+ e.style.opacity = 0;
57+ }
58+ }
59+ });
60+
61+ });
62+
63+})(window, document, window.searx);
searx/static/themes/simple/js/searx_src/searx_search.jsnew file+94
@@ -0,0 +1,94 @@
1+/**
2+* searx is free software: you can redistribute it and/or modify
3+* it under the terms of the GNU Affero General Public License as published by
4+* the Free Software Foundation, either version 3 of the License, or
5+* (at your option) any later version.
6+*
7+* searx is distributed in the hope that it will be useful,
8+* but WITHOUT ANY WARRANTY; without even the implied warranty of
9+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10+* GNU Affero General Public License for more details.
11+*
12+* You should have received a copy of the GNU Affero General Public License
13+* along with searx. If not, see < http://www.gnu.org/licenses/ >.
14+*
15+* (C) 2017 by Alexandre Flament, <alex@al-f.net>
16+*/
17+(function(w, d, searx) {
18+ 'use strict';
19+
20+ var firstFocus = true, qinput_id = "q", qinput;
21+
22+ function placeCursorAtEnd(element) {
23+ if (element.setSelectionRange) {
24+ var len = element.value.length;
25+ element.setSelectionRange(len, len);
26+ }
27+ }
28+
29+ function submitIfQuery() {
30+ if (qinput.value.length > 0) {
31+ var search = document.getElementById('search');
32+ setTimeout(search.submit.bind(search), 0);
33+ }
34+ }
35+
36+ searx.ready(function() {
37+ qinput = d.getElementById(qinput_id);
38+
39+ function placeCursorAtEndOnce(e) {
40+ if (firstFocus) {
41+ placeCursorAtEnd(qinput);
42+ firstFocus = false;
43+ } else {
44+ // e.preventDefault();
45+ }
46+ }
47+
48+ if (qinput !== null) {
49+ // autocompleter
50+ if (searx.autocompleter) {
51+ searx.autocomplete = AutoComplete.call(w, {
52+ Url: "./autocompleter",
53+ EmptyMessage: searx.noItemFound,
54+ HttpMethod: searx.method,
55+ MinChars: 4,
56+ Delay: 300,
57+ }, "#" + qinput_id);
58+
59+ // hack, see : https://github.com/autocompletejs/autocomplete.js/issues/37
60+ w.addEventListener('resize', function() {
61+ var event = new CustomEvent("position");
62+ qinput.dispatchEvent(event);
63+ });
64+ }
65+
66+ qinput.addEventListener('focus', placeCursorAtEndOnce, false);
67+ qinput.focus();
68+ }
69+
70+ // vanilla js version of search_on_category_select.js
71+ if (qinput !== null && searx.search_on_category_select) {
72+ d.querySelector('.help').className='invisible';
73+
74+ searx.on('#categories input', 'change', function(e) {
75+ var i, categories = d.querySelectorAll('#categories input[type="checkbox"]');
76+ for(i=0; i<categories.length; i++) {
77+ if (categories[i] !== this && categories[i].checked) {
78+ categories[i].click();
79+ }
80+ }
81+ if (! this.checked) {
82+ this.click();
83+ }
84+ submitIfQuery();
85+ return false;
86+ });
87+
88+ searx.on(d.getElementById('time_range'), 'change', submitIfQuery);
89+ searx.on(d.getElementById('language'), 'change', submitIfQuery);
90+ }
91+
92+ });
93+
94+})(window, document, window.searx);
searx/static/themes/simple/leaflet/images/layers-2x.pngnew file

Binary file not shown.

searx/static/themes/simple/leaflet/images/layers.pngnew file

Binary file not shown.

searx/static/themes/simple/leaflet/images/marker-icon-2x-green.pngnew file

Binary file not shown.

searx/static/themes/simple/leaflet/images/marker-icon-2x-orange.pngnew file

Binary file not shown.

searx/static/themes/simple/leaflet/images/marker-icon-2x-red.pngnew file

Binary file not shown.

searx/static/themes/simple/leaflet/images/marker-icon-2x.pngnew file

Binary file not shown.

searx/static/themes/simple/leaflet/images/marker-icon-green.pngnew file

Binary file not shown.

searx/static/themes/simple/leaflet/images/marker-icon-orange.pngnew file

Binary file not shown.

searx/static/themes/simple/leaflet/images/marker-icon-red.pngnew file

Binary file not shown.

searx/static/themes/simple/leaflet/images/marker-icon.pngnew file

Binary file not shown.

searx/static/themes/simple/leaflet/images/marker-shadow.pngnew file

Binary file not shown.

searx/static/themes/simple/leaflet/leaflet.cssnew file+624
@@ -0,0 +1,624 @@
1+/* required styles */
2+
3+.leaflet-pane,
4+.leaflet-tile,
5+.leaflet-marker-icon,
6+.leaflet-marker-shadow,
7+.leaflet-tile-container,
8+.leaflet-pane > svg,
9+.leaflet-pane > canvas,
10+.leaflet-zoom-box,
11+.leaflet-image-layer,
12+.leaflet-layer {
13+ position: absolute;
14+ left: 0;
15+ top: 0;
16+ }
17+.leaflet-container {
18+ overflow: hidden;
19+ }
20+.leaflet-tile,
21+.leaflet-marker-icon,
22+.leaflet-marker-shadow {
23+ -webkit-user-select: none;
24+ -moz-user-select: none;
25+ user-select: none;
26+ -webkit-user-drag: none;
27+ }
28+/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
29+.leaflet-safari .leaflet-tile {
30+ image-rendering: -webkit-optimize-contrast;
31+ }
32+/* hack that prevents hw layers "stretching" when loading new tiles */
33+.leaflet-safari .leaflet-tile-container {
34+ width: 1600px;
35+ height: 1600px;
36+ -webkit-transform-origin: 0 0;
37+ }
38+.leaflet-marker-icon,
39+.leaflet-marker-shadow {
40+ display: block;
41+ }
42+/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
43+/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
44+.leaflet-container .leaflet-overlay-pane svg,
45+.leaflet-container .leaflet-marker-pane img,
46+.leaflet-container .leaflet-shadow-pane img,
47+.leaflet-container .leaflet-tile-pane img,
48+.leaflet-container img.leaflet-image-layer {
49+ max-width: none !important;
50+ }
51+
52+.leaflet-container.leaflet-touch-zoom {
53+ -ms-touch-action: pan-x pan-y;
54+ touch-action: pan-x pan-y;
55+ }
56+.leaflet-container.leaflet-touch-drag {
57+ -ms-touch-action: pinch-zoom;
58+ }
59+.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
60+ -ms-touch-action: none;
61+ touch-action: none;
62+}
63+.leaflet-tile {
64+ filter: inherit;
65+ visibility: hidden;
66+ }
67+.leaflet-tile-loaded {
68+ visibility: inherit;
69+ }
70+.leaflet-zoom-box {
71+ width: 0;
72+ height: 0;
73+ -moz-box-sizing: border-box;
74+ box-sizing: border-box;
75+ z-index: 800;
76+ }
77+/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
78+.leaflet-overlay-pane svg {
79+ -moz-user-select: none;
80+ }
81+
82+.leaflet-pane { z-index: 400; }
83+
84+.leaflet-tile-pane { z-index: 200; }
85+.leaflet-overlay-pane { z-index: 400; }
86+.leaflet-shadow-pane { z-index: 500; }
87+.leaflet-marker-pane { z-index: 600; }
88+.leaflet-tooltip-pane { z-index: 650; }
89+.leaflet-popup-pane { z-index: 700; }
90+
91+.leaflet-map-pane canvas { z-index: 100; }
92+.leaflet-map-pane svg { z-index: 200; }
93+
94+.leaflet-vml-shape {
95+ width: 1px;
96+ height: 1px;
97+ }
98+.lvml {
99+ behavior: url(#default#VML);
100+ display: inline-block;
101+ position: absolute;
102+ }
103+
104+
105+/* control positioning */
106+
107+.leaflet-control {
108+ position: relative;
109+ z-index: 800;
110+ pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
111+ pointer-events: auto;
112+ }
113+.leaflet-top,
114+.leaflet-bottom {
115+ position: absolute;
116+ z-index: 1000;
117+ pointer-events: none;
118+ }
119+.leaflet-top {
120+ top: 0;
121+ }
122+.leaflet-right {
123+ right: 0;
124+ }
125+.leaflet-bottom {
126+ bottom: 0;
127+ }
128+.leaflet-left {
129+ left: 0;
130+ }
131+.leaflet-control {
132+ float: left;
133+ clear: both;
134+ }
135+.leaflet-right .leaflet-control {
136+ float: right;
137+ }
138+.leaflet-top .leaflet-control {
139+ margin-top: 10px;
140+ }
141+.leaflet-bottom .leaflet-control {
142+ margin-bottom: 10px;
143+ }
144+.leaflet-left .leaflet-control {
145+ margin-left: 10px;
146+ }
147+.leaflet-right .leaflet-control {
148+ margin-right: 10px;
149+ }
150+
151+
152+/* zoom and fade animations */
153+
154+.leaflet-fade-anim .leaflet-tile {
155+ will-change: opacity;
156+ }
157+.leaflet-fade-anim .leaflet-popup {
158+ opacity: 0;
159+ -webkit-transition: opacity 0.2s linear;
160+ -moz-transition: opacity 0.2s linear;
161+ -o-transition: opacity 0.2s linear;
162+ transition: opacity 0.2s linear;
163+ }
164+.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
165+ opacity: 1;
166+ }
167+.leaflet-zoom-animated {
168+ -webkit-transform-origin: 0 0;
169+ -ms-transform-origin: 0 0;
170+ transform-origin: 0 0;
171+ }
172+.leaflet-zoom-anim .leaflet-zoom-animated {
173+ will-change: transform;
174+ }
175+.leaflet-zoom-anim .leaflet-zoom-animated {
176+ -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
177+ -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
178+ -o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1);
179+ transition: transform 0.25s cubic-bezier(0,0,0.25,1);
180+ }
181+.leaflet-zoom-anim .leaflet-tile,
182+.leaflet-pan-anim .leaflet-tile {
183+ -webkit-transition: none;
184+ -moz-transition: none;
185+ -o-transition: none;
186+ transition: none;
187+ }
188+
189+.leaflet-zoom-anim .leaflet-zoom-hide {
190+ visibility: hidden;
191+ }
192+
193+
194+/* cursors */
195+
196+.leaflet-interactive {
197+ cursor: pointer;
198+ }
199+.leaflet-grab {
200+ cursor: -webkit-grab;
201+ cursor: -moz-grab;
202+ }
203+.leaflet-crosshair,
204+.leaflet-crosshair .leaflet-interactive {
205+ cursor: crosshair;
206+ }
207+.leaflet-popup-pane,
208+.leaflet-control {
209+ cursor: auto;
210+ }
211+.leaflet-dragging .leaflet-grab,
212+.leaflet-dragging .leaflet-grab .leaflet-interactive,
213+.leaflet-dragging .leaflet-marker-draggable {
214+ cursor: move;
215+ cursor: -webkit-grabbing;
216+ cursor: -moz-grabbing;
217+ }
218+
219+/* marker & overlays interactivity */
220+.leaflet-marker-icon,
221+.leaflet-marker-shadow,
222+.leaflet-image-layer,
223+.leaflet-pane > svg path,
224+.leaflet-tile-container {
225+ pointer-events: none;
226+ }
227+
228+.leaflet-marker-icon.leaflet-interactive,
229+.leaflet-image-layer.leaflet-interactive,
230+.leaflet-pane > svg path.leaflet-interactive {
231+ pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
232+ pointer-events: auto;
233+ }
234+
235+/* visual tweaks */
236+
237+.leaflet-container {
238+ background: #ddd;
239+ outline: 0;
240+ }
241+.leaflet-container a {
242+ color: #0078A8;
243+ }
244+.leaflet-container a.leaflet-active {
245+ outline: 2px solid orange;
246+ }
247+.leaflet-zoom-box {
248+ border: 2px dotted #38f;
249+ background: rgba(255,255,255,0.5);
250+ }
251+
252+
253+/* general typography */
254+.leaflet-container {
255+ font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
256+ }
257+
258+
259+/* general toolbar styles */
260+
261+.leaflet-bar {
262+ box-shadow: 0 1px 5px rgba(0,0,0,0.65);
263+ border-radius: 4px;
264+ }
265+.leaflet-bar a,
266+.leaflet-bar a:hover {
267+ background-color: #fff;
268+ border-bottom: 1px solid #ccc;
269+ width: 26px;
270+ height: 26px;
271+ line-height: 26px;
272+ display: block;
273+ text-align: center;
274+ text-decoration: none;
275+ color: black;
276+ }
277+.leaflet-bar a,
278+.leaflet-control-layers-toggle {
279+ background-position: 50% 50%;
280+ background-repeat: no-repeat;
281+ display: block;
282+ }
283+.leaflet-bar a:hover {
284+ background-color: #f4f4f4;
285+ }
286+.leaflet-bar a:first-child {
287+ border-top-left-radius: 4px;
288+ border-top-right-radius: 4px;
289+ }
290+.leaflet-bar a:last-child {
291+ border-bottom-left-radius: 4px;
292+ border-bottom-right-radius: 4px;
293+ border-bottom: none;
294+ }
295+.leaflet-bar a.leaflet-disabled {
296+ cursor: default;
297+ background-color: #f4f4f4;
298+ color: #bbb;
299+ }
300+
301+.leaflet-touch .leaflet-bar a {
302+ width: 30px;
303+ height: 30px;
304+ line-height: 30px;
305+ }
306+
307+
308+/* zoom control */
309+
310+.leaflet-control-zoom-in,
311+.leaflet-control-zoom-out {
312+ font: bold 18px 'Lucida Console', Monaco, monospace;
313+ text-indent: 1px;
314+ }
315+.leaflet-control-zoom-out {
316+ font-size: 20px;
317+ }
318+
319+.leaflet-touch .leaflet-control-zoom-in {
320+ font-size: 22px;
321+ }
322+.leaflet-touch .leaflet-control-zoom-out {
323+ font-size: 24px;
324+ }
325+
326+
327+/* layers control */
328+
329+.leaflet-control-layers {
330+ box-shadow: 0 1px 5px rgba(0,0,0,0.4);
331+ background: #fff;
332+ border-radius: 5px;
333+ }
334+.leaflet-control-layers-toggle {
335+ background-image: url(images/layers.png);
336+ width: 36px;
337+ height: 36px;
338+ }
339+.leaflet-retina .leaflet-control-layers-toggle {
340+ background-image: url(images/layers-2x.png);
341+ background-size: 26px 26px;
342+ }
343+.leaflet-touch .leaflet-control-layers-toggle {
344+ width: 44px;
345+ height: 44px;
346+ }
347+.leaflet-control-layers .leaflet-control-layers-list,
348+.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
349+ display: none;
350+ }
351+.leaflet-control-layers-expanded .leaflet-control-layers-list {
352+ display: block;
353+ position: relative;
354+ }
355+.leaflet-control-layers-expanded {
356+ padding: 6px 10px 6px 6px;
357+ color: #333;
358+ background: #fff;
359+ }
360+.leaflet-control-layers-scrollbar {
361+ overflow-y: scroll;
362+ padding-right: 5px;
363+ }
364+.leaflet-control-layers-selector {
365+ margin-top: 2px;
366+ position: relative;
367+ top: 1px;
368+ }
369+.leaflet-control-layers label {
370+ display: block;
371+ }
372+.leaflet-control-layers-separator {
373+ height: 0;
374+ border-top: 1px solid #ddd;
375+ margin: 5px -10px 5px -6px;
376+ }
377+
378+/* Default icon URLs */
379+.leaflet-default-icon-path {
380+ background-image: url(images/marker-icon.png);
381+ }
382+
383+
384+/* attribution and scale controls */
385+
386+.leaflet-container .leaflet-control-attribution {
387+ background: #fff;
388+ background: rgba(255, 255, 255, 0.7);
389+ margin: 0;
390+ }
391+.leaflet-control-attribution,
392+.leaflet-control-scale-line {
393+ padding: 0 5px;
394+ color: #333;
395+ }
396+.leaflet-control-attribution a {
397+ text-decoration: none;
398+ }
399+.leaflet-control-attribution a:hover {
400+ text-decoration: underline;
401+ }
402+.leaflet-container .leaflet-control-attribution,
403+.leaflet-container .leaflet-control-scale {
404+ font-size: 11px;
405+ }
406+.leaflet-left .leaflet-control-scale {
407+ margin-left: 5px;
408+ }
409+.leaflet-bottom .leaflet-control-scale {
410+ margin-bottom: 5px;
411+ }
412+.leaflet-control-scale-line {
413+ border: 2px solid #777;
414+ border-top: none;
415+ line-height: 1.1;
416+ padding: 2px 5px 1px;
417+ font-size: 11px;
418+ white-space: nowrap;
419+ overflow: hidden;
420+ -moz-box-sizing: border-box;
421+ box-sizing: border-box;
422+
423+ background: #fff;
424+ background: rgba(255, 255, 255, 0.5);
425+ }
426+.leaflet-control-scale-line:not(:first-child) {
427+ border-top: 2px solid #777;
428+ border-bottom: none;
429+ margin-top: -2px;
430+ }
431+.leaflet-control-scale-line:not(:first-child):not(:last-child) {
432+ border-bottom: 2px solid #777;
433+ }
434+
435+.leaflet-touch .leaflet-control-attribution,
436+.leaflet-touch .leaflet-control-layers,
437+.leaflet-touch .leaflet-bar {
438+ box-shadow: none;
439+ }
440+.leaflet-touch .leaflet-control-layers,
441+.leaflet-touch .leaflet-bar {
442+ border: 2px solid rgba(0,0,0,0.2);
443+ background-clip: padding-box;
444+ }
445+
446+
447+/* popup */
448+
449+.leaflet-popup {
450+ position: absolute;
451+ text-align: center;
452+ margin-bottom: 20px;
453+ }
454+.leaflet-popup-content-wrapper {
455+ padding: 1px;
456+ text-align: left;
457+ border-radius: 12px;
458+ }
459+.leaflet-popup-content {
460+ margin: 13px 19px;
461+ line-height: 1.4;
462+ }
463+.leaflet-popup-content p {
464+ margin: 18px 0;
465+ }
466+.leaflet-popup-tip-container {
467+ width: 40px;
468+ height: 20px;
469+ position: absolute;
470+ left: 50%;
471+ margin-left: -20px;
472+ overflow: hidden;
473+ pointer-events: none;
474+ }
475+.leaflet-popup-tip {
476+ width: 17px;
477+ height: 17px;
478+ padding: 1px;
479+
480+ margin: -10px auto 0;
481+
482+ -webkit-transform: rotate(45deg);
483+ -moz-transform: rotate(45deg);
484+ -ms-transform: rotate(45deg);
485+ -o-transform: rotate(45deg);
486+ transform: rotate(45deg);
487+ }
488+.leaflet-popup-content-wrapper,
489+.leaflet-popup-tip {
490+ background: white;
491+ color: #333;
492+ box-shadow: 0 3px 14px rgba(0,0,0,0.4);
493+ }
494+.leaflet-container a.leaflet-popup-close-button {
495+ position: absolute;
496+ top: 0;
497+ right: 0;
498+ padding: 4px 4px 0 0;
499+ border: none;
500+ text-align: center;
501+ width: 18px;
502+ height: 14px;
503+ font: 16px/14px Tahoma, Verdana, sans-serif;
504+ color: #c3c3c3;
505+ text-decoration: none;
506+ font-weight: bold;
507+ background: transparent;
508+ }
509+.leaflet-container a.leaflet-popup-close-button:hover {
510+ color: #999;
511+ }
512+.leaflet-popup-scrolled {
513+ overflow: auto;
514+ border-bottom: 1px solid #ddd;
515+ border-top: 1px solid #ddd;
516+ }
517+
518+.leaflet-oldie .leaflet-popup-content-wrapper {
519+ zoom: 1;
520+ }
521+.leaflet-oldie .leaflet-popup-tip {
522+ width: 24px;
523+ margin: 0 auto;
524+
525+ -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
526+ filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
527+ }
528+.leaflet-oldie .leaflet-popup-tip-container {
529+ margin-top: -1px;
530+ }
531+
532+.leaflet-oldie .leaflet-control-zoom,
533+.leaflet-oldie .leaflet-control-layers,
534+.leaflet-oldie .leaflet-popup-content-wrapper,
535+.leaflet-oldie .leaflet-popup-tip {
536+ border: 1px solid #999;
537+ }
538+
539+
540+/* div icon */
541+
542+.leaflet-div-icon {
543+ background: #fff;
544+ border: 1px solid #666;
545+ }
546+
547+
548+/* Tooltip */
549+/* Base styles for the element that has a tooltip */
550+.leaflet-tooltip {
551+ position: absolute;
552+ padding: 6px;
553+ background-color: #fff;
554+ border: 1px solid #fff;
555+ border-radius: 3px;
556+ color: #222;
557+ white-space: nowrap;
558+ -webkit-user-select: none;
559+ -moz-user-select: none;
560+ -ms-user-select: none;
561+ user-select: none;
562+ pointer-events: none;
563+ box-shadow: 0 1px 3px rgba(0,0,0,0.4);
564+ }
565+.leaflet-tooltip.leaflet-clickable {
566+ cursor: pointer;
567+ pointer-events: auto;
568+ }
569+.leaflet-tooltip-top:before,
570+.leaflet-tooltip-bottom:before,
571+.leaflet-tooltip-left:before,
572+.leaflet-tooltip-right:before {
573+ position: absolute;
574+ pointer-events: none;
575+ border: 6px solid transparent;
576+ background: transparent;
577+ content: "";
578+ }
579+
580+/* Directions */
581+
582+.leaflet-tooltip-bottom {
583+ margin-top: 6px;
584+}
585+.leaflet-tooltip-top {
586+ margin-top: -6px;
587+}
588+.leaflet-tooltip-bottom:before,
589+.leaflet-tooltip-top:before {
590+ left: 50%;
591+ margin-left: -6px;
592+ }
593+.leaflet-tooltip-top:before {
594+ bottom: 0;
595+ margin-bottom: -12px;
596+ border-top-color: #fff;
597+ }
598+.leaflet-tooltip-bottom:before {
599+ top: 0;
600+ margin-top: -12px;
601+ margin-left: -6px;
602+ border-bottom-color: #fff;
603+ }
604+.leaflet-tooltip-left {
605+ margin-left: -6px;
606+}
607+.leaflet-tooltip-right {
608+ margin-left: 6px;
609+}
610+.leaflet-tooltip-left:before,
611+.leaflet-tooltip-right:before {
612+ top: 50%;
613+ margin-top: -6px;
614+ }
615+.leaflet-tooltip-left:before {
616+ right: 0;
617+ margin-right: -12px;
618+ border-left-color: #fff;
619+ }
620+.leaflet-tooltip-right:before {
621+ left: 0;
622+ margin-left: -12px;
623+ border-right-color: #fff;
624+ }
searx/static/themes/simple/leaflet/leaflet.jsnew file+9
@@ -0,0 +1,9 @@
1+/*
2+ Leaflet 1.0.3+ed36a04, a JS library for interactive maps. http://leafletjs.com
3+ (c) 2010-2016 Vladimir Agafonkin, (c) 2010-2011 CloudMade
4+*/
5+!function(t,e,i){function n(){var e=t.L;o.noConflict=function(){return t.L=e,this},t.L=o}var o={version:"1.0.3+ed36a04"};"object"==typeof module&&"object"==typeof module.exports?module.exports=o:"function"==typeof define&&define.amd&&define(o),"undefined"!=typeof t&&n(),o.Util={extend:function(t){var e,i,n,o;for(i=1,n=arguments.length;i<n;i++){o=arguments[i];for(e in o)t[e]=o[e]}return t},create:Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}(),bind:function(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}},stamp:function(t){return t._leaflet_id=t._leaflet_id||++o.Util.lastId,t._leaflet_id},lastId:0,throttle:function(t,e,i){var n,o,s,r;return r=function(){n=!1,o&&(s.apply(i,o),o=!1)},s=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(r,e),n=!0)}},wrapNum:function(t,e,i){var n=e[1],o=e[0],s=n-o;return t===n&&i?t:((t-o)%s+s)%s+o},falseFn:function(){return!1},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},splitWords:function(t){return o.Util.trim(t).split(/\s+/)},setOptions:function(t,e){t.hasOwnProperty("options")||(t.options=t.options?o.Util.create(t.options):{});for(var i in e)t.options[i]=e[i];return t.options},getParamString:function(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&e.indexOf("?")!==-1?"&":"?")+n.join("&")},template:function(t,e){return t.replace(o.Util.templateRe,function(t,n){var o=e[n];if(o===i)throw new Error("No value provided for variable "+t);return"function"==typeof o&&(o=o(e)),o})},templateRe:/\{ *([\w_\-]+) *\}/g,isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},indexOf:function(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function e(e){return t["webkit"+e]||t["moz"+e]||t["ms"+e]}function i(e){var i=+new Date,o=Math.max(0,16-(i-n));return n=i+o,t.setTimeout(e,o)}var n=0,s=t.requestAnimationFrame||e("RequestAnimationFrame")||i,r=t.cancelAnimationFrame||e("CancelAnimationFrame")||e("CancelRequestAnimationFrame")||function(e){t.clearTimeout(e)};o.Util.requestAnimFrame=function(e,n,r){return r&&s===i?void e.call(n):s.call(t,o.bind(e,n))},o.Util.cancelAnimFrame=function(e){e&&r.call(t,e)}}(),o.extend=o.Util.extend,o.bind=o.Util.bind,o.stamp=o.Util.stamp,o.setOptions=o.Util.setOptions,o.Class=function(){},o.Class.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=e.__super__=this.prototype,n=o.Util.create(i);n.constructor=e,e.prototype=n;for(var s in this)this.hasOwnProperty(s)&&"prototype"!==s&&(e[s]=this[s]);return t.statics&&(o.extend(e,t.statics),delete t.statics),t.includes&&(o.Util.extend.apply(null,[n].concat(t.includes)),delete t.includes),n.options&&(t.options=o.Util.extend(o.Util.create(n.options),t.options)),o.extend(n,t),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=n._initHooks.length;t<e;t++)n._initHooks[t].call(this)}},e},o.Class.include=function(t){return o.extend(this.prototype,t),this},o.Class.mergeOptions=function(t){return o.extend(this.prototype.options,t),this},o.Class.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this},o.Evented=o.Class.extend({on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else{t=o.Util.splitWords(t);for(var s=0,r=t.length;s<r;s++)this._on(t[s],e,i)}return this},off:function(t,e,i){if(t)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else{t=o.Util.splitWords(t);for(var s=0,r=t.length;s<r;s++)this._off(t[s],e,i)}else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var o=this._events[t];o||(o=[],this._events[t]=o),n===this&&(n=i);for(var s={fn:e,ctx:n},r=o,a=0,h=r.length;a<h;a++)if(r[a].fn===e&&r[a].ctx===n)return;r.push(s)},_off:function(t,e,n){var s,r,a;if(this._events&&(s=this._events[t])){if(!e){for(r=0,a=s.length;r<a;r++)s[r].fn=o.Util.falseFn;return void delete this._events[t]}if(n===this&&(n=i),s)for(r=0,a=s.length;r<a;r++){var h=s[r];if(h.ctx===n&&h.fn===e)return h.fn=o.Util.falseFn,this._firingCount&&(this._events[t]=s=s.slice()),void s.splice(r,1)}}},fire:function(t,e,i){if(!this.listens(t,i))return this;var n=o.Util.extend({},e,{type:t,target: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,n)}this._firingCount--}}return i&&this._propagateEvent(n),this},listens:function(t,e){var i=this._events&&this._events[t];if(i&&i.length)return!0;if(e)for(var n in this._eventParents)if(this._eventParents[n].listens(t,e))return!0;return!1},once:function(t,e,i){if("object"==typeof t){for(var n in t)this.once(n,t[n],e);return this}var s=o.bind(function(){this.off(t,e,i).off(t,s,i)},this);return this.on(t,e,i).on(t,s,i)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[o.stamp(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[o.stamp(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,o.extend({layer:t.target},t),!0)}});var s=o.Evented.prototype;s.addEventListener=s.on,s.removeEventListener=s.clearAllEventListeners=s.off,s.addOneTimeEventListener=s.once,s.fireEvent=s.fire,s.hasEventListeners=s.listens,o.Mixin={Events:s},function(){var i=navigator.userAgent.toLowerCase(),n=e.documentElement,s="ActiveXObject"in t,r=i.indexOf("webkit")!==-1,a=i.indexOf("phantom")!==-1,h=i.search("android [23]")!==-1,l=i.indexOf("chrome")!==-1,u=i.indexOf("gecko")!==-1&&!r&&!t.opera&&!s,c=0===navigator.platform.indexOf("Win"),d="undefined"!=typeof orientation||i.indexOf("mobile")!==-1,_=!t.PointerEvent&&t.MSPointerEvent,m=t.PointerEvent||_,p=s&&"transition"in n.style,f="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix&&!h,g="MozPerspective"in n.style,v="OTransition"in n.style,y=!t.L_NO_TOUCH&&(m||"ontouchstart"in t||t.DocumentTouch&&e instanceof t.DocumentTouch);o.Browser={ie:s,ielt9:s&&!e.addEventListener,edge:"msLaunchUri"in navigator&&!("documentMode"in e),webkit:r,gecko:u,android:i.indexOf("android")!==-1,android23:h,chrome:l,safari:!l&&i.indexOf("safari")!==-1,win:c,ie3d:p,webkit3d:f,gecko3d:g,opera12:v,any3d:!t.L_DISABLE_3D&&(p||f||g)&&!v&&!a,mobile:d,mobileWebkit:d&&r,mobileWebkit3d:d&&f,mobileOpera:d&&t.opera,mobileGecko:d&&u,touch:!!y,msPointer:!!_,pointer:!!m,retina:(t.devicePixelRatio||t.screen.deviceXDPI/t.screen.logicalXDPI)>1}}(),o.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},o.Point.prototype={clone:function(){return new o.Point(this.x,this.y)},add:function(t){return this.clone()._add(o.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(o.point(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 o.Point(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new o.Point(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},distanceTo:function(t){t=o.point(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=o.point(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=o.point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+o.Util.formatNum(this.x)+", "+o.Util.formatNum(this.y)+")"}},o.point=function(t,e,n){return t instanceof o.Point?t:o.Util.isArray(t)?new o.Point(t[0],t[1]):t===i||null===t?t:"object"==typeof t&&"x"in t&&"y"in t?new o.Point(t.x,t.y):new o.Point(t,e,n)},o.Bounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])},o.Bounds.prototype={extend:function(t){return t=o.point(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 o.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new o.Point(this.min.x,this.max.y)},getTopRight:function(){return new o.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return t="number"==typeof t[0]||t instanceof o.Point?o.point(t):o.bounds(t),t instanceof o.Bounds?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=o.bounds(t);var e=this.min,i=this.max,n=t.min,s=t.max,r=s.x>=e.x&&n.x<=i.x,a=s.y>=e.y&&n.y<=i.y;return r&&a},overlaps:function(t){t=o.bounds(t);var e=this.min,i=this.max,n=t.min,s=t.max,r=s.x>e.x&&n.x<i.x,a=s.y>e.y&&n.y<i.y;return r&&a},isValid:function(){return!(!this.min||!this.max)}},o.bounds=function(t,e){return!t||t instanceof o.Bounds?t:new o.Bounds(t,e)},o.Transformation=function(t,e,i,n){this._a=t,this._b=e,this._c=i,this._d=n},o.Transformation.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new o.Point((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}},o.DomUtil={get:function(t){return"string"==typeof t?e.getElementById(t):t},getStyle:function(t,i){var n=t.style[i]||t.currentStyle&&t.currentStyle[i];if((!n||"auto"===n)&&e.defaultView){var o=e.defaultView.getComputedStyle(t,null);n=o?o[i]:null}return"auto"===n?null:n},create:function(t,i,n){var o=e.createElement(t);return o.className=i||"",n&&n.appendChild(o),o},remove:function(t){var e=t.parentNode;e&&e.removeChild(t)},empty:function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},toFront:function(t){t.parentNode.appendChild(t)},toBack:function(t){var e=t.parentNode;e.insertBefore(t,e.firstChild)},hasClass:function(t,e){if(t.classList!==i)return t.classList.contains(e);var n=o.DomUtil.getClass(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)},addClass:function(t,e){if(t.classList!==i)for(var n=o.Util.splitWords(e),s=0,r=n.length;s<r;s++)t.classList.add(n[s]);else if(!o.DomUtil.hasClass(t,e)){var a=o.DomUtil.getClass(t);o.DomUtil.setClass(t,(a?a+" ":"")+e)}},removeClass:function(t,e){t.classList!==i?t.classList.remove(e):o.DomUtil.setClass(t,o.Util.trim((" "+o.DomUtil.getClass(t)+" ").replace(" "+e+" "," ")))},setClass:function(t,e){t.className.baseVal===i?t.className=e:t.className.baseVal=e},getClass:function(t){return t.className.baseVal===i?t.className:t.className.baseVal},setOpacity:function(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&o.DomUtil._setOpacityIE(t,e)},_setOpacityIE:function(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"},testProp:function(t){for(var i=e.documentElement.style,n=0;n<t.length;n++)if(t[n]in i)return t[n];return!1},setTransform:function(t,e,i){var n=e||new o.Point(0,0);t.style[o.DomUtil.TRANSFORM]=(o.Browser.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")},setPosition:function(t,e){t._leaflet_pos=e,o.Browser.any3d?o.DomUtil.setTransform(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")},getPosition:function(t){return t._leaflet_pos||new o.Point(0,0)}},function(){o.DomUtil.TRANSFORM=o.DomUtil.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]);var i=o.DomUtil.TRANSITION=o.DomUtil.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);if(o.DomUtil.TRANSITION_END="webkitTransition"===i||"OTransition"===i?i+"End":"transitionend","onselectstart"in e)o.DomUtil.disableTextSelection=function(){o.DomEvent.on(t,"selectstart",o.DomEvent.preventDefault)},o.DomUtil.enableTextSelection=function(){o.DomEvent.off(t,"selectstart",o.DomEvent.preventDefault)};else{var n=o.DomUtil.testProp(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);o.DomUtil.disableTextSelection=function(){if(n){var t=e.documentElement.style;this._userSelect=t[n],t[n]="none"}},o.DomUtil.enableTextSelection=function(){n&&(e.documentElement.style[n]=this._userSelect,delete this._userSelect)}}o.DomUtil.disableImageDrag=function(){o.DomEvent.on(t,"dragstart",o.DomEvent.preventDefault)},o.DomUtil.enableImageDrag=function(){o.DomEvent.off(t,"dragstart",o.DomEvent.preventDefault)},o.DomUtil.preventOutline=function(e){for(;e.tabIndex===-1;)e=e.parentNode;e&&e.style&&(o.DomUtil.restoreOutline(),this._outlineElement=e,this._outlineStyle=e.style.outline,e.style.outline="none",o.DomEvent.on(t,"keydown",o.DomUtil.restoreOutline,this))},o.DomUtil.restoreOutline=function(){this._outlineElement&&(this._outlineElement.style.outline=this._outlineStyle,delete this._outlineElement,delete this._outlineStyle,o.DomEvent.off(t,"keydown",o.DomUtil.restoreOutline,this))}}(),o.LatLng=function(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,n!==i&&(this.alt=+n)},o.LatLng.prototype={equals:function(t,e){if(!t)return!1;t=o.latLng(t);var n=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return n<=(e===i?1e-9:e)},toString:function(t){return"LatLng("+o.Util.formatNum(this.lat,t)+", "+o.Util.formatNum(this.lng,t)+")"},distanceTo:function(t){return o.CRS.Earth.distance(this,o.latLng(t))},wrap:function(){return o.CRS.Earth.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return o.latLngBounds([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new o.LatLng(this.lat,this.lng,this.alt)}},o.latLng=function(t,e,n){return t instanceof o.LatLng?t:o.Util.isArray(t)&&"object"!=typeof t[0]?3===t.length?new o.LatLng(t[0],t[1],t[2]):2===t.length?new o.LatLng(t[0],t[1]):null:t===i||null===t?t:"object"==typeof t&&"lat"in t?new o.LatLng(t.lat,"lng"in t?t.lng:t.lon,t.alt):e===i?null:new o.LatLng(t,e,n)},o.LatLngBounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])},o.LatLngBounds.prototype={extend:function(t){var e,i,n=this._southWest,s=this._northEast;if(t instanceof o.LatLng)e=t,i=t;else{if(!(t instanceof o.LatLngBounds))return t?this.extend(o.latLng(t)||o.latLngBounds(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||s?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),s.lat=Math.max(i.lat,s.lat),s.lng=Math.max(i.lng,s.lng)):(this._southWest=new o.LatLng(e.lat,e.lng),this._northEast=new o.LatLng(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;return new o.LatLngBounds(new o.LatLng(e.lat-n,e.lng-s),new o.LatLng(i.lat+n,i.lng+s))},getCenter:function(){return new o.LatLng((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 o.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new o.LatLng(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 o.LatLng||"lat"in t?o.latLng(t):o.latLngBounds(t);var e,i,n=this._southWest,s=this._northEast;return t instanceof o.LatLngBounds?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=o.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),r=s.lat>=e.lat&&n.lat<=i.lat,a=s.lng>=e.lng&&n.lng<=i.lng;return r&&a},overlaps:function(t){t=o.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),r=s.lat>e.lat&&n.lat<i.lat,a=s.lng>e.lng&&n.lng<i.lng;return r&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t){return!!t&&(t=o.latLngBounds(t),this._southWest.equals(t.getSouthWest())&&this._northEast.equals(t.getNorthEast()))},isValid:function(){return!(!this._southWest||!this._northEast)}},o.latLngBounds=function(t,e){return t instanceof o.LatLngBounds?t:new o.LatLngBounds(t,e)},o.Projection={},o.Projection.LonLat={project:function(t){return new o.Point(t.lng,t.lat)},unproject:function(t){return new o.LatLng(t.y,t.x)},bounds:o.bounds([-180,-90],[180,90])},o.Projection.SphericalMercator={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=Math.sin(n*e);return new o.Point(this.R*t.lng*e,this.R*Math.log((1+s)/(1-s))/2)},unproject:function(t){var e=180/Math.PI;return new o.LatLng((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:function(){var t=6378137*Math.PI;return o.bounds([-t,-t],[t,t])}()},o.CRS={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);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 e=this.projection.bounds,i=this.scale(t),n=this.transformation.transform(e.min,i),s=this.transformation.transform(e.max,i);return o.bounds(n,s)},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?o.Util.wrapNum(t.lng,this.wrapLng,!0):t.lng,i=this.wrapLat?o.Util.wrapNum(t.lat,this.wrapLat,!0):t.lat,n=t.alt;return o.latLng(i,e,n)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,s=e.lng-i.lng;if(0===n&&0===s)return t;var r=t.getSouthWest(),a=t.getNorthEast(),h=o.latLng({lat:r.lat-n,lng:r.lng-s}),l=o.latLng({lat:a.lat-n,lng:a.lng-s});return new o.LatLngBounds(h,l)}},o.CRS.Simple=o.extend({},o.CRS,{projection:o.Projection.LonLat,transformation:new o.Transformation(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0}),o.CRS.Earth=o.extend({},o.CRS,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,o=e.lat*i,s=Math.sin(n)*Math.sin(o)+Math.cos(n)*Math.cos(o)*Math.cos((e.lng-t.lng)*i);return this.R*Math.acos(Math.min(s,1))}}),o.CRS.EPSG3857=o.extend({},o.CRS.Earth,{code:"EPSG:3857",projection:o.Projection.SphericalMercator,transformation:function(){var t=.5/(Math.PI*o.Projection.SphericalMercator.R);return new o.Transformation(t,.5,-t,.5)}()}),o.CRS.EPSG900913=o.extend({},o.CRS.EPSG3857,{code:"EPSG:900913"}),o.CRS.EPSG4326=o.extend({},o.CRS.Earth,{code:"EPSG:4326",projection:o.Projection.LonLat,transformation:new o.Transformation(1/180,1,-1/180,.5)}),o.Map=o.Evented.extend({options:{crs:o.CRS.EPSG3857,center:i,zoom:i,minZoom:i,maxZoom:i,layers:[],maxBounds:i,renderer:i,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=o.setOptions(this,e),this._initContainer(t),this._initLayout(),this._onResize=o.bind(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.zoom!==i&&(this._zoom=this._limitZoom(e.zoom)),e.center&&e.zoom!==i&&this.setView(o.latLng(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this.callInitHooks(),this._zoomAnimated=o.DomUtil.TRANSITION&&o.Browser.any3d&&!o.Browser.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),o.DomEvent.on(this._proxy,o.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,n){if(e=e===i?this._zoom:this._limitZoom(e),t=this._limitCenter(o.latLng(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&n!==!0){n.animate!==i&&(n.zoom=o.extend({animate:n.animate},n.zoom),n.pan=o.extend({animate:n.animate,duration:n.duration},n.pan));var s=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan);if(s)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(o.Browser.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(o.Browser.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),s=this.getSize().divideBy(2),r=t instanceof o.Point?t:this.latLngToContainerPoint(t),a=r.subtract(s).multiplyBy(1-1/n),h=this.containerPointToLatLng(s.add(a));return this.setView(h,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():o.latLngBounds(t);var i=o.point(e.paddingTopLeft||e.padding||[0,0]),n=o.point(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,i.add(n));s="number"==typeof e.maxZoom?Math.min(e.maxZoom,s):s;var r=n.subtract(i).divideBy(2),a=this.project(t.getSouthWest(),s),h=this.project(t.getNorthEast(),s),l=this.unproject(a.add(h).divideBy(2).add(r),s);return{center:l,zoom:s}},fitBounds:function(t,e){if(t=o.latLngBounds(t),!t.isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=o.point(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(e.animate!==!0&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new o.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){o.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){function s(t){var e=t?-1:1,i=t?v:g,n=v*v-g*g+e*L*L*y*y,o=2*i*L*y,s=n/o,r=Math.sqrt(s*s+1)-s,a=r<1e-9?-18:Math.log(r);return a}function r(t){return(Math.exp(t)-Math.exp(-t))/2}function a(t){return(Math.exp(t)+Math.exp(-t))/2}function h(t){return r(t)/a(t)}function l(t){return g*(a(x)/a(x+P*t))}function u(t){return g*(a(x)*h(x+P*t)-r(x))/L}function c(t){return 1-Math.pow(1-t,1.5)}function d(){var i=(Date.now()-w)/T,n=c(i)*b;i<=1?(this._flyToFrame=o.Util.requestAnimFrame(d,this),this._move(this.unproject(_.add(m.subtract(_).multiplyBy(u(n)/y)),f),this.getScaleZoom(g/l(n),f),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}if(n=n||{},n.animate===!1||!o.Browser.any3d)return this.setView(t,e,n);this._stop();var _=this.project(this.getCenter()),m=this.project(t),p=this.getSize(),f=this._zoom;t=o.latLng(t),e=e===i?f:e;var g=Math.max(p.x,p.y),v=g*this.getZoomScale(f,e),y=m.distanceTo(_)||1,P=1.42,L=P*P,x=s(0),w=Date.now(),b=(s(1)-x)/P,T=n.duration?1e3*n.duration:1e3*b*.8;return this._moveStart(!0),d.call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){return t=o.latLngBounds(t),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){return this.options.minZoom=t,this._loaded&&this.getZoom()<this.options.minZoom?this.setZoom(t):this},setMaxZoom:function(t){return this.options.maxZoom=t,this._loaded&&this.getZoom()>this.options.maxZoom?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,o.latLngBounds(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},invalidateSize:function(t){if(!this._loaded)return this;t=o.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),s=i.divideBy(2).round(),r=n.subtract(s);return r.x||r.y?(t.animate&&t.pan?this.panBy(r):(t.pan&&this._rawPanBy(r),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):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=o.extend({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o.bind(this._handleGeolocationResponse,this),i=o.bind(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,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 e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new o.LatLng(e,i),s=n.toBounds(t.coords.accuracy),r=this._locateOptions;if(r.setView){var a=this.getBoundsZoom(s);this.setView(n,r.maxZoom?Math.min(a,r.maxZoom):a)}var h={latlng:n,bounds:s,timestamp:t.timestamp};for(var l in t.coords)"number"==typeof t.coords[l]&&(h[l]=t.coords[l]);this.fire("locationfound",h)},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.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=i,this._containerId=i}o.DomUtil.remove(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this._loaded&&this.fire("unload");for(var t in this._layers)this._layers[t].remove();return this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n=o.DomUtil.create("div",i,e||this._mapPane);return t&&(this._panes[t]=n),n},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(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new o.LatLngBounds(e,i)},getMinZoom:function(){return this.options.minZoom===i?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===i?this._layersMaxZoom===i?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=o.latLngBounds(t),i=o.point(i||[0,0]);var n=this.getZoom()||0,s=this.getMinZoom(),r=this.getMaxZoom(),a=t.getNorthWest(),h=t.getSouthEast(),l=this.getSize().subtract(i),u=o.bounds(this.project(h,n),this.project(a,n)).getSize(),c=o.Browser.any3d?this.options.zoomSnap:1,d=Math.min(l.x/u.x,l.y/u.y);return n=this.getScaleZoom(d,n),c&&(n=Math.round(n/(c/100))*(c/100),n=e?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(s,Math.min(r,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new o.Point(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new o.Bounds(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===i?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,e){var n=this.options.crs;return e=e===i?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=e===i?this._zoom:e;var o=n.zoom(t*n.scale(e));return isNaN(o)?1/0:o},project:function(t,e){return e=e===i?this._zoom:e,this.options.crs.latLngToPoint(o.latLng(t),e)},unproject:function(t,e){return e=e===i?this._zoom:e,this.options.crs.pointToLatLng(o.point(t),e)},layerPointToLatLng:function(t){var e=o.point(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(o.latLng(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(o.latLng(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(o.latLngBounds(t))},distance:function(t,e){return this.options.crs.distance(o.latLng(t),o.latLng(e))},containerPointToLayerPoint:function(t){return o.point(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return o.point(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(o.point(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(o.latLng(t)))},mouseEventToContainerPoint:function(t){return o.DomEvent.getMousePosition(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 e=this._container=o.DomUtil.get(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");o.DomEvent.addListener(e,"scroll",this._onScroll,this),this._containerId=o.Util.stamp(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&o.Browser.any3d,
6+o.DomUtil.addClass(t,"leaflet-container"+(o.Browser.touch?" leaflet-touch":"")+(o.Browser.retina?" leaflet-retina":"")+(o.Browser.ielt9?" leaflet-oldie":"")+(o.Browser.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=o.DomUtil.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(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),o.DomUtil.setPosition(this._mapPane,new o.Point(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(o.DomUtil.addClass(t.markerPane,"leaflet-zoom-hide"),o.DomUtil.addClass(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){o.DomUtil.setPosition(this._mapPane,new o.Point(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t){return t&&this.fire("zoomstart"),this.fire("movestart")},_move:function(t,e,n){e===i&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(o||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return o.Util.cancelAnimFrame(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){o.DomUtil.setPosition(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(e){if(o.DomEvent){this._targets={},this._targets[o.stamp(this._container)]=this;var i=e?"off":"on";o.DomEvent[i](this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this),this.options.trackResize&&o.DomEvent[i](t,"resize",this._onResize,this),o.Browser.any3d&&this.options.transform3DLimit&&this[i]("moveend",this._onMoveEnd)}},_onResize:function(){o.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=o.Util.requestAnimFrame(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,e){for(var i,n=[],s="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,a=!1;r;){if(i=this._targets[o.stamp(r)],i&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(i)){a=!0;break}if(i&&i.listens(e,!0)){if(s&&!o.DomEvent._isExternalTarget(r,t))break;if(n.push(i),s)break}if(r===this._container)break;r=r.parentNode}return n.length||a||s||!o.DomEvent._isExternalTarget(r,t)||(n=[this]),n},_handleDOMEvent:function(t){if(this._loaded&&!o.DomEvent._skipped(t)){var e="keypress"===t.type&&13===t.keyCode?"click":t.type;"mousedown"===e&&o.DomUtil.preventOutline(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_fireDOMEvent:function(t,e,i){if("click"===t.type){var n=o.Util.extend({},t);n.type="preclick",this._fireDOMEvent(n,n.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e)),i.length)){var s=i[0];"contextmenu"===e&&s.listens(e,!0)&&o.DomEvent.preventDefault(t);var r={originalEvent:t};if("keypress"!==t.type){var a=s instanceof o.Marker;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<i.length;h++)if(i[h].fire(e,r,!0),r.originalEvent._stopped||i[h].options.nonBubblingEvents&&o.Util.indexOf(i[h].options.nonBubblingEvents,e)!==-1)return}},_draggableMoved:function(t){return t=t.dragging&&t.dragging.enabled()?t:this,t.dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return o.DomUtil.getPosition(this._mapPane)||new o.Point(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var n=t&&e!==i?this._getNewPixelOrigin(t,e):this.getPixelOrigin();return n.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return o.bounds([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),s=this.getSize().divideBy(2),r=new o.Bounds(n.subtract(s),n.add(s)),a=this._getBoundsOffset(r,i,e);return a.round().equals([0,0])?t:this.unproject(n.add(a),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new o.Bounds(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=o.bounds(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),s=n.min.subtract(t.min),r=n.max.subtract(t.max),a=this._rebound(s.x,-r.x),h=this._rebound(s.y,-r.y);return new o.Point(a,h)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=o.Browser.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){o.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return!((e&&e.animate)!==!0&&!this.getSize().contains(i))&&(this.panBy(i,e),!0)},_createAnimProxy:function(){var t=this._proxy=o.DomUtil.create("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var i=o.DomUtil.TRANSFORM,n=t.style[i];o.DomUtil.setTransform(t,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===t.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var e=this.getCenter(),i=this.getZoom();o.DomUtil.setTransform(t,this.project(e,i),this.getZoomScale(i,1))},this)},_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,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),s=this._getCenterOffset(t)._divideBy(1-1/n);return!(i.animate!==!0&&!this.getSize().contains(s))&&(o.Util.requestAnimFrame(function(){this._moveStart(!0)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,n){i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,o.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),setTimeout(o.bind(this._onZoomTransitionEnd,this),250)},_onZoomTransitionEnd:function(){this._animatingZoom&&(o.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),o.Util.requestAnimFrame(function(){this._moveEnd(!0)},this))}}),o.map=function(t,e){return new o.Map(t,e)},o.Layer=o.Evented.extend({options:{pane:"overlayPane",nonBubblingEvents:[],attribution:null},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[o.stamp(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[o.stamp(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}}),o.Map.include({addLayer:function(t){var e=o.stamp(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=o.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&o.stamp(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){t=t?o.Util.isArray(t)?t:[t]:[];for(var e=0,i=t.length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[o.stamp(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=o.stamp(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-(1/0),n=this._getZoomSpan();for(var o in this._zoomBoundLayers){var s=this._zoomBoundLayers[o].options;t=s.minZoom===i?t:Math.min(t,s.minZoom),e=s.maxZoom===i?e:Math.max(e,s.maxZoom)}this._layersMaxZoom=e===-(1/0)?i:e,this._layersMinZoom=t===1/0?i:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===i&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===i&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var r="_leaflet_events";o.DomEvent={on:function(t,e,i,n){if("object"==typeof e)for(var s in e)this._on(t,s,e[s],i);else{e=o.Util.splitWords(e);for(var r=0,a=e.length;r<a;r++)this._on(t,e[r],i,n)}return this},off:function(t,e,i,n){if("object"==typeof e)for(var s in e)this._off(t,s,e[s],i);else{e=o.Util.splitWords(e);for(var r=0,a=e.length;r<a;r++)this._off(t,e[r],i,n)}return this},_on:function(e,i,n,s){var a=i+o.stamp(n)+(s?"_"+o.stamp(s):"");if(e[r]&&e[r][a])return this;var h=function(i){return n.call(s||e,i||t.event)},l=h;return o.Browser.pointer&&0===i.indexOf("touch")?this.addPointerListener(e,i,h,a):!o.Browser.touch||"dblclick"!==i||!this.addDoubleTapListener||o.Browser.pointer&&o.Browser.chrome?"addEventListener"in e?"mousewheel"===i?e.addEventListener("onwheel"in e?"wheel":"mousewheel",h,!1):"mouseenter"===i||"mouseleave"===i?(h=function(i){i=i||t.event,o.DomEvent._isExternalTarget(e,i)&&l(i)},e.addEventListener("mouseenter"===i?"mouseover":"mouseout",h,!1)):("click"===i&&o.Browser.android&&(h=function(t){return o.DomEvent._filterClick(t,l)}),e.addEventListener(i,h,!1)):"attachEvent"in e&&e.attachEvent("on"+i,h):this.addDoubleTapListener(e,h,a),e[r]=e[r]||{},e[r][a]=h,this},_off:function(t,e,i,n){var s=e+o.stamp(i)+(n?"_"+o.stamp(n):""),a=t[r]&&t[r][s];return a?(o.Browser.pointer&&0===e.indexOf("touch")?this.removePointerListener(t,e,s):o.Browser.touch&&"dblclick"===e&&this.removeDoubleTapListener?this.removeDoubleTapListener(t,s):"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",a,!1):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,a,!1):"detachEvent"in t&&t.detachEvent("on"+e,a),t[r][s]=null,this):this},stopPropagation:function(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,o.DomEvent._skipped(t),this},disableScrollPropagation:function(t){return o.DomEvent.on(t,"mousewheel",o.DomEvent.stopPropagation)},disableClickPropagation:function(t){var e=o.DomEvent.stopPropagation;return o.DomEvent.on(t,o.Draggable.START.join(" "),e),o.DomEvent.on(t,{click:o.DomEvent._fakeStop,dblclick:e})},preventDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stop:function(t){return o.DomEvent.preventDefault(t).stopPropagation(t)},getMousePosition:function(t,e){if(!e)return new o.Point(t.clientX,t.clientY);var i=e.getBoundingClientRect();return new o.Point(t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop)},_wheelPxFactor:o.Browser.win&&o.Browser.chrome?2:o.Browser.gecko?t.devicePixelRatio:1,getWheelDelta:function(t){return o.Browser.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/o.DomEvent._wheelPxFactor: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},_skipEvents:{},_fakeStop:function(t){o.DomEvent._skipEvents[t.type]=!0},_skipped:function(t){var e=this._skipEvents[t.type];return this._skipEvents[t.type]=!1,e},_isExternalTarget:function(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t},_filterClick:function(t,e){var i=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,n=o.DomEvent._lastClick&&i-o.DomEvent._lastClick;return n&&n>100&&n<500||t.target._simulatedClick&&!t._simulated?void o.DomEvent.stop(t):(o.DomEvent._lastClick=i,void e(t))}},o.DomEvent.addListener=o.DomEvent.on,o.DomEvent.removeListener=o.DomEvent.off,o.PosAnimation=o.Evented.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=o.DomUtil.getPosition(t),this._offset=e.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=o.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),o.DomUtil.setPosition(this._el,i),this.fire("step")},_complete:function(){o.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),o.Projection.Mercator={R:6378137,R_MINOR:6356752.314245179,bounds:o.bounds([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,s=this.R_MINOR/i,r=Math.sqrt(1-s*s),a=r*Math.sin(n),h=Math.tan(Math.PI/4-n/2)/Math.pow((1-a)/(1+a),r/2);return n=-i*Math.log(Math.max(h,1e-10)),new o.Point(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,s=this.R_MINOR/n,r=Math.sqrt(1-s*s),a=Math.exp(-t.y/n),h=Math.PI/2-2*Math.atan(a),l=0,u=.1;l<15&&Math.abs(u)>1e-7;l++)e=r*Math.sin(h),e=Math.pow((1-e)/(1+e),r/2),u=Math.PI/2-2*Math.atan(a*e)-h,h+=u;return new o.LatLng(h*i,t.x*i/n)}},o.CRS.EPSG3395=o.extend({},o.CRS.Earth,{code:"EPSG:3395",projection:o.Projection.Mercator,transformation:function(){var t=.5/(Math.PI*o.Projection.Mercator.R);return new o.Transformation(t,.5,-t,.5)}()}),o.GridLayer=o.Layer.extend({options:{tileSize:256,opacity:1,updateWhenIdle:o.Browser.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:i,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){o.setOptions(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(),o.DomUtil.remove(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=null},bringToFront:function(){return this._map&&(o.DomUtil.toFront(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(o.DomUtil.toBack(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.Util.throttle(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return e.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof o.Point?t:new o.Point(t,t)},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-(1/0),1/0),o=0,s=i.length;o<s;o++)e=i[o].style.zIndex,i[o]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!o.Browser.ielt9){o.DomUtil.setOpacity(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var s=this._tiles[n];if(s.current&&s.loaded){var r=Math.min(1,(t-s.loaded)/200);o.DomUtil.setOpacity(s.el,r),r<1?e=!0:(s.active&&(i=!0),s.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(o.Util.cancelAnimFrame(this._fadeFrame),this._fadeFrame=o.Util.requestAnimFrame(this._updateOpacity,this))}},_initContainer:function(){this._container||(this._container=o.DomUtil.create("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,e=this.options.maxZoom;if(t===i)return i;for(var n in this._levels)this._levels[n].el.children.length||n===t?this._levels[n].el.style.zIndex=e-Math.abs(t-n):(o.DomUtil.remove(this._levels[n].el),this._removeTilesAtZoom(n),delete this._levels[n]);var s=this._levels[t],r=this._map;return s||(s=this._levels[t]={},s.el=o.DomUtil.create("div","leaflet-tile-container leaflet-zoom-animated",this._container),s.el.style.zIndex=e,s.origin=r.project(r.unproject(r.getPixelOrigin()),t).round(),s.zoom=t,this._setZoomTransform(s,r.getCenter(),r.getZoom()),o.Util.falseFn(s.el.offsetWidth)),this._level=s,s},_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom)return void this._removeAllTiles();for(t in this._tiles)e=this._tiles[t],e.retain=e.current;for(t in this._tiles)if(e=this._tiles[t],e.current&&!e.active){var n=e.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 e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)o.DomUtil.remove(this._levels[t].el),delete this._levels[t];this._removeAllTiles(),this._tileZoom=null},_retainParent:function(t,e,i,n){var s=Math.floor(t/2),r=Math.floor(e/2),a=i-1,h=new o.Point(+s,+r);h.z=+a;var l=this._tileCoordsToKey(h),u=this._tiles[l];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),a>n&&this._retainParent(s,r,a,n))},_retainChildren:function(t,e,i,n){for(var s=2*t;s<2*t+2;s++)for(var r=2*e;r<2*e+2;r++){var a=new o.Point(s,r);a.z=i+1;var h=this._tileCoordsToKey(a),l=this._tiles[h];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1<n&&this._retainChildren(s,r,i+1,n))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_setView:function(t,e,n,o){var s=Math.round(e);(this.options.maxZoom!==i&&s>this.options.maxZoom||this.options.minZoom!==i&&s<this.options.minZoom)&&(s=i);var r=this.options.updateWhenZooming&&s!==this._tileZoom;o&&!r||(this._tileZoom=s,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),s!==i&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom),s=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();o.Browser.any3d?o.DomUtil.setTransform(t.el,s,n):o.DomUtil.setPosition(t.el,s)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),n=e.getZoomScale(i,this._tileZoom),s=e.project(t,this._tileZoom).floor(),r=e.getSize().divideBy(2*n);return new o.Bounds(s.subtract(r),s.add(r))},_update:function(t){var n=this._map;if(n){var s=n.getZoom();if(t===i&&(t=n.getCenter()),this._tileZoom!==i){var r=this._getTiledPixelBounds(t),a=this._pxBoundsToTileRange(r),h=a.getCenter(),l=[],u=this.options.keepBuffer,c=new o.Bounds(a.getBottomLeft().subtract([u,-u]),a.getTopRight().add([u,-u]));for(var d in this._tiles){var _=this._tiles[d].coords;_.z===this._tileZoom&&c.contains(o.point(_.x,_.y))||(this._tiles[d].current=!1)}if(Math.abs(s-this._tileZoom)>1)return void this._setView(t,s);for(var m=a.min.y;m<=a.max.y;m++)for(var p=a.min.x;p<=a.max.x;p++){var f=new o.Point(p,m);if(f.z=this._tileZoom,this._isValidTile(f)){var g=this._tiles[this._tileCoordsToKey(f)];g?g.current=!0:l.push(f)}}if(l.sort(function(t,e){return t.distanceTo(h)-e.distanceTo(h)}),0!==l.length){this._loading||(this._loading=!0,this.fire("loading"));var v=e.createDocumentFragment();for(p=0;p<l.length;p++)this._addTile(l[p],v);this._level.el.appendChild(v)}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return o.latLngBounds(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToBounds:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),s=n.add(i),r=e.unproject(n,t.z),a=e.unproject(s,t.z),h=new o.LatLngBounds(r,a);return this.options.noWrap||e.wrapLatLngBounds(h),h},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new o.Point(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(o.DomUtil.remove(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){o.DomUtil.addClass(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=o.Util.falseFn,t.onmousemove=o.Util.falseFn,o.Browser.ielt9&&this.options.opacity<1&&o.DomUtil.setOpacity(t,this.options.opacity),o.Browser.android&&!o.Browser.android23&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),o.bind(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&o.Util.requestAnimFrame(o.bind(this._tileReady,this,t,null,s)),o.DomUtil.setPosition(s,i),this._tiles[n]={el:s,coords:t,current:!0},e.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,e,i){if(this._map){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);i=this._tiles[n],i&&(i.loaded=+new Date,this._map._fadeAnimated?(o.DomUtil.setOpacity(i.el,0),o.Util.cancelAnimFrame(this._fadeFrame),this._fadeFrame=o.Util.requestAnimFrame(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(o.DomUtil.addClass(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),o.Browser.ielt9||!this._map._fadeAnimated?o.Util.requestAnimFrame(this._pruneTiles,this):setTimeout(o.bind(this._pruneTiles,this),250)))}},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new o.Point(this._wrapX?o.Util.wrapNum(t.x,this._wrapX):t.x,this._wrapY?o.Util.wrapNum(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new o.Bounds(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),o.gridLayer=function(t){return new o.GridLayer(t)},o.TileLayer=o.GridLayer.extend({options:{minZoom:0,maxZoom:18,maxNativeZoom:null,minNativeZoom:null,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,e=o.setOptions(this,e),e.detectRetina&&o.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),o.Browser.android||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},createTile:function(t,i){var n=e.createElement("img");return o.DomEvent.on(n,"load",o.bind(this._tileOnLoad,this,i,n)),o.DomEvent.on(n,"error",o.bind(this._tileOnError,this,i,n)),this.options.crossOrigin&&(n.crossOrigin=""),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:o.Browser.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return o.Util.template(this._url,o.extend(e,this.options))},_tileOnLoad:function(t,e){o.Browser.ielt9?setTimeout(o.bind(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.src!==n&&(e.src=n),t(i,e)},getTileSize:function(){var t=this._map,e=o.GridLayer.prototype.getTileSize.call(this),i=this._tileZoom+this.options.zoomOffset,n=this.options.minNativeZoom,s=this.options.maxNativeZoom;return null!==n&&i<n?e.divideBy(t.getZoomScale(n,i)).round():null!==s&&i>s?e.divideBy(t.getZoomScale(s,i)).round():e},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset,o=this.options.minNativeZoom,s=this.options.maxNativeZoom;return i&&(t=e-t),t+=n,null!==o&&t<o?o:null!==s&&t>s?s:t},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=o.Util.falseFn,e.onerror=o.Util.falseFn,e.complete||(e.src=o.Util.emptyImageUrl,o.DomUtil.remove(e)))}}),o.tileLayer=function(t,e){return new o.TileLayer(t,e)},o.TileLayer.WMS=o.TileLayer.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 i=o.extend({},this.defaultWmsParams);for(var n in e)n in this.options||(i[n]=e[n]);e=o.setOptions(this,e),i.width=i.height=e.tileSize*(e.detectRetina&&o.Browser.retina?2:1),this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,o.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToBounds(t),i=this._crs.project(e.getNorthWest()),n=this._crs.project(e.getSouthEast()),s=(this._wmsVersion>=1.3&&this._crs===o.CRS.EPSG4326?[n.y,i.x,i.y,n.x]:[i.x,n.y,n.x,i.y]).join(","),r=o.TileLayer.prototype.getTileUrl.call(this,t);return r+o.Util.getParamString(this.wmsParams,r,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,e){return o.extend(this.wmsParams,t),e||this.redraw(),this}}),o.tileLayer.wms=function(t,e){return new o.TileLayer.WMS(t,e)},o.ImageOverlay=o.Layer.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1},initialize:function(t,e,i){this._url=t,this._bounds=o.latLngBounds(e),o.setOptions(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(o.DomUtil.addClass(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){o.DomUtil.remove(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&&o.DomUtil.toFront(this._image),this},bringToBack:function(){return this._map&&o.DomUtil.toBack(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=t,this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._image=o.DomUtil.create("img","leaflet-image-layer "+(this._zoomAnimated?"leaflet-zoom-animated":""));t.onselectstart=o.Util.falseFn,t.onmousemove=o.Util.falseFn,t.onload=o.bind(this.fire,this,"load"),this.options.crossOrigin&&(t.crossOrigin=""),t.src=this._url,t.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;
7+o.DomUtil.setTransform(this._image,i,e)},_reset:function(){var t=this._image,e=new o.Bounds(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();o.DomUtil.setPosition(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){o.DomUtil.setOpacity(this._image,this.options.opacity)}}),o.imageOverlay=function(t,e,i){return new o.ImageOverlay(t,e,i)},o.Icon=o.Class.extend({initialize:function(t){o.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var s=o.point(n),r=o.point("shadow"===e&&i.shadowAnchor||i.iconAnchor||s&&s.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,i){return i=i||e.createElement("img"),i.src=t,i},_getIconUrl:function(t){return o.Browser.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),o.icon=function(t){return new o.Icon(t)},o.Icon.Default=o.Icon.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 o.Icon.Default.imagePath||(o.Icon.Default.imagePath=this._detectIconPath()),(this.options.imagePath||o.Icon.Default.imagePath)+o.Icon.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=o.DomUtil.create("div","leaflet-default-icon-path",e.body),i=o.DomUtil.getStyle(t,"background-image")||o.DomUtil.getStyle(t,"backgroundImage");return e.body.removeChild(t),0===i.indexOf("url")?i.replace(/^url\([\"\']?/,"").replace(/marker-icon\.png[\"\']?\)$/,""):""}}),o.Marker=o.Layer.extend({options:{icon:new o.Icon.Default,interactive:!0,draggable:!1,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",nonBubblingEvents:["click","dblclick","mouseover","mouseout","contextmenu"]},initialize:function(t,e){o.setOptions(this,e),this._latlng=o.latLng(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()),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 e=this._latlng;return this._latlng=o.latLng(t),this.update(),this.fire("move",{oldLatLng:e,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){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),t.alt&&(i.alt=t.alt)),o.DomUtil.addClass(i,e),t.keyboard&&(i.tabIndex="0"),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var s=t.icon.createShadow(this._shadow),r=!1;s!==this._shadow&&(this._removeShadow(),r=!0),s&&(o.DomUtil.addClass(s,e),s.alt=""),this._shadow=s,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),s&&r&&this.getPane("shadowPane").appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),o.DomUtil.remove(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&o.DomUtil.remove(this._shadow),this._shadow=null},_setPos:function(t){o.DomUtil.setPosition(this._icon,t),this._shadow&&o.DomUtil.setPosition(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 e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(o.DomUtil.addClass(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),o.Handler.MarkerDrag)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new o.Handler.MarkerDrag(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;o.DomUtil.setOpacity(this._icon,t),this._shadow&&o.DomUtil.setOpacity(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor||[0,0]},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor||[0,0]}}),o.marker=function(t,e){return new o.Marker(t,e)},o.DivIcon=o.Icon.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:e.createElement("div"),n=this.options;if(i.innerHTML=n.html!==!1?n.html:"",n.bgPos){var s=o.point(n.bgPos);i.style.backgroundPosition=-s.x+"px "+-s.y+"px"}return this._setIconStyles(i,"icon"),i},createShadow:function(){return null}}),o.divIcon=function(t){return new o.DivIcon(t)},o.DivOverlay=o.Layer.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){o.setOptions(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&o.DomUtil.setOpacity(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&o.DomUtil.setOpacity(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(o.DomUtil.setOpacity(this._container,0),this._removeTimeout=setTimeout(o.bind(o.DomUtil.remove,o.DomUtil,this._container),200)):o.DomUtil.remove(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(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&&o.DomUtil.toFront(this._container),this},bringToBack:function(){return this._map&&o.DomUtil.toBack(this._container),this},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=o.point(this.options.offset),i=this._getAnchor();this._zoomAnimated?o.DomUtil.setPosition(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,s=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=s+"px"}},_getAnchor:function(){return[0,0]}}),o.Popup=o.DivOverlay.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){o.DivOverlay.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof o.Path||this._source.on("preclick",o.DomEvent.stopPropagation))},onRemove:function(t){o.DivOverlay.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof o.Path||this._source.off("preclick",o.DomEvent.stopPropagation))},getEvents:function(){var t=o.DivOverlay.prototype.getEvents.call(this);return("closeOnClick"in this.options?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",e=this._container=o.DomUtil.create("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated");if(this.options.closeButton){var i=this._closeButton=o.DomUtil.create("a",t+"-close-button",e);i.href="#close",i.innerHTML="&#215;",o.DomEvent.on(i,"click",this._onCloseButtonClick,this)}var n=this._wrapper=o.DomUtil.create("div",t+"-content-wrapper",e);this._contentNode=o.DomUtil.create("div",t+"-content",n),o.DomEvent.disableClickPropagation(n).disableScrollPropagation(this._contentNode).on(n,"contextmenu",o.DomEvent.stopPropagation),this._tipContainer=o.DomUtil.create("div",t+"-tip-container",e),this._tip=o.DomUtil.create("div",t+"-tip",this._tipContainer)},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,s=this.options.maxHeight,r="leaflet-popup-scrolled";s&&n>s?(e.height=s+"px",o.DomUtil.addClass(t,r)):o.DomUtil.removeClass(t,r),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();o.DomUtil.setPosition(this._container,e.add(i))},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){var t=this._map,e=parseInt(o.DomUtil.getStyle(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,s=new o.Point(this._containerLeft,-i-this._containerBottom);s._add(o.DomUtil.getPosition(this._container));var r=t.layerPointToContainerPoint(s),a=o.point(this.options.autoPanPadding),h=o.point(this.options.autoPanPaddingTopLeft||a),l=o.point(this.options.autoPanPaddingBottomRight||a),u=t.getSize(),c=0,d=0;r.x+n+l.x>u.x&&(c=r.x+n-u.x+l.x),r.x-c-h.x<0&&(c=r.x-h.x),r.y+i+l.y>u.y&&(d=r.y+i-u.y+l.y),r.y-d-h.y<0&&(d=r.y-h.y),(c||d)&&t.fire("autopanstart").panBy([c,d])}},_onCloseButtonClick:function(t){this._close(),o.DomEvent.stop(t)},_getAnchor:function(){return o.point(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),o.popup=function(t,e){return new o.Popup(t,e)},o.Map.mergeOptions({closePopupOnClick:!0}),o.Map.include({openPopup:function(t,e,i){return t instanceof o.Popup||(t=new o.Popup(i).setContent(t)),e&&t.setLatLng(e),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}}),o.Layer.include({bindPopup:function(t,e){return t instanceof o.Popup?(o.setOptions(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new o.Popup(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){if(t instanceof o.Layer||(e=t,t=this),t instanceof o.FeatureGroup)for(var i in this._layers){t=this._layers[i];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._popup&&this._map&&(this._popup._source=t,this._popup.update(),this._map.openPopup(this._popup,e)),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 e=t.layer||t.target;if(this._popup&&this._map)return o.DomEvent.stop(t),e instanceof o.Path?void this.openPopup(t.layer||t.target,t.latlng):void(this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),o.Tooltip=o.DivOverlay.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){o.DivOverlay.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){o.DivOverlay.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=o.DivOverlay.prototype.getEvents.call(this);return o.Browser.touch&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip",e=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=o.DomUtil.create("div",e)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,i=this._container,n=e.latLngToContainerPoint(e.getCenter()),s=e.layerPointToContainerPoint(t),r=this.options.direction,a=i.offsetWidth,h=i.offsetHeight,l=o.point(this.options.offset),u=this._getAnchor();"top"===r?t=t.add(o.point(-a/2+l.x,-h+l.y+u.y,!0)):"bottom"===r?t=t.subtract(o.point(a/2-l.x,-l.y,!0)):"center"===r?t=t.subtract(o.point(a/2+l.x,h/2-u.y+l.y,!0)):"right"===r||"auto"===r&&s.x<n.x?(r="right",t=t.add(o.point(l.x+u.x,u.y-h/2+l.y,!0))):(r="left",t=t.subtract(o.point(a+u.x-l.x,h/2-u.y-l.y,!0))),o.DomUtil.removeClass(i,"leaflet-tooltip-right"),o.DomUtil.removeClass(i,"leaflet-tooltip-left"),o.DomUtil.removeClass(i,"leaflet-tooltip-top"),o.DomUtil.removeClass(i,"leaflet-tooltip-bottom"),o.DomUtil.addClass(i,"leaflet-tooltip-"+r),o.DomUtil.setPosition(i,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&o.DomUtil.setOpacity(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return o.point(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),o.tooltip=function(t,e){return new o.Tooltip(t,e)},o.Map.include({openTooltip:function(t,e,i){return t instanceof o.Tooltip||(t=new o.Tooltip(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),o.Layer.include({bindTooltip:function(t,e){return t instanceof o.Tooltip?(o.setOptions(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=o.tooltip(e,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 e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),o.Browser.touch&&(i.click=this._openTooltip)),this[e](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){if(t instanceof o.Layer||(e=t,t=this),t instanceof o.FeatureGroup)for(var i in this._layers){t=this._layers[i];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._tooltip&&this._map&&(this._tooltip._source=t,this._tooltip.update(),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(o.DomUtil.addClass(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&&(o.DomUtil.removeClass(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 e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:i)},_moveTooltip:function(t){var e,i,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),n=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(n)}}),o.LayerGroup=o.Layer.extend({initialize:function(t){this._layers={};var e,i;if(t)for(e=0,i=t.length;e<i;e++)this.addLayer(t[e])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){for(var t in this._layers)this.removeLayer(this._layers[t]);return this},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)i=this._layers[e],i[t]&&i[t].apply(i,n);return this},onAdd:function(t){for(var e in this._layers)t.addLayer(this._layers[e])},onRemove:function(t){for(var e in this._layers)t.removeLayer(this._layers[e])},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers)t.push(this._layers[e]);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return o.stamp(t)}}),o.layerGroup=function(t){return new o.LayerGroup(t)},o.FeatureGroup=o.LayerGroup.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),o.LayerGroup.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),o.LayerGroup.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 o.LatLngBounds;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),o.featureGroup=function(t){return new o.FeatureGroup(t)},o.Renderer=o.Layer.extend({options:{padding:.1},initialize:function(t){o.setOptions(this,t),o.stamp(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&o.DomUtil.addClass(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){o.DomUtil.remove(this._container),this.off("update",this._updatePaths,this)},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,e){var i=this._map.getZoomScale(e,this._zoom),n=o.DomUtil.getPosition(this._container),s=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),a=this._map.project(t,e),h=a.subtract(r),l=s.multiplyBy(-i).add(n).add(s).subtract(h);o.Browser.any3d?o.DomUtil.setTransform(this._container,l,i):o.DomUtil.setPosition(this._container,l)},_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,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new o.Bounds(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),o.Map.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this.options.preferCanvas&&o.canvas()||o.svg()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||t===i)return!1;var e=this._paneRenderers[t];return e===i&&(e=o.SVG&&o.svg({pane:t})||o.Canvas&&o.canvas({pane:t}),this._paneRenderers[t]=e),e}}),o.Path=o.Layer.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},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 o.setOptions(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)+(o.Browser.touch?10:0)}}),o.LineUtil={simplify:function(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=this._reducePoints(t,i),t=this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var n=t.length,o=typeof Uint8Array!=i+""?Uint8Array:Array,s=new o(n);s[0]=s[n-1]=1,this._simplifyDPStep(t,s,e,0,n-1);var r,a=[];for(r=0;r<n;r++)s[r]&&a.push(t[r]);return a},_simplifyDPStep:function(t,e,i,n,o){var s,r,a,h=0;for(r=n+1;r<=o-1;r++)a=this._sqClosestPointOnSegment(t[r],t[n],t[o],!0),a>h&&(s=r,h=a);h>i&&(e[s]=1,this._simplifyDPStep(t,e,i,n,s),this._simplifyDPStep(t,e,i,s,o))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;n<s;n++)this._sqDist(t[n],t[o])>e&&(i.push(t[n]),o=n);return o<s-1&&i.push(t[s-1]),i},clipSegment:function(t,e,i,n,o){var s,r,a,h=n?this._lastCode:this._getBitCode(t,i),l=this._getBitCode(e,i);for(this._lastCode=l;;){if(!(h|l))return[t,e];if(h&l)return!1;s=h||l,r=this._getEdgeIntersection(t,e,s,i,o),a=this._getBitCode(r,i),s===h?(t=r,h=a):(e=r,l=a)}},_getEdgeIntersection:function(t,e,i,n,s){var r,a,h=e.x-t.x,l=e.y-t.y,u=n.min,c=n.max;return 8&i?(r=t.x+h*(c.y-t.y)/l,a=c.y):4&i?(r=t.x+h*(u.y-t.y)/l,a=u.y):2&i?(r=c.x,a=t.y+l*(c.x-t.x)/h):1&i&&(r=u.x,a=t.y+l*(u.x-t.x)/h),new o.Point(r,a,s)},_getBitCode:function(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,e,i,n){var s,r=e.x,a=e.y,h=i.x-r,l=i.y-a,u=h*h+l*l;return u>0&&(s=((t.x-r)*h+(t.y-a)*l)/u,s>1?(r=i.x,a=i.y):s>0&&(r+=h*s,a+=l*s)),h=t.x-r,l=t.y-a,n?h*h+l*l:new o.Point(r,a)}},o.Polyline=o.Path.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){o.setOptions(this,e),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 e,i,n=1/0,s=null,r=o.LineUtil._sqClosestPointOnSegment,a=0,h=this._parts.length;a<h;a++)for(var l=this._parts[a],u=1,c=l.length;u<c;u++){e=l[u-1],i=l[u];var d=r(t,e,i,!0);d<n&&(n=d,s=r(t,e,i))}return s&&(s.distance=Math.sqrt(n)),s},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,o,s,r,a=this._rings[0],h=a.length;if(!h)return null;for(t=0,e=0;t<h-1;t++)e+=a[t].distanceTo(a[t+1])/2;if(0===e)return this._map.layerPointToLatLng(a[0]);for(t=0,n=0;t<h-1;t++)if(o=a[t],s=a[t+1],i=o.distanceTo(s),n+=i,n>e)return r=(n-e)/i,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,e){return e=e||this._defaultShape(),t=o.latLng(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new o.LatLngBounds,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return o.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=o.Polyline._flat(t),n=0,s=t.length;n<s;n++)i?(e[n]=o.latLng(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new o.Bounds;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t);var e=this._clickTolerance(),i=new o.Point(e,e);this._bounds.isValid()&&t.isValid()&&(t.min._subtract(i),t.max._add(i),this._pxBounds=t)},_projectLatlngs:function(t,e,i){var n,s,r=t[0]instanceof o.LatLng,a=t.length;if(r){for(s=[],n=0;n<a;n++)s[n]=this._map.latLngToLayerPoint(t[n]),i.extend(s[n]);e.push(s)}else for(n=0;n<a;n++)this._projectLatlngs(t[n],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t)){if(this.options.noClip)return void(this._parts=this._rings);var e,i,n,s,r,a,h,l=this._parts;for(e=0,n=0,s=this._rings.length;e<s;e++)for(h=this._rings[e],i=0,r=h.length;i<r-1;i++)a=o.LineUtil.clipSegment(h[i],h[i+1],t,i,!0),a&&(l[n]=l[n]||[],l[n].push(a[0]),a[1]===h[i+1]&&i!==r-2||(l[n].push(a[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=o.LineUtil.simplify(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)}}),o.polyline=function(t,e){return new o.Polyline(t,e)},o.Polyline._flat=function(t){return!o.Util.isArray(t[0])||"object"!=typeof t[0][0]&&"undefined"!=typeof t[0][0]},o.PolyUtil={},o.PolyUtil.clipPolygon=function(t,e,i){var n,s,r,a,h,l,u,c,d,_=[1,4,2,8],m=o.LineUtil;for(s=0,u=t.length;s<u;s++)t[s]._code=m._getBitCode(t[s],e);for(a=0;a<4;a++){for(c=_[a],n=[],s=0,u=t.length,r=u-1;s<u;r=s++)h=t[s],l=t[r],h._code&c?l._code&c||(d=m._getEdgeIntersection(l,h,c,e,i),d._code=m._getBitCode(d,e),n.push(d)):(l._code&c&&(d=m._getEdgeIntersection(l,h,c,e,i),d._code=m._getBitCode(d,e),n.push(d)),n.push(h));t=n}return t},o.Polygon=o.Polyline.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,e,i,n,o,s,r,a,h,l=this._rings[0],u=l.length;if(!u)return null;for(s=r=a=0,t=0,e=u-1;t<u;e=t++)i=l[t],n=l[e],o=i.y*n.x-n.y*i.x,r+=(i.x+n.x)*o,a+=(i.y+n.y)*o,s+=3*o;return h=0===s?l[0]:[r/s,a/s],this._map.layerPointToLatLng(h)},_convertLatLngs:function(t){var e=o.Polyline.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof o.LatLng&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){o.Polyline.prototype._setLatLngs.call(this,t),o.Polyline._flat(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return o.Polyline._flat(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new o.Point(e,e);if(t=new o.Bounds(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t)){if(this.options.noClip)return void(this._parts=this._rings);for(var n,s=0,r=this._rings.length;s<r;s++)n=o.PolyUtil.clipPolygon(this._rings[s],t,!0),n.length&&this._parts.push(n)}},_updatePath:function(){this._renderer._updatePoly(this,!0)}}),o.polygon=function(t,e){return new o.Polygon(t,e)},o.Rectangle=o.Polygon.extend({initialize:function(t,e){o.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=o.latLngBounds(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),o.rectangle=function(t,e){return new o.Rectangle(t,e)},o.CircleMarker=o.Path.extend({options:{fill:!0,radius:10},initialize:function(t,e){o.setOptions(this,e),this._latlng=o.latLng(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=o.latLng(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 e=t&&t.radius||this._radius;return o.Path.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new o.Bounds(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)}}),o.circleMarker=function(t,e){return new o.CircleMarker(t,e)},o.Circle=o.CircleMarker.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=o.extend({},i,{radius:e})),o.setOptions(this,e),this._latlng=o.latLng(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,
8+this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new o.LatLngBounds(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:o.Path.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===o.CRS.Earth.distance){var s=Math.PI/180,r=this._mRadius/o.CRS.Earth.R/s,a=i.project([e+r,t]),h=i.project([e-r,t]),l=a.add(h).divideBy(2),u=i.unproject(l).lat,c=Math.acos((Math.cos(r*s)-Math.sin(e*s)*Math.sin(u*s))/(Math.cos(e*s)*Math.cos(u*s)))/s;(isNaN(c)||0===c)&&(c=r/Math.cos(Math.PI/180*e)),this._point=l.subtract(i.getPixelOrigin()),this._radius=isNaN(c)?0:Math.max(Math.round(l.x-i.project([u,t-c]).x),1),this._radiusY=Math.max(Math.round(l.y-a.y),1)}else{var d=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(d).x}this._updateBounds()}}),o.circle=function(t,e,i){return new o.Circle(t,e,i)},o.SVG=o.Renderer.extend({getEvents:function(){var t=o.Renderer.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=o.SVG.create("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=o.SVG.create("g"),this._container.appendChild(this._rootGroup)},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){o.Renderer.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),o.DomUtil.setPosition(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=o.SVG.create("path");t.options.className&&o.DomUtil.addClass(e,t.options.className),t.options.interactive&&o.DomUtil.addClass(e,"leaflet-interactive"),this._updateStyle(t),this._layers[o.stamp(t)]=t},_addPath:function(t){this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){o.DomUtil.remove(t._path),t.removeInteractiveTarget(t._path),delete this._layers[o.stamp(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,o.SVG.pointsToPath(t._parts,e))},_updateCircle:function(t){var e=t._point,i=t._radius,n=t._radiusY||i,o="a"+i+","+n+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+2*i+",0 "+o+2*-i+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){o.DomUtil.toFront(t._path)},_bringToBack:function(t){o.DomUtil.toBack(t._path)}}),o.extend(o.SVG,{create:function(t){return e.createElementNS("http://www.w3.org/2000/svg",t)},pointsToPath:function(t,e){var i,n,s,r,a,h,l="";for(i=0,s=t.length;i<s;i++){for(a=t[i],n=0,r=a.length;n<r;n++)h=a[n],l+=(n?"L":"M")+h.x+" "+h.y;l+=e?o.Browser.svg?"z":"x":""}return l||"M0 0"}}),o.Browser.svg=!(!e.createElementNS||!o.SVG.create("svg").createSVGRect),o.svg=function(t){return o.Browser.svg||o.Browser.vml?new o.SVG(t):null},o.Browser.vml=!o.Browser.svg&&function(){try{var t=e.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}}(),o.SVG.include(o.Browser.vml?{_initContainer:function(){this._container=o.DomUtil.create("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(o.Renderer.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=o.SVG.create("shape");o.DomUtil.addClass(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=o.SVG.create("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[o.stamp(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;o.DomUtil.remove(e),t.removeInteractiveTarget(e),delete this._layers[o.stamp(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,s=t._container;s.stroked=!!n.stroke,s.filled=!!n.fill,n.stroke?(e||(e=t._stroke=o.SVG.create("stroke")),s.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=o.Util.isArray(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(s.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=o.SVG.create("fill")),s.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(s.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){o.DomUtil.toFront(t._container)},_bringToBack:function(t){o.DomUtil.toBack(t._container)}}:{}),o.Browser.vml&&(o.SVG.create=function(){try{return e.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return e.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}()),o.Canvas=o.Renderer.extend({getEvents:function(){var t=o.Renderer.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){o.Renderer.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=e.createElement("canvas");o.DomEvent.on(t,"mousemove",o.Util.throttle(this._onMouseMove,32,this),this).on(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this).on(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var e in this._layers)t=this._layers[e],t._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){this._drawnLayers={},o.Renderer.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=o.Browser.retina?2:1;o.DomUtil.setPosition(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",o.Browser.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){o.Renderer.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[o.stamp(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[o.stamp(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(t.options.dashArray){var e,i=t.options.dashArray.split(","),n=[];for(e=0;e<i.length;e++)n.push(Number(i[e]));t.options._dashArray=n}},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||o.Util.requestAnimFrame(this._redraw,this))},_extendRedrawBounds:function(t){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new o.Bounds,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))},_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 e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,o,s,r=t._parts,a=r.length,h=this._ctx;if(a){for(this._drawnLayers[t._leaflet_id]=t,h.beginPath(),h.setLineDash&&h.setLineDash(t.options&&t.options._dashArray||[]),i=0;i<a;i++){for(n=0,o=r[i].length;n<o;n++)s=r[i][n],h[n?"lineTo":"moveTo"](s.x,s.y);e&&h.closePath()}this._fillStroke(h,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=this._ctx,n=t._radius,o=(t._radiusY||n)/n;this._drawnLayers[t._leaflet_id]=t,1!==o&&(i.save(),i.scale(1,o)),i.beginPath(),i.arc(e.x,e.y/o,n,0,2*Math.PI,!1),1!==o&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e,i,n=this._map.mouseEventToLayerPoint(t),s=this._drawFirst;s;s=s.next)e=s.layer,e.options.interactive&&e._containsPoint(n)&&!this._map._draggableMoved(e)&&(i=e);i&&(o.DomEvent._fakeStop(t),this._fireEvent([i],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(o.DomUtil.removeClass(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){for(var i,n,s=this._drawFirst;s;s=s.next)i=s.layer,i.options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(o.DomUtil.addClass(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e=t._order,i=e.next,n=e.prev;i&&(i.prev=n,n?n.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))},_bringToBack:function(t){var e=t._order,i=e.next,n=e.prev;n&&(n.next=i,i?i.prev=n:n&&(this._drawLast=n),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}),o.Browser.canvas=function(){return!!e.createElement("canvas").getContext}(),o.canvas=function(t){return o.Browser.canvas?new o.Canvas(t):null},o.Polyline.prototype._containsPoint=function(t,e){var i,n,s,r,a,h,l=this._clickTolerance();if(!this._pxBounds.contains(t))return!1;for(i=0,r=this._parts.length;i<r;i++)for(h=this._parts[i],n=0,a=h.length,s=a-1;n<a;s=n++)if((e||0!==n)&&o.LineUtil.pointToSegmentDistance(t,h[s],h[n])<=l)return!0;return!1},o.Polygon.prototype._containsPoint=function(t){var e,i,n,s,r,a,h,l,u=!1;if(!this._pxBounds.contains(t))return!1;for(s=0,h=this._parts.length;s<h;s++)for(e=this._parts[s],r=0,l=e.length,a=l-1;r<l;a=r++)i=e[r],n=e[a],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u||o.Polyline.prototype._containsPoint.call(this,t,!0)},o.CircleMarker.prototype._containsPoint=function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()},o.GeoJSON=o.FeatureGroup.extend({initialize:function(t,e){o.setOptions(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=o.Util.isArray(t)?t:t.features;if(s){for(e=0,i=s.length;e<i;e++)n=s[e],(n.geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var r=this.options;if(r.filter&&!r.filter(t))return this;var a=o.GeoJSON.geometryToLayer(t,r);return a?(a.feature=o.GeoJSON.asFeature(t),a.defaultOptions=a.options,this.resetStyle(a),r.onEachFeature&&r.onEachFeature(t,a),this.addLayer(a)):this},resetStyle:function(t){return t.options=o.Util.extend({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),o.extend(o.GeoJSON,{geometryToLayer:function(t,e){var i,n,s,r,a="Feature"===t.type?t.geometry:t,h=a?a.coordinates:null,l=[],u=e&&e.pointToLayer,c=e&&e.coordsToLatLng||this.coordsToLatLng;if(!h&&!a)return null;switch(a.type){case"Point":return i=c(h),u?u(t,i):new o.Marker(i);case"MultiPoint":for(s=0,r=h.length;s<r;s++)i=c(h[s]),l.push(u?u(t,i):new o.Marker(i));return new o.FeatureGroup(l);case"LineString":case"MultiLineString":return n=this.coordsToLatLngs(h,"LineString"===a.type?0:1,c),new o.Polyline(n,e);case"Polygon":case"MultiPolygon":return n=this.coordsToLatLngs(h,"Polygon"===a.type?1:2,c),new o.Polygon(n,e);case"GeometryCollection":for(s=0,r=a.geometries.length;s<r;s++){var d=this.geometryToLayer({geometry:a.geometries[s],type:"Feature",properties:t.properties},e);d&&l.push(d)}return new o.FeatureGroup(l);default:throw new Error("Invalid GeoJSON object.")}},coordsToLatLng:function(t){return new o.LatLng(t[1],t[0],t[2])},coordsToLatLngs:function(t,e,i){for(var n,o=[],s=0,r=t.length;s<r;s++)n=e?this.coordsToLatLngs(t[s],e-1,i):(i||this.coordsToLatLng)(t[s]),o.push(n);return o},latLngToCoords:function(t){return t.alt!==i?[t.lng,t.lat,t.alt]:[t.lng,t.lat]},latLngsToCoords:function(t,e,i){for(var n=[],s=0,r=t.length;s<r;s++)n.push(e?o.GeoJSON.latLngsToCoords(t[s],e-1,i):o.GeoJSON.latLngToCoords(t[s]));return!e&&i&&n.push(n[0]),n},getFeature:function(t,e){return t.feature?o.extend({},t.feature,{geometry:e}):o.GeoJSON.asFeature(e)},asFeature:function(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}});var a={toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"Point",coordinates:o.GeoJSON.latLngToCoords(this.getLatLng())})}};o.Marker.include(a),o.Circle.include(a),o.CircleMarker.include(a),o.Polyline.prototype.toGeoJSON=function(){var t=!o.Polyline._flat(this._latlngs),e=o.GeoJSON.latLngsToCoords(this._latlngs,t?1:0);return o.GeoJSON.getFeature(this,{type:(t?"Multi":"")+"LineString",coordinates:e})},o.Polygon.prototype.toGeoJSON=function(){var t=!o.Polyline._flat(this._latlngs),e=t&&!o.Polyline._flat(this._latlngs[0]),i=o.GeoJSON.latLngsToCoords(this._latlngs,e?2:t?1:0,!0);return t||(i=[i]),o.GeoJSON.getFeature(this,{type:(e?"Multi":"")+"Polygon",coordinates:i})},o.LayerGroup.include({toMultiPoint:function(){var t=[];return this.eachLayer(function(e){t.push(e.toGeoJSON().geometry.coordinates)}),o.GeoJSON.getFeature(this,{type:"MultiPoint",coordinates:t})},toGeoJSON:function(){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===t)return this.toMultiPoint();var e="GeometryCollection"===t,i=[];return this.eachLayer(function(t){if(t.toGeoJSON){var n=t.toGeoJSON();i.push(e?n.geometry:o.GeoJSON.asFeature(n))}}),e?o.GeoJSON.getFeature(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}}),o.geoJSON=function(t,e){return new o.GeoJSON(t,e)},o.geoJson=o.geoJSON,o.Draggable=o.Evented.extend({options:{clickTolerance:3},statics:{START:o.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(t,e,i){this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(o.DomEvent.on(this._dragStartTarget,o.Draggable.START.join(" "),this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(o.Draggable._dragging===this&&this.finishDrag(),o.DomEvent.off(this._dragStartTarget,o.Draggable.START.join(" "),this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!o.DomUtil.hasClass(this._element,"leaflet-zoom-anim")&&!(o.Draggable._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(o.Draggable._dragging=this,this._preventOutline&&o.DomUtil.preventOutline(this._element),o.DomUtil.disableImageDrag(),o.DomUtil.disableTextSelection(),this._moving)))){this.fire("down");var i=t.touches?t.touches[0]:t;this._startPoint=new o.Point(i.clientX,i.clientY),o.DomEvent.on(e,o.Draggable.MOVE[t.type],this._onMove,this).on(e,o.Draggable.END[t.type],this._onUp,this)}},_onMove:function(i){if(!i._simulated&&this._enabled){if(i.touches&&i.touches.length>1)return void(this._moved=!0);var n=i.touches&&1===i.touches.length?i.touches[0]:i,s=new o.Point(n.clientX,n.clientY),r=s.subtract(this._startPoint);(r.x||r.y)&&(Math.abs(r.x)+Math.abs(r.y)<this.options.clickTolerance||(o.DomEvent.preventDefault(i),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=o.DomUtil.getPosition(this._element).subtract(r),o.DomUtil.addClass(e.body,"leaflet-dragging"),this._lastTarget=i.target||i.srcElement,t.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),o.DomUtil.addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(r),this._moving=!0,o.Util.cancelAnimFrame(this._animRequest),this._lastEvent=i,this._animRequest=o.Util.requestAnimFrame(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),o.DomUtil.setPosition(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){o.DomUtil.removeClass(e.body,"leaflet-dragging"),this._lastTarget&&(o.DomUtil.removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var t in o.Draggable.MOVE)o.DomEvent.off(e,o.Draggable.MOVE[t],this._onMove,this).off(e,o.Draggable.END[t],this._onUp,this);o.DomUtil.enableImageDrag(),o.DomUtil.enableTextSelection(),this._moved&&this._moving&&(o.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,o.Draggable._dragging=!1}}),o.Handler=o.Class.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}}),o.Map.mergeOptions({dragging:!0,inertia:!o.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),o.Map.Drag=o.Handler.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new o.Draggable(t._mapPane,t._container),this._draggable.on({down:this._onDown,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))}o.DomUtil.addClass(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){o.DomUtil.removeClass(this._map._container,"leaflet-grab"),o.DomUtil.removeClass(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},_onDown:function(){this._map._stop()},_onDragStart:function(){var t=this._map;if(this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=o.latLngBounds(this._map.options.maxBounds);this._offsetLimit=o.bounds(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.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 e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),e-this._times[0]>50&&(this._positions.shift(),this._times.shift())}this._map.fire("move",t).fire("drag",t)},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,r=Math.abs(o+i)<Math.abs(s+i)?o:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var e=this._map,i=e.options,n=!i.inertia||this._times.length<2;if(e.fire("dragend",t),n)e.fire("moveend");else{var s=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,a=i.easeLinearity,h=s.multiplyBy(a/r),l=h.distanceTo([0,0]),u=Math.min(i.inertiaMaxSpeed,l),c=h.multiplyBy(u/l),d=u/(i.inertiaDeceleration*a),_=c.multiplyBy(-d/2).round();_.x||_.y?(_=e._limitOffset(_,e.options.maxBounds),o.Util.requestAnimFrame(function(){e.panBy(_,{duration:d,easeLinearity:a,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}}),o.Map.addInitHook("addHandler","dragging",o.Map.Drag),o.Map.mergeOptions({doubleClickZoom:!0}),o.Map.DoubleClickZoom=o.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}}),o.Map.addInitHook("addHandler","doubleClickZoom",o.Map.DoubleClickZoom),o.Map.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60}),o.Map.ScrollWheelZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){o.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=o.DomEvent.getWheelDelta(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o.bind(this._performZoom,this),n),o.DomEvent.stop(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=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=i?Math.ceil(o/i)*i:o,r=t._limitZoom(e+(this._delta>0?s:-s))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}}),o.Map.addInitHook("addHandler","scrollWheelZoom",o.Map.ScrollWheelZoom),o.extend(o.DomEvent,{_touchstart:o.Browser.msPointer?"MSPointerDown":o.Browser.pointer?"pointerdown":"touchstart",_touchend:o.Browser.msPointer?"MSPointerUp":o.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(t,e,i){function n(t){var e;if(o.Browser.pointer){if(!o.Browser.edge||"mouse"===t.pointerType)return;e=o.DomEvent._pointersCount}else e=t.touches.length;if(!(e>1)){var i=Date.now(),n=i-(r||i);a=t.touches?t.touches[0]:t,h=n>0&&n<=l,r=i}}function s(t){if(h&&!a.cancelBubble){if(o.Browser.pointer){if(!o.Browser.edge||"mouse"===t.pointerType)return;var i,n,s={};for(n in a)i=a[n],s[n]=i&&i.bind?i.bind(a):i;a=s}a.type="dblclick",e(a),r=null}}var r,a,h=!1,l=250,u="_leaflet_",c=this._touchstart,d=this._touchend;return t[u+c+i]=n,t[u+d+i]=s,t[u+"dblclick"+i]=e,t.addEventListener(c,n,!1),t.addEventListener(d,s,!1),t.addEventListener("dblclick",e,!1),this},removeDoubleTapListener:function(t,e){var i="_leaflet_",n=t[i+this._touchstart+e],s=t[i+this._touchend+e],r=t[i+"dblclick"+e];return t.removeEventListener(this._touchstart,n,!1),t.removeEventListener(this._touchend,s,!1),o.Browser.edge||t.removeEventListener("dblclick",r,!1),this}}),o.extend(o.DomEvent,{POINTER_DOWN:o.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:o.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:o.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:o.Browser.msPointer?"MSPointerCancel":"pointercancel",TAG_WHITE_LIST:["INPUT","SELECT","OPTION"],_pointers:{},_pointersCount:0,addPointerListener:function(t,e,i,n){return"touchstart"===e?this._addPointerStart(t,i,n):"touchmove"===e?this._addPointerMove(t,i,n):"touchend"===e&&this._addPointerEnd(t,i,n),this},removePointerListener:function(t,e,i){var n=t["_leaflet_"+e+i];return"touchstart"===e?t.removeEventListener(this.POINTER_DOWN,n,!1):"touchmove"===e?t.removeEventListener(this.POINTER_MOVE,n,!1):"touchend"===e&&(t.removeEventListener(this.POINTER_UP,n,!1),t.removeEventListener(this.POINTER_CANCEL,n,!1)),this},_addPointerStart:function(t,i,n){var s=o.bind(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(this.TAG_WHITE_LIST.indexOf(t.target.tagName)<0))return;o.DomEvent.preventDefault(t)}this._handlePointer(t,i)},this);if(t["_leaflet_touchstart"+n]=s,t.addEventListener(this.POINTER_DOWN,s,!1),!this._pointerDocListener){var r=o.bind(this._globalPointerUp,this);e.documentElement.addEventListener(this.POINTER_DOWN,o.bind(this._globalPointerDown,this),!0),e.documentElement.addEventListener(this.POINTER_MOVE,o.bind(this._globalPointerMove,this),!0),e.documentElement.addEventListener(this.POINTER_UP,r,!0),e.documentElement.addEventListener(this.POINTER_CANCEL,r,!0),this._pointerDocListener=!0}},_globalPointerDown:function(t){this._pointers[t.pointerId]=t,this._pointersCount++},_globalPointerMove:function(t){this._pointers[t.pointerId]&&(this._pointers[t.pointerId]=t)},_globalPointerUp:function(t){delete this._pointers[t.pointerId],this._pointersCount--},_handlePointer:function(t,e){t.touches=[];for(var i in this._pointers)t.touches.push(this._pointers[i]);t.changedTouches=[t],e(t)},_addPointerMove:function(t,e,i){var n=o.bind(function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&this._handlePointer(t,e)},this);t["_leaflet_touchmove"+i]=n,t.addEventListener(this.POINTER_MOVE,n,!1)},_addPointerEnd:function(t,e,i){var n=o.bind(function(t){this._handlePointer(t,e)},this);t["_leaflet_touchend"+i]=n,t.addEventListener(this.POINTER_UP,n,!1),t.addEventListener(this.POINTER_CANCEL,n,!1)}}),o.Map.mergeOptions({touchZoom:o.Browser.touch&&!o.Browser.android23,bounceAtZoomLimits:!0}),o.Map.TouchZoom=o.Handler.extend({addHooks:function(){o.DomUtil.addClass(this._map._container,"leaflet-touch-zoom"),o.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){o.DomUtil.removeClass(this._map._container,"leaflet-touch-zoom"),o.DomEvent.off(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 n=i.mouseEventToContainerPoint(t.touches[0]),s=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(n.add(s)._divideBy(2))),this._startDist=n.distanceTo(s),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),o.DomEvent.on(e,"touchmove",this._onTouchMove,this).on(e,"touchend",this._onTouchEnd,this),o.DomEvent.preventDefault(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),s=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(s,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&s<1||this._zoom>e.getMaxZoom()&&s>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var r=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===r.x&&0===r.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(e._moveStart(!0),this._moved=!0),o.Util.cancelAnimFrame(this._animRequest);var a=o.bind(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=o.Util.requestAnimFrame(a,this,!0),o.DomEvent.preventDefault(t)}},_onTouchEnd:function(){return this._moved&&this._zooming?(this._zooming=!1,o.Util.cancelAnimFrame(this._animRequest),o.DomEvent.off(e,"touchmove",this._onTouchMove).off(e,"touchend",this._onTouchEnd),void(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)))):void(this._zooming=!1)}}),o.Map.addInitHook("addHandler","touchZoom",o.Map.TouchZoom),o.Map.mergeOptions({tap:!0,tapTolerance:15}),o.Map.Tap=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(o.DomEvent.preventDefault(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 o.Point(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.addClass(n,"leaflet-active"),this._holdTimeout=setTimeout(o.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),this._simulateEvent("mousedown",i),o.DomEvent.on(e,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),o.DomEvent.off(e,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],n=i.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.removeClass(n,"leaflet-active"),this._simulateEvent("mouseup",i),
9+this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new o.Point(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(i,n){var o=e.createEvent("MouseEvents");o._simulated=!0,n.target._simulatedClick=!0,o.initMouseEvent(i,!0,!0,t,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(o)}}),o.Browser.touch&&!o.Browser.pointer&&o.Map.addInitHook("addHandler","tap",o.Map.Tap),o.Map.mergeOptions({boxZoom:!0}),o.Map.BoxZoom=o.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){o.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){o.DomEvent.off(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_resetState:function(){this._moved=!1},_onMouseDown:function(t){return!(!t.shiftKey||1!==t.which&&1!==t.button)&&(this._resetState(),o.DomUtil.disableTextSelection(),o.DomUtil.disableImageDrag(),this._startPoint=this._map.mouseEventToContainerPoint(t),void o.DomEvent.on(e,{contextmenu:o.DomEvent.stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this))},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=o.DomUtil.create("div","leaflet-zoom-box",this._container),o.DomUtil.addClass(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new o.Bounds(this._point,this._startPoint),i=e.getSize();o.DomUtil.setPosition(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(o.DomUtil.remove(this._box),o.DomUtil.removeClass(this._container,"leaflet-crosshair")),o.DomUtil.enableTextSelection(),o.DomUtil.enableImageDrag(),o.DomEvent.off(e,{contextmenu:o.DomEvent.stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){setTimeout(o.bind(this._resetState,this),0);var e=new o.LatLngBounds(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),o.Map.addInitHook("addHandler","boxZoom",o.Map.BoxZoom),o.Map.mergeOptions({keyboard:!0,keyboardPanDelta:80}),o.Map.Keyboard=o.Handler.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"),o.DomEvent.on(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(),o.DomEvent.off(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 i=e.body,n=e.documentElement,o=i.scrollTop||n.scrollTop,s=i.scrollLeft||n.scrollLeft;this._map._container.focus(),t.scrollTo(s,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;e<i;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;e<i;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;e<i;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;e<i;e++)n[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;e<i;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;e<i;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){o.DomEvent.on(e,"keydown",this._onKeyDown,this)},_removeHooks:function(){o.DomEvent.off(e,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys){if(n._panAnim&&n._panAnim._inProgress)return;e=this._panKeys[i],t.shiftKey&&(e=o.point(e).multiplyBy(3)),n.panBy(e),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds)}else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i)return;n.closePopup()}o.DomEvent.stop(t)}}}),o.Map.addInitHook("addHandler","keyboard",o.Map.Keyboard),o.Handler.MarkerDrag=o.Handler.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new o.Draggable(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),o.DomUtil.addClass(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&o.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(t){var e=this._marker,i=e._shadow,n=o.DomUtil.getPosition(e._icon),s=e._map.layerPointToLatLng(n);i&&o.DomUtil.setPosition(i,n),e._latlng=s,t.latlng=s,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),o.Control=o.Class.extend({options:{position:"topright"},initialize:function(t){o.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return o.DomUtil.addClass(e,"leaflet-control"),i.indexOf("bottom")!==-1?n.insertBefore(e,n.firstChild):n.appendChild(e),this},remove:function(){return this._map?(o.DomUtil.remove(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()}}),o.control=function(t){return new o.Control(t)},o.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){function t(t,s){var r=i+t+" "+i+s;e[t+s]=o.DomUtil.create("div",r,n)}var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=o.DomUtil.create("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){o.DomUtil.remove(this._controlContainer)}}),o.Control.Zoom=o.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=o.DomUtil.create("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},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,e,i,n,s){var r=o.DomUtil.create("a",i,n);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),o.DomEvent.on(r,"mousedown dblclick",o.DomEvent.stopPropagation).on(r,"click",o.DomEvent.stop).on(r,"click",s,this).on(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";o.DomUtil.removeClass(this._zoomInButton,e),o.DomUtil.removeClass(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&o.DomUtil.addClass(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&o.DomUtil.addClass(this._zoomInButton,e)}}),o.Map.mergeOptions({zoomControl:!0}),o.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new o.Control.Zoom,this.addControl(this.zoomControl))}),o.control.zoom=function(t){return new o.Control.Zoom(t)},o.Control.Attribution=o.Control.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){o.setOptions(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=o.DomUtil.create("div","leaflet-control-attribution"),o.DomEvent&&o.DomEvent.disableClickPropagation(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].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 e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}}}),o.Map.mergeOptions({attributionControl:!0}),o.Map.addInitHook(function(){this.options.attributionControl&&(new o.Control.Attribution).addTo(this)}),o.control.attribution=function(t){return new o.Control.Attribution(t)},o.Control.Scale=o.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=o.DomUtil.create("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.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,e,i){t.metric&&(this._mScale=o.DomUtil.create("div",e,i)),t.imperial&&(this._iScale=o.DomUtil.create("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,o=3.2808399*t;o>5280?(e=o/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),o.control.scale=function(t){return new o.Control.Scale(t)},o.Control.Layers=o.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){o.setOptions(this,i),this._layers=[],this._lastZIndex=0,this._handlingClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){return this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this),this._container},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,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(o.stamp(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){o.DomUtil.addClass(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?(o.DomUtil.addClass(this._form,"leaflet-control-layers-scrollbar"),this._form.style.height=t+"px"):o.DomUtil.removeClass(this._form,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return o.DomUtil.removeClass(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=o.DomUtil.create("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),o.DomEvent.disableClickPropagation(e),o.Browser.touch||o.DomEvent.disableScrollPropagation(e);var n=this._form=o.DomUtil.create("form",t+"-list");i&&(this._map.on("click",this.collapse,this),o.Browser.android||o.DomEvent.on(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var s=this._layersLink=o.DomUtil.create("a",t+"-toggle",e);s.href="#",s.title="Layers",o.Browser.touch?o.DomEvent.on(s,"click",o.DomEvent.stop).on(s,"click",this.expand,this):o.DomEvent.on(s,"focus",this.expand,this),o.DomEvent.on(n,"click",function(){setTimeout(o.bind(this._onInputClick,this),0)},this),i||this.expand(),this._baseLayersList=o.DomUtil.create("div",t+"-base",n),this._separator=o.DomUtil.create("div",t+"-separator",n),this._overlaysList=o.DomUtil.create("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&o.stamp(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,i){t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(o.bind(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex))},_update:function(){if(!this._container)return this;o.DomUtil.empty(this._baseLayersList),o.DomUtil.empty(this._overlaysList);var t,e,i,n,s=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,s+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&s>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(o.stamp(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,i){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(i?' checked="checked"':"")+"/>",o=e.createElement("div");return o.innerHTML=n,o.firstChild},_addItem:function(t){var i,n=e.createElement("label"),s=this._map.hasLayer(t.layer);t.overlay?(i=e.createElement("input"),i.type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=s):i=this._createRadioElement("leaflet-base-layers",s),i.layerId=o.stamp(t.layer),o.DomEvent.on(i,"click",this._onInputClick,this);var r=e.createElement("span");r.innerHTML=" "+t.name;var a=e.createElement("div");n.appendChild(a),a.appendChild(i),a.appendChild(r);var h=t.overlay?this._overlaysList:this._baseLayersList;return h.appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,i,n=this._form.getElementsByTagName("input"),o=[],s=[];this._handlingClick=!0;for(var r=n.length-1;r>=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,i=this._map.hasLayer(e),t.checked&&!i?o.push(e):!t.checked&&i&&s.push(e);for(r=0;r<s.length;r++)this._map.removeLayer(s[r]);for(r=0;r<o.length;r++)this._map.addLayer(o[r]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,n=this._form.getElementsByTagName("input"),o=this._map.getZoom(),s=n.length-1;s>=0;s--)t=n[s],e=this._getLayer(t.layerId).layer,t.disabled=e.options.minZoom!==i&&o<e.options.minZoom||e.options.maxZoom!==i&&o>e.options.maxZoom},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),o.control.layers=function(t,e,i){return new o.Control.Layers(t,e,i)}}(window,document);
searx/static/themes/simple/less/autocomplete.lessnew file+67
@@ -0,0 +1,67 @@
1+@background_color: white;
2+
3+.autocomplete {
4+ position: absolute;
5+ max-height: 0;
6+ overflow-y: hidden;
7+ text-align: left;
8+
9+ &:active, &:focus, &:hover {
10+ background-color: @background_color;
11+ }
12+
13+ &:empty {
14+ display: none;
15+ }
16+
17+ > ul {
18+ list-style-type: none;
19+ margin: 0;
20+ padding: 0;
21+
22+ > li {
23+ cursor: pointer;
24+ padding: 5px 0 5px 10px;
25+
26+ &.active, &:active, &:focus {
27+ background-color: @color-base;
28+
29+ a:active, a:focus, a:hover {
30+ text-decoration: none;
31+ }
32+ }
33+
34+ &.locked {
35+ cursor: inherit;
36+ }
37+ }
38+ }
39+
40+ &.open {
41+ display: block;
42+ background-color: @background_color;
43+ border: 1px solid @color-base;
44+ max-height: 500px;
45+ overflow-y: auto;
46+ z-index:100;
47+
48+ &:empty {
49+ display: none;
50+ }
51+ }
52+}
53+
54+
55+@media screen and (max-width: @results-width) {
56+
57+ .autocomplete {
58+ bottom: 0;
59+ }
60+
61+ .autocomplete > ul > li {
62+ padding: 7px 0 7px 10px;
63+ border-bottom: 1px solid @color-result-top-border;
64+ text-align: left;
65+ }
66+
67+}
searx/static/themes/simple/less/code.lessnew file+83
@@ -0,0 +1,83 @@
1+.highlight .hll { background-color: #ffffcc }
2+.highlight { background: #f8f8f8; }
3+.highlight .c { color: #408080; font-style: italic } /* Comment */
4+.highlight .err { border: 1px solid #FF0000 } /* Error */
5+.highlight .k { color: #008000; font-weight: bold } /* Keyword */
6+.highlight .o { color: #666666 } /* Operator */
7+.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */
8+.highlight .cp { color: #BC7A00 } /* Comment.Preproc */
9+.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */
10+.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */
11+.highlight .gd { color: #A00000 } /* Generic.Deleted */
12+.highlight .ge { font-style: italic } /* Generic.Emph */
13+.highlight .gr { color: #FF0000 } /* Generic.Error */
14+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
15+.highlight .gi { color: #00A000 } /* Generic.Inserted */
16+.highlight .go { color: #888888 } /* Generic.Output */
17+.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
18+.highlight .gs { font-weight: bold } /* Generic.Strong */
19+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
20+.highlight .gt { color: #0044DD } /* Generic.Traceback */
21+.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
22+.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
23+.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
24+.highlight .kp { color: #008000 } /* Keyword.Pseudo */
25+.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
26+.highlight .kt { color: #B00040 } /* Keyword.Type */
27+.highlight .m { color: #666666 } /* Literal.Number */
28+.highlight .s { color: #BA2121 } /* Literal.String */
29+.highlight .na { color: #7D9029 } /* Name.Attribute */
30+.highlight .nb { color: #008000 } /* Name.Builtin */
31+.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
32+.highlight .no { color: #880000 } /* Name.Constant */
33+.highlight .nd { color: #AA22FF } /* Name.Decorator */
34+.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
35+.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
36+.highlight .nf { color: #0000FF } /* Name.Function */
37+.highlight .nl { color: #A0A000 } /* Name.Label */
38+.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
39+.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
40+.highlight .nv { color: #19177C } /* Name.Variable */
41+.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
42+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
43+.highlight .mf { color: #666666 } /* Literal.Number.Float */
44+.highlight .mh { color: #666666 } /* Literal.Number.Hex */
45+.highlight .mi { color: #666666 } /* Literal.Number.Integer */
46+.highlight .mo { color: #666666 } /* Literal.Number.Oct */
47+.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
48+.highlight .sc { color: #BA2121 } /* Literal.String.Char */
49+.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
50+.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
51+.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
52+.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
53+.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
54+.highlight .sx { color: #008000 } /* Literal.String.Other */
55+.highlight .sr { color: #BB6688 } /* Literal.String.Regex */
56+.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
57+.highlight .ss { color: #19177C } /* Literal.String.Symbol */
58+.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
59+.highlight .vc { color: #19177C } /* Name.Variable.Class */
60+.highlight .vg { color: #19177C } /* Name.Variable.Global */
61+.highlight .vi { color: #19177C } /* Name.Variable.Instance */
62+.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
63+
64+.highlight pre {
65+ overflow: auto;
66+}
67+
68+.highlight .lineno {
69+ -webkit-touch-callout: none;
70+ -webkit-user-select: none;
71+ -khtml-user-select: none;
72+ -moz-user-select: none;
73+ -ms-user-select: none;
74+ user-select: none;
75+ cursor: default;
76+
77+ &::selection {
78+ background: transparent; /* WebKit/Blink Browsers */
79+ }
80+ &::-moz-selection {
81+ background: transparent; /* Gecko Browsers */
82+ }
83+}
searx/static/themes/simple/less/definitions.lessnew file+135
@@ -0,0 +1,135 @@
1+/*
2+ * searx, A privacy-respecting, hackable metasearch engine
3+ *
4+ * To change the colors of the site, simple edit this variables
5+ */
6+
7+/// Basic Colors
8+
9+@color-base: #3498DB;
10+@color-base-dark: #084999;
11+@color-base-light: #ECF0F1;
12+@color-highlight: #094089;
13+@color-black: #000000;
14+
15+///
16+@color-error: #db3434;
17+@color-error-background: lighten(@color-error, 40%);
18+
19+@color-warning: #dbba34;
20+@color-warning-background: lighten(@color-warning, 40%);
21+
22+/// General
23+
24+@color-font: #444;
25+@color-font-light: #888;
26+
27+@color-red: #25a55b;
28+
29+@color-url-font: #29314d;
30+@color-url-visited-font: #684898;
31+@results-width: 50em;
32+@search-width: 40em;
33+
34+//
35+@color-a-font: @color-base;
36+@color-a-font-hover: @color-base;
37+
38+
39+/// Start-Screen
40+
41+
42+
43+/// Search-Input
44+
45+@color-search-border: @color-base;
46+@color-search-background: #FFF;
47+@color-search-font: #222;
48+
49+/// Autocompleter
50+
51+@color-autocompleter-choices-background: #FFF;
52+@color-autocompleter-choices-border: @color-base;
53+@color-autocompleter-choices-border-left-right: @color-base;
54+@color-autocompleter-choices-border-bottom: @color-base;
55+
56+@color-autocompleter-choices-font: #444;
57+
58+/// Answers
59+@color-answers-border: @color-base-dark;
60+
61+// Selected
62+@color-autocompleter-selected-background: #444;
63+@color-autocompleter-selected-font: #FFF;
64+@color-autocompleter-selected-queried-font: #9FCFFF;
65+
66+/// Categories
67+
68+@color-categories-item-selected: @color-base;
69+@color-categories-item-selected-font: #FFF;
70+
71+@color-categories-item-border-selected: @color-base-dark;
72+@color-categories-item-border-unselected: #E8E7E6;
73+@color-categories-item-border-unselected-hover: @color-base;
74+
75+
76+/// Results
77+
78+@color-suggestions-button-background: @color-base;
79+@color-suggestions-button-font: #FFF;
80+
81+@color-download-button-background: @color-base;
82+@color-download-button-font: #FFF;
83+
84+@color-result-search-background: @color-base-light;
85+
86+@color-result-definition-border: gray;
87+@color-result-torrent-border: lightgray;
88+@color-result-top-border: #E8E7E6;
89+
90+// Link to result
91+@color-result-link-font: @color-base-dark;
92+@color-result-link-visited-font: @color-url-visited-font;
93+
94+// Url to result
95+@color-result-url-font: @color-red;
96+
97+// Publish Date
98+@color-result-publishdate-font: @color-font-light;
99+
100+// Images
101+@color-result-image-span-background-hover: rgba(0, 0, 0, 0.6);
102+@color-result-image-span-font: #FFF;
103+
104+// Search-URL
105+@color-result-search-url-border: #888;
106+@color-result-search-url-font: #444;
107+
108+
109+/// Settings
110+
111+@color-settings-fieldset: @color-base;
112+@color-settings-table-striped: #dbdbdb;
113+@color-settings-tr-hover: #ececec;
114+
115+// Labels
116+@color-settings-label-allowed-background: #E74C3C;
117+@color-settings-label-allowed-font: #FFF;
118+
119+@color-settings-label-deny-background: #2ECC71;
120+@color-settings-label-deny-font: @color-font;
121+
122+@color-settings-return-background: @color-base;
123+@color-settings-return-font: #FFF;
124+
125+/// Other
126+
127+@color-engines-font: @color-font-light;
128+@color-percentage-div-background: #444;
129+
130+/// Load fonts from this directory.
131+@icon-font-path: "../../../fonts/";
132+//** File name for all font files.
133+@icon-font-name: "glyphicons-halflings-regular";
134+//** Element ID within SVG icon file.
135+@icon-font-svg-id: "glyphicons_halflingsregular";
searx/static/themes/simple/less/index.lessnew file+43
@@ -0,0 +1,43 @@
1+.index {
2+
3+ text-align: center;
4+
5+ .title {
6+ background: url('../img/searx.png') no-repeat;
7+ width: 100%;
8+ min-height: 80px;
9+ background-position: center;
10+ }
11+
12+ h1 {
13+ font-size: 5em;
14+ visibility: hidden;
15+ }
16+
17+ #search {
18+ margin: 0 auto;
19+ background: inherit;
20+ border: inherit;
21+ }
22+
23+ .search_filters {
24+ display: block;
25+ margin: 1em 0;
26+ }
27+
28+ .category label {
29+ padding: 6px 10px;
30+ border-bottom: initial !important;
31+ }
32+
33+}
34+
35+@media screen and (max-width: 75em) {
36+
37+ div.title {
38+ h1 {
39+ font-size: 1em;
40+ }
41+ }
42+
43+}
searx/static/themes/simple/less/ion.lessnew file+174
@@ -0,0 +1,174 @@
1+// Generated by grunt-webfont
2+
3+
4+@font-face {
5+ font-family:"ion";
6+ src:url("../fonts/ion.eot?94af7082ea096aefe3a7b6642834716e");
7+ src:url("../fonts/ion.eot?#iefix") format("embedded-opentype"),
8+ url("../fonts/ion.woff2?94af7082ea096aefe3a7b6642834716e") format("woff2"),
9+ url("../fonts/ion.woff?94af7082ea096aefe3a7b6642834716e") format("woff"),
10+ url("../fonts/ion.ttf?94af7082ea096aefe3a7b6642834716e") format("truetype"),
11+ url("../fonts/ion.svg?94af7082ea096aefe3a7b6642834716e#ion") format("svg");
12+ font-weight:normal;
13+ font-style:normal;
14+}
15+
16+.ion-icon {
17+ &:before {
18+ font-family:"ion";
19+ }
20+ display:inline-block;
21+ vertical-align:middle;
22+ line-height:1;
23+ font-weight:normal;
24+ font-style:normal;
25+ speak:none;
26+ text-decoration:inherit;
27+ text-transform:none;
28+ text-rendering:auto;
29+ -webkit-font-smoothing:antialiased;
30+ -moz-osx-font-smoothing:grayscale;
31+}
32+
33+
34+// Icons
35+
36+.ion-navicon-round {
37+ &:before {
38+ content:"\f101";
39+ }
40+}
41+
42+
43+.ion-search {
44+ &:before {
45+ content:"\f102";
46+ }
47+}
48+
49+
50+.ion-play {
51+ &:before {
52+ content:"\f103";
53+ }
54+}
55+
56+
57+.ion-link {
58+ &:before {
59+ content:"\f104";
60+ }
61+}
62+
63+
64+.ion-chevron-up {
65+ &:before {
66+ content:"\f105";
67+ }
68+}
69+
70+
71+.ion-chevron-left {
72+ &:before {
73+ content:"\f106";
74+ }
75+}
76+
77+
78+.ion-chevron-right {
79+ &:before {
80+ content:"\f107";
81+ }
82+}
83+
84+
85+.ion-arrow-down-a {
86+ &:before {
87+ content:"\f108";
88+ }
89+}
90+
91+
92+.ion-arrow-up-a {
93+ &:before {
94+ content:"\f109";
95+ }
96+}
97+
98+
99+.ion-arrow-swap {
100+ &:before {
101+ content:"\f10a";
102+ }
103+}
104+
105+
106+.ion-arrow-dropdown {
107+ &:before {
108+ content:"\f10b";
109+ }
110+}
111+
112+
113+.ion-globe {
114+ &:before {
115+ content:"\f10c";
116+ }
117+}
118+
119+
120+.ion-time {
121+ &:before {
122+ content:"\f10d";
123+ }
124+}
125+
126+
127+.ion-location {
128+ &:before {
129+ content:"\f10e";
130+ }
131+}
132+
133+
134+.ion-warning {
135+ &:before {
136+ content:"\f10f";
137+ }
138+}
139+
140+
141+.ion-error {
142+ &:before {
143+ content:"\f110";
144+ }
145+}
146+
147+
148+.ion-film-outline {
149+ &:before {
150+ content:"\f111";
151+ }
152+}
153+
154+
155+.ion-music-note {
156+ &:before {
157+ content:"\f112";
158+ }
159+}
160+
161+
162+.ion-more-vertical {
163+ &:before {
164+ content:"\f113";
165+ }
166+}
167+
168+
169+.ion-magnet {
170+ &:before {
171+ content:"\f114";
172+ }
173+}
174+
searx/static/themes/simple/less/mixins.lessnew file+62
@@ -0,0 +1,62 @@
1+/*
2+* searx, A privacy-respecting, hackable metasearch engine
3+*/
4+
5+// Mixins
6+.text-size-adjust (@property: 100%) {
7+ -webkit-text-size-adjust: @property;
8+ -ms-text-size-adjust: @property;
9+ -moz-text-size-adjust: @property;
10+ text-size-adjust: @property;
11+}
12+
13+.rounded-corners (@radius: 4px) {
14+ -webkit-border-radius: @radius;
15+ -moz-border-radius: @radius;
16+ border-radius: @radius;
17+}
18+
19+// disable user selection
20+.disable-user-select () {
21+ -webkit-touch-callout: none;
22+ -webkit-user-select: none;
23+ -khtml-user-select: none;
24+ -moz-user-select: none;
25+ -ms-user-select: none;
26+ user-select: none;
27+}
28+
29+// select all on focus
30+.select-all-on-focus() {
31+ -webkit-user-select: all;
32+ -moz-user-select: all;
33+ -ms-user-select: all;
34+ user-select: all;
35+}
36+
37+// see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Advanced_layouts_with_flexbox
38+.flexbox() {
39+ display: -webkit-box;
40+ display: -moz-box;
41+ display: -webkit-flex;
42+ display: -ms-flexbox;
43+ display: flex;
44+}
45+
46+.inline-flex() {
47+ display: -webkit-inline-box;
48+ display: -moz-inline-box;
49+ display: -webkit-inline-flex;
50+ display: -ms-inline-flexbox;
51+ display: inline-flex;
52+}
53+
54+.flex-direction-row() {
55+ -webkit-box-direction: normal;
56+ -webkit-box-orient: horizontal;
57+ -moz-box-direction: normal;
58+ -moz-box-orient: horizontal;
59+ -webkit-flex-direction: row;
60+ -ms-flex-direction: row;
61+ flex-direction: row;
62+}
searx/static/themes/simple/less/normalize.lessnew file+447
@@ -0,0 +1,447 @@
1+/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
2+
3+/* Document
4+ ========================================================================== */
5+
6+/**
7+ * 1. Correct the line height in all browsers.
8+ * 2. Prevent adjustments of font size after orientation changes in
9+ * IE on Windows Phone and in iOS.
10+ */
11+
12+html {
13+ line-height: 1.15; /* 1 */
14+ -ms-text-size-adjust: 100%; /* 2 */
15+ -webkit-text-size-adjust: 100%; /* 2 */
16+}
17+
18+/* Sections
19+ ========================================================================== */
20+
21+/**
22+ * Remove the margin in all browsers (opinionated).
23+ */
24+
25+body {
26+ margin: 0;
27+}
28+
29+/**
30+ * Add the correct display in IE 9-.
31+ */
32+
33+article,
34+aside,
35+footer,
36+header,
37+nav,
38+section {
39+ display: block;
40+}
41+
42+/**
43+ * Correct the font size and margin on `h1` elements within `section` and
44+ * `article` contexts in Chrome, Firefox, and Safari.
45+ */
46+
47+h1 {
48+ font-size: 2em;
49+ margin: 0.67em 0;
50+}
51+
52+/* Grouping content
53+ ========================================================================== */
54+
55+/**
56+ * Add the correct display in IE 9-.
57+ * 1. Add the correct display in IE.
58+ */
59+
60+figcaption,
61+figure,
62+main { /* 1 */
63+ display: block;
64+}
65+
66+/**
67+ * Add the correct margin in IE 8.
68+ */
69+
70+figure {
71+ margin: 1em 40px;
72+}
73+
74+/**
75+ * 1. Add the correct box sizing in Firefox.
76+ * 2. Show the overflow in Edge and IE.
77+ */
78+
79+hr {
80+ box-sizing: content-box; /* 1 */
81+ height: 0; /* 1 */
82+ overflow: visible; /* 2 */
83+}
84+
85+/**
86+ * 1. Correct the inheritance and scaling of font size in all browsers.
87+ * 2. Correct the odd `em` font sizing in all browsers.
88+ */
89+
90+pre {
91+ font-family: monospace, monospace; /* 1 */
92+ font-size: 1em; /* 2 */
93+}
94+
95+/* Text-level semantics
96+ ========================================================================== */
97+
98+/**
99+ * 1. Remove the gray background on active links in IE 10.
100+ * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
101+ */
102+
103+a {
104+ background-color: transparent; /* 1 */
105+ -webkit-text-decoration-skip: objects; /* 2 */
106+}
107+
108+/**
109+ * 1. Remove the bottom border in Chrome 57- and Firefox 39-.
110+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
111+ */
112+
113+abbr[title] {
114+ border-bottom: none; /* 1 */
115+ text-decoration: underline; /* 2 */
116+ text-decoration: underline dotted; /* 2 */
117+}
118+
119+/**
120+ * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
121+ */
122+
123+b,
124+strong {
125+ font-weight: inherit;
126+}
127+
128+/**
129+ * Add the correct font weight in Chrome, Edge, and Safari.
130+ */
131+
132+b,
133+strong {
134+ font-weight: bolder;
135+}
136+
137+/**
138+ * 1. Correct the inheritance and scaling of font size in all browsers.
139+ * 2. Correct the odd `em` font sizing in all browsers.
140+ */
141+
142+code,
143+kbd,
144+samp {
145+ font-family: monospace, monospace; /* 1 */
146+ font-size: 1em; /* 2 */
147+}
148+
149+/**
150+ * Add the correct font style in Android 4.3-.
151+ */
152+
153+dfn {
154+ font-style: italic;
155+}
156+
157+/**
158+ * Add the correct background and color in IE 9-.
159+ */
160+
161+mark {
162+ background-color: #ff0;
163+ color: #000;
164+}
165+
166+/**
167+ * Add the correct font size in all browsers.
168+ */
169+
170+small {
171+ font-size: 80%;
172+}
173+
174+/**
175+ * Prevent `sub` and `sup` elements from affecting the line height in
176+ * all browsers.
177+ */
178+
179+sub,
180+sup {
181+ font-size: 75%;
182+ line-height: 0;
183+ position: relative;
184+ vertical-align: baseline;
185+}
186+
187+sub {
188+ bottom: -0.25em;
189+}
190+
191+sup {
192+ top: -0.5em;
193+}
194+
195+/* Embedded content
196+ ========================================================================== */
197+
198+/**
199+ * Add the correct display in IE 9-.
200+ */
201+
202+audio,
203+video {
204+ display: inline-block;
205+}
206+
207+/**
208+ * Add the correct display in iOS 4-7.
209+ */
210+
211+audio:not([controls]) {
212+ display: none;
213+ height: 0;
214+}
215+
216+/**
217+ * Remove the border on images inside links in IE 10-.
218+ */
219+
220+img {
221+ border-style: none;
222+}
223+
224+/**
225+ * Hide the overflow in IE.
226+ */
227+
228+svg:not(:root) {
229+ overflow: hidden;
230+}
231+
232+/* Forms
233+ ========================================================================== */
234+
235+/**
236+ * 1. Change the font styles in all browsers (opinionated).
237+ * 2. Remove the margin in Firefox and Safari.
238+ */
239+
240+button,
241+input,
242+optgroup,
243+select,
244+textarea {
245+ font-family: sans-serif; /* 1 */
246+ font-size: 100%; /* 1 */
247+ line-height: 1.15; /* 1 */
248+ margin: 0; /* 2 */
249+}
250+
251+/**
252+ * Show the overflow in IE.
253+ * 1. Show the overflow in Edge.
254+ */
255+
256+button,
257+input { /* 1 */
258+ overflow: visible;
259+}
260+
261+/**
262+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
263+ * 1. Remove the inheritance of text transform in Firefox.
264+ */
265+
266+button,
267+select { /* 1 */
268+ text-transform: none;
269+}
270+
271+/**
272+ * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
273+ * controls in Android 4.
274+ * 2. Correct the inability to style clickable types in iOS and Safari.
275+ */
276+
277+button,
278+html [type="button"], /* 1 */
279+[type="reset"],
280+[type="submit"] {
281+ -webkit-appearance: button; /* 2 */
282+}
283+
284+/**
285+ * Remove the inner border and padding in Firefox.
286+ */
287+
288+button::-moz-focus-inner,
289+[type="button"]::-moz-focus-inner,
290+[type="reset"]::-moz-focus-inner,
291+[type="submit"]::-moz-focus-inner {
292+ border-style: none;
293+ padding: 0;
294+}
295+
296+/**
297+ * Restore the focus styles unset by the previous rule.
298+ */
299+
300+button:-moz-focusring,
301+[type="button"]:-moz-focusring,
302+[type="reset"]:-moz-focusring,
303+[type="submit"]:-moz-focusring {
304+ outline: 1px dotted ButtonText;
305+}
306+
307+/**
308+ * Correct the padding in Firefox.
309+ */
310+
311+fieldset {
312+ padding: 0.35em 0.75em 0.625em;
313+}
314+
315+/**
316+ * 1. Correct the text wrapping in Edge and IE.
317+ * 2. Correct the color inheritance from `fieldset` elements in IE.
318+ * 3. Remove the padding so developers are not caught out when they zero out
319+ * `fieldset` elements in all browsers.
320+ */
321+
322+legend {
323+ box-sizing: border-box; /* 1 */
324+ color: inherit; /* 2 */
325+ display: table; /* 1 */
326+ max-width: 100%; /* 1 */
327+ padding: 0; /* 3 */
328+ white-space: normal; /* 1 */
329+}
330+
331+/**
332+ * 1. Add the correct display in IE 9-.
333+ * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
334+ */
335+
336+progress {
337+ display: inline-block; /* 1 */
338+ vertical-align: baseline; /* 2 */
339+}
340+
341+/**
342+ * Remove the default vertical scrollbar in IE.
343+ */
344+
345+textarea {
346+ overflow: auto;
347+}
348+
349+/**
350+ * 1. Add the correct box sizing in IE 10-.
351+ * 2. Remove the padding in IE 10-.
352+ */
353+
354+[type="checkbox"],
355+[type="radio"] {
356+ box-sizing: border-box; /* 1 */
357+ padding: 0; /* 2 */
358+}
359+
360+/**
361+ * Correct the cursor style of increment and decrement buttons in Chrome.
362+ */
363+
364+[type="number"]::-webkit-inner-spin-button,
365+[type="number"]::-webkit-outer-spin-button {
366+ height: auto;
367+}
368+
369+/**
370+ * 1. Correct the odd appearance in Chrome and Safari.
371+ * 2. Correct the outline style in Safari.
372+ */
373+
374+[type="search"] {
375+ -webkit-appearance: textfield; /* 1 */
376+ outline-offset: -2px; /* 2 */
377+}
378+
379+/**
380+ * Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
381+ */
382+
383+[type="search"]::-webkit-search-cancel-button,
384+[type="search"]::-webkit-search-decoration {
385+ -webkit-appearance: none;
386+}
387+
388+/**
389+ * 1. Correct the inability to style clickable types in iOS and Safari.
390+ * 2. Change font properties to `inherit` in Safari.
391+ */
392+
393+::-webkit-file-upload-button {
394+ -webkit-appearance: button; /* 1 */
395+ font: inherit; /* 2 */
396+}
397+
398+/* Interactive
399+ ========================================================================== */
400+
401+/*
402+ * Add the correct display in IE 9-.
403+ * 1. Add the correct display in Edge, IE, and Firefox.
404+ */
405+
406+details, /* 1 */
407+menu {
408+ display: block;
409+}
410+
411+/*
412+ * Add the correct display in all browsers.
413+ */
414+
415+summary {
416+ display: list-item;
417+}
418+
419+/* Scripting
420+ ========================================================================== */
421+
422+/**
423+ * Add the correct display in IE 9-.
424+ */
425+
426+canvas {
427+ display: inline-block;
428+}
429+
430+/**
431+ * Add the correct display in IE.
432+ */
433+
434+template {
435+ display: none;
436+}
437+
438+/* Hidden
439+ ========================================================================== */
440+
441+/**
442+ * Add the correct display in IE 10-.
443+ */
444+
445+[hidden] {
446+ display: none;
447+}
searx/static/themes/simple/less/preferences.lessnew file+78
@@ -0,0 +1,78 @@
1+#main_preferences {
2+ form {
3+ width: 100%;
4+ }
5+
6+ fieldset {
7+ margin: 8px;
8+ border: none;
9+ }
10+
11+ legend {
12+ margin: 0;
13+ padding: 5px 0 0 0;
14+ display: block;
15+ float:left;
16+ width: 300px;
17+ }
18+
19+ .value {
20+ margin: 0;
21+ padding: 0;
22+ float:left;
23+ width: 15em;
24+ }
25+
26+ .description {
27+ margin: 0;
28+ padding: 5px 0 0 0;
29+ float:left;
30+ width: 50%;
31+ color: darken(#dcdcdc, 30%);
32+ font-size: 90%;
33+ }
34+
35+ select {
36+ width: 200px;
37+ font-size: inherit !important;
38+ }
39+
40+ table {
41+ border-collapse: collapse;
42+ }
43+
44+ table td {
45+ text-align: center;
46+ }
47+
48+ .name, .shortcut {
49+ text-align: left;
50+ }
51+
52+ .preferences_back {
53+ background: none repeat scroll 0 0 @color-settings-return-background;
54+ color: white;
55+ border: 0 none;
56+ .rounded-corners;
57+ cursor: pointer;
58+ display: inline-block;
59+ margin: 2px 4px;
60+ padding: 0.5em;
61+
62+ a {
63+ display: block;
64+ color: @color-settings-return-font;
65+ }
66+
67+ a::first-letter {
68+ text-transform: uppercase;
69+ }
70+ }
71+
72+}
73+
74+@media screen and (max-width: 75em) {
75+ .preferences_back {
76+ clear: both;
77+ }
78+}
searx/static/themes/simple/less/search.lessnew file+232
@@ -0,0 +1,232 @@
1+/*
2+* searx, A privacy-respecting, hackable metasearch engine
3+*/
4+
5+#search {
6+ padding: 0 2em;
7+ margin: 0;
8+ background: #f7f7f7;
9+ border-bottom: 1px solid #d7d7d7;
10+}
11+
12+#search_wrapper {
13+ padding: 10px 0;
14+}
15+
16+.search_box {
17+ margin: 0 12px 0 0;
18+ display: inline-flex;
19+ flex-direction: row;
20+
21+ white-space: nowrap;
22+ /*
23+ &:has(q:focus) {
24+ box-shadow: 0px 0px 5px #CCC;
25+}
26+*/
27+}
28+
29+#q, #send_search {
30+ display: block !important;
31+ border-collapse: separate;
32+ box-sizing: border-box;
33+ position: relative;
34+
35+ margin: 0;
36+ padding: 2px;
37+ height: 2.2em;
38+ background: none repeat scroll 0 0 @color-search-background;
39+ border: 1px solid @color-search-border;
40+ border-radius: 0px;
41+ outline: none;
42+ color: @color-search-font;
43+ font-size: 16px;
44+ z-index: 2;
45+}
46+
47+#q {
48+ outline: medium none;
49+ padding-left: 8px;
50+ padding-right: 0px !important;
51+ border-right: none;
52+ width: @search-width;
53+}
54+
55+#send_search {
56+ border-left: none;
57+ width: 2.2em;
58+
59+ &:hover {
60+ cursor: pointer;
61+ background-color: @color-search-border;
62+ color: @color-base-light;
63+ }
64+}
65+
66+.no-js #send_search {
67+ width: auto !important;
68+}
69+
70+.search_filters {
71+ display: inline-block;
72+ vertical-align: middle;
73+}
74+
75+@media screen and (max-width: 75em) {
76+
77+ #categories {
78+ font-size: 90%;
79+ clear: both;
80+
81+ .checkbox_container {
82+ margin-top: 2px;
83+ margin: auto;
84+ }
85+ }
86+
87+ html.touch {
88+ #main_index, #main_results {
89+
90+ #categories_container {
91+ width: 1000px;
92+ width: -moz-max-content;
93+ width: -webkit-max-content;
94+ width: max-content;
95+
96+ .category {
97+ display: inline-block;
98+ width: auto;
99+ }
100+ }
101+
102+ #categories {
103+ width: 100%;
104+ margin: 0;
105+ text-align: left;
106+ overflow-x: scroll;
107+ overflow-y: hidden;
108+ -webkit-overflow-scrolling: touch;
109+ }
110+ }
111+ }
112+
113+}
114+
115+@media screen and (max-width: @results-width) {
116+
117+ #search {
118+ width: 100%;
119+ margin: 0;
120+ padding: 0.1em 0 0 0;
121+ }
122+
123+ #search_wrapper {
124+ width: 100%;
125+ margin: 0 0 0.7em 0;
126+ padding: 0;
127+ }
128+
129+ .search_box {
130+ // hack, should bew 100% ?
131+ width: 99%;
132+ margin: 0.1em;
133+ padding: 0 0.1em 0 0;
134+ display: flex;
135+ flex-direction: row;
136+ }
137+
138+ #q {
139+ width: auto !important;
140+ flex: 1;
141+ }
142+
143+ .search_filters {
144+ display: block;
145+ margin: 0.5em;
146+ }
147+
148+ .language, .time_range {
149+ width: 45%;
150+ }
151+
152+ .category {
153+ display: block;
154+ width: 90%;
155+
156+ label {
157+ border-bottom: 0;
158+ }
159+ }
160+
161+}
162+
163+#categories {
164+ margin: 0 10px 0 0;
165+ .disable-user-select;
166+
167+ &::-webkit-scrollbar {
168+ width: 0;
169+ height: 0;
170+ }
171+}
172+
173+.category {
174+ display: inline-block;
175+ position: relative;
176+ margin: 0 3px;
177+ padding: 0px;
178+
179+ input {
180+ display: none;
181+ }
182+
183+ label {
184+ cursor: pointer;
185+ padding: 4px 10px;
186+ margin: 0;
187+ display: block;
188+ text-transform: capitalize;
189+ font-size: 0.9em;
190+ border-bottom: 2px solid transparent;
191+ .disable-user-select;
192+ }
193+
194+ input[type="checkbox"]:focus + label {
195+ box-shadow: 0px 0px 8px #3498DB;
196+ }
197+
198+ /*label:hover {
199+ border-bottom: 2px solid @color-categories-item-border-unselected-hover;
200+ }*/
201+
202+ input[type="checkbox"]:checked + label {
203+ background: @color-categories-item-selected;
204+ color: @color-categories-item-selected-font;
205+ border-bottom: 2px solid @color-categories-item-border-selected;
206+ }
207+}
208+
209+#categories_container {
210+
211+ position: relative;
212+
213+ .help {
214+ position: absolute;
215+ width: 100%;
216+ bottom: -20px;
217+ overflow: hidden;
218+
219+ opacity: 0;
220+ transition: opacity 1s ease;
221+
222+ font-size: 0.8em;
223+ text-position: center;
224+ background: white;
225+ }
226+
227+ &:hover .help {
228+ opacity: 0.8;
229+ transition: opacity 1s ease;
230+ }
231+
232+}
searx/static/themes/simple/less/stats.lessnew file+8
@@ -0,0 +1,8 @@
1+.percentage {
2+ position: relative;
3+ width: 300px;
4+
5+ div {
6+ background: @color-percentage-div-background;
7+ }
8+}
searx/static/themes/simple/less/style-rtl.lessnew file+6
@@ -0,0 +1,6 @@
1+@import "style.less";
2+
3+#search_submit {
4+ left: 1px;
5+ right:auto;
6+}
searx/static/themes/simple/less/style.lessnew file+709
@@ -0,0 +1,709 @@
1+/*
2+* searx, A privacy-respecting, hackable metasearch engine
3+*
4+* To convert "style.less" to "style.css" run: $make styles
5+*/
6+
7+@import "normalize.less";
8+
9+@import "definitions.less";
10+
11+@import "mixins.less";
12+
13+@import "code.less";
14+
15+@import "toolkit.less";
16+
17+@import "autocomplete.less";
18+
19+// ion-icon
20+@import "ion.less";
21+
22+.ion-icon-big {
23+ .ion-icon;
24+ font-size: 149%;
25+}
26+
27+// for index.html template
28+@import "index.less";
29+
30+// for preferences.html template
31+@import "preferences.less";
32+
33+// Search-Field
34+@import "search.less";
35+
36+// Main LESS-Code
37+html {
38+ font-family: arial, sans-serif;
39+ font-size: 0.9em;
40+ .text-size-adjust;
41+ color: @color-font;
42+ padding: 0;
43+ margin: 0;
44+}
45+
46+body, main {
47+ padding: 0;
48+ margin: 0;
49+}
50+
51+main {
52+ width: 100%;
53+ // position: absolute;
54+}
55+
56+footer {
57+ // position:absolute;
58+ bottom:0;
59+ width:100%;
60+ height:50px;
61+}
62+
63+#main_preferences, #main_about, #main_stats {
64+ margin: 3em;
65+ width: auto;
66+}
67+
68+footer {
69+ bottom: 0;
70+ height: 3em;
71+ margin: 1em 0;
72+ padding: 1em 0;
73+ clear: both;
74+ width: 100%;
75+ text-align: center;
76+
77+ p {
78+ font-size: 0.9em;
79+ }
80+}
81+
82+#main_preferences h1, #main_stats h1 {
83+ background: url('../img/searx.png') no-repeat;
84+ background-size: auto 75%;
85+ min-height: 40px;
86+ margin: 0 auto;
87+
88+ span {
89+ visibility: hidden;
90+ }
91+}
92+
93+input[type="submit"], #results button[type="submit"] {
94+ padding: 0.5rem;
95+ margin: 2px 4px;
96+ display: inline-block;
97+ background: @color-download-button-background;
98+ color: @color-download-button-font;
99+ .rounded-corners;
100+ border: 0;
101+ cursor: pointer;
102+}
103+
104+a {
105+ text-decoration: none;
106+ color: @color-url-font;
107+
108+ &:visited {
109+ color: @color-url-visited-font;
110+
111+ .highlight {
112+ color: @color-url-visited-font;
113+ }
114+ }
115+}
116+
117+article[data-vim-selected] {
118+ background: #f7f7f7;
119+}
120+
121+article[data-vim-selected]::before {
122+ position: absolute;
123+ left: 1em;
124+ padding: 2px;
125+ content: ">";
126+ font-weight: bold;
127+ color: @color-base;
128+}
129+
130+article.result-images[data-vim-selected] {
131+ background: @color-base;
132+}
133+
134+article.result-images[data-vim-selected]::before {
135+ display: none;
136+ content: "";
137+}
138+
139+.result {
140+ margin: 19px 0 18px 0;
141+ padding: 0;
142+
143+ h3 {
144+ font-size: 1.1em;
145+ word-wrap:break-word;
146+ margin: 5px 0 1px 0;
147+ padding: 0;
148+ margin-bottom: 0;
149+
150+ a {
151+ color: @color-result-link-font;
152+ font-weight: normal;
153+ font-size: 1.1em;
154+
155+ &:visited {
156+ color: @color-result-link-visited-font;
157+ }
158+
159+ &:focus, &:hover {
160+ text-decoration: underline;
161+ border: none;
162+ -webkit-box-shadow: none;
163+ box-shadow: none;
164+ outline:none;
165+ }
166+ }
167+ }
168+
169+ .cache_link, .proxyfied_link {
170+ font-size: 0.9em !important;
171+ }
172+
173+ .content, .stat, .altlink {
174+ font-size: 0.9em;
175+ margin: 0;
176+ padding: 0;
177+ max-width: 54em;
178+ word-wrap:break-word;
179+ line-height: 1.24;
180+
181+ .highlight {
182+ color: @color-black;
183+ background: inherit;
184+ font-weight: bold;
185+ }
186+ }
187+
188+ .codelines {
189+ .highlight {
190+ color: inherit;
191+ background: inherit;
192+ font-weight: normal;
193+ }
194+ }
195+
196+ .url {
197+ font-size: 0.9em;
198+ margin: 0 0 3px 0;
199+ padding: 0;
200+ max-width: 54em;
201+ word-wrap:break-word;
202+ color: @color-result-url-font;
203+ }
204+
205+ .published_date {
206+ font-size: 0.8em;
207+ color: @color-result-publishdate-font;
208+ }
209+
210+ img {
211+
212+ &.thumbnail {
213+ float: left;
214+ padding: 0 5px 10px 0;
215+ width: 20em;
216+ min-width: 20em;
217+ min-height: 8em;
218+ // background: @color-base-light;
219+ }
220+
221+ &.image {
222+ float: left;
223+ padding: 0 5px 10px 0;
224+ width: 100px;
225+ max-height: 100px;
226+ object-fit: scale-down;
227+ object-position: right top;
228+ }
229+
230+ }
231+
232+ .break {
233+ clear: both;
234+ }
235+
236+}
237+
238+.category-social .image {
239+ width: auto !important;
240+ min-width: 48px;
241+ min-height: 48px;
242+ padding: 0 5px 25px 0 !important;
243+}
244+
245+.result-videos .content {
246+ overflow: hidden;
247+}
248+
249+.engines {
250+ float: right;
251+ color: @color-engines-font;
252+
253+ span {
254+ font-size: smaller;
255+ margin: 0 0.5em 0 0;
256+ }
257+}
258+
259+.small_font {
260+ font-size: 0.8em;
261+}
262+
263+.highlight {
264+ color: @color-highlight;
265+ background: inherit;
266+ font-weight: bold;
267+}
268+
269+.result-images {
270+ display: inline-block;
271+ margin: 0;
272+ padding: 0;
273+ position: relative;
274+ max-height: 200px;
275+
276+ img {
277+ float: inherit;
278+ margin: 0;
279+ padding: 0;
280+ border: none;
281+ max-height: 200px;
282+ background: @color-base-dark;
283+ }
284+
285+ span a {
286+ display: none;
287+ color: @color-result-image-span-font;
288+ }
289+
290+ &:hover span a {
291+ display: block;
292+ position: absolute;
293+ bottom: 0;
294+ right: 0;
295+ padding: 4px;
296+ margin: 0 0 4px 4px;
297+ background-color: @color-result-image-span-background-hover;
298+ font-size: 0.7em;
299+ }
300+}
301+
302+.torrent_result {
303+ border-left: 10px solid @color-result-torrent-border;
304+ padding-left: 3px;
305+
306+ p {
307+ margin: 3px;
308+ font-size: 0.8em;
309+ }
310+
311+ a {
312+ color: @color-result-link-font;
313+
314+ &:hover {
315+ text-decoration: underline;
316+ }
317+
318+ &:visited {
319+ color: @color-result-link-visited-font;
320+ }
321+ }
322+}
323+
324+#results {
325+ margin: 2em 2em 20px 2em;
326+ padding: 0;
327+ width: @results-width;
328+}
329+
330+#suggestions {
331+
332+ .wrapper {
333+ display: flex;
334+ flex-flow: row wrap;
335+ justify-content: flex-end;
336+
337+ form {
338+ display: inline-block;
339+ flex: 1 1 50%;
340+ }
341+ }
342+}
343+
344+#suggestions, #answers, #corrections {
345+ max-width: @results-width;
346+}
347+
348+#suggestions, #answers, #infoboxes, #corrections {
349+
350+ input {
351+ padding: 0;
352+ margin: 3px;
353+ font-size: 0.9em;
354+ display: inline-block;
355+ background: transparent;
356+ color: @color-result-search-url-font;
357+ cursor: pointer;
358+ }
359+
360+ input[type="submit"], .infobox .url a {
361+ color: @color-result-link-font;
362+ text-decoration: none;
363+ font-size: 0.9rem;
364+
365+ &:hover {
366+ text-decoration: underline;
367+ }
368+ }
369+
370+}
371+
372+#corrections {
373+ display: flex;
374+ flex-flow: row wrap;
375+ margin: 1em 0;
376+
377+ h4, input[type="submit"] {
378+ display: inline-block;
379+ margin: 0 0.5em 0 0;
380+ }
381+
382+ input[type="submit"]::after {
383+ content: ", "
384+ }
385+
386+}
387+
388+#suggestions .title, #search_url .title, #apis .title {
389+ margin: 2em 0 0.5em 0;
390+ color: @color-font;
391+}
392+
393+#answers {
394+ margin: 10px 8px 10px 8px;
395+ border: 1px solid #ddd;
396+ padding: 0.9em;
397+ box-shadow: 0px 0px 5px #CCC;
398+
399+ h4 {
400+ display: none;
401+ }
402+
403+ .answer {
404+ display: block;
405+ font-size: 1.2em;
406+ font-weight: bold;
407+ }
408+}
409+
410+#answers, #infoboxes {
411+ form {
412+ min-width: 210px;
413+ }
414+}
415+
416+#sidebar {
417+ position: absolute;
418+ top: 100px;
419+ left: 57em;
420+
421+ margin: 0px 2px 5px 5px;
422+ padding: 0px 2px 2px;
423+ max-width: 25em;
424+ word-wrap: break-word;
425+
426+ .infobox {
427+ margin: 10px 0 10px;
428+ border: 1px solid #ddd;
429+ padding: 0.9em;
430+ font-size: 0.9em;
431+ box-shadow: 0px 0px 5px #CCC;
432+
433+ h2 {
434+ margin: 0 0 .5em 0;
435+ }
436+
437+ img {
438+ max-width: 100%;
439+ max-height: 12em;
440+ display: block;
441+ margin: 0;
442+ padding: 0;
443+ }
444+
445+ dl {
446+ margin: 0.5em 0;
447+ }
448+
449+ dt {
450+ display: inline;
451+ margin: 0.5em 0.25em 0.5em 0;
452+ padding: 0;
453+ font-weight: bold;
454+ }
455+
456+ dd {
457+ display: inline;
458+ margin: 0.5em 0;
459+ padding: 0;
460+ }
461+
462+ input {
463+ font-size: 1em;
464+ }
465+
466+ br {
467+ clear: both;
468+ }
469+
470+ .attributes, .urls {
471+ clear: both;
472+ }
473+
474+ }
475+}
476+
477+#search_url {
478+ margin-top: 8px;
479+
480+ div {
481+ display: block;
482+ border: 1px solid @color-result-search-url-border;
483+ padding: 4px;
484+ color: @color-result-search-url-font;
485+ width: 100%;
486+ display: block;
487+ margin: 0.1em;
488+ overflow: hidden;
489+ height: 1.2em;
490+ line-height: 1.2em;
491+
492+ pre {
493+ display: block;
494+ width: 200em;
495+ font-size: 0.8em;
496+ word-break: break-all;
497+ margin: 0.1em;
498+ .select-all-on-focus();
499+ }
500+ }
501+}
502+
503+#linkto_preferences {
504+ position: absolute;
505+ right: 10px;
506+ top: 0.9em;
507+ padding: 0;
508+ border: 0;
509+ display: block;
510+
511+ font-size: 1.2em;
512+ color: @color-search-font;
513+
514+ a:link *, a:hover *, a:visited *, a:active * {
515+ color: @color-search-font;
516+ }
517+}
518+
519+#pagination {
520+ clear: both;
521+
522+ br {
523+ clear: both;
524+ }
525+}
526+
527+#apis {
528+ margin-top: 8px;
529+ clear: both;
530+}
531+
532+#backToTop {
533+ border: 1px solid #ddd;
534+ margin: 0 0 0 2em;
535+ padding: 0;
536+ font-size: 1em;
537+ box-shadow: 0px 0px 5px #CCC;
538+ background: white;
539+ position: fixed;
540+ bottom: 85px;
541+ left: @results-width;
542+ transition: opacity 0.5s;
543+ opacity: 0;
544+
545+ a {
546+ display: block;
547+ margin: 0;
548+ padding: 0.6em;
549+ }
550+}
551+
552+@media screen and (max-width: 75em) {
553+
554+ #main_preferences, #main_about, #main_stats {
555+ margin: 0.5em;
556+ width: auto;
557+ }
558+
559+ #suggestions, #answers {
560+ margin-top: 1em;
561+ }
562+
563+ #infoboxes {
564+ position: inherit;
565+ max-width: inherit;
566+
567+ .infobox {
568+ clear:both;
569+
570+ img {
571+ float: left;
572+ max-width: 10em;
573+ margin: 0.5em 0.5em 0.5em 0;
574+ }
575+ }
576+
577+ }
578+
579+ #sidebar {
580+ position: static;
581+ max-width: @results-width;
582+ margin: 0 0 2px 0;
583+ padding: 0;
584+ float: none;
585+ border: none;
586+ width: auto;
587+
588+ input {
589+ border: 0;
590+ }
591+ }
592+
593+ #apis {
594+ display: none;
595+ }
596+
597+ #search_url {
598+ display: none;
599+ }
600+
601+ .result {
602+ border-bottom: 1px solid @color-result-top-border;
603+ margin: 0;
604+ padding-top: 8px;
605+ padding-bottom: 6px;
606+
607+ h3 {
608+ margin: 0 0 1px 0;
609+ }
610+
611+ .thumbnail {
612+ max-width: 98%;
613+ }
614+
615+ .url {
616+
617+ span.url {
618+ display: block;
619+ white-space: nowrap;
620+ text-overflow: ellipsis;
621+ overflow: hidden;
622+ width: 100%;
623+ }
624+
625+ a {
626+ float: right;
627+ padding: 0 0.5em;
628+ }
629+
630+ }
631+
632+ .engines {
633+ float: right;
634+ padding: 0 0 3px 0;
635+ }
636+ }
637+
638+ .result-images {
639+ border-bottom: none !important;
640+ }
641+
642+ .image_result {
643+ max-width: 98%;
644+ img {
645+ max-width: 98%;
646+ }
647+ }
648+}
649+
650+
651+@media screen and (max-width: @results-width) {
652+
653+ article[data-vim-selected]::before {
654+ display: none;
655+ content: "";
656+ }
657+
658+ #linkto_preferences {
659+ display: none;
660+ postion: fixed !important;
661+ top: 100px;
662+ right: 0px;
663+ }
664+
665+ #sidebar {
666+ margin: 0 5px 2px 5px;
667+ }
668+
669+ #corrections {
670+ margin: 1em 5px 1em 5px;
671+ }
672+
673+ #results {
674+ margin: 0;
675+ padding: 0;
676+ width: initial;
677+ }
678+
679+ #backToTop {
680+ left: 40em;
681+ bottom: 35px;
682+ }
683+
684+ .result {
685+ padding: 8px 10px 6px 10px;
686+ }
687+
688+ .result-images {
689+ margin: 0;
690+ padding: 0;
691+ border: none;
692+ }
693+
694+}
695+
696+@media screen and (max-width: 35em) {
697+
698+ .result-videos {
699+
700+ img.thumbnail {
701+ float: none !important;
702+ }
703+ .content {
704+ overflow: inherit;
705+ }
706+
707+ }
708+
709+}
searx/static/themes/simple/less/toolkit.lessnew file+346
@@ -0,0 +1,346 @@
1+// other solution : http://stackoverflow.com/questions/1577598/how-to-hide-parts-of-html-when-javascript-is-disabled/13857783#13857783
2+html.no-js .hide_if_nojs {
3+ display: none;
4+}
5+
6+html.js .show_if_nojs {
7+ display: none;
8+}
9+
10+.center {
11+ text-align: center;
12+}
13+
14+.right {
15+ float: right ;
16+}
17+
18+.left {
19+ float: left;
20+}
21+
22+.invisible {
23+ display: none;
24+}
25+
26+.danger {
27+ background-color: @color-error-background;
28+}
29+
30+.badge {
31+ display: inline-block;
32+ color: #fff;
33+ background-color: #777;
34+ text-align: center;
35+ white-space: nowrap;
36+ vertical-align: baseline;
37+ min-width: 10px;
38+ padding: 1px 5px;
39+ border-radius: 5px;
40+}
41+
42+// table
43+table {
44+
45+ width: 100%;
46+
47+ &.striped {
48+ tr {
49+ border-bottom: 1px solid @color-settings-tr-hover;
50+ }
51+ }
52+}
53+
54+th {
55+ padding: 0.4em;
56+}
57+
58+td {
59+ padding: 0 4px;
60+}
61+
62+tr {
63+ &:hover {
64+ background: @color-settings-tr-hover;
65+ }
66+}
67+
68+// dialog
69+.dialog() {
70+ position: relative;
71+ width: 70%;
72+ padding: 1em 1em 1em 2.7em;
73+ margin: 0em 8% 1em 8%;
74+ border: 1px solid black;
75+ border-radius: 4px;
76+ text-align: left;
77+
78+ &:before {
79+ position: absolute;
80+ top: 0.5em;
81+ left: 0.5em;
82+ font-family:"ion";
83+ font-size: 1.5em;
84+ }
85+
86+ .close {
87+ float:right;
88+ position: relative;
89+ top: -3px;
90+ color: inherit;
91+ font-size: 1.5em;
92+ }
93+
94+ ul, ol, p {
95+ margin: 1px 0 0 0;
96+ }
97+
98+}
99+
100+.dialog-error {
101+ .dialog();
102+ color: @color-error;
103+ background: @color-error-background;
104+ border-color: @color-error;
105+ .ion-error();
106+}
107+
108+.dialog-warning {
109+ .dialog();
110+ color: @color-warning;
111+ background: @color-warning-background;
112+ border-color: @color-warning;
113+ .ion-warning();
114+}
115+
116+// btn-collapse
117+.btn-collapse {
118+ cursor: pointer;
119+}
120+
121+//
122+.scrollx {
123+ overflow-x: auto;
124+ overflow-y: hidden;
125+ display: block;
126+ padding: 0;
127+ margin: 0;
128+ border: none;
129+}
130+
131+// tabs
132+.tabs .tabs > label {
133+ font-size: 90%;
134+}
135+
136+.tabs {
137+ .flexbox();
138+ flex-wrap: wrap;
139+ width: 100%;
140+ min-width: 100%;
141+
142+ & > * {
143+ order: 2;
144+ }
145+
146+ & > input[type=radio] {
147+ display: none;
148+ }
149+
150+ & > label {
151+ order: 1;
152+ padding: 0.7em;
153+ margin: 0 0.7em;
154+ letter-spacing:0.5px;
155+ text-transform: uppercase;
156+
157+ border: solid white;
158+ border-width: 0px 0px 2px 0;
159+
160+ .disable-user-select();
161+ cursor: pointer;
162+ }
163+
164+ & > label:hover {
165+ border-bottom: 2px solid @color-categories-item-border-selected;
166+ }
167+
168+ & > section {
169+ min-width: 100%;
170+ padding: 0.7rem 0;
171+ box-sizing: border-box;
172+ border-top: 1px solid black;
173+ display: none;
174+ }
175+
176+ // default selection
177+ & > label:last-of-type {
178+ border-bottom: 2px solid @color-categories-item-border-selected;
179+ background: @color-categories-item-selected;
180+ color: @color-categories-item-selected-font;
181+ font-weight: bold;
182+ letter-spacing:-0.1px;
183+ }
184+
185+ & > section:last-of-type {
186+ display: block;
187+ }
188+
189+}
190+
191+html body .tabs > input:checked {
192+ ~ section {
193+ display: none;
194+ }
195+ ~ label {
196+ position: inherited;
197+ background: inherit;
198+ border-bottom: 2px solid transparent;
199+ font-weight: normal;
200+ color: inherit;
201+
202+ &:hover {
203+ border-bottom: 2px solid @color-categories-item-border-selected;
204+ }
205+ }
206+ + label {
207+ border-bottom: 2px solid @color-categories-item-border-selected;
208+ background: @color-categories-item-selected;
209+ color: @color-categories-item-selected-font;
210+ font-weight: bold;
211+ letter-spacing:-0.1px;
212+ }
213+ + label + section {
214+ display: block;
215+ }
216+}
217+
218+// select
219+select {
220+ height: 28px;
221+ margin: 0 1em 0 0;
222+ padding: 2px 8px 2px 0 !important;
223+ color: @color-search-font;
224+ font-size: 12px;
225+ z-index: 2;
226+
227+ &:hover, &:focus {
228+ cursor: pointer;
229+ }
230+}
231+
232+@supports ((background-position-x: 100%) and ((appearance: none) or (-webkit-appearance: none) or (-moz-appearance: none))) {
233+
234+ select {
235+ appearance: none;
236+ -webkit-appearance: none;
237+ -moz-appearance: none;
238+ border: none;
239+ border-bottom: 1px solid #d7d7d7;
240+ background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI1MTJweCIgaGVpZ2h0PSI1MTJweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDUxMiA1MTIiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTI4LDE5MiAyNTYsMzIwIDM4NCwxOTIiLz48L2c+PC9zdmc+Cg==) no-repeat;
241+ background-position-x: 105%;
242+ background-size: 2em;
243+ background-origin: content-box;
244+ outline: medium none;
245+
246+ &:hover, &:focus {
247+ border-bottom: 1px solid @color-search-border;
248+ }
249+
250+ }
251+
252+}
253+
254+// checkbox-onoff
255+@supports (border-radius: 50px) {
256+ .checkbox-onoff {
257+ display: inline-block;
258+ width: 40px;
259+ height: 10px;
260+ background: #dcdcdc;
261+ margin: 8px auto;
262+ position: relative;
263+ border-radius: 50px;
264+ label {
265+ display: block;
266+ width: 20px;
267+ height: 20px;
268+ position: absolute;
269+ top: -5px;
270+ cursor: pointer;
271+ border-radius: 50px;
272+ box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.3);
273+ transition: all 0.4s ease;
274+
275+ left: 27px;
276+ background-color: #3498DB;
277+ }
278+ input[type=checkbox] {
279+ visibility: hidden;
280+ &:checked + label {
281+ left: -5px;
282+ background: #dcdcdc;
283+ }
284+ }
285+ }
286+}
287+
288+// checkbox
289+@supports (transform: rotate(-45deg)) {
290+ .checkbox {
291+ width: 20px;
292+ position: relative;
293+ margin: 20px auto;
294+ label {
295+ width: 20px;
296+ height: 20px;
297+ cursor: pointer;
298+ position: absolute;
299+ top: 0;
300+ left: 0;
301+ background: white;
302+ border-radius: 4px;
303+ box-shadow: inset 0px 1px 1px white, 0px 1px 4px rgba(0,0,0,0.5);
304+ &:after {
305+ content: '';
306+ width: 9px;
307+ height: 5px;
308+ position: absolute;
309+ top: 4px;
310+ left: 4px;
311+ border: 3px solid #333;
312+ border-top: none;
313+ border-right: none;
314+ background: transparent;
315+ opacity: 0;
316+ transform: rotate(-45deg);
317+ }
318+ }
319+
320+ input[type=checkbox] {
321+ visibility: hidden;
322+ &:checked + label:after {
323+ border-color: #3498DB;
324+ opacity: 1;
325+ }
326+ }
327+
328+ // disabled : can't be focused, show only the check mark
329+ input[disabled] + label {
330+ background-color: transparent !important;
331+ box-shadow: none !important;
332+ cursor: inherit;;
333+ }
334+
335+ // if not checked and possible to checked then display a "light" check mark on hover
336+ input:not(:checked):not([readonly]):not([disabled]) + label:hover::after {
337+ opacity: 0.5;
338+ }
339+ }
340+}
341+
342+@media screen and (max-width: 50em) {
343+ .tabs > label {
344+ width: 100%;
345+ }
346+}
searx/static/themes/simple/magnet.svgnew file+1
@@ -0,0 +1 @@
1+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 32 40" enable-background="new 0 0 32 32" xml:space="preserve"><path d="M21.11,21.157h5.002v-6.867c-0.028-1.706-0.61-3.807-2.172-5.841c-1.539-2.014-4.315-3.72-7.939-3.687 C12.374,4.731,9.598,6.437,8.06,8.45c-1.562,2.034-2.145,4.136-2.174,5.842v6.866h5v-6.866c-0.027-0.377,0.303-1.789,1.099-2.748 c0.819-0.979,1.848-1.747,4.014-1.778c2.165,0.032,3.195,0.799,4.013,1.778c0.798,0.959,1.126,2.372,1.099,2.748V21.157 L21.11,21.157z M26.112,27.236c0,0,0-2.354,0-5.079H21.11c0,2.727,0,5.08,0,5.08l5.004-0.001H26.112z M5.886,27.237h5 c0,0,0-2.354,0-5.08h-5C5.886,24.884,5.886,27.237,5.886,27.237z"/><text x="0" y="47" fill="#000000" font-size="5px" font-weight="bold" font-family="'Helvetica Neue', Helvetica, Arial-Unicode, Arial, Sans-serif">Created by Dmitry Baranovskiy</text><text x="0" y="52" fill="#000000" font-size="5px" font-weight="bold" font-family="'Helvetica Neue', Helvetica, Arial-Unicode, Arial, Sans-serif">from the Noun Project</text></svg>
searx/static/themes/simple/package.jsonnew file+20
@@ -0,0 +1,20 @@
1+{
2+ "devDependencies": {
3+ "grunt": "~1.0.1",
4+ "grunt-contrib-concat": "~1.0.1",
5+ "grunt-contrib-cssmin": "^2.2.1",
6+ "grunt-contrib-jshint": "~1.1.0",
7+ "grunt-contrib-less": "^1.4.1",
8+ "grunt-contrib-uglify": "~3.0.1",
9+ "grunt-contrib-watch": "~1.0.0",
10+ "grunt-webfont": "^1.6.0",
11+ "ionicons-npm": "^2.0.1",
12+ "jslint": "^0.10.3",
13+ "less-plugin-clean-css": "^1.5.1"
14+ },
15+ "scripts": {
16+ "build": "npm install && grunt",
17+ "start": "grunt watch",
18+ "test": "grunt"
19+ }
20+}
searx/templates/oscar/preferences.html+1−1
@@ -171,7 +171,7 @@
171171 {{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}
172172 </td>
173173 <th>{{ search_engine.name }}</th>
174− <td>{{ shortcuts[search_engine.name] }}</td>
174+ <td class="name">{{ shortcuts[search_engine.name] }}</td>
175175 <td><input type="checkbox" {{ "checked" if current_language == 'all' or current_language in search_engine.supported_languages or current_language.split('-')[0] in search_engine.supported_languages else ""}} readonly="readonly" disabled="disabled"></td>
176176 <td><input type="checkbox" {{ "checked" if search_engine.safesearch==True else ""}} readonly="readonly" disabled="disabled"></td>
177177 <td><input type="checkbox" {{ "checked" if search_engine.time_range_support==True else ""}} readonly="readonly" disabled="disabled"></td>
searx/templates/simple/404.htmlnew file+9
@@ -0,0 +1,9 @@
1+{% extends "simple/base.html" %}
2+{% block content %}
3+<div class="center">
4+ <h1>{{ _('Page not found') }}</h1>
5+ {% autoescape false %}
6+ <p>{{ _('Go to %(search_page)s.', search_page='<a href="{}">{}</a>'.decode('utf-8').format(url_for('index'), _('search page'))) }}</p>
7+ {% endautoescape %}
8+</div>
9+{% endblock %}
searx/templates/simple/about.htmlnew file+4
@@ -0,0 +1,4 @@
1+{% extends 'simple/base.html' %}
2+{% block content %}
3+{% include '__common__/about.html' %}
4+{% endblock %}
searx/templates/simple/base.htmlnew file+61
@@ -0,0 +1,61 @@
1+<!DOCTYPE html>
2+<html class="no-js" lang="en" {% if rtl %} dir="rtl"{% endif %}>
3+<head>
4+ <meta charset="UTF-8" />
5+ <meta name="description" content="searx - a privacy-respecting, hackable metasearch engine">
6+ <meta name="keywords" content="searx, search, search engine, metasearch, meta search">
7+ <meta name="generator" content="searx/{{ searx_version }}">
8+ <meta name="referrer" content="no-referrer">
9+ <meta name="robots" content="noarchive">
10+ <meta name="viewport" content="width=device-width, maximum-scale=1.0, user-scalable=1">
11+ <meta name="HandheldFriendly" content="True">
12+ <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
13+ <title>{% block title %}{% endblock %}searx</title>
14+ {% if rtl %}
15+ <link rel="stylesheet" href="{{ url_for('static', filename='css/searx-rtl.min.css') }}" type="text/css" media="screen" />
16+ {% else %}
17+ <link rel="stylesheet" href="{{ url_for('static', filename='css/searx.min.css') }}" type="text/css" media="screen" />
18+ {% endif %}
19+ {% block styles %}{% endblock %}
20+ {% block meta %}{% endblock %}
21+ {% block head %}
22+ <link title="{{ instance_name }}" type="application/opensearchdescription+xml" rel="search" href="{{ url_for('opensearch') }}"/>
23+ {% endblock %}
24+ <link rel="shortcut icon" href="{{ url_for('static', filename='img/favicon.png') }}" />
25+ <script type="text/javascript">
26+ var searx = {
27+ autocompleter: {% if autocomplete %}true{% else %}false{% endif %},
28+ method: "{{ method or 'POST' }}",
29+ touch: (("ontouchstart" in window) || window.DocumentTouch && document instanceof DocumentTouch) || false,
30+ staticPath: "{{ url_for('static', filename='themes/simple') }}/",
31+ noItemFound: "{{ _('No item found') }}",
32+ search_on_category_select: {{ 'true' if 'plugins/js/search_on_category_select.js' in scripts else 'false'}},
33+ infinite_scroll: {{ 'true' if 'plugins/js/infinite_scroll.js' in scripts else 'false' }}
34+ };
35+ document.getElementsByTagName("html")[0].className = (searx.touch)?"js touch":"js";
36+ </script>
37+</head>
38+<body>
39+ <main id="main_{{ self._TemplateReference__context.name|replace("simple/", "")|replace(".html", "") }}">
40+ {% if errors %}
41+ <div class="dialog-error" role="alert">
42+ <a href="#" class="close" aria-label="close" title="close">×</a>
43+ <ul>
44+ {% for message in errors %}
45+ <li>{{ message }}</li>
46+ {% endfor %}
47+ </ul>
48+ </div>
49+ {% endif %}
50+
51+ {% block content %}
52+ {% endblock %}
53+ </main>
54+ <footer>
55+ <p>{{ _('Powered by') }} <a href="{{ url_for('about') }}">searx</a> - {{ searx_version }} - {{ _('a privacy-respecting, hackable metasearch engine') }}</p>
56+ </footer>
57+ <!--[if gte IE 9]>-->
58+ <script src="{{ url_for('static', filename='js/searx.min.js') }}" ></script>
59+ <!--<![endif]-->
60+</body>
61+</html>
searx/templates/simple/categories.htmlnew file+8
@@ -0,0 +1,8 @@
1+<div id="categories">{{- '' -}}
2+ <div id="categories_container">
3+ {%- for category in categories -%}
4+ <div class="category"><input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}"{% if category in selected_categories %} checked="checked"{% endif %}/><label for="checkbox_{{ category|replace(' ', '_') }}" class="tooltips">{{ _(category) }}</label></div>
5+ {%- endfor -%}
6+ {%- if display_tooltip %}<div class="help">{{ _('Click on the magnifier to perform search') }}</div>{% endif -%}
7+ </div>{{- '' -}}
8+</div>
searx/templates/simple/index.htmlnew file+12
@@ -0,0 +1,12 @@
1+{% extends "simple/base.html" %}
2+{% from 'simple/macros.html' import icon %}
3+{% block meta %}
4+ <link rel="preload" href="{{ url_for('static', filename='img/searx.png') }}" as="image" />
5+{% endblock %}
6+{% block content %}
7+<nav id="linkto_preferences"><a href="{{ url_for('preferences') }}">{{ icon('navicon-round') }}</a></nav>
8+<div class="index">
9+ <div class="title"><h1>searx</h1></div>
10+ {% include 'simple/search.html' %}
11+</div>
12+{% endblock %}
searx/templates/simple/infobox.htmlnew file+46
@@ -0,0 +1,46 @@
1+<aside class="infobox">
2+ <h2><bdi>{{ infobox.infobox }}</bdi></h2>
3+ {% if infobox.img_src %}<img src="{{ image_proxify(infobox.img_src) }}" title="{{ infobox.infobox|striptags }}" alt="{{ infobox.infobox|striptags }}" />{% endif %}
4+ <p><bdi>{{ infobox.entity }}</bdi></p>
5+ <p><bdi>{{ infobox.content | safe }}</bdi></p>
6+ {% if infobox.attributes %}
7+ <div class="attributes">
8+ {% for attribute in infobox.attributes %}
9+ <dl>
10+ <dt><bdi>{{ attribute.label }} :</bdi></dt>
11+ {%- if attribute.image -%}
12+ <dd><img src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}" /></dd>
13+ {%- else -%}
14+ <dd><bdi>{{ attribute.value }}</bdi></dd>
15+ {%- endif -%}
16+ </dl>
17+ {% endfor %}
18+ </div>
19+ {% endif %}
20+
21+ {% if infobox.urls %}
22+ <div class="urls">
23+ <ul>
24+ {%- for url in infobox.urls -%}
25+ <li class="url"><bdi><a href="{{ url.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ url.title }}</a></bdi></li>
26+ {%- endfor -%}
27+ </ul>
28+ </div>
29+ {% endif %}
30+
31+ {% if infobox.relatedTopics %}
32+ <div class="relatedTopics">
33+ {% for topic in infobox.relatedTopics %}
34+ <div>
35+ <h3><bdi>{{ topic.name }}</bdi></h3>
36+ {% for suggestion in topic.suggestions %}
37+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
38+ <input type="hidden" name="q" value="{{ suggestion }}">
39+ <input type="submit" value="{{ suggestion }}" />
40+ </form>
41+ {% endfor %}
42+ </div>
43+ {% endfor %}
44+ </div>
45+ {% endif %}
46+</aside>
searx/templates/simple/languages.htmlnew file+8
@@ -0,0 +1,8 @@
1+<select class="language" id="language" name="language" tabindex="2">{{- '' -}}
2+ <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Default language') }}</option>
3+ {%- for lang_id,lang_name,country_name,english_name in language_codes | sort(attribute=1) -%}
4+ <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>
5+ {{- lang_name }} {% if country_name %}({{ country_name }}) {% endif %}- {{ lang_id -}}
6+ </option>
7+ {%- endfor -%}
8+</select>
searx/templates/simple/macros.htmlnew file+86
@@ -0,0 +1,86 @@
1+<!-- Draw glyphicon icon from bootstrap-theme -->
2+{% macro icon(action) -%}
3+ <span class="ion-icon-big ion-{{ action }}"></span>
4+{%- endmacro %}
5+
6+{% macro icon_small(action) -%}
7+ <span class="ion-icon ion-{{ action }}"></span>
8+{%- endmacro %}
9+
10+<!-- Draw favicon -->
11+<!-- TODO: using url_for methode -->
12+{% macro draw_favicon(favicon) -%}
13+ <img width="14" height="14" class="favicon" src="static/themes/simple/img/icons/{{ favicon }}.png" alt="{{ favicon }}" />
14+{%- endmacro %}
15+
16+{% macro result_open_link(url, classes='') -%}
17+ <a href="{{ url }}" {% if classes %}class="{{ classes }}" {% endif %}{% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>
18+{%- endmacro %}
19+
20+{%- macro result_close_link() -%}
21+ </a>
22+{%- endmacro %}
23+
24+{%- macro result_link(url, title, classes='') -%}
25+ {{ result_open_link(url, classes) }}{{ title }}{{ result_close_link() }}
26+{%- endmacro -%}
27+
28+<!-- Draw result header -->
29+{% macro result_header(result, favicons, image_proxify) -%}
30+<article class="result {% if result['template'] %}result-{{ result.template|replace('.html', '') }}{% else %}result-default{% endif %} {% if result['category'] %}category-{{ result['category'] }}{% endif %}">
31+ {%- if result.img_src %}{{ result_open_link(result.url) }}<img class="image" src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}" title="{{ result.title|striptags }}" class="image" />{{ result_close_link() }}{% endif -%}
32+ {%- if result.thumbnail %}{{ result_open_link(result.url) }}<img class="thumbnail" src="{{ image_proxify(result.thumbnail) }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/>{{ result_close_link() }}{% endif -%}
33+ <h3>{{ result_link(result.url, result.title|safe) }}</h3>
34+{%- endmacro -%}
35+
36+<!-- Draw result sub header -->
37+{%- macro result_sub_header(result) -%}
38+ {% if result.publishedDate %}<time class="published_date" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif %}
39+{%- endmacro -%}
40+
41+<!-- Draw result sub footer -->
42+{%- macro result_sub_footer(result, proxify) -%}
43+<div class="engines">{% for engine in result.engines %}<span>{{ engine }}</span>{% endfor %}</div>{{- '' -}}
44+<p class="url"><span class="url">{{ result.pretty_url }}</span>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "cache_link") }}&lrm; {% if proxify %} {{ result_link(proxify(result.url), icon('link') + _('proxied'), "proxyfied_link") }} {% endif %}</p>{{- '' -}}
45+<div class="break"></div>{{- '' -}}
46+{%- endmacro -%}
47+
48+<!-- Draw result footer -->
49+{%- macro result_footer(result) -%}
50+</article>
51+{%- endmacro -%}
52+
53+<!-- -->
54+{%- macro tabs_open() -%}
55+<div class="tabs" role="tablist">
56+{%- endmacro -%}
57+
58+{%- macro tab_header(name, id, label) -%}
59+<input type="radio" name="{{ name }}" id="tab_{{ id }}"/>
60+<label for="tab_{{ id }}" role="tab"
61+ aria-controls="panel{{ id }}">{{ label }}</label>
62+<section id="tab-content{{ id }}" role="tabpanel"
63+ aria-labelledby="{{ label }}" aria-hidden="false">
64+{%- endmacro -%}
65+
66+{%- macro tab_footer() -%}
67+</section>
68+{%- endmacro -%}
69+
70+{%- macro tabs_close() -%}
71+</div>
72+{%- endmacro -%}
73+
74+{%- macro checkbox_onoff(name, checked) -%}
75+<div class="checkbox-onoff">{{- '' -}}
76+ <input type="checkbox" value="None" id="{{ name }}" name="{{ name }}" {% if checked %}checked{% endif %}/>{{- '' -}}
77+ <label for="{{ name }}"></label>{{- '' -}}
78+</div>
79+{%- endmacro -%}
80+
81+{%- macro checkbox(name, checked, readonly, disabled) -%}
82+<div class="checkbox">{{- '' -}}
83+ <input type="checkbox" value="None" id="{{ name }}" name="{{ name }}" {% if checked %}checked{% endif %}{% if readonly %} readonly="readonly" {% endif %}{% if disabled %} disabled="disabled" {% endif %}/>{{- '' -}}
84+ <label for="{{ name }}"></label>{{- '' -}}
85+</div>
86+{%- endmacro -%}
searx/templates/simple/preferences.htmlnew file+190
@@ -0,0 +1,190 @@
1+{% from 'simple/macros.html' import tabs_open, tabs_close, tab_header, tab_footer, checkbox_onoff, checkbox %}
2+
3+{% extends "simple/base.html" %}
4+
5+{%- macro plugin_preferences(section) -%}
6+{%- for plugin in plugins -%}
7+{%- if plugin.preference_section == section -%}
8+<fieldset>{{- '' -}}
9+ <legend>{{ _(plugin.name) }}</legend>{{- '' -}}
10+ <div class="value">
11+ {{- checkbox_onoff('plugin_' + plugin.id, plugin.id not in allowed_plugins) -}}
12+ </div>{{- '' -}}
13+ <div class="description">
14+ {{- _(plugin.description) -}}
15+ </div>{{- '' -}}
16+</fieldset>
17+{%- endif -%}
18+{%- endfor -%}
19+{%- endmacro -%}
20+
21+{% block head %} {% endblock %}
22+{% block content %}
23+
24+<a href="{{ url_for('index') }}"><h1><span>searx</span></h1></a>
25+
26+<h2>{{ _('Preferences') }}</h2>
27+
28+<form id="search_form" method="post" action="{{ url_for('preferences') }}">
29+
30+{{ tabs_open() }}
31+
32+{{ tab_header('maintab', 'general', _('General')) }}
33+ <fieldset>
34+ <legend>{{ _('Default categories') }}</legend>
35+ {% set display_tooltip = false %}
36+ {% include 'simple/categories.html' %}
37+ </fieldset>
38+ <fieldset>
39+ <legend>{{ _('Search language') }}</legend>
40+ <p class="value">{{- '' -}}
41+ <select name='language'>{{- '' -}}
42+ <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Default language') }}</option>
43+ {%- for lang_id,lang_name,country_name,english_name in language_codes | sort(attribute=1) -%}
44+ <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>{{ lang_name }} {% if country_name %}({{ country_name }}) {% endif %}- {{ lang_id }}</option>
45+ {%- endfor -%}
46+ </select>{{- '' -}}
47+ </p>
48+ <div class="description">{{ _('What language do you prefer for search?') }}</div>
49+ </fieldset>
50+ <fieldset>
51+ <legend>{{ _('Autocomplete') }}</legend>
52+ <p class="value">
53+ <select name="autocomplete">
54+ <option value=""> - </option>
55+ {% for backend in autocomplete_backends %}
56+ <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option>
57+ {% endfor %}
58+ </select>
59+ </p>
60+ <div class="description">{{ _('Find stuff as you type') }}</div>
61+ </fieldset>
62+ <fieldset>
63+ <legend>{{ _('SafeSearch') }}</legend>
64+ <p class="value">
65+ <select name='safesearch'>
66+ <option value="2" {% if safesearch == '2' %}selected="selected"{% endif %}>{{ _('Strict') }}</option>
67+ <option value="1" {% if safesearch == '1' %}selected="selected"{% endif %}>{{ _('Moderate') }}</option>
68+ <option value="0" {% if safesearch == '0' %}selected="selected"{% endif %}>{{ _('None') }}</option>
69+ </select>
70+ </p>
71+ <div class="description">{{ _('Filter content') }}</p>
72+ </fieldset>
73+ {{ plugin_preferences('general') }}
74+ {{ tab_footer() }}
75+
76+ {{ tab_header('maintab', 'engines', _('Engines')) }}
77+ <p>{{ _('Currently used search engines') }}</p>
78+
79+ {{ tabs_open() }}
80+ {% for categ in all_categories %}
81+
82+ {{ tab_header('enginetab', 'category' + categ, _(categ)) }}
83+ <div class="scrollx">
84+ <table class="striped">
85+ <tr>
86+ <th class="engine_checkbox">{{ _("Allow") }}</th>
87+ <th class="name">{{ _("Engine name") }}</th>
88+ <th class="shortcut">{{ _("Shortcut") }}</th>
89+ <th>{{ _("Supports selected language") }}</th>
90+ <th>{{ _("SafeSearch") }}</th>
91+ <th>{{ _("Time range") }}</th>
92+ <th>{{ _("Avg. time") }}</th>
93+ <th>{{ _("Max time") }}</th>
94+ </tr>
95+ {% for search_engine in engines_by_category[categ] %}
96+
97+ {% if not search_engine.private %}
98+ {% set engine_id = 'engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_') %}
99+ <tr>
100+ <td class="engine_checkbox">{{ checkbox_onoff(engine_id, (search_engine.name, categ) in disabled_engines) }}</td>
101+ <th class="name">{{ search_engine.name }}</th>
102+ <td class="shortcut">{{ shortcuts[search_engine.name] }}</td>
103+ <td>{{ checkbox(engine_id + '_supported_languages', current_language == 'all' or current_language in search_engine.supported_languages or current_language.split('-')[0] in search_engine.supported_languages, true, true) }}</td>
104+ <td>{{ checkbox(engine_id + '_safesearch', search_engine.safesearch==True, true, true) }}</td>
105+ <td>{{ checkbox(engine_id + '_time_range_support', search_engine.time_range_support==True, true, true) }}</td>
106+ <td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td>
107+ <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td>
108+ </tr>
109+ {% endif %}
110+ {% endfor %}
111+ </table>
112+ <div>
113+ {{ tab_footer() }}
114+ {% endfor %}
115+ {{ tabs_close() }}
116+ {{ tab_footer() }}
117+
118+ {{ tab_header('maintab', 'ui', _('User interface')) }}
119+ <fieldset>
120+ <legend>{{ _('Interface language') }}</legend>
121+ <p class="value">
122+ <select name='locale'>
123+ {% for locale_id,locale_name in locales.items() | sort %}
124+ <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option>
125+ {% endfor %}
126+ </select>
127+ </p>
128+ <div class="description">{{ _('Change the language of the layout') }}</div>
129+ </fieldset>
130+ <fieldset>
131+ <legend>{{ _('Themes') }}</legend>
132+ <p class="value">
133+ <select name="theme">
134+ {%- for name in themes -%}
135+ <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option>
136+ {%- endfor -%}
137+ </select>
138+ </p>
139+ <div class="description">{{ _('Change searx layout') }}</div>
140+ </fieldset>
141+ <fieldset>
142+ <legend>{{ _('Results on new tabs') }}</legend>
143+ <p class="value">
144+ <select name='results_on_new_tab'>
145+ <option value="1" {% if results_on_new_tab %}selected="selected"{% endif %}>{{ _('On') }}</option>
146+ <option value="0" {% if not results_on_new_tab %}selected="selected"{% endif %}>{{ _('Off')}}</option>
147+ </select>
148+ </p>
149+ <div class="description">{{_('Open result links on new browser tabs') }}</div>
150+ </fieldset>
151+ {{ plugin_preferences('ui') }}
152+ {{ tab_footer() }}
153+
154+ {{ tab_header('maintab', 'privacy', _('Privacy')) }}
155+ <fieldset>
156+ <legend>{{ _('Method') }}</legend>
157+ <p class="value">
158+ <select name='method'>
159+ <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option>
160+ <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option>
161+ </select>
162+ </p>
163+ <div class="description">{{ _('Search language') }}</div>
164+ </fieldset>
165+ <fieldset>
166+ <legend>{{ _('Image proxy') }}</legend>
167+ <p class="value">
168+ <select name='image_proxy'>
169+ <option value="1" {% if image_proxy %}selected="selected"{% endif %}>{{ _('Enabled') }}</option>
170+ <option value="" {% if not image_proxy %}selected="selected"{% endif %}>{{ _('Disabled') }}</option>
171+ </select>
172+ </p>
173+ <div class="description">{{ _('Proxying image results through searx') }}</div>
174+ </fieldset>
175+ {{ plugin_preferences('privacy') }}
176+ {{ tab_footer() }}
177+
178+ {{ tabs_close() }}
179+
180+ <p class="small_font">{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
181+ <br />
182+ {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
183+ </p>
184+
185+ <input type="submit" value="{{ _('save') }}" />
186+ <div class="{% if rtl %}left{% else %}right{% endif %} preferences_back"><a href="{{ url_for('clear_cookies') }}">{{ _('Reset defaults') }}</a></div>
187+ <div class="{% if rtl %}left{% else %}right{% endif %} preferences_back"><a href="{{ url_for('index') }}">{{ _('back') }}</a></div>
188+
189+</form>
190+{% endblock %}
searx/templates/simple/result_templates/code.htmlnew file+13
@@ -0,0 +1,13 @@
1+{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl %}
2+
3+{{ result_header(result, favicons, image_proxify) -}}
4+{{- result_sub_header(result) -}}
5+{%- if result.content %}{{ result.content|safe }}{% endif %}</p>
6+{%- if result.repository -%}
7+<p class="content"><a href="{{ result.repository|safe }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.repository }}</a></p>
8+{%- endif -%}
9+<div dir="ltr" class="codelines">
10+ {{- result.codelines|code_highlighter(result.code_language)|safe -}}
11+</div>{{- '' -}}
12+{{- result_sub_footer(result, proxify) -}}
13+{{ result_footer(result) }}
searx/templates/simple/result_templates/default.htmlnew file+17
@@ -0,0 +1,17 @@
1+{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl %}
2+
3+{{ result_header(result, favicons, image_proxify) -}}
4+{{- result_sub_header(result) -}}
5+{% if result.embedded -%}
6+<p class="altlink"> &bull; <a class="btn-collapse collapsed media-loader disabled_if_nojs" data-target="#result-media-{{ index }}" data-btn-text-collapsed="{{ _('show media') }}" data-btn-text-not-collapsed="{{ _('hide media') }}">{{ icon('music-note') }} {{ _('show media') }}</a></p>
7+{%- endif %}
8+<p class="content">
9+ {%- if result.content %}{{ result.content|safe }}{% endif -%}
10+</p>
11+{{- result_sub_footer(result, proxify) -}}
12+{% if result.embedded -%}
13+<div id="result-media-{{ index }}" class="invisible">
14+ {{- result.embedded|safe -}}
15+</div>
16+{%- endif %}
17+{{- result_footer(result) }}
searx/templates/simple/result_templates/images.htmlnew file+4
@@ -0,0 +1,4 @@
1+<article class="result result-images {% if result['category'] %}category-{{ result['category'] }}{% endif %}">
2+ <a href="{{ result.img_src }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img class="image_thumbnail" src="{% if result.thumbnail_src %}{{ image_proxify(result.thumbnail_src) }}{% else %}{{ image_proxify(result.img_src) }}{% endif %}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}" /></a>
3+ <span class="url"><a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} class="small_font">{{ result.parsed_url[0] }}://{{ result.parsed_url[1] }}</a></span>
4+</article>
searx/templates/simple/result_templates/map.htmlnew file+71
@@ -0,0 +1,71 @@
1+{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl, icon %}
2+
3+{{ result_header(result, favicons, image_proxify) -}}
4+{{- result_sub_header(result) -}}
5+
6+{%- if (result.latitude and result.longitude) or result.boundingbox -%}
7+ <small> &bull; <a class="btn-collapse collapsed searx_init_map hide_if_nojs" data-target="#result-map-{{ index }}" data-btn-text-collapsed="{{ _('show map') }}" data-btn-text-not-collapsed="{{ _('hide map') }}" data-leaflet-target="osm-map-{{ index }}" data-map-lon="{{ result.longitude }}" data-map-lat="{{ result.latitude }}" {% if result.boundingbox %}data-map-boundingbox='{{ result.boundingbox|tojson|safe }}'{% endif %} {% if result.geojson %}data-map-geojson='{{ result.geojson|tojson|safe }}'{% endif %}>{{ icon( 'globe') }} {{ _('show map') }}</a></small>
8+{%- endif -%}
9+
10+{%- if result.osm and (result.osm.type and result.osm.id) -%}
11+ <small> &bull; <a class="btn-collapse collapsed hide_if_nojs searx_overpass_request" data-target="#result-overpass-{{ index }}" data-btn-text-collapsed="{{ _('show details') }}" data-btn-text-not-collapsed="{{ _('hide details') }}" data-osm-type="{{ result.osm.type }}" data-osm-id="{{ result.osm.id }}" data-result-table="result-overpass-table-{{ index }}" data-result-table-loadicon="result-overpass-table-loading-{{ index }}">{{ icon('location') }} {{ _('show details') }}</a></small>
12+{%- endif -%}
13+{#-
14+{% if (result.latitude and result.longitude) %}
15+ <small> &bull; <a class="btn-collapse disabled_if_nojs" data-target="#result-geodata-{{ index }}" data-btn-text-collapsed="{{ _('show geodata') }}" data-btn-text-not-collapsed="{{ _('hide geodata') }}">{{ icon('location') }} {{ _('show geodata') }}</a></small>
16+{% endif %}
17+-#}
18+
19+{%- if result.address -%}
20+<p itemscope itemtype="http://schema.org/PostalAddress" class="content">
21+ {%- if result.address.name -%}
22+ <strong itemprop="name">{{ result.address.name }}</strong><br/>
23+ {%- endif -%}
24+ {% if result.address.road -%}
25+ <span itemprop="streetAddress">
26+ {% if result.address.house_number %}{{ result.address.house_number }}, {% endif %}
27+ {{ result.address.road }}
28+ </span><br/>
29+ {%- endif %}
30+ {%- if result.address.locality -%}
31+ <span itemprop="addressLocality">{{ result.address.locality }}</span>
32+ {% if result.address.postcode %}, <span itemprop="postalCode">{{ result.address.postcode }}</span>{% endif %}
33+ <br/>
34+ {%- endif -%}
35+ {%- if result.address.country -%}
36+ <span itemprop="addressCountry">{{ result.address.country }}</span>
37+ {%- endif -%}
38+</p>
39+{%- endif -%}
40+
41+{%- if result.content %}<p class="content">{{ result.content|safe }}</p>{% endif -%}
42+
43+{{- result_sub_footer(result, proxify) -}}
44+
45+{% if result.osm and (result.osm.type and result.osm.id) -%}
46+ <div class="result-content invisible" id="result-overpass-{{ index }}"{% if rtl %} dir="ltr"{% endif %}>
47+ <div id="result-overpass-table-loading-{{ index }}"><img src="{{ url_for('static', filename='img/loader.gif') }}" alt="Loading ..."/></div>
48+ <table id="result-overpass-table-{{ index }}">
49+ <thead>
50+ <tr><th>key</th><th>value</th></tr>
51+ </thead>
52+ <tbody>
53+ </tbody>
54+ </table>
55+ </div>
56+{%- endif %}
57+
58+{#-
59+{% if (result.latitude and result.longitude) -%}
60+ <div id="result-geodata-{{ index }}" class="invisible">
61+ <strong>Longitude:</strong> {{ result.longitude }} <br/>
62+ <strong>Latitude:</strong> {{ result.latitude }}
63+ </div>
64+{%- endif %}
65+-#}
66+
67+{% if (result.latitude and result.longitude) or result.boundingbox -%}
68+ <div id="result-map-{{ index }}" class="invisible"><div id="osm-map-{{ index }}" style="height:300px; width:100%; margin: 10px 0;" ></div></div>
69+{%- endif %}
70+
71+{{- result_footer(result) }}
searx/templates/simple/result_templates/torrent.htmlnew file+24
@@ -0,0 +1,24 @@
1+{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl, result_link %}
2+
3+{{ result_header(result, favicons, image_proxify) -}}
4+{{- result_sub_header(result) -}}
5+
6+{% if result.magnetlink %}<p class="altlink"> &bull; {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink") }}</p>{% endif %}
7+{% if result.torrentfile %}<p class="altlink"> &bull; {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile") }}</p>{% endif %}
8+
9+{% if result.seed %}<p class="stat"> &bull; {{ icon('arrow-swap') }} {{ _('Seeder') }} <span class="badge">{{ result.seed }}</span> &bull; {{ _('Leecher') }} <span class="badge">{{ result.leech }}</span></p>{% endif %}
10+
11+{%- if result.filesize %}<p class="stat">{{ icon('floppy-disk') }} {{ _('Filesize') }}<span class="badge">
12+ {%- if result.filesize < 1024 %}{{ result.filesize }} {{ _('Bytes') }}
13+ {%- elif result.filesize < 1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024) }} {{ _('kiB') }}
14+ {%- elif result.filesize < 1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024) }} {{ _('MiB') }}
15+ {%- elif result.filesize < 1024*1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024/1024) }} {{ _('GiB') }}
16+ {%- else %}{{ '{0:0.2f}'.format(result.filesize/1024/1024/1024/1024) }} {{ _('TiB') }}{% endif -%}
17+ </span></p>
18+{%- endif -%}
19+
20+{%- if result.files %}<p class="stat">{{ icon('file') }} {{ _('Number of Files') }} <span class="badge">{{ result.files }}</span></p>{% endif -%}
21+
22+{%- if result.content %}<p class="content">{{ result.content|safe }}</p>{% endif -%}
23+{{- result_sub_footer(result, proxify) -}}
24+{{- result_footer(result) }}
searx/templates/simple/result_templates/videos.htmlnew file+15
@@ -0,0 +1,15 @@
1+{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl %}
2+
3+{{ result_header(result, favicons, image_proxify) }}
4+{{ result_sub_header(result) }}
5+{% if result.embedded -%}
6+<p class="altlink"> &bull; <a class="btn-collapse collapsed media-loader disabled_if_nojs" data-target="#result-video-{{ index }}" data-btn-text-collapsed="{{ _('show video') }}" data-btn-text-not-collapsed="{{ _('hide video') }}">{{ icon('film-outline') }} {{ _('show video') }}</a></p>
7+{%- endif %}
8+{% if result.content %}<p class="content">{{ result.content|safe }}</p>{% endif %}
9+{{- result_sub_footer(result, proxify) -}}
10+{% if result.embedded -%}
11+<div id="result-video-{{ index }}" class="invisible">
12+ {{- result.embedded|safe -}}
13+</div>
14+{%- endif %}
15+{{ result_footer(result) }}
searx/templates/simple/results.htmlnew file+151
@@ -0,0 +1,151 @@
1+{% extends "simple/base.html" %}
2+{% from 'simple/macros.html' import icon, icon_small %}
3+{% block title %}{{ q|e }} - {% endblock %}
4+{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q|e }}" href="{{ url_for('index') }}?q={{ q|urlencode }}&amp;categories={{ selected_categories|join(",") | replace(' ','+') }}&amp;pageno={{ pageno }}&amp;time_range={{ time_range }}&amp;language={{ current_language }}&amp;safesearch={{ safesearch }}&amp;format=rss">{% endblock %}
5+{% block content %}
6+<nav id="linkto_preferences"><a href="{{ url_for('preferences') }}">{{ icon('navicon-round') }}</a></nav>
7+{% include 'simple/search.html' %}
8+<div id="results">
9+ {% if answers %}
10+ <div id="answers"><h4 class="title">{{ _('Answers') }} : </h4>
11+ {% for answer in answers -%}
12+ <div class="answer">{{ answer }}</div>
13+ {%- endfor %}
14+ </div>
15+ {% endif %}
16+
17+ <div id="sidebar">
18+
19+ {% if number_of_results != '0' -%}
20+ <p id="result_count"><small>{{ _('Number of results') }}: {{ number_of_results }}</small></p>
21+ {%- endif %}
22+
23+ {% if unresponsive_engines and results|length >= 1 %}
24+ <div class="dialog-error" role="alert">
25+ <p><strong>{{ _('Error!') }}</strong> {{ _('Engines cannot retrieve results') }}:</p>
26+ <p>{% for engine_name, error_type in unresponsive_engines %}
27+ {{ engine_name }} ({{ error_type }}){% if not loop.last %}, {% endif %}
28+ {% endfor %}</p>
29+ </div>
30+ {% endif %}
31+
32+ {% if infoboxes %}
33+ <div id="infoboxes">
34+ {% for infobox in infoboxes %}
35+ {% include 'simple/infobox.html' %}
36+ {% endfor %}
37+ </div>
38+ {% endif %}
39+
40+ {% if suggestions %}
41+ <div id="suggestions">
42+ <h4 class="title">{{ _('Suggestions') }} : </h4>
43+ <div class="wrapper">
44+ {% for suggestion in suggestions %}
45+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
46+ <input type="hidden" name="q" value="{{ suggestion }}">
47+ <input type="hidden" name="language" value="{{ current_language }}">
48+ <input type="hidden" name="safesearch" value="{{ safesearch }}">
49+ <input type="hidden" name="theme" value="{{ theme }}">
50+ <input type="submit" class="suggestion" value="&bull; {{ suggestion }}">
51+ </form>
52+ {% endfor %}
53+ </div>
54+ </div>
55+ {% endif %}
56+
57+ <div id="search_url">
58+ <h4 class="title">{{ _('Search URL') }} :</h4>
59+ <div><pre>{{ base_url }}?q={{ q|urlencode }}&amp;language={{ current_language }}&amp;time_range={{ time_range }}&amp;safesearch={{ safesearch }}{% if pageno > 1 %}&amp;pageno={{ pageno }}{% endif %}{% if selected_categories %}&amp;categories={{ selected_categories|join(",") | replace(' ','+') }}{% endif %}</pre></div>
60+ </div>
61+ <div id="apis">
62+ <h4 class="title">{{ _('Download results') }}</h4>
63+ {% for output_type in ('csv', 'json', 'rss') %}
64+ <div class="left">
65+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
66+ <input type="hidden" name="q" value="{{ q|e }}">
67+ {% for category in selected_categories %}
68+ <input type="hidden" name="category_{{ category }}" value="1">
69+ {% endfor %}
70+ <input type="hidden" name="pageno" value="{{ pageno }}">
71+ <input type="hidden" name="time_range" value="{{ time_range }}">
72+ <input type="hidden" name="language" value="{{ current_language }}">
73+ <input type="hidden" name="safesearch" value="{{ safesearch }}">
74+ <input type="hidden" name="format" value="{{ output_type }}">
75+ <input type="submit" value="{{ output_type }}">
76+ </form>
77+ </div>
78+ {% endfor %}
79+ </div>
80+ </div>
81+
82+ {% if corrections %}
83+ <div id="corrections">
84+ <h4>{{ _('Try searching for:') }}</h4>
85+ {% for correction in corrections %}
86+ <div class="left">
87+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" role="navigation">
88+ <input type="hidden" name="q" value="{{ correction }}">
89+ <input type="hidden" name="time_range" value="{{ time_range }}">
90+ <input type="hidden" name="language" value="{{ current_language }}">
91+ <input type="hidden" name="safesearch" value="{{ safesearch }}">
92+ <input type="hidden" name="theme" value="{{ theme }}">
93+ <input type="submit" value="{{ correction }}">
94+ </form>
95+ </div>
96+ {% endfor %}
97+ </div>
98+ {% endif %}
99+
100+ <div id="urls">
101+ {% for result in results %}
102+ {% set index = loop.index %}
103+ {% if result['template'] %}
104+ {% include get_result_template('simple', result['template']) %}
105+ {% else %}
106+ {% include 'simple/result_templates/default.html' %}
107+ {% endif %}
108+ {% endfor %}
109+ {% if not results and not answers %}
110+ {% include 'simple/messages/no_results.html' %}
111+ {% endif %}
112+ </div>
113+ <div id="backToTop">
114+ <a href="#">{{ icon_small('chevron-up') }}</a>
115+ </div>
116+ {% if paging %}
117+ <nav id="pagination">
118+ {% if pageno > 1 %}
119+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
120+ <div class="{% if rtl %}right{% else %}left{% endif %}">
121+ <input type="hidden" name="q" value="{{ q|e }}" >
122+ {% for category in selected_categories %}
123+ <input type="hidden" name="category_{{ category }}" value="1" >
124+ {% endfor %}
125+ <input type="hidden" name="pageno" value="{{ pageno-1 }}" >
126+ <input type="hidden" name="time_range" value="{{ time_range }}" >
127+ <input type="hidden" name="language" value="{{ current_language }}" >
128+ <input type="hidden" name="safesearch" value="{{ safesearch }}" >
129+ <input type="hidden" name="theme" value="{{ theme }}" >
130+ <button type="submit">{{ icon_small('chevron-left') }} {{ _('previous page') }}</button>
131+ </div>
132+ </form>
133+ {% endif %}
134+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
135+ <div class="{% if rtl %}left{% else %}right{% endif %}">
136+ <input type="hidden" name="q" value="{{ q|e }}" >
137+ {% for category in selected_categories %}
138+ <input type="hidden" name="category_{{ category }}" value="1" >
139+ {% endfor %}
140+ <input type="hidden" name="pageno" value="{{ pageno+1 }}" >
141+ <input type="hidden" name="time_range" value="{{ time_range }}" >
142+ <input type="hidden" name="language" value="{{ current_language }}" >
143+ <input type="hidden" name="safesearch" value="{{ safesearch }}" >
144+ <input type="hidden" name="theme" value="{{ theme }}" >
145+ <button type="submit">{{ _('next page') }} {{ icon_small('chevron-right') }}</button>
146+ </div>
147+ </form>
148+ </nav>
149+ {% endif %}
150+</div>
151+{% endblock %}
searx/templates/simple/search.htmlnew file+16
@@ -0,0 +1,16 @@
1+<form id="search" method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
2+ <div id="search_wrapper">
3+ <div class="search_box">
4+ <input id="q" name="q" type="text" placeholder="{{ _('Search for...') }}" tabindex="1" autocomplete="off" spellcheck="false" dir="auto" {% if q %}value="{{ q }}"{% endif %} >
5+ <button id="send_search" type="submit" tabindex="-1"><span class="hide_if_nojs">{{ icon('search') }}</span><span class="show_if_nojs">{{ _('Start search') }}</span></button>
6+ </div>
7+ <div class="search_filters">
8+ {% include 'simple/languages.html' %}
9+ {% include 'simple/time-range.html' %}
10+ </div>
11+ </div>
12+ {% set display_tooltip = true %}
13+ {% include 'simple/categories.html' %}
14+ <input type="hidden" name="safesearch" value="{{ safesearch }}" >
15+ <input type="hidden" name="theme" value="{{ theme }}" >
16+</form>
searx/templates/simple/simple.spec.txtnew file+40
@@ -0,0 +1,40 @@
1+#container
2+ .search
3+ #search_form
4+
5+#results
6+
7+ #sidebar
8+ #result-count
9+ .title
10+ .content
11+
12+ .infobox
13+ h2
14+ img
15+ p
16+ div#attributes
17+ table
18+ tbody
19+ tr
20+ td
21+ td
22+ div#urls
23+ ul
24+ li
25+
26+ #suggestions
27+ .title
28+ .suggestion
29+
30+ #search_url
31+ .title
32+ input
33+
34+ #apis
35+ .title
36+ .api-link
37+
38+ .result
39+
40+
searx/templates/simple/stats.htmlnew file+25
@@ -0,0 +1,25 @@
1+{% extends "simple/base.html" %}
2+{% block head %} {% endblock %}
3+{% block content %}
4+
5+<a href="{{ url_for('index') }}"><h1><span>searx</span></h1></a>
6+
7+<h2>{{ _('Engine stats') }}</h2>
8+
9+{% for stat_name,stat_category in stats %}
10+<div class="left">
11+ <table>
12+ <tr colspan="3">
13+ <th>{{ stat_name }}</th>
14+ </tr>
15+ {% for engine in stat_category %}
16+ <tr>
17+ <td>{{ engine.name }}</td>
18+ <td>{{ '%.02f'|format(engine.avg) }}</td>
19+ <td class="percentage"><div style="width: {{ engine.percentage }}%">&nbsp;</div></td>
20+ </tr>
21+ {% endfor %}
22+ </table>
23+</div>
24+{% endfor %}
25+{% endblock %}
searx/templates/simple/time-range.htmlnew file+17
@@ -0,0 +1,17 @@
1+<select name="time_range" id="time_range" class="time_range" tabindex="3">{{- '' -}}
2+ <option id="time-range-anytime" value="" {{ "selected" if time_range=="" or not time_range else ""}}>
3+ {{- _('Anytime') -}}
4+ </option>{{- '' -}}
5+ <option id="time-range-day" value="day" {{ "selected" if time_range=="day" else ""}}>
6+ {{- _('Last day') -}}
7+ </option>{{- '' -}}
8+ <option id="time-range-week" value="week" {{ "selected" if time_range=="week" else ""}}>
9+ {{- _('Last week') -}}
10+ </option>{{- '' -}}
11+ <option id="time-range-month" value="month" {{ "selected" if time_range=="month" else ""}}>
12+ {{- _('Last month') -}}
13+ </option>{{- '' -}}
14+ <option id="time-range-year" value="year" {{ "selected" if time_range=="year" else ""}}>
15+ {{- _('Last year') -}}
16+ </option>{{- '' -}}
17+</select>