diff --git a/.buildinfo b/.buildinfo index a91bca3..6335acc 100644 --- a/.buildinfo +++ b/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: e55bc64e0067ab6e7273e407b0228137 +config: e7f300c030dadb271a156d06a9ad5681 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/_modules/awips/DateTimeConverter.html b/_modules/awips/DateTimeConverter.html index 9380c89..899a8ec 100644 --- a/_modules/awips/DateTimeConverter.html +++ b/_modules/awips/DateTimeConverter.html @@ -3,9 +3,9 @@ - + - + awips.DateTimeConverter — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -50,7 +52,7 @@ - python-awips + python-awips @@ -132,6 +134,8 @@ + +
- diff --git a/_modules/awips/RadarCommon.html b/_modules/awips/RadarCommon.html index 3956813..2c75f65 100644 --- a/_modules/awips/RadarCommon.html +++ b/_modules/awips/RadarCommon.html @@ -3,9 +3,9 @@ - + - + awips.RadarCommon — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -50,7 +52,7 @@ - python-awips + python-awips @@ -132,6 +134,8 @@ + +
- diff --git a/_modules/awips/ThriftClient.html b/_modules/awips/ThriftClient.html index 3286fd8..f829ff7 100644 --- a/_modules/awips/ThriftClient.html +++ b/_modules/awips/ThriftClient.html @@ -3,9 +3,9 @@ - + - + awips.ThriftClient — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -50,7 +52,7 @@ - python-awips + python-awips @@ -132,6 +134,8 @@ + +
- diff --git a/_modules/awips/TimeUtil.html b/_modules/awips/TimeUtil.html index e02fa6b..e7a7560 100644 --- a/_modules/awips/TimeUtil.html +++ b/_modules/awips/TimeUtil.html @@ -3,9 +3,9 @@ - + - + awips.TimeUtil — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -50,7 +52,7 @@ - python-awips + python-awips @@ -132,6 +134,8 @@ + +
- diff --git a/_modules/awips/dataaccess.html b/_modules/awips/dataaccess.html index 1ce8030..c9921cb 100644 --- a/_modules/awips/dataaccess.html +++ b/_modules/awips/dataaccess.html @@ -3,9 +3,9 @@ - + - + awips.dataaccess — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -50,7 +52,7 @@ - python-awips + python-awips @@ -132,6 +134,8 @@ + +
- diff --git a/_modules/awips/dataaccess/CombinedTimeQuery.html b/_modules/awips/dataaccess/CombinedTimeQuery.html index c72735a..6de050d 100644 --- a/_modules/awips/dataaccess/CombinedTimeQuery.html +++ b/_modules/awips/dataaccess/CombinedTimeQuery.html @@ -3,9 +3,9 @@ - + - + awips.dataaccess.CombinedTimeQuery — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -50,7 +52,7 @@ - python-awips + python-awips @@ -132,6 +134,8 @@ + +
- diff --git a/_modules/awips/dataaccess/DataAccessLayer.html b/_modules/awips/dataaccess/DataAccessLayer.html index 50fd21a..1b60373 100644 --- a/_modules/awips/dataaccess/DataAccessLayer.html +++ b/_modules/awips/dataaccess/DataAccessLayer.html @@ -3,9 +3,9 @@ - + - + awips.dataaccess.DataAccessLayer — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -50,7 +52,7 @@ - python-awips + python-awips @@ -132,6 +134,8 @@ + +
- diff --git a/_modules/awips/dataaccess/ModelSounding.html b/_modules/awips/dataaccess/ModelSounding.html index a922f39..7c67749 100644 --- a/_modules/awips/dataaccess/ModelSounding.html +++ b/_modules/awips/dataaccess/ModelSounding.html @@ -3,9 +3,9 @@ - + - + awips.dataaccess.ModelSounding — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -50,7 +52,7 @@ - python-awips + python-awips @@ -132,6 +134,8 @@ + +
- diff --git a/_modules/awips/dataaccess/PyData.html b/_modules/awips/dataaccess/PyData.html index c6f8470..408841a 100644 --- a/_modules/awips/dataaccess/PyData.html +++ b/_modules/awips/dataaccess/PyData.html @@ -3,9 +3,9 @@ - + - + awips.dataaccess.PyData — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -50,7 +52,7 @@ - python-awips + python-awips @@ -132,6 +134,8 @@ + +
- diff --git a/_modules/awips/dataaccess/PyGeometryData.html b/_modules/awips/dataaccess/PyGeometryData.html index 1e5805a..cc57e31 100644 --- a/_modules/awips/dataaccess/PyGeometryData.html +++ b/_modules/awips/dataaccess/PyGeometryData.html @@ -3,9 +3,9 @@ - + - + awips.dataaccess.PyGeometryData — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -50,7 +52,7 @@ - python-awips + python-awips @@ -132,6 +134,8 @@ + +
- diff --git a/_modules/awips/dataaccess/PyGridData.html b/_modules/awips/dataaccess/PyGridData.html index 63b276a..70c9c76 100644 --- a/_modules/awips/dataaccess/PyGridData.html +++ b/_modules/awips/dataaccess/PyGridData.html @@ -3,9 +3,9 @@ - + - + awips.dataaccess.PyGridData — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -50,7 +52,7 @@ - python-awips + python-awips @@ -132,6 +134,8 @@ + +
- diff --git a/_modules/awips/dataaccess/ThriftClientRouter.html b/_modules/awips/dataaccess/ThriftClientRouter.html index 6ee14bd..6ee73f6 100644 --- a/_modules/awips/dataaccess/ThriftClientRouter.html +++ b/_modules/awips/dataaccess/ThriftClientRouter.html @@ -3,9 +3,9 @@ - + - + awips.dataaccess.ThriftClientRouter — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -50,7 +52,7 @@ - python-awips + python-awips @@ -132,6 +134,8 @@ + +
- diff --git a/_modules/awips/gfe/IFPClient.html b/_modules/awips/gfe/IFPClient.html index d3014e1..0016d90 100644 --- a/_modules/awips/gfe/IFPClient.html +++ b/_modules/awips/gfe/IFPClient.html @@ -3,9 +3,9 @@ - + - + awips.gfe.IFPClient — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -50,7 +52,7 @@ - python-awips + python-awips @@ -132,6 +134,8 @@ + +
- diff --git a/_modules/index.html b/_modules/index.html index 884db7f..fb9a3b1 100644 --- a/_modules/index.html +++ b/_modules/index.html @@ -3,9 +3,9 @@ - + - + Overview: module code — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -50,7 +52,7 @@ - python-awips + python-awips @@ -132,6 +134,8 @@ + +
- diff --git a/_sources/examples/generated/Grid_Levels_and_Parameters.rst.txt b/_sources/examples/generated/Grid_Levels_and_Parameters.rst.txt index 4eb76e7..aabf540 100644 --- a/_sources/examples/generated/Grid_Levels_and_Parameters.rst.txt +++ b/_sources/examples/generated/Grid_Levels_and_Parameters.rst.txt @@ -2,9 +2,9 @@ Grid Levels and Parameters ========================== `Notebook `_ -This example covers the callable methods of the Python AWIPS DAF when -working with gridded data. We start with a connection to an EDEX server, -then query data types, then grid names, parameters, levels, and other +This example covers the callable methods of python-awips when working +with gridded data. We start with a connection to an EDEX server, then +query data types, then grid names, parameters, levels, and other information. Finally the gridded data is plotted for its domain using Matplotlib and Cartopy. @@ -435,7 +435,7 @@ available parameters with **getAvailableParameters()** DataAccessLayer.getAvailableLevels() ------------------------------------ -Selecting **"T"** for temperature. +Selecting **“T”** for temperature. .. code:: ipython3 @@ -707,8 +707,8 @@ Selecting **"T"** for temperature. - **0.0SFC** is the Surface level - **FHAG** stands for Fixed Height Above Ground (in meters) - **NTAT** stands for Nominal Top of the ATmosphere -- **BL** stands for Boundary Layer, where **0.0\_30.0BL** reads as - *0-30 mb above ground level* +- **BL** stands for Boundary Layer, where **0.0_30.0BL** reads as *0-30 + mb above ground level* - **TROP** is the Tropopause level **request.setLevels()** @@ -770,7 +770,7 @@ DataAccessLayer.getGridData() ----------------------------- Now that we have our ``request`` and DataTime ``fcstRun`` arrays ready, -it's time to request the data array from EDEX. +it’s time to request the data array from EDEX. .. code:: ipython3 diff --git a/_sources/examples/generated/Map_Resources_and_Topography.rst.txt b/_sources/examples/generated/Map_Resources_and_Topography.rst.txt index 83acc9a..526d24a 100644 --- a/_sources/examples/generated/Map_Resources_and_Topography.rst.txt +++ b/_sources/examples/generated/Map_Resources_and_Topography.rst.txt @@ -16,11 +16,11 @@ Notes - This notebook requires: **python-awips, numpy, matplotplib, cartopy, shapely** -- Use datatype **maps** and **addIdentifier('table', )** to define the map table: - DataAccessLayer.changeEDEXHost("edex-cloud.unidata.ucar.edu") request - = DataAccessLayer.newDataRequest('maps') - request.addIdentifier('table', 'mapdata.county') + DataAccessLayer.changeEDEXHost(“edex-cloud.unidata.ucar.edu”) request + = DataAccessLayer.newDataRequest(‘maps’) + request.addIdentifier(‘table’, ‘mapdata.county’) - Use **request.setLocationNames()** and **request.addIdentifier()** to spatially filter a map resource. In the example below, WFO ID **BOU** (Boulder, Colorado) is used to query counties within the BOU county @@ -28,17 +28,17 @@ Notes :: - request.addIdentifier('geomField', 'the_geom') - request.addIdentifier('inLocation', 'true') - request.addIdentifier('locationField', 'cwa') - request.setLocationNames('BOU') - request.addIdentifier('cwa', 'BOU') + request.addIdentifier('geomField', 'the_geom') + request.addIdentifier('inLocation', 'true') + request.addIdentifier('locationField', 'cwa') + request.setLocationNames('BOU') + request.addIdentifier('cwa', 'BOU') See the Maps Database Reference Page for available database tables, column names, and types. - Note the geometry definition of ``the_geom`` for each data type, - which can be **Point**, **MultiPolygon**, or **MultiLineString**. + Note the geometry definition of ``the_geom`` for each data type, + which can be **Point**, **MultiPolygon**, or **MultiLineString**. Setup ----- @@ -144,8 +144,8 @@ Request County Boundaries for a WFO .. image:: Map_Resources_and_Topography_files/Map_Resources_and_Topography_4_1.png -Create a merged CWA with cascaded\_union ----------------------------------------- +Create a merged CWA with cascaded_union +--------------------------------------- .. code:: ipython3 @@ -172,7 +172,7 @@ Create a merged CWA with cascaded\_union WFO boundary spatial filter for interstates ------------------------------------------- -Using the previously-defined **envelope=merged\_counties.buffer(2)** in +Using the previously-defined **envelope=merged_counties.buffer(2)** in **newDataRequest()** to request geometries which fall inside the buffered boundary. diff --git a/_sources/examples/generated/Model_Sounding_Data.rst.txt b/_sources/examples/generated/Model_Sounding_Data.rst.txt index a27c908..0975ab1 100644 --- a/_sources/examples/generated/Model_Sounding_Data.rst.txt +++ b/_sources/examples/generated/Model_Sounding_Data.rst.txt @@ -1134,7 +1134,7 @@ calculation following NCEP AWIPS/NSHARP. **3) NCEP AWIPS soundingrequest plugin** based on GEMPAK/NSHARP, from -https://github.com/Unidata/awips2-ncep/blob/unidata\_16.2.2/edex/gov.noaa.nws.ncep.edex.plugin.soundingrequest/src/gov/noaa/nws/ncep/edex/plugin/soundingrequest/handler/MergeSounding.java#L1783 +https://github.com/Unidata/awips2-ncep/blob/unidata_16.2.2/edex/gov.noaa.nws.ncep.edex.plugin.soundingrequest/src/gov/noaa/nws/ncep/edex/plugin/soundingrequest/handler/MergeSounding.java#L1783 .. code:: ipython3 diff --git a/_sources/examples/generated/Watch_and_Warning_Polygons.rst.txt b/_sources/examples/generated/Watch_and_Warning_Polygons.rst.txt index cba1a8f..6ab6617 100644 --- a/_sources/examples/generated/Watch_and_Warning_Polygons.rst.txt +++ b/_sources/examples/generated/Watch_and_Warning_Polygons.rst.txt @@ -33,7 +33,7 @@ First, set up our imports and define functions to be used later: gl.yformatter = LATITUDE_FORMATTER return fig, ax -Next, we create a request for the "warning" data type: +Next, we create a request for the “warning” data type: .. code:: ipython3 diff --git a/_sources/index.rst.txt b/_sources/index.rst.txt index 616f53e..98ad9ee 100644 --- a/_sources/index.rst.txt +++ b/_sources/index.rst.txt @@ -2,24 +2,48 @@ Python AWIPS Data Access Framework ================================== -The python-awips package provides a data access framework for requesting meteorological and geometry datasets from an `EDEX `_ server. +The python-awips package provides a data access framework for requesting meteorological and geographic datasets from an `EDEX `_ server. `AWIPS `_ is a weather display and analysis package developed by the National Weather Service for operational forecasting. UCAR's `Unidata Program Center `_ supports a non-operational open-source release of the AWIPS software (`EDEX `_, `CAVE `_, and `python-awips `_). .. _Jupyter Notebook: http://nbviewer.jupyter.org/github/Unidata/python-awips/tree/master/examples/notebooks + +Pre-requisite Software +---------------------- + +In order to effictively use python-awips you'll need to have these installed already: + - python3 + - conda + - git *(for the source code and examples installation)* + +Package-Only Install +-------------------- + +If you already work with Python, you might just be interested in how to install the python-awips pacakge. +The package can be installed with either of the two well known package managers: **pip** and **conda**. + Pip Install ------------ +~~~~~~~~~~~ :: pip install python-awips -Conda Environment Install -------------------------- +Conda Install +~~~~~~~~~~~~~ -To install the latest version of python-awips, with all required and optional packages: +:: + + conda install -c conda-forge python-awips + + + +Source Code with Examples Install +--------------------------------- + +Below are instructions on how to install the source code of python-awips, with all included example notebooks. This will create a new conda environment called ``python3-awips`` and start up a browser for the jupyter notebook examples. :: @@ -33,113 +57,16 @@ To install the latest version of python-awips, with all required and optional pa **If you are experiencing issues, and have previously setup the conda environment, you may need to run:** :: conda update --all + + +Questions -- Contact Us! +------------------------ - -Requirements ------------- - -These are specified in the environment.yml file that is used to create the 'python3-awips' conda environment: - - - python 3 - - numpy - - nomkl - - matplotlib - - cartopy - - jupyter - - netcdf4 - - owslib - - metpy - - pint - - h5py - - nbconvert 4.1+ - - siphon - - xarray - - ffmpeg - - pytest - - shapely - - six - - pip - - -Quick Example -~~~~~~~~~~~~~ - -:: - - from awips.dataaccess import DataAccessLayer - DataAccessLayer.changeEDEXHost("edex-cloud.unidata.ucar.edu") - dataTypes = DataAccessLayer.getSupportedDatatypes() - list(dataTypes) - - ['acars', - 'binlightning', - 'bufrmosavn', - 'bufrmoseta', - 'bufrmosgfs', - 'bufrmoshpc', - 'bufrmoslamp', - 'bufrmosmrf', - 'bufrua', - 'climate', - 'common_obs_spatial', - 'gfe', - 'gfeeditarea', - 'grid', - 'maps', - 'modelsounding', - 'obs', - 'practicewarning', - 'profiler', - 'radar', - 'radar_spatial', - 'satellite', - 'sfcobs', - 'topo', - 'warning'] - - - request = DataAccessLayer.newDataRequest() - request.setDatatype("satellite") - availableSectors = DataAccessLayer.getAvailableLocationNames(request) - availableSectors.sort() - for sector in availableSectors: - print sector - request.setLocationNames(sector) - availableProducts = DataAccessLayer.getAvailableParameters(request) - availableProducts.sort() - for product in availableProducts: - print " - " + product - - ECONUS - - ACTP - - ADP - - AOD - - CAPE - - CH-01-0.47um - - CH-02-0.64um - - CH-03-0.87um - - CH-04-1.38um - ... - EFD - - ACTP - - ADP - - AOD - - CAPE - - CH-01-0.47um - - CH-02-0.64um - - CH-03-0.87um - - CH-04-1.38um - ... - - -See the `API Documentation `_ for more information. - ----------------------- -Read The Docs Contents ----------------------- +Please feel free to reach out to us at our support email at **support-awips@unidata.ucar.edu** .. toctree:: :maxdepth: 2 + :hidden: api/index datatypes diff --git a/_static/basic.css b/_static/basic.css index 24bc73e..be19270 100644 --- a/_static/basic.css +++ b/_static/basic.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- basic theme. * - * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -764,6 +764,7 @@ div.code-block-caption code { } table.highlighttable td.linenos, +span.linenos, div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */ user-select: none; } diff --git a/_static/doctools.js b/_static/doctools.js index daccd20..61ac9d2 100644 --- a/_static/doctools.js +++ b/_static/doctools.js @@ -4,7 +4,7 @@ * * Sphinx JavaScript utilities for all documentation. * - * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -29,9 +29,14 @@ if (!window.console || !console.firebug) { /** * small helper function to urldecode strings + * + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL */ jQuery.urldecode = function(x) { - return decodeURIComponent(x).replace(/\+/g, ' '); + if (!x) { + return x + } + return decodeURIComponent(x.replace(/\+/g, ' ')); }; /** @@ -285,9 +290,10 @@ var Documentation = { initOnKeyListeners: function() { $(document).keydown(function(event) { var activeElementType = document.activeElement.tagName; - // don't navigate when in search box or textarea + // don't navigate when in search box, textarea, dropdown or button if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' - && !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey) { + && activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey + && !event.shiftKey) { switch (event.keyCode) { case 37: // left var prevHref = $('link[rel="prev"]').prop('href'); diff --git a/_static/fonts/FontAwesome.otf b/_static/fonts/FontAwesome.otf deleted file mode 100644 index 401ec0f..0000000 Binary files a/_static/fonts/FontAwesome.otf and /dev/null differ diff --git a/_static/fonts/Lato/lato-bold.eot b/_static/fonts/Lato/lato-bold.eot deleted file mode 100644 index 3361183..0000000 Binary files a/_static/fonts/Lato/lato-bold.eot and /dev/null differ diff --git a/_static/fonts/Lato/lato-bold.ttf b/_static/fonts/Lato/lato-bold.ttf deleted file mode 100644 index 29f691d..0000000 Binary files a/_static/fonts/Lato/lato-bold.ttf and /dev/null differ diff --git a/_static/fonts/Lato/lato-bold.woff b/_static/fonts/Lato/lato-bold.woff deleted file mode 100644 index c6dff51..0000000 Binary files a/_static/fonts/Lato/lato-bold.woff and /dev/null differ diff --git a/_static/fonts/Lato/lato-bold.woff2 b/_static/fonts/Lato/lato-bold.woff2 deleted file mode 100644 index bb19504..0000000 Binary files a/_static/fonts/Lato/lato-bold.woff2 and /dev/null differ diff --git a/_static/fonts/Lato/lato-bolditalic.eot b/_static/fonts/Lato/lato-bolditalic.eot deleted file mode 100644 index 3d41549..0000000 Binary files a/_static/fonts/Lato/lato-bolditalic.eot and /dev/null differ diff --git a/_static/fonts/Lato/lato-bolditalic.ttf b/_static/fonts/Lato/lato-bolditalic.ttf deleted file mode 100644 index f402040..0000000 Binary files a/_static/fonts/Lato/lato-bolditalic.ttf and /dev/null differ diff --git a/_static/fonts/Lato/lato-bolditalic.woff b/_static/fonts/Lato/lato-bolditalic.woff deleted file mode 100644 index 88ad05b..0000000 Binary files a/_static/fonts/Lato/lato-bolditalic.woff and /dev/null differ diff --git a/_static/fonts/Lato/lato-bolditalic.woff2 b/_static/fonts/Lato/lato-bolditalic.woff2 deleted file mode 100644 index c4e3d80..0000000 Binary files a/_static/fonts/Lato/lato-bolditalic.woff2 and /dev/null differ diff --git a/_static/fonts/Lato/lato-italic.eot b/_static/fonts/Lato/lato-italic.eot deleted file mode 100644 index 3f82642..0000000 Binary files a/_static/fonts/Lato/lato-italic.eot and /dev/null differ diff --git a/_static/fonts/Lato/lato-italic.ttf b/_static/fonts/Lato/lato-italic.ttf deleted file mode 100644 index b4bfc9b..0000000 Binary files a/_static/fonts/Lato/lato-italic.ttf and /dev/null differ diff --git a/_static/fonts/Lato/lato-italic.woff b/_static/fonts/Lato/lato-italic.woff deleted file mode 100644 index 76114bc..0000000 Binary files a/_static/fonts/Lato/lato-italic.woff and /dev/null differ diff --git a/_static/fonts/Lato/lato-italic.woff2 b/_static/fonts/Lato/lato-italic.woff2 deleted file mode 100644 index 3404f37..0000000 Binary files a/_static/fonts/Lato/lato-italic.woff2 and /dev/null differ diff --git a/_static/fonts/Lato/lato-regular.eot b/_static/fonts/Lato/lato-regular.eot deleted file mode 100644 index 11e3f2a..0000000 Binary files a/_static/fonts/Lato/lato-regular.eot and /dev/null differ diff --git a/_static/fonts/Lato/lato-regular.ttf b/_static/fonts/Lato/lato-regular.ttf deleted file mode 100644 index 74decd9..0000000 Binary files a/_static/fonts/Lato/lato-regular.ttf and /dev/null differ diff --git a/_static/fonts/Lato/lato-regular.woff b/_static/fonts/Lato/lato-regular.woff deleted file mode 100644 index ae1307f..0000000 Binary files a/_static/fonts/Lato/lato-regular.woff and /dev/null differ diff --git a/_static/fonts/Lato/lato-regular.woff2 b/_static/fonts/Lato/lato-regular.woff2 deleted file mode 100644 index 3bf9843..0000000 Binary files a/_static/fonts/Lato/lato-regular.woff2 and /dev/null differ diff --git a/_static/fonts/Roboto-Slab-Bold.woff b/_static/fonts/Roboto-Slab-Bold.woff deleted file mode 100644 index 6cb6000..0000000 Binary files a/_static/fonts/Roboto-Slab-Bold.woff and /dev/null differ diff --git a/_static/fonts/Roboto-Slab-Bold.woff2 b/_static/fonts/Roboto-Slab-Bold.woff2 deleted file mode 100644 index 7059e23..0000000 Binary files a/_static/fonts/Roboto-Slab-Bold.woff2 and /dev/null differ diff --git a/_static/fonts/Roboto-Slab-Light.woff b/_static/fonts/Roboto-Slab-Light.woff deleted file mode 100644 index 337d287..0000000 Binary files a/_static/fonts/Roboto-Slab-Light.woff and /dev/null differ diff --git a/_static/fonts/Roboto-Slab-Light.woff2 b/_static/fonts/Roboto-Slab-Light.woff2 deleted file mode 100644 index 20398af..0000000 Binary files a/_static/fonts/Roboto-Slab-Light.woff2 and /dev/null differ diff --git a/_static/fonts/Roboto-Slab-Regular.woff b/_static/fonts/Roboto-Slab-Regular.woff deleted file mode 100644 index f815f63..0000000 Binary files a/_static/fonts/Roboto-Slab-Regular.woff and /dev/null differ diff --git a/_static/fonts/Roboto-Slab-Regular.woff2 b/_static/fonts/Roboto-Slab-Regular.woff2 deleted file mode 100644 index f2c76e5..0000000 Binary files a/_static/fonts/Roboto-Slab-Regular.woff2 and /dev/null differ diff --git a/_static/fonts/Roboto-Slab-Thin.woff b/_static/fonts/Roboto-Slab-Thin.woff deleted file mode 100644 index 6b30ea6..0000000 Binary files a/_static/fonts/Roboto-Slab-Thin.woff and /dev/null differ diff --git a/_static/fonts/Roboto-Slab-Thin.woff2 b/_static/fonts/Roboto-Slab-Thin.woff2 deleted file mode 100644 index 328f5bb..0000000 Binary files a/_static/fonts/Roboto-Slab-Thin.woff2 and /dev/null differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot deleted file mode 100644 index 79dc8ef..0000000 Binary files a/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot and /dev/null differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf deleted file mode 100644 index df5d1df..0000000 Binary files a/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf and /dev/null differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff deleted file mode 100644 index 6cb6000..0000000 Binary files a/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff and /dev/null differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 deleted file mode 100644 index 7059e23..0000000 Binary files a/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 and /dev/null differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot deleted file mode 100644 index 2f7ca78..0000000 Binary files a/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot and /dev/null differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf deleted file mode 100644 index eb52a79..0000000 Binary files a/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf and /dev/null differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff deleted file mode 100644 index f815f63..0000000 Binary files a/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff and /dev/null differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 deleted file mode 100644 index f2c76e5..0000000 Binary files a/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 and /dev/null differ diff --git a/_static/fonts/fontawesome-webfont.eot b/_static/fonts/fontawesome-webfont.eot deleted file mode 100644 index e9f60ca..0000000 Binary files a/_static/fonts/fontawesome-webfont.eot and /dev/null differ diff --git a/_static/fonts/fontawesome-webfont.svg b/_static/fonts/fontawesome-webfont.svg deleted file mode 100644 index 855c845..0000000 --- a/_static/fonts/fontawesome-webfont.svg +++ /dev/null @@ -1,2671 +0,0 @@ - - - - -Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 - By ,,, -Copyright Dave Gandy 2016. All rights reserved. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/_static/fonts/fontawesome-webfont.ttf b/_static/fonts/fontawesome-webfont.ttf deleted file mode 100644 index 35acda2..0000000 Binary files a/_static/fonts/fontawesome-webfont.ttf and /dev/null differ diff --git a/_static/fonts/fontawesome-webfont.woff b/_static/fonts/fontawesome-webfont.woff deleted file mode 100644 index 400014a..0000000 Binary files a/_static/fonts/fontawesome-webfont.woff and /dev/null differ diff --git a/_static/fonts/fontawesome-webfont.woff2 b/_static/fonts/fontawesome-webfont.woff2 deleted file mode 100644 index 4d13fc6..0000000 Binary files a/_static/fonts/fontawesome-webfont.woff2 and /dev/null differ diff --git a/_static/fonts/lato-bold-italic.woff b/_static/fonts/lato-bold-italic.woff deleted file mode 100644 index 88ad05b..0000000 Binary files a/_static/fonts/lato-bold-italic.woff and /dev/null differ diff --git a/_static/fonts/lato-bold-italic.woff2 b/_static/fonts/lato-bold-italic.woff2 deleted file mode 100644 index c4e3d80..0000000 Binary files a/_static/fonts/lato-bold-italic.woff2 and /dev/null differ diff --git a/_static/fonts/lato-bold.woff b/_static/fonts/lato-bold.woff deleted file mode 100644 index c6dff51..0000000 Binary files a/_static/fonts/lato-bold.woff and /dev/null differ diff --git a/_static/fonts/lato-bold.woff2 b/_static/fonts/lato-bold.woff2 deleted file mode 100644 index bb19504..0000000 Binary files a/_static/fonts/lato-bold.woff2 and /dev/null differ diff --git a/_static/fonts/lato-normal-italic.woff b/_static/fonts/lato-normal-italic.woff deleted file mode 100644 index 76114bc..0000000 Binary files a/_static/fonts/lato-normal-italic.woff and /dev/null differ diff --git a/_static/fonts/lato-normal-italic.woff2 b/_static/fonts/lato-normal-italic.woff2 deleted file mode 100644 index 3404f37..0000000 Binary files a/_static/fonts/lato-normal-italic.woff2 and /dev/null differ diff --git a/_static/fonts/lato-normal.woff b/_static/fonts/lato-normal.woff deleted file mode 100644 index ae1307f..0000000 Binary files a/_static/fonts/lato-normal.woff and /dev/null differ diff --git a/_static/fonts/lato-normal.woff2 b/_static/fonts/lato-normal.woff2 deleted file mode 100644 index 3bf9843..0000000 Binary files a/_static/fonts/lato-normal.woff2 and /dev/null differ diff --git a/_static/js/modernizr.min.js b/_static/js/modernizr.min.js deleted file mode 100644 index f65d479..0000000 --- a/_static/js/modernizr.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/* Modernizr 2.6.2 (Custom Build) | MIT & BSD - * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load - */ -;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f'); + var listItem = $('
  • '); var requestUrl = ""; var linkUrl = ""; if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') { @@ -273,9 +273,9 @@ var Search = { if (item[3]) { listItem.append($(' (' + item[3] + ')')); Search.output.append(listItem); - listItem.slideDown(5, function() { + setTimeout(function() { displayNextItem(); - }); + }, 5); } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) { $.ajax({url: requestUrl, dataType: "text", @@ -285,16 +285,16 @@ var Search = { listItem.append(Search.makeSearchSummary(data, searchterms, hlterms)); } Search.output.append(listItem); - listItem.slideDown(5, function() { + setTimeout(function() { displayNextItem(); - }); + }, 5); }}); } else { // no source available, just display title Search.output.append(listItem); - listItem.slideDown(5, function() { + setTimeout(function() { displayNextItem(); - }); + }, 5); } } // search finished, update title and status message @@ -379,6 +379,13 @@ var Search = { return results; }, + /** + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions + */ + escapeRegExp : function(string) { + return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string + }, + /** * search for full-text terms in the index */ @@ -402,13 +409,14 @@ var Search = { ]; // add support for partial matches if (word.length > 2) { + var word_regex = this.escapeRegExp(word); for (var w in terms) { - if (w.match(word) && !terms[word]) { + if (w.match(word_regex) && !terms[word]) { _o.push({files: terms[w], score: Scorer.partialTerm}) } } for (var w in titleterms) { - if (w.match(word) && !titleterms[word]) { + if (w.match(word_regex) && !titleterms[word]) { _o.push({files: titleterms[w], score: Scorer.partialTitle}) } } diff --git a/_static/underscore-1.12.0.js b/_static/underscore-1.12.0.js new file mode 100644 index 0000000..3af6352 --- /dev/null +++ b/_static/underscore-1.12.0.js @@ -0,0 +1,2027 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define('underscore', factory) : + (global = global || self, (function () { + var current = global._; + var exports = global._ = factory(); + exports.noConflict = function () { global._ = current; return exports; }; + }())); +}(this, (function () { + // Underscore.js 1.12.0 + // https://underscorejs.org + // (c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + // Underscore may be freely distributed under the MIT license. + + // Current version. + var VERSION = '1.12.0'; + + // Establish the root object, `window` (`self`) in the browser, `global` + // on the server, or `this` in some virtual machines. We use `self` + // instead of `window` for `WebWorker` support. + var root = typeof self == 'object' && self.self === self && self || + typeof global == 'object' && global.global === global && global || + Function('return this')() || + {}; + + // Save bytes in the minified (but not gzipped) version: + var ArrayProto = Array.prototype, ObjProto = Object.prototype; + var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null; + + // Create quick reference variables for speed access to core prototypes. + var push = ArrayProto.push, + slice = ArrayProto.slice, + toString = ObjProto.toString, + hasOwnProperty = ObjProto.hasOwnProperty; + + // Modern feature detection. + var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined', + supportsDataView = typeof DataView !== 'undefined'; + + // All **ECMAScript 5+** native function implementations that we hope to use + // are declared here. + var nativeIsArray = Array.isArray, + nativeKeys = Object.keys, + nativeCreate = Object.create, + nativeIsView = supportsArrayBuffer && ArrayBuffer.isView; + + // Create references to these builtin functions because we override them. + var _isNaN = isNaN, + _isFinite = isFinite; + + // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed. + var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString'); + var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString', + 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; + + // The largest integer that can be represented exactly. + var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; + + // Some functions take a variable number of arguments, or a few expected + // arguments at the beginning and then a variable number of values to operate + // on. This helper accumulates all remaining arguments past the function’s + // argument length (or an explicit `startIndex`), into an array that becomes + // the last argument. Similar to ES6’s "rest parameter". + function restArguments(func, startIndex) { + startIndex = startIndex == null ? func.length - 1 : +startIndex; + return function() { + var length = Math.max(arguments.length - startIndex, 0), + rest = Array(length), + index = 0; + for (; index < length; index++) { + rest[index] = arguments[index + startIndex]; + } + switch (startIndex) { + case 0: return func.call(this, rest); + case 1: return func.call(this, arguments[0], rest); + case 2: return func.call(this, arguments[0], arguments[1], rest); + } + var args = Array(startIndex + 1); + for (index = 0; index < startIndex; index++) { + args[index] = arguments[index]; + } + args[startIndex] = rest; + return func.apply(this, args); + }; + } + + // Is a given variable an object? + function isObject(obj) { + var type = typeof obj; + return type === 'function' || type === 'object' && !!obj; + } + + // Is a given value equal to null? + function isNull(obj) { + return obj === null; + } + + // Is a given variable undefined? + function isUndefined(obj) { + return obj === void 0; + } + + // Is a given value a boolean? + function isBoolean(obj) { + return obj === true || obj === false || toString.call(obj) === '[object Boolean]'; + } + + // Is a given value a DOM element? + function isElement(obj) { + return !!(obj && obj.nodeType === 1); + } + + // Internal function for creating a `toString`-based type tester. + function tagTester(name) { + var tag = '[object ' + name + ']'; + return function(obj) { + return toString.call(obj) === tag; + }; + } + + var isString = tagTester('String'); + + var isNumber = tagTester('Number'); + + var isDate = tagTester('Date'); + + var isRegExp = tagTester('RegExp'); + + var isError = tagTester('Error'); + + var isSymbol = tagTester('Symbol'); + + var isArrayBuffer = tagTester('ArrayBuffer'); + + var isFunction = tagTester('Function'); + + // Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old + // v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236). + var nodelist = root.document && root.document.childNodes; + if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') { + isFunction = function(obj) { + return typeof obj == 'function' || false; + }; + } + + var isFunction$1 = isFunction; + + var hasObjectTag = tagTester('Object'); + + // In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`. + // In IE 11, the most common among them, this problem also applies to + // `Map`, `WeakMap` and `Set`. + var hasStringTagBug = ( + supportsDataView && hasObjectTag(new DataView(new ArrayBuffer(8))) + ), + isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map)); + + var isDataView = tagTester('DataView'); + + // In IE 10 - Edge 13, we need a different heuristic + // to determine whether an object is a `DataView`. + function ie10IsDataView(obj) { + return obj != null && isFunction$1(obj.getInt8) && isArrayBuffer(obj.buffer); + } + + var isDataView$1 = (hasStringTagBug ? ie10IsDataView : isDataView); + + // Is a given value an array? + // Delegates to ECMA5's native `Array.isArray`. + var isArray = nativeIsArray || tagTester('Array'); + + // Internal function to check whether `key` is an own property name of `obj`. + function has(obj, key) { + return obj != null && hasOwnProperty.call(obj, key); + } + + var isArguments = tagTester('Arguments'); + + // Define a fallback version of the method in browsers (ahem, IE < 9), where + // there isn't any inspectable "Arguments" type. + (function() { + if (!isArguments(arguments)) { + isArguments = function(obj) { + return has(obj, 'callee'); + }; + } + }()); + + var isArguments$1 = isArguments; + + // Is a given object a finite number? + function isFinite$1(obj) { + return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj)); + } + + // Is the given value `NaN`? + function isNaN$1(obj) { + return isNumber(obj) && _isNaN(obj); + } + + // Predicate-generating function. Often useful outside of Underscore. + function constant(value) { + return function() { + return value; + }; + } + + // Common internal logic for `isArrayLike` and `isBufferLike`. + function createSizePropertyCheck(getSizeProperty) { + return function(collection) { + var sizeProperty = getSizeProperty(collection); + return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX; + } + } + + // Internal helper to generate a function to obtain property `key` from `obj`. + function shallowProperty(key) { + return function(obj) { + return obj == null ? void 0 : obj[key]; + }; + } + + // Internal helper to obtain the `byteLength` property of an object. + var getByteLength = shallowProperty('byteLength'); + + // Internal helper to determine whether we should spend extensive checks against + // `ArrayBuffer` et al. + var isBufferLike = createSizePropertyCheck(getByteLength); + + // Is a given value a typed array? + var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/; + function isTypedArray(obj) { + // `ArrayBuffer.isView` is the most future-proof, so use it when available. + // Otherwise, fall back on the above regular expression. + return nativeIsView ? (nativeIsView(obj) && !isDataView$1(obj)) : + isBufferLike(obj) && typedArrayPattern.test(toString.call(obj)); + } + + var isTypedArray$1 = supportsArrayBuffer ? isTypedArray : constant(false); + + // Internal helper to obtain the `length` property of an object. + var getLength = shallowProperty('length'); + + // Internal helper to create a simple lookup structure. + // `collectNonEnumProps` used to depend on `_.contains`, but this led to + // circular imports. `emulatedSet` is a one-off solution that only works for + // arrays of strings. + function emulatedSet(keys) { + var hash = {}; + for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true; + return { + contains: function(key) { return hash[key]; }, + push: function(key) { + hash[key] = true; + return keys.push(key); + } + }; + } + + // Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't + // be iterated by `for key in ...` and thus missed. Extends `keys` in place if + // needed. + function collectNonEnumProps(obj, keys) { + keys = emulatedSet(keys); + var nonEnumIdx = nonEnumerableProps.length; + var constructor = obj.constructor; + var proto = isFunction$1(constructor) && constructor.prototype || ObjProto; + + // Constructor is a special case. + var prop = 'constructor'; + if (has(obj, prop) && !keys.contains(prop)) keys.push(prop); + + while (nonEnumIdx--) { + prop = nonEnumerableProps[nonEnumIdx]; + if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) { + keys.push(prop); + } + } + } + + // Retrieve the names of an object's own properties. + // Delegates to **ECMAScript 5**'s native `Object.keys`. + function keys(obj) { + if (!isObject(obj)) return []; + if (nativeKeys) return nativeKeys(obj); + var keys = []; + for (var key in obj) if (has(obj, key)) keys.push(key); + // Ahem, IE < 9. + if (hasEnumBug) collectNonEnumProps(obj, keys); + return keys; + } + + // Is a given array, string, or object empty? + // An "empty" object has no enumerable own-properties. + function isEmpty(obj) { + if (obj == null) return true; + // Skip the more expensive `toString`-based type checks if `obj` has no + // `.length`. + var length = getLength(obj); + if (typeof length == 'number' && ( + isArray(obj) || isString(obj) || isArguments$1(obj) + )) return length === 0; + return getLength(keys(obj)) === 0; + } + + // Returns whether an object has a given set of `key:value` pairs. + function isMatch(object, attrs) { + var _keys = keys(attrs), length = _keys.length; + if (object == null) return !length; + var obj = Object(object); + for (var i = 0; i < length; i++) { + var key = _keys[i]; + if (attrs[key] !== obj[key] || !(key in obj)) return false; + } + return true; + } + + // If Underscore is called as a function, it returns a wrapped object that can + // be used OO-style. This wrapper holds altered versions of all functions added + // through `_.mixin`. Wrapped objects may be chained. + function _(obj) { + if (obj instanceof _) return obj; + if (!(this instanceof _)) return new _(obj); + this._wrapped = obj; + } + + _.VERSION = VERSION; + + // Extracts the result from a wrapped and chained object. + _.prototype.value = function() { + return this._wrapped; + }; + + // Provide unwrapping proxies for some methods used in engine operations + // such as arithmetic and JSON stringification. + _.prototype.valueOf = _.prototype.toJSON = _.prototype.value; + + _.prototype.toString = function() { + return String(this._wrapped); + }; + + // Internal function to wrap or shallow-copy an ArrayBuffer, + // typed array or DataView to a new view, reusing the buffer. + function toBufferView(bufferSource) { + return new Uint8Array( + bufferSource.buffer || bufferSource, + bufferSource.byteOffset || 0, + getByteLength(bufferSource) + ); + } + + // We use this string twice, so give it a name for minification. + var tagDataView = '[object DataView]'; + + // Internal recursive comparison function for `_.isEqual`. + function eq(a, b, aStack, bStack) { + // Identical objects are equal. `0 === -0`, but they aren't identical. + // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal). + if (a === b) return a !== 0 || 1 / a === 1 / b; + // `null` or `undefined` only equal to itself (strict comparison). + if (a == null || b == null) return false; + // `NaN`s are equivalent, but non-reflexive. + if (a !== a) return b !== b; + // Exhaust primitive checks + var type = typeof a; + if (type !== 'function' && type !== 'object' && typeof b != 'object') return false; + return deepEq(a, b, aStack, bStack); + } + + // Internal recursive comparison function for `_.isEqual`. + function deepEq(a, b, aStack, bStack) { + // Unwrap any wrapped objects. + if (a instanceof _) a = a._wrapped; + if (b instanceof _) b = b._wrapped; + // Compare `[[Class]]` names. + var className = toString.call(a); + if (className !== toString.call(b)) return false; + // Work around a bug in IE 10 - Edge 13. + if (hasStringTagBug && className == '[object Object]' && isDataView$1(a)) { + if (!isDataView$1(b)) return false; + className = tagDataView; + } + switch (className) { + // These types are compared by value. + case '[object RegExp]': + // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i') + case '[object String]': + // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is + // equivalent to `new String("5")`. + return '' + a === '' + b; + case '[object Number]': + // `NaN`s are equivalent, but non-reflexive. + // Object(NaN) is equivalent to NaN. + if (+a !== +a) return +b !== +b; + // An `egal` comparison is performed for other numeric values. + return +a === 0 ? 1 / +a === 1 / b : +a === +b; + case '[object Date]': + case '[object Boolean]': + // Coerce dates and booleans to numeric primitive values. Dates are compared by their + // millisecond representations. Note that invalid dates with millisecond representations + // of `NaN` are not equivalent. + return +a === +b; + case '[object Symbol]': + return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b); + case '[object ArrayBuffer]': + case tagDataView: + // Coerce to typed array so we can fall through. + return deepEq(toBufferView(a), toBufferView(b), aStack, bStack); + } + + var areArrays = className === '[object Array]'; + if (!areArrays && isTypedArray$1(a)) { + var byteLength = getByteLength(a); + if (byteLength !== getByteLength(b)) return false; + if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true; + areArrays = true; + } + if (!areArrays) { + if (typeof a != 'object' || typeof b != 'object') return false; + + // Objects with different constructors are not equivalent, but `Object`s or `Array`s + // from different frames are. + var aCtor = a.constructor, bCtor = b.constructor; + if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor && + isFunction$1(bCtor) && bCtor instanceof bCtor) + && ('constructor' in a && 'constructor' in b)) { + return false; + } + } + // Assume equality for cyclic structures. The algorithm for detecting cyclic + // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. + + // Initializing stack of traversed objects. + // It's done here since we only need them for objects and arrays comparison. + aStack = aStack || []; + bStack = bStack || []; + var length = aStack.length; + while (length--) { + // Linear search. Performance is inversely proportional to the number of + // unique nested structures. + if (aStack[length] === a) return bStack[length] === b; + } + + // Add the first object to the stack of traversed objects. + aStack.push(a); + bStack.push(b); + + // Recursively compare objects and arrays. + if (areArrays) { + // Compare array lengths to determine if a deep comparison is necessary. + length = a.length; + if (length !== b.length) return false; + // Deep compare the contents, ignoring non-numeric properties. + while (length--) { + if (!eq(a[length], b[length], aStack, bStack)) return false; + } + } else { + // Deep compare objects. + var _keys = keys(a), key; + length = _keys.length; + // Ensure that both objects contain the same number of properties before comparing deep equality. + if (keys(b).length !== length) return false; + while (length--) { + // Deep compare each member + key = _keys[length]; + if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false; + } + } + // Remove the first object from the stack of traversed objects. + aStack.pop(); + bStack.pop(); + return true; + } + + // Perform a deep comparison to check if two objects are equal. + function isEqual(a, b) { + return eq(a, b); + } + + // Retrieve all the enumerable property names of an object. + function allKeys(obj) { + if (!isObject(obj)) return []; + var keys = []; + for (var key in obj) keys.push(key); + // Ahem, IE < 9. + if (hasEnumBug) collectNonEnumProps(obj, keys); + return keys; + } + + // Since the regular `Object.prototype.toString` type tests don't work for + // some types in IE 11, we use a fingerprinting heuristic instead, based + // on the methods. It's not great, but it's the best we got. + // The fingerprint method lists are defined below. + function ie11fingerprint(methods) { + var length = getLength(methods); + return function(obj) { + if (obj == null) return false; + // `Map`, `WeakMap` and `Set` have no enumerable keys. + var keys = allKeys(obj); + if (getLength(keys)) return false; + for (var i = 0; i < length; i++) { + if (!isFunction$1(obj[methods[i]])) return false; + } + // If we are testing against `WeakMap`, we need to ensure that + // `obj` doesn't have a `forEach` method in order to distinguish + // it from a regular `Map`. + return methods !== weakMapMethods || !isFunction$1(obj[forEachName]); + }; + } + + // In the interest of compact minification, we write + // each string in the fingerprints only once. + var forEachName = 'forEach', + hasName = 'has', + commonInit = ['clear', 'delete'], + mapTail = ['get', hasName, 'set']; + + // `Map`, `WeakMap` and `Set` each have slightly different + // combinations of the above sublists. + var mapMethods = commonInit.concat(forEachName, mapTail), + weakMapMethods = commonInit.concat(mapTail), + setMethods = ['add'].concat(commonInit, forEachName, hasName); + + var isMap = isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map'); + + var isWeakMap = isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap'); + + var isSet = isIE11 ? ie11fingerprint(setMethods) : tagTester('Set'); + + var isWeakSet = tagTester('WeakSet'); + + // Retrieve the values of an object's properties. + function values(obj) { + var _keys = keys(obj); + var length = _keys.length; + var values = Array(length); + for (var i = 0; i < length; i++) { + values[i] = obj[_keys[i]]; + } + return values; + } + + // Convert an object into a list of `[key, value]` pairs. + // The opposite of `_.object` with one argument. + function pairs(obj) { + var _keys = keys(obj); + var length = _keys.length; + var pairs = Array(length); + for (var i = 0; i < length; i++) { + pairs[i] = [_keys[i], obj[_keys[i]]]; + } + return pairs; + } + + // Invert the keys and values of an object. The values must be serializable. + function invert(obj) { + var result = {}; + var _keys = keys(obj); + for (var i = 0, length = _keys.length; i < length; i++) { + result[obj[_keys[i]]] = _keys[i]; + } + return result; + } + + // Return a sorted list of the function names available on the object. + function functions(obj) { + var names = []; + for (var key in obj) { + if (isFunction$1(obj[key])) names.push(key); + } + return names.sort(); + } + + // An internal function for creating assigner functions. + function createAssigner(keysFunc, defaults) { + return function(obj) { + var length = arguments.length; + if (defaults) obj = Object(obj); + if (length < 2 || obj == null) return obj; + for (var index = 1; index < length; index++) { + var source = arguments[index], + keys = keysFunc(source), + l = keys.length; + for (var i = 0; i < l; i++) { + var key = keys[i]; + if (!defaults || obj[key] === void 0) obj[key] = source[key]; + } + } + return obj; + }; + } + + // Extend a given object with all the properties in passed-in object(s). + var extend = createAssigner(allKeys); + + // Assigns a given object with all the own properties in the passed-in + // object(s). + // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) + var extendOwn = createAssigner(keys); + + // Fill in a given object with default properties. + var defaults = createAssigner(allKeys, true); + + // Create a naked function reference for surrogate-prototype-swapping. + function ctor() { + return function(){}; + } + + // An internal function for creating a new object that inherits from another. + function baseCreate(prototype) { + if (!isObject(prototype)) return {}; + if (nativeCreate) return nativeCreate(prototype); + var Ctor = ctor(); + Ctor.prototype = prototype; + var result = new Ctor; + Ctor.prototype = null; + return result; + } + + // Creates an object that inherits from the given prototype object. + // If additional properties are provided then they will be added to the + // created object. + function create(prototype, props) { + var result = baseCreate(prototype); + if (props) extendOwn(result, props); + return result; + } + + // Create a (shallow-cloned) duplicate of an object. + function clone(obj) { + if (!isObject(obj)) return obj; + return isArray(obj) ? obj.slice() : extend({}, obj); + } + + // Invokes `interceptor` with the `obj` and then returns `obj`. + // The primary purpose of this method is to "tap into" a method chain, in + // order to perform operations on intermediate results within the chain. + function tap(obj, interceptor) { + interceptor(obj); + return obj; + } + + // Normalize a (deep) property `path` to array. + // Like `_.iteratee`, this function can be customized. + function toPath(path) { + return isArray(path) ? path : [path]; + } + _.toPath = toPath; + + // Internal wrapper for `_.toPath` to enable minification. + // Similar to `cb` for `_.iteratee`. + function toPath$1(path) { + return _.toPath(path); + } + + // Internal function to obtain a nested property in `obj` along `path`. + function deepGet(obj, path) { + var length = path.length; + for (var i = 0; i < length; i++) { + if (obj == null) return void 0; + obj = obj[path[i]]; + } + return length ? obj : void 0; + } + + // Get the value of the (deep) property on `path` from `object`. + // If any property in `path` does not exist or if the value is + // `undefined`, return `defaultValue` instead. + // The `path` is normalized through `_.toPath`. + function get(object, path, defaultValue) { + var value = deepGet(object, toPath$1(path)); + return isUndefined(value) ? defaultValue : value; + } + + // Shortcut function for checking if an object has a given property directly on + // itself (in other words, not on a prototype). Unlike the internal `has` + // function, this public version can also traverse nested properties. + function has$1(obj, path) { + path = toPath$1(path); + var length = path.length; + for (var i = 0; i < length; i++) { + var key = path[i]; + if (!has(obj, key)) return false; + obj = obj[key]; + } + return !!length; + } + + // Keep the identity function around for default iteratees. + function identity(value) { + return value; + } + + // Returns a predicate for checking whether an object has a given set of + // `key:value` pairs. + function matcher(attrs) { + attrs = extendOwn({}, attrs); + return function(obj) { + return isMatch(obj, attrs); + }; + } + + // Creates a function that, when passed an object, will traverse that object’s + // properties down the given `path`, specified as an array of keys or indices. + function property(path) { + path = toPath$1(path); + return function(obj) { + return deepGet(obj, path); + }; + } + + // Internal function that returns an efficient (for current engines) version + // of the passed-in callback, to be repeatedly applied in other Underscore + // functions. + function optimizeCb(func, context, argCount) { + if (context === void 0) return func; + switch (argCount == null ? 3 : argCount) { + case 1: return function(value) { + return func.call(context, value); + }; + // The 2-argument case is omitted because we’re not using it. + case 3: return function(value, index, collection) { + return func.call(context, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(context, accumulator, value, index, collection); + }; + } + return function() { + return func.apply(context, arguments); + }; + } + + // An internal function to generate callbacks that can be applied to each + // element in a collection, returning the desired result — either `_.identity`, + // an arbitrary callback, a property matcher, or a property accessor. + function baseIteratee(value, context, argCount) { + if (value == null) return identity; + if (isFunction$1(value)) return optimizeCb(value, context, argCount); + if (isObject(value) && !isArray(value)) return matcher(value); + return property(value); + } + + // External wrapper for our callback generator. Users may customize + // `_.iteratee` if they want additional predicate/iteratee shorthand styles. + // This abstraction hides the internal-only `argCount` argument. + function iteratee(value, context) { + return baseIteratee(value, context, Infinity); + } + _.iteratee = iteratee; + + // The function we call internally to generate a callback. It invokes + // `_.iteratee` if overridden, otherwise `baseIteratee`. + function cb(value, context, argCount) { + if (_.iteratee !== iteratee) return _.iteratee(value, context); + return baseIteratee(value, context, argCount); + } + + // Returns the results of applying the `iteratee` to each element of `obj`. + // In contrast to `_.map` it returns an object. + function mapObject(obj, iteratee, context) { + iteratee = cb(iteratee, context); + var _keys = keys(obj), + length = _keys.length, + results = {}; + for (var index = 0; index < length; index++) { + var currentKey = _keys[index]; + results[currentKey] = iteratee(obj[currentKey], currentKey, obj); + } + return results; + } + + // Predicate-generating function. Often useful outside of Underscore. + function noop(){} + + // Generates a function for a given object that returns a given property. + function propertyOf(obj) { + if (obj == null) return noop; + return function(path) { + return get(obj, path); + }; + } + + // Run a function **n** times. + function times(n, iteratee, context) { + var accum = Array(Math.max(0, n)); + iteratee = optimizeCb(iteratee, context, 1); + for (var i = 0; i < n; i++) accum[i] = iteratee(i); + return accum; + } + + // Return a random integer between `min` and `max` (inclusive). + function random(min, max) { + if (max == null) { + max = min; + min = 0; + } + return min + Math.floor(Math.random() * (max - min + 1)); + } + + // A (possibly faster) way to get the current timestamp as an integer. + var now = Date.now || function() { + return new Date().getTime(); + }; + + // Internal helper to generate functions for escaping and unescaping strings + // to/from HTML interpolation. + function createEscaper(map) { + var escaper = function(match) { + return map[match]; + }; + // Regexes for identifying a key that needs to be escaped. + var source = '(?:' + keys(map).join('|') + ')'; + var testRegexp = RegExp(source); + var replaceRegexp = RegExp(source, 'g'); + return function(string) { + string = string == null ? '' : '' + string; + return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; + }; + } + + // Internal list of HTML entities for escaping. + var escapeMap = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`' + }; + + // Function for escaping strings to HTML interpolation. + var _escape = createEscaper(escapeMap); + + // Internal list of HTML entities for unescaping. + var unescapeMap = invert(escapeMap); + + // Function for unescaping strings from HTML interpolation. + var _unescape = createEscaper(unescapeMap); + + // By default, Underscore uses ERB-style template delimiters. Change the + // following template settings to use alternative delimiters. + var templateSettings = _.templateSettings = { + evaluate: /<%([\s\S]+?)%>/g, + interpolate: /<%=([\s\S]+?)%>/g, + escape: /<%-([\s\S]+?)%>/g + }; + + // When customizing `_.templateSettings`, if you don't want to define an + // interpolation, evaluation or escaping regex, we need one that is + // guaranteed not to match. + var noMatch = /(.)^/; + + // Certain characters need to be escaped so that they can be put into a + // string literal. + var escapes = { + "'": "'", + '\\': '\\', + '\r': 'r', + '\n': 'n', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g; + + function escapeChar(match) { + return '\\' + escapes[match]; + } + + // JavaScript micro-templating, similar to John Resig's implementation. + // Underscore templating handles arbitrary delimiters, preserves whitespace, + // and correctly escapes quotes within interpolated code. + // NB: `oldSettings` only exists for backwards compatibility. + function template(text, settings, oldSettings) { + if (!settings && oldSettings) settings = oldSettings; + settings = defaults({}, settings, _.templateSettings); + + // Combine delimiters into one regular expression via alternation. + var matcher = RegExp([ + (settings.escape || noMatch).source, + (settings.interpolate || noMatch).source, + (settings.evaluate || noMatch).source + ].join('|') + '|$', 'g'); + + // Compile the template source, escaping string literals appropriately. + var index = 0; + var source = "__p+='"; + text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { + source += text.slice(index, offset).replace(escapeRegExp, escapeChar); + index = offset + match.length; + + if (escape) { + source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; + } else if (interpolate) { + source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; + } else if (evaluate) { + source += "';\n" + evaluate + "\n__p+='"; + } + + // Adobe VMs need the match returned to produce the correct offset. + return match; + }); + source += "';\n"; + + // If a variable is not specified, place data values in local scope. + if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; + + source = "var __t,__p='',__j=Array.prototype.join," + + "print=function(){__p+=__j.call(arguments,'');};\n" + + source + 'return __p;\n'; + + var render; + try { + render = new Function(settings.variable || 'obj', '_', source); + } catch (e) { + e.source = source; + throw e; + } + + var template = function(data) { + return render.call(this, data, _); + }; + + // Provide the compiled source as a convenience for precompilation. + var argument = settings.variable || 'obj'; + template.source = 'function(' + argument + '){\n' + source + '}'; + + return template; + } + + // Traverses the children of `obj` along `path`. If a child is a function, it + // is invoked with its parent as context. Returns the value of the final + // child, or `fallback` if any child is undefined. + function result(obj, path, fallback) { + path = toPath$1(path); + var length = path.length; + if (!length) { + return isFunction$1(fallback) ? fallback.call(obj) : fallback; + } + for (var i = 0; i < length; i++) { + var prop = obj == null ? void 0 : obj[path[i]]; + if (prop === void 0) { + prop = fallback; + i = length; // Ensure we don't continue iterating. + } + obj = isFunction$1(prop) ? prop.call(obj) : prop; + } + return obj; + } + + // Generate a unique integer id (unique within the entire client session). + // Useful for temporary DOM ids. + var idCounter = 0; + function uniqueId(prefix) { + var id = ++idCounter + ''; + return prefix ? prefix + id : id; + } + + // Start chaining a wrapped Underscore object. + function chain(obj) { + var instance = _(obj); + instance._chain = true; + return instance; + } + + // Internal function to execute `sourceFunc` bound to `context` with optional + // `args`. Determines whether to execute a function as a constructor or as a + // normal function. + function executeBound(sourceFunc, boundFunc, context, callingContext, args) { + if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args); + var self = baseCreate(sourceFunc.prototype); + var result = sourceFunc.apply(self, args); + if (isObject(result)) return result; + return self; + } + + // Partially apply a function by creating a version that has had some of its + // arguments pre-filled, without changing its dynamic `this` context. `_` acts + // as a placeholder by default, allowing any combination of arguments to be + // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument. + var partial = restArguments(function(func, boundArgs) { + var placeholder = partial.placeholder; + var bound = function() { + var position = 0, length = boundArgs.length; + var args = Array(length); + for (var i = 0; i < length; i++) { + args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i]; + } + while (position < arguments.length) args.push(arguments[position++]); + return executeBound(func, bound, this, this, args); + }; + return bound; + }); + + partial.placeholder = _; + + // Create a function bound to a given object (assigning `this`, and arguments, + // optionally). + var bind = restArguments(function(func, context, args) { + if (!isFunction$1(func)) throw new TypeError('Bind must be called on a function'); + var bound = restArguments(function(callArgs) { + return executeBound(func, bound, context, this, args.concat(callArgs)); + }); + return bound; + }); + + // Internal helper for collection methods to determine whether a collection + // should be iterated as an array or as an object. + // Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength + // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094 + var isArrayLike = createSizePropertyCheck(getLength); + + // Internal implementation of a recursive `flatten` function. + function flatten(input, depth, strict, output) { + output = output || []; + if (!depth && depth !== 0) { + depth = Infinity; + } else if (depth <= 0) { + return output.concat(input); + } + var idx = output.length; + for (var i = 0, length = getLength(input); i < length; i++) { + var value = input[i]; + if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) { + // Flatten current level of array or arguments object. + if (depth > 1) { + flatten(value, depth - 1, strict, output); + idx = output.length; + } else { + var j = 0, len = value.length; + while (j < len) output[idx++] = value[j++]; + } + } else if (!strict) { + output[idx++] = value; + } + } + return output; + } + + // Bind a number of an object's methods to that object. Remaining arguments + // are the method names to be bound. Useful for ensuring that all callbacks + // defined on an object belong to it. + var bindAll = restArguments(function(obj, keys) { + keys = flatten(keys, false, false); + var index = keys.length; + if (index < 1) throw new Error('bindAll must be passed function names'); + while (index--) { + var key = keys[index]; + obj[key] = bind(obj[key], obj); + } + return obj; + }); + + // Memoize an expensive function by storing its results. + function memoize(func, hasher) { + var memoize = function(key) { + var cache = memoize.cache; + var address = '' + (hasher ? hasher.apply(this, arguments) : key); + if (!has(cache, address)) cache[address] = func.apply(this, arguments); + return cache[address]; + }; + memoize.cache = {}; + return memoize; + } + + // Delays a function for the given number of milliseconds, and then calls + // it with the arguments supplied. + var delay = restArguments(function(func, wait, args) { + return setTimeout(function() { + return func.apply(null, args); + }, wait); + }); + + // Defers a function, scheduling it to run after the current call stack has + // cleared. + var defer = partial(delay, _, 1); + + // Returns a function, that, when invoked, will only be triggered at most once + // during a given window of time. Normally, the throttled function will run + // as much as it can, without ever going more than once per `wait` duration; + // but if you'd like to disable the execution on the leading edge, pass + // `{leading: false}`. To disable execution on the trailing edge, ditto. + function throttle(func, wait, options) { + var timeout, context, args, result; + var previous = 0; + if (!options) options = {}; + + var later = function() { + previous = options.leading === false ? 0 : now(); + timeout = null; + result = func.apply(context, args); + if (!timeout) context = args = null; + }; + + var throttled = function() { + var _now = now(); + if (!previous && options.leading === false) previous = _now; + var remaining = wait - (_now - previous); + context = this; + args = arguments; + if (remaining <= 0 || remaining > wait) { + if (timeout) { + clearTimeout(timeout); + timeout = null; + } + previous = _now; + result = func.apply(context, args); + if (!timeout) context = args = null; + } else if (!timeout && options.trailing !== false) { + timeout = setTimeout(later, remaining); + } + return result; + }; + + throttled.cancel = function() { + clearTimeout(timeout); + previous = 0; + timeout = context = args = null; + }; + + return throttled; + } + + // When a sequence of calls of the returned function ends, the argument + // function is triggered. The end of a sequence is defined by the `wait` + // parameter. If `immediate` is passed, the argument function will be + // triggered at the beginning of the sequence instead of at the end. + function debounce(func, wait, immediate) { + var timeout, previous, args, result, context; + + var later = function() { + var passed = now() - previous; + if (wait > passed) { + timeout = setTimeout(later, wait - passed); + } else { + timeout = null; + if (!immediate) result = func.apply(context, args); + // This check is needed because `func` can recursively invoke `debounced`. + if (!timeout) args = context = null; + } + }; + + var debounced = restArguments(function(_args) { + context = this; + args = _args; + previous = now(); + if (!timeout) { + timeout = setTimeout(later, wait); + if (immediate) result = func.apply(context, args); + } + return result; + }); + + debounced.cancel = function() { + clearTimeout(timeout); + timeout = args = context = null; + }; + + return debounced; + } + + // Returns the first function passed as an argument to the second, + // allowing you to adjust arguments, run code before and after, and + // conditionally execute the original function. + function wrap(func, wrapper) { + return partial(wrapper, func); + } + + // Returns a negated version of the passed-in predicate. + function negate(predicate) { + return function() { + return !predicate.apply(this, arguments); + }; + } + + // Returns a function that is the composition of a list of functions, each + // consuming the return value of the function that follows. + function compose() { + var args = arguments; + var start = args.length - 1; + return function() { + var i = start; + var result = args[start].apply(this, arguments); + while (i--) result = args[i].call(this, result); + return result; + }; + } + + // Returns a function that will only be executed on and after the Nth call. + function after(times, func) { + return function() { + if (--times < 1) { + return func.apply(this, arguments); + } + }; + } + + // Returns a function that will only be executed up to (but not including) the + // Nth call. + function before(times, func) { + var memo; + return function() { + if (--times > 0) { + memo = func.apply(this, arguments); + } + if (times <= 1) func = null; + return memo; + }; + } + + // Returns a function that will be executed at most one time, no matter how + // often you call it. Useful for lazy initialization. + var once = partial(before, 2); + + // Returns the first key on an object that passes a truth test. + function findKey(obj, predicate, context) { + predicate = cb(predicate, context); + var _keys = keys(obj), key; + for (var i = 0, length = _keys.length; i < length; i++) { + key = _keys[i]; + if (predicate(obj[key], key, obj)) return key; + } + } + + // Internal function to generate `_.findIndex` and `_.findLastIndex`. + function createPredicateIndexFinder(dir) { + return function(array, predicate, context) { + predicate = cb(predicate, context); + var length = getLength(array); + var index = dir > 0 ? 0 : length - 1; + for (; index >= 0 && index < length; index += dir) { + if (predicate(array[index], index, array)) return index; + } + return -1; + }; + } + + // Returns the first index on an array-like that passes a truth test. + var findIndex = createPredicateIndexFinder(1); + + // Returns the last index on an array-like that passes a truth test. + var findLastIndex = createPredicateIndexFinder(-1); + + // Use a comparator function to figure out the smallest index at which + // an object should be inserted so as to maintain order. Uses binary search. + function sortedIndex(array, obj, iteratee, context) { + iteratee = cb(iteratee, context, 1); + var value = iteratee(obj); + var low = 0, high = getLength(array); + while (low < high) { + var mid = Math.floor((low + high) / 2); + if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; + } + return low; + } + + // Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions. + function createIndexFinder(dir, predicateFind, sortedIndex) { + return function(array, item, idx) { + var i = 0, length = getLength(array); + if (typeof idx == 'number') { + if (dir > 0) { + i = idx >= 0 ? idx : Math.max(idx + length, i); + } else { + length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1; + } + } else if (sortedIndex && idx && length) { + idx = sortedIndex(array, item); + return array[idx] === item ? idx : -1; + } + if (item !== item) { + idx = predicateFind(slice.call(array, i, length), isNaN$1); + return idx >= 0 ? idx + i : -1; + } + for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) { + if (array[idx] === item) return idx; + } + return -1; + }; + } + + // Return the position of the first occurrence of an item in an array, + // or -1 if the item is not included in the array. + // If the array is large and already in sort order, pass `true` + // for **isSorted** to use binary search. + var indexOf = createIndexFinder(1, findIndex, sortedIndex); + + // Return the position of the last occurrence of an item in an array, + // or -1 if the item is not included in the array. + var lastIndexOf = createIndexFinder(-1, findLastIndex); + + // Return the first value which passes a truth test. + function find(obj, predicate, context) { + var keyFinder = isArrayLike(obj) ? findIndex : findKey; + var key = keyFinder(obj, predicate, context); + if (key !== void 0 && key !== -1) return obj[key]; + } + + // Convenience version of a common use case of `_.find`: getting the first + // object containing specific `key:value` pairs. + function findWhere(obj, attrs) { + return find(obj, matcher(attrs)); + } + + // The cornerstone for collection functions, an `each` + // implementation, aka `forEach`. + // Handles raw objects in addition to array-likes. Treats all + // sparse array-likes as if they were dense. + function each(obj, iteratee, context) { + iteratee = optimizeCb(iteratee, context); + var i, length; + if (isArrayLike(obj)) { + for (i = 0, length = obj.length; i < length; i++) { + iteratee(obj[i], i, obj); + } + } else { + var _keys = keys(obj); + for (i = 0, length = _keys.length; i < length; i++) { + iteratee(obj[_keys[i]], _keys[i], obj); + } + } + return obj; + } + + // Return the results of applying the iteratee to each element. + function map(obj, iteratee, context) { + iteratee = cb(iteratee, context); + var _keys = !isArrayLike(obj) && keys(obj), + length = (_keys || obj).length, + results = Array(length); + for (var index = 0; index < length; index++) { + var currentKey = _keys ? _keys[index] : index; + results[index] = iteratee(obj[currentKey], currentKey, obj); + } + return results; + } + + // Internal helper to create a reducing function, iterating left or right. + function createReduce(dir) { + // Wrap code that reassigns argument variables in a separate function than + // the one that accesses `arguments.length` to avoid a perf hit. (#1991) + var reducer = function(obj, iteratee, memo, initial) { + var _keys = !isArrayLike(obj) && keys(obj), + length = (_keys || obj).length, + index = dir > 0 ? 0 : length - 1; + if (!initial) { + memo = obj[_keys ? _keys[index] : index]; + index += dir; + } + for (; index >= 0 && index < length; index += dir) { + var currentKey = _keys ? _keys[index] : index; + memo = iteratee(memo, obj[currentKey], currentKey, obj); + } + return memo; + }; + + return function(obj, iteratee, memo, context) { + var initial = arguments.length >= 3; + return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial); + }; + } + + // **Reduce** builds up a single result from a list of values, aka `inject`, + // or `foldl`. + var reduce = createReduce(1); + + // The right-associative version of reduce, also known as `foldr`. + var reduceRight = createReduce(-1); + + // Return all the elements that pass a truth test. + function filter(obj, predicate, context) { + var results = []; + predicate = cb(predicate, context); + each(obj, function(value, index, list) { + if (predicate(value, index, list)) results.push(value); + }); + return results; + } + + // Return all the elements for which a truth test fails. + function reject(obj, predicate, context) { + return filter(obj, negate(cb(predicate)), context); + } + + // Determine whether all of the elements pass a truth test. + function every(obj, predicate, context) { + predicate = cb(predicate, context); + var _keys = !isArrayLike(obj) && keys(obj), + length = (_keys || obj).length; + for (var index = 0; index < length; index++) { + var currentKey = _keys ? _keys[index] : index; + if (!predicate(obj[currentKey], currentKey, obj)) return false; + } + return true; + } + + // Determine if at least one element in the object passes a truth test. + function some(obj, predicate, context) { + predicate = cb(predicate, context); + var _keys = !isArrayLike(obj) && keys(obj), + length = (_keys || obj).length; + for (var index = 0; index < length; index++) { + var currentKey = _keys ? _keys[index] : index; + if (predicate(obj[currentKey], currentKey, obj)) return true; + } + return false; + } + + // Determine if the array or object contains a given item (using `===`). + function contains(obj, item, fromIndex, guard) { + if (!isArrayLike(obj)) obj = values(obj); + if (typeof fromIndex != 'number' || guard) fromIndex = 0; + return indexOf(obj, item, fromIndex) >= 0; + } + + // Invoke a method (with arguments) on every item in a collection. + var invoke = restArguments(function(obj, path, args) { + var contextPath, func; + if (isFunction$1(path)) { + func = path; + } else { + path = toPath$1(path); + contextPath = path.slice(0, -1); + path = path[path.length - 1]; + } + return map(obj, function(context) { + var method = func; + if (!method) { + if (contextPath && contextPath.length) { + context = deepGet(context, contextPath); + } + if (context == null) return void 0; + method = context[path]; + } + return method == null ? method : method.apply(context, args); + }); + }); + + // Convenience version of a common use case of `_.map`: fetching a property. + function pluck(obj, key) { + return map(obj, property(key)); + } + + // Convenience version of a common use case of `_.filter`: selecting only + // objects containing specific `key:value` pairs. + function where(obj, attrs) { + return filter(obj, matcher(attrs)); + } + + // Return the maximum element (or element-based computation). + function max(obj, iteratee, context) { + var result = -Infinity, lastComputed = -Infinity, + value, computed; + if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) { + obj = isArrayLike(obj) ? obj : values(obj); + for (var i = 0, length = obj.length; i < length; i++) { + value = obj[i]; + if (value != null && value > result) { + result = value; + } + } + } else { + iteratee = cb(iteratee, context); + each(obj, function(v, index, list) { + computed = iteratee(v, index, list); + if (computed > lastComputed || computed === -Infinity && result === -Infinity) { + result = v; + lastComputed = computed; + } + }); + } + return result; + } + + // Return the minimum element (or element-based computation). + function min(obj, iteratee, context) { + var result = Infinity, lastComputed = Infinity, + value, computed; + if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) { + obj = isArrayLike(obj) ? obj : values(obj); + for (var i = 0, length = obj.length; i < length; i++) { + value = obj[i]; + if (value != null && value < result) { + result = value; + } + } + } else { + iteratee = cb(iteratee, context); + each(obj, function(v, index, list) { + computed = iteratee(v, index, list); + if (computed < lastComputed || computed === Infinity && result === Infinity) { + result = v; + lastComputed = computed; + } + }); + } + return result; + } + + // Sample **n** random values from a collection using the modern version of the + // [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle). + // If **n** is not specified, returns a single random element. + // The internal `guard` argument allows it to work with `_.map`. + function sample(obj, n, guard) { + if (n == null || guard) { + if (!isArrayLike(obj)) obj = values(obj); + return obj[random(obj.length - 1)]; + } + var sample = isArrayLike(obj) ? clone(obj) : values(obj); + var length = getLength(sample); + n = Math.max(Math.min(n, length), 0); + var last = length - 1; + for (var index = 0; index < n; index++) { + var rand = random(index, last); + var temp = sample[index]; + sample[index] = sample[rand]; + sample[rand] = temp; + } + return sample.slice(0, n); + } + + // Shuffle a collection. + function shuffle(obj) { + return sample(obj, Infinity); + } + + // Sort the object's values by a criterion produced by an iteratee. + function sortBy(obj, iteratee, context) { + var index = 0; + iteratee = cb(iteratee, context); + return pluck(map(obj, function(value, key, list) { + return { + value: value, + index: index++, + criteria: iteratee(value, key, list) + }; + }).sort(function(left, right) { + var a = left.criteria; + var b = right.criteria; + if (a !== b) { + if (a > b || a === void 0) return 1; + if (a < b || b === void 0) return -1; + } + return left.index - right.index; + }), 'value'); + } + + // An internal function used for aggregate "group by" operations. + function group(behavior, partition) { + return function(obj, iteratee, context) { + var result = partition ? [[], []] : {}; + iteratee = cb(iteratee, context); + each(obj, function(value, index) { + var key = iteratee(value, index, obj); + behavior(result, value, key); + }); + return result; + }; + } + + // Groups the object's values by a criterion. Pass either a string attribute + // to group by, or a function that returns the criterion. + var groupBy = group(function(result, value, key) { + if (has(result, key)) result[key].push(value); else result[key] = [value]; + }); + + // Indexes the object's values by a criterion, similar to `_.groupBy`, but for + // when you know that your index values will be unique. + var indexBy = group(function(result, value, key) { + result[key] = value; + }); + + // Counts instances of an object that group by a certain criterion. Pass + // either a string attribute to count by, or a function that returns the + // criterion. + var countBy = group(function(result, value, key) { + if (has(result, key)) result[key]++; else result[key] = 1; + }); + + // Split a collection into two arrays: one whose elements all pass the given + // truth test, and one whose elements all do not pass the truth test. + var partition = group(function(result, value, pass) { + result[pass ? 0 : 1].push(value); + }, true); + + // Safely create a real, live array from anything iterable. + var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g; + function toArray(obj) { + if (!obj) return []; + if (isArray(obj)) return slice.call(obj); + if (isString(obj)) { + // Keep surrogate pair characters together. + return obj.match(reStrSymbol); + } + if (isArrayLike(obj)) return map(obj, identity); + return values(obj); + } + + // Return the number of elements in a collection. + function size(obj) { + if (obj == null) return 0; + return isArrayLike(obj) ? obj.length : keys(obj).length; + } + + // Internal `_.pick` helper function to determine whether `key` is an enumerable + // property name of `obj`. + function keyInObj(value, key, obj) { + return key in obj; + } + + // Return a copy of the object only containing the allowed properties. + var pick = restArguments(function(obj, keys) { + var result = {}, iteratee = keys[0]; + if (obj == null) return result; + if (isFunction$1(iteratee)) { + if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]); + keys = allKeys(obj); + } else { + iteratee = keyInObj; + keys = flatten(keys, false, false); + obj = Object(obj); + } + for (var i = 0, length = keys.length; i < length; i++) { + var key = keys[i]; + var value = obj[key]; + if (iteratee(value, key, obj)) result[key] = value; + } + return result; + }); + + // Return a copy of the object without the disallowed properties. + var omit = restArguments(function(obj, keys) { + var iteratee = keys[0], context; + if (isFunction$1(iteratee)) { + iteratee = negate(iteratee); + if (keys.length > 1) context = keys[1]; + } else { + keys = map(flatten(keys, false, false), String); + iteratee = function(value, key) { + return !contains(keys, key); + }; + } + return pick(obj, iteratee, context); + }); + + // Returns everything but the last entry of the array. Especially useful on + // the arguments object. Passing **n** will return all the values in + // the array, excluding the last N. + function initial(array, n, guard) { + return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); + } + + // Get the first element of an array. Passing **n** will return the first N + // values in the array. The **guard** check allows it to work with `_.map`. + function first(array, n, guard) { + if (array == null || array.length < 1) return n == null || guard ? void 0 : []; + if (n == null || guard) return array[0]; + return initial(array, array.length - n); + } + + // Returns everything but the first entry of the `array`. Especially useful on + // the `arguments` object. Passing an **n** will return the rest N values in the + // `array`. + function rest(array, n, guard) { + return slice.call(array, n == null || guard ? 1 : n); + } + + // Get the last element of an array. Passing **n** will return the last N + // values in the array. + function last(array, n, guard) { + if (array == null || array.length < 1) return n == null || guard ? void 0 : []; + if (n == null || guard) return array[array.length - 1]; + return rest(array, Math.max(0, array.length - n)); + } + + // Trim out all falsy values from an array. + function compact(array) { + return filter(array, Boolean); + } + + // Flatten out an array, either recursively (by default), or up to `depth`. + // Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively. + function flatten$1(array, depth) { + return flatten(array, depth, false); + } + + // Take the difference between one array and a number of other arrays. + // Only the elements present in just the first array will remain. + var difference = restArguments(function(array, rest) { + rest = flatten(rest, true, true); + return filter(array, function(value){ + return !contains(rest, value); + }); + }); + + // Return a version of the array that does not contain the specified value(s). + var without = restArguments(function(array, otherArrays) { + return difference(array, otherArrays); + }); + + // Produce a duplicate-free version of the array. If the array has already + // been sorted, you have the option of using a faster algorithm. + // The faster algorithm will not work with an iteratee if the iteratee + // is not a one-to-one function, so providing an iteratee will disable + // the faster algorithm. + function uniq(array, isSorted, iteratee, context) { + if (!isBoolean(isSorted)) { + context = iteratee; + iteratee = isSorted; + isSorted = false; + } + if (iteratee != null) iteratee = cb(iteratee, context); + var result = []; + var seen = []; + for (var i = 0, length = getLength(array); i < length; i++) { + var value = array[i], + computed = iteratee ? iteratee(value, i, array) : value; + if (isSorted && !iteratee) { + if (!i || seen !== computed) result.push(value); + seen = computed; + } else if (iteratee) { + if (!contains(seen, computed)) { + seen.push(computed); + result.push(value); + } + } else if (!contains(result, value)) { + result.push(value); + } + } + return result; + } + + // Produce an array that contains the union: each distinct element from all of + // the passed-in arrays. + var union = restArguments(function(arrays) { + return uniq(flatten(arrays, true, true)); + }); + + // Produce an array that contains every item shared between all the + // passed-in arrays. + function intersection(array) { + var result = []; + var argsLength = arguments.length; + for (var i = 0, length = getLength(array); i < length; i++) { + var item = array[i]; + if (contains(result, item)) continue; + var j; + for (j = 1; j < argsLength; j++) { + if (!contains(arguments[j], item)) break; + } + if (j === argsLength) result.push(item); + } + return result; + } + + // Complement of zip. Unzip accepts an array of arrays and groups + // each array's elements on shared indices. + function unzip(array) { + var length = array && max(array, getLength).length || 0; + var result = Array(length); + + for (var index = 0; index < length; index++) { + result[index] = pluck(array, index); + } + return result; + } + + // Zip together multiple lists into a single array -- elements that share + // an index go together. + var zip = restArguments(unzip); + + // Converts lists into objects. Pass either a single array of `[key, value]` + // pairs, or two parallel arrays of the same length -- one of keys, and one of + // the corresponding values. Passing by pairs is the reverse of `_.pairs`. + function object(list, values) { + var result = {}; + for (var i = 0, length = getLength(list); i < length; i++) { + if (values) { + result[list[i]] = values[i]; + } else { + result[list[i][0]] = list[i][1]; + } + } + return result; + } + + // Generate an integer Array containing an arithmetic progression. A port of + // the native Python `range()` function. See + // [the Python documentation](https://docs.python.org/library/functions.html#range). + function range(start, stop, step) { + if (stop == null) { + stop = start || 0; + start = 0; + } + if (!step) { + step = stop < start ? -1 : 1; + } + + var length = Math.max(Math.ceil((stop - start) / step), 0); + var range = Array(length); + + for (var idx = 0; idx < length; idx++, start += step) { + range[idx] = start; + } + + return range; + } + + // Chunk a single array into multiple arrays, each containing `count` or fewer + // items. + function chunk(array, count) { + if (count == null || count < 1) return []; + var result = []; + var i = 0, length = array.length; + while (i < length) { + result.push(slice.call(array, i, i += count)); + } + return result; + } + + // Helper function to continue chaining intermediate results. + function chainResult(instance, obj) { + return instance._chain ? _(obj).chain() : obj; + } + + // Add your own custom functions to the Underscore object. + function mixin(obj) { + each(functions(obj), function(name) { + var func = _[name] = obj[name]; + _.prototype[name] = function() { + var args = [this._wrapped]; + push.apply(args, arguments); + return chainResult(this, func.apply(_, args)); + }; + }); + return _; + } + + // Add all mutator `Array` functions to the wrapper. + each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { + var method = ArrayProto[name]; + _.prototype[name] = function() { + var obj = this._wrapped; + if (obj != null) { + method.apply(obj, arguments); + if ((name === 'shift' || name === 'splice') && obj.length === 0) { + delete obj[0]; + } + } + return chainResult(this, obj); + }; + }); + + // Add all accessor `Array` functions to the wrapper. + each(['concat', 'join', 'slice'], function(name) { + var method = ArrayProto[name]; + _.prototype[name] = function() { + var obj = this._wrapped; + if (obj != null) obj = method.apply(obj, arguments); + return chainResult(this, obj); + }; + }); + + // Named Exports + + var allExports = { + __proto__: null, + VERSION: VERSION, + restArguments: restArguments, + isObject: isObject, + isNull: isNull, + isUndefined: isUndefined, + isBoolean: isBoolean, + isElement: isElement, + isString: isString, + isNumber: isNumber, + isDate: isDate, + isRegExp: isRegExp, + isError: isError, + isSymbol: isSymbol, + isArrayBuffer: isArrayBuffer, + isDataView: isDataView$1, + isArray: isArray, + isFunction: isFunction$1, + isArguments: isArguments$1, + isFinite: isFinite$1, + isNaN: isNaN$1, + isTypedArray: isTypedArray$1, + isEmpty: isEmpty, + isMatch: isMatch, + isEqual: isEqual, + isMap: isMap, + isWeakMap: isWeakMap, + isSet: isSet, + isWeakSet: isWeakSet, + keys: keys, + allKeys: allKeys, + values: values, + pairs: pairs, + invert: invert, + functions: functions, + methods: functions, + extend: extend, + extendOwn: extendOwn, + assign: extendOwn, + defaults: defaults, + create: create, + clone: clone, + tap: tap, + get: get, + has: has$1, + mapObject: mapObject, + identity: identity, + constant: constant, + noop: noop, + toPath: toPath, + property: property, + propertyOf: propertyOf, + matcher: matcher, + matches: matcher, + times: times, + random: random, + now: now, + escape: _escape, + unescape: _unescape, + templateSettings: templateSettings, + template: template, + result: result, + uniqueId: uniqueId, + chain: chain, + iteratee: iteratee, + partial: partial, + bind: bind, + bindAll: bindAll, + memoize: memoize, + delay: delay, + defer: defer, + throttle: throttle, + debounce: debounce, + wrap: wrap, + negate: negate, + compose: compose, + after: after, + before: before, + once: once, + findKey: findKey, + findIndex: findIndex, + findLastIndex: findLastIndex, + sortedIndex: sortedIndex, + indexOf: indexOf, + lastIndexOf: lastIndexOf, + find: find, + detect: find, + findWhere: findWhere, + each: each, + forEach: each, + map: map, + collect: map, + reduce: reduce, + foldl: reduce, + inject: reduce, + reduceRight: reduceRight, + foldr: reduceRight, + filter: filter, + select: filter, + reject: reject, + every: every, + all: every, + some: some, + any: some, + contains: contains, + includes: contains, + include: contains, + invoke: invoke, + pluck: pluck, + where: where, + max: max, + min: min, + shuffle: shuffle, + sample: sample, + sortBy: sortBy, + groupBy: groupBy, + indexBy: indexBy, + countBy: countBy, + partition: partition, + toArray: toArray, + size: size, + pick: pick, + omit: omit, + first: first, + head: first, + take: first, + initial: initial, + last: last, + rest: rest, + tail: rest, + drop: rest, + compact: compact, + flatten: flatten$1, + without: without, + uniq: uniq, + unique: uniq, + union: union, + intersection: intersection, + difference: difference, + unzip: unzip, + transpose: unzip, + zip: zip, + object: object, + range: range, + chunk: chunk, + mixin: mixin, + 'default': _ + }; + + // Default Export + + // Add all of the Underscore functions to the wrapper object. + var _$1 = mixin(allExports); + // Legacy Node.js API. + _$1._ = _$1; + + return _$1; + +}))); +//# sourceMappingURL=underscore.js.map diff --git a/_static/underscore-1.3.1.js b/_static/underscore-1.3.1.js deleted file mode 100644 index 208d4cd..0000000 --- a/_static/underscore-1.3.1.js +++ /dev/null @@ -1,999 +0,0 @@ -// Underscore.js 1.3.1 -// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc. -// Underscore is freely distributable under the MIT license. -// Portions of Underscore are inspired or borrowed from Prototype, -// Oliver Steele's Functional, and John Resig's Micro-Templating. -// For all details and documentation: -// http://documentcloud.github.com/underscore - -(function() { - - // Baseline setup - // -------------- - - // Establish the root object, `window` in the browser, or `global` on the server. - var root = this; - - // Save the previous value of the `_` variable. - var previousUnderscore = root._; - - // Establish the object that gets returned to break out of a loop iteration. - var breaker = {}; - - // Save bytes in the minified (but not gzipped) version: - var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; - - // Create quick reference variables for speed access to core prototypes. - var slice = ArrayProto.slice, - unshift = ArrayProto.unshift, - toString = ObjProto.toString, - hasOwnProperty = ObjProto.hasOwnProperty; - - // All **ECMAScript 5** native function implementations that we hope to use - // are declared here. - var - nativeForEach = ArrayProto.forEach, - nativeMap = ArrayProto.map, - nativeReduce = ArrayProto.reduce, - nativeReduceRight = ArrayProto.reduceRight, - nativeFilter = ArrayProto.filter, - nativeEvery = ArrayProto.every, - nativeSome = ArrayProto.some, - nativeIndexOf = ArrayProto.indexOf, - nativeLastIndexOf = ArrayProto.lastIndexOf, - nativeIsArray = Array.isArray, - nativeKeys = Object.keys, - nativeBind = FuncProto.bind; - - // Create a safe reference to the Underscore object for use below. - var _ = function(obj) { return new wrapper(obj); }; - - // Export the Underscore object for **Node.js**, with - // backwards-compatibility for the old `require()` API. If we're in - // the browser, add `_` as a global object via a string identifier, - // for Closure Compiler "advanced" mode. - if (typeof exports !== 'undefined') { - if (typeof module !== 'undefined' && module.exports) { - exports = module.exports = _; - } - exports._ = _; - } else { - root['_'] = _; - } - - // Current version. - _.VERSION = '1.3.1'; - - // Collection Functions - // -------------------- - - // The cornerstone, an `each` implementation, aka `forEach`. - // Handles objects with the built-in `forEach`, arrays, and raw objects. - // Delegates to **ECMAScript 5**'s native `forEach` if available. - var each = _.each = _.forEach = function(obj, iterator, context) { - if (obj == null) return; - if (nativeForEach && obj.forEach === nativeForEach) { - obj.forEach(iterator, context); - } else if (obj.length === +obj.length) { - for (var i = 0, l = obj.length; i < l; i++) { - if (i in obj && iterator.call(context, obj[i], i, obj) === breaker) return; - } - } else { - for (var key in obj) { - if (_.has(obj, key)) { - if (iterator.call(context, obj[key], key, obj) === breaker) return; - } - } - } - }; - - // Return the results of applying the iterator to each element. - // Delegates to **ECMAScript 5**'s native `map` if available. - _.map = _.collect = function(obj, iterator, context) { - var results = []; - if (obj == null) return results; - if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context); - each(obj, function(value, index, list) { - results[results.length] = iterator.call(context, value, index, list); - }); - if (obj.length === +obj.length) results.length = obj.length; - return results; - }; - - // **Reduce** builds up a single result from a list of values, aka `inject`, - // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available. - _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) { - var initial = arguments.length > 2; - if (obj == null) obj = []; - if (nativeReduce && obj.reduce === nativeReduce) { - if (context) iterator = _.bind(iterator, context); - return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator); - } - each(obj, function(value, index, list) { - if (!initial) { - memo = value; - initial = true; - } else { - memo = iterator.call(context, memo, value, index, list); - } - }); - if (!initial) throw new TypeError('Reduce of empty array with no initial value'); - return memo; - }; - - // The right-associative version of reduce, also known as `foldr`. - // Delegates to **ECMAScript 5**'s native `reduceRight` if available. - _.reduceRight = _.foldr = function(obj, iterator, memo, context) { - var initial = arguments.length > 2; - if (obj == null) obj = []; - if (nativeReduceRight && obj.reduceRight === nativeReduceRight) { - if (context) iterator = _.bind(iterator, context); - return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator); - } - var reversed = _.toArray(obj).reverse(); - if (context && !initial) iterator = _.bind(iterator, context); - return initial ? _.reduce(reversed, iterator, memo, context) : _.reduce(reversed, iterator); - }; - - // Return the first value which passes a truth test. Aliased as `detect`. - _.find = _.detect = function(obj, iterator, context) { - var result; - any(obj, function(value, index, list) { - if (iterator.call(context, value, index, list)) { - result = value; - return true; - } - }); - return result; - }; - - // Return all the elements that pass a truth test. - // Delegates to **ECMAScript 5**'s native `filter` if available. - // Aliased as `select`. - _.filter = _.select = function(obj, iterator, context) { - var results = []; - if (obj == null) return results; - if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context); - each(obj, function(value, index, list) { - if (iterator.call(context, value, index, list)) results[results.length] = value; - }); - return results; - }; - - // Return all the elements for which a truth test fails. - _.reject = function(obj, iterator, context) { - var results = []; - if (obj == null) return results; - each(obj, function(value, index, list) { - if (!iterator.call(context, value, index, list)) results[results.length] = value; - }); - return results; - }; - - // Determine whether all of the elements match a truth test. - // Delegates to **ECMAScript 5**'s native `every` if available. - // Aliased as `all`. - _.every = _.all = function(obj, iterator, context) { - var result = true; - if (obj == null) return result; - if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context); - each(obj, function(value, index, list) { - if (!(result = result && iterator.call(context, value, index, list))) return breaker; - }); - return result; - }; - - // Determine if at least one element in the object matches a truth test. - // Delegates to **ECMAScript 5**'s native `some` if available. - // Aliased as `any`. - var any = _.some = _.any = function(obj, iterator, context) { - iterator || (iterator = _.identity); - var result = false; - if (obj == null) return result; - if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context); - each(obj, function(value, index, list) { - if (result || (result = iterator.call(context, value, index, list))) return breaker; - }); - return !!result; - }; - - // Determine if a given value is included in the array or object using `===`. - // Aliased as `contains`. - _.include = _.contains = function(obj, target) { - var found = false; - if (obj == null) return found; - if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1; - found = any(obj, function(value) { - return value === target; - }); - return found; - }; - - // Invoke a method (with arguments) on every item in a collection. - _.invoke = function(obj, method) { - var args = slice.call(arguments, 2); - return _.map(obj, function(value) { - return (_.isFunction(method) ? method || value : value[method]).apply(value, args); - }); - }; - - // Convenience version of a common use case of `map`: fetching a property. - _.pluck = function(obj, key) { - return _.map(obj, function(value){ return value[key]; }); - }; - - // Return the maximum element or (element-based computation). - _.max = function(obj, iterator, context) { - if (!iterator && _.isArray(obj)) return Math.max.apply(Math, obj); - if (!iterator && _.isEmpty(obj)) return -Infinity; - var result = {computed : -Infinity}; - each(obj, function(value, index, list) { - var computed = iterator ? iterator.call(context, value, index, list) : value; - computed >= result.computed && (result = {value : value, computed : computed}); - }); - return result.value; - }; - - // Return the minimum element (or element-based computation). - _.min = function(obj, iterator, context) { - if (!iterator && _.isArray(obj)) return Math.min.apply(Math, obj); - if (!iterator && _.isEmpty(obj)) return Infinity; - var result = {computed : Infinity}; - each(obj, function(value, index, list) { - var computed = iterator ? iterator.call(context, value, index, list) : value; - computed < result.computed && (result = {value : value, computed : computed}); - }); - return result.value; - }; - - // Shuffle an array. - _.shuffle = function(obj) { - var shuffled = [], rand; - each(obj, function(value, index, list) { - if (index == 0) { - shuffled[0] = value; - } else { - rand = Math.floor(Math.random() * (index + 1)); - shuffled[index] = shuffled[rand]; - shuffled[rand] = value; - } - }); - return shuffled; - }; - - // Sort the object's values by a criterion produced by an iterator. - _.sortBy = function(obj, iterator, context) { - return _.pluck(_.map(obj, function(value, index, list) { - return { - value : value, - criteria : iterator.call(context, value, index, list) - }; - }).sort(function(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }), 'value'); - }; - - // Groups the object's values by a criterion. Pass either a string attribute - // to group by, or a function that returns the criterion. - _.groupBy = function(obj, val) { - var result = {}; - var iterator = _.isFunction(val) ? val : function(obj) { return obj[val]; }; - each(obj, function(value, index) { - var key = iterator(value, index); - (result[key] || (result[key] = [])).push(value); - }); - return result; - }; - - // Use a comparator function to figure out at what index an object should - // be inserted so as to maintain order. Uses binary search. - _.sortedIndex = function(array, obj, iterator) { - iterator || (iterator = _.identity); - var low = 0, high = array.length; - while (low < high) { - var mid = (low + high) >> 1; - iterator(array[mid]) < iterator(obj) ? low = mid + 1 : high = mid; - } - return low; - }; - - // Safely convert anything iterable into a real, live array. - _.toArray = function(iterable) { - if (!iterable) return []; - if (iterable.toArray) return iterable.toArray(); - if (_.isArray(iterable)) return slice.call(iterable); - if (_.isArguments(iterable)) return slice.call(iterable); - return _.values(iterable); - }; - - // Return the number of elements in an object. - _.size = function(obj) { - return _.toArray(obj).length; - }; - - // Array Functions - // --------------- - - // Get the first element of an array. Passing **n** will return the first N - // values in the array. Aliased as `head`. The **guard** check allows it to work - // with `_.map`. - _.first = _.head = function(array, n, guard) { - return (n != null) && !guard ? slice.call(array, 0, n) : array[0]; - }; - - // Returns everything but the last entry of the array. Especcialy useful on - // the arguments object. Passing **n** will return all the values in - // the array, excluding the last N. The **guard** check allows it to work with - // `_.map`. - _.initial = function(array, n, guard) { - return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n)); - }; - - // Get the last element of an array. Passing **n** will return the last N - // values in the array. The **guard** check allows it to work with `_.map`. - _.last = function(array, n, guard) { - if ((n != null) && !guard) { - return slice.call(array, Math.max(array.length - n, 0)); - } else { - return array[array.length - 1]; - } - }; - - // Returns everything but the first entry of the array. Aliased as `tail`. - // Especially useful on the arguments object. Passing an **index** will return - // the rest of the values in the array from that index onward. The **guard** - // check allows it to work with `_.map`. - _.rest = _.tail = function(array, index, guard) { - return slice.call(array, (index == null) || guard ? 1 : index); - }; - - // Trim out all falsy values from an array. - _.compact = function(array) { - return _.filter(array, function(value){ return !!value; }); - }; - - // Return a completely flattened version of an array. - _.flatten = function(array, shallow) { - return _.reduce(array, function(memo, value) { - if (_.isArray(value)) return memo.concat(shallow ? value : _.flatten(value)); - memo[memo.length] = value; - return memo; - }, []); - }; - - // Return a version of the array that does not contain the specified value(s). - _.without = function(array) { - return _.difference(array, slice.call(arguments, 1)); - }; - - // Produce a duplicate-free version of the array. If the array has already - // been sorted, you have the option of using a faster algorithm. - // Aliased as `unique`. - _.uniq = _.unique = function(array, isSorted, iterator) { - var initial = iterator ? _.map(array, iterator) : array; - var result = []; - _.reduce(initial, function(memo, el, i) { - if (0 == i || (isSorted === true ? _.last(memo) != el : !_.include(memo, el))) { - memo[memo.length] = el; - result[result.length] = array[i]; - } - return memo; - }, []); - return result; - }; - - // Produce an array that contains the union: each distinct element from all of - // the passed-in arrays. - _.union = function() { - return _.uniq(_.flatten(arguments, true)); - }; - - // Produce an array that contains every item shared between all the - // passed-in arrays. (Aliased as "intersect" for back-compat.) - _.intersection = _.intersect = function(array) { - var rest = slice.call(arguments, 1); - return _.filter(_.uniq(array), function(item) { - return _.every(rest, function(other) { - return _.indexOf(other, item) >= 0; - }); - }); - }; - - // Take the difference between one array and a number of other arrays. - // Only the elements present in just the first array will remain. - _.difference = function(array) { - var rest = _.flatten(slice.call(arguments, 1)); - return _.filter(array, function(value){ return !_.include(rest, value); }); - }; - - // Zip together multiple lists into a single array -- elements that share - // an index go together. - _.zip = function() { - var args = slice.call(arguments); - var length = _.max(_.pluck(args, 'length')); - var results = new Array(length); - for (var i = 0; i < length; i++) results[i] = _.pluck(args, "" + i); - return results; - }; - - // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**), - // we need this function. Return the position of the first occurrence of an - // item in an array, or -1 if the item is not included in the array. - // Delegates to **ECMAScript 5**'s native `indexOf` if available. - // If the array is large and already in sort order, pass `true` - // for **isSorted** to use binary search. - _.indexOf = function(array, item, isSorted) { - if (array == null) return -1; - var i, l; - if (isSorted) { - i = _.sortedIndex(array, item); - return array[i] === item ? i : -1; - } - if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item); - for (i = 0, l = array.length; i < l; i++) if (i in array && array[i] === item) return i; - return -1; - }; - - // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available. - _.lastIndexOf = function(array, item) { - if (array == null) return -1; - if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) return array.lastIndexOf(item); - var i = array.length; - while (i--) if (i in array && array[i] === item) return i; - return -1; - }; - - // Generate an integer Array containing an arithmetic progression. A port of - // the native Python `range()` function. See - // [the Python documentation](http://docs.python.org/library/functions.html#range). - _.range = function(start, stop, step) { - if (arguments.length <= 1) { - stop = start || 0; - start = 0; - } - step = arguments[2] || 1; - - var len = Math.max(Math.ceil((stop - start) / step), 0); - var idx = 0; - var range = new Array(len); - - while(idx < len) { - range[idx++] = start; - start += step; - } - - return range; - }; - - // Function (ahem) Functions - // ------------------ - - // Reusable constructor function for prototype setting. - var ctor = function(){}; - - // Create a function bound to a given object (assigning `this`, and arguments, - // optionally). Binding with arguments is also known as `curry`. - // Delegates to **ECMAScript 5**'s native `Function.bind` if available. - // We check for `func.bind` first, to fail fast when `func` is undefined. - _.bind = function bind(func, context) { - var bound, args; - if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); - if (!_.isFunction(func)) throw new TypeError; - args = slice.call(arguments, 2); - return bound = function() { - if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments))); - ctor.prototype = func.prototype; - var self = new ctor; - var result = func.apply(self, args.concat(slice.call(arguments))); - if (Object(result) === result) return result; - return self; - }; - }; - - // Bind all of an object's methods to that object. Useful for ensuring that - // all callbacks defined on an object belong to it. - _.bindAll = function(obj) { - var funcs = slice.call(arguments, 1); - if (funcs.length == 0) funcs = _.functions(obj); - each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); }); - return obj; - }; - - // Memoize an expensive function by storing its results. - _.memoize = function(func, hasher) { - var memo = {}; - hasher || (hasher = _.identity); - return function() { - var key = hasher.apply(this, arguments); - return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments)); - }; - }; - - // Delays a function for the given number of milliseconds, and then calls - // it with the arguments supplied. - _.delay = function(func, wait) { - var args = slice.call(arguments, 2); - return setTimeout(function(){ return func.apply(func, args); }, wait); - }; - - // Defers a function, scheduling it to run after the current call stack has - // cleared. - _.defer = function(func) { - return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1))); - }; - - // Returns a function, that, when invoked, will only be triggered at most once - // during a given window of time. - _.throttle = function(func, wait) { - var context, args, timeout, throttling, more; - var whenDone = _.debounce(function(){ more = throttling = false; }, wait); - return function() { - context = this; args = arguments; - var later = function() { - timeout = null; - if (more) func.apply(context, args); - whenDone(); - }; - if (!timeout) timeout = setTimeout(later, wait); - if (throttling) { - more = true; - } else { - func.apply(context, args); - } - whenDone(); - throttling = true; - }; - }; - - // Returns a function, that, as long as it continues to be invoked, will not - // be triggered. The function will be called after it stops being called for - // N milliseconds. - _.debounce = function(func, wait) { - var timeout; - return function() { - var context = this, args = arguments; - var later = function() { - timeout = null; - func.apply(context, args); - }; - clearTimeout(timeout); - timeout = setTimeout(later, wait); - }; - }; - - // Returns a function that will be executed at most one time, no matter how - // often you call it. Useful for lazy initialization. - _.once = function(func) { - var ran = false, memo; - return function() { - if (ran) return memo; - ran = true; - return memo = func.apply(this, arguments); - }; - }; - - // Returns the first function passed as an argument to the second, - // allowing you to adjust arguments, run code before and after, and - // conditionally execute the original function. - _.wrap = function(func, wrapper) { - return function() { - var args = [func].concat(slice.call(arguments, 0)); - return wrapper.apply(this, args); - }; - }; - - // Returns a function that is the composition of a list of functions, each - // consuming the return value of the function that follows. - _.compose = function() { - var funcs = arguments; - return function() { - var args = arguments; - for (var i = funcs.length - 1; i >= 0; i--) { - args = [funcs[i].apply(this, args)]; - } - return args[0]; - }; - }; - - // Returns a function that will only be executed after being called N times. - _.after = function(times, func) { - if (times <= 0) return func(); - return function() { - if (--times < 1) { return func.apply(this, arguments); } - }; - }; - - // Object Functions - // ---------------- - - // Retrieve the names of an object's properties. - // Delegates to **ECMAScript 5**'s native `Object.keys` - _.keys = nativeKeys || function(obj) { - if (obj !== Object(obj)) throw new TypeError('Invalid object'); - var keys = []; - for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key; - return keys; - }; - - // Retrieve the values of an object's properties. - _.values = function(obj) { - return _.map(obj, _.identity); - }; - - // Return a sorted list of the function names available on the object. - // Aliased as `methods` - _.functions = _.methods = function(obj) { - var names = []; - for (var key in obj) { - if (_.isFunction(obj[key])) names.push(key); - } - return names.sort(); - }; - - // Extend a given object with all the properties in passed-in object(s). - _.extend = function(obj) { - each(slice.call(arguments, 1), function(source) { - for (var prop in source) { - obj[prop] = source[prop]; - } - }); - return obj; - }; - - // Fill in a given object with default properties. - _.defaults = function(obj) { - each(slice.call(arguments, 1), function(source) { - for (var prop in source) { - if (obj[prop] == null) obj[prop] = source[prop]; - } - }); - return obj; - }; - - // Create a (shallow-cloned) duplicate of an object. - _.clone = function(obj) { - if (!_.isObject(obj)) return obj; - return _.isArray(obj) ? obj.slice() : _.extend({}, obj); - }; - - // Invokes interceptor with the obj, and then returns obj. - // The primary purpose of this method is to "tap into" a method chain, in - // order to perform operations on intermediate results within the chain. - _.tap = function(obj, interceptor) { - interceptor(obj); - return obj; - }; - - // Internal recursive comparison function. - function eq(a, b, stack) { - // Identical objects are equal. `0 === -0`, but they aren't identical. - // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal. - if (a === b) return a !== 0 || 1 / a == 1 / b; - // A strict comparison is necessary because `null == undefined`. - if (a == null || b == null) return a === b; - // Unwrap any wrapped objects. - if (a._chain) a = a._wrapped; - if (b._chain) b = b._wrapped; - // Invoke a custom `isEqual` method if one is provided. - if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b); - if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a); - // Compare `[[Class]]` names. - var className = toString.call(a); - if (className != toString.call(b)) return false; - switch (className) { - // Strings, numbers, dates, and booleans are compared by value. - case '[object String]': - // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is - // equivalent to `new String("5")`. - return a == String(b); - case '[object Number]': - // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for - // other numeric values. - return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b); - case '[object Date]': - case '[object Boolean]': - // Coerce dates and booleans to numeric primitive values. Dates are compared by their - // millisecond representations. Note that invalid dates with millisecond representations - // of `NaN` are not equivalent. - return +a == +b; - // RegExps are compared by their source patterns and flags. - case '[object RegExp]': - return a.source == b.source && - a.global == b.global && - a.multiline == b.multiline && - a.ignoreCase == b.ignoreCase; - } - if (typeof a != 'object' || typeof b != 'object') return false; - // Assume equality for cyclic structures. The algorithm for detecting cyclic - // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. - var length = stack.length; - while (length--) { - // Linear search. Performance is inversely proportional to the number of - // unique nested structures. - if (stack[length] == a) return true; - } - // Add the first object to the stack of traversed objects. - stack.push(a); - var size = 0, result = true; - // Recursively compare objects and arrays. - if (className == '[object Array]') { - // Compare array lengths to determine if a deep comparison is necessary. - size = a.length; - result = size == b.length; - if (result) { - // Deep compare the contents, ignoring non-numeric properties. - while (size--) { - // Ensure commutative equality for sparse arrays. - if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break; - } - } - } else { - // Objects with different constructors are not equivalent. - if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false; - // Deep compare objects. - for (var key in a) { - if (_.has(a, key)) { - // Count the expected number of properties. - size++; - // Deep compare each member. - if (!(result = _.has(b, key) && eq(a[key], b[key], stack))) break; - } - } - // Ensure that both objects contain the same number of properties. - if (result) { - for (key in b) { - if (_.has(b, key) && !(size--)) break; - } - result = !size; - } - } - // Remove the first object from the stack of traversed objects. - stack.pop(); - return result; - } - - // Perform a deep comparison to check if two objects are equal. - _.isEqual = function(a, b) { - return eq(a, b, []); - }; - - // Is a given array, string, or object empty? - // An "empty" object has no enumerable own-properties. - _.isEmpty = function(obj) { - if (_.isArray(obj) || _.isString(obj)) return obj.length === 0; - for (var key in obj) if (_.has(obj, key)) return false; - return true; - }; - - // Is a given value a DOM element? - _.isElement = function(obj) { - return !!(obj && obj.nodeType == 1); - }; - - // Is a given value an array? - // Delegates to ECMA5's native Array.isArray - _.isArray = nativeIsArray || function(obj) { - return toString.call(obj) == '[object Array]'; - }; - - // Is a given variable an object? - _.isObject = function(obj) { - return obj === Object(obj); - }; - - // Is a given variable an arguments object? - _.isArguments = function(obj) { - return toString.call(obj) == '[object Arguments]'; - }; - if (!_.isArguments(arguments)) { - _.isArguments = function(obj) { - return !!(obj && _.has(obj, 'callee')); - }; - } - - // Is a given value a function? - _.isFunction = function(obj) { - return toString.call(obj) == '[object Function]'; - }; - - // Is a given value a string? - _.isString = function(obj) { - return toString.call(obj) == '[object String]'; - }; - - // Is a given value a number? - _.isNumber = function(obj) { - return toString.call(obj) == '[object Number]'; - }; - - // Is the given value `NaN`? - _.isNaN = function(obj) { - // `NaN` is the only value for which `===` is not reflexive. - return obj !== obj; - }; - - // Is a given value a boolean? - _.isBoolean = function(obj) { - return obj === true || obj === false || toString.call(obj) == '[object Boolean]'; - }; - - // Is a given value a date? - _.isDate = function(obj) { - return toString.call(obj) == '[object Date]'; - }; - - // Is the given value a regular expression? - _.isRegExp = function(obj) { - return toString.call(obj) == '[object RegExp]'; - }; - - // Is a given value equal to null? - _.isNull = function(obj) { - return obj === null; - }; - - // Is a given variable undefined? - _.isUndefined = function(obj) { - return obj === void 0; - }; - - // Has own property? - _.has = function(obj, key) { - return hasOwnProperty.call(obj, key); - }; - - // Utility Functions - // ----------------- - - // Run Underscore.js in *noConflict* mode, returning the `_` variable to its - // previous owner. Returns a reference to the Underscore object. - _.noConflict = function() { - root._ = previousUnderscore; - return this; - }; - - // Keep the identity function around for default iterators. - _.identity = function(value) { - return value; - }; - - // Run a function **n** times. - _.times = function (n, iterator, context) { - for (var i = 0; i < n; i++) iterator.call(context, i); - }; - - // Escape a string for HTML interpolation. - _.escape = function(string) { - return (''+string).replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/\//g,'/'); - }; - - // Add your own custom functions to the Underscore object, ensuring that - // they're correctly added to the OOP wrapper as well. - _.mixin = function(obj) { - each(_.functions(obj), function(name){ - addToWrapper(name, _[name] = obj[name]); - }); - }; - - // Generate a unique integer id (unique within the entire client session). - // Useful for temporary DOM ids. - var idCounter = 0; - _.uniqueId = function(prefix) { - var id = idCounter++; - return prefix ? prefix + id : id; - }; - - // By default, Underscore uses ERB-style template delimiters, change the - // following template settings to use alternative delimiters. - _.templateSettings = { - evaluate : /<%([\s\S]+?)%>/g, - interpolate : /<%=([\s\S]+?)%>/g, - escape : /<%-([\s\S]+?)%>/g - }; - - // When customizing `templateSettings`, if you don't want to define an - // interpolation, evaluation or escaping regex, we need one that is - // guaranteed not to match. - var noMatch = /.^/; - - // Within an interpolation, evaluation, or escaping, remove HTML escaping - // that had been previously added. - var unescape = function(code) { - return code.replace(/\\\\/g, '\\').replace(/\\'/g, "'"); - }; - - // JavaScript micro-templating, similar to John Resig's implementation. - // Underscore templating handles arbitrary delimiters, preserves whitespace, - // and correctly escapes quotes within interpolated code. - _.template = function(str, data) { - var c = _.templateSettings; - var tmpl = 'var __p=[],print=function(){__p.push.apply(__p,arguments);};' + - 'with(obj||{}){__p.push(\'' + - str.replace(/\\/g, '\\\\') - .replace(/'/g, "\\'") - .replace(c.escape || noMatch, function(match, code) { - return "',_.escape(" + unescape(code) + "),'"; - }) - .replace(c.interpolate || noMatch, function(match, code) { - return "'," + unescape(code) + ",'"; - }) - .replace(c.evaluate || noMatch, function(match, code) { - return "');" + unescape(code).replace(/[\r\n\t]/g, ' ') + ";__p.push('"; - }) - .replace(/\r/g, '\\r') - .replace(/\n/g, '\\n') - .replace(/\t/g, '\\t') - + "');}return __p.join('');"; - var func = new Function('obj', '_', tmpl); - if (data) return func(data, _); - return function(data) { - return func.call(this, data, _); - }; - }; - - // Add a "chain" function, which will delegate to the wrapper. - _.chain = function(obj) { - return _(obj).chain(); - }; - - // The OOP Wrapper - // --------------- - - // If Underscore is called as a function, it returns a wrapped object that - // can be used OO-style. This wrapper holds altered versions of all the - // underscore functions. Wrapped objects may be chained. - var wrapper = function(obj) { this._wrapped = obj; }; - - // Expose `wrapper.prototype` as `_.prototype` - _.prototype = wrapper.prototype; - - // Helper function to continue chaining intermediate results. - var result = function(obj, chain) { - return chain ? _(obj).chain() : obj; - }; - - // A method to easily add functions to the OOP wrapper. - var addToWrapper = function(name, func) { - wrapper.prototype[name] = function() { - var args = slice.call(arguments); - unshift.call(args, this._wrapped); - return result(func.apply(_, args), this._chain); - }; - }; - - // Add all of the Underscore functions to the wrapper object. - _.mixin(_); - - // Add all mutator Array functions to the wrapper. - each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { - var method = ArrayProto[name]; - wrapper.prototype[name] = function() { - var wrapped = this._wrapped; - method.apply(wrapped, arguments); - var length = wrapped.length; - if ((name == 'shift' || name == 'splice') && length === 0) delete wrapped[0]; - return result(wrapped, this._chain); - }; - }); - - // Add all accessor Array functions to the wrapper. - each(['concat', 'join', 'slice'], function(name) { - var method = ArrayProto[name]; - wrapper.prototype[name] = function() { - return result(method.apply(this._wrapped, arguments), this._chain); - }; - }); - - // Start chaining a wrapped Underscore object. - wrapper.prototype.chain = function() { - this._chain = true; - return this; - }; - - // Extracts the result from a wrapped and chained object. - wrapper.prototype.value = function() { - return this._wrapped; - }; - -}).call(this); diff --git a/_static/underscore.js b/_static/underscore.js index 5b55f32..166240e 100644 --- a/_static/underscore.js +++ b/_static/underscore.js @@ -1,31 +1,6 @@ -// Underscore.js 1.3.1 -// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc. -// Underscore is freely distributable under the MIT license. -// Portions of Underscore are inspired or borrowed from Prototype, -// Oliver Steele's Functional, and John Resig's Micro-Templating. -// For all details and documentation: -// http://documentcloud.github.com/underscore -(function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source== -c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c, -h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each= -b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e2;a== -null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect= -function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e= -e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck= -function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;bd?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a, -c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}}; -b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments, -1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)}; -b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"}; -b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a), -function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+ -u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]= -function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain= -true;return this};m.prototype.value=function(){return this._wrapped}}).call(this); +!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n=n||self,function(){var t=n._,e=n._=r();e.noConflict=function(){return n._=t,e}}())}(this,(function(){ +// Underscore.js 1.12.0 +// https://underscorejs.org +// (c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors +// Underscore may be freely distributed under the MIT license. +var n="1.12.0",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},t=Array.prototype,e=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,o=t.push,i=t.slice,a=e.toString,f=e.hasOwnProperty,c="undefined"!=typeof ArrayBuffer,l="undefined"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,g=isFinite,d=!{toString:null}.propertyIsEnumerable("toString"),b=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;u=0&&t<=m}}function $(n){return function(r){return null==r?void 0:r[n]}}var G=$("byteLength"),H=J(G),Q=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var X=c?function(n){return h?h(n)&&!q(n):H(n)&&Q.test(a.call(n))}:K(!1),Y=$("length");function Z(n,r){r=function(n){for(var r={},t=n.length,e=0;e":">",'"':""","'":"'","`":"`"},Kn=Ln(Cn),Jn=Ln(_n(Cn)),$n=tn.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Gn=/(.)^/,Hn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Qn=/\\|'|\r|\n|\u2028|\u2029/g;function Xn(n){return"\\"+Hn[n]}var Yn=0;function Zn(n,r,t,e,u){if(!(e instanceof r))return n.apply(t,u);var o=Mn(n.prototype),i=n.apply(o,u);return _(i)?i:o}var nr=j((function(n,r){var t=nr.placeholder,e=function(){for(var u=0,o=r.length,i=Array(o),a=0;a1)er(a,r-1,t,e),u=e.length;else for(var f=0,c=a.length;f0&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}}var cr=nr(fr,2);function lr(n,r,t){r=qn(r,t);for(var e,u=nn(n),o=0,i=u.length;o0?0:u-1;o>=0&&o0?a=o>=0?o:Math.max(o+f,a):f=o>=0?Math.min(o+1,f):o+f+1;else if(t&&o&&f)return e[o=t(e,u)]===u?o:-1;if(u!=u)return(o=r(i.call(e,a,f),C))>=0?o+a:-1;for(o=n>0?a:f-1;o>=0&&o0?0:i-1;for(u||(e=r[o?o[a]:a],a+=n);a>=0&&a=3;return r(n,Fn(t,u,4),e,o)}}var wr=_r(1),Ar=_r(-1);function xr(n,r,t){var e=[];return r=qn(r,t),mr(n,(function(n,t,u){r(n,t,u)&&e.push(n)})),e}function Sr(n,r,t){r=qn(r,t);for(var e=!tr(n)&&nn(n),u=(e||n).length,o=0;o=0}var Er=j((function(n,r,t){var e,u;return D(r)?u=r:(r=Nn(r),e=r.slice(0,-1),r=r[r.length-1]),jr(n,(function(n){var o=u;if(!o){if(e&&e.length&&(n=In(n,e)),null==n)return;o=n[r]}return null==o?o:o.apply(n,t)}))}));function Br(n,r){return jr(n,Rn(r))}function Nr(n,r,t){var e,u,o=-1/0,i=-1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=tr(n)?n:jn(n)).length;ao&&(o=e);else r=qn(r,t),mr(n,(function(n,t,e){((u=r(n,t,e))>i||u===-1/0&&o===-1/0)&&(o=n,i=u)}));return o}function Ir(n,r,t){if(null==r||t)return tr(n)||(n=jn(n)),n[Wn(n.length-1)];var e=tr(n)?En(n):jn(n),u=Y(e);r=Math.max(Math.min(r,u),0);for(var o=u-1,i=0;i1&&(e=Fn(e,r[1])),r=an(n)):(e=Pr,r=er(r,!1,!1),n=Object(n));for(var u=0,o=r.length;u1&&(t=r[1])):(r=jr(er(r,!1,!1),String),e=function(n,t){return!Mr(r,t)}),qr(n,e,t)}));function Wr(n,r,t){return i.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))}function zr(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[0]:Wr(n,n.length-r)}function Lr(n,r,t){return i.call(n,null==r||t?1:r)}var Cr=j((function(n,r){return r=er(r,!0,!0),xr(n,(function(n){return!Mr(r,n)}))})),Kr=j((function(n,r){return Cr(n,r)}));function Jr(n,r,t,e){A(r)||(e=t,t=r,r=!1),null!=t&&(t=qn(t,e));for(var u=[],o=[],i=0,a=Y(n);ir?(e&&(clearTimeout(e),e=null),a=c,i=n.apply(u,o),e||(u=o=null)):e||!1===t.trailing||(e=setTimeout(f,l)),i};return c.cancel=function(){clearTimeout(e),a=0,e=u=o=null},c},debounce:function(n,r,t){var e,u,o=function(r,t){e=null,t&&(u=n.apply(r,t))},i=j((function(i){if(e&&clearTimeout(e),t){var a=!e;e=setTimeout(o,r),a&&(u=n.apply(this,i))}else e=or(o,r,this,i);return u}));return i.cancel=function(){clearTimeout(e),e=null},i},wrap:function(n,r){return nr(r,n)},negate:ar,compose:function(){var n=arguments,r=n.length-1;return function(){for(var t=r,e=n[r].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},after:function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}},before:fr,once:cr,findKey:lr,findIndex:pr,findLastIndex:vr,sortedIndex:hr,indexOf:gr,lastIndexOf:dr,find:br,detect:br,findWhere:function(n,r){return br(n,Dn(r))},each:mr,forEach:mr,map:jr,collect:jr,reduce:wr,foldl:wr,inject:wr,reduceRight:Ar,foldr:Ar,filter:xr,select:xr,reject:function(n,r,t){return xr(n,ar(qn(r)),t)},every:Sr,all:Sr,some:Or,any:Or,contains:Mr,includes:Mr,include:Mr,invoke:Er,pluck:Br,where:function(n,r){return xr(n,Dn(r))},max:Nr,min:function(n,r,t){var e,u,o=1/0,i=1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=tr(n)?n:jn(n)).length;ae||void 0===t)return 1;if(t - + - + About Unidata AWIPS — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -51,7 +53,7 @@ - python-awips + python-awips @@ -146,6 +148,8 @@ + +
    - diff --git a/api/CombinedTimeQuery.html b/api/CombinedTimeQuery.html index 906f0c3..59cbc7e 100644 --- a/api/CombinedTimeQuery.html +++ b/api/CombinedTimeQuery.html @@ -3,9 +3,9 @@ - + - + CombinedTimeQuery — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -149,6 +151,8 @@ + +
    @@ -190,37 +194,29 @@ - diff --git a/api/DataAccessLayer.html b/api/DataAccessLayer.html index 152a2a2..2835ac2 100644 --- a/api/DataAccessLayer.html +++ b/api/DataAccessLayer.html @@ -3,9 +3,9 @@ - + - + DataAccessLayer — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -149,6 +151,8 @@ + +
      @@ -162,7 +166,7 @@
    • - + View page source @@ -180,7 +184,7 @@

      DataAccessLayer

      -awips.dataaccess.DataAccessLayer.changeEDEXHost(newHostName)[source]
      +awips.dataaccess.DataAccessLayer.changeEDEXHost(newHostName)[source]

      Changes the EDEX host the Data Access Framework is communicating with. Only works if using the native Python client implementation, otherwise, this method will throw a TypeError.

      @@ -192,7 +196,7 @@ method will throw a TypeError.

      -awips.dataaccess.DataAccessLayer.getAvailableLevels(request)[source]
      +awips.dataaccess.DataAccessLayer.getAvailableLevels(request)[source]

      Gets the available levels that match the request without actually requesting the data.

      @@ -205,7 +209,7 @@ requesting the data.

      -awips.dataaccess.DataAccessLayer.getAvailableLocationNames(request)[source]
      +awips.dataaccess.DataAccessLayer.getAvailableLocationNames(request)[source]

      Gets the available location names that match the request without actually requesting the data.

      @@ -218,7 +222,7 @@ requesting the data.

      -awips.dataaccess.DataAccessLayer.getAvailableParameters(request)[source]
      +awips.dataaccess.DataAccessLayer.getAvailableParameters(request)[source]

      Gets the available parameters names that match the request without actually requesting the data.

      @@ -231,7 +235,7 @@ requesting the data.

      -awips.dataaccess.DataAccessLayer.getAvailableTimes(request, refTimeOnly=False)[source]
      +awips.dataaccess.DataAccessLayer.getAvailableTimes(request, refTimeOnly=False)[source]

      Get the times of available data to the request.

      Args:

      request: the IDataRequest to get data for @@ -247,7 +251,7 @@ refTimeOnly: optional, use True if only unique refTimes should be

      -awips.dataaccess.DataAccessLayer.getForecastRun(cycle, times)[source]
      +awips.dataaccess.DataAccessLayer.getForecastRun(cycle, times)[source]

      Get the latest forecast run (list of objects) from all all cycles and times returned from DataAccessLayer “grid” response.

      @@ -262,7 +266,7 @@ times: All available times/cycles

      -awips.dataaccess.DataAccessLayer.getGeometryData(request, times=[])[source]
      +awips.dataaccess.DataAccessLayer.getGeometryData(request, times=[])[source]

      Gets the geometry data that matches the request at the specified times. Each combination of geometry, level, and dataTime will be returned as a separate IGeometryData.

      @@ -280,7 +284,7 @@ times: a list of DataTimes, a TimeRange, or None if the data is time

      -awips.dataaccess.DataAccessLayer.getGridData(request, times=[])[source]
      +awips.dataaccess.DataAccessLayer.getGridData(request, times=[])[source]

      Gets the grid data that matches the request at the specified times. Each combination of parameter, level, and dataTime will be returned as a separate IGridData.

      @@ -298,7 +302,7 @@ times: a list of DataTimes, a TimeRange, or None if the data is time

      -awips.dataaccess.DataAccessLayer.getIdentifierValues(request, identifierKey)[source]
      +awips.dataaccess.DataAccessLayer.getIdentifierValues(request, identifierKey)[source]

      Gets the allowed values for a particular identifier on this datatype.

      Args:

      request: the request to find identifier values for @@ -311,7 +315,7 @@ identifierKey: the identifier to find values for

      -awips.dataaccess.DataAccessLayer.getMetarObs(response)[source]
      +awips.dataaccess.DataAccessLayer.getMetarObs(response)[source]

      Processes a DataAccessLayer “obs” response into a dictionary, with special consideration for multi-value parameters “presWeather”, “skyCover”, and “skyLayerBase”.

      @@ -325,7 +329,7 @@ with special consideration for multi-value parameters
      -awips.dataaccess.DataAccessLayer.getOptionalIdentifiers(request)[source]
      +awips.dataaccess.DataAccessLayer.getOptionalIdentifiers(request)[source]

      Gets the optional identifiers for this request.

      Args:

      request: the request to find optional identifiers for

      @@ -337,7 +341,7 @@ with special consideration for multi-value parameters
      -awips.dataaccess.DataAccessLayer.getRadarProductIDs(availableParms)[source]
      +awips.dataaccess.DataAccessLayer.getRadarProductIDs(availableParms)[source]

      Get only the numeric idetifiers for NEXRAD3 products.

      Args:

      availableParms: Full list of radar parameters

      @@ -349,7 +353,7 @@ with special consideration for multi-value parameters
      -awips.dataaccess.DataAccessLayer.getRadarProductNames(availableParms)[source]
      +awips.dataaccess.DataAccessLayer.getRadarProductNames(availableParms)[source]

      Get only the named idetifiers for NEXRAD3 products.

      @@ -363,7 +367,7 @@ with special consideration for multi-value parameters
      -awips.dataaccess.DataAccessLayer.getRequiredIdentifiers(request)[source]
      +awips.dataaccess.DataAccessLayer.getRequiredIdentifiers(request)[source]

      Gets the required identifiers for this request. These identifiers must be set on a request for the request of this datatype to succeed.

      @@ -376,7 +380,7 @@ must be set on a request for the request of this datatype to succeed.

      -awips.dataaccess.DataAccessLayer.getSupportedDatatypes()[source]
      +awips.dataaccess.DataAccessLayer.getSupportedDatatypes()[source]

      Gets the datatypes that are supported by the framework

      Returns:

      a list of strings of supported datatypes

      @@ -386,7 +390,7 @@ must be set on a request for the request of this datatype to succeed.

      -awips.dataaccess.DataAccessLayer.getSynopticObs(response)[source]
      +awips.dataaccess.DataAccessLayer.getSynopticObs(response)[source]

      Processes a DataAccessLayer “sfcobs” response into a dictionary of available parameters.

      @@ -399,7 +403,7 @@ of available parameters.

      -awips.dataaccess.DataAccessLayer.newDataRequest(datatype=None, **kwargs)[source]
      +awips.dataaccess.DataAccessLayer.newDataRequest(datatype=None, **kwargs)[source]

      Creates a new instance of IDataRequest suitable for the runtime environment. All args are optional and exist solely for convenience.

      @@ -417,7 +421,7 @@ kwargs: any leftover kwargs will be set as identifiers

      -awips.dataaccess.DataAccessLayer.setLazyLoadGridLatLon(lazyLoadGridLatLon)[source]
      +awips.dataaccess.DataAccessLayer.setLazyLoadGridLatLon(lazyLoadGridLatLon)[source]

      Provide a hint to the Data Access Framework indicating whether to load the lat/lon data for a grid immediately or wait until it is needed. This is provided as a performance tuning hint and should not affect the way the @@ -441,37 +445,29 @@ lat/lon data out of the way during the initial request.

    - diff --git a/api/DateTimeConverter.html b/api/DateTimeConverter.html index 20b6314..f10f9e2 100644 --- a/api/DateTimeConverter.html +++ b/api/DateTimeConverter.html @@ -3,9 +3,9 @@ - + - + DateTimeConverter — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -149,6 +151,8 @@ + +
      @@ -162,7 +166,7 @@
    • - + View page source @@ -180,7 +184,7 @@

      DateTimeConverter

      -awips.DateTimeConverter.constructTimeRange(*args)[source]
      +awips.DateTimeConverter.constructTimeRange(*args)[source]

      Builds a python dynamicserialize TimeRange object from the given arguments.

      @@ -196,7 +200,7 @@ arguments.

      -awips.DateTimeConverter.convertToDateTime(timeArg)[source]
      +awips.DateTimeConverter.convertToDateTime(timeArg)[source]

      Converts the given object to a python datetime object. Supports native python representations like datetime and struct_time, but also the dynamicserialize types like Date and Timestamp. Raises TypeError @@ -218,37 +222,29 @@ dynamicserialize types Date and Timestamp.

    - diff --git a/api/IDataRequest.html b/api/IDataRequest.html index 858fdf0..f58c3cc 100644 --- a/api/IDataRequest.html +++ b/api/IDataRequest.html @@ -3,9 +3,9 @@ - + - + IDataRequest (newDataRequest()) — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -149,6 +151,8 @@ + +
      @@ -162,7 +166,7 @@
    • - + View page source @@ -180,17 +184,17 @@

      IDataRequest (newDataRequest())

      -class awips.dataaccess.IDataRequest[source]
      +class awips.dataaccess.IDataRequest[source]

      An IDataRequest to be submitted to the DataAccessLayer to retrieve data.

      -__weakref__
      +__weakref__

      list of weak references to the object (if defined)

      -abstract addIdentifier(key, value)[source]
      +abstract addIdentifier(key, value)[source]

      Adds an identifier to the request. Identifiers are specific to the datatype being requested.

      @@ -202,7 +206,7 @@ value: the value of the identifier

      -abstract getDatatype()[source]
      +abstract getDatatype()[source]

      Gets the datatype of the request

      Returns:

      the datatype set on the request

      @@ -212,7 +216,7 @@ value: the value of the identifier

      -abstract getEnvelope()[source]
      +abstract getEnvelope()[source]

      Gets the envelope on the request

      Returns:

      a rectangular shapely geometry

      @@ -222,7 +226,7 @@ value: the value of the identifier

      -abstract getIdentifiers()[source]
      +abstract getIdentifiers()[source]

      Gets the identifiers on the request

      Returns:

      a dictionary of the identifiers

      @@ -232,7 +236,7 @@ value: the value of the identifier

      -abstract getLevels()[source]
      +abstract getLevels()[source]

      Gets the levels on the request

      Returns:

      a list of strings of the levels

      @@ -242,7 +246,7 @@ value: the value of the identifier

      -abstract getLocationNames()[source]
      +abstract getLocationNames()[source]

      Gets the location names on the request

      Returns:

      a list of strings of the location names

      @@ -252,7 +256,7 @@ value: the value of the identifier

      -abstract setDatatype(datatype)[source]
      +abstract setDatatype(datatype)[source]

      Sets the datatype of the request.

      Args:

      datatype: A string of the datatype, such as “grid”, “radar”, “gfe”, “obs”

      @@ -262,7 +266,7 @@ value: the value of the identifier

      -abstract setEnvelope(env)[source]
      +abstract setEnvelope(env)[source]

      Sets the envelope of the request. If supported by the datatype factory, the data returned for the request will be constrained to only the data within the envelope.

      @@ -274,7 +278,7 @@ within the envelope.

      -abstract setLevels(levels)[source]
      +abstract setLevels(levels)[source]

      Sets the levels of data to request. Not all datatypes support levels.

      Args:

      levels: a list of strings of level abbreviations to request

      @@ -284,7 +288,7 @@ within the envelope.

      -abstract setLocationNames(locationNames)[source]
      +abstract setLocationNames(locationNames)[source]

      Sets the location names of the request.

      Args:

      locationNames: a list of strings of location names to request

      @@ -294,7 +298,7 @@ within the envelope.

      -abstract setParameters(params)[source]
      +abstract setParameters(params)[source]

      Sets the parameters of data to request.

      Args:

      params: a list of strings of parameters to request

      @@ -311,37 +315,29 @@ within the envelope.

    - diff --git a/api/IFPClient.html b/api/IFPClient.html index fc43af2..ee0dae8 100644 --- a/api/IFPClient.html +++ b/api/IFPClient.html @@ -3,9 +3,9 @@ - + - + IFPClient — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -149,6 +151,8 @@ + +
    - diff --git a/api/ModelSounding.html b/api/ModelSounding.html index a94bf9c..b0a4b22 100644 --- a/api/ModelSounding.html +++ b/api/ModelSounding.html @@ -3,9 +3,9 @@ - + - + ModelSounding — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -149,6 +151,8 @@ + +
      @@ -162,7 +166,7 @@
    • - + View page source @@ -180,7 +184,7 @@

      ModelSounding

      -awips.dataaccess.ModelSounding.changeEDEXHost(host)[source]
      +awips.dataaccess.ModelSounding.changeEDEXHost(host)[source]

      Changes the EDEX host the Data Access Framework is communicating with.

      Args:

      host: the EDEX host to connect to

      @@ -190,7 +194,7 @@
      -awips.dataaccess.ModelSounding.getSounding(modelName, weatherElements, levels, samplePoint, timeRange=None)[source]
      +awips.dataaccess.ModelSounding.getSounding(modelName, weatherElements, levels, samplePoint, timeRange=None)[source]

      Performs a series of Data Access Framework requests to retrieve a sounding object based on the specified request parameters.

      @@ -215,37 +219,29 @@ data is available for the given request parameters, None is returned.

    - diff --git a/api/PyData.html b/api/PyData.html index 634020a..9961510 100644 --- a/api/PyData.html +++ b/api/PyData.html @@ -3,9 +3,9 @@ - + - + PyData — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -149,6 +151,8 @@ + +
      @@ -162,7 +166,7 @@
    • - + View page source @@ -180,10 +184,10 @@

      PyData

      -class awips.dataaccess.PyData.PyData(dataRecord)[source]
      +class awips.dataaccess.PyData.PyData(dataRecord)[source]
      -getAttribute(key)[source]
      +getAttribute(key)[source]

      Gets an attribute of the data.

      Args:

      key: the key of the attribute

      @@ -195,7 +199,7 @@
      -getAttributes()[source]
      +getAttributes()[source]

      Gets the valid attributes for the data.

      Returns:

      a list of strings of the attribute names

      @@ -205,7 +209,7 @@
      -getDataTime()[source]
      +getDataTime()[source]

      Gets the data time of the data.

      Returns:

      the data time of the data, or None if no time is associated

      @@ -215,7 +219,7 @@
      -getLevel()[source]
      +getLevel()[source]

      Gets the level of the data.

      Returns:

      the level of the data, or None if no level is associated

      @@ -225,7 +229,7 @@
      -getLocationName()[source]
      +getLocationName()[source]

      Gets the location name of the data.

      Returns:

      the location name of the data, or None if no location name is @@ -243,37 +247,29 @@ associated

    - diff --git a/api/PyGeometryData.html b/api/PyGeometryData.html index fd7b7d0..980b3e7 100644 --- a/api/PyGeometryData.html +++ b/api/PyGeometryData.html @@ -3,9 +3,9 @@ - + - + PyGeometryData — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -149,6 +151,8 @@ + +
      @@ -162,7 +166,7 @@
    • - + View page source @@ -180,10 +184,10 @@

      PyGeometryData

      -class awips.dataaccess.PyGeometryData.PyGeometryData(geoDataRecord, geometry)[source]
      +class awips.dataaccess.PyGeometryData.PyGeometryData(geoDataRecord, geometry)[source]
      -getGeometry()[source]
      +getGeometry()[source]

      Gets the geometry of the data.

      Returns:

      a shapely geometry

      @@ -193,7 +197,7 @@
      -getNumber(param)[source]
      +getNumber(param)[source]

      Gets the number value of the specified param.

      Args:

      param: the string name of the param

      @@ -205,7 +209,7 @@
      -getParameters()[source]
      +getParameters()[source]

      Gets the parameters of the data.

      Returns:

      a list of strings of the parameter names

      @@ -215,7 +219,7 @@
      -getString(param)[source]
      +getString(param)[source]

      Gets the string value of the specified param.

      Args:

      param: the string name of the param

      @@ -227,7 +231,7 @@
      -getType(param)[source]
      +getType(param)[source]

      Gets the type of the param.

      Args:

      param: the string name of the param

      @@ -240,7 +244,7 @@
      -getUnit(param)[source]
      +getUnit(param)[source]

      Gets the unit of the specified param.

      Args:

      param: the string name of the param

      @@ -259,37 +263,29 @@
    - diff --git a/api/PyGridData.html b/api/PyGridData.html index e1507e6..45f20f4 100644 --- a/api/PyGridData.html +++ b/api/PyGridData.html @@ -3,9 +3,9 @@ - + - + PyGridData — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -149,6 +151,8 @@ + +
      @@ -162,7 +166,7 @@
    • - + View page source @@ -180,10 +184,10 @@

      PyGridData

      -class awips.dataaccess.PyGridData.PyGridData(gridDataRecord, nx, ny, latLonGrid=None, latLonDelegate=None)[source]
      +class awips.dataaccess.PyGridData.PyGridData(gridDataRecord, nx, ny, latLonGrid=None, latLonDelegate=None)[source]
      -getLatLonCoords()[source]
      +getLatLonCoords()[source]

      Gets the lat/lon coordinates of the grid data.

      Returns:

      a tuple where the first element is a numpy array of lons, and the @@ -194,7 +198,7 @@ second element is a numpy array of lats

      -getParameter()[source]
      +getParameter()[source]

      Gets the parameter of the data.

      Returns:

      the parameter of the data

      @@ -204,7 +208,7 @@ second element is a numpy array of lats

      -getRawData(unit=None)[source]
      +getRawData(unit=None)[source]

      Gets the grid data as a numpy array.

      Returns:

      a numpy array of the data

      @@ -214,7 +218,7 @@ second element is a numpy array of lats

      -getUnit()[source]
      +getUnit()[source]

      Gets the unit of the data.

      Returns:

      the string abbreviation of the unit, or None if no unit is associated

      @@ -231,37 +235,29 @@ second element is a numpy array of lats

    - diff --git a/api/RadarCommon.html b/api/RadarCommon.html index 7bd5049..2f08700 100644 --- a/api/RadarCommon.html +++ b/api/RadarCommon.html @@ -3,9 +3,9 @@ - + - + RadarCommon — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -149,6 +151,8 @@ + +
      @@ -162,7 +166,7 @@
    • - + View page source @@ -180,22 +184,22 @@

      RadarCommon

      -awips.RadarCommon.encode_dep_vals(depVals)[source]
      +awips.RadarCommon.encode_dep_vals(depVals)[source]
      -awips.RadarCommon.encode_radial(azVals)[source]
      +awips.RadarCommon.encode_radial(azVals)[source]
      -awips.RadarCommon.encode_thresh_vals(threshVals)[source]
      +awips.RadarCommon.encode_thresh_vals(threshVals)[source]
      -awips.RadarCommon.get_data_type(azdat)[source]
      +awips.RadarCommon.get_data_type(azdat)[source]

      Get the radar file type (radial or raster).

      Args:

      azdat: Boolean.

      @@ -207,7 +211,7 @@
      -awips.RadarCommon.get_datetime_str(record)[source]
      +awips.RadarCommon.get_datetime_str(record)[source]

      Get the datetime string for a record.

      Args:

      record: the record to get data for.

      @@ -219,12 +223,12 @@
      -awips.RadarCommon.get_hdf5_data(idra)[source]
      +awips.RadarCommon.get_hdf5_data(idra)[source]
      -awips.RadarCommon.get_header(record, headerFormat, xLen, yLen, azdat, description)[source]
      +awips.RadarCommon.get_header(record, headerFormat, xLen, yLen, azdat, description)[source]
    @@ -234,37 +238,29 @@ - diff --git a/api/ThriftClient.html b/api/ThriftClient.html index 2560949..9ac353e 100644 --- a/api/ThriftClient.html +++ b/api/ThriftClient.html @@ -3,9 +3,9 @@ - + - + ThriftClient — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -149,6 +151,8 @@ + +
    @@ -200,37 +204,29 @@ - diff --git a/api/ThriftClientRouter.html b/api/ThriftClientRouter.html index 1917b60..e8fec9a 100644 --- a/api/ThriftClientRouter.html +++ b/api/ThriftClientRouter.html @@ -3,9 +3,9 @@ - + - + ThriftClientRouter — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -149,6 +151,8 @@ + +
      @@ -162,7 +166,7 @@
    • - + View page source @@ -180,75 +184,75 @@

      ThriftClientRouter

      -class awips.dataaccess.ThriftClientRouter.LazyGridLatLon(client, nx, ny, envelope, crsWkt)[source]
      +class awips.dataaccess.ThriftClientRouter.LazyGridLatLon(client, nx, ny, envelope, crsWkt)[source]
      -class awips.dataaccess.ThriftClientRouter.ThriftClientRouter(host='localhost')[source]
      +class awips.dataaccess.ThriftClientRouter.ThriftClientRouter(host='localhost')[source]
      -getAvailableLevels(request)[source]
      +getAvailableLevels(request)[source]
      -getAvailableLocationNames(request)[source]
      +getAvailableLocationNames(request)[source]
      -getAvailableParameters(request)[source]
      +getAvailableParameters(request)[source]
      -getAvailableTimes(request, refTimeOnly)[source]
      +getAvailableTimes(request, refTimeOnly)[source]
      -getGeometryData(request, times)[source]
      +getGeometryData(request, times)[source]
      -getGridData(request, times)[source]
      +getGridData(request, times)[source]
      -getIdentifierValues(request, identifierKey)[source]
      +getIdentifierValues(request, identifierKey)[source]
      -getNotificationFilter(request)[source]
      +getNotificationFilter(request)[source]
      -getOptionalIdentifiers(request)[source]
      +getOptionalIdentifiers(request)[source]
      -getRequiredIdentifiers(request)[source]
      +getRequiredIdentifiers(request)[source]
      -getSupportedDatatypes()[source]
      +getSupportedDatatypes()[source]
      -newDataRequest(datatype, parameters=[], levels=[], locationNames=[], envelope=None, **kwargs)[source]
      +newDataRequest(datatype, parameters=[], levels=[], locationNames=[], envelope=None, **kwargs)[source]
      -setLazyLoadGridLatLon(lazyLoadGridLatLon)[source]
      +setLazyLoadGridLatLon(lazyLoadGridLatLon)[source]
      @@ -260,37 +264,29 @@
    - diff --git a/api/TimeUtil.html b/api/TimeUtil.html index f8c45f5..bf89ee9 100644 --- a/api/TimeUtil.html +++ b/api/TimeUtil.html @@ -3,9 +3,9 @@ - + - + TimeUtil — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -149,6 +151,8 @@ + +
    @@ -195,37 +199,29 @@ - diff --git a/api/index.html b/api/index.html index 884a9f9..0f979a8 100644 --- a/api/index.html +++ b/api/index.html @@ -3,9 +3,9 @@ - + - + API Documentation — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -149,6 +151,8 @@ + + - diff --git a/datatypes.html b/datatypes.html index ca431ea..5bfacb1 100644 --- a/datatypes.html +++ b/datatypes.html @@ -3,9 +3,9 @@ - + - + Available Data Types — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -141,6 +143,8 @@ + + - diff --git a/dev.html b/dev.html index 801a379..46f51fa 100644 --- a/dev.html +++ b/dev.html @@ -3,9 +3,9 @@ - + - + Development Guide — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -149,6 +151,8 @@ + +
    - diff --git a/examples/generated/AWIPS_Grids_and_Cartopy.html b/examples/generated/AWIPS_Grids_and_Cartopy.html index c035342..c5f2a83 100644 --- a/examples/generated/AWIPS_Grids_and_Cartopy.html +++ b/examples/generated/AWIPS_Grids_and_Cartopy.html @@ -3,9 +3,9 @@ - + - + AWIPS Grids and Cartopy — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -154,6 +156,8 @@ + +
    - diff --git a/examples/generated/Colored_Surface_Temperature_Plot.html b/examples/generated/Colored_Surface_Temperature_Plot.html index 61b3cb4..e8bb4e3 100644 --- a/examples/generated/Colored_Surface_Temperature_Plot.html +++ b/examples/generated/Colored_Surface_Temperature_Plot.html @@ -3,9 +3,9 @@ - + - + Colored Surface Temperature Plot — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -150,6 +152,8 @@ + +
    - diff --git a/examples/generated/Forecast_Model_Vertical_Sounding.html b/examples/generated/Forecast_Model_Vertical_Sounding.html index 1264a34..10b1c43 100644 --- a/examples/generated/Forecast_Model_Vertical_Sounding.html +++ b/examples/generated/Forecast_Model_Vertical_Sounding.html @@ -3,9 +3,9 @@ - + - + Forecast Model Vertical Sounding — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -154,6 +156,8 @@ + +
    - diff --git a/examples/generated/GOES_Geostationary_Lightning_Mapper.html b/examples/generated/GOES_Geostationary_Lightning_Mapper.html index 328d76b..718a5b1 100644 --- a/examples/generated/GOES_Geostationary_Lightning_Mapper.html +++ b/examples/generated/GOES_Geostationary_Lightning_Mapper.html @@ -3,9 +3,9 @@ - + - + GOES Geostationary Lightning Mapper — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -153,6 +155,8 @@ + +
    - diff --git a/examples/generated/Grid_Levels_and_Parameters.html b/examples/generated/Grid_Levels_and_Parameters.html index 12ece3d..a517c06 100644 --- a/examples/generated/Grid_Levels_and_Parameters.html +++ b/examples/generated/Grid_Levels_and_Parameters.html @@ -3,9 +3,9 @@ - + - + Grid Levels and Parameters — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -159,6 +161,8 @@ + +
      @@ -172,7 +176,7 @@
    • - + View page source @@ -189,9 +193,9 @@

      Grid Levels and Parameters

      Notebook -This example covers the callable methods of the Python AWIPS DAF when -working with gridded data. We start with a connection to an EDEX server, -then query data types, then grid names, parameters, levels, and other +This example covers the callable methods of python-awips when working +with gridded data. We start with a connection to an EDEX server, then +query data types, then grid names, parameters, levels, and other information. Finally the gridded data is plotted for its domain using Matplotlib and Cartopy.

      @@ -864,8 +868,8 @@ available parameters with getAvailableParameters()

    • 0.0SFC is the Surface level

    • FHAG stands for Fixed Height Above Ground (in meters)

    • NTAT stands for Nominal Top of the ATmosphere

    • -
    • BL stands for Boundary Layer, where 0.0_30.0BL reads as -0-30 mb above ground level

    • +
    • BL stands for Boundary Layer, where 0.0_30.0BL reads as 0-30 +mb above ground level

    • TROP is the Tropopause level

    request.setLevels()

    @@ -996,37 +1000,29 @@ it’s time to request the data array from EDEX.

    - diff --git a/examples/generated/METAR_Station_Plot_with_MetPy.html b/examples/generated/METAR_Station_Plot_with_MetPy.html index 413f851..60988f3 100644 --- a/examples/generated/METAR_Station_Plot_with_MetPy.html +++ b/examples/generated/METAR_Station_Plot_with_MetPy.html @@ -3,9 +3,9 @@ - + - + METAR Station Plot with MetPy — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -153,6 +155,8 @@ + +
    - diff --git a/examples/generated/Map_Resources_and_Topography.html b/examples/generated/Map_Resources_and_Topography.html index d4cb1e8..e701df8 100644 --- a/examples/generated/Map_Resources_and_Topography.html +++ b/examples/generated/Map_Resources_and_Topography.html @@ -3,9 +3,9 @@ - + - + Map Resources and Topography — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -161,6 +163,8 @@ + +
    - diff --git a/examples/generated/Model_Sounding_Data.html b/examples/generated/Model_Sounding_Data.html index 052b524..4e7e655 100644 --- a/examples/generated/Model_Sounding_Data.html +++ b/examples/generated/Model_Sounding_Data.html @@ -3,9 +3,9 @@ - + - + Model Sounding Data — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -156,6 +158,8 @@ + +
    - diff --git a/examples/generated/NEXRAD_Level3_Radar.html b/examples/generated/NEXRAD_Level3_Radar.html index c3c5811..c4477a8 100644 --- a/examples/generated/NEXRAD_Level3_Radar.html +++ b/examples/generated/NEXRAD_Level3_Radar.html @@ -3,9 +3,9 @@ - + - + NEXRAD Level3 Radar — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -150,6 +152,8 @@ + + - diff --git a/examples/generated/Precip_Accumulation-Region_Of_Interest.html b/examples/generated/Precip_Accumulation-Region_Of_Interest.html index 730eb66..7ed5b56 100644 --- a/examples/generated/Precip_Accumulation-Region_Of_Interest.html +++ b/examples/generated/Precip_Accumulation-Region_Of_Interest.html @@ -3,9 +3,9 @@ - + - + Precip Accumulation-Region Of Interest — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -150,6 +152,8 @@ + +
    - diff --git a/examples/generated/Regional_Surface_Obs_Plot.html b/examples/generated/Regional_Surface_Obs_Plot.html index 066b601..0fbc6a1 100644 --- a/examples/generated/Regional_Surface_Obs_Plot.html +++ b/examples/generated/Regional_Surface_Obs_Plot.html @@ -3,9 +3,9 @@ - + - + Regional Surface Obs Plot — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -155,6 +157,8 @@ + +
    - diff --git a/examples/generated/Satellite_Imagery.html b/examples/generated/Satellite_Imagery.html index 887f765..8f1872f 100644 --- a/examples/generated/Satellite_Imagery.html +++ b/examples/generated/Satellite_Imagery.html @@ -3,9 +3,9 @@ - + - + Satellite Imagery — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -156,6 +158,8 @@ + +
    - diff --git a/examples/generated/Upper_Air_BUFR_Soundings.html b/examples/generated/Upper_Air_BUFR_Soundings.html index 1eff288..0f3c5cb 100644 --- a/examples/generated/Upper_Air_BUFR_Soundings.html +++ b/examples/generated/Upper_Air_BUFR_Soundings.html @@ -3,9 +3,9 @@ - + - + Upper Air BUFR Soundings — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -150,6 +152,8 @@ + +
    - diff --git a/examples/generated/Watch_and_Warning_Polygons.html b/examples/generated/Watch_and_Warning_Polygons.html index 802b16f..f89517c 100644 --- a/examples/generated/Watch_and_Warning_Polygons.html +++ b/examples/generated/Watch_and_Warning_Polygons.html @@ -3,9 +3,9 @@ - + - + Watch and Warning Polygons — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -150,6 +152,8 @@ + +
    - diff --git a/examples/index.html b/examples/index.html index 392fc9c..9b1d3ff 100644 --- a/examples/index.html +++ b/examples/index.html @@ -3,9 +3,9 @@ - + - + Data Plotting Examples — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -150,6 +152,8 @@ + + - diff --git a/genindex.html b/genindex.html index 1ed6cb2..4b94010 100644 --- a/genindex.html +++ b/genindex.html @@ -3,9 +3,9 @@ - + - + Index — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -50,7 +52,7 @@ - python-awips + python-awips @@ -132,6 +134,8 @@ + +
      @@ -143,7 +147,7 @@
    • - +
    • @@ -589,28 +593,25 @@
    - diff --git a/gridparms.html b/gridparms.html index d003c22..c040fda 100644 --- a/gridparms.html +++ b/gridparms.html @@ -3,9 +3,9 @@ - + - + Grid Parameters — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -52,7 +54,7 @@ - python-awips + python-awips @@ -134,6 +136,8 @@ + + - diff --git a/index.html b/index.html index 0bbb96c..a014907 100644 --- a/index.html +++ b/index.html @@ -3,9 +3,9 @@ - + - + Python AWIPS Data Access Framework — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -51,7 +53,7 @@ - python-awips + python-awips @@ -133,6 +135,8 @@ + +
    diff --git a/objects.inv b/objects.inv index 92e507b..05c539f 100644 Binary files a/objects.inv and b/objects.inv differ diff --git a/py-modindex.html b/py-modindex.html index 3ce634e..55ef68b 100644 --- a/py-modindex.html +++ b/py-modindex.html @@ -3,9 +3,9 @@ - + - + Python Module Index — python-awips documentation @@ -16,10 +16,13 @@ + + + @@ -29,7 +32,6 @@ - @@ -53,7 +55,7 @@ - python-awips + python-awips @@ -135,6 +137,8 @@ + +
      @@ -240,28 +244,25 @@
    - diff --git a/search.html b/search.html index 4a50559..0155b98 100644 --- a/search.html +++ b/search.html @@ -3,9 +3,9 @@ - + - + Search — python-awips documentation @@ -16,10 +16,13 @@ + + +