Index
- -A
-B
-- |
C
-D
-E
-F
-G
-- | - |
H
-I
-K
-- |
L
-M
-N
-P
-- | - |
Q
-- |
R
-S
-T
-U
-V
-- | - |
+ |
- |
- | - |
- |
- | - |
- |
- | - |
Libmnemosyne consists of a number of components, which can be swapped in and -out. This is handled by the ComponentManager. Examples of components are the -scheduler, the storage layer, card types, plugins, ...
-The basic unit of information from which Cards are derived is called a Fact, -containing a set of fields and their associated values. E.g., for a three-sided -CardType, these fields are foreign word, pronunciation and translation.
-A FactView collects a number of the fields of a Fact into question and answers. -E.g., the three-sided CardType has a recognition FactView, where the question -contains the foreign word, and the answer contains the pronunciation and the -translation.
-As mentioned before, a Fact is linked to a CardType, and each CardType lists -a set of FactViews.
-The actual Cards are generated from the data in Fact using the recipe of a -certain FactView. A Card also contains all the repetition data needed for the -Scheduler to do its work. Since the question and answers are generated from -the Fact data each time a Card is shown, related Cards (i.e. Cards with -different FactViews of the same Fact) are always consistent.
-The actual displaying of the data in a Card is handled by a RenderChain, which -details the operations needed to get from the raw data in a Card to a -representation of its question and answer, in a form either suitable for -displaying in a browser, or exporting to a text file, ... . First the raw data -is sent through Filters, which perform operations which can be useful for many -card types, like expanding relative paths. Then this data is assembled in the -right order in a Renderer, which can be card type specific.
-At several points in the program, plugin writers can hook in their code using -the Hook mechanism.
-Before the data is passed to the Renderer, Filters can be applied to it. This -is an extra level of flexibility, and can be used to generate LaTeX, convert -relative paths to absolute paths, etc ...
-To determine which cards are active (i.e.) participate in the review process, -a mechanism of ActivityCriterion and CriterionApplier is used.
-In order to make it easier for other GUI frontends to be written, all the logic -typically needed for GUIs, but that is independent of the actual GUI toolkit -used, is abstracted in controllers. In order to get more flexibility, there -are two of them: one related to the review process (which is different for -different schedulers), and one related to the rest of the program (which -normally won’t change).
-There is also mechanism for plugins to add new statistical data to the standard -statistics in an integrated way.
-Component
ComponentManager
Fact
FactView
Tag
TagTree
CardType
Card
CardTypeConverter
RenderChain
Filter
Renderer
Controller
ReviewController
Configuration
Database
FileFormat
Hook
LogUploader
Logger
Plugin
Scheduler
Stopwatch
StatisticsPage
Criterion
Card
¶mnemosyne.libmnemosyne.card.
Card
(card_type, fact, fact_view, creation_time=None)¶A card has a question and an answer and also stores repetition data.
-Questions and answers are dynamically generated depending on the card -type. Different render chains are supported, to e.g. render the question -for use in the review window, in the card browser, ... .
-Creation and modification dates are POSIX timestamps stored as integers.
-For card types which need extra information (e.g. cloze deletion), the -variable ‘extra_data’ can be used to store this extra information in the -database. It’s dictionary which should contain only standard Python -objects.
-‘scheduler_data’ is a variable that can be used by a scheduler to save -state. It is an integer as opposed to a complex datatype to to allow for -fast sql queries. If a scheduler needs additional data, it can be stored -in ‘extra_data’, but then the custom scheduler needs to make sure it -explicitly logs an ‘edited_card’ event so that ‘extra data’ gets sent -across during sync.
-‘active’ is used to determine whether a card is included in the review -process. Currently, the UI allows setting cards as active if they belong to -certain card type/fact view combos. We choose to store this information on -card level and not as a flag in fact view or tag, so that plugins have the -possibility to offer more flexibility, e.g. by having cards active based -on grade, ...
-‘id’ is used to identify this object to the external world (logs, xml -files, sync, ...), whereas ‘_id’ is an internal id that could be different -and that can be used by the database for efficiency reasons.
-answer
(render_chain='default', **render_args)¶question
(render_chain='default', **render_args)¶reset_learning_data
()¶Used when creating a card for the first time, or when choosing -‘reset learning data’ on import.
-‘acq_reps’ and ‘ret_reps’ are the number of repetitions this card has -seen in the acquisition phase (grade 0 and 1) and the retention phase -(grades 3 through 5) respectively.
-‘lapses’ is the number of times a card with grade 2 or higher was -forgotten, i.e. graded 0 or 1.
-‘last_rep’ and ‘next_rep’ are integer POSIX timestamps. Since they have -a resolution in seconds, they accomodate plugins doing minute-level -scheduling. Storing them as int makes it very efficient in SQL.
-tag_string
()¶CardTypeConverter
¶mnemosyne.libmnemosyne.card_type_converter.
CardTypeConverter
(component_manager, **kwds)¶Converts a set of sister cards to a new card type.
-used_for = (old_type class, new_type class)
-Note that the function of this class is NOT to edit the fact data behind -the cards, which is trivial and handled in the main controller, but -rather to delete, create or convert cards to make the transition to the -new card type.
-‘correspondence’ {old_fact_key: new_fact_key} is the dictionary which -relates fact keys in the two card types, in order to determine in which -way cards should be created or deleted.
-We return ‘new_cards’, ‘edited_cards’, ‘deleted_cards’ in order to be able -to handle them in the database storage.
-component_type
= 'card_type_converter'¶convert
(cards, old_card_type, new_card_type, correspondence)¶CardType
¶mnemosyne.libmnemosyne.card_type.
CardType
(component_manager, **kwds)¶A card type groups a number of fact views on a certain fact, thereby -forming a set of sister cards.
-A card type needs an id as well as a name, because the name can change -for different translations.
-Inherited card types should have ids where :: separates the different -levels of the hierarchy, e.g. parent_id::child_id.
-The keys from the fact are also given more verbose names here. This is -not done in fact.py, on one hand to save space in the database, and on -the other hand to allow the possibility that different card types give -different names to the same key. (E.g. foreign word’ could be called -‘French’ in a French card type, or ‘pronunciation’ could be called -‘reading’ in a Kanji card type.) This is done in self.fact_keys_and_names, -which is a list of the form [(fact_key, fact_key_name)]. It is tempting -to use a dictionary here, but we can’t do that since ordering is -important.
-Keys which need to be different for all facts belonging to this card -type are listed in ‘unique_fact_keys’.
-Note that a fact could contain more data than those listed in the card -type’s ‘fact_keys_and_names’ variable, which could be useful for card -types needing hidden keys, dynamically generated keys, ... .
-The functions ‘create_sister_cards’ and ‘edit_fact’ can be overridden by -card types which can have a varying number of fact views, e.g. the cloze -card type.
-component_type
= 'card_type'¶create_sister_cards
(fact)¶Initial grading of cards and storing in the database should not -happen here, but is done in the main controller.
-edit_fact
(fact, new_fact_data)¶If for the card type this operation results in edited, added or -deleted card data apart from the edited fact data from which they -derive, these should be returned here, so that they can be taken into -account in the database storage.
-Initial grading of cards and storing in the database should not happen -here, but is done in the main controller.
-extra_data
= {}¶fact_data
(card)¶Returns the data in fact of a card. Normally. this is just -‘card.fact.data’, but specialty card types (e.g. the cloze card type) -can override this.
-fact_key_format_proxies
()¶Sometimes, a card type can dynamically create a key when -generating a question or an answer (see e.g. the cloze card type). -Since the user cannot specify how this key should be formatted, it -should be formatted like an other, static key. This function returns -a dictionary with this correspondence.
-fact_key_names
()¶fact_key_with_name
(name)¶fact_keys
()¶fact_keys_and_names
= None¶fact_views
= None¶id
= '-1'¶is_fact_data_valid
(fact_data)¶Check if all the required keys are present.
-keyboard_shortcuts
= {}¶name
= ''¶render_answer
(card, render_chain='default', **render_args)¶render_question
(card, render_chain='default', **render_args)¶required_fact_keys
= None¶unique_fact_keys
= None¶Component
¶mnemosyne.libmnemosyne.component.
Component
(component_manager, **kwds)¶Base class of components that are registered with the component -manager. This is a list of component types: config, log, database, -scheduler, stopwatch, translator, card_type, card_type_converter, -render_chain, renderer, filter, card_type_widget, -generic_card_type_widget, ui_component, controller, main_widget, -review_controller, review_widget, file format, plugin, hook, -criterion, criterion_applier, statistics_page, sync_server, -all the abstract dialogs, ...
-‘used_for’ can store certain relationships between components, e.g. -a card type widget is used for a certain card type.
-Most of the time, instances are stored here, apart from widgets in which -case classes are stored. (Instantiating a complex widget can take a lot of -time on a mobile device, and should be done lazily.) Only the main -widget is stored as an instance here.
-When ‘instantiate == LATER’, the component is lazily created when needed. -The instance is not cached for subsequent reuse, as these widgets -typically can become obsolete/overwritten by plugins.
-Each component has access to all of the context of the other components -because it hold a reference to the user’s component manager.
-We need to pass the context of the component manager already in the -constructor, as many component make use of it in their __init__ method. -This means that derived components should always call the -Component.__init__ if they provide their own constructor.
-IMMEDIATELY
= 0¶LATER
= 1¶activate
()¶Initialisation code called when the component is about to do actual -work, and which can’t happen in the constructor, e.g. because -components on which it relies have not yet been registered.
-card_type_with_id
(id)¶card_types
()¶component_type
= ''¶config
()¶controller
()¶database
()¶deactivate
()¶flush_sync_server
()¶If there are still dangling sessions (i.e. those waiting in vain -for more client input) in the sync server, we should flush them and -make sure they restore from backup before doing anything that could -change the database (e.g. adding a card). Otherwise, if these -sessions close later during program shutdown, their backup -restoration will override the changes.
-Also stop any running media.
-instantiate
= 0¶log
()¶main_widget
()¶plugins
()¶render_chain
(id='default')¶review_controller
()¶review_widget
()¶Apart from the main widget, we create all other widgets lazily for -efficiency reasons. The review widget instance is therefore not stored -in the component manager, but is under the control of the review -controller.
-scheduler
()¶start_review
()¶stopwatch
()¶translator
()¶used_for
= None¶ComponentManager
¶mnemosyne.libmnemosyne.component_manager.
ComponentManager
¶Manages the different components. Typically, instances of the different -components are stored, as opposed to classes. In such a way, the component -manager stores all the state of the user. Exceptions are widgets other -than the main widget, which are lazily created for efficiency reasons.
-For certain components, many can be active at the same time (card types, -filters, function hooks, ...). For others, there can be only on active -at the same time, like schedule, database ... The idea is that the last -one registered takes preference. This means that e.g. the default -scheduler needs to be registered first.
-add_component_to_plugin
(plugin_class_name, component_class)¶Typical use case for this is when a plugin has a GUI component -which obviously does not live inside libmnemosyne, and which needs to -be added at a later stage.
-all
(comp_type, used_for=None)¶For components for which there can be many active at once.
-current
(comp_type, used_for=None)¶For components for which there can be only one active at any -time.
-deactivate_all
()¶debug
(msg)¶Log a debugging message if debugging is enabled.
-register
(component)¶unregister
(component)¶Configuration
¶mnemosyne.libmnemosyne.configuration.
Configuration
(component_manager)¶activate
()¶card_type_property
(property_name, card_type, fact_key=None, default=None)¶change_user_id
(new_user_id)¶When a client syncs for the first time with a server, we need to -set the client’s user_id identical to the one of the server, in order -for the uploaded anonymous logs to be consistent.
-clone_card_type_properties
(old_card_type, new_card_type)¶component_type
= 'config'¶delete_card_type_properties
(card_type)¶determine_dirs
()¶fill_dirs
()¶Fill data_dir and config_dir. Do this even if they already exist, -because we might have added new files since the last version.
-load
()¶load_user_config
()¶machine_id
()¶save
()¶set_card_type_property
(property_name, property_value, card_type, fact_key=None)¶Set a property (like font, colour, ..) for a certain card type. -If fact_key is None, then this will be applied to all fact keys.
-This info is not stored in the database, but in the configuration, -to allow different clients to have different settings, even though -they exchange data during sync.
-set_defaults
()¶Fill the config with default values. Is called after every load, -since a new version of Mnemosyne might have introduced new keys.
-Controller
¶mnemosyne.libmnemosyne.controller.
Controller
(component_manager, **kwds)¶A collection of logic used by the GUI. The logic related to the -review process is split out in a separated controller class, to -allow that to be swapped out easily.
-There are two classes of functions here: ‘show_XXX_dialog’, which needs -to be called by the GUI to set everything up to show a certain dialog, -and then the other functions, which the implementation of the actual -dialog can use to perform GUI-independent operations.
-See also ‘How to write a new frontend’ in the docs.
-change_card_type
(facts, old_card_type, new_card_type, correspondence)¶Note: all facts should have the same card type.
-clone_card_type
(card_type, clone_name)¶component_type
= 'controller'¶create_new_cards
(fact_data, card_type, grade, tag_names, check_for_duplicates=True, save=True)¶delete_card_type
(card_type)¶delete_current_card
()¶delete_facts_and_their_cards
(facts)¶delete_plugin
(plugin)¶edit_card_and_sisters
(card, new_fact_data, new_card_type, new_tag_names, correspondence)¶heartbeat
()¶For code that needs to run periodically.
-install_plugin
()¶save_file
()¶show_add_cards_dialog
()¶show_browse_cards_dialog
()¶show_configuration_dialog
()¶show_edit_card_dialog
()¶show_export_file_dialog
()¶show_getting_started_dialog
()¶show_import_file_dialog
()¶show_insert_img_dialog
(filter)¶Filter contains the file dialog filter with the supported -filetypes.
-show_insert_sound_dialog
(filter)¶Filter contains the file dialog filter with the supported -filetypes.
-show_insert_video_dialog
(filter)¶Filter contains the file dialog filter with the supported -filetypes.
-show_manage_card_types_dialog
()¶show_manage_plugins_dialog
()¶show_new_file_dialog
()¶show_open_file_dialog
()¶show_save_file_as_dialog
()¶show_statistics_dialog
()¶show_sync_dialog
()¶show_tip_dialog
()¶star_current_card
()¶sync
(server, port, username, password, ui=None)¶update_title
()¶Criterion
¶mnemosyne.libmnemosyne.criterion.
Criterion
(component_manager, id=None)¶Used to select a subset of cards, e.g. which cards are currently -active, i.e. included in the review process.
-The available criteria are stored as classes in the component_manager, -the actual instances together with their data are stored in the database.
-active_card_type_added
(card_type)¶active_tag_added
(tag)¶apply_to_card
(card)¶Set the card active or not depending on the criterion. Does not -write to the database. Called e.g. after creating, updating or -reviewing cards, to see whether these cards should start out their -life as active or not.
-The tag and card type creation and deletion functions are callbacks -called by the rest of libmnemosyne when these objects get created or -destroyed, such that Criteria can update their status if needed.
-card_type_deleted
(card_type)¶component_type
= 'criterion'¶criterion_type
= ''¶data_to_string
()¶Convert variables to a string for storage in the database. We don’t -use pickle here as that would make it difficult for non-Python programs -to read the database.
-data_to_sync_string
()¶Convert variables to a string for sending across during syncing. -Could be different from ‘data_to_string’, as it should use ids instead -of _ids.
-deactivated_card_type_added
(card_type)¶deactivated_tag_added
(tag)¶instantiate
= 1¶is_empty
()¶Used to prevent people from creating a criterion which can never -contain any cards (e.g. disabling all card types).
-is_tag_active
(tag)¶set_data_from_string
(data_string)¶set_data_from_sync_string
(data_string)¶tag_deleted
(tag)¶mnemosyne.libmnemosyne.criterion.
CriterionApplier
(component_manager, **kwds)¶Can be registered ‘used_for’ a certain Criterion to apply it in bulk to -all the cards in the database. Is much faster than fetching each card from -the database, calling Criterion.apply_to_card, and storing it back in the -database.
-This code is not part of Criterion, because it is dependent on the database -backend.
-apply_to_database
(criterion)¶component_type
= 'criterion_applier'¶Database
¶mnemosyne.libmnemosyne.database.
Database
(component_manager, **kwds)¶Interface class describing the functions to be implemented by the -actual database classes.
-Apart from the basic interface defined here, depending on the situation -a database can also implement functions for logging, statistics and -syncing (see SQLite_logging.py, SQLite_statistics.py, SQLite_sync.py).
-abandon
()¶add_card
(card)¶add_card_type
(card_type)¶add_criterion
(criterion)¶add_fact
(fact)¶add_fact_view
(fact_view)¶add_tag
(tag)¶add_tag_to_cards_with_internal_ids
(tag, _card_ids)¶backup
()¶card
(id, is_id_internal)¶card_type
(id, is_id_internal)¶card_types_in_use
()¶cards
(sort_key='', limit=-1)¶cards_due_for_ret_rep
(now, sort_key='', limit=-1)¶cards_from_fact
(fact)¶Return a list of the cards deriving from a fact.
-cards_learn_ahead
(now, sort_key='', limit=-1)¶cards_new_memorising
(grade, sort_key='', limit=-1)¶cards_to_relearn
(grade, sort_key='', limit=-1)¶cards_unseen
(sort_key='', limit=-1)¶cards_with_scheduler_data
(scheduler_data, sort_key='', limit=-1)¶change_user_id
(user_id)¶component_type
= 'database'¶criteria
()¶criterion
(id, is_id_internal)¶current_criterion
()¶data_dir
()¶Returns directory of the database.
-deactivate
()¶default_criterion_name
= '__DEFAULT__'¶default_name
= 'default'¶delete_card
(card)¶delete_card_type
(card_type)¶delete_criterion
(criterion)¶delete_fact
(fact)¶delete_fact_view
(fact_view)¶delete_tag
(tag)¶delete_tag_if_unused
(tag)¶display_name
()¶Returns bare name of the database, without parent paths and -without extension.
-duplicates_for_fact
(fact, card_type)¶Return facts with same ‘card_type.unique_fact_keys’ data as ‘fact’.
-fact
(id, is_id_internal)¶fact_view
(id, is_id_internal)¶get_or_create_tag_with_name
(name)¶has_card_type_with_id
(id)¶has_card_with_id
(id)¶has_clone
(card_type)¶has_criterion_with_id
(id)¶has_fact_view_with_id
(id)¶has_fact_with_id
(id)¶has_tag_with_id
(id)¶is_empty
()¶is_in_use
(card_type)¶is_loaded
()¶is_user_card_type
(card_type)¶load
(path)¶name
()¶Returns name of the database, without parent paths, but with -extensions.
-new
(path)¶path
()¶Returns full path of the database.
-release_connection
()¶Release the connection, so that it may be recreated in a separate -thread.
-remove_tag_from_cards_with_internal_ids
(tag, _card_ids)¶restore
(path)¶save
(path=None)¶scheduler_data_count
(scheduler_data)¶set_current_criterion
(criterion)¶set_scheduler_data
(scheduler_data)¶sorted_card_types
()¶Sorts card types so that all the built-in card types appear first, -in the order determined by their id, and then all the user card types -appear alphabetically.
-suffix
= ''¶tag
(id, is_id_internal)¶unload
()¶update_card
(card, repetition_only=False)¶update_card_type
(card_type)¶update_criterion
(criterion)¶update_fact
(fact)¶update_fact_view
(fact_view)¶update_tag
(tag)¶user_id
()¶version
= ''¶Fact
¶mnemosyne.libmnemosyne.fact.
Fact
(data, id=None)¶Basic unit of information from which several cards can be derived.
-The fields are stored in a dictionary called ‘data’, and can be get and -set using the standard dictionary syntax.
-‘id’ is used to identify this object to the external world (logs, xml -files, sync, ...), whereas ‘_id’ is an internal id that could be different -and that can be used by the database for efficiency reasons.
-The keys in data should not contain characters like <, >, &, ..., as they -are used as unescaped tag names during sync.
-When making new card types, it is best to reuse the keys below as much -as possible, to facilitate conversion between card types:
-f | -front | -
b | -back | -
f | -foreign word | -
p_1 | -pronunciation | -
m_1 | -meaning | -
FactView
¶mnemosyne.libmnemosyne.fact_view.
FactView
(name, id)¶Sequence of keys from a fact to form a question and an answer. -A fact view needs an id string as well as a name, because the name can -change for different translations.
-Note that id’s should be unique to distinguish them during sync, so a -good naming convention is ‘card_type_id.fact_view_id’. (We don’t use -‘::’ so as not to interfere with the ‘::’ in inherited card types.)
-The purpose of the decorator dictionaries is to allow for cards that read -‘What is the answer to $question’, as opposed to just ‘$question’.
-FileFormat
¶mnemosyne.libmnemosyne.file_format.
FileFormat
(component_manager, **kwds)¶component_type
= 'file_format'¶description
= ''¶do_import
(filename, extra_tag_name=None)¶Make sure fileformats call this implementation first.
-export_possible
= False¶extension
= ''¶filename_filter
= ''¶import_possible
= False¶Filter
¶mnemosyne.libmnemosyne.filter.
Filter
(component_manager, **kwds)¶Code which operates on a string and filters it to achieve extra -functionality, e.g. converting relative paths to absolute paths.
-It is contained in a RenderChain and represents functionality which is -useful for many different card types.
-The filters are executed in the order they are listed in the RenderChain. -If you really need to make sure that your filter runs before the -rest, set ‘in_front=True’ as argument in ‘render_chain.register_filter’.
-component_type
= 'filter'¶run
(text, card, fact_key, **render_args)¶Hook
¶mnemosyne.libmnemosyne.hook.
Hook
(component_manager, **kwds)¶Function hooks are used by registering an instance of this class as -component of type hook, with the ‘used_for’ argument any of the following -hook points:
----
-- - -- - - ‘after_load’ -in database.load -- ‘after_backup’ -in database.backup -- ‘before_unload’ -in database.unload -- ‘configuration_defaults’ -in configuration.set_defaults -- ‘before_repetititon’ -in SM2_mnemosyne.grade_answer -extra argument: card -- ‘after_repetititon’ -in SM2_mnemosyne.grade_answer -extra argument: card -- ‘dynamically_create_media_files’ -in SQLite_sync -extra argument: data -- ‘delete_unused_media_files’ -in SQLite_sync -- ‘preprocess_cloze’ -in cloze.py -- - ‘postprocess_q_a_cloze’ -in cloze.py -
It is the ‘run’ method that will get called at the corresponding point -in the program.
-component_type
= 'hook'¶run
()¶libmnemosyne is designed in such a way that writing a new front is as painless as possible. All the code for running a GUI which is actually GUI toolkit independent is grouped in two controllers: the main ui controller and the review ui controller. In order to build a new frontend, you need to create a main widget which inherits from MainWidget
and implements its interface, and similarly a review widget which inherits from ReviewWidget
.
In order to get a feel for how this works, it’s best by starting to study the code for the ppygui_ui Windows Mobile client, which is the simplest possible frontend, as it only supports reviewing cards.
-There are three files in that frontend:
-To give a better feeling for how the division of labour between your own new GUI code and the GUI independent code in the controllers works, consider this example from the ‘add cards’ functionality in the PyQt frontend.
-When the user activates the menu option or icon to add cards, it will fire up a certain function, which in the PyQt frontend is called add_cards()
:
QObject.connect(self.actionAddCards, SIGNAL("activated()"), MainWindow.add_cards)
-
The implementation of this function is rather trivial, it just calls the controller:
-def add_cards(self):
- self.controller().show_add_cards_dialog()
-
The code above is code you need to implement for your new frontend, but as you can see, it’s rather trivial.
-The controller’s show_add_cards_dialog
function looks like this:
def show_add_cards_dialog(self):
- self.stopwatch().pause()
- self.component_manager.get_current("add_cards_dialog")\
- (self.component_manager).activate()
- review_controller = self.review_controller()
- review_controller.reload_counters()
- if review_controller.card is None:
- review_controller.new_question()
- else:
- review_controller.update_status_bar()
- self.stopwatch().unpause()
-
This is where the heavy lifting is done, but it’s completely UI independent, and there should be no need for you to modify that code.
-In order for the controller to know where it can find the actual add cards dialog, which for PyQt is called AddCardsDlg
, you need to have that dialog derive from the abstract libmnemosyne.ui_components.dialogs.AddCardsDialog
, and provide an activate function, which for the PyQt toolkit is simply:
def activate(self):
- self.exec_()
-
Finally, you need to register the AddCardsDlg
component. That is what the following line does inside the main startup script (which for PyQt is simply called mnemosyne
):
mnemosyne.components.append(("mnemosyne.pyqt_ui.add_cards_dlg",
- "AddCardsDlg"))
-
Inside the AddCardsDlg
, there is of course lots of UI specific code, but once the dialog has enough data to create the cards, it simply calls:
self.controller().create_new_cards(fact_data, card_type, grade, tag_names)
-
So, the AddCardsDlg
should almost entirely consist of GUI dependent code. All the GUI indepedent code to actually create the cards is contained within the controller’s create_new_cards()
method.
If you feel like you need to override the review or the main controller provided by libmnemosyne, please let the developpers know. Either its design is not general enough, or you are trying to work against libmnemosyne rather than with it.
-Tips for creating a responsive client:
-When instantiating a libmnemosyne.Mnemosyne
object, there are two parameters you need to provide: upload_science_logs
and interested_in_old_reps
. If you are writing a mobile client which syncs to a desktop version of mnemosyne, it is recommended that you don’t deal with uploading the science logs yourself, but let the desktop client deal with that. As for interested_in_old_reps
, if your mobile client does not include graphical statistics using the revision history, it does not make sense to store this history on your device.
The standard instantiation of a libmnemosyne.Mnemosyne
object includes all components in libmnemosyne. If you are writing a mobile client with e.g. only review capabilities, it does not make sense to include all these components. See the example of the Windows Mobile ppygui_ui frontend for a client which only uses the bare minimum of components to improve startup time.
If your mobile client does not include a card browser, you can save some disk space by not storing pregenerated questions or answers. To achieve this, make sure you do not include the regular SQLite
component, but this one:
("mnemosyne.libmnemosyne.databases.SQLite_no_pregenerated_data",
- "SQLite_NoPregeneratedData")
-
libmnemosyne does some optimisation by trying to show the next question before the grading of the previous question is completed. This improves the perceived responsiveness of the client. However, some GUI toolkits (e.g. Qt) queue widget updates and only excecute them when there is no more processing going on, thereby defeating libmnemosyne’s optimisation. For that reason, there is a function review_widget().redraw_now
which is used to tell the GUI toolkit to do the repaint now. If your toolkit also has similar behaviour, implementing this function can really help to mask slow database access.
If save operations are slow on your mobile device, you might want to consider setting a larger default value instead of save_after_n_reps = 1
in config.py
.
If media files will never be edited outside of Mnemosyne on your mobile device, you can save time during sync by setting check_for_updated_media_files = False
in config.py
.
If you are really adventurous, you can set backup_before_sync = True
in config.py
.
Notes:
-__init__()
method. In this case, you need to move that code to your widget’s activate()
method, at which time all the other compoments will already be active.Logger
¶mnemosyne.libmnemosyne.logger.
Logger
(component_manager)¶activate
()¶added_card
(card)¶added_card_type
(card_type)¶added_criterion
(criterion)¶added_fact
(fact)¶added_fact_view
(fact_view)¶added_media_file
(filename)¶added_tag
(tag)¶archive_old_log
()¶Archive log to history folder if it’s large enough.
-component_type
= 'log'¶deactivate
()¶deleted_card
(card)¶deleted_card_type
(card_type)¶deleted_criterion
(criterion)¶deleted_fact
(fact)¶deleted_fact_view
(fact_view)¶deleted_media_file
(filename)¶deleted_tag
(tag)¶dump_to_science_log
()¶edited_card
(card)¶edited_card_type
(card_type)¶edited_criterion
(criterion)¶edited_fact
(fact)¶edited_fact_view
(fact_view)¶edited_media_file
(filename)¶edited_setting
(key)¶edited_tag
(tag)¶get_timestamp
()¶If self._timestamp == None (the default), then the timestamp will -be the current time. It is useful to be able to override this, e.g. -during database import or syncing, when you need to add log entries -to the database that happened in the past.
-loaded_database
(machine_id=None, scheduled_count=None, non_memorised_count=None, active_count=None)¶log_index_of_last_upload
()¶We don’t store this info in the configuration, but determine it on -the fly, so that users can copy configuration files between their -machines.
-1.x log names have the format userid_index.bz2. -2.x log names have the format userid_machineid_index.bz2
-Obviously, we should only consider the logs from our own machine.
-repetition
(card, scheduled_interval, actual_interval, thinking_time)¶saved_database
(machine_id=None, scheduled_count=None, non_memorised_count=None, active_count=None)¶set_timestamp
(timestamp)¶start_logging
()¶started_program
(version_string=None)¶started_scheduler
(scheduler_name=None)¶stopped_program
()¶timestamp
¶If self._timestamp == None (the default), then the timestamp will -be the current time. It is useful to be able to override this, e.g. -during database import or syncing, when you need to add log entries -to the database that happened in the past.
-Plugin
¶mnemosyne.libmnemosyne.plugin.
Plugin
(component_manager)¶A Plugin is a group of components which can be activated and -deactivated by the user when the program is running.
-Plugins are used as a separate class, and not as mixins, in order to -allow for the fact that a Plugin can group multiple components.
-‘components’ is a list of component classes (not instances) that will -be registered and/or instantiated when the Plugin becomes active.
-Activating and deactivating certain components needs to give rise to -certain side effects. It’s cumbersone to implement those in the -‘activate’ and ‘deactivate’ methods of the components, as these also -are called when the program is still starting up and the context can -be completely different. Therefore, they are handled here.
-activate
()¶component_type
= 'plugin'¶components
= []¶deactivate
()¶description
= ''¶name
= ''¶RenderChain
¶mnemosyne.libmnemosyne.render_chain.
RenderChain
(component_manager)¶A RenderChain details the operations needed to get from the raw data -in a card to a representation of its question and answer, in a form either -suitable for displaying in a browser, or exporting to a text file, ... .
-First the raw data is sent through Filters, which perform operations which -can be useful for many card types, like expanding relative paths.
-Then this data is assembled in the right order in a Renderer, which can be -card type specific.
-‘filters’: list of Filter classes -‘renderers’: list or Renderer classes
-Plugins can add Filters or Renderers for a new card type to a chain at run -time.
-component_type
= 'render_chain'¶filter
(filter_class)¶filters
= []¶id
= 'default'¶register_filter
(filter_class, in_front=False)¶‘filter_class’ should be a class, not an instance.
-register_filter_at_back
(filter_class, before=[])¶Register a filter at the back of the render chain, but before -a list of other filters already in the chain. The list should -contain class names. (Using strings instead of classes means a -plugin writer does not need to import the filters he wants to use -in this list.)
-‘filter_class’ should be a class, not an instance.
-register_filter_at_front
(filter_class, after=[])¶Register a filter at the very front of the render chain, but after -a list of other filters already in the chain. The list should -contain class names. (Using strings instead of classes means a -plugin writer does not need to import the filters he wants to use -in this list.)
-‘filter_class’ should be a class, not an instance.
-register_renderer
(renderer_class)¶‘renderer_class’ should be a class, not an instance.
-render_answer
(card, **render_args)¶render_question
(card, **render_args)¶renderer_for_card_type
(card_type)¶renderers
= []¶unregister_filter
(filter_class)¶‘filter_class’ should be a class, not an instance.
-unregister_renderer
(renderer_class)¶‘renderer_class’ should be a class, not an instance.
-Renderer
¶mnemosyne.libmnemosyne.renderer.
Renderer
(component_manager, **kwds)¶Assembles a sequence of ‘fact_keys’ which are keys in a dictionary -‘fact_data’ to a certain format, e.g. a html page, or a purely text based -format.
-Typically ‘fact_keys’ are the question and answer keys of the card’s fact -view.
-It is contained in a RenderChain and represents the functionality which -is typically different for each card type.
-If this renderer is only for a specific card type (and its descendants) -‘used_for’ can be set to the corresponding CardType class. If it is set to -None, this renderer is used for all other card types.
-component_type
= 'renderer'¶render
(fact_data, fact_keys, card_type, **render_args)¶Assembles a sequence of ‘fact_keys’ which are keys in a dictionary -‘fact_data’.
-card_type’ is passed as extra argument e.g. to determine card type -specific formatting.
-update
(card_type)¶Update renderer information for given card type. Some information -(e.g. css style sheets) is typically cached, and this function is -used to signal that the cache should be rebuilt.
-used_for
= None¶ReviewController
¶mnemosyne.libmnemosyne.review_controller.
ReviewController
(component_manager)¶Controls the behaviour of a widget which implements the ReviewWidget -interface.
-The review controller is the one that should instantiate the review -widget, and only one needed. There could be many review widgets defined -in plugins, and instantiating them all when starting the program could be -slow, especially on a mobile device.
-component_type
= 'review_controller'¶counters
()¶Returns tuple (scheduled_count, non_memorised_count, active_count).
-grade_answer
(grade)¶All the code that needs to run after the user grades the answer. -Note that this also incluse pulling in a new question.
-is_answer_showing
()¶is_question_showing
()¶reload_counters
()¶To be called when counters need to be reloaded from the database.
-reset
()¶reset_but_try_to_keep_current_card
()¶This is typically called after activities which invalidate the -current queue, like ‘Activate cards’ or ‘Configure’. For the best user -experience, we try to keep the card that is currently being asked if -possible.
-set_render_chain
(render_chain)¶set_state
(state)¶show_answer
()¶show_new_question
()¶state
()¶update_dialog
()¶update_status_bar_counters
()¶Scheduler
¶mnemosyne.libmnemosyne.scheduler.
Scheduler
(component_manager, **kwds)¶active_count
()¶avoid_sister_cards
(card)¶Change card.next_rep to make sure that the card is not scheduled -on the same day as a sister card.
-Factored out here to allow this to be used by e.g. MnemoGogo.
-card_count_scheduled_n_days_from_now
(n)¶Yesterday: n=-1, today: n=0, tomorrow: n=1, ... .
-Is not implemented in the database, because this could need internal -scheduler information.
-component_type
= 'scheduler'¶grade_answer
(card, new_grade, dry_run=False)¶is_in_queue
(card)¶To check whether the queue needs to be rebuilt, e.g. if it contains -a card that was deleted in the GUI.
-is_prefetch_allowed
()¶Can we display a new card before having processed the grading of -the previous one?
-last_rep_to_interval_string
(last_rep, now=None)¶Converts last_rep to a string like ‘yesterday’, ‘2 weeks ago’, ...
-name
= ''¶next_card
(learn_ahead=False)¶next_rep_to_interval_string
(next_rep, now=None)¶Converts next_rep to a string like ‘tomorrow’, ‘in 2 weeks’, ...
-non_memorised_count
()¶rebuild_queue
(learn_ahead=False)¶Called by the rest of the library when an existing queue risks -becoming invalid, e.g. when cards have been deleted in the GUI. -‘next_card’ also makes use of this in certain implementations.
-remove_from_queue_if_present
(card)¶reset
()¶Called when starting the scheduler for the first time.
-scheduled_count
()¶set_initial_grade
(cards, grade)¶Sets the initial grades for a set of sister cards, making sure -their next repetitions do no fall on the same day.
-Called when cards are given their initial grade outside of the -review process, e.g. when the user gives an initial grade when -adding a new card in the GUI. Therefore, ‘unseen’ is still left to -True, as this card has not yet been seen in the interactive review -process.
-Cards which don’t have initial grade information available (e.g. for -cards created during import or conversion from different card type), -get their initial grade when they are encountered in the interactive -review process for the first time.
-In both cases, this initial grading is seen as the first repetition.
-In this way, both types of cards are treated in the same way. (There -is an ineffectual asymmetry left in the log messages they generate, -but all the relevant information can still be parsed from them.)
-StatisticsPage
¶mnemosyne.libmnemosyne.statistics_page.
StatisticsPage
(component_manager)¶A self-contained piece of statistical information, typically displayed -in the GUI as a page in a tabbed widget.
-Each StatisticsPage can have several ‘variants’, e.g. displaying the -number of scheduled cards either for next week or for next month.
-For each StatisticsPage, there will be an associated widget (plotting -widget, html browser, custom widget, ... ) that is in charge of displaying -the information. This widget needs to be registered in the component -manager as a ‘statistics_widget’ ‘used_for’ a particular StatisticsPage -(or a parent class of a StatisticsPage).
-component_type
= 'statistics_page'¶instantiate
= 1¶name
= ''¶prepare_statistics
(variant_id)¶This method calculates the data for the requested variant and sets -the approriate hints to be picked up by the corresponding widget.
-show_variants_in_combobox
= True¶variants
= []¶mnemosyne.libmnemosyne.statistics_page.
PlotStatisticsPage
(component_manager)¶A statistics page where the data is represented on a graphical plot.
-mnemosyne.libmnemosyne.statistics_page.
HtmlStatisticsPage
(component_manager)¶A statistics page which generates html to displayed in a browser -widget.
-Stopwatch
¶mnemosyne.libmnemosyne.stopwatch.
Stopwatch
(component_manager)¶The main use of the stop watch is to measure the time it takes the user -to answer a question. ‘start_time’ is used to keep track of when the card -was first shown.
-component_type
= 'stopwatch'¶pause
()¶start
()¶stop
()¶time
()¶unpause
()¶Tag
¶mnemosyne.libmnemosyne.tag.
Tag
(name, id=None)¶The tag name is the full name, including all levels of the hierarchy -separated by ::.
-‘id’ is used to identify this object to the external world (logs, xml -files, sync, ...), whereas ‘_id’ is an internal id that could be -different and that can be used by the database for efficiency reasons.
-Untagged cards are given the internal tag __UNTAGGED__, to allow for a -fast implementation of applying criteria.
-TagTree
¶mnemosyne.libmnemosyne.tag_tree.
TagTree
(component_manager)¶Organises the tags in a hierarchical tree. By convention, hierarchical -levels in tags are denoted by a :: separator.
-This class is not meant to be instantiated at run time, but rather only -when it is needed.
-The internal tree datastructure for e.g. the two tags A::B::C and A::B::D -looks as follows:
-self[_(“__ALL__”)] = [“A”] -self[“A”] = [“A::B”] -self[“A::B”] = [“A::B::C”, “A::B::D”]
-Each tree level stores the entire partial tag (i.e. A::B instead of B) to -guarantee uniqueness.
-Apart from the dictionary in self, this class also contains -self.display_name_for_node and self.card_count_for_node, with node being -the index field for the main dictionary self.
-delete_subtree
(node)¶rename_node
(node, new_name)¶- Please activate JavaScript to enable the search - functionality. -
-- From here you can search these documents. Enter your search - words into the box below and click "search". Note that the search - function will automatically search for all of the words. Pages - containing fewer words won't appear in the result list. -
- - -Card
","CardType
","CardTypeConverter
","Component
","ComponentManager
","Configuration
","Controller
","Criterion
","Database
","Fact
","FactView
","FileFormat
","Filter
","Hook
","How to write a new frontend","LogUploader
","Logger
","Plugin
","RenderChain
","Renderer
","ReviewController
","Scheduler
","StatisticsPage
","Stopwatch
","Tag
","TagTree
"],titleterms:{"new":15,card:1,cardtyp:2,cardtypeconvert:3,compon:4,componentmanag:5,configur:6,content:0,control:7,criterion:8,databas:9,fact:10,factview:11,fileformat:12,filter:13,frontend:15,hook:14,how:15,indice:0,libmnemosyn:0,logger:17,logupload:16,overview:0,plugin:18,render:20,renderchain:19,reviewcontrol:21,schedul:22,statisticspag:23,stopwatch:24,tabl:0,tag:25,tagtre:26,write:15}})
\ No newline at end of file
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/index.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/index.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/index.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/index.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,101 +0,0 @@
-.. libmnemosyne documentation master file, created by sphinx-quickstart on Sat Aug 9 10:59:10 2008.
- You can adapt this file completely to your liking, but it should at least
- contain the root `toctree` directive.
-
-Libmnemosyne overview
-==============================
-
-Libmnemosyne consists of a number of components, which can be swapped in and
-out. This is handled by the ComponentManager. Examples of components are the
-scheduler, the storage layer, card types, plugins, ...
-
-The basic unit of information from which Cards are derived is called a Fact,
-containing a set of fields and their associated values. E.g., for a three-sided
-CardType, these fields are foreign word, pronunciation and translation.
-
-A FactView collects a number of the fields of a Fact into question and answers.
-E.g., the three-sided CardType has a recognition FactView, where the question
-contains the foreign word, and the answer contains the pronunciation and the
-translation.
-
-As mentioned before, a Fact is linked to a CardType, and each CardType lists
-a set of FactViews.
-
-The actual Cards are generated from the data in Fact using the recipe of a
-certain FactView. A Card also contains all the repetition data needed for the
-Scheduler to do its work. Since the question and answers are generated from
-the Fact data each time a Card is shown, related Cards (i.e. Cards with
-different FactViews of the same Fact) are always consistent.
-
-The actual displaying of the data in a Card is handled by a RenderChain, which
-details the operations needed to get from the raw data in a Card to a
-representation of its question and answer, in a form either suitable for
-displaying in a browser, or exporting to a text file, ... . First the raw data
-is sent through Filters, which perform operations which can be useful for many
-card types, like expanding relative paths. Then this data is assembled in the
-right order in a Renderer, which can be card type specific.
-
-At several points in the program, plugin writers can hook in their code using
-the Hook mechanism.
-
-Before the data is passed to the Renderer, Filters can be applied to it. This
-is an extra level of flexibility, and can be used to generate LaTeX, convert
-relative paths to absolute paths, etc ...
-
-To determine which cards are active (i.e.) participate in the review process,
-a mechanism of ActivityCriterion and CriterionApplier is used.
-
-In order to make it easier for other GUI frontends to be written, all the logic
-typically needed for GUIs, but that is independent of the actual GUI toolkit
-used, is abstracted in controllers. In order to get more flexibility, there
-are two of them: one related to the review process (which is different for
-different schedulers), and one related to the rest of the program (which
-normally won't change).
-
-There is also mechanism for plugins to add new statistical data to the standard
-statistics in an integrated way.
-
-
-Contents
-========
-
-.. toctree::
- :maxdepth: 2
-
- modules/component
- modules/component_manager
- modules/fact
- modules/fact_view
- modules/tag
- modules/tag_tree
- modules/card_type
- modules/card
- modules/card_type_converter
- modules/render_chain
- modules/filter
- modules/renderer
- modules/controller
- modules/review_controller
- modules/configuration
- modules/database
- modules/file_format
- modules/hook
- modules/log_uploader
- modules/logger
- modules/plugin
- modules/scheduler
- modules/stopwatch
- modules/statistics_page
- modules/criterion
-
- modules/how_to_write_a_new_frontend
-
-
-Indices and tables
-==================
-
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`
-
-
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/card.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/card.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/card.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/card.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`Card`
-===============================
-
-.. automodule:: mnemosyne.libmnemosyne.card
-
-.. autoclass:: Card
- :members:
- :undoc-members:
- :inherited-members:
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/card_type_converter.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/card_type_converter.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/card_type_converter.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/card_type_converter.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`CardTypeConverter`
-========================
-
-.. automodule:: mnemosyne.libmnemosyne.card_type_converter
-
-.. autoclass:: CardTypeConverter
- :members:
- :undoc-members:
-
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/card_type.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/card_type.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/card_type.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/card_type.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`CardType`
-===============================
-
-.. automodule:: mnemosyne.libmnemosyne.card_type
-
-.. autoclass:: CardType
- :members:
- :undoc-members:
-
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/component_manager.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/component_manager.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/component_manager.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/component_manager.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`ComponentManager`
-===============================
-
-.. automodule:: mnemosyne.libmnemosyne.component_manager
-
-.. autoclass:: ComponentManager
- :members:
- :undoc-members:
- :inherited-members:
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/component.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/component.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/component.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/component.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`Component`
-======================
-
-.. automodule:: mnemosyne.libmnemosyne.component
-
-.. autoclass:: Component
- :members:
- :undoc-members:
- :inherited-members:
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/configuration.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/configuration.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/configuration.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/configuration.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`Configuration`
-===============================
-
-.. automodule:: mnemosyne.libmnemosyne.configuration
-
-.. autoclass:: Configuration
- :members:
- :undoc-members:
-
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/controller.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/controller.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/controller.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/controller.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`Controller`
-===============================
-
-.. automodule:: mnemosyne.libmnemosyne.controller
-
-.. autoclass:: Controller
- :members:
- :undoc-members:
-
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/criterion.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/criterion.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/criterion.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/criterion.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,13 +0,0 @@
-:mod:`Criterion`
-===============================
-
-.. automodule:: mnemosyne.libmnemosyne.criterion
-
-.. autoclass:: Criterion
- :members:
- :undoc-members:
-
-.. autoclass:: CriterionApplier
- :members:
- :undoc-members:
-
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/database.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/database.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/database.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/database.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`Database`
-===============================
-
-.. automodule:: mnemosyne.libmnemosyne.database
-
-.. autoclass:: Database
- :members:
- :undoc-members:
-
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/fact.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/fact.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/fact.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/fact.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`Fact`
-===========
-
-.. automodule:: mnemosyne.libmnemosyne.fact
-
-.. autoclass:: Fact
- :members:
- :undoc-members:
- :inherited-members:
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/fact_view.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/fact_view.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/fact_view.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/fact_view.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`FactView`
-======================
-
-.. automodule:: mnemosyne.libmnemosyne.fact_view
-
-.. autoclass:: FactView
- :members:
- :undoc-members:
- :inherited-members:
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/file_format.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/file_format.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/file_format.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/file_format.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`FileFormat`
-===============================
-
-.. automodule:: mnemosyne.libmnemosyne.file_format
-
-.. autoclass:: FileFormat
- :members:
- :undoc-members:
-
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/filter.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/filter.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/filter.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/filter.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`Filter`
-===============================
-
-.. automodule:: mnemosyne.libmnemosyne.filter
-
-.. autoclass:: Filter
- :members:
- :undoc-members:
-
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/hook.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/hook.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/hook.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/hook.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`Hook`
-==============
-
-.. automodule:: mnemosyne.libmnemosyne.hook
-
-.. autoclass:: Hook
- :members:
- :undoc-members:
-
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/how_to_write_a_new_frontend.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/how_to_write_a_new_frontend.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/how_to_write_a_new_frontend.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/how_to_write_a_new_frontend.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,84 +0,0 @@
-How to write a new frontend
-===========================
-
-libmnemosyne is designed in such a way that writing a new front is as painless as possible. All the code for running a GUI which is actually GUI toolkit independent is grouped in two controllers: the main ui controller and the review ui controller. In order to build a new frontend, you need to create a main widget which inherits from ``MainWidget`` and implements its interface, and similarly a review widget which inherits from ``ReviewWidget``.
-
-In order to get a feel for how this works, it's best by starting to study the code for the ppygui_ui Windows Mobile client, which is the simplest possible frontend, as it only supports reviewing cards.
-
-There are three files in that frontend:
-
-* a startup script, which specifies which components your frontend wants to activate in libmnemosyne, whether you are running on a device which is resource limited, ... .
-
-* a main widget, which corresponds to the application level widget in the GUI toolkit, and is in charge of showing error dialogs, displaying menus.
-
-* the review widget, where you need to implement a.o. the code to display text in the question window, ... .
-
-
-To give a better feeling for how the division of labour between your own new GUI code and the GUI independent code in the controllers works, consider this example from the 'add cards' functionality in the PyQt frontend.
-
-When the user activates the menu option or icon to add cards, it will fire up a certain function, which in the PyQt frontend is called ``add_cards()``::
-
- QObject.connect(self.actionAddCards, SIGNAL("activated()"), MainWindow.add_cards)
-
-The implementation of this function is rather trivial, it just calls the controller::
-
- def add_cards(self):
- self.controller().show_add_cards_dialog()
-
-The code above is code you need to implement for your new frontend, but as you can see, it's rather trivial.
-
-The controller's ``show_add_cards_dialog`` function looks like this::
-
- def show_add_cards_dialog(self):
- self.stopwatch().pause()
- self.component_manager.get_current("add_cards_dialog")\
- (self.component_manager).activate()
- review_controller = self.review_controller()
- review_controller.reload_counters()
- if review_controller.card is None:
- review_controller.new_question()
- else:
- review_controller.update_status_bar()
- self.stopwatch().unpause()
-
-This is where the heavy lifting is done, but it's completely UI independent, and there should be no need for you to modify that code.
-
-In order for the controller to know where it can find the actual add cards dialog, which for PyQt is called ``AddCardsDlg`` , you need to have that dialog derive from the abstract ``libmnemosyne.ui_components.dialogs.AddCardsDialog``, and provide an activate function, which for the PyQt toolkit is simply::
-
- def activate(self):
- self.exec_()
-
-Finally, you need to register the ``AddCardsDlg`` component. That is what the following line does inside the main startup script (which for PyQt is simply called ``mnemosyne``)::
-
- mnemosyne.components.append(("mnemosyne.pyqt_ui.add_cards_dlg",
- "AddCardsDlg"))
-
-Inside the ``AddCardsDlg``, there is of course lots of UI specific code, but once the dialog has enough data to create the cards, it simply calls::
-
- self.controller().create_new_cards(fact_data, card_type, grade, tag_names)
-
-So, the ``AddCardsDlg`` should almost entirely consist of GUI dependent code. All the GUI indepedent code to actually create the cards is contained within the controller's ``create_new_cards()`` method.
-
-If you feel like you need to override the review or the main controller provided by libmnemosyne, please let the developpers know. Either its design is not general enough, or you are trying to work against libmnemosyne rather than with it.
-
-Tips for creating a responsive client:
-
-* When instantiating a ``libmnemosyne.Mnemosyne`` object, there are two parameters you need to provide: ``upload_science_logs`` and ``interested_in_old_reps``. If you are writing a mobile client which syncs to a desktop version of mnemosyne, it is recommended that you don't deal with uploading the science logs yourself, but let the desktop client deal with that. As for ``interested_in_old_reps``, if your mobile client does not include graphical statistics using the revision history, it does not make sense to store this history on your device.
-* The standard instantiation of a ``libmnemosyne.Mnemosyne`` object includes all components in libmnemosyne. If you are writing a mobile client with e.g. only review capabilities, it does not make sense to include all these components. See the example of the Windows Mobile ppygui_ui frontend for a client which only uses the bare minimum of components to improve startup time.
-* If your mobile client does not include a card browser, you can save some disk space by not storing pregenerated questions or answers. To achieve this, make sure you do not include the regular ``SQLite`` component, but this one::
-
- ("mnemosyne.libmnemosyne.databases.SQLite_no_pregenerated_data",
- "SQLite_NoPregeneratedData")
-
-* libmnemosyne does some optimisation by trying to show the next question before the grading of the previous question is completed. This improves the perceived responsiveness of the client. However, some GUI toolkits (e.g. Qt) queue widget updates and only excecute them when there is no more processing going on, thereby defeating libmnemosyne's optimisation. For that reason, there is a function ``review_widget().redraw_now`` which is used to tell the GUI toolkit to do the repaint now. If your toolkit also has similar behaviour, implementing this function can really help to mask slow database access.
-* If save operations are slow on your mobile device, you might want to consider setting a larger default value instead of ``save_after_n_reps = 1`` in ``config.py``.
-* If media files will never be edited outside of Mnemosyne on your mobile device, you can save time during sync by setting ``check_for_updated_media_files = False`` in ``config.py``.
-* If you are really adventurous, you can set ``backup_before_sync = True`` in ``config.py``.
-
-
-
-Notes:
-
-* If you need access to the main widget when you are constructing the review widget, e.g. to specify it's parent, you can access it using `self.main_widget()``
-* If you need access to some components of libmnemosyne to construct your widget (e.g. the configuration), these might not yet be available inside your ``__init__()`` method. In this case, you need to move that code to your widget's ``activate()`` method, at which time all the other compoments will already be active.
-* Everything described here applies not only for Python frontends, but also for frontends not written in Python, which access libmnemosyne through an UDP socket or through the Python-embedded-in-C bridge.
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/logger.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/logger.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/logger.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/logger.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`Logger`
-===============================
-
-.. automodule:: mnemosyne.libmnemosyne.logger
-
-.. autoclass:: Logger
- :members:
- :undoc-members:
-
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/log_uploader.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/log_uploader.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/log_uploader.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/log_uploader.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`LogUploader`
-===============================
-
-.. automodule:: mnemosyne.libmnemosyne.log_uploader
-
-.. autoclass:: LogUploader
- :members:
- :undoc-members:
-
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/plugin.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/plugin.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/plugin.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/plugin.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`Plugin`
-===============================
-
-.. automodule:: mnemosyne.libmnemosyne.plugin
-
-.. autoclass:: Plugin
- :members:
- :undoc-members:
-
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/render_chain.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/render_chain.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/render_chain.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/render_chain.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`RenderChain`
-===============================
-
-.. automodule:: mnemosyne.libmnemosyne.render_chain
-
-.. autoclass:: RenderChain
- :members:
- :undoc-members:
-
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/renderer.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/renderer.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/renderer.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/renderer.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`Renderer`
-===============================
-
-.. automodule:: mnemosyne.libmnemosyne.renderer
-
-.. autoclass:: Renderer
- :members:
- :undoc-members:
-
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/review_controller.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/review_controller.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/review_controller.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/review_controller.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`ReviewController`
-===============================
-
-.. automodule:: mnemosyne.libmnemosyne.review_controller
-
-.. autoclass:: ReviewController
- :members:
- :undoc-members:
-
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/scheduler.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/scheduler.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/scheduler.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/scheduler.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`Scheduler`
-===============================
-
-.. automodule:: mnemosyne.libmnemosyne.scheduler
-
-.. autoclass:: Scheduler
- :members:
- :undoc-members:
-
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/statistics_page.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/statistics_page.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/statistics_page.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/statistics_page.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,16 +0,0 @@
-:mod:`StatisticsPage`
-===============================
-
-.. automodule:: mnemosyne.libmnemosyne.statistics_page
-
-.. autoclass:: StatisticsPage
- :members:
- :undoc-members:
-
-.. autoclass:: PlotStatisticsPage
- :members:
- :undoc-members:
-
-.. autoclass:: HtmlStatisticsPage
- :members:
- :undoc-members:
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/stopwatch.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/stopwatch.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/stopwatch.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/stopwatch.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`Stopwatch`
-===============================
-
-.. automodule:: mnemosyne.libmnemosyne.stopwatch
-
-.. autoclass:: Stopwatch
- :members:
- :undoc-members:
-
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/tag_tree.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/tag_tree.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/tag_tree.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/tag_tree.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,8 +0,0 @@
-:mod:`TagTree`
-==============
-
-.. automodule:: mnemosyne.libmnemosyne.tag_tree
-
-.. autoclass:: TagTree
- :members:
- :undoc-members:
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/tag.txt mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/tag.txt
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/tag.txt 2013-12-03 10:42:03.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_sources/modules/tag.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-:mod:`Tag`
-==========
-
-.. automodule:: mnemosyne.libmnemosyne.tag
-
-.. autoclass:: Tag
- :members:
- :undoc-members:
- :inherited-members:
Binary files /tmp/tmpNoYn47/ajGK50spUe/mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_static/ajax-loader.gif and /tmp/tmpNoYn47/vW_aZbQ35_/mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_static/ajax-loader.gif differ
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_static/alabaster.css mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_static/alabaster.css
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_static/alabaster.css 2016-11-29 15:44:06.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_static/alabaster.css 1970-01-01 00:00:00.000000000 +0000
@@ -1,693 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-@import url("basic.css");
-
-/* -- page layout ----------------------------------------------------------- */
-
-body {
- font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro', serif;
- font-size: 17px;
- background-color: #fff;
- color: #000;
- margin: 0;
- padding: 0;
-}
-
-
-div.document {
- width: 940px;
- margin: 30px auto 0 auto;
-}
-
-div.documentwrapper {
- float: left;
- width: 100%;
-}
-
-div.bodywrapper {
- margin: 0 0 0 220px;
-}
-
-div.sphinxsidebar {
- width: 220px;
- font-size: 14px;
- line-height: 1.5;
-}
-
-hr {
- border: 1px solid #B1B4B6;
-}
-
-div.body {
- background-color: #fff;
- color: #3E4349;
- padding: 0 30px 0 30px;
-}
-
-div.body > .section {
- text-align: left;
-}
-
-div.footer {
- width: 940px;
- margin: 20px auto 30px auto;
- font-size: 14px;
- color: #888;
- text-align: right;
-}
-
-div.footer a {
- color: #888;
-}
-
-p.caption {
- font-family: inherit;
- font-size: inherit;
-}
-
-
-div.relations {
- display: none;
-}
-
-
-div.sphinxsidebar a {
- color: #444;
- text-decoration: none;
- border-bottom: 1px dotted #999;
-}
-
-div.sphinxsidebar a:hover {
- border-bottom: 1px solid #999;
-}
-
-div.sphinxsidebarwrapper {
- padding: 18px 10px;
-}
-
-div.sphinxsidebarwrapper p.logo {
- padding: 0;
- margin: -10px 0 0 0px;
- text-align: center;
-}
-
-div.sphinxsidebarwrapper h1.logo {
- margin-top: -10px;
- text-align: center;
- margin-bottom: 5px;
- text-align: left;
-}
-
-div.sphinxsidebarwrapper h1.logo-name {
- margin-top: 0px;
-}
-
-div.sphinxsidebarwrapper p.blurb {
- margin-top: 0;
- font-style: normal;
-}
-
-div.sphinxsidebar h3,
-div.sphinxsidebar h4 {
- font-family: 'Garamond', 'Georgia', serif;
- color: #444;
- font-size: 24px;
- font-weight: normal;
- margin: 0 0 5px 0;
- padding: 0;
-}
-
-div.sphinxsidebar h4 {
- font-size: 20px;
-}
-
-div.sphinxsidebar h3 a {
- color: #444;
-}
-
-div.sphinxsidebar p.logo a,
-div.sphinxsidebar h3 a,
-div.sphinxsidebar p.logo a:hover,
-div.sphinxsidebar h3 a:hover {
- border: none;
-}
-
-div.sphinxsidebar p {
- color: #555;
- margin: 10px 0;
-}
-
-div.sphinxsidebar ul {
- margin: 10px 0;
- padding: 0;
- color: #000;
-}
-
-div.sphinxsidebar ul li.toctree-l1 > a {
- font-size: 120%;
-}
-
-div.sphinxsidebar ul li.toctree-l2 > a {
- font-size: 110%;
-}
-
-div.sphinxsidebar input {
- border: 1px solid #CCC;
- font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro', serif;
- font-size: 1em;
-}
-
-div.sphinxsidebar hr {
- border: none;
- height: 1px;
- color: #AAA;
- background: #AAA;
-
- text-align: left;
- margin-left: 0;
- width: 50%;
-}
-
-/* -- body styles ----------------------------------------------------------- */
-
-a {
- color: #004B6B;
- text-decoration: underline;
-}
-
-a:hover {
- color: #6D4100;
- text-decoration: underline;
-}
-
-div.body h1,
-div.body h2,
-div.body h3,
-div.body h4,
-div.body h5,
-div.body h6 {
- font-family: 'Garamond', 'Georgia', serif;
- font-weight: normal;
- margin: 30px 0px 10px 0px;
- padding: 0;
-}
-
-div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
-div.body h2 { font-size: 180%; }
-div.body h3 { font-size: 150%; }
-div.body h4 { font-size: 130%; }
-div.body h5 { font-size: 100%; }
-div.body h6 { font-size: 100%; }
-
-a.headerlink {
- color: #DDD;
- padding: 0 4px;
- text-decoration: none;
-}
-
-a.headerlink:hover {
- color: #444;
- background: #EAEAEA;
-}
-
-div.body p, div.body dd, div.body li {
- line-height: 1.4em;
-}
-
-div.admonition {
- margin: 20px 0px;
- padding: 10px 30px;
- background-color: #EEE;
- border: 1px solid #CCC;
-}
-
-div.admonition tt.xref, div.admonition code.xref, div.admonition a tt {
- background-color: ;
- border-bottom: 1px solid #fafafa;
-}
-
-dd div.admonition {
- margin-left: -60px;
- padding-left: 60px;
-}
-
-div.admonition p.admonition-title {
- font-family: 'Garamond', 'Georgia', serif;
- font-weight: normal;
- font-size: 24px;
- margin: 0 0 10px 0;
- padding: 0;
- line-height: 1;
-}
-
-div.admonition p.last {
- margin-bottom: 0;
-}
-
-div.highlight {
- background-color: #fff;
-}
-
-dt:target, .highlight {
- background: #FAF3E8;
-}
-
-div.warning {
- background-color: #FCC;
- border: 1px solid #FAA;
-}
-
-div.danger {
- background-color: #FCC;
- border: 1px solid #FAA;
- -moz-box-shadow: 2px 2px 4px #D52C2C;
- -webkit-box-shadow: 2px 2px 4px #D52C2C;
- box-shadow: 2px 2px 4px #D52C2C;
-}
-
-div.error {
- background-color: #FCC;
- border: 1px solid #FAA;
- -moz-box-shadow: 2px 2px 4px #D52C2C;
- -webkit-box-shadow: 2px 2px 4px #D52C2C;
- box-shadow: 2px 2px 4px #D52C2C;
-}
-
-div.caution {
- background-color: #FCC;
- border: 1px solid #FAA;
-}
-
-div.attention {
- background-color: #FCC;
- border: 1px solid #FAA;
-}
-
-div.important {
- background-color: #EEE;
- border: 1px solid #CCC;
-}
-
-div.note {
- background-color: #EEE;
- border: 1px solid #CCC;
-}
-
-div.tip {
- background-color: #EEE;
- border: 1px solid #CCC;
-}
-
-div.hint {
- background-color: #EEE;
- border: 1px solid #CCC;
-}
-
-div.seealso {
- background-color: #EEE;
- border: 1px solid #CCC;
-}
-
-div.topic {
- background-color: #EEE;
-}
-
-p.admonition-title {
- display: inline;
-}
-
-p.admonition-title:after {
- content: ":";
-}
-
-pre, tt, code {
- font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
- font-size: 0.9em;
-}
-
-.hll {
- background-color: #FFC;
- margin: 0 -12px;
- padding: 0 12px;
- display: block;
-}
-
-img.screenshot {
-}
-
-tt.descname, tt.descclassname, code.descname, code.descclassname {
- font-size: 0.95em;
-}
-
-tt.descname, code.descname {
- padding-right: 0.08em;
-}
-
-img.screenshot {
- -moz-box-shadow: 2px 2px 4px #EEE;
- -webkit-box-shadow: 2px 2px 4px #EEE;
- box-shadow: 2px 2px 4px #EEE;
-}
-
-table.docutils {
- border: 1px solid #888;
- -moz-box-shadow: 2px 2px 4px #EEE;
- -webkit-box-shadow: 2px 2px 4px #EEE;
- box-shadow: 2px 2px 4px #EEE;
-}
-
-table.docutils td, table.docutils th {
- border: 1px solid #888;
- padding: 0.25em 0.7em;
-}
-
-table.field-list, table.footnote {
- border: none;
- -moz-box-shadow: none;
- -webkit-box-shadow: none;
- box-shadow: none;
-}
-
-table.footnote {
- margin: 15px 0;
- width: 100%;
- border: 1px solid #EEE;
- background: #FDFDFD;
- font-size: 0.9em;
-}
-
-table.footnote + table.footnote {
- margin-top: -15px;
- border-top: none;
-}
-
-table.field-list th {
- padding: 0 0.8em 0 0;
-}
-
-table.field-list td {
- padding: 0;
-}
-
-table.field-list p {
- margin-bottom: 0.8em;
-}
-
-table.footnote td.label {
- width: .1px;
- padding: 0.3em 0 0.3em 0.5em;
-}
-
-table.footnote td {
- padding: 0.3em 0.5em;
-}
-
-dl {
- margin: 0;
- padding: 0;
-}
-
-dl dd {
- margin-left: 30px;
-}
-
-blockquote {
- margin: 0 0 0 30px;
- padding: 0;
-}
-
-ul, ol {
- /* Matches the 30px from the narrow-screen "li > ul" selector below */
- margin: 10px 0 10px 30px;
- padding: 0;
-}
-
-pre {
- background: #EEE;
- padding: 7px 30px;
- margin: 15px 0px;
- line-height: 1.3em;
-}
-
-div.viewcode-block:target {
- background: #ffd;
-}
-
-dl pre, blockquote pre, li pre {
- margin-left: 0;
- padding-left: 30px;
-}
-
-dl dl pre {
- margin-left: -90px;
- padding-left: 90px;
-}
-
-tt, code {
- background-color: #ecf0f3;
- color: #222;
- /* padding: 1px 2px; */
-}
-
-tt.xref, code.xref, a tt {
- background-color: #FBFBFB;
- border-bottom: 1px solid #fff;
-}
-
-a.reference {
- text-decoration: none;
- border-bottom: 1px dotted #004B6B;
-}
-
-/* Don't put an underline on images */
-a.image-reference, a.image-reference:hover {
- border-bottom: none;
-}
-
-a.reference:hover {
- border-bottom: 1px solid #6D4100;
-}
-
-a.footnote-reference {
- text-decoration: none;
- font-size: 0.7em;
- vertical-align: top;
- border-bottom: 1px dotted #004B6B;
-}
-
-a.footnote-reference:hover {
- border-bottom: 1px solid #6D4100;
-}
-
-a:hover tt, a:hover code {
- background: #EEE;
-}
-
-
-@media screen and (max-width: 870px) {
-
- div.sphinxsidebar {
- display: none;
- }
-
- div.document {
- width: 100%;
-
- }
-
- div.documentwrapper {
- margin-left: 0;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- }
-
- div.bodywrapper {
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- }
-
- ul {
- margin-left: 0;
- }
-
- li > ul {
- /* Matches the 30px from the "ul, ol" selector above */
- margin-left: 30px;
- }
-
- .document {
- width: auto;
- }
-
- .footer {
- width: auto;
- }
-
- .bodywrapper {
- margin: 0;
- }
-
- .footer {
- width: auto;
- }
-
- .github {
- display: none;
- }
-
-
-
-}
-
-
-
-@media screen and (max-width: 875px) {
-
- body {
- margin: 0;
- padding: 20px 30px;
- }
-
- div.documentwrapper {
- float: none;
- background: #fff;
- }
-
- div.sphinxsidebar {
- display: block;
- float: none;
- width: 102.5%;
- margin: 50px -30px -20px -30px;
- padding: 10px 20px;
- background: #333;
- color: #FFF;
- }
-
- div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p,
- div.sphinxsidebar h3 a {
- color: #fff;
- }
-
- div.sphinxsidebar a {
- color: #AAA;
- }
-
- div.sphinxsidebar p.logo {
- display: none;
- }
-
- div.document {
- width: 100%;
- margin: 0;
- }
-
- div.footer {
- display: none;
- }
-
- div.bodywrapper {
- margin: 0;
- }
-
- div.body {
- min-height: 0;
- padding: 0;
- }
-
- .rtd_doc_footer {
- display: none;
- }
-
- .document {
- width: auto;
- }
-
- .footer {
- width: auto;
- }
-
- .footer {
- width: auto;
- }
-
- .github {
- display: none;
- }
-}
-
-
-/* misc. */
-
-.revsys-inline {
- display: none!important;
-}
-
-/* Make nested-list/multi-paragraph items look better in Releases changelog
- * pages. Without this, docutils' magical list fuckery causes inconsistent
- * formatting between different release sub-lists.
- */
-div#changelog > div.section > ul > li > p:only-child {
- margin-bottom: 0;
-}
-
-/* Hide fugly table cell borders in ..bibliography:: directive output */
-table.docutils.citation, table.docutils.citation td, table.docutils.citation th {
- border: none;
- /* Below needed in some edge cases; if not applied, bottom shadows appear */
- -moz-box-shadow: none;
- -webkit-box-shadow: none;
- box-shadow: none;
-}
\ No newline at end of file
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_static/basic.css mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_static/basic.css
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_static/basic.css 2016-11-29 15:44:05.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_static/basic.css 1970-01-01 00:00:00.000000000 +0000
@@ -1,611 +0,0 @@
-/*
- * basic.css
- * ~~~~~~~~~
- *
- * Sphinx stylesheet -- basic theme.
- *
- * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-/* -- main layout ----------------------------------------------------------- */
-
-div.clearer {
- clear: both;
-}
-
-/* -- relbar ---------------------------------------------------------------- */
-
-div.related {
- width: 100%;
- font-size: 90%;
-}
-
-div.related h3 {
- display: none;
-}
-
-div.related ul {
- margin: 0;
- padding: 0 0 0 10px;
- list-style: none;
-}
-
-div.related li {
- display: inline;
-}
-
-div.related li.right {
- float: right;
- margin-right: 5px;
-}
-
-/* -- sidebar --------------------------------------------------------------- */
-
-div.sphinxsidebarwrapper {
- padding: 10px 5px 0 10px;
-}
-
-div.sphinxsidebar {
- float: left;
- width: 230px;
- margin-left: -100%;
- font-size: 90%;
- word-wrap: break-word;
- overflow-wrap : break-word;
-}
-
-div.sphinxsidebar ul {
- list-style: none;
-}
-
-div.sphinxsidebar ul ul,
-div.sphinxsidebar ul.want-points {
- margin-left: 20px;
- list-style: square;
-}
-
-div.sphinxsidebar ul ul {
- margin-top: 0;
- margin-bottom: 0;
-}
-
-div.sphinxsidebar form {
- margin-top: 10px;
-}
-
-div.sphinxsidebar input {
- border: 1px solid #98dbcc;
- font-family: sans-serif;
- font-size: 1em;
-}
-
-div.sphinxsidebar #searchbox input[type="text"] {
- width: 170px;
-}
-
-img {
- border: 0;
- max-width: 100%;
-}
-
-/* -- search page ----------------------------------------------------------- */
-
-ul.search {
- margin: 10px 0 0 20px;
- padding: 0;
-}
-
-ul.search li {
- padding: 5px 0 5px 20px;
- background-image: url(file.png);
- background-repeat: no-repeat;
- background-position: 0 7px;
-}
-
-ul.search li a {
- font-weight: bold;
-}
-
-ul.search li div.context {
- color: #888;
- margin: 2px 0 0 30px;
- text-align: left;
-}
-
-ul.keywordmatches li.goodmatch a {
- font-weight: bold;
-}
-
-/* -- index page ------------------------------------------------------------ */
-
-table.contentstable {
- width: 90%;
-}
-
-table.contentstable p.biglink {
- line-height: 150%;
-}
-
-a.biglink {
- font-size: 1.3em;
-}
-
-span.linkdescr {
- font-style: italic;
- padding-top: 5px;
- font-size: 90%;
-}
-
-/* -- general index --------------------------------------------------------- */
-
-table.indextable {
- width: 100%;
-}
-
-table.indextable td {
- text-align: left;
- vertical-align: top;
-}
-
-table.indextable dl, table.indextable dd {
- margin-top: 0;
- margin-bottom: 0;
-}
-
-table.indextable tr.pcap {
- height: 10px;
-}
-
-table.indextable tr.cap {
- margin-top: 10px;
- background-color: #f2f2f2;
-}
-
-img.toggler {
- margin-right: 3px;
- margin-top: 3px;
- cursor: pointer;
-}
-
-div.modindex-jumpbox {
- border-top: 1px solid #ddd;
- border-bottom: 1px solid #ddd;
- margin: 1em 0 1em 0;
- padding: 0.4em;
-}
-
-div.genindex-jumpbox {
- border-top: 1px solid #ddd;
- border-bottom: 1px solid #ddd;
- margin: 1em 0 1em 0;
- padding: 0.4em;
-}
-
-/* -- general body styles --------------------------------------------------- */
-
-div.body p, div.body dd, div.body li, div.body blockquote {
- -moz-hyphens: auto;
- -ms-hyphens: auto;
- -webkit-hyphens: auto;
- hyphens: auto;
-}
-
-a.headerlink {
- visibility: hidden;
-}
-
-h1:hover > a.headerlink,
-h2:hover > a.headerlink,
-h3:hover > a.headerlink,
-h4:hover > a.headerlink,
-h5:hover > a.headerlink,
-h6:hover > a.headerlink,
-dt:hover > a.headerlink,
-caption:hover > a.headerlink,
-p.caption:hover > a.headerlink,
-div.code-block-caption:hover > a.headerlink {
- visibility: visible;
-}
-
-div.body p.caption {
- text-align: inherit;
-}
-
-div.body td {
- text-align: left;
-}
-
-.field-list ul {
- padding-left: 1em;
-}
-
-.first {
- margin-top: 0 !important;
-}
-
-p.rubric {
- margin-top: 30px;
- 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 {
- text-align: center;
-}
-
-.align-right {
- text-align: right;
-}
-
-/* -- sidebars -------------------------------------------------------------- */
-
-div.sidebar {
- margin: 0 0 0.5em 1em;
- border: 1px solid #ddb;
- padding: 7px 7px 0 7px;
- background-color: #ffe;
- width: 40%;
- float: right;
-}
-
-p.sidebar-title {
- font-weight: bold;
-}
-
-/* -- topics ---------------------------------------------------------------- */
-
-div.topic {
- border: 1px solid #ccc;
- padding: 7px 7px 0 7px;
- margin: 10px 0 10px 0;
-}
-
-p.topic-title {
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 10px;
-}
-
-/* -- admonitions ----------------------------------------------------------- */
-
-div.admonition {
- margin-top: 10px;
- margin-bottom: 10px;
- padding: 7px;
-}
-
-div.admonition dt {
- font-weight: bold;
-}
-
-div.admonition dl {
- margin-bottom: 0;
-}
-
-p.admonition-title {
- margin: 0px 10px 5px 0px;
- font-weight: bold;
-}
-
-div.body p.centered {
- text-align: center;
- margin-top: 25px;
-}
-
-/* -- tables ---------------------------------------------------------------- */
-
-table.docutils {
- border: 0;
- border-collapse: collapse;
-}
-
-table caption span.caption-number {
- font-style: italic;
-}
-
-table caption span.caption-text {
-}
-
-table.docutils td, table.docutils th {
- padding: 1px 8px 1px 5px;
- border-top: 0;
- border-left: 0;
- border-right: 0;
- border-bottom: 1px solid #aaa;
-}
-
-table.field-list td, table.field-list th {
- border: 0 !important;
-}
-
-table.footnote td, table.footnote th {
- border: 0 !important;
-}
-
-th {
- text-align: left;
- padding-right: 5px;
-}
-
-table.citation {
- border-left: solid 1px gray;
- margin-left: 1px;
-}
-
-table.citation td {
- border-bottom: none;
-}
-
-/* -- figures --------------------------------------------------------------- */
-
-div.figure {
- margin: 0.5em;
- padding: 0.5em;
-}
-
-div.figure p.caption {
- padding: 0.3em;
-}
-
-div.figure p.caption span.caption-number {
- font-style: italic;
-}
-
-div.figure p.caption span.caption-text {
-}
-
-
-/* -- other body styles ----------------------------------------------------- */
-
-ol.arabic {
- list-style: decimal;
-}
-
-ol.loweralpha {
- list-style: lower-alpha;
-}
-
-ol.upperalpha {
- list-style: upper-alpha;
-}
-
-ol.lowerroman {
- list-style: lower-roman;
-}
-
-ol.upperroman {
- list-style: upper-roman;
-}
-
-dl {
- margin-bottom: 15px;
-}
-
-dd p {
- margin-top: 0px;
-}
-
-dd ul, dd table {
- margin-bottom: 10px;
-}
-
-dd {
- margin-top: 3px;
- margin-bottom: 10px;
- margin-left: 30px;
-}
-
-dt:target, .highlighted {
- background-color: #fbe54e;
-}
-
-dl.glossary dt {
- font-weight: bold;
- font-size: 1.1em;
-}
-
-.field-list ul {
- margin: 0;
- padding-left: 1em;
-}
-
-.field-list p {
- margin: 0;
-}
-
-.optional {
- font-size: 1.3em;
-}
-
-.sig-paren {
- font-size: larger;
-}
-
-.versionmodified {
- font-style: italic;
-}
-
-.system-message {
- background-color: #fda;
- padding: 5px;
- border: 3px solid red;
-}
-
-.footnote:target {
- background-color: #ffa;
-}
-
-.line-block {
- display: block;
- margin-top: 1em;
- margin-bottom: 1em;
-}
-
-.line-block .line-block {
- margin-top: 0;
- margin-bottom: 0;
- margin-left: 1.5em;
-}
-
-.guilabel, .menuselection {
- font-family: sans-serif;
-}
-
-.accelerator {
- text-decoration: underline;
-}
-
-.classifier {
- 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 */
-}
-
-span.pre {
- -moz-hyphens: none;
- -ms-hyphens: none;
- -webkit-hyphens: none;
- hyphens: none;
-}
-
-td.linenos pre {
- padding: 5px 0px;
- border: 0;
- background-color: transparent;
- color: #aaa;
-}
-
-table.highlighttable {
- margin-left: 0.5em;
-}
-
-table.highlighttable td {
- padding: 0 0.5em 0 0.5em;
-}
-
-div.code-block-caption {
- padding: 2px 5px;
- font-size: small;
-}
-
-div.code-block-caption code {
- background-color: transparent;
-}
-
-div.code-block-caption + div > div.highlight > pre {
- margin-top: 0;
-}
-
-div.code-block-caption span.caption-number {
- padding: 0.1em 0.3em;
- font-style: italic;
-}
-
-div.code-block-caption span.caption-text {
-}
-
-div.literal-block-wrapper {
- padding: 1em 1em 0;
-}
-
-div.literal-block-wrapper div.highlight {
- margin: 0;
-}
-
-code.descname {
- background-color: transparent;
- font-weight: bold;
- font-size: 1.2em;
-}
-
-code.descclassname {
- background-color: transparent;
-}
-
-code.xref, a code {
- background-color: transparent;
- font-weight: bold;
-}
-
-h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
- background-color: transparent;
-}
-
-.viewcode-link {
- float: right;
-}
-
-.viewcode-back {
- float: right;
- font-family: sans-serif;
-}
-
-div.viewcode-block:target {
- margin: -1px -10px;
- padding: 0 10px;
-}
-
-/* -- math display ---------------------------------------------------------- */
-
-img.math {
- vertical-align: middle;
-}
-
-div.body div.math p {
- text-align: center;
-}
-
-span.eqno {
- float: right;
-}
-
-/* -- printout stylesheet --------------------------------------------------- */
-
-@media print {
- div.document,
- div.documentwrapper,
- div.bodywrapper {
- margin: 0 !important;
- width: 100%;
- }
-
- div.sphinxsidebar,
- div.related,
- div.footer,
- #top-link {
- display: none;
- }
-}
\ No newline at end of file
Binary files /tmp/tmpNoYn47/ajGK50spUe/mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_static/comment-bright.png and /tmp/tmpNoYn47/vW_aZbQ35_/mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_static/comment-bright.png differ
Binary files /tmp/tmpNoYn47/ajGK50spUe/mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_static/comment-close.png and /tmp/tmpNoYn47/vW_aZbQ35_/mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_static/comment-close.png differ
Binary files /tmp/tmpNoYn47/ajGK50spUe/mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_static/comment.png and /tmp/tmpNoYn47/vW_aZbQ35_/mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_static/comment.png differ
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_static/custom.css mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_static/custom.css
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_static/custom.css 2016-10-24 11:18:33.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_static/custom.css 1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-/* This file intentionally left blank. */
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_static/default.css mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_static/default.css
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_static/default.css 2014-01-20 08:16:09.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_static/default.css 1970-01-01 00:00:00.000000000 +0000
@@ -1,256 +0,0 @@
-/*
- * default.css_t
- * ~~~~~~~~~~~~~
- *
- * Sphinx stylesheet -- default theme.
- *
- * :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-@import url("basic.css");
-
-/* -- page layout ----------------------------------------------------------- */
-
-body {
- font-family: sans-serif;
- font-size: 100%;
- background-color: #11303d;
- color: #000;
- margin: 0;
- padding: 0;
-}
-
-div.document {
- background-color: #1c4e63;
-}
-
-div.documentwrapper {
- float: left;
- width: 100%;
-}
-
-div.bodywrapper {
- margin: 0 0 0 230px;
-}
-
-div.body {
- background-color: #ffffff;
- color: #000000;
- padding: 0 20px 30px 20px;
-}
-
-div.footer {
- color: #ffffff;
- width: 100%;
- padding: 9px 0 9px 0;
- text-align: center;
- font-size: 75%;
-}
-
-div.footer a {
- color: #ffffff;
- text-decoration: underline;
-}
-
-div.related {
- background-color: #133f52;
- line-height: 30px;
- color: #ffffff;
-}
-
-div.related a {
- color: #ffffff;
-}
-
-div.sphinxsidebar {
-}
-
-div.sphinxsidebar h3 {
- font-family: 'Trebuchet MS', sans-serif;
- color: #ffffff;
- font-size: 1.4em;
- font-weight: normal;
- margin: 0;
- padding: 0;
-}
-
-div.sphinxsidebar h3 a {
- color: #ffffff;
-}
-
-div.sphinxsidebar h4 {
- font-family: 'Trebuchet MS', sans-serif;
- color: #ffffff;
- font-size: 1.3em;
- font-weight: normal;
- margin: 5px 0 0 0;
- padding: 0;
-}
-
-div.sphinxsidebar p {
- color: #ffffff;
-}
-
-div.sphinxsidebar p.topless {
- margin: 5px 10px 10px 10px;
-}
-
-div.sphinxsidebar ul {
- margin: 10px;
- padding: 0;
- color: #ffffff;
-}
-
-div.sphinxsidebar a {
- color: #98dbcc;
-}
-
-div.sphinxsidebar input {
- border: 1px solid #98dbcc;
- font-family: sans-serif;
- font-size: 1em;
-}
-
-
-
-/* -- hyperlink styles ------------------------------------------------------ */
-
-a {
- color: #355f7c;
- text-decoration: none;
-}
-
-a:visited {
- color: #355f7c;
- text-decoration: none;
-}
-
-a:hover {
- text-decoration: underline;
-}
-
-
-
-/* -- body styles ----------------------------------------------------------- */
-
-div.body h1,
-div.body h2,
-div.body h3,
-div.body h4,
-div.body h5,
-div.body h6 {
- font-family: 'Trebuchet MS', sans-serif;
- background-color: #f2f2f2;
- font-weight: normal;
- color: #20435c;
- border-bottom: 1px solid #ccc;
- margin: 20px -20px 10px -20px;
- padding: 3px 0 3px 10px;
-}
-
-div.body h1 { margin-top: 0; font-size: 200%; }
-div.body h2 { font-size: 160%; }
-div.body h3 { font-size: 140%; }
-div.body h4 { font-size: 120%; }
-div.body h5 { font-size: 110%; }
-div.body h6 { font-size: 100%; }
-
-a.headerlink {
- color: #c60f0f;
- font-size: 0.8em;
- padding: 0 4px 0 4px;
- text-decoration: none;
-}
-
-a.headerlink:hover {
- background-color: #c60f0f;
- color: white;
-}
-
-div.body p, div.body dd, div.body li {
- text-align: justify;
- line-height: 130%;
-}
-
-div.admonition p.admonition-title + p {
- display: inline;
-}
-
-div.admonition p {
- margin-bottom: 5px;
-}
-
-div.admonition pre {
- margin-bottom: 5px;
-}
-
-div.admonition ul, div.admonition ol {
- margin-bottom: 5px;
-}
-
-div.note {
- background-color: #eee;
- border: 1px solid #ccc;
-}
-
-div.seealso {
- background-color: #ffc;
- border: 1px solid #ff6;
-}
-
-div.topic {
- background-color: #eee;
-}
-
-div.warning {
- background-color: #ffe4e4;
- border: 1px solid #f66;
-}
-
-p.admonition-title {
- display: inline;
-}
-
-p.admonition-title:after {
- content: ":";
-}
-
-pre {
- padding: 5px;
- background-color: #eeffcc;
- color: #333333;
- line-height: 120%;
- border: 1px solid #ac9;
- border-left: none;
- border-right: none;
-}
-
-tt {
- background-color: #ecf0f3;
- padding: 0 1px 0 1px;
- font-size: 0.95em;
-}
-
-th {
- background-color: #ede;
-}
-
-.warning tt {
- background: #efc2c2;
-}
-
-.note tt {
- background: #d6d6d6;
-}
-
-.viewcode-back {
- font-family: sans-serif;
-}
-
-div.viewcode-block:target {
- background-color: #f4debf;
- border-top: 1px solid #ac9;
- border-bottom: 1px solid #ac9;
-}
\ No newline at end of file
diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_static/doctools.js mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_static/doctools.js
--- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_static/doctools.js 2016-11-29 15:44:05.000000000 +0000
+++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_static/doctools.js 1970-01-01 00:00:00.000000000 +0000
@@ -1,287 +0,0 @@
-/*
- * doctools.js
- * ~~~~~~~~~~~
- *
- * Sphinx JavaScript utilities for all documentation.
- *
- * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-/**
- * select a different prefix for underscore
- */
-$u = _.noConflict();
-
-/**
- * make the code below compatible with browsers without
- * an installed firebug like debugger
-if (!window.console || !console.firebug) {
- var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
- "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
- "profile", "profileEnd"];
- window.console = {};
- for (var i = 0; i < names.length; ++i)
- window.console[names[i]] = function() {};
-}
- */
-
-/**
- * small helper function to urldecode strings
- */
-jQuery.urldecode = function(x) {
- return decodeURIComponent(x).replace(/\+/g, ' ');
-};
-
-/**
- * small helper function to urlencode strings
- */
-jQuery.urlencode = encodeURIComponent;
-
-/**
- * This function returns the parsed url parameters of the
- * current request. Multiple values per key are supported,
- * it will always return arrays of strings for the value parts.
- */
-jQuery.getQueryParameters = function(s) {
- if (typeof s == 'undefined')
- s = document.location.search;
- var parts = s.substr(s.indexOf('?') + 1).split('&');
- var result = {};
- for (var i = 0; i < parts.length; i++) {
- var tmp = parts[i].split('=', 2);
- var key = jQuery.urldecode(tmp[0]);
- var value = jQuery.urldecode(tmp[1]);
- if (key in result)
- result[key].push(value);
- else
- result[key] = [value];
- }
- return result;
-};
-
-/**
- * highlight a given string on a jquery object by wrapping it in
- * span elements with the given class name.
- */
-jQuery.fn.highlightText = function(text, className) {
- function highlight(node) {
- if (node.nodeType == 3) {
- var val = node.nodeValue;
- var pos = val.toLowerCase().indexOf(text);
- if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) {
- var span = document.createElement("span");
- span.className = className;
- span.appendChild(document.createTextNode(val.substr(pos, text.length)));
- node.parentNode.insertBefore(span, node.parentNode.insertBefore(
- document.createTextNode(val.substr(pos + text.length)),
- node.nextSibling));
- node.nodeValue = val.substr(0, pos);
- }
- }
- else if (!jQuery(node).is("button, select, textarea")) {
- jQuery.each(node.childNodes, function() {
- highlight(this);
- });
- }
- }
- return this.each(function() {
- highlight(this);
- });
-};
-
-/*
- * backward compatibility for jQuery.browser
- * This will be supported until firefox bug is fixed.
- */
-if (!jQuery.browser) {
- jQuery.uaMatch = function(ua) {
- ua = ua.toLowerCase();
-
- var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
- /(webkit)[ \/]([\w.]+)/.exec(ua) ||
- /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
- /(msie) ([\w.]+)/.exec(ua) ||
- ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
- [];
-
- return {
- browser: match[ 1 ] || "",
- version: match[ 2 ] || "0"
- };
- };
- jQuery.browser = {};
- jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
-}
-
-/**
- * Small JavaScript module for the documentation.
- */
-var Documentation = {
-
- init : function() {
- this.fixFirefoxAnchorBug();
- this.highlightSearchWords();
- this.initIndexTable();
-
- },
-
- /**
- * i18n support
- */
- TRANSLATIONS : {},
- PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },
- LOCALE : 'unknown',
-
- // gettext and ngettext don't access this so that the functions
- // can safely bound to a different name (_ = Documentation.gettext)
- gettext : function(string) {
- var translated = Documentation.TRANSLATIONS[string];
- if (typeof translated == 'undefined')
- return string;
- return (typeof translated == 'string') ? translated : translated[0];
- },
-
- ngettext : function(singular, plural, n) {
- var translated = Documentation.TRANSLATIONS[singular];
- if (typeof translated == 'undefined')
- return (n == 1) ? singular : plural;
- return translated[Documentation.PLURALEXPR(n)];
- },
-
- addTranslations : function(catalog) {
- for (var key in catalog.messages)
- this.TRANSLATIONS[key] = catalog.messages[key];
- this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
- this.LOCALE = catalog.locale;
- },
-
- /**
- * add context elements like header anchor links
- */
- addContextElements : function() {
- $('div[id] > :header:first').each(function() {
- $('\u00B6').
- attr('href', '#' + this.id).
- attr('title', _('Permalink to this headline')).
- appendTo(this);
- });
- $('dt[id]').each(function() {
- $('\u00B6').
- attr('href', '#' + this.id).
- attr('title', _('Permalink to this definition')).
- appendTo(this);
- });
- },
-
- /**
- * workaround a firefox stupidity
- * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
- */
- fixFirefoxAnchorBug : function() {
- if (document.location.hash)
- window.setTimeout(function() {
- document.location.href += '';
- }, 10);
- },
-
- /**
- * highlight the search words provided in the url in the text
- */
- highlightSearchWords : function() {
- var params = $.getQueryParameters();
- var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
- if (terms.length) {
- var body = $('div.body');
- if (!body.length) {
- body = $('body');
- }
- window.setTimeout(function() {
- $.each(terms, function() {
- body.highlightText(this.toLowerCase(), 'highlighted');
- });
- }, 10);
- $('' + _('Hide Search Matches') + '
') - .appendTo($('#searchbox')); - } - }, - - /** - * init the domain index toggle buttons - */ - initIndexTable : function() { - var togglers = $('img.toggler').click(function() { - var src = $(this).attr('src'); - var idnum = $(this).attr('id').substr(7); - $('tr.cg-' + idnum).toggle(); - if (src.substr(-9) == 'minus.png') - $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); - else - $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); - }).css('display', ''); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { - togglers.click(); - } - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords : function() { - $('#searchbox .highlight-link').fadeOut(300); - $('span.highlighted').removeClass('highlighted'); - }, - - /** - * make the url absolute - */ - makeURL : function(relativeURL) { - return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; - }, - - /** - * get the current relative url - */ - getCurrentURL : function() { - var path = document.location.pathname; - var parts = path.split(/\//); - $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { - if (this == '..') - parts.pop(); - }); - var url = parts.join('/'); - return path.substring(url.lastIndexOf('/') + 1, path.length - 1); - }, - - initOnKeyListeners: function() { - $(document).keyup(function(event) { - var activeElementType = document.activeElement.tagName; - // don't navigate when in search box or textarea - if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') { - switch (event.keyCode) { - case 37: // left - var prevHref = $('link[rel="prev"]').prop('href'); - if (prevHref) { - window.location.href = prevHref; - return false; - } - case 39: // right - var nextHref = $('link[rel="next"]').prop('href'); - if (nextHref) { - window.location.href = nextHref; - return false; - } - } - } - }); - } -}; - -// quick alias for translations -_ = Documentation.gettext; - -$(document).ready(function() { - Documentation.init(); -}); \ No newline at end of file Binary files /tmp/tmpNoYn47/ajGK50spUe/mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_static/down.png and /tmp/tmpNoYn47/vW_aZbQ35_/mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_static/down.png differ Binary files /tmp/tmpNoYn47/ajGK50spUe/mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_static/down-pressed.png and /tmp/tmpNoYn47/vW_aZbQ35_/mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_static/down-pressed.png differ Binary files /tmp/tmpNoYn47/ajGK50spUe/mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_static/file.png and /tmp/tmpNoYn47/vW_aZbQ35_/mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_static/file.png differ diff -Nru mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_static/jquery-1.11.1.js mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_static/jquery-1.11.1.js --- mnemosyne-2.4/mnemosyne/libmnemosyne/docs/build/html/_static/jquery-1.11.1.js 2016-10-24 11:18:23.000000000 +0000 +++ mnemosyne-2.6+ds/mnemosyne/libmnemosyne/docs/build/html/_static/jquery-1.11.1.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,10308 +0,0 @@ -/*! - * jQuery JavaScript Library v1.11.1 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2014-05-01T17:42Z - */ - -(function( global, factory ) { - - if ( typeof module === "object" && typeof module.exports === "object" ) { - // For CommonJS and CommonJS-like environments where a proper window is present, - // execute the factory and get jQuery - // For environments that do not inherently posses a window with a document - // (such as Node.js), expose a jQuery-making factory as module.exports - // This accentuates the need for the creation of a real window - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Can't do this because several apps including ASP.NET trace -// the stack via arguments.caller.callee and Firefox dies if -// you try to trace through "use strict" call chains. (#13335) -// Support: Firefox 18+ -// - -var deletedIds = []; - -var slice = deletedIds.slice; - -var concat = deletedIds.concat; - -var push = deletedIds.push; - -var indexOf = deletedIds.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var support = {}; - - - -var - version = "1.11.1", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }, - - // Support: Android<4.1, IE<9 - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }; - -jQuery.fn = jQuery.prototype = { - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // 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 just the one element from the set - ( num < 0 ? this[ num + this.length ] : this[ num ] ) : - - // Return all the elements in a clean array - slice.call( this ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - ret.context = this.context; - - // 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 ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); - }, - - 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: deletedIds.sort, - splice: deletedIds.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var src, copyIsArray, copy, name, options, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // 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 ( i === length ) { - 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({ - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - // 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"; - }, - - isWindow: function( obj ) { - /* jshint eqeqeq: false */ - return obj != null && obj == obj.window; - }, - - isNumeric: function( obj ) { - // parseFloat NaNs numeric-cast false positives (null|true|false|"") - // ...but misinterprets leading-number strings, particularly hex literals ("0x...") - // subtraction forces infinities to NaN - return !jQuery.isArray( obj ) && obj - parseFloat( obj ) >= 0; - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - isPlainObject: function( obj ) { - var key; - - // 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; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !hasOwn.call(obj, "constructor") && - !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Support: IE<9 - // Handle iteration over inherited properties before own properties. - if ( support.ownLast ) { - for ( key in obj ) { - return hasOwn.call( obj, key ); - } - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - for ( key in obj ) {} - - return key === undefined || hasOwn.call( obj, key ); - }, - - type: function( obj ) { - if ( obj == null ) { - return obj + ""; - } - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call(obj) ] || "object" : - typeof obj; - }, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && jQuery.trim( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var value, - i = 0, - length = obj.length, - isArray = isArraylike( obj ); - - if ( args ) { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } - } - - return obj; - }, - - // Support: Android<4.1, IE<9 - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArraylike( Object(arr) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - var len; - - if ( arr ) { - if ( indexOf ) { - return indexOf.call( arr, elem, i ); - } - - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - while ( j < len ) { - first[ i++ ] = second[ j++ ]; - } - - // Support: IE<9 - // Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists) - if ( len !== len ) { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, - i = 0, - length = elems.length, - isArray = isArraylike( elems ), - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var args, proxy, tmp; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - now: function() { - return +( new Date() ); - }, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -}); - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -function isArraylike( obj ) { - var length = obj.length, - type = jQuery.type( obj ); - - if ( type === "function" || jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v1.10.19 - * http://sizzlejs.com/ - * - * Copyright 2013 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2014-04-18 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + -(new Date()), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // General-purpose constants - strundefined = typeof undefined, - MAX_NEGATIVE = 1 << 31, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf if we can't use a native one - indexOf = arr.indexOf || function( elem ) { - var i = 0, - len = this.length; - for ( ; i < len; i++ ) { - if ( this[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + characterEncoding + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - rescape = /'|\\/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }; - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var match, elem, m, nodeType, - // QSA vars - i, groups, old, nid, newContext, newSelector; - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - - context = context || document; - results = results || []; - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { - return []; - } - - if ( documentIsHTML && !seed ) { - - // Shortcuts - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document (jQuery #6963) - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // QSA path - if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - nid = old = expando; - newContext = context; - newSelector = nodeType === 9 && selector; - - // 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 - if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - groups = tokenize( selector ); - - if ( (old = context.getAttribute("id")) ) { - nid = old.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - nid = "[id='" + nid + "'] "; - - i = groups.length; - while ( i-- ) { - groups[i] = nid + toSelector( groups[i] ); - } - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; - newSelector = groups.join(","); - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {Function(string, Object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key + " " ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return !!fn( div ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( div.parentNode ) { - div.parentNode.removeChild( div ); - } - // release memory in IE - div = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = attrs.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - ( ~b.sourceIndex || MAX_NEGATIVE ) - - ( ~a.sourceIndex || MAX_NEGATIVE ); - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== strundefined && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = 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).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, - doc = node ? node.ownerDocument || node : preferredDoc, - parent = doc.defaultView; - - // If no document and documentElement is available, return - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Set our document - document = doc; - docElem = doc.documentElement; - - // Support tests - documentIsHTML = !isXML( doc ); - - // Support: IE>8 - // If iframe document is assigned to "document" variable and if iframe has been reloaded, - // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 - // IE6-8 do not support the defaultView property so parent will be undefined - if ( parent && parent !== parent.top ) { - // IE11 does not have attachEvent, so all must suffer - if ( parent.addEventListener ) { - parent.addEventListener( "unload", function() { - setDocument(); - }, false ); - } else if ( parent.attachEvent ) { - parent.attachEvent( "onunload", function() { - setDocument(); - }); - } - } - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) - support.attributes = assert(function( div ) { - div.className = "i"; - return !div.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( div ) { - div.appendChild( doc.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Check if getElementsByClassName can be trusted - support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) { - div.innerHTML = ""; - - // Support: Safari<4 - // Catch class over-caching - div.firstChild.className = "i"; - // Support: Opera<10 - // Catch gEBCN failure to find non-leading classes - return div.getElementsByClassName("i").length === 2; - }); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( div ) { - docElem.appendChild( div ).id = expando; - return !doc.getElementsByName || !doc.getElementsByName( expando ).length; - }); - - // ID find and filter - if ( support.getById ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && documentIsHTML ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [ m ] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - // Support: IE6/7 - // getElementById is not reliable as a find shortcut - delete Expr.find["ID"]; - - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var elem, - tmp = [], - i = 0, - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See http://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - div.innerHTML = ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( div.querySelectorAll("[msallowclip^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = doc.createElement("input"); - input.setAttribute( "type", "hidden" ); - div.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( div.querySelectorAll("[name=d]").length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully does not implement inclusive descendent - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { - return -1; - } - if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - return a === doc ? -1 : - b === doc ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return doc; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - if ( support.matchesSelector && documentIsHTML && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - while ( (node = elem[i++]) ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[6] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] ) { - match[2] = match[4] || match[5] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, outerCache, node, diff, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - // Seek `elem` from a previously-cached index - outerCache = parent[ expando ] || (parent[ expando ] = {}); - cache = outerCache[ type ] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = cache[0] === dirruns && cache[2]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - outerCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - // Use previously-cached element index if available - } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { - diff = cache[1]; - - // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) - } else { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { - // Cache the index of each encountered element - if ( useCache ) { - (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf.call( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( (tokens = []) ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - if ( (oldCache = outerCache[ dir ]) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return (newCache[ 2 ] = oldCache[ 2 ]); - } else { - // Reuse newcache so results back-propagate to previous elements - outerCache[ dir ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { - return true; - } - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf.call( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), - len = elems.length; - - if ( outermost ) { - outermostContext = context !== document && context; - } - - // Add elements passing elementMatchers directly to results - // Keep `i` a string if there are no elements so `matchedCount` will be "00" below - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: