diff --git a/_images/3dcore.png b/_images/3dcore.png new file mode 100644 index 0000000000..69fed4a079 Binary files /dev/null and b/_images/3dcore.png differ diff --git a/_images/3dgeomplot.png b/_images/3dgeomplot.png new file mode 100644 index 0000000000..5c16d8d831 Binary files /dev/null and b/_images/3dgeomplot.png differ diff --git a/_images/atr.jpg b/_images/atr.jpg new file mode 100644 index 0000000000..c19d10e988 Binary files /dev/null and b/_images/atr.jpg differ diff --git a/_images/atr.png b/_images/atr.png new file mode 100644 index 0000000000..e1f440584b Binary files /dev/null and b/_images/atr.png differ diff --git a/_images/fluxplot.png b/_images/fluxplot.png new file mode 100644 index 0000000000..9c13ff33f3 Binary files /dev/null and b/_images/fluxplot.png differ diff --git a/_images/plotmeshtally.png b/_images/plotmeshtally.png new file mode 100644 index 0000000000..d874b4906a Binary files /dev/null and b/_images/plotmeshtally.png differ diff --git a/_sources/devguide/index.txt b/_sources/devguide/index.txt index 98df54b17e..1eb7436d03 100644 --- a/_sources/devguide/index.txt +++ b/_sources/devguide/index.txt @@ -17,3 +17,4 @@ as debugging. workflow xml-fortran statepoint + voxel diff --git a/_sources/devguide/voxel.txt b/_sources/devguide/voxel.txt new file mode 100644 index 0000000000..8ce0c6ee87 --- /dev/null +++ b/_sources/devguide/voxel.txt @@ -0,0 +1,54 @@ +.. _devguide_voxel: + +===================================== +Voxel Plot Binary File Specifications +===================================== + +---------- +Revision 1 +---------- + +**integer(4) n_voxels_x** + + Number of voxels in the x direction + +**integer(4) n_voxels_y** + + Number of voxels in the y direction + +**integer(4) n_voxels_z** + + Number of voxels in the z direction + +**real(8) width_voxel_x** + + Width of voxels in the x direction + +**real(8) width_voxel_y** + + Width of voxels in the y direction + +**real(8) width_voxel_z** + + Width of voxels in the z direction + +**real(8) lower_left_x** + + Lower left x point of the voxel grid + +**real(8) lower_left_y** + + Lower left y point of the voxel grid + +**real(8) lower_left_z** + + Lower left z point of the voxel grid + +*do x = 1, n_voxels_x* + *do y = 1, n_voxels_y* + *do z = 1, n_voxels_z* + + **integer(4) id** + + Cell or material id number at this voxel center. Set to -1 when + cell not_found. diff --git a/_sources/usersguide/beginners.txt b/_sources/usersguide/beginners.txt index 9a791ac521..69f44c2ca1 100644 --- a/_sources/usersguide/beginners.txt +++ b/_sources/usersguide/beginners.txt @@ -109,7 +109,9 @@ should be comfortable working in a command line environment. There are many resources online for learning command line environments. If you are using Linux or Mac OS X (also Unix-derived), `this tutorial `_ will help you get acquainted with -commonly-used commands. +commonly-used commands. It is also helpful to be familiar with `Python +`_, as most of the post-processing utilities provided +with OpenMC rely on it for data manipulation and results visualization. OpenMC uses a version control software called `git`_ to keep track of changes to the code, document bugs and issues, and other development tasks. While you don't diff --git a/_sources/usersguide/index.txt b/_sources/usersguide/index.txt index a3b1583653..675ed4081a 100644 --- a/_sources/usersguide/index.txt +++ b/_sources/usersguide/index.txt @@ -14,4 +14,5 @@ essential aspects of using OpenMC to perform neutronic simulations. beginners install input + processing troubleshoot diff --git a/_sources/usersguide/input.txt b/_sources/usersguide/input.txt index af8d94e71d..a6efb6e723 100644 --- a/_sources/usersguide/input.txt +++ b/_sources/usersguide/input.txt @@ -941,19 +941,27 @@ tallies. This element should be followed by "true" or "false". *Default*: false +.. _usersguide_plotting: + -------------------------------------------- Geometry Plotting Specification -- plots.xml -------------------------------------------- -A basic 2D plotting capability is available in OpenMC by creating a plots.xml +Basic plotting capabilities are available in OpenMC by creating a plots.xml file and subsequently running with the command-line flag ``-plot``. The root -element of the plots.xml is simply ```` and any number output figures can -be defined with ```` sub-elements. +element of the plots.xml is simply ```` and any number output plots can +be defined with ```` sub-elements. Two plot types are currently +implemented in openMC: + +* ``slice`` 2D pixel plot along one of the major axes. Produces a PPM image file. +* ``voxel`` 3D voxel data dump. Produces a binary file containing voxel xyz position and cell or material id. + ```` Element ------------------ -Each plot must contain a combination of the following attributes or sub-elements: +Each plot must contain a combination of the following attributes or +sub-elements: :id: The unique ``id`` of the plot. @@ -967,7 +975,9 @@ Each plot must contain a combination of the following attributes or sub-elements :color: Keyword for plot coloring. This can only be either ``cell`` or ``mat``, - which colors regions by cells and materials, respectively. + which colors regions by cells and materials, respectively. For voxel plots, + this determines which id (cell or material) is associated with each + position. *Default*: ``cell`` @@ -985,60 +995,75 @@ Each plot must contain a combination of the following attributes or sub-elements *Default*: None - Required entry :type: - Keyword for type of plot to be produced. Currently only ``slice`` plots are - implemented, which create 2D pixel maps saved in the PPM file format. PPM - files can be displayed in most viewers (e.g. the default Gnome viewer, - IrfanView, etc.). + Keyword for type of plot to be produced. Currently only "slice" and + "voxel" plots are implemented. The "slice" plot type creates 2D pixel + maps saved in the PPM file format. PPM files can be displayed in most + viewers (e.g. the default Gnome viewer, IrfanView, etc.). The "voxel" + plot type produces a binary datafile containing voxel grid positioning and + the cell or material (specified by the ``color`` tag) at the center of each + voxel. These datafiles can be processed into 3D SILO files using the + ``voxel.py`` utility provided with the OpenMC source, and subsequently + viewed with a 3D viewer such as VISIT or Paraview. See the + :ref:`devguide_voxel` for information about the datafile structure. .. note:: Since the PPM format is saved without any kind of compression, the resulting file sizes can be quite large. Saving the image in the PNG format can often times reduce the file size by orders of - magnitude without any loss of image quality. + magnitude without any loss of image quality. Likewise, + high-resolution voxel files produced by OpenMC can be quite large, + but the equivalent SILO files will by significantly smaller. *Default*: "slice" -```` elements of ``type`` "slice" also contain the following attributes or -sub-elements: +```` elements of ``type`` "slice" and "voxel" must contain the ``pixels`` +attribute or sub-element: + + :pixels: + Specifies the number of pixes or voxels to be used along each of the basis + directions for "slice" and "voxel" plots, respectively. Should be two or + three integers separated by spaces. + + .. warning:: The ``pixels`` input determines the output file size. For the + PPM format, 10 million pixels will result in a file just under + 30 MB in size. A 10 million voxel binary file will be around + 40 MB. + + .. warning:: If the aspect ratio defined in ``pixels`` does not match the + aspect ratio defined in ``width`` the plot may appear stretched + or squeezed. + + .. warning:: Geometry features along a basis direction smaller than + ``width``/``pixels`` along that basis direction may not appear + in the plot. + + *Default*: None - Required entry for "slice" and "voxel" plots + +```` elements of ``type`` "slice" can also contain the following +attributes or sub-elements. These are not used in "voxel" plots: :basis: - Keyword specifying the plane of the plot for ``slice`` type plots. Can be + Keyword specifying the plane of the plot for "slice" type plots. Can be one of: "xy", "xz", "yz". *Default*: "xy" - :pixels: - Specifies the number of pixes to be used along each of the basis directions - for "slice" plots. Should be two integers separated by spaces. - - .. warning:: The ``pixels`` input determines the output file size. For the PPM - format, 10 million pixels will result in a file just under 30 MB in - size. - - .. warning:: If the aspect ratio defined in ``pixels`` does not match the aspect - ratio defined in ``width`` the plot may appear stretched or squeezed. - - .. warning:: Geometry features along a basis direction smaller than ``width``/``pixels`` - along that basis direction may not appear in the plot. - - *Default*: None - Required entry for "slice" plots - :background: - Specifies the RGB color of the regions where no OpenMC cell can be found. Should - be three integers separated by spaces. + Specifies the RGB color of the regions where no OpenMC cell can be found. + Should be three integers separated by spaces. *Default*: 0 0 0 (white) :col_spec: - Any number of this optional tag may be included in each ```` element, which can - override the default random colors for cells or materials. Each ``col_spec`` - element must contain ``id`` and ``rgb`` sub-elements. + Any number of this optional tag may be included in each ```` element, + which can override the default random colors for cells or materials. Each + ``col_spec`` element must contain ``id`` and ``rgb`` sub-elements. :id: Specifies the cell or material unique id for the color specification. :rgb: - Specifies the custom color for the cell or material. Should be 3 integers separated - by spaces. + Specifies the custom color for the cell or material. Should be 3 integers + separated by spaces. As an example, if your plot is colored by material and you want material 23 to be blue, the corresponding ``col_spec`` element would look like: @@ -1051,17 +1076,18 @@ sub-elements: :mask: The special ``mask`` sub-element allows for the selective plotting of *only* - user-specified cells or materials. Only one ``mask`` element is allowed per ``plot`` - element, and it must contain as attributes or sub-elements a background masking color and - a list of cells or materials to plot: + user-specified cells or materials. Only one ``mask`` element is allowed per + ``plot`` element, and it must contain as attributes or sub-elements a + background masking color and a list of cells or materials to plot: :components: - List of unique ``id`` numbers of the cells or materials to plot. Should be any number - of integers separated by spaces. + List of unique ``id`` numbers of the cells or materials to plot. Should be + any number of integers separated by spaces. :background: - Color to apply to all cells or materials not in the ``components`` list of cells or - materials to plot. This overrides any ``col_spec`` color specifications. + Color to apply to all cells or materials not in the ``components`` list of + cells or materials to plot. This overrides any ``col_spec`` color + specifications. *Default*: None diff --git a/_sources/usersguide/processing.txt b/_sources/usersguide/processing.txt new file mode 100644 index 0000000000..c56a61e61e --- /dev/null +++ b/_sources/usersguide/processing.txt @@ -0,0 +1,360 @@ +.. _usersguide_processing: + +================================= +Data Processing and Visualization +================================= + +This section is intended to explain in detail the recommended procedures for +carrying out common tasks with OpenMC. While several utilities of varying +complexity are provided to help automate the process, in many cases it will be +extremely beneficial to do some coding in Python to quickly obtain results. In +these cases, and for many of the provided utilities, it is necessary for your +Python installation to contain: + +* [1]_ `Numpy `_ +* [1]_ `Scipy `_ +* [2]_ `h5py `_ +* [3]_ `Matplotlib `_ +* [3]_ `Silomesh `_ +* [3]_ `VTK `_ +* [4]_ `PyQt `_ + +Most of these are easily obtainable in Ubuntu through the package manager, or +are easily installed with setuptools. + +.. [1] Required for tally data extraction from statepoints with statepoint.py +.. [2] Required only if reading HDF5 statepoint files. +.. [3] Optional for plotting utilities +.. [4] Optional for interactive GUIs + +---------------------- +Geometry Visualization +---------------------- + +Geometry plotting is carried out by creating a plots.xml, specifying plots, and +running OpenMC with the -plot or -p command-line option (See +:ref:`usersguide_plotting`). + +Plotting in 2D +-------------- + +.. image:: ../../img/atr.png + :height: 200px + +After running OpenMC to obtain PPM files, images should be saved to another +format before using them elsewhere. This cuts down the size of the file by +orders of magnitude. Most image viewers and editors that can view PPM images +can also save to other formats (e.g. `Gimp `_, `IrfanView +`_, etc.). However, more likey the user will want to +convert to another format on the command line. This is easily accomplished with +the ``convert`` command available on most linux distributions as part of the +`ImageMagick `_ package. (On +Ubuntu: ``sudo apt-get install imagemagick``). Images are then converted like: + +.. code-block:: sh + + convert plot.ppm plot.png + +Plotting in 3D +-------------- + +.. image:: ../../img/3dgeomplot.png + :height: 200px + +The binary VOXEL files output by OpenMC can not be viewed directly by any +existing viewers. In order to view them, they must be converted into a standard +mesh format that can be viewed in ParaView, Visit, etc. The provided utility +voxel.py accomplishes this for SILO: + +.. code-block:: sh + + /src/utils/voxel.py myplot.voxel -o output.silo + +and VTK file formats: + +.. code-block:: sh + + /src/utils/myplot.voxel --vtk -o output.vti + +To use this utility you need either + +* `Silomesh `_ + +or + +* `VTK `_ with python bindings - On Ubuntu, these are easily obtained with ``sudo apt-get install python-vtk`` + +Users can process the binary into any other format if desired by following the +example of voxel.py. For the binary file structure, see :ref:`devguide_voxel`. + +.. note:: 3D voxel plotting can be very computer intensive for the viewing + program (Visit, Paraview, etc.) if the number of voxels is large + (>10million or so). Thus if you want an accurate picture that + renders smoothly, consider using only one voxel in a certain + direction. For instance, the 3D pin lattice figure above was generated + with a 500x500x1 voxel mesh, which allows for resolution of the + cylinders without wasting too many voxels on the axial dimension. + + +------------------- +Tally Visualization +------------------- + +Tally results are saved in both a text file (tallies.out) as well as a binary +statepoint file. While the tallies.out file may be fine for simple tallies, in +many cases the user requires more information about the tally or the run, or +has to deal with a large number of result values (e.g. for mesh tallies). In +these cases, extracting data from the statepoint file via Python scripting is +the preferred method of data analysis and visualization. + +Data Extraction +--------------- + +A great deal of information is available in statepoint files (See +:ref:`devguide_statepoint`), most of which is easily extracted by the provided +utility statepoint.py. This utility provides a Python class to load statepoints +and extract data - it is used in many of the provided plotting utilities, and +can be used in user-created scripts to carry out manipulations of the data. To +read tallies using this utility, make sure statepoint.py is in your PYTHONPATH, +and then import the class, instantiate it, and call read_results: + +.. code-block:: python + + from statepoint import StatePoint + sp = StatePoint('statepoint.100.binary') + sp.read_results() + +At this point the user can extract entire scores from tallies into a data +dictionary containing numpy arrays: + +.. code-block:: python + + tallyid = 1 + score = 'flux' + data = sp.extract_results(tallyid, score) + means = data['means'] + print data.keys() + +The results from this function contain all filter bins (all mesh points, all +energy groups, etc.), which can be reshaped with the bin ordering also contained +in the output dictionary. This is the best choice of output for easily +integrating ranges of data. + +Alternatively the user can extract specific values for a single score/filter +combination: + +.. code-block:: python + + tallyid = 1 + score = 'flux' + filters = [('mesh', (1, 1, 5)), ('energyin', 0)] + value, error = sp.get_value(tallyid, filters, score) + +In the future more documentaion may become available here for statepoint.py and +the data extraction functions of StatePoint objects. However, for now it is up +to the user to explore the classes in statepoint.py to discover what data is +available in StatePoint objects (we highly recommend interactively exploring +with `IPython `_). Many exmaples can be found by looking +through the other utilies that use statepoint.py, and a few common visualization +tasks will be described here in the following sections. + +Plotting in 2D +-------------- + +.. image:: ../../img/plotmeshtally.png + :height: 200px + +For simple viewing of 2D slices of a mesh plot, the utility plot_mesh_tally.py +is provided. This utility provides an interactive GUI to explore and plot +mesh tallies for any scores and filter bins. It requires statepoint.py, as well +as `PyQt `_. + +.. image:: ../../img/fluxplot.png + :height: 200px + +Alternatively, the user can write their own Python script to manipulate the data +appropriately. Consider a run where the first tally contains a 105x105x1 mesh +over a small core, with a flux score and two energyin filter bins. To explicitly +extract the data and create a plot with gnuplot, the following script can be +used. The script operates in several steps for clarity, and is not necessarily +the most efficient way to extract data from large mesh tallies. This creates the +two heatmaps in the previous figure. + +.. code-block:: python + + #!/usr/bin/env python + + import os + + import statepoint + + # load and parse the statepoint file + sp = statepoint.StatePoint('statepoint.300.binary') + sp.read_results() + + tallyid = 0 # This is tally 1 + score = 0 # This corresponds to flux (see tally.scores) + + # get mesh dimensions + meshid = sp.tallies[tallyid].filters['mesh'].bins[0] + for i,m in enumerate(sp.meshes): + if m.id == meshid: + mesh = m + break + nx,ny,nz = mesh.dimension + + # loop through mesh and extract values to python dictionaries + thermal = {} + fast = {} + for x in range(1,nx+1): + for y in range(1,ny+1): + for z in range(1,nz+1): + val,err = sp.get_value(tallyid, + [('mesh',(x,y,z)),('energyin',0)], + score) + thermal[(x,y,z)] = val + val,err = sp.get_value(tallyid, + [('mesh',(x,y,z)),('energyin',1)], + score) + fast[(x,y,z)] = val + + # sum up the axial values and write datafile for gnuplot + with open('meshdata.dat','w') as fh: + for x in range(1,nx+1): + for y in range(1,ny+1): + thermalval = 0. + fastval = 0. + for z in range(1,nz+1): + thermalval += thermal[(x,y,z)] + fastval += fast[(x,y,z)] + fh.write("{} {} {} {}\n".format(x,y,thermalval,fastval)) + + # write gnuplot file + with open('tmp.gnuplot','w') as fh: + fh.write(r"""set terminal png size 1000 400 + set output 'fluxplot.png' + set nokey + set autoscale fix + set multiplot layout 1,2 title "Pin Mesh Flux Tally" + set title "Thermal" + plot 'meshdata.dat' using 1:2:3 with image + set title "Fast" + plot 'meshdata.dat' using 1:2:4 with image + """) + + # make plot + os.system("gnuplot < tmp.gnuplot") + +Plotting in 3D +-------------- + +.. image:: ../../img/3dcore.png + :height: 200px + +As with 3D plots of the geometry, meshtally data needs to be put into a standard +format for viewing. The utility statepoint_3d.py is provided to accomplish this +for both VTK and SILO. By default statepoint_3d.py processes a statepoint into a +3D file with all mesh tallies and filter/score combinations, + +.. code-block:: sh + + /src/utils/statepoint_3d.py -o output.silo + /src/utils/statepoint_3d.py --vtk -o output.vtm + +but it also provides several command-line options to selectively process only +certain data arrays in order to keep file sizes down. + +.. code-block:: sh + + /src/utils/statepoint_3d.py -tallies 2,4 --scores 4.1,4.3 -o output.silo + /src/utils/statepoint_3d.py -filters 2.energyin.1 --vtk -o output.vtm + +All available options for specifying a subset of tallies, scores, and filters +can be listed with the ``--list`` or ``-l`` command line options. + +.. note:: Note that while SILO files can contain multiple meshes in one file, + VTK needs to use a multi-block dataset, which stores each mesh piece + in a different file in a subfolder. All meshes can be loaded at once + with the main VTM file, or each VTI file in the subfolder can be + loaded individually. + +Alternatively, the user can write their own Python script to manipulate the data +appropriately before insertion into a SILO or VTK file. For instance, if the +data has been extracted as was done in the 2D plotting example script above, a +SILO file can be created with: + +.. code-block:: python + + import silomesh as sm + sm.init_silo("fluxtally.silo") + sm.init_mesh('tally_mesh',*mesh.dimension, *mesh.lower_left, *mesh.width) + sm.init_var('flux_tally_thermal') + for x in range(1,nx+1): + for y in range(1,ny+1): + for z in range(1,nz+1): + sm.set_value(float(thermal[(x,y,z)]),x,y,z) + sm.finalize_var() + sm.init_var('flux_tally_fast') + for x in range(1,nx+1): + for y in range(1,ny+1): + for z in range(1,nz+1): + sm.set_value(float(fast[(x,y,z)]),x,y,z) + sm.finalize_var() + sm.finalize_mesh() + sm.finalize_silo() + +and the equivalent VTK file with: + +.. code-block:: python + + import vtk + + grid = vtk.vtkImageData() + grid.SetDimensions(nx+1,ny+1,nz+1) + grid.SetOrigin(*mesh.lower_left) + grid.SetSpacing(*mesh.width) + + # vtk cell arrays have x on the inners, so we need to reorder the data + idata = {} + for x in range(nx): + for y in range(ny): + for z in range(nz): + i = z*nx*ny + y*nx + x + idata[i] = (x,y,z) + + vtkfastdata = vtk.vtkDoubleArray() + vtkfastdata.SetName("fast") + for i in range(nx*ny*nz): + vtkfastdata.InsertNextValue(fast[idata[i]]) + + vtkthermaldata = vtk.vtkDoubleArray() + vtkthermaldata.SetName("thermal") + for i in range(nx*ny*nz): + vtkthermaldata.InsertNextValue(thermal[idata[i]]) + + grid.GetCellData().AddArray(vtkfastdata) + grid.GetCellData().AddArray(vtkthermaldata) + + writer = vtk.vtkXMLImageDataWriter() + writer.SetInput(grid) + writer.SetFileName('tally.vti') + writer.Write() + +Getting Data into MATLAB +------------------------ + +There is currently no front-end utility to dump tally data to MATLAB files, but +the process is straightforward. First extract the data using a custom Python +script with statepoint.py, put the data into appropriately-shaped numpy arrays, +and then use the `Scipy MATLAB IO routines +`_ to save to a MAT +file. Note that the data contained in the output from +``StatePoint.extract_result`` is already in a Numpy array that can be reshaped +and dumped to MATLAB in one step. + + + + + + + diff --git a/_static/basic.css b/_static/basic.css index 5b7b1e776e..93e57f1e7f 100644 --- a/_static/basic.css +++ b/_static/basic.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- basic theme. * - * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -79,14 +79,6 @@ div.sphinxsidebar input { font-size: 1em; } -div.sphinxsidebar #searchbox input[type="text"] { - width: 170px; -} - -div.sphinxsidebar #searchbox input[type="submit"] { - width: 30px; -} - img { border: 0; } @@ -221,29 +213,12 @@ p.rubric { font-weight: bold; } -img.align-left, .figure.align-left, object.align-left { - clear: left; - float: left; - margin-right: 1em; -} - -img.align-right, .figure.align-right, object.align-right { - clear: right; - float: right; - margin-left: 1em; -} - -img.align-center, .figure.align-center, object.align-center { - display: block; - margin-left: auto; - margin-right: auto; -} - .align-left { text-align: left; } .align-center { + clear: both; text-align: center; } @@ -420,7 +395,7 @@ dl.glossary dt { } .footnote:target { - background-color: #ffa; + background-color: #ffa } .line-block { @@ -447,16 +422,10 @@ dl.glossary dt { font-style: oblique; } -abbr, acronym { - border-bottom: dotted 1px; - cursor: help; -} - /* -- code displays --------------------------------------------------------- */ pre { overflow: auto; - overflow-y: hidden; /* fixes display issues on Chrome browsers */ } td.linenos pre { @@ -537,4 +506,4 @@ span.eqno { #top-link { display: none; } -} \ No newline at end of file +} diff --git a/_static/doctools.js b/_static/doctools.js index d4619fdfb1..eeea95ea5f 100644 --- a/_static/doctools.js +++ b/_static/doctools.js @@ -2,9 +2,9 @@ * doctools.js * ~~~~~~~~~~~ * - * Sphinx JavaScript utilities for all documentation. + * Sphinx JavaScript utilties for all documentation. * - * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -185,9 +185,9 @@ var Documentation = { body.highlightText(this.toLowerCase(), 'highlighted'); }); }, 10); - $('') - .appendTo($('#searchbox')); + $('') + .appendTo($('.sidebar .this-page-menu')); } }, @@ -213,7 +213,7 @@ var Documentation = { * helper function to hide the search marks again */ hideSearchWords : function() { - $('#searchbox .highlight-link').fadeOut(300); + $('.sidebar .this-page-menu li.highlight-link').fadeOut(300); $('span.highlighted').removeClass('highlighted'); }, diff --git a/_static/haiku.css b/_static/haiku.css index b88400a93f..677254ed9f 100644 --- a/_static/haiku.css +++ b/_static/haiku.css @@ -16,7 +16,7 @@ * Braden Ewing * Humdinger * - * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -292,7 +292,7 @@ li { line-height: 1.3; } -div.content ul > li { +div.content li { -moz-background-clip:border; -moz-background-inline-policy:continuous; -moz-background-origin:padding; diff --git a/_static/jquery.js b/_static/jquery.js index 7c24308023..5c99a8d4a8 100644 --- a/_static/jquery.js +++ b/_static/jquery.js @@ -1,154 +1,8176 @@ /*! - * jQuery JavaScript Library v1.4.2 + * jQuery JavaScript Library v1.5 * http://jquery.com/ * - * Copyright 2010, John Resig + * Copyright 2011, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * Includes Sizzle.js * http://sizzlejs.com/ - * Copyright 2010, The Dojo Foundation + * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * - * Date: Sat Feb 13 22:33:48 2010 -0500 + * Date: Mon Jan 31 08:31:29 2011 -0500 */ -(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, -Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& -(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, -a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== -"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, -function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
a"; -var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, -parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= -false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= -s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, -applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; -else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, -a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== -w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, -cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= -c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); -a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, -function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); -k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), -C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type= -e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& -f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; -if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", -e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, -"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, -d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, -e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); -t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| -g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, -CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, -g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, -text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, -setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= -h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== -"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, -h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& -q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=""; -if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="

";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); -(function(){var g=s.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: -function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= -{},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== -"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", -d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? -a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== -1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"},F={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= -c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, -wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, -prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, -this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); -return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, -""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); -return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", -""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= -c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? -c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= -function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= -Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, -"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= -a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= -a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=//gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== -"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("
").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, -serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), -function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, -global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& -e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? -"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== -false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= -false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", -c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| -d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); -g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== -1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== -"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; -if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== -"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| -c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; -this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= -this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, -e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b
"; -a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); -c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, -d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- -f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": -"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in -e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); +(function( window, undefined ) { + +// Use the correct document accordingly with window argument (sandbox) +var document = window.document; +var jQuery = (function() { + +// Define a local copy of jQuery +var jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // A central reference to the root jQuery(document) + rootjQuery, + + // A simple way to check for HTML strings or ID strings + // (both of which we optimize for) + quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/, + + // Check if a string has a non-whitespace character in it + rnotwhite = /\S/, + + // Used for trimming whitespace + trimLeft = /^\s+/, + trimRight = /\s+$/, + + // Check for digits + rdigit = /\d/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, + rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + + // Useragent RegExp + rwebkit = /(webkit)[ \/]([\w.]+)/, + ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, + rmsie = /(msie) ([\w.]+)/, + rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, + + // Keep a UserAgent string for use with jQuery.browser + userAgent = navigator.userAgent, + + // For matching the engine and version of the browser + browserMatch, + + // Has the ready events already been bound? + readyBound = false, + + // The deferred used on DOM ready + readyList, + + // Promise methods + promiseMethods = "then done fail isResolved isRejected promise".split( " " ), + + // The ready event handler + DOMContentLoaded, + + // Save a reference to some core methods + toString = Object.prototype.toString, + hasOwn = Object.prototype.hasOwnProperty, + push = Array.prototype.push, + slice = Array.prototype.slice, + trim = String.prototype.trim, + indexOf = Array.prototype.indexOf, + + // [[Class]] -> type pairs + class2type = {}; + +jQuery.fn = jQuery.prototype = { + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem, ret, doc; + + // Handle $(""), $(null), or $(undefined) + if ( !selector ) { + return this; + } + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + } + + // The body element only exists once, optimize finding it + if ( selector === "body" && !context && document.body ) { + this.context = document; + this[0] = document.body; + this.selector = "body"; + this.length = 1; + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + // Are we dealing with HTML string or an ID? + match = quickExpr.exec( selector ); + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + doc = (context ? context.ownerDocument || context : document); + + // If a single string is passed in and it's a single tag + // just do a createElement and skip the rest + ret = rsingleTag.exec( selector ); + + if ( ret ) { + if ( jQuery.isPlainObject( context ) ) { + selector = [ document.createElement( ret[1] ) ]; + jQuery.fn.attr.call( selector, context, true ); + + } else { + selector = [ doc.createElement( ret[1] ) ]; + } + + } else { + ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); + selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes; + } + + return jQuery.merge( this, selector ); + + // HANDLE: $("#id") + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return (context || rootjQuery).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if (selector.selector !== undefined) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.5", + + // The default length of a jQuery object is 0 + length: 0, + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + toArray: function() { + return slice.call( this, 0 ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + // Build a new jQuery matched element set + var ret = this.constructor(); + + if ( jQuery.isArray( elems ) ) { + push.apply( ret, elems ); + + } else { + jQuery.merge( ret, elems ); + } + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) { + ret.selector = this.selector + (this.selector ? " " : "") + selector; + } else if ( name ) { + ret.selector = this.selector + "." + name + "(" + selector + ")"; + } + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Attach the listeners + jQuery.bindReady(); + + // Add the callback + readyList.done( fn ); + + return this; + }, + + eq: function( i ) { + return i === -1 ? + this.slice( i ) : + this.slice( i, +i + 1 ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ), + "slice", slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + noConflict: function( deep ) { + window.$ = _$; + + if ( deep ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Handle when the DOM is ready + ready: function( wait ) { + // A third-party is pushing the ready event forwards + if ( wait === true ) { + jQuery.readyWait--; + } + + // Make sure that the DOM is not already loaded + if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready, 1 ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger( "ready" ).unbind( "ready" ); + } + } + }, + + bindReady: function() { + if ( readyBound ) { + return; + } + + readyBound = true; + + // Catch cases where $(document).ready() is called after the + // browser event has already occurred. + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + return setTimeout( jQuery.ready, 1 ); + } + + // Mozilla, Opera and webkit nightlies currently support this event + if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", jQuery.ready, false ); + + // If IE event model is used + } else if ( document.attachEvent ) { + // ensure firing before onload, + // maybe late but safe also for iframes + document.attachEvent("onreadystatechange", DOMContentLoaded); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", jQuery.ready ); + + // If IE and not a frame + // continually check to see if the document is ready + var toplevel = false; + + try { + toplevel = window.frameElement == null; + } catch(e) {} + + if ( document.documentElement.doScroll && toplevel ) { + doScrollCheck(); + } + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + // A crude way of determining if an object is a window + isWindow: function( obj ) { + return obj && typeof obj === "object" && "setInterval" in obj; + }, + + isNaN: function( obj ) { + return obj == null || !rdigit.test( obj ) || isNaN( obj ); + }, + + type: function( obj ) { + return obj == null ? + String( obj ) : + class2type[ toString.call(obj) ] || "object"; + }, + + isPlainObject: function( obj ) { + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + // Not own constructor property must be Object + if ( obj.constructor && + !hasOwn.call(obj, "constructor") && + !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + + var key; + for ( key in obj ) {} + + return key === undefined || hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + for ( var name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw msg; + }, + + parseJSON: function( data ) { + if ( typeof data !== "string" || !data ) { + return null; + } + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test(data.replace(rvalidescape, "@") + .replace(rvalidtokens, "]") + .replace(rvalidbraces, "")) ) { + + // Try to use the native JSON parser first + return window.JSON && window.JSON.parse ? + window.JSON.parse( data ) : + (new Function("return " + data))(); + + } else { + jQuery.error( "Invalid JSON: " + data ); + } + }, + + // Cross-browser xml parsing + // (xml & tmp used internally) + parseXML: function( data , xml , tmp ) { + + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + + tmp = xml.documentElement; + + if ( ! tmp || ! tmp.nodeName || tmp.nodeName === "parsererror" ) { + jQuery.error( "Invalid XML: " + data ); + } + + return xml; + }, + + noop: function() {}, + + // Evalulates a script in a global context + globalEval: function( data ) { + if ( data && rnotwhite.test(data) ) { + // Inspired by code by Andrea Giammarchi + // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html + var head = document.getElementsByTagName("head")[0] || document.documentElement, + script = document.createElement("script"); + + script.type = "text/javascript"; + + if ( jQuery.support.scriptEval() ) { + script.appendChild( document.createTextNode( data ) ); + } else { + script.text = data; + } + + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709). + head.insertBefore( script, head.firstChild ); + head.removeChild( script ); + } + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, + length = object.length, + isObj = length === undefined || jQuery.isFunction(object); + + if ( args ) { + if ( isObj ) { + for ( name in object ) { + if ( callback.apply( object[ name ], args ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.apply( object[ i++ ], args ) === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isObj ) { + for ( name in object ) { + if ( callback.call( object[ name ], name, object[ name ] ) === false ) { + break; + } + } + } else { + for ( var value = object[0]; + i < length && callback.call( value, i, value ) !== false; value = object[++i] ) {} + } + } + + return object; + }, + + // Use native String.trim function wherever possible + trim: trim ? + function( text ) { + return text == null ? + "" : + trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); + }, + + // results is for internal usage only + makeArray: function( array, results ) { + var ret = results || []; + + if ( array != null ) { + // The window, strings (and functions) also have 'length' + // The extra typeof function check is to prevent crashes + // in Safari 2 (See: #3039) + // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 + var type = jQuery.type(array); + + if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { + push.call( ret, array ); + } else { + jQuery.merge( ret, array ); + } + } + + return ret; + }, + + inArray: function( elem, array ) { + if ( array.indexOf ) { + return array.indexOf( elem ); + } + + for ( var i = 0, length = array.length; i < length; i++ ) { + if ( array[ i ] === elem ) { + return i; + } + } + + return -1; + }, + + merge: function( first, second ) { + var i = first.length, + j = 0; + + if ( typeof second.length === "number" ) { + for ( var l = second.length; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var ret = [], retVal; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( var i = 0, length = elems.length; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var ret = [], value; + + // Go through the array, translating each of the items to their + // new value (or values). + for ( var i = 0, length = elems.length; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Flatten any nested arrays + return ret.concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + proxy: function( fn, proxy, thisObject ) { + if ( arguments.length === 2 ) { + if ( typeof proxy === "string" ) { + thisObject = fn; + fn = thisObject[ proxy ]; + proxy = undefined; + + } else if ( proxy && !jQuery.isFunction( proxy ) ) { + thisObject = proxy; + proxy = undefined; + } + } + + if ( !proxy && fn ) { + proxy = function() { + return fn.apply( thisObject || this, arguments ); + }; + } + + // Set the guid of unique handler to the same of original handler, so it can be removed + if ( fn ) { + proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; + } + + // So proxy can be declared as an argument + return proxy; + }, + + // Mutifunctional method to get and set values to a collection + // The value/s can be optionally by executed if its a function + access: function( elems, key, value, exec, fn, pass ) { + var length = elems.length; + + // Setting many attributes + if ( typeof key === "object" ) { + for ( var k in key ) { + jQuery.access( elems, k, key[k], exec, fn, value ); + } + return elems; + } + + // Setting one attribute + if ( value !== undefined ) { + // Optionally, function values get executed if exec is true + exec = !pass && exec && jQuery.isFunction(value); + + for ( var i = 0; i < length; i++ ) { + fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); + } + + return elems; + } + + // Getting an attribute + return length ? fn( elems[0], key ) : undefined; + }, + + now: function() { + return (new Date()).getTime(); + }, + + // Create a simple deferred (one callbacks list) + _Deferred: function() { + var // callbacks list + callbacks = [], + // stored [ context , args ] + fired, + // to avoid firing when already doing so + firing, + // flag to know if the deferred has been cancelled + cancelled, + // the deferred itself + deferred = { + + // done( f1, f2, ...) + done: function() { + if ( !cancelled ) { + var args = arguments, + i, + length, + elem, + type, + _fired; + if ( fired ) { + _fired = fired; + fired = 0; + } + for ( i = 0, length = args.length; i < length; i++ ) { + elem = args[ i ]; + type = jQuery.type( elem ); + if ( type === "array" ) { + deferred.done.apply( deferred, elem ); + } else if ( type === "function" ) { + callbacks.push( elem ); + } + } + if ( _fired ) { + deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] ); + } + } + return this; + }, + + // resolve with given context and args + resolveWith: function( context, args ) { + if ( !cancelled && !fired && !firing ) { + firing = 1; + try { + while( callbacks[ 0 ] ) { + callbacks.shift().apply( context, args ); + } + } + finally { + fired = [ context, args ]; + firing = 0; + } + } + return this; + }, + + // resolve with this as context and given arguments + resolve: function() { + deferred.resolveWith( jQuery.isFunction( this.promise ) ? this.promise() : this, arguments ); + return this; + }, + + // Has this deferred been resolved? + isResolved: function() { + return !!( firing || fired ); + }, + + // Cancel + cancel: function() { + cancelled = 1; + callbacks = []; + return this; + } + }; + + return deferred; + }, + + // Full fledged deferred (two callbacks list) + Deferred: function( func ) { + var deferred = jQuery._Deferred(), + failDeferred = jQuery._Deferred(), + promise; + // Add errorDeferred methods, then and promise + jQuery.extend( deferred, { + then: function( doneCallbacks, failCallbacks ) { + deferred.done( doneCallbacks ).fail( failCallbacks ); + return this; + }, + fail: failDeferred.done, + rejectWith: failDeferred.resolveWith, + reject: failDeferred.resolve, + isRejected: failDeferred.isResolved, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj , i /* internal */ ) { + if ( obj == null ) { + if ( promise ) { + return promise; + } + promise = obj = {}; + } + i = promiseMethods.length; + while( i-- ) { + obj[ promiseMethods[ i ] ] = deferred[ promiseMethods[ i ] ]; + } + return obj; + } + } ); + // Make sure only one callback list will be used + deferred.then( failDeferred.cancel, deferred.cancel ); + // Unexpose cancel + delete deferred.cancel; + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + return deferred; + }, + + // Deferred helper + when: function( object ) { + var args = arguments, + length = args.length, + deferred = length <= 1 && object && jQuery.isFunction( object.promise ) ? + object : + jQuery.Deferred(), + promise = deferred.promise(), + resolveArray; + + if ( length > 1 ) { + resolveArray = new Array( length ); + jQuery.each( args, function( index, element ) { + jQuery.when( element ).then( function( value ) { + resolveArray[ index ] = arguments.length > 1 ? slice.call( arguments, 0 ) : value; + if( ! --length ) { + deferred.resolveWith( promise, resolveArray ); + } + }, deferred.reject ); + } ); + } else if ( deferred !== object ) { + deferred.resolve( object ); + } + return promise; + }, + + // Use of jQuery.browser is frowned upon. + // More details: http://docs.jquery.com/Utilities/jQuery.browser + uaMatch: function( ua ) { + ua = ua.toLowerCase(); + + var match = rwebkit.exec( ua ) || + ropera.exec( ua ) || + rmsie.exec( ua ) || + ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || + []; + + return { browser: match[1] || "", version: match[2] || "0" }; + }, + + sub: function() { + function jQuerySubclass( selector, context ) { + return new jQuerySubclass.fn.init( selector, context ); + } + jQuery.extend( true, jQuerySubclass, this ); + jQuerySubclass.superclass = this; + jQuerySubclass.fn = jQuerySubclass.prototype = this(); + jQuerySubclass.fn.constructor = jQuerySubclass; + jQuerySubclass.subclass = this.subclass; + jQuerySubclass.fn.init = function init( selector, context ) { + if ( context && context instanceof jQuery && !(context instanceof jQuerySubclass) ) { + context = jQuerySubclass(context); + } + + return jQuery.fn.init.call( this, selector, context, rootjQuerySubclass ); + }; + jQuerySubclass.fn.init.prototype = jQuerySubclass.fn; + var rootjQuerySubclass = jQuerySubclass(document); + return jQuerySubclass; + }, + + browser: {} +}); + +// Create readyList deferred +readyList = jQuery._Deferred(); + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +browserMatch = jQuery.uaMatch( userAgent ); +if ( browserMatch.browser ) { + jQuery.browser[ browserMatch.browser ] = true; + jQuery.browser.version = browserMatch.version; +} + +// Deprecated, use jQuery.browser.webkit instead +if ( jQuery.browser.webkit ) { + jQuery.browser.safari = true; +} + +if ( indexOf ) { + jQuery.inArray = function( elem, array ) { + return indexOf.call( array, elem ); + }; +} + +// IE doesn't match non-breaking spaces with \s +if ( rnotwhite.test( "\xA0" ) ) { + trimLeft = /^[\s\xA0]+/; + trimRight = /[\s\xA0]+$/; +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); + +// Cleanup functions for the document ready method +if ( document.addEventListener ) { + DOMContentLoaded = function() { + document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + jQuery.ready(); + }; + +} else if ( document.attachEvent ) { + DOMContentLoaded = function() { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( document.readyState === "complete" ) { + document.detachEvent( "onreadystatechange", DOMContentLoaded ); + jQuery.ready(); + } + }; +} + +// The DOM ready check for Internet Explorer +function doScrollCheck() { + if ( jQuery.isReady ) { + return; + } + + try { + // If IE is used, use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + document.documentElement.doScroll("left"); + } catch(e) { + setTimeout( doScrollCheck, 1 ); + return; + } + + // and execute any waiting functions + jQuery.ready(); +} + +// Expose jQuery to the global object +return (window.jQuery = window.$ = jQuery); + +})(); + + +(function() { + + jQuery.support = {}; + + var div = document.createElement("div"); + + div.style.display = "none"; + div.innerHTML = "
a"; + + var all = div.getElementsByTagName("*"), + a = div.getElementsByTagName("a")[0], + select = document.createElement("select"), + opt = select.appendChild( document.createElement("option") ); + + // Can't get basic test support + if ( !all || !all.length || !a ) { + return; + } + + jQuery.support = { + // IE strips leading whitespace when .innerHTML is used + leadingWhitespace: div.firstChild.nodeType === 3, + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + tbody: !div.getElementsByTagName("tbody").length, + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + htmlSerialize: !!div.getElementsByTagName("link").length, + + // Get the style information from getAttribute + // (IE uses .cssText insted) + style: /red/.test( a.getAttribute("style") ), + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + hrefNormalized: a.getAttribute("href") === "/a", + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + opacity: /^0.55$/.test( a.style.opacity ), + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + cssFloat: !!a.style.cssFloat, + + // Make sure that if no value is specified for a checkbox + // that it defaults to "on". + // (WebKit defaults to "" instead) + checkOn: div.getElementsByTagName("input")[0].value === "on", + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + optSelected: opt.selected, + + // Will be defined later + deleteExpando: true, + optDisabled: false, + checkClone: false, + _scriptEval: null, + noCloneEvent: true, + boxModel: null, + inlineBlockNeedsLayout: false, + shrinkWrapBlocks: false, + reliableHiddenOffsets: true + }; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as diabled) + select.disabled = true; + jQuery.support.optDisabled = !opt.disabled; + + jQuery.support.scriptEval = function() { + if ( jQuery.support._scriptEval === null ) { + var root = document.documentElement, + script = document.createElement("script"), + id = "script" + jQuery.now(); + + script.type = "text/javascript"; + try { + script.appendChild( document.createTextNode( "window." + id + "=1;" ) ); + } catch(e) {} + + root.insertBefore( script, root.firstChild ); + + // Make sure that the execution of code works by injecting a script + // tag with appendChild/createTextNode + // (IE doesn't support this, fails, and uses .text instead) + if ( window[ id ] ) { + jQuery.support._scriptEval = true; + delete window[ id ]; + } else { + jQuery.support._scriptEval = false; + } + + root.removeChild( script ); + // release memory in IE + root = script = id = null; + } + + return jQuery.support._scriptEval; + }; + + // Test to see if it's possible to delete an expando from an element + // Fails in Internet Explorer + try { + delete div.test; + + } catch(e) { + jQuery.support.deleteExpando = false; + } + + if ( div.attachEvent && div.fireEvent ) { + div.attachEvent("onclick", function click() { + // Cloning a node shouldn't copy over any + // bound event handlers (IE does this) + jQuery.support.noCloneEvent = false; + div.detachEvent("onclick", click); + }); + div.cloneNode(true).fireEvent("onclick"); + } + + div = document.createElement("div"); + div.innerHTML = ""; + + var fragment = document.createDocumentFragment(); + fragment.appendChild( div.firstChild ); + + // WebKit doesn't clone checked state correctly in fragments + jQuery.support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked; + + // Figure out if the W3C box model works as expected + // document.body must exist before we can do this + jQuery(function() { + var div = document.createElement("div"), + body = document.getElementsByTagName("body")[0]; + + // Frameset documents with no body should not run this code + if ( !body ) { + return; + } + + div.style.width = div.style.paddingLeft = "1px"; + body.appendChild( div ); + jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2; + + if ( "zoom" in div.style ) { + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + // (IE < 8 does this) + div.style.display = "inline"; + div.style.zoom = 1; + jQuery.support.inlineBlockNeedsLayout = div.offsetWidth === 2; + + // Check if elements with layout shrink-wrap their children + // (IE 6 does this) + div.style.display = ""; + div.innerHTML = "
"; + jQuery.support.shrinkWrapBlocks = div.offsetWidth !== 2; + } + + div.innerHTML = "
t
"; + var tds = div.getElementsByTagName("td"); + + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + // (only IE 8 fails this test) + jQuery.support.reliableHiddenOffsets = tds[0].offsetHeight === 0; + + tds[0].style.display = ""; + tds[1].style.display = "none"; + + // Check if empty table cells still have offsetWidth/Height + // (IE < 8 fail this test) + jQuery.support.reliableHiddenOffsets = jQuery.support.reliableHiddenOffsets && tds[0].offsetHeight === 0; + div.innerHTML = ""; + + body.removeChild( div ).style.display = "none"; + div = tds = null; + }); + + // Technique from Juriy Zaytsev + // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/ + var eventSupported = function( eventName ) { + var el = document.createElement("div"); + eventName = "on" + eventName; + + // We only care about the case where non-standard event systems + // are used, namely in IE. Short-circuiting here helps us to + // avoid an eval call (in setAttribute) which can cause CSP + // to go haywire. See: https://developer.mozilla.org/en/Security/CSP + if ( !el.attachEvent ) { + return true; + } + + var isSupported = (eventName in el); + if ( !isSupported ) { + el.setAttribute(eventName, "return;"); + isSupported = typeof el[eventName] === "function"; + } + el = null; + + return isSupported; + }; + + jQuery.support.submitBubbles = eventSupported("submit"); + jQuery.support.changeBubbles = eventSupported("change"); + + // release memory in IE + div = all = a = null; +})(); + + + +var rbrace = /^(?:\{.*\}|\[.*\])$/; + +jQuery.extend({ + cache: {}, + + // Please use with caution + uuid: 0, + + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + "applet": true + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + + return !!elem && !jQuery.isEmptyObject(elem); + }, + + data: function( elem, name, data, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var internalKey = jQuery.expando, getByName = typeof name === "string", thisCache, + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || (pvt && id && !cache[ id ][ internalKey ])) && getByName && data === undefined ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + elem[ jQuery.expando ] = id = ++jQuery.uuid; + } else { + id = jQuery.expando; + } + } + + if ( !cache[ id ] ) { + cache[ id ] = {}; + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" ) { + if ( pvt ) { + cache[ id ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name); + } else { + cache[ id ] = jQuery.extend(cache[ id ], name); + } + } + + thisCache = cache[ id ]; + + // Internal jQuery data is stored in a separate object inside the object's data + // cache in order to avoid key collisions between internal data and user-defined + // data + if ( pvt ) { + if ( !thisCache[ internalKey ] ) { + thisCache[ internalKey ] = {}; + } + + thisCache = thisCache[ internalKey ]; + } + + if ( data !== undefined ) { + thisCache[ name ] = data; + } + + // TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should + // not attempt to inspect the internal events object using jQuery.data, as this + // internal data object is undocumented and subject to change. + if ( name === "events" && !thisCache[name] ) { + return thisCache[ internalKey ] && thisCache[ internalKey ].events; + } + + return getByName ? thisCache[ name ] : thisCache; + }, + + removeData: function( elem, name, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var internalKey = jQuery.expando, isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + + // See jQuery.data for more information + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + var thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ]; + + if ( thisCache ) { + delete thisCache[ name ]; + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( !jQuery.isEmptyObject(thisCache) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( pvt ) { + delete cache[ id ][ internalKey ]; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !jQuery.isEmptyObject(cache[ id ]) ) { + return; + } + } + + var internalCache = cache[ id ][ internalKey ]; + + // Browsers that fail expando deletion also refuse to delete expandos on + // the window, but it will allow it on all other JS objects; other browsers + // don't care + if ( jQuery.support.deleteExpando || cache != window ) { + delete cache[ id ]; + } else { + cache[ id ] = null; + } + + // We destroyed the entire user cache at once because it's faster than + // iterating through each key, but we need to continue to persist internal + // data if it existed + if ( internalCache ) { + cache[ id ] = {}; + cache[ id ][ internalKey ] = internalCache; + + // Otherwise, we need to eliminate the expando on the node to avoid + // false lookups in the cache for entries that no longer exist + } else if ( isNode ) { + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( jQuery.support.deleteExpando ) { + delete elem[ jQuery.expando ]; + } else if ( elem.removeAttribute ) { + elem.removeAttribute( jQuery.expando ); + } else { + elem[ jQuery.expando ] = null; + } + } + }, + + // For internal use only. + _data: function( elem, name, data ) { + return jQuery.data( elem, name, data, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + if ( elem.nodeName ) { + var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; + + if ( match ) { + return !(match === true || elem.getAttribute("classid") !== match); + } + } + + return true; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var data = null; + + if ( typeof key === "undefined" ) { + if ( this.length ) { + data = jQuery.data( this[0] ); + + if ( this[0].nodeType === 1 ) { + var attr = this[0].attributes, name; + for ( var i = 0, l = attr.length; i < l; i++ ) { + name = attr[i].name; + + if ( name.indexOf( "data-" ) === 0 ) { + name = name.substr( 5 ); + dataAttr( this[0], name, data[ name ] ); + } + } + } + } + + return data; + + } else if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + var parts = key.split("."); + parts[1] = parts[1] ? "." + parts[1] : ""; + + if ( value === undefined ) { + data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); + + // Try to fetch any internally stored data first + if ( data === undefined && this.length ) { + data = jQuery.data( this[0], key ); + data = dataAttr( this[0], key, data ); + } + + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + + } else { + return this.each(function() { + var $this = jQuery( this ), + args = [ parts[0], value ]; + + $this.triggerHandler( "setData" + parts[1] + "!", args ); + jQuery.data( this, key, value ); + $this.triggerHandler( "changeData" + parts[1] + "!", args ); + }); + } + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + data = elem.getAttribute( "data-" + key ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + !jQuery.isNaN( data ) ? parseFloat( data ) : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + + + + +jQuery.extend({ + queue: function( elem, type, data ) { + if ( !elem ) { + return; + } + + type = (type || "fx") + "queue"; + var q = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( !data ) { + return q || []; + } + + if ( !q || jQuery.isArray(data) ) { + q = jQuery._data( elem, type, jQuery.makeArray(data) ); + + } else { + q.push( data ); + } + + return q; + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + fn = queue.shift(); + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + } + + if ( fn ) { + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift("inprogress"); + } + + fn.call(elem, function() { + jQuery.dequeue(elem, type); + }); + } + + if ( !queue.length ) { + jQuery.removeData( elem, type + "queue", true ); + } + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + } + + if ( data === undefined ) { + return jQuery.queue( this[0], type ); + } + return this.each(function( i ) { + var queue = jQuery.queue( this, type, data ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; + type = type || "fx"; + + return this.queue( type, function() { + var elem = this; + setTimeout(function() { + jQuery.dequeue( elem, type ); + }, time ); + }); + }, + + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + } +}); + + + + +var rclass = /[\n\t\r]/g, + rspaces = /\s+/, + rreturn = /\r/g, + rspecialurl = /^(?:href|src|style)$/, + rtype = /^(?:button|input)$/i, + rfocusable = /^(?:button|input|object|select|textarea)$/i, + rclickable = /^a(?:rea)?$/i, + rradiocheck = /^(?:radio|checkbox)$/i; + +jQuery.props = { + "for": "htmlFor", + "class": "className", + readonly: "readOnly", + maxlength: "maxLength", + cellspacing: "cellSpacing", + rowspan: "rowSpan", + colspan: "colSpan", + tabindex: "tabIndex", + usemap: "useMap", + frameborder: "frameBorder" +}; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, name, value, true, jQuery.attr ); + }, + + removeAttr: function( name, fn ) { + return this.each(function(){ + jQuery.attr( this, name, "" ); + if ( this.nodeType === 1 ) { + this.removeAttribute( name ); + } + }); + }, + + addClass: function( value ) { + if ( jQuery.isFunction(value) ) { + return this.each(function(i) { + var self = jQuery(this); + self.addClass( value.call(this, i, self.attr("class")) ); + }); + } + + if ( value && typeof value === "string" ) { + var classNames = (value || "").split( rspaces ); + + for ( var i = 0, l = this.length; i < l; i++ ) { + var elem = this[i]; + + if ( elem.nodeType === 1 ) { + if ( !elem.className ) { + elem.className = value; + + } else { + var className = " " + elem.className + " ", + setClass = elem.className; + + for ( var c = 0, cl = classNames.length; c < cl; c++ ) { + if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) { + setClass += " " + classNames[c]; + } + } + elem.className = jQuery.trim( setClass ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + if ( jQuery.isFunction(value) ) { + return this.each(function(i) { + var self = jQuery(this); + self.removeClass( value.call(this, i, self.attr("class")) ); + }); + } + + if ( (value && typeof value === "string") || value === undefined ) { + var classNames = (value || "").split( rspaces ); + + for ( var i = 0, l = this.length; i < l; i++ ) { + var elem = this[i]; + + if ( elem.nodeType === 1 && elem.className ) { + if ( value ) { + var className = (" " + elem.className + " ").replace(rclass, " "); + for ( var c = 0, cl = classNames.length; c < cl; c++ ) { + className = className.replace(" " + classNames[c] + " ", " "); + } + elem.className = jQuery.trim( className ); + + } else { + elem.className = ""; + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isBool = typeof stateVal === "boolean"; + + if ( jQuery.isFunction( value ) ) { + return this.each(function(i) { + var self = jQuery(this); + self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + state = stateVal, + classNames = value.split( rspaces ); + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space seperated list + state = isBool ? state : !self.hasClass( className ); + self[ state ? "addClass" : "removeClass" ]( className ); + } + + } else if ( type === "undefined" || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // toggle whole className + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " "; + for ( var i = 0, l = this.length; i < l; i++ ) { + if ( (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + if ( !arguments.length ) { + var elem = this[0]; + + if ( elem ) { + if ( jQuery.nodeName( elem, "option" ) ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + + // We need to handle select boxes special + if ( jQuery.nodeName( elem, "select" ) ) { + var index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type === "select-one"; + + // Nothing was selected + if ( index < 0 ) { + return null; + } + + // Loop through all the selected options + for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { + var option = options[ i ]; + + // Don't return options that are disabled or in a disabled optgroup + if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && + (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { + + // Get the specific value for the option + value = jQuery(option).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + } + + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) { + return elem.getAttribute("value") === null ? "on" : elem.value; + } + + // Everything else, we just grab the value + return (elem.value || "").replace(rreturn, ""); + + } + + return undefined; + } + + var isFunction = jQuery.isFunction(value); + + return this.each(function(i) { + var self = jQuery(this), val = value; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call(this, i, self.val()); + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray(val) ) { + val = jQuery.map(val, function (value) { + return value == null ? "" : value + ""; + }); + } + + if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) { + this.checked = jQuery.inArray( self.val(), val ) >= 0; + + } else if ( jQuery.nodeName( this, "select" ) ) { + var values = jQuery.makeArray(val); + + jQuery( "option", this ).each(function() { + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; + }); + + if ( !values.length ) { + this.selectedIndex = -1; + } + + } else { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + attrFn: { + val: true, + css: true, + html: true, + text: true, + data: true, + width: true, + height: true, + offset: true + }, + + attr: function( elem, name, value, pass ) { + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || elem.nodeType === 2 ) { + return undefined; + } + + if ( pass && name in jQuery.attrFn ) { + return jQuery(elem)[name](value); + } + + var notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc( elem ), + // Whether we are setting (or getting) + set = value !== undefined; + + // Try to normalize/fix the name + name = notxml && jQuery.props[ name ] || name; + + // Only do all the following if this is a node (faster for style) + if ( elem.nodeType === 1 ) { + // These attributes require special treatment + var special = rspecialurl.test( name ); + + // Safari mis-reports the default selected property of an option + // Accessing the parent's selectedIndex property fixes it + if ( name === "selected" && !jQuery.support.optSelected ) { + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + } + + // If applicable, access the attribute via the DOM 0 way + // 'in' checks fail in Blackberry 4.7 #6931 + if ( (name in elem || elem[ name ] !== undefined) && notxml && !special ) { + if ( set ) { + // We can't allow the type property to be changed (since it causes problems in IE) + if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) { + jQuery.error( "type property can't be changed" ); + } + + if ( value === null ) { + if ( elem.nodeType === 1 ) { + elem.removeAttribute( name ); + } + + } else { + elem[ name ] = value; + } + } + + // browsers index elements by id/name on forms, give priority to attributes. + if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) { + return elem.getAttributeNode( name ).nodeValue; + } + + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + if ( name === "tabIndex" ) { + var attributeNode = elem.getAttributeNode( "tabIndex" ); + + return attributeNode && attributeNode.specified ? + attributeNode.value : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + undefined; + } + + return elem[ name ]; + } + + if ( !jQuery.support.style && notxml && name === "style" ) { + if ( set ) { + elem.style.cssText = "" + value; + } + + return elem.style.cssText; + } + + if ( set ) { + // convert the value to a string (all browsers do this but IE) see #1070 + elem.setAttribute( name, "" + value ); + } + + // Ensure that missing attributes return undefined + // Blackberry 4.7 returns "" from getAttribute #6938 + if ( !elem.attributes[ name ] && (elem.hasAttribute && !elem.hasAttribute( name )) ) { + return undefined; + } + + var attr = !jQuery.support.hrefNormalized && notxml && special ? + // Some attributes require a special call on IE + elem.getAttribute( name, 2 ) : + elem.getAttribute( name ); + + // Non-existent attributes return null, we normalize to undefined + return attr === null ? undefined : attr; + } + // Handle everything which isn't a DOM element node + if ( set ) { + elem[ name ] = value; + } + return elem[ name ]; + } +}); + + + + +var rnamespaces = /\.(.*)$/, + rformElems = /^(?:textarea|input|select)$/i, + rperiod = /\./g, + rspace = / /g, + rescape = /[^\w\s.|`]/g, + fcleanup = function( nm ) { + return nm.replace(rescape, "\\$&"); + }, + eventKey = "events"; + +/* + * A number of helper functions used for managing events. + * Many of the ideas behind this code originated from + * Dean Edwards' addEvent library. + */ +jQuery.event = { + + // Bind an event to an element + // Original by Dean Edwards + add: function( elem, types, handler, data ) { + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // For whatever reason, IE has trouble passing the window object + // around, causing it to be cloned in the process + if ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) { + elem = window; + } + + if ( handler === false ) { + handler = returnFalse; + } else if ( !handler ) { + // Fixes bug #7229. Fix recommended by jdalton + return; + } + + var handleObjIn, handleObj; + + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + } + + // Make sure that the function being executed has a unique ID + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure + var elemData = jQuery._data( elem ); + + // If no elemData is found then we must be trying to bind to one of the + // banned noData elements + if ( !elemData ) { + return; + } + + var events = elemData[ eventKey ], + eventHandle = elemData.handle; + + if ( typeof events === "function" ) { + // On plain objects events is a fn that holds the the data + // which prevents this data from being JSON serialized + // the function does not need to be called, it just contains the data + eventHandle = events.handle; + events = events.events; + + } else if ( !events ) { + if ( !elem.nodeType ) { + // On plain objects, create a fn that acts as the holder + // of the values to avoid JSON serialization of event data + elemData[ eventKey ] = elemData = function(){}; + } + + elemData.events = events = {}; + } + + if ( !eventHandle ) { + elemData.handle = eventHandle = function() { + // Handle the second event of a trigger and when + // an event is called after a page has unloaded + return typeof jQuery !== "undefined" && !jQuery.event.triggered ? + jQuery.event.handle.apply( eventHandle.elem, arguments ) : + undefined; + }; + } + + // Add elem as a property of the handle function + // This is to prevent a memory leak with non-native events in IE. + eventHandle.elem = elem; + + // Handle multiple events separated by a space + // jQuery(...).bind("mouseover mouseout", fn); + types = types.split(" "); + + var type, i = 0, namespaces; + + while ( (type = types[ i++ ]) ) { + handleObj = handleObjIn ? + jQuery.extend({}, handleObjIn) : + { handler: handler, data: data }; + + // Namespaced event handlers + if ( type.indexOf(".") > -1 ) { + namespaces = type.split("."); + type = namespaces.shift(); + handleObj.namespace = namespaces.slice(0).sort().join("."); + + } else { + namespaces = []; + handleObj.namespace = ""; + } + + handleObj.type = type; + if ( !handleObj.guid ) { + handleObj.guid = handler.guid; + } + + // Get the current list of functions bound to this event + var handlers = events[ type ], + special = jQuery.event.special[ type ] || {}; + + // Init the event handler queue + if ( !handlers ) { + handlers = events[ type ] = []; + + // Check for a special event handler + // Only use addEventListener/attachEvent if the special + // events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add the function to the element's handler list + handlers.push( handleObj ); + + // Keep track of which events have been used, for global triggering + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + global: {}, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, pos ) { + // don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + if ( handler === false ) { + handler = returnFalse; + } + + var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ), + events = elemData && elemData[ eventKey ]; + + if ( !elemData || !events ) { + return; + } + + if ( typeof events === "function" ) { + elemData = events; + events = events.events; + } + + // types is actually an event object here + if ( types && types.type ) { + handler = types.handler; + types = types.type; + } + + // Unbind all events for the element + if ( !types || typeof types === "string" && types.charAt(0) === "." ) { + types = types || ""; + + for ( type in events ) { + jQuery.event.remove( elem, type + types ); + } + + return; + } + + // Handle multiple events separated by a space + // jQuery(...).unbind("mouseover mouseout", fn); + types = types.split(" "); + + while ( (type = types[ i++ ]) ) { + origType = type; + handleObj = null; + all = type.indexOf(".") < 0; + namespaces = []; + + if ( !all ) { + // Namespaced event handlers + namespaces = type.split("."); + type = namespaces.shift(); + + namespace = new RegExp("(^|\\.)" + + jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)"); + } + + eventType = events[ type ]; + + if ( !eventType ) { + continue; + } + + if ( !handler ) { + for ( j = 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( all || namespace.test( handleObj.namespace ) ) { + jQuery.event.remove( elem, origType, handleObj.handler, j ); + eventType.splice( j--, 1 ); + } + } + + continue; + } + + special = jQuery.event.special[ type ] || {}; + + for ( j = pos || 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( handler.guid === handleObj.guid ) { + // remove the given handler for the given type + if ( all || namespace.test( handleObj.namespace ) ) { + if ( pos == null ) { + eventType.splice( j--, 1 ); + } + + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + + if ( pos != null ) { + break; + } + } + } + + // remove generic event handler if no more handlers exist + if ( eventType.length === 0 || pos != null && eventType.length === 1 ) { + if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + ret = null; + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + var handle = elemData.handle; + if ( handle ) { + handle.elem = null; + } + + delete elemData.events; + delete elemData.handle; + + if ( typeof elemData === "function" ) { + jQuery.removeData( elem, eventKey, true ); + + } else if ( jQuery.isEmptyObject( elemData ) ) { + jQuery.removeData( elem, undefined, true ); + } + } + }, + + // bubbling is internal + trigger: function( event, data, elem /*, bubbling */ ) { + // Event object or event type + var type = event.type || event, + bubbling = arguments[3]; + + if ( !bubbling ) { + event = typeof event === "object" ? + // jQuery.Event object + event[ jQuery.expando ] ? event : + // Object literal + jQuery.extend( jQuery.Event(type), event ) : + // Just the event type (string) + jQuery.Event(type); + + if ( type.indexOf("!") >= 0 ) { + event.type = type = type.slice(0, -1); + event.exclusive = true; + } + + // Handle a global trigger + if ( !elem ) { + // Don't bubble custom events when global (to avoid too much overhead) + event.stopPropagation(); + + // Only trigger if we've ever bound an event for it + if ( jQuery.event.global[ type ] ) { + // XXX This code smells terrible. event.js should not be directly + // inspecting the data cache + jQuery.each( jQuery.cache, function() { + // internalKey variable is just used to make it easier to find + // and potentially change this stuff later; currently it just + // points to jQuery.expando + var internalKey = jQuery.expando, + internalCache = this[ internalKey ]; + if ( internalCache && internalCache.events && internalCache.events[type] ) { + jQuery.event.trigger( event, data, internalCache.handle.elem ); + } + }); + } + } + + // Handle triggering a single element + + // don't do events on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) { + return undefined; + } + + // Clean up in case it is reused + event.result = undefined; + event.target = elem; + + // Clone the incoming data, if any + data = jQuery.makeArray( data ); + data.unshift( event ); + } + + event.currentTarget = elem; + + // Trigger the event, it is assumed that "handle" is a function + var handle = elem.nodeType ? + jQuery._data( elem, "handle" ) : + (jQuery._data( elem, eventKey ) || {}).handle; + + if ( handle ) { + handle.apply( elem, data ); + } + + var parent = elem.parentNode || elem.ownerDocument; + + // Trigger an inline bound script + try { + if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) { + if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) { + event.result = false; + event.preventDefault(); + } + } + + // prevent IE from throwing an error for some elements with some event types, see #3533 + } catch (inlineError) {} + + if ( !event.isPropagationStopped() && parent ) { + jQuery.event.trigger( event, data, parent, true ); + + } else if ( !event.isDefaultPrevented() ) { + var old, + target = event.target, + targetType = type.replace( rnamespaces, "" ), + isClick = jQuery.nodeName( target, "a" ) && targetType === "click", + special = jQuery.event.special[ targetType ] || {}; + + if ( (!special._default || special._default.call( elem, event ) === false) && + !isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) { + + try { + if ( target[ targetType ] ) { + // Make sure that we don't accidentally re-trigger the onFOO events + old = target[ "on" + targetType ]; + + if ( old ) { + target[ "on" + targetType ] = null; + } + + jQuery.event.triggered = true; + target[ targetType ](); + } + + // prevent IE from throwing an error for some elements with some event types, see #3533 + } catch (triggerError) {} + + if ( old ) { + target[ "on" + targetType ] = old; + } + + jQuery.event.triggered = false; + } + } + }, + + handle: function( event ) { + var all, handlers, namespaces, namespace_re, events, + namespace_sort = [], + args = jQuery.makeArray( arguments ); + + event = args[0] = jQuery.event.fix( event || window.event ); + event.currentTarget = this; + + // Namespaced event handlers + all = event.type.indexOf(".") < 0 && !event.exclusive; + + if ( !all ) { + namespaces = event.type.split("."); + event.type = namespaces.shift(); + namespace_sort = namespaces.slice(0).sort(); + namespace_re = new RegExp("(^|\\.)" + namespace_sort.join("\\.(?:.*\\.)?") + "(\\.|$)"); + } + + event.namespace = event.namespace || namespace_sort.join("."); + + events = jQuery._data(this, eventKey); + + if ( typeof events === "function" ) { + events = events.events; + } + + handlers = (events || {})[ event.type ]; + + if ( events && handlers ) { + // Clone the handlers to prevent manipulation + handlers = handlers.slice(0); + + for ( var j = 0, l = handlers.length; j < l; j++ ) { + var handleObj = handlers[ j ]; + + // Filter the functions by class + if ( all || namespace_re.test( handleObj.namespace ) ) { + // Pass in a reference to the handler function itself + // So that we can later remove it + event.handler = handleObj.handler; + event.data = handleObj.data; + event.handleObj = handleObj; + + var ret = handleObj.handler.apply( this, args ); + + if ( ret !== undefined ) { + event.result = ret; + if ( ret === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + + if ( event.isImmediatePropagationStopped() ) { + break; + } + } + } + } + + return event.result; + }, + + props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // store a copy of the original event object + // and "clone" to set read-only properties + var originalEvent = event; + event = jQuery.Event( originalEvent ); + + for ( var i = this.props.length, prop; i; ) { + prop = this.props[ --i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Fix target property, if necessary + if ( !event.target ) { + // Fixes #1925 where srcElement might not be defined either + event.target = event.srcElement || document; + } + + // check if target is a textnode (safari) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && event.fromElement ) { + event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement; + } + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && event.clientX != null ) { + var doc = document.documentElement, + body = document.body; + + event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); + event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); + } + + // Add which for key events + if ( event.which == null && (event.charCode != null || event.keyCode != null) ) { + event.which = event.charCode != null ? event.charCode : event.keyCode; + } + + // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) + if ( !event.metaKey && event.ctrlKey ) { + event.metaKey = event.ctrlKey; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && event.button !== undefined ) { + event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); + } + + return event; + }, + + // Deprecated, use jQuery.guid instead + guid: 1E8, + + // Deprecated, use jQuery.proxy instead + proxy: jQuery.proxy, + + special: { + ready: { + // Make sure the ready event is setup + setup: jQuery.bindReady, + teardown: jQuery.noop + }, + + live: { + add: function( handleObj ) { + jQuery.event.add( this, + liveConvert( handleObj.origType, handleObj.selector ), + jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) ); + }, + + remove: function( handleObj ) { + jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj ); + } + }, + + beforeunload: { + setup: function( data, namespaces, eventHandle ) { + // We only want to do this special case on windows + if ( jQuery.isWindow( this ) ) { + this.onbeforeunload = eventHandle; + } + }, + + teardown: function( namespaces, eventHandle ) { + if ( this.onbeforeunload === eventHandle ) { + this.onbeforeunload = null; + } + } + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + if ( elem.detachEvent ) { + elem.detachEvent( "on" + type, handle ); + } + }; + +jQuery.Event = function( src ) { + // Allow instantiation without the 'new' keyword + if ( !this.preventDefault ) { + return new jQuery.Event( src ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // timeStamp is buggy for some events on Firefox(#3843) + // So we won't rely on the native value + this.timeStamp = jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +function returnFalse() { + return false; +} +function returnTrue() { + return true; +} + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + preventDefault: function() { + this.isDefaultPrevented = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + + // if preventDefault exists run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // otherwise set the returnValue property of the original event to false (IE) + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + this.isPropagationStopped = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + // if stopPropagation exists run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + // otherwise set the cancelBubble property of the original event to true (IE) + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse +}; + +// Checks if an event happened on an element within another element +// Used in jQuery.event.special.mouseenter and mouseleave handlers +var withinElement = function( event ) { + // Check if mouse(over|out) are still within the same parent element + var parent = event.relatedTarget; + + // Firefox sometimes assigns relatedTarget a XUL element + // which we cannot access the parentNode property of + try { + // Traverse up the tree + while ( parent && parent !== this ) { + parent = parent.parentNode; + } + + if ( parent !== this ) { + // set the correct event type + event.type = event.data; + + // handle event if we actually just moused on to a non sub-element + jQuery.event.handle.apply( this, arguments ); + } + + // assuming we've left the element since we most likely mousedover a xul element + } catch(e) { } +}, + +// In case of event delegation, we only need to rename the event.type, +// liveHandler will take care of the rest. +delegate = function( event ) { + event.type = event.data; + jQuery.event.handle.apply( this, arguments ); +}; + +// Create mouseenter and mouseleave events +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + setup: function( data ) { + jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig ); + }, + teardown: function( data ) { + jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement ); + } + }; +}); + +// submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function( data, namespaces ) { + if ( this.nodeName && this.nodeName.toLowerCase() !== "form" ) { + jQuery.event.add(this, "click.specialSubmit", function( e ) { + var elem = e.target, + type = elem.type; + + if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) { + e.liveFired = undefined; + return trigger( "submit", this, arguments ); + } + }); + + jQuery.event.add(this, "keypress.specialSubmit", function( e ) { + var elem = e.target, + type = elem.type; + + if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) { + e.liveFired = undefined; + return trigger( "submit", this, arguments ); + } + }); + + } else { + return false; + } + }, + + teardown: function( namespaces ) { + jQuery.event.remove( this, ".specialSubmit" ); + } + }; + +} + +// change delegation, happens here so we have bind. +if ( !jQuery.support.changeBubbles ) { + + var changeFilters, + + getVal = function( elem ) { + var type = elem.type, val = elem.value; + + if ( type === "radio" || type === "checkbox" ) { + val = elem.checked; + + } else if ( type === "select-multiple" ) { + val = elem.selectedIndex > -1 ? + jQuery.map( elem.options, function( elem ) { + return elem.selected; + }).join("-") : + ""; + + } else if ( elem.nodeName.toLowerCase() === "select" ) { + val = elem.selectedIndex; + } + + return val; + }, + + testChange = function testChange( e ) { + var elem = e.target, data, val; + + if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) { + return; + } + + data = jQuery._data( elem, "_change_data" ); + val = getVal(elem); + + // the current data will be also retrieved by beforeactivate + if ( e.type !== "focusout" || elem.type !== "radio" ) { + jQuery._data( elem, "_change_data", val ); + } + + if ( data === undefined || val === data ) { + return; + } + + if ( data != null || val ) { + e.type = "change"; + e.liveFired = undefined; + return jQuery.event.trigger( e, arguments[1], elem ); + } + }; + + jQuery.event.special.change = { + filters: { + focusout: testChange, + + beforedeactivate: testChange, + + click: function( e ) { + var elem = e.target, type = elem.type; + + if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) { + return testChange.call( this, e ); + } + }, + + // Change has to be called before submit + // Keydown will be called before keypress, which is used in submit-event delegation + keydown: function( e ) { + var elem = e.target, type = elem.type; + + if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") || + (e.keyCode === 32 && (type === "checkbox" || type === "radio")) || + type === "select-multiple" ) { + return testChange.call( this, e ); + } + }, + + // Beforeactivate happens also before the previous element is blurred + // with this event you can't trigger a change event, but you can store + // information + beforeactivate: function( e ) { + var elem = e.target; + jQuery._data( elem, "_change_data", getVal(elem) ); + } + }, + + setup: function( data, namespaces ) { + if ( this.type === "file" ) { + return false; + } + + for ( var type in changeFilters ) { + jQuery.event.add( this, type + ".specialChange", changeFilters[type] ); + } + + return rformElems.test( this.nodeName ); + }, + + teardown: function( namespaces ) { + jQuery.event.remove( this, ".specialChange" ); + + return rformElems.test( this.nodeName ); + } + }; + + changeFilters = jQuery.event.special.change.filters; + + // Handle when the input is .focus()'d + changeFilters.focus = changeFilters.beforeactivate; +} + +function trigger( type, elem, args ) { + args[0].type = type; + return jQuery.event.handle.apply( elem, args ); +} + +// Create "bubbling" focus and blur events +if ( document.addEventListener ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + jQuery.event.special[ fix ] = { + setup: function() { + this.addEventListener( orig, handler, true ); + }, + teardown: function() { + this.removeEventListener( orig, handler, true ); + } + }; + + function handler( e ) { + e = jQuery.event.fix( e ); + e.type = fix; + return jQuery.event.handle.call( this, e ); + } + }); +} + +jQuery.each(["bind", "one"], function( i, name ) { + jQuery.fn[ name ] = function( type, data, fn ) { + // Handle object literals + if ( typeof type === "object" ) { + for ( var key in type ) { + this[ name ](key, data, type[key], fn); + } + return this; + } + + if ( jQuery.isFunction( data ) || data === false ) { + fn = data; + data = undefined; + } + + var handler = name === "one" ? jQuery.proxy( fn, function( event ) { + jQuery( this ).unbind( event, handler ); + return fn.apply( this, arguments ); + }) : fn; + + if ( type === "unload" && name !== "one" ) { + this.one( type, data, fn ); + + } else { + for ( var i = 0, l = this.length; i < l; i++ ) { + jQuery.event.add( this[i], type, handler, data ); + } + } + + return this; + }; +}); + +jQuery.fn.extend({ + unbind: function( type, fn ) { + // Handle object literals + if ( typeof type === "object" && !type.preventDefault ) { + for ( var key in type ) { + this.unbind(key, type[key]); + } + + } else { + for ( var i = 0, l = this.length; i < l; i++ ) { + jQuery.event.remove( this[i], type, fn ); + } + } + + return this; + }, + + delegate: function( selector, types, data, fn ) { + return this.live( types, data, fn, selector ); + }, + + undelegate: function( selector, types, fn ) { + if ( arguments.length === 0 ) { + return this.unbind( "live" ); + + } else { + return this.die( types, null, fn, selector ); + } + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + + triggerHandler: function( type, data ) { + if ( this[0] ) { + var event = jQuery.Event( type ); + event.preventDefault(); + event.stopPropagation(); + jQuery.event.trigger( event, data, this[0] ); + return event.result; + } + }, + + toggle: function( fn ) { + // Save reference to arguments for access in closure + var args = arguments, + i = 1; + + // link all the functions, so any of them can unbind this click handler + while ( i < args.length ) { + jQuery.proxy( fn, args[ i++ ] ); + } + + return this.click( jQuery.proxy( fn, function( event ) { + // Figure out which function to execute + var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; + jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); + + // Make sure that clicks stop + event.preventDefault(); + + // and execute the function + return args[ lastToggle ].apply( this, arguments ) || false; + })); + }, + + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +}); + +var liveMap = { + focus: "focusin", + blur: "focusout", + mouseenter: "mouseover", + mouseleave: "mouseout" +}; + +jQuery.each(["live", "die"], function( i, name ) { + jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) { + var type, i = 0, match, namespaces, preType, + selector = origSelector || this.selector, + context = origSelector ? this : jQuery( this.context ); + + if ( typeof types === "object" && !types.preventDefault ) { + for ( var key in types ) { + context[ name ]( key, data, types[key], selector ); + } + + return this; + } + + if ( jQuery.isFunction( data ) ) { + fn = data; + data = undefined; + } + + types = (types || "").split(" "); + + while ( (type = types[ i++ ]) != null ) { + match = rnamespaces.exec( type ); + namespaces = ""; + + if ( match ) { + namespaces = match[0]; + type = type.replace( rnamespaces, "" ); + } + + if ( type === "hover" ) { + types.push( "mouseenter" + namespaces, "mouseleave" + namespaces ); + continue; + } + + preType = type; + + if ( type === "focus" || type === "blur" ) { + types.push( liveMap[ type ] + namespaces ); + type = type + namespaces; + + } else { + type = (liveMap[ type ] || type) + namespaces; + } + + if ( name === "live" ) { + // bind live handler + for ( var j = 0, l = context.length; j < l; j++ ) { + jQuery.event.add( context[j], "live." + liveConvert( type, selector ), + { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } ); + } + + } else { + // unbind live handler + context.unbind( "live." + liveConvert( type, selector ), fn ); + } + } + + return this; + }; +}); + +function liveHandler( event ) { + var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret, + elems = [], + selectors = [], + events = jQuery._data( this, eventKey ); + + if ( typeof events === "function" ) { + events = events.events; + } + + // Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911) + if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) { + return; + } + + if ( event.namespace ) { + namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)"); + } + + event.liveFired = this; + + var live = events.live.slice(0); + + for ( j = 0; j < live.length; j++ ) { + handleObj = live[j]; + + if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) { + selectors.push( handleObj.selector ); + + } else { + live.splice( j--, 1 ); + } + } + + match = jQuery( event.target ).closest( selectors, event.currentTarget ); + + for ( i = 0, l = match.length; i < l; i++ ) { + close = match[i]; + + for ( j = 0; j < live.length; j++ ) { + handleObj = live[j]; + + if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) ) { + elem = close.elem; + related = null; + + // Those two events require additional checking + if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) { + event.type = handleObj.preType; + related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0]; + } + + if ( !related || related !== elem ) { + elems.push({ elem: elem, handleObj: handleObj, level: close.level }); + } + } + } + } + + for ( i = 0, l = elems.length; i < l; i++ ) { + match = elems[i]; + + if ( maxLevel && match.level > maxLevel ) { + break; + } + + event.currentTarget = match.elem; + event.data = match.handleObj.data; + event.handleObj = match.handleObj; + + ret = match.handleObj.origHandler.apply( match.elem, arguments ); + + if ( ret === false || event.isPropagationStopped() ) { + maxLevel = match.level; + + if ( ret === false ) { + stop = false; + } + if ( event.isImmediatePropagationStopped() ) { + break; + } + } + } + + return stop; +} + +function liveConvert( type, selector ) { + return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspace, "&"); +} + +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup error").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + if ( fn == null ) { + fn = data; + data = null; + } + + return arguments.length > 0 ? + this.bind( name, data, fn ) : + this.trigger( name ); + }; + + if ( jQuery.attrFn ) { + jQuery.attrFn[ name ] = true; + } +}); + + +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){ + +var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, + done = 0, + toString = Object.prototype.toString, + hasDuplicate = false, + baseHasDuplicate = true; + +// Here we check if the JavaScript engine is using some sort of +// optimization where it does not always call our comparision +// function. If that is the case, discard the hasDuplicate value. +// Thus far that includes Google Chrome. +[0, 0].sort(function() { + baseHasDuplicate = false; + return 0; +}); + +var Sizzle = function( selector, context, results, seed ) { + results = results || []; + context = context || document; + + var origContext = context; + + if ( context.nodeType !== 1 && context.nodeType !== 9 ) { + return []; + } + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + var m, set, checkSet, extra, ret, cur, pop, i, + prune = true, + contextXML = Sizzle.isXML( context ), + parts = [], + soFar = selector; + + // Reset the position of the chunker regexp (start from head) + do { + chunker.exec( "" ); + m = chunker.exec( soFar ); + + if ( m ) { + soFar = m[3]; + + parts.push( m[1] ); + + if ( m[2] ) { + extra = m[3]; + break; + } + } + } while ( m ); + + if ( parts.length > 1 && origPOS.exec( selector ) ) { + + if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { + set = posProcess( parts[0] + parts[1], context ); + + } else { + set = Expr.relative[ parts[0] ] ? + [ context ] : + Sizzle( parts.shift(), context ); + + while ( parts.length ) { + selector = parts.shift(); + + if ( Expr.relative[ selector ] ) { + selector += parts.shift(); + } + + set = posProcess( selector, set ); + } + } + + } else { + // Take a shortcut and set the context if the root selector is an ID + // (but not if it'll be faster if the inner selector is an ID) + if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && + Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { + + ret = Sizzle.find( parts.shift(), context, contextXML ); + context = ret.expr ? + Sizzle.filter( ret.expr, ret.set )[0] : + ret.set[0]; + } + + if ( context ) { + ret = seed ? + { expr: parts.pop(), set: makeArray(seed) } : + Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); + + set = ret.expr ? + Sizzle.filter( ret.expr, ret.set ) : + ret.set; + + if ( parts.length > 0 ) { + checkSet = makeArray( set ); + + } else { + prune = false; + } + + while ( parts.length ) { + cur = parts.pop(); + pop = cur; + + if ( !Expr.relative[ cur ] ) { + cur = ""; + } else { + pop = parts.pop(); + } + + if ( pop == null ) { + pop = context; + } + + Expr.relative[ cur ]( checkSet, pop, contextXML ); + } + + } else { + checkSet = parts = []; + } + } + + if ( !checkSet ) { + checkSet = set; + } + + if ( !checkSet ) { + Sizzle.error( cur || selector ); + } + + if ( toString.call(checkSet) === "[object Array]" ) { + if ( !prune ) { + results.push.apply( results, checkSet ); + + } else if ( context && context.nodeType === 1 ) { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { + results.push( set[i] ); + } + } + + } else { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && checkSet[i].nodeType === 1 ) { + results.push( set[i] ); + } + } + } + + } else { + makeArray( checkSet, results ); + } + + if ( extra ) { + Sizzle( extra, origContext, results, seed ); + Sizzle.uniqueSort( results ); + } + + return results; +}; + +Sizzle.uniqueSort = function( results ) { + if ( sortOrder ) { + hasDuplicate = baseHasDuplicate; + results.sort( sortOrder ); + + if ( hasDuplicate ) { + for ( var i = 1; i < results.length; i++ ) { + if ( results[i] === results[ i - 1 ] ) { + results.splice( i--, 1 ); + } + } + } + } + + return results; +}; + +Sizzle.matches = function( expr, set ) { + return Sizzle( expr, null, null, set ); +}; + +Sizzle.matchesSelector = function( node, expr ) { + return Sizzle( expr, null, null, [node] ).length > 0; +}; + +Sizzle.find = function( expr, context, isXML ) { + var set; + + if ( !expr ) { + return []; + } + + for ( var i = 0, l = Expr.order.length; i < l; i++ ) { + var match, + type = Expr.order[i]; + + if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { + var left = match[1]; + match.splice( 1, 1 ); + + if ( left.substr( left.length - 1 ) !== "\\" ) { + match[1] = (match[1] || "").replace(/\\/g, ""); + set = Expr.find[ type ]( match, context, isXML ); + + if ( set != null ) { + expr = expr.replace( Expr.match[ type ], "" ); + break; + } + } + } + } + + if ( !set ) { + set = typeof context.getElementsByTagName !== "undefined" ? + context.getElementsByTagName( "*" ) : + []; + } + + return { set: set, expr: expr }; +}; + +Sizzle.filter = function( expr, set, inplace, not ) { + var match, anyFound, + old = expr, + result = [], + curLoop = set, + isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); + + while ( expr && set.length ) { + for ( var type in Expr.filter ) { + if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { + var found, item, + filter = Expr.filter[ type ], + left = match[1]; + + anyFound = false; + + match.splice(1,1); + + if ( left.substr( left.length - 1 ) === "\\" ) { + continue; + } + + if ( curLoop === result ) { + result = []; + } + + if ( Expr.preFilter[ type ] ) { + match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); + + if ( !match ) { + anyFound = found = true; + + } else if ( match === true ) { + continue; + } + } + + if ( match ) { + for ( var i = 0; (item = curLoop[i]) != null; i++ ) { + if ( item ) { + found = filter( item, match, i, curLoop ); + var pass = not ^ !!found; + + if ( inplace && found != null ) { + if ( pass ) { + anyFound = true; + + } else { + curLoop[i] = false; + } + + } else if ( pass ) { + result.push( item ); + anyFound = true; + } + } + } + } + + if ( found !== undefined ) { + if ( !inplace ) { + curLoop = result; + } + + expr = expr.replace( Expr.match[ type ], "" ); + + if ( !anyFound ) { + return []; + } + + break; + } + } + } + + // Improper expression + if ( expr === old ) { + if ( anyFound == null ) { + Sizzle.error( expr ); + + } else { + break; + } + } + + old = expr; + } + + return curLoop; +}; + +Sizzle.error = function( msg ) { + throw "Syntax error, unrecognized expression: " + msg; +}; + +var Expr = Sizzle.selectors = { + order: [ "ID", "NAME", "TAG" ], + + match: { + ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, + ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, + TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, + CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, + POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, + PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ + }, + + leftMatch: {}, + + attrMap: { + "class": "className", + "for": "htmlFor" + }, + + attrHandle: { + href: function( elem ) { + return elem.getAttribute( "href" ); + } + }, + + relative: { + "+": function(checkSet, part){ + var isPartStr = typeof part === "string", + isTag = isPartStr && !/\W/.test( part ), + isPartStrNotTag = isPartStr && !isTag; + + if ( isTag ) { + part = part.toLowerCase(); + } + + for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { + if ( (elem = checkSet[i]) ) { + while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} + + checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? + elem || false : + elem === part; + } + } + + if ( isPartStrNotTag ) { + Sizzle.filter( part, checkSet, true ); + } + }, + + ">": function( checkSet, part ) { + var elem, + isPartStr = typeof part === "string", + i = 0, + l = checkSet.length; + + if ( isPartStr && !/\W/.test( part ) ) { + part = part.toLowerCase(); + + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + var parent = elem.parentNode; + checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; + } + } + + } else { + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + checkSet[i] = isPartStr ? + elem.parentNode : + elem.parentNode === part; + } + } + + if ( isPartStr ) { + Sizzle.filter( part, checkSet, true ); + } + } + }, + + "": function(checkSet, part, isXML){ + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !/\W/.test(part) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); + }, + + "~": function( checkSet, part, isXML ) { + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !/\W/.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); + } + }, + + find: { + ID: function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }, + + NAME: function( match, context ) { + if ( typeof context.getElementsByName !== "undefined" ) { + var ret = [], + results = context.getElementsByName( match[1] ); + + for ( var i = 0, l = results.length; i < l; i++ ) { + if ( results[i].getAttribute("name") === match[1] ) { + ret.push( results[i] ); + } + } + + return ret.length === 0 ? null : ret; + } + }, + + TAG: function( match, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( match[1] ); + } + } + }, + preFilter: { + CLASS: function( match, curLoop, inplace, result, not, isXML ) { + match = " " + match[1].replace(/\\/g, "") + " "; + + if ( isXML ) { + return match; + } + + for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { + if ( elem ) { + if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { + if ( !inplace ) { + result.push( elem ); + } + + } else if ( inplace ) { + curLoop[i] = false; + } + } + } + + return false; + }, + + ID: function( match ) { + return match[1].replace(/\\/g, ""); + }, + + TAG: function( match, curLoop ) { + return match[1].toLowerCase(); + }, + + CHILD: function( match ) { + if ( match[1] === "nth" ) { + if ( !match[2] ) { + Sizzle.error( match[0] ); + } + + match[2] = match[2].replace(/^\+|\s*/g, ''); + + // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' + var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( + match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || + !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); + + // calculate the numbers (first)n+(last) including if they are negative + match[2] = (test[1] + (test[2] || 1)) - 0; + match[3] = test[3] - 0; + } + else if ( match[2] ) { + Sizzle.error( match[0] ); + } + + // TODO: Move to normal caching system + match[0] = done++; + + return match; + }, + + ATTR: function( match, curLoop, inplace, result, not, isXML ) { + var name = match[1] = match[1].replace(/\\/g, ""); + + if ( !isXML && Expr.attrMap[name] ) { + match[1] = Expr.attrMap[name]; + } + + // Handle if an un-quoted value was used + match[4] = ( match[4] || match[5] || "" ).replace(/\\/g, ""); + + if ( match[2] === "~=" ) { + match[4] = " " + match[4] + " "; + } + + return match; + }, + + PSEUDO: function( match, curLoop, inplace, result, not ) { + if ( match[1] === "not" ) { + // If we're dealing with a complex expression, or a simple one + if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { + match[3] = Sizzle(match[3], null, null, curLoop); + + } else { + var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); + + if ( !inplace ) { + result.push.apply( result, ret ); + } + + return false; + } + + } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { + return true; + } + + return match; + }, + + POS: function( match ) { + match.unshift( true ); + + return match; + } + }, + + filters: { + enabled: function( elem ) { + return elem.disabled === false && elem.type !== "hidden"; + }, + + disabled: function( elem ) { + return elem.disabled === true; + }, + + checked: function( elem ) { + return elem.checked === true; + }, + + selected: function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + elem.parentNode.selectedIndex; + + return elem.selected === true; + }, + + parent: function( elem ) { + return !!elem.firstChild; + }, + + empty: function( elem ) { + return !elem.firstChild; + }, + + has: function( elem, i, match ) { + return !!Sizzle( match[3], elem ).length; + }, + + header: function( elem ) { + return (/h\d/i).test( elem.nodeName ); + }, + + text: function( elem ) { + return "text" === elem.type; + }, + radio: function( elem ) { + return "radio" === elem.type; + }, + + checkbox: function( elem ) { + return "checkbox" === elem.type; + }, + + file: function( elem ) { + return "file" === elem.type; + }, + password: function( elem ) { + return "password" === elem.type; + }, + + submit: function( elem ) { + return "submit" === elem.type; + }, + + image: function( elem ) { + return "image" === elem.type; + }, + + reset: function( elem ) { + return "reset" === elem.type; + }, + + button: function( elem ) { + return "button" === elem.type || elem.nodeName.toLowerCase() === "button"; + }, + + input: function( elem ) { + return (/input|select|textarea|button/i).test( elem.nodeName ); + } + }, + setFilters: { + first: function( elem, i ) { + return i === 0; + }, + + last: function( elem, i, match, array ) { + return i === array.length - 1; + }, + + even: function( elem, i ) { + return i % 2 === 0; + }, + + odd: function( elem, i ) { + return i % 2 === 1; + }, + + lt: function( elem, i, match ) { + return i < match[3] - 0; + }, + + gt: function( elem, i, match ) { + return i > match[3] - 0; + }, + + nth: function( elem, i, match ) { + return match[3] - 0 === i; + }, + + eq: function( elem, i, match ) { + return match[3] - 0 === i; + } + }, + filter: { + PSEUDO: function( elem, match, i, array ) { + var name = match[1], + filter = Expr.filters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + + } else if ( name === "contains" ) { + return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0; + + } else if ( name === "not" ) { + var not = match[3]; + + for ( var j = 0, l = not.length; j < l; j++ ) { + if ( not[j] === elem ) { + return false; + } + } + + return true; + + } else { + Sizzle.error( name ); + } + }, + + CHILD: function( elem, match ) { + var type = match[1], + node = elem; + + switch ( type ) { + case "only": + case "first": + while ( (node = node.previousSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + if ( type === "first" ) { + return true; + } + + node = elem; + + case "last": + while ( (node = node.nextSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + return true; + + case "nth": + var first = match[2], + last = match[3]; + + if ( first === 1 && last === 0 ) { + return true; + } + + var doneName = match[0], + parent = elem.parentNode; + + if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) { + var count = 0; + + for ( node = parent.firstChild; node; node = node.nextSibling ) { + if ( node.nodeType === 1 ) { + node.nodeIndex = ++count; + } + } + + parent.sizcache = doneName; + } + + var diff = elem.nodeIndex - last; + + if ( first === 0 ) { + return diff === 0; + + } else { + return ( diff % first === 0 && diff / first >= 0 ); + } + } + }, + + ID: function( elem, match ) { + return elem.nodeType === 1 && elem.getAttribute("id") === match; + }, + + TAG: function( elem, match ) { + return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match; + }, + + CLASS: function( elem, match ) { + return (" " + (elem.className || elem.getAttribute("class")) + " ") + .indexOf( match ) > -1; + }, + + ATTR: function( elem, match ) { + var name = match[1], + result = Expr.attrHandle[ name ] ? + Expr.attrHandle[ name ]( elem ) : + elem[ name ] != null ? + elem[ name ] : + elem.getAttribute( name ), + value = result + "", + type = match[2], + check = match[4]; + + return result == null ? + type === "!=" : + type === "=" ? + value === check : + type === "*=" ? + value.indexOf(check) >= 0 : + type === "~=" ? + (" " + value + " ").indexOf(check) >= 0 : + !check ? + value && result !== false : + type === "!=" ? + value !== check : + type === "^=" ? + value.indexOf(check) === 0 : + type === "$=" ? + value.substr(value.length - check.length) === check : + type === "|=" ? + value === check || value.substr(0, check.length + 1) === check + "-" : + false; + }, + + POS: function( elem, match, i, array ) { + var name = match[2], + filter = Expr.setFilters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + } + } + } +}; + +var origPOS = Expr.match.POS, + fescape = function(all, num){ + return "\\" + (num - 0 + 1); + }; + +for ( var type in Expr.match ) { + Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); + Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); +} + +var makeArray = function( array, results ) { + array = Array.prototype.slice.call( array, 0 ); + + if ( results ) { + results.push.apply( results, array ); + return results; + } + + return array; +}; + +// Perform a simple check to determine if the browser is capable of +// converting a NodeList to an array using builtin methods. +// Also verifies that the returned array holds DOM nodes +// (which is not the case in the Blackberry browser) +try { + Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; + +// Provide a fallback method if it does not work +} catch( e ) { + makeArray = function( array, results ) { + var i = 0, + ret = results || []; + + if ( toString.call(array) === "[object Array]" ) { + Array.prototype.push.apply( ret, array ); + + } else { + if ( typeof array.length === "number" ) { + for ( var l = array.length; i < l; i++ ) { + ret.push( array[i] ); + } + + } else { + for ( ; array[i]; i++ ) { + ret.push( array[i] ); + } + } + } + + return ret; + }; +} + +var sortOrder, siblingCheck; + +if ( document.documentElement.compareDocumentPosition ) { + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { + return a.compareDocumentPosition ? -1 : 1; + } + + return a.compareDocumentPosition(b) & 4 ? -1 : 1; + }; + +} else { + sortOrder = function( a, b ) { + var al, bl, + ap = [], + bp = [], + aup = a.parentNode, + bup = b.parentNode, + cur = aup; + + // The nodes are identical, we can exit early + if ( a === b ) { + hasDuplicate = true; + return 0; + + // If the nodes are siblings (or identical) we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + + // If no parents were found then the nodes are disconnected + } else if ( !aup ) { + return -1; + + } else if ( !bup ) { + return 1; + } + + // Otherwise they're somewhere else in the tree so we need + // to build up a full list of the parentNodes for comparison + while ( cur ) { + ap.unshift( cur ); + cur = cur.parentNode; + } + + cur = bup; + + while ( cur ) { + bp.unshift( cur ); + cur = cur.parentNode; + } + + al = ap.length; + bl = bp.length; + + // Start walking down the tree looking for a discrepancy + for ( var i = 0; i < al && i < bl; i++ ) { + if ( ap[i] !== bp[i] ) { + return siblingCheck( ap[i], bp[i] ); + } + } + + // We ended someplace up the tree so do a sibling check + return i === al ? + siblingCheck( a, bp[i], -1 ) : + siblingCheck( ap[i], b, 1 ); + }; + + siblingCheck = function( a, b, ret ) { + if ( a === b ) { + return ret; + } + + var cur = a.nextSibling; + + while ( cur ) { + if ( cur === b ) { + return -1; + } + + cur = cur.nextSibling; + } + + return 1; + }; +} + +// Utility function for retreiving the text value of an array of DOM nodes +Sizzle.getText = function( elems ) { + var ret = "", elem; + + for ( var i = 0; elems[i]; i++ ) { + elem = elems[i]; + + // Get the text from text nodes and CDATA nodes + if ( elem.nodeType === 3 || elem.nodeType === 4 ) { + ret += elem.nodeValue; + + // Traverse everything else, except comment nodes + } else if ( elem.nodeType !== 8 ) { + ret += Sizzle.getText( elem.childNodes ); + } + } + + return ret; +}; + +// Check to see if the browser returns elements by name when +// querying by getElementById (and provide a workaround) +(function(){ + // We're going to inject a fake input element with a specified name + var form = document.createElement("div"), + id = "script" + (new Date()).getTime(), + root = document.documentElement; + + form.innerHTML = ""; + + // Inject it into the root element, check its status, and remove it quickly + root.insertBefore( form, root.firstChild ); + + // The workaround has to do additional checks after a getElementById + // Which slows things down for other browsers (hence the branching) + if ( document.getElementById( id ) ) { + Expr.find.ID = function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + + return m ? + m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? + [m] : + undefined : + []; + } + }; + + Expr.filter.ID = function( elem, match ) { + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); + + return elem.nodeType === 1 && node && node.nodeValue === match; + }; + } + + root.removeChild( form ); + + // release memory in IE + root = form = null; +})(); + +(function(){ + // Check to see if the browser returns only elements + // when doing getElementsByTagName("*") + + // Create a fake element + var div = document.createElement("div"); + div.appendChild( document.createComment("") ); + + // Make sure no comments are found + if ( div.getElementsByTagName("*").length > 0 ) { + Expr.find.TAG = function( match, context ) { + var results = context.getElementsByTagName( match[1] ); + + // Filter out possible comments + if ( match[1] === "*" ) { + var tmp = []; + + for ( var i = 0; results[i]; i++ ) { + if ( results[i].nodeType === 1 ) { + tmp.push( results[i] ); + } + } + + results = tmp; + } + + return results; + }; + } + + // Check to see if an attribute returns normalized href attributes + div.innerHTML = ""; + + if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && + div.firstChild.getAttribute("href") !== "#" ) { + + Expr.attrHandle.href = function( elem ) { + return elem.getAttribute( "href", 2 ); + }; + } + + // release memory in IE + div = null; +})(); + +if ( document.querySelectorAll ) { + (function(){ + var oldSizzle = Sizzle, + div = document.createElement("div"), + id = "__sizzle__"; + + div.innerHTML = "

"; + + // Safari can't handle uppercase or unicode characters when + // in quirks mode. + if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { + return; + } + + Sizzle = function( query, context, extra, seed ) { + context = context || document; + + // Only use querySelectorAll on non-XML documents + // (ID selectors don't work in non-HTML documents) + if ( !seed && !Sizzle.isXML(context) ) { + // See if we find a selector to speed up + var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); + + if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { + // Speed-up: Sizzle("TAG") + if ( match[1] ) { + return makeArray( context.getElementsByTagName( query ), extra ); + + // Speed-up: Sizzle(".CLASS") + } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { + return makeArray( context.getElementsByClassName( match[2] ), extra ); + } + } + + if ( context.nodeType === 9 ) { + // Speed-up: Sizzle("body") + // The body element only exists once, optimize finding it + if ( query === "body" && context.body ) { + return makeArray( [ context.body ], extra ); + + // Speed-up: Sizzle("#ID") + } else if ( match && match[3] ) { + var elem = context.getElementById( match[3] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id === match[3] ) { + return makeArray( [ elem ], extra ); + } + + } else { + return makeArray( [], extra ); + } + } + + try { + return makeArray( context.querySelectorAll(query), extra ); + } catch(qsaError) {} + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + var old = context.getAttribute( "id" ), + nid = old || id, + hasParent = context.parentNode, + relativeHierarchySelector = /^\s*[+~]/.test( query ); + + if ( !old ) { + context.setAttribute( "id", nid ); + } else { + nid = nid.replace( /'/g, "\\$&" ); + } + if ( relativeHierarchySelector && hasParent ) { + context = context.parentNode; + } + + try { + if ( !relativeHierarchySelector || hasParent ) { + return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); + } + + } catch(pseudoError) { + } finally { + if ( !old ) { + context.removeAttribute( "id" ); + } + } + } + } + + return oldSizzle(query, context, extra, seed); + }; + + for ( var prop in oldSizzle ) { + Sizzle[ prop ] = oldSizzle[ prop ]; + } + + // release memory in IE + div = null; + })(); +} + +(function(){ + var html = document.documentElement, + matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector, + pseudoWorks = false; + + try { + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( document.documentElement, "[test!='']:sizzle" ); + + } catch( pseudoError ) { + pseudoWorks = true; + } + + if ( matches ) { + Sizzle.matchesSelector = function( node, expr ) { + // Make sure that attribute selectors are quoted + expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); + + if ( !Sizzle.isXML( node ) ) { + try { + if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { + return matches.call( node, expr ); + } + } catch(e) {} + } + + return Sizzle(expr, null, null, [node]).length > 0; + }; + } +})(); + +(function(){ + var div = document.createElement("div"); + + div.innerHTML = "
"; + + // Opera can't find a second classname (in 9.6) + // Also, make sure that getElementsByClassName actually exists + if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { + return; + } + + // Safari caches class attributes, doesn't catch changes (in 3.2) + div.lastChild.className = "e"; + + if ( div.getElementsByClassName("e").length === 1 ) { + return; + } + + Expr.order.splice(1, 0, "CLASS"); + Expr.find.CLASS = function( match, context, isXML ) { + if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { + return context.getElementsByClassName(match[1]); + } + }; + + // release memory in IE + div = null; +})(); + +function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem.sizcache === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 && !isXML ){ + elem.sizcache = doneName; + elem.sizset = i; + } + + if ( elem.nodeName.toLowerCase() === cur ) { + match = elem; + break; + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem.sizcache === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 ) { + if ( !isXML ) { + elem.sizcache = doneName; + elem.sizset = i; + } + + if ( typeof cur !== "string" ) { + if ( elem === cur ) { + match = true; + break; + } + + } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { + match = elem; + break; + } + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +if ( document.documentElement.contains ) { + Sizzle.contains = function( a, b ) { + return a !== b && (a.contains ? a.contains(b) : true); + }; + +} else if ( document.documentElement.compareDocumentPosition ) { + Sizzle.contains = function( a, b ) { + return !!(a.compareDocumentPosition(b) & 16); + }; + +} else { + Sizzle.contains = function() { + return false; + }; +} + +Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; + + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +var posProcess = function( selector, context ) { + var match, + tmpSet = [], + later = "", + root = context.nodeType ? [context] : context; + + // Position selectors must be done after the filter + // And so must :not(positional) so we move all PSEUDOs to the end + while ( (match = Expr.match.PSEUDO.exec( selector )) ) { + later += match[0]; + selector = selector.replace( Expr.match.PSEUDO, "" ); + } + + selector = Expr.relative[selector] ? selector + "*" : selector; + + for ( var i = 0, l = root.length; i < l; i++ ) { + Sizzle( selector, root[i], tmpSet ); + } + + return Sizzle.filter( later, tmpSet ); +}; + +// EXPOSE +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.filters; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})(); + + +var runtil = /Until$/, + rparentsprev = /^(?:parents|prevUntil|prevAll)/, + // Note: This RegExp should be improved, or likely pulled from Sizzle + rmultiselector = /,/, + isSimple = /^.[^:#\[\.,]*$/, + slice = Array.prototype.slice, + POS = jQuery.expr.match.POS, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var ret = this.pushStack( "", "find", selector ), + length = 0; + + for ( var i = 0, l = this.length; i < l; i++ ) { + length = ret.length; + jQuery.find( selector, this[i], ret ); + + if ( i > 0 ) { + // Make sure that the results are unique + for ( var n = length; n < ret.length; n++ ) { + for ( var r = 0; r < length; r++ ) { + if ( ret[r] === ret[n] ) { + ret.splice(n--, 1); + break; + } + } + } + } + } + + return ret; + }, + + has: function( target ) { + var targets = jQuery( target ); + return this.filter(function() { + for ( var i = 0, l = targets.length; i < l; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector, false), "not", selector); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector, true), "filter", selector ); + }, + + is: function( selector ) { + return !!selector && jQuery.filter( selector, this ).length > 0; + }, + + closest: function( selectors, context ) { + var ret = [], i, l, cur = this[0]; + + if ( jQuery.isArray( selectors ) ) { + var match, selector, + matches = {}, + level = 1; + + if ( cur && selectors.length ) { + for ( i = 0, l = selectors.length; i < l; i++ ) { + selector = selectors[i]; + + if ( !matches[selector] ) { + matches[selector] = jQuery.expr.match.POS.test( selector ) ? + jQuery( selector, context || this.context ) : + selector; + } + } + + while ( cur && cur.ownerDocument && cur !== context ) { + for ( selector in matches ) { + match = matches[selector]; + + if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) { + ret.push({ selector: selector, elem: cur, level: level }); + } + } + + cur = cur.parentNode; + level++; + } + } + + return ret; + } + + var pos = POS.test( selectors ) ? + jQuery( selectors, context || this.context ) : null; + + for ( i = 0, l = this.length; i < l; i++ ) { + cur = this[i]; + + while ( cur ) { + if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { + ret.push( cur ); + break; + + } else { + cur = cur.parentNode; + if ( !cur || !cur.ownerDocument || cur === context ) { + break; + } + } + } + } + + ret = ret.length > 1 ? jQuery.unique(ret) : ret; + + return this.pushStack( ret, "closest", selectors ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + if ( !elem || typeof elem === "string" ) { + return jQuery.inArray( this[0], + // If it receives a string, the selector is used + // If it receives nothing, the siblings are used + elem ? jQuery( elem ) : this.parent().children() ); + } + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? + all : + jQuery.unique( all ) ); + }, + + andSelf: function() { + return this.add( this.prevObject ); + } +}); + +// A painfully simple check to see if an element is disconnected +// from a document (should be improved, where feasible). +function isDisconnected( node ) { + return !node || !node.parentNode || node.parentNode.nodeType === 11; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return jQuery.nth( elem, 2, "nextSibling" ); + }, + prev: function( elem ) { + return jQuery.nth( elem, 2, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( elem.parentNode.firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.makeArray( elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ), + // The variable 'args' was introduced in + // https://github.com/jquery/jquery/commit/52a0238 + // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed. + // http://code.google.com/p/v8/issues/detail?id=1050 + args = slice.call(arguments); + + if ( !runtil.test( name ) ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; + + if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + + return this.pushStack( ret, name, args.join(",") ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 ? + jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : + jQuery.find.matches(expr, elems); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + nth: function( cur, result, dir, elem ) { + result = result || 1; + var num = 0; + + for ( ; cur; cur = cur[dir] ) { + if ( cur.nodeType === 1 && ++num === result ) { + break; + } + } + + return cur; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, keep ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep(elements, function( elem, i ) { + var retVal = !!qualifier.call( elem, i, elem ); + return retVal === keep; + }); + + } else if ( qualifier.nodeType ) { + return jQuery.grep(elements, function( elem, i ) { + return (elem === qualifier) === keep; + }); + + } else if ( typeof qualifier === "string" ) { + var filtered = jQuery.grep(elements, function( elem ) { + return elem.nodeType === 1; + }); + + if ( isSimple.test( qualifier ) ) { + return jQuery.filter(qualifier, filtered, !keep); + } else { + qualifier = jQuery.filter( qualifier, filtered ); + } + } + + return jQuery.grep(elements, function( elem, i ) { + return (jQuery.inArray( elem, qualifier ) >= 0) === keep; + }); +} + + + + +var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, + rtagName = /<([\w:]+)/, + rtbody = /", "" ], + legend: [ 1, "
", "
" ], + thead: [ 1, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + col: [ 2, "", "
" ], + area: [ 1, "", "" ], + _default: [ 0, "", "" ] + }; + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// IE can't serialize and - + @@ -45,7 +42,7 @@   ::   Contents   ::   - Publications  » + 6. Voxel Plot Binary File Specifications  »

@@ -58,1304 +55,1304 @@

5.1. Revision 8

integer(4) REVISION_STATEPOINT

-
Revision of the binary state point file. Any time a change is made in the -format of the state-point file, this integer is incremented.
+Revision of the binary state point file. Any time a change is made in the +format of the state-point file, this integer is incremented.

integer(4) VERSION_MAJOR

-
Major version number for OpenMC
+Major version number for OpenMC

integer(4) VERSION_MINOR

-
Minor version number for OpenMC
+Minor version number for OpenMC

integer(4) VERSION_RELEASE

-
Release version number for OpenMC
+Release version number for OpenMC

character(19) time_stamp

-
Date and time the state point was written.
+Date and time the state point was written.

character(255) path

-
Absolute path to directory containing input files.
+Absolute path to directory containing input files.

integer(8) seed

-
Pseudo-random number generator seed.
+Pseudo-random number generator seed.

integer(4) run_mode

-
run mode used. The modes are described in constants.F90.
+run mode used. The modes are described in constants.F90.

integer(8) n_particles

-
Number of particles used per generation.
+Number of particles used per generation.

integer(4) n_batches

-
Total number of batches (active + inactive).
+Total number of batches (active + inactive).

integer(4) current_batch

-
The number of batches already simulated.
+The number of batches already simulated.

if (run_mode == MODE_EIGENVALUE)

-

integer(4) n_inactive

+

integer(4) n_inactive

-
Number of inactive batches
+Number of inactive batches

integer(4) gen_per_batch

-
Number of generations per batch for criticality calculations
+Number of generations per batch for criticality calculations

do i = 1, current_batch

-

real(8) k_batch(i)

+

real(8) k_batch(i)

-
k-effective for the i-th batch
-
+k-effective for the i-th batch +

do i = 1, current_batch * gen_per_batch

-

real(8) entropy(i)

+

real(8) entropy(i)

-
Shannon entropy for the i-th batch
-
+Shannon entropy for the i-th batch +

real(8) k_col_abs

-
Sum of product of collision/absorption estimates of k-effective
+Sum of product of collision/absorption estimates of k-effective

real(8) k_col_tra

-
Sum of product of collision/track-length estimates of k-effective
+Sum of product of collision/track-length estimates of k-effective

real(8) k_abs_tra

-
Sum of product of absorption/track-length estimates of k-effective
+Sum of product of absorption/track-length estimates of k-effective

real(8) k_combined(2)

-
Mean and standard deviation of a combined estimate of k-effective
- +Mean and standard deviation of a combined estimate of k-effective +

integer(4) n_meshes

-
Number of meshes in tallies.xml file
+Number of meshes in tallies.xml file

do i = 1, n_meshes

-

integer(4) meshes(i) % id

+

integer(4) meshes(i) % id

-
Unique ID of mesh.
+Unique ID of mesh.

integer(4) meshes(i) % type

-
Type of mesh.
+Type of mesh.

integer(4) meshes(i) % n_dimension

-
Number of dimensions for mesh (2 or 3).
+Number of dimensions for mesh (2 or 3).

integer(4) meshes(i) % dimension(:)

-
Number of mesh cells in each dimension.
+Number of mesh cells in each dimension.

real(8) meshes(i) % lower_left(:)

-
Coordinates of lower-left corner of mesh.
+Coordinates of lower-left corner of mesh.

real(8) meshes(i) % upper_right(:)

-
Coordinates of upper-right corner of mesh.
+Coordinates of upper-right corner of mesh.

real(8) meshes(i) % width(:)

-
Width of each mesh cell in each dimension.
- +Width of each mesh cell in each dimension. +

integer(4) n_tallies

do i = 1, n_tallies

-

integer(4) tallies(i) % id

+

integer(4) tallies(i) % id

-
Unique ID of tally.
+Unique ID of tally.

integer(4) tallies(i) % n_realizations

-
Number of realizations for the i-th tally.
+Number of realizations for the i-th tally.

integer(4) size(tallies(i) % scores, 1)

-
Total number of score bins for the i-th tally
+Total number of score bins for the i-th tally

integer(4) size(tallies(i) % scores, 2)

-
Total number of filter bins for the i-th tally
+Total number of filter bins for the i-th tally

integer(4) tallies(i) % n_filters

do j = 1, tallies(i) % n_filters

-

integer(4) tallies(i) % filter(j) % type

+

integer(4) tallies(i) % filter(j) % type

-
Type of tally filter.
+Type of tally filter.

integer(4) tallies(i) % filter(j) % n_bins

-
Number of bins for filter.
+Number of bins for filter.

integer(4)/real(8) tallies(i) % filter(j) % bins(:)

-
Value for each filter bin of this type.
- +Value for each filter bin of this type. +

integer(4) tallies(i) % n_nuclide_bins

-
Number of nuclide bins. If none are specified, this is just one.
+Number of nuclide bins. If none are specified, this is just one.

do j = 1, tallies(i) % n_nuclide_bins

-

integer(4) tallies(i) % nuclide_bins(j)

+

integer(4) tallies(i) % nuclide_bins(j)

-
Values of specified nuclide bins
-
+Values of specified nuclide bins +

integer(4) tallies(i) % n_score_bins

-
Number of scoring bins.
+Number of scoring bins.

do j = 1, tallies(i) % n_score_bins

-

integer(4) tallies(i) % score_bins(j)

+

integer(4) tallies(i) % score_bins(j)

-
Values of specified scoring bins (e.g. SCORE_FLUX).
-
+Values of specified scoring bins (e.g. SCORE_FLUX). +

do j = 1, tallies(i) % n_score_bins

-

integer(4) tallies(i) % scatt_order(j)

+

integer(4) tallies(i) % scatt_order(j)

-
Scattering Order specified scoring bins.
-
+Scattering Order specified scoring bins. +

integer(4) tallies(i) % n_score_bins

-
Number of scoring bins without accounting for those added by -the scatter-pn command.
- +Number of scoring bins without accounting for those added by +the scatter-pn command. +

integer(4) n_realizations

-
Number of realizations for global tallies.
+Number of realizations for global tallies.

integer(4) N_GLOBAL_TALLIES

-
Number of global tally scores
+Number of global tally scores

do i = 1, N_GLOBAL_TALLIES

-

real(8) global_tallies(i) % sum

+

real(8) global_tallies(i) % sum

-
Accumulated sum for the i-th global tally
+Accumulated sum for the i-th global tally

real(8) global_tallies(i) % sum_sq

-
Accumulated sum of squares for the i-th global tally
- +Accumulated sum of squares for the i-th global tally +

integer(4) tallies_on

-
Flag indicated if tallies are present in the file.
+Flag indicated if tallies are present in the file.

if (tallies_on > 0)

-

do i = 1, n_tallies

+

do i = 1, n_tallies

-

do k = 1, size(tallies(i) % scores, 2)

+

do k = 1, size(tallies(i) % scores, 2)

-

do j = 1, size(tallies(i) % scores, 1)

+

do j = 1, size(tallies(i) % scores, 1)

-

real(8) tallies(i) % scores(j,k) % sum

+

real(8) tallies(i) % scores(j,k) % sum

-
Accumulated sum for the j-th score and k-th filter of the -i-th tally
+Accumulated sum for the j-th score and k-th filter of the +i-th tally

real(8) tallies(i) % scores(j,k) % sum_sq

-
Accumulated sum of squares for the j-th score and k-th -filter of the i-th tally
-
-
-
- +Accumulated sum of squares for the j-th score and k-th +filter of the i-th tally + + + +

if (run_mode == MODE_EIGENVALUE)

-

do i = 1, n_particles

+

do i = 1, n_particles

-

real(8) source_bank(i) % wgt

+

real(8) source_bank(i) % wgt

-
Weight of the i-th source particle
+Weight of the i-th source particle

real(8) source_bank(i) % xyz(1:3)

-
Coordinates of the i-th source particle.
+Coordinates of the i-th source particle.

real(8) source_bank(i) % uvw(1:3)

-
Direction of the i-th source particle
+Direction of the i-th source particle

real(8) source_bank(i) % E

-
Energy of the i-th source particle.
- - +Energy of the i-th source particle. + +

5.2. Revision 7

integer(4) REVISION_STATEPOINT

-
Revision of the binary state point file. Any time a change is made in the -format of the state-point file, this integer is incremented.
+Revision of the binary state point file. Any time a change is made in the +format of the state-point file, this integer is incremented.

integer(4) VERSION_MAJOR

-
Major version number for OpenMC
+Major version number for OpenMC

integer(4) VERSION_MINOR

-
Minor version number for OpenMC
+Minor version number for OpenMC

integer(4) VERSION_RELEASE

-
Release version number for OpenMC
+Release version number for OpenMC

character(19) time_stamp

-
Date and time the state point was written.
+Date and time the state point was written.

character(255) path

-
Absolute path to directory containing input files.
+Absolute path to directory containing input files.

integer(8) seed

-
Pseudo-random number generator seed.
+Pseudo-random number generator seed.

integer(4) run_mode

-
run mode used. The modes are described in constants.F90.
+run mode used. The modes are described in constants.F90.

integer(8) n_particles

-
Number of particles used per generation.
+Number of particles used per generation.

integer(4) n_batches

-
Total number of batches (active + inactive).
+Total number of batches (active + inactive).

integer(4) current_batch

-
The number of batches already simulated.
+The number of batches already simulated.

if (run_mode == MODE_EIGENVALUE)

-

integer(4) n_inactive

+

integer(4) n_inactive

-
Number of inactive batches
+Number of inactive batches

integer(4) gen_per_batch

-
Number of generations per batch for criticality calculations
+Number of generations per batch for criticality calculations

do i = 1, current_batch

-

real(8) k_batch(i)

+

real(8) k_batch(i)

-
k-effective for the i-th batch
-
+k-effective for the i-th batch +

do i = 1, current_batch * gen_per_batch

-

real(8) entropy(i)

+

real(8) entropy(i)

-
Shannon entropy for the i-th batch
-
-
+Shannon entropy for the i-th batch + +

integer(4) n_meshes

-
Number of meshes in tallies.xml file
+Number of meshes in tallies.xml file

do i = 1, n_meshes

-

integer(4) meshes(i) % id

+

integer(4) meshes(i) % id

-
Unique ID of mesh.
+Unique ID of mesh.

integer(4) meshes(i) % type

-
Type of mesh.
+Type of mesh.

integer(4) meshes(i) % n_dimension

-
Number of dimensions for mesh (2 or 3).
+Number of dimensions for mesh (2 or 3).

integer(4) meshes(i) % dimension(:)

-
Number of mesh cells in each dimension.
+Number of mesh cells in each dimension.

real(8) meshes(i) % lower_left(:)

-
Coordinates of lower-left corner of mesh.
+Coordinates of lower-left corner of mesh.

real(8) meshes(i) % upper_right(:)

-
Coordinates of upper-right corner of mesh.
+Coordinates of upper-right corner of mesh.

real(8) meshes(i) % width(:)

-
Width of each mesh cell in each dimension.
- +Width of each mesh cell in each dimension. +

integer(4) n_tallies

do i = 1, n_tallies

-

integer(4) tallies(i) % id

+

integer(4) tallies(i) % id

-
Unique ID of tally.
+Unique ID of tally.

integer(4) tallies(i) % n_realizations

-
Number of realizations for the i-th tally.
+Number of realizations for the i-th tally.

integer(4) size(tallies(i) % scores, 1)

-
Total number of score bins for the i-th tally
+Total number of score bins for the i-th tally

integer(4) size(tallies(i) % scores, 2)

-
Total number of filter bins for the i-th tally
+Total number of filter bins for the i-th tally

integer(4) tallies(i) % n_filters

do j = 1, tallies(i) % n_filters

-

integer(4) tallies(i) % filter(j) % type

+

integer(4) tallies(i) % filter(j) % type

-
Type of tally filter.
+Type of tally filter.

integer(4) tallies(i) % filter(j) % n_bins

-
Number of bins for filter.
+Number of bins for filter.

integer(4)/real(8) tallies(i) % filter(j) % bins(:)

-
Value for each filter bin of this type.
- +Value for each filter bin of this type. +

integer(4) tallies(i) % n_nuclide_bins

-
Number of nuclide bins. If none are specified, this is just one.
+Number of nuclide bins. If none are specified, this is just one.

do j = 1, tallies(i) % n_nuclide_bins

-

integer(4) tallies(i) % nuclide_bins(j)

+

integer(4) tallies(i) % nuclide_bins(j)

-
Values of specified nuclide bins
-
+Values of specified nuclide bins +

integer(4) tallies(i) % n_score_bins

-
Number of scoring bins.
+Number of scoring bins.

do j = 1, tallies(i) % n_score_bins

-

integer(4) tallies(i) % score_bins(j)

+

integer(4) tallies(i) % score_bins(j)

-
Values of specified scoring bins (e.g. SCORE_FLUX).
-
+Values of specified scoring bins (e.g. SCORE_FLUX). +

do j = 1, tallies(i) % n_score_bins

-

integer(4) tallies(i) % scatt_order(j)

+

integer(4) tallies(i) % scatt_order(j)

-
Scattering Order specified scoring bins.
-
+Scattering Order specified scoring bins. +

integer(4) tallies(i) % n_score_bins

-
Number of scoring bins without accounting for those added by -the scatter-pn command.
- +Number of scoring bins without accounting for those added by +the scatter-pn command. +

integer(4) n_realizations

-
Number of realizations for global tallies.
+Number of realizations for global tallies.

integer(4) N_GLOBAL_TALLIES

-
Number of global tally scores
+Number of global tally scores

do i = 1, N_GLOBAL_TALLIES

-

real(8) global_tallies(i) % sum

+

real(8) global_tallies(i) % sum

-
Accumulated sum for the i-th global tally
+Accumulated sum for the i-th global tally

real(8) global_tallies(i) % sum_sq

-
Accumulated sum of squares for the i-th global tally
- +Accumulated sum of squares for the i-th global tally +

integer(4) tallies_on

-
Flag indicated if tallies are present in the file.
+Flag indicated if tallies are present in the file.

if (tallies_on > 0)

-

do i = 1, n_tallies

+

do i = 1, n_tallies

-

do k = 1, size(tallies(i) % scores, 2)

+

do k = 1, size(tallies(i) % scores, 2)

-

do j = 1, size(tallies(i) % scores, 1)

+

do j = 1, size(tallies(i) % scores, 1)

-

real(8) tallies(i) % scores(j,k) % sum

+

real(8) tallies(i) % scores(j,k) % sum

-
Accumulated sum for the j-th score and k-th filter of the -i-th tally
+Accumulated sum for the j-th score and k-th filter of the +i-th tally

real(8) tallies(i) % scores(j,k) % sum_sq

-
Accumulated sum of squares for the j-th score and k-th -filter of the i-th tally
-
-
-
- +Accumulated sum of squares for the j-th score and k-th +filter of the i-th tally + + + +

if (run_mode == MODE_EIGENVALUE)

-

do i = 1, n_particles

+

do i = 1, n_particles

-

real(8) source_bank(i) % wgt

+

real(8) source_bank(i) % wgt

-
Weight of the i-th source particle
+Weight of the i-th source particle

real(8) source_bank(i) % xyz(1:3)

-
Coordinates of the i-th source particle.
+Coordinates of the i-th source particle.

real(8) source_bank(i) % uvw(1:3)

-
Direction of the i-th source particle
+Direction of the i-th source particle

real(8) source_bank(i) % E

-
Energy of the i-th source particle.
- - +Energy of the i-th source particle. + +

5.3. Revision 6

integer(4) REVISION_STATEPOINT

-
Revision of the binary state point file. Any time a change is made in the -format of the state-point file, this integer is incremented.
+Revision of the binary state point file. Any time a change is made in the +format of the state-point file, this integer is incremented.

integer(4) VERSION_MAJOR

-
Major version number for OpenMC
+Major version number for OpenMC

integer(4) VERSION_MINOR

-
Minor version number for OpenMC
+Minor version number for OpenMC

integer(4) VERSION_RELEASE

-
Release version number for OpenMC
+Release version number for OpenMC

character(19) time_stamp

-
Date and time the state point was written.
+Date and time the state point was written.

character(255) path

-
Absolute path to directory containing input files.
+Absolute path to directory containing input files.

integer(8) seed

-
Pseudo-random number generator seed.
+Pseudo-random number generator seed.

integer(4) run_mode

-
run mode used. The modes are described in constants.F90.
+run mode used. The modes are described in constants.F90.

integer(8) n_particles

-
Number of particles used per generation.
+Number of particles used per generation.

integer(4) n_batches

-
Total number of batches (active + inactive).
+Total number of batches (active + inactive).

integer(4) current_batch

-
The number of batches already simulated.
+The number of batches already simulated.

if (run_mode == MODE_EIGENVALUE)

-

integer(4) n_inactive

+

integer(4) n_inactive

-
Number of inactive batches
+Number of inactive batches

integer(4) gen_per_batch

-
Number of generations per batch for criticality calculations
+Number of generations per batch for criticality calculations

do i = 1, current_batch

-

real(8) k_batch(i)

+

real(8) k_batch(i)

-
k-effective for the i-th batch
-
+k-effective for the i-th batch +

do i = 1, current_batch

-

real(8) entropy(i)

+

real(8) entropy(i)

-
Shannon entropy for the i-th batch
-
-
+Shannon entropy for the i-th batch + +

integer(4) n_meshes

-
Number of meshes in tallies.xml file
+Number of meshes in tallies.xml file

do i = 1, n_meshes

-

integer(4) meshes(i) % id

+

integer(4) meshes(i) % id

-
Unique ID of mesh.
+Unique ID of mesh.

integer(4) meshes(i) % type

-
Type of mesh.
+Type of mesh.

integer(4) meshes(i) % n_dimension

-
Number of dimensions for mesh (2 or 3).
+Number of dimensions for mesh (2 or 3).

integer(4) meshes(i) % dimension(:)

-
Number of mesh cells in each dimension.
+Number of mesh cells in each dimension.

real(8) meshes(i) % lower_left(:)

-
Coordinates of lower-left corner of mesh.
+Coordinates of lower-left corner of mesh.

real(8) meshes(i) % upper_right(:)

-
Coordinates of upper-right corner of mesh.
+Coordinates of upper-right corner of mesh.

real(8) meshes(i) % width(:)

-
Width of each mesh cell in each dimension.
- +Width of each mesh cell in each dimension. +

integer(4) n_tallies

do i = 1, n_tallies

-

integer(4) tallies(i) % id

+

integer(4) tallies(i) % id

-
Unique ID of tally.
+Unique ID of tally.

integer(4) tallies(i) % n_realizations

-
Number of realizations for the i-th tally.
+Number of realizations for the i-th tally.

integer(4) size(tallies(i) % scores, 1)

-
Total number of score bins for the i-th tally
+Total number of score bins for the i-th tally

integer(4) size(tallies(i) % scores, 2)

-
Total number of filter bins for the i-th tally
+Total number of filter bins for the i-th tally

integer(4) tallies(i) % n_filters

do j = 1, tallies(i) % n_filters

-

integer(4) tallies(i) % filter(j) % type

+

integer(4) tallies(i) % filter(j) % type

-
Type of tally filter.
+Type of tally filter.

integer(4) tallies(i) % filter(j) % n_bins

-
Number of bins for filter.
+Number of bins for filter.

integer(4)/real(8) tallies(i) % filter(j) % bins(:)

-
Value for each filter bin of this type.
- +Value for each filter bin of this type. +

integer(4) tallies(i) % n_nuclide_bins

-
Number of nuclide bins. If none are specified, this is just one.
+Number of nuclide bins. If none are specified, this is just one.

do j = 1, tallies(i) % n_nuclide_bins

-

integer(4) tallies(i) % nuclide_bins(j)

+

integer(4) tallies(i) % nuclide_bins(j)

-
Values of specified nuclide bins
-
+Values of specified nuclide bins +

integer(4) tallies(i) % n_score_bins

-
Number of scoring bins.
+Number of scoring bins.

do j = 1, tallies(i) % n_score_bins

-

integer(4) tallies(i) % score_bins(j)

+

integer(4) tallies(i) % score_bins(j)

-
Values of specified scoring bins (e.g. SCORE_FLUX).
-
- +Values of specified scoring bins (e.g. SCORE_FLUX). + +

integer(4) n_realizations

-
Number of realizations for global tallies.
+Number of realizations for global tallies.

integer(4) N_GLOBAL_TALLIES

-
Number of global tally scores
+Number of global tally scores

do i = 1, N_GLOBAL_TALLIES

-

real(8) global_tallies(i) % sum

+

real(8) global_tallies(i) % sum

-
Accumulated sum for the i-th global tally
+Accumulated sum for the i-th global tally

real(8) global_tallies(i) % sum_sq

-
Accumulated sum of squares for the i-th global tally
- +Accumulated sum of squares for the i-th global tally +

integer(4) tallies_on

-
Flag indicated if tallies are present in the file.
+Flag indicated if tallies are present in the file.

if (tallies_on > 0)

-

do i = 1, n_tallies

+

do i = 1, n_tallies

-

do k = 1, size(tallies(i) % scores, 2)

+

do k = 1, size(tallies(i) % scores, 2)

-

do j = 1, size(tallies(i) % scores, 1)

+

do j = 1, size(tallies(i) % scores, 1)

-

real(8) tallies(i) % scores(j,k) % sum

+

real(8) tallies(i) % scores(j,k) % sum

-
Accumulated sum for the j-th score and k-th filter of the -i-th tally
+Accumulated sum for the j-th score and k-th filter of the +i-th tally

real(8) tallies(i) % scores(j,k) % sum_sq

-
Accumulated sum of squares for the j-th score and k-th -filter of the i-th tally
-
-
-
- +Accumulated sum of squares for the j-th score and k-th +filter of the i-th tally + + + +

if (run_mode == MODE_EIGENVALUE)

-

do i = 1, n_particles

+

do i = 1, n_particles

-

real(8) source_bank(i) % wgt

+

real(8) source_bank(i) % wgt

-
Weight of the i-th source particle
+Weight of the i-th source particle

real(8) source_bank(i) % xyz(1:3)

-
Coordinates of the i-th source particle.
+Coordinates of the i-th source particle.

real(8) source_bank(i) % uvw(1:3)

-
Direction of the i-th source particle
+Direction of the i-th source particle

real(8) source_bank(i) % E

-
Energy of the i-th source particle.
- - +Energy of the i-th source particle. + +

5.4. Revision 5

integer(4) REVISION_STATEPOINT

-
Revision of the binary state point file. Any time a change is made in the -format of the state-point file, this integer is incremented.
+Revision of the binary state point file. Any time a change is made in the +format of the state-point file, this integer is incremented.

integer(4) VERSION_MAJOR

-
Major version number for OpenMC
+Major version number for OpenMC

integer(4) VERSION_MINOR

-
Minor version number for OpenMC
+Minor version number for OpenMC

integer(4) VERSION_RELEASE

-
Release version number for OpenMC
+Release version number for OpenMC

character(19) time_stamp

-
Date and time the state point was written.
+Date and time the state point was written.

integer(8) seed

-
Pseudo-random number generator seed.
+Pseudo-random number generator seed.

integer(4) run_mode

-
run mode used. The modes are described in constants.F90.
+run mode used. The modes are described in constants.F90.

integer(8) n_particles

-
Number of particles used per generation.
+Number of particles used per generation.

integer(4) n_batches

-
Total number of batches (active + inactive).
+Total number of batches (active + inactive).

integer(4) current_batch

-
The number of batches already simulated.
+The number of batches already simulated.

if (run_mode == MODE_EIGENVALUE)

-

integer(4) n_inactive

+

integer(4) n_inactive

-
Number of inactive batches
+Number of inactive batches

integer(4) gen_per_batch

-
Number of generations per batch for criticality calculations
+Number of generations per batch for criticality calculations

do i = 1, current_batch

-

real(8) k_batch(i)

+

real(8) k_batch(i)

-
k-effective for the i-th batch
-
+k-effective for the i-th batch +

do i = 1, current_batch

-

real(8) entropy(i)

+

real(8) entropy(i)

-
Shannon entropy for the i-th batch
-
-
+Shannon entropy for the i-th batch + +

integer(4) n_meshes

-
Number of meshes in tallies.xml file
+Number of meshes in tallies.xml file

do i = 1, n_meshes

-

integer(4) meshes(i) % type

+

integer(4) meshes(i) % type

-
Type of mesh.
+Type of mesh.

integer(4) meshes(i) % n_dimension

-
Number of dimensions for mesh (2 or 3).
+Number of dimensions for mesh (2 or 3).

integer(4) meshes(i) % dimension(:)

-
Number of mesh cells in each dimension.
+Number of mesh cells in each dimension.

real(8) meshes(i) % lower_left(:)

-
Coordinates of lower-left corner of mesh.
+Coordinates of lower-left corner of mesh.

real(8) meshes(i) % upper_right(:)

-
Coordinates of upper-right corner of mesh.
+Coordinates of upper-right corner of mesh.

real(8) meshes(i) % width(:)

-
Width of each mesh cell in each dimension.
- +Width of each mesh cell in each dimension. +

integer(4) n_tallies

do i = 1, n_tallies

-

integer(4) tallies(i) % n_realizations

+

integer(4) tallies(i) % n_realizations

-
Number of realizations for the i-th tally.
+Number of realizations for the i-th tally.

integer(4) size(tallies(i) % scores, 1)

-
Total number of score bins for the i-th tally
+Total number of score bins for the i-th tally

integer(4) size(tallies(i) % scores, 2)

-
Total number of filter bins for the i-th tally
+Total number of filter bins for the i-th tally

integer(4) tallies(i) % n_filters

do j = 1, tallies(i) % n_filters

-

integer(4) tallies(i) % filter(j) % type

+

integer(4) tallies(i) % filter(j) % type

-
Type of tally filter.
+Type of tally filter.

integer(4) tallies(i) % filter(j) % n_bins

-
Number of bins for filter.
+Number of bins for filter.

integer(4)/real(8) tallies(i) % filter(j) % bins(:)

-
Value for each filter bin of this type.
- +Value for each filter bin of this type. +

integer(4) tallies(i) % n_nuclide_bins

-
Number of nuclide bins. If none are specified, this is just one.
+Number of nuclide bins. If none are specified, this is just one.

do j = 1, tallies(i) % n_nuclide_bins

-

integer(4) tallies(i) % nuclide_bins(j)

+

integer(4) tallies(i) % nuclide_bins(j)

-
Values of specified nuclide bins
-
+Values of specified nuclide bins +

integer(4) tallies(i) % n_score_bins

-
Number of scoring bins.
+Number of scoring bins.

do j = 1, tallies(i) % n_score_bins

-

integer(4) tallies(i) % score_bins(j)

+

integer(4) tallies(i) % score_bins(j)

-
Values of specified scoring bins (e.g. SCORE_FLUX).
-
- +Values of specified scoring bins (e.g. SCORE_FLUX). + +

integer(4) n_realizations

-
Number of realizations for global tallies.
+Number of realizations for global tallies.

integer(4) N_GLOBAL_TALLIES

-
Number of global tally scores
+Number of global tally scores

do i = 1, N_GLOBAL_TALLIES

-

real(8) global_tallies(i) % sum

+

real(8) global_tallies(i) % sum

-
Accumulated sum for the i-th global tally
+Accumulated sum for the i-th global tally

real(8) global_tallies(i) % sum_sq

-
Accumulated sum of squares for the i-th global tally
- +Accumulated sum of squares for the i-th global tally +

integer(4) tallies_on

-
Flag indicated if tallies are present in the file.
+Flag indicated if tallies are present in the file.

if (tallies_on > 0)

-

do i = 1, n_tallies

+

do i = 1, n_tallies

-

do k = 1, size(tallies(i) % scores, 2)

+

do k = 1, size(tallies(i) % scores, 2)

-

do j = 1, size(tallies(i) % scores, 1)

+

do j = 1, size(tallies(i) % scores, 1)

-

real(8) tallies(i) % scores(j,k) % sum

+

real(8) tallies(i) % scores(j,k) % sum

-
Accumulated sum for the j-th score and k-th filter of the -i-th tally
+Accumulated sum for the j-th score and k-th filter of the +i-th tally

real(8) tallies(i) % scores(j,k) % sum_sq

-
Accumulated sum of squares for the j-th score and k-th -filter of the i-th tally
-
-
-
- +Accumulated sum of squares for the j-th score and k-th +filter of the i-th tally + + + +

if (run_mode == MODE_EIGENVALUE)

-

do i = 1, n_particles

+

do i = 1, n_particles

-

real(8) source_bank(i) % wgt

+

real(8) source_bank(i) % wgt

-
Weight of the i-th source particle
+Weight of the i-th source particle

real(8) source_bank(i) % xyz(1:3)

-
Coordinates of the i-th source particle.
+Coordinates of the i-th source particle.

real(8) source_bank(i) % uvw(1:3)

-
Direction of the i-th source particle
+Direction of the i-th source particle

real(8) source_bank(i) % E

-
Energy of the i-th source particle.
- - +Energy of the i-th source particle. + +

5.5. Revision 4

integer(4) REVISION_STATEPOINT

-
Revision of the binary state point file. Any time a change is made in the -format of the state-point file, this integer is incremented.
+Revision of the binary state point file. Any time a change is made in the +format of the state-point file, this integer is incremented.

integer(4) VERSION_MAJOR

-
Major version number for OpenMC
+Major version number for OpenMC

integer(4) VERSION_MINOR

-
Minor version number for OpenMC
+Minor version number for OpenMC

integer(4) VERSION_RELEASE

-
Release version number for OpenMC
+Release version number for OpenMC

character(19) time_stamp

-
Date and time the state point was written.
+Date and time the state point was written.

integer(8) seed

-
Pseudo-random number generator seed.
+Pseudo-random number generator seed.

integer(4) run_mode

-
run mode used. The modes are described in constants.F90.
+run mode used. The modes are described in constants.F90.

integer(8) n_particles

-
Number of particles used per generation.
+Number of particles used per generation.

integer(4) n_batches

-
Total number of batches (active + inactive).
+Total number of batches (active + inactive).

integer(4) current_batch

-
The number of batches already simulated.
+The number of batches already simulated.

if (run_mode == MODE_EIGENVALUE)

-

integer(4) n_inactive

+

integer(4) n_inactive

-
Number of inactive batches
+Number of inactive batches

integer(4) gen_per_batch

-
Number of generations per batch for criticality calculations
+Number of generations per batch for criticality calculations

do i = 1, current_batch

-

real(8) k_batch(i)

+

real(8) k_batch(i)

-
k-effective for the i-th batch
-
+k-effective for the i-th batch +

do i = 1, current_batch

-

real(8) entropy(i)

+

real(8) entropy(i)

-
Shannon entropy for the i-th batch
-
-
+Shannon entropy for the i-th batch + +

integer(4) n_meshes

-
Number of meshes in tallies.xml file
+Number of meshes in tallies.xml file

do i = 1, n_meshes

-

integer(4) meshes(i) % type

+

integer(4) meshes(i) % type

-
Type of mesh.
+Type of mesh.

integer(4) meshes(i) % n_dimension

-
Number of dimensions for mesh (2 or 3).
+Number of dimensions for mesh (2 or 3).

integer(4) meshes(i) % dimension(:)

-
Number of mesh cells in each dimension.
+Number of mesh cells in each dimension.

real(8) meshes(i) % lower_left(:)

-
Coordinates of lower-left corner of mesh.
+Coordinates of lower-left corner of mesh.

real(8) meshes(i) % upper_right(:)

-
Coordinates of upper-right corner of mesh.
+Coordinates of upper-right corner of mesh.

real(8) meshes(i) % width(:)

-
Width of each mesh cell in each dimension.
- +Width of each mesh cell in each dimension. +

integer(4) n_tallies

do i = 1, n_tallies

-

integer(4) size(tallies(i) % scores, 1)

+

integer(4) size(tallies(i) % scores, 1)

-
Total number of score bins for the i-th tally
+Total number of score bins for the i-th tally

integer(4) size(tallies(i) % scores, 2)

-
Total number of filter bins for the i-th tally
+Total number of filter bins for the i-th tally

integer(4) tallies(i) % n_filters

do j = 1, tallies(i) % n_filters

-

integer(4) tallies(i) % filter(j) % type

+

integer(4) tallies(i) % filter(j) % type

-
Type of tally filter.
+Type of tally filter.

integer(4) tallies(i) % filter(j) % n_bins

-
Number of bins for filter.
+Number of bins for filter.

integer(4)/real(8) tallies(i) % filter(j) % bins(:)

-
Value for each filter bin of this type.
- +Value for each filter bin of this type. +

integer(4) tallies(i) % n_nuclide_bins

-
Number of nuclide bins. If none are specified, this is just one.
+Number of nuclide bins. If none are specified, this is just one.

do j = 1, tallies(i) % n_nuclide_bins

-

integer(4) tallies(i) % nuclide_bins(j)

+

integer(4) tallies(i) % nuclide_bins(j)

-
Values of specified nuclide bins
-
+Values of specified nuclide bins +

integer(4) tallies(i) % n_score_bins

-
Number of scoring bins.
+Number of scoring bins.

do j = 1, tallies(i) % n_score_bins

-

integer(4) tallies(i) % score_bins(j)

+

integer(4) tallies(i) % score_bins(j)

-
Values of specified scoring bins (e.g. SCORE_FLUX).
-
- +Values of specified scoring bins (e.g. SCORE_FLUX). + +

integer(4) N_GLOBAL_TALLIES

-
Number of global tally scores
+Number of global tally scores

do i = 1, N_GLOBAL_TALLIES

-

real(8) global_tallies(i) % sum

+

real(8) global_tallies(i) % sum

-
Accumulated sum for the i-th global tally
+Accumulated sum for the i-th global tally

real(8) global_tallies(i) % sum_sq

-
Accumulated sum of squares for the i-th global tally
- +Accumulated sum of squares for the i-th global tally +

integer(4) tallies_on

-
Flag indicated if tallies are present in the file.
+Flag indicated if tallies are present in the file.

if (tallies_on > 0)

-

integer(4) n_realizations

+

integer(4) n_realizations

-
Number of realizations for tally random variables.
+Number of realizations for tally random variables.

do i = 1, n_tallies

-

do k = 1, size(tallies(i) % scores, 2)

+

do k = 1, size(tallies(i) % scores, 2)

-

do j = 1, size(tallies(i) % scores, 1)

+

do j = 1, size(tallies(i) % scores, 1)

-

real(8) tallies(i) % scores(j,k) % sum

+

real(8) tallies(i) % scores(j,k) % sum

-
Accumulated sum for the j-th score and k-th filter of the -i-th tally
+Accumulated sum for the j-th score and k-th filter of the +i-th tally

real(8) tallies(i) % scores(j,k) % sum_sq

-
Accumulated sum of squares for the j-th score and k-th -filter of the i-th tally
-
-
- - +Accumulated sum of squares for the j-th score and k-th +filter of the i-th tally + + + +

if (run_mode == MODE_EIGENVALUE)

-

do i = 1, n_particles

+

do i = 1, n_particles

-

real(8) source_bank(i) % wgt

+

real(8) source_bank(i) % wgt

-
Weight of the i-th source particle
+Weight of the i-th source particle

real(8) source_bank(i) % xyz(1:3)

-
Coordinates of the i-th source particle.
+Coordinates of the i-th source particle.

real(8) source_bank(i) % uvw(1:3)

-
Direction of the i-th source particle
+Direction of the i-th source particle

real(8) source_bank(i) % E

-
Energy of the i-th source particle.
- - +Energy of the i-th source particle. + +

5.6. Revision 3

integer(4) REVISION_STATEPOINT

-
Revision of the binary state point file. Any time a change is made in the -format of the state-point file, this integer is incremented.
+Revision of the binary state point file. Any time a change is made in the +format of the state-point file, this integer is incremented.

integer(4) VERSION_MAJOR

-
Major version number for OpenMC
+Major version number for OpenMC

integer(4) VERSION_MINOR

-
Minor version number for OpenMC
+Minor version number for OpenMC

integer(4) VERSION_RELEASE

-
Release version number for OpenMC
+Release version number for OpenMC

character(19) time_stamp

-
Date and time the state point was written.
+Date and time the state point was written.

integer(8) seed

-
Pseudo-random number generator seed.
+Pseudo-random number generator seed.

integer(4) run_mode

-
run mode used. The modes are described in constants.F90.
+run mode used. The modes are described in constants.F90.

integer(8) n_particles

-
Number of particles used per generation.
+Number of particles used per generation.

integer(4) n_batches

-
Total number of batches (active + inactive).
+Total number of batches (active + inactive).

integer(4) current_batch

-
The number of batches already simulated.
+The number of batches already simulated.

if (run_mode == MODE_EIGENVALUE)

-

integer(4) n_inactive

+

integer(4) n_inactive

-
Number of inactive batches
+Number of inactive batches

integer(4) gen_per_batch

-
Number of generations per batch for criticality calculations
+Number of generations per batch for criticality calculations

do i = 1, current_batch

-

real(8) k_batch(i)

+

real(8) k_batch(i)

-
k-effective for the i-th batch
-
+k-effective for the i-th batch +

do i = 1, current_batch

-

real(8) entropy(i)

+

real(8) entropy(i)

-
Shannon entropy for the i-th batch
-
-
+Shannon entropy for the i-th batch + +

integer(4) N_GLOBAL_TALLIES

-
Number of global tally scores
+Number of global tally scores

do i = 1, N_GLOBAL_TALLIES

-

real(8) global_tallies(i) % sum

+

real(8) global_tallies(i) % sum

-
Accumulated sum for the i-th global tally
+Accumulated sum for the i-th global tally

real(8) global_tallies(i) % sum_sq

-
Accumulated sum of squares for the i-th global tally
- +Accumulated sum of squares for the i-th global tally +

integer(4) n_meshes

-
Number of meshes in tallies.xml file
+Number of meshes in tallies.xml file

do i = 1, n_meshes

-

integer(4) meshes(i) % type

+

integer(4) meshes(i) % type

-
Type of mesh.
+Type of mesh.

integer(4) meshes(i) % n_dimension

-
Number of dimensions for mesh (2 or 3).
+Number of dimensions for mesh (2 or 3).

integer(4) meshes(i) % dimension(:)

-
Number of mesh cells in each dimension.
+Number of mesh cells in each dimension.

real(8) meshes(i) % lower_left(:)

-
Coordinates of lower-left corner of mesh.
+Coordinates of lower-left corner of mesh.

real(8) meshes(i) % upper_right(:)

-
Coordinates of upper-right corner of mesh.
+Coordinates of upper-right corner of mesh.

real(8) meshes(i) % width(:)

-
Width of each mesh cell in each dimension.
- +Width of each mesh cell in each dimension. +

integer(4) n_tallies

do i = 1, n_tallies

-

integer(4) size(tallies(i) % scores, 1)

+

integer(4) size(tallies(i) % scores, 1)

-
Total number of score bins for the i-th tally
+Total number of score bins for the i-th tally

integer(4) size(tallies(i) % scores, 2)

-
Total number of filter bins for the i-th tally
+Total number of filter bins for the i-th tally

integer(4) tallies(i) % n_filters

do j = 1, tallies(i) % n_filters

-

integer(4) tallies(i) % filter(j) % type

+

integer(4) tallies(i) % filter(j) % type

-
Type of tally filter.
+Type of tally filter.

integer(4) tallies(i) % filter(j) % n_bins

-
Number of bins for filter.
+Number of bins for filter.

integer(4)/real(8) tallies(i) % filter(j) % bins(:)

-
Value for each filter bin of this type.
- +Value for each filter bin of this type. +

integer(4) tallies(i) % n_nuclide_bins

-
Number of nuclide bins. If none are specified, this is just one.
+Number of nuclide bins. If none are specified, this is just one.

do j = 1, tallies(i) % n_nuclide_bins

-

integer(4) tallies(i) % nuclide_bins(j)

+

integer(4) tallies(i) % nuclide_bins(j)

-
Values of specified nuclide bins
-
+Values of specified nuclide bins +

integer(4) tallies(i) % n_score_bins

-
Number of scoring bins.
+Number of scoring bins.

do j = 1, tallies(i) % n_score_bins

-

integer(4) tallies(i) % score_bins(j)

+

integer(4) tallies(i) % score_bins(j)

-
Values of specified scoring bins (e.g. SCORE_FLUX).
-
- +Values of specified scoring bins (e.g. SCORE_FLUX). + +

integer(4) tallies_on

-
Flag indicated if tallies are present in the file.
+Flag indicated if tallies are present in the file.

if (tallies_on > 0)

-

do i = 1, n_tallies

+

do i = 1, n_tallies

-

do k = 1, size(tallies(i) % scores, 2)

+

do k = 1, size(tallies(i) % scores, 2)

-

do j = 1, size(tallies(i) % scores, 1)

+

do j = 1, size(tallies(i) % scores, 1)

-

real(8) tallies(i) % scores(j,k) % sum

+

real(8) tallies(i) % scores(j,k) % sum

-
Accumulated sum for the j-th score and k-th filter of the -i-th tally
+Accumulated sum for the j-th score and k-th filter of the +i-th tally

real(8) tallies(i) % scores(j,k) % sum_sq

-
Accumulated sum of squares for the j-th score and k-th -filter of the i-th tally
-
-
-
- +Accumulated sum of squares for the j-th score and k-th +filter of the i-th tally + + + +

if (run_mode == MODE_EIGENVALUE)

-

do i = 1, n_particles

+

do i = 1, n_particles

-

real(8) source_bank(i) % wgt

+

real(8) source_bank(i) % wgt

-
Weight of the i-th source particle
+Weight of the i-th source particle

real(8) source_bank(i) % xyz(1:3)

-
Coordinates of the i-th source particle.
+Coordinates of the i-th source particle.

real(8) source_bank(i) % uvw(1:3)

-
Direction of the i-th source particle
+Direction of the i-th source particle

real(8) source_bank(i) % E

-
Energy of the i-th source particle.
- - +Energy of the i-th source particle. + +

5.7. Revision 2

integer(4) REVISION_STATEPOINT

-
Revision of the binary state point file. Any time a change is made in the -format of the state-point file, this integer is incremented.
+Revision of the binary state point file. Any time a change is made in the +format of the state-point file, this integer is incremented.

integer(4) VERSION_MAJOR

-
Major version number for OpenMC
+Major version number for OpenMC

integer(4) VERSION_MINOR

-
Minor version number for OpenMC
+Minor version number for OpenMC

integer(4) VERSION_RELEASE

-
Release version number for OpenMC
+Release version number for OpenMC

integer(4) run_mode

-
run mode used. The modes are described in constants.F90.
+run mode used. The modes are described in constants.F90.

integer(8) n_particles

-
Number of particles used per generation.
+Number of particles used per generation.

integer(4) n_batches

-
Total number of batches (active + inactive).
+Total number of batches (active + inactive).

integer(4) n_inactive

-
Number of inactive batches
+Number of inactive batches

integer(4) gen_per_batch

-
Number of generations per batch for criticality calculations
+Number of generations per batch for criticality calculations

integer(4) current_batch

-
The number of batches already simulated.
+The number of batches already simulated.

do i = 1, current_batch

-

real(8) k_batch(i)

+

real(8) k_batch(i)

-
k-effective for the i-th batch
+k-effective for the i-th batch

if (entropy_on)

-

real(8) entropy(i)

+

real(8) entropy(i)

-
Shannon entropy for the i-th batch
-
-
+Shannon entropy for the i-th batch + +

integer(4) N_GLOBAL_TALLIES

-
Number of global tally scores
+Number of global tally scores

do i = 1, N_GLOBAL_TALLIES

-

real(8) global_tallies(i) % sum

+

real(8) global_tallies(i) % sum

-
Accumulated sum for the i-th global tally
-
+Accumulated sum for the i-th global tally +

do i = 1, N_GLOBAL_TALLIES

-

real(8) global_tallies(i) % sum_sq

+

real(8) global_tallies(i) % sum_sq

-
Accumulated sum of squares for the i-th global tally
-
+Accumulated sum of squares for the i-th global tally +

integer(4) n_tallies

do i = 1, n_tallies

-

integer(4) size(tallies(i) % scores, 1)

+

integer(4) size(tallies(i) % scores, 1)

-
Total number of score bins for the i-th tally
+Total number of score bins for the i-th tally

integer(4) size(tallies(i) % scores, 2)

-
Total number of filter bins for the i-th tally
- +Total number of filter bins for the i-th tally +

do i = 1, n_tallies

-

do k = 1, size(tallies(i) % scores, 2)

+

do k = 1, size(tallies(i) % scores, 2)

-

do j = 1, size(tallies(i) % scores, 1)

+

do j = 1, size(tallies(i) % scores, 1)

-

real(8) tallies(i) % scores(j,k) % sum

+

real(8) tallies(i) % scores(j,k) % sum

-
Accumulated sum for the j-th score and k-th filter of the i-th -tally
+Accumulated sum for the j-th score and k-th filter of the i-th +tally

real(8) tallies(i) % scores(j,k) % sum_sq

-
Accumulated sum of squares for the j-th score and k-th filter of -the i-th tally
-
-
- +Accumulated sum of squares for the j-th score and k-th filter of +the i-th tally + + +

5.8. Revision 1

integer(4) REVISION_STATEPOINT

-
Revision of the binary state point file. Any time a change is made in the -format of the state-point file, this integer is incremented.
+Revision of the binary state point file. Any time a change is made in the +format of the state-point file, this integer is incremented.

integer(4) VERSION_MAJOR

-
Major version number for OpenMC
+Major version number for OpenMC

integer(4) VERSION_MINOR

-
Minor version number for OpenMC
+Minor version number for OpenMC

integer(4) VERSION_RELEASE

-
Release version number for OpenMC
+Release version number for OpenMC

integer(4) run_mode

-
run mode used. The modes are described in constants.F90.
+run mode used. The modes are described in constants.F90.

integer(8) n_particles

-
Number of particles used per generation.
+Number of particles used per generation.

integer(4) n_batches

-
Total number of batches (active + inactive).
+Total number of batches (active + inactive).

integer(4) n_inactive

-
Number of inactive batches
+Number of inactive batches

integer(4) gen_per_batch

-
Number of generations per batch for criticality calculations
+Number of generations per batch for criticality calculations

integer(4) current_batch

-
The number of batches already simulated.
+The number of batches already simulated.

do i = 1, current_batch

-

real(8) k_batch(i)

+

real(8) k_batch(i)

-
k-effective for the i-th batch
+k-effective for the i-th batch

if (entropy_on)

-

real(8) entropy(i)

+

real(8) entropy(i)

-
Shannon entropy for the i-th batch
-
-
+Shannon entropy for the i-th batch + +

integer(4) N_GLOBAL_TALLIES

-
Number of global tally scores
+Number of global tally scores

do i = 1, N_GLOBAL_TALLIES

-

real(8) global_tallies(i) % sum

+

real(8) global_tallies(i) % sum

-
Accumulated sum for the i-th global tally
-
+Accumulated sum for the i-th global tally +

do i = 1, N_GLOBAL_TALLIES

-

real(8) global_tallies(i) % sum_sq

+

real(8) global_tallies(i) % sum_sq

-
Accumulated sum of squares for the i-th global tally
-
+Accumulated sum of squares for the i-th global tally +

integer(4) n_tallies

do i = 1, n_tallies

-

integer(4) size(tallies(i) % scores, 1)

+

integer(4) size(tallies(i) % scores, 1)

-
Total number of score bins for the i-th tally
+Total number of score bins for the i-th tally

integer(4) size(tallies(i) % scores, 2)

-
Total number of filter bins for the i-th tally
+Total number of filter bins for the i-th tally

do k = 1, size(tallies(i) % scores, 2)

-

do j = 1, size(tallies(i) % scores, 1)

+

do j = 1, size(tallies(i) % scores, 1)

-

real(8) tallies(i) % scores(j,k) % sum

+

real(8) tallies(i) % scores(j,k) % sum

-
Accumulated sum for the j-th score and k-th filter of the i-th -tally
-
-
+Accumulated sum for the j-th score and k-th filter of the i-th +tally + +

do k = 1, size(tallies(i) % scores, 2)

-

do j = 1, size(tallies(i) % scores, 1)

+

do j = 1, size(tallies(i) % scores, 1)

-

real(8) tallies(i) % scores(j,k) % sum_sq

+

real(8) tallies(i) % scores(j,k) % sum_sq

-
Accumulated sum of squares for the j-th score and k-th filter of -the i-th tally
-
-
- +Accumulated sum of squares for the j-th score and k-th filter of +the i-th tally + + + @@ -1368,7 +1365,7 @@ the i-th tally   ::   Contents   ::   - Publications  » + 6. Voxel Plot Binary File Specifications  »

@@ -1376,7 +1373,7 @@ the i-th tally + + + + + + + + + + +
+ + + +
+
+ +

+ «  5. State Point Binary File Specifications +   ::   + Contents +   ::   + Publications  » +

+ +
+
+ + +
+

6. Voxel Plot Binary File Specifications

+
+

6.1. Revision 1

+

integer(4) n_voxels_x

+
+Number of voxels in the x direction
+

integer(4) n_voxels_y

+
+Number of voxels in the y direction
+

integer(4) n_voxels_z

+
+Number of voxels in the z direction
+

real(8) width_voxel_x

+
+Width of voxels in the x direction
+

real(8) width_voxel_y

+
+Width of voxels in the y direction
+

real(8) width_voxel_z

+
+Width of voxels in the z direction
+

real(8) lower_left_x

+
+Lower left x point of the voxel grid
+

real(8) lower_left_y

+
+Lower left y point of the voxel grid
+

real(8) lower_left_z

+
+Lower left z point of the voxel grid
+
+
do x = 1, n_voxels_x
+
+
do y = 1, n_voxels_y
+

do z = 1, n_voxels_z

+
+

integer(4) id

+
+Cell or material id number at this voxel center. Set to -1 when +cell not_found.
+
+
+
+
+
+
+
+ + +
+
+ +

+ «  5. State Point Binary File Specifications +   ::   + Contents +   ::   + Publications  » +

+ +
+ + + + + + + \ No newline at end of file diff --git a/devguide/workflow.html b/devguide/workflow.html index a462d6438f..a454c307a2 100644 --- a/devguide/workflow.html +++ b/devguide/workflow.html @@ -3,17 +3,14 @@ - 3. Development Workflow — OpenMC Documentation - - - +
@@ -40,7 +37,7 @@

- «  5. State Point Binary File Specifications + «  6. Voxel Plot Binary File Specifications   ::   Contents   ::   @@ -75,7 +72,7 @@ Carlo Criticality Calculations,” Nucl. Sci. Eng., 170

- «  5. State Point Binary File Specifications + «  6. Voxel Plot Binary File Specifications   ::   Contents   ::   @@ -87,7 +84,7 @@ Carlo Criticality Calculations,” Nucl. Sci. Eng., 170 © Copyright 2011-2013, Massachusetts Institute of Technology. - Created using Sphinx 1.1.3. + Created using Sphinx 1.0.1.

- + @@ -45,7 +42,7 @@   ::   Contents   ::   - 4. Troubleshooting  » + 4. Data Processing and Visualization  »

@@ -105,7 +102,7 @@ will be reported as the half-width of the 95% two-sided confidence interval. If set to “false”, uncertainties on tally results will be reported as the sample standard deviation.

-
Default: false
+Default: false

3.2.2. <cross_sections> Element

@@ -122,57 +119,57 @@ undergo Russian roulette. Surviving particles are assigned a user-determined weight. Note that weight cutoffs and Russian rouletting are not turned on by default. This element has the following attributes/sub-elements:

-
+
- -
weight:

The weight below which particles undergo Russian roulette.

+
weight:

The weight below which particles undergo Russian roulette.

Default: 0.25

weight_avg:

The weight that is assigned to particles that are not killed after Russian +

weight_avg:

The weight that is assigned to particles that are not killed after Russian roulette.

Default: 1.0

-
+

3.2.4. <eigenvalue> Element

The <eigenvalue> element indicates that a k-eigenvalue calculation should be performed. It has the following attributes/sub-elements:

-
+
- - - + - -
batches:

The total number of batches, where each batch corresponds to multiple +

batches:

The total number of batches, where each batch corresponds to multiple fission source iterations. Batching is done to eliminate correlation between realizations of random variables.

Default: None

generations_per_batch:
 

The number of total fission source iterations per batch.

+
generations_per_batch:
 

The number of total fission source iterations per batch.

Default: 1

inactive:

The number of inactive batches. In general, the starting cycles in a +

inactive:

The number of inactive batches. In general, the starting cycles in a criticality calculation can not be used to contribute to tallies since the fission source distribution and eigenvalue are generally not converged immediately.

Default: None

particles:

The number of neutrons to simulate per fission source iteration.

+
particles:

The number of neutrons to simulate per fission source iteration.

Default: None

-
+

3.2.5. <energy_grid> Element

@@ -183,7 +180,7 @@ determining cross sections (i.e. non-unionized energy grid). To use a unionized energy grid, set this element to “union”. Note that the unionized energy grid treatment is slightly different than that employed in Serpent.

-
Default: union
+Default: union

3.2.6. <entropy> Element

@@ -191,11 +188,11 @@ treatment is slightly different than that employed in Serpent.

entropy. This mesh should cover all possible fissionable materials in the problem. It has the following attributes/sub-elements:

-
+
- - -
dimension:

The number of mesh cells in the x, y, and z directions, respectively.

+
dimension:

The number of mesh cells in the x, y, and z directions, respectively.

Default: If this tag is not present, the number of mesh cells is

automatically determined by the code.

@@ -203,39 +200,39 @@ problem. It has the following attributes/sub-elements:

lower_left:

The Cartesian coordinates of the lower-left corner of the mesh.

+
lower_left:

The Cartesian coordinates of the lower-left corner of the mesh.

Default: None

upper_right:

The Cartesian coordinates of the upper-right corner of the mesh.

+
upper_right:

The Cartesian coordinates of the upper-right corner of the mesh.

Default: None

-
+

3.2.7. <fixed_source> Element

The <fixed_source> element indicates that a fixed source calculation should be performed. It has the following attributes/sub-elements:

-
+
- -
batches:

The total number of batches. For fixed source calculations, each batch +

batches:

The total number of batches. For fixed source calculations, each batch represents a realization of random variables for tallies.

Default: None

particles:

The number of particles to simulate per batch.

+
particles:

The number of particles to simulate per batch.

Default: None

-
+

3.2.8. <no_reduce> Element

@@ -246,7 +243,7 @@ the accumulate score in one batch on a single processor is considered as an independent realization for the tally random variable. For a problem with large tally data, this option can significantly improve the parallel efficiency.

-
Default: false
+Default: false

3.2.9. <output> Element

@@ -256,7 +253,7 @@ to a list of strings separated by spaces. Valid options are “summary” “cross-sections”, and “tallies”. For example, if you want the summary and cross sections summary file to be written, this element should be given as:

-
<output>summary cross_sections</output>
+
<output>summary cross_sections</output>
 
@@ -265,7 +262,7 @@ sections summary file to be written, this element should be given as:

default.

Default: “tallies”

-
+

3.2.10. <ptables> Element

@@ -273,7 +270,7 @@ default.

in the unresolved resonance range if available. This element has no attributes or sub-elements and can be set to either “false” or “true”.

-
Default: true
+Default: true

3.2.11. <run_cmfd> Element

@@ -281,14 +278,14 @@ or sub-elements and can be set to either “false” or “true̶ turned on or off. This element has no attributes or sub-elements and can be set to either “false” or “true”.

-
Defualt: false
+Defualt: false

3.2.12. <seed> Element

The seed element is used to set the seed used for the linear congruential pseudo-random number generator.

-
Default: 1
+Default: 1

3.2.13. <source> Element

@@ -297,29 +294,29 @@ be used either as the source for a fixed source calculation or the initial source guess for criticality calculations. It takes the following attributes/sub-elements:

-
+
- - - -

One of <upper_right> or <width> must be specified, but not both (even if they are consistent with one another).

- +

3.5.3. <assume_separate> Element

@@ -1020,119 +1017,149 @@ overhead. The effect of assuming all tallies are spatially separate is that once one tally is scored to, the same event is assumed not to score to any other tallies. This element should be followed by “true” or “false”.

-
+

Warning

If used incorrectly, the assumption that all tallies are spatially separate can lead to incorrect results.

Default: false

-
+
-

3.6. Geometry Plotting Specification – plots.xml

-

A basic 2D plotting capability is available in OpenMC by creating a plots.xml +

3.6. Geometry Plotting Specification – plots.xml

+

Basic plotting capabilities are available in OpenMC by creating a plots.xml file and subsequently running with the command-line flag -plot. The root -element of the plots.xml is simply <plots> and any number output figures can -be defined with <plot> sub-elements.

+element of the plots.xml is simply <plots> and any number output plots can +be defined with <plot> sub-elements. Two plot types are currently +implemented in openMC:

+
    +
  • slice 2D pixel plot along one of the major axes. Produces a PPM image file.
  • +
  • voxel 3D voxel data dump. Produces a binary file containing voxel xyz position and cell or material id.
  • +

3.6.1. <plot> Element

-

Each plot must contain a combination of the following attributes or sub-elements:

+

Each plot must contain a combination of the following attributes or +sub-elements:

-
file:

If this attribute is given, it indicates that the source is to be read from +

file:

If this attribute is given, it indicates that the source is to be read from a binary source file whose path is given by the value of this element

Default: None

space:

An element specifying the spatial distribution of source sites. This element +

space:

An element specifying the spatial distribution of source sites. This element has the following attributes:

- -
type:

The type of spatial distribution. Valid options are “box” and “point”. A +

type:

The type of spatial distribution. Valid options are “box” and “point”. A “box” spatial distribution has coordinates sampled uniformly in a parallelepiped. A “point” spatial distribution has coordinates specified by a triplet.

Default: None

parameters:

For a “box” spatial distribution, parameters should be given as six +

parameters:

For a “box” spatial distribution, parameters should be given as six real numbers, the first three of which specify the lower-left corner of a parallelepiped and the last three of which specify the upper-right corner. Source sites are sampled uniformly through that parallelepiped.

@@ -333,13 +330,13 @@ point source

angle:

An element specifying the angular distribution of source sites. This element +

angle:

An element specifying the angular distribution of source sites. This element has the following attributes:

- -
type:

The type of angular distribution. Valid options are “isotropic” and +

type:

The type of angular distribution. Valid options are “isotropic” and “monodirectional”. The angle of the particle emitted from a source site is isotropic if the “isotropic” option is given. The angle of the particle emitted from a source site is the direction specified in the <parameters> @@ -347,7 +344,7 @@ attribute if “monodirectional” option is given.

Default: isotropic

parameters:

For an “isotropic” angular distribution, parameters should not be +

parameters:

For an “isotropic” angular distribution, parameters should not be specified

For a “monodirectional” angular distribution, parameters should be given as three real numbers which specify the angular cosines with respect @@ -359,13 +356,13 @@ to each axis.

energy:

An element specifying the energy distribution of source sites. This element +

energy:

An element specifying the energy distribution of source sites. This element has the following attributes:

- -
type:

The type of energy distribution. Valid options are “monoenergetic”, +

type:

The type of energy distribution. Valid options are “monoenergetic”, “watt”, and “maxwell”. The “monoenergetic” option produces source sites at a single energy. The “watt” option produces source sites whose energy is sampled from a Watt fission spectrum. The “maxwell” option produce source @@ -373,7 +370,7 @@ sites whose energy is sampled from a Maxwell fission spectrum

Default: watt

parameters:

For a “monoenergetic” energy distribution, parameters should not be +

parameters:

For a “monoenergetic” energy distribution, parameters should not be given as the energy in MeV of the source sites.

For a “watt” energy distribution, parameters should be given as two real numbers a and b that parameterize the distribution @@ -390,7 +387,7 @@ c E e^{-E/a} dE"/>.

- +

3.2.14. <state_point> Element

@@ -399,29 +396,29 @@ should be written. A state point file can be used to restart a run or to get tally results at any batch. This element has the following attributes/sub-elements:

-
+
- - - - + -
batches:

A list of integers separated by spaces indicating at what batches a state +

batches:

A list of integers separated by spaces indicating at what batches a state point file should be written.

Default: Last batch only

interval:

A single integer n indicating that a state point should be written +

interval:

A single integer n indicating that a state point should be written every n batches. This option can be given in lieu of listing batches explicitly.

Default: None

source_separate:
 

If this element is set to “true”, a separate binary source file will be +

source_separate:
 

If this element is set to “true”, a separate binary source file will be written. Otherwise, the source sites will be written in the state point directly.

Default: false

source_write:

If this element is set to “false”, source sites are not written +

source_write:

If this element is set to “false”, source sites are not written to the state point file. This can substantially reduce the size of state points if large numbers of particles per batch are used.

Default: true

@@ -429,7 +426,7 @@ points if large numbers of particles per batch are used.

-
+

3.2.15. <survival_biasing> Element

@@ -437,7 +434,7 @@ points if large numbers of particles per batch are used.

of “true” or “false”. If set to “true”, this option will enable the use of survival biasing, otherwise known as implicit capture or absorption.

-
Default: false
+Default: false

3.2.16. <trace> Element

@@ -445,7 +442,7 @@ survival biasing, otherwise known as implicit capture or absorption.

single particle during a simulation. This element should be followed by three integers: the batch number, generation number, and particle number.

-
Default: None
+Default: None

3.2.17. <uniform_fs> Element

@@ -456,25 +453,25 @@ Carlo Performance Benchmark Problem,” Proceedings of Physor 2012, TN (2012). This mesh should cover all possible fissionable materials in the problem. It has the following attributes/sub-elements:

-
+
- - -
dimension:

The number of mesh cells in the x, y, and z directions, respectively.

+
dimension:

The number of mesh cells in the x, y, and z directions, respectively.

Default: None

lower_left:

The Cartesian coordinates of the lower-left corner of the mesh.

+
lower_left:

The Cartesian coordinates of the lower-left corner of the mesh.

Default: None

upper_right:

The Cartesian coordinates of the upper-right corner of the mesh.

+
upper_right:

The Cartesian coordinates of the upper-right corner of the mesh.

Default: None

-
+

3.2.18. <verbosity> Element

@@ -482,17 +479,17 @@ problem. It has the following attributes/sub-elements:

the standard output. A higher verbosity corresponds to more information being displayed. This element takes the following attributes:

-
+
-
value:

The specified verbosity between 1 and 10.

+
value:

The specified verbosity between 1 and 10.

Default: 5

-
+
@@ -546,98 +543,98 @@ could be written as:

3.3.1. <surface> Element

Each <surface> element can have the following attributes or sub-elements:

-
+
- - - -
id:

A unique integer that can be used to identify the surface.

+
id:

A unique integer that can be used to identify the surface.

Default: None

type:

The type of the surfaces. This can be “x-plane”, “y-plane”, “z-plane”, +

type:

The type of the surfaces. This can be “x-plane”, “y-plane”, “z-plane”, “plane”, “x-cylinder”, “y-cylinder”, “z-cylinder”, or “sphere”.

Default: None

coeffs:

The corresponding coefficients for the given type of surface. See below for +

coeffs:

The corresponding coefficients for the given type of surface. See below for a list a what coefficients to specify for a given surface

Default: None

boundary:

The boundary condition for the surface. This can be “transmission”, +

boundary:

The boundary condition for the surface. This can be “transmission”, “vacuum”, or “reflective”.

Default: “transmission”

-
+

The following quadratic surfaces can be modeled:

-
+
- + - + - + - + - +coefficients specified are “y_0 \: z_0 \: R“. - +coefficients specified are “x_0 \: z_0 \: R“. - +coefficients specified are “x_0 \: y_0 \: R“. - + - +\: R^2"/>“. - +\: R^2"/>“. - +\: R^2"/>“.
x-plane:A plane perpendicular to the x axis, i.e. a surface of the form x -
-x_0 = 0. The coefficients specified are “x_0”.
x-plane:A plane perpendicular to the x axis, i.e. a surface of the form x -
+x_0 = 0. The coefficients specified are “x_0“.
y-plane:A plane perpendicular to the y axis, i.e. a surface of the form y -
-y_0 = 0. The coefficients specified are “y_0”.
y-plane:A plane perpendicular to the y axis, i.e. a surface of the form y -
+y_0 = 0. The coefficients specified are “y_0“.
z-plane:A plane perpendicular to the z axis, i.e. a surface of the form z -
-z_0 = 0. The coefficients specified are “z_0”.
z-plane:A plane perpendicular to the z axis, i.e. a surface of the form z -
+z_0 = 0. The coefficients specified are “z_0“.
plane:An arbitrary plane of the form Ax + By + Cz = D. The coefficients -specified are “A \: B \: C \: D”.
plane:An arbitrary plane of the form Ax + By + Cz = D. The coefficients +specified are “A \: B \: C \: D“.
x-cylinder:An infinite cylinder whose length is parallel to the x-axis. This is a +
x-cylinder:An infinite cylinder whose length is parallel to the x-axis. This is a quadratic surface of the form (y - y_0)^2 + (z - z_0)^2 = R^2. The -coefficients specified are “y_0 \: z_0 \: R”.
y-cylinder:An infinite cylinder whose length is parallel to the y-axis. This is a +
y-cylinder:An infinite cylinder whose length is parallel to the y-axis. This is a quadratic surface of the form (x - x_0)^2 + (z - z_0)^2 = R^2. The -coefficients specified are “x_0 \: z_0 \: R”.
z-cylinder:An infinite cylinder whose length is parallel to the z-axis. This is a +
z-cylinder:An infinite cylinder whose length is parallel to the z-axis. This is a quadratic surface of the form (x - x_0)^2 + (y - y_0)^2 = R^2. The -coefficients specified are “x_0 \: y_0 \: R”.
sphere:A sphere of the form (x - x_0)^2 + (y - y_0)^2 + (z - z_0)^2 =
-R^2. The coefficients specified are “x_0 \: y_0 \: z_0 \: R”.
sphere:A sphere of the form (x - x_0)^2 + (y - y_0)^2 + (z - z_0)^2 =
+R^2. The coefficients specified are “x_0 \: y_0 \: z_0 \: R“.
x-cone:A cone parallel to the x-axis of the form (y - y_0)^2 + (z - z_0)^2 =
+<tr class=x-cone:A cone parallel to the x-axis of the form (y - y_0)^2 + (z - z_0)^2 =
 R^2 (x - x_0)^2. The coefficients specified are “x_0 \: y_0 \: z_0
-\: R^2”.
y-cone:A cone parallel to the y-axis of the form (x - x_0)^2 + (z - z_0)^2 =
+<tr class=y-cone:A cone parallel to the y-axis of the form (x - x_0)^2 + (z - z_0)^2 =
 R^2 (y - y_0)^2. The coefficients specified are “x_0 \: y_0 \: z_0
-\: R^2”.
z-cone:A cone parallel to the x-axis of the form (x - x_0)^2 + (y - y_0)^2 =
+<tr class=z-cone:A cone parallel to the x-axis of the form (x - x_0)^2 + (y - y_0)^2 =
 R^2 (z - z_0)^2. The coefficients specified are “x_0 \: y_0 \: z_0
-\: R^2”.
-
+

3.3.2. <cell> Element

Each <cell> element can have the following attributes or sub-elements:

-
+
- - - - - - -
id:

A unique integer that can be used to identify the surface.

+
id:

A unique integer that can be used to identify the surface.

Default: None

universe:

The id of the universe that this cell is contained in.

+
universe:

The id of the universe that this cell is contained in.

Default: 0

fill:

The id of the universe that fills this cell.

+
fill:

The id of the universe that fills this cell.

Note

If a fill is specified, no material should be given.

@@ -645,7 +642,7 @@ R^2 (z - z_0)^2"/>. The coefficients specified are “Default: None

material:

The id of the material that this cell contains. If the cell should +

material:

The id of the material that this cell contains. If the cell should contain no material, this can also be set to “void”.

Note

@@ -654,13 +651,13 @@ contain no material, this can also be set to “void”.

Default: None

surfaces:

A list of the ids for surfaces that bound this cell, e.g. if the cell +

surfaces:

A list of the ids for surfaces that bound this cell, e.g. if the cell is on the negative side of surface 3 and the positive side of surface 5, the bounding surfaces would be given as “-3 5”.

Default: None

rotation:

If the cell is filled with a universe, this element specifies the angles in +

rotation:

If the cell is filled with a universe, this element specifies the angles in degrees about the x, y, and z axes that the filled universe should be rotated. Should be given as three real numbers. For example, if you wanted to rotate the filled universe by 90 degrees about the z-axis, the cell @@ -671,7 +668,7 @@ element would look something like:

Default: None

translation:

If the cell is filled with a universe, this element specifies a vector that +

translation:

If the cell is filled with a universe, this element specifies a vector that is used to translate (shift) the universe. Should be given as three real numbers.

@@ -684,7 +681,7 @@ specified.

-
+

3.3.3. <lattice> Element

@@ -693,38 +690,38 @@ in an assembly) or other geometry which naturally fits into a two-dimensional structured mesh. Each cell within the lattice is filled with a specified universe. A <lattice> accepts the following attributes or sub-elements:

-
+
- - - - - -
id:

A unique integer that can be used to identify the surface.

+
id:

A unique integer that can be used to identify the surface.

type:

A string indicating the arrangement of lattice cells. Currently, the only +

type:

A string indicating the arrangement of lattice cells. Currently, the only accepted option is “rectangular”.

Default: rectangular

dimension:

Two integers representing the number of lattice cells in the x- and y- +

dimension:

Two integers representing the number of lattice cells in the x- and y- directions, respectively.

Default: None

lower_left:

The coordinates of the lower-left corner of the lattice.

+
lower_left:

The coordinates of the lower-left corner of the lattice.

Default: None

width:

The width of the lattice cell in the x- and y- directions.

+
width:

The width of the lattice cell in the x- and y- directions.

Default: None

universes:

A list of the universe numbers that fill each cell of the lattice.

+
universes:

A list of the universe numbers that fill each cell of the lattice.

Default: None

-
+
@@ -733,14 +730,14 @@ directions, respectively.

3.4.1. <material> Element

Each material element can have the following attributes or sub-elements:

-
+
- - - - -
id:

A unique integer that can be used to identify the material.

+
id:

A unique integer that can be used to identify the material.

density:

An element with attributes/sub-elements called value and units. The +

density:

An element with attributes/sub-elements called value and units. The value attribute is the numeric value of the density while the units can be “g/cm3”, “kg/m3”, “atom/b-cm”, “atom/cm3”, or “sum”. The “sum” unit indicates that the density should be calculated as the sum of the atom @@ -749,7 +746,7 @@ conjunction with weight percents.

Default: None

nuclide:

An element with attributes/sub-elements called name, xs, and ao +

nuclide:

An element with attributes/sub-elements called name, xs, and ao or wo. The name attribute is the name of the cross-section for a desired nuclide while the xs attribute is the cross-section identifier. Finally, the ao and wo attributes specify the atom or @@ -767,7 +764,7 @@ be given in atom percent. The same applies for weight percentages.

Default: None

element:

Specifies that a natural element is present in the material. The natural +

element:

Specifies that a natural element is present in the material. The natural element is split up into individual isotopes based on IUPAC Isotopic Compositions of the Elements 1997. This element has attributes/sub-elements called name, xs, and ao. The name attribute is the atomic @@ -783,7 +780,7 @@ element within the material, respectively. One example would be as follows:

Default: None

sab:

Associates an S(a,b) table with the material. This element has +

sab:

Associates an S(a,b) table with the material. This element has attributes/sub-elements called name and xs. The name attribute is the name of the S(a,b) table that should be associated with the material, and xs is the cross-section identifier for the table.

@@ -792,7 +789,7 @@ and xs is the cross-s
-
+

3.4.2. <default_xs> Element

@@ -803,7 +800,7 @@ set the default cross-section identifier for any nuclide without an identifier explicitly listed. This element has no attributes and accepts a 3-letter string that indicates the default cross-section identifier, e.g. “70c”.

-
Default: None
+Default: None
@@ -826,16 +823,16 @@ and <assume_separate>3.5.1. <tally> Element

The <tally> element accepts the following sub-elements:

-
+
- - - - - - - - - - - - - - - @@ -978,7 +975,7 @@ other score.

label:

This is an optional sub-element specifying the name of this tally to be used +

label:

This is an optional sub-element specifying the name of this tally to be used for output purposes. This string is limited to 52 characters for formatting purposes.

filter:

Specify a filter that restricts contributions to the tally to particles +

filter:

Specify a filter that restricts contributions to the tally to particles within certain regions of phase space. This element and its attributes/sub-elements are described below.

@@ -845,43 +842,43 @@ specify multiple filters, you must use multiple

The filter element has the following attributes/sub-elements:

-
+
- -
type:

The type of the filter. Accepted options are “cell”, “cellborn”, “material”, +

type:

The type of the filter. Accepted options are “cell”, “cellborn”, “material”, “universe”, “energy”, “energyout”, and “mesh”.

bins:

For each filter type, the corresponding bins entry is given as follows:

+
bins:

For each filter type, the corresponding bins entry is given as follows:

- + - - + - + - + - - - +
cell:A list of cells in which the tally should be accumulated.
cell:A list of cells in which the tally should be accumulated.
cellborn:This filter allows the tally to be scored to only when particles were +
cellborn:This filter allows the tally to be scored to only when particles were originally born in a specified cell.
surface:A list of surfaces for which the tally should be accumulated.
surface:A list of surfaces for which the tally should be accumulated.
material:A list of materials for which the tally should be accumulated.
material:A list of materials for which the tally should be accumulated.
universe:A list of universes for which the tally should be accumulated.
universe:A list of universes for which the tally should be accumulated.
energy:A monotonically increasing list of bounding pre-collision energies +
energy:A monotonically increasing list of bounding pre-collision energies for a number of groups. For example, if this filter is specified as <filter type="energy" bins="0.0 1.0 20.0" />, then two energy bins will be created, one with energies between 0 and 1 MeV and the other with energies between 1 and 20 MeV.
energyout:A monotonically increasing list of bounding post-collision +
energyout:A monotonically increasing list of bounding post-collision energies for a number of groups. For example, if this filter is specified as <filter type="energyout" bins="0.0 1.0 20.0" />, then two post-collision energy bins will be created, one with energies between 0 and 1 MeV and the other with energies between 1 and 20 MeV.
mesh:The id of a structured mesh to be tallied over.
mesh:The id of a structured mesh to be tallied over.
@@ -889,10 +886,10 @@ between 0 and 1 MeV and the other with energies between 1 and 20 MeV.
-
+
nuclides:

If specified, the scores listed will be for particular nuclides, not the +

nuclides:

If specified, the scores listed will be for particular nuclides, not the summation of reactions from all nuclides. The format for nuclides should be [Atomic symbol]-[Mass number], e.g. “U-235”. The reaction rate for all nuclides can be obtained with “total”. For example, to obtain the reaction @@ -904,7 +901,7 @@ be:

Default: total

scores:

A space-separated list of the desired responses to be accumulated. Accepted +

scores:

A space-separated list of the desired responses to be accumulated. Accepted options are “flux”, “total”, “scatter”, “nu-scatter”, “scatter-N”, “scatter-PN”, “absorption”, “fission”, “nu-fission”, “kappa-fission”, “current”, and “events”. These corresponding to the following physical @@ -913,45 +910,45 @@ quantities.

flux:

Total flux

+
flux:

Total flux

total:

Total reaction rate

+
total:

Total reaction rate

scatter:

Total scattering rate. Can also be identified with the scatter-0 +

scatter:

Total scattering rate. Can also be identified with the scatter-0 response type.

nu-scatter:

Total production of neutrons due to scattering. This accounts for +

nu-scatter:

Total production of neutrons due to scattering. This accounts for multiplicity from (n,2n), (n,3n), and (n,4n) reactions and should be slightly higher than the scattering rate.

scatter-N:

Tally the Nth scattering moment, where N is the Legendre +

scatter-N:

Tally the Nth scattering moment, where N is the Legendre expansion order. N must be between 0 and 10. As an example, tallying the 2nd scattering moment would be specified as <scores> scatter-2 </scores>.

scatter-PN:

Tally all of the scattering moments from order 0 to N, where N is the +

scatter-PN:

Tally all of the scattering moments from order 0 to N, where N is the Legendre expansion order. That is, scatter-P1 is equivalent to requesting tallies of scatter-0 and scatter-1. N must be between 0 and 10. As an example, tallying up to the 2nd scattering moment would be specified as <scores> scatter-P2 </scores>.

absorption:

Total absorption rate. This accounts for all reactions which do not +

absorption:

Total absorption rate. This accounts for all reactions which do not produce secondary neutrons.

fission:

Total fission rate

+
fission:

Total fission rate

nu-fission:

Total production of neutrons due to fission

+
nu-fission:

Total production of neutrons due to fission

kappa-fission:

The recoverable energy production rate due to fission. The recoverable +

kappa-fission:

The recoverable energy production rate due to fission. The recoverable energy is defined as the fission product kinetic energy, prompt and delayed neutron kinetic energies, prompt and delayed \gamma-ray total energies, and the total energy released by the delayed \beta @@ -960,7 +957,7 @@ prompt and delayed

current:

Partial currents on the boundaries of each cell in a mesh.

+
current:

Partial currents on the boundaries of each cell in a mesh.

Note

This score can only be used if a mesh filter has been @@ -969,7 +966,7 @@ other score.

events:

Number of scoring events

+
events:

Number of scoring events

-
+

3.5.2. <mesh> Element

@@ -986,22 +983,22 @@ other score.

a separate element with the tag name <mesh>. This element has the following attributes/sub-elements:

-
+
- - + - - - +
type:The type of structured mesh. Valid options include “rectangular” and +
type:The type of structured mesh. Valid options include “rectangular” and “hexagonal”.
dimension:The number of mesh cells in each direction.
dimension:The number of mesh cells in each direction.
lower_left:The lower-left corner of the structured mesh. If only two coordinates are +
lower_left:The lower-left corner of the structured mesh. If only two coordinates are given, it is assumed that the mesh is an x-y mesh.
upper_right:The upper-right corner of the structured mesh. If only two coordinates are +
upper_right:The upper-right corner of the structured mesh. If only two coordinates are given, it is assumed that the mesh is an x-y mesh.
width:The width of mesh cells in each direction.
width:The width of mesh cells in each direction.
@@ -1010,7 +1007,7 @@ given, it is assumed that the mesh is an x-y mesh.
+
- - - - - -
id:

The unique id of the plot.

+
id:

The unique id of the plot.

Default: None - Required entry

filename:

Filename for the output plot file.

+
filename:

Filename for the output plot file.

Default: “plot”

color:

Keyword for plot coloring. This can only be either cell or mat, -which colors regions by cells and materials, respectively.

+
color:

Keyword for plot coloring. This can only be either cell or mat, +which colors regions by cells and materials, respectively. For voxel plots, +this determines which id (cell or material) is associated with each +position.

Default: cell

origin:

Specifies the (x,y,z) coordinate of the center of the plot. Should be three +

origin:

Specifies the (x,y,z) coordinate of the center of the plot. Should be three floats separated by spaces.

Default: None - Required entry

width:

Specifies the width of the plot along each of the basis directions. Should +

width:

Specifies the width of the plot along each of the basis directions. Should be two or three floats separated by spaces for 2D plots and 3D plots, respectively.

Default: None - Required entry

type:

Keyword for type of plot to be produced. Currently only slice plots are -implemented, which create 2D pixel maps saved in the PPM file format. PPM -files can be displayed in most viewers (e.g. the default Gnome viewer, -IrfanView, etc.).

+
type:

Keyword for type of plot to be produced. Currently only “slice” and +“voxel” plots are implemented. The “slice” plot type creates 2D pixel +maps saved in the PPM file format. PPM files can be displayed in most +viewers (e.g. the default Gnome viewer, IrfanView, etc.). The “voxel” +plot type produces a binary datafile containing voxel grid positioning and +the cell or material (specified by the color tag) at the center of each +voxel. These datafiles can be processed into 3D SILO files using the +voxel.py utility provided with the OpenMC source, and subsequently +viewed with a 3D viewer such as VISIT or Paraview. See the +Voxel Plot Binary File Specifications for information about the datafile structure.

Note

Since the PPM format is saved without any kind of compression, the resulting file sizes can be quite large. Saving the image in the PNG format can often times reduce the file size by orders of -magnitude without any loss of image quality.

+magnitude without any loss of image quality. Likewise, +high-resolution voxel files produced by OpenMC can be quite large, +but the equivalent SILO files will by significantly smaller.

Default: “slice”

-
-

<plot> elements of type “slice” also contain the following attributes or -sub-elements:

+ +

<plot> elements of type “slice” and “voxel” must contain the pixels +attribute or sub-element:

-
--- - - - - - - -
basis:

Keyword specifying the plane of the plot for slice type plots. Can be -one of: “xy”, “xz”, “yz”.

-

Default: “xy”

-
pixels:

Specifies the number of pixes to be used along each of the basis directions -for “slice” plots. Should be two integers separated by spaces.

-
-

Warning

-

The pixels input determines the output file size. For the PPM -format, 10 million pixels will result in a file just under 30 MB in -size.

-
-
-

Warning

-

If the aspect ratio defined in pixels does not match the aspect -ratio defined in width the plot may appear stretched or squeezed.

-
-
-

Warning

-

Geometry features along a basis direction smaller than width/pixels -along that basis direction may not appear in the plot.

-
-

Default: None - Required entry for “slice” plots

-
background:

Specifies the RGB color of the regions where no OpenMC cell can be found. Should -be three integers separated by spaces.

-

Default: 0 0 0 (white)

-
col_spec:

Any number of this optional tag may be included in each <plot> element, which can -override the default random colors for cells or materials. Each col_spec -element must contain id and rgb sub-elements.

- + - + +
id:Specifies the cell or material unique id for the color specification.
pixels:

Specifies the number of pixes or voxels to be used along each of the basis +directions for “slice” and “voxel” plots, respectively. Should be two or +three integers separated by spaces.

+
+

Warning

+

The pixels input determines the output file size. For the +PPM format, 10 million pixels will result in a file just under +30 MB in size. A 10 million voxel binary file will be around +40 MB.

+
+
+

Warning

+

If the aspect ratio defined in pixels does not match the +aspect ratio defined in width the plot may appear stretched +or squeezed.

+
+
+

Warning

+

Geometry features along a basis direction smaller than +width/pixels along that basis direction may not appear +in the plot.

+
+

Default: None - Required entry for “slice” and “voxel” plots

+
rgb:Specifies the custom color for the cell or material. Should be 3 integers separated -by spaces.
+ +

<plot> elements of type “slice” can also contain the following +attributes or sub-elements. These are not used in “voxel” plots:

+
+ +++ + + + + + -
basis:

Keyword specifying the plane of the plot for “slice” type plots. Can be +one of: “xy”, “xz”, “yz”.

+

Default: “xy”

+
background:

Specifies the RGB color of the regions where no OpenMC cell can be found. +Should be three integers separated by spaces.

+

Default: 0 0 0 (white)

+
col_spec:

Any number of this optional tag may be included in each <plot> element, +which can override the default random colors for cells or materials. Each +col_spec element must contain id and rgb sub-elements.

+ +++ + + +
id:Specifies the cell or material unique id for the color specification.
rgb:Specifies the custom color for the cell or material. Should be 3 integers +separated by spaces.
@@ -1144,19 +1171,20 @@ to be blue, the corresponding col

Default: None

mask:

The special mask sub-element allows for the selective plotting of only -user-specified cells or materials. Only one mask element is allowed per plot -element, and it must contain as attributes or sub-elements a background masking color and -a list of cells or materials to plot:

+
mask:

The special mask sub-element allows for the selective plotting of only +user-specified cells or materials. Only one mask element is allowed per +plot element, and it must contain as attributes or sub-elements a +background masking color and a list of cells or materials to plot:

- + - +
components:List of unique id numbers of the cells or materials to plot. Should be any number -of integers separated by spaces.
components:List of unique id numbers of the cells or materials to plot. Should be +any number of integers separated by spaces.
background:Color to apply to all cells or materials not in the components list of cells or -materials to plot. This overrides any col_spec color specifications.
background:Color to apply to all cells or materials not in the components list of +cells or materials to plot. This overrides any col_spec color +specifications.
@@ -1165,7 +1193,7 @@ materials to plot. This overrides any
-
+
@@ -1180,13 +1208,13 @@ inactive neutron batches. To run CMFD, the
-
Default: 0
+Default: 0

3.7.2. <begin> Element

The <begin> element controls what batch CMFD calculations should begin.

-
Default: 1
+Default: 1

3.7.3. <feedback> Element

@@ -1194,7 +1222,7 @@ without bias.

used to adjust the weight of fission source neutrons on the next OpenMC batch. It can be turned on with “true” and off with “false”.

-
Default: false
+Default: false

3.7.4. <inactive> Element

@@ -1203,7 +1231,7 @@ during inactive batches. For some applications, CMFD tallies may not be needed until the start of active batches. This option can be turned on with “true” and off with “false”

-
Default: true
+Default: true

3.7.5. <keff_tol> Element

@@ -1211,7 +1239,7 @@ with “true” and off with “false”

If the CMFD eigenvalue and OpenMC batch eigenvalue are within this tolerance, CMFD is allowed to modify source neutron weights.

-
Default: 0.005
+Default: 0.005

3.7.6. <ksp_monitor> Element

@@ -1219,7 +1247,7 @@ CMFD is allowed to modify source neutron weights.

iterations in PETSc. This option can be turned on with “true” and turned off with “false”.

-
Default: false
+Default: false

3.7.7. <mesh> Element

@@ -1227,49 +1255,49 @@ with “false”.

a separate element with the tag name <mesh>. This element has the following attributes/sub-elements:

-
+
- - - - - - - -
type:

The type of structured mesh. Only “rectangular” is currently supported.

+
type:

The type of structured mesh. Only “rectangular” is currently supported.

lower_left:

The lower-left corner of the structured mesh. If only two coordinate are +

lower_left:

The lower-left corner of the structured mesh. If only two coordinate are given, it is assumed that the mesh is an x-y mesh.

upper_right:

The upper-right corner of the structrued mesh. If only two coordinate are +

upper_right:

The upper-right corner of the structrued mesh. If only two coordinate are given, it is assumed that the mesh is an x-y mesh.

dimension:

The number of mesh cells in each direction.

+
dimension:

The number of mesh cells in each direction.

width:

The width of mesh cells in each direction.

+
width:

The width of mesh cells in each direction.

energy:

Energy bins [in MeV], listed in ascending order (e.g. 0.0 0.625e-7 20.0) +

energy:

Energy bins [in MeV], listed in ascending order (e.g. 0.0 0.625e-7 20.0) for CMFD tallies and acceleration. If no energy bins are listed, OpenMC automatically assumes a one energy group calculation over the entire energy range.

albedo:

Surface ratio of incoming to outgoing partial currents on global boundary +

albedo:

Surface ratio of incoming to outgoing partial currents on global boundary conditions. They are listed in the following order: -x +x -y +y -z +z.

Default: 1.0 1.0 1.0 1.0 1.0 1.0

map:

An optional acceleration map can be specified to overlay on the coarse +

map:

An optional acceleration map can be specified to overlay on the coarse mesh spatial grid. If this option is used a 1 is used for a non-accelerated region and a 2 is used for an accelerated region. For a simple 4x4 coarse mesh with a 2x2 fuel lattice surrounded by reflector, the map is:

-

1 1 1 1

+

1 1 1 1

1 2 2 1

1 2 2 1

1 1 1 1

-
+

Therefore a 2x2 system of equations is solved rather than a 4x4. This is extremely important to use in reflectors as neutrons will not contribute to any tallies far away from fission source neutron regions. @@ -1284,7 +1312,7 @@ of two of these will yield the third.

-
+

3.7.8. <norm> Element

@@ -1295,7 +1323,7 @@ fission source regions, in this case 289. This is useful when visualizing this distribution as the average peaking factor will be unity. This parameter will not impact the calculation.

-
Default: 1.0
+Default: 1.0

3.7.9. <n_procs_cmfd> Element

@@ -1303,14 +1331,14 @@ not impact the calculation.

for CMFD calculation. It should be less than or equal to the number of processors used during OpenMC.

-
Default: 1
+Default: 1

3.7.10. <power_monitor> Element

The <power_monitor> element is used to view the convergence of power iteration. This option can be turned on with “true” and turned off with “false”.

-
Default: false
+Default: false

3.7.11. <write_balance> Element

@@ -1318,14 +1346,14 @@ This option can be turned on with “true” and turned off with “ residuals for every coarse mesh region and energy group. This option can be turned on with “true” and off with “false”.

-
Default: false
+Default: false

3.7.12. <write_hdf5> Element

The <write_hdf5> element can be turned on with “true” to get an HDF5 output file of CMFD results.

-
Default: false
+Default: false

3.7.13. <write_matrices> Element

@@ -1334,7 +1362,7 @@ created when solving CMFD equations. These binary output files can be imported into MATLAB using PETSc-MATLAB utilities. This option can be turned on with “true” and off with “false”.

-
Default: false
+Default: false
@@ -1348,7 +1376,7 @@ turned on with “true” and off with “false”.

  ::   Contents   ::   - 4. Troubleshooting  » + 4. Data Processing and Visualization  »

@@ -1356,7 +1384,7 @@ turned on with “true” and off with “false”.

+ + + + + + + + + + +
+ + + +
+
+ +

+ «  3. Writing XML Input Files +   ::   + Contents +   ::   + 5. Troubleshooting  » +

+ +
+
+ + +
+

4. Data Processing and Visualization

+

This section is intended to explain in detail the recommended procedures for +carrying out common tasks with OpenMC. While several utilities of varying +complexity are provided to help automate the process, in many cases it will be +extremely beneficial to do some coding in Python to quickly obtain results. In +these cases, and for many of the provided utilities, it is necessary for your +Python installation to contain:

+ +

Most of these are easily obtainable in Ubuntu through the package manager, or +are easily installed with setuptools.

+ + + + + +
[1](1, 2) Required for tally data extraction from statepoints with statepoint.py
+ + + + + +
[2]Required only if reading HDF5 statepoint files.
+ + + + + +
[3](1, 2, 3) Optional for plotting utilities
+ + + + + +
[4]Optional for interactive GUIs
+
+

4.1. Geometry Visualization

+

Geometry plotting is carried out by creating a plots.xml, specifying plots, and +running OpenMC with the -plot or -p command-line option (See +Geometry Plotting Specification – plots.xml).

+
+

4.1.1. Plotting in 2D

+../_images/atr.png +

After running OpenMC to obtain PPM files, images should be saved to another +format before using them elsewhere. This cuts down the size of the file by +orders of magnitude. Most image viewers and editors that can view PPM images +can also save to other formats (e.g. Gimp, IrfanView, etc.). However, more likey the user will want to +convert to another format on the command line. This is easily accomplished with +the convert command available on most linux distributions as part of the +ImageMagick package. (On +Ubuntu: sudo apt-get install imagemagick). Images are then converted like:

+
convert plot.ppm plot.png
+
+
+
+
+

4.1.2. Plotting in 3D

+../_images/3dgeomplot.png +

The binary VOXEL files output by OpenMC can not be viewed directly by any +existing viewers. In order to view them, they must be converted into a standard +mesh format that can be viewed in ParaView, Visit, etc. The provided utility +voxel.py accomplishes this for SILO:

+
<openmc_root>/src/utils/voxel.py myplot.voxel -o output.silo
+
+
+

and VTK file formats:

+
<openmc_root>/src/utils/myplot.voxel --vtk -o output.vti
+
+
+

To use this utility you need either

+ +

or

+
    +
  • VTK with python bindings - On Ubuntu, these are easily obtained with sudo apt-get install python-vtk
  • +
+

Users can process the binary into any other format if desired by following the +example of voxel.py. For the binary file structure, see Voxel Plot Binary File Specifications.

+
+

Note

+

3D voxel plotting can be very computer intensive for the viewing +program (Visit, Paraview, etc.) if the number of voxels is large +(>10million or so). Thus if you want an accurate picture that +renders smoothly, consider using only one voxel in a certain +direction. For instance, the 3D pin lattice figure above was generated +with a 500x500x1 voxel mesh, which allows for resolution of the +cylinders without wasting too many voxels on the axial dimension.

+
+
+
+
+

4.2. Tally Visualization

+

Tally results are saved in both a text file (tallies.out) as well as a binary +statepoint file. While the tallies.out file may be fine for simple tallies, in +many cases the user requires more information about the tally or the run, or +has to deal with a large number of result values (e.g. for mesh tallies). In +these cases, extracting data from the statepoint file via Python scripting is +the preferred method of data analysis and visualization.

+
+

4.2.1. Data Extraction

+

A great deal of information is available in statepoint files (See +State Point Binary File Specifications), most of which is easily extracted by the provided +utility statepoint.py. This utility provides a Python class to load statepoints +and extract data - it is used in many of the provided plotting utilities, and +can be used in user-created scripts to carry out manipulations of the data. To +read tallies using this utility, make sure statepoint.py is in your PYTHONPATH, +and then import the class, instantiate it, and call read_results:

+
from statepoint import StatePoint
+sp = StatePoint('statepoint.100.binary')
+sp.read_results()
+
+
+

At this point the user can extract entire scores from tallies into a data +dictionary containing numpy arrays:

+
tallyid = 1
+score = 'flux'
+data = sp.extract_results(tallyid, score)
+means = data['means']
+print data.keys()
+
+
+

The results from this function contain all filter bins (all mesh points, all +energy groups, etc.), which can be reshaped with the bin ordering also contained +in the output dictionary. This is the best choice of output for easily +integrating ranges of data.

+

Alternatively the user can extract specific values for a single score/filter +combination:

+
tallyid = 1
+score = 'flux'
+filters = [('mesh', (1, 1, 5)), ('energyin', 0)]
+value, error = sp.get_value(tallyid, filters, score)
+
+
+

In the future more documentaion may become available here for statepoint.py and +the data extraction functions of StatePoint objects. However, for now it is up +to the user to explore the classes in statepoint.py to discover what data is +available in StatePoint objects (we highly recommend interactively exploring +with IPython). Many exmaples can be found by looking +through the other utilies that use statepoint.py, and a few common visualization +tasks will be described here in the following sections.

+
+
+

4.2.2. Plotting in 2D

+../_images/plotmeshtally.png +

For simple viewing of 2D slices of a mesh plot, the utility plot_mesh_tally.py +is provided. This utility provides an interactive GUI to explore and plot +mesh tallies for any scores and filter bins. It requires statepoint.py, as well +as PyQt.

+../_images/fluxplot.png +

Alternatively, the user can write their own Python script to manipulate the data +appropriately. Consider a run where the first tally contains a 105x105x1 mesh +over a small core, with a flux score and two energyin filter bins. To explicitly +extract the data and create a plot with gnuplot, the following script can be +used. The script operates in several steps for clarity, and is not necessarily +the most efficient way to extract data from large mesh tallies. This creates the +two heatmaps in the previous figure.

+
  #!/usr/bin/env python
+
+  import os
+
+  import statepoint
+
+  # load and parse the statepoint file
+  sp = statepoint.StatePoint('statepoint.300.binary')
+  sp.read_results()
+
+  tallyid = 0 # This is tally 1
+  score = 0   # This corresponds to flux (see tally.scores)
+
+  # get mesh dimensions
+  meshid = sp.tallies[tallyid].filters['mesh'].bins[0]
+  for i,m in enumerate(sp.meshes):
+      if m.id == meshid:
+        mesh = m
+        break
+  nx,ny,nz = mesh.dimension
+
+  # loop through mesh and extract values to python dictionaries
+  thermal = {}
+  fast = {}
+  for x in range(1,nx+1):
+      for y in range(1,ny+1):
+          for z in range(1,nz+1):
+              val,err = sp.get_value(tallyid,
+                                     [('mesh',(x,y,z)),('energyin',0)],
+                                     score)
+              thermal[(x,y,z)] = val
+              val,err = sp.get_value(tallyid,
+                                     [('mesh',(x,y,z)),('energyin',1)],
+                                     score)
+              fast[(x,y,z)] = val
+
+  # sum up the axial values and write datafile for gnuplot
+  with open('meshdata.dat','w') as fh:
+      for x in range(1,nx+1):
+          for y in range(1,ny+1):
+              thermalval = 0.
+              fastval = 0.
+              for z in range(1,nz+1):
+                thermalval += thermal[(x,y,z)]
+                fastval += fast[(x,y,z)]
+              fh.write("{} {} {} {}\n".format(x,y,thermalval,fastval))
+
+  # write gnuplot file
+  with open('tmp.gnuplot','w') as fh:
+    fh.write(r"""set terminal png size 1000 400
+set output 'fluxplot.png'
+set nokey
+set autoscale fix
+set multiplot layout 1,2 title "Pin Mesh Flux Tally"
+set title "Thermal"
+plot 'meshdata.dat' using 1:2:3 with image
+set title "Fast"
+plot 'meshdata.dat' using 1:2:4 with image
+""")
+
+  # make plot
+  os.system("gnuplot < tmp.gnuplot")
+
+
+
+

4.2.3. Plotting in 3D

+../_images/3dcore.png +

As with 3D plots of the geometry, meshtally data needs to be put into a standard +format for viewing. The utility statepoint_3d.py is provided to accomplish this +for both VTK and SILO. By default statepoint_3d.py processes a statepoint into a +3D file with all mesh tallies and filter/score combinations,

+
<openmc_root>/src/utils/statepoint_3d.py <statepoint_file> -o output.silo
+<openmc_root>/src/utils/statepoint_3d.py <statepoint_file> --vtk -o output.vtm
+
+
+

but it also provides several command-line options to selectively process only +certain data arrays in order to keep file sizes down.

+
<openmc_root>/src/utils/statepoint_3d.py <statepoint_file> -tallies 2,4 --scores 4.1,4.3 -o output.silo
+<openmc_root>/src/utils/statepoint_3d.py <statepoint_file> -filters 2.energyin.1 --vtk -o output.vtm
+
+
+

All available options for specifying a subset of tallies, scores, and filters +can be listed with the --list or -l command line options.

+
+

Note

+

Note that while SILO files can contain multiple meshes in one file, +VTK needs to use a multi-block dataset, which stores each mesh piece +in a different file in a subfolder. All meshes can be loaded at once +with the main VTM file, or each VTI file in the subfolder can be +loaded individually.

+
+

Alternatively, the user can write their own Python script to manipulate the data +appropriately before insertion into a SILO or VTK file. For instance, if the +data has been extracted as was done in the 2D plotting example script above, a +SILO file can be created with:

+
import silomesh as sm
+sm.init_silo("fluxtally.silo")
+sm.init_mesh('tally_mesh',*mesh.dimension, *mesh.lower_left, *mesh.width)
+sm.init_var('flux_tally_thermal')
+for x in range(1,nx+1):
+  for y in range(1,ny+1):
+      for z in range(1,nz+1):
+        sm.set_value(float(thermal[(x,y,z)]),x,y,z)
+sm.finalize_var()
+sm.init_var('flux_tally_fast')
+for x in range(1,nx+1):
+  for y in range(1,ny+1):
+      for z in range(1,nz+1):
+          sm.set_value(float(fast[(x,y,z)]),x,y,z)
+sm.finalize_var()
+sm.finalize_mesh()
+sm.finalize_silo()
+
+

and the equivalent VTK file with:

+
import vtk
+
+grid = vtk.vtkImageData()
+grid.SetDimensions(nx+1,ny+1,nz+1)
+grid.SetOrigin(*mesh.lower_left)
+grid.SetSpacing(*mesh.width)
+
+# vtk cell arrays have x on the inners, so we need to reorder the data
+idata = {}
+for x in range(nx):
+  for y in range(ny):
+    for z in range(nz):
+      i = z*nx*ny + y*nx + x
+      idata[i] = (x,y,z)
+
+vtkfastdata = vtk.vtkDoubleArray()
+vtkfastdata.SetName("fast")
+for i in range(nx*ny*nz):
+  vtkfastdata.InsertNextValue(fast[idata[i]])
+
+vtkthermaldata = vtk.vtkDoubleArray()
+vtkthermaldata.SetName("thermal")
+for i in range(nx*ny*nz):
+  vtkthermaldata.InsertNextValue(thermal[idata[i]])
+
+grid.GetCellData().AddArray(vtkfastdata)
+grid.GetCellData().AddArray(vtkthermaldata)
+
+writer = vtk.vtkXMLImageDataWriter()
+writer.SetInput(grid)
+writer.SetFileName('tally.vti')
+writer.Write()
+
+
+
+
+

4.2.4. Getting Data into MATLAB

+

There is currently no front-end utility to dump tally data to MATLAB files, but +the process is straightforward. First extract the data using a custom Python +script with statepoint.py, put the data into appropriately-shaped numpy arrays, +and then use the Scipy MATLAB IO routines to save to a MAT +file. Note that the data contained in the output from +StatePoint.extract_result is already in a Numpy array that can be reshaped +and dumped to MATLAB in one step.

+
+
+
+ + +
+
+ +

+ «  3. Writing XML Input Files +   ::   + Contents +   ::   + 5. Troubleshooting  » +

+ +
+ + + + + + + \ No newline at end of file diff --git a/usersguide/troubleshoot.html b/usersguide/troubleshoot.html index fb3d801d90..0dd26dcfdd 100644 --- a/usersguide/troubleshoot.html +++ b/usersguide/troubleshoot.html @@ -3,17 +3,14 @@ - - 4. Troubleshooting — OpenMC Documentation - + 5. Troubleshooting — OpenMC Documentation -