diff --git a/client/galaxy/scripts/layout/scratchbook.js b/client/galaxy/scripts/layout/scratchbook.js index 656c1ac6dc49..6ec1d3703e5f 100644 --- a/client/galaxy/scripts/layout/scratchbook.js +++ b/client/galaxy/scripts/layout/scratchbook.js @@ -41,45 +41,82 @@ return Backbone.View.extend({ }).on( 'show hide ', function() { self.buttonLoad.set( { 'toggle': this.visible, 'icon': this.visible && 'fa-eye' || 'fa-eye-slash' } ); }); + this.history_cache = {}; }, /** Add a dataset to the frames */ addDataset: function( dataset_id ) { + var self = this; + var current_dataset = null; + if ( Galaxy && Galaxy.currHistoryPanel ) { + var history_id = Galaxy.currHistoryPanel.collection.historyId; + this.history_cache[ history_id ] = { name: Galaxy.currHistoryPanel.model.get( 'name' ), dataset_ids: [] }; + Galaxy.currHistoryPanel.collection.each( function( model ) { + !model.get( 'deleted' ) && model.get( 'visible' ) && self.history_cache[ history_id ].dataset_ids.push( model.get( 'id' ) ); + }); + } + var _findDataset = function( dataset, offset ) { + if ( dataset ) { + var history_details = self.history_cache[ dataset.get( 'history_id' ) ]; + if ( history_details && history_details.dataset_ids ) { + var dataset_list = history_details.dataset_ids; + var pos = dataset_list.indexOf( dataset.get( 'id' ) ); + if ( pos !== -1 && pos + offset >= 0 && pos + offset < dataset_list.length ) { + return dataset_list[ pos + offset ]; + } + } + } + }; + var _loadDatasetOffset = function( dataset, offset, frame ) { + var new_dataset_id = _findDataset( dataset, offset ); + if ( new_dataset_id ) { + self._loadDataset( new_dataset_id, function( new_dataset, config ) { + current_dataset = new_dataset; + frame.model.set( config ); + }); + } else { + frame.model.trigger( 'change' ); + } + } + this._loadDataset( dataset_id, function( dataset, config ) { + current_dataset = dataset; + self.add( _.extend( { menu: [ { icon : 'fa fa-chevron-circle-left', + tooltip : 'Previous in History', + onclick : function( frame ) { _loadDatasetOffset( current_dataset, -1, frame ) }, + disabled : function() { return !_findDataset( current_dataset, -1 ) } }, + { icon : 'fa fa-chevron-circle-right', + tooltip : 'Next in History', + onclick : function( frame ) { _loadDatasetOffset( current_dataset, 1, frame ) }, + disabled : function() { return !_findDataset( current_dataset, 1 ) } } ] }, config ) ) + }); + }, + + _loadDataset: function( dataset_id, callback ) { var self = this; require([ 'mvc/dataset/data' ], function( DATA ) { var dataset = new DATA.Dataset( { id : dataset_id } ); $.when( dataset.fetch() ).then( function() { - // Construct frame config based on dataset's type. - var frame_config = { - title: dataset.get('name') - }, - // HACK: For now, assume 'tabular' and 'interval' are the only - // modules that contain tabular files. This needs to be replaced - // will a is_datatype() function. - is_tabular = _.find( [ 'tabular', 'interval' ] , function( data_type ) { - return dataset.get( 'data_type' ).indexOf( data_type ) !== -1; - }); - - // Use tabular chunked display if dataset is tabular; otherwise load via URL. - if ( is_tabular ) { - var tabular_dataset = new DATA.TabularDataset( dataset.toJSON() ); - _.extend( frame_config, { - content: function( parent_elt ) { - DATA.createTabularDatasetChunkedView({ - model : tabular_dataset, - parent_elt : parent_elt, - embedded : true, - height : '100%' - }); - } - }); - } - else { - _.extend( frame_config, { - url: Galaxy.root + 'datasets/' + dataset.id + '/display/?preview=True' - }); + var is_tabular = _.find( [ 'tabular', 'interval' ] , function( data_type ) { + return dataset.get( 'data_type' ).indexOf( data_type ) !== -1; + }); + var title = dataset.get( 'name' ); + var history_details = self.history_cache[ dataset.get( 'history_id' ) ]; + if ( history_details ) { + title = history_details.name + ': ' + title; } - self.add( frame_config ); + callback( dataset, is_tabular ? { + title : title, + url : null, + content : DATA.createTabularDatasetChunkedView({ + model : new DATA.TabularDataset( dataset.toJSON() ), + embedded : true, + height : '100%' + }).$el + } : { + title : title, + url : Galaxy.root + 'datasets/' + dataset_id + '/display/?preview=True', + content : null + } ); }); }); }, @@ -136,15 +173,9 @@ return Backbone.View.extend({ window.location = options.url; } else if ( !this.active ) { var $galaxy_main = $( window.parent.document ).find( '#galaxy_main' ); - if ( options.target == 'galaxy_main' || options.target == 'center' ){ - if ( $galaxy_main.length === 0 ){ - var href = options.url; - if ( href.indexOf( '?' ) == -1 ) - href += '?'; - else - href += '&'; - href += 'use_panels=True'; - window.location = href; + if ( options.target == 'galaxy_main' || options.target == 'center' ) { + if ( $galaxy_main.length === 0 ) { + window.location = options.url + ( href.indexOf( '?' ) == -1 ? '?' : '&' ) + 'use_panels=True'; } else { $galaxy_main.attr( 'src', options.url ); } diff --git a/client/galaxy/scripts/mvc/history/history-model.js b/client/galaxy/scripts/mvc/history/history-model.js index a29f2eca576c..863f6e722207 100644 --- a/client/galaxy/scripts/mvc/history/history-model.js +++ b/client/galaxy/scripts/mvc/history/history-model.js @@ -435,6 +435,7 @@ var ControlledFetchMixin = { _.each( filters, function( v, k ){ if( v === true ){ v = 'True'; } if( v === false ){ v = 'False'; } + if( v === null ){ v = 'None'; } filterMap.q.push( k ); filterMap.qv.push( v ); }); @@ -522,6 +523,11 @@ var HistoryCollection = Backbone.Collection deleted : false, purged : false, }; + } else { + defaults.filters = { + // TODO: for bypassing defaults on current API + deleted : null, + }; } return defaults; }, diff --git a/client/galaxy/scripts/mvc/tool/tool-form-composite.js b/client/galaxy/scripts/mvc/tool/tool-form-composite.js index 816110511b18..15b122e51fc4 100644 --- a/client/galaxy/scripts/mvc/tool/tool-form-composite.js +++ b/client/galaxy/scripts/mvc/tool/tool-form-composite.js @@ -1,46 +1,40 @@ -/** - This is the run workflow tool form. -*/ -define([ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/form/form-view', 'mvc/form/form-data', 'mvc/tool/tool-form-base' ], - function( Utils, Ui, Form, FormData, ToolFormBase ) { +/** This is the run workflow tool form view. */ +define([ 'utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view', 'mvc/form/form-data', 'mvc/tool/tool-form-base' ], + function( Utils, Deferred, Ui, Form, FormData, ToolFormBase ) { var View = Backbone.View.extend({ initialize: function( options ) { + this.model = options && options.model || new Backbone.Model( options ); + this.deferred = new Deferred(); + this.setElement( $( '
' ).addClass( 'ui-form-composite' ) + .append( this.$message = $( '
' ) ) + .append( this.$header = $( '
' ) ) + .append( this.$parameters = $( '
' ) ) + .append( this.$steps = $( '
' ) ) + .append( this.$history = $( '
' ) ) + .append( this.$execute = $( '
' ) ) ); + $( 'body' ).append( this.$el ); + this._configure(); + this.render(); + }, + + /** Configures form/step options for each workflow step */ + _configure: function() { var self = this; - this.workflow_id = options.id; this.forms = []; this.steps = []; this.links = []; - - // initialize elements - this.setElement( '
' ); - this.$header = $( '
' ).addClass( 'ui-form-header' ); - this.$header.append( new Ui.Label({ - title : 'Workflow: ' + options.name - }).$el ); - this.$header.append( new Ui.Button({ - title : 'Collapse', - icon : 'fa-angle-double-up', - onclick : function() { _.each( self.forms, function( form ) { form.portlet.collapse() }) } - }).$el ); - this.$header.append( new Ui.Button({ - title : 'Expand all', - icon : 'fa-angle-double-down', - onclick : function() { _.each( self.forms, function( form ) { form.portlet.expand() }) } - }).$el ); - this.$el.append( this.$header ); - - // initialize steps and configure connections - _.each( options.steps, function( step, i ) { + this.parms = []; + _.each( this.model.get( 'steps' ), function( step, i ) { Galaxy.emit.debug( 'tool-form-composite::initialize()', i + ' : Preparing workflow step.' ); step = Utils.merge( { + index : i, name : 'Step ' + ( parseInt( i ) + 1 ) + ': ' + step.name, icon : '', help : null, description : step.annotation && ' - ' + step.annotation || step.description, citations : null, - needs_update : true, collapsible : true, - collapsed : i > 0, + collapsed : i > 0 && !self._isDataStep( step ), sustain_version : true, sustain_repeats : true, sustain_conditionals : true, @@ -48,155 +42,256 @@ define([ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/form/form-view', 'mvc/form/form-d text_enable : 'Edit', text_disable : 'Undo', cls_enable : 'fa fa-edit', - cls_disable : 'fa fa-undo' + cls_disable : 'fa fa-undo', + errors : step.messages, + initial_errors : true }, step ); - // convert all connected data inputs to hidden fields with proper labels - _.each( options.steps, function( sub_step ) { + self.steps[ i ] = step; + self.links[ i ] = []; + self.parms[ i ] = {} + }); + + // build linear index of step input pairs + _.each( this.steps, function( step, i ) { + FormData.visitInputs( step.inputs, function( input, name ) { + self.parms[ i ][ name ] = input; + }); + }); + + // iterate through data input modules and collect linked sub steps + _.each( this.steps, function( step, i ) { + _.each( step.output_connections, function( output_connection ) { + _.each( self.steps, function( sub_step, j ) { + sub_step.step_id === output_connection.input_step_id && self.links[ i ].push( sub_step ); + }); + }); + }); + + // convert all connected data inputs to hidden fields with proper labels, + // and track the linked source step + _.each( this.steps, function( step, i ) { + _.each( self.steps, function( sub_step, j ) { var connections_by_name = {}; _.each( step.output_connections, function( connection ) { sub_step.step_id === connection.input_step_id && ( connections_by_name[ connection.input_name ] = connection ); }); - FormData.matchIds( sub_step.inputs, connections_by_name, function( connection, input ) { - if ( !input.linked ) { - input.linked = step.step_type; + _.each( self.parms[ j ], function( input, name ) { + var connection = connections_by_name[ name ]; + if ( connection ) { input.type = 'hidden'; - input.help = ''; - } else { - input.help += ', '; + input.help = input.step_linked ? input.help + ', ' : ''; + input.help += 'Output dataset \'' + connection.output_name + '\' from step ' + ( parseInt( i ) + 1 ); + input.step_linked = input.step_linked || []; + input.step_linked.push( step ); } - input.help += 'Output dataset \'' + connection.output_name + '\' from step ' + ( parseInt( i ) + 1 ); }); }); - self.steps[ i ] = step; - self.links[ i ] = []; }); - // finalize configuration and build forms - _.each( self.steps, function( step, i ) { - var form = null; - if ( String( step.step_type ).startsWith( 'data' ) ) { - form = new Form( Utils.merge({ - title : '' + step.name + '', - onchange: function() { - var input_value = form.data.create().input; - _.each( self.links[ i ], function( link ) { - link.input.value ( input_value ); - link.form.trigger( 'change' ); - }); - } - }, step )); - } else if ( step.step_type == 'tool' ) { - // select fields are shown for dynamic fields if all putative data inputs are available - function visitInputs( inputs, data_resolved ) { - data_resolved === undefined && ( data_resolved = true ); - _.each( inputs, function ( input ) { - if ( _.isObject( input ) ) { - if ( input.type ) { - var is_data_input = [ 'data', 'data_collection' ].indexOf( input.type ) !== -1; - var is_workflow_parameter = self._isWorkflowParameter( input.value ); - is_data_input && input.linked && !input.linked.startsWith( 'data' ) && ( data_resolved = false ); - input.options && ( ( input.options.length == 0 && !data_resolved ) || is_workflow_parameter ) && ( input.is_workflow = true ); - input.value && input.value.__class__ == 'RuntimeValue' && ( input.value = null ); - if ( !is_data_input && input.type !== 'hidden' && !is_workflow_parameter ) { - if ( input.optional || ( !Utils.isEmpty( input.value ) && input.value !== '' ) ) { - input.collapsible_value = input.value; - input.collapsible_preview = true; - } - } - } - visitInputs( input, data_resolved ); - } - }); - }; - visitInputs( step.inputs ); - // or if a particular reference is specified and available - FormData.matchContext( step.inputs, 'data_ref', function( input, reference ) { - input.is_workflow = ( reference.linked && !reference.linked.startsWith( 'data' ) ) || self._isWorkflowParameter( input.value ); + // identify and configure workflow parameters + var wp_count = 0; + this.wp_inputs = {}; + function _handleWorkflowParameter( value, callback ) { + var wp_name = self._isWorkflowParameter( value ); + wp_name && callback( self.wp_inputs[ wp_name ] = self.wp_inputs[ wp_name ] || { + label : wp_name, + name : wp_name, + type : 'text', + color : 'hsl( ' + ( ++wp_count * 100 ) + ', 70%, 30% )', + style : 'ui-form-wp-source', + links : [] + }); + } + _.each( this.steps, function( step, i ) { + _.each( self.parms[ i ], function( input, name ) { + _handleWorkflowParameter( input.value, function( wp_input ) { + wp_input.links.push( step ); + input.wp_linked = wp_input.name; + input.color = wp_input.color; + input.type = 'text'; + input.value = null; + input.backdrop = true; + input.style = 'ui-form-wp-target'; }); - form = new ToolFormBase( step ); - } - self.forms[ i ] = form; + }); + _.each( step.post_job_actions, function( pja ) { + _.each( pja.action_arguments, function( arg ) { + _handleWorkflowParameter( arg, function() {} ); + }); + }); }); - // create index of data output links + // select fields are shown for dynamic fields if all putative data inputs are available, + // or if an explicit reference is specified as data_ref and available _.each( this.steps, function( step, i ) { - _.each( step.output_connections, function( output_connection ) { - _.each( self.forms, function( form ) { - if ( form.options.step_id === output_connection.input_step_id ) { - var matched_input = form.field_list[ form.data.match( output_connection.input_name ) ]; - matched_input && self.links[ i ].push( { input: matched_input, form: form } ); + if ( step.step_type == 'tool' ) { + var data_resolved = true; + FormData.visitInputs( step.inputs, function ( input, name, context ) { + var is_data_input = ([ 'data', 'data_collection' ]).indexOf( input.type ) != -1; + var data_ref = context[ input.data_ref ]; + input.step_linked && !self._isDataStep( input.step_linked ) && ( data_resolved = false ); + input.options && ( ( input.options.length == 0 && !data_resolved ) || input.wp_linked ) && ( input.is_workflow = true ); + data_ref && ( input.is_workflow = ( data_ref.step_linked && !self._isDataStep( data_ref.step_linked ) ) || input.wp_linked ); + ( is_data_input || ( input.value && input.value.__class__ == 'RuntimeValue' && !input.step_linked ) ) && ( step.collapsed = false ); + input.value && input.value.__class__ == 'RuntimeValue' && ( input.value = null ); + input.flavor = 'workflow'; + if ( !is_data_input && input.type !== 'hidden' && !input.wp_linked ) { + if ( input.optional || ( !Utils.isEmpty( input.value ) && input.value !== '' ) ) { + input.collapsible_value = input.value; + input.collapsible_preview = true; + } } }); - }); + } }); + }, - // build workflow parameters - var wp_fields = {}; - var wp_inputs = {}; - var wp_count = 0; - var wp_style = function( wp_field, wp_color, wp_cls ) { - var $wp_input = wp_field.$( 'input' ); - $wp_input.length === 0 && ( $wp_input = wp_field.$el ); - $wp_input.addClass( wp_cls ).css({ 'color': wp_color, 'border-color': wp_color }); + render: function() { + var self = this; + this.deferred.reset(); + this._renderHeader(); + this._renderMessage(); + this._renderParameters(); + this._renderHistory(); + _.each ( this.steps, function( step, i ) { self._renderStep( step, i ) } ); + this.deferred.execute( function() { self._renderExecute() } ); + }, + + /** Render header */ + _renderHeader: function() { + var self = this; + this.$header.addClass( 'ui-form-header' ).empty() + .append( new Ui.Label({ + title : 'Workflow: ' + this.model.get( 'name' ) }).$el ) + .append( new Ui.Button({ + title : 'Collapse', + icon : 'fa-angle-double-up', + onclick : function() { _.each( self.forms, function( form ) { form.portlet.collapse() }) } }).$el ) + .append( new Ui.Button({ + title : 'Expand all', + icon : 'fa-angle-double-down', + onclick : function() { _.each( self.forms, function( form ) { form.portlet.expand() }) } }).$el ); + }, + + /** Render message */ + _renderMessage: function() { + this.$message.empty(); + if ( this.model.get( 'has_upgrade_messages' ) ) { + this.$message.append( new Ui.Message( { + message : 'Some tools in this workflow may have changed since it was last saved or some errors were found. The workflow may still run, but any new options will have default values. Please review the messages below to make a decision about whether the changes will affect your analysis.', + status : 'warning', + persistent : true + } ).$el ); } - _.each( this.steps, function( step, i ) { - _.each( step.inputs, function( input ) { - var wp_name = self._isWorkflowParameter( input.value ); - if ( wp_name ) { - var wp_field = self.forms[ i ].field_list[ input.id ]; - var wp_element = self.forms[ i ].element_list[ input.id ]; - wp_fields[ wp_name ] = wp_fields[ wp_name ] || []; - wp_fields[ wp_name ].push( wp_field ); - wp_field.value( wp_name ); - wp_element.disable( true ); - wp_inputs[ wp_name ] = wp_inputs[ wp_name ] || { - type : input.type, - is_workflow : input.options, - label : wp_name, - name : wp_name, - color : 'hsl( ' + ( ++wp_count * 100 ) + ', 70%, 30% )' - }; - wp_style( wp_field, wp_inputs[ wp_name ].color, 'ui-form-wp-target' ); - } - }); - }); - if ( !_.isEmpty( wp_inputs ) ) { - var wp_form = new Form({ title: 'Workflow Parameters', inputs: wp_inputs, onchange: function() { - _.each( wp_form.data.create(), function( wp_value, wp_name ) { - _.each( wp_fields[ wp_name ], function( wp_field ) { - wp_field.value( Utils.sanitize( wp_value ) || wp_name ); + }, + + /** Render workflow parameters */ + _renderParameters: function() { + var self = this; + this.wp_form = null; + if ( !_.isEmpty( this.wp_inputs ) ) { + this.wp_form = new Form({ title: 'Workflow Parameters', inputs: this.wp_inputs, onchange: function() { + _.each( self.wp_form.input_list, function( input_def, i ) { + _.each( input_def.links, function( step ) { + self._refreshStep( step ); }); }); }}); - _.each( wp_form.field_list, function( wp_field, i ) { - wp_style( wp_field, wp_form.input_list[ i ].color, 'ui-form-wp-source' ); - }); - this.$el.append( '

' ).addClass( 'ui-margin-top' ); - this.$el.append( wp_form.$el ); + this._append( this.$parameters.empty(), this.wp_form.$el ); } + }, - // append elements - _.each( this.steps, function( step, i ) { - var form = self.forms[ i ]; - self.$el.append( '

' ).addClass( 'ui-margin-top' ).append( form.$el ); - if ( step.post_job_actions && step.post_job_actions.length ) { - form.portlet.append( $( '

' ).addClass( 'ui-form-footer-info fa fa-bolt' ).append( - _.reduce( step.post_job_actions, function( memo, value ) { - return memo + ' ' + value.short_str; - }, '' )) - ); + /** Render step */ + _renderStep: function( step, i ) { + var self = this; + var form = null; + var current = null; + this.deferred.execute( function( promise ) { + current = promise; + if ( self._isDataStep( step ) ) { + _.each( step.inputs, function( input ) { input.flavor = 'module' } ); + form = new Form( Utils.merge({ + title : '' + step.name + '', + onchange : function() { _.each( self.links[ i ], function( link ) { self._refreshStep( link ) } ) } + }, step ) ); + self._append( self.$steps, form.$el ); + } else if ( step.step_type == 'tool' ) { + form = new ToolFormBase( step ); + if ( step.post_job_actions && step.post_job_actions.length ) { + form.portlet.append( $( '
' ).addClass( 'ui-form-element-disabled' ) + .append( $( '
' ).addClass( 'ui-form-title' ).html( 'Job Post Actions' ) ) + .append( $( '
' ).addClass( 'ui-form-preview' ).html( + _.reduce( step.post_job_actions, function( memo, value ) { + return memo + ' ' + value.short_str; + }, '' ) ) ) + ); + } + self._append( self.$steps, form.$el ); } + self.forms[ i ] = form; + self._refreshStep( step ); Galaxy.emit.debug( 'tool-form-composite::initialize()', i + ' : Workflow step state ready.', step ); - }); + self._resolve( form.deferred, promise ); + } ); + }, + + /** This helps with rendering lazy loaded steps */ + _resolve: function( deferred, promise ) { + var self = this; + setTimeout( function() { + if ( deferred && deferred.ready() || !deferred ) { + promise.resolve(); + } else { + self._resolve( deferred, promise ); + } + }, 0 ); + }, + + /** Refreshes step values from source step values */ + _refreshStep: function( step ) { + var self = this; + var form = this.forms[ step.index ]; + if ( form ) { + _.each( self.parms[ step.index ], function( input, name ) { + if ( input.step_linked || input.wp_linked ) { + var field = form.field_list[ form.data.match( name ) ]; + if ( field ) { + var new_value = undefined; + if ( input.step_linked ) { + new_value = { values: [] }; + _.each( input.step_linked, function( source_step ) { + if ( self._isDataStep( source_step ) ) { + value = self.forms[ source_step.index ].data.create().input; + value && _.each( value.values, function( v ) { new_value.values.push( v ) } ); + } + }); + if ( !input.multiple && new_value.values.length > 0 ) { + new_value = { values: [ new_value.values[ 0 ] ] }; + } + } else if ( input.wp_linked ) { + var wp_field = self.wp_form.field_list[ self.wp_form.data.match( input.wp_linked ) ]; + wp_field && ( new_value = wp_field.value() ); + } + if ( new_value !== undefined ) { + field.value( new_value ); + } + } + } + }); + form.trigger( 'change' ); + } + }, - // add history form + /** Render history form */ + _renderHistory: function() { this.history_form = null; - if ( !options.history_id ) { + if ( !this.model.get( 'history_id' ) ) { this.history_form = new Form({ inputs : [{ type : 'conditional', + name : 'new_history', test_param : { - name : 'new_history', + name : 'check', label : 'Send results to a new history', type : 'boolean', value : 'false', @@ -205,20 +300,21 @@ define([ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/form/form-view', 'mvc/form/form-d cases : [{ value : 'true', inputs : [{ - name : 'new_history_name', + name : 'name', label : 'History name', type : 'text', - value : options.name + value : this.model.get( 'name' ) }] }] }] }); - this.$el.append( '

' ).addClass( 'ui-margin-top' ); - this.$el.append( this.history_form.$el ); + this._append( this.$history.empty(), this.history_form.$el ); } + }, - // add execute button - this.$el.append( '

' ).addClass( 'ui-margin-top' ); + /** Render execute button */ + _renderExecute: function() { + var self = this; this.execute_btn = new Ui.Button({ icon : 'fa-check', title : 'Run workflow', @@ -226,81 +322,84 @@ define([ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/form/form-view', 'mvc/form/form-d floating : 'clear', onclick : function() { self._execute() } }); - this.$el.append( this.execute_btn.$el ); - $( 'body' ).append( this.$el ); + this._append( this.$execute.empty(), this.execute_btn.$el ); }, - /** Execute workflow - */ + /** Execute workflow */ _execute: function() { var self = this; var job_def = { - inputs : {}, - parameters : {} + new_history_name : this.history_form.data.create()[ 'new_history|name' ], + wf_parm : this.wp_form ? this.wp_form.data.create() : {}, + inputs : {} }; var validated = true; - _.each( this.forms, function( form, i ) { + for ( var i in this.forms ) { + var form = this.forms[ i ]; var job_inputs = form.data.create(); var step = self.steps[ i ]; var step_id = step.step_id; - var step_type = step.step_type; - var order_index = step.order_index; - job_def.parameters[ step_id ] = {}; form.trigger( 'reset' ); for ( var job_input_id in job_inputs ) { var input_value = job_inputs[ job_input_id ]; var input_id = form.data.match( job_input_id ); var input_field = form.field_list[ input_id ]; var input_def = form.input_list[ input_id ]; - if ( String( step_type ).startsWith( 'data' ) ) { - if ( input_value && input_value.values && input_value.values.length > 0 ) { - job_def.inputs[ order_index ] = input_value.values[ 0 ]; - } else if ( validated ) { - form.highlight( input_id ); - validated = false; + if ( !input_def.step_linked ) { + if ( this._isDataStep( step ) ) { + validated = input_value && input_value.values && input_value.values.length > 0; + } else { + validated = input_def.optional || ( input_def.is_workflow && input_value !== '' ) || ( !input_def.is_workflow && input_value !== null ); } - } else { - if ( !String( input_def.type ).startsWith( 'data' ) ) { - if ( input_def.optional || input_def.is_workflow || input_value != null ) { - job_def.parameters[ step_id ][ job_input_id ] = input_value; - } else { - form.highlight( input_id ); - validated = false; - } + if ( !validated ) { + form.highlight( input_id ); + break; } + job_def.inputs[ step_id ] = job_def.inputs[ step_id ] || {}; + job_def.inputs[ step_id ][ job_input_id ] = job_inputs[ job_input_id ]; } } - }); - console.log( JSON.stringify( job_def ) ); + if ( !validated ) { + break; + } + } if ( !validated ) { self._enabled( true ); + Galaxy.emit.debug( 'tool-form-composite::submit()', 'Validation failed.', job_def ); } else { self._enabled( false ); - Galaxy.emit.debug( 'tools-form-composite::submit()', 'Validation complete.', job_def ); + Galaxy.emit.debug( 'tool-form-composite::submit()', 'Validation complete.', job_def ); Utils.request({ type : 'POST', url : Galaxy.root + 'api/workflows/' + this.workflow_id + '/invocations', data : job_def, success : function( response ) { Galaxy.emit.debug( 'tool-form-composite::submit', 'Submission successful.', response ); + self.$el.empty().append( self._templateSuccess( response ) ); parent.Galaxy && parent.Galaxy.currHistoryPanel && parent.Galaxy.currHistoryPanel.refreshContents(); - console.log( response ); }, error : function( response ) { - console.log( response ); + Galaxy.emit.debug( 'tool-form-composite::submit', 'Submission failed.', response ); if ( response && response.err_data ) { - var error_messages = form.data.matchResponse( response.err_data ); - for ( var input_id in error_messages ) { - form.highlight( input_id, error_messages[ input_id ] ); - break; + for ( var i in self.forms ) { + var form = self.forms[ i ]; + var step_related_errors = response.err_data[ form.options.step_id ]; + if ( step_related_errors ) { + var error_messages = form.data.matchResponse( step_related_errors ); + for ( var input_id in error_messages ) { + form.highlight( input_id, error_messages[ input_id ] ); + break; + } + } } } else { - Galaxy.modal && Galaxy.modal.show({ + var modal = parent.Galaxy.modal; + modal && modal.show({ title : 'Job submission failed', - body : ( response && response.err_msg ) || ToolTemplate.error( options.job_def ), + body : self._templateError( response && response.err_msg || job_def ), buttons : { 'Close' : function() { - Galaxy.modal.hide(); + modal.hide(); } } }); @@ -313,23 +412,69 @@ define([ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/form/form-view', 'mvc/form/form-d } }, - /** Set enabled/disabled state - */ + /** Append new dom to body */ + _append: function( $container, $el ) { + $container.append( '

' ).addClass( 'ui-margin-top' ).append( $el ); + }, + + /** Set enabled/disabled state */ _enabled: function( enabled ) { if ( enabled ) { this.execute_btn.unwait() } else { this.execute_btn.wait() } if ( enabled ) { this.history_form.portlet.enable() } else { this.history_form.portlet.disable() } _.each( this.forms, function( form ) { if ( enabled ) { form.portlet.enable() } else { form.portlet.disable() } }); }, - /** Handle workflow parameter - */ + /** Handle workflow parameter */ _isWorkflowParameter: function( value ) { if ( String( value ).substring( 0, 1 ) === '$' ) { return Utils.sanitize( value.substring( 2, value.length - 1 ) ) } + }, + + /** Is data input module/step */ + _isDataStep: function( steps ) { + lst = $.isArray( steps ) ? steps : [ steps ] ; + for ( var i = 0; i < lst.length; i++ ) { + var step = lst[ i ]; + if ( !step || !step.step_type || !step.step_type.startsWith( 'data' ) ) { + return false; + } + } + return true; + }, + + /** Templates */ + _templateSuccess: function( response ) { + if ( response && response.length > 0 ) { + var $message = $( '

' ).addClass( 'donemessagelarge' ) + .append( $( '

' ).text( 'Successfully ran workflow \'' + this.model.get( 'name' ) + '\'. The following datasets have been added to the queue:' ) ); + for ( var i in response ) { + var invocation = response[ i ]; + var $invocation = $( '

' ).addClass( 'workflow-invocation-complete' ); + invocation.history && $invocation.append( $( '

' ).text( 'These datasets will appear in a new history: ' ) + .append( $( '' ).addClass( 'new-history-link' ) + .attr( 'data-history-id', invocation.history.id ) + .attr( 'target', '_top' ) + .attr( 'href', '/history/switch_to_history?hist_id=' + invocation.history.id ) + .text( invocation.history.name ) ) ); + _.each( invocation.outputs, function( output ) { + $invocation.append( $( '

' ).addClass( 'messagerow' ).html( '' + output.hid + ': ' + output.name ) ); + }); + $message.append( $invocation ); + } + return $message; + } else { + return this._templateError( response ); + } + }, + + _templateError: function( response ) { + return $( '
' ).addClass( 'errormessagelarge' ) + .append( $( '

' ).text( 'The server could not complete the request. Please contact the Galaxy Team if this error persists.' ) ) + .append( $( '

' ).text( JSON.stringify( response, null, 4 ) ) );
         }
     });
     return {
         View: View
     };
-});
+});
\ No newline at end of file
diff --git a/client/galaxy/scripts/mvc/ui/ui-frames.js b/client/galaxy/scripts/mvc/ui/ui-frames.js
index 2ea869a2291a..280f1479e2ec 100644
--- a/client/galaxy/scripts/mvc/ui/ui-frames.js
+++ b/client/galaxy/scripts/mvc/ui/ui-frames.js
@@ -1,50 +1,91 @@
-/** Scratchbook viewer */
 define([], function() {
+
+/** Frame view */
+var FrameView = Backbone.View.extend({
+    initialize: function( options ) {
+        var self = this;
+        this.model = options && options.model || new Backbone.Model( options );
+        this.setElement( $( '
' ).addClass( 'corner frame' ) ); + this.$el.append( $( '
' ).addClass( 'f-header corner' ) + .append( $( '
' ).addClass( 'f-title' ) ) + .append( $( '
' ).addClass( 'f-icon f-close fa fa-close' ) + .tooltip( { title: 'Close', placement: 'bottom' } ) ) ) + .append( $( '
' ).addClass( 'f-content' ) ) + .append( $( '
' ).addClass( 'f-resize f-icon corner fa fa-expand' ).tooltip( { title: 'Resize' } ) ) + .append( $( '
' ).addClass( 'f-cover' ) ); + this.$header = this.$( '.f-header' ); + this.$title = this.$( '.f-title' ); + this.$content = this.$( '.f-content' ); + this.render(); + this.listenTo( this.model, 'change', this.render, this ); + }, + + render: function() { + var self = this; + var options = this.model.attributes; + this.$title.html( options.title || '' ); + this.$header.find( '.f-icon-left' ).remove(); + _.each( options.menu, function( option ) { + var $option = $( '
' ).addClass( 'f-icon-left' ).addClass( option.icon ); + if ( _.isFunction( option.disabled ) && option.disabled() ) { + $option.attr( 'disabled', true ); + } else { + $option.on( 'click', function() { option.onclick( self ) } ) + .tooltip( { title: option.tooltip, placement: 'bottom' } ); + } + self.$header.append( $option ); + } ); + if ( options.url ) { + this.$content.html( $ ( '
")}),a.show({backdrop:!0})}var s=t,o=function(t){this.$overlay=t.overlay,this.$dialog=t.dialog,this.$header=this.$dialog.find(".modal-header"),this.$body=this.$dialog.find(".modal-body"),this.$footer=this.$dialog.find(".modal-footer"),this.$backdrop=t.backdrop,this.$header.find(".close").on("click",s.proxy(this.hide,this))};s.extend(o.prototype,{setContent:function(t){this.$header.hide(),t.title&&(this.$header.find(".title").html(t.title),this.$header.show()),t.closeButton?(this.$header.find(".close").show(),this.$header.show()):this.$header.find(".close").hide(),this.$footer.hide();var e=this.$footer.find(".buttons").html("");t.buttons&&(s.each(t.buttons,function(t,i){e.append(s(" ").text(t).click(i)).append(" ")}),this.$footer.show());var i=this.$footer.find(".extra_buttons").html("");t.extra_buttons&&(s.each(t.extra_buttons,function(t,e){i.append(s("").text(t).click(e)).append(" ")}),this.$footer.show());var n=t.body;"progress"==n&&(n=s("
")),this.$body.html(n)},show:function(t,e){this.$dialog.is(":visible")||(t.backdrop?this.$backdrop.addClass("in"):this.$backdrop.removeClass("in"),this.$overlay.show(),this.$dialog.show(),this.$overlay.addClass("in"),this.$body.css("min-width",this.$body.width()),this.$body.css("max-height",s(window).height()-this.$footer.outerHeight()-this.$header.outerHeight()-parseInt(this.$dialog.css("padding-top"),10)-parseInt(this.$dialog.css("padding-bottom"),10))),e&&e()},hide:function(){var t=this;t.$dialog.fadeOut(function(){t.$overlay.hide(),t.$backdrop.removeClass("in"),t.$body.children().remove(),t.$body.css("min-width",void 0)})}});var a;return s(function(){a=new o({overlay:s("#top-modal"),dialog:s("#top-modal-dialog"),backdrop:s("#top-modal-backdrop")})}),{Modal:o,hide_modal:e,show_modal:i,show_message:n,show_in_overlay:r}}.apply(e,n),!(void 0!==r&&(t.exports=r))},function(t,e,i){var n,r;(function(s,o,a){n=[i(88),i(11),i(8),i(6)],r=function(t,e,i,n){var r=s.View.extend(n.LoggableMixin).extend({_logNamespace:"layout",el:"body",className:"full-content",_panelIds:["left","center","right"],defaultOptions:{message_box_visible:!1,message_box_content:"",message_box_class:"info",show_inactivity_warning:!1,inactivity_box_content:""},initialize:function(e){this.log(this+".initialize:",e),o.extend(this,o.pick(e,this._panelIds)),this.options=o.defaults(o.omit(e.config,this._panelIds),this.defaultOptions),Galaxy.modal=this.modal=new i.View,this.masthead=new t.View(this.options),this.$el.attr("scroll","no"),this.$el.html(this._template()),this.$el.append(this.masthead.frame.$el),this.$("#masthead").replaceWith(this.masthead.$el),this.$el.append(this.modal.$el),this.$messagebox=this.$("#messagebox"),this.$inactivebox=this.$("#inactivebox")},render:function(){return a(".select2-hidden-accessible").remove(),this.log(this+".render:"),this.masthead.render(),this.renderMessageBox(),this.renderInactivityBox(),this.renderPanels(),this},renderMessageBox:function(){if(this.options.message_box_visible){var t=this.options.message_box_content||"",e=this.options.message_box_class||"info";this.$el.addClass("has-message-box"),this.$messagebox.attr("class","panel-"+e+"-message").html(t).toggle(!!t).show()}else this.$el.removeClass("has-message-box"),this.$messagebox.hide();return this},renderInactivityBox:function(){if(this.options.show_inactivity_warning){var t=this.options.inactivity_box_content||"",e=a("").attr("href",Galaxy.root+"user/resend_verification").text("Resend verification");this.$el.addClass("has-inactivity-box"),this.$inactivebox.html(t+" ").append(e).toggle(!!t).show()}else this.$el.removeClass("has-inactivity-box"),this.$inactivebox.hide();return this},renderPanels:function(){var t=this;return this._panelIds.forEach(function(e){o.has(t,e)&&(t[e].setElement("#"+e),t[e].render())}),this.left||this.center.$el.css("left",0),this.right||this.center.$el.css("right",0),this},_template:function(){return['
','
','
','
','
',this.left?'
':"",this.center?'
':"",this.right?'",'
'].join("")},hideSidePanels:function(){this.left&&this.left.hide(),this.right&&this.right.hide()},toString:function(){return"PageLayoutView"}});return{PageLayoutView:r}}.apply(e,n),!(void 0!==r&&(t.exports=r))}).call(e,i(3),i(2),i(1))},function(t,e,i){(function(t){!function(t,e){var i,n;return n=e.document,i=function(){function i(i){var n;try{n=e.localStorage}catch(r){n=!1}this._options=t.extend({name:"tour",steps:[],container:"body",autoscroll:!0,keyboard:!0,storage:n,debug:!1,backdrop:!1,backdropContainer:"body",backdropPadding:0,redirect:!0,orphan:!1,duration:!1,delay:!1,basePath:"",template:'',afterSetState:function(t,e){},afterGetState:function(t,e){},afterRemoveState:function(t){},onStart:function(t){},onEnd:function(t){},onShow:function(t){},onShown:function(t){},onHide:function(t){},onHidden:function(t){},onNext:function(t){},onPrev:function(t){},onPause:function(t,e){},onResume:function(t,e){},onRedirectError:function(t){}},i),this._force=!1,this._inited=!1,this._current=null,this.backdrop={overlay:null,$element:null,$background:null,backgroundShown:!1,overlayElementShown:!1}}return i.prototype.addSteps=function(t){var e,i,n;for(i=0,n=t.length;n>i;i++)e=t[i],this.addStep(e);return this},i.prototype.addStep=function(t){return this._options.steps.push(t),this},i.prototype.getStep=function(e){return null!=this._options.steps[e]?t.extend({id:"step-"+e,path:"",host:"",placement:"right",title:"",content:"

",next:e===this._options.steps.length-1?-1:e+1,prev:e-1,animation:!0,container:this._options.container,autoscroll:this._options.autoscroll,backdrop:this._options.backdrop,backdropContainer:this._options.backdropContainer,backdropPadding:this._options.backdropPadding,redirect:this._options.redirect,reflexElement:this._options.steps[e].element,orphan:this._options.orphan,duration:this._options.duration,delay:this._options.delay,template:this._options.template,onShow:this._options.onShow,onShown:this._options.onShown,onHide:this._options.onHide,onHidden:this._options.onHidden,onNext:this._options.onNext,onPrev:this._options.onPrev,onPause:this._options.onPause,onResume:this._options.onResume,onRedirectError:this._options.onRedirectError},this._options.steps[e]):void 0},i.prototype.init=function(t){return this._force=t,this.ended()?(this._debug("Tour ended, init prevented."),this):(this.setCurrentStep(),this._initMouseNavigation(),this._initKeyboardNavigation(),this._onResize(function(t){return function(){return t.showStep(t._current)}}(this)),null!==this._current&&this.showStep(this._current),this._inited=!0,this)},i.prototype.start=function(t){var e;return null==t&&(t=!1),this._inited||this.init(t),null===this._current&&(e=this._makePromise(null!=this._options.onStart?this._options.onStart(this):void 0),this._callOnPromiseDone(e,this.showStep,0)),this},i.prototype.next=function(){var t;return t=this.hideStep(this._current),this._callOnPromiseDone(t,this._showNextStep)},i.prototype.prev=function(){var t;return t=this.hideStep(this._current),this._callOnPromiseDone(t,this._showPrevStep)},i.prototype.goTo=function(t){var e;return e=this.hideStep(this._current),this._callOnPromiseDone(e,this.showStep,t)},i.prototype.end=function(){var i,r;return i=function(i){return function(r){return t(n).off("click.tour-"+i._options.name),t(n).off("keyup.tour-"+i._options.name),t(e).off("resize.tour-"+i._options.name),i._setState("end","yes"),i._inited=!1,i._force=!1,i._clearTimer(),null!=i._options.onEnd?i._options.onEnd(i):void 0}}(this),r=this.hideStep(this._current),this._callOnPromiseDone(r,i)},i.prototype.ended=function(){return!this._force&&!!this._getState("end")},i.prototype.restart=function(){return this._removeState("current_step"),this._removeState("end"),this._removeState("redirect_to"),this.start()},i.prototype.pause=function(){var t;return t=this.getStep(this._current),t&&t.duration?(this._paused=!0,this._duration-=(new Date).getTime()-this._start,e.clearTimeout(this._timer),this._debug("Paused/Stopped step "+(this._current+1)+" timer ("+this._duration+" remaining)."),null!=t.onPause?t.onPause(this,this._duration):void 0):this},i.prototype.resume=function(){var t;return t=this.getStep(this._current),t&&t.duration?(this._paused=!1,this._start=(new Date).getTime(),this._duration=this._duration||t.duration,this._timer=e.setTimeout(function(t){return function(){return t._isLast()?t.next():t.end()}}(this),this._duration),this._debug("Started step "+(this._current+1)+" timer with duration "+this._duration),null!=t.onResume&&this._duration!==t.duration?t.onResume(this,this._duration):void 0):this},i.prototype.hideStep=function(e){var i,n,r;return(r=this.getStep(e))?(this._clearTimer(),n=this._makePromise(null!=r.onHide?r.onHide(this,e):void 0),i=function(i){return function(n){var s;return s=t(r.element),s.data("bs.popover")||s.data("popover")||(s=t("body")),s.popover("destroy").removeClass("tour-"+i._options.name+"-element tour-"+i._options.name+"-"+e+"-element"),s.removeData("bs.popover"), -r.reflex&&t(r.reflexElement).removeClass("tour-step-element-reflex").off(""+i._reflexEvent(r.reflex)+".tour-"+i._options.name),r.backdrop&&i._hideBackdrop(),null!=r.onHidden?r.onHidden(i):void 0}}(this),this._callOnPromiseDone(n,i),n):void 0},i.prototype.showStep=function(t){var i,r,s,o;return this.ended()?(this._debug("Tour ended, showStep prevented."),this):(o=this.getStep(t))?(s=t").parent().html()},i.prototype._reflexEvent=function(t){return"[object Boolean]"==={}.toString.call(t)?"click":t},i.prototype._reposition=function(e,i){var r,s,o,a,l,h,u;if(a=e[0].offsetWidth,s=e[0].offsetHeight,u=e.offset(),l=u.left,h=u.top,r=t(n).outerHeight()-u.top-e.outerHeight(),0>r&&(u.top=u.top+r),o=t("html").outerWidth()-u.left-e.outerWidth(),0>o&&(u.left=u.left+o),u.top<0&&(u.top=0),u.left<0&&(u.left=0),e.offset(u),"bottom"===i.placement||"top"===i.placement){if(l!==u.left)return this._replaceArrow(e,2*(u.left-l),a,"left")}else if(h!==u.top)return this._replaceArrow(e,2*(u.top-h),s,"top")},i.prototype._center=function(i){return i.css("top",t(e).outerHeight()/2-i.outerHeight()/2)},i.prototype._replaceArrow=function(t,e,i,n){return t.find(".arrow").css(n,e?50*(1-e/i)+"%":"")},i.prototype._scrollIntoView=function(i,n){var r,s,o,a,l,h;return r=t(i),r.length?(s=t(e),a=r.offset().top,h=s.height(),l=Math.max(0,a-h/2),this._debug("Scroll into view. ScrollTop: "+l+". Element offset: "+a+". Window height: "+h+"."),o=0,t("body, html").stop(!0,!0).animate({scrollTop:Math.ceil(l)},function(t){return function(){return 2===++o?(n(),t._debug("Scroll into view.\nAnimation end element offset: "+r.offset().top+".\nWindow height: "+s.height()+".")):void 0}}(this))):n()},i.prototype._onResize=function(i,n){return t(e).on("resize.tour-"+this._options.name,function(){return clearTimeout(n),n=setTimeout(i,100)})},i.prototype._initMouseNavigation=function(){var e;return e=this,t(n).off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']").on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']",function(t){return function(e){return e.preventDefault(),t.next()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']",function(t){return function(e){return e.preventDefault(),t.prev()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']",function(t){return function(e){return e.preventDefault(),t.end()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']",function(i){var n;return i.preventDefault(),n=t(this),n.text(e._paused?n.data("pause-text"):n.data("resume-text")),e._paused?e.resume():e.pause()})},i.prototype._initKeyboardNavigation=function(){return this._options.keyboard?t(n).on("keyup.tour-"+this._options.name,function(t){return function(e){if(e.which)switch(e.which){case 39:return e.preventDefault(),t._isLast()?t.next():t.end();case 37:if(e.preventDefault(),t._current>0)return t.prev();break;case 27:return e.preventDefault(),t.end()}}}(this)):void 0},i.prototype._makePromise=function(e){return e&&t.isFunction(e.then)?e:null},i.prototype._callOnPromiseDone=function(t,e,i){return t?t.then(function(t){return function(n){return e.call(t,i)}}(this)):e.call(this,i)},i.prototype._showBackdrop=function(e){return this.backdrop.backgroundShown?void 0:(this.backdrop=t("
",{"class":"tour-backdrop"}),this.backdrop.backgroundShown=!0,t(e.backdropContainer).append(this.backdrop))},i.prototype._hideBackdrop=function(){return this._hideOverlayElement(),this._hideBackground()},i.prototype._hideBackground=function(){return this.backdrop?(this.backdrop.remove(),this.backdrop.overlay=null,this.backdrop.backgroundShown=!1):void 0},i.prototype._showOverlayElement=function(e,i){var n,r;return n=t(e.element),!n||0===n.length||this.backdrop.overlayElementShown&&!i?void 0:(this.backdrop.overlayElementShown||(this.backdrop.$element=n.addClass("tour-step-backdrop"),this.backdrop.$background=t("
",{"class":"tour-step-background"}),this.backdrop.$background.appendTo(e.backdropContainer),this.backdrop.overlayElementShown=!0),r={width:n.innerWidth(),height:n.innerHeight(),offset:n.offset()},e.backdropPadding&&(r=this._applyBackdropPadding(e.backdropPadding,r)),this.backdrop.$background.width(r.width).height(r.height).offset(r.offset))},i.prototype._hideOverlayElement=function(){return this.backdrop.overlayElementShown?(this.backdrop.$element.removeClass("tour-step-backdrop"),this.backdrop.$background.remove(),this.backdrop.$element=null,this.backdrop.$background=null,this.backdrop.overlayElementShown=!1):void 0},i.prototype._applyBackdropPadding=function(t,e){return"object"==typeof t?(null==t.top&&(t.top=0),null==t.right&&(t.right=0),null==t.bottom&&(t.bottom=0),null==t.left&&(t.left=0),e.offset.top=e.offset.top-t.top,e.offset.left=e.offset.left-t.left,e.width=e.width+t.left+t.right,e.height=e.height+t.top+t.bottom):(e.offset.top=e.offset.top-t,e.offset.left=e.offset.left-t,e.width=e.width+2*t,e.height=e.height+2*t),e},i.prototype._clearTimer=function(){return e.clearTimeout(this._timer),this._timer=null,this._duration=null},i.prototype._getProtocol=function(t){return t=t.split("://"),t.length>1?t[0]:"http"},i.prototype._getHost=function(t){return t=t.split("//"),t=t.length>1?t[1]:t[0],t.split("/")[0]},i.prototype._getPath=function(t){return t.replace(/\/?$/,"").split("?")[0].split("#")[0]},i.prototype._getQuery=function(t){return this._getParams(t,"?")},i.prototype._getHash=function(t){return this._getParams(t,"#")},i.prototype._getParams=function(t,e){var i,n,r,s,o;if(n=t.split(e),1===n.length)return{};for(n=n[1].split("&"),r={},s=0,o=n.length;o>s;s++)i=n[s],i=i.split("="),r[i[0]]=i[1]||"";return r},i.prototype._equal=function(t,e){var i,n;if("[object Object]"==={}.toString.call(t)&&"[object Object]"==={}.toString.call(e)){for(i in t)if(n=t[i],e[i]!==n)return!1;for(i in e)if(n=e[i],t[i]!==n)return!1;return!0}return t===e},i}(),e.Tour=i}(t,window)}).call(e,i(1))},function(t,e,i){(function(t){/*! jQuery UI - v1.9.1 - 2012-10-29 +function(t){function e(t,e,i,n){var o,r,s,a,l,h,c,p,f=e&&e.ownerDocument,g=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==g&&9!==g&&11!==g)return i;if(!n&&((e?e.ownerDocument||e:F)!==D&&M(e),e=e||D,R)){if(11!==g&&(h=vt.exec(t)))if(o=h[1]){if(9===g){if(!(s=e.getElementById(o)))return i;if(s.id===o)return i.push(s),i}else if(f&&(s=f.getElementById(o))&&I(e,s)&&s.id===o)return i.push(s),i}else{if(h[2])return K.apply(i,e.getElementsByTagName(t)),i;if((o=h[3])&&w.getElementsByClassName&&e.getElementsByClassName)return K.apply(i,e.getElementsByClassName(o)),i}if(w.qsa&&!U[t+" "]&&(!j||!j.test(t))){if(1!==g)f=e,p=t;else if("object"!==e.nodeName.toLowerCase()){for((a=e.getAttribute("id"))?a=a.replace(bt,"\\$&"):e.setAttribute("id",a=$),c=k(t),r=c.length,l=dt.test(a)?"#"+a:"[id='"+a+"']";r--;)c[r]=l+" "+d(c[r]);p=c.join(","),f=yt.test(t)&&u(e.parentNode)||e}if(p)try{return K.apply(i,f.querySelectorAll(p)),i}catch(m){}finally{a===$&&e.removeAttribute("id")}}}return E(t.replace(at,"$1"),e,i,n)}function i(){function t(i,n){return e.push(i+" ")>x.cacheLength&&delete t[e.shift()],t[i+" "]=n}var e=[];return t}function n(t){return t[$]=!0,t}function o(t){var e=D.createElement("div");try{return!!t(e)}catch(i){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function r(t,e){for(var i=t.split("|"),n=i.length;n--;)x.attrHandle[i[n]]=e}function s(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||G)-(~t.sourceIndex||G);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function a(t){return function(e){var i=e.nodeName.toLowerCase();return"input"===i&&e.type===t}}function l(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function h(t){return n(function(e){return e=+e,n(function(i,n){for(var o,r=t([],i.length,e),s=r.length;s--;)i[o=r[s]]&&(i[o]=!(n[o]=i[o]))})})}function u(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function c(){}function d(t){for(var e=0,i=t.length,n="";i>e;e++)n+=t[e].value;return n}function p(t,e,i){var n=e.dir,o=i&&"parentNode"===n,r=W++;return e.first?function(e,i,r){for(;e=e[n];)if(1===e.nodeType||o)return t(e,i,r)}:function(e,i,s){var a,l,h,u=[q,r];if(s){for(;e=e[n];)if((1===e.nodeType||o)&&t(e,i,s))return!0}else for(;e=e[n];)if(1===e.nodeType||o){if(h=e[$]||(e[$]={}),l=h[e.uniqueID]||(h[e.uniqueID]={}),(a=l[n])&&a[0]===q&&a[1]===r)return u[2]=a[2];if(l[n]=u,u[2]=t(e,i,s))return!0}}}function f(t){return t.length>1?function(e,i,n){for(var o=t.length;o--;)if(!t[o](e,i,n))return!1;return!0}:t[0]}function g(t,i,n){for(var o=0,r=i.length;r>o;o++)e(t,i[o],n);return n}function m(t,e,i,n,o){for(var r,s=[],a=0,l=t.length,h=null!=e;l>a;a++)(r=t[a])&&(i&&!i(r,n,o)||(s.push(r),h&&e.push(a)));return s}function v(t,e,i,o,r,s){return o&&!o[$]&&(o=v(o)),r&&!r[$]&&(r=v(r,s)),n(function(n,s,a,l){var h,u,c,d=[],p=[],f=s.length,v=n||g(e||"*",a.nodeType?[a]:a,[]),y=!t||!n&&e?v:m(v,d,t,a,l),b=i?r||(n?t:f||o)?[]:s:y;if(i&&i(y,b,a,l),o)for(h=m(b,p),o(h,[],a,l),u=h.length;u--;)(c=h[u])&&(b[p[u]]=!(y[p[u]]=c));if(n){if(r||t){if(r){for(h=[],u=b.length;u--;)(c=b[u])&&h.push(y[u]=c);r(null,b=[],h,l)}for(u=b.length;u--;)(c=b[u])&&(h=r?tt(n,c):d[u])>-1&&(n[h]=!(s[h]=c))}}else b=m(b===s?b.splice(f,b.length):b),r?r(null,s,b,l):K.apply(s,b)})}function y(t){for(var e,i,n,o=t.length,r=x.relative[t[0].type],s=r||x.relative[" "],a=r?1:0,l=p(function(t){return t===e},s,!0),h=p(function(t){return tt(e,t)>-1},s,!0),u=[function(t,i,n){var o=!r&&(n||i!==A)||((e=i).nodeType?l(t,i,n):h(t,i,n));return e=null,o}];o>a;a++)if(i=x.relative[t[a].type])u=[p(f(u),i)];else{if(i=x.filter[t[a].type].apply(null,t[a].matches),i[$]){for(n=++a;o>n&&!x.relative[t[n].type];n++);return v(a>1&&f(u),a>1&&d(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(at,"$1"),i,n>a&&y(t.slice(a,n)),o>n&&y(t=t.slice(n)),o>n&&d(t))}u.push(i)}return f(u)}function b(t,i){var o=i.length>0,r=t.length>0,s=function(n,s,a,l,h){var u,c,d,p=0,f="0",g=n&&[],v=[],y=A,b=n||r&&x.find.TAG("*",h),_=q+=null==y?1:Math.random()||.1,w=b.length;for(h&&(A=s===D||s||h);f!==w&&null!=(u=b[f]);f++){if(r&&u){for(c=0,s||u.ownerDocument===D||(M(u),a=!R);d=t[c++];)if(d(u,s||D,a)){l.push(u);break}h&&(q=_)}o&&((u=!d&&u)&&p--,n&&g.push(u))}if(p+=f,o&&f!==p){for(c=0;d=i[c++];)d(g,v,s,a);if(n){if(p>0)for(;f--;)g[f]||v[f]||(v[f]=J.call(l));v=m(v)}K.apply(l,v),h&&!n&&v.length>0&&p+i.length>1&&e.uniqueSort(l)}return h&&(q=_,A=y),g};return o?n(s):s}var _,w,x,C,S,k,T,E,A,N,O,M,D,P,R,j,H,L,I,$="sizzle"+1*new Date,F=t.document,q=0,W=0,z=i(),B=i(),U=i(),V=function(t,e){return t===e&&(O=!0),0},G=1<<31,X={}.hasOwnProperty,Y=[],J=Y.pop,Q=Y.push,K=Y.push,Z=Y.slice,tt=function(t,e){for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i;return-1},et="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",it="[\\x20\\t\\r\\n\\f]",nt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ot="\\["+it+"*("+nt+")(?:"+it+"*([*^$|!~]?=)"+it+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+nt+"))|)"+it+"*\\]",rt=":("+nt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ot+")*)|.*)\\)|)",st=new RegExp(it+"+","g"),at=new RegExp("^"+it+"+|((?:^|[^\\\\])(?:\\\\.)*)"+it+"+$","g"),lt=new RegExp("^"+it+"*,"+it+"*"),ht=new RegExp("^"+it+"*([>+~]|"+it+")"+it+"*"),ut=new RegExp("="+it+"*([^\\]'\"]*?)"+it+"*\\]","g"),ct=new RegExp(rt),dt=new RegExp("^"+nt+"$"),pt={ID:new RegExp("^#("+nt+")"),CLASS:new RegExp("^\\.("+nt+")"),TAG:new RegExp("^("+nt+"|[*])"),ATTR:new RegExp("^"+ot),PSEUDO:new RegExp("^"+rt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+it+"*(even|odd|(([+-]|)(\\d*)n|)"+it+"*(?:([+-]|)"+it+"*(\\d+)|))"+it+"*\\)|)","i"),bool:new RegExp("^(?:"+et+")$","i"),needsContext:new RegExp("^"+it+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+it+"*((?:-\\d)?\\d*)"+it+"*\\)|)(?=[^-]|$)","i")},ft=/^(?:input|select|textarea|button)$/i,gt=/^h\d$/i,mt=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,bt=/'|\\/g,_t=new RegExp("\\\\([\\da-f]{1,6}"+it+"?|("+it+")|.)","ig"),wt=function(t,e,i){var n="0x"+e-65536;return n!==n||i?e:0>n?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},xt=function(){M()};try{K.apply(Y=Z.call(F.childNodes),F.childNodes),Y[F.childNodes.length].nodeType}catch(Ct){K={apply:Y.length?function(t,e){Q.apply(t,Z.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}w=e.support={},S=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return e?"HTML"!==e.nodeName:!1},M=e.setDocument=function(t){var e,i,n=t?t.ownerDocument||t:F;return n!==D&&9===n.nodeType&&n.documentElement?(D=n,P=D.documentElement,R=!S(D),(i=D.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",xt,!1):i.attachEvent&&i.attachEvent("onunload",xt)),w.attributes=o(function(t){return t.className="i",!t.getAttribute("className")}),w.getElementsByTagName=o(function(t){return t.appendChild(D.createComment("")),!t.getElementsByTagName("*").length}),w.getElementsByClassName=mt.test(D.getElementsByClassName),w.getById=o(function(t){return P.appendChild(t).id=$,!D.getElementsByName||!D.getElementsByName($).length}),w.getById?(x.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&R){var i=e.getElementById(t);return i?[i]:[]}},x.filter.ID=function(t){var e=t.replace(_t,wt);return function(t){return t.getAttribute("id")===e}}):(delete x.find.ID,x.filter.ID=function(t){var e=t.replace(_t,wt);return function(t){var i="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}}),x.find.TAG=w.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):w.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],o=0,r=e.getElementsByTagName(t);if("*"===t){for(;i=r[o++];)1===i.nodeType&&n.push(i);return n}return r},x.find.CLASS=w.getElementsByClassName&&function(t,e){return"undefined"!=typeof e.getElementsByClassName&&R?e.getElementsByClassName(t):void 0},H=[],j=[],(w.qsa=mt.test(D.querySelectorAll))&&(o(function(t){P.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&j.push("[*^$]="+it+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||j.push("\\["+it+"*(?:value|"+et+")"),t.querySelectorAll("[id~="+$+"-]").length||j.push("~="),t.querySelectorAll(":checked").length||j.push(":checked"),t.querySelectorAll("a#"+$+"+*").length||j.push(".#.+[+~]")}),o(function(t){var e=D.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&j.push("name"+it+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||j.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),j.push(",.*:")})),(w.matchesSelector=mt.test(L=P.matches||P.webkitMatchesSelector||P.mozMatchesSelector||P.oMatchesSelector||P.msMatchesSelector))&&o(function(t){w.disconnectedMatch=L.call(t,"div"),L.call(t,"[s!='']:x"),H.push("!=",rt)}),j=j.length&&new RegExp(j.join("|")),H=H.length&&new RegExp(H.join("|")),e=mt.test(P.compareDocumentPosition),I=e||mt.test(P.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},V=e?function(t,e){if(t===e)return O=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i?i:(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&i||!w.sortDetached&&e.compareDocumentPosition(t)===i?t===D||t.ownerDocument===F&&I(F,t)?-1:e===D||e.ownerDocument===F&&I(F,e)?1:N?tt(N,t)-tt(N,e):0:4&i?-1:1)}:function(t,e){if(t===e)return O=!0,0;var i,n=0,o=t.parentNode,r=e.parentNode,a=[t],l=[e];if(!o||!r)return t===D?-1:e===D?1:o?-1:r?1:N?tt(N,t)-tt(N,e):0;if(o===r)return s(t,e);for(i=t;i=i.parentNode;)a.unshift(i);for(i=e;i=i.parentNode;)l.unshift(i);for(;a[n]===l[n];)n++;return n?s(a[n],l[n]):a[n]===F?-1:l[n]===F?1:0},D):D},e.matches=function(t,i){return e(t,null,null,i)},e.matchesSelector=function(t,i){if((t.ownerDocument||t)!==D&&M(t),i=i.replace(ut,"='$1']"),w.matchesSelector&&R&&!U[i+" "]&&(!H||!H.test(i))&&(!j||!j.test(i)))try{var n=L.call(t,i);if(n||w.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(o){}return e(i,D,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==D&&M(t),I(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==D&&M(t);var i=x.attrHandle[e.toLowerCase()],n=i&&X.call(x.attrHandle,e.toLowerCase())?i(t,e,!R):void 0;return void 0!==n?n:w.attributes||!R?t.getAttribute(e):(n=t.getAttributeNode(e))&&n.specified?n.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,i=[],n=0,o=0;if(O=!w.detectDuplicates,N=!w.sortStable&&t.slice(0),t.sort(V),O){for(;e=t[o++];)e===t[o]&&(n=i.push(o));for(;n--;)t.splice(i[n],1)}return N=null,t},C=e.getText=function(t){var e,i="",n=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=C(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[n++];)i+=C(e);return i},x=e.selectors={cacheLength:50,createPseudo:n,match:pt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(_t,wt),t[3]=(t[3]||t[4]||t[5]||"").replace(_t,wt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return pt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&ct.test(i)&&(e=k(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(_t,wt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=z[t+" "];return e||(e=new RegExp("(^|"+it+")"+t+"("+it+"|$)"))&&z(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,i,n){return function(o){var r=e.attr(o,t);return null==r?"!="===i:i?(r+="","="===i?r===n:"!="===i?r!==n:"^="===i?n&&0===r.indexOf(n):"*="===i?n&&r.indexOf(n)>-1:"$="===i?n&&r.slice(-n.length)===n:"~="===i?(" "+r.replace(st," ")+" ").indexOf(n)>-1:"|="===i?r===n||r.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(t,e,i,n,o){var r="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===o?function(t){return!!t.parentNode}:function(e,i,l){var h,u,c,d,p,f,g=r!==s?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(m){if(r){for(;g;){for(d=e;d=d[g];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?m.firstChild:m.lastChild],s&&y){for(d=m,c=d[$]||(d[$]={}),u=c[d.uniqueID]||(c[d.uniqueID]={}),h=u[t]||[],p=h[0]===q&&h[1],b=p&&h[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(b=p=0)||f.pop();)if(1===d.nodeType&&++b&&d===e){u[t]=[q,p,b];break}}else if(y&&(d=e,c=d[$]||(d[$]={}),u=c[d.uniqueID]||(c[d.uniqueID]={}),h=u[t]||[],p=h[0]===q&&h[1],b=p),b===!1)for(;(d=++p&&d&&d[g]||(b=p=0)||f.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++b||(y&&(c=d[$]||(d[$]={}),u=c[d.uniqueID]||(c[d.uniqueID]={}),u[t]=[q,b]),d!==e)););return b-=o,b===n||b%n===0&&b/n>=0}}},PSEUDO:function(t,i){var o,r=x.pseudos[t]||x.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return r[$]?r(i):r.length>1?(o=[t,t,"",i],x.setFilters.hasOwnProperty(t.toLowerCase())?n(function(t,e){for(var n,o=r(t,i),s=o.length;s--;)n=tt(t,o[s]),t[n]=!(e[n]=o[s])}):function(t){return r(t,0,o)}):r}},pseudos:{not:n(function(t){var e=[],i=[],o=T(t.replace(at,"$1"));return o[$]?n(function(t,e,i,n){for(var r,s=o(t,null,n,[]),a=t.length;a--;)(r=s[a])&&(t[a]=!(e[a]=r))}):function(t,n,r){return e[0]=t,o(e,null,r,i),e[0]=null,!i.pop()}}),has:n(function(t){return function(i){return e(t,i).length>0}}),contains:n(function(t){return t=t.replace(_t,wt),function(e){return(e.textContent||e.innerText||C(e)).indexOf(t)>-1}}),lang:n(function(t){return dt.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(_t,wt).toLowerCase(),function(e){var i;do if(i=R?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return i=i.toLowerCase(),i===t||0===i.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===P},focus:function(t){return t===D.activeElement&&(!D.hasFocus||D.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!x.pseudos.empty(t)},header:function(t){return gt.test(t.nodeName)},input:function(t){return ft.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:h(function(){return[0]}),last:h(function(t,e){return[e-1]}),eq:h(function(t,e,i){return[0>i?i+e:i]}),even:h(function(t,e){for(var i=0;e>i;i+=2)t.push(i);return t}),odd:h(function(t,e){for(var i=1;e>i;i+=2)t.push(i);return t}),lt:h(function(t,e,i){for(var n=0>i?i+e:i;--n>=0;)t.push(n);return t}),gt:h(function(t,e,i){for(var n=0>i?i+e:i;++n2&&"ID"===(s=r[0]).type&&w.getById&&9===e.nodeType&&R&&x.relative[r[1].type]){if(e=(x.find.ID(s.matches[0].replace(_t,wt),e)||[])[0],!e)return i;h&&(e=e.parentNode),t=t.slice(r.shift().value.length)}for(o=pt.needsContext.test(t)?0:r.length;o--&&(s=r[o],!x.relative[a=s.type]);)if((l=x.find[a])&&(n=l(s.matches[0].replace(_t,wt),yt.test(r[0].type)&&u(e.parentNode)||e))){if(r.splice(o,1),t=n.length&&d(r),!t)return K.apply(i,n),i;break}}return(h||T(t,c))(n,e,!R,i,!e||yt.test(t)&&u(e.parentNode)||e),i},w.sortStable=$.split("").sort(V).join("")===$,w.detectDuplicates=!!O,M(),w.sortDetached=o(function(t){return 1&t.compareDocumentPosition(D.createElement("div"))}),o(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||r("type|href|height|width",function(t,e,i){return i?void 0:t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),w.attributes&&o(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||r("value",function(t,e,i){return i||"input"!==t.nodeName.toLowerCase()?void 0:t.defaultValue}),o(function(t){return null==t.getAttribute("disabled")})||r(et,function(t,e,i){var n;return i?void 0:t[e]===!0?e.toLowerCase():(n=t.getAttributeNode(e))&&n.specified?n.value:null}),e}(i);vt.find=xt,vt.expr=xt.selectors,vt.expr[":"]=vt.expr.pseudos,vt.uniqueSort=vt.unique=xt.uniqueSort,vt.text=xt.getText,vt.isXMLDoc=xt.isXML,vt.contains=xt.contains;var Ct=function(t,e,i){for(var n=[],o=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&vt(t).is(i))break;n.push(t)}return n},St=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},kt=vt.expr.match.needsContext,Tt=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Et=/^.[^:#\[\.,]*$/;vt.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?vt.find.matchesSelector(n,t)?[n]:[]:vt.find.matches(t,vt.grep(e,function(t){return 1===t.nodeType}))},vt.fn.extend({find:function(t){var e,i=[],n=this,o=n.length;if("string"!=typeof t)return this.pushStack(vt(t).filter(function(){for(e=0;o>e;e++)if(vt.contains(n[e],this))return!0}));for(e=0;o>e;e++)vt.find(t,n[e],i);return i=this.pushStack(o>1?vt.unique(i):i),i.selector=this.selector?this.selector+" "+t:t,i},filter:function(t){return this.pushStack(a(this,t||[],!1))},not:function(t){return this.pushStack(a(this,t||[],!0))},is:function(t){return!!a(this,"string"==typeof t&&kt.test(t)?vt(t):t||[],!1).length}});var At,Nt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,Ot=vt.fn.init=function(t,e,i){var n,o;if(!t)return this;if(i=i||At,"string"==typeof t){if(n="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:Nt.exec(t),!n||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof vt?e[0]:e,vt.merge(this,vt.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:at,!0)),Tt.test(n[1])&&vt.isPlainObject(e))for(n in e)vt.isFunction(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}if(o=at.getElementById(n[2]),o&&o.parentNode){if(o.id!==n[2])return At.find(t);this.length=1,this[0]=o}return this.context=at,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):vt.isFunction(t)?"undefined"!=typeof i.ready?i.ready(t):t(vt):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),vt.makeArray(t,this))};Ot.prototype=vt.fn,At=vt(at);var Mt=/^(?:parents|prev(?:Until|All))/,Dt={children:!0,contents:!0,next:!0,prev:!0};vt.fn.extend({has:function(t){var e,i=vt(t,this),n=i.length;return this.filter(function(){for(e=0;n>e;e++)if(vt.contains(this,i[e]))return!0})},closest:function(t,e){for(var i,n=0,o=this.length,r=[],s=kt.test(t)||"string"!=typeof t?vt(t,e||this.context):0;o>n;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(s?s.index(i)>-1:1===i.nodeType&&vt.find.matchesSelector(i,t))){r.push(i);break}return this.pushStack(r.length>1?vt.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?vt.inArray(this[0],vt(t)):vt.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(vt.uniqueSort(vt.merge(this.get(),vt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),vt.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return Ct(t,"parentNode")},parentsUntil:function(t,e,i){return Ct(t,"parentNode",i)},next:function(t){return l(t,"nextSibling")},prev:function(t){return l(t,"previousSibling")},nextAll:function(t){return Ct(t,"nextSibling")},prevAll:function(t){return Ct(t,"previousSibling")},nextUntil:function(t,e,i){return Ct(t,"nextSibling",i)},prevUntil:function(t,e,i){return Ct(t,"previousSibling",i)},siblings:function(t){return St((t.parentNode||{}).firstChild,t)},children:function(t){return St(t.firstChild)},contents:function(t){return vt.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:vt.merge([],t.childNodes)}},function(t,e){vt.fn[t]=function(i,n){var o=vt.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(o=vt.filter(n,o)),this.length>1&&(Dt[t]||(o=vt.uniqueSort(o)),Mt.test(t)&&(o=o.reverse())),this.pushStack(o)}});var Pt=/\S+/g;vt.Callbacks=function(t){t="string"==typeof t?h(t):vt.extend({},t);var e,i,n,o,r=[],s=[],a=-1,l=function(){for(o=t.once,n=e=!0;s.length;a=-1)for(i=s.shift();++a-1;)r.splice(i,1),a>=i&&a--}),this},has:function(t){return t?vt.inArray(t,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return o=s=[],r=i="",this},disabled:function(){return!r},lock:function(){return o=!0,i||u.disable(),this},locked:function(){return!!o},fireWith:function(t,i){return o||(i=i||[],i=[t,i.slice?i.slice():i],s.push(i),e||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!n}};return u},vt.extend({Deferred:function(t){var e=[["resolve","done",vt.Callbacks("once memory"),"resolved"],["reject","fail",vt.Callbacks("once memory"),"rejected"],["notify","progress",vt.Callbacks("memory")]],i="pending",n={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var t=arguments;return vt.Deferred(function(i){vt.each(e,function(e,r){var s=vt.isFunction(t[e])&&t[e];o[r[1]](function(){var t=s&&s.apply(this,arguments);t&&vt.isFunction(t.promise)?t.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[r[0]+"With"](this===n?i.promise():this,s?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?vt.extend(t,n):n}},o={};return n.pipe=n.then,vt.each(e,function(t,r){var s=r[2],a=r[3];n[r[1]]=s.add,a&&s.add(function(){i=a},e[1^t][2].disable,e[2][2].lock),o[r[0]]=function(){return o[r[0]+"With"](this===o?n:this,arguments),this},o[r[0]+"With"]=s.fireWith}),n.promise(o),t&&t.call(o,o),o},when:function(t){var e,i,n,o=0,r=lt.call(arguments),s=r.length,a=1!==s||t&&vt.isFunction(t.promise)?s:0,l=1===a?t:vt.Deferred(),h=function(t,i,n){return function(o){i[t]=this,n[t]=arguments.length>1?lt.call(arguments):o,n===e?l.notifyWith(i,n):--a||l.resolveWith(i,n)}};if(s>1)for(e=new Array(s),i=new Array(s),n=new Array(s);s>o;o++)r[o]&&vt.isFunction(r[o].promise)?r[o].promise().progress(h(o,i,e)).done(h(o,n,r)).fail(l.reject):--a;return a||l.resolveWith(n,r),l.promise()}});var Rt;vt.fn.ready=function(t){return vt.ready.promise().done(t),this},vt.extend({isReady:!1,readyWait:1,holdReady:function(t){t?vt.readyWait++:vt.ready(!0)},ready:function(t){(t===!0?--vt.readyWait:vt.isReady)||(vt.isReady=!0,t!==!0&&--vt.readyWait>0||(Rt.resolveWith(at,[vt]),vt.fn.triggerHandler&&(vt(at).triggerHandler("ready"),vt(at).off("ready"))))}}),vt.ready.promise=function(t){if(!Rt)if(Rt=vt.Deferred(),"complete"===at.readyState||"loading"!==at.readyState&&!at.documentElement.doScroll)i.setTimeout(vt.ready);else if(at.addEventListener)at.addEventListener("DOMContentLoaded",c),i.addEventListener("load",c);else{at.attachEvent("onreadystatechange",c),i.attachEvent("onload",c);var e=!1;try{e=null==i.frameElement&&at.documentElement}catch(n){}e&&e.doScroll&&!function o(){if(!vt.isReady){try{e.doScroll("left")}catch(t){return i.setTimeout(o,50)}u(),vt.ready()}}()}return Rt.promise(t)},vt.ready.promise();var jt;for(jt in vt(gt))break;gt.ownFirst="0"===jt,gt.inlineBlockNeedsLayout=!1,vt(function(){var t,e,i,n;i=at.getElementsByTagName("body")[0],i&&i.style&&(e=at.createElement("div"),n=at.createElement("div"),n.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(n).appendChild(e),"undefined"!=typeof e.style.zoom&&(e.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",gt.inlineBlockNeedsLayout=t=3===e.offsetWidth,t&&(i.style.zoom=1)),i.removeChild(n))}),function(){var t=at.createElement("div");gt.deleteExpando=!0;try{delete t.test}catch(e){gt.deleteExpando=!1}t=null}();var Ht=function(t){var e=vt.noData[(t.nodeName+" ").toLowerCase()],i=+t.nodeType||1;return 1!==i&&9!==i?!1:!e||e!==!0&&t.getAttribute("classid")===e},Lt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,It=/([A-Z])/g;vt.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return t=t.nodeType?vt.cache[t[vt.expando]]:t[vt.expando],!!t&&!p(t)},data:function(t,e,i){return f(t,e,i)},removeData:function(t,e){return g(t,e)},_data:function(t,e,i){return f(t,e,i,!0)},_removeData:function(t,e){return g(t,e,!0)}}),vt.fn.extend({data:function(t,e){var i,n,o,r=this[0],s=r&&r.attributes;if(void 0===t){if(this.length&&(o=vt.data(r),1===r.nodeType&&!vt._data(r,"parsedAttrs"))){for(i=s.length;i--;)s[i]&&(n=s[i].name,0===n.indexOf("data-")&&(n=vt.camelCase(n.slice(5)),d(r,n,o[n])));vt._data(r,"parsedAttrs",!0)}return o}return"object"==typeof t?this.each(function(){vt.data(this,t)}):arguments.length>1?this.each(function(){vt.data(this,t,e)}):r?d(r,t,vt.data(r,t)):void 0},removeData:function(t){return this.each(function(){vt.removeData(this,t)})}}),vt.extend({queue:function(t,e,i){var n;return t?(e=(e||"fx")+"queue",n=vt._data(t,e),i&&(!n||vt.isArray(i)?n=vt._data(t,e,vt.makeArray(i)):n.push(i)),n||[]):void 0},dequeue:function(t,e){e=e||"fx";var i=vt.queue(t,e),n=i.length,o=i.shift(),r=vt._queueHooks(t,e),s=function(){vt.dequeue(t,e)};"inprogress"===o&&(o=i.shift(),n--),o&&("fx"===e&&i.unshift("inprogress"),delete r.stop,o.call(t,s,r)),!n&&r&&r.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return vt._data(t,i)||vt._data(t,i,{empty:vt.Callbacks("once memory").add(function(){vt._removeData(t,e+"queue"),vt._removeData(t,i)})})}}),vt.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.lengtha;a++)e(t[a],i,s?n:n.call(t[a],a,e(t[a],i)));return o?t:h?e.call(t):l?e(t[0],i):r},Bt=/^(?:checkbox|radio)$/i,Ut=/<([\w:-]+)/,Vt=/^$|\/(?:java|ecma)script/i,Gt=/^\s+/,Xt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";!function(){var t=at.createElement("div"),e=at.createDocumentFragment(),i=at.createElement("input");t.innerHTML="
a",gt.leadingWhitespace=3===t.firstChild.nodeType,gt.tbody=!t.getElementsByTagName("tbody").length,gt.htmlSerialize=!!t.getElementsByTagName("link").length,gt.html5Clone="<:nav>"!==at.createElement("nav").cloneNode(!0).outerHTML,i.type="checkbox",i.checked=!0,e.appendChild(i),gt.appendChecked=i.checked,t.innerHTML="",gt.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,e.appendChild(t),i=at.createElement("input"),i.setAttribute("type","radio"),i.setAttribute("checked","checked"),i.setAttribute("name","t"),t.appendChild(i),gt.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,gt.noCloneEvent=!!t.addEventListener,t[vt.expando]=1,gt.attributes=!t.getAttribute(vt.expando)}();var Yt={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:gt.htmlSerialize?[0,"",""]:[1,"X
","
"]};Yt.optgroup=Yt.option,Yt.tbody=Yt.tfoot=Yt.colgroup=Yt.caption=Yt.thead,Yt.th=Yt.td;var Jt=/<|&#?\w+;/,Qt=/-1&&(f=p.split("."),p=f.shift(),f.sort()),s=p.indexOf(":")<0&&"on"+p,t=t[vt.expando]?t:new vt.Event(p,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=f.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:vt.makeArray(e,[t]),h=vt.event.special[p]||{},o||!h.trigger||h.trigger.apply(n,e)!==!1)){if(!o&&!h.noBubble&&!vt.isWindow(n)){for(l=h.delegateType||p,ee.test(l+p)||(a=a.parentNode);a;a=a.parentNode)d.push(a),u=a;u===(n.ownerDocument||at)&&d.push(u.defaultView||u.parentWindow||i)}for(c=0;(a=d[c++])&&!t.isPropagationStopped();)t.type=c>1?l:h.bindType||p,r=(vt._data(a,"events")||{})[t.type]&&vt._data(a,"handle"),r&&r.apply(a,e),r=s&&a[s],r&&r.apply&&Ht(a)&&(t.result=r.apply(a,e),t.result===!1&&t.preventDefault());if(t.type=p,!o&&!t.isDefaultPrevented()&&(!h._default||h._default.apply(d.pop(),e)===!1)&&Ht(n)&&s&&n[p]&&!vt.isWindow(n)){u=n[s],u&&(n[s]=null),vt.event.triggered=p;try{n[p]()}catch(g){}vt.event.triggered=void 0,u&&(n[s]=u)}return t.result}},dispatch:function(t){t=vt.event.fix(t);var e,i,n,o,r,s=[],a=lt.call(arguments),l=(vt._data(this,"events")||{})[t.type]||[],h=vt.event.special[t.type]||{};if(a[0]=t,t.delegateTarget=this,!h.preDispatch||h.preDispatch.call(this,t)!==!1){for(s=vt.event.handlers.call(this,t,l),e=0;(o=s[e++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,i=0;(r=o.handlers[i++])&&!t.isImmediatePropagationStopped();)t.rnamespace&&!t.rnamespace.test(r.namespace)||(t.handleObj=r,t.data=r.data,n=((vt.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,a),void 0!==n&&(t.result=n)===!1&&(t.preventDefault(),t.stopPropagation()));return h.postDispatch&&h.postDispatch.call(this,t),t.result}},handlers:function(t,e){var i,n,o,r,s=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==t.type)){for(n=[],i=0;a>i;i++)r=e[i],o=r.selector+" ",void 0===n[o]&&(n[o]=r.needsContext?vt(o,this).index(l)>-1:vt.find(o,this,null,[l]).length),n[o]&&n.push(r);n.length&&s.push({elem:l,handlers:n})}return a]","i"),re=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,se=/\s*$/g,ue=v(at),ce=ue.appendChild(at.createElement("div"));vt.extend({htmlPrefilter:function(t){return t.replace(re,"<$1>")},clone:function(t,e,i){var n,o,r,s,a,l=vt.contains(t.ownerDocument,t);if(gt.html5Clone||vt.isXMLDoc(t)||!oe.test("<"+t.nodeName+">")?r=t.cloneNode(!0):(ce.innerHTML=t.outerHTML,ce.removeChild(r=ce.firstChild)),!(gt.noCloneEvent&>.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||vt.isXMLDoc(t)))for(n=y(r),a=y(t),s=0;null!=(o=a[s]);++s)n[s]&&O(o,n[s]);if(e)if(i)for(a=a||y(t),n=n||y(r),s=0;null!=(o=a[s]);s++)N(o,n[s]);else N(t,r);return n=y(r,"script"),n.length>0&&b(n,!l&&y(t,"script")),n=a=o=null,r},cleanData:function(t,e){for(var i,n,o,r,s=0,a=vt.expando,l=vt.cache,h=gt.attributes,u=vt.event.special;null!=(i=t[s]);s++)if((e||Ht(i))&&(o=i[a],r=o&&l[o])){if(r.events)for(n in r.events)u[n]?vt.event.remove(i,n):vt.removeEvent(i,n,r.handle);l[o]&&(delete l[o],h||"undefined"==typeof i.removeAttribute?i[a]=void 0:i.removeAttribute(a),st.push(o))}}}),vt.fn.extend({domManip:M,detach:function(t){return D(this,t,!0)},remove:function(t){return D(this,t)},text:function(t){return zt(this,function(t){return void 0===t?vt.text(this):this.empty().append((this[0]&&this[0].ownerDocument||at).createTextNode(t))},null,t,arguments.length)},append:function(){return M(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=T(this,t);e.appendChild(t)}})},prepend:function(){return M(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=T(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return M(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return M(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&vt.cleanData(y(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&vt.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null==t?!1:t,e=null==e?t:e,this.map(function(){return vt.clone(this,t,e)})},html:function(t){return zt(this,function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t)return 1===e.nodeType?e.innerHTML.replace(ne,""):void 0;if("string"==typeof t&&!se.test(t)&&(gt.htmlSerialize||!oe.test(t))&&(gt.leadingWhitespace||!Gt.test(t))&&!Yt[(Ut.exec(t)||["",""])[1].toLowerCase()]){t=vt.htmlPrefilter(t);try{for(;n>i;i++)e=this[i]||{},1===e.nodeType&&(vt.cleanData(y(e,!1)),e.innerHTML=t);e=0}catch(o){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return M(this,arguments,function(e){var i=this.parentNode;vt.inArray(this,t)<0&&(vt.cleanData(y(this)),i&&i.replaceChild(e,this))},t)}}),vt.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){vt.fn[t]=function(t){for(var i,n=0,o=[],r=vt(t),s=r.length-1;s>=n;n++)i=n===s?this:this.clone(!0),vt(r[n])[e](i),ut.apply(o,i.get());return this.pushStack(o)}});var de,pe={HTML:"block",BODY:"block"},fe=/^margin/,ge=new RegExp("^("+$t+")(?!px)[a-z%]+$","i"),me=function(t,e,i,n){var o,r,s={};for(r in e)s[r]=t.style[r],t.style[r]=e[r];o=i.apply(t,n||[]);for(r in e)t.style[r]=s[r];return o},ve=at.documentElement;!function(){function t(){var t,u,c=at.documentElement;c.appendChild(l),h.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",e=o=a=!1,n=s=!0,i.getComputedStyle&&(u=i.getComputedStyle(h),e="1%"!==(u||{}).top,a="2px"===(u||{}).marginLeft,o="4px"===(u||{width:"4px"}).width,h.style.marginRight="50%",n="4px"===(u||{marginRight:"4px"}).marginRight,t=h.appendChild(at.createElement("div")),t.style.cssText=h.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",h.style.width="1px",s=!parseFloat((i.getComputedStyle(t)||{}).marginRight),h.removeChild(t)),h.style.display="none",r=0===h.getClientRects().length,r&&(h.style.display="",h.innerHTML="
t
",t=h.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",r=0===t[0].offsetHeight,r&&(t[0].style.display="",t[1].style.display="none",r=0===t[0].offsetHeight)),c.removeChild(l)}var e,n,o,r,s,a,l=at.createElement("div"),h=at.createElement("div");h.style&&(h.style.cssText="float:left;opacity:.5",gt.opacity="0.5"===h.style.opacity,gt.cssFloat=!!h.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",gt.clearCloneStyle="content-box"===h.style.backgroundClip,l=at.createElement("div"),l.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",h.innerHTML="",l.appendChild(h),gt.boxSizing=""===h.style.boxSizing||""===h.style.MozBoxSizing||""===h.style.WebkitBoxSizing,vt.extend(gt,{reliableHiddenOffsets:function(){return null==e&&t(),r},boxSizingReliable:function(){return null==e&&t(),o},pixelMarginRight:function(){return null==e&&t(),n},pixelPosition:function(){return null==e&&t(),e},reliableMarginRight:function(){return null==e&&t(),s},reliableMarginLeft:function(){return null==e&&t(),a}}))}();var ye,be,_e=/^(top|right|bottom|left)$/;i.getComputedStyle?(ye=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=i),e.getComputedStyle(t)},be=function(t,e,i){var n,o,r,s,a=t.style;return i=i||ye(t),s=i?i.getPropertyValue(e)||i[e]:void 0,""!==s&&void 0!==s||vt.contains(t.ownerDocument,t)||(s=vt.style(t,e)),i&&!gt.pixelMarginRight()&&ge.test(s)&&fe.test(e)&&(n=a.width,o=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=i.width,a.width=n,a.minWidth=o,a.maxWidth=r),void 0===s?s:s+""}):ve.currentStyle&&(ye=function(t){return t.currentStyle},be=function(t,e,i){var n,o,r,s,a=t.style;return i=i||ye(t),s=i?i[e]:void 0,null==s&&a&&a[e]&&(s=a[e]),ge.test(s)&&!_e.test(e)&&(n=a.left,o=t.runtimeStyle,r=o&&o.left,r&&(o.left=t.currentStyle.left),a.left="fontSize"===e?"1em":s,s=a.pixelLeft+"px",a.left=n,r&&(o.left=r)),void 0===s?s:s+""||"auto"});var we=/alpha\([^)]*\)/i,xe=/opacity\s*=\s*([^)]*)/i,Ce=/^(none|table(?!-c[ea]).+)/,Se=new RegExp("^("+$t+")(.*)$","i"),ke={position:"absolute",visibility:"hidden",display:"block"},Te={letterSpacing:"0",fontWeight:"400"},Ee=["Webkit","O","Moz","ms"],Ae=at.createElement("div").style;vt.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=be(t,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":gt.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,r,s,a=vt.camelCase(e),l=t.style;if(e=vt.cssProps[a]||(vt.cssProps[a]=H(a)||a),s=vt.cssHooks[e]||vt.cssHooks[a],void 0===i)return s&&"get"in s&&void 0!==(o=s.get(t,!1,n))?o:l[e];if(r=typeof i,"string"===r&&(o=Ft.exec(i))&&o[1]&&(i=m(t,e,o),r="number"),null!=i&&i===i&&("number"===r&&(i+=o&&o[3]||(vt.cssNumber[a]?"":"px")),gt.clearCloneStyle||""!==i||0!==e.indexOf("background")||(l[e]="inherit"),!(s&&"set"in s&&void 0===(i=s.set(t,i,n)))))try{l[e]=i}catch(h){}}},css:function(t,e,i,n){var o,r,s,a=vt.camelCase(e);return e=vt.cssProps[a]||(vt.cssProps[a]=H(a)||a),s=vt.cssHooks[e]||vt.cssHooks[a],s&&"get"in s&&(r=s.get(t,!0,i)),void 0===r&&(r=be(t,e,n)),"normal"===r&&e in Te&&(r=Te[e]),""===i||i?(o=parseFloat(r),i===!0||isFinite(o)?o||0:r):r}}),vt.each(["height","width"],function(t,e){vt.cssHooks[e]={get:function(t,i,n){return i?Ce.test(vt.css(t,"display"))&&0===t.offsetWidth?me(t,ke,function(){return F(t,e,n)}):F(t,e,n):void 0},set:function(t,i,n){var o=n&&ye(t);return I(t,i,n?$(t,e,n,gt.boxSizing&&"border-box"===vt.css(t,"boxSizing",!1,o),o):0)}}}),gt.opacity||(vt.cssHooks.opacity={get:function(t,e){return xe.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var i=t.style,n=t.currentStyle,o=vt.isNumeric(e)?"alpha(opacity="+100*e+")":"",r=n&&n.filter||i.filter||"";i.zoom=1,(e>=1||""===e)&&""===vt.trim(r.replace(we,""))&&i.removeAttribute&&(i.removeAttribute("filter"),""===e||n&&!n.filter)||(i.filter=we.test(r)?r.replace(we,o):r+" "+o)}}),vt.cssHooks.marginRight=j(gt.reliableMarginRight,function(t,e){return e?me(t,{display:"inline-block"},be,[t,"marginRight"]):void 0}),vt.cssHooks.marginLeft=j(gt.reliableMarginLeft,function(t,e){return e?(parseFloat(be(t,"marginLeft"))||(vt.contains(t.ownerDocument,t)?t.getBoundingClientRect().left-me(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}):0))+"px":void 0}),vt.each({margin:"",padding:"",border:"Width"},function(t,e){vt.cssHooks[t+e]={expand:function(i){for(var n=0,o={},r="string"==typeof i?i.split(" "):[i];4>n;n++)o[t+qt[n]+e]=r[n]||r[n-2]||r[0];return o}},fe.test(t)||(vt.cssHooks[t+e].set=I)}),vt.fn.extend({css:function(t,e){return zt(this,function(t,e,i){var n,o,r={},s=0;if(vt.isArray(e)){for(n=ye(t),o=e.length;o>s;s++)r[e[s]]=vt.css(t,e[s],!1,n);return r}return void 0!==i?vt.style(t,e,i):vt.css(t,e)},t,e,arguments.length>1)},show:function(){return L(this,!0)},hide:function(){return L(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Wt(this)?vt(this).show():vt(this).hide()})}}),vt.Tween=q,q.prototype={constructor:q,init:function(t,e,i,n,o,r){this.elem=t,this.prop=i,this.easing=o||vt.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=r||(vt.cssNumber[i]?"":"px")},cur:function(){var t=q.propHooks[this.prop];return t&&t.get?t.get(this):q.propHooks._default.get(this)},run:function(t){var e,i=q.propHooks[this.prop];return this.options.duration?this.pos=e=vt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):q.propHooks._default.set(this),this}},q.prototype.init.prototype=q.prototype,q.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=vt.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){vt.fx.step[t.prop]?vt.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[vt.cssProps[t.prop]]&&!vt.cssHooks[t.prop]?t.elem[t.prop]=t.now:vt.style(t.elem,t.prop,t.now+t.unit)}}},q.propHooks.scrollTop=q.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},vt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},vt.fx=q.prototype.init,vt.fx.step={};var Ne,Oe,Me=/^(?:toggle|show|hide)$/,De=/queueHooks$/;vt.Animation=vt.extend(G,{tweeners:{"*":[function(t,e){var i=this.createTween(t,e);return m(i.elem,t,Ft.exec(e),i),i}]},tweener:function(t,e){vt.isFunction(t)?(e=t,t=["*"]):t=t.match(Pt);for(var i,n=0,o=t.length;o>n;n++)i=t[n],G.tweeners[i]=G.tweeners[i]||[],G.tweeners[i].unshift(e)},prefilters:[U],prefilter:function(t,e){e?G.prefilters.unshift(t):G.prefilters.push(t)}}),vt.speed=function(t,e,i){var n=t&&"object"==typeof t?vt.extend({},t):{complete:i||!i&&e||vt.isFunction(t)&&t,duration:t,easing:i&&e||e&&!vt.isFunction(e)&&e};return n.duration=vt.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in vt.fx.speeds?vt.fx.speeds[n.duration]:vt.fx.speeds._default,null!=n.queue&&n.queue!==!0||(n.queue="fx"),n.old=n.complete,n.complete=function(){vt.isFunction(n.old)&&n.old.call(this),n.queue&&vt.dequeue(this,n.queue)},n},vt.fn.extend({fadeTo:function(t,e,i,n){return this.filter(Wt).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var o=vt.isEmptyObject(t),r=vt.speed(e,i,n),s=function(){var e=G(this,vt.extend({},t),r);(o||vt._data(this,"finish"))&&e.stop(!0)};return s.finish=s,o||r.queue===!1?this.each(s):this.queue(r.queue,s)},stop:function(t,e,i){var n=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,o=null!=t&&t+"queueHooks",r=vt.timers,s=vt._data(this);if(o)s[o]&&s[o].stop&&n(s[o]);else for(o in s)s[o]&&s[o].stop&&De.test(o)&&n(s[o]);for(o=r.length;o--;)r[o].elem!==this||null!=t&&r[o].queue!==t||(r[o].anim.stop(i),e=!1,r.splice(o,1));!e&&i||vt.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,i=vt._data(this),n=i[t+"queue"],o=i[t+"queueHooks"],r=vt.timers,s=n?n.length:0;for(i.finish=!0,vt.queue(this,t,[]),o&&o.stop&&o.stop.call(this,!0),e=r.length;e--;)r[e].elem===this&&r[e].queue===t&&(r[e].anim.stop(!0),r.splice(e,1));for(e=0;s>e;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish})}}),vt.each(["toggle","show","hide"],function(t,e){var i=vt.fn[e];vt.fn[e]=function(t,n,o){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(z(e,!0),t,n,o)}}),vt.each({slideDown:z("show"),slideUp:z("hide"),slideToggle:z("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){vt.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}}),vt.timers=[],vt.fx.tick=function(){var t,e=vt.timers,i=0;for(Ne=vt.now();i
a",t=i.getElementsByTagName("a")[0],e.setAttribute("type","checkbox"),i.appendChild(e),t=i.getElementsByTagName("a")[0],t.style.cssText="top:1px",gt.getSetAttribute="t"!==i.className,gt.style=/top/.test(t.getAttribute("style")),gt.hrefNormalized="/a"===t.getAttribute("href"),gt.checkOn=!!e.value,gt.optSelected=o.selected,gt.enctype=!!at.createElement("form").enctype,n.disabled=!0,gt.optDisabled=!o.disabled,e=at.createElement("input"),e.setAttribute("value",""),gt.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),gt.radioValue="t"===e.value}();var Pe=/\r/g,Re=/[\x20\t\r\n\f]+/g;vt.fn.extend({val:function(t){var e,i,n,o=this[0];{if(arguments.length)return n=vt.isFunction(t),this.each(function(i){var o;1===this.nodeType&&(o=n?t.call(this,i,vt(this).val()):t,null==o?o="":"number"==typeof o?o+="":vt.isArray(o)&&(o=vt.map(o,function(t){return null==t?"":t+""})),e=vt.valHooks[this.type]||vt.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))});if(o)return e=vt.valHooks[o.type]||vt.valHooks[o.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(i=e.get(o,"value"))?i:(i=o.value,"string"==typeof i?i.replace(Pe,""):null==i?"":i)}}}),vt.extend({valHooks:{option:{get:function(t){var e=vt.find.attr(t,"value");return null!=e?e:vt.trim(vt.text(t)).replace(Re," ")}},select:{get:function(t){for(var e,i,n=t.options,o=t.selectedIndex,r="select-one"===t.type||0>o,s=r?null:[],a=r?o+1:n.length,l=0>o?a:r?o:0;a>l;l++)if(i=n[l],(i.selected||l===o)&&(gt.optDisabled?!i.disabled:null===i.getAttribute("disabled"))&&(!i.parentNode.disabled||!vt.nodeName(i.parentNode,"optgroup"))){if(e=vt(i).val(),r)return e;s.push(e)}return s},set:function(t,e){for(var i,n,o=t.options,r=vt.makeArray(e),s=o.length;s--;)if(n=o[s],vt.inArray(vt.valHooks.option.get(n),r)>-1)try{n.selected=i=!0}catch(a){n.scrollHeight}else n.selected=!1;return i||(t.selectedIndex=-1),o}}}}),vt.each(["radio","checkbox"],function(){vt.valHooks[this]={set:function(t,e){return vt.isArray(e)?t.checked=vt.inArray(vt(t).val(),e)>-1:void 0}},gt.checkOn||(vt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var je,He,Le=vt.expr.attrHandle,Ie=/^(?:checked|selected)$/i,$e=gt.getSetAttribute,Fe=gt.input;vt.fn.extend({attr:function(t,e){return zt(this,vt.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){vt.removeAttr(this,t)})}}),vt.extend({attr:function(t,e,i){var n,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return"undefined"==typeof t.getAttribute?vt.prop(t,e,i):(1===r&&vt.isXMLDoc(t)||(e=e.toLowerCase(),o=vt.attrHooks[e]||(vt.expr.match.bool.test(e)?He:je)),void 0!==i?null===i?void vt.removeAttr(t,e):o&&"set"in o&&void 0!==(n=o.set(t,i,e))?n:(t.setAttribute(e,i+""),i):o&&"get"in o&&null!==(n=o.get(t,e))?n:(n=vt.find.attr(t,e),null==n?void 0:n))},attrHooks:{type:{set:function(t,e){if(!gt.radioValue&&"radio"===e&&vt.nodeName(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,n,o=0,r=e&&e.match(Pt);if(r&&1===t.nodeType)for(;i=r[o++];)n=vt.propFix[i]||i,vt.expr.match.bool.test(i)?Fe&&$e||!Ie.test(i)?t[n]=!1:t[vt.camelCase("default-"+i)]=t[n]=!1:vt.attr(t,i,""),t.removeAttribute($e?i:n)}}),He={set:function(t,e,i){return e===!1?vt.removeAttr(t,i):Fe&&$e||!Ie.test(i)?t.setAttribute(!$e&&vt.propFix[i]||i,i):t[vt.camelCase("default-"+i)]=t[i]=!0,i}},vt.each(vt.expr.match.bool.source.match(/\w+/g),function(t,e){var i=Le[e]||vt.find.attr;Fe&&$e||!Ie.test(e)?Le[e]=function(t,e,n){var o,r;return n||(r=Le[e],Le[e]=o,o=null!=i(t,e,n)?e.toLowerCase():null,Le[e]=r),o}:Le[e]=function(t,e,i){return i?void 0:t[vt.camelCase("default-"+e)]?e.toLowerCase():null}}),Fe&&$e||(vt.attrHooks.value={set:function(t,e,i){return vt.nodeName(t,"input")?void(t.defaultValue=e):je&&je.set(t,e,i)}}),$e||(je={set:function(t,e,i){var n=t.getAttributeNode(i);return n||t.setAttributeNode(n=t.ownerDocument.createAttribute(i)),n.value=e+="","value"===i||e===t.getAttribute(i)?e:void 0}},Le.id=Le.name=Le.coords=function(t,e,i){var n;return i?void 0:(n=t.getAttributeNode(e))&&""!==n.value?n.value:null},vt.valHooks.button={get:function(t,e){var i=t.getAttributeNode(e);return i&&i.specified?i.value:void 0},set:je.set},vt.attrHooks.contenteditable={set:function(t,e,i){je.set(t,""===e?!1:e,i)}},vt.each(["width","height"],function(t,e){vt.attrHooks[e]={set:function(t,i){return""===i?(t.setAttribute(e,"auto"),i):void 0}}})),gt.style||(vt.attrHooks.style={get:function(t){return t.style.cssText||void 0},set:function(t,e){return t.style.cssText=e+""}});var qe=/^(?:input|select|textarea|button|object)$/i,We=/^(?:a|area)$/i;vt.fn.extend({prop:function(t,e){return zt(this,vt.prop,t,e,arguments.length>1)},removeProp:function(t){return t=vt.propFix[t]||t,this.each(function(){try{this[t]=void 0,delete this[t]}catch(e){}})}}),vt.extend({prop:function(t,e,i){var n,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&vt.isXMLDoc(t)||(e=vt.propFix[e]||e,o=vt.propHooks[e]),void 0!==i?o&&"set"in o&&void 0!==(n=o.set(t,i,e))?n:t[e]=i:o&&"get"in o&&null!==(n=o.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=vt.find.attr(t,"tabindex");return e?parseInt(e,10):qe.test(t.nodeName)||We.test(t.nodeName)&&t.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),gt.hrefNormalized||vt.each(["href","src"],function(t,e){vt.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),gt.optSelected||(vt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),vt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){vt.propFix[this.toLowerCase()]=this}),gt.enctype||(vt.propFix.enctype="encoding");var ze=/[\t\r\n\f]/g;vt.fn.extend({addClass:function(t){var e,i,n,o,r,s,a,l=0;if(vt.isFunction(t))return this.each(function(e){vt(this).addClass(t.call(this,e,X(this)))});if("string"==typeof t&&t)for(e=t.match(Pt)||[];i=this[l++];)if(o=X(i),n=1===i.nodeType&&(" "+o+" ").replace(ze," ")){for(s=0;r=e[s++];)n.indexOf(" "+r+" ")<0&&(n+=r+" ");a=vt.trim(n),o!==a&&vt.attr(i,"class",a)}return this},removeClass:function(t){var e,i,n,o,r,s,a,l=0;if(vt.isFunction(t))return this.each(function(e){vt(this).removeClass(t.call(this,e,X(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(Pt)||[];i=this[l++];)if(o=X(i),n=1===i.nodeType&&(" "+o+" ").replace(ze," ")){for(s=0;r=e[s++];)for(;n.indexOf(" "+r+" ")>-1;)n=n.replace(" "+r+" "," ");a=vt.trim(n),o!==a&&vt.attr(i,"class",a)}return this},toggleClass:function(t,e){var i=typeof t;return"boolean"==typeof e&&"string"===i?e?this.addClass(t):this.removeClass(t):vt.isFunction(t)?this.each(function(i){vt(this).toggleClass(t.call(this,i,X(this),e),e)}):this.each(function(){var e,n,o,r;if("string"===i)for(n=0,o=vt(this),r=t.match(Pt)||[];e=r[n++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==i||(e=X(this), +e&&vt._data(this,"__className__",e),vt.attr(this,"class",e||t===!1?"":vt._data(this,"__className__")||""))})},hasClass:function(t){var e,i,n=0;for(e=" "+t+" ";i=this[n++];)if(1===i.nodeType&&(" "+X(i)+" ").replace(ze," ").indexOf(e)>-1)return!0;return!1}}),vt.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){vt.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}),vt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}});var Be=i.location,Ue=vt.now(),Ve=/\?/,Ge=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;vt.parseJSON=function(t){if(i.JSON&&i.JSON.parse)return i.JSON.parse(t+"");var e,n=null,o=vt.trim(t+"");return o&&!vt.trim(o.replace(Ge,function(t,i,o,r){return e&&i&&(n=0),0===n?t:(e=o||i,n+=!r-!o,"")}))?Function("return "+o)():vt.error("Invalid JSON: "+t)},vt.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{i.DOMParser?(n=new i.DOMParser,e=n.parseFromString(t,"text/xml")):(e=new i.ActiveXObject("Microsoft.XMLDOM"),e.async="false",e.loadXML(t))}catch(o){e=void 0}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length||vt.error("Invalid XML: "+t),e};var Xe=/#.*$/,Ye=/([?&])_=[^&]*/,Je=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Qe=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ke=/^(?:GET|HEAD)$/,Ze=/^\/\//,ti=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,ei={},ii={},ni="*/".concat("*"),oi=Be.href,ri=ti.exec(oi.toLowerCase())||[];vt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:oi,type:"GET",isLocal:Qe.test(ri[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ni,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":vt.parseJSON,"text xml":vt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Q(Q(t,vt.ajaxSettings),e):Q(vt.ajaxSettings,t)},ajaxPrefilter:Y(ei),ajaxTransport:Y(ii),ajax:function(t,e){function n(t,e,n,o){var r,c,y,b,w,C=e;2!==_&&(_=2,l&&i.clearTimeout(l),u=void 0,a=o||"",x.readyState=t>0?4:0,r=t>=200&&300>t||304===t,n&&(b=K(d,x,n)),b=Z(d,b,x,r),r?(d.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(vt.lastModified[s]=w),w=x.getResponseHeader("etag"),w&&(vt.etag[s]=w)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=b.state,c=b.data,y=b.error,r=!y)):(y=C,!t&&C||(C="error",0>t&&(t=0))),x.status=t,x.statusText=(e||C)+"",r?g.resolveWith(p,[c,C,x]):g.rejectWith(p,[x,C,y]),x.statusCode(v),v=void 0,h&&f.trigger(r?"ajaxSuccess":"ajaxError",[x,d,r?c:y]),m.fireWith(p,[x,C]),h&&(f.trigger("ajaxComplete",[x,d]),--vt.active||vt.event.trigger("ajaxStop")))}"object"==typeof t&&(e=t,t=void 0),e=e||{};var o,r,s,a,l,h,u,c,d=vt.ajaxSetup({},e),p=d.context||d,f=d.context&&(p.nodeType||p.jquery)?vt(p):vt.event,g=vt.Deferred(),m=vt.Callbacks("once memory"),v=d.statusCode||{},y={},b={},_=0,w="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(2===_){if(!c)for(c={};e=Je.exec(a);)c[e[1].toLowerCase()]=e[2];e=c[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===_?a:null},setRequestHeader:function(t,e){var i=t.toLowerCase();return _||(t=b[i]=b[i]||t,y[t]=e),this},overrideMimeType:function(t){return _||(d.mimeType=t),this},statusCode:function(t){var e;if(t)if(2>_)for(e in t)v[e]=[v[e],t[e]];else x.always(t[x.status]);return this},abort:function(t){var e=t||w;return u&&u.abort(e),n(0,e),this}};if(g.promise(x).complete=m.add,x.success=x.done,x.error=x.fail,d.url=((t||d.url||oi)+"").replace(Xe,"").replace(Ze,ri[1]+"//"),d.type=e.method||e.type||d.method||d.type,d.dataTypes=vt.trim(d.dataType||"*").toLowerCase().match(Pt)||[""],null==d.crossDomain&&(o=ti.exec(d.url.toLowerCase()),d.crossDomain=!(!o||o[1]===ri[1]&&o[2]===ri[2]&&(o[3]||("http:"===o[1]?"80":"443"))===(ri[3]||("http:"===ri[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=vt.param(d.data,d.traditional)),J(ei,d,e,x),2===_)return x;h=vt.event&&d.global,h&&0===vt.active++&&vt.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Ke.test(d.type),s=d.url,d.hasContent||(d.data&&(s=d.url+=(Ve.test(s)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Ye.test(s)?s.replace(Ye,"$1_="+Ue++):s+(Ve.test(s)?"&":"?")+"_="+Ue++)),d.ifModified&&(vt.lastModified[s]&&x.setRequestHeader("If-Modified-Since",vt.lastModified[s]),vt.etag[s]&&x.setRequestHeader("If-None-Match",vt.etag[s])),(d.data&&d.hasContent&&d.contentType!==!1||e.contentType)&&x.setRequestHeader("Content-Type",d.contentType),x.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+ni+"; q=0.01":""):d.accepts["*"]);for(r in d.headers)x.setRequestHeader(r,d.headers[r]);if(d.beforeSend&&(d.beforeSend.call(p,x,d)===!1||2===_))return x.abort();w="abort";for(r in{success:1,error:1,complete:1})x[r](d[r]);if(u=J(ii,d,e,x)){if(x.readyState=1,h&&f.trigger("ajaxSend",[x,d]),2===_)return x;d.async&&d.timeout>0&&(l=i.setTimeout(function(){x.abort("timeout")},d.timeout));try{_=1,u.send(y,n)}catch(C){if(!(2>_))throw C;n(-1,C)}}else n(-1,"No Transport");return x},getJSON:function(t,e,i){return vt.get(t,e,i,"json")},getScript:function(t,e){return vt.get(t,void 0,e,"script")}}),vt.each(["get","post"],function(t,e){vt[e]=function(t,i,n,o){return vt.isFunction(i)&&(o=o||n,n=i,i=void 0),vt.ajax(vt.extend({url:t,type:e,dataType:o,data:i,success:n},vt.isPlainObject(t)&&t))}}),vt._evalUrl=function(t){return vt.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},vt.fn.extend({wrapAll:function(t){if(vt.isFunction(t))return this.each(function(e){vt(this).wrapAll(t.call(this,e))});if(this[0]){var e=vt(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t}).append(this)}return this},wrapInner:function(t){return vt.isFunction(t)?this.each(function(e){vt(this).wrapInner(t.call(this,e))}):this.each(function(){var e=vt(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=vt.isFunction(t);return this.each(function(i){vt(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(){return this.parent().each(function(){vt.nodeName(this,"body")||vt(this).replaceWith(this.childNodes)}).end()}}),vt.expr.filters.hidden=function(t){return gt.reliableHiddenOffsets()?t.offsetWidth<=0&&t.offsetHeight<=0&&!t.getClientRects().length:et(t)},vt.expr.filters.visible=function(t){return!vt.expr.filters.hidden(t)};var si=/%20/g,ai=/\[\]$/,li=/\r?\n/g,hi=/^(?:submit|button|image|reset|file)$/i,ui=/^(?:input|select|textarea|keygen)/i;vt.param=function(t,e){var i,n=[],o=function(t,e){e=vt.isFunction(e)?e():null==e?"":e,n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=vt.ajaxSettings&&vt.ajaxSettings.traditional),vt.isArray(t)||t.jquery&&!vt.isPlainObject(t))vt.each(t,function(){o(this.name,this.value)});else for(i in t)it(i,t[i],e,o);return n.join("&").replace(si,"+")},vt.fn.extend({serialize:function(){return vt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=vt.prop(this,"elements");return t?vt.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!vt(this).is(":disabled")&&ui.test(this.nodeName)&&!hi.test(t)&&(this.checked||!Bt.test(t))}).map(function(t,e){var i=vt(this).val();return null==i?null:vt.isArray(i)?vt.map(i,function(t){return{name:e.name,value:t.replace(li,"\r\n")}}):{name:e.name,value:i.replace(li,"\r\n")}}).get()}}),vt.ajaxSettings.xhr=void 0!==i.ActiveXObject?function(){return this.isLocal?ot():at.documentMode>8?nt():/^(get|post|head|put|delete|options)$/i.test(this.type)&&nt()||ot()}:nt;var ci=0,di={},pi=vt.ajaxSettings.xhr();i.attachEvent&&i.attachEvent("onunload",function(){for(var t in di)di[t](void 0,!0)}),gt.cors=!!pi&&"withCredentials"in pi,pi=gt.ajax=!!pi,pi&&vt.ajaxTransport(function(t){if(!t.crossDomain||gt.cors){var e;return{send:function(n,o){var r,s=t.xhr(),a=++ci;if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(r in t.xhrFields)s[r]=t.xhrFields[r];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(r in n)void 0!==n[r]&&s.setRequestHeader(r,n[r]+"");s.send(t.hasContent&&t.data||null),e=function(i,n){var r,l,h;if(e&&(n||4===s.readyState))if(delete di[a],e=void 0,s.onreadystatechange=vt.noop,n)4!==s.readyState&&s.abort();else{h={},r=s.status,"string"==typeof s.responseText&&(h.text=s.responseText);try{l=s.statusText}catch(u){l=""}r||!t.isLocal||t.crossDomain?1223===r&&(r=204):r=h.text?200:404}h&&o(r,l,h,s.getAllResponseHeaders())},t.async?4===s.readyState?i.setTimeout(e):s.onreadystatechange=di[a]=e:e()},abort:function(){e&&e(void 0,!0)}}}}),vt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return vt.globalEval(t),t}}}),vt.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),vt.ajaxTransport("script",function(t){if(t.crossDomain){var e,i=at.head||vt("head")[0]||at.documentElement;return{send:function(n,o){e=at.createElement("script"),e.async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,i){(i||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,i||o(200,"success"))},i.insertBefore(e,i.firstChild)},abort:function(){e&&e.onload(void 0,!0)}}}});var fi=[],gi=/(=)\?(?=&|$)|\?\?/;vt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=fi.pop()||vt.expando+"_"+Ue++;return this[t]=!0,t}}),vt.ajaxPrefilter("json jsonp",function(t,e,n){var o,r,s,a=t.jsonp!==!1&&(gi.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&gi.test(t.data)&&"data");return a||"jsonp"===t.dataTypes[0]?(o=t.jsonpCallback=vt.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(gi,"$1"+o):t.jsonp!==!1&&(t.url+=(Ve.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return s||vt.error(o+" was not called"),s[0]},t.dataTypes[0]="json",r=i[o],i[o]=function(){s=arguments},n.always(function(){void 0===r?vt(i).removeProp(o):i[o]=r,t[o]&&(t.jsonpCallback=e.jsonpCallback,fi.push(o)),s&&vt.isFunction(r)&&r(s[0]),s=r=void 0}),"script"):void 0}),vt.parseHTML=function(t,e,i){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(i=e,e=!1),e=e||at;var n=Tt.exec(t),o=!i&&[];return n?[e.createElement(n[1])]:(n=w([t],e,o),o&&o.length&&vt(o).remove(),vt.merge([],n.childNodes))};var mi=vt.fn.load;vt.fn.load=function(t,e,i){if("string"!=typeof t&&mi)return mi.apply(this,arguments);var n,o,r,s=this,a=t.indexOf(" ");return a>-1&&(n=vt.trim(t.slice(a,t.length)),t=t.slice(0,a)),vt.isFunction(e)?(i=e,e=void 0):e&&"object"==typeof e&&(o="POST"),s.length>0&&vt.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done(function(t){r=arguments,s.html(n?vt("
").append(vt.parseHTML(t)).find(n):t)}).always(i&&function(t,e){s.each(function(){i.apply(this,r||[t.responseText,e,t])})}),this},vt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){vt.fn[e]=function(t){return this.on(e,t)}}),vt.expr.filters.animated=function(t){return vt.grep(vt.timers,function(e){return t===e.elem}).length},vt.offset={setOffset:function(t,e,i){var n,o,r,s,a,l,h,u=vt.css(t,"position"),c=vt(t),d={};"static"===u&&(t.style.position="relative"),a=c.offset(),r=vt.css(t,"top"),l=vt.css(t,"left"),h=("absolute"===u||"fixed"===u)&&vt.inArray("auto",[r,l])>-1,h?(n=c.position(),s=n.top,o=n.left):(s=parseFloat(r)||0,o=parseFloat(l)||0),vt.isFunction(e)&&(e=e.call(t,i,vt.extend({},a))),null!=e.top&&(d.top=e.top-a.top+s),null!=e.left&&(d.left=e.left-a.left+o),"using"in e?e.using.call(t,d):c.css(d)}},vt.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){vt.offset.setOffset(this,t,e)});var e,i,n={top:0,left:0},o=this[0],r=o&&o.ownerDocument;if(r)return e=r.documentElement,vt.contains(e,o)?("undefined"!=typeof o.getBoundingClientRect&&(n=o.getBoundingClientRect()),i=rt(r),{top:n.top+(i.pageYOffset||e.scrollTop)-(e.clientTop||0),left:n.left+(i.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):n},position:function(){if(this[0]){var t,e,i={top:0,left:0},n=this[0];return"fixed"===vt.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),vt.nodeName(t[0],"html")||(i=t.offset()),i.top+=vt.css(t[0],"borderTopWidth",!0),i.left+=vt.css(t[0],"borderLeftWidth",!0)),{top:e.top-i.top-vt.css(n,"marginTop",!0),left:e.left-i.left-vt.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&!vt.nodeName(t,"html")&&"static"===vt.css(t,"position");)t=t.offsetParent;return t||ve})}}),vt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var i=/Y/.test(e);vt.fn[t]=function(n){return zt(this,function(t,n,o){var r=rt(t);return void 0===o?r?e in r?r[e]:r.document.documentElement[n]:t[n]:void(r?r.scrollTo(i?vt(r).scrollLeft():o,i?o:vt(r).scrollTop()):t[n]=o)},t,n,arguments.length,null)}}),vt.each(["top","left"],function(t,e){vt.cssHooks[e]=j(gt.pixelPosition,function(t,i){return i?(i=be(t,e),ge.test(i)?vt(t).position()[e]+"px":i):void 0})}),vt.each({Height:"height",Width:"width"},function(t,e){vt.each({padding:"inner"+t,content:e,"":"outer"+t},function(i,n){vt.fn[n]=function(n,o){var r=arguments.length&&(i||"boolean"!=typeof n),s=i||(n===!0||o===!0?"margin":"border");return zt(this,function(e,i,n){var o;return vt.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===n?vt.css(e,i,s):vt.style(e,i,n,s)},e,r?n:void 0,r,null)}})}),vt.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)}}),vt.fn.size=function(){return this.length},vt.fn.andSelf=vt.fn.addBack,n=[],o=function(){return vt}.apply(e,n),!(void 0!==o&&(t.exports=o));var vi=i.jQuery,yi=i.$;return vt.noConflict=function(t){return i.$===vt&&(i.$=yi),t&&i.jQuery===vt&&(i.jQuery=vi),vt},r||(i.jQuery=i.$=vt),vt})},function(t,e,i){var n,o;(function(){function i(t){function e(e,i,n,o,r,s){for(;r>=0&&s>r;r+=t){var a=o?o[r]:r;n=i(n,e[a],a,e)}return n}return function(i,n,o,r){n=C(n,r,4);var s=!O(i)&&x.keys(i),a=(s||i).length,l=t>0?0:a-1;return arguments.length<3&&(o=i[s?s[l]:l],l+=t),e(i,n,o,s,l,a)}}function r(t){return function(e,i,n){i=S(i,n);for(var o=N(e),r=t>0?0:o-1;r>=0&&o>r;r+=t)if(i(e[r],r,e))return r;return-1}}function s(t,e,i){return function(n,o,r){var s=0,a=N(n);if("number"==typeof r)t>0?s=r>=0?r:Math.max(r+a,s):a=r>=0?Math.min(r+1,a):r+a+1;else if(i&&r&&a)return r=i(n,o),n[r]===o?r:-1;if(o!==o)return r=e(f.call(n,s,a),x.isNaN),r>=0?r+s:-1;for(r=t>0?s:a-1;r>=0&&a>r;r+=t)if(n[r]===o)return r;return-1}}function a(t,e){var i=j.length,n=t.constructor,o=x.isFunction(n)&&n.prototype||c,r="constructor";for(x.has(t,r)&&!x.contains(e,r)&&e.push(r);i--;)r=j[i],r in t&&t[r]!==o[r]&&!x.contains(e,r)&&e.push(r)}var l=this,h=l._,u=Array.prototype,c=Object.prototype,d=Function.prototype,p=u.push,f=u.slice,g=c.toString,m=c.hasOwnProperty,v=Array.isArray,y=Object.keys,b=d.bind,_=Object.create,w=function(){},x=function(t){return t instanceof x?t:this instanceof x?void(this._wrapped=t):new x(t)};"undefined"!=typeof t&&t.exports&&(e=t.exports=x),e._=x,x.VERSION="1.8.3";var C=function(t,e,i){if(void 0===e)return t;switch(null==i?3:i){case 1:return function(i){return t.call(e,i)};case 2:return function(i,n){return t.call(e,i,n)};case 3:return function(i,n,o){return t.call(e,i,n,o)};case 4:return function(i,n,o,r){return t.call(e,i,n,o,r)}}return function(){return t.apply(e,arguments)}},S=function(t,e,i){return null==t?x.identity:x.isFunction(t)?C(t,e,i):x.isObject(t)?x.matcher(t):x.property(t)};x.iteratee=function(t,e){return S(t,e,1/0)};var k=function(t,e){return function(i){var n=arguments.length;if(2>n||null==i)return i;for(var o=1;n>o;o++)for(var r=arguments[o],s=t(r),a=s.length,l=0;a>l;l++){var h=s[l];e&&void 0!==i[h]||(i[h]=r[h])}return i}},T=function(t){if(!x.isObject(t))return{};if(_)return _(t);w.prototype=t;var e=new w;return w.prototype=null,e},E=function(t){return function(e){return null==e?void 0:e[t]}},A=Math.pow(2,53)-1,N=E("length"),O=function(t){var e=N(t);return"number"==typeof e&&e>=0&&A>=e};x.each=x.forEach=function(t,e,i){e=C(e,i);var n,o;if(O(t))for(n=0,o=t.length;o>n;n++)e(t[n],n,t);else{var r=x.keys(t);for(n=0,o=r.length;o>n;n++)e(t[r[n]],r[n],t)}return t},x.map=x.collect=function(t,e,i){e=S(e,i);for(var n=!O(t)&&x.keys(t),o=(n||t).length,r=Array(o),s=0;o>s;s++){var a=n?n[s]:s;r[s]=e(t[a],a,t)}return r},x.reduce=x.foldl=x.inject=i(1),x.reduceRight=x.foldr=i(-1),x.find=x.detect=function(t,e,i){var n;return n=O(t)?x.findIndex(t,e,i):x.findKey(t,e,i),void 0!==n&&-1!==n?t[n]:void 0},x.filter=x.select=function(t,e,i){var n=[];return e=S(e,i),x.each(t,function(t,i,o){e(t,i,o)&&n.push(t)}),n},x.reject=function(t,e,i){return x.filter(t,x.negate(S(e)),i)},x.every=x.all=function(t,e,i){e=S(e,i);for(var n=!O(t)&&x.keys(t),o=(n||t).length,r=0;o>r;r++){var s=n?n[r]:r;if(!e(t[s],s,t))return!1}return!0},x.some=x.any=function(t,e,i){e=S(e,i);for(var n=!O(t)&&x.keys(t),o=(n||t).length,r=0;o>r;r++){var s=n?n[r]:r;if(e(t[s],s,t))return!0}return!1},x.contains=x.includes=x.include=function(t,e,i,n){return O(t)||(t=x.values(t)),("number"!=typeof i||n)&&(i=0),x.indexOf(t,e,i)>=0},x.invoke=function(t,e){var i=f.call(arguments,2),n=x.isFunction(e);return x.map(t,function(t){var o=n?e:t[e];return null==o?o:o.apply(t,i)})},x.pluck=function(t,e){return x.map(t,x.property(e))},x.where=function(t,e){return x.filter(t,x.matcher(e))},x.findWhere=function(t,e){return x.find(t,x.matcher(e))},x.max=function(t,e,i){var n,o,r=-(1/0),s=-(1/0);if(null==e&&null!=t){t=O(t)?t:x.values(t);for(var a=0,l=t.length;l>a;a++)n=t[a],n>r&&(r=n)}else e=S(e,i),x.each(t,function(t,i,n){o=e(t,i,n),(o>s||o===-(1/0)&&r===-(1/0))&&(r=t,s=o)});return r},x.min=function(t,e,i){var n,o,r=1/0,s=1/0;if(null==e&&null!=t){t=O(t)?t:x.values(t);for(var a=0,l=t.length;l>a;a++)n=t[a],r>n&&(r=n)}else e=S(e,i),x.each(t,function(t,i,n){o=e(t,i,n),(s>o||o===1/0&&r===1/0)&&(r=t,s=o)});return r},x.shuffle=function(t){for(var e,i=O(t)?t:x.values(t),n=i.length,o=Array(n),r=0;n>r;r++)e=x.random(0,r),e!==r&&(o[r]=o[e]),o[e]=i[r];return o},x.sample=function(t,e,i){return null==e||i?(O(t)||(t=x.values(t)),t[x.random(t.length-1)]):x.shuffle(t).slice(0,Math.max(0,e))},x.sortBy=function(t,e,i){return e=S(e,i),x.pluck(x.map(t,function(t,i,n){return{value:t,index:i,criteria:e(t,i,n)}}).sort(function(t,e){var i=t.criteria,n=e.criteria;if(i!==n){if(i>n||void 0===i)return 1;if(n>i||void 0===n)return-1}return t.index-e.index}),"value")};var M=function(t){return function(e,i,n){var o={};return i=S(i,n),x.each(e,function(n,r){var s=i(n,r,e);t(o,n,s)}),o}};x.groupBy=M(function(t,e,i){x.has(t,i)?t[i].push(e):t[i]=[e]}),x.indexBy=M(function(t,e,i){t[i]=e}),x.countBy=M(function(t,e,i){x.has(t,i)?t[i]++:t[i]=1}),x.toArray=function(t){return t?x.isArray(t)?f.call(t):O(t)?x.map(t,x.identity):x.values(t):[]},x.size=function(t){return null==t?0:O(t)?t.length:x.keys(t).length},x.partition=function(t,e,i){e=S(e,i);var n=[],o=[];return x.each(t,function(t,i,r){(e(t,i,r)?n:o).push(t)}),[n,o]},x.first=x.head=x.take=function(t,e,i){return null!=t?null==e||i?t[0]:x.initial(t,t.length-e):void 0},x.initial=function(t,e,i){return f.call(t,0,Math.max(0,t.length-(null==e||i?1:e)))},x.last=function(t,e,i){return null!=t?null==e||i?t[t.length-1]:x.rest(t,Math.max(0,t.length-e)):void 0},x.rest=x.tail=x.drop=function(t,e,i){return f.call(t,null==e||i?1:e)},x.compact=function(t){return x.filter(t,x.identity)};var D=function(t,e,i,n){for(var o=[],r=0,s=n||0,a=N(t);a>s;s++){var l=t[s];if(O(l)&&(x.isArray(l)||x.isArguments(l))){e||(l=D(l,e,i));var h=0,u=l.length;for(o.length+=u;u>h;)o[r++]=l[h++]}else i||(o[r++]=l)}return o};x.flatten=function(t,e){return D(t,e,!1)},x.without=function(t){return x.difference(t,f.call(arguments,1))},x.uniq=x.unique=function(t,e,i,n){x.isBoolean(e)||(n=i,i=e,e=!1),null!=i&&(i=S(i,n));for(var o=[],r=[],s=0,a=N(t);a>s;s++){var l=t[s],h=i?i(l,s,t):l;e?(s&&r===h||o.push(l),r=h):i?x.contains(r,h)||(r.push(h),o.push(l)):x.contains(o,l)||o.push(l)}return o},x.union=function(){return x.uniq(D(arguments,!0,!0))},x.intersection=function(t){for(var e=[],i=arguments.length,n=0,o=N(t);o>n;n++){var r=t[n];if(!x.contains(e,r)){for(var s=1;i>s&&x.contains(arguments[s],r);s++);s===i&&e.push(r)}}return e},x.difference=function(t){var e=D(arguments,!0,!0,1);return x.filter(t,function(t){return!x.contains(e,t)})},x.zip=function(){return x.unzip(arguments)},x.unzip=function(t){for(var e=t&&x.max(t,N).length||0,i=Array(e),n=0;e>n;n++)i[n]=x.pluck(t,n);return i},x.object=function(t,e){for(var i={},n=0,o=N(t);o>n;n++)e?i[t[n]]=e[n]:i[t[n][0]]=t[n][1];return i},x.findIndex=r(1),x.findLastIndex=r(-1),x.sortedIndex=function(t,e,i,n){i=S(i,n,1);for(var o=i(e),r=0,s=N(t);s>r;){var a=Math.floor((r+s)/2);i(t[a])r;r++,t+=i)o[r]=t;return o};var P=function(t,e,i,n,o){if(!(n instanceof e))return t.apply(i,o);var r=T(t.prototype),s=t.apply(r,o);return x.isObject(s)?s:r};x.bind=function(t,e){if(b&&t.bind===b)return b.apply(t,f.call(arguments,1));if(!x.isFunction(t))throw new TypeError("Bind must be called on a function");var i=f.call(arguments,2),n=function(){return P(t,n,e,this,i.concat(f.call(arguments)))};return n},x.partial=function(t){var e=f.call(arguments,1),i=function(){for(var n=0,o=e.length,r=Array(o),s=0;o>s;s++)r[s]=e[s]===x?arguments[n++]:e[s];for(;n=n)throw new Error("bindAll must be passed function names");for(e=1;n>e;e++)i=arguments[e],t[i]=x.bind(t[i],t);return t},x.memoize=function(t,e){var i=function(n){var o=i.cache,r=""+(e?e.apply(this,arguments):n);return x.has(o,r)||(o[r]=t.apply(this,arguments)),o[r]};return i.cache={},i},x.delay=function(t,e){var i=f.call(arguments,2);return setTimeout(function(){return t.apply(null,i)},e)},x.defer=x.partial(x.delay,x,1),x.throttle=function(t,e,i){var n,o,r,s=null,a=0;i||(i={});var l=function(){a=i.leading===!1?0:x.now(),s=null,r=t.apply(n,o),s||(n=o=null)};return function(){var h=x.now();a||i.leading!==!1||(a=h);var u=e-(h-a);return n=this,o=arguments,0>=u||u>e?(s&&(clearTimeout(s),s=null),a=h,r=t.apply(n,o),s||(n=o=null)):s||i.trailing===!1||(s=setTimeout(l,u)),r}},x.debounce=function(t,e,i){var n,o,r,s,a,l=function(){var h=x.now()-s;e>h&&h>=0?n=setTimeout(l,e-h):(n=null,i||(a=t.apply(r,o),n||(r=o=null)))};return function(){r=this,o=arguments,s=x.now();var h=i&&!n;return n||(n=setTimeout(l,e)),h&&(a=t.apply(r,o),r=o=null),a}},x.wrap=function(t,e){return x.partial(e,t)},x.negate=function(t){return function(){return!t.apply(this,arguments)}},x.compose=function(){var t=arguments,e=t.length-1;return function(){for(var i=e,n=t[e].apply(this,arguments);i--;)n=t[i].call(this,n);return n}},x.after=function(t,e){return function(){return--t<1?e.apply(this,arguments):void 0}},x.before=function(t,e){var i;return function(){return--t>0&&(i=e.apply(this,arguments)),1>=t&&(e=null),i}},x.once=x.partial(x.before,2);var R=!{toString:null}.propertyIsEnumerable("toString"),j=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];x.keys=function(t){if(!x.isObject(t))return[];if(y)return y(t);var e=[];for(var i in t)x.has(t,i)&&e.push(i);return R&&a(t,e),e},x.allKeys=function(t){if(!x.isObject(t))return[];var e=[];for(var i in t)e.push(i);return R&&a(t,e),e},x.values=function(t){for(var e=x.keys(t),i=e.length,n=Array(i),o=0;i>o;o++)n[o]=t[e[o]];return n},x.mapObject=function(t,e,i){e=S(e,i);for(var n,o=x.keys(t),r=o.length,s={},a=0;r>a;a++)n=o[a],s[n]=e(t[n],n,t);return s},x.pairs=function(t){for(var e=x.keys(t),i=e.length,n=Array(i),o=0;i>o;o++)n[o]=[e[o],t[e[o]]];return n},x.invert=function(t){for(var e={},i=x.keys(t),n=0,o=i.length;o>n;n++)e[t[i[n]]]=i[n];return e},x.functions=x.methods=function(t){var e=[];for(var i in t)x.isFunction(t[i])&&e.push(i);return e.sort()},x.extend=k(x.allKeys),x.extendOwn=x.assign=k(x.keys),x.findKey=function(t,e,i){e=S(e,i);for(var n,o=x.keys(t),r=0,s=o.length;s>r;r++)if(n=o[r],e(t[n],n,t))return n},x.pick=function(t,e,i){var n,o,r={},s=t;if(null==s)return r;x.isFunction(e)?(o=x.allKeys(s),n=C(e,i)):(o=D(arguments,!1,!1,1),n=function(t,e,i){return e in i},s=Object(s));for(var a=0,l=o.length;l>a;a++){var h=o[a],u=s[h];n(u,h,s)&&(r[h]=u)}return r},x.omit=function(t,e,i){if(x.isFunction(e))e=x.negate(e);else{var n=x.map(D(arguments,!1,!1,1),String);e=function(t,e){return!x.contains(n,e)}}return x.pick(t,e,i)},x.defaults=k(x.allKeys,!0),x.create=function(t,e){var i=T(t);return e&&x.extendOwn(i,e),i},x.clone=function(t){return x.isObject(t)?x.isArray(t)?t.slice():x.extend({},t):t},x.tap=function(t,e){return e(t),t},x.isMatch=function(t,e){var i=x.keys(e),n=i.length;if(null==t)return!n;for(var o=Object(t),r=0;n>r;r++){var s=i[r];if(e[s]!==o[s]||!(s in o))return!1}return!0};var H=function(t,e,i,n){if(t===e)return 0!==t||1/t===1/e;if(null==t||null==e)return t===e;t instanceof x&&(t=t._wrapped),e instanceof x&&(e=e._wrapped);var o=g.call(t);if(o!==g.call(e))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!==+t?+e!==+e:0===+t?1/+t===1/e:+t===+e;case"[object Date]":case"[object Boolean]":return+t===+e}var r="[object Array]"===o;if(!r){if("object"!=typeof t||"object"!=typeof e)return!1;var s=t.constructor,a=e.constructor;if(s!==a&&!(x.isFunction(s)&&s instanceof s&&x.isFunction(a)&&a instanceof a)&&"constructor"in t&&"constructor"in e)return!1}i=i||[],n=n||[];for(var l=i.length;l--;)if(i[l]===t)return n[l]===e;if(i.push(t),n.push(e),r){if(l=t.length,l!==e.length)return!1;for(;l--;)if(!H(t[l],e[l],i,n))return!1}else{var h,u=x.keys(t);if(l=u.length,x.keys(e).length!==l)return!1;for(;l--;)if(h=u[l],!x.has(e,h)||!H(t[h],e[h],i,n))return!1}return i.pop(),n.pop(),!0};x.isEqual=function(t,e){return H(t,e)},x.isEmpty=function(t){return null==t?!0:O(t)&&(x.isArray(t)||x.isString(t)||x.isArguments(t))?0===t.length:0===x.keys(t).length},x.isElement=function(t){return!(!t||1!==t.nodeType)},x.isArray=v||function(t){return"[object Array]"===g.call(t)},x.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},x.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){x["is"+t]=function(e){return g.call(e)==="[object "+t+"]"}}),x.isArguments(arguments)||(x.isArguments=function(t){return x.has(t,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(x.isFunction=function(t){return"function"==typeof t||!1}),x.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},x.isNaN=function(t){return x.isNumber(t)&&t!==+t},x.isBoolean=function(t){return t===!0||t===!1||"[object Boolean]"===g.call(t)},x.isNull=function(t){return null===t},x.isUndefined=function(t){return void 0===t},x.has=function(t,e){return null!=t&&m.call(t,e)},x.noConflict=function(){return l._=h,this},x.identity=function(t){return t},x.constant=function(t){return function(){return t}},x.noop=function(){},x.property=E,x.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},x.matcher=x.matches=function(t){return t=x.extendOwn({},t),function(e){return x.isMatch(e,t)}},x.times=function(t,e,i){var n=Array(Math.max(0,t));e=C(e,i,1);for(var o=0;t>o;o++)n[o]=e(o);return n},x.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},x.now=Date.now||function(){return(new Date).getTime()};var L={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},I=x.invert(L),$=function(t){var e=function(e){return t[e]},i="(?:"+x.keys(t).join("|")+")",n=RegExp(i),o=RegExp(i,"g");return function(t){return t=null==t?"":""+t,n.test(t)?t.replace(o,e):t}};x.escape=$(L),x.unescape=$(I),x.result=function(t,e,i){var n=null==t?void 0:t[e];return void 0===n&&(n=i),x.isFunction(n)?n.call(t):n};var F=0;x.uniqueId=function(t){var e=++F+"";return t?t+e:e},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,W={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},z=/\\|'|\r|\n|\u2028|\u2029/g,B=function(t){return"\\"+W[t]};x.template=function(t,e,i){!e&&i&&(e=i),e=x.defaults({},e,x.templateSettings);var n=RegExp([(e.escape||q).source,(e.interpolate||q).source,(e.evaluate||q).source].join("|")+"|$","g"),o=0,r="__p+='";t.replace(n,function(e,i,n,s,a){return r+=t.slice(o,a).replace(z,B),o=a+e.length,i?r+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'":n?r+="'+\n((__t=("+n+"))==null?'':__t)+\n'":s&&(r+="';\n"+s+"\n__p+='"),e}),r+="';\n",e.variable||(r="with(obj||{}){\n"+r+"}\n"),r="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+r+"return __p;\n";try{var s=new Function(e.variable||"obj","_",r)}catch(a){throw a.source=r,a}var l=function(t){return s.call(this,t,x)},h=e.variable||"obj";return l.source="function("+h+"){\n"+r+"}",l},x.chain=function(t){var e=x(t);return e._chain=!0,e};var U=function(t,e){return t._chain?x(e).chain():e};x.mixin=function(t){x.each(x.functions(t),function(e){var i=x[e]=t[e];x.prototype[e]=function(){var t=[this._wrapped];return p.apply(t,arguments),U(this,i.apply(x,t))}})},x.mixin(x),x.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=u[t];x.prototype[t]=function(){var i=this._wrapped;return e.apply(i,arguments),"shift"!==t&&"splice"!==t||0!==i.length||delete i[0],U(this,i)}}),x.each(["concat","join","slice"],function(t){var e=u[t];x.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),x.prototype.value=function(){return this._wrapped},x.prototype.valueOf=x.prototype.toJSON=x.prototype.value,x.prototype.toString=function(){return""+this._wrapped},n=[],o=function(){return x}.apply(e,n),!(void 0!==o&&(t.exports=o))}).call(this)},function(t,e,i){var n,o;(function(r){!function(s){var a="object"==typeof self&&self.self===self&&self||"object"==typeof r&&r.global===r&&r;n=[i(2),i(1),e],o=function(t,e,i){a.Backbone=s(a,i,t,e)}.apply(e,n),!(void 0!==o&&(t.exports=o))}(function(t,e,i,n){var o=t.Backbone,r=Array.prototype.slice;e.VERSION="1.3.3",e.$=n,e.noConflict=function(){return t.Backbone=o,this},e.emulateHTTP=!1,e.emulateJSON=!1;var s=function(t,e,n){switch(t){case 1:return function(){return i[e](this[n])};case 2:return function(t){return i[e](this[n],t)};case 3:return function(t,o){return i[e](this[n],l(t,this),o)};case 4:return function(t,o,r){return i[e](this[n],l(t,this),o,r)};default:return function(){var t=r.call(arguments);return t.unshift(this[n]),i[e].apply(i,t); +}}},a=function(t,e,n){i.each(e,function(e,o){i[o]&&(t.prototype[o]=s(e,o,n))})},l=function(t,e){return i.isFunction(t)?t:i.isObject(t)&&!e._isModel(t)?h(t):i.isString(t)?function(e){return e.get(t)}:t},h=function(t){var e=i.matches(t);return function(t){return e(t.attributes)}},u=e.Events={},c=/\s+/,d=function(t,e,n,o,r){var s,a=0;if(n&&"object"==typeof n){void 0!==o&&"context"in r&&void 0===r.context&&(r.context=o);for(s=i.keys(n);an;n++)i[n]=arguments[n+1];return d(v,this._events,t,void 0,i),this};var v=function(t,e,i,n){if(t){var o=t[e],r=t.all;o&&r&&(r=r.slice()),o&&y(o,n),r&&y(r,[e].concat(n))}return t},y=function(t,e){var i,n=-1,o=t.length,r=e[0],s=e[1],a=e[2];switch(e.length){case 0:for(;++nn;n++)t[n+i]=e[n];for(n=0;nthis.length&&(o=this.length),0>o&&(o+=this.length+1);var r,s,a=[],l=[],h=[],u=[],c={},d=e.add,p=e.merge,f=e.remove,g=!1,m=this.comparator&&null==o&&e.sort!==!1,v=i.isString(this.comparator)?this.comparator:null;for(s=0;st&&(t+=this.length),this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,!0)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t||(t={});var n=e.length;return i.isFunction(e)&&(e=i.bind(e,this)),1===n||i.isString(e)?this.models=this.sortBy(e):this.models.sort(e),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return this.map(t+"")},fetch:function(t){t=i.extend({parse:!0},t);var e=t.success,n=this;return t.success=function(i){var o=t.reset?"reset":"set";n[o](i,t),e&&e.call(t.context,n,i,t),n.trigger("sync",n,i,t)},q(this,t),this.sync("read",this,t)},create:function(t,e){e=e?i.clone(e):{};var n=e.wait;if(t=this._prepareModel(t,e),!t)return!1;n||this.add(t,e);var o=this,r=e.success;return e.success=function(t,e,i){n&&o.add(t,i),r&&r.call(i.context,t,e,i)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t){return t[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(this._isModel(t))return t.collection||(t.collection=this),t;e=e?i.clone(e):{},e.collection=this;var n=new this.model(t,e);return n.validationError?(this.trigger("invalid",this,n.validationError,e),!1):n},_removeModels:function(t,e){for(var i=[],n=0;n7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(L,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var n=document.body,o=n.insertBefore(this.iframe,n.firstChild).contentWindow;o.document.open(),o.document.close(),o.location.hash="#"+this.fragment}var r=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};return this._usePushState?r("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?r("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.options.silent?void 0:this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),j.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();return e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment?!1:(this.iframe&&this.navigate(e),void this.loadUrl())},loadUrl:function(t){return this.matchRoot()?(t=this.fragment=this.getFragment(t),i.some(this.handlers,function(e){return e.route.test(t)?(e.callback(t),!0):void 0})):!1},navigate:function(t,e){if(!j.started)return!1;e&&e!==!0||(e={trigger:!!e}),t=this.getFragment(t||"");var i=this.root;""!==t&&"?"!==t.charAt(0)||(i=i.slice(0,-1)||"/");var n=i+t;if(t=this.decodeFragment(t.replace(I,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var o=this.iframe.contentWindow;e.replace||(o.document.open(),o.document.close()),this._updateHash(o.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,i){if(i){var n=t.href.replace(/(javascript:|#).*$/,"");t.replace(n+"#"+e)}else t.hash="#"+e}}),e.history=new j;var $=function(t,e){var n,o=this;return n=t&&i.has(t,"constructor")?t.constructor:function(){return o.apply(this,arguments)},i.extend(n,o,e),n.prototype=i.create(o.prototype,t),n.prototype.constructor=n,n.__super__=o.prototype,n};b.extend=w.extend=O.extend=T.extend=j.extend=$;var F=function(){throw new Error('A "url" property or function must be specified')},q=function(t,e){var i=e.error;e.error=function(n){i&&i.call(e.context,t,n,e),t.trigger("error",t,n,e)}};return e})}).call(e,function(){return this}())},function(t,e,i){var n,o;(function(i,r,s){n=[],o=function(){function t(t){return'
")}),a.show({backdrop:!0})}var r=t,s=function(t){this.$overlay=t.overlay,this.$dialog=t.dialog,this.$header=this.$dialog.find(".modal-header"),this.$body=this.$dialog.find(".modal-body"),this.$footer=this.$dialog.find(".modal-footer"),this.$backdrop=t.backdrop,this.$header.find(".close").on("click",r.proxy(this.hide,this))};r.extend(s.prototype,{setContent:function(t){this.$header.hide(),t.title&&(this.$header.find(".title").html(t.title),this.$header.show()),t.closeButton?(this.$header.find(".close").show(),this.$header.show()):this.$header.find(".close").hide(),this.$footer.hide();var e=this.$footer.find(".buttons").html("");t.buttons&&(r.each(t.buttons,function(t,i){e.append(r(" ").text(t).click(i)).append(" ")}),this.$footer.show());var i=this.$footer.find(".extra_buttons").html("");t.extra_buttons&&(r.each(t.extra_buttons,function(t,e){i.append(r("").text(t).click(e)).append(" ")}),this.$footer.show());var n=t.body;"progress"==n&&(n=r("
")),this.$body.html(n)},show:function(t,e){this.$dialog.is(":visible")||(t.backdrop?this.$backdrop.addClass("in"):this.$backdrop.removeClass("in"),this.$overlay.show(),this.$dialog.show(),this.$overlay.addClass("in"),this.$body.css("min-width",this.$body.width()),this.$body.css("max-height",r(window).height()-this.$footer.outerHeight()-this.$header.outerHeight()-parseInt(this.$dialog.css("padding-top"),10)-parseInt(this.$dialog.css("padding-bottom"),10))),e&&e()},hide:function(){var t=this;t.$dialog.fadeOut(function(){t.$overlay.hide(),t.$backdrop.removeClass("in"),t.$body.children().remove(),t.$body.css("min-width",void 0)})}});var a;return r(function(){a=new s({overlay:r("#top-modal"),dialog:r("#top-modal-dialog"),backdrop:r("#top-modal-backdrop")})}),{Modal:s,hide_modal:e,show_modal:i,show_message:n,show_in_overlay:o}}.apply(e,n),!(void 0!==o&&(t.exports=o))},function(t,e,i){var n,o;(function(r,s,a){n=[i(88),i(11),i(8),i(6)],o=function(t,e,i,n){var o=r.View.extend(n.LoggableMixin).extend({_logNamespace:"layout",el:"body",className:"full-content",_panelIds:["left","center","right"],defaultOptions:{message_box_visible:!1,message_box_content:"",message_box_class:"info",show_inactivity_warning:!1,inactivity_box_content:""},initialize:function(e){this.log(this+".initialize:",e),s.extend(this,s.pick(e,this._panelIds)),this.options=s.defaults(s.omit(e.config,this._panelIds),this.defaultOptions),Galaxy.modal=this.modal=new i.View,this.masthead=new t.View(this.options),this.$el.attr("scroll","no"),this.$el.html(this._template()),this.$el.append(this.masthead.frame.$el),this.$("#masthead").replaceWith(this.masthead.$el),this.$el.append(this.modal.$el),this.$messagebox=this.$("#messagebox"),this.$inactivebox=this.$("#inactivebox")},render:function(){return a(".select2-hidden-accessible").remove(),this.log(this+".render:"),this.masthead.render(),this.renderMessageBox(),this.renderInactivityBox(),this.renderPanels(),this},renderMessageBox:function(){if(this.options.message_box_visible){var t=this.options.message_box_content||"",e=this.options.message_box_class||"info";this.$el.addClass("has-message-box"),this.$messagebox.attr("class","panel-"+e+"-message").html(t).toggle(!!t).show()}else this.$el.removeClass("has-message-box"),this.$messagebox.hide();return this},renderInactivityBox:function(){if(this.options.show_inactivity_warning){var t=this.options.inactivity_box_content||"",e=a("").attr("href",Galaxy.root+"user/resend_verification").text("Resend verification");this.$el.addClass("has-inactivity-box"),this.$inactivebox.html(t+" ").append(e).toggle(!!t).show()}else this.$el.removeClass("has-inactivity-box"),this.$inactivebox.hide();return this},renderPanels:function(){var t=this;return this._panelIds.forEach(function(e){s.has(t,e)&&(t[e].setElement("#"+e),t[e].render())}),this.left||this.center.$el.css("left",0),this.right||this.center.$el.css("right",0),this},_template:function(){return['
','
','
','
','
',this.left?'
':"",this.center?'
':"",this.right?'",'
'].join("")},hideSidePanels:function(){this.left&&this.left.hide(),this.right&&this.right.hide()},toString:function(){return"PageLayoutView"}});return{PageLayoutView:o}}.apply(e,n),!(void 0!==o&&(t.exports=o))}).call(e,i(3),i(2),i(1))},function(t,e,i){(function(t){!function(t,e){var i,n;return n=e.document,i=function(){function i(i){var n;try{n=e.localStorage}catch(o){n=!1}this._options=t.extend({name:"tour",steps:[],container:"body",autoscroll:!0,keyboard:!0,storage:n,debug:!1,backdrop:!1,backdropContainer:"body",backdropPadding:0,redirect:!0,orphan:!1,duration:!1,delay:!1,basePath:"",template:'',afterSetState:function(t,e){},afterGetState:function(t,e){},afterRemoveState:function(t){},onStart:function(t){},onEnd:function(t){},onShow:function(t){},onShown:function(t){},onHide:function(t){},onHidden:function(t){},onNext:function(t){},onPrev:function(t){},onPause:function(t,e){},onResume:function(t,e){},onRedirectError:function(t){}},i),this._force=!1,this._inited=!1,this._current=null,this.backdrop={overlay:null,$element:null,$background:null,backgroundShown:!1,overlayElementShown:!1}}return i.prototype.addSteps=function(t){var e,i,n;for(i=0,n=t.length;n>i;i++)e=t[i],this.addStep(e);return this},i.prototype.addStep=function(t){return this._options.steps.push(t),this},i.prototype.getStep=function(e){return null!=this._options.steps[e]?t.extend({id:"step-"+e,path:"",host:"",placement:"right",title:"",content:"

",next:e===this._options.steps.length-1?-1:e+1,prev:e-1,animation:!0,container:this._options.container,autoscroll:this._options.autoscroll,backdrop:this._options.backdrop,backdropContainer:this._options.backdropContainer,backdropPadding:this._options.backdropPadding,redirect:this._options.redirect,reflexElement:this._options.steps[e].element,orphan:this._options.orphan,duration:this._options.duration,delay:this._options.delay,template:this._options.template,onShow:this._options.onShow,onShown:this._options.onShown,onHide:this._options.onHide,onHidden:this._options.onHidden,onNext:this._options.onNext,onPrev:this._options.onPrev,onPause:this._options.onPause,onResume:this._options.onResume,onRedirectError:this._options.onRedirectError},this._options.steps[e]):void 0},i.prototype.init=function(t){return this._force=t,this.ended()?(this._debug("Tour ended, init prevented."),this):(this.setCurrentStep(),this._initMouseNavigation(),this._initKeyboardNavigation(),this._onResize(function(t){return function(){return t.showStep(t._current)}}(this)),null!==this._current&&this.showStep(this._current),this._inited=!0,this)},i.prototype.start=function(t){var e;return null==t&&(t=!1),this._inited||this.init(t),null===this._current&&(e=this._makePromise(null!=this._options.onStart?this._options.onStart(this):void 0),this._callOnPromiseDone(e,this.showStep,0)),this},i.prototype.next=function(){var t;return t=this.hideStep(this._current),this._callOnPromiseDone(t,this._showNextStep)},i.prototype.prev=function(){var t;return t=this.hideStep(this._current),this._callOnPromiseDone(t,this._showPrevStep)},i.prototype.goTo=function(t){var e;return e=this.hideStep(this._current),this._callOnPromiseDone(e,this.showStep,t)},i.prototype.end=function(){var i,o;return i=function(i){return function(o){return t(n).off("click.tour-"+i._options.name),t(n).off("keyup.tour-"+i._options.name),t(e).off("resize.tour-"+i._options.name),i._setState("end","yes"),i._inited=!1,i._force=!1,i._clearTimer(),null!=i._options.onEnd?i._options.onEnd(i):void 0}}(this),o=this.hideStep(this._current),this._callOnPromiseDone(o,i)},i.prototype.ended=function(){return!this._force&&!!this._getState("end")},i.prototype.restart=function(){return this._removeState("current_step"),this._removeState("end"),this._removeState("redirect_to"),this.start()},i.prototype.pause=function(){var t;return t=this.getStep(this._current),t&&t.duration?(this._paused=!0,this._duration-=(new Date).getTime()-this._start,e.clearTimeout(this._timer),this._debug("Paused/Stopped step "+(this._current+1)+" timer ("+this._duration+" remaining)."),null!=t.onPause?t.onPause(this,this._duration):void 0):this},i.prototype.resume=function(){var t;return t=this.getStep(this._current),t&&t.duration?(this._paused=!1,this._start=(new Date).getTime(),this._duration=this._duration||t.duration,this._timer=e.setTimeout(function(t){return function(){return t._isLast()?t.next():t.end()}}(this),this._duration),this._debug("Started step "+(this._current+1)+" timer with duration "+this._duration),null!=t.onResume&&this._duration!==t.duration?t.onResume(this,this._duration):void 0):this},i.prototype.hideStep=function(e){var i,n,o;return(o=this.getStep(e))?(this._clearTimer(),n=this._makePromise(null!=o.onHide?o.onHide(this,e):void 0),i=function(i){return function(n){var r;return r=t(o.element),r.data("bs.popover")||r.data("popover")||(r=t("body")), +r.popover("destroy").removeClass("tour-"+i._options.name+"-element tour-"+i._options.name+"-"+e+"-element"),r.removeData("bs.popover"),o.reflex&&t(o.reflexElement).removeClass("tour-step-element-reflex").off(""+i._reflexEvent(o.reflex)+".tour-"+i._options.name),o.backdrop&&i._hideBackdrop(),null!=o.onHidden?o.onHidden(i):void 0}}(this),this._callOnPromiseDone(n,i),n):void 0},i.prototype.showStep=function(t){var i,o,r,s;return this.ended()?(this._debug("Tour ended, showStep prevented."),this):(s=this.getStep(t))?(r=t").parent().html()},i.prototype._reflexEvent=function(t){return"[object Boolean]"==={}.toString.call(t)?"click":t},i.prototype._reposition=function(e,i){var o,r,s,a,l,h,u;if(a=e[0].offsetWidth,r=e[0].offsetHeight,u=e.offset(),l=u.left,h=u.top,o=t(n).outerHeight()-u.top-e.outerHeight(),0>o&&(u.top=u.top+o),s=t("html").outerWidth()-u.left-e.outerWidth(),0>s&&(u.left=u.left+s),u.top<0&&(u.top=0),u.left<0&&(u.left=0),e.offset(u),"bottom"===i.placement||"top"===i.placement){if(l!==u.left)return this._replaceArrow(e,2*(u.left-l),a,"left")}else if(h!==u.top)return this._replaceArrow(e,2*(u.top-h),r,"top")},i.prototype._center=function(i){return i.css("top",t(e).outerHeight()/2-i.outerHeight()/2)},i.prototype._replaceArrow=function(t,e,i,n){return t.find(".arrow").css(n,e?50*(1-e/i)+"%":"")},i.prototype._scrollIntoView=function(i,n){var o,r,s,a,l,h;return o=t(i),o.length?(r=t(e),a=o.offset().top,h=r.height(),l=Math.max(0,a-h/2),this._debug("Scroll into view. ScrollTop: "+l+". Element offset: "+a+". Window height: "+h+"."),s=0,t("body, html").stop(!0,!0).animate({scrollTop:Math.ceil(l)},function(t){return function(){return 2===++s?(n(),t._debug("Scroll into view.\nAnimation end element offset: "+o.offset().top+".\nWindow height: "+r.height()+".")):void 0}}(this))):n()},i.prototype._onResize=function(i,n){return t(e).on("resize.tour-"+this._options.name,function(){return clearTimeout(n),n=setTimeout(i,100)})},i.prototype._initMouseNavigation=function(){var e;return e=this,t(n).off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']").on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']",function(t){return function(e){return e.preventDefault(),t.next()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']",function(t){return function(e){return e.preventDefault(),t.prev()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']",function(t){return function(e){return e.preventDefault(),t.end()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']",function(i){var n;return i.preventDefault(),n=t(this),n.text(e._paused?n.data("pause-text"):n.data("resume-text")),e._paused?e.resume():e.pause()})},i.prototype._initKeyboardNavigation=function(){return this._options.keyboard?t(n).on("keyup.tour-"+this._options.name,function(t){return function(e){if(e.which)switch(e.which){case 39:return e.preventDefault(),t._isLast()?t.next():t.end();case 37:if(e.preventDefault(),t._current>0)return t.prev();break;case 27:return e.preventDefault(),t.end()}}}(this)):void 0},i.prototype._makePromise=function(e){return e&&t.isFunction(e.then)?e:null},i.prototype._callOnPromiseDone=function(t,e,i){return t?t.then(function(t){return function(n){return e.call(t,i)}}(this)):e.call(this,i)},i.prototype._showBackdrop=function(e){return this.backdrop.backgroundShown?void 0:(this.backdrop=t("
",{"class":"tour-backdrop"}),this.backdrop.backgroundShown=!0,t(e.backdropContainer).append(this.backdrop))},i.prototype._hideBackdrop=function(){return this._hideOverlayElement(),this._hideBackground()},i.prototype._hideBackground=function(){return this.backdrop?(this.backdrop.remove(),this.backdrop.overlay=null,this.backdrop.backgroundShown=!1):void 0},i.prototype._showOverlayElement=function(e,i){var n,o;return n=t(e.element),!n||0===n.length||this.backdrop.overlayElementShown&&!i?void 0:(this.backdrop.overlayElementShown||(this.backdrop.$element=n.addClass("tour-step-backdrop"),this.backdrop.$background=t("
",{"class":"tour-step-background"}),this.backdrop.$background.appendTo(e.backdropContainer),this.backdrop.overlayElementShown=!0),o={width:n.innerWidth(),height:n.innerHeight(),offset:n.offset()},e.backdropPadding&&(o=this._applyBackdropPadding(e.backdropPadding,o)),this.backdrop.$background.width(o.width).height(o.height).offset(o.offset))},i.prototype._hideOverlayElement=function(){return this.backdrop.overlayElementShown?(this.backdrop.$element.removeClass("tour-step-backdrop"),this.backdrop.$background.remove(),this.backdrop.$element=null,this.backdrop.$background=null,this.backdrop.overlayElementShown=!1):void 0},i.prototype._applyBackdropPadding=function(t,e){return"object"==typeof t?(null==t.top&&(t.top=0),null==t.right&&(t.right=0),null==t.bottom&&(t.bottom=0),null==t.left&&(t.left=0),e.offset.top=e.offset.top-t.top,e.offset.left=e.offset.left-t.left,e.width=e.width+t.left+t.right,e.height=e.height+t.top+t.bottom):(e.offset.top=e.offset.top-t,e.offset.left=e.offset.left-t,e.width=e.width+2*t,e.height=e.height+2*t),e},i.prototype._clearTimer=function(){return e.clearTimeout(this._timer),this._timer=null,this._duration=null},i.prototype._getProtocol=function(t){return t=t.split("://"),t.length>1?t[0]:"http"},i.prototype._getHost=function(t){return t=t.split("//"),t=t.length>1?t[1]:t[0],t.split("/")[0]},i.prototype._getPath=function(t){return t.replace(/\/?$/,"").split("?")[0].split("#")[0]},i.prototype._getQuery=function(t){return this._getParams(t,"?")},i.prototype._getHash=function(t){return this._getParams(t,"#")},i.prototype._getParams=function(t,e){var i,n,o,r,s;if(n=t.split(e),1===n.length)return{};for(n=n[1].split("&"),o={},r=0,s=n.length;s>r;r++)i=n[r],i=i.split("="),o[i[0]]=i[1]||"";return o},i.prototype._equal=function(t,e){var i,n;if("[object Object]"==={}.toString.call(t)&&"[object Object]"==={}.toString.call(e)){for(i in t)if(n=t[i],e[i]!==n)return!1;for(i in e)if(n=e[i],t[i]!==n)return!1;return!0}return t===e},i}(),e.Tour=i}(t,window)}).call(e,i(1))},function(t,e,i){(function(t){/*! jQuery UI - v1.9.1 - 2012-10-29 * http://jqueryui.com * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.menu.js, jquery.ui.slider.js * Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */ -!function(t,e){function i(e,i){var r,s,o,a=e.nodeName.toLowerCase();return"area"===a?(r=e.parentNode,s=r.name,e.href&&s&&"map"===r.nodeName.toLowerCase()?(o=t("img[usemap=#"+s+"]")[0],!!o&&n(o)):!1):(/input|select|textarea|button|object/.test(a)?!e.disabled:"a"===a?e.href||i:i)&&n(e)}function n(e){return t.expr.filters.visible(e)&&!t(e).parents().andSelf().filter(function(){return"hidden"===t.css(this,"visibility")}).length}var r=0,s=/^ui-id-\d+$/;t.ui=t.ui||{},t.ui.version||(t.extend(t.ui,{version:"1.9.1",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({_focus:t.fn.focus,focus:function(e,i){return"number"==typeof e?this.each(function(){var n=this;setTimeout(function(){t(n).focus(),i&&i.call(n)},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(i){if(i!==e)return this.css("zIndex",i);if(this.length)for(var n,r,s=t(this[0]);s.length&&s[0]!==document;){if(n=s.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(r=parseInt(s.css("zIndex"),10),!isNaN(r)&&0!==r))return r;s=s.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++r)})},removeUniqueId:function(){return this.each(function(){s.test(this.id)&&t(this).removeAttr("id")})}}),t("").outerWidth(1).jquery||t.each(["Width","Height"],function(i,n){function r(e,i,n,r){return t.each(s,function(){i-=parseFloat(t.css(e,"padding"+this))||0,n&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),r&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var s="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+n]=function(i){return i===e?a["inner"+n].call(this):this.each(function(){t(this).css(o,r(this,i)+"px")})},t.fn["outer"+n]=function(e,i){return"number"!=typeof e?a["outer"+n].call(this,e):this.each(function(){t(this).css(o,r(this,e,!0,i)+"px")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,n){return!!t.data(e,n[3])},focusable:function(e){return i(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var n=t.attr(e,"tabindex"),r=isNaN(n);return(r||n>=0)&&i(e,!r)}}),t(function(){var e=document.body,i=e.appendChild(i=document.createElement("div"));i.offsetHeight,t.extend(i.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),t.support.minHeight=100===i.offsetHeight,t.support.selectstart="onselectstart"in i,e.removeChild(i).style.display="none"}),function(){var e=/msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];t.ui.ie=!!e.length,t.ui.ie6=6===parseFloat(e[1],10)}(),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,n){var r,s=t.ui[e].prototype;for(r in n)s.plugins[r]=s.plugins[r]||[],s.plugins[r].push([i,n[r]])},call:function(t,e,i){var n,r=t.plugins[e];if(r&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(n=0;n0?!0:(e[n]=1,r=e[n]>0,e[n]=0,r)},isOverAxis:function(t,e,i){return t>e&&e+i>t},isOver:function(e,i,n,r,s,o){return t.ui.isOverAxis(e,n,s)&&t.ui.isOverAxis(i,r,o)}}))}(t),function(t,e){var i=0,n=Array.prototype.slice,r=t.cleanData;t.cleanData=function(e){for(var i,n=0;null!=(i=e[n]);n++)try{t(i).triggerHandler("remove")}catch(s){}r(e)},t.widget=function(e,i,n){var r,s,o,a,l=e.split(".")[0];e=e.split(".")[1],r=l+"-"+e,n||(n=i,i=t.Widget),t.expr[":"][r.toLowerCase()]=function(e){return!!t.data(e,r)},t[l]=t[l]||{},s=t[l][e],o=t[l][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new o(t,e)},t.extend(o,s,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(n,function(e,r){t.isFunction(r)&&(n[e]=function(){var t=function(){return i.prototype[e].apply(this,arguments)},n=function(t){return i.prototype[e].apply(this,t)};return function(){var e,i=this._super,s=this._superApply;return this._super=t,this._superApply=n,e=r.apply(this,arguments),this._super=i,this._superApply=s,e}}())}),o.prototype=t.widget.extend(a,{widgetEventPrefix:a.widgetEventPrefix||e},n,{constructor:o,namespace:l,widgetName:e,widgetBaseClass:r,widgetFullName:r}),s?(t.each(s._childConstructors,function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,o,i._proto)}),delete s._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o)},t.widget.extend=function(i){for(var r,s,o=n.call(arguments,1),a=0,l=o.length;l>a;a++)for(r in o[a])s=o[a][r],o[a].hasOwnProperty(r)&&s!==e&&(t.isPlainObject(s)?i[r]=t.isPlainObject(i[r])?t.widget.extend({},i[r],s):t.widget.extend({},s):i[r]=s);return i},t.widget.bridge=function(i,r){var s=r.prototype.widgetFullName;t.fn[i]=function(o){var a="string"==typeof o,l=n.call(arguments,1),h=this;return o=!a&&l.length?t.widget.extend.apply(null,[o].concat(l)):o,a?this.each(function(){var n,r=t.data(this,s);return r?t.isFunction(r[o])&&"_"!==o.charAt(0)?(n=r[o].apply(r,l),n!==r&&n!==e?(h=n&&n.jquery?h.pushStack(n.get()):n,!1):void 0):t.error("no such method '"+o+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; attempted to call method '"+o+"'")}):this.each(function(){var e=t.data(this,s);e?e.option(o||{})._init():new r(o,this)}),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{disabled:!1,create:null},_createWidget:function(e,n){n=t(n||this.defaultElement||this)[0],this.element=t(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),n!==this&&(t.data(n,this.widgetName,this),t.data(n,this.widgetFullName,this),this._on(this.element,{remove:function(t){t.target===n&&this.destroy()}}),this.document=t(n.style?n.ownerDocument:n.document||n),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,n){var r,s,o,a=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(a={},r=i.split("."),i=r.shift(),r.length){for(s=a[i]=t.widget.extend({},this.options[i]),o=0;o=9||e.button?this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted):this._mouseUp(e)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(t){return this.mouseDelayMet},_mouseStart:function(t){},_mouseDrag:function(t){},_mouseStop:function(t){},_mouseCapture:function(t){return!0}})}(t),function(e,i){function n(t,e,i){return[parseInt(t[0],10)*(p.test(t[0])?e/100:1),parseInt(t[1],10)*(p.test(t[1])?i/100:1)]}function r(t,i){return parseInt(e.css(t,i),10)||0}e.ui=e.ui||{};var s,o=Math.max,a=Math.abs,l=Math.round,h=/left|center|right/,u=/top|center|bottom/,c=/[\+\-]\d+%?/,d=/^\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(s!==i)return s;var t,n,r=e("
"),o=r.children()[0];return e("body").append(r),t=o.offsetWidth,r.css("overflow","scroll"),n=o.offsetWidth,t===n&&(n=r[0].clientWidth),r.remove(),s=t-n},getScrollInfo:function(t){var i=t.isWindow?"":t.element.css("overflow-x"),n=t.isWindow?"":t.element.css("overflow-y"),r="scroll"===i||"auto"===i&&t.widthn?"left":i>0?"right":"center",vertical:0>l?"top":r>0?"bottom":"middle"};d>s&&a(i+n)p&&a(r+l)o(a(r),a(l))?h.important="horizontal":h.important="vertical",t.using.call(this,e,h)}),c.offset(e.extend(T,{using:u}))})},e.ui.position={fit:{left:function(t,e){var i,n=e.within,r=n.isWindow?n.scrollLeft:n.offset.left,s=n.width,a=t.left-e.collisionPosition.marginLeft,l=r-a,h=a+e.collisionWidth-s-r;e.collisionWidth>s?l>0&&0>=h?(i=t.left+l+e.collisionWidth-s-r,t.left+=l-i):h>0&&0>=l?t.left=r:l>h?t.left=r+s-e.collisionWidth:t.left=r:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-a,t.left)},top:function(t,e){var i,n=e.within,r=n.isWindow?n.scrollTop:n.offset.top,s=e.within.height,a=t.top-e.collisionPosition.marginTop,l=r-a,h=a+e.collisionHeight-s-r;e.collisionHeight>s?l>0&&0>=h?(i=t.top+l+e.collisionHeight-s-r,t.top+=l-i):h>0&&0>=l?t.top=r:l>h?t.top=r+s-e.collisionHeight:t.top=r:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-a,t.top)}},flip:{left:function(t,e){var i,n,r=e.within,s=r.offset.left+r.scrollLeft,o=r.width,l=r.isWindow?r.scrollLeft:r.offset.left,h=t.left-e.collisionPosition.marginLeft,u=h-l,c=h+e.collisionWidth-o-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>u?(i=t.left+d+p+f+e.collisionWidth-o-s,(0>i||i0&&(n=t.left-e.collisionPosition.marginLeft+d+p+f-l,(n>0||a(n)u?(n=t.top+p+f+g+e.collisionHeight-o-s,t.top+p+f+g>u&&(0>n||n0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,t.top+p+f+g>c&&(i>0||a(i)10&&11>r,t.innerHTML="",i.removeChild(t)}(),e.uiBackCompat!==!1&&function(t){var e=t.fn.position;t.fn.position=function(n){if(!n||!n.offset)return e.call(this,n);var r=n.offset.split(" "),s=n.at.split(" ");return 1===r.length&&(r[1]=r[0]),/^\d/.test(r[0])&&(r[0]="+"+r[0]),/^\d/.test(r[1])&&(r[1]="+"+r[1]),1===s.length&&(/left|center|right/.test(s[0])?s[1]="center":(s[1]=s[0],s[0]="center")),e.call(this,t.extend(n,{at:s[0]+r[0]+" "+s[1]+r[1],offset:i}))}}(t)}(t),function(t,e){var i=0;t.widget("ui.autocomplete",{version:"1.9.1",defaultElement:"",options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,i,n;this.isMultiLine=this._isMultiLine(),this.valueMethod=this.element[this.element.is("input,textarea")?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(r){if(this.element.prop("readOnly"))return e=!0,n=!0,i=!0,void 0;e=!1,n=!1,i=!1;var s=t.ui.keyCode;switch(r.keyCode){case s.PAGE_UP:e=!0,this._move("previousPage",r);break;case s.PAGE_DOWN:e=!0,this._move("nextPage",r);break;case s.UP:e=!0,this._keyEvent("previous",r);break;case s.DOWN:e=!0,this._keyEvent("next",r);break;case s.ENTER:case s.NUMPAD_ENTER:this.menu.active&&(e=!0,r.preventDefault(),this.menu.select(r));break;case s.TAB:this.menu.active&&this.menu.select(r);break;case s.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(r),r.preventDefault());break;default:i=!0,this._searchTimeout(r)}},keypress:function(n){if(e)return e=!1,void n.preventDefault();if(!i){var r=t.ui.keyCode;switch(n.keyCode){case r.PAGE_UP:this._move("previousPage",n);break;case r.PAGE_DOWN:this._move("nextPage",n);break;case r.UP:this._keyEvent("previous",n);break;case r.DOWN:this._keyEvent("next",n)}}},input:function(t){return n?(n=!1,void t.preventDefault()):void this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("
").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+("min"===r.range||"max"===r.range?" ui-slider-range-"+r.range:""))),n=r.values&&r.values.length||1,e=s.length;n>e;e++)a.push(o);this.handles=s.add(t(a.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(t){t.preventDefault()}).mouseenter(function(){r.disabled||t(this).addClass("ui-state-hover")}).mouseleave(function(){t(this).removeClass("ui-state-hover")}).focus(function(){r.disabled?t(this).blur():(t(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),t(this).addClass("ui-state-focus"))}).blur(function(){t(this).removeClass("ui-state-focus")}),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)}),this._on(this.handles,{keydown:function(e){var n,r,s,o,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(e.target).addClass("ui-state-active"),n=this._start(e,a),n===!1))return}switch(o=this.options.step,r=s=this.options.values&&this.options.values.length?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:s=this._valueMin();break;case t.ui.keyCode.END:s=this._valueMax();break;case t.ui.keyCode.PAGE_UP:s=this._trimAlignValue(r+(this._valueMax()-this._valueMin())/i);break;case t.ui.keyCode.PAGE_DOWN:s=this._trimAlignValue(r-(this._valueMax()-this._valueMin())/i);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(r===this._valueMax())return;s=this._trimAlignValue(r+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(r===this._valueMin())return;s=this._trimAlignValue(r-o)}this._slide(e,a,s)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}),this._refreshValue(),this._animateOff=!1},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,n,r,s,o,a,l,h,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(i),r=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(n-u.values(e));r>i&&(r=i,s=t(this),o=e)}),c.range===!0&&this.values(1)===c.min&&(o+=1,s=t(this.handles[o])),a=this._start(e,o),a===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,s.addClass("ui-state-active").focus(),l=s.offset(),h=!t(e.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-s.width()/2,top:e.pageY-l.top-s.height()/2-(parseInt(s.css("borderTopWidth"),10)||0)-(parseInt(s.css("borderBottomWidth"),10)||0)+(parseInt(s.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,o,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,n,r,s;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),n=i/e,n>1&&(n=1),0>n&&(n=0),"vertical"===this.orientation&&(n=1-n),r=this._valueMax()-this._valueMin(),s=this._valueMin()+n*r,this._trimAlignValue(s)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var n,r,s;this.options.values&&this.options.values.length?(n=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>n||1===e&&n>i)&&(i=n),i!==this.values(e)&&(r=this.values(),r[e]=i,s=this._trigger("slide",t,{handle:this.handles[e],value:i,values:r}),n=this.values(e?0:1),s!==!1&&this.values(e,i,!0))):i!==this.value()&&(s=this._trigger("slide",t,{handle:this.handles[e],value:i}),s!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(e,i){var n,r,s;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void 0;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(n=this.options.values,r=arguments[0],s=0;sn;n+=1)this._change(null,n);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,n;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);for(i=this.options.values.slice(),n=0;n=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,n=t-i;return 2*Math.abs(i)>=e&&(n+=i>0?e:-e),parseFloat(n.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,n,r,s,o=this.options.range,a=this.options,l=this,h=this._animateOff?!1:a.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(n){i=(l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())*100,u["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](u,a.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===n&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},a.animate),1===n&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===n&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},a.animate),1===n&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(n=this.value(),r=this._valueMin(),s=this._valueMax(),i=s!==r?(n-r)/(s-r)*100:0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](u,a.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},a.animate),"max"===o&&"horizontal"===this.orientation&&this.range[h?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:a.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},a.animate),"max"===o&&"vertical"===this.orientation&&this.range[h?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:a.animate}))}})}(t)}).call(e,i(1))},function(t,e,i){(function(t){!function(t){function e(i){function n(){e(r)}var r=i.data||i;switch(i.type){case"mouseenter":r.dist2=0,r.event=i,i.type="hoverstart",t.event.dispatch.call(this,i)!==!1&&(r.elem=this,t.event.add(this,"mousemove",e,r),r.timer=setTimeout(n,r.delay));break;case"mousemove":r.dist2+=Math.pow(i.pageX-r.event.pageX,2)+Math.pow(i.pageY-r.event.pageY,2),r.event=i;break;case"mouseleave":clearTimeout(r.timer),r.hovered?(i.type="hoverend",t.event.dispatch.call(this,i),r.hovered--):t.event.remove(r.elem,"mousemove",e);break;default:r.dist2<=Math.pow(r.speed*(r.delay/1e3),2)?(t.event.remove(r.elem,"mousemove",e),r.event.type="hover",t.event.dispatch.call(r.elem,r.event)!==!1&&r.hovered++):r.timer=setTimeout(n,r.delay),r.dist2=0}}t.fn._hover=t.fn.hover,t.fn.hover=function(t,e,i){return i&&this.bind("hoverstart",t),e&&this.bind("hoverend",i?i:e),t?this.bind("hover",i?e:t):this.trigger("hover")};var i=t.event.special.hover={delay:100,speed:100,setup:function(n){n=t.extend({speed:i.speed,delay:i.delay,hovered:0},n||{}),t.event.add(this,"mouseenter mouseleave",e,n)},teardown:function(){t.event.remove(this,"mouseenter mouseleave",e)}}}(t)}).call(e,i(1))},function(t,e,i){(function(t){!function(t){"use strict";function e(e){var i=e.data;e.isDefaultPrevented()||(e.preventDefault(),t(e.target).ajaxSubmit(i))}function i(e){var i=e.target,n=t(i);if(!n.is("[type=submit],[type=image]")){var r=n.closest("[type=submit]");if(0===r.length)return;i=r[0]}var s=this;if(s.clk=i,"image"==i.type)if(void 0!==e.offsetX)s.clk_x=e.offsetX,s.clk_y=e.offsetY;else if("function"==typeof t.fn.offset){var o=n.offset();s.clk_x=e.pageX-o.left,s.clk_y=e.pageY-o.top}else s.clk_x=e.pageX-i.offsetLeft,s.clk_y=e.pageY-i.offsetTop;setTimeout(function(){s.clk=s.clk_x=s.clk_y=null},100)}function n(){if(t.fn.ajaxSubmit.debug){var e="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e)}}var r={};r.fileapi=void 0!==t("").get(0).files,r.formdata=void 0!==window.FormData;var s=!!t.fn.prop;t.fn.attr2=function(){if(!s)return this.attr.apply(this,arguments);var t=this.prop.apply(this,arguments);return t&&t.jquery||"string"==typeof t?t:this.attr.apply(this,arguments)},t.fn.ajaxSubmit=function(e){function i(i){var n,r,s=t.param(i,e.traditional).split("&"),o=s.length,a=[];for(n=0;o>n;n++)s[n]=s[n].replace(/\+/g," "),r=s[n].split("="),a.push([decodeURIComponent(r[0]),decodeURIComponent(r[1])]);return a}function o(n){for(var r=new FormData,s=0;s').val(d.extraData[h].value).appendTo(C)[0]):o.push(t('').val(d.extraData[h]).appendTo(C)[0]));d.iframeTarget||m.appendTo("body"),v.attachEvent?v.attachEvent("onload",a):v.addEventListener("load",a,!1),setTimeout(e,15);try{C.submit()}catch(u){var p=document.createElement("form").submit;p.apply(C)}}finally{C.setAttribute("action",s),i?C.setAttribute("target",i):c.removeAttr("target"),t(o).remove()}}function a(e){if(!y.aborted&&!M){if(O=r(v),O||(n("cannot access response document"),e=T),e===k&&y)return y.abort("timeout"),void S.reject(y,"timeout");if(e==T&&y)return y.abort("server abort"),void S.reject(y,"error","server abort");if(O&&O.location.href!=d.iframeSrc||w){v.detachEvent?v.detachEvent("onload",a):v.removeEventListener("load",a,!1);var i,s="success";try{if(w)throw"timeout";var o="xml"==d.dataType||O.XMLDocument||t.isXMLDoc(O);if(n("isXml="+o),!o&&window.opera&&(null===O.body||!O.body.innerHTML)&&--D)return n("requeing onLoad callback, DOM not available"),void setTimeout(a,250);var l=O.body?O.body:O.documentElement;y.responseText=l?l.innerHTML:null,y.responseXML=O.XMLDocument?O.XMLDocument:O,o&&(d.dataType="xml"),y.getResponseHeader=function(t){var e={"content-type":d.dataType};return e[t.toLowerCase()]},l&&(y.status=Number(l.getAttribute("status"))||y.status,y.statusText=l.getAttribute("statusText")||y.statusText);var h=(d.dataType||"").toLowerCase(),u=/(json|script|text)/.test(h);if(u||d.textarea){var c=O.getElementsByTagName("textarea")[0];if(c)y.responseText=c.value,y.status=Number(c.getAttribute("status"))||y.status,y.statusText=c.getAttribute("statusText")||y.statusText;else if(u){var f=O.getElementsByTagName("pre")[0],g=O.getElementsByTagName("body")[0];f?y.responseText=f.textContent?f.textContent:f.innerText:g&&(y.responseText=g.textContent?g.textContent:g.innerText)}}else"xml"==h&&!y.responseXML&&y.responseText&&(y.responseXML=P(y.responseText));try{N=j(y,h,d)}catch(b){s="parsererror",y.error=i=b||s}}catch(b){n("error caught: ",b),s="error",y.error=i=b||s}y.aborted&&(n("upload aborted"),s=null),y.status&&(s=y.status>=200&&y.status<300||304===y.status?"success":"error"),"success"===s?(d.success&&d.success.call(d.context,N,"success",y),S.resolve(y.responseText,"success",y),p&&t.event.trigger("ajaxSuccess",[y,d])):s&&(void 0===i&&(i=y.statusText),d.error&&d.error.call(d.context,y,s,i),S.reject(y,"error",i),p&&t.event.trigger("ajaxError",[y,d,i])),p&&t.event.trigger("ajaxComplete",[y,d]),p&&!--t.active&&t.event.trigger("ajaxStop"),d.complete&&d.complete.call(d.context,y,s),M=!0,d.timeout&&clearTimeout(x),setTimeout(function(){d.iframeTarget?m.attr("src",d.iframeSrc):m.remove(),y.responseXML=null},100)}}}var h,u,d,p,f,m,v,y,b,_,w,x,C=c[0],S=t.Deferred();if(S.abort=function(t){y.abort(t)},i)for(u=0;u'),m.css({position:"absolute",top:"-1000px",left:"-1000px"})),v=m[0],y={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var i="timeout"===e?"timeout":"aborted";n("aborting upload... "+i),this.aborted=1;try{v.contentWindow.document.execCommand&&v.contentWindow.document.execCommand("Stop")}catch(r){}m.attr("src",d.iframeSrc),y.error=i,d.error&&d.error.call(d.context,y,i,e),p&&t.event.trigger("ajaxError",[y,d,i]),d.complete&&d.complete.call(d.context,y,i)}},p=d.global,p&&0===t.active++&&t.event.trigger("ajaxStart"),p&&t.event.trigger("ajaxSend",[y,d]),d.beforeSend&&d.beforeSend.call(d.context,y,d)===!1)return d.global&&t.active--,S.reject(),S;if(y.aborted)return S.reject(),S;b=C.clk,b&&(_=b.name,_&&!b.disabled&&(d.extraData=d.extraData||{},d.extraData[_]=b.value,"image"==b.type&&(d.extraData[_+".x"]=C.clk_x,d.extraData[_+".y"]=C.clk_y)));var k=1,T=2,E=t("meta[name=csrf-token]").attr("content"),A=t("meta[name=csrf-param]").attr("content");A&&E&&(d.extraData=d.extraData||{},d.extraData[A]=E),d.forceSync?o():setTimeout(o,10);var N,O,M,D=50,P=t.parseXML||function(t,e){return window.ActiveXObject?(e=new ActiveXObject("Microsoft.XMLDOM"),e.async="false",e.loadXML(t)):e=(new DOMParser).parseFromString(t,"text/xml"),e&&e.documentElement&&"parsererror"!=e.documentElement.nodeName?e:null},R=t.parseJSON||function(t){return window.eval("("+t+")")},j=function(e,i,n){var r=e.getResponseHeader("content-type")||"",s="xml"===i||!i&&r.indexOf("xml")>=0,o=s?e.responseXML:e.responseText;return s&&"parsererror"===o.documentElement.nodeName&&t.error&&t.error("parsererror"),n&&n.dataFilter&&(o=n.dataFilter(o,i)),"string"==typeof o&&("json"===i||!i&&r.indexOf("json")>=0?o=R(o):("script"===i||!i&&r.indexOf("javascript")>=0)&&t.globalEval(o)),o};return S}if(!this.length)return n("ajaxSubmit: skipping submit process - no element selected"),this;var l,h,u,c=this;"function"==typeof e?e={success:e}:void 0===e&&(e={}),l=e.type||this.attr2("method"),h=e.url||this.attr2("action"),u="string"==typeof h?t.trim(h):"",u=u||window.location.href||"",u&&(u=(u.match(/^([^#]+)/)||[])[1]),e=t.extend(!0,{url:u,success:t.ajaxSettings.success,type:l||t.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},e);var d={};if(this.trigger("form-pre-serialize",[this,e,d]),d.veto)return n("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(e.beforeSerialize&&e.beforeSerialize(this,e)===!1)return n("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var p=e.traditional;void 0===p&&(p=t.ajaxSettings.traditional);var f,g=[],m=this.formToArray(e.semantic,g);if(e.data&&(e.extraData=e.data,f=t.param(e.data,p)),e.beforeSubmit&&e.beforeSubmit(m,this,e)===!1)return n("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[m,this,e,d]),d.veto)return n("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var v=t.param(m,p);f&&(v=v?v+"&"+f:f),"GET"==e.type.toUpperCase()?(e.url+=(e.url.indexOf("?")>=0?"&":"?")+v,e.data=null):e.data=v;var y=[];if(e.resetForm&&y.push(function(){c.resetForm()}),e.clearForm&&y.push(function(){c.clearForm(e.includeHidden)}),!e.dataType&&e.target){var b=e.success||function(){};y.push(function(i){var n=e.replaceTarget?"replaceWith":"html"; -t(e.target)[n](i).each(b,arguments)})}else e.success&&y.push(e.success);if(e.success=function(t,i,n){for(var r=e.context||this,s=0,o=y.length;o>s;s++)y[s].apply(r,[t,i,n||c,c])},e.error){var _=e.error;e.error=function(t,i,n){var r=e.context||this;_.apply(r,[t,i,n,c])}}if(e.complete){var w=e.complete;e.complete=function(t,i){var n=e.context||this;w.apply(n,[t,i,c])}}var x=t("input[type=file]:enabled",this).filter(function(){return""!==t(this).val()}),C=x.length>0,S="multipart/form-data",k=c.attr("enctype")==S||c.attr("encoding")==S,T=r.fileapi&&r.formdata;n("fileAPI :"+T);var E,A=(C||k)&&!T;e.iframe!==!1&&(e.iframe||A)?e.closeKeepAlive?t.get(e.closeKeepAlive,function(){E=a(m)}):E=a(m):E=(C||k)&&T?o(m):t.ajax(e),c.removeData("jqxhr").data("jqxhr",E);for(var N=0;Na;a++)if(c=o[a],h=c.name,h&&!c.disabled)if(e&&s.clk&&"image"==c.type)s.clk==c&&(n.push({name:h,value:t(c).val(),type:c.type}),n.push({name:h+".x",value:s.clk_x},{name:h+".y",value:s.clk_y}));else if(u=t.fieldValue(c,!0),u&&u.constructor==Array)for(i&&i.push(c),l=0,p=u.length;p>l;l++)n.push({name:h,value:u[l]});else if(r.fileapi&&"file"==c.type){i&&i.push(c);var f=c.files;if(f.length)for(l=0;ls;s++)i.push({name:n,value:r[s]});else null!==r&&"undefined"!=typeof r&&i.push({name:this.name,value:r})}}),t.param(i)},t.fn.fieldValue=function(e){for(var i=[],n=0,r=this.length;r>n;n++){var s=this[n],o=t.fieldValue(s,e);null===o||"undefined"==typeof o||o.constructor==Array&&!o.length||(o.constructor==Array?t.merge(i,o):i.push(o))}return i},t.fieldValue=function(e,i){var n=e.name,r=e.type,s=e.tagName.toLowerCase();if(void 0===i&&(i=!0),i&&(!n||e.disabled||"reset"==r||"button"==r||("checkbox"==r||"radio"==r)&&!e.checked||("submit"==r||"image"==r)&&e.form&&e.form.clk!=e||"select"==s&&-1==e.selectedIndex))return null;if("select"==s){var o=e.selectedIndex;if(0>o)return null;for(var a=[],l=e.options,h="select-one"==r,u=h?o+1:l.length,c=h?o:0;u>c;c++){var d=l[c];if(d.selected){var p=d.value;if(p||(p=d.attributes&&d.attributes.value&&!d.attributes.value.specified?d.text:d.value),h)return p;a.push(p)}}return a}return t(e).val()},t.fn.clearForm=function(e){return this.each(function(){t("input,select,textarea",this).clearFields(e)})},t.fn.clearFields=t.fn.clearInputs=function(e){var i=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var n=this.type,r=this.tagName.toLowerCase();i.test(n)||"textarea"==r?this.value="":"checkbox"==n||"radio"==n?this.checked=!1:"select"==r?this.selectedIndex=-1:"file"==n?/MSIE/.test(navigator.userAgent)?t(this).replaceWith(t(this).clone(!0)):t(this).val(""):e&&(e===!0&&/hidden/.test(n)||"string"==typeof e&&t(this).is(e))&&(this.value="")})},t.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},t.fn.enable=function(t){return void 0===t&&(t=!0),this.each(function(){this.disabled=!t})},t.fn.selected=function(e){return void 0===e&&(e=!0),this.each(function(){var i=this.type;if("checkbox"==i||"radio"==i)this.checked=e;else if("option"==this.tagName.toLowerCase()){var n=t(this).parent("select");e&&n[0]&&"select-one"==n[0].type&&n.find("option").selected(!1),this.selected=e}})},t.fn.ajaxSubmit.debug=!1}("undefined"!=typeof t?t:window.Zepto)}).call(e,i(1))},function(t,e,i){(function(t,e){t&&function(t){if(!t.support.opacity&&!t.support.style)try{document.execCommand("BackgroundImageCache",!1,!0)}catch(e){}t.fn.rating=function(e){if(0==this.length)return this;if("string"==typeof arguments[0]){if(this.length>1){var i=arguments;return this.each(function(){t.fn.rating.apply(t(this),i)})}return t.fn.rating[arguments[0]].apply(this,t.makeArray(arguments).slice(1)||[]),this}var e=t.extend({},t.fn.rating.options,e||{});return t.fn.rating.calls++,this.not(".star-rating-applied").addClass("star-rating-applied").each(function(){var i,n=t(this),r=(this.name||"unnamed-rating").replace(/\[|\]/g,"_").replace(/^\_+|\_+$/g,""),s=t(this.form||document.body),o=s.data("rating");o&&o.call==t.fn.rating.calls||(o={count:0,call:t.fn.rating.calls});var a=o[r]||s.data("rating"+r);a&&(i=a.data("rating")),a&&i?i.count++:(i=t.extend({},e||{},(t.metadata?n.metadata():t.meta?n.data():null)||{},{count:0,stars:[],inputs:[]}),i.serial=o.count++,a=t(''),n.before(a),a.addClass("rating-to-be-drawn"),(n.attr("disabled")||n.hasClass("disabled"))&&(i.readOnly=!0),n.hasClass("required")&&(i.required=!0),a.append(i.cancel=t('").on("mouseover",function(){t(this).rating("drain"),t(this).addClass("star-rating-hover")}).on("mouseout",function(){t(this).rating("draw"),t(this).removeClass("star-rating-hover")}).on("click",function(){t(this).rating("select")}).data("rating",i)));var l=t('
");if(a.append(l),this.id&&l.attr("id",this.id),this.className&&l.addClass(this.className),i.half&&(i.split=2),"number"==typeof i.split&&i.split>0){var h=(t.fn.width?l.width():0)||i.starWidth,u=i.count%i.split,c=Math.floor(h/i.split);l.width(c).find("a").css({"margin-left":"-"+u*c+"px"})}i.readOnly?l.addClass("star-rating-readonly"):l.addClass("star-rating-live").on("mouseover",function(){t(this).rating("fill"),t(this).rating("focus")}).on("mouseout",function(){t(this).rating("draw"),t(this).rating("blur")}).on("click",function(){t(this).rating("select")}),this.checked&&(i.current=l),"A"==this.nodeName&&t(this).hasClass("selected")&&(i.current=l),n.hide(),n.on("change.rating",function(e){return e.selfTriggered?!1:void t(this).rating("select")}),l.data("rating.input",n.data("rating.star",l)),i.stars[i.stars.length]=l[0],i.inputs[i.inputs.length]=n[0],i.rater=o[r]=a,i.context=s,n.data("rating",i),a.data("rating",i),l.data("rating",i),s.data("rating",o),s.data("rating"+r,a)}),t(".rating-to-be-drawn").rating("draw").removeClass("rating-to-be-drawn"),this},t.extend(t.fn.rating,{calls:0,focus:function(){var e=this.data("rating");if(!e)return this;if(!e.focus)return this;var i=t(this).data("rating.input")||t("INPUT"==this.tagName?this:null);e.focus&&e.focus.apply(i[0],[i.val(),t("a",i.data("rating.star"))[0]])},blur:function(){var e=this.data("rating");if(!e)return this;if(!e.blur)return this;var i=t(this).data("rating.input")||t("INPUT"==this.tagName?this:null);e.blur&&e.blur.apply(i[0],[i.val(),t("a",i.data("rating.star"))[0]])},fill:function(){var t=this.data("rating");return t?void(t.readOnly||(this.rating("drain"),this.prevAll().addBack().filter(".rater-"+t.serial).addClass("star-rating-hover"))):this},drain:function(){var t=this.data("rating");return t?void(t.readOnly||t.rater.children().filter(".rater-"+t.serial).removeClass("star-rating-on").removeClass("star-rating-hover")):this},draw:function(){var e=this.data("rating");if(!e)return this;this.rating("drain");var i=t(e.current),n=i.length?i.prevAll().addBack().filter(".rater-"+e.serial):null;n&&n.addClass("star-rating-on"),e.cancel[e.readOnly||e.required?"hide":"show"](),this.siblings()[e.readOnly?"addClass":"removeClass"]("star-rating-readonly")},select:function(e,i){var n=this.data("rating");if(!n)return this;if(!n.readOnly){if(n.current=null,"undefined"!=typeof e||this.length>1){if("number"==typeof e)return t(n.stars[e]).rating("select",void 0,i);if("string"==typeof e)return t.each(n.stars,function(){t(this).data("rating.input").val()==e&&t(this).rating("select",void 0,i)}),this}else n.current="INPUT"==this[0].tagName?this.data("rating.star"):this.is(".rater-"+n.serial)?this:null;this.data("rating",n),this.rating("draw");var r=t(n.current?n.current.data("rating.input"):null),s=t(n.inputs).filter(":checked"),o=t(n.inputs).not(r);return o.prop("checked",!1),r.prop("checked",!0),t(r.length?r:s).trigger({type:"change",selfTriggered:!0}),(i||void 0==i)&&n.callback&&n.callback.apply(r[0],[r.val(),t("a",n.current)[0]]),this}},readOnly:function(e,i){var n=this.data("rating");return n?(n.readOnly=!(!e&&void 0!=e),i?t(n.inputs).attr("disabled","disabled"):t(n.inputs).removeAttr("disabled"),this.data("rating",n),void this.rating("draw")):this},disable:function(){this.rating("readOnly",!0,!0)},enable:function(){this.rating("readOnly",!1,!1)}}),t.fn.rating.options={cancel:"Cancel Rating",cancelValue:"",split:0,starWidth:16},t(function(){t("input[type=radio].star").rating()})}(e)}).call(e,i(1),i(1))},function(t,e,i){(function(t){!function(t){"undefined"==typeof t.fn.each2&&t.extend(t.fn,{each2:function(e){for(var i=t([0]),n=-1,r=this.length;++ni;i+=1)if(o(t,e[i]))return i;return-1}function s(){var e=t($);e.appendTo("body");var i={width:e.width()-e[0].clientWidth,height:e.height()-e[0].clientHeight};return e.remove(),i}function o(t,i){return t===i?!0:t===e||i===e?!1:null===t||null===i?!1:t.constructor===String?t+""==i+"":i.constructor===String?i+""==t+"":!1}function a(e,i){var n,r,s;if(null===e||e.length<1)return[];for(n=e.split(i),r=0,s=n.length;s>r;r+=1)n[r]=t.trim(n[r]);return n}function l(t){return t.outerWidth(!1)-t.width()}function h(i){var n="keyup-change-value";i.on("keydown",function(){t.data(i,n)===e&&t.data(i,n,i.val())}),i.on("keyup",function(){var r=t.data(i,n);r!==e&&i.val()!==r&&(t.removeData(i,n),i.trigger("keyup-change"))})}function u(i){i.on("mousemove",function(i){var n=I;n!==e&&n.x===i.pageX&&n.y===i.pageY||t(i.target).trigger("mousemove-filtered",i)})}function c(t,i,n){n=n||e;var r;return function(){var e=arguments;window.clearTimeout(r),r=window.setTimeout(function(){i.apply(n,e)},t)}}function d(t,e){var i=c(t,function(t){e.trigger("scroll-debounced",t)});e.on("scroll",function(t){r(t.target,e.get())>=0&&i(t)})}function p(t){t[0]!==document.activeElement&&window.setTimeout(function(){var e,i=t[0],n=t.val().length;t.focus();var r=i.offsetWidth>0||i.offsetHeight>0;r&&i===document.activeElement&&(i.setSelectionRange?i.setSelectionRange(n,n):i.createTextRange&&(e=i.createTextRange(),e.collapse(!1),e.select()))},0)}function f(e){e=t(e)[0];var i=0,n=0;if("selectionStart"in e)i=e.selectionStart,n=e.selectionEnd-i;else if("selection"in document){e.focus();var r=document.selection.createRange();n=document.selection.createRange().text.length,r.moveStart("character",-e.value.length),i=r.text.length-n}return{offset:i,length:n}}function g(t){t.preventDefault(),t.stopPropagation()}function m(t){t.preventDefault(),t.stopImmediatePropagation()}function v(e){if(!j){var i=e[0].currentStyle||window.getComputedStyle(e[0],null);j=t(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:i.fontSize,fontFamily:i.fontFamily,fontStyle:i.fontStyle,fontWeight:i.fontWeight,letterSpacing:i.letterSpacing,textTransform:i.textTransform,whiteSpace:"nowrap"}),j.attr("class","select2-sizer"),t("body").append(j)}return j.text(e.val()),j.width()}function y(e,i,n){var r,s,o=[];r=t.trim(e.attr("class")),r&&(r=""+r,t(r.split(/\s+/)).each2(function(){0===this.indexOf("select2-")&&o.push(this)})),r=t.trim(i.attr("class")),r&&(r=""+r,t(r.split(/\s+/)).each2(function(){0!==this.indexOf("select2-")&&(s=n(this),s&&o.push(s))})),e.attr("class",o.join(" "))}function b(t,e,i,r){var s=n(t.toUpperCase()).indexOf(n(e.toUpperCase())),o=e.length;return 0>s?void i.push(r(t)):(i.push(r(t.substring(0,s))),i.push(""),i.push(r(t.substring(s,s+o))),i.push(""),void i.push(r(t.substring(s+o,t.length))))}function _(t){var e={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(t).replace(/[&<>"'\/\\]/g,function(t){return e[t]})}function w(i){var n,r=null,s=i.quietMillis||100,o=i.url,a=this;return function(l){window.clearTimeout(n),n=window.setTimeout(function(){var n=i.data,s=o,h=i.transport||t.fn.select2.ajaxDefaults.transport,u={type:i.type||"GET",cache:i.cache||!1,jsonpCallback:i.jsonpCallback||e,dataType:i.dataType||"json"},c=t.extend({},t.fn.select2.ajaxDefaults.params,u);n=n?n.call(a,l.term,l.page,l.context):null,s="function"==typeof s?s.call(a,l.term,l.page,l.context):s,r&&"function"==typeof r.abort&&r.abort(),i.params&&(t.isFunction(i.params)?t.extend(c,i.params.call(a)):t.extend(c,i.params)),t.extend(c,{url:s,dataType:i.dataType,data:n,success:function(t){var e=i.results(t,l.page,l);l.callback(e)},error:function(t,e,i){var n={hasError:!0,jqXHR:t,textStatus:e,errorThrown:i};l.callback(n)}}),r=h.call(a,c)},s)}}function x(e){var i,n,r=e,s=function(t){return""+t.text};t.isArray(r)&&(n=r,r={results:n}),t.isFunction(r)===!1&&(n=r,r=function(){return n});var o=r();return o.text&&(s=o.text,t.isFunction(s)||(i=o.text,s=function(t){return t[i]})),function(e){var i,n=e.term,o={results:[]};return""===n?void e.callback(r()):(i=function(r,o){var a,l;if(r=r[0],r.children){a={};for(l in r)r.hasOwnProperty(l)&&(a[l]=r[l]);a.children=[],t(r.children).each2(function(t,e){i(e,a.children)}),(a.children.length||e.matcher(n,s(a),r))&&o.push(a)}else e.matcher(n,s(r),r)&&o.push(r)},t(r().results).each2(function(t,e){i(e,o.results)}),void e.callback(o))}}function C(i){var n=t.isFunction(i);return function(r){var s=r.term,o={results:[]},a=n?i(r):i;t.isArray(a)&&(t(a).each(function(){var t=this.text!==e,i=t?this.text:this;(""===s||r.matcher(s,i))&&o.results.push(t?this:{id:this,text:this})}),r.callback(o))}}function S(e,i){if(t.isFunction(e))return!0;if(!e)return!1;if("string"==typeof e)return!0;throw new Error(i+" must be a string, function, or falsy value")}function k(e,i){if(t.isFunction(e)){var n=Array.prototype.slice.call(arguments,2);return e.apply(i,n)}return e}function T(e){var i=0;return t.each(e,function(t,e){e.children?i+=T(e.children):i++}),i}function E(t,i,n,r){var s,a,l,h,u,c=t,d=!1;if(!r.createSearchChoice||!r.tokenSeparators||r.tokenSeparators.length<1)return e;for(;;){for(a=-1,l=0,h=r.tokenSeparators.length;h>l&&(u=r.tokenSeparators[l],a=t.indexOf(u),!(a>=0));l++);if(0>a)break;if(s=t.substring(0,a),t=t.substring(a+u.length),s.length>0&&(s=r.createSearchChoice.call(this,s,i),s!==e&&null!==s&&r.id(s)!==e&&null!==r.id(s))){for(d=!1,l=0,h=i.length;h>l;l++)if(o(r.id(s),r.id(i[l]))){d=!0;break}d||n(s)}}return c!==t?t:void 0}function A(){var e=this;t.each(arguments,function(t,i){e[i].remove(),e[i]=null})}function N(e,i){var n=function(){};return n.prototype=new e,n.prototype.constructor=n,n.prototype.parent=e.prototype,n.prototype=t.extend(n.prototype,i),n}if(window.Select2===e){var O,M,D,P,R,j,L,H,I={x:0,y:0},O={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(t){switch(t=t.which?t.which:t){case O.LEFT:case O.RIGHT:case O.UP:case O.DOWN:return!0}return!1},isControl:function(t){var e=t.which;switch(e){case O.SHIFT:case O.CTRL:case O.ALT:return!0}return!!t.metaKey},isFunctionKey:function(t){return t=t.which?t.which:t,t>=112&&123>=t}},$="
",F={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};L=t(document),R=function(){var t=1;return function(){return t++}}(),M=N(Object,{bind:function(t){var e=this;return function(){t.apply(e,arguments)}},init:function(i){var n,r,o=".select2-results";this.opts=i=this.prepareOpts(i),this.id=i.id,i.element.data("select2")!==e&&null!==i.element.data("select2")&&i.element.data("select2").destroy(),this.container=this.createContainer(),this.liveRegion=t("",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body),this.containerId="s2id_"+(i.element.attr("id")||"autogen"+R()),this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.container.attr("title",i.element.attr("title")),this.body=t("body"),y(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",i.element.attr("style")),this.container.css(k(i.containerCss,this.opts.element)),this.container.addClass(k(i.containerCssClass,this.opts.element)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",g),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),y(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(k(i.dropdownCssClass,this.opts.element)),this.dropdown.data("select2",this),this.dropdown.on("click",g),this.results=n=this.container.find(o),this.search=r=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",g),u(this.results),this.dropdown.on("mousemove-filtered",o,this.bind(this.highlightUnderEvent)),this.dropdown.on("touchstart touchmove touchend",o,this.bind(function(t){this._touchEvent=!0,this.highlightUnderEvent(t)})),this.dropdown.on("touchmove",o,this.bind(this.touchMoved)),this.dropdown.on("touchstart touchend",o,this.bind(this.clearTouchMoved)),this.dropdown.on("click",this.bind(function(t){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),d(80,this.results),this.dropdown.on("scroll-debounced",o,this.bind(this.loadMoreIfNeeded)),t(this.container).on("change",".select2-input",function(t){t.stopPropagation()}),t(this.dropdown).on("change",".select2-input",function(t){t.stopPropagation()}),t.fn.mousewheel&&n.mousewheel(function(t,e,i,r){var s=n.scrollTop();r>0&&0>=s-r?(n.scrollTop(0),g(t)):0>r&&n.get(0).scrollHeight-n.scrollTop()+r<=n.height()&&(n.scrollTop(n.get(0).scrollHeight-n.height()),g(t))}),h(r),r.on("keyup-change input paste",this.bind(this.updateResults)),r.on("focus",function(){r.addClass("select2-focused")}),r.on("blur",function(){r.removeClass("select2-focused")}),this.dropdown.on("mouseup",o,this.bind(function(e){t(e.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(e),this.selectHighlighted(e))})),this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(t){t.stopPropagation()}),this.nextSearchTerm=e,t.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==i.maximumInputLength&&this.search.attr("maxlength",i.maximumInputLength);var a=i.element.prop("disabled");a===e&&(a=!1),this.enable(!a);var l=i.element.prop("readonly");l===e&&(l=!1),this.readonly(l),H=H||s(),this.autofocus=i.element.prop("autofocus"),i.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.search.attr("placeholder",i.searchInputPlaceholder)},destroy:function(){var t=this.opts.element,i=t.data("select2"),n=this;this.close(),t.length&&t[0].detachEvent&&t.each(function(){this.detachEvent("onpropertychange",n._sync)}),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),this._sync=null,i!==e&&(i.container.remove(),i.liveRegion.remove(),i.dropdown.remove(),t.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?t.attr({tabindex:this.elementTabIndex}):t.removeAttr("tabindex"),t.show()),A.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(t){return t.is("option")?{id:t.prop("value"),text:t.text(),element:t.get(),css:t.attr("class"),disabled:t.prop("disabled"),locked:o(t.attr("locked"),"locked")||o(t.data("locked"),!0)}:t.is("optgroup")?{text:t.attr("label"),children:[],element:t.get(),css:t.attr("class")}:void 0},prepareOpts:function(i){var n,r,s,l,h=this;if(n=i.element,"select"===n.get(0).tagName.toLowerCase()&&(this.select=r=i.element),r&&t.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in i)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a ","
"," ","
    ","
","
"].join(""));return e},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var i,n,r;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),i=this.search.get(0),i.createTextRange?(n=i.createTextRange(),n.collapse(!1),n.select()):i.setSelectionRange&&(r=this.search.val().length,i.setSelectionRange(r,r))),""===this.search.val()&&this.nextSearchTerm!=e&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(t.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){t("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),A.call(this,"selection","focusser")},initContainer:function(){var e,n,r=this.container,s=this.dropdown,o=R();this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=e=r.find(".select2-choice"),this.focusser=r.find(".select2-focusser"),e.find(".select2-chosen").attr("id","select2-chosen-"+o),this.focusser.attr("aria-labelledby","select2-chosen-"+o),this.results.attr("id","select2-results-"+o),this.search.attr("aria-owns","select2-results-"+o),this.focusser.attr("id","s2id_autogen"+o),n=t("label[for='"+this.opts.element.attr("id")+"']"),this.focusser.prev().text(n.text()).attr("for",this.focusser.attr("id"));var a=this.opts.element.attr("title");this.opts.element.attr("title",a||n.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text(t("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(t){if(this.isInterfaceEnabled()&&229!=t.keyCode){if(t.which===O.PAGE_UP||t.which===O.PAGE_DOWN)return void g(t);switch(t.which){case O.UP:case O.DOWN:return this.moveHighlight(t.which===O.UP?-1:1),void g(t);case O.ENTER:return this.selectHighlighted(),void g(t);case O.TAB:return void this.selectHighlighted({noFocus:!0});case O.ESC:return this.cancel(t),void g(t)}}})),this.search.on("blur",this.bind(function(t){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(t){if(this.isInterfaceEnabled()&&t.which!==O.TAB&&!O.isControl(t)&&!O.isFunctionKey(t)&&t.which!==O.ESC){if(this.opts.openOnEnter===!1&&t.which===O.ENTER)return void g(t);if(t.which==O.DOWN||t.which==O.UP||t.which==O.ENTER&&this.opts.openOnEnter){if(t.altKey||t.ctrlKey||t.shiftKey||t.metaKey)return;return this.open(),void g(t)}return t.which==O.DELETE||t.which==O.BACKSPACE?(this.opts.allowClear&&this.clear(),void g(t)):void 0}})),h(this.focusser),this.focusser.on("keyup-change input",this.bind(function(t){if(this.opts.minimumResultsForSearch>=0){if(t.stopPropagation(),this.opened())return;this.open()}})),e.on("mousedown touchstart","abbr",this.bind(function(t){this.isInterfaceEnabled()&&(this.clear(),m(t),this.close(),this.selection.focus())})),e.on("mousedown touchstart",this.bind(function(n){i(e),this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),g(n)})),s.on("mousedown touchstart",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()})),e.on("focus",this.bind(function(t){g(t)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(t.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(e){var i=this.selection.data("select2-data");if(i){var n=t.Event("select2-clearing");if(this.opts.element.trigger(n),n.isDefaultPrevented())return;var r=this.getPlaceholderOption();this.opts.element.val(r?r.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),e!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(i),choice:i}),this.triggerChange({removed:i}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var t=this;this.opts.initSelection.call(null,this.opts.element,function(i){i!==e&&null!==i&&(t.updateSelection(i),t.close(),t.setPlaceholder(),t.nextSearchTerm=t.opts.nextSearchTerm(i,t.search.val()))})}},isPlaceholderOptionSelected:function(){var t;return this.getPlaceholder()===e?!1:(t=this.getPlaceholderOption())!==e&&t.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===e||null===this.opts.element.val()},prepareOpts:function(){var e=this.parent.prepareOpts.apply(this,arguments),i=this;return"select"===e.element.get(0).tagName.toLowerCase()?e.initSelection=function(t,e){var n=t.find("option").filter(function(){return this.selected&&!this.disabled});e(i.optionToData(n))}:"data"in e&&(e.initSelection=e.initSelection||function(i,n){var r=i.val(),s=null;e.query({matcher:function(t,i,n){var a=o(r,e.id(n));return a&&(s=n),a},callback:t.isFunction(n)?function(){n(s)}:t.noop})}),e},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===e?e:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var t=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&t!==e){if(this.select&&this.getPlaceholderOption()===e)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(t)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(t,e,i){var n=0,r=this;if(this.findHighlightableChoices().each2(function(t,e){return o(r.id(e.data("select2-data")),r.opts.element.val())?(n=t,!1):void 0}),i!==!1&&(e===!0&&n>=0?this.highlight(n):this.highlight(0)),e===!0){var s=this.opts.minimumResultsForSearch;s>=0&&this.showSearch(T(t.results)>=s)}},showSearch:function(e){this.showSearchInput!==e&&(this.showSearchInput=e,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!e),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!e),t(this.dropdown,this.container).toggleClass("select2-with-searchbox",e))},onSelect:function(t,e){if(this.triggerSelect(t)){var i=this.opts.element.val(),n=this.data();this.opts.element.val(this.id(t)),this.updateSelection(t),this.opts.element.trigger({type:"select2-selected",val:this.id(t),choice:t}),this.nextSearchTerm=this.opts.nextSearchTerm(t,this.search.val()),this.close(),e&&e.noFocus||!this.opts.shouldFocusInput(this)||this.focusser.focus(),o(i,this.id(t))||this.triggerChange({added:t,removed:n})}},updateSelection:function(t){var i,n,r=this.selection.find(".select2-chosen");this.selection.data("select2-data",t),r.empty(),null!==t&&(i=this.opts.formatSelection(t,r,this.opts.escapeMarkup)),i!==e&&r.append(i),n=this.opts.formatSelectionCssClass(t,r),n!==e&&r.addClass(n),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==e&&this.container.addClass("select2-allowclear")},val:function(){var t,i=!1,n=null,r=this,s=this.data();if(0===arguments.length)return this.opts.element.val();if(t=arguments[0],arguments.length>1&&(i=arguments[1]),this.select)this.select.val(t).find("option").filter(function(){return this.selected}).each2(function(t,e){return n=r.optionToData(e),!1}),this.updateSelection(n),this.setPlaceholder(),i&&this.triggerChange({added:n,removed:s});else{if(!t&&0!==t)return void this.clear(i);if(this.opts.initSelection===e)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(t),this.opts.initSelection(this.opts.element,function(t){r.opts.element.val(t?r.id(t):""),r.updateSelection(t),r.setPlaceholder(),i&&r.triggerChange({added:t,removed:s})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(t){var i,n=!1;return 0===arguments.length?(i=this.selection.data("select2-data"),i==e&&(i=null),i):(arguments.length>1&&(n=arguments[1]),void(t?(i=this.data(),this.opts.element.val(t?this.id(t):""),this.updateSelection(t),n&&this.triggerChange({added:t,removed:i})):this.clear(n)))}}),P=N(M,{createContainer:function(){var e=t(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html(["
    ","
  • "," "," ","
  • ","
","
","
    ","
","
"].join(""));return e},prepareOpts:function(){var e=this.parent.prepareOpts.apply(this,arguments),i=this;return"select"===e.element.get(0).tagName.toLowerCase()?e.initSelection=function(t,e){var n=[];t.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(t,e){n.push(i.optionToData(e))}),e(n)}:"data"in e&&(e.initSelection=e.initSelection||function(i,n){var r=a(i.val(),e.separator),s=[];e.query({matcher:function(i,n,a){var l=t.grep(r,function(t){return o(t,e.id(a))}).length;return l&&s.push(a),l},callback:t.isFunction(n)?function(){for(var t=[],i=0;i0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.open(),this.focusSearch(),e.preventDefault()))})),this.container.on("focus",i,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var t=this;this.opts.initSelection.call(null,this.opts.element,function(i){i!==e&&null!==i&&(t.updateSelection(i),t.close(),t.clearSearch())})}},clearSearch:function(){var t=this.getPlaceholder(),i=this.getMaxSearchWidth();t!==e&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(t).addClass("select2-default"),this.search.width(i>0?i:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),""===this.search.val()&&this.nextSearchTerm!=e&&(this.search.val(this.nextSearchTerm),this.search.select()),this.updateResults(!0),this.opts.shouldFocusInput(this)&&this.search.focus(),this.opts.element.trigger(t.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(e){var i=[],n=[],s=this;t(e).each(function(){r(s.id(this),i)<0&&(i.push(s.id(this)),n.push(this))}),e=n,this.selection.find(".select2-search-choice").remove(),t(e).each(function(){s.addSelectedChoice(this)}),s.postprocessResults()},tokenize:function(){var t=this.search.val();t=this.opts.tokenizer.call(this,t,this.data(),this.bind(this.onSelect),this.opts),null!=t&&t!=e&&(this.search.val(t),t.length>0&&this.open())},onSelect:function(t,i){this.triggerSelect(t)&&""!==t.text&&(this.addSelectedChoice(t),this.opts.element.trigger({type:"selected",val:this.id(t),choice:t}),this.nextSearchTerm=this.opts.nextSearchTerm(t,this.search.val()),this.moveHighlight(1),!this.select&&this.opts.closeOnSelect||this.postprocessResults(t,!1,this.opts.closeOnSelect===!0),this.opts.closeOnSelect?(this.clearSearch(),this.updateResults(),this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=e&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:t}),i&&i.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(i){var n,r,s=!i.locked,o=t("
  • "),a=t("
  • "),l=s?o:a,h=this.id(i),u=this.getVal();n=this.opts.formatSelection(i,l.find("div"),this.opts.escapeMarkup),n!=e&&l.find("div").replaceWith("
    "+n+"
    "),r=this.opts.formatSelectionCssClass(i,l.find("div")),r!=e&&l.addClass(r),s&&l.find(".select2-search-choice-close").on("mousedown",g).on("click dblclick",this.bind(function(e){this.isInterfaceEnabled()&&(this.unselect(t(e.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),g(e),this.close(),this.focusSearch())})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),l.data("select2-data",i),l.insertBefore(this.searchContainer),u.push(h),this.setVal(u)},unselect:function(e){var i,n,s=this.getVal();if(e=e.closest(".select2-search-choice"),0===e.length)throw"Invalid argument: "+e+". Must be .select2-search-choice"; -if(i=e.data("select2-data")){var o=t.Event("select2-removing");if(o.val=this.id(i),o.choice=i,this.opts.element.trigger(o),o.isDefaultPrevented())return!1;for(;(n=r(this.id(i),s))>=0;)s.splice(n,1),this.setVal(s),this.select&&this.postprocessResults();return e.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(i),choice:i}),this.triggerChange({removed:i}),!0}},postprocessResults:function(t,e,i){var n=this.getVal(),s=this.results.find(".select2-result"),o=this.results.find(".select2-result-with-children"),a=this;s.each2(function(t,e){var i=a.id(e.data("select2-data"));r(i,n)>=0&&(e.addClass("select2-selected"),e.find(".select2-result-selectable").addClass("select2-selected"))}),o.each2(function(t,e){e.is(".select2-result-selectable")||0!==e.find(".select2-result-selectable:not(.select2-selected)").length||e.addClass("select2-selected")}),-1==this.highlight()&&i!==!1&&a.highlight(0),!this.opts.createSearchChoice&&!s.filter(".select2-result:not(.select2-selected)").length>0&&(!t||t&&!t.more&&0===this.results.find(".select2-no-results").length)&&S(a.opts.formatNoMatches,"formatNoMatches")&&this.results.append("
  • "+k(a.opts.formatNoMatches,a.opts.element,a.search.val())+"
  • ")},getMaxSearchWidth:function(){return this.selection.width()-l(this.search)},resizeSearch:function(){var t,e,i,n,r,s=l(this.search);t=v(this.search)+10,e=this.search.offset().left,i=this.selection.width(),n=this.selection.offset().left,r=i-(e-n)-s,t>r&&(r=i-s),40>r&&(r=i-s),0>=r&&(r=t),this.search.width(Math.floor(r))},getVal:function(){var t;return this.select?(t=this.select.val(),null===t?[]:t):(t=this.opts.element.val(),a(t,this.opts.separator))},setVal:function(e){var i;this.select?this.select.val(e):(i=[],t(e).each(function(){r(this,i)<0&&i.push(this)}),this.opts.element.val(0===i.length?"":i.join(this.opts.separator)))},buildChangeDetails:function(t,e){for(var e=e.slice(0),t=t.slice(0),i=0;i0&&i--,t.splice(n,1),n--);return{added:e,removed:t}},val:function(i,n){var r,s=this;if(0===arguments.length)return this.getVal();if(r=this.data(),r.length||(r=[]),!i&&0!==i)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),void(n&&this.triggerChange({added:this.data(),removed:r}));if(this.setVal(i),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),n&&this.triggerChange(this.buildChangeDetails(r,this.data()));else{if(this.opts.initSelection===e)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(e){var i=t.map(e,s.id);s.setVal(i),s.updateSelection(e),s.clearSearch(),n&&s.triggerChange(s.buildChangeDetails(r,s.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var e=[],i=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){e.push(i.opts.id(t(this).data("select2-data")))}),this.setVal(e),this.triggerChange()},data:function(e,i){var n,r,s=this;return 0===arguments.length?this.selection.children(".select2-search-choice").map(function(){return t(this).data("select2-data")}).get():(r=this.data(),e||(e=[]),n=t.map(e,function(t){return s.opts.id(t)}),this.setVal(n),this.updateSelection(e),this.clearSearch(),i&&this.triggerChange(this.buildChangeDetails(r,this.data())),void 0)}}),t.fn.select2=function(){var i,n,s,o,a,l=Array.prototype.slice.call(arguments,0),h=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],u=["opened","isFocused","container","dropdown"],c=["val","data"],d={search:"externalSearch"};return this.each(function(){if(0===l.length||"object"==typeof l[0])i=0===l.length?{}:t.extend({},l[0]),i.element=t(this),"select"===i.element.get(0).tagName.toLowerCase()?a=i.element.prop("multiple"):(a=i.multiple||!1,"tags"in i&&(i.multiple=a=!0)),n=a?new window.Select2["class"].multi:new window.Select2["class"].single,n.init(i);else{if("string"!=typeof l[0])throw"Invalid arguments to select2 plugin: "+l;if(r(l[0],h)<0)throw"Unknown method: "+l[0];if(o=e,n=t(this).data("select2"),n===e)return;if(s=l[0],"container"===s?o=n.container:"dropdown"===s?o=n.dropdown:(d[s]&&(s=d[s]),o=n[s].apply(n,l.slice(1))),r(l[0],u)>=0||r(l[0],c)>=0&&1==l.length)return!1}}),o===e?this:o},t.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(t,e,i,n){var r=[];return b(t.text,i.term,r,n),r.join("")},formatSelection:function(t,i,n){return t?n(t.text):e},sortResults:function(t,e,i){return t},formatResultCssClass:function(t){return t.css},formatSelectionCssClass:function(t,i){return e},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(t){return t==e?null:t.id},matcher:function(t,e){return n(""+e).toUpperCase().indexOf(n(""+t).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:E,escapeMarkup:_,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(t){return t},adaptDropdownCssClass:function(t){return null},nextSearchTerm:function(t,i){return e},searchInputPlaceholder:"",createSearchChoicePosition:"top",shouldFocusInput:function(t){var e="ontouchstart"in window||navigator.msMaxTouchPoints>0;return e?!(t.opts.minimumResultsForSearch<0):!0}},t.fn.select2.locales=[],t.fn.select2.locales.en={formatMatches:function(t){return 1===t?"One result is available, press enter to select it.":t+" results are available, use up and down arrow keys to navigate."},formatNoMatches:function(){return"No matches found"},formatAjaxError:function(t,e,i){return"Loading failed"},formatInputTooShort:function(t,e){var i=e-t.length;return"Please enter "+i+" or more character"+(1==i?"":"s")},formatInputTooLong:function(t,e){var i=t.length-e;return"Please delete "+i+" character"+(1==i?"":"s")},formatSelectionTooBig:function(t){return"You can only select "+t+" item"+(1==t?"":"s")},formatLoadMore:function(t){return"Loading more results…"},formatSearching:function(){return"Searching…"}},t.extend(t.fn.select2.defaults,t.fn.select2.locales.en),t.fn.select2.ajaxDefaults={transport:t.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:w,local:x,tags:C},util:{debounce:c,markMatch:b,escapeMarkup:_,stripDiacritics:n},"class":{"abstract":M,single:D,multi:P}}}}(t)}).call(e,i(1))},,,,,,,,,,,,,function(t,e,i){var n,r;n=[i(2),i(3),i(6),i(5)],r=function(t,e,i,n){"use strict";var r="user",s=e.Model.extend(i.LoggableMixin).extend({_logNamespace:r,urlRoot:function(){return Galaxy.root+"api/users"},defaults:{id:null,username:"("+n("anonymous user")+")",email:"",total_disk_usage:0,nice_total_disk_usage:"",quota_percent:null,is_admin:!1},initialize:function(t){this.log("User.initialize:",t),this.on("loaded",function(t,e){this.log(this+" has loaded:",t,e)}),this.on("change",function(t,e){this.log(this+" has changed:",t,e.changes)})},isAnonymous:function(){return!this.get("email")},isAdmin:function(){return this.get("is_admin")},loadFromApi:function(t,i){t=t||s.CURRENT_ID_STR,i=i||{};var n=this,r=i.success;return i.success=function(t,e){n.trigger("loaded",t,e),r&&r(t,e)},t===s.CURRENT_ID_STR&&(i.url=this.urlRoot+"/"+s.CURRENT_ID_STR),e.Model.prototype.fetch.call(this,i)},clearSessionStorage:function(){for(var t in sessionStorage)0===t.indexOf("history:")?sessionStorage.removeItem(t):"history-panel"===t&&sessionStorage.removeItem(t)},toString:function(){var t=[this.get("username")];return this.get("id")&&(t.unshift(this.get("id")),t.push(this.get("email"))),"User("+t.join(":")+")"}});s.CURRENT_ID_STR="current",s.getCurrentUserFromApi=function(t){var e=new s;return e.loadFromApi(s.CURRENT_ID_STR,t),e};e.Collection.extend(i.LoggableMixin).extend({model:s,urlRoot:function(){return Galaxy.root+"api/users"}});return{User:s}}.apply(e,n),!(void 0!==r&&(t.exports=r))},function(t,e,i){var n,r,s;(function(o){!function(o){r=[i(1)],n=o,s="function"==typeof n?n.apply(e,r):n,!(void 0!==s&&(t.exports=s))}(function(t){"use_strict";function e(t,e){i(t).find(".tag-name").each(function(){i(this).click(function(){var t=i(this).text(),n=t.split(":");return e(n[0],n[1]),!0})})}var i=t;return t.fn.autocomplete_tagging=function(n){function r(t){i(t).mouseenter(function(){i(this).attr("src",l.delete_tag_img_rollover)}),i(t).mouseleave(function(){i(this).attr("src",l.delete_tag_img)}),i(t).click(function(){var e=i(this).parent(),n=e.find(".tag-name").eq(0),r=n.text(),s=r.split(":"),o=s[0],a=s[1],h=e.prev();e.remove(),delete l.tags[o];var d=l.get_toggle_link_text_fn(l.tags);return c.text(d),i.ajax({url:l.ajax_delete_tag_url,data:{tag_name:o},error:function(){l.tags[o]=a,h.hasClass("tag-button")?h.after(e):u.prepend(e),alert("Remove tag failed"),c.text(l.get_toggle_link_text_fn(l.tags)),t.mouseenter(function(){i(this).attr("src",l.delete_tag_img_rollover)}),t.mouseleave(function(){i(this).attr("src",l.delete_tag_img)})},success:function(){}}),!0})}function s(t){var e=i("").attr("src",l.delete_tag_img).addClass("delete-tag-img");r(e);var n=i("").text(t).addClass("tag-name");n.click(function(){var e=t.split(":");return l.tag_click_fn(e[0],e[1]),!0});var s=i("").addClass("tag-button");return s.append(n),l.editable&&s.append(e),s}var a={get_toggle_link_text_fn:function(t){var e="",i=o.size(t);return e=i>0?i+(i>1?" Tags":" Tag"):"Add tags"},tag_click_fn:function(t,e){},editable:!0,input_size:20,in_form:!1,tags:{},use_toggle_link:!0,item_id:"",add_tag_img:"",add_tag_img_rollover:"",delete_tag_img:"",ajax_autocomplete_tag_url:"",ajax_retag_url:"",ajax_delete_tag_url:"",ajax_add_tag_url:""},l=t.extend(a,n),h=i(this),u=h.find(".tag-area"),c=h.find(".toggle-link"),d=h.find(".tag-input"),p=h.find(".add-tag-button");c.click(function(){var t;return t=u.is(":hidden")?function(){var t=i(this).find(".tag-button").length;0===t&&u.click()}:function(){u.blur()},u.slideToggle("fast",t),i(this)}),l.editable&&d.hide(),d.keyup(function(t){if(27===t.keyCode)i(this).trigger("blur");else if(13===t.keyCode||188===t.keyCode||32===t.keyCode){var e=this.value;if(-1!==e.indexOf(": ",e.length-2))return this.value=e.substring(0,e.length-1),!1;if(188!==t.keyCode&&32!==t.keyCode||(e=e.substring(0,e.length-1)),e=i.trim(e),e.length<2)return!1;this.value="";var n=s(e),r=u.children(".tag-button");if(0!==r.length){var o=r.slice(r.length-1);o.after(n)}else u.prepend(n);var a=e.split(":");l.tags[a[0]]=a[1];var h=l.get_toggle_link_text_fn(l.tags);c.text(h);var d=i(this);return i.ajax({url:l.ajax_add_tag_url,data:{new_tag:e},error:function(){n.remove(),delete l.tags[a[0]];var t=l.get_toggle_link_text_fn(l.tags);c.text(t),alert("Add tag failed")},success:function(){d.data("autocompleter").cacheFlush()}}),!1}});var f=function(t,e,i,n,r){var s=n.split(":");return 1===s.length?s[0]:s[1]},g={selectFirst:!1,formatItem:f,autoFill:!1,highlight:!1};d.autocomplete(l.ajax_autocomplete_tag_url,g),h.find(".delete-tag-img").each(function(){r(i(this))}),e(i(this),l.tag_click_fn),p.click(function(){return i(this).hide(),u.click(),!1}),l.editable&&(u.bind("blur",function(t){o.size(l.tags)>0&&(p.show(),d.hide(),u.removeClass("active-tag-area"))}),u.click(function(t){var e=i(this).hasClass("active-tag-area");if(i(t.target).hasClass("delete-tag-img")&&!e)return!1;if(i(t.target).hasClass("tag-name")&&!e)return!1;i(this).addClass("active-tag-area"),p.hide(),d.show(),d.focus();var n=function(t){var e=function(t,e){t.attr("id");e!==t&&(t.blur(),i(window).unbind("click.tagging_blur"),i(this).addClass("tooltip"))};e(u,i(t.target))};return i(window).bind("click.tagging_blur",n),!1})),l.use_toggle_link&&u.hide()},e})}).call(e,i(2))},,,function(t,e,i){var n,r;n=[],r=function(){function t(t,i){var n=void 0!==t.prototype?t.prototype:t;return void 0!==i&&(n._logNamespace=i),e.forEach(function(t){n[t]=function(){return this.logger?this.logger.emit?this.logger.emit(t,this._logNamespace,arguments):this.logger[t]?this.logger[t].apply(this.logger,arguments):void 0:void 0}}),t}var e=["log","debug","info","warn","error","metric"];return t}.apply(e,n),!(void 0!==r&&(t.exports=r))},,,,,function(t,e,i){var n,r;(function(s,o){n=[i(4),i(89),i(90),i(115)],r=function(t,e,i,n){var r=s.View.extend({initialize:function(t){var r=this;this.options=t,this.setElement(this._template()),this.$navbarBrandLink=this.$(".navbar-brand-link"),this.$navbarBrandImage=this.$(".navbar-brand-image"),this.$navbarBrandTitle=this.$(".navbar-brand-title"),this.$navbarTabs=this.$(".navbar-tabs"),this.$quoteMeter=this.$(".quota-meter-container"),this.collection=new e.Collection,this.collection.on("add",function(t){r.$navbarTabs.append(new e.Tab({model:t}).render().$el)}).on("reset",function(){r.$navbarTabs.empty()}).on("dispatch",function(t){r.collection.each(function(e){t(e)})}).fetch(this.options),Galaxy.frame=this.frame=new i({collection:this.collection}),Galaxy.quotaMeter=this.quotaMeter=new n.UserQuotaMeter({model:Galaxy.user,el:this.$quoteMeter}),o(window).on("click",function(t){var e=o(t.target).closest("a[download]");1==e.length&&(0===o("iframe[id=download]").length&&o("body").append(o("
    \"\n\t )\n\t });\n\t modal.show( { backdrop: true } );\n\t}\n\t\n\t\n\t// ============================================================================\n\t return {\n\t Modal : Modal,\n\t hide_modal : hide_modal,\n\t show_modal : show_modal,\n\t show_message : show_message,\n\t show_in_overlay : show_in_overlay,\n\t };\n\t}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n\n/***/ },\n/* 60 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(Backbone, _, $) {!(__WEBPACK_AMD_DEFINE_ARRAY__ = [\n\t __webpack_require__(88),\n\t __webpack_require__(11),\n\t __webpack_require__(8),\n\t __webpack_require__(6)\n\t], __WEBPACK_AMD_DEFINE_RESULT__ = function( Masthead, Panel, Modal, BaseMVC ) {\n\t\n\t// ============================================================================\n\tvar PageLayoutView = Backbone.View.extend( BaseMVC.LoggableMixin ).extend({\n\t _logNamespace : 'layout',\n\t\n\t el : 'body',\n\t className : 'full-content',\n\t\n\t _panelIds : [\n\t 'left', 'center', 'right'\n\t ],\n\t\n\t defaultOptions : {\n\t message_box_visible : false,\n\t message_box_content : '',\n\t message_box_class : 'info',\n\t show_inactivity_warning : false,\n\t inactivity_box_content : ''\n\t },\n\t\n\t initialize : function( options ) {\n\t // TODO: remove globals\n\t this.log( this + '.initialize:', options );\n\t _.extend( this, _.pick( options, this._panelIds ) );\n\t this.options = _.defaults( _.omit( options.config, this._panelIds ), this.defaultOptions );\n\t Galaxy.modal = this.modal = new Modal.View();\n\t this.masthead = new Masthead.View( this.options );\n\t this.$el.attr( 'scroll', 'no' );\n\t this.$el.html( this._template() );\n\t this.$el.append( this.masthead.frame.$el );\n\t this.$( '#masthead' ).replaceWith( this.masthead.$el );\n\t this.$el.append( this.modal.$el );\n\t this.$messagebox = this.$( '#messagebox' );\n\t this.$inactivebox = this.$( '#inactivebox' );\n\t },\n\t\n\t render : function() {\n\t // TODO: Remove this line after select2 update\n\t $( '.select2-hidden-accessible' ).remove();\n\t this.log( this + '.render:' );\n\t this.masthead.render();\n\t this.renderMessageBox();\n\t this.renderInactivityBox();\n\t this.renderPanels();\n\t return this;\n\t },\n\t\n\t /** Render message box */\n\t renderMessageBox : function() {\n\t if ( this.options.message_box_visible ){\n\t var content = this.options.message_box_content || '';\n\t var level = this.options.message_box_class || 'info';\n\t this.$el.addClass( 'has-message-box' );\n\t this.$messagebox\n\t .attr( 'class', 'panel-' + level + '-message' )\n\t .html( content )\n\t .toggle( !!content )\n\t .show();\n\t } else {\n\t this.$el.removeClass( 'has-message-box' );\n\t this.$messagebox.hide();\n\t }\n\t return this;\n\t },\n\t\n\t /** Render inactivity warning */\n\t renderInactivityBox : function() {\n\t if( this.options.show_inactivity_warning ){\n\t var content = this.options.inactivity_box_content || '';\n\t var verificationLink = $( '' ).attr( 'href', Galaxy.root + 'user/resend_verification' ).text( 'Resend verification' );\n\t this.$el.addClass( 'has-inactivity-box' );\n\t this.$inactivebox\n\t .html( content + ' ' )\n\t .append( verificationLink )\n\t .toggle( !!content )\n\t .show();\n\t } else {\n\t this.$el.removeClass( 'has-inactivity-box' );\n\t this.$inactivebox.hide();\n\t }\n\t return this;\n\t },\n\t\n\t /** Render panels */\n\t renderPanels : function() {\n\t var page = this;\n\t this._panelIds.forEach( function( panelId ){\n\t if( _.has( page, panelId ) ){\n\t page[ panelId ].setElement( '#' + panelId );\n\t page[ panelId ].render();\n\t }\n\t });\n\t if( !this.left ){\n\t this.center.$el.css( 'left', 0 );\n\t }\n\t if( !this.right ){\n\t this.center.$el.css( 'right', 0 );\n\t }\n\t return this;\n\t },\n\t\n\t /** body template */\n\t _template: function() {\n\t return [\n\t '
    ',\n\t '
    ',\n\t '
    ',\n\t '
    ',\n\t '
    ',\n\t this.left? '
    ' : '',\n\t this.center? '
    ' : '',\n\t this.right? '
    ' : '',\n\t '
    ',\n\t '
    ',\n\t ].join('');\n\t },\n\t\n\t /** hide both side panels if previously shown */\n\t hideSidePanels : function(){\n\t if( this.left ){\n\t this.left.hide();\n\t }\n\t if( this.right ){\n\t this.right.hide();\n\t }\n\t },\n\t\n\t toString : function() { return 'PageLayoutView'; }\n\t});\n\t\n\t// ============================================================================\n\t return {\n\t PageLayoutView: PageLayoutView\n\t };\n\t}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(2), __webpack_require__(1)))\n\n/***/ },\n/* 61 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(jQuery) {/* ========================================================================\n\t * bootstrap-tour - v0.10.2\n\t * http://bootstraptour.com\n\t * ========================================================================\n\t * Copyright 2012-2015 Ulrich Sossou\n\t *\n\t * ========================================================================\n\t * Licensed under the MIT License (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t * https://opensource.org/licenses/MIT\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t * ========================================================================\n\t */\n\t\n\t(function($, window) {\n\t var Tour, document;\n\t document = window.document;\n\t Tour = (function() {\n\t function Tour(options) {\n\t var storage;\n\t try {\n\t storage = window.localStorage;\n\t } catch (_error) {\n\t storage = false;\n\t }\n\t this._options = $.extend({\n\t name: 'tour',\n\t steps: [],\n\t container: 'body',\n\t autoscroll: true,\n\t keyboard: true,\n\t storage: storage,\n\t debug: false,\n\t backdrop: false,\n\t backdropContainer: 'body',\n\t backdropPadding: 0,\n\t redirect: true,\n\t orphan: false,\n\t duration: false,\n\t delay: false,\n\t basePath: '',\n\t template: '

    ',\n\t afterSetState: function(key, value) {},\n\t afterGetState: function(key, value) {},\n\t afterRemoveState: function(key) {},\n\t onStart: function(tour) {},\n\t onEnd: function(tour) {},\n\t onShow: function(tour) {},\n\t onShown: function(tour) {},\n\t onHide: function(tour) {},\n\t onHidden: function(tour) {},\n\t onNext: function(tour) {},\n\t onPrev: function(tour) {},\n\t onPause: function(tour, duration) {},\n\t onResume: function(tour, duration) {},\n\t onRedirectError: function(tour) {}\n\t }, options);\n\t this._force = false;\n\t this._inited = false;\n\t this._current = null;\n\t this.backdrop = {\n\t overlay: null,\n\t $element: null,\n\t $background: null,\n\t backgroundShown: false,\n\t overlayElementShown: false\n\t };\n\t this;\n\t }\n\t\n\t Tour.prototype.addSteps = function(steps) {\n\t var step, _i, _len;\n\t for (_i = 0, _len = steps.length; _i < _len; _i++) {\n\t step = steps[_i];\n\t this.addStep(step);\n\t }\n\t return this;\n\t };\n\t\n\t Tour.prototype.addStep = function(step) {\n\t this._options.steps.push(step);\n\t return this;\n\t };\n\t\n\t Tour.prototype.getStep = function(i) {\n\t if (this._options.steps[i] != null) {\n\t return $.extend({\n\t id: \"step-\" + i,\n\t path: '',\n\t host: '',\n\t placement: 'right',\n\t title: '',\n\t content: '

    ',\n\t next: i === this._options.steps.length - 1 ? -1 : i + 1,\n\t prev: i - 1,\n\t animation: true,\n\t container: this._options.container,\n\t autoscroll: this._options.autoscroll,\n\t backdrop: this._options.backdrop,\n\t backdropContainer: this._options.backdropContainer,\n\t backdropPadding: this._options.backdropPadding,\n\t redirect: this._options.redirect,\n\t reflexElement: this._options.steps[i].element,\n\t orphan: this._options.orphan,\n\t duration: this._options.duration,\n\t delay: this._options.delay,\n\t template: this._options.template,\n\t onShow: this._options.onShow,\n\t onShown: this._options.onShown,\n\t onHide: this._options.onHide,\n\t onHidden: this._options.onHidden,\n\t onNext: this._options.onNext,\n\t onPrev: this._options.onPrev,\n\t onPause: this._options.onPause,\n\t onResume: this._options.onResume,\n\t onRedirectError: this._options.onRedirectError\n\t }, this._options.steps[i]);\n\t }\n\t };\n\t\n\t Tour.prototype.init = function(force) {\n\t this._force = force;\n\t if (this.ended()) {\n\t this._debug('Tour ended, init prevented.');\n\t return this;\n\t }\n\t this.setCurrentStep();\n\t this._initMouseNavigation();\n\t this._initKeyboardNavigation();\n\t this._onResize((function(_this) {\n\t return function() {\n\t return _this.showStep(_this._current);\n\t };\n\t })(this));\n\t if (this._current !== null) {\n\t this.showStep(this._current);\n\t }\n\t this._inited = true;\n\t return this;\n\t };\n\t\n\t Tour.prototype.start = function(force) {\n\t var promise;\n\t if (force == null) {\n\t force = false;\n\t }\n\t if (!this._inited) {\n\t this.init(force);\n\t }\n\t if (this._current === null) {\n\t promise = this._makePromise(this._options.onStart != null ? this._options.onStart(this) : void 0);\n\t this._callOnPromiseDone(promise, this.showStep, 0);\n\t }\n\t return this;\n\t };\n\t\n\t Tour.prototype.next = function() {\n\t var promise;\n\t promise = this.hideStep(this._current);\n\t return this._callOnPromiseDone(promise, this._showNextStep);\n\t };\n\t\n\t Tour.prototype.prev = function() {\n\t var promise;\n\t promise = this.hideStep(this._current);\n\t return this._callOnPromiseDone(promise, this._showPrevStep);\n\t };\n\t\n\t Tour.prototype.goTo = function(i) {\n\t var promise;\n\t promise = this.hideStep(this._current);\n\t return this._callOnPromiseDone(promise, this.showStep, i);\n\t };\n\t\n\t Tour.prototype.end = function() {\n\t var endHelper, promise;\n\t endHelper = (function(_this) {\n\t return function(e) {\n\t $(document).off(\"click.tour-\" + _this._options.name);\n\t $(document).off(\"keyup.tour-\" + _this._options.name);\n\t $(window).off(\"resize.tour-\" + _this._options.name);\n\t _this._setState('end', 'yes');\n\t _this._inited = false;\n\t _this._force = false;\n\t _this._clearTimer();\n\t if (_this._options.onEnd != null) {\n\t return _this._options.onEnd(_this);\n\t }\n\t };\n\t })(this);\n\t promise = this.hideStep(this._current);\n\t return this._callOnPromiseDone(promise, endHelper);\n\t };\n\t\n\t Tour.prototype.ended = function() {\n\t return !this._force && !!this._getState('end');\n\t };\n\t\n\t Tour.prototype.restart = function() {\n\t this._removeState('current_step');\n\t this._removeState('end');\n\t this._removeState('redirect_to');\n\t return this.start();\n\t };\n\t\n\t Tour.prototype.pause = function() {\n\t var step;\n\t step = this.getStep(this._current);\n\t if (!(step && step.duration)) {\n\t return this;\n\t }\n\t this._paused = true;\n\t this._duration -= new Date().getTime() - this._start;\n\t window.clearTimeout(this._timer);\n\t this._debug(\"Paused/Stopped step \" + (this._current + 1) + \" timer (\" + this._duration + \" remaining).\");\n\t if (step.onPause != null) {\n\t return step.onPause(this, this._duration);\n\t }\n\t };\n\t\n\t Tour.prototype.resume = function() {\n\t var step;\n\t step = this.getStep(this._current);\n\t if (!(step && step.duration)) {\n\t return this;\n\t }\n\t this._paused = false;\n\t this._start = new Date().getTime();\n\t this._duration = this._duration || step.duration;\n\t this._timer = window.setTimeout((function(_this) {\n\t return function() {\n\t if (_this._isLast()) {\n\t return _this.next();\n\t } else {\n\t return _this.end();\n\t }\n\t };\n\t })(this), this._duration);\n\t this._debug(\"Started step \" + (this._current + 1) + \" timer with duration \" + this._duration);\n\t if ((step.onResume != null) && this._duration !== step.duration) {\n\t return step.onResume(this, this._duration);\n\t }\n\t };\n\t\n\t Tour.prototype.hideStep = function(i) {\n\t var hideStepHelper, promise, step;\n\t step = this.getStep(i);\n\t if (!step) {\n\t return;\n\t }\n\t this._clearTimer();\n\t promise = this._makePromise(step.onHide != null ? step.onHide(this, i) : void 0);\n\t hideStepHelper = (function(_this) {\n\t return function(e) {\n\t var $element;\n\t $element = $(step.element);\n\t if (!($element.data('bs.popover') || $element.data('popover'))) {\n\t $element = $('body');\n\t }\n\t $element.popover('destroy').removeClass(\"tour-\" + _this._options.name + \"-element tour-\" + _this._options.name + \"-\" + i + \"-element\");\n\t $element.removeData('bs.popover');\n\t if (step.reflex) {\n\t $(step.reflexElement).removeClass('tour-step-element-reflex').off(\"\" + (_this._reflexEvent(step.reflex)) + \".tour-\" + _this._options.name);\n\t }\n\t if (step.backdrop) {\n\t _this._hideBackdrop();\n\t }\n\t if (step.onHidden != null) {\n\t return step.onHidden(_this);\n\t }\n\t };\n\t })(this);\n\t this._callOnPromiseDone(promise, hideStepHelper);\n\t return promise;\n\t };\n\t\n\t Tour.prototype.showStep = function(i) {\n\t var promise, showStepHelper, skipToPrevious, step;\n\t if (this.ended()) {\n\t this._debug('Tour ended, showStep prevented.');\n\t return this;\n\t }\n\t step = this.getStep(i);\n\t if (!step) {\n\t return;\n\t }\n\t skipToPrevious = i < this._current;\n\t promise = this._makePromise(step.onShow != null ? step.onShow(this, i) : void 0);\n\t showStepHelper = (function(_this) {\n\t return function(e) {\n\t var path, showPopoverAndOverlay;\n\t _this.setCurrentStep(i);\n\t path = (function() {\n\t switch ({}.toString.call(step.path)) {\n\t case '[object Function]':\n\t return step.path();\n\t case '[object String]':\n\t return this._options.basePath + step.path;\n\t default:\n\t return step.path;\n\t }\n\t }).call(_this);\n\t if (_this._isRedirect(step.host, path, document.location)) {\n\t _this._redirect(step, i, path);\n\t if (!_this._isJustPathHashDifferent(step.host, path, document.location)) {\n\t return;\n\t }\n\t }\n\t if (_this._isOrphan(step)) {\n\t if (step.orphan === false) {\n\t _this._debug(\"Skip the orphan step \" + (_this._current + 1) + \".\\nOrphan option is false and the element does not exist or is hidden.\");\n\t if (skipToPrevious) {\n\t _this._showPrevStep();\n\t } else {\n\t _this._showNextStep();\n\t }\n\t return;\n\t }\n\t _this._debug(\"Show the orphan step \" + (_this._current + 1) + \". Orphans option is true.\");\n\t }\n\t if (step.backdrop) {\n\t _this._showBackdrop(step);\n\t }\n\t showPopoverAndOverlay = function() {\n\t if (_this.getCurrentStep() !== i || _this.ended()) {\n\t return;\n\t }\n\t if ((step.element != null) && step.backdrop) {\n\t _this._showOverlayElement(step);\n\t }\n\t _this._showPopover(step, i);\n\t if (step.onShown != null) {\n\t step.onShown(_this);\n\t }\n\t return _this._debug(\"Step \" + (_this._current + 1) + \" of \" + _this._options.steps.length);\n\t };\n\t if (step.autoscroll) {\n\t _this._scrollIntoView(step.element, showPopoverAndOverlay);\n\t } else {\n\t showPopoverAndOverlay();\n\t }\n\t if (step.duration) {\n\t return _this.resume();\n\t }\n\t };\n\t })(this);\n\t if (step.delay) {\n\t this._debug(\"Wait \" + step.delay + \" milliseconds to show the step \" + (this._current + 1));\n\t window.setTimeout((function(_this) {\n\t return function() {\n\t return _this._callOnPromiseDone(promise, showStepHelper);\n\t };\n\t })(this), step.delay);\n\t } else {\n\t this._callOnPromiseDone(promise, showStepHelper);\n\t }\n\t return promise;\n\t };\n\t\n\t Tour.prototype.getCurrentStep = function() {\n\t return this._current;\n\t };\n\t\n\t Tour.prototype.setCurrentStep = function(value) {\n\t if (value != null) {\n\t this._current = value;\n\t this._setState('current_step', value);\n\t } else {\n\t this._current = this._getState('current_step');\n\t this._current = this._current === null ? null : parseInt(this._current, 10);\n\t }\n\t return this;\n\t };\n\t\n\t Tour.prototype.redraw = function() {\n\t return this._showOverlayElement(this.getStep(this.getCurrentStep()).element, true);\n\t };\n\t\n\t Tour.prototype._setState = function(key, value) {\n\t var e, keyName;\n\t if (this._options.storage) {\n\t keyName = \"\" + this._options.name + \"_\" + key;\n\t try {\n\t this._options.storage.setItem(keyName, value);\n\t } catch (_error) {\n\t e = _error;\n\t if (e.code === DOMException.QUOTA_EXCEEDED_ERR) {\n\t this._debug('LocalStorage quota exceeded. State storage failed.');\n\t }\n\t }\n\t return this._options.afterSetState(keyName, value);\n\t } else {\n\t if (this._state == null) {\n\t this._state = {};\n\t }\n\t return this._state[key] = value;\n\t }\n\t };\n\t\n\t Tour.prototype._removeState = function(key) {\n\t var keyName;\n\t if (this._options.storage) {\n\t keyName = \"\" + this._options.name + \"_\" + key;\n\t this._options.storage.removeItem(keyName);\n\t return this._options.afterRemoveState(keyName);\n\t } else {\n\t if (this._state != null) {\n\t return delete this._state[key];\n\t }\n\t }\n\t };\n\t\n\t Tour.prototype._getState = function(key) {\n\t var keyName, value;\n\t if (this._options.storage) {\n\t keyName = \"\" + this._options.name + \"_\" + key;\n\t value = this._options.storage.getItem(keyName);\n\t } else {\n\t if (this._state != null) {\n\t value = this._state[key];\n\t }\n\t }\n\t if (value === void 0 || value === 'null') {\n\t value = null;\n\t }\n\t this._options.afterGetState(key, value);\n\t return value;\n\t };\n\t\n\t Tour.prototype._showNextStep = function() {\n\t var promise, showNextStepHelper, step;\n\t step = this.getStep(this._current);\n\t showNextStepHelper = (function(_this) {\n\t return function(e) {\n\t return _this.showStep(step.next);\n\t };\n\t })(this);\n\t promise = this._makePromise(step.onNext != null ? step.onNext(this) : void 0);\n\t return this._callOnPromiseDone(promise, showNextStepHelper);\n\t };\n\t\n\t Tour.prototype._showPrevStep = function() {\n\t var promise, showPrevStepHelper, step;\n\t step = this.getStep(this._current);\n\t showPrevStepHelper = (function(_this) {\n\t return function(e) {\n\t return _this.showStep(step.prev);\n\t };\n\t })(this);\n\t promise = this._makePromise(step.onPrev != null ? step.onPrev(this) : void 0);\n\t return this._callOnPromiseDone(promise, showPrevStepHelper);\n\t };\n\t\n\t Tour.prototype._debug = function(text) {\n\t if (this._options.debug) {\n\t return window.console.log(\"Bootstrap Tour '\" + this._options.name + \"' | \" + text);\n\t }\n\t };\n\t\n\t Tour.prototype._isRedirect = function(host, path, location) {\n\t var currentPath;\n\t if (host !== '') {\n\t if (this._isHostDifferent(host, location.href)) {\n\t return true;\n\t }\n\t }\n\t currentPath = [location.pathname, location.search, location.hash].join('');\n\t return (path != null) && path !== '' && (({}.toString.call(path) === '[object RegExp]' && !path.test(currentPath)) || ({}.toString.call(path) === '[object String]' && this._isPathDifferent(path, currentPath)));\n\t };\n\t\n\t Tour.prototype._isHostDifferent = function(host, currentURL) {\n\t return this._getProtocol(host) !== this._getProtocol(currentURL) || this._getHost(host) !== this._getHost(currentURL);\n\t };\n\t\n\t Tour.prototype._isPathDifferent = function(path, currentPath) {\n\t return this._getPath(path) !== this._getPath(currentPath) || !this._equal(this._getQuery(path), this._getQuery(currentPath)) || !this._equal(this._getHash(path), this._getHash(currentPath));\n\t };\n\t\n\t Tour.prototype._isJustPathHashDifferent = function(host, path, location) {\n\t var currentPath;\n\t if (host !== '') {\n\t if (this._isHostDifferent(host, location.href)) {\n\t return false;\n\t }\n\t }\n\t currentPath = [location.pathname, location.search, location.hash].join('');\n\t if ({}.toString.call(path) === '[object String]') {\n\t return this._getPath(path) === this._getPath(currentPath) && this._equal(this._getQuery(path), this._getQuery(currentPath)) && !this._equal(this._getHash(path), this._getHash(currentPath));\n\t }\n\t return false;\n\t };\n\t\n\t Tour.prototype._redirect = function(step, i, path) {\n\t if ($.isFunction(step.redirect)) {\n\t return step.redirect.call(this, path);\n\t } else if (step.redirect === true) {\n\t this._debug(\"Redirect to \" + step.host + path);\n\t if (this._getState('redirect_to') === (\"\" + i)) {\n\t this._debug(\"Error redirection loop to \" + path);\n\t this._removeState('redirect_to');\n\t if (step.onRedirectError != null) {\n\t return step.onRedirectError(this);\n\t }\n\t } else {\n\t this._setState('redirect_to', \"\" + i);\n\t return document.location.href = \"\" + step.host + path;\n\t }\n\t }\n\t };\n\t\n\t Tour.prototype._isOrphan = function(step) {\n\t return (step.element == null) || !$(step.element).length || $(step.element).is(':hidden') && ($(step.element)[0].namespaceURI !== 'http://www.w3.org/2000/svg');\n\t };\n\t\n\t Tour.prototype._isLast = function() {\n\t return this._current < this._options.steps.length - 1;\n\t };\n\t\n\t Tour.prototype._showPopover = function(step, i) {\n\t var $element, $tip, isOrphan, options, shouldAddSmart;\n\t $(\".tour-\" + this._options.name).remove();\n\t options = $.extend({}, this._options);\n\t isOrphan = this._isOrphan(step);\n\t step.template = this._template(step, i);\n\t if (isOrphan) {\n\t step.element = 'body';\n\t step.placement = 'top';\n\t }\n\t $element = $(step.element);\n\t $element.addClass(\"tour-\" + this._options.name + \"-element tour-\" + this._options.name + \"-\" + i + \"-element\");\n\t if (step.options) {\n\t $.extend(options, step.options);\n\t }\n\t if (step.reflex && !isOrphan) {\n\t $(step.reflexElement).addClass('tour-step-element-reflex').off(\"\" + (this._reflexEvent(step.reflex)) + \".tour-\" + this._options.name).on(\"\" + (this._reflexEvent(step.reflex)) + \".tour-\" + this._options.name, (function(_this) {\n\t return function() {\n\t if (_this._isLast()) {\n\t return _this.next();\n\t } else {\n\t return _this.end();\n\t }\n\t };\n\t })(this));\n\t }\n\t shouldAddSmart = step.smartPlacement === true && step.placement.search(/auto/i) === -1;\n\t $element.popover({\n\t placement: shouldAddSmart ? \"auto \" + step.placement : step.placement,\n\t trigger: 'manual',\n\t title: step.title,\n\t content: step.content,\n\t html: true,\n\t animation: step.animation,\n\t container: step.container,\n\t template: step.template,\n\t selector: step.element\n\t }).popover('show');\n\t $tip = $element.data('bs.popover') ? $element.data('bs.popover').tip() : $element.data('popover').tip();\n\t $tip.attr('id', step.id);\n\t this._reposition($tip, step);\n\t if (isOrphan) {\n\t return this._center($tip);\n\t }\n\t };\n\t\n\t Tour.prototype._template = function(step, i) {\n\t var $navigation, $next, $prev, $resume, $template, template;\n\t template = step.template;\n\t if (this._isOrphan(step) && {}.toString.call(step.orphan) !== '[object Boolean]') {\n\t template = step.orphan;\n\t }\n\t $template = $.isFunction(template) ? $(template(i, step)) : $(template);\n\t $navigation = $template.find('.popover-navigation');\n\t $prev = $navigation.find('[data-role=\"prev\"]');\n\t $next = $navigation.find('[data-role=\"next\"]');\n\t $resume = $navigation.find('[data-role=\"pause-resume\"]');\n\t if (this._isOrphan(step)) {\n\t $template.addClass('orphan');\n\t }\n\t $template.addClass(\"tour-\" + this._options.name + \" tour-\" + this._options.name + \"-\" + i);\n\t if (step.reflex) {\n\t $template.addClass(\"tour-\" + this._options.name + \"-reflex\");\n\t }\n\t if (step.prev < 0) {\n\t $prev.addClass('disabled');\n\t $prev.prop('disabled', true);\n\t }\n\t if (step.next < 0) {\n\t $next.addClass('disabled');\n\t $next.prop('disabled', true);\n\t }\n\t if (!step.duration) {\n\t $resume.remove();\n\t }\n\t return $template.clone().wrap('
    ').parent().html();\n\t };\n\t\n\t Tour.prototype._reflexEvent = function(reflex) {\n\t if ({}.toString.call(reflex) === '[object Boolean]') {\n\t return 'click';\n\t } else {\n\t return reflex;\n\t }\n\t };\n\t\n\t Tour.prototype._reposition = function($tip, step) {\n\t var offsetBottom, offsetHeight, offsetRight, offsetWidth, originalLeft, originalTop, tipOffset;\n\t offsetWidth = $tip[0].offsetWidth;\n\t offsetHeight = $tip[0].offsetHeight;\n\t tipOffset = $tip.offset();\n\t originalLeft = tipOffset.left;\n\t originalTop = tipOffset.top;\n\t offsetBottom = $(document).outerHeight() - tipOffset.top - $tip.outerHeight();\n\t if (offsetBottom < 0) {\n\t tipOffset.top = tipOffset.top + offsetBottom;\n\t }\n\t offsetRight = $('html').outerWidth() - tipOffset.left - $tip.outerWidth();\n\t if (offsetRight < 0) {\n\t tipOffset.left = tipOffset.left + offsetRight;\n\t }\n\t if (tipOffset.top < 0) {\n\t tipOffset.top = 0;\n\t }\n\t if (tipOffset.left < 0) {\n\t tipOffset.left = 0;\n\t }\n\t $tip.offset(tipOffset);\n\t if (step.placement === 'bottom' || step.placement === 'top') {\n\t if (originalLeft !== tipOffset.left) {\n\t return this._replaceArrow($tip, (tipOffset.left - originalLeft) * 2, offsetWidth, 'left');\n\t }\n\t } else {\n\t if (originalTop !== tipOffset.top) {\n\t return this._replaceArrow($tip, (tipOffset.top - originalTop) * 2, offsetHeight, 'top');\n\t }\n\t }\n\t };\n\t\n\t Tour.prototype._center = function($tip) {\n\t return $tip.css('top', $(window).outerHeight() / 2 - $tip.outerHeight() / 2);\n\t };\n\t\n\t Tour.prototype._replaceArrow = function($tip, delta, dimension, position) {\n\t return $tip.find('.arrow').css(position, delta ? 50 * (1 - delta / dimension) + '%' : '');\n\t };\n\t\n\t Tour.prototype._scrollIntoView = function(element, callback) {\n\t var $element, $window, counter, offsetTop, scrollTop, windowHeight;\n\t $element = $(element);\n\t if (!$element.length) {\n\t return callback();\n\t }\n\t $window = $(window);\n\t offsetTop = $element.offset().top;\n\t windowHeight = $window.height();\n\t scrollTop = Math.max(0, offsetTop - (windowHeight / 2));\n\t this._debug(\"Scroll into view. ScrollTop: \" + scrollTop + \". Element offset: \" + offsetTop + \". Window height: \" + windowHeight + \".\");\n\t counter = 0;\n\t return $('body, html').stop(true, true).animate({\n\t scrollTop: Math.ceil(scrollTop)\n\t }, (function(_this) {\n\t return function() {\n\t if (++counter === 2) {\n\t callback();\n\t return _this._debug(\"Scroll into view.\\nAnimation end element offset: \" + ($element.offset().top) + \".\\nWindow height: \" + ($window.height()) + \".\");\n\t }\n\t };\n\t })(this));\n\t };\n\t\n\t Tour.prototype._onResize = function(callback, timeout) {\n\t return $(window).on(\"resize.tour-\" + this._options.name, function() {\n\t clearTimeout(timeout);\n\t return timeout = setTimeout(callback, 100);\n\t });\n\t };\n\t\n\t Tour.prototype._initMouseNavigation = function() {\n\t var _this;\n\t _this = this;\n\t return $(document).off(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='prev']\").off(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='next']\").off(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='end']\").off(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='pause-resume']\").on(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='next']\", (function(_this) {\n\t return function(e) {\n\t e.preventDefault();\n\t return _this.next();\n\t };\n\t })(this)).on(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='prev']\", (function(_this) {\n\t return function(e) {\n\t e.preventDefault();\n\t return _this.prev();\n\t };\n\t })(this)).on(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='end']\", (function(_this) {\n\t return function(e) {\n\t e.preventDefault();\n\t return _this.end();\n\t };\n\t })(this)).on(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='pause-resume']\", function(e) {\n\t var $this;\n\t e.preventDefault();\n\t $this = $(this);\n\t $this.text(_this._paused ? $this.data('pause-text') : $this.data('resume-text'));\n\t if (_this._paused) {\n\t return _this.resume();\n\t } else {\n\t return _this.pause();\n\t }\n\t });\n\t };\n\t\n\t Tour.prototype._initKeyboardNavigation = function() {\n\t if (!this._options.keyboard) {\n\t return;\n\t }\n\t return $(document).on(\"keyup.tour-\" + this._options.name, (function(_this) {\n\t return function(e) {\n\t if (!e.which) {\n\t return;\n\t }\n\t switch (e.which) {\n\t case 39:\n\t e.preventDefault();\n\t if (_this._isLast()) {\n\t return _this.next();\n\t } else {\n\t return _this.end();\n\t }\n\t break;\n\t case 37:\n\t e.preventDefault();\n\t if (_this._current > 0) {\n\t return _this.prev();\n\t }\n\t break;\n\t case 27:\n\t e.preventDefault();\n\t return _this.end();\n\t }\n\t };\n\t })(this));\n\t };\n\t\n\t Tour.prototype._makePromise = function(result) {\n\t if (result && $.isFunction(result.then)) {\n\t return result;\n\t } else {\n\t return null;\n\t }\n\t };\n\t\n\t Tour.prototype._callOnPromiseDone = function(promise, cb, arg) {\n\t if (promise) {\n\t return promise.then((function(_this) {\n\t return function(e) {\n\t return cb.call(_this, arg);\n\t };\n\t })(this));\n\t } else {\n\t return cb.call(this, arg);\n\t }\n\t };\n\t\n\t Tour.prototype._showBackdrop = function(step) {\n\t if (this.backdrop.backgroundShown) {\n\t return;\n\t }\n\t this.backdrop = $('
    ', {\n\t \"class\": 'tour-backdrop'\n\t });\n\t this.backdrop.backgroundShown = true;\n\t return $(step.backdropContainer).append(this.backdrop);\n\t };\n\t\n\t Tour.prototype._hideBackdrop = function() {\n\t this._hideOverlayElement();\n\t return this._hideBackground();\n\t };\n\t\n\t Tour.prototype._hideBackground = function() {\n\t if (this.backdrop) {\n\t this.backdrop.remove();\n\t this.backdrop.overlay = null;\n\t return this.backdrop.backgroundShown = false;\n\t }\n\t };\n\t\n\t Tour.prototype._showOverlayElement = function(step, force) {\n\t var $element, elementData;\n\t $element = $(step.element);\n\t if (!$element || $element.length === 0 || this.backdrop.overlayElementShown && !force) {\n\t return;\n\t }\n\t if (!this.backdrop.overlayElementShown) {\n\t this.backdrop.$element = $element.addClass('tour-step-backdrop');\n\t this.backdrop.$background = $('
    ', {\n\t \"class\": 'tour-step-background'\n\t });\n\t this.backdrop.$background.appendTo(step.backdropContainer);\n\t this.backdrop.overlayElementShown = true;\n\t }\n\t elementData = {\n\t width: $element.innerWidth(),\n\t height: $element.innerHeight(),\n\t offset: $element.offset()\n\t };\n\t if (step.backdropPadding) {\n\t elementData = this._applyBackdropPadding(step.backdropPadding, elementData);\n\t }\n\t return this.backdrop.$background.width(elementData.width).height(elementData.height).offset(elementData.offset);\n\t };\n\t\n\t Tour.prototype._hideOverlayElement = function() {\n\t if (!this.backdrop.overlayElementShown) {\n\t return;\n\t }\n\t this.backdrop.$element.removeClass('tour-step-backdrop');\n\t this.backdrop.$background.remove();\n\t this.backdrop.$element = null;\n\t this.backdrop.$background = null;\n\t return this.backdrop.overlayElementShown = false;\n\t };\n\t\n\t Tour.prototype._applyBackdropPadding = function(padding, data) {\n\t if (typeof padding === 'object') {\n\t if (padding.top == null) {\n\t padding.top = 0;\n\t }\n\t if (padding.right == null) {\n\t padding.right = 0;\n\t }\n\t if (padding.bottom == null) {\n\t padding.bottom = 0;\n\t }\n\t if (padding.left == null) {\n\t padding.left = 0;\n\t }\n\t data.offset.top = data.offset.top - padding.top;\n\t data.offset.left = data.offset.left - padding.left;\n\t data.width = data.width + padding.left + padding.right;\n\t data.height = data.height + padding.top + padding.bottom;\n\t } else {\n\t data.offset.top = data.offset.top - padding;\n\t data.offset.left = data.offset.left - padding;\n\t data.width = data.width + (padding * 2);\n\t data.height = data.height + (padding * 2);\n\t }\n\t return data;\n\t };\n\t\n\t Tour.prototype._clearTimer = function() {\n\t window.clearTimeout(this._timer);\n\t this._timer = null;\n\t return this._duration = null;\n\t };\n\t\n\t Tour.prototype._getProtocol = function(url) {\n\t url = url.split('://');\n\t if (url.length > 1) {\n\t return url[0];\n\t } else {\n\t return 'http';\n\t }\n\t };\n\t\n\t Tour.prototype._getHost = function(url) {\n\t url = url.split('//');\n\t url = url.length > 1 ? url[1] : url[0];\n\t return url.split('/')[0];\n\t };\n\t\n\t Tour.prototype._getPath = function(path) {\n\t return path.replace(/\\/?$/, '').split('?')[0].split('#')[0];\n\t };\n\t\n\t Tour.prototype._getQuery = function(path) {\n\t return this._getParams(path, '?');\n\t };\n\t\n\t Tour.prototype._getHash = function(path) {\n\t return this._getParams(path, '#');\n\t };\n\t\n\t Tour.prototype._getParams = function(path, start) {\n\t var param, params, paramsObject, _i, _len;\n\t params = path.split(start);\n\t if (params.length === 1) {\n\t return {};\n\t }\n\t params = params[1].split('&');\n\t paramsObject = {};\n\t for (_i = 0, _len = params.length; _i < _len; _i++) {\n\t param = params[_i];\n\t param = param.split('=');\n\t paramsObject[param[0]] = param[1] || '';\n\t }\n\t return paramsObject;\n\t };\n\t\n\t Tour.prototype._equal = function(obj1, obj2) {\n\t var k, v;\n\t if ({}.toString.call(obj1) === '[object Object]' && {}.toString.call(obj2) === '[object Object]') {\n\t for (k in obj1) {\n\t v = obj1[k];\n\t if (obj2[k] !== v) {\n\t return false;\n\t }\n\t }\n\t for (k in obj2) {\n\t v = obj2[k];\n\t if (obj1[k] !== v) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }\n\t return obj1 === obj2;\n\t };\n\t\n\t return Tour;\n\t\n\t })();\n\t return window.Tour = Tour;\n\t})(jQuery, window);\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ },\n/* 62 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(jQuery) {/*! jQuery UI - v1.9.1 - 2012-10-29\n\t* http://jqueryui.com\n\t* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.menu.js, jquery.ui.slider.js\n\t* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */\n\t\n\t(function(e,t){function i(t,n){var r,i,o,u=t.nodeName.toLowerCase();return\"area\"===u?(r=t.parentNode,i=r.name,!t.href||!i||r.nodeName.toLowerCase()!==\"map\"?!1:(o=e(\"img[usemap=#\"+i+\"]\")[0],!!o&&s(o))):(/input|select|textarea|button|object/.test(u)?!t.disabled:\"a\"===u?t.href||n:n)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().andSelf().filter(function(){return e.css(this,\"visibility\")===\"hidden\"}).length}var n=0,r=/^ui-id-\\d+$/;e.ui=e.ui||{};if(e.ui.version)return;e.extend(e.ui,{version:\"1.9.1\",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({_focus:e.fn.focus,focus:function(t,n){return typeof t==\"number\"?this.each(function(){var r=this;setTimeout(function(){e(r).focus(),n&&n.call(r)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return e.ui.ie&&/(static|relative)/.test(this.css(\"position\"))||/absolute/.test(this.css(\"position\"))?t=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,\"position\"))&&/(auto|scroll)/.test(e.css(this,\"overflow\")+e.css(this,\"overflow-y\")+e.css(this,\"overflow-x\"))}).eq(0):t=this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,\"overflow\")+e.css(this,\"overflow-y\")+e.css(this,\"overflow-x\"))}).eq(0),/fixed/.test(this.css(\"position\"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css(\"zIndex\",n);if(this.length){var r=e(this[0]),i,s;while(r.length&&r[0]!==document){i=r.css(\"position\");if(i===\"absolute\"||i===\"relative\"||i===\"fixed\"){s=parseInt(r.css(\"zIndex\"),10);if(!isNaN(s)&&s!==0)return s}r=r.parent()}}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id=\"ui-id-\"+ ++n)})},removeUniqueId:function(){return this.each(function(){r.test(this.id)&&e(this).removeAttr(\"id\")})}}),e(\"\").outerWidth(1).jquery||e.each([\"Width\",\"Height\"],function(n,r){function u(t,n,r,s){return e.each(i,function(){n-=parseFloat(e.css(t,\"padding\"+this))||0,r&&(n-=parseFloat(e.css(t,\"border\"+this+\"Width\"))||0),s&&(n-=parseFloat(e.css(t,\"margin\"+this))||0)}),n}var i=r===\"Width\"?[\"Left\",\"Right\"]:[\"Top\",\"Bottom\"],s=r.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn[\"inner\"+r]=function(n){return n===t?o[\"inner\"+r].call(this):this.each(function(){e(this).css(s,u(this,n)+\"px\")})},e.fn[\"outer\"+r]=function(t,n){return typeof t!=\"number\"?o[\"outer\"+r].call(this,t):this.each(function(){e(this).css(s,u(this,t,!0,n)+\"px\")})}}),e.extend(e.expr[\":\"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,\"tabindex\")))},tabbable:function(t){var n=e.attr(t,\"tabindex\"),r=isNaN(n);return(r||n>=0)&&i(t,!r)}}),e(function(){var t=document.body,n=t.appendChild(n=document.createElement(\"div\"));n.offsetHeight,e.extend(n.style,{minHeight:\"100px\",height:\"auto\",padding:0,borderWidth:0}),e.support.minHeight=n.offsetHeight===100,e.support.selectstart=\"onselectstart\"in n,t.removeChild(n).style.display=\"none\"}),function(){var t=/msie ([\\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];e.ui.ie=t.length?!0:!1,e.ui.ie6=parseFloat(t[1],10)===6}(),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?\"selectstart\":\"mousedown\")+\".ui-disableSelection\",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(\".ui-disableSelection\")}}),e.extend(e.ui,{plugin:{add:function(t,n,r){var i,s=e.ui[t].prototype;for(i in r)s.plugins[i]=s.plugins[i]||[],s.plugins[i].push([n,r[i]])},call:function(e,t,n){var r,i=e.plugins[t];if(!i||!e.element[0].parentNode||e.element[0].parentNode.nodeType===11)return;for(r=0;r0?!0:(t[r]=1,i=t[r]>0,t[r]=0,i)},isOverAxis:function(e,t,n){return e>t&&e\",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace=\".\"+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetName,this),e.data(r,this.widgetFullName,this),this._on(this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger(\"create\",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr(\"aria-disabled\").removeClass(this.widgetFullName+\"-disabled \"+\"ui-state-disabled\"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass(\"ui-state-hover\"),this.focusable.removeClass(\"ui-state-focus\")},_destroy:e.noop,widget:function(){return this.element},option:function(n,r){var i=n,s,o,u;if(arguments.length===0)return e.widget.extend({},this.options);if(typeof n==\"string\"){i={},s=n.split(\".\"),n=s.shift();if(s.length){o=i[n]=e.widget.extend({},this.options[n]);for(u=0;u=9||!!t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).unbind(\"mouseup.\"+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+\".preventClickEvent\",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(e){return this.mouseDelayMet},_mouseStart:function(e){},_mouseDrag:function(e){},_mouseStop:function(e){},_mouseCapture:function(e){return!0}})})(jQuery);(function(e,t){function h(e,t,n){return[parseInt(e[0],10)*(l.test(e[0])?t/100:1),parseInt(e[1],10)*(l.test(e[1])?n/100:1)]}function p(t,n){return parseInt(e.css(t,n),10)||0}e.ui=e.ui||{};var n,r=Math.max,i=Math.abs,s=Math.round,o=/left|center|right/,u=/top|center|bottom/,a=/[\\+\\-]\\d+%?/,f=/^\\w+/,l=/%$/,c=e.fn.position;e.position={scrollbarWidth:function(){if(n!==t)return n;var r,i,s=e(\"
    \"),o=s.children()[0];return e(\"body\").append(s),r=o.offsetWidth,s.css(\"overflow\",\"scroll\"),i=o.offsetWidth,r===i&&(i=s[0].clientWidth),s.remove(),n=r-i},getScrollInfo:function(t){var n=t.isWindow?\"\":t.element.css(\"overflow-x\"),r=t.isWindow?\"\":t.element.css(\"overflow-y\"),i=n===\"scroll\"||n===\"auto\"&&t.width0?\"right\":\"center\",vertical:u<0?\"top\":o>0?\"bottom\":\"middle\"};lr(i(o),i(u))?h.important=\"horizontal\":h.important=\"vertical\",t.using.call(this,e,h)}),a.offset(e.extend(C,{using:u}))})},e.ui.position={fit:{left:function(e,t){var n=t.within,i=n.isWindow?n.scrollLeft:n.offset.left,s=n.width,o=e.left-t.collisionPosition.marginLeft,u=i-o,a=o+t.collisionWidth-s-i,f;t.collisionWidth>s?u>0&&a<=0?(f=e.left+u+t.collisionWidth-s-i,e.left+=u-f):a>0&&u<=0?e.left=i:u>a?e.left=i+s-t.collisionWidth:e.left=i:u>0?e.left+=u:a>0?e.left-=a:e.left=r(e.left-o,e.left)},top:function(e,t){var n=t.within,i=n.isWindow?n.scrollTop:n.offset.top,s=t.within.height,o=e.top-t.collisionPosition.marginTop,u=i-o,a=o+t.collisionHeight-s-i,f;t.collisionHeight>s?u>0&&a<=0?(f=e.top+u+t.collisionHeight-s-i,e.top+=u-f):a>0&&u<=0?e.top=i:u>a?e.top=i+s-t.collisionHeight:e.top=i:u>0?e.top+=u:a>0?e.top-=a:e.top=r(e.top-o,e.top)}},flip:{left:function(e,t){var n=t.within,r=n.offset.left+n.scrollLeft,s=n.width,o=n.isWindow?n.scrollLeft:n.offset.left,u=e.left-t.collisionPosition.marginLeft,a=u-o,f=u+t.collisionWidth-s-o,l=t.my[0]===\"left\"?-t.elemWidth:t.my[0]===\"right\"?t.elemWidth:0,c=t.at[0]===\"left\"?t.targetWidth:t.at[0]===\"right\"?-t.targetWidth:0,h=-2*t.offset[0],p,d;if(a<0){p=e.left+l+c+h+t.collisionWidth-s-r;if(p<0||p0){d=e.left-t.collisionPosition.marginLeft+l+c+h-o;if(d>0||i(d)a&&(v<0||v0&&(d=e.top-t.collisionPosition.marginTop+c+h+p-o,e.top+c+h+p>f&&(d>0||i(d)10&&i<11,t.innerHTML=\"\",n.removeChild(t)}(),e.uiBackCompat!==!1&&function(e){var n=e.fn.position;e.fn.position=function(r){if(!r||!r.offset)return n.call(this,r);var i=r.offset.split(\" \"),s=r.at.split(\" \");return i.length===1&&(i[1]=i[0]),/^\\d/.test(i[0])&&(i[0]=\"+\"+i[0]),/^\\d/.test(i[1])&&(i[1]=\"+\"+i[1]),s.length===1&&(/left|center|right/.test(s[0])?s[1]=\"center\":(s[1]=s[0],s[0]=\"center\")),n.call(this,e.extend(r,{at:s[0]+i[0]+\" \"+s[1]+i[1],offset:t}))}}(jQuery)})(jQuery);(function(e,t){var n=0;e.widget(\"ui.autocomplete\",{version:\"1.9.1\",defaultElement:\"\",options:{appendTo:\"body\",autoFocus:!1,delay:300,minLength:1,position:{my:\"left top\",at:\"left bottom\",collision:\"none\"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var t,n,r;this.isMultiLine=this._isMultiLine(),this.valueMethod=this.element[this.element.is(\"input,textarea\")?\"val\":\"text\"],this.isNewMenu=!0,this.element.addClass(\"ui-autocomplete-input\").attr(\"autocomplete\",\"off\"),this._on(this.element,{keydown:function(i){if(this.element.prop(\"readOnly\")){t=!0,r=!0,n=!0;return}t=!1,r=!1,n=!1;var s=e.ui.keyCode;switch(i.keyCode){case s.PAGE_UP:t=!0,this._move(\"previousPage\",i);break;case s.PAGE_DOWN:t=!0,this._move(\"nextPage\",i);break;case s.UP:t=!0,this._keyEvent(\"previous\",i);break;case s.DOWN:t=!0,this._keyEvent(\"next\",i);break;case s.ENTER:case s.NUMPAD_ENTER:this.menu.active&&(t=!0,i.preventDefault(),this.menu.select(i));break;case s.TAB:this.menu.active&&this.menu.select(i);break;case s.ESCAPE:this.menu.element.is(\":visible\")&&(this._value(this.term),this.close(i),i.preventDefault());break;default:n=!0,this._searchTimeout(i)}},keypress:function(r){if(t){t=!1,r.preventDefault();return}if(n)return;var i=e.ui.keyCode;switch(r.keyCode){case i.PAGE_UP:this._move(\"previousPage\",r);break;case i.PAGE_DOWN:this._move(\"nextPage\",r);break;case i.UP:this._keyEvent(\"previous\",r);break;case i.DOWN:this._keyEvent(\"next\",r)}},input:function(e){if(r){r=!1,e.preventDefault();return}this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){if(this.cancelBlur){delete this.cancelBlur;return}clearTimeout(this.searching),this.close(e),this._change(e)}}),this._initSource(),this.menu=e(\"
      \").addClass(\"ui-autocomplete\").appendTo(this.document.find(this.options.appendTo||\"body\")[0]).menu({input:e(),role:null}).zIndex(this.element.zIndex()+1).hide().data(\"menu\"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var n=this.menu.element[0];e(t.target).closest(\".ui-menu-item\").length||this._delay(function(){var t=this;this.document.one(\"mousedown\",function(r){r.target!==t.element[0]&&r.target!==n&&!e.contains(n,r.target)&&t.close()})})},menufocus:function(t,n){if(this.isNewMenu){this.isNewMenu=!1;if(t.originalEvent&&/^mouse/.test(t.originalEvent.type)){this.menu.blur(),this.document.one(\"mousemove\",function(){e(t.target).trigger(t.originalEvent)});return}}var r=n.item.data(\"ui-autocomplete-item\")||n.item.data(\"item.autocomplete\");!1!==this._trigger(\"focus\",t,{item:r})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(r.value):this.liveRegion.text(r.value)},menuselect:function(e,t){var n=t.item.data(\"ui-autocomplete-item\")||t.item.data(\"item.autocomplete\"),r=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=r,this._delay(function(){this.previous=r,this.selectedItem=n})),!1!==this._trigger(\"select\",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n}}),this.liveRegion=e(\"\",{role:\"status\",\"aria-live\":\"polite\"}).addClass(\"ui-helper-hidden-accessible\").insertAfter(this.element),e.fn.bgiframe&&this.menu.element.bgiframe(),this._on(this.window,{beforeunload:function(){this.element.removeAttr(\"autocomplete\")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass(\"ui-autocomplete-input\").removeAttr(\"autocomplete\"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),e===\"source\"&&this._initSource(),e===\"appendTo\"&&this.menu.element.appendTo(this.document.find(t||\"body\")[0]),e===\"disabled\"&&t&&this.xhr&&this.xhr.abort()},_isMultiLine:function(){return this.element.is(\"textarea\")?!0:this.element.is(\"input\")?!1:this.element.prop(\"isContentEditable\")},_initSource:function(){var t,n,r=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(n,r){r(e.ui.autocomplete.filter(t,n.term))}):typeof this.options.source==\"string\"?(n=this.options.source,this.source=function(t,i){r.xhr&&r.xhr.abort(),r.xhr=e.ajax({url:n,data:t,dataType:\"json\",success:function(e){i(e)},error:function(){i([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){e=e!=null?e:this._value(),this.term=this._value();if(e.length\").append(e(\"\").text(n.label)).appendTo(t)},_move:function(e,t){if(!this.menu.element.is(\":visible\")){this.search(null,t);return}if(this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)){this._value(this.term),this.menu.blur();return}this.menu[e](t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){if(!this.isMultiLine||this.menu.element.is(\":visible\"))this._move(e,t),t.preventDefault()}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g,\"\\\\$&\")},filter:function(t,n){var r=new RegExp(e.ui.autocomplete.escapeRegex(n),\"i\");return e.grep(t,function(e){return r.test(e.label||e.value||e)})}}),e.widget(\"ui.autocomplete\",e.ui.autocomplete,{options:{messages:{noResults:\"No search results.\",results:function(e){return e+(e>1?\" results are\":\" result is\")+\" available, use up and down arrow keys to navigate.\"}}},__response:function(e){var t;this._superApply(arguments);if(this.options.disabled||this.cancelSearch)return;e&&e.length?t=this.options.messages.results(e.length):t=this.options.messages.noResults,this.liveRegion.text(t)}})})(jQuery);(function(e,t){var n,r,i,s,o=\"ui-button ui-widget ui-state-default ui-corner-all\",u=\"ui-state-hover ui-state-active \",a=\"ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only\",f=function(){var t=e(this).find(\":ui-button\");setTimeout(function(){t.button(\"refresh\")},1)},l=function(t){var n=t.name,r=t.form,i=e([]);return n&&(r?i=e(r).find(\"[name='\"+n+\"']\"):i=e(\"[name='\"+n+\"']\",t.ownerDocument).filter(function(){return!this.form})),i};e.widget(\"ui.button\",{version:\"1.9.1\",defaultElement:\"
    \"\n )\n });\n modal.show( { backdrop: true } );\n}\n\n\n// ============================================================================\n return {\n Modal : Modal,\n hide_modal : hide_modal,\n show_modal : show_modal,\n show_message : show_message,\n show_in_overlay : show_in_overlay,\n };\n});\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./galaxy/scripts/layout/modal.js\n ** module id = 59\n ** module chunks = 2\n **/","define([\n 'layout/masthead',\n 'layout/panel',\n 'mvc/ui/ui-modal',\n 'mvc/base-mvc'\n], function( Masthead, Panel, Modal, BaseMVC ) {\n\n// ============================================================================\nvar PageLayoutView = Backbone.View.extend( BaseMVC.LoggableMixin ).extend({\n _logNamespace : 'layout',\n\n el : 'body',\n className : 'full-content',\n\n _panelIds : [\n 'left', 'center', 'right'\n ],\n\n defaultOptions : {\n message_box_visible : false,\n message_box_content : '',\n message_box_class : 'info',\n show_inactivity_warning : false,\n inactivity_box_content : ''\n },\n\n initialize : function( options ) {\n // TODO: remove globals\n this.log( this + '.initialize:', options );\n _.extend( this, _.pick( options, this._panelIds ) );\n this.options = _.defaults( _.omit( options.config, this._panelIds ), this.defaultOptions );\n Galaxy.modal = this.modal = new Modal.View();\n this.masthead = new Masthead.View( this.options );\n this.$el.attr( 'scroll', 'no' );\n this.$el.html( this._template() );\n this.$el.append( this.masthead.frame.$el );\n this.$( '#masthead' ).replaceWith( this.masthead.$el );\n this.$el.append( this.modal.$el );\n this.$messagebox = this.$( '#messagebox' );\n this.$inactivebox = this.$( '#inactivebox' );\n },\n\n render : function() {\n // TODO: Remove this line after select2 update\n $( '.select2-hidden-accessible' ).remove();\n this.log( this + '.render:' );\n this.masthead.render();\n this.renderMessageBox();\n this.renderInactivityBox();\n this.renderPanels();\n return this;\n },\n\n /** Render message box */\n renderMessageBox : function() {\n if ( this.options.message_box_visible ){\n var content = this.options.message_box_content || '';\n var level = this.options.message_box_class || 'info';\n this.$el.addClass( 'has-message-box' );\n this.$messagebox\n .attr( 'class', 'panel-' + level + '-message' )\n .html( content )\n .toggle( !!content )\n .show();\n } else {\n this.$el.removeClass( 'has-message-box' );\n this.$messagebox.hide();\n }\n return this;\n },\n\n /** Render inactivity warning */\n renderInactivityBox : function() {\n if( this.options.show_inactivity_warning ){\n var content = this.options.inactivity_box_content || '';\n var verificationLink = $( '
    ' ).attr( 'href', Galaxy.root + 'user/resend_verification' ).text( 'Resend verification' );\n this.$el.addClass( 'has-inactivity-box' );\n this.$inactivebox\n .html( content + ' ' )\n .append( verificationLink )\n .toggle( !!content )\n .show();\n } else {\n this.$el.removeClass( 'has-inactivity-box' );\n this.$inactivebox.hide();\n }\n return this;\n },\n\n /** Render panels */\n renderPanels : function() {\n var page = this;\n this._panelIds.forEach( function( panelId ){\n if( _.has( page, panelId ) ){\n page[ panelId ].setElement( '#' + panelId );\n page[ panelId ].render();\n }\n });\n if( !this.left ){\n this.center.$el.css( 'left', 0 );\n }\n if( !this.right ){\n this.center.$el.css( 'right', 0 );\n }\n return this;\n },\n\n /** body template */\n _template: function() {\n return [\n '
    ',\n '
    ',\n '
    ',\n '
    ',\n '
    ',\n this.left? '
    ' : '',\n this.center? '
    ' : '',\n this.right? '
    ' : '',\n '
    ',\n '
    ',\n ].join('');\n },\n\n /** hide both side panels if previously shown */\n hideSidePanels : function(){\n if( this.left ){\n this.left.hide();\n }\n if( this.right ){\n this.right.hide();\n }\n },\n\n toString : function() { return 'PageLayoutView'; }\n});\n\n// ============================================================================\n return {\n PageLayoutView: PageLayoutView\n };\n});\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./galaxy/scripts/layout/page.js\n ** module id = 60\n ** module chunks = 2\n **/","/* ========================================================================\n * bootstrap-tour - v0.10.2\n * http://bootstraptour.com\n * ========================================================================\n * Copyright 2012-2015 Ulrich Sossou\n *\n * ========================================================================\n * Licensed under the MIT License (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://opensource.org/licenses/MIT\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ========================================================================\n */\n\n(function($, window) {\n var Tour, document;\n document = window.document;\n Tour = (function() {\n function Tour(options) {\n var storage;\n try {\n storage = window.localStorage;\n } catch (_error) {\n storage = false;\n }\n this._options = $.extend({\n name: 'tour',\n steps: [],\n container: 'body',\n autoscroll: true,\n keyboard: true,\n storage: storage,\n debug: false,\n backdrop: false,\n backdropContainer: 'body',\n backdropPadding: 0,\n redirect: true,\n orphan: false,\n duration: false,\n delay: false,\n basePath: '',\n template: '

    ',\n afterSetState: function(key, value) {},\n afterGetState: function(key, value) {},\n afterRemoveState: function(key) {},\n onStart: function(tour) {},\n onEnd: function(tour) {},\n onShow: function(tour) {},\n onShown: function(tour) {},\n onHide: function(tour) {},\n onHidden: function(tour) {},\n onNext: function(tour) {},\n onPrev: function(tour) {},\n onPause: function(tour, duration) {},\n onResume: function(tour, duration) {},\n onRedirectError: function(tour) {}\n }, options);\n this._force = false;\n this._inited = false;\n this._current = null;\n this.backdrop = {\n overlay: null,\n $element: null,\n $background: null,\n backgroundShown: false,\n overlayElementShown: false\n };\n this;\n }\n\n Tour.prototype.addSteps = function(steps) {\n var step, _i, _len;\n for (_i = 0, _len = steps.length; _i < _len; _i++) {\n step = steps[_i];\n this.addStep(step);\n }\n return this;\n };\n\n Tour.prototype.addStep = function(step) {\n this._options.steps.push(step);\n return this;\n };\n\n Tour.prototype.getStep = function(i) {\n if (this._options.steps[i] != null) {\n return $.extend({\n id: \"step-\" + i,\n path: '',\n host: '',\n placement: 'right',\n title: '',\n content: '

    ',\n next: i === this._options.steps.length - 1 ? -1 : i + 1,\n prev: i - 1,\n animation: true,\n container: this._options.container,\n autoscroll: this._options.autoscroll,\n backdrop: this._options.backdrop,\n backdropContainer: this._options.backdropContainer,\n backdropPadding: this._options.backdropPadding,\n redirect: this._options.redirect,\n reflexElement: this._options.steps[i].element,\n orphan: this._options.orphan,\n duration: this._options.duration,\n delay: this._options.delay,\n template: this._options.template,\n onShow: this._options.onShow,\n onShown: this._options.onShown,\n onHide: this._options.onHide,\n onHidden: this._options.onHidden,\n onNext: this._options.onNext,\n onPrev: this._options.onPrev,\n onPause: this._options.onPause,\n onResume: this._options.onResume,\n onRedirectError: this._options.onRedirectError\n }, this._options.steps[i]);\n }\n };\n\n Tour.prototype.init = function(force) {\n this._force = force;\n if (this.ended()) {\n this._debug('Tour ended, init prevented.');\n return this;\n }\n this.setCurrentStep();\n this._initMouseNavigation();\n this._initKeyboardNavigation();\n this._onResize((function(_this) {\n return function() {\n return _this.showStep(_this._current);\n };\n })(this));\n if (this._current !== null) {\n this.showStep(this._current);\n }\n this._inited = true;\n return this;\n };\n\n Tour.prototype.start = function(force) {\n var promise;\n if (force == null) {\n force = false;\n }\n if (!this._inited) {\n this.init(force);\n }\n if (this._current === null) {\n promise = this._makePromise(this._options.onStart != null ? this._options.onStart(this) : void 0);\n this._callOnPromiseDone(promise, this.showStep, 0);\n }\n return this;\n };\n\n Tour.prototype.next = function() {\n var promise;\n promise = this.hideStep(this._current);\n return this._callOnPromiseDone(promise, this._showNextStep);\n };\n\n Tour.prototype.prev = function() {\n var promise;\n promise = this.hideStep(this._current);\n return this._callOnPromiseDone(promise, this._showPrevStep);\n };\n\n Tour.prototype.goTo = function(i) {\n var promise;\n promise = this.hideStep(this._current);\n return this._callOnPromiseDone(promise, this.showStep, i);\n };\n\n Tour.prototype.end = function() {\n var endHelper, promise;\n endHelper = (function(_this) {\n return function(e) {\n $(document).off(\"click.tour-\" + _this._options.name);\n $(document).off(\"keyup.tour-\" + _this._options.name);\n $(window).off(\"resize.tour-\" + _this._options.name);\n _this._setState('end', 'yes');\n _this._inited = false;\n _this._force = false;\n _this._clearTimer();\n if (_this._options.onEnd != null) {\n return _this._options.onEnd(_this);\n }\n };\n })(this);\n promise = this.hideStep(this._current);\n return this._callOnPromiseDone(promise, endHelper);\n };\n\n Tour.prototype.ended = function() {\n return !this._force && !!this._getState('end');\n };\n\n Tour.prototype.restart = function() {\n this._removeState('current_step');\n this._removeState('end');\n this._removeState('redirect_to');\n return this.start();\n };\n\n Tour.prototype.pause = function() {\n var step;\n step = this.getStep(this._current);\n if (!(step && step.duration)) {\n return this;\n }\n this._paused = true;\n this._duration -= new Date().getTime() - this._start;\n window.clearTimeout(this._timer);\n this._debug(\"Paused/Stopped step \" + (this._current + 1) + \" timer (\" + this._duration + \" remaining).\");\n if (step.onPause != null) {\n return step.onPause(this, this._duration);\n }\n };\n\n Tour.prototype.resume = function() {\n var step;\n step = this.getStep(this._current);\n if (!(step && step.duration)) {\n return this;\n }\n this._paused = false;\n this._start = new Date().getTime();\n this._duration = this._duration || step.duration;\n this._timer = window.setTimeout((function(_this) {\n return function() {\n if (_this._isLast()) {\n return _this.next();\n } else {\n return _this.end();\n }\n };\n })(this), this._duration);\n this._debug(\"Started step \" + (this._current + 1) + \" timer with duration \" + this._duration);\n if ((step.onResume != null) && this._duration !== step.duration) {\n return step.onResume(this, this._duration);\n }\n };\n\n Tour.prototype.hideStep = function(i) {\n var hideStepHelper, promise, step;\n step = this.getStep(i);\n if (!step) {\n return;\n }\n this._clearTimer();\n promise = this._makePromise(step.onHide != null ? step.onHide(this, i) : void 0);\n hideStepHelper = (function(_this) {\n return function(e) {\n var $element;\n $element = $(step.element);\n if (!($element.data('bs.popover') || $element.data('popover'))) {\n $element = $('body');\n }\n $element.popover('destroy').removeClass(\"tour-\" + _this._options.name + \"-element tour-\" + _this._options.name + \"-\" + i + \"-element\");\n $element.removeData('bs.popover');\n if (step.reflex) {\n $(step.reflexElement).removeClass('tour-step-element-reflex').off(\"\" + (_this._reflexEvent(step.reflex)) + \".tour-\" + _this._options.name);\n }\n if (step.backdrop) {\n _this._hideBackdrop();\n }\n if (step.onHidden != null) {\n return step.onHidden(_this);\n }\n };\n })(this);\n this._callOnPromiseDone(promise, hideStepHelper);\n return promise;\n };\n\n Tour.prototype.showStep = function(i) {\n var promise, showStepHelper, skipToPrevious, step;\n if (this.ended()) {\n this._debug('Tour ended, showStep prevented.');\n return this;\n }\n step = this.getStep(i);\n if (!step) {\n return;\n }\n skipToPrevious = i < this._current;\n promise = this._makePromise(step.onShow != null ? step.onShow(this, i) : void 0);\n showStepHelper = (function(_this) {\n return function(e) {\n var path, showPopoverAndOverlay;\n _this.setCurrentStep(i);\n path = (function() {\n switch ({}.toString.call(step.path)) {\n case '[object Function]':\n return step.path();\n case '[object String]':\n return this._options.basePath + step.path;\n default:\n return step.path;\n }\n }).call(_this);\n if (_this._isRedirect(step.host, path, document.location)) {\n _this._redirect(step, i, path);\n if (!_this._isJustPathHashDifferent(step.host, path, document.location)) {\n return;\n }\n }\n if (_this._isOrphan(step)) {\n if (step.orphan === false) {\n _this._debug(\"Skip the orphan step \" + (_this._current + 1) + \".\\nOrphan option is false and the element does not exist or is hidden.\");\n if (skipToPrevious) {\n _this._showPrevStep();\n } else {\n _this._showNextStep();\n }\n return;\n }\n _this._debug(\"Show the orphan step \" + (_this._current + 1) + \". Orphans option is true.\");\n }\n if (step.backdrop) {\n _this._showBackdrop(step);\n }\n showPopoverAndOverlay = function() {\n if (_this.getCurrentStep() !== i || _this.ended()) {\n return;\n }\n if ((step.element != null) && step.backdrop) {\n _this._showOverlayElement(step);\n }\n _this._showPopover(step, i);\n if (step.onShown != null) {\n step.onShown(_this);\n }\n return _this._debug(\"Step \" + (_this._current + 1) + \" of \" + _this._options.steps.length);\n };\n if (step.autoscroll) {\n _this._scrollIntoView(step.element, showPopoverAndOverlay);\n } else {\n showPopoverAndOverlay();\n }\n if (step.duration) {\n return _this.resume();\n }\n };\n })(this);\n if (step.delay) {\n this._debug(\"Wait \" + step.delay + \" milliseconds to show the step \" + (this._current + 1));\n window.setTimeout((function(_this) {\n return function() {\n return _this._callOnPromiseDone(promise, showStepHelper);\n };\n })(this), step.delay);\n } else {\n this._callOnPromiseDone(promise, showStepHelper);\n }\n return promise;\n };\n\n Tour.prototype.getCurrentStep = function() {\n return this._current;\n };\n\n Tour.prototype.setCurrentStep = function(value) {\n if (value != null) {\n this._current = value;\n this._setState('current_step', value);\n } else {\n this._current = this._getState('current_step');\n this._current = this._current === null ? null : parseInt(this._current, 10);\n }\n return this;\n };\n\n Tour.prototype.redraw = function() {\n return this._showOverlayElement(this.getStep(this.getCurrentStep()).element, true);\n };\n\n Tour.prototype._setState = function(key, value) {\n var e, keyName;\n if (this._options.storage) {\n keyName = \"\" + this._options.name + \"_\" + key;\n try {\n this._options.storage.setItem(keyName, value);\n } catch (_error) {\n e = _error;\n if (e.code === DOMException.QUOTA_EXCEEDED_ERR) {\n this._debug('LocalStorage quota exceeded. State storage failed.');\n }\n }\n return this._options.afterSetState(keyName, value);\n } else {\n if (this._state == null) {\n this._state = {};\n }\n return this._state[key] = value;\n }\n };\n\n Tour.prototype._removeState = function(key) {\n var keyName;\n if (this._options.storage) {\n keyName = \"\" + this._options.name + \"_\" + key;\n this._options.storage.removeItem(keyName);\n return this._options.afterRemoveState(keyName);\n } else {\n if (this._state != null) {\n return delete this._state[key];\n }\n }\n };\n\n Tour.prototype._getState = function(key) {\n var keyName, value;\n if (this._options.storage) {\n keyName = \"\" + this._options.name + \"_\" + key;\n value = this._options.storage.getItem(keyName);\n } else {\n if (this._state != null) {\n value = this._state[key];\n }\n }\n if (value === void 0 || value === 'null') {\n value = null;\n }\n this._options.afterGetState(key, value);\n return value;\n };\n\n Tour.prototype._showNextStep = function() {\n var promise, showNextStepHelper, step;\n step = this.getStep(this._current);\n showNextStepHelper = (function(_this) {\n return function(e) {\n return _this.showStep(step.next);\n };\n })(this);\n promise = this._makePromise(step.onNext != null ? step.onNext(this) : void 0);\n return this._callOnPromiseDone(promise, showNextStepHelper);\n };\n\n Tour.prototype._showPrevStep = function() {\n var promise, showPrevStepHelper, step;\n step = this.getStep(this._current);\n showPrevStepHelper = (function(_this) {\n return function(e) {\n return _this.showStep(step.prev);\n };\n })(this);\n promise = this._makePromise(step.onPrev != null ? step.onPrev(this) : void 0);\n return this._callOnPromiseDone(promise, showPrevStepHelper);\n };\n\n Tour.prototype._debug = function(text) {\n if (this._options.debug) {\n return window.console.log(\"Bootstrap Tour '\" + this._options.name + \"' | \" + text);\n }\n };\n\n Tour.prototype._isRedirect = function(host, path, location) {\n var currentPath;\n if (host !== '') {\n if (this._isHostDifferent(host, location.href)) {\n return true;\n }\n }\n currentPath = [location.pathname, location.search, location.hash].join('');\n return (path != null) && path !== '' && (({}.toString.call(path) === '[object RegExp]' && !path.test(currentPath)) || ({}.toString.call(path) === '[object String]' && this._isPathDifferent(path, currentPath)));\n };\n\n Tour.prototype._isHostDifferent = function(host, currentURL) {\n return this._getProtocol(host) !== this._getProtocol(currentURL) || this._getHost(host) !== this._getHost(currentURL);\n };\n\n Tour.prototype._isPathDifferent = function(path, currentPath) {\n return this._getPath(path) !== this._getPath(currentPath) || !this._equal(this._getQuery(path), this._getQuery(currentPath)) || !this._equal(this._getHash(path), this._getHash(currentPath));\n };\n\n Tour.prototype._isJustPathHashDifferent = function(host, path, location) {\n var currentPath;\n if (host !== '') {\n if (this._isHostDifferent(host, location.href)) {\n return false;\n }\n }\n currentPath = [location.pathname, location.search, location.hash].join('');\n if ({}.toString.call(path) === '[object String]') {\n return this._getPath(path) === this._getPath(currentPath) && this._equal(this._getQuery(path), this._getQuery(currentPath)) && !this._equal(this._getHash(path), this._getHash(currentPath));\n }\n return false;\n };\n\n Tour.prototype._redirect = function(step, i, path) {\n if ($.isFunction(step.redirect)) {\n return step.redirect.call(this, path);\n } else if (step.redirect === true) {\n this._debug(\"Redirect to \" + step.host + path);\n if (this._getState('redirect_to') === (\"\" + i)) {\n this._debug(\"Error redirection loop to \" + path);\n this._removeState('redirect_to');\n if (step.onRedirectError != null) {\n return step.onRedirectError(this);\n }\n } else {\n this._setState('redirect_to', \"\" + i);\n return document.location.href = \"\" + step.host + path;\n }\n }\n };\n\n Tour.prototype._isOrphan = function(step) {\n return (step.element == null) || !$(step.element).length || $(step.element).is(':hidden') && ($(step.element)[0].namespaceURI !== 'http://www.w3.org/2000/svg');\n };\n\n Tour.prototype._isLast = function() {\n return this._current < this._options.steps.length - 1;\n };\n\n Tour.prototype._showPopover = function(step, i) {\n var $element, $tip, isOrphan, options, shouldAddSmart;\n $(\".tour-\" + this._options.name).remove();\n options = $.extend({}, this._options);\n isOrphan = this._isOrphan(step);\n step.template = this._template(step, i);\n if (isOrphan) {\n step.element = 'body';\n step.placement = 'top';\n }\n $element = $(step.element);\n $element.addClass(\"tour-\" + this._options.name + \"-element tour-\" + this._options.name + \"-\" + i + \"-element\");\n if (step.options) {\n $.extend(options, step.options);\n }\n if (step.reflex && !isOrphan) {\n $(step.reflexElement).addClass('tour-step-element-reflex').off(\"\" + (this._reflexEvent(step.reflex)) + \".tour-\" + this._options.name).on(\"\" + (this._reflexEvent(step.reflex)) + \".tour-\" + this._options.name, (function(_this) {\n return function() {\n if (_this._isLast()) {\n return _this.next();\n } else {\n return _this.end();\n }\n };\n })(this));\n }\n shouldAddSmart = step.smartPlacement === true && step.placement.search(/auto/i) === -1;\n $element.popover({\n placement: shouldAddSmart ? \"auto \" + step.placement : step.placement,\n trigger: 'manual',\n title: step.title,\n content: step.content,\n html: true,\n animation: step.animation,\n container: step.container,\n template: step.template,\n selector: step.element\n }).popover('show');\n $tip = $element.data('bs.popover') ? $element.data('bs.popover').tip() : $element.data('popover').tip();\n $tip.attr('id', step.id);\n this._reposition($tip, step);\n if (isOrphan) {\n return this._center($tip);\n }\n };\n\n Tour.prototype._template = function(step, i) {\n var $navigation, $next, $prev, $resume, $template, template;\n template = step.template;\n if (this._isOrphan(step) && {}.toString.call(step.orphan) !== '[object Boolean]') {\n template = step.orphan;\n }\n $template = $.isFunction(template) ? $(template(i, step)) : $(template);\n $navigation = $template.find('.popover-navigation');\n $prev = $navigation.find('[data-role=\"prev\"]');\n $next = $navigation.find('[data-role=\"next\"]');\n $resume = $navigation.find('[data-role=\"pause-resume\"]');\n if (this._isOrphan(step)) {\n $template.addClass('orphan');\n }\n $template.addClass(\"tour-\" + this._options.name + \" tour-\" + this._options.name + \"-\" + i);\n if (step.reflex) {\n $template.addClass(\"tour-\" + this._options.name + \"-reflex\");\n }\n if (step.prev < 0) {\n $prev.addClass('disabled');\n $prev.prop('disabled', true);\n }\n if (step.next < 0) {\n $next.addClass('disabled');\n $next.prop('disabled', true);\n }\n if (!step.duration) {\n $resume.remove();\n }\n return $template.clone().wrap('
    ').parent().html();\n };\n\n Tour.prototype._reflexEvent = function(reflex) {\n if ({}.toString.call(reflex) === '[object Boolean]') {\n return 'click';\n } else {\n return reflex;\n }\n };\n\n Tour.prototype._reposition = function($tip, step) {\n var offsetBottom, offsetHeight, offsetRight, offsetWidth, originalLeft, originalTop, tipOffset;\n offsetWidth = $tip[0].offsetWidth;\n offsetHeight = $tip[0].offsetHeight;\n tipOffset = $tip.offset();\n originalLeft = tipOffset.left;\n originalTop = tipOffset.top;\n offsetBottom = $(document).outerHeight() - tipOffset.top - $tip.outerHeight();\n if (offsetBottom < 0) {\n tipOffset.top = tipOffset.top + offsetBottom;\n }\n offsetRight = $('html').outerWidth() - tipOffset.left - $tip.outerWidth();\n if (offsetRight < 0) {\n tipOffset.left = tipOffset.left + offsetRight;\n }\n if (tipOffset.top < 0) {\n tipOffset.top = 0;\n }\n if (tipOffset.left < 0) {\n tipOffset.left = 0;\n }\n $tip.offset(tipOffset);\n if (step.placement === 'bottom' || step.placement === 'top') {\n if (originalLeft !== tipOffset.left) {\n return this._replaceArrow($tip, (tipOffset.left - originalLeft) * 2, offsetWidth, 'left');\n }\n } else {\n if (originalTop !== tipOffset.top) {\n return this._replaceArrow($tip, (tipOffset.top - originalTop) * 2, offsetHeight, 'top');\n }\n }\n };\n\n Tour.prototype._center = function($tip) {\n return $tip.css('top', $(window).outerHeight() / 2 - $tip.outerHeight() / 2);\n };\n\n Tour.prototype._replaceArrow = function($tip, delta, dimension, position) {\n return $tip.find('.arrow').css(position, delta ? 50 * (1 - delta / dimension) + '%' : '');\n };\n\n Tour.prototype._scrollIntoView = function(element, callback) {\n var $element, $window, counter, offsetTop, scrollTop, windowHeight;\n $element = $(element);\n if (!$element.length) {\n return callback();\n }\n $window = $(window);\n offsetTop = $element.offset().top;\n windowHeight = $window.height();\n scrollTop = Math.max(0, offsetTop - (windowHeight / 2));\n this._debug(\"Scroll into view. ScrollTop: \" + scrollTop + \". Element offset: \" + offsetTop + \". Window height: \" + windowHeight + \".\");\n counter = 0;\n return $('body, html').stop(true, true).animate({\n scrollTop: Math.ceil(scrollTop)\n }, (function(_this) {\n return function() {\n if (++counter === 2) {\n callback();\n return _this._debug(\"Scroll into view.\\nAnimation end element offset: \" + ($element.offset().top) + \".\\nWindow height: \" + ($window.height()) + \".\");\n }\n };\n })(this));\n };\n\n Tour.prototype._onResize = function(callback, timeout) {\n return $(window).on(\"resize.tour-\" + this._options.name, function() {\n clearTimeout(timeout);\n return timeout = setTimeout(callback, 100);\n });\n };\n\n Tour.prototype._initMouseNavigation = function() {\n var _this;\n _this = this;\n return $(document).off(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='prev']\").off(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='next']\").off(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='end']\").off(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='pause-resume']\").on(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='next']\", (function(_this) {\n return function(e) {\n e.preventDefault();\n return _this.next();\n };\n })(this)).on(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='prev']\", (function(_this) {\n return function(e) {\n e.preventDefault();\n return _this.prev();\n };\n })(this)).on(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='end']\", (function(_this) {\n return function(e) {\n e.preventDefault();\n return _this.end();\n };\n })(this)).on(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='pause-resume']\", function(e) {\n var $this;\n e.preventDefault();\n $this = $(this);\n $this.text(_this._paused ? $this.data('pause-text') : $this.data('resume-text'));\n if (_this._paused) {\n return _this.resume();\n } else {\n return _this.pause();\n }\n });\n };\n\n Tour.prototype._initKeyboardNavigation = function() {\n if (!this._options.keyboard) {\n return;\n }\n return $(document).on(\"keyup.tour-\" + this._options.name, (function(_this) {\n return function(e) {\n if (!e.which) {\n return;\n }\n switch (e.which) {\n case 39:\n e.preventDefault();\n if (_this._isLast()) {\n return _this.next();\n } else {\n return _this.end();\n }\n break;\n case 37:\n e.preventDefault();\n if (_this._current > 0) {\n return _this.prev();\n }\n break;\n case 27:\n e.preventDefault();\n return _this.end();\n }\n };\n })(this));\n };\n\n Tour.prototype._makePromise = function(result) {\n if (result && $.isFunction(result.then)) {\n return result;\n } else {\n return null;\n }\n };\n\n Tour.prototype._callOnPromiseDone = function(promise, cb, arg) {\n if (promise) {\n return promise.then((function(_this) {\n return function(e) {\n return cb.call(_this, arg);\n };\n })(this));\n } else {\n return cb.call(this, arg);\n }\n };\n\n Tour.prototype._showBackdrop = function(step) {\n if (this.backdrop.backgroundShown) {\n return;\n }\n this.backdrop = $('
    ', {\n \"class\": 'tour-backdrop'\n });\n this.backdrop.backgroundShown = true;\n return $(step.backdropContainer).append(this.backdrop);\n };\n\n Tour.prototype._hideBackdrop = function() {\n this._hideOverlayElement();\n return this._hideBackground();\n };\n\n Tour.prototype._hideBackground = function() {\n if (this.backdrop) {\n this.backdrop.remove();\n this.backdrop.overlay = null;\n return this.backdrop.backgroundShown = false;\n }\n };\n\n Tour.prototype._showOverlayElement = function(step, force) {\n var $element, elementData;\n $element = $(step.element);\n if (!$element || $element.length === 0 || this.backdrop.overlayElementShown && !force) {\n return;\n }\n if (!this.backdrop.overlayElementShown) {\n this.backdrop.$element = $element.addClass('tour-step-backdrop');\n this.backdrop.$background = $('
    ', {\n \"class\": 'tour-step-background'\n });\n this.backdrop.$background.appendTo(step.backdropContainer);\n this.backdrop.overlayElementShown = true;\n }\n elementData = {\n width: $element.innerWidth(),\n height: $element.innerHeight(),\n offset: $element.offset()\n };\n if (step.backdropPadding) {\n elementData = this._applyBackdropPadding(step.backdropPadding, elementData);\n }\n return this.backdrop.$background.width(elementData.width).height(elementData.height).offset(elementData.offset);\n };\n\n Tour.prototype._hideOverlayElement = function() {\n if (!this.backdrop.overlayElementShown) {\n return;\n }\n this.backdrop.$element.removeClass('tour-step-backdrop');\n this.backdrop.$background.remove();\n this.backdrop.$element = null;\n this.backdrop.$background = null;\n return this.backdrop.overlayElementShown = false;\n };\n\n Tour.prototype._applyBackdropPadding = function(padding, data) {\n if (typeof padding === 'object') {\n if (padding.top == null) {\n padding.top = 0;\n }\n if (padding.right == null) {\n padding.right = 0;\n }\n if (padding.bottom == null) {\n padding.bottom = 0;\n }\n if (padding.left == null) {\n padding.left = 0;\n }\n data.offset.top = data.offset.top - padding.top;\n data.offset.left = data.offset.left - padding.left;\n data.width = data.width + padding.left + padding.right;\n data.height = data.height + padding.top + padding.bottom;\n } else {\n data.offset.top = data.offset.top - padding;\n data.offset.left = data.offset.left - padding;\n data.width = data.width + (padding * 2);\n data.height = data.height + (padding * 2);\n }\n return data;\n };\n\n Tour.prototype._clearTimer = function() {\n window.clearTimeout(this._timer);\n this._timer = null;\n return this._duration = null;\n };\n\n Tour.prototype._getProtocol = function(url) {\n url = url.split('://');\n if (url.length > 1) {\n return url[0];\n } else {\n return 'http';\n }\n };\n\n Tour.prototype._getHost = function(url) {\n url = url.split('//');\n url = url.length > 1 ? url[1] : url[0];\n return url.split('/')[0];\n };\n\n Tour.prototype._getPath = function(path) {\n return path.replace(/\\/?$/, '').split('?')[0].split('#')[0];\n };\n\n Tour.prototype._getQuery = function(path) {\n return this._getParams(path, '?');\n };\n\n Tour.prototype._getHash = function(path) {\n return this._getParams(path, '#');\n };\n\n Tour.prototype._getParams = function(path, start) {\n var param, params, paramsObject, _i, _len;\n params = path.split(start);\n if (params.length === 1) {\n return {};\n }\n params = params[1].split('&');\n paramsObject = {};\n for (_i = 0, _len = params.length; _i < _len; _i++) {\n param = params[_i];\n param = param.split('=');\n paramsObject[param[0]] = param[1] || '';\n }\n return paramsObject;\n };\n\n Tour.prototype._equal = function(obj1, obj2) {\n var k, v;\n if ({}.toString.call(obj1) === '[object Object]' && {}.toString.call(obj2) === '[object Object]') {\n for (k in obj1) {\n v = obj1[k];\n if (obj2[k] !== v) {\n return false;\n }\n }\n for (k in obj2) {\n v = obj2[k];\n if (obj1[k] !== v) {\n return false;\n }\n }\n return true;\n }\n return obj1 === obj2;\n };\n\n return Tour;\n\n })();\n return window.Tour = Tour;\n})(jQuery, window);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./galaxy/scripts/libs/bootstrap-tour.js\n ** module id = 61\n ** module chunks = 2\n **/","/*! jQuery UI - v1.9.1 - 2012-10-29\n* http://jqueryui.com\n* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.menu.js, jquery.ui.slider.js\n* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */\n\n(function(e,t){function i(t,n){var r,i,o,u=t.nodeName.toLowerCase();return\"area\"===u?(r=t.parentNode,i=r.name,!t.href||!i||r.nodeName.toLowerCase()!==\"map\"?!1:(o=e(\"img[usemap=#\"+i+\"]\")[0],!!o&&s(o))):(/input|select|textarea|button|object/.test(u)?!t.disabled:\"a\"===u?t.href||n:n)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().andSelf().filter(function(){return e.css(this,\"visibility\")===\"hidden\"}).length}var n=0,r=/^ui-id-\\d+$/;e.ui=e.ui||{};if(e.ui.version)return;e.extend(e.ui,{version:\"1.9.1\",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({_focus:e.fn.focus,focus:function(t,n){return typeof t==\"number\"?this.each(function(){var r=this;setTimeout(function(){e(r).focus(),n&&n.call(r)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return e.ui.ie&&/(static|relative)/.test(this.css(\"position\"))||/absolute/.test(this.css(\"position\"))?t=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,\"position\"))&&/(auto|scroll)/.test(e.css(this,\"overflow\")+e.css(this,\"overflow-y\")+e.css(this,\"overflow-x\"))}).eq(0):t=this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,\"overflow\")+e.css(this,\"overflow-y\")+e.css(this,\"overflow-x\"))}).eq(0),/fixed/.test(this.css(\"position\"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css(\"zIndex\",n);if(this.length){var r=e(this[0]),i,s;while(r.length&&r[0]!==document){i=r.css(\"position\");if(i===\"absolute\"||i===\"relative\"||i===\"fixed\"){s=parseInt(r.css(\"zIndex\"),10);if(!isNaN(s)&&s!==0)return s}r=r.parent()}}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id=\"ui-id-\"+ ++n)})},removeUniqueId:function(){return this.each(function(){r.test(this.id)&&e(this).removeAttr(\"id\")})}}),e(\"\").outerWidth(1).jquery||e.each([\"Width\",\"Height\"],function(n,r){function u(t,n,r,s){return e.each(i,function(){n-=parseFloat(e.css(t,\"padding\"+this))||0,r&&(n-=parseFloat(e.css(t,\"border\"+this+\"Width\"))||0),s&&(n-=parseFloat(e.css(t,\"margin\"+this))||0)}),n}var i=r===\"Width\"?[\"Left\",\"Right\"]:[\"Top\",\"Bottom\"],s=r.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn[\"inner\"+r]=function(n){return n===t?o[\"inner\"+r].call(this):this.each(function(){e(this).css(s,u(this,n)+\"px\")})},e.fn[\"outer\"+r]=function(t,n){return typeof t!=\"number\"?o[\"outer\"+r].call(this,t):this.each(function(){e(this).css(s,u(this,t,!0,n)+\"px\")})}}),e.extend(e.expr[\":\"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,\"tabindex\")))},tabbable:function(t){var n=e.attr(t,\"tabindex\"),r=isNaN(n);return(r||n>=0)&&i(t,!r)}}),e(function(){var t=document.body,n=t.appendChild(n=document.createElement(\"div\"));n.offsetHeight,e.extend(n.style,{minHeight:\"100px\",height:\"auto\",padding:0,borderWidth:0}),e.support.minHeight=n.offsetHeight===100,e.support.selectstart=\"onselectstart\"in n,t.removeChild(n).style.display=\"none\"}),function(){var t=/msie ([\\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];e.ui.ie=t.length?!0:!1,e.ui.ie6=parseFloat(t[1],10)===6}(),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?\"selectstart\":\"mousedown\")+\".ui-disableSelection\",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(\".ui-disableSelection\")}}),e.extend(e.ui,{plugin:{add:function(t,n,r){var i,s=e.ui[t].prototype;for(i in r)s.plugins[i]=s.plugins[i]||[],s.plugins[i].push([n,r[i]])},call:function(e,t,n){var r,i=e.plugins[t];if(!i||!e.element[0].parentNode||e.element[0].parentNode.nodeType===11)return;for(r=0;r0?!0:(t[r]=1,i=t[r]>0,t[r]=0,i)},isOverAxis:function(e,t,n){return e>t&&e\",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace=\".\"+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetName,this),e.data(r,this.widgetFullName,this),this._on(this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger(\"create\",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr(\"aria-disabled\").removeClass(this.widgetFullName+\"-disabled \"+\"ui-state-disabled\"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass(\"ui-state-hover\"),this.focusable.removeClass(\"ui-state-focus\")},_destroy:e.noop,widget:function(){return this.element},option:function(n,r){var i=n,s,o,u;if(arguments.length===0)return e.widget.extend({},this.options);if(typeof n==\"string\"){i={},s=n.split(\".\"),n=s.shift();if(s.length){o=i[n]=e.widget.extend({},this.options[n]);for(u=0;u=9||!!t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).unbind(\"mouseup.\"+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+\".preventClickEvent\",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(e){return this.mouseDelayMet},_mouseStart:function(e){},_mouseDrag:function(e){},_mouseStop:function(e){},_mouseCapture:function(e){return!0}})})(jQuery);(function(e,t){function h(e,t,n){return[parseInt(e[0],10)*(l.test(e[0])?t/100:1),parseInt(e[1],10)*(l.test(e[1])?n/100:1)]}function p(t,n){return parseInt(e.css(t,n),10)||0}e.ui=e.ui||{};var n,r=Math.max,i=Math.abs,s=Math.round,o=/left|center|right/,u=/top|center|bottom/,a=/[\\+\\-]\\d+%?/,f=/^\\w+/,l=/%$/,c=e.fn.position;e.position={scrollbarWidth:function(){if(n!==t)return n;var r,i,s=e(\"
    \"),o=s.children()[0];return e(\"body\").append(s),r=o.offsetWidth,s.css(\"overflow\",\"scroll\"),i=o.offsetWidth,r===i&&(i=s[0].clientWidth),s.remove(),n=r-i},getScrollInfo:function(t){var n=t.isWindow?\"\":t.element.css(\"overflow-x\"),r=t.isWindow?\"\":t.element.css(\"overflow-y\"),i=n===\"scroll\"||n===\"auto\"&&t.width0?\"right\":\"center\",vertical:u<0?\"top\":o>0?\"bottom\":\"middle\"};lr(i(o),i(u))?h.important=\"horizontal\":h.important=\"vertical\",t.using.call(this,e,h)}),a.offset(e.extend(C,{using:u}))})},e.ui.position={fit:{left:function(e,t){var n=t.within,i=n.isWindow?n.scrollLeft:n.offset.left,s=n.width,o=e.left-t.collisionPosition.marginLeft,u=i-o,a=o+t.collisionWidth-s-i,f;t.collisionWidth>s?u>0&&a<=0?(f=e.left+u+t.collisionWidth-s-i,e.left+=u-f):a>0&&u<=0?e.left=i:u>a?e.left=i+s-t.collisionWidth:e.left=i:u>0?e.left+=u:a>0?e.left-=a:e.left=r(e.left-o,e.left)},top:function(e,t){var n=t.within,i=n.isWindow?n.scrollTop:n.offset.top,s=t.within.height,o=e.top-t.collisionPosition.marginTop,u=i-o,a=o+t.collisionHeight-s-i,f;t.collisionHeight>s?u>0&&a<=0?(f=e.top+u+t.collisionHeight-s-i,e.top+=u-f):a>0&&u<=0?e.top=i:u>a?e.top=i+s-t.collisionHeight:e.top=i:u>0?e.top+=u:a>0?e.top-=a:e.top=r(e.top-o,e.top)}},flip:{left:function(e,t){var n=t.within,r=n.offset.left+n.scrollLeft,s=n.width,o=n.isWindow?n.scrollLeft:n.offset.left,u=e.left-t.collisionPosition.marginLeft,a=u-o,f=u+t.collisionWidth-s-o,l=t.my[0]===\"left\"?-t.elemWidth:t.my[0]===\"right\"?t.elemWidth:0,c=t.at[0]===\"left\"?t.targetWidth:t.at[0]===\"right\"?-t.targetWidth:0,h=-2*t.offset[0],p,d;if(a<0){p=e.left+l+c+h+t.collisionWidth-s-r;if(p<0||p0){d=e.left-t.collisionPosition.marginLeft+l+c+h-o;if(d>0||i(d)a&&(v<0||v0&&(d=e.top-t.collisionPosition.marginTop+c+h+p-o,e.top+c+h+p>f&&(d>0||i(d)10&&i<11,t.innerHTML=\"\",n.removeChild(t)}(),e.uiBackCompat!==!1&&function(e){var n=e.fn.position;e.fn.position=function(r){if(!r||!r.offset)return n.call(this,r);var i=r.offset.split(\" \"),s=r.at.split(\" \");return i.length===1&&(i[1]=i[0]),/^\\d/.test(i[0])&&(i[0]=\"+\"+i[0]),/^\\d/.test(i[1])&&(i[1]=\"+\"+i[1]),s.length===1&&(/left|center|right/.test(s[0])?s[1]=\"center\":(s[1]=s[0],s[0]=\"center\")),n.call(this,e.extend(r,{at:s[0]+i[0]+\" \"+s[1]+i[1],offset:t}))}}(jQuery)})(jQuery);(function(e,t){var n=0;e.widget(\"ui.autocomplete\",{version:\"1.9.1\",defaultElement:\"\",options:{appendTo:\"body\",autoFocus:!1,delay:300,minLength:1,position:{my:\"left top\",at:\"left bottom\",collision:\"none\"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var t,n,r;this.isMultiLine=this._isMultiLine(),this.valueMethod=this.element[this.element.is(\"input,textarea\")?\"val\":\"text\"],this.isNewMenu=!0,this.element.addClass(\"ui-autocomplete-input\").attr(\"autocomplete\",\"off\"),this._on(this.element,{keydown:function(i){if(this.element.prop(\"readOnly\")){t=!0,r=!0,n=!0;return}t=!1,r=!1,n=!1;var s=e.ui.keyCode;switch(i.keyCode){case s.PAGE_UP:t=!0,this._move(\"previousPage\",i);break;case s.PAGE_DOWN:t=!0,this._move(\"nextPage\",i);break;case s.UP:t=!0,this._keyEvent(\"previous\",i);break;case s.DOWN:t=!0,this._keyEvent(\"next\",i);break;case s.ENTER:case s.NUMPAD_ENTER:this.menu.active&&(t=!0,i.preventDefault(),this.menu.select(i));break;case s.TAB:this.menu.active&&this.menu.select(i);break;case s.ESCAPE:this.menu.element.is(\":visible\")&&(this._value(this.term),this.close(i),i.preventDefault());break;default:n=!0,this._searchTimeout(i)}},keypress:function(r){if(t){t=!1,r.preventDefault();return}if(n)return;var i=e.ui.keyCode;switch(r.keyCode){case i.PAGE_UP:this._move(\"previousPage\",r);break;case i.PAGE_DOWN:this._move(\"nextPage\",r);break;case i.UP:this._keyEvent(\"previous\",r);break;case i.DOWN:this._keyEvent(\"next\",r)}},input:function(e){if(r){r=!1,e.preventDefault();return}this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){if(this.cancelBlur){delete this.cancelBlur;return}clearTimeout(this.searching),this.close(e),this._change(e)}}),this._initSource(),this.menu=e(\"
      \").addClass(\"ui-autocomplete\").appendTo(this.document.find(this.options.appendTo||\"body\")[0]).menu({input:e(),role:null}).zIndex(this.element.zIndex()+1).hide().data(\"menu\"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var n=this.menu.element[0];e(t.target).closest(\".ui-menu-item\").length||this._delay(function(){var t=this;this.document.one(\"mousedown\",function(r){r.target!==t.element[0]&&r.target!==n&&!e.contains(n,r.target)&&t.close()})})},menufocus:function(t,n){if(this.isNewMenu){this.isNewMenu=!1;if(t.originalEvent&&/^mouse/.test(t.originalEvent.type)){this.menu.blur(),this.document.one(\"mousemove\",function(){e(t.target).trigger(t.originalEvent)});return}}var r=n.item.data(\"ui-autocomplete-item\")||n.item.data(\"item.autocomplete\");!1!==this._trigger(\"focus\",t,{item:r})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(r.value):this.liveRegion.text(r.value)},menuselect:function(e,t){var n=t.item.data(\"ui-autocomplete-item\")||t.item.data(\"item.autocomplete\"),r=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=r,this._delay(function(){this.previous=r,this.selectedItem=n})),!1!==this._trigger(\"select\",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n}}),this.liveRegion=e(\"\",{role:\"status\",\"aria-live\":\"polite\"}).addClass(\"ui-helper-hidden-accessible\").insertAfter(this.element),e.fn.bgiframe&&this.menu.element.bgiframe(),this._on(this.window,{beforeunload:function(){this.element.removeAttr(\"autocomplete\")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass(\"ui-autocomplete-input\").removeAttr(\"autocomplete\"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),e===\"source\"&&this._initSource(),e===\"appendTo\"&&this.menu.element.appendTo(this.document.find(t||\"body\")[0]),e===\"disabled\"&&t&&this.xhr&&this.xhr.abort()},_isMultiLine:function(){return this.element.is(\"textarea\")?!0:this.element.is(\"input\")?!1:this.element.prop(\"isContentEditable\")},_initSource:function(){var t,n,r=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(n,r){r(e.ui.autocomplete.filter(t,n.term))}):typeof this.options.source==\"string\"?(n=this.options.source,this.source=function(t,i){r.xhr&&r.xhr.abort(),r.xhr=e.ajax({url:n,data:t,dataType:\"json\",success:function(e){i(e)},error:function(){i([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){e=e!=null?e:this._value(),this.term=this._value();if(e.length\").append(e(\"\").text(n.label)).appendTo(t)},_move:function(e,t){if(!this.menu.element.is(\":visible\")){this.search(null,t);return}if(this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)){this._value(this.term),this.menu.blur();return}this.menu[e](t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){if(!this.isMultiLine||this.menu.element.is(\":visible\"))this._move(e,t),t.preventDefault()}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g,\"\\\\$&\")},filter:function(t,n){var r=new RegExp(e.ui.autocomplete.escapeRegex(n),\"i\");return e.grep(t,function(e){return r.test(e.label||e.value||e)})}}),e.widget(\"ui.autocomplete\",e.ui.autocomplete,{options:{messages:{noResults:\"No search results.\",results:function(e){return e+(e>1?\" results are\":\" result is\")+\" available, use up and down arrow keys to navigate.\"}}},__response:function(e){var t;this._superApply(arguments);if(this.options.disabled||this.cancelSearch)return;e&&e.length?t=this.options.messages.results(e.length):t=this.options.messages.noResults,this.liveRegion.text(t)}})})(jQuery);(function(e,t){var n,r,i,s,o=\"ui-button ui-widget ui-state-default ui-corner-all\",u=\"ui-state-hover ui-state-active \",a=\"ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only\",f=function(){var t=e(this).find(\":ui-button\");setTimeout(function(){t.button(\"refresh\")},1)},l=function(t){var n=t.name,r=t.form,i=e([]);return n&&(r?i=e(r).find(\"[name='\"+n+\"']\"):i=e(\"[name='\"+n+\"']\",t.ownerDocument).filter(function(){return!this.form})),i};e.widget(\"ui.button\",{version:\"1.9.1\",defaultElement:\"
    \"\n\t )\n\t });\n\t modal.show( { backdrop: true } );\n\t}\n\t\n\t\n\t// ============================================================================\n\t return {\n\t Modal : Modal,\n\t hide_modal : hide_modal,\n\t show_modal : show_modal,\n\t show_message : show_message,\n\t show_in_overlay : show_in_overlay,\n\t };\n\t}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n\n/***/ },\n/* 60 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(Backbone, _, $) {!(__WEBPACK_AMD_DEFINE_ARRAY__ = [\n\t __webpack_require__(88),\n\t __webpack_require__(11),\n\t __webpack_require__(8),\n\t __webpack_require__(6)\n\t], __WEBPACK_AMD_DEFINE_RESULT__ = function( Masthead, Panel, Modal, BaseMVC ) {\n\t\n\t// ============================================================================\n\tvar PageLayoutView = Backbone.View.extend( BaseMVC.LoggableMixin ).extend({\n\t _logNamespace : 'layout',\n\t\n\t el : 'body',\n\t className : 'full-content',\n\t\n\t _panelIds : [\n\t 'left', 'center', 'right'\n\t ],\n\t\n\t defaultOptions : {\n\t message_box_visible : false,\n\t message_box_content : '',\n\t message_box_class : 'info',\n\t show_inactivity_warning : false,\n\t inactivity_box_content : ''\n\t },\n\t\n\t initialize : function( options ) {\n\t // TODO: remove globals\n\t this.log( this + '.initialize:', options );\n\t _.extend( this, _.pick( options, this._panelIds ) );\n\t this.options = _.defaults( _.omit( options.config, this._panelIds ), this.defaultOptions );\n\t Galaxy.modal = this.modal = new Modal.View();\n\t this.masthead = new Masthead.View( this.options );\n\t this.$el.attr( 'scroll', 'no' );\n\t this.$el.html( this._template() );\n\t this.$el.append( this.masthead.frame.$el );\n\t this.$( '#masthead' ).replaceWith( this.masthead.$el );\n\t this.$el.append( this.modal.$el );\n\t this.$messagebox = this.$( '#messagebox' );\n\t this.$inactivebox = this.$( '#inactivebox' );\n\t },\n\t\n\t render : function() {\n\t // TODO: Remove this line after select2 update\n\t $( '.select2-hidden-accessible' ).remove();\n\t this.log( this + '.render:' );\n\t this.masthead.render();\n\t this.renderMessageBox();\n\t this.renderInactivityBox();\n\t this.renderPanels();\n\t return this;\n\t },\n\t\n\t /** Render message box */\n\t renderMessageBox : function() {\n\t if ( this.options.message_box_visible ){\n\t var content = this.options.message_box_content || '';\n\t var level = this.options.message_box_class || 'info';\n\t this.$el.addClass( 'has-message-box' );\n\t this.$messagebox\n\t .attr( 'class', 'panel-' + level + '-message' )\n\t .html( content )\n\t .toggle( !!content )\n\t .show();\n\t } else {\n\t this.$el.removeClass( 'has-message-box' );\n\t this.$messagebox.hide();\n\t }\n\t return this;\n\t },\n\t\n\t /** Render inactivity warning */\n\t renderInactivityBox : function() {\n\t if( this.options.show_inactivity_warning ){\n\t var content = this.options.inactivity_box_content || '';\n\t var verificationLink = $( '
    ' ).attr( 'href', Galaxy.root + 'user/resend_verification' ).text( 'Resend verification' );\n\t this.$el.addClass( 'has-inactivity-box' );\n\t this.$inactivebox\n\t .html( content + ' ' )\n\t .append( verificationLink )\n\t .toggle( !!content )\n\t .show();\n\t } else {\n\t this.$el.removeClass( 'has-inactivity-box' );\n\t this.$inactivebox.hide();\n\t }\n\t return this;\n\t },\n\t\n\t /** Render panels */\n\t renderPanels : function() {\n\t var page = this;\n\t this._panelIds.forEach( function( panelId ){\n\t if( _.has( page, panelId ) ){\n\t page[ panelId ].setElement( '#' + panelId );\n\t page[ panelId ].render();\n\t }\n\t });\n\t if( !this.left ){\n\t this.center.$el.css( 'left', 0 );\n\t }\n\t if( !this.right ){\n\t this.center.$el.css( 'right', 0 );\n\t }\n\t return this;\n\t },\n\t\n\t /** body template */\n\t _template: function() {\n\t return [\n\t '
    ',\n\t '
    ',\n\t '
    ',\n\t '
    ',\n\t '
    ',\n\t this.left? '
    ' : '',\n\t this.center? '
    ' : '',\n\t this.right? '
    ' : '',\n\t '
    ',\n\t '
    ',\n\t ].join('');\n\t },\n\t\n\t /** hide both side panels if previously shown */\n\t hideSidePanels : function(){\n\t if( this.left ){\n\t this.left.hide();\n\t }\n\t if( this.right ){\n\t this.right.hide();\n\t }\n\t },\n\t\n\t toString : function() { return 'PageLayoutView'; }\n\t});\n\t\n\t// ============================================================================\n\t return {\n\t PageLayoutView: PageLayoutView\n\t };\n\t}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(2), __webpack_require__(1)))\n\n/***/ },\n/* 61 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(jQuery) {/* ========================================================================\n\t * bootstrap-tour - v0.10.2\n\t * http://bootstraptour.com\n\t * ========================================================================\n\t * Copyright 2012-2015 Ulrich Sossou\n\t *\n\t * ========================================================================\n\t * Licensed under the MIT License (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t * https://opensource.org/licenses/MIT\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t * ========================================================================\n\t */\n\t\n\t(function($, window) {\n\t var Tour, document;\n\t document = window.document;\n\t Tour = (function() {\n\t function Tour(options) {\n\t var storage;\n\t try {\n\t storage = window.localStorage;\n\t } catch (_error) {\n\t storage = false;\n\t }\n\t this._options = $.extend({\n\t name: 'tour',\n\t steps: [],\n\t container: 'body',\n\t autoscroll: true,\n\t keyboard: true,\n\t storage: storage,\n\t debug: false,\n\t backdrop: false,\n\t backdropContainer: 'body',\n\t backdropPadding: 0,\n\t redirect: true,\n\t orphan: false,\n\t duration: false,\n\t delay: false,\n\t basePath: '',\n\t template: '

    ',\n\t afterSetState: function(key, value) {},\n\t afterGetState: function(key, value) {},\n\t afterRemoveState: function(key) {},\n\t onStart: function(tour) {},\n\t onEnd: function(tour) {},\n\t onShow: function(tour) {},\n\t onShown: function(tour) {},\n\t onHide: function(tour) {},\n\t onHidden: function(tour) {},\n\t onNext: function(tour) {},\n\t onPrev: function(tour) {},\n\t onPause: function(tour, duration) {},\n\t onResume: function(tour, duration) {},\n\t onRedirectError: function(tour) {}\n\t }, options);\n\t this._force = false;\n\t this._inited = false;\n\t this._current = null;\n\t this.backdrop = {\n\t overlay: null,\n\t $element: null,\n\t $background: null,\n\t backgroundShown: false,\n\t overlayElementShown: false\n\t };\n\t this;\n\t }\n\t\n\t Tour.prototype.addSteps = function(steps) {\n\t var step, _i, _len;\n\t for (_i = 0, _len = steps.length; _i < _len; _i++) {\n\t step = steps[_i];\n\t this.addStep(step);\n\t }\n\t return this;\n\t };\n\t\n\t Tour.prototype.addStep = function(step) {\n\t this._options.steps.push(step);\n\t return this;\n\t };\n\t\n\t Tour.prototype.getStep = function(i) {\n\t if (this._options.steps[i] != null) {\n\t return $.extend({\n\t id: \"step-\" + i,\n\t path: '',\n\t host: '',\n\t placement: 'right',\n\t title: '',\n\t content: '

    ',\n\t next: i === this._options.steps.length - 1 ? -1 : i + 1,\n\t prev: i - 1,\n\t animation: true,\n\t container: this._options.container,\n\t autoscroll: this._options.autoscroll,\n\t backdrop: this._options.backdrop,\n\t backdropContainer: this._options.backdropContainer,\n\t backdropPadding: this._options.backdropPadding,\n\t redirect: this._options.redirect,\n\t reflexElement: this._options.steps[i].element,\n\t orphan: this._options.orphan,\n\t duration: this._options.duration,\n\t delay: this._options.delay,\n\t template: this._options.template,\n\t onShow: this._options.onShow,\n\t onShown: this._options.onShown,\n\t onHide: this._options.onHide,\n\t onHidden: this._options.onHidden,\n\t onNext: this._options.onNext,\n\t onPrev: this._options.onPrev,\n\t onPause: this._options.onPause,\n\t onResume: this._options.onResume,\n\t onRedirectError: this._options.onRedirectError\n\t }, this._options.steps[i]);\n\t }\n\t };\n\t\n\t Tour.prototype.init = function(force) {\n\t this._force = force;\n\t if (this.ended()) {\n\t this._debug('Tour ended, init prevented.');\n\t return this;\n\t }\n\t this.setCurrentStep();\n\t this._initMouseNavigation();\n\t this._initKeyboardNavigation();\n\t this._onResize((function(_this) {\n\t return function() {\n\t return _this.showStep(_this._current);\n\t };\n\t })(this));\n\t if (this._current !== null) {\n\t this.showStep(this._current);\n\t }\n\t this._inited = true;\n\t return this;\n\t };\n\t\n\t Tour.prototype.start = function(force) {\n\t var promise;\n\t if (force == null) {\n\t force = false;\n\t }\n\t if (!this._inited) {\n\t this.init(force);\n\t }\n\t if (this._current === null) {\n\t promise = this._makePromise(this._options.onStart != null ? this._options.onStart(this) : void 0);\n\t this._callOnPromiseDone(promise, this.showStep, 0);\n\t }\n\t return this;\n\t };\n\t\n\t Tour.prototype.next = function() {\n\t var promise;\n\t promise = this.hideStep(this._current);\n\t return this._callOnPromiseDone(promise, this._showNextStep);\n\t };\n\t\n\t Tour.prototype.prev = function() {\n\t var promise;\n\t promise = this.hideStep(this._current);\n\t return this._callOnPromiseDone(promise, this._showPrevStep);\n\t };\n\t\n\t Tour.prototype.goTo = function(i) {\n\t var promise;\n\t promise = this.hideStep(this._current);\n\t return this._callOnPromiseDone(promise, this.showStep, i);\n\t };\n\t\n\t Tour.prototype.end = function() {\n\t var endHelper, promise;\n\t endHelper = (function(_this) {\n\t return function(e) {\n\t $(document).off(\"click.tour-\" + _this._options.name);\n\t $(document).off(\"keyup.tour-\" + _this._options.name);\n\t $(window).off(\"resize.tour-\" + _this._options.name);\n\t _this._setState('end', 'yes');\n\t _this._inited = false;\n\t _this._force = false;\n\t _this._clearTimer();\n\t if (_this._options.onEnd != null) {\n\t return _this._options.onEnd(_this);\n\t }\n\t };\n\t })(this);\n\t promise = this.hideStep(this._current);\n\t return this._callOnPromiseDone(promise, endHelper);\n\t };\n\t\n\t Tour.prototype.ended = function() {\n\t return !this._force && !!this._getState('end');\n\t };\n\t\n\t Tour.prototype.restart = function() {\n\t this._removeState('current_step');\n\t this._removeState('end');\n\t this._removeState('redirect_to');\n\t return this.start();\n\t };\n\t\n\t Tour.prototype.pause = function() {\n\t var step;\n\t step = this.getStep(this._current);\n\t if (!(step && step.duration)) {\n\t return this;\n\t }\n\t this._paused = true;\n\t this._duration -= new Date().getTime() - this._start;\n\t window.clearTimeout(this._timer);\n\t this._debug(\"Paused/Stopped step \" + (this._current + 1) + \" timer (\" + this._duration + \" remaining).\");\n\t if (step.onPause != null) {\n\t return step.onPause(this, this._duration);\n\t }\n\t };\n\t\n\t Tour.prototype.resume = function() {\n\t var step;\n\t step = this.getStep(this._current);\n\t if (!(step && step.duration)) {\n\t return this;\n\t }\n\t this._paused = false;\n\t this._start = new Date().getTime();\n\t this._duration = this._duration || step.duration;\n\t this._timer = window.setTimeout((function(_this) {\n\t return function() {\n\t if (_this._isLast()) {\n\t return _this.next();\n\t } else {\n\t return _this.end();\n\t }\n\t };\n\t })(this), this._duration);\n\t this._debug(\"Started step \" + (this._current + 1) + \" timer with duration \" + this._duration);\n\t if ((step.onResume != null) && this._duration !== step.duration) {\n\t return step.onResume(this, this._duration);\n\t }\n\t };\n\t\n\t Tour.prototype.hideStep = function(i) {\n\t var hideStepHelper, promise, step;\n\t step = this.getStep(i);\n\t if (!step) {\n\t return;\n\t }\n\t this._clearTimer();\n\t promise = this._makePromise(step.onHide != null ? step.onHide(this, i) : void 0);\n\t hideStepHelper = (function(_this) {\n\t return function(e) {\n\t var $element;\n\t $element = $(step.element);\n\t if (!($element.data('bs.popover') || $element.data('popover'))) {\n\t $element = $('body');\n\t }\n\t $element.popover('destroy').removeClass(\"tour-\" + _this._options.name + \"-element tour-\" + _this._options.name + \"-\" + i + \"-element\");\n\t $element.removeData('bs.popover');\n\t if (step.reflex) {\n\t $(step.reflexElement).removeClass('tour-step-element-reflex').off(\"\" + (_this._reflexEvent(step.reflex)) + \".tour-\" + _this._options.name);\n\t }\n\t if (step.backdrop) {\n\t _this._hideBackdrop();\n\t }\n\t if (step.onHidden != null) {\n\t return step.onHidden(_this);\n\t }\n\t };\n\t })(this);\n\t this._callOnPromiseDone(promise, hideStepHelper);\n\t return promise;\n\t };\n\t\n\t Tour.prototype.showStep = function(i) {\n\t var promise, showStepHelper, skipToPrevious, step;\n\t if (this.ended()) {\n\t this._debug('Tour ended, showStep prevented.');\n\t return this;\n\t }\n\t step = this.getStep(i);\n\t if (!step) {\n\t return;\n\t }\n\t skipToPrevious = i < this._current;\n\t promise = this._makePromise(step.onShow != null ? step.onShow(this, i) : void 0);\n\t showStepHelper = (function(_this) {\n\t return function(e) {\n\t var path, showPopoverAndOverlay;\n\t _this.setCurrentStep(i);\n\t path = (function() {\n\t switch ({}.toString.call(step.path)) {\n\t case '[object Function]':\n\t return step.path();\n\t case '[object String]':\n\t return this._options.basePath + step.path;\n\t default:\n\t return step.path;\n\t }\n\t }).call(_this);\n\t if (_this._isRedirect(step.host, path, document.location)) {\n\t _this._redirect(step, i, path);\n\t if (!_this._isJustPathHashDifferent(step.host, path, document.location)) {\n\t return;\n\t }\n\t }\n\t if (_this._isOrphan(step)) {\n\t if (step.orphan === false) {\n\t _this._debug(\"Skip the orphan step \" + (_this._current + 1) + \".\\nOrphan option is false and the element does not exist or is hidden.\");\n\t if (skipToPrevious) {\n\t _this._showPrevStep();\n\t } else {\n\t _this._showNextStep();\n\t }\n\t return;\n\t }\n\t _this._debug(\"Show the orphan step \" + (_this._current + 1) + \". Orphans option is true.\");\n\t }\n\t if (step.backdrop) {\n\t _this._showBackdrop(step);\n\t }\n\t showPopoverAndOverlay = function() {\n\t if (_this.getCurrentStep() !== i || _this.ended()) {\n\t return;\n\t }\n\t if ((step.element != null) && step.backdrop) {\n\t _this._showOverlayElement(step);\n\t }\n\t _this._showPopover(step, i);\n\t if (step.onShown != null) {\n\t step.onShown(_this);\n\t }\n\t return _this._debug(\"Step \" + (_this._current + 1) + \" of \" + _this._options.steps.length);\n\t };\n\t if (step.autoscroll) {\n\t _this._scrollIntoView(step.element, showPopoverAndOverlay);\n\t } else {\n\t showPopoverAndOverlay();\n\t }\n\t if (step.duration) {\n\t return _this.resume();\n\t }\n\t };\n\t })(this);\n\t if (step.delay) {\n\t this._debug(\"Wait \" + step.delay + \" milliseconds to show the step \" + (this._current + 1));\n\t window.setTimeout((function(_this) {\n\t return function() {\n\t return _this._callOnPromiseDone(promise, showStepHelper);\n\t };\n\t })(this), step.delay);\n\t } else {\n\t this._callOnPromiseDone(promise, showStepHelper);\n\t }\n\t return promise;\n\t };\n\t\n\t Tour.prototype.getCurrentStep = function() {\n\t return this._current;\n\t };\n\t\n\t Tour.prototype.setCurrentStep = function(value) {\n\t if (value != null) {\n\t this._current = value;\n\t this._setState('current_step', value);\n\t } else {\n\t this._current = this._getState('current_step');\n\t this._current = this._current === null ? null : parseInt(this._current, 10);\n\t }\n\t return this;\n\t };\n\t\n\t Tour.prototype.redraw = function() {\n\t return this._showOverlayElement(this.getStep(this.getCurrentStep()).element, true);\n\t };\n\t\n\t Tour.prototype._setState = function(key, value) {\n\t var e, keyName;\n\t if (this._options.storage) {\n\t keyName = \"\" + this._options.name + \"_\" + key;\n\t try {\n\t this._options.storage.setItem(keyName, value);\n\t } catch (_error) {\n\t e = _error;\n\t if (e.code === DOMException.QUOTA_EXCEEDED_ERR) {\n\t this._debug('LocalStorage quota exceeded. State storage failed.');\n\t }\n\t }\n\t return this._options.afterSetState(keyName, value);\n\t } else {\n\t if (this._state == null) {\n\t this._state = {};\n\t }\n\t return this._state[key] = value;\n\t }\n\t };\n\t\n\t Tour.prototype._removeState = function(key) {\n\t var keyName;\n\t if (this._options.storage) {\n\t keyName = \"\" + this._options.name + \"_\" + key;\n\t this._options.storage.removeItem(keyName);\n\t return this._options.afterRemoveState(keyName);\n\t } else {\n\t if (this._state != null) {\n\t return delete this._state[key];\n\t }\n\t }\n\t };\n\t\n\t Tour.prototype._getState = function(key) {\n\t var keyName, value;\n\t if (this._options.storage) {\n\t keyName = \"\" + this._options.name + \"_\" + key;\n\t value = this._options.storage.getItem(keyName);\n\t } else {\n\t if (this._state != null) {\n\t value = this._state[key];\n\t }\n\t }\n\t if (value === void 0 || value === 'null') {\n\t value = null;\n\t }\n\t this._options.afterGetState(key, value);\n\t return value;\n\t };\n\t\n\t Tour.prototype._showNextStep = function() {\n\t var promise, showNextStepHelper, step;\n\t step = this.getStep(this._current);\n\t showNextStepHelper = (function(_this) {\n\t return function(e) {\n\t return _this.showStep(step.next);\n\t };\n\t })(this);\n\t promise = this._makePromise(step.onNext != null ? step.onNext(this) : void 0);\n\t return this._callOnPromiseDone(promise, showNextStepHelper);\n\t };\n\t\n\t Tour.prototype._showPrevStep = function() {\n\t var promise, showPrevStepHelper, step;\n\t step = this.getStep(this._current);\n\t showPrevStepHelper = (function(_this) {\n\t return function(e) {\n\t return _this.showStep(step.prev);\n\t };\n\t })(this);\n\t promise = this._makePromise(step.onPrev != null ? step.onPrev(this) : void 0);\n\t return this._callOnPromiseDone(promise, showPrevStepHelper);\n\t };\n\t\n\t Tour.prototype._debug = function(text) {\n\t if (this._options.debug) {\n\t return window.console.log(\"Bootstrap Tour '\" + this._options.name + \"' | \" + text);\n\t }\n\t };\n\t\n\t Tour.prototype._isRedirect = function(host, path, location) {\n\t var currentPath;\n\t if (host !== '') {\n\t if (this._isHostDifferent(host, location.href)) {\n\t return true;\n\t }\n\t }\n\t currentPath = [location.pathname, location.search, location.hash].join('');\n\t return (path != null) && path !== '' && (({}.toString.call(path) === '[object RegExp]' && !path.test(currentPath)) || ({}.toString.call(path) === '[object String]' && this._isPathDifferent(path, currentPath)));\n\t };\n\t\n\t Tour.prototype._isHostDifferent = function(host, currentURL) {\n\t return this._getProtocol(host) !== this._getProtocol(currentURL) || this._getHost(host) !== this._getHost(currentURL);\n\t };\n\t\n\t Tour.prototype._isPathDifferent = function(path, currentPath) {\n\t return this._getPath(path) !== this._getPath(currentPath) || !this._equal(this._getQuery(path), this._getQuery(currentPath)) || !this._equal(this._getHash(path), this._getHash(currentPath));\n\t };\n\t\n\t Tour.prototype._isJustPathHashDifferent = function(host, path, location) {\n\t var currentPath;\n\t if (host !== '') {\n\t if (this._isHostDifferent(host, location.href)) {\n\t return false;\n\t }\n\t }\n\t currentPath = [location.pathname, location.search, location.hash].join('');\n\t if ({}.toString.call(path) === '[object String]') {\n\t return this._getPath(path) === this._getPath(currentPath) && this._equal(this._getQuery(path), this._getQuery(currentPath)) && !this._equal(this._getHash(path), this._getHash(currentPath));\n\t }\n\t return false;\n\t };\n\t\n\t Tour.prototype._redirect = function(step, i, path) {\n\t if ($.isFunction(step.redirect)) {\n\t return step.redirect.call(this, path);\n\t } else if (step.redirect === true) {\n\t this._debug(\"Redirect to \" + step.host + path);\n\t if (this._getState('redirect_to') === (\"\" + i)) {\n\t this._debug(\"Error redirection loop to \" + path);\n\t this._removeState('redirect_to');\n\t if (step.onRedirectError != null) {\n\t return step.onRedirectError(this);\n\t }\n\t } else {\n\t this._setState('redirect_to', \"\" + i);\n\t return document.location.href = \"\" + step.host + path;\n\t }\n\t }\n\t };\n\t\n\t Tour.prototype._isOrphan = function(step) {\n\t return (step.element == null) || !$(step.element).length || $(step.element).is(':hidden') && ($(step.element)[0].namespaceURI !== 'http://www.w3.org/2000/svg');\n\t };\n\t\n\t Tour.prototype._isLast = function() {\n\t return this._current < this._options.steps.length - 1;\n\t };\n\t\n\t Tour.prototype._showPopover = function(step, i) {\n\t var $element, $tip, isOrphan, options, shouldAddSmart;\n\t $(\".tour-\" + this._options.name).remove();\n\t options = $.extend({}, this._options);\n\t isOrphan = this._isOrphan(step);\n\t step.template = this._template(step, i);\n\t if (isOrphan) {\n\t step.element = 'body';\n\t step.placement = 'top';\n\t }\n\t $element = $(step.element);\n\t $element.addClass(\"tour-\" + this._options.name + \"-element tour-\" + this._options.name + \"-\" + i + \"-element\");\n\t if (step.options) {\n\t $.extend(options, step.options);\n\t }\n\t if (step.reflex && !isOrphan) {\n\t $(step.reflexElement).addClass('tour-step-element-reflex').off(\"\" + (this._reflexEvent(step.reflex)) + \".tour-\" + this._options.name).on(\"\" + (this._reflexEvent(step.reflex)) + \".tour-\" + this._options.name, (function(_this) {\n\t return function() {\n\t if (_this._isLast()) {\n\t return _this.next();\n\t } else {\n\t return _this.end();\n\t }\n\t };\n\t })(this));\n\t }\n\t shouldAddSmart = step.smartPlacement === true && step.placement.search(/auto/i) === -1;\n\t $element.popover({\n\t placement: shouldAddSmart ? \"auto \" + step.placement : step.placement,\n\t trigger: 'manual',\n\t title: step.title,\n\t content: step.content,\n\t html: true,\n\t animation: step.animation,\n\t container: step.container,\n\t template: step.template,\n\t selector: step.element\n\t }).popover('show');\n\t $tip = $element.data('bs.popover') ? $element.data('bs.popover').tip() : $element.data('popover').tip();\n\t $tip.attr('id', step.id);\n\t this._reposition($tip, step);\n\t if (isOrphan) {\n\t return this._center($tip);\n\t }\n\t };\n\t\n\t Tour.prototype._template = function(step, i) {\n\t var $navigation, $next, $prev, $resume, $template, template;\n\t template = step.template;\n\t if (this._isOrphan(step) && {}.toString.call(step.orphan) !== '[object Boolean]') {\n\t template = step.orphan;\n\t }\n\t $template = $.isFunction(template) ? $(template(i, step)) : $(template);\n\t $navigation = $template.find('.popover-navigation');\n\t $prev = $navigation.find('[data-role=\"prev\"]');\n\t $next = $navigation.find('[data-role=\"next\"]');\n\t $resume = $navigation.find('[data-role=\"pause-resume\"]');\n\t if (this._isOrphan(step)) {\n\t $template.addClass('orphan');\n\t }\n\t $template.addClass(\"tour-\" + this._options.name + \" tour-\" + this._options.name + \"-\" + i);\n\t if (step.reflex) {\n\t $template.addClass(\"tour-\" + this._options.name + \"-reflex\");\n\t }\n\t if (step.prev < 0) {\n\t $prev.addClass('disabled');\n\t $prev.prop('disabled', true);\n\t }\n\t if (step.next < 0) {\n\t $next.addClass('disabled');\n\t $next.prop('disabled', true);\n\t }\n\t if (!step.duration) {\n\t $resume.remove();\n\t }\n\t return $template.clone().wrap('
    ').parent().html();\n\t };\n\t\n\t Tour.prototype._reflexEvent = function(reflex) {\n\t if ({}.toString.call(reflex) === '[object Boolean]') {\n\t return 'click';\n\t } else {\n\t return reflex;\n\t }\n\t };\n\t\n\t Tour.prototype._reposition = function($tip, step) {\n\t var offsetBottom, offsetHeight, offsetRight, offsetWidth, originalLeft, originalTop, tipOffset;\n\t offsetWidth = $tip[0].offsetWidth;\n\t offsetHeight = $tip[0].offsetHeight;\n\t tipOffset = $tip.offset();\n\t originalLeft = tipOffset.left;\n\t originalTop = tipOffset.top;\n\t offsetBottom = $(document).outerHeight() - tipOffset.top - $tip.outerHeight();\n\t if (offsetBottom < 0) {\n\t tipOffset.top = tipOffset.top + offsetBottom;\n\t }\n\t offsetRight = $('html').outerWidth() - tipOffset.left - $tip.outerWidth();\n\t if (offsetRight < 0) {\n\t tipOffset.left = tipOffset.left + offsetRight;\n\t }\n\t if (tipOffset.top < 0) {\n\t tipOffset.top = 0;\n\t }\n\t if (tipOffset.left < 0) {\n\t tipOffset.left = 0;\n\t }\n\t $tip.offset(tipOffset);\n\t if (step.placement === 'bottom' || step.placement === 'top') {\n\t if (originalLeft !== tipOffset.left) {\n\t return this._replaceArrow($tip, (tipOffset.left - originalLeft) * 2, offsetWidth, 'left');\n\t }\n\t } else {\n\t if (originalTop !== tipOffset.top) {\n\t return this._replaceArrow($tip, (tipOffset.top - originalTop) * 2, offsetHeight, 'top');\n\t }\n\t }\n\t };\n\t\n\t Tour.prototype._center = function($tip) {\n\t return $tip.css('top', $(window).outerHeight() / 2 - $tip.outerHeight() / 2);\n\t };\n\t\n\t Tour.prototype._replaceArrow = function($tip, delta, dimension, position) {\n\t return $tip.find('.arrow').css(position, delta ? 50 * (1 - delta / dimension) + '%' : '');\n\t };\n\t\n\t Tour.prototype._scrollIntoView = function(element, callback) {\n\t var $element, $window, counter, offsetTop, scrollTop, windowHeight;\n\t $element = $(element);\n\t if (!$element.length) {\n\t return callback();\n\t }\n\t $window = $(window);\n\t offsetTop = $element.offset().top;\n\t windowHeight = $window.height();\n\t scrollTop = Math.max(0, offsetTop - (windowHeight / 2));\n\t this._debug(\"Scroll into view. ScrollTop: \" + scrollTop + \". Element offset: \" + offsetTop + \". Window height: \" + windowHeight + \".\");\n\t counter = 0;\n\t return $('body, html').stop(true, true).animate({\n\t scrollTop: Math.ceil(scrollTop)\n\t }, (function(_this) {\n\t return function() {\n\t if (++counter === 2) {\n\t callback();\n\t return _this._debug(\"Scroll into view.\\nAnimation end element offset: \" + ($element.offset().top) + \".\\nWindow height: \" + ($window.height()) + \".\");\n\t }\n\t };\n\t })(this));\n\t };\n\t\n\t Tour.prototype._onResize = function(callback, timeout) {\n\t return $(window).on(\"resize.tour-\" + this._options.name, function() {\n\t clearTimeout(timeout);\n\t return timeout = setTimeout(callback, 100);\n\t });\n\t };\n\t\n\t Tour.prototype._initMouseNavigation = function() {\n\t var _this;\n\t _this = this;\n\t return $(document).off(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='prev']\").off(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='next']\").off(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='end']\").off(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='pause-resume']\").on(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='next']\", (function(_this) {\n\t return function(e) {\n\t e.preventDefault();\n\t return _this.next();\n\t };\n\t })(this)).on(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='prev']\", (function(_this) {\n\t return function(e) {\n\t e.preventDefault();\n\t return _this.prev();\n\t };\n\t })(this)).on(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='end']\", (function(_this) {\n\t return function(e) {\n\t e.preventDefault();\n\t return _this.end();\n\t };\n\t })(this)).on(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='pause-resume']\", function(e) {\n\t var $this;\n\t e.preventDefault();\n\t $this = $(this);\n\t $this.text(_this._paused ? $this.data('pause-text') : $this.data('resume-text'));\n\t if (_this._paused) {\n\t return _this.resume();\n\t } else {\n\t return _this.pause();\n\t }\n\t });\n\t };\n\t\n\t Tour.prototype._initKeyboardNavigation = function() {\n\t if (!this._options.keyboard) {\n\t return;\n\t }\n\t return $(document).on(\"keyup.tour-\" + this._options.name, (function(_this) {\n\t return function(e) {\n\t if (!e.which) {\n\t return;\n\t }\n\t switch (e.which) {\n\t case 39:\n\t e.preventDefault();\n\t if (_this._isLast()) {\n\t return _this.next();\n\t } else {\n\t return _this.end();\n\t }\n\t break;\n\t case 37:\n\t e.preventDefault();\n\t if (_this._current > 0) {\n\t return _this.prev();\n\t }\n\t break;\n\t case 27:\n\t e.preventDefault();\n\t return _this.end();\n\t }\n\t };\n\t })(this));\n\t };\n\t\n\t Tour.prototype._makePromise = function(result) {\n\t if (result && $.isFunction(result.then)) {\n\t return result;\n\t } else {\n\t return null;\n\t }\n\t };\n\t\n\t Tour.prototype._callOnPromiseDone = function(promise, cb, arg) {\n\t if (promise) {\n\t return promise.then((function(_this) {\n\t return function(e) {\n\t return cb.call(_this, arg);\n\t };\n\t })(this));\n\t } else {\n\t return cb.call(this, arg);\n\t }\n\t };\n\t\n\t Tour.prototype._showBackdrop = function(step) {\n\t if (this.backdrop.backgroundShown) {\n\t return;\n\t }\n\t this.backdrop = $('
    ', {\n\t \"class\": 'tour-backdrop'\n\t });\n\t this.backdrop.backgroundShown = true;\n\t return $(step.backdropContainer).append(this.backdrop);\n\t };\n\t\n\t Tour.prototype._hideBackdrop = function() {\n\t this._hideOverlayElement();\n\t return this._hideBackground();\n\t };\n\t\n\t Tour.prototype._hideBackground = function() {\n\t if (this.backdrop) {\n\t this.backdrop.remove();\n\t this.backdrop.overlay = null;\n\t return this.backdrop.backgroundShown = false;\n\t }\n\t };\n\t\n\t Tour.prototype._showOverlayElement = function(step, force) {\n\t var $element, elementData;\n\t $element = $(step.element);\n\t if (!$element || $element.length === 0 || this.backdrop.overlayElementShown && !force) {\n\t return;\n\t }\n\t if (!this.backdrop.overlayElementShown) {\n\t this.backdrop.$element = $element.addClass('tour-step-backdrop');\n\t this.backdrop.$background = $('
    ', {\n\t \"class\": 'tour-step-background'\n\t });\n\t this.backdrop.$background.appendTo(step.backdropContainer);\n\t this.backdrop.overlayElementShown = true;\n\t }\n\t elementData = {\n\t width: $element.innerWidth(),\n\t height: $element.innerHeight(),\n\t offset: $element.offset()\n\t };\n\t if (step.backdropPadding) {\n\t elementData = this._applyBackdropPadding(step.backdropPadding, elementData);\n\t }\n\t return this.backdrop.$background.width(elementData.width).height(elementData.height).offset(elementData.offset);\n\t };\n\t\n\t Tour.prototype._hideOverlayElement = function() {\n\t if (!this.backdrop.overlayElementShown) {\n\t return;\n\t }\n\t this.backdrop.$element.removeClass('tour-step-backdrop');\n\t this.backdrop.$background.remove();\n\t this.backdrop.$element = null;\n\t this.backdrop.$background = null;\n\t return this.backdrop.overlayElementShown = false;\n\t };\n\t\n\t Tour.prototype._applyBackdropPadding = function(padding, data) {\n\t if (typeof padding === 'object') {\n\t if (padding.top == null) {\n\t padding.top = 0;\n\t }\n\t if (padding.right == null) {\n\t padding.right = 0;\n\t }\n\t if (padding.bottom == null) {\n\t padding.bottom = 0;\n\t }\n\t if (padding.left == null) {\n\t padding.left = 0;\n\t }\n\t data.offset.top = data.offset.top - padding.top;\n\t data.offset.left = data.offset.left - padding.left;\n\t data.width = data.width + padding.left + padding.right;\n\t data.height = data.height + padding.top + padding.bottom;\n\t } else {\n\t data.offset.top = data.offset.top - padding;\n\t data.offset.left = data.offset.left - padding;\n\t data.width = data.width + (padding * 2);\n\t data.height = data.height + (padding * 2);\n\t }\n\t return data;\n\t };\n\t\n\t Tour.prototype._clearTimer = function() {\n\t window.clearTimeout(this._timer);\n\t this._timer = null;\n\t return this._duration = null;\n\t };\n\t\n\t Tour.prototype._getProtocol = function(url) {\n\t url = url.split('://');\n\t if (url.length > 1) {\n\t return url[0];\n\t } else {\n\t return 'http';\n\t }\n\t };\n\t\n\t Tour.prototype._getHost = function(url) {\n\t url = url.split('//');\n\t url = url.length > 1 ? url[1] : url[0];\n\t return url.split('/')[0];\n\t };\n\t\n\t Tour.prototype._getPath = function(path) {\n\t return path.replace(/\\/?$/, '').split('?')[0].split('#')[0];\n\t };\n\t\n\t Tour.prototype._getQuery = function(path) {\n\t return this._getParams(path, '?');\n\t };\n\t\n\t Tour.prototype._getHash = function(path) {\n\t return this._getParams(path, '#');\n\t };\n\t\n\t Tour.prototype._getParams = function(path, start) {\n\t var param, params, paramsObject, _i, _len;\n\t params = path.split(start);\n\t if (params.length === 1) {\n\t return {};\n\t }\n\t params = params[1].split('&');\n\t paramsObject = {};\n\t for (_i = 0, _len = params.length; _i < _len; _i++) {\n\t param = params[_i];\n\t param = param.split('=');\n\t paramsObject[param[0]] = param[1] || '';\n\t }\n\t return paramsObject;\n\t };\n\t\n\t Tour.prototype._equal = function(obj1, obj2) {\n\t var k, v;\n\t if ({}.toString.call(obj1) === '[object Object]' && {}.toString.call(obj2) === '[object Object]') {\n\t for (k in obj1) {\n\t v = obj1[k];\n\t if (obj2[k] !== v) {\n\t return false;\n\t }\n\t }\n\t for (k in obj2) {\n\t v = obj2[k];\n\t if (obj1[k] !== v) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }\n\t return obj1 === obj2;\n\t };\n\t\n\t return Tour;\n\t\n\t })();\n\t return window.Tour = Tour;\n\t})(jQuery, window);\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ },\n/* 62 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(jQuery) {/*! jQuery UI - v1.9.1 - 2012-10-29\n\t* http://jqueryui.com\n\t* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.menu.js, jquery.ui.slider.js\n\t* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */\n\t\n\t(function(e,t){function i(t,n){var r,i,o,u=t.nodeName.toLowerCase();return\"area\"===u?(r=t.parentNode,i=r.name,!t.href||!i||r.nodeName.toLowerCase()!==\"map\"?!1:(o=e(\"img[usemap=#\"+i+\"]\")[0],!!o&&s(o))):(/input|select|textarea|button|object/.test(u)?!t.disabled:\"a\"===u?t.href||n:n)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().andSelf().filter(function(){return e.css(this,\"visibility\")===\"hidden\"}).length}var n=0,r=/^ui-id-\\d+$/;e.ui=e.ui||{};if(e.ui.version)return;e.extend(e.ui,{version:\"1.9.1\",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({_focus:e.fn.focus,focus:function(t,n){return typeof t==\"number\"?this.each(function(){var r=this;setTimeout(function(){e(r).focus(),n&&n.call(r)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return e.ui.ie&&/(static|relative)/.test(this.css(\"position\"))||/absolute/.test(this.css(\"position\"))?t=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,\"position\"))&&/(auto|scroll)/.test(e.css(this,\"overflow\")+e.css(this,\"overflow-y\")+e.css(this,\"overflow-x\"))}).eq(0):t=this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,\"overflow\")+e.css(this,\"overflow-y\")+e.css(this,\"overflow-x\"))}).eq(0),/fixed/.test(this.css(\"position\"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css(\"zIndex\",n);if(this.length){var r=e(this[0]),i,s;while(r.length&&r[0]!==document){i=r.css(\"position\");if(i===\"absolute\"||i===\"relative\"||i===\"fixed\"){s=parseInt(r.css(\"zIndex\"),10);if(!isNaN(s)&&s!==0)return s}r=r.parent()}}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id=\"ui-id-\"+ ++n)})},removeUniqueId:function(){return this.each(function(){r.test(this.id)&&e(this).removeAttr(\"id\")})}}),e(\"\").outerWidth(1).jquery||e.each([\"Width\",\"Height\"],function(n,r){function u(t,n,r,s){return e.each(i,function(){n-=parseFloat(e.css(t,\"padding\"+this))||0,r&&(n-=parseFloat(e.css(t,\"border\"+this+\"Width\"))||0),s&&(n-=parseFloat(e.css(t,\"margin\"+this))||0)}),n}var i=r===\"Width\"?[\"Left\",\"Right\"]:[\"Top\",\"Bottom\"],s=r.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn[\"inner\"+r]=function(n){return n===t?o[\"inner\"+r].call(this):this.each(function(){e(this).css(s,u(this,n)+\"px\")})},e.fn[\"outer\"+r]=function(t,n){return typeof t!=\"number\"?o[\"outer\"+r].call(this,t):this.each(function(){e(this).css(s,u(this,t,!0,n)+\"px\")})}}),e.extend(e.expr[\":\"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,\"tabindex\")))},tabbable:function(t){var n=e.attr(t,\"tabindex\"),r=isNaN(n);return(r||n>=0)&&i(t,!r)}}),e(function(){var t=document.body,n=t.appendChild(n=document.createElement(\"div\"));n.offsetHeight,e.extend(n.style,{minHeight:\"100px\",height:\"auto\",padding:0,borderWidth:0}),e.support.minHeight=n.offsetHeight===100,e.support.selectstart=\"onselectstart\"in n,t.removeChild(n).style.display=\"none\"}),function(){var t=/msie ([\\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];e.ui.ie=t.length?!0:!1,e.ui.ie6=parseFloat(t[1],10)===6}(),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?\"selectstart\":\"mousedown\")+\".ui-disableSelection\",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(\".ui-disableSelection\")}}),e.extend(e.ui,{plugin:{add:function(t,n,r){var i,s=e.ui[t].prototype;for(i in r)s.plugins[i]=s.plugins[i]||[],s.plugins[i].push([n,r[i]])},call:function(e,t,n){var r,i=e.plugins[t];if(!i||!e.element[0].parentNode||e.element[0].parentNode.nodeType===11)return;for(r=0;r0?!0:(t[r]=1,i=t[r]>0,t[r]=0,i)},isOverAxis:function(e,t,n){return e>t&&e\",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace=\".\"+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetName,this),e.data(r,this.widgetFullName,this),this._on(this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger(\"create\",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr(\"aria-disabled\").removeClass(this.widgetFullName+\"-disabled \"+\"ui-state-disabled\"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass(\"ui-state-hover\"),this.focusable.removeClass(\"ui-state-focus\")},_destroy:e.noop,widget:function(){return this.element},option:function(n,r){var i=n,s,o,u;if(arguments.length===0)return e.widget.extend({},this.options);if(typeof n==\"string\"){i={},s=n.split(\".\"),n=s.shift();if(s.length){o=i[n]=e.widget.extend({},this.options[n]);for(u=0;u=9||!!t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).unbind(\"mouseup.\"+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+\".preventClickEvent\",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(e){return this.mouseDelayMet},_mouseStart:function(e){},_mouseDrag:function(e){},_mouseStop:function(e){},_mouseCapture:function(e){return!0}})})(jQuery);(function(e,t){function h(e,t,n){return[parseInt(e[0],10)*(l.test(e[0])?t/100:1),parseInt(e[1],10)*(l.test(e[1])?n/100:1)]}function p(t,n){return parseInt(e.css(t,n),10)||0}e.ui=e.ui||{};var n,r=Math.max,i=Math.abs,s=Math.round,o=/left|center|right/,u=/top|center|bottom/,a=/[\\+\\-]\\d+%?/,f=/^\\w+/,l=/%$/,c=e.fn.position;e.position={scrollbarWidth:function(){if(n!==t)return n;var r,i,s=e(\"
    \"),o=s.children()[0];return e(\"body\").append(s),r=o.offsetWidth,s.css(\"overflow\",\"scroll\"),i=o.offsetWidth,r===i&&(i=s[0].clientWidth),s.remove(),n=r-i},getScrollInfo:function(t){var n=t.isWindow?\"\":t.element.css(\"overflow-x\"),r=t.isWindow?\"\":t.element.css(\"overflow-y\"),i=n===\"scroll\"||n===\"auto\"&&t.width0?\"right\":\"center\",vertical:u<0?\"top\":o>0?\"bottom\":\"middle\"};lr(i(o),i(u))?h.important=\"horizontal\":h.important=\"vertical\",t.using.call(this,e,h)}),a.offset(e.extend(C,{using:u}))})},e.ui.position={fit:{left:function(e,t){var n=t.within,i=n.isWindow?n.scrollLeft:n.offset.left,s=n.width,o=e.left-t.collisionPosition.marginLeft,u=i-o,a=o+t.collisionWidth-s-i,f;t.collisionWidth>s?u>0&&a<=0?(f=e.left+u+t.collisionWidth-s-i,e.left+=u-f):a>0&&u<=0?e.left=i:u>a?e.left=i+s-t.collisionWidth:e.left=i:u>0?e.left+=u:a>0?e.left-=a:e.left=r(e.left-o,e.left)},top:function(e,t){var n=t.within,i=n.isWindow?n.scrollTop:n.offset.top,s=t.within.height,o=e.top-t.collisionPosition.marginTop,u=i-o,a=o+t.collisionHeight-s-i,f;t.collisionHeight>s?u>0&&a<=0?(f=e.top+u+t.collisionHeight-s-i,e.top+=u-f):a>0&&u<=0?e.top=i:u>a?e.top=i+s-t.collisionHeight:e.top=i:u>0?e.top+=u:a>0?e.top-=a:e.top=r(e.top-o,e.top)}},flip:{left:function(e,t){var n=t.within,r=n.offset.left+n.scrollLeft,s=n.width,o=n.isWindow?n.scrollLeft:n.offset.left,u=e.left-t.collisionPosition.marginLeft,a=u-o,f=u+t.collisionWidth-s-o,l=t.my[0]===\"left\"?-t.elemWidth:t.my[0]===\"right\"?t.elemWidth:0,c=t.at[0]===\"left\"?t.targetWidth:t.at[0]===\"right\"?-t.targetWidth:0,h=-2*t.offset[0],p,d;if(a<0){p=e.left+l+c+h+t.collisionWidth-s-r;if(p<0||p0){d=e.left-t.collisionPosition.marginLeft+l+c+h-o;if(d>0||i(d)a&&(v<0||v0&&(d=e.top-t.collisionPosition.marginTop+c+h+p-o,e.top+c+h+p>f&&(d>0||i(d)10&&i<11,t.innerHTML=\"\",n.removeChild(t)}(),e.uiBackCompat!==!1&&function(e){var n=e.fn.position;e.fn.position=function(r){if(!r||!r.offset)return n.call(this,r);var i=r.offset.split(\" \"),s=r.at.split(\" \");return i.length===1&&(i[1]=i[0]),/^\\d/.test(i[0])&&(i[0]=\"+\"+i[0]),/^\\d/.test(i[1])&&(i[1]=\"+\"+i[1]),s.length===1&&(/left|center|right/.test(s[0])?s[1]=\"center\":(s[1]=s[0],s[0]=\"center\")),n.call(this,e.extend(r,{at:s[0]+i[0]+\" \"+s[1]+i[1],offset:t}))}}(jQuery)})(jQuery);(function(e,t){var n=0;e.widget(\"ui.autocomplete\",{version:\"1.9.1\",defaultElement:\"\",options:{appendTo:\"body\",autoFocus:!1,delay:300,minLength:1,position:{my:\"left top\",at:\"left bottom\",collision:\"none\"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var t,n,r;this.isMultiLine=this._isMultiLine(),this.valueMethod=this.element[this.element.is(\"input,textarea\")?\"val\":\"text\"],this.isNewMenu=!0,this.element.addClass(\"ui-autocomplete-input\").attr(\"autocomplete\",\"off\"),this._on(this.element,{keydown:function(i){if(this.element.prop(\"readOnly\")){t=!0,r=!0,n=!0;return}t=!1,r=!1,n=!1;var s=e.ui.keyCode;switch(i.keyCode){case s.PAGE_UP:t=!0,this._move(\"previousPage\",i);break;case s.PAGE_DOWN:t=!0,this._move(\"nextPage\",i);break;case s.UP:t=!0,this._keyEvent(\"previous\",i);break;case s.DOWN:t=!0,this._keyEvent(\"next\",i);break;case s.ENTER:case s.NUMPAD_ENTER:this.menu.active&&(t=!0,i.preventDefault(),this.menu.select(i));break;case s.TAB:this.menu.active&&this.menu.select(i);break;case s.ESCAPE:this.menu.element.is(\":visible\")&&(this._value(this.term),this.close(i),i.preventDefault());break;default:n=!0,this._searchTimeout(i)}},keypress:function(r){if(t){t=!1,r.preventDefault();return}if(n)return;var i=e.ui.keyCode;switch(r.keyCode){case i.PAGE_UP:this._move(\"previousPage\",r);break;case i.PAGE_DOWN:this._move(\"nextPage\",r);break;case i.UP:this._keyEvent(\"previous\",r);break;case i.DOWN:this._keyEvent(\"next\",r)}},input:function(e){if(r){r=!1,e.preventDefault();return}this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){if(this.cancelBlur){delete this.cancelBlur;return}clearTimeout(this.searching),this.close(e),this._change(e)}}),this._initSource(),this.menu=e(\"
      \").addClass(\"ui-autocomplete\").appendTo(this.document.find(this.options.appendTo||\"body\")[0]).menu({input:e(),role:null}).zIndex(this.element.zIndex()+1).hide().data(\"menu\"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var n=this.menu.element[0];e(t.target).closest(\".ui-menu-item\").length||this._delay(function(){var t=this;this.document.one(\"mousedown\",function(r){r.target!==t.element[0]&&r.target!==n&&!e.contains(n,r.target)&&t.close()})})},menufocus:function(t,n){if(this.isNewMenu){this.isNewMenu=!1;if(t.originalEvent&&/^mouse/.test(t.originalEvent.type)){this.menu.blur(),this.document.one(\"mousemove\",function(){e(t.target).trigger(t.originalEvent)});return}}var r=n.item.data(\"ui-autocomplete-item\")||n.item.data(\"item.autocomplete\");!1!==this._trigger(\"focus\",t,{item:r})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(r.value):this.liveRegion.text(r.value)},menuselect:function(e,t){var n=t.item.data(\"ui-autocomplete-item\")||t.item.data(\"item.autocomplete\"),r=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=r,this._delay(function(){this.previous=r,this.selectedItem=n})),!1!==this._trigger(\"select\",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n}}),this.liveRegion=e(\"\",{role:\"status\",\"aria-live\":\"polite\"}).addClass(\"ui-helper-hidden-accessible\").insertAfter(this.element),e.fn.bgiframe&&this.menu.element.bgiframe(),this._on(this.window,{beforeunload:function(){this.element.removeAttr(\"autocomplete\")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass(\"ui-autocomplete-input\").removeAttr(\"autocomplete\"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),e===\"source\"&&this._initSource(),e===\"appendTo\"&&this.menu.element.appendTo(this.document.find(t||\"body\")[0]),e===\"disabled\"&&t&&this.xhr&&this.xhr.abort()},_isMultiLine:function(){return this.element.is(\"textarea\")?!0:this.element.is(\"input\")?!1:this.element.prop(\"isContentEditable\")},_initSource:function(){var t,n,r=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(n,r){r(e.ui.autocomplete.filter(t,n.term))}):typeof this.options.source==\"string\"?(n=this.options.source,this.source=function(t,i){r.xhr&&r.xhr.abort(),r.xhr=e.ajax({url:n,data:t,dataType:\"json\",success:function(e){i(e)},error:function(){i([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){e=e!=null?e:this._value(),this.term=this._value();if(e.length\").append(e(\"\").text(n.label)).appendTo(t)},_move:function(e,t){if(!this.menu.element.is(\":visible\")){this.search(null,t);return}if(this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)){this._value(this.term),this.menu.blur();return}this.menu[e](t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){if(!this.isMultiLine||this.menu.element.is(\":visible\"))this._move(e,t),t.preventDefault()}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g,\"\\\\$&\")},filter:function(t,n){var r=new RegExp(e.ui.autocomplete.escapeRegex(n),\"i\");return e.grep(t,function(e){return r.test(e.label||e.value||e)})}}),e.widget(\"ui.autocomplete\",e.ui.autocomplete,{options:{messages:{noResults:\"No search results.\",results:function(e){return e+(e>1?\" results are\":\" result is\")+\" available, use up and down arrow keys to navigate.\"}}},__response:function(e){var t;this._superApply(arguments);if(this.options.disabled||this.cancelSearch)return;e&&e.length?t=this.options.messages.results(e.length):t=this.options.messages.noResults,this.liveRegion.text(t)}})})(jQuery);(function(e,t){var n,r,i,s,o=\"ui-button ui-widget ui-state-default ui-corner-all\",u=\"ui-state-hover ui-state-active \",a=\"ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only\",f=function(){var t=e(this).find(\":ui-button\");setTimeout(function(){t.button(\"refresh\")},1)},l=function(t){var n=t.name,r=t.form,i=e([]);return n&&(r?i=e(r).find(\"[name='\"+n+\"']\"):i=e(\"[name='\"+n+\"']\",t.ownerDocument).filter(function(){return!this.form})),i};e.widget(\"ui.button\",{version:\"1.9.1\",defaultElement:\"
    \"\n )\n });\n modal.show( { backdrop: true } );\n}\n\n\n// ============================================================================\n return {\n Modal : Modal,\n hide_modal : hide_modal,\n show_modal : show_modal,\n show_message : show_message,\n show_in_overlay : show_in_overlay,\n };\n});\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./galaxy/scripts/layout/modal.js\n ** module id = 59\n ** module chunks = 2\n **/","define([\n 'layout/masthead',\n 'layout/panel',\n 'mvc/ui/ui-modal',\n 'mvc/base-mvc'\n], function( Masthead, Panel, Modal, BaseMVC ) {\n\n// ============================================================================\nvar PageLayoutView = Backbone.View.extend( BaseMVC.LoggableMixin ).extend({\n _logNamespace : 'layout',\n\n el : 'body',\n className : 'full-content',\n\n _panelIds : [\n 'left', 'center', 'right'\n ],\n\n defaultOptions : {\n message_box_visible : false,\n message_box_content : '',\n message_box_class : 'info',\n show_inactivity_warning : false,\n inactivity_box_content : ''\n },\n\n initialize : function( options ) {\n // TODO: remove globals\n this.log( this + '.initialize:', options );\n _.extend( this, _.pick( options, this._panelIds ) );\n this.options = _.defaults( _.omit( options.config, this._panelIds ), this.defaultOptions );\n Galaxy.modal = this.modal = new Modal.View();\n this.masthead = new Masthead.View( this.options );\n this.$el.attr( 'scroll', 'no' );\n this.$el.html( this._template() );\n this.$el.append( this.masthead.frame.$el );\n this.$( '#masthead' ).replaceWith( this.masthead.$el );\n this.$el.append( this.modal.$el );\n this.$messagebox = this.$( '#messagebox' );\n this.$inactivebox = this.$( '#inactivebox' );\n },\n\n render : function() {\n // TODO: Remove this line after select2 update\n $( '.select2-hidden-accessible' ).remove();\n this.log( this + '.render:' );\n this.masthead.render();\n this.renderMessageBox();\n this.renderInactivityBox();\n this.renderPanels();\n return this;\n },\n\n /** Render message box */\n renderMessageBox : function() {\n if ( this.options.message_box_visible ){\n var content = this.options.message_box_content || '';\n var level = this.options.message_box_class || 'info';\n this.$el.addClass( 'has-message-box' );\n this.$messagebox\n .attr( 'class', 'panel-' + level + '-message' )\n .html( content )\n .toggle( !!content )\n .show();\n } else {\n this.$el.removeClass( 'has-message-box' );\n this.$messagebox.hide();\n }\n return this;\n },\n\n /** Render inactivity warning */\n renderInactivityBox : function() {\n if( this.options.show_inactivity_warning ){\n var content = this.options.inactivity_box_content || '';\n var verificationLink = $( '
    ' ).attr( 'href', Galaxy.root + 'user/resend_verification' ).text( 'Resend verification' );\n this.$el.addClass( 'has-inactivity-box' );\n this.$inactivebox\n .html( content + ' ' )\n .append( verificationLink )\n .toggle( !!content )\n .show();\n } else {\n this.$el.removeClass( 'has-inactivity-box' );\n this.$inactivebox.hide();\n }\n return this;\n },\n\n /** Render panels */\n renderPanels : function() {\n var page = this;\n this._panelIds.forEach( function( panelId ){\n if( _.has( page, panelId ) ){\n page[ panelId ].setElement( '#' + panelId );\n page[ panelId ].render();\n }\n });\n if( !this.left ){\n this.center.$el.css( 'left', 0 );\n }\n if( !this.right ){\n this.center.$el.css( 'right', 0 );\n }\n return this;\n },\n\n /** body template */\n _template: function() {\n return [\n '
    ',\n '
    ',\n '
    ',\n '
    ',\n '
    ',\n this.left? '
    ' : '',\n this.center? '
    ' : '',\n this.right? '
    ' : '',\n '
    ',\n '
    ',\n ].join('');\n },\n\n /** hide both side panels if previously shown */\n hideSidePanels : function(){\n if( this.left ){\n this.left.hide();\n }\n if( this.right ){\n this.right.hide();\n }\n },\n\n toString : function() { return 'PageLayoutView'; }\n});\n\n// ============================================================================\n return {\n PageLayoutView: PageLayoutView\n };\n});\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./galaxy/scripts/layout/page.js\n ** module id = 60\n ** module chunks = 2\n **/","/* ========================================================================\n * bootstrap-tour - v0.10.2\n * http://bootstraptour.com\n * ========================================================================\n * Copyright 2012-2015 Ulrich Sossou\n *\n * ========================================================================\n * Licensed under the MIT License (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://opensource.org/licenses/MIT\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ========================================================================\n */\n\n(function($, window) {\n var Tour, document;\n document = window.document;\n Tour = (function() {\n function Tour(options) {\n var storage;\n try {\n storage = window.localStorage;\n } catch (_error) {\n storage = false;\n }\n this._options = $.extend({\n name: 'tour',\n steps: [],\n container: 'body',\n autoscroll: true,\n keyboard: true,\n storage: storage,\n debug: false,\n backdrop: false,\n backdropContainer: 'body',\n backdropPadding: 0,\n redirect: true,\n orphan: false,\n duration: false,\n delay: false,\n basePath: '',\n template: '

    ',\n afterSetState: function(key, value) {},\n afterGetState: function(key, value) {},\n afterRemoveState: function(key) {},\n onStart: function(tour) {},\n onEnd: function(tour) {},\n onShow: function(tour) {},\n onShown: function(tour) {},\n onHide: function(tour) {},\n onHidden: function(tour) {},\n onNext: function(tour) {},\n onPrev: function(tour) {},\n onPause: function(tour, duration) {},\n onResume: function(tour, duration) {},\n onRedirectError: function(tour) {}\n }, options);\n this._force = false;\n this._inited = false;\n this._current = null;\n this.backdrop = {\n overlay: null,\n $element: null,\n $background: null,\n backgroundShown: false,\n overlayElementShown: false\n };\n this;\n }\n\n Tour.prototype.addSteps = function(steps) {\n var step, _i, _len;\n for (_i = 0, _len = steps.length; _i < _len; _i++) {\n step = steps[_i];\n this.addStep(step);\n }\n return this;\n };\n\n Tour.prototype.addStep = function(step) {\n this._options.steps.push(step);\n return this;\n };\n\n Tour.prototype.getStep = function(i) {\n if (this._options.steps[i] != null) {\n return $.extend({\n id: \"step-\" + i,\n path: '',\n host: '',\n placement: 'right',\n title: '',\n content: '

    ',\n next: i === this._options.steps.length - 1 ? -1 : i + 1,\n prev: i - 1,\n animation: true,\n container: this._options.container,\n autoscroll: this._options.autoscroll,\n backdrop: this._options.backdrop,\n backdropContainer: this._options.backdropContainer,\n backdropPadding: this._options.backdropPadding,\n redirect: this._options.redirect,\n reflexElement: this._options.steps[i].element,\n orphan: this._options.orphan,\n duration: this._options.duration,\n delay: this._options.delay,\n template: this._options.template,\n onShow: this._options.onShow,\n onShown: this._options.onShown,\n onHide: this._options.onHide,\n onHidden: this._options.onHidden,\n onNext: this._options.onNext,\n onPrev: this._options.onPrev,\n onPause: this._options.onPause,\n onResume: this._options.onResume,\n onRedirectError: this._options.onRedirectError\n }, this._options.steps[i]);\n }\n };\n\n Tour.prototype.init = function(force) {\n this._force = force;\n if (this.ended()) {\n this._debug('Tour ended, init prevented.');\n return this;\n }\n this.setCurrentStep();\n this._initMouseNavigation();\n this._initKeyboardNavigation();\n this._onResize((function(_this) {\n return function() {\n return _this.showStep(_this._current);\n };\n })(this));\n if (this._current !== null) {\n this.showStep(this._current);\n }\n this._inited = true;\n return this;\n };\n\n Tour.prototype.start = function(force) {\n var promise;\n if (force == null) {\n force = false;\n }\n if (!this._inited) {\n this.init(force);\n }\n if (this._current === null) {\n promise = this._makePromise(this._options.onStart != null ? this._options.onStart(this) : void 0);\n this._callOnPromiseDone(promise, this.showStep, 0);\n }\n return this;\n };\n\n Tour.prototype.next = function() {\n var promise;\n promise = this.hideStep(this._current);\n return this._callOnPromiseDone(promise, this._showNextStep);\n };\n\n Tour.prototype.prev = function() {\n var promise;\n promise = this.hideStep(this._current);\n return this._callOnPromiseDone(promise, this._showPrevStep);\n };\n\n Tour.prototype.goTo = function(i) {\n var promise;\n promise = this.hideStep(this._current);\n return this._callOnPromiseDone(promise, this.showStep, i);\n };\n\n Tour.prototype.end = function() {\n var endHelper, promise;\n endHelper = (function(_this) {\n return function(e) {\n $(document).off(\"click.tour-\" + _this._options.name);\n $(document).off(\"keyup.tour-\" + _this._options.name);\n $(window).off(\"resize.tour-\" + _this._options.name);\n _this._setState('end', 'yes');\n _this._inited = false;\n _this._force = false;\n _this._clearTimer();\n if (_this._options.onEnd != null) {\n return _this._options.onEnd(_this);\n }\n };\n })(this);\n promise = this.hideStep(this._current);\n return this._callOnPromiseDone(promise, endHelper);\n };\n\n Tour.prototype.ended = function() {\n return !this._force && !!this._getState('end');\n };\n\n Tour.prototype.restart = function() {\n this._removeState('current_step');\n this._removeState('end');\n this._removeState('redirect_to');\n return this.start();\n };\n\n Tour.prototype.pause = function() {\n var step;\n step = this.getStep(this._current);\n if (!(step && step.duration)) {\n return this;\n }\n this._paused = true;\n this._duration -= new Date().getTime() - this._start;\n window.clearTimeout(this._timer);\n this._debug(\"Paused/Stopped step \" + (this._current + 1) + \" timer (\" + this._duration + \" remaining).\");\n if (step.onPause != null) {\n return step.onPause(this, this._duration);\n }\n };\n\n Tour.prototype.resume = function() {\n var step;\n step = this.getStep(this._current);\n if (!(step && step.duration)) {\n return this;\n }\n this._paused = false;\n this._start = new Date().getTime();\n this._duration = this._duration || step.duration;\n this._timer = window.setTimeout((function(_this) {\n return function() {\n if (_this._isLast()) {\n return _this.next();\n } else {\n return _this.end();\n }\n };\n })(this), this._duration);\n this._debug(\"Started step \" + (this._current + 1) + \" timer with duration \" + this._duration);\n if ((step.onResume != null) && this._duration !== step.duration) {\n return step.onResume(this, this._duration);\n }\n };\n\n Tour.prototype.hideStep = function(i) {\n var hideStepHelper, promise, step;\n step = this.getStep(i);\n if (!step) {\n return;\n }\n this._clearTimer();\n promise = this._makePromise(step.onHide != null ? step.onHide(this, i) : void 0);\n hideStepHelper = (function(_this) {\n return function(e) {\n var $element;\n $element = $(step.element);\n if (!($element.data('bs.popover') || $element.data('popover'))) {\n $element = $('body');\n }\n $element.popover('destroy').removeClass(\"tour-\" + _this._options.name + \"-element tour-\" + _this._options.name + \"-\" + i + \"-element\");\n $element.removeData('bs.popover');\n if (step.reflex) {\n $(step.reflexElement).removeClass('tour-step-element-reflex').off(\"\" + (_this._reflexEvent(step.reflex)) + \".tour-\" + _this._options.name);\n }\n if (step.backdrop) {\n _this._hideBackdrop();\n }\n if (step.onHidden != null) {\n return step.onHidden(_this);\n }\n };\n })(this);\n this._callOnPromiseDone(promise, hideStepHelper);\n return promise;\n };\n\n Tour.prototype.showStep = function(i) {\n var promise, showStepHelper, skipToPrevious, step;\n if (this.ended()) {\n this._debug('Tour ended, showStep prevented.');\n return this;\n }\n step = this.getStep(i);\n if (!step) {\n return;\n }\n skipToPrevious = i < this._current;\n promise = this._makePromise(step.onShow != null ? step.onShow(this, i) : void 0);\n showStepHelper = (function(_this) {\n return function(e) {\n var path, showPopoverAndOverlay;\n _this.setCurrentStep(i);\n path = (function() {\n switch ({}.toString.call(step.path)) {\n case '[object Function]':\n return step.path();\n case '[object String]':\n return this._options.basePath + step.path;\n default:\n return step.path;\n }\n }).call(_this);\n if (_this._isRedirect(step.host, path, document.location)) {\n _this._redirect(step, i, path);\n if (!_this._isJustPathHashDifferent(step.host, path, document.location)) {\n return;\n }\n }\n if (_this._isOrphan(step)) {\n if (step.orphan === false) {\n _this._debug(\"Skip the orphan step \" + (_this._current + 1) + \".\\nOrphan option is false and the element does not exist or is hidden.\");\n if (skipToPrevious) {\n _this._showPrevStep();\n } else {\n _this._showNextStep();\n }\n return;\n }\n _this._debug(\"Show the orphan step \" + (_this._current + 1) + \". Orphans option is true.\");\n }\n if (step.backdrop) {\n _this._showBackdrop(step);\n }\n showPopoverAndOverlay = function() {\n if (_this.getCurrentStep() !== i || _this.ended()) {\n return;\n }\n if ((step.element != null) && step.backdrop) {\n _this._showOverlayElement(step);\n }\n _this._showPopover(step, i);\n if (step.onShown != null) {\n step.onShown(_this);\n }\n return _this._debug(\"Step \" + (_this._current + 1) + \" of \" + _this._options.steps.length);\n };\n if (step.autoscroll) {\n _this._scrollIntoView(step.element, showPopoverAndOverlay);\n } else {\n showPopoverAndOverlay();\n }\n if (step.duration) {\n return _this.resume();\n }\n };\n })(this);\n if (step.delay) {\n this._debug(\"Wait \" + step.delay + \" milliseconds to show the step \" + (this._current + 1));\n window.setTimeout((function(_this) {\n return function() {\n return _this._callOnPromiseDone(promise, showStepHelper);\n };\n })(this), step.delay);\n } else {\n this._callOnPromiseDone(promise, showStepHelper);\n }\n return promise;\n };\n\n Tour.prototype.getCurrentStep = function() {\n return this._current;\n };\n\n Tour.prototype.setCurrentStep = function(value) {\n if (value != null) {\n this._current = value;\n this._setState('current_step', value);\n } else {\n this._current = this._getState('current_step');\n this._current = this._current === null ? null : parseInt(this._current, 10);\n }\n return this;\n };\n\n Tour.prototype.redraw = function() {\n return this._showOverlayElement(this.getStep(this.getCurrentStep()).element, true);\n };\n\n Tour.prototype._setState = function(key, value) {\n var e, keyName;\n if (this._options.storage) {\n keyName = \"\" + this._options.name + \"_\" + key;\n try {\n this._options.storage.setItem(keyName, value);\n } catch (_error) {\n e = _error;\n if (e.code === DOMException.QUOTA_EXCEEDED_ERR) {\n this._debug('LocalStorage quota exceeded. State storage failed.');\n }\n }\n return this._options.afterSetState(keyName, value);\n } else {\n if (this._state == null) {\n this._state = {};\n }\n return this._state[key] = value;\n }\n };\n\n Tour.prototype._removeState = function(key) {\n var keyName;\n if (this._options.storage) {\n keyName = \"\" + this._options.name + \"_\" + key;\n this._options.storage.removeItem(keyName);\n return this._options.afterRemoveState(keyName);\n } else {\n if (this._state != null) {\n return delete this._state[key];\n }\n }\n };\n\n Tour.prototype._getState = function(key) {\n var keyName, value;\n if (this._options.storage) {\n keyName = \"\" + this._options.name + \"_\" + key;\n value = this._options.storage.getItem(keyName);\n } else {\n if (this._state != null) {\n value = this._state[key];\n }\n }\n if (value === void 0 || value === 'null') {\n value = null;\n }\n this._options.afterGetState(key, value);\n return value;\n };\n\n Tour.prototype._showNextStep = function() {\n var promise, showNextStepHelper, step;\n step = this.getStep(this._current);\n showNextStepHelper = (function(_this) {\n return function(e) {\n return _this.showStep(step.next);\n };\n })(this);\n promise = this._makePromise(step.onNext != null ? step.onNext(this) : void 0);\n return this._callOnPromiseDone(promise, showNextStepHelper);\n };\n\n Tour.prototype._showPrevStep = function() {\n var promise, showPrevStepHelper, step;\n step = this.getStep(this._current);\n showPrevStepHelper = (function(_this) {\n return function(e) {\n return _this.showStep(step.prev);\n };\n })(this);\n promise = this._makePromise(step.onPrev != null ? step.onPrev(this) : void 0);\n return this._callOnPromiseDone(promise, showPrevStepHelper);\n };\n\n Tour.prototype._debug = function(text) {\n if (this._options.debug) {\n return window.console.log(\"Bootstrap Tour '\" + this._options.name + \"' | \" + text);\n }\n };\n\n Tour.prototype._isRedirect = function(host, path, location) {\n var currentPath;\n if (host !== '') {\n if (this._isHostDifferent(host, location.href)) {\n return true;\n }\n }\n currentPath = [location.pathname, location.search, location.hash].join('');\n return (path != null) && path !== '' && (({}.toString.call(path) === '[object RegExp]' && !path.test(currentPath)) || ({}.toString.call(path) === '[object String]' && this._isPathDifferent(path, currentPath)));\n };\n\n Tour.prototype._isHostDifferent = function(host, currentURL) {\n return this._getProtocol(host) !== this._getProtocol(currentURL) || this._getHost(host) !== this._getHost(currentURL);\n };\n\n Tour.prototype._isPathDifferent = function(path, currentPath) {\n return this._getPath(path) !== this._getPath(currentPath) || !this._equal(this._getQuery(path), this._getQuery(currentPath)) || !this._equal(this._getHash(path), this._getHash(currentPath));\n };\n\n Tour.prototype._isJustPathHashDifferent = function(host, path, location) {\n var currentPath;\n if (host !== '') {\n if (this._isHostDifferent(host, location.href)) {\n return false;\n }\n }\n currentPath = [location.pathname, location.search, location.hash].join('');\n if ({}.toString.call(path) === '[object String]') {\n return this._getPath(path) === this._getPath(currentPath) && this._equal(this._getQuery(path), this._getQuery(currentPath)) && !this._equal(this._getHash(path), this._getHash(currentPath));\n }\n return false;\n };\n\n Tour.prototype._redirect = function(step, i, path) {\n if ($.isFunction(step.redirect)) {\n return step.redirect.call(this, path);\n } else if (step.redirect === true) {\n this._debug(\"Redirect to \" + step.host + path);\n if (this._getState('redirect_to') === (\"\" + i)) {\n this._debug(\"Error redirection loop to \" + path);\n this._removeState('redirect_to');\n if (step.onRedirectError != null) {\n return step.onRedirectError(this);\n }\n } else {\n this._setState('redirect_to', \"\" + i);\n return document.location.href = \"\" + step.host + path;\n }\n }\n };\n\n Tour.prototype._isOrphan = function(step) {\n return (step.element == null) || !$(step.element).length || $(step.element).is(':hidden') && ($(step.element)[0].namespaceURI !== 'http://www.w3.org/2000/svg');\n };\n\n Tour.prototype._isLast = function() {\n return this._current < this._options.steps.length - 1;\n };\n\n Tour.prototype._showPopover = function(step, i) {\n var $element, $tip, isOrphan, options, shouldAddSmart;\n $(\".tour-\" + this._options.name).remove();\n options = $.extend({}, this._options);\n isOrphan = this._isOrphan(step);\n step.template = this._template(step, i);\n if (isOrphan) {\n step.element = 'body';\n step.placement = 'top';\n }\n $element = $(step.element);\n $element.addClass(\"tour-\" + this._options.name + \"-element tour-\" + this._options.name + \"-\" + i + \"-element\");\n if (step.options) {\n $.extend(options, step.options);\n }\n if (step.reflex && !isOrphan) {\n $(step.reflexElement).addClass('tour-step-element-reflex').off(\"\" + (this._reflexEvent(step.reflex)) + \".tour-\" + this._options.name).on(\"\" + (this._reflexEvent(step.reflex)) + \".tour-\" + this._options.name, (function(_this) {\n return function() {\n if (_this._isLast()) {\n return _this.next();\n } else {\n return _this.end();\n }\n };\n })(this));\n }\n shouldAddSmart = step.smartPlacement === true && step.placement.search(/auto/i) === -1;\n $element.popover({\n placement: shouldAddSmart ? \"auto \" + step.placement : step.placement,\n trigger: 'manual',\n title: step.title,\n content: step.content,\n html: true,\n animation: step.animation,\n container: step.container,\n template: step.template,\n selector: step.element\n }).popover('show');\n $tip = $element.data('bs.popover') ? $element.data('bs.popover').tip() : $element.data('popover').tip();\n $tip.attr('id', step.id);\n this._reposition($tip, step);\n if (isOrphan) {\n return this._center($tip);\n }\n };\n\n Tour.prototype._template = function(step, i) {\n var $navigation, $next, $prev, $resume, $template, template;\n template = step.template;\n if (this._isOrphan(step) && {}.toString.call(step.orphan) !== '[object Boolean]') {\n template = step.orphan;\n }\n $template = $.isFunction(template) ? $(template(i, step)) : $(template);\n $navigation = $template.find('.popover-navigation');\n $prev = $navigation.find('[data-role=\"prev\"]');\n $next = $navigation.find('[data-role=\"next\"]');\n $resume = $navigation.find('[data-role=\"pause-resume\"]');\n if (this._isOrphan(step)) {\n $template.addClass('orphan');\n }\n $template.addClass(\"tour-\" + this._options.name + \" tour-\" + this._options.name + \"-\" + i);\n if (step.reflex) {\n $template.addClass(\"tour-\" + this._options.name + \"-reflex\");\n }\n if (step.prev < 0) {\n $prev.addClass('disabled');\n $prev.prop('disabled', true);\n }\n if (step.next < 0) {\n $next.addClass('disabled');\n $next.prop('disabled', true);\n }\n if (!step.duration) {\n $resume.remove();\n }\n return $template.clone().wrap('
    ').parent().html();\n };\n\n Tour.prototype._reflexEvent = function(reflex) {\n if ({}.toString.call(reflex) === '[object Boolean]') {\n return 'click';\n } else {\n return reflex;\n }\n };\n\n Tour.prototype._reposition = function($tip, step) {\n var offsetBottom, offsetHeight, offsetRight, offsetWidth, originalLeft, originalTop, tipOffset;\n offsetWidth = $tip[0].offsetWidth;\n offsetHeight = $tip[0].offsetHeight;\n tipOffset = $tip.offset();\n originalLeft = tipOffset.left;\n originalTop = tipOffset.top;\n offsetBottom = $(document).outerHeight() - tipOffset.top - $tip.outerHeight();\n if (offsetBottom < 0) {\n tipOffset.top = tipOffset.top + offsetBottom;\n }\n offsetRight = $('html').outerWidth() - tipOffset.left - $tip.outerWidth();\n if (offsetRight < 0) {\n tipOffset.left = tipOffset.left + offsetRight;\n }\n if (tipOffset.top < 0) {\n tipOffset.top = 0;\n }\n if (tipOffset.left < 0) {\n tipOffset.left = 0;\n }\n $tip.offset(tipOffset);\n if (step.placement === 'bottom' || step.placement === 'top') {\n if (originalLeft !== tipOffset.left) {\n return this._replaceArrow($tip, (tipOffset.left - originalLeft) * 2, offsetWidth, 'left');\n }\n } else {\n if (originalTop !== tipOffset.top) {\n return this._replaceArrow($tip, (tipOffset.top - originalTop) * 2, offsetHeight, 'top');\n }\n }\n };\n\n Tour.prototype._center = function($tip) {\n return $tip.css('top', $(window).outerHeight() / 2 - $tip.outerHeight() / 2);\n };\n\n Tour.prototype._replaceArrow = function($tip, delta, dimension, position) {\n return $tip.find('.arrow').css(position, delta ? 50 * (1 - delta / dimension) + '%' : '');\n };\n\n Tour.prototype._scrollIntoView = function(element, callback) {\n var $element, $window, counter, offsetTop, scrollTop, windowHeight;\n $element = $(element);\n if (!$element.length) {\n return callback();\n }\n $window = $(window);\n offsetTop = $element.offset().top;\n windowHeight = $window.height();\n scrollTop = Math.max(0, offsetTop - (windowHeight / 2));\n this._debug(\"Scroll into view. ScrollTop: \" + scrollTop + \". Element offset: \" + offsetTop + \". Window height: \" + windowHeight + \".\");\n counter = 0;\n return $('body, html').stop(true, true).animate({\n scrollTop: Math.ceil(scrollTop)\n }, (function(_this) {\n return function() {\n if (++counter === 2) {\n callback();\n return _this._debug(\"Scroll into view.\\nAnimation end element offset: \" + ($element.offset().top) + \".\\nWindow height: \" + ($window.height()) + \".\");\n }\n };\n })(this));\n };\n\n Tour.prototype._onResize = function(callback, timeout) {\n return $(window).on(\"resize.tour-\" + this._options.name, function() {\n clearTimeout(timeout);\n return timeout = setTimeout(callback, 100);\n });\n };\n\n Tour.prototype._initMouseNavigation = function() {\n var _this;\n _this = this;\n return $(document).off(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='prev']\").off(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='next']\").off(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='end']\").off(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='pause-resume']\").on(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='next']\", (function(_this) {\n return function(e) {\n e.preventDefault();\n return _this.next();\n };\n })(this)).on(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='prev']\", (function(_this) {\n return function(e) {\n e.preventDefault();\n return _this.prev();\n };\n })(this)).on(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='end']\", (function(_this) {\n return function(e) {\n e.preventDefault();\n return _this.end();\n };\n })(this)).on(\"click.tour-\" + this._options.name, \".popover.tour-\" + this._options.name + \" *[data-role='pause-resume']\", function(e) {\n var $this;\n e.preventDefault();\n $this = $(this);\n $this.text(_this._paused ? $this.data('pause-text') : $this.data('resume-text'));\n if (_this._paused) {\n return _this.resume();\n } else {\n return _this.pause();\n }\n });\n };\n\n Tour.prototype._initKeyboardNavigation = function() {\n if (!this._options.keyboard) {\n return;\n }\n return $(document).on(\"keyup.tour-\" + this._options.name, (function(_this) {\n return function(e) {\n if (!e.which) {\n return;\n }\n switch (e.which) {\n case 39:\n e.preventDefault();\n if (_this._isLast()) {\n return _this.next();\n } else {\n return _this.end();\n }\n break;\n case 37:\n e.preventDefault();\n if (_this._current > 0) {\n return _this.prev();\n }\n break;\n case 27:\n e.preventDefault();\n return _this.end();\n }\n };\n })(this));\n };\n\n Tour.prototype._makePromise = function(result) {\n if (result && $.isFunction(result.then)) {\n return result;\n } else {\n return null;\n }\n };\n\n Tour.prototype._callOnPromiseDone = function(promise, cb, arg) {\n if (promise) {\n return promise.then((function(_this) {\n return function(e) {\n return cb.call(_this, arg);\n };\n })(this));\n } else {\n return cb.call(this, arg);\n }\n };\n\n Tour.prototype._showBackdrop = function(step) {\n if (this.backdrop.backgroundShown) {\n return;\n }\n this.backdrop = $('
    ', {\n \"class\": 'tour-backdrop'\n });\n this.backdrop.backgroundShown = true;\n return $(step.backdropContainer).append(this.backdrop);\n };\n\n Tour.prototype._hideBackdrop = function() {\n this._hideOverlayElement();\n return this._hideBackground();\n };\n\n Tour.prototype._hideBackground = function() {\n if (this.backdrop) {\n this.backdrop.remove();\n this.backdrop.overlay = null;\n return this.backdrop.backgroundShown = false;\n }\n };\n\n Tour.prototype._showOverlayElement = function(step, force) {\n var $element, elementData;\n $element = $(step.element);\n if (!$element || $element.length === 0 || this.backdrop.overlayElementShown && !force) {\n return;\n }\n if (!this.backdrop.overlayElementShown) {\n this.backdrop.$element = $element.addClass('tour-step-backdrop');\n this.backdrop.$background = $('
    ', {\n \"class\": 'tour-step-background'\n });\n this.backdrop.$background.appendTo(step.backdropContainer);\n this.backdrop.overlayElementShown = true;\n }\n elementData = {\n width: $element.innerWidth(),\n height: $element.innerHeight(),\n offset: $element.offset()\n };\n if (step.backdropPadding) {\n elementData = this._applyBackdropPadding(step.backdropPadding, elementData);\n }\n return this.backdrop.$background.width(elementData.width).height(elementData.height).offset(elementData.offset);\n };\n\n Tour.prototype._hideOverlayElement = function() {\n if (!this.backdrop.overlayElementShown) {\n return;\n }\n this.backdrop.$element.removeClass('tour-step-backdrop');\n this.backdrop.$background.remove();\n this.backdrop.$element = null;\n this.backdrop.$background = null;\n return this.backdrop.overlayElementShown = false;\n };\n\n Tour.prototype._applyBackdropPadding = function(padding, data) {\n if (typeof padding === 'object') {\n if (padding.top == null) {\n padding.top = 0;\n }\n if (padding.right == null) {\n padding.right = 0;\n }\n if (padding.bottom == null) {\n padding.bottom = 0;\n }\n if (padding.left == null) {\n padding.left = 0;\n }\n data.offset.top = data.offset.top - padding.top;\n data.offset.left = data.offset.left - padding.left;\n data.width = data.width + padding.left + padding.right;\n data.height = data.height + padding.top + padding.bottom;\n } else {\n data.offset.top = data.offset.top - padding;\n data.offset.left = data.offset.left - padding;\n data.width = data.width + (padding * 2);\n data.height = data.height + (padding * 2);\n }\n return data;\n };\n\n Tour.prototype._clearTimer = function() {\n window.clearTimeout(this._timer);\n this._timer = null;\n return this._duration = null;\n };\n\n Tour.prototype._getProtocol = function(url) {\n url = url.split('://');\n if (url.length > 1) {\n return url[0];\n } else {\n return 'http';\n }\n };\n\n Tour.prototype._getHost = function(url) {\n url = url.split('//');\n url = url.length > 1 ? url[1] : url[0];\n return url.split('/')[0];\n };\n\n Tour.prototype._getPath = function(path) {\n return path.replace(/\\/?$/, '').split('?')[0].split('#')[0];\n };\n\n Tour.prototype._getQuery = function(path) {\n return this._getParams(path, '?');\n };\n\n Tour.prototype._getHash = function(path) {\n return this._getParams(path, '#');\n };\n\n Tour.prototype._getParams = function(path, start) {\n var param, params, paramsObject, _i, _len;\n params = path.split(start);\n if (params.length === 1) {\n return {};\n }\n params = params[1].split('&');\n paramsObject = {};\n for (_i = 0, _len = params.length; _i < _len; _i++) {\n param = params[_i];\n param = param.split('=');\n paramsObject[param[0]] = param[1] || '';\n }\n return paramsObject;\n };\n\n Tour.prototype._equal = function(obj1, obj2) {\n var k, v;\n if ({}.toString.call(obj1) === '[object Object]' && {}.toString.call(obj2) === '[object Object]') {\n for (k in obj1) {\n v = obj1[k];\n if (obj2[k] !== v) {\n return false;\n }\n }\n for (k in obj2) {\n v = obj2[k];\n if (obj1[k] !== v) {\n return false;\n }\n }\n return true;\n }\n return obj1 === obj2;\n };\n\n return Tour;\n\n })();\n return window.Tour = Tour;\n})(jQuery, window);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./galaxy/scripts/libs/bootstrap-tour.js\n ** module id = 61\n ** module chunks = 2\n **/","/*! jQuery UI - v1.9.1 - 2012-10-29\n* http://jqueryui.com\n* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.menu.js, jquery.ui.slider.js\n* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */\n\n(function(e,t){function i(t,n){var r,i,o,u=t.nodeName.toLowerCase();return\"area\"===u?(r=t.parentNode,i=r.name,!t.href||!i||r.nodeName.toLowerCase()!==\"map\"?!1:(o=e(\"img[usemap=#\"+i+\"]\")[0],!!o&&s(o))):(/input|select|textarea|button|object/.test(u)?!t.disabled:\"a\"===u?t.href||n:n)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().andSelf().filter(function(){return e.css(this,\"visibility\")===\"hidden\"}).length}var n=0,r=/^ui-id-\\d+$/;e.ui=e.ui||{};if(e.ui.version)return;e.extend(e.ui,{version:\"1.9.1\",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({_focus:e.fn.focus,focus:function(t,n){return typeof t==\"number\"?this.each(function(){var r=this;setTimeout(function(){e(r).focus(),n&&n.call(r)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return e.ui.ie&&/(static|relative)/.test(this.css(\"position\"))||/absolute/.test(this.css(\"position\"))?t=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,\"position\"))&&/(auto|scroll)/.test(e.css(this,\"overflow\")+e.css(this,\"overflow-y\")+e.css(this,\"overflow-x\"))}).eq(0):t=this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,\"overflow\")+e.css(this,\"overflow-y\")+e.css(this,\"overflow-x\"))}).eq(0),/fixed/.test(this.css(\"position\"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css(\"zIndex\",n);if(this.length){var r=e(this[0]),i,s;while(r.length&&r[0]!==document){i=r.css(\"position\");if(i===\"absolute\"||i===\"relative\"||i===\"fixed\"){s=parseInt(r.css(\"zIndex\"),10);if(!isNaN(s)&&s!==0)return s}r=r.parent()}}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id=\"ui-id-\"+ ++n)})},removeUniqueId:function(){return this.each(function(){r.test(this.id)&&e(this).removeAttr(\"id\")})}}),e(\"\").outerWidth(1).jquery||e.each([\"Width\",\"Height\"],function(n,r){function u(t,n,r,s){return e.each(i,function(){n-=parseFloat(e.css(t,\"padding\"+this))||0,r&&(n-=parseFloat(e.css(t,\"border\"+this+\"Width\"))||0),s&&(n-=parseFloat(e.css(t,\"margin\"+this))||0)}),n}var i=r===\"Width\"?[\"Left\",\"Right\"]:[\"Top\",\"Bottom\"],s=r.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn[\"inner\"+r]=function(n){return n===t?o[\"inner\"+r].call(this):this.each(function(){e(this).css(s,u(this,n)+\"px\")})},e.fn[\"outer\"+r]=function(t,n){return typeof t!=\"number\"?o[\"outer\"+r].call(this,t):this.each(function(){e(this).css(s,u(this,t,!0,n)+\"px\")})}}),e.extend(e.expr[\":\"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,\"tabindex\")))},tabbable:function(t){var n=e.attr(t,\"tabindex\"),r=isNaN(n);return(r||n>=0)&&i(t,!r)}}),e(function(){var t=document.body,n=t.appendChild(n=document.createElement(\"div\"));n.offsetHeight,e.extend(n.style,{minHeight:\"100px\",height:\"auto\",padding:0,borderWidth:0}),e.support.minHeight=n.offsetHeight===100,e.support.selectstart=\"onselectstart\"in n,t.removeChild(n).style.display=\"none\"}),function(){var t=/msie ([\\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];e.ui.ie=t.length?!0:!1,e.ui.ie6=parseFloat(t[1],10)===6}(),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?\"selectstart\":\"mousedown\")+\".ui-disableSelection\",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(\".ui-disableSelection\")}}),e.extend(e.ui,{plugin:{add:function(t,n,r){var i,s=e.ui[t].prototype;for(i in r)s.plugins[i]=s.plugins[i]||[],s.plugins[i].push([n,r[i]])},call:function(e,t,n){var r,i=e.plugins[t];if(!i||!e.element[0].parentNode||e.element[0].parentNode.nodeType===11)return;for(r=0;r0?!0:(t[r]=1,i=t[r]>0,t[r]=0,i)},isOverAxis:function(e,t,n){return e>t&&e\",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace=\".\"+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetName,this),e.data(r,this.widgetFullName,this),this._on(this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger(\"create\",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr(\"aria-disabled\").removeClass(this.widgetFullName+\"-disabled \"+\"ui-state-disabled\"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass(\"ui-state-hover\"),this.focusable.removeClass(\"ui-state-focus\")},_destroy:e.noop,widget:function(){return this.element},option:function(n,r){var i=n,s,o,u;if(arguments.length===0)return e.widget.extend({},this.options);if(typeof n==\"string\"){i={},s=n.split(\".\"),n=s.shift();if(s.length){o=i[n]=e.widget.extend({},this.options[n]);for(u=0;u=9||!!t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).unbind(\"mouseup.\"+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+\".preventClickEvent\",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(e){return this.mouseDelayMet},_mouseStart:function(e){},_mouseDrag:function(e){},_mouseStop:function(e){},_mouseCapture:function(e){return!0}})})(jQuery);(function(e,t){function h(e,t,n){return[parseInt(e[0],10)*(l.test(e[0])?t/100:1),parseInt(e[1],10)*(l.test(e[1])?n/100:1)]}function p(t,n){return parseInt(e.css(t,n),10)||0}e.ui=e.ui||{};var n,r=Math.max,i=Math.abs,s=Math.round,o=/left|center|right/,u=/top|center|bottom/,a=/[\\+\\-]\\d+%?/,f=/^\\w+/,l=/%$/,c=e.fn.position;e.position={scrollbarWidth:function(){if(n!==t)return n;var r,i,s=e(\"
    \"),o=s.children()[0];return e(\"body\").append(s),r=o.offsetWidth,s.css(\"overflow\",\"scroll\"),i=o.offsetWidth,r===i&&(i=s[0].clientWidth),s.remove(),n=r-i},getScrollInfo:function(t){var n=t.isWindow?\"\":t.element.css(\"overflow-x\"),r=t.isWindow?\"\":t.element.css(\"overflow-y\"),i=n===\"scroll\"||n===\"auto\"&&t.width0?\"right\":\"center\",vertical:u<0?\"top\":o>0?\"bottom\":\"middle\"};lr(i(o),i(u))?h.important=\"horizontal\":h.important=\"vertical\",t.using.call(this,e,h)}),a.offset(e.extend(C,{using:u}))})},e.ui.position={fit:{left:function(e,t){var n=t.within,i=n.isWindow?n.scrollLeft:n.offset.left,s=n.width,o=e.left-t.collisionPosition.marginLeft,u=i-o,a=o+t.collisionWidth-s-i,f;t.collisionWidth>s?u>0&&a<=0?(f=e.left+u+t.collisionWidth-s-i,e.left+=u-f):a>0&&u<=0?e.left=i:u>a?e.left=i+s-t.collisionWidth:e.left=i:u>0?e.left+=u:a>0?e.left-=a:e.left=r(e.left-o,e.left)},top:function(e,t){var n=t.within,i=n.isWindow?n.scrollTop:n.offset.top,s=t.within.height,o=e.top-t.collisionPosition.marginTop,u=i-o,a=o+t.collisionHeight-s-i,f;t.collisionHeight>s?u>0&&a<=0?(f=e.top+u+t.collisionHeight-s-i,e.top+=u-f):a>0&&u<=0?e.top=i:u>a?e.top=i+s-t.collisionHeight:e.top=i:u>0?e.top+=u:a>0?e.top-=a:e.top=r(e.top-o,e.top)}},flip:{left:function(e,t){var n=t.within,r=n.offset.left+n.scrollLeft,s=n.width,o=n.isWindow?n.scrollLeft:n.offset.left,u=e.left-t.collisionPosition.marginLeft,a=u-o,f=u+t.collisionWidth-s-o,l=t.my[0]===\"left\"?-t.elemWidth:t.my[0]===\"right\"?t.elemWidth:0,c=t.at[0]===\"left\"?t.targetWidth:t.at[0]===\"right\"?-t.targetWidth:0,h=-2*t.offset[0],p,d;if(a<0){p=e.left+l+c+h+t.collisionWidth-s-r;if(p<0||p0){d=e.left-t.collisionPosition.marginLeft+l+c+h-o;if(d>0||i(d)a&&(v<0||v0&&(d=e.top-t.collisionPosition.marginTop+c+h+p-o,e.top+c+h+p>f&&(d>0||i(d)10&&i<11,t.innerHTML=\"\",n.removeChild(t)}(),e.uiBackCompat!==!1&&function(e){var n=e.fn.position;e.fn.position=function(r){if(!r||!r.offset)return n.call(this,r);var i=r.offset.split(\" \"),s=r.at.split(\" \");return i.length===1&&(i[1]=i[0]),/^\\d/.test(i[0])&&(i[0]=\"+\"+i[0]),/^\\d/.test(i[1])&&(i[1]=\"+\"+i[1]),s.length===1&&(/left|center|right/.test(s[0])?s[1]=\"center\":(s[1]=s[0],s[0]=\"center\")),n.call(this,e.extend(r,{at:s[0]+i[0]+\" \"+s[1]+i[1],offset:t}))}}(jQuery)})(jQuery);(function(e,t){var n=0;e.widget(\"ui.autocomplete\",{version:\"1.9.1\",defaultElement:\"\",options:{appendTo:\"body\",autoFocus:!1,delay:300,minLength:1,position:{my:\"left top\",at:\"left bottom\",collision:\"none\"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var t,n,r;this.isMultiLine=this._isMultiLine(),this.valueMethod=this.element[this.element.is(\"input,textarea\")?\"val\":\"text\"],this.isNewMenu=!0,this.element.addClass(\"ui-autocomplete-input\").attr(\"autocomplete\",\"off\"),this._on(this.element,{keydown:function(i){if(this.element.prop(\"readOnly\")){t=!0,r=!0,n=!0;return}t=!1,r=!1,n=!1;var s=e.ui.keyCode;switch(i.keyCode){case s.PAGE_UP:t=!0,this._move(\"previousPage\",i);break;case s.PAGE_DOWN:t=!0,this._move(\"nextPage\",i);break;case s.UP:t=!0,this._keyEvent(\"previous\",i);break;case s.DOWN:t=!0,this._keyEvent(\"next\",i);break;case s.ENTER:case s.NUMPAD_ENTER:this.menu.active&&(t=!0,i.preventDefault(),this.menu.select(i));break;case s.TAB:this.menu.active&&this.menu.select(i);break;case s.ESCAPE:this.menu.element.is(\":visible\")&&(this._value(this.term),this.close(i),i.preventDefault());break;default:n=!0,this._searchTimeout(i)}},keypress:function(r){if(t){t=!1,r.preventDefault();return}if(n)return;var i=e.ui.keyCode;switch(r.keyCode){case i.PAGE_UP:this._move(\"previousPage\",r);break;case i.PAGE_DOWN:this._move(\"nextPage\",r);break;case i.UP:this._keyEvent(\"previous\",r);break;case i.DOWN:this._keyEvent(\"next\",r)}},input:function(e){if(r){r=!1,e.preventDefault();return}this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){if(this.cancelBlur){delete this.cancelBlur;return}clearTimeout(this.searching),this.close(e),this._change(e)}}),this._initSource(),this.menu=e(\"
      \").addClass(\"ui-autocomplete\").appendTo(this.document.find(this.options.appendTo||\"body\")[0]).menu({input:e(),role:null}).zIndex(this.element.zIndex()+1).hide().data(\"menu\"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var n=this.menu.element[0];e(t.target).closest(\".ui-menu-item\").length||this._delay(function(){var t=this;this.document.one(\"mousedown\",function(r){r.target!==t.element[0]&&r.target!==n&&!e.contains(n,r.target)&&t.close()})})},menufocus:function(t,n){if(this.isNewMenu){this.isNewMenu=!1;if(t.originalEvent&&/^mouse/.test(t.originalEvent.type)){this.menu.blur(),this.document.one(\"mousemove\",function(){e(t.target).trigger(t.originalEvent)});return}}var r=n.item.data(\"ui-autocomplete-item\")||n.item.data(\"item.autocomplete\");!1!==this._trigger(\"focus\",t,{item:r})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(r.value):this.liveRegion.text(r.value)},menuselect:function(e,t){var n=t.item.data(\"ui-autocomplete-item\")||t.item.data(\"item.autocomplete\"),r=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=r,this._delay(function(){this.previous=r,this.selectedItem=n})),!1!==this._trigger(\"select\",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n}}),this.liveRegion=e(\"\",{role:\"status\",\"aria-live\":\"polite\"}).addClass(\"ui-helper-hidden-accessible\").insertAfter(this.element),e.fn.bgiframe&&this.menu.element.bgiframe(),this._on(this.window,{beforeunload:function(){this.element.removeAttr(\"autocomplete\")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass(\"ui-autocomplete-input\").removeAttr(\"autocomplete\"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),e===\"source\"&&this._initSource(),e===\"appendTo\"&&this.menu.element.appendTo(this.document.find(t||\"body\")[0]),e===\"disabled\"&&t&&this.xhr&&this.xhr.abort()},_isMultiLine:function(){return this.element.is(\"textarea\")?!0:this.element.is(\"input\")?!1:this.element.prop(\"isContentEditable\")},_initSource:function(){var t,n,r=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(n,r){r(e.ui.autocomplete.filter(t,n.term))}):typeof this.options.source==\"string\"?(n=this.options.source,this.source=function(t,i){r.xhr&&r.xhr.abort(),r.xhr=e.ajax({url:n,data:t,dataType:\"json\",success:function(e){i(e)},error:function(){i([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){e=e!=null?e:this._value(),this.term=this._value();if(e.length\").append(e(\"\").text(n.label)).appendTo(t)},_move:function(e,t){if(!this.menu.element.is(\":visible\")){this.search(null,t);return}if(this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)){this._value(this.term),this.menu.blur();return}this.menu[e](t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){if(!this.isMultiLine||this.menu.element.is(\":visible\"))this._move(e,t),t.preventDefault()}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g,\"\\\\$&\")},filter:function(t,n){var r=new RegExp(e.ui.autocomplete.escapeRegex(n),\"i\");return e.grep(t,function(e){return r.test(e.label||e.value||e)})}}),e.widget(\"ui.autocomplete\",e.ui.autocomplete,{options:{messages:{noResults:\"No search results.\",results:function(e){return e+(e>1?\" results are\":\" result is\")+\" available, use up and down arrow keys to navigate.\"}}},__response:function(e){var t;this._superApply(arguments);if(this.options.disabled||this.cancelSearch)return;e&&e.length?t=this.options.messages.results(e.length):t=this.options.messages.noResults,this.liveRegion.text(t)}})})(jQuery);(function(e,t){var n,r,i,s,o=\"ui-button ui-widget ui-state-default ui-corner-all\",u=\"ui-state-hover ui-state-active \",a=\"ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only\",f=function(){var t=e(this).find(\":ui-button\");setTimeout(function(){t.button(\"refresh\")},1)},l=function(t){var n=t.name,r=t.form,i=e([]);return n&&(r?i=e(r).find(\"[name='\"+n+\"']\"):i=e(\"[name='\"+n+\"']\",t.ownerDocument).filter(function(){return!this.form})),i};e.widget(\"ui.button\",{version:\"1.9.1\",defaultElement:\"