diff --git a/searx/static/themes/simple/css/leaflet.css b/searx/static/themes/simple/css/leaflet.css index 5292e63a1..ddf5d41ce 100644 --- a/searx/static/themes/simple/css/leaflet.css +++ b/searx/static/themes/simple/css/leaflet.css @@ -423,8 +423,11 @@ svg.leaflet-image-layer.leaflet-interactive path { .leaflet-control-attribution a:focus { text-decoration: underline; } -.leaflet-control-attribution svg { +.leaflet-attribution-flag { display: inline !important; + vertical-align: baseline !important; + width: 1em; + height: 0.6669em; } .leaflet-left .leaflet-control-scale { margin-left: 5px; @@ -537,8 +540,6 @@ svg.leaflet-image-layer.leaflet-interactive path { } .leaflet-popup-scrolled { overflow: auto; - border-bottom: 1px solid #ddd; - border-top: 1px solid #ddd; } .leaflet-oldie .leaflet-popup-content-wrapper { @@ -652,6 +653,6 @@ svg.leaflet-image-layer.leaflet-interactive path { /* Prevent printers from removing background-images of controls. */ .leaflet-control { -webkit-print-color-adjust: exact; - color-adjust: exact; + print-color-adjust: exact; } } diff --git a/searx/static/themes/simple/img/favicon.png b/searx/static/themes/simple/img/favicon.png index b90d44fd8..46b28b117 100644 Binary files a/searx/static/themes/simple/img/favicon.png and b/searx/static/themes/simple/img/favicon.png differ diff --git a/searx/static/themes/simple/img/img_load_error.svg b/searx/static/themes/simple/img/img_load_error.svg index 92fdbf03c..27ff0f056 100644 --- a/searx/static/themes/simple/img/img_load_error.svg +++ b/searx/static/themes/simple/img/img_load_error.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/searx/static/themes/simple/img/searxng.png b/searx/static/themes/simple/img/searxng.png index 36a889711..8b9999abd 100644 Binary files a/searx/static/themes/simple/img/searxng.png and b/searx/static/themes/simple/img/searxng.png differ diff --git a/searx/static/themes/simple/img/searxng.svg b/searx/static/themes/simple/img/searxng.svg index 26a55f7dd..e965ed242 100644 --- a/searx/static/themes/simple/img/searxng.svg +++ b/searx/static/themes/simple/img/searxng.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/searx/static/themes/simple/js/leaflet.js b/searx/static/themes/simple/js/leaflet.js index a98a4116f..1b66ed6a4 100644 --- a/searx/static/themes/simple/js/leaflet.js +++ b/searx/static/themes/simple/js/leaflet.js @@ -1,6 +1,6 @@ /* @preserve - * Leaflet 1.8.0, a JS library for interactive maps. https://leafletjs.com + * Leaflet 1.9.2, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade */ -!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i((t="undefined"!=typeof globalThis?globalThis:t||self).leaflet={})}(this,function(t){"use strict";function l(t){for(var i,e,n=1,o=arguments.length;n=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=f(t);var i=this.min,e=this.max,n=t.min,t=t.max,o=t.x>=i.x&&n.x<=e.x,t=t.y>=i.y&&n.y<=e.y;return o&&t},overlaps:function(t){t=f(t);var i=this.min,e=this.max,n=t.min,t=t.max,o=t.x>i.x&&n.xi.y&&n.y=n.lat&&e.lat<=o.lat&&i.lng>=n.lng&&e.lng<=o.lng},intersects:function(t){t=g(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),t=t.getNorthEast(),o=t.lat>=i.lat&&n.lat<=e.lat,t=t.lng>=i.lng&&n.lng<=e.lng;return o&&t},overlaps:function(t){t=g(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),t=t.getNorthEast(),o=t.lat>i.lat&&n.lati.lng&&n.lng","http://www.w3.org/2000/svg"===(Wt.firstChild&&Wt.firstChild.namespaceURI));function y(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var P={ie:pt,ielt9:mt,edge:n,webkit:ft,android:gt,android23:vt,androidStock:yt,opera:xt,chrome:wt,gecko:Pt,safari:bt,phantom:Lt,opera12:o,win:Tt,ie3d:zt,webkit3d:Mt,gecko3d:_t,any3d:Ct,mobile:Zt,mobileWebkit:St,mobileWebkit3d:kt,msPointer:Et,pointer:Bt,touch:It,touchNative:At,mobileOpera:Ot,mobileGecko:Rt,retina:Nt,passiveEvents:Dt,canvas:jt,svg:Ht,vml:!Ht&&function(){try{var t=document.createElement("div"),i=(t.innerHTML='',t.firstChild);return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}(),inlineSvg:Wt},Ft=P.msPointer?"MSPointerDown":"pointerdown",Ut=P.msPointer?"MSPointerMove":"pointermove",Vt=P.msPointer?"MSPointerUp":"pointerup",qt=P.msPointer?"MSPointerCancel":"pointercancel",Gt={touchstart:Ft,touchmove:Ut,touchend:Vt,touchcancel:qt},Kt={touchstart:function(t,i){i.MSPOINTER_TYPE_TOUCH&&i.pointerType===i.MSPOINTER_TYPE_TOUCH&&B(i);ii(t,i)},touchmove:ii,touchend:ii,touchcancel:ii},Yt={},Xt=!1;function Jt(t,i,e){return"touchstart"!==i||Xt||(document.addEventListener(Ft,$t,!0),document.addEventListener(Ut,Qt,!0),document.addEventListener(Vt,ti,!0),document.addEventListener(qt,ti,!0),Xt=!0),Kt[i]?(e=Kt[i].bind(this,e),t.addEventListener(Gt[i],e,!1),e):(console.warn("wrong event specified:",i),L.Util.falseFn)}function $t(t){Yt[t.pointerId]=t}function Qt(t){Yt[t.pointerId]&&(Yt[t.pointerId]=t)}function ti(t){delete Yt[t.pointerId]}function ii(t,i){if(i.pointerType!==(i.MSPOINTER_TYPE_MOUSE||"mouse")){for(var e in i.touches=[],Yt)i.touches.push(Yt[e]);i.changedTouches=[i],t(i)}}var ei=200;function ni(t,e){t.addEventListener("dblclick",e);var n,o=0;function i(t){var i;1!==t.detail?n=t.detail:"mouse"===t.pointerType||t.sourceCapabilities&&!t.sourceCapabilities.firesTouchEvents||((i=Date.now())-o<=ei?2===++n&&e(function(t){var i,e,n={};for(e in t)i=t[e],n[e]=i&&i.bind?i.bind(t):i;return(t=n).type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}(t)):n=1,o=i)}return t.addEventListener("click",i),{dblclick:e,simDblclick:i}}var oi,si,ri,ai,hi,li,ui=wi(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ci=wi(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),di="webkitTransition"===ci||"OTransition"===ci?ci+"End":"transitionend";function _i(t){return"string"==typeof t?document.getElementById(t):t}function pi(t,i){var e=t.style[i]||t.currentStyle&&t.currentStyle[i];return"auto"===(e=e&&"auto"!==e||!document.defaultView?e:(t=document.defaultView.getComputedStyle(t,null))?t[i]:null)?null:e}function b(t,i,e){t=document.createElement(t);return t.className=i||"",e&&e.appendChild(t),t}function T(t){var i=t.parentNode;i&&i.removeChild(t)}function mi(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function fi(t){var i=t.parentNode;i&&i.lastChild!==t&&i.appendChild(t)}function gi(t){var i=t.parentNode;i&&i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function vi(t,i){if(void 0!==t.classList)return t.classList.contains(i);t=xi(t);return 0this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var e=this.getCenter(),t=this._limitCenter(e,this._zoom,g(t));return e.equals(t)||this.panTo(t,i),this._enforcingBounds=!1,this},panInside:function(t,i){var e=_((i=i||{}).paddingTopLeft||i.padding||[0,0]),n=_(i.paddingBottomRight||i.padding||[0,0]),o=this.project(this.getCenter()),t=this.project(t),s=this.getPixelBounds(),e=f([s.min.add(e),s.max.subtract(n)]),s=e.getSize();return e.contains(t)||(this._enforcingBounds=!0,n=t.subtract(e.getCenter()),e=e.extend(t).getSize().subtract(s),o.x+=n.x<0?-e.x:e.x,o.y+=n.y<0?-e.y:e.y,this.panTo(this.unproject(o),i),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=l({animate:!1,pan:!0},!0===t?{animate:!0}:t);var i=this.getSize(),e=(this._sizeChanged=!0,this._lastCenter=null,this.getSize()),n=i.divideBy(2).round(),o=e.divideBy(2).round(),n=n.subtract(o);return n.x||n.y?(t.animate&&t.pan?this.panBy(n):(t.pan&&this._rawPanBy(n),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,newSize:e})):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=l({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var i=a(this._handleGeolocationResponse,this),e=a(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(i,e,t):navigator.geolocation.getCurrentPosition(i,e,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var i;this._container._leaflet_id&&(i=t.code,t=t.message||(1===i?"permission denied":2===i?"position unavailable":"timeout"),this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:i,message:"Geolocation error: "+t+"."}))},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var i,e,n=new v(t.coords.latitude,t.coords.longitude),o=n.toBounds(2*t.coords.accuracy),s=this._locateOptions,r=(s.setView&&(i=this.getBoundsZoom(o),this.setView(n,s.maxZoom?Math.min(i,s.maxZoom):i)),{latlng:n,bounds:o,timestamp:t.timestamp});for(e in t.coords)"number"==typeof t.coords[e]&&(r[e]=t.coords[e]);this.fire("locationfound",r)}},addHandler:function(t,i){if(!i)return this;i=this[t]=new i(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}for(var t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),T(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(r(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)T(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,i){i=b("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),i||this._mapPane);return t&&(this._panes[t]=i),i},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new s(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,i,e){t=g(t),e=_(e||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),t=t.getSouthEast(),e=this.getSize().subtract(e),t=f(this.project(t,n),this.project(r,n)).getSize(),r=P.any3d?this.options.zoomSnap:1,a=e.x/t.x,e=e.y/t.y,t=i?Math.max(a,e):Math.min(a,e),n=this.getScaleZoom(t,n);return r&&(n=Math.round(n/(r/100))*(r/100),n=i?Math.ceil(n/r)*r:Math.floor(n/r)*r),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new p(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,i){t=this._getTopLeftPoint(t,i);return new m(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,i){var e=this.options.crs;return i=void 0===i?this._zoom:i,e.scale(t)/e.scale(i)},getScaleZoom:function(t,i){var e=this.options.crs,t=(i=void 0===i?this._zoom:i,e.zoom(t*e.scale(i)));return isNaN(t)?1/0:t},project:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.latLngToPoint(w(t),i)},unproject:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.pointToLatLng(_(t),i)},layerPointToLatLng:function(t){t=_(t).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(t){return this.project(w(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(w(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(g(t))},distance:function(t,i){return this.options.crs.distance(w(t),w(i))},containerPointToLayerPoint:function(t){return _(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return _(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){t=this.containerPointToLayerPoint(_(t));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(w(t)))},mouseEventToContainerPoint:function(t){return Ni(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){t=this._container=_i(t);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");S(t,"scroll",this._onScroll,this),this._containerId=h(t)},_initLayout:function(){var t=this._container,i=(this._fadeAnimated=this.options.fadeAnimation&&P.any3d,z(t,"leaflet-container"+(P.touch?" leaflet-touch":"")+(P.retina?" leaflet-retina":"")+(P.ielt9?" leaflet-oldie":"")+(P.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")),pi(t,"position"));"absolute"!==i&&"relative"!==i&&"fixed"!==i&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Z(this._mapPane,new p(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(z(t.markerPane,"leaflet-zoom-hide"),z(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,i){Z(this._mapPane,new p(0,0));var e=!this._loaded,n=(this._loaded=!0,i=this._limitZoom(i),this.fire("viewprereset"),this._zoom!==i);this._moveStart(n,!1)._move(t,i)._moveEnd(n),this.fire("viewreset"),e&&this.fire("load")},_moveStart:function(t,i){return t&&this.fire("zoomstart"),i||this.fire("movestart"),this},_move:function(t,i,e,n){void 0===i&&(i=this._zoom);var o=this._zoom!==i;return this._zoom=i,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?e&&e.pinch&&this.fire("zoom",e):((o||e&&e.pinch)&&this.fire("zoom",e),this.fire("move",e)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return r(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Z(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var i=t?E:S;i((this._targets[h(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&i(window,"resize",this._onResize,this),P.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){r(this._resizeRequest),this._resizeRequest=x(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,i){for(var e,n=[],o="mouseout"===i||"mouseover"===i,s=t.target||t.srcElement,r=!1;s;){if((e=this._targets[h(s)])&&("click"===i||"preclick"===i)&&this._draggableMoved(e)){r=!0;break}if(e&&e.listens(i,!0)){if(o&&!Hi(s,t))break;if(n.push(e),o)break}if(s===this._container)break;s=s.parentNode}return n=n.length||r||o||!this.listens(i,!0)?n:[this]},_isClickDisabled:function(t){for(;t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var i,e=t.target||t.srcElement;!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e)||("mousedown"===(i=t.type)&&zi(e),this._fireDOMEvent(t,i))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,e){"click"===t.type&&((a=l({},t)).type="preclick",this._fireDOMEvent(a,a.type,e));var n=this._findEventTargets(t,i);if(e){for(var o=[],s=0;sthis.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),n=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==e.animate&&!this.getSize().contains(n))&&(x(function(){this._moveStart(!0,!1)._animateZoom(t,i,!0)},this),!0)},_animateZoom:function(t,i,e,n){this._mapPane&&(e&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,z(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&M(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Fi(t){return new I(t)}var Ui,I=it.extend({options:{position:"topright"},initialize:function(t){c(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),e=this.getPosition(),t=t._controlCorners[e];return z(i,"leaflet-control"),-1!==e.indexOf("bottom")?t.insertBefore(i,t.firstChild):t.appendChild(i),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(T(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0",i=document.createElement("div");return i.innerHTML=t,i.firstChild},_addItem:function(t){var i,e=document.createElement("label"),n=this._map.hasLayer(t.layer),n=(t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=n):i=this._createRadioElement("leaflet-base-layers_"+h(this),n),this._layerControlInputs.push(i),i.layerId=h(t.layer),S(i,"click",this._onInputClick,this),document.createElement("span")),o=(n.innerHTML=" "+t.name,document.createElement("span"));return e.appendChild(o),o.appendChild(i),o.appendChild(n),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){var t,i,e=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=e.length-1;0<=s;s--)t=e[s],i=this._getLayer(t.layerId).layer,t.checked?n.push(i):t.checked||o.push(i);for(s=0;si.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this}})),qi=I.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",e=b("div",i+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,i,e,n,o){e=b("a",e,n);return e.innerHTML=t,e.href="#",e.title=i,e.setAttribute("role","button"),e.setAttribute("aria-label",i),Oi(e),S(e,"click",Ri),S(e,"click",o,this),S(e,"click",this._refocusOnMap,this),e},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";M(this._zoomInButton,i),M(this._zoomOutButton,i),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),!this._disabled&&t._zoom!==t.getMinZoom()||(z(this._zoomOutButton,i),this._zoomOutButton.setAttribute("aria-disabled","true")),!this._disabled&&t._zoom!==t.getMaxZoom()||(z(this._zoomInButton,i),this._zoomInButton.setAttribute("aria-disabled","true"))}}),Gi=(A.mergeOptions({zoomControl:!0}),A.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new qi,this.addControl(this.zoomControl))}),I.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i="leaflet-control-scale",e=b("div",i),n=this.options;return this._addScales(n,i+"-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,e){t.metric&&(this._mScale=b("div",i,e)),t.imperial&&(this._iScale=b("div",i,e))},_update:function(){var t=this._map,i=t.getSize().y/2,t=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(t)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t);this._updateScale(this._mScale,i<1e3?i+" m":i/1e3+" km",i/t)},_updateImperial:function(t){var i,e,t=3.2808399*t;5280'+(P.inlineSvg?' ':"")+"Leaflet"},initialize:function(t){c(this,t),this._attributions={}},onAdd:function(t){for(var i in(t.attributionControl=this)._container=b("div","leaflet-control-attribution"),Oi(this._container),t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},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},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t,i=[];for(t in this._attributions)this._attributions[t]&&i.push(t);var e=[];this.options.prefix&&e.push(this.options.prefix),i.length&&e.push(i.join(", ")),this._container.innerHTML=e.join(' ')}}}),n=(A.mergeOptions({attributionControl:!0}),A.addInitHook(function(){this.options.attributionControl&&(new Ki).addTo(this)}),I.Layers=Vi,I.Zoom=qi,I.Scale=Gi,I.Attribution=Ki,Fi.layers=function(t,i,e){return new Vi(t,i,e)},Fi.zoom=function(t){return new qi(t)},Fi.scale=function(t){return new Gi(t)},Fi.attribution=function(t){return new Ki(t)},it.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}})),ft=(n.addTo=function(t,i){return t.addHandler(i,this),this},{Events:i}),Yi=P.touch?"touchstart mousedown":"mousedown",Xi=et.extend({options:{clickTolerance:3},initialize:function(t,i,e,n){c(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=e},enable:function(){this._enabled||(S(this._dragStartTarget,Yi,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Xi._dragging===this&&this.finishDrag(!0),E(this._dragStartTarget,Yi,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var i,e;this._enabled&&(this._moved=!1,vi(this._element,"leaflet-zoom-anim")||(t.touches&&1!==t.touches.length?Xi._dragging===this&&this.finishDrag():Xi._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((Xi._dragging=this)._preventOutline&&zi(this._element),Li(),ri(),this._moving||(this.fire("down"),e=t.touches?t.touches[0]:t,i=Ci(this._element),this._startPoint=new p(e.clientX,e.clientY),this._startPos=bi(this._element),this._parentScale=Zi(i),e="mousedown"===t.type,S(document,e?"mousemove":"touchmove",this._onMove,this),S(document,e?"mouseup":"touchend touchcancel",this._onUp,this)))))},_onMove:function(t){var i;this._enabled&&(t.touches&&1i&&(e.push(t[n]),o=n);oi.max.x&&(e|=2),t.yi.max.y&&(e|=8),e}function ee(t,i,e,n){var o=i.x,i=i.y,s=e.x-o,r=e.y-i,a=s*s+r*r;return 0this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()t.y!=n.y>t.y&&t.x<(n.x-e.x)*(t.y-e.y)/(n.y-e.y)+e.x&&(l=!l);return l||fe.prototype._containsPoint.call(this,t,!0)}});var ve=he.extend({initialize:function(t,i){c(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,e,n,o=d(t)?t:t.features;if(o){for(i=0,e=o.length;ir.x&&(a=n.x+h-r.x+s.x),n.x-a-o.x<(h=0)&&(a=n.x-o.x),n.y+e+s.y>r.y&&(h=n.y+e-r.y+s.y),n.y-h-o.y<0&&(h=n.y-o.y),(a||h)&&i.fire("autopanstart").panBy([a,h],{animate:t&&"moveend"===t.type}))},_getAnchor:function(){return _(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}})),Ee=(A.mergeOptions({closePopupOnClick:!0}),A.include({openPopup:function(t,i,e){return this._initOverlay(ke,t,i,e).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),o.include({bindPopup:function(t,i){return this._popup=this._initOverlay(ke,this._popup,t,i),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&this._popup._prepareOpen(t)&&this._popup.openOn(this._map),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var i;this._popup&&this._map&&(Ri(t),i=t.layer||t.target,this._popup._source!==i||i instanceof _e?(this._popup._source=i,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}}),O.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){O.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){O.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=O.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=b("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i,e=this._map,n=this._container,o=e.latLngToContainerPoint(e.getCenter()),e=e.layerPointToContainerPoint(t),s=this.options.direction,r=n.offsetWidth,a=n.offsetHeight,h=_(this.options.offset),l=this._getAnchor(),e="top"===s?(i=r/2,a):"bottom"===s?(i=r/2,0):(i="center"===s?r/2:"right"===s?0:"left"===s?r:e.xthis.options.maxZoom||nthis.options.maxZoom||void 0!==this.options.minZoom&&oe.max.x)||!i.wrapLat&&(t.ye.max.y))return!1}if(!this.options.bounds)return!0;i=this._tileCoordsToBounds(t);return g(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,e=this.getTileSize(),n=t.scaleBy(e),e=n.add(e);return[i.unproject(n,t.z),i.unproject(e,t.z)]},_tileCoordsToBounds:function(t){t=this._tileCoordsToNwSe(t),t=new s(t[0],t[1]);return t=this.options.noWrap?t:this._map.wrapLatLngBounds(t)},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var t=t.split(":"),i=new p(+t[0],+t[1]);return i.z=+t[2],i},_removeTile:function(t){var i=this._tiles[t];i&&(T(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){z(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=u,t.onmousemove=u,P.ielt9&&this.options.opacity<1&&C(t,this.options.opacity)},_addTile:function(t,i){var e=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),a(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&x(a(this._tileReady,this,t,null,o)),Z(o,e),this._tiles[n]={el:o,coords:t,current:!0},i.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,i,e){i&&this.fire("tileerror",{error:i,tile:e,coords:t});var n=this._tileCoordsToKey(t);(e=this._tiles[n])&&(e.loaded=+new Date,this._map._fadeAnimated?(C(e.el,0),r(this._fadeFrame),this._fadeFrame=x(this._updateOpacity,this)):(e.active=!0,this._pruneTiles()),i||(z(e.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:e.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),P.ielt9||!this._map._fadeAnimated?x(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new p(this._wrapX?H(t.x,this._wrapX):t.x,this._wrapY?H(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new m(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var Ie=Ae.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,i){this._url=t,(i=c(this,i)).detectRetina&&P.retina&&0')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Mt={_initContainer:function(){this._container=b("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ne.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=He("shape");z(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=He("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;T(i),t.removeInteractiveTarget(i),delete this._layers[h(t)]},_updateStyle:function(t){var i=t._stroke,e=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(i=i||(t._stroke=He("stroke")),o.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,n.dashArray?i.dashStyle=d(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):i.dashStyle="",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(o.removeChild(i),t._stroke=null),n.fill?(e=e||(t._fill=He("fill")),o.appendChild(e),e.color=n.fillColor||n.color,e.opacity=n.fillOpacity):e&&(o.removeChild(e),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),e=Math.round(t._radius),n=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+e+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){fi(t._container)},_bringToBack:function(t){gi(t._container)}},We=P.vml?He:ct,Fe=Ne.extend({_initContainer:function(){this._container=We("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=We("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){T(this._container),E(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){var t,i,e;this._map._animatingZoom&&this._bounds||(Ne.prototype._update.call(this),i=(t=this._bounds).getSize(),e=this._container,this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,e.setAttribute("width",i.x),e.setAttribute("height",i.y)),Z(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update"))},_initPath:function(t){var i=t._path=We("path");t.options.className&&z(i,t.options.className),t.options.interactive&&z(i,"leaflet-interactive"),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){T(t._path),t.removeInteractiveTarget(t._path),delete this._layers[h(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,t=t.options;i&&(t.stroke?(i.setAttribute("stroke",t.color),i.setAttribute("stroke-opacity",t.opacity),i.setAttribute("stroke-width",t.weight),i.setAttribute("stroke-linecap",t.lineCap),i.setAttribute("stroke-linejoin",t.lineJoin),t.dashArray?i.setAttribute("stroke-dasharray",t.dashArray):i.removeAttribute("stroke-dasharray"),t.dashOffset?i.setAttribute("stroke-dashoffset",t.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),t.fill?(i.setAttribute("fill",t.fillColor||t.color),i.setAttribute("fill-opacity",t.fillOpacity),i.setAttribute("fill-rule",t.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,dt(t._parts,i))},_updateCircle:function(t){var i=t._point,e=Math.max(Math.round(t._radius),1),n="a"+e+","+(Math.max(Math.round(t._radiusY),1)||e)+" 0 1,0 ",i=t._empty()?"M0 0":"M"+(i.x-e)+","+i.y+n+2*e+",0 "+n+2*-e+",0 ";this._setPath(t,i)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){fi(t._path)},_bringToBack:function(t){gi(t._path)}});function Ue(t){return P.svg||P.vml?new Fe(t):null}P.vml&&Fe.include(Mt),A.include({getRenderer:function(t){t=(t=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer());return this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=this._createRenderer({pane:t}),this._paneRenderers[t]=i),i},_createRenderer:function(t){return this.options.preferCanvas&&je(t)||Ue(t)}});var Ve=ge.extend({initialize:function(t,i){ge.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=g(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Fe.create=We,Fe.pointsToPath=dt,ve.geometryToLayer=ye,ve.coordsToLatLng=we,ve.coordsToLatLngs=Pe,ve.latLngToCoords=be,ve.latLngsToCoords=Le,ve.getFeature=Te,ve.asFeature=ze,A.mergeOptions({boxZoom:!0});var _t=n.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){S(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){E(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){T(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),ri(),Li(),this._startPoint=this._map.mouseEventToContainerPoint(t),S(document,{contextmenu:Ri,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=b("div","leaflet-zoom-box",this._container),z(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var t=new m(this._point,this._startPoint),i=t.getSize();Z(this._box,t.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(T(this._box),M(this._container,"leaflet-crosshair")),ai(),Ti(),E(document,{contextmenu:Ri,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0),t=new s(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})))},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}),Ct=(A.addInitHook("addHandler","boxZoom",_t),A.mergeOptions({doubleClickZoom:!0}),n.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,e=i.getZoom(),n=i.options.zoomDelta,e=t.originalEvent.shiftKey?e-n:e+n;"center"===i.options.doubleClickZoom?i.setZoom(e):i.setZoomAround(t.containerPoint,e)}})),Zt=(A.addInitHook("addHandler","doubleClickZoom",Ct),A.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),n.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new Xi(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),z(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){M(this._map._container,"leaflet-grab"),M(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,i=this._map;i._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=g(this._map.options.maxBounds),this._offsetLimit=f(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,i.fire("movestart").fire("dragstart"),i.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var i,e;this._map.options.inertia&&(i=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(e),this._times.push(i),this._prunePositions(i)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1i.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),e=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-i+e)%t+i-e,n=(n+i+e)%t-i-e,t=Math.abs(o+e)i.getMaxZoom()&&1=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=_(t);var e=this.min,i=this.max,n=t.min,t=t.max,o=t.x>=e.x&&n.x<=i.x,t=t.y>=e.y&&n.y<=i.y;return o&&t},overlaps:function(t){t=_(t);var e=this.min,i=this.max,n=t.min,t=t.max,o=t.x>e.x&&n.xe.y&&n.y=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=g(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),t=t.getNorthEast(),o=t.lat>=e.lat&&n.lat<=i.lat,t=t.lng>=e.lng&&n.lng<=i.lng;return o&&t},overlaps:function(t){t=g(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),t=t.getNorthEast(),o=t.lat>e.lat&&n.late.lng&&n.lng","http://www.w3.org/2000/svg"===(Ft.firstChild&&Ft.firstChild.namespaceURI));function y(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var b={ie:pt,ielt9:mt,edge:n,webkit:ft,android:gt,android23:vt,androidStock:yt,opera:xt,chrome:wt,gecko:bt,safari:Pt,phantom:Lt,opera12:o,win:Tt,ie3d:Mt,webkit3d:zt,gecko3d:_t,any3d:Ct,mobile:Zt,mobileWebkit:St,mobileWebkit3d:Et,msPointer:kt,pointer:At,touch:Ot,touchNative:Bt,mobileOpera:It,mobileGecko:Rt,retina:Nt,passiveEvents:Dt,canvas:jt,svg:Ht,vml:!Ht&&function(){try{var t=document.createElement("div"),e=(t.innerHTML='',t.firstChild);return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),inlineSvg:Ft,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},Wt=b.msPointer?"MSPointerDown":"pointerdown",Ut=b.msPointer?"MSPointerMove":"pointermove",Vt=b.msPointer?"MSPointerUp":"pointerup",qt=b.msPointer?"MSPointerCancel":"pointercancel",Gt={touchstart:Wt,touchmove:Ut,touchend:Vt,touchcancel:qt},Kt={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&A(e);ee(t,e)},touchmove:ee,touchend:ee,touchcancel:ee},Yt={},Xt=!1;function Jt(t,e,i){return"touchstart"!==e||Xt||(document.addEventListener(Wt,$t,!0),document.addEventListener(Ut,Qt,!0),document.addEventListener(Vt,te,!0),document.addEventListener(qt,te,!0),Xt=!0),Kt[e]?(i=Kt[e].bind(this,i),t.addEventListener(Gt[e],i,!1),i):(console.warn("wrong event specified:",e),L.Util.falseFn)}function $t(t){Yt[t.pointerId]=t}function Qt(t){Yt[t.pointerId]&&(Yt[t.pointerId]=t)}function te(t){delete Yt[t.pointerId]}function ee(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],Yt)e.touches.push(Yt[i]);e.changedTouches=[e],t(e)}}var ie=200;function ne(t,i){t.addEventListener("dblclick",i);var n,o=0;function e(t){var e;1!==t.detail?n=t.detail:"mouse"===t.pointerType||t.sourceCapabilities&&!t.sourceCapabilities.firesTouchEvents||((e=Ne(t)).some(function(t){return t instanceof HTMLLabelElement&&t.attributes.for})&&!e.some(function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement})||((e=Date.now())-o<=ie?2===++n&&i(function(t){var e,i,n={};for(i in t)e=t[i],n[i]=e&&e.bind?e.bind(t):e;return(t=n).type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}(t)):n=1,o=e))}return t.addEventListener("click",e),{dblclick:i,simDblclick:e}}var oe,se,re,ae,he,le,ue=we(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ce=we(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===ce||"OTransition"===ce?ce+"End":"transitionend";function _e(t){return"string"==typeof t?document.getElementById(t):t}function pe(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];return"auto"===(i=i&&"auto"!==i||!document.defaultView?i:(t=document.defaultView.getComputedStyle(t,null))?t[e]:null)?null:i}function P(t,e,i){t=document.createElement(t);return t.className=e||"",i&&i.appendChild(t),t}function T(t){var e=t.parentNode;e&&e.removeChild(t)}function me(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function fe(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ge(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ve(t,e){return void 0!==t.classList?t.classList.contains(e):0<(t=xe(t)).length&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(t)}function M(t,e){var i;if(void 0!==t.classList)for(var n=W(e),o=0,s=n.length;othis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),t=this._limitCenter(i,this._zoom,g(t));return i.equals(t)||this.panTo(t,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=m((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=m(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),t=this.project(t),s=this.getPixelBounds(),i=_([s.min.add(i),s.max.subtract(n)]),s=i.getSize();return i.contains(t)||(this._enforcingBounds=!0,n=t.subtract(i.getCenter()),i=i.extend(t).getSize().subtract(s),o.x+=n.x<0?-i.x:i.x,o.y+=n.y<0?-i.y:i.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=l({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize(),i=(this._sizeChanged=!0,this._lastCenter=null,this.getSize()),n=e.divideBy(2).round(),o=i.divideBy(2).round(),n=n.subtract(o);return n.x||n.y?(t.animate&&t.pan?this.panBy(n):(t.pan&&this._rawPanBy(n),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(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){var e,i;return t=this._locateOptions=l({timeout:1e4,watch:!1},t),"geolocation"in navigator?(e=a(this._handleGeolocationResponse,this),i=a(this._handleGeolocationError,this),t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t)):this._handleGeolocationError({code:0,message:"Geolocation not supported."}),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;this._container._leaflet_id&&(e=t.code,t=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: "+t+"."}))},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e,i,n=new v(t.coords.latitude,t.coords.longitude),o=n.toBounds(2*t.coords.accuracy),s=this._locateOptions,r=(s.setView&&(e=this.getBoundsZoom(o),this.setView(n,s.maxZoom?Math.min(e,s.maxZoom):e)),{latlng:n,bounds:o,timestamp:t.timestamp});for(i in t.coords)"number"==typeof t.coords[i]&&(r[i]=t.coords[i]);this.fire("locationfound",r)}},addHandler:function(t,e){return e&&(e=this[t]=new e(this),this._handlers.push(e),this.options[t]&&e.enable()),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}for(var t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),T(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(r(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)T(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){e=P("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new s(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=g(t),i=m(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),t=t.getSouthEast(),i=this.getSize().subtract(i),t=_(this.project(t,n),this.project(r,n)).getSize(),r=b.any3d?this.options.zoomSnap:1,a=i.x/t.x,i=i.y/t.y,t=e?Math.max(a,i):Math.min(a,i),n=this.getScaleZoom(t,n);return r&&(n=Math.round(n/(r/100))*(r/100),n=e?Math.ceil(n/r)*r:Math.floor(n/r)*r),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new p(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){t=this._getTopLeftPoint(t,e);return new f(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs,t=(e=void 0===e?this._zoom:e,i.zoom(t*i.scale(e)));return isNaN(t)?1/0:t},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(w(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(m(t),e)},layerPointToLatLng:function(t){t=m(t).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(t){return this.project(w(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(w(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(g(t))},distance:function(t,e){return this.options.crs.distance(w(t),w(e))},containerPointToLayerPoint:function(t){return m(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return m(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){t=this.containerPointToLayerPoint(m(t));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(w(t)))},mouseEventToContainerPoint:function(t){return De(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){t=this._container=_e(t);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");S(t,"scroll",this._onScroll,this),this._containerId=h(t)},_initLayout:function(){var t=this._container,e=(this._fadeAnimated=this.options.fadeAnimation&&b.any3d,M(t,"leaflet-container"+(b.touch?" leaflet-touch":"")+(b.retina?" leaflet-retina":"")+(b.ielt9?" leaflet-oldie":"")+(b.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")),pe(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),Z(this._mapPane,new p(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(M(t.markerPane,"leaflet-zoom-hide"),M(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){Z(this._mapPane,new p(0,0));var n=!this._loaded,o=(this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset"),this._zoom!==e);this._moveStart(o,i)._move(t,e)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return r(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Z(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var e=t?k:S;e((this._targets[h(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),b.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){r(this._resizeRequest),this._resizeRequest=x(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=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,r=!1;s;){if((i=this._targets[h(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){r=!0;break}if(i&&i.listens(e,!0)){if(o&&!Fe(s,t))break;if(n.push(i),o)break}if(s===this._container)break;s=s.parentNode}return n=n.length||r||o||!this.listens(e,!0)?n:[this]},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e,i=t.target||t.srcElement;!this._loaded||i._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(i)||("mousedown"===(e=t.type)&&Me(i),this._fireDOMEvent(t,e))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){"click"===t.type&&((a=l({},t)).type="preclick",this._fireDOMEvent(a,a.type,i));var n=this._findEventTargets(t,e);if(i){for(var o=[],s=0;sthis.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),n=this._getCenterOffset(t)._divideBy(1-1/n);if(!0!==i.animate&&!this.getSize().contains(n))return!1;x(function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)},this)}return!0},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,M(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&z(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Ue(t){return new O(t)}var Ve,O=et.extend({options:{position:"topright"},initialize:function(t){c(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(),t=t._controlCorners[i];return M(e,"leaflet-control"),-1!==i.indexOf("bottom")?t.insertBefore(e,t.firstChild):t.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(T(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0",e=document.createElement("div");return e.innerHTML=t,e.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer),n=(t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+h(this),n),this._layerControlInputs.push(e),e.layerId=h(t.layer),S(e,"click",this._onInputClick,this),document.createElement("span")),o=(n.innerHTML=" "+t.name,document.createElement("span"));return i.appendChild(o),o.appendChild(e),o.appendChild(n),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=i.length-1;0<=s;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(s=0;se.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this}})),Ge=O.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=P("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._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){i=P("a",i,n);return i.innerHTML=t,i.href="#",i.title=e,i.setAttribute("role","button"),i.setAttribute("aria-label",e),Ie(i),S(i,"click",Re),S(i,"click",o,this),S(i,"click",this._refocusOnMap,this),i},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";z(this._zoomInButton,e),z(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),!this._disabled&&t._zoom!==t.getMinZoom()||(M(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),!this._disabled&&t._zoom!==t.getMaxZoom()||(M(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}}),Ke=(B.mergeOptions({zoomControl:!0}),B.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ge,this.addControl(this.zoomControl))}),O.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=P("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=P("div",e,i)),t.imperial&&(this._iScale=P("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,t=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(t)},_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);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,i,t=3.2808399*t;5280'+(b.inlineSvg?' ':"")+"Leaflet"},initialize:function(t){c(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=P("div","leaflet-control-attribution"),Ie(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},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},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t,e=[];for(t in this._attributions)this._attributions[t]&&e.push(t);var i=[];this.options.prefix&&i.push(this.options.prefix),e.length&&i.push(e.join(", ")),this._container.innerHTML=i.join(' ')}}}),n=(B.mergeOptions({attributionControl:!0}),B.addInitHook(function(){this.options.attributionControl&&(new Ye).addTo(this)}),O.Layers=qe,O.Zoom=Ge,O.Scale=Ke,O.Attribution=Ye,Ue.layers=function(t,e,i){return new qe(t,e,i)},Ue.zoom=function(t){return new Ge(t)},Ue.scale=function(t){return new Ke(t)},Ue.attribution=function(t){return new Ye(t)},et.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}})),ft=(n.addTo=function(t,e){return t.addHandler(e,this),this},{Events:e}),Xe=b.touch?"touchstart mousedown":"mousedown",Je=it.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){c(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(S(this._dragStartTarget,Xe,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Je._dragging===this&&this.finishDrag(!0),k(this._dragStartTarget,Xe,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var e,i;this._enabled&&(this._moved=!1,ve(this._element,"leaflet-zoom-anim")||(t.touches&&1!==t.touches.length?Je._dragging===this&&this.finishDrag():Je._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((Je._dragging=this)._preventOutline&&Me(this._element),Le(),re(),this._moving||(this.fire("down"),i=t.touches?t.touches[0]:t,e=Ce(this._element),this._startPoint=new p(i.clientX,i.clientY),this._startPos=Pe(this._element),this._parentScale=Ze(e),i="mousedown"===t.type,S(document,i?"mousemove":"touchmove",this._onMove,this),S(document,i?"mouseup":"touchend touchcancel",this._onUp,this)))))},_onMove:function(t){var e;this._enabled&&(t.touches&&1e&&(i.push(t[n]),o=n);oe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function ni(t,e,i,n){var o=e.x,e=e.y,s=i.x-o,r=i.y-e,a=s*s+r*r;return 0this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(l=!l);return l||vi.prototype._containsPoint.call(this,t,!0)}});var xi=ui.extend({initialize:function(t,e){c(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=d(t)?t:t.features;if(o){for(e=0,i=o.length;er.x&&(a=n.x+h-r.x+s.x),n.x-a-o.x<(h=0)&&(a=n.x-o.x),n.y+i+s.y>r.y&&(h=n.y+i-r.y+s.y),n.y-h-o.y<0&&(h=n.y-o.y),(a||h)&&e.fire("autopanstart").panBy([a,h],{animate:t&&"moveend"===t.type}))},_getAnchor:function(){return m(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}})),Oi=(B.mergeOptions({closePopupOnClick:!0}),B.include({openPopup:function(t,e,i){return this._initOverlay(Bi,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),o.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Bi,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),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;this._popup&&this._map&&(Re(t),e=t.layer||t.target,this._popup._source!==e||e instanceof mi?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}}),Ai.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ai.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ai.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ai.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=P("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+h(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i=this._map,n=this._container,o=i.latLngToContainerPoint(i.getCenter()),i=i.layerPointToContainerPoint(t),s=this.options.direction,r=n.offsetWidth,a=n.offsetHeight,h=m(this.options.offset),l=this._getAnchor(),i="top"===s?(e=r/2,a):"bottom"===s?(e=r/2,0):(e="center"===s?r/2:"right"===s?0:"left"===s?r:i.xthis.options.maxZoom||nthis.options.maxZoom||void 0!==this.options.minZoom&&oi.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}return!this.options.bounds||(e=this._tileCoordsToBounds(t),g(this.options.bounds).overlaps(e))},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),i=n.add(i);return[e.unproject(n,t.z),e.unproject(i,t.z)]},_tileCoordsToBounds:function(t){t=this._tileCoordsToNwSe(t),t=new s(t[0],t[1]);return t=this.options.noWrap?t:this._map.wrapLatLngBounds(t)},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var t=t.split(":"),e=new p(+t[0],+t[1]);return e.z=+t[2],e},_removeTile:function(t){var e=this._tiles[t];e&&(T(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){M(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,b.ielt9&&this.options.opacity<1&&C(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),a(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&x(a(this._tileReady,this,t,null,o)),Z(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(C(i.el,0),r(this._fadeFrame),this._fadeFrame=x(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(M(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),b.ielt9||!this._map._fadeAnimated?x(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new p(this._wrapX?H(t.x,this._wrapX):t.x,this._wrapY?H(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new f(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}});var Ni=Ri.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=c(this,e)).detectRetina&&b.retina&&0')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),zt={_initContainer:function(){this._container=P("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Hi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Ui("shape");M(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Ui("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[h(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;T(e),t.removeInteractiveTarget(e),delete this._layers[h(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e=e||(t._stroke=Ui("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=d(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i=i||(t._fill=Ui("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.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){fe(t._container)},_bringToBack:function(t){ge(t._container)}},Vi=b.vml?Ui:ct,qi=Hi.extend({_initContainer:function(){this._container=Vi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Vi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){T(this._container),k(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){var t,e,i;this._map._animatingZoom&&this._bounds||(Hi.prototype._update.call(this),e=(t=this._bounds).getSize(),i=this._container,this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),Z(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=Vi("path");t.options.className&&M(e,t.options.className),t.options.interactive&&M(e,"leaflet-interactive"),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){T(t._path),t.removeInteractiveTarget(t._path),delete this._layers[h(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,t=t.options;e&&(t.stroke?(e.setAttribute("stroke",t.color),e.setAttribute("stroke-opacity",t.opacity),e.setAttribute("stroke-width",t.weight),e.setAttribute("stroke-linecap",t.lineCap),e.setAttribute("stroke-linejoin",t.lineJoin),t.dashArray?e.setAttribute("stroke-dasharray",t.dashArray):e.removeAttribute("stroke-dasharray"),t.dashOffset?e.setAttribute("stroke-dashoffset",t.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),t.fill?(e.setAttribute("fill",t.fillColor||t.color),e.setAttribute("fill-opacity",t.fillOpacity),e.setAttribute("fill-rule",t.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,dt(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",e=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,e)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){fe(t._path)},_bringToBack:function(t){ge(t._path)}});function Gi(t){return b.svg||b.vml?new qi(t):null}b.vml&&qi.include(zt),B.include({getRenderer:function(t){t=(t=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer());return this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(t){var e;return"overlayPane"!==t&&void 0!==t&&(void 0===(e=this._paneRenderers[t])&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e)},_createRenderer:function(t){return this.options.preferCanvas&&Wi(t)||Gi(t)}});var Ki=yi.extend({initialize:function(t,e){yi.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=g(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});qi.create=Vi,qi.pointsToPath=dt,xi.geometryToLayer=wi,xi.coordsToLatLng=Pi,xi.coordsToLatLngs=Li,xi.latLngToCoords=Ti,xi.latLngsToCoords=Mi,xi.getFeature=zi,xi.asFeature=Ci,B.mergeOptions({boxZoom:!0});var _t=n.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){S(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){k(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){T(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),re(),Le(),this._startPoint=this._map.mouseEventToContainerPoint(t),S(document,{contextmenu:Re,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=P("div","leaflet-zoom-box",this._container),M(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var t=new f(this._point,this._startPoint),e=t.getSize();Z(this._box,t.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(T(this._box),z(this._container,"leaflet-crosshair")),ae(),Te(),k(document,{contextmenu:Re,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0),t=new s(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})))},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}),Ct=(B.addInitHook("addHandler","boxZoom",_t),B.mergeOptions({doubleClickZoom:!0}),n.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,i=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}})),Zt=(B.addInitHook("addHandler","doubleClickZoom",Ct),B.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),n.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new Je(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),M(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){z(this._map._container,"leaflet-grab"),z(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,e=this._map;e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=g(this._map.options.maxBounds),this._offsetLimit=_(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var e,i;this._map.options.inertia&&(e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(i),this._times.push(e),this._prunePositions(e)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1e.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,n=(n+e+i)%t-e-i,t=Math.abs(o+i)e.getMaxZoom()&&1 element.appendChild(child));\n }\n\n function loadNextPage (callback) {\n var form = d.querySelector('#pagination form.next_page');\n if (!form) {\n return\n }\n replaceChildrenWith(d.querySelector('#pagination'), [ newLoadSpinner() ]);\n var formData = new FormData(form);\n searxng.http('POST', d.querySelector('#search').getAttribute('action'), formData).then(\n function (response) {\n var nextPageDoc = new DOMParser().parseFromString(response, 'text/html');\n var articleList = nextPageDoc.querySelectorAll('#urls article');\n var paginationElement = nextPageDoc.querySelector('#pagination');\n d.querySelector('#pagination').remove();\n if (articleList.length > 0 && !onlyImages) {\n // do not add
element when there are only images\n d.querySelector('#urls').appendChild(d.createElement('hr'));\n }\n articleList.forEach(articleElement => {\n d.querySelector('#urls').appendChild(articleElement);\n });\n if (paginationElement) {\n d.querySelector('#results').appendChild(paginationElement);\n callback();\n }\n }\n ).catch(\n function (err) {\n console.log(err);\n var e = d.createElement('div');\n e.textContent = searxng.settings.translations.error_loading_next_page;\n e.classList.add('dialog-error');\n e.setAttribute('role', 'alert');\n replaceChildrenWith(d.querySelector('#pagination'), [ e ]);\n }\n )\n }\n\n if (searxng.settings.infinite_scroll && searxng.infinite_scroll_supported) {\n const intersectionObserveOptions = {\n rootMargin: \"20rem\",\n };\n const observedSelector = 'article.result:last-child';\n const observer = new IntersectionObserver(entries => {\n const paginationEntry = entries[0];\n if (paginationEntry.isIntersecting) {\n observer.unobserve(paginationEntry.target);\n loadNextPage(() => observer.observe(d.querySelector(observedSelector), intersectionObserveOptions));\n }\n });\n observer.observe(d.querySelector(observedSelector), intersectionObserveOptions);\n }\n\n});\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n/* global searxng */\n\nsearxng.ready(function () {\n\n function isElementInDetail (el) {\n while (el !== undefined) {\n if (el.classList.contains('detail')) {\n return true;\n }\n if (el.classList.contains('result')) {\n // we found a result, no need to go to the root of the document:\n // el is not inside a
element\n return false;\n }\n el = el.parentNode;\n }\n return false;\n }\n\n function getResultElement (el) {\n while (el !== undefined) {\n if (el.classList.contains('result')) {\n return el;\n }\n el = el.parentNode;\n }\n return undefined;\n }\n\n function isImageResult (resultElement) {\n return resultElement && resultElement.classList.contains('result-images');\n }\n\n searxng.on('.result', 'click', function (e) {\n if (!isElementInDetail(e.target)) {\n highlightResult(this)(true, true);\n let resultElement = getResultElement(e.target);\n if (isImageResult(resultElement)) {\n e.preventDefault();\n searxng.selectImage(resultElement);\n }\n }\n });\n\n searxng.on('.result a', 'focus', function (e) {\n if (!isElementInDetail(e.target)) {\n let resultElement = getResultElement(e.target);\n if (resultElement && resultElement.getAttribute(\"data-vim-selected\") === null) {\n highlightResult(resultElement)(true);\n }\n if (isImageResult(resultElement)) {\n searxng.selectImage(resultElement);\n }\n }\n }, true);\n\n var vimKeys = {\n 27: {\n key: 'Escape',\n fun: removeFocus,\n des: 'remove focus from the focused input',\n cat: 'Control'\n },\n 73: {\n key: 'i',\n fun: searchInputFocus,\n des: 'focus on the search input',\n cat: 'Control'\n },\n 66: {\n key: 'b',\n fun: scrollPage(-window.innerHeight),\n des: 'scroll one page up',\n cat: 'Navigation'\n },\n 70: {\n key: 'f',\n fun: scrollPage(window.innerHeight),\n des: 'scroll one page down',\n cat: 'Navigation'\n },\n 85: {\n key: 'u',\n fun: scrollPage(-window.innerHeight / 2),\n des: 'scroll half a page up',\n cat: 'Navigation'\n },\n 68: {\n key: 'd',\n fun: scrollPage(window.innerHeight / 2),\n des: 'scroll half a page down',\n cat: 'Navigation'\n },\n 71: {\n key: 'g',\n fun: scrollPageTo(-document.body.scrollHeight, 'top'),\n des: 'scroll to the top of the page',\n cat: 'Navigation'\n },\n 86: {\n key: 'v',\n fun: scrollPageTo(document.body.scrollHeight, 'bottom'),\n des: 'scroll to the bottom of the page',\n cat: 'Navigation'\n },\n 75: {\n key: 'k',\n fun: highlightResult('up'),\n des: 'select previous search result',\n cat: 'Results'\n },\n 74: {\n key: 'j',\n fun: highlightResult('down'),\n des: 'select next search result',\n cat: 'Results'\n },\n 80: {\n key: 'p',\n fun: GoToPreviousPage(),\n des: 'go to previous page',\n cat: 'Results'\n },\n 78: {\n key: 'n',\n fun: GoToNextPage(),\n des: 'go to next page',\n cat: 'Results'\n },\n 79: {\n key: 'o',\n fun: openResult(false),\n des: 'open search result',\n cat: 'Results'\n },\n 84: {\n key: 't',\n fun: openResult(true),\n des: 'open the result in a new tab',\n cat: 'Results'\n },\n 82: {\n key: 'r',\n fun: reloadPage,\n des: 'reload page from the server',\n cat: 'Control'\n },\n 72: {\n key: 'h',\n fun: toggleHelp,\n des: 'toggle help window',\n cat: 'Other'\n }\n };\n\n if (searxng.settings.hotkeys) {\n searxng.on(document, \"keydown\", function (e) {\n // check for modifiers so we don't break browser's hotkeys\n if (Object.prototype.hasOwnProperty.call(vimKeys, e.keyCode) && !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) {\n var tagName = e.target.tagName.toLowerCase();\n if (e.keyCode === 27) {\n vimKeys[e.keyCode].fun(e);\n } else {\n if (e.target === document.body || tagName === 'a' || tagName === 'button') {\n e.preventDefault();\n vimKeys[e.keyCode].fun();\n }\n }\n }\n });\n }\n\n function highlightResult (which) {\n return function (noScroll, keepFocus) {\n var current = document.querySelector('.result[data-vim-selected]'),\n effectiveWhich = which;\n if (current === null) {\n // no selection : choose the first one\n current = document.querySelector('.result');\n if (current === null) {\n // no first one : there are no results\n return;\n }\n // replace up/down actions by selecting first one\n if (which === \"down\" || which === \"up\") {\n effectiveWhich = current;\n }\n }\n\n var next, results = document.querySelectorAll('.result');\n\n if (typeof effectiveWhich !== 'string') {\n next = effectiveWhich;\n } else {\n switch (effectiveWhich) {\n case 'visible':\n var top = document.documentElement.scrollTop || document.body.scrollTop;\n var bot = top + document.documentElement.clientHeight;\n\n for (var i = 0; i < results.length; i++) {\n next = results[i];\n var etop = next.offsetTop;\n var ebot = etop + next.clientHeight;\n\n if ((ebot <= bot) && (etop > top)) {\n break;\n }\n }\n break;\n case 'down':\n next = current.nextElementSibling;\n if (next === null) {\n next = results[0];\n }\n break;\n case 'up':\n next = current.previousElementSibling;\n if (next === null) {\n next = results[results.length - 1];\n }\n break;\n case 'bottom':\n next = results[results.length - 1];\n break;\n case 'top':\n /* falls through */\n default:\n next = results[0];\n }\n }\n\n if (next) {\n current.removeAttribute('data-vim-selected');\n next.setAttribute('data-vim-selected', 'true');\n if (!keepFocus) {\n var link = next.querySelector('h3 a') || next.querySelector('a');\n if (link !== null) {\n link.focus();\n }\n }\n if (!noScroll) {\n scrollPageToSelected();\n }\n }\n };\n }\n\n function reloadPage () {\n document.location.reload(true);\n }\n\n function removeFocus (e) {\n const tagName = e.target.tagName.toLowerCase();\n if (document.activeElement && (tagName === 'input' || tagName === 'select' || tagName === 'textarea')) {\n document.activeElement.blur();\n } else {\n searxng.closeDetail();\n }\n }\n\n function pageButtonClick (css_selector) {\n return function () {\n var button = document.querySelector(css_selector);\n if (button) {\n button.click();\n }\n };\n }\n\n function GoToNextPage () {\n return pageButtonClick('nav#pagination .next_page button[type=\"submit\"]');\n }\n\n function GoToPreviousPage () {\n return pageButtonClick('nav#pagination .previous_page button[type=\"submit\"]');\n }\n\n function scrollPageToSelected () {\n var sel = document.querySelector('.result[data-vim-selected]');\n if (sel === null) {\n return;\n }\n var wtop = document.documentElement.scrollTop || document.body.scrollTop,\n wheight = document.documentElement.clientHeight,\n etop = sel.offsetTop,\n ebot = etop + sel.clientHeight,\n offset = 120;\n // first element ?\n if ((sel.previousElementSibling === null) && (ebot < wheight)) {\n // set to the top of page if the first element\n // is fully included in the viewport\n window.scroll(window.scrollX, 0);\n return;\n }\n if (wtop > (etop - offset)) {\n window.scroll(window.scrollX, etop - offset);\n } else {\n var wbot = wtop + wheight;\n if (wbot < (ebot + offset)) {\n window.scroll(window.scrollX, ebot - wheight + offset);\n }\n }\n }\n\n function scrollPage (amount) {\n return function () {\n window.scrollBy(0, amount);\n highlightResult('visible')();\n };\n }\n\n function scrollPageTo (position, nav) {\n return function () {\n window.scrollTo(0, position);\n highlightResult(nav)();\n };\n }\n\n function searchInputFocus () {\n window.scrollTo(0, 0);\n var q = document.querySelector('#q');\n q.focus();\n if (q.setSelectionRange) {\n var len = q.value.length;\n q.setSelectionRange(len, len);\n }\n }\n\n function openResult (newTab) {\n return function () {\n var link = document.querySelector('.result[data-vim-selected] h3 a');\n if (link === null) {\n link = document.querySelector('.result[data-vim-selected] > a');\n }\n if (link !== null) {\n var url = link.getAttribute('href');\n if (newTab) {\n window.open(url);\n } else {\n window.location.href = url;\n }\n }\n };\n }\n\n function initHelpContent (divElement) {\n var categories = {};\n\n for (var k in vimKeys) {\n var key = vimKeys[k];\n categories[key.cat] = categories[key.cat] || [];\n categories[key.cat].push(key);\n }\n\n var sorted = Object.keys(categories).sort(function (a, b) {\n return categories[b].length - categories[a].length;\n });\n\n if (sorted.length === 0) {\n return;\n }\n\n var html = '×';\n html += '

How to navigate searx with Vim-like hotkeys

';\n html += '';\n\n for (var i = 0; i < sorted.length; i++) {\n var cat = categories[sorted[i]];\n\n var lastCategory = i === (sorted.length - 1);\n var first = i % 2 === 0;\n\n if (first) {\n html += '';\n }\n html += ''; // col-sm-*\n\n if (!first || lastCategory) {\n html += ''; // row\n }\n }\n\n html += '
';\n\n html += '

' + cat[0].cat + '

';\n html += '
    ';\n\n for (var cj in cat) {\n html += '
  • ' + cat[cj].key + ' ' + cat[cj].des + '
  • ';\n }\n\n html += '
';\n html += '
';\n\n divElement.innerHTML = html;\n }\n\n function toggleHelp () {\n var helpPanel = document.querySelector('#vim-hotkeys-help');\n if (helpPanel === undefined || helpPanel === null) {\n // first call\n helpPanel = document.createElement('div');\n helpPanel.id = 'vim-hotkeys-help';\n helpPanel.className = 'dialog-modal';\n initHelpContent(helpPanel);\n initHelpContent(helpPanel);\n initHelpContent(helpPanel);\n var body = document.getElementsByTagName('body')[0];\n body.appendChild(helpPanel);\n } else {\n // togggle hidden\n helpPanel.classList.toggle('invisible');\n return;\n }\n }\n\n searxng.scrollPageToSelected = scrollPageToSelected;\n searxng.selectNext = highlightResult('down');\n searxng.selectPrevious = highlightResult('up');\n});\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n/* global L */\n(function (w, d, searxng) {\n 'use strict';\n\n searxng.ready(function () {\n searxng.on('.searxng_init_map', 'click', function (event) {\n // no more request\n this.classList.remove(\"searxng_init_map\");\n\n //\n var leaflet_target = this.dataset.leafletTarget;\n var map_lon = parseFloat(this.dataset.mapLon);\n var map_lat = parseFloat(this.dataset.mapLat);\n var map_zoom = parseFloat(this.dataset.mapZoom);\n var map_boundingbox = JSON.parse(this.dataset.mapBoundingbox);\n var map_geojson = JSON.parse(this.dataset.mapGeojson);\n\n searxng.loadStyle('css/leaflet.css');\n searxng.loadScript('js/leaflet.js', function () {\n var map_bounds = null;\n if (map_boundingbox) {\n var southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]);\n var northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]);\n map_bounds = L.latLngBounds(southWest, northEast);\n }\n\n // init map\n var map = L.map(leaflet_target);\n // create the tile layer with correct attribution\n var osmMapnikUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';\n var osmMapnikAttrib = 'Map data © OpenStreetMap contributors';\n var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib});\n var osmWikimediaUrl = 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png';\n var osmWikimediaAttrib = 'Wikimedia maps | Maps data © OpenStreetMap contributors';\n var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib});\n // init map view\n if (map_bounds) {\n // TODO hack: https://github.com/Leaflet/Leaflet/issues/2021\n // Still useful ?\n setTimeout(function () {\n map.fitBounds(map_bounds, {\n maxZoom: 17\n });\n }, 0);\n } else if (map_lon && map_lat) {\n if (map_zoom) {\n map.setView(new L.latLng(map_lat, map_lon), map_zoom);\n } else {\n map.setView(new L.latLng(map_lat, map_lon), 8);\n }\n }\n\n map.addLayer(osmMapnik);\n\n var baseLayers = {\n \"OSM Mapnik\": osmMapnik,\n \"OSM Wikimedia\": osmWikimedia,\n };\n\n L.control.layers(baseLayers).addTo(map);\n\n if (map_geojson) {\n L.geoJson(map_geojson).addTo(map);\n } /* else if(map_bounds) {\n L.rectangle(map_bounds, {color: \"#ff7800\", weight: 3, fill:false}).addTo(map);\n } */\n });\n\n // this event occour only once per element\n event.preventDefault();\n });\n });\n})(window, document, window.searxng);\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n(function (w, d, searxng) {\n 'use strict';\n\n if (searxng.endpoint !== 'preferences') {\n return;\n }\n\n searxng.ready(function () {\n let engine_descriptions = null;\n function load_engine_descriptions () {\n if (engine_descriptions == null) {\n searxng.http(\"GET\", \"engine_descriptions.json\").then(function (content) {\n engine_descriptions = JSON.parse(content);\n for (const [engine_name, description] of Object.entries(engine_descriptions)) {\n let elements = d.querySelectorAll('[data-engine-name=\"' + engine_name + '\"] .engine-description');\n for (const element of elements) {\n let source = ' (' + searxng.settings.translations.Source + ': ' + description[1] + ')';\n element.innerHTML = description[0] + source;\n }\n }\n });\n }\n }\n\n for (const el of d.querySelectorAll('[data-engine-name]')) {\n searxng.on(el, 'mouseenter', load_engine_descriptions);\n }\n });\n})(window, document, window.searxng);\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n(function (w, d, searxng) {\n 'use strict';\n\n if (searxng.endpoint !== 'results') {\n return;\n }\n\n searxng.ready(function () {\n d.querySelectorAll('#urls img.image').forEach(\n img =>\n img.addEventListener(\n 'error', () => {\n img.style.display = 'none';\n img.error = null;\n }\n ));\n\n searxng.on('.btn-collapse', 'click', function () {\n var btnLabelCollapsed = this.getAttribute('data-btn-text-collapsed');\n var btnLabelNotCollapsed = this.getAttribute('data-btn-text-not-collapsed');\n var target = this.getAttribute('data-target');\n var targetElement = d.querySelector(target);\n var html = this.innerHTML;\n if (this.classList.contains('collapsed')) {\n html = html.replace(btnLabelCollapsed, btnLabelNotCollapsed);\n } else {\n html = html.replace(btnLabelNotCollapsed, btnLabelCollapsed);\n }\n this.innerHTML = html;\n this.classList.toggle('collapsed');\n targetElement.classList.toggle('invisible');\n });\n\n searxng.on('.media-loader', 'click', function () {\n var target = this.getAttribute('data-target');\n var iframe_load = d.querySelector(target + ' > iframe');\n var srctest = iframe_load.getAttribute('src');\n if (srctest === null || srctest === undefined || srctest === false) {\n iframe_load.setAttribute('src', iframe_load.getAttribute('data-src'));\n }\n });\n\n searxng.selectImage = function (resultElement) {\n /* eslint no-unused-vars: 0 */\n if (resultElement) {\n // load full size image in background\n const imgElement = resultElement.querySelector('.result-images-source img');\n const thumbnailElement = resultElement.querySelector('.image_thumbnail');\n const detailElement = resultElement.querySelector('.detail');\n if (imgElement) {\n const imgSrc = imgElement.getAttribute('data-src');\n if (imgSrc) {\n const loader = d.createElement('div');\n const imgLoader = new Image();\n\n loader.classList.add('loader');\n detailElement.appendChild(loader);\n\n imgLoader.onload = e => {\n imgElement.src = imgSrc;\n loader.remove();\n };\n imgLoader.onerror = e => {\n loader.remove();\n };\n imgLoader.src = imgSrc;\n imgElement.src = thumbnailElement.src;\n imgElement.removeAttribute('data-src');\n }\n }\n }\n d.getElementById('results').classList.add('image-detail-open');\n searxng.scrollPageToSelected();\n }\n\n searxng.closeDetail = function (e) {\n d.getElementById('results').classList.remove('image-detail-open');\n searxng.scrollPageToSelected();\n }\n searxng.on('.result-detail-close', 'click', e => {\n e.preventDefault();\n searxng.closeDetail();\n });\n searxng.on('.result-detail-previous', 'click', e => searxng.selectPrevious(false));\n searxng.on('.result-detail-next', 'click', e => searxng.selectNext(false));\n\n w.addEventListener('scroll', function () {\n var e = d.getElementById('backToTop'),\n scrollTop = document.documentElement.scrollTop || document.body.scrollTop,\n results = d.getElementById('results');\n if (e !== null) {\n if (scrollTop >= 100) {\n results.classList.add('scrolling');\n } else {\n results.classList.remove('scrolling');\n }\n }\n }, true);\n\n });\n\n})(window, document, window.searxng);\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n/* global AutoComplete */\n(function (w, d, searxng) {\n 'use strict';\n\n var qinput_id = \"q\", qinput;\n\n const isMobile = window.matchMedia(\"only screen and (max-width: 50em)\").matches;\n\n function submitIfQuery () {\n if (qinput.value.length > 0) {\n var search = document.getElementById('search');\n setTimeout(search.submit.bind(search), 0);\n }\n }\n\n function createClearButton (qinput) {\n var cs = document.getElementById('clear_search');\n var updateClearButton = function () {\n if (qinput.value.length === 0) {\n cs.classList.add(\"empty\");\n } else {\n cs.classList.remove(\"empty\");\n }\n };\n\n // update status, event listener\n updateClearButton();\n cs.addEventListener('click', function (ev) {\n qinput.value = '';\n qinput.focus();\n updateClearButton();\n ev.preventDefault();\n });\n qinput.addEventListener('keyup', updateClearButton, false);\n }\n\n searxng.ready(function () {\n qinput = d.getElementById(qinput_id);\n\n if (qinput !== null) {\n // clear button\n createClearButton(qinput);\n\n // autocompleter\n if (searxng.settings.autocomplete_provider) {\n searxng.autocomplete = AutoComplete.call(w, {\n Url: \"./autocompleter\",\n EmptyMessage: searxng.settings.translations.no_item_found,\n HttpMethod: searxng.settings.http_method,\n HttpHeaders: {\n \"Content-type\": \"application/x-www-form-urlencoded\",\n \"X-Requested-With\": \"XMLHttpRequest\"\n },\n MinChars: searxng.settings.autocomplete_min,\n Delay: 300,\n _Position: function () {},\n _Open: function () {\n var params = this;\n Array.prototype.forEach.call(this.DOMResults.getElementsByTagName(\"li\"), function (li) {\n if (li.getAttribute(\"class\") != \"locked\") {\n li.onmousedown = function () {\n params._Select(li);\n };\n }\n });\n },\n }, \"#\" + qinput_id);\n }\n\n /*\n Monkey patch autocomplete.js to fix a bug\n With the POST method, the values are not URL encoded: query like \"1 + 1\" are sent as \"1 1\" since space are URL encoded as plus.\n See HTML specifications:\n * HTML5: https://url.spec.whatwg.org/#concept-urlencoded-serializer\n * HTML4: https://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1\n\n autocomplete.js does not URL encode the name and values:\n https://github.com/autocompletejs/autocomplete.js/blob/87069524f3b95e68f1b54d8976868e0eac1b2c83/src/autocomplete.ts#L665\n\n The monkey patch overrides the compiled version of the ajax function.\n See https://github.com/autocompletejs/autocomplete.js/blob/87069524f3b95e68f1b54d8976868e0eac1b2c83/dist/autocomplete.js#L143-L158\n The patch changes only the line 156 from\n params.Request.send(params._QueryArg() + \"=\" + params._Pre());\n to\n params.Request.send(encodeURIComponent(params._QueryArg()) + \"=\" + encodeURIComponent(params._Pre()));\n\n Related to:\n * https://github.com/autocompletejs/autocomplete.js/issues/78\n * https://github.com/searxng/searxng/issues/1695\n */\n AutoComplete.prototype.ajax = function (params, request, timeout) {\n if (timeout === void 0) { timeout = true; }\n if (params.$AjaxTimer) {\n window.clearTimeout(params.$AjaxTimer);\n }\n if (timeout === true) {\n params.$AjaxTimer = window.setTimeout(AutoComplete.prototype.ajax.bind(null, params, request, false), params.Delay);\n } else {\n if (params.Request) {\n params.Request.abort();\n }\n params.Request = request;\n params.Request.send(encodeURIComponent(params._QueryArg()) + \"=\" + encodeURIComponent(params._Pre()));\n }\n };\n\n if (!isMobile && document.querySelector('.index_endpoint')) {\n qinput.focus();\n }\n }\n\n // vanilla js version of search_on_category_select.js\n if (qinput !== null && d.querySelector('.help') != null && searxng.settings.search_on_category_select) {\n d.querySelector('.help').className = 'invisible';\n\n searxng.on('#categories input', 'change', function () {\n var i, categories = d.querySelectorAll('#categories input[type=\"checkbox\"]');\n for (i = 0; i < categories.length; i++) {\n if (categories[i] !== this && categories[i].checked) {\n categories[i].click();\n }\n }\n if (! this.checked) {\n this.click();\n }\n submitIfQuery();\n return false;\n });\n\n searxng.on(d.getElementById('safesearch'), 'change', submitIfQuery);\n searxng.on(d.getElementById('time_range'), 'change', submitIfQuery);\n searxng.on(d.getElementById('language'), 'change', submitIfQuery);\n }\n\n });\n\n})(window, document, window.searxng);\n","(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(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i @baptistedonaux\n */\nvar AutoComplete = /** @class */ (function () {\n // Constructor\n function AutoComplete(params, selector) {\n if (params === void 0) { params = {}; }\n if (selector === void 0) { selector = \"[data-autocomplete]\"; }\n if (Array.isArray(selector)) {\n selector.forEach(function (s) {\n new AutoComplete(params, s);\n });\n }\n else if (typeof selector == \"string\") {\n var elements = document.querySelectorAll(selector);\n Array.prototype.forEach.call(elements, function (input) {\n new AutoComplete(params, input);\n });\n }\n else {\n var specificParams = AutoComplete.merge(AutoComplete.defaults, params, {\n DOMResults: document.createElement(\"div\")\n });\n AutoComplete.prototype.create(specificParams, selector);\n return specificParams;\n }\n }\n AutoComplete.prototype.create = function (params, element) {\n params.Input = element;\n if (params.Input.nodeName.match(/^INPUT$/i) && (params.Input.hasAttribute(\"type\") === false || params.Input.getAttribute(\"type\").match(/^TEXT|SEARCH$/i))) {\n params.Input.setAttribute(\"autocomplete\", \"off\");\n params._Position(params);\n params.Input.parentNode.appendChild(params.DOMResults);\n params.$Listeners = {\n blur: params._Blur.bind(params),\n destroy: AutoComplete.prototype.destroy.bind(null, params),\n focus: params._Focus.bind(params),\n keyup: AutoComplete.prototype.event.bind(null, params, EventType.KEYUP),\n keydown: AutoComplete.prototype.event.bind(null, params, EventType.KEYDOWN),\n position: params._Position.bind(params)\n };\n for (var event in params.$Listeners) {\n params.Input.addEventListener(event, params.$Listeners[event]);\n }\n }\n };\n AutoComplete.prototype.getEventsByType = function (params, type) {\n var mappings = {};\n for (var key in params.KeyboardMappings) {\n var event = EventType.KEYUP;\n if (params.KeyboardMappings[key].Event !== undefined) {\n event = params.KeyboardMappings[key].Event;\n }\n if (event == type) {\n mappings[key] = params.KeyboardMappings[key];\n }\n }\n return mappings;\n };\n AutoComplete.prototype.event = function (params, type, event) {\n var eventIdentifier = function (condition) {\n if ((match === true && mapping.Operator == ConditionOperator.AND) || (match === false && mapping.Operator == ConditionOperator.OR)) {\n condition = AutoComplete.merge({\n Not: false\n }, condition);\n if (condition.hasOwnProperty(\"Is\")) {\n if (condition.Is == event.keyCode) {\n match = !condition.Not;\n }\n else {\n match = condition.Not;\n }\n }\n else if (condition.hasOwnProperty(\"From\") && condition.hasOwnProperty(\"To\")) {\n if (event.keyCode >= condition.From && event.keyCode <= condition.To) {\n match = !condition.Not;\n }\n else {\n match = condition.Not;\n }\n }\n }\n };\n for (var name in AutoComplete.prototype.getEventsByType(params, type)) {\n var mapping = AutoComplete.merge({\n Operator: ConditionOperator.AND\n }, params.KeyboardMappings[name]), match = ConditionOperator.AND == mapping.Operator;\n mapping.Conditions.forEach(eventIdentifier);\n if (match === true) {\n mapping.Callback.call(params, event);\n }\n }\n };\n AutoComplete.prototype.makeRequest = function (params, callback, callbackErr) {\n var propertyHttpHeaders = Object.getOwnPropertyNames(params.HttpHeaders), request = new XMLHttpRequest(), method = params._HttpMethod(), url = params._Url(), queryParams = params._Pre(), queryParamsStringify = encodeURIComponent(params._QueryArg()) + \"=\" + encodeURIComponent(queryParams);\n if (method.match(/^GET$/i)) {\n if (url.indexOf(\"?\") !== -1) {\n url += \"&\" + queryParamsStringify;\n }\n else {\n url += \"?\" + queryParamsStringify;\n }\n }\n request.open(method, url, true);\n for (var i = propertyHttpHeaders.length - 1; i >= 0; i--) {\n request.setRequestHeader(propertyHttpHeaders[i], params.HttpHeaders[propertyHttpHeaders[i]]);\n }\n request.onreadystatechange = function () {\n if (request.readyState == 4 && request.status == 200) {\n params.$Cache[queryParams] = request.response;\n callback(request.response);\n }\n else if (request.status >= 400) {\n callbackErr();\n }\n };\n return request;\n };\n AutoComplete.prototype.ajax = function (params, request, timeout) {\n if (timeout === void 0) { timeout = true; }\n if (params.$AjaxTimer) {\n window.clearTimeout(params.$AjaxTimer);\n }\n if (timeout === true) {\n params.$AjaxTimer = window.setTimeout(AutoComplete.prototype.ajax.bind(null, params, request, false), params.Delay);\n }\n else {\n if (params.Request) {\n params.Request.abort();\n }\n params.Request = request;\n params.Request.send(params._QueryArg() + \"=\" + params._Pre());\n }\n };\n AutoComplete.prototype.cache = function (params, callback, callbackErr) {\n var response = params._Cache(params._Pre());\n if (response === undefined) {\n var request = AutoComplete.prototype.makeRequest(params, callback, callbackErr);\n AutoComplete.prototype.ajax(params, request);\n }\n else {\n callback(response);\n }\n };\n AutoComplete.prototype.destroy = function (params) {\n for (var event in params.$Listeners) {\n params.Input.removeEventListener(event, params.$Listeners[event]);\n }\n params.DOMResults.parentNode.removeChild(params.DOMResults);\n };\n AutoComplete.merge = function () {\n var merge = {}, tmp;\n for (var i = 0; i < arguments.length; i++) {\n for (tmp in arguments[i]) {\n merge[tmp] = arguments[i][tmp];\n }\n }\n return merge;\n };\n AutoComplete.defaults = {\n Delay: 150,\n EmptyMessage: \"No result here\",\n Highlight: {\n getRegex: function (value) {\n return new RegExp(value, \"ig\");\n },\n transform: function (value) {\n return \"\" + value + \"\";\n }\n },\n HttpHeaders: {\n \"Content-type\": \"application/x-www-form-urlencoded\"\n },\n Limit: 0,\n MinChars: 0,\n HttpMethod: \"GET\",\n QueryArg: \"q\",\n Url: null,\n KeyboardMappings: {\n \"Enter\": {\n Conditions: [{\n Is: 13,\n Not: false\n }],\n Callback: function (event) {\n if (this.DOMResults.getAttribute(\"class\").indexOf(\"open\") != -1) {\n var liActive = this.DOMResults.querySelector(\"li.active\");\n if (liActive !== null) {\n event.preventDefault();\n this._Select(liActive);\n this.DOMResults.setAttribute(\"class\", \"autocomplete\");\n }\n }\n },\n Operator: ConditionOperator.AND,\n Event: EventType.KEYDOWN\n },\n \"KeyUpAndDown_down\": {\n Conditions: [{\n Is: 38,\n Not: false\n },\n {\n Is: 40,\n Not: false\n }],\n Callback: function (event) {\n event.preventDefault();\n },\n Operator: ConditionOperator.OR,\n Event: EventType.KEYDOWN\n },\n \"KeyUpAndDown_up\": {\n Conditions: [{\n Is: 38,\n Not: false\n },\n {\n Is: 40,\n Not: false\n }],\n Callback: function (event) {\n event.preventDefault();\n 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\");\n if (active) {\n var currentIndex = Array.prototype.indexOf.call(active.parentNode.children, active), position = currentIndex + (event.keyCode - 39), lisCount = this.DOMResults.getElementsByTagName(\"li\").length;\n if (position < 0) {\n position = lisCount - 1;\n }\n else if (position >= lisCount) {\n position = 0;\n }\n active.classList.remove(\"active\");\n active.parentElement.children.item(position).classList.add(\"active\");\n }\n else if (last && event.keyCode == 38) {\n last.classList.add(\"active\");\n }\n else if (first) {\n first.classList.add(\"active\");\n }\n },\n Operator: ConditionOperator.OR,\n Event: EventType.KEYUP\n },\n \"AlphaNum\": {\n Conditions: [{\n Is: 13,\n Not: true\n }, {\n From: 35,\n To: 40,\n Not: true\n }],\n Callback: function () {\n var oldValue = this.Input.getAttribute(\"data-autocomplete-old-value\"), currentValue = this._Pre();\n if (currentValue !== \"\" && currentValue.length >= this._MinChars()) {\n if (!oldValue || currentValue != oldValue) {\n this.DOMResults.setAttribute(\"class\", \"autocomplete open\");\n }\n AutoComplete.prototype.cache(this, function (response) {\n this._Render(this._Post(response));\n this._Open();\n }.bind(this), this._Error);\n }\n else {\n this._Close();\n }\n },\n Operator: ConditionOperator.AND,\n Event: EventType.KEYUP\n }\n },\n DOMResults: null,\n Request: null,\n Input: null,\n /**\n * Return the message when no result returns\n */\n _EmptyMessage: function () {\n var emptyMessage = \"\";\n if (this.Input.hasAttribute(\"data-autocomplete-empty-message\")) {\n emptyMessage = this.Input.getAttribute(\"data-autocomplete-empty-message\");\n }\n else if (this.EmptyMessage !== false) {\n emptyMessage = this.EmptyMessage;\n }\n else {\n emptyMessage = \"\";\n }\n return emptyMessage;\n },\n /**\n * Returns the maximum number of results\n */\n _Limit: function () {\n var limit = this.Input.getAttribute(\"data-autocomplete-limit\");\n if (isNaN(limit) || limit === null) {\n return this.Limit;\n }\n return parseInt(limit, 10);\n },\n /**\n * Returns the minimum number of characters entered before firing ajax\n */\n _MinChars: function () {\n var minchars = this.Input.getAttribute(\"data-autocomplete-minchars\");\n if (isNaN(minchars) || minchars === null) {\n return this.MinChars;\n }\n return parseInt(minchars, 10);\n },\n /**\n * Apply transformation on labels response\n */\n _Highlight: function (label) {\n return label.replace(this.Highlight.getRegex(this._Pre()), this.Highlight.transform);\n },\n /**\n * Returns the HHTP method to use\n */\n _HttpMethod: function () {\n if (this.Input.hasAttribute(\"data-autocomplete-method\")) {\n return this.Input.getAttribute(\"data-autocomplete-method\");\n }\n return this.HttpMethod;\n },\n /**\n * Returns the query param to use\n */\n _QueryArg: function () {\n if (this.Input.hasAttribute(\"data-autocomplete-param-name\")) {\n return this.Input.getAttribute(\"data-autocomplete-param-name\");\n }\n return this.QueryArg;\n },\n /**\n * Returns the URL to use for AJAX request\n */\n _Url: function () {\n if (this.Input.hasAttribute(\"data-autocomplete\")) {\n return this.Input.getAttribute(\"data-autocomplete\");\n }\n return this.Url;\n },\n /**\n * Manage the close\n */\n _Blur: function (now) {\n if (now === void 0) { now = false; }\n if (now) {\n this._Close();\n }\n else {\n var params = this;\n setTimeout(function () {\n params._Blur(true);\n }, 150);\n }\n },\n /**\n * Manage the cache\n */\n _Cache: function (value) {\n return this.$Cache[value];\n },\n /**\n * Manage the open\n */\n _Focus: function () {\n var oldValue = this.Input.getAttribute(\"data-autocomplete-old-value\");\n if ((!oldValue || this.Input.value != oldValue) && this._MinChars() <= this.Input.value.length) {\n this.DOMResults.setAttribute(\"class\", \"autocomplete open\");\n }\n },\n /**\n * Bind all results item if one result is opened\n */\n _Open: function () {\n var params = this;\n Array.prototype.forEach.call(this.DOMResults.getElementsByTagName(\"li\"), function (li) {\n if (li.getAttribute(\"class\") != \"locked\") {\n li.onclick = function () {\n params._Select(li);\n };\n }\n });\n },\n _Close: function () {\n this.DOMResults.setAttribute(\"class\", \"autocomplete\");\n },\n /**\n * Position the results HTML element\n */\n _Position: function () {\n this.DOMResults.setAttribute(\"class\", \"autocomplete\");\n this.DOMResults.setAttribute(\"style\", \"top:\" + (this.Input.offsetTop + this.Input.offsetHeight) + \"px;left:\" + this.Input.offsetLeft + \"px;width:\" + this.Input.clientWidth + \"px;\");\n },\n /**\n * Execute the render of results DOM element\n */\n _Render: function (response) {\n var ul;\n if (typeof response == \"string\") {\n ul = this._RenderRaw(response);\n }\n else {\n ul = this._RenderResponseItems(response);\n }\n if (this.DOMResults.hasChildNodes()) {\n this.DOMResults.removeChild(this.DOMResults.childNodes[0]);\n }\n this.DOMResults.appendChild(ul);\n },\n /**\n * ResponseItems[] rendering\n */\n _RenderResponseItems: function (response) {\n var ul = document.createElement(\"ul\"), li = document.createElement(\"li\"), limit = this._Limit();\n // Order\n if (limit < 0) {\n response = response.reverse();\n }\n else if (limit === 0) {\n limit = response.length;\n }\n for (var item = 0; item < Math.min(Math.abs(limit), response.length); item++) {\n li.innerHTML = response[item].Label;\n li.setAttribute(\"data-autocomplete-value\", response[item].Value);\n ul.appendChild(li);\n li = document.createElement(\"li\");\n }\n return ul;\n },\n /**\n * string response rendering (RAW HTML)\n */\n _RenderRaw: function (response) {\n var ul = document.createElement(\"ul\"), li = document.createElement(\"li\");\n if (response.length > 0) {\n this.DOMResults.innerHTML = response;\n }\n else {\n var emptyMessage = this._EmptyMessage();\n if (emptyMessage !== \"\") {\n li.innerHTML = emptyMessage;\n li.setAttribute(\"class\", \"locked\");\n ul.appendChild(li);\n }\n }\n return ul;\n },\n /**\n * Deal with request response\n */\n _Post: function (response) {\n try {\n var returnResponse = [];\n //JSON return\n var json = JSON.parse(response);\n if (Object.keys(json).length === 0) {\n return \"\";\n }\n if (Array.isArray(json)) {\n for (var i = 0; i < Object.keys(json).length; i++) {\n returnResponse[returnResponse.length] = { \"Value\": json[i], \"Label\": this._Highlight(json[i]) };\n }\n }\n else {\n for (var value in json) {\n returnResponse.push({\n \"Value\": value,\n \"Label\": this._Highlight(json[value])\n });\n }\n }\n return returnResponse;\n }\n catch (event) {\n //HTML return\n return response;\n }\n },\n /**\n * Return the autocomplete value to send (before request)\n */\n _Pre: function () {\n return this.Input.value;\n },\n /**\n * Choice one result item\n */\n _Select: function (item) {\n if (item.hasAttribute(\"data-autocomplete-value\")) {\n this.Input.value = item.getAttribute(\"data-autocomplete-value\");\n }\n else {\n this.Input.value = item.innerHTML;\n }\n this.Input.setAttribute(\"data-autocomplete-old-value\", this.Input.value);\n },\n /**\n * Handle HTTP error on the request\n */\n _Error: function () {\n },\n $AjaxTimer: null,\n $Cache: {},\n $Listeners: {}\n };\n return AutoComplete;\n}());\nmodule.exports = AutoComplete;\n\n},{}]},{},[1])(1)\n});\n"],"names":["window","searxng","w","d","Element","ElementPrototype","matches","matchesSelector","webkitMatchesSelector","msMatchesSelector","selector","node","this","nodes","parentNode","document","querySelectorAll","i","prototype","callbackSafe","callback","el","e","call","exception","console","log","on","obj","eventType","useCapture","addEventListener","target","srcElement","found","parentElement","ready","readyState","bind","http","method","url","data","Promise","resolve","reject","req","XMLHttpRequest","open","timeout","onload","status","response","responseType","Error","statusText","onerror","onabort","ontimeout","send","ex","loadStyle","src","path","settings","theme_static_path","id","replace","s","getElementById","createElement","setAttribute","body","appendChild","loadScript","hasAttribute","apply","insertBefore","newNode","referenceNode","insertAfter","nextSibling","classList","add","getEndpoint","className","getElementsByTagName","values","endsWith","split","endpoint","infinite_scroll_supported","IntersectionObserverEntry","let","onlyImages","contains","newLoadSpinner","loader","replaceChildrenWith","element","children","textContent","forEach","child","loadNextPage","form","querySelector","formData","FormData","getAttribute","then","nextPageDoc","DOMParser","parseFromString","articleList","paginationElement","remove","length","articleElement","catch","err","translations","error_loading_next_page","infinite_scroll","intersectionObserveOptions","rootMargin","observedSelector","observer","IntersectionObserver","entries","paginationEntry","isIntersecting","unobserve","observe","isElementInDetail","undefined","getResultElement","isImageResult","resultElement","highlightResult","preventDefault","selectImage","vimKeys","27","key","fun","removeFocus","des","cat","73","searchInputFocus","66","scrollPage","innerHeight","70","85","68","71","scrollPageTo","scrollHeight","86","75","74","80","GoToPreviousPage","78","GoToNextPage","79","openResult","84","82","reloadPage","72","toggleHelp","hotkeys","Object","hasOwnProperty","keyCode","ctrlKey","altKey","shiftKey","metaKey","tagName","toLowerCase","which","noScroll","keepFocus","current","effectiveWhich","next","results","top","documentElement","scrollTop","bot","clientHeight","etop","offsetTop","ebot","nextElementSibling","previousElementSibling","removeAttribute","link","focus","scrollPageToSelected","location","reload","activeElement","blur","closeDetail","pageButtonClick","css_selector","button","click","sel","wtop","wheight","offset","scroll","scrollX","wbot","amount","scrollBy","position","nav","scrollTo","q","setSelectionRange","len","value","newTab","href","initHelpContent","divElement","categories","k","push","sorted","keys","sort","a","b","html","lastCategory","first","cj","innerHTML","helpPanel","toggle","selectNext","selectPrevious","event","leaflet_target","dataset","leafletTarget","map_lon","parseFloat","mapLon","map_lat","mapLat","map_zoom","mapZoom","map_boundingbox","JSON","parse","mapBoundingbox","map_geojson","mapGeojson","map_bounds","southWest","L","latLng","northEast","latLngBounds","map","osmMapnikUrl","osmMapnikAttrib","osmMapnik","TileLayer","minZoom","maxZoom","attribution","osmWikimediaUrl","osmWikimediaAttrib","osmWikimedia","setTimeout","fitBounds","setView","addLayer","baseLayers","OSM Mapnik","OSM Wikimedia","control","layers","addTo","geoJson","engine_descriptions","load_engine_descriptions","content","engine_name","description","elements","source","Source","img","style","display","error","btnLabelCollapsed","btnLabelNotCollapsed","targetElement","iframe_load","srctest","imgElement","thumbnailElement","detailElement","imgSrc","imgLoader","Image","qinput_id","qinput","isMobile","matchMedia","submitIfQuery","search","submit","createClearButton","cs","updateClearButton","ev","autocomplete_provider","autocomplete","AutoComplete","Url","EmptyMessage","no_item_found","HttpMethod","http_method","HttpHeaders","Content-type","X-Requested-With","MinChars","autocomplete_min","Delay","_Position","_Open","params","Array","DOMResults","li","onmousedown","_Select","ajax","request","$AjaxTimer","clearTimeout","Request","abort","encodeURIComponent","_QueryArg","_Pre","search_on_category_select","checked","f","exports","module","define","amd","g","global","self","r","n","t","o","c","require","u","code","p","1","ConditionOperator","EventType","isArray","input","specificParams","merge","defaults","create","Input","nodeName","match","$Listeners","_Blur","destroy","_Focus","keyup","KEYUP","keydown","KEYDOWN","getEventsByType","type","mappings","KeyboardMappings","Event","eventIdentifier","condition","mapping","Operator","AND","OR","Not","Is","From","To","name","Conditions","Callback","makeRequest","callbackErr","propertyHttpHeaders","getOwnPropertyNames","_HttpMethod","_Url","queryParams","queryParamsStringify","indexOf","setRequestHeader","onreadystatechange","$Cache","cache","_Cache","removeEventListener","removeChild","tmp","arguments","Highlight","getRegex","RegExp","transform","Limit","QueryArg","Enter","liActive","KeyUpAndDown_down","KeyUpAndDown_up","last","active","currentIndex","lisCount","item","AlphaNum","oldValue","currentValue","_MinChars","_Render","_Post","_Error","_Close","_EmptyMessage","emptyMessage","_Limit","limit","isNaN","parseInt","minchars","_Highlight","label","now","onclick","offsetHeight","offsetLeft","clientWidth","ul","_RenderRaw","_RenderResponseItems","hasChildNodes","childNodes","reverse","Math","min","abs","Label","Value","returnResponse","json"],"mappings":";;;;;GAMAA;OAAOC,QAAU,SAAWC,EAAGC,gBAQ7B,GAAID,EAAEE,QAAS,EACb,SAAWC,GACTA,EAAiBC,QAAUD,EAAiBC,SAC5CD,EAAiBE,iBACjBF,EAAiBG,uBACjBH,EAAiBI,mBACjB,SAAUC,GACR,IAAIC,EAAOC,KAAMC,GAASF,EAAKG,YAAcH,EAAKI,UAAUC,iBAAiBN,GAAWO,GAAK,EAC7F,MAAOJ,IAAQI,IAAMJ,EAAMI,IAAMN,GACjC,QAASE,EAAMI,KARnB,CAUGb,QAAQc,WAGb,SAASC,EAAcC,EAAUC,EAAIC,GACnC,IACEF,EAASG,KAAKF,EAAIC,GAClB,MAAOE,GACPC,QAAQC,IAAIF,IAIhB,IAAIvB,EAAUD,OAAOC,SAAW,GAEhCA,EAAQ0B,GAAK,SAAUC,EAAKC,EAAWT,EAAUU,GAC/CA,EAAaA,GAAc,MAC3B,UAAWF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,EAAGvG,UAAYsN,EACf/G,EAAGtR,aAAa,QAAS,UACzBkZ,EAAGhZ,YAAYoR,IAGvB,OAAO4H,GAKXjB,MAAO,SAAUpZ,GACb,IACI,IAAIgb,EAAiB,GAErB,IAAIC,EAAO9N,KAAKC,MAAMpN,GACtB,GAAI2H,OAAO+D,KAAKuP,GAAMhX,SAAW,EAAG,CAChC,MAAO,GAEX,GAAIsO,MAAMoC,QAAQsG,GAAO,CACrB,IAAK,IAAIpd,EAAI,EAAGA,EAAI8J,OAAO+D,KAAKuP,GAAMhX,OAAQpG,IAAK,CAC/Cmd,EAAeA,EAAe/W,QAAU,CAAE8W,MAASE,EAAKpd,GAAIid,MAAStd,KAAKsc,WAAWmB,EAAKpd,UAG7F,CACD,IAAK,IAAIoN,KAASgQ,EAAM,CACpBD,EAAexP,KAAK,CAChBuP,MAAS9P,EACT6P,MAAStd,KAAKsc,WAAWmB,EAAKhQ,OAI1C,OAAO+P,EAEX,MAAOzO,GAEH,OAAOvM,IAMfoT,KAAM,WACF,OAAO5V,KAAKyX,MAAMhK,OAKtB0H,QAAS,SAAUmG,GACf,GAAIA,EAAKvX,aAAa,2BAA4B,CAC9C/D,KAAKyX,MAAMhK,MAAQ6N,EAAKrV,aAAa,+BAEpC,CACDjG,KAAKyX,MAAMhK,MAAQ6N,EAAK5M,UAE5B1O,KAAKyX,MAAM9T,aAAa,8BAA+B3D,KAAKyX,MAAMhK,QAKtEoO,OAAQ,aAERvG,WAAY,KACZ2E,OAAQ,GACRrC,WAAY,IAEhB,OAAO5D,EA3fsB,GA6fjCiC,EAAOD,QAAUhC,GAEf,KAAK,GAAG,CAAC,GA1hByW,CA0hBrW"} \ No newline at end of file +{"version":3,"file":"searxng.min.js","sources":["../src/js/main/00_toolkit.js","../src/js/main/infinite_scroll.js","../src/js/main/keyboard.js","../src/js/main/mapresult.js","../src/js/main/preferences.js","../src/js/main/results.js","../src/js/main/search.js","../node_modules/autocomplete-js/dist/autocomplete.js"],"sourcesContent":["/**\n * @license\n * (C) Copyright Contributors to the SearXNG project.\n * (C) Copyright Contributors to the searx project (2014 - 2021).\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nwindow.searxng = (function (w, d) {\n\n 'use strict';\n\n // not invented here tookit with bugs fixed elsewhere\n // purposes : be just good enough and as small as possible\n\n // from https://plainjs.com/javascript/events/live-binding-event-handlers-14/\n if (w.Element) {\n (function (ElementPrototype) {\n ElementPrototype.matches = ElementPrototype.matches ||\n ElementPrototype.matchesSelector ||\n ElementPrototype.webkitMatchesSelector ||\n ElementPrototype.msMatchesSelector ||\n function (selector) {\n var node = this, nodes = (node.parentNode || node.document).querySelectorAll(selector), i = -1;\n while (nodes[++i] && nodes[i] != node);\n return !!nodes[i];\n };\n })(Element.prototype);\n }\n\n function callbackSafe (callback, el, e) {\n try {\n callback.call(el, e);\n } catch (exception) {\n console.log(exception);\n }\n }\n\n var searxng = window.searxng || {};\n\n searxng.on = function (obj, eventType, callback, useCapture) {\n useCapture = useCapture || false;\n if (typeof obj !== 'string') {\n // obj HTMLElement, HTMLDocument\n obj.addEventListener(eventType, callback, useCapture);\n } else {\n // obj is a selector\n d.addEventListener(eventType, function (e) {\n var el = e.target || e.srcElement, found = false;\n while (el && el.matches && el !== d && !(found = el.matches(obj))) el = el.parentElement;\n if (found) callbackSafe(callback, el, e);\n }, useCapture);\n }\n };\n\n searxng.ready = function (callback) {\n if (document.readyState != 'loading') {\n callback.call(w);\n } else {\n w.addEventListener('DOMContentLoaded', callback.bind(w));\n }\n };\n\n searxng.http = function (method, url, data = null) {\n return new Promise(function (resolve, reject) {\n try {\n var req = new XMLHttpRequest();\n req.open(method, url, true);\n req.timeout = 20000;\n\n // On load\n req.onload = function () {\n if (req.status == 200) {\n resolve(req.response, req.responseType);\n } else {\n reject(Error(req.statusText));\n }\n };\n\n // Handle network errors\n req.onerror = function () {\n reject(Error(\"Network Error\"));\n };\n\n req.onabort = function () {\n reject(Error(\"Transaction is aborted\"));\n };\n\n req.ontimeout = function () {\n reject(Error(\"Timeout\"));\n }\n\n // Make the request\n if (data) {\n req.send(data)\n } else {\n req.send();\n }\n } catch (ex) {\n reject(ex);\n }\n });\n };\n\n searxng.loadStyle = function (src) {\n var path = searxng.settings.theme_static_path + \"/\" + src,\n id = \"style_\" + src.replace('.', '_'),\n s = d.getElementById(id);\n if (s === null) {\n s = d.createElement('link');\n s.setAttribute('id', id);\n s.setAttribute('rel', 'stylesheet');\n s.setAttribute('type', 'text/css');\n s.setAttribute('href', path);\n d.body.appendChild(s);\n }\n };\n\n searxng.loadScript = function (src, callback) {\n var path = searxng.settings.theme_static_path + \"/\" + src,\n id = \"script_\" + src.replace('.', '_'),\n s = d.getElementById(id);\n if (s === null) {\n s = d.createElement('script');\n s.setAttribute('id', id);\n s.setAttribute('src', path);\n s.onload = callback;\n s.onerror = function () {\n s.setAttribute('error', '1');\n };\n d.body.appendChild(s);\n } else if (!s.hasAttribute('error')) {\n try {\n callback.apply(s, []);\n } catch (exception) {\n console.log(exception);\n }\n } else {\n console.log(\"callback not executed : script '\" + path + \"' not loaded.\");\n }\n };\n\n searxng.insertBefore = function (newNode, referenceNode) {\n referenceNode.parentNode.insertBefore(newNode, referenceNode);\n };\n\n searxng.insertAfter = function (newNode, referenceNode) {\n referenceNode.parentNode.insertAfter(newNode, referenceNode.nextSibling);\n };\n\n searxng.on('.close', 'click', function () {\n this.parentNode.classList.add('invisible');\n });\n\n function getEndpoint () {\n for (var className of d.getElementsByTagName('body')[0].classList.values()) {\n if (className.endsWith('_endpoint')) {\n return className.split('_')[0];\n }\n }\n return '';\n }\n\n searxng.endpoint = getEndpoint();\n\n return searxng;\n})(window, document);\n","// SPDX-License-Identifier: AGPL-3.0-or-later\n\n/* global searxng */\n\nsearxng.ready(function () {\n 'use strict';\n\n searxng.infinite_scroll_supported = (\n 'IntersectionObserver' in window &&\n 'IntersectionObserverEntry' in window &&\n 'intersectionRatio' in window.IntersectionObserverEntry.prototype);\n\n if (searxng.endpoint !== 'results') {\n return;\n }\n\n if (!searxng.infinite_scroll_supported) {\n console.log('IntersectionObserver not supported');\n return;\n }\n\n let d = document;\n var onlyImages = d.getElementById('results').classList.contains('only_template_images');\n\n function newLoadSpinner () {\n var loader = d.createElement('div');\n loader.classList.add('loader');\n return loader;\n }\n\n function replaceChildrenWith (element, children) {\n element.textContent = '';\n children.forEach(child => element.appendChild(child));\n }\n\n function loadNextPage (callback) {\n var form = d.querySelector('#pagination form.next_page');\n if (!form) {\n return\n }\n replaceChildrenWith(d.querySelector('#pagination'), [ newLoadSpinner() ]);\n var formData = new FormData(form);\n searxng.http('POST', d.querySelector('#search').getAttribute('action'), formData).then(\n function (response) {\n var nextPageDoc = new DOMParser().parseFromString(response, 'text/html');\n var articleList = nextPageDoc.querySelectorAll('#urls article');\n var paginationElement = nextPageDoc.querySelector('#pagination');\n d.querySelector('#pagination').remove();\n if (articleList.length > 0 && !onlyImages) {\n // do not add
element when there are only images\n d.querySelector('#urls').appendChild(d.createElement('hr'));\n }\n articleList.forEach(articleElement => {\n d.querySelector('#urls').appendChild(articleElement);\n });\n if (paginationElement) {\n d.querySelector('#results').appendChild(paginationElement);\n callback();\n }\n }\n ).catch(\n function (err) {\n console.log(err);\n var e = d.createElement('div');\n e.textContent = searxng.settings.translations.error_loading_next_page;\n e.classList.add('dialog-error');\n e.setAttribute('role', 'alert');\n replaceChildrenWith(d.querySelector('#pagination'), [ e ]);\n }\n )\n }\n\n if (searxng.settings.infinite_scroll && searxng.infinite_scroll_supported) {\n const intersectionObserveOptions = {\n rootMargin: \"20rem\",\n };\n const observedSelector = 'article.result:last-child';\n const observer = new IntersectionObserver(entries => {\n const paginationEntry = entries[0];\n if (paginationEntry.isIntersecting) {\n observer.unobserve(paginationEntry.target);\n loadNextPage(() => observer.observe(d.querySelector(observedSelector), intersectionObserveOptions));\n }\n });\n observer.observe(d.querySelector(observedSelector), intersectionObserveOptions);\n }\n\n});\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n/* global searxng */\n\nsearxng.ready(function () {\n\n function isElementInDetail (el) {\n while (el !== undefined) {\n if (el.classList.contains('detail')) {\n return true;\n }\n if (el.classList.contains('result')) {\n // we found a result, no need to go to the root of the document:\n // el is not inside a
element\n return false;\n }\n el = el.parentNode;\n }\n return false;\n }\n\n function getResultElement (el) {\n while (el !== undefined) {\n if (el.classList.contains('result')) {\n return el;\n }\n el = el.parentNode;\n }\n return undefined;\n }\n\n function isImageResult (resultElement) {\n return resultElement && resultElement.classList.contains('result-images');\n }\n\n searxng.on('.result', 'click', function (e) {\n if (!isElementInDetail(e.target)) {\n highlightResult(this)(true, true);\n let resultElement = getResultElement(e.target);\n if (isImageResult(resultElement)) {\n e.preventDefault();\n searxng.selectImage(resultElement);\n }\n }\n });\n\n searxng.on('.result a', 'focus', function (e) {\n if (!isElementInDetail(e.target)) {\n let resultElement = getResultElement(e.target);\n if (resultElement && resultElement.getAttribute(\"data-vim-selected\") === null) {\n highlightResult(resultElement)(true);\n }\n if (isImageResult(resultElement)) {\n searxng.selectImage(resultElement);\n }\n }\n }, true);\n\n var vimKeys = {\n 27: {\n key: 'Escape',\n fun: removeFocus,\n des: 'remove focus from the focused input',\n cat: 'Control'\n },\n 73: {\n key: 'i',\n fun: searchInputFocus,\n des: 'focus on the search input',\n cat: 'Control'\n },\n 66: {\n key: 'b',\n fun: scrollPage(-window.innerHeight),\n des: 'scroll one page up',\n cat: 'Navigation'\n },\n 70: {\n key: 'f',\n fun: scrollPage(window.innerHeight),\n des: 'scroll one page down',\n cat: 'Navigation'\n },\n 85: {\n key: 'u',\n fun: scrollPage(-window.innerHeight / 2),\n des: 'scroll half a page up',\n cat: 'Navigation'\n },\n 68: {\n key: 'd',\n fun: scrollPage(window.innerHeight / 2),\n des: 'scroll half a page down',\n cat: 'Navigation'\n },\n 71: {\n key: 'g',\n fun: scrollPageTo(-document.body.scrollHeight, 'top'),\n des: 'scroll to the top of the page',\n cat: 'Navigation'\n },\n 86: {\n key: 'v',\n fun: scrollPageTo(document.body.scrollHeight, 'bottom'),\n des: 'scroll to the bottom of the page',\n cat: 'Navigation'\n },\n 75: {\n key: 'k',\n fun: highlightResult('up'),\n des: 'select previous search result',\n cat: 'Results'\n },\n 74: {\n key: 'j',\n fun: highlightResult('down'),\n des: 'select next search result',\n cat: 'Results'\n },\n 80: {\n key: 'p',\n fun: GoToPreviousPage(),\n des: 'go to previous page',\n cat: 'Results'\n },\n 78: {\n key: 'n',\n fun: GoToNextPage(),\n des: 'go to next page',\n cat: 'Results'\n },\n 79: {\n key: 'o',\n fun: openResult(false),\n des: 'open search result',\n cat: 'Results'\n },\n 84: {\n key: 't',\n fun: openResult(true),\n des: 'open the result in a new tab',\n cat: 'Results'\n },\n 82: {\n key: 'r',\n fun: reloadPage,\n des: 'reload page from the server',\n cat: 'Control'\n },\n 72: {\n key: 'h',\n fun: toggleHelp,\n des: 'toggle help window',\n cat: 'Other'\n }\n };\n\n if (searxng.settings.hotkeys) {\n searxng.on(document, \"keydown\", function (e) {\n // check for modifiers so we don't break browser's hotkeys\n if (Object.prototype.hasOwnProperty.call(vimKeys, e.keyCode) && !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) {\n var tagName = e.target.tagName.toLowerCase();\n if (e.keyCode === 27) {\n vimKeys[e.keyCode].fun(e);\n } else {\n if (e.target === document.body || tagName === 'a' || tagName === 'button') {\n e.preventDefault();\n vimKeys[e.keyCode].fun();\n }\n }\n }\n });\n }\n\n function highlightResult (which) {\n return function (noScroll, keepFocus) {\n var current = document.querySelector('.result[data-vim-selected]'),\n effectiveWhich = which;\n if (current === null) {\n // no selection : choose the first one\n current = document.querySelector('.result');\n if (current === null) {\n // no first one : there are no results\n return;\n }\n // replace up/down actions by selecting first one\n if (which === \"down\" || which === \"up\") {\n effectiveWhich = current;\n }\n }\n\n var next, results = document.querySelectorAll('.result');\n\n if (typeof effectiveWhich !== 'string') {\n next = effectiveWhich;\n } else {\n switch (effectiveWhich) {\n case 'visible':\n var top = document.documentElement.scrollTop || document.body.scrollTop;\n var bot = top + document.documentElement.clientHeight;\n\n for (var i = 0; i < results.length; i++) {\n next = results[i];\n var etop = next.offsetTop;\n var ebot = etop + next.clientHeight;\n\n if ((ebot <= bot) && (etop > top)) {\n break;\n }\n }\n break;\n case 'down':\n next = current.nextElementSibling;\n if (next === null) {\n next = results[0];\n }\n break;\n case 'up':\n next = current.previousElementSibling;\n if (next === null) {\n next = results[results.length - 1];\n }\n break;\n case 'bottom':\n next = results[results.length - 1];\n break;\n case 'top':\n /* falls through */\n default:\n next = results[0];\n }\n }\n\n if (next) {\n current.removeAttribute('data-vim-selected');\n next.setAttribute('data-vim-selected', 'true');\n if (!keepFocus) {\n var link = next.querySelector('h3 a') || next.querySelector('a');\n if (link !== null) {\n link.focus();\n }\n }\n if (!noScroll) {\n scrollPageToSelected();\n }\n }\n };\n }\n\n function reloadPage () {\n document.location.reload(true);\n }\n\n function removeFocus (e) {\n const tagName = e.target.tagName.toLowerCase();\n if (document.activeElement && (tagName === 'input' || tagName === 'select' || tagName === 'textarea')) {\n document.activeElement.blur();\n } else {\n searxng.closeDetail();\n }\n }\n\n function pageButtonClick (css_selector) {\n return function () {\n var button = document.querySelector(css_selector);\n if (button) {\n button.click();\n }\n };\n }\n\n function GoToNextPage () {\n return pageButtonClick('nav#pagination .next_page button[type=\"submit\"]');\n }\n\n function GoToPreviousPage () {\n return pageButtonClick('nav#pagination .previous_page button[type=\"submit\"]');\n }\n\n function scrollPageToSelected () {\n var sel = document.querySelector('.result[data-vim-selected]');\n if (sel === null) {\n return;\n }\n var wtop = document.documentElement.scrollTop || document.body.scrollTop,\n wheight = document.documentElement.clientHeight,\n etop = sel.offsetTop,\n ebot = etop + sel.clientHeight,\n offset = 120;\n // first element ?\n if ((sel.previousElementSibling === null) && (ebot < wheight)) {\n // set to the top of page if the first element\n // is fully included in the viewport\n window.scroll(window.scrollX, 0);\n return;\n }\n if (wtop > (etop - offset)) {\n window.scroll(window.scrollX, etop - offset);\n } else {\n var wbot = wtop + wheight;\n if (wbot < (ebot + offset)) {\n window.scroll(window.scrollX, ebot - wheight + offset);\n }\n }\n }\n\n function scrollPage (amount) {\n return function () {\n window.scrollBy(0, amount);\n highlightResult('visible')();\n };\n }\n\n function scrollPageTo (position, nav) {\n return function () {\n window.scrollTo(0, position);\n highlightResult(nav)();\n };\n }\n\n function searchInputFocus () {\n window.scrollTo(0, 0);\n var q = document.querySelector('#q');\n q.focus();\n if (q.setSelectionRange) {\n var len = q.value.length;\n q.setSelectionRange(len, len);\n }\n }\n\n function openResult (newTab) {\n return function () {\n var link = document.querySelector('.result[data-vim-selected] h3 a');\n if (link === null) {\n link = document.querySelector('.result[data-vim-selected] > a');\n }\n if (link !== null) {\n var url = link.getAttribute('href');\n if (newTab) {\n window.open(url);\n } else {\n window.location.href = url;\n }\n }\n };\n }\n\n function initHelpContent (divElement) {\n var categories = {};\n\n for (var k in vimKeys) {\n var key = vimKeys[k];\n categories[key.cat] = categories[key.cat] || [];\n categories[key.cat].push(key);\n }\n\n var sorted = Object.keys(categories).sort(function (a, b) {\n return categories[b].length - categories[a].length;\n });\n\n if (sorted.length === 0) {\n return;\n }\n\n var html = '×';\n html += '

How to navigate searx with Vim-like hotkeys

';\n html += '';\n\n for (var i = 0; i < sorted.length; i++) {\n var cat = categories[sorted[i]];\n\n var lastCategory = i === (sorted.length - 1);\n var first = i % 2 === 0;\n\n if (first) {\n html += '';\n }\n html += ''; // col-sm-*\n\n if (!first || lastCategory) {\n html += ''; // row\n }\n }\n\n html += '
';\n\n html += '

' + cat[0].cat + '

';\n html += '
    ';\n\n for (var cj in cat) {\n html += '
  • ' + cat[cj].key + ' ' + cat[cj].des + '
  • ';\n }\n\n html += '
';\n html += '
';\n\n divElement.innerHTML = html;\n }\n\n function toggleHelp () {\n var helpPanel = document.querySelector('#vim-hotkeys-help');\n if (helpPanel === undefined || helpPanel === null) {\n // first call\n helpPanel = document.createElement('div');\n helpPanel.id = 'vim-hotkeys-help';\n helpPanel.className = 'dialog-modal';\n initHelpContent(helpPanel);\n initHelpContent(helpPanel);\n initHelpContent(helpPanel);\n var body = document.getElementsByTagName('body')[0];\n body.appendChild(helpPanel);\n } else {\n // togggle hidden\n helpPanel.classList.toggle('invisible');\n return;\n }\n }\n\n searxng.scrollPageToSelected = scrollPageToSelected;\n searxng.selectNext = highlightResult('down');\n searxng.selectPrevious = highlightResult('up');\n});\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n/* global L */\n(function (w, d, searxng) {\n 'use strict';\n\n searxng.ready(function () {\n searxng.on('.searxng_init_map', 'click', function (event) {\n // no more request\n this.classList.remove(\"searxng_init_map\");\n\n //\n var leaflet_target = this.dataset.leafletTarget;\n var map_lon = parseFloat(this.dataset.mapLon);\n var map_lat = parseFloat(this.dataset.mapLat);\n var map_zoom = parseFloat(this.dataset.mapZoom);\n var map_boundingbox = JSON.parse(this.dataset.mapBoundingbox);\n var map_geojson = JSON.parse(this.dataset.mapGeojson);\n\n searxng.loadStyle('css/leaflet.css');\n searxng.loadScript('js/leaflet.js', function () {\n var map_bounds = null;\n if (map_boundingbox) {\n var southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]);\n var northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]);\n map_bounds = L.latLngBounds(southWest, northEast);\n }\n\n // init map\n var map = L.map(leaflet_target);\n // create the tile layer with correct attribution\n var osmMapnikUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';\n var osmMapnikAttrib = 'Map data © OpenStreetMap contributors';\n var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib});\n var osmWikimediaUrl = 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png';\n var osmWikimediaAttrib = 'Wikimedia maps | Maps data © OpenStreetMap contributors';\n var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib});\n // init map view\n if (map_bounds) {\n // TODO hack: https://github.com/Leaflet/Leaflet/issues/2021\n // Still useful ?\n setTimeout(function () {\n map.fitBounds(map_bounds, {\n maxZoom: 17\n });\n }, 0);\n } else if (map_lon && map_lat) {\n if (map_zoom) {\n map.setView(new L.latLng(map_lat, map_lon), map_zoom);\n } else {\n map.setView(new L.latLng(map_lat, map_lon), 8);\n }\n }\n\n map.addLayer(osmMapnik);\n\n var baseLayers = {\n \"OSM Mapnik\": osmMapnik,\n \"OSM Wikimedia\": osmWikimedia,\n };\n\n L.control.layers(baseLayers).addTo(map);\n\n if (map_geojson) {\n L.geoJson(map_geojson).addTo(map);\n } /* else if(map_bounds) {\n L.rectangle(map_bounds, {color: \"#ff7800\", weight: 3, fill:false}).addTo(map);\n } */\n });\n\n // this event occour only once per element\n event.preventDefault();\n });\n });\n})(window, document, window.searxng);\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n(function (w, d, searxng) {\n 'use strict';\n\n if (searxng.endpoint !== 'preferences') {\n return;\n }\n\n searxng.ready(function () {\n let engine_descriptions = null;\n function load_engine_descriptions () {\n if (engine_descriptions == null) {\n searxng.http(\"GET\", \"engine_descriptions.json\").then(function (content) {\n engine_descriptions = JSON.parse(content);\n for (const [engine_name, description] of Object.entries(engine_descriptions)) {\n let elements = d.querySelectorAll('[data-engine-name=\"' + engine_name + '\"] .engine-description');\n for (const element of elements) {\n let source = ' (' + searxng.settings.translations.Source + ': ' + description[1] + ')';\n element.innerHTML = description[0] + source;\n }\n }\n });\n }\n }\n\n for (const el of d.querySelectorAll('[data-engine-name]')) {\n searxng.on(el, 'mouseenter', load_engine_descriptions);\n }\n });\n})(window, document, window.searxng);\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n(function (w, d, searxng) {\n 'use strict';\n\n if (searxng.endpoint !== 'results') {\n return;\n }\n\n searxng.ready(function () {\n d.querySelectorAll('#urls img.image').forEach(\n img =>\n img.addEventListener(\n 'error', () => {\n img.style.display = 'none';\n img.error = null;\n }\n ));\n\n searxng.on('.btn-collapse', 'click', function () {\n var btnLabelCollapsed = this.getAttribute('data-btn-text-collapsed');\n var btnLabelNotCollapsed = this.getAttribute('data-btn-text-not-collapsed');\n var target = this.getAttribute('data-target');\n var targetElement = d.querySelector(target);\n var html = this.innerHTML;\n if (this.classList.contains('collapsed')) {\n html = html.replace(btnLabelCollapsed, btnLabelNotCollapsed);\n } else {\n html = html.replace(btnLabelNotCollapsed, btnLabelCollapsed);\n }\n this.innerHTML = html;\n this.classList.toggle('collapsed');\n targetElement.classList.toggle('invisible');\n });\n\n searxng.on('.media-loader', 'click', function () {\n var target = this.getAttribute('data-target');\n var iframe_load = d.querySelector(target + ' > iframe');\n var srctest = iframe_load.getAttribute('src');\n if (srctest === null || srctest === undefined || srctest === false) {\n iframe_load.setAttribute('src', iframe_load.getAttribute('data-src'));\n }\n });\n\n searxng.selectImage = function (resultElement) {\n /* eslint no-unused-vars: 0 */\n if (resultElement) {\n // load full size image in background\n const imgElement = resultElement.querySelector('.result-images-source img');\n const thumbnailElement = resultElement.querySelector('.image_thumbnail');\n const detailElement = resultElement.querySelector('.detail');\n if (imgElement) {\n const imgSrc = imgElement.getAttribute('data-src');\n if (imgSrc) {\n const loader = d.createElement('div');\n const imgLoader = new Image();\n\n loader.classList.add('loader');\n detailElement.appendChild(loader);\n\n imgLoader.onload = e => {\n imgElement.src = imgSrc;\n loader.remove();\n };\n imgLoader.onerror = e => {\n loader.remove();\n };\n imgLoader.src = imgSrc;\n imgElement.src = thumbnailElement.src;\n imgElement.removeAttribute('data-src');\n }\n }\n }\n d.getElementById('results').classList.add('image-detail-open');\n searxng.scrollPageToSelected();\n }\n\n searxng.closeDetail = function (e) {\n d.getElementById('results').classList.remove('image-detail-open');\n searxng.scrollPageToSelected();\n }\n searxng.on('.result-detail-close', 'click', e => {\n e.preventDefault();\n searxng.closeDetail();\n });\n searxng.on('.result-detail-previous', 'click', e => searxng.selectPrevious(false));\n searxng.on('.result-detail-next', 'click', e => searxng.selectNext(false));\n\n w.addEventListener('scroll', function () {\n var e = d.getElementById('backToTop'),\n scrollTop = document.documentElement.scrollTop || document.body.scrollTop,\n results = d.getElementById('results');\n if (e !== null) {\n if (scrollTop >= 100) {\n results.classList.add('scrolling');\n } else {\n results.classList.remove('scrolling');\n }\n }\n }, true);\n\n });\n\n})(window, document, window.searxng);\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n/* global AutoComplete */\n(function (w, d, searxng) {\n 'use strict';\n\n var qinput_id = \"q\", qinput;\n\n const isMobile = window.matchMedia(\"only screen and (max-width: 50em)\").matches;\n\n function submitIfQuery () {\n if (qinput.value.length > 0) {\n var search = document.getElementById('search');\n setTimeout(search.submit.bind(search), 0);\n }\n }\n\n function createClearButton (qinput) {\n var cs = document.getElementById('clear_search');\n var updateClearButton = function () {\n if (qinput.value.length === 0) {\n cs.classList.add(\"empty\");\n } else {\n cs.classList.remove(\"empty\");\n }\n };\n\n // update status, event listener\n updateClearButton();\n cs.addEventListener('click', function (ev) {\n qinput.value = '';\n qinput.focus();\n updateClearButton();\n ev.preventDefault();\n });\n qinput.addEventListener('keyup', updateClearButton, false);\n }\n\n searxng.ready(function () {\n qinput = d.getElementById(qinput_id);\n\n if (qinput !== null) {\n // clear button\n createClearButton(qinput);\n\n // autocompleter\n if (searxng.settings.autocomplete_provider) {\n searxng.autocomplete = AutoComplete.call(w, {\n Url: \"./autocompleter\",\n EmptyMessage: searxng.settings.translations.no_item_found,\n HttpMethod: searxng.settings.http_method,\n HttpHeaders: {\n \"Content-type\": \"application/x-www-form-urlencoded\",\n \"X-Requested-With\": \"XMLHttpRequest\"\n },\n MinChars: searxng.settings.autocomplete_min,\n Delay: 300,\n _Position: function () {},\n _Open: function () {\n var params = this;\n Array.prototype.forEach.call(this.DOMResults.getElementsByTagName(\"li\"), function (li) {\n if (li.getAttribute(\"class\") != \"locked\") {\n li.onmousedown = function () {\n params._Select(li);\n };\n }\n });\n },\n }, \"#\" + qinput_id);\n }\n\n /*\n Monkey patch autocomplete.js to fix a bug\n With the POST method, the values are not URL encoded: query like \"1 + 1\" are sent as \"1 1\" since space are URL encoded as plus.\n See HTML specifications:\n * HTML5: https://url.spec.whatwg.org/#concept-urlencoded-serializer\n * HTML4: https://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1\n\n autocomplete.js does not URL encode the name and values:\n https://github.com/autocompletejs/autocomplete.js/blob/87069524f3b95e68f1b54d8976868e0eac1b2c83/src/autocomplete.ts#L665\n\n The monkey patch overrides the compiled version of the ajax function.\n See https://github.com/autocompletejs/autocomplete.js/blob/87069524f3b95e68f1b54d8976868e0eac1b2c83/dist/autocomplete.js#L143-L158\n The patch changes only the line 156 from\n params.Request.send(params._QueryArg() + \"=\" + params._Pre());\n to\n params.Request.send(encodeURIComponent(params._QueryArg()) + \"=\" + encodeURIComponent(params._Pre()));\n\n Related to:\n * https://github.com/autocompletejs/autocomplete.js/issues/78\n * https://github.com/searxng/searxng/issues/1695\n */\n AutoComplete.prototype.ajax = function (params, request, timeout) {\n if (timeout === void 0) { timeout = true; }\n if (params.$AjaxTimer) {\n window.clearTimeout(params.$AjaxTimer);\n }\n if (timeout === true) {\n params.$AjaxTimer = window.setTimeout(AutoComplete.prototype.ajax.bind(null, params, request, false), params.Delay);\n } else {\n if (params.Request) {\n params.Request.abort();\n }\n params.Request = request;\n params.Request.send(encodeURIComponent(params._QueryArg()) + \"=\" + encodeURIComponent(params._Pre()));\n }\n };\n\n if (!isMobile && document.querySelector('.index_endpoint')) {\n qinput.focus();\n }\n }\n\n // vanilla js version of search_on_category_select.js\n if (qinput !== null && d.querySelector('.help') != null && searxng.settings.search_on_category_select) {\n d.querySelector('.help').className = 'invisible';\n\n searxng.on('#categories input', 'change', function () {\n var i, categories = d.querySelectorAll('#categories input[type=\"checkbox\"]');\n for (i = 0; i < categories.length; i++) {\n if (categories[i] !== this && categories[i].checked) {\n categories[i].click();\n }\n }\n if (! this.checked) {\n this.click();\n }\n submitIfQuery();\n return false;\n });\n\n searxng.on(d.getElementById('safesearch'), 'change', submitIfQuery);\n searxng.on(d.getElementById('time_range'), 'change', submitIfQuery);\n searxng.on(d.getElementById('language'), 'change', submitIfQuery);\n }\n\n });\n\n})(window, document, window.searxng);\n","(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(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i @baptistedonaux\n */\nvar AutoComplete = /** @class */ (function () {\n // Constructor\n function AutoComplete(params, selector) {\n if (params === void 0) { params = {}; }\n if (selector === void 0) { selector = \"[data-autocomplete]\"; }\n if (Array.isArray(selector)) {\n selector.forEach(function (s) {\n new AutoComplete(params, s);\n });\n }\n else if (typeof selector == \"string\") {\n var elements = document.querySelectorAll(selector);\n Array.prototype.forEach.call(elements, function (input) {\n new AutoComplete(params, input);\n });\n }\n else {\n var specificParams = AutoComplete.merge(AutoComplete.defaults, params, {\n DOMResults: document.createElement(\"div\")\n });\n AutoComplete.prototype.create(specificParams, selector);\n return specificParams;\n }\n }\n AutoComplete.prototype.create = function (params, element) {\n params.Input = element;\n if (params.Input.nodeName.match(/^INPUT$/i) && (params.Input.hasAttribute(\"type\") === false || params.Input.getAttribute(\"type\").match(/^TEXT|SEARCH$/i))) {\n params.Input.setAttribute(\"autocomplete\", \"off\");\n params._Position(params);\n params.Input.parentNode.appendChild(params.DOMResults);\n params.$Listeners = {\n blur: params._Blur.bind(params),\n destroy: AutoComplete.prototype.destroy.bind(null, params),\n focus: params._Focus.bind(params),\n keyup: AutoComplete.prototype.event.bind(null, params, EventType.KEYUP),\n keydown: AutoComplete.prototype.event.bind(null, params, EventType.KEYDOWN),\n position: params._Position.bind(params)\n };\n for (var event in params.$Listeners) {\n params.Input.addEventListener(event, params.$Listeners[event]);\n }\n }\n };\n AutoComplete.prototype.getEventsByType = function (params, type) {\n var mappings = {};\n for (var key in params.KeyboardMappings) {\n var event = EventType.KEYUP;\n if (params.KeyboardMappings[key].Event !== undefined) {\n event = params.KeyboardMappings[key].Event;\n }\n if (event == type) {\n mappings[key] = params.KeyboardMappings[key];\n }\n }\n return mappings;\n };\n AutoComplete.prototype.event = function (params, type, event) {\n var eventIdentifier = function (condition) {\n if ((match === true && mapping.Operator == ConditionOperator.AND) || (match === false && mapping.Operator == ConditionOperator.OR)) {\n condition = AutoComplete.merge({\n Not: false\n }, condition);\n if (condition.hasOwnProperty(\"Is\")) {\n if (condition.Is == event.keyCode) {\n match = !condition.Not;\n }\n else {\n match = condition.Not;\n }\n }\n else if (condition.hasOwnProperty(\"From\") && condition.hasOwnProperty(\"To\")) {\n if (event.keyCode >= condition.From && event.keyCode <= condition.To) {\n match = !condition.Not;\n }\n else {\n match = condition.Not;\n }\n }\n }\n };\n for (var name in AutoComplete.prototype.getEventsByType(params, type)) {\n var mapping = AutoComplete.merge({\n Operator: ConditionOperator.AND\n }, params.KeyboardMappings[name]), match = ConditionOperator.AND == mapping.Operator;\n mapping.Conditions.forEach(eventIdentifier);\n if (match === true) {\n mapping.Callback.call(params, event);\n }\n }\n };\n AutoComplete.prototype.makeRequest = function (params, callback, callbackErr) {\n var propertyHttpHeaders = Object.getOwnPropertyNames(params.HttpHeaders), request = new XMLHttpRequest(), method = params._HttpMethod(), url = params._Url(), queryParams = params._Pre(), queryParamsStringify = encodeURIComponent(params._QueryArg()) + \"=\" + encodeURIComponent(queryParams);\n if (method.match(/^GET$/i)) {\n if (url.indexOf(\"?\") !== -1) {\n url += \"&\" + queryParamsStringify;\n }\n else {\n url += \"?\" + queryParamsStringify;\n }\n }\n request.open(method, url, true);\n for (var i = propertyHttpHeaders.length - 1; i >= 0; i--) {\n request.setRequestHeader(propertyHttpHeaders[i], params.HttpHeaders[propertyHttpHeaders[i]]);\n }\n request.onreadystatechange = function () {\n if (request.readyState == 4 && request.status == 200) {\n params.$Cache[queryParams] = request.response;\n callback(request.response);\n }\n else if (request.status >= 400) {\n callbackErr();\n }\n };\n return request;\n };\n AutoComplete.prototype.ajax = function (params, request, timeout) {\n if (timeout === void 0) { timeout = true; }\n if (params.$AjaxTimer) {\n window.clearTimeout(params.$AjaxTimer);\n }\n if (timeout === true) {\n params.$AjaxTimer = window.setTimeout(AutoComplete.prototype.ajax.bind(null, params, request, false), params.Delay);\n }\n else {\n if (params.Request) {\n params.Request.abort();\n }\n params.Request = request;\n params.Request.send(params._QueryArg() + \"=\" + params._Pre());\n }\n };\n AutoComplete.prototype.cache = function (params, callback, callbackErr) {\n var response = params._Cache(params._Pre());\n if (response === undefined) {\n var request = AutoComplete.prototype.makeRequest(params, callback, callbackErr);\n AutoComplete.prototype.ajax(params, request);\n }\n else {\n callback(response);\n }\n };\n AutoComplete.prototype.destroy = function (params) {\n for (var event in params.$Listeners) {\n params.Input.removeEventListener(event, params.$Listeners[event]);\n }\n params.DOMResults.parentNode.removeChild(params.DOMResults);\n };\n AutoComplete.merge = function () {\n var merge = {}, tmp;\n for (var i = 0; i < arguments.length; i++) {\n for (tmp in arguments[i]) {\n merge[tmp] = arguments[i][tmp];\n }\n }\n return merge;\n };\n AutoComplete.defaults = {\n Delay: 150,\n EmptyMessage: \"No result here\",\n Highlight: {\n getRegex: function (value) {\n return new RegExp(value, \"ig\");\n },\n transform: function (value) {\n return \"\" + value + \"\";\n }\n },\n HttpHeaders: {\n \"Content-type\": \"application/x-www-form-urlencoded\"\n },\n Limit: 0,\n MinChars: 0,\n HttpMethod: \"GET\",\n QueryArg: \"q\",\n Url: null,\n KeyboardMappings: {\n \"Enter\": {\n Conditions: [{\n Is: 13,\n Not: false\n }],\n Callback: function (event) {\n if (this.DOMResults.getAttribute(\"class\").indexOf(\"open\") != -1) {\n var liActive = this.DOMResults.querySelector(\"li.active\");\n if (liActive !== null) {\n event.preventDefault();\n this._Select(liActive);\n this.DOMResults.setAttribute(\"class\", \"autocomplete\");\n }\n }\n },\n Operator: ConditionOperator.AND,\n Event: EventType.KEYDOWN\n },\n \"KeyUpAndDown_down\": {\n Conditions: [{\n Is: 38,\n Not: false\n },\n {\n Is: 40,\n Not: false\n }],\n Callback: function (event) {\n event.preventDefault();\n },\n Operator: ConditionOperator.OR,\n Event: EventType.KEYDOWN\n },\n \"KeyUpAndDown_up\": {\n Conditions: [{\n Is: 38,\n Not: false\n },\n {\n Is: 40,\n Not: false\n }],\n Callback: function (event) {\n event.preventDefault();\n 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\");\n if (active) {\n var currentIndex = Array.prototype.indexOf.call(active.parentNode.children, active), position = currentIndex + (event.keyCode - 39), lisCount = this.DOMResults.getElementsByTagName(\"li\").length;\n if (position < 0) {\n position = lisCount - 1;\n }\n else if (position >= lisCount) {\n position = 0;\n }\n active.classList.remove(\"active\");\n active.parentElement.children.item(position).classList.add(\"active\");\n }\n else if (last && event.keyCode == 38) {\n last.classList.add(\"active\");\n }\n else if (first) {\n first.classList.add(\"active\");\n }\n },\n Operator: ConditionOperator.OR,\n Event: EventType.KEYUP\n },\n \"AlphaNum\": {\n Conditions: [{\n Is: 13,\n Not: true\n }, {\n From: 35,\n To: 40,\n Not: true\n }],\n Callback: function () {\n var oldValue = this.Input.getAttribute(\"data-autocomplete-old-value\"), currentValue = this._Pre();\n if (currentValue !== \"\" && currentValue.length >= this._MinChars()) {\n if (!oldValue || currentValue != oldValue) {\n this.DOMResults.setAttribute(\"class\", \"autocomplete open\");\n }\n AutoComplete.prototype.cache(this, function (response) {\n this._Render(this._Post(response));\n this._Open();\n }.bind(this), this._Error);\n }\n else {\n this._Close();\n }\n },\n Operator: ConditionOperator.AND,\n Event: EventType.KEYUP\n }\n },\n DOMResults: null,\n Request: null,\n Input: null,\n /**\n * Return the message when no result returns\n */\n _EmptyMessage: function () {\n var emptyMessage = \"\";\n if (this.Input.hasAttribute(\"data-autocomplete-empty-message\")) {\n emptyMessage = this.Input.getAttribute(\"data-autocomplete-empty-message\");\n }\n else if (this.EmptyMessage !== false) {\n emptyMessage = this.EmptyMessage;\n }\n else {\n emptyMessage = \"\";\n }\n return emptyMessage;\n },\n /**\n * Returns the maximum number of results\n */\n _Limit: function () {\n var limit = this.Input.getAttribute(\"data-autocomplete-limit\");\n if (isNaN(limit) || limit === null) {\n return this.Limit;\n }\n return parseInt(limit, 10);\n },\n /**\n * Returns the minimum number of characters entered before firing ajax\n */\n _MinChars: function () {\n var minchars = this.Input.getAttribute(\"data-autocomplete-minchars\");\n if (isNaN(minchars) || minchars === null) {\n return this.MinChars;\n }\n return parseInt(minchars, 10);\n },\n /**\n * Apply transformation on labels response\n */\n _Highlight: function (label) {\n return label.replace(this.Highlight.getRegex(this._Pre()), this.Highlight.transform);\n },\n /**\n * Returns the HHTP method to use\n */\n _HttpMethod: function () {\n if (this.Input.hasAttribute(\"data-autocomplete-method\")) {\n return this.Input.getAttribute(\"data-autocomplete-method\");\n }\n return this.HttpMethod;\n },\n /**\n * Returns the query param to use\n */\n _QueryArg: function () {\n if (this.Input.hasAttribute(\"data-autocomplete-param-name\")) {\n return this.Input.getAttribute(\"data-autocomplete-param-name\");\n }\n return this.QueryArg;\n },\n /**\n * Returns the URL to use for AJAX request\n */\n _Url: function () {\n if (this.Input.hasAttribute(\"data-autocomplete\")) {\n return this.Input.getAttribute(\"data-autocomplete\");\n }\n return this.Url;\n },\n /**\n * Manage the close\n */\n _Blur: function (now) {\n if (now === void 0) { now = false; }\n if (now) {\n this._Close();\n }\n else {\n var params = this;\n setTimeout(function () {\n params._Blur(true);\n }, 150);\n }\n },\n /**\n * Manage the cache\n */\n _Cache: function (value) {\n return this.$Cache[value];\n },\n /**\n * Manage the open\n */\n _Focus: function () {\n var oldValue = this.Input.getAttribute(\"data-autocomplete-old-value\");\n if ((!oldValue || this.Input.value != oldValue) && this._MinChars() <= this.Input.value.length) {\n this.DOMResults.setAttribute(\"class\", \"autocomplete open\");\n }\n },\n /**\n * Bind all results item if one result is opened\n */\n _Open: function () {\n var params = this;\n Array.prototype.forEach.call(this.DOMResults.getElementsByTagName(\"li\"), function (li) {\n if (li.getAttribute(\"class\") != \"locked\") {\n li.onclick = function () {\n params._Select(li);\n };\n }\n });\n },\n _Close: function () {\n this.DOMResults.setAttribute(\"class\", \"autocomplete\");\n },\n /**\n * Position the results HTML element\n */\n _Position: function () {\n this.DOMResults.setAttribute(\"class\", \"autocomplete\");\n this.DOMResults.setAttribute(\"style\", \"top:\" + (this.Input.offsetTop + this.Input.offsetHeight) + \"px;left:\" + this.Input.offsetLeft + \"px;width:\" + this.Input.clientWidth + \"px;\");\n },\n /**\n * Execute the render of results DOM element\n */\n _Render: function (response) {\n var ul;\n if (typeof response == \"string\") {\n ul = this._RenderRaw(response);\n }\n else {\n ul = this._RenderResponseItems(response);\n }\n if (this.DOMResults.hasChildNodes()) {\n this.DOMResults.removeChild(this.DOMResults.childNodes[0]);\n }\n this.DOMResults.appendChild(ul);\n },\n /**\n * ResponseItems[] rendering\n */\n _RenderResponseItems: function (response) {\n var ul = document.createElement(\"ul\"), li = document.createElement(\"li\"), limit = this._Limit();\n // Order\n if (limit < 0) {\n response = response.reverse();\n }\n else if (limit === 0) {\n limit = response.length;\n }\n for (var item = 0; item < Math.min(Math.abs(limit), response.length); item++) {\n li.innerHTML = response[item].Label;\n li.setAttribute(\"data-autocomplete-value\", response[item].Value);\n ul.appendChild(li);\n li = document.createElement(\"li\");\n }\n return ul;\n },\n /**\n * string response rendering (RAW HTML)\n */\n _RenderRaw: function (response) {\n var ul = document.createElement(\"ul\"), li = document.createElement(\"li\");\n if (response.length > 0) {\n this.DOMResults.innerHTML = response;\n }\n else {\n var emptyMessage = this._EmptyMessage();\n if (emptyMessage !== \"\") {\n li.innerHTML = emptyMessage;\n li.setAttribute(\"class\", \"locked\");\n ul.appendChild(li);\n }\n }\n return ul;\n },\n /**\n * Deal with request response\n */\n _Post: function (response) {\n try {\n var returnResponse = [];\n //JSON return\n var json = JSON.parse(response);\n if (Object.keys(json).length === 0) {\n return \"\";\n }\n if (Array.isArray(json)) {\n for (var i = 0; i < Object.keys(json).length; i++) {\n returnResponse[returnResponse.length] = { \"Value\": json[i], \"Label\": this._Highlight(json[i]) };\n }\n }\n else {\n for (var value in json) {\n returnResponse.push({\n \"Value\": value,\n \"Label\": this._Highlight(json[value])\n });\n }\n }\n return returnResponse;\n }\n catch (event) {\n //HTML return\n return response;\n }\n },\n /**\n * Return the autocomplete value to send (before request)\n */\n _Pre: function () {\n return this.Input.value;\n },\n /**\n * Choice one result item\n */\n _Select: function (item) {\n if (item.hasAttribute(\"data-autocomplete-value\")) {\n this.Input.value = item.getAttribute(\"data-autocomplete-value\");\n }\n else {\n this.Input.value = item.innerHTML;\n }\n this.Input.setAttribute(\"data-autocomplete-old-value\", this.Input.value);\n },\n /**\n * Handle HTTP error on the request\n */\n _Error: function () {\n },\n $AjaxTimer: null,\n $Cache: {},\n $Listeners: {}\n };\n return AutoComplete;\n}());\nmodule.exports = AutoComplete;\n\n},{}]},{},[1])(1)\n});\n"],"names":["window","searxng","w","d","Element","ElementPrototype","matches","matchesSelector","webkitMatchesSelector","msMatchesSelector","selector","node","this","nodes","parentNode","document","querySelectorAll","i","prototype","callbackSafe","callback","el","e","call","exception","console","log","on","obj","eventType","useCapture","addEventListener","target","srcElement","found","parentElement","ready","readyState","bind","http","method","url","data","Promise","resolve","reject","req","XMLHttpRequest","open","timeout","onload","status","response","responseType","Error","statusText","onerror","onabort","ontimeout","send","ex","loadStyle","src","path","settings","theme_static_path","id","replace","s","getElementById","createElement","setAttribute","body","appendChild","loadScript","hasAttribute","apply","insertBefore","newNode","referenceNode","insertAfter","nextSibling","classList","add","getEndpoint","className","getElementsByTagName","values","endsWith","split","endpoint","infinite_scroll_supported","IntersectionObserverEntry","let","onlyImages","contains","newLoadSpinner","loader","replaceChildrenWith","element","children","textContent","forEach","child","loadNextPage","form","querySelector","formData","FormData","getAttribute","then","nextPageDoc","DOMParser","parseFromString","articleList","paginationElement","remove","length","articleElement","catch","err","translations","error_loading_next_page","infinite_scroll","intersectionObserveOptions","rootMargin","observedSelector","observer","IntersectionObserver","entries","paginationEntry","isIntersecting","unobserve","observe","isElementInDetail","undefined","getResultElement","isImageResult","resultElement","highlightResult","preventDefault","selectImage","vimKeys","27","key","fun","removeFocus","des","cat","73","searchInputFocus","66","scrollPage","innerHeight","70","85","68","71","scrollPageTo","scrollHeight","86","75","74","80","GoToPreviousPage","78","GoToNextPage","79","openResult","84","82","reloadPage","72","toggleHelp","hotkeys","Object","hasOwnProperty","keyCode","ctrlKey","altKey","shiftKey","metaKey","tagName","toLowerCase","which","noScroll","keepFocus","current","effectiveWhich","next","results","top","documentElement","scrollTop","bot","clientHeight","etop","offsetTop","ebot","nextElementSibling","previousElementSibling","removeAttribute","link","focus","scrollPageToSelected","location","reload","activeElement","blur","closeDetail","pageButtonClick","css_selector","button","click","sel","wtop","wheight","offset","scroll","scrollX","wbot","amount","scrollBy","position","nav","scrollTo","q","setSelectionRange","len","value","newTab","href","initHelpContent","divElement","categories","k","push","sorted","keys","sort","a","b","html","lastCategory","first","cj","innerHTML","helpPanel","toggle","selectNext","selectPrevious","event","leaflet_target","dataset","leafletTarget","map_lon","parseFloat","mapLon","map_lat","mapLat","map_zoom","mapZoom","map_boundingbox","JSON","parse","mapBoundingbox","map_geojson","mapGeojson","map_bounds","southWest","L","latLng","northEast","latLngBounds","map","osmMapnikUrl","osmMapnikAttrib","osmMapnik","TileLayer","minZoom","maxZoom","attribution","osmWikimediaUrl","osmWikimediaAttrib","osmWikimedia","setTimeout","fitBounds","setView","addLayer","baseLayers","OSM Mapnik","OSM Wikimedia","control","layers","addTo","geoJson","engine_descriptions","load_engine_descriptions","content","engine_name","description","elements","source","Source","img","style","display","error","btnLabelCollapsed","btnLabelNotCollapsed","targetElement","iframe_load","srctest","imgElement","thumbnailElement","detailElement","imgSrc","imgLoader","Image","qinput_id","qinput","isMobile","matchMedia","submitIfQuery","search","submit","createClearButton","cs","updateClearButton","ev","autocomplete_provider","autocomplete","AutoComplete","Url","EmptyMessage","no_item_found","HttpMethod","http_method","HttpHeaders","Content-type","X-Requested-With","MinChars","autocomplete_min","Delay","_Position","_Open","params","Array","DOMResults","li","onmousedown","_Select","ajax","request","$AjaxTimer","clearTimeout","Request","abort","encodeURIComponent","_QueryArg","_Pre","search_on_category_select","checked","f","exports","module","define","amd","g","global","self","r","n","t","o","c","require","u","code","p","1","ConditionOperator","EventType","isArray","input","specificParams","merge","defaults","create","Input","nodeName","match","$Listeners","_Blur","destroy","_Focus","keyup","KEYUP","keydown","KEYDOWN","getEventsByType","type","mappings","KeyboardMappings","Event","eventIdentifier","condition","mapping","Operator","AND","OR","Not","Is","From","To","name","Conditions","Callback","makeRequest","callbackErr","propertyHttpHeaders","getOwnPropertyNames","_HttpMethod","_Url","queryParams","queryParamsStringify","indexOf","setRequestHeader","onreadystatechange","$Cache","cache","_Cache","removeEventListener","removeChild","tmp","arguments","Highlight","getRegex","RegExp","transform","Limit","QueryArg","Enter","liActive","KeyUpAndDown_down","KeyUpAndDown_up","last","active","currentIndex","lisCount","item","AlphaNum","oldValue","currentValue","_MinChars","_Render","_Post","_Error","_Close","_EmptyMessage","emptyMessage","_Limit","limit","isNaN","parseInt","minchars","_Highlight","label","now","onclick","offsetHeight","offsetLeft","clientWidth","ul","_RenderRaw","_RenderResponseItems","hasChildNodes","childNodes","reverse","Math","min","abs","Label","Value","returnResponse","json"],"mappings":";;;;;GAMAA;OAAOC,QAAU,SAAWC,EAAGC,GAE7B,aAMA,GAAID,EAAEE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,WACF,OAAO5V,KAAKyX,MAAMhK,KACtB,EAIA0H,QAAS,SAAUmG,GACf,GAAIA,EAAKvX,aAAa,yBAAyB,EAAG,CAC9C/D,KAAKyX,MAAMhK,MAAQ6N,EAAKrV,aAAa,yBAAyB,CAClE,KACK,CACDjG,KAAKyX,MAAMhK,MAAQ6N,EAAK5M,SAC5B,CACA1O,KAAKyX,MAAM9T,aAAa,8BAA+B3D,KAAKyX,MAAMhK,KAAK,CAC3E,EAIAoO,OAAQ,aAERvG,WAAY,KACZ2E,OAAQ,GACRrC,WAAY,EAChB,EACA,OAAO5D,CACX,EAAG,EACHiC,EAAOD,QAAUhC,CAEjB,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAChB,CAAC"} \ No newline at end of file diff --git a/searx/static/themes/simple/package.json b/searx/static/themes/simple/package.json index 39a4de2d9..91ceb3f22 100644 --- a/searx/static/themes/simple/package.json +++ b/searx/static/themes/simple/package.json @@ -18,7 +18,7 @@ "stylelint": "^13.13.1", "stylelint-config-standard": "^22.0.0", "ejs": "^3.1.8", - "svgo": "^2.8.0" + "svgo": "^3.0.0" }, "dependencies": { "autocomplete-js": "2.7.1",