/*! jquery ui - v1.12.1 - 2016-09-14 * http://jqueryui.com * includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js * copyright jquery foundation and other contributors; licensed mit */ (function( factory ) { if ( typeof define === "function" && define.amd ) { // amd. register as an anonymous module. define([ "jquery" ], factory ); } else { // browser globals factory( jquery ); } }(function( $ ) { $.ui = $.ui || {}; var version = $.ui.version = "1.12.1"; /*! * jquery ui widget 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: widget //>>group: core //>>description: provides a factory for creating stateful widgets with a common api. //>>docs: http://api.jqueryui.com/jquery.widget/ //>>demos: http://jqueryui.com/widget/ var widgetuuid = 0; var widgetslice = array.prototype.slice; $.cleandata = ( function( orig ) { return function( elems ) { var events, elem, i; for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) { try { // only trigger remove when necessary to save time events = $._data( elem, "events" ); if ( events && events.remove ) { $( elem ).triggerhandler( "remove" ); } // http://bugs.jquery.com/ticket/8235 } catch ( e ) {} } orig( elems ); }; } )( $.cleandata ); $.widget = function( name, base, prototype ) { var existingconstructor, constructor, baseprototype; // proxiedprototype allows the provided prototype to remain unmodified // so that it can be used as a mixin for multiple widgets (#8876) var proxiedprototype = {}; var namespace = name.split( "." )[ 0 ]; name = name.split( "." )[ 1 ]; var fullname = namespace + "-" + name; if ( !prototype ) { prototype = base; base = $.widget; } if ( $.isarray( prototype ) ) { prototype = $.extend.apply( null, [ {} ].concat( prototype ) ); } // create selector for plugin $.expr[ ":" ][ fullname.tolowercase() ] = function( elem ) { return !!$.data( elem, fullname ); }; $[ namespace ] = $[ namespace ] || {}; existingconstructor = $[ namespace ][ name ]; constructor = $[ namespace ][ name ] = function( options, element ) { // allow instantiation without "new" keyword if ( !this._createwidget ) { return new constructor( options, element ); } // allow instantiation without initializing for simple inheritance // must use "new" keyword (the code above always passes args) if ( arguments.length ) { this._createwidget( options, element ); } }; // extend with the existing constructor to carry over any static properties $.extend( constructor, existingconstructor, { version: prototype.version, // copy the object used to create the prototype in case we need to // redefine the widget later _proto: $.extend( {}, prototype ), // track widgets that inherit from this widget in case this widget is // redefined after a widget inherits from it _childconstructors: [] } ); baseprototype = new base(); // we need to make the options hash a property directly on the new instance // otherwise we'll modify the options hash on the prototype that we're // inheriting from baseprototype.options = $.widget.extend( {}, baseprototype.options ); $.each( prototype, function( prop, value ) { if ( !$.isfunction( value ) ) { proxiedprototype[ prop ] = value; return; } proxiedprototype[ prop ] = ( function() { function _super() { return base.prototype[ prop ].apply( this, arguments ); } function _superapply( args ) { return base.prototype[ prop ].apply( this, args ); } return function() { var __super = this._super; var __superapply = this._superapply; var returnvalue; this._super = _super; this._superapply = _superapply; returnvalue = value.apply( this, arguments ); this._super = __super; this._superapply = __superapply; return returnvalue; }; } )(); } ); constructor.prototype = $.widget.extend( baseprototype, { // todo: remove support for widgeteventprefix // always use the name + a colon as the prefix, e.g., draggable:start // don't prefix for widgets that aren't dom-based widgeteventprefix: existingconstructor ? ( baseprototype.widgeteventprefix || name ) : name }, proxiedprototype, { constructor: constructor, namespace: namespace, widgetname: name, widgetfullname: fullname } ); // if this widget is being redefined then we need to find all widgets that // are inheriting from it and redefine all of them so that they inherit from // the new version of this widget. we're essentially trying to replace one // level in the prototype chain. if ( existingconstructor ) { $.each( existingconstructor._childconstructors, function( i, child ) { var childprototype = child.prototype; // redefine the child widget using the same prototype that was // originally used, but inherit from the new version of the base $.widget( childprototype.namespace + "." + childprototype.widgetname, constructor, child._proto ); } ); // remove the list of existing child constructors from the old constructor // so the old child constructors can be garbage collected delete existingconstructor._childconstructors; } else { base._childconstructors.push( constructor ); } $.widget.bridge( name, constructor ); return constructor; }; $.widget.extend = function( target ) { var input = widgetslice.call( arguments, 1 ); var inputindex = 0; var inputlength = input.length; var key; var value; for ( ; inputindex < inputlength; inputindex++ ) { for ( key in input[ inputindex ] ) { value = input[ inputindex ][ key ]; if ( input[ inputindex ].hasownproperty( key ) && value !== undefined ) { // clone objects if ( $.isplainobject( value ) ) { target[ key ] = $.isplainobject( target[ key ] ) ? $.widget.extend( {}, target[ key ], value ) : // don't extend strings, arrays, etc. with objects $.widget.extend( {}, value ); // copy everything else by reference } else { target[ key ] = value; } } } } return target; }; $.widget.bridge = function( name, object ) { var fullname = object.prototype.widgetfullname || name; $.fn[ name ] = function( options ) { var ismethodcall = typeof options === "string"; var args = widgetslice.call( arguments, 1 ); var returnvalue = this; if ( ismethodcall ) { // if this is an empty collection, we need to have the instance method // return undefined instead of the jquery instance if ( !this.length && options === "instance" ) { returnvalue = undefined; } else { this.each( function() { var methodvalue; var instance = $.data( this, fullname ); if ( options === "instance" ) { returnvalue = instance; return false; } if ( !instance ) { return $.error( "cannot call methods on " + name + " prior to initialization; " + "attempted to call method '" + options + "'" ); } if ( !$.isfunction( instance[ options ] ) || options.charat( 0 ) === "_" ) { return $.error( "no such method '" + options + "' for " + name + " widget instance" ); } methodvalue = instance[ options ].apply( instance, args ); if ( methodvalue !== instance && methodvalue !== undefined ) { returnvalue = methodvalue && methodvalue.jquery ? returnvalue.pushstack( methodvalue.get() ) : methodvalue; return false; } } ); } } else { // allow multiple hashes to be passed on init if ( args.length ) { options = $.widget.extend.apply( null, [ options ].concat( args ) ); } this.each( function() { var instance = $.data( this, fullname ); if ( instance ) { instance.option( options || {} ); if ( instance._init ) { instance._init(); } } else { $.data( this, fullname, new object( options, this ) ); } } ); } return returnvalue; }; }; $.widget = function( /* options, element */ ) {}; $.widget._childconstructors = []; $.widget.prototype = { widgetname: "widget", widgeteventprefix: "", defaultelement: "
", options: { classes: {}, disabled: false, // callbacks create: null }, _createwidget: function( options, element ) { element = $( element || this.defaultelement || this )[ 0 ]; this.element = $( element ); this.uuid = widgetuuid++; this.eventnamespace = "." + this.widgetname + this.uuid; this.bindings = $(); this.hoverable = $(); this.focusable = $(); this.classeselementlookup = {}; if ( element !== this ) { $.data( element, this.widgetfullname, this ); this._on( true, this.element, { remove: function( event ) { if ( event.target === element ) { this.destroy(); } } } ); this.document = $( element.style ? // element within the document element.ownerdocument : // element is window or document element.document || element ); this.window = $( this.document[ 0 ].defaultview || this.document[ 0 ].parentwindow ); } this.options = $.widget.extend( {}, this.options, this._getcreateoptions(), options ); this._create(); if ( this.options.disabled ) { this._setoptiondisabled( this.options.disabled ); } this._trigger( "create", null, this._getcreateeventdata() ); this._init(); }, _getcreateoptions: function() { return {}; }, _getcreateeventdata: $.noop, _create: $.noop, _init: $.noop, destroy: function() { var that = this; this._destroy(); $.each( this.classeselementlookup, function( key, value ) { that._removeclass( value, key ); } ); // we can probably remove the unbind calls in 2.0 // all event bindings should go through this._on() this.element .off( this.eventnamespace ) .removedata( this.widgetfullname ); this.widget() .off( this.eventnamespace ) .removeattr( "aria-disabled" ); // clean up events and states this.bindings.off( this.eventnamespace ); }, _destroy: $.noop, widget: function() { return this.element; }, option: function( key, value ) { var options = key; var parts; var curoption; var i; if ( arguments.length === 0 ) { // don't return a reference to the internal hash return $.widget.extend( {}, this.options ); } if ( typeof key === "string" ) { // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } options = {}; parts = key.split( "." ); key = parts.shift(); if ( parts.length ) { curoption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); for ( i = 0; i < parts.length - 1; i++ ) { curoption[ parts[ i ] ] = curoption[ parts[ i ] ] || {}; curoption = curoption[ parts[ i ] ]; } key = parts.pop(); if ( arguments.length === 1 ) { return curoption[ key ] === undefined ? null : curoption[ key ]; } curoption[ key ] = value; } else { if ( arguments.length === 1 ) { return this.options[ key ] === undefined ? null : this.options[ key ]; } options[ key ] = value; } } this._setoptions( options ); return this; }, _setoptions: function( options ) { var key; for ( key in options ) { this._setoption( key, options[ key ] ); } return this; }, _setoption: function( key, value ) { if ( key === "classes" ) { this._setoptionclasses( value ); } this.options[ key ] = value; if ( key === "disabled" ) { this._setoptiondisabled( value ); } return this; }, _setoptionclasses: function( value ) { var classkey, elements, currentelements; for ( classkey in value ) { currentelements = this.classeselementlookup[ classkey ]; if ( value[ classkey ] === this.options.classes[ classkey ] || !currentelements || !currentelements.length ) { continue; } // we are doing this to create a new jquery object because the _removeclass() call // on the next line is going to destroy the reference to the current elements being // tracked. we need to save a copy of this collection so that we can add the new classes // below. elements = $( currentelements.get() ); this._removeclass( currentelements, classkey ); // we don't use _addclass() here, because that uses this.options.classes // for generating the string of classes. we want to use the value passed in from // _setoption(), this is the new value of the classes option which was passed to // _setoption(). we pass this value directly to _classes(). elements.addclass( this._classes( { element: elements, keys: classkey, classes: value, add: true } ) ); } }, _setoptiondisabled: function( value ) { this._toggleclass( this.widget(), this.widgetfullname + "-disabled", null, !!value ); // if the widget is becoming disabled, then nothing is interactive if ( value ) { this._removeclass( this.hoverable, null, "ui-state-hover" ); this._removeclass( this.focusable, null, "ui-state-focus" ); } }, enable: function() { return this._setoptions( { disabled: false } ); }, disable: function() { return this._setoptions( { disabled: true } ); }, _classes: function( options ) { var full = []; var that = this; options = $.extend( { element: this.element, classes: this.options.classes || {} }, options ); function processclassstring( classes, checkoption ) { var current, i; for ( i = 0; i < classes.length; i++ ) { current = that.classeselementlookup[ classes[ i ] ] || $(); if ( options.add ) { current = $( $.unique( current.get().concat( options.element.get() ) ) ); } else { current = $( current.not( options.element ).get() ); } that.classeselementlookup[ classes[ i ] ] = current; full.push( classes[ i ] ); if ( checkoption && options.classes[ classes[ i ] ] ) { full.push( options.classes[ classes[ i ] ] ); } } } this._on( options.element, { "remove": "_untrackclasseselement" } ); if ( options.keys ) { processclassstring( options.keys.match( /\s+/g ) || [], true ); } if ( options.extra ) { processclassstring( options.extra.match( /\s+/g ) || [] ); } return full.join( " " ); }, _untrackclasseselement: function( event ) { var that = this; $.each( that.classeselementlookup, function( key, value ) { if ( $.inarray( event.target, value ) !== -1 ) { that.classeselementlookup[ key ] = $( value.not( event.target ).get() ); } } ); }, _removeclass: function( element, keys, extra ) { return this._toggleclass( element, keys, extra, false ); }, _addclass: function( element, keys, extra ) { return this._toggleclass( element, keys, extra, true ); }, _toggleclass: function( element, keys, extra, add ) { add = ( typeof add === "boolean" ) ? add : extra; var shift = ( typeof element === "string" || element === null ), options = { extra: shift ? keys : extra, keys: shift ? element : keys, element: shift ? this.element : element, add: add }; options.element.toggleclass( this._classes( options ), add ); return this; }, _on: function( suppressdisabledcheck, element, handlers ) { var delegateelement; var instance = this; // no suppressdisabledcheck flag, shuffle arguments if ( typeof suppressdisabledcheck !== "boolean" ) { handlers = element; element = suppressdisabledcheck; suppressdisabledcheck = false; } // no element argument, shuffle and use this.element if ( !handlers ) { handlers = element; element = this.element; delegateelement = this.widget(); } else { element = delegateelement = $( element ); this.bindings = this.bindings.add( element ); } $.each( handlers, function( event, handler ) { function handlerproxy() { // allow widgets to customize the disabled handling // - disabled as an array instead of boolean // - disabled class as method for disabling individual parts if ( !suppressdisabledcheck && ( instance.options.disabled === true || $( this ).hasclass( "ui-state-disabled" ) ) ) { return; } return ( typeof handler === "string" ? instance[ handler ] : handler ) .apply( instance, arguments ); } // copy the guid so direct unbinding works if ( typeof handler !== "string" ) { handlerproxy.guid = handler.guid = handler.guid || handlerproxy.guid || $.guid++; } var match = event.match( /^([\w:-]*)\s*(.*)$/ ); var eventname = match[ 1 ] + instance.eventnamespace; var selector = match[ 2 ]; if ( selector ) { delegateelement.on( eventname, selector, handlerproxy ); } else { element.on( eventname, handlerproxy ); } } ); }, _off: function( element, eventname ) { eventname = ( eventname || "" ).split( " " ).join( this.eventnamespace + " " ) + this.eventnamespace; element.off( eventname ).off( eventname ); // clear the stack to avoid memory leaks (#10056) this.bindings = $( this.bindings.not( element ).get() ); this.focusable = $( this.focusable.not( element ).get() ); this.hoverable = $( this.hoverable.not( element ).get() ); }, _delay: function( handler, delay ) { function handlerproxy() { return ( typeof handler === "string" ? instance[ handler ] : handler ) .apply( instance, arguments ); } var instance = this; return settimeout( handlerproxy, delay || 0 ); }, _hoverable: function( element ) { this.hoverable = this.hoverable.add( element ); this._on( element, { mouseenter: function( event ) { this._addclass( $( event.currenttarget ), null, "ui-state-hover" ); }, mouseleave: function( event ) { this._removeclass( $( event.currenttarget ), null, "ui-state-hover" ); } } ); }, _focusable: function( element ) { this.focusable = this.focusable.add( element ); this._on( element, { focusin: function( event ) { this._addclass( $( event.currenttarget ), null, "ui-state-focus" ); }, focusout: function( event ) { this._removeclass( $( event.currenttarget ), null, "ui-state-focus" ); } } ); }, _trigger: function( type, event, data ) { var prop, orig; var callback = this.options[ type ]; data = data || {}; event = $.event( event ); event.type = ( type === this.widgeteventprefix ? type : this.widgeteventprefix + type ).tolowercase(); // the original event may come from any element // so we need to reset the target on the new event event.target = this.element[ 0 ]; // copy original event properties over to the new event orig = event.originalevent; if ( orig ) { for ( prop in orig ) { if ( !( prop in event ) ) { event[ prop ] = orig[ prop ]; } } } this.element.trigger( event, data ); return !( $.isfunction( callback ) && callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false || event.isdefaultprevented() ); } }; $.each( { show: "fadein", hide: "fadeout" }, function( method, defaulteffect ) { $.widget.prototype[ "_" + method ] = function( element, options, callback ) { if ( typeof options === "string" ) { options = { effect: options }; } var hasoptions; var effectname = !options ? method : options === true || typeof options === "number" ? defaulteffect : options.effect || defaulteffect; options = options || {}; if ( typeof options === "number" ) { options = { duration: options }; } hasoptions = !$.isemptyobject( options ); options.complete = callback; if ( options.delay ) { element.delay( options.delay ); } if ( hasoptions && $.effects && $.effects.effect[ effectname ] ) { element[ method ]( options ); } else if ( effectname !== method && element[ effectname ] ) { element[ effectname ]( options.duration, options.easing, callback ); } else { element.queue( function( next ) { $( this )[ method ](); if ( callback ) { callback.call( element[ 0 ] ); } next(); } ); } }; } ); var widget = $.widget; /*! * jquery ui position 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license * * http://api.jqueryui.com/position/ */ //>>label: position //>>group: core //>>description: positions elements relative to other elements. //>>docs: http://api.jqueryui.com/position/ //>>demos: http://jqueryui.com/position/ ( function() { var cachedscrollbarwidth, max = math.max, abs = math.abs, rhorizontal = /left|center|right/, rvertical = /top|center|bottom/, roffset = /[\+\-]\d+(\.[\d]+)?%?/, rposition = /^\w+/, rpercent = /%$/, _position = $.fn.position; function getoffsets( offsets, width, height ) { return [ parsefloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), parsefloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) ]; } function parsecss( element, property ) { return parseint( $.css( element, property ), 10 ) || 0; } function getdimensions( elem ) { var raw = elem[ 0 ]; if ( raw.nodetype === 9 ) { return { width: elem.width(), height: elem.height(), offset: { top: 0, left: 0 } }; } if ( $.iswindow( raw ) ) { return { width: elem.width(), height: elem.height(), offset: { top: elem.scrolltop(), left: elem.scrollleft() } }; } if ( raw.preventdefault ) { return { width: 0, height: 0, offset: { top: raw.pagey, left: raw.pagex } }; } return { width: elem.outerwidth(), height: elem.outerheight(), offset: elem.offset() }; } $.position = { scrollbarwidth: function() { if ( cachedscrollbarwidth !== undefined ) { return cachedscrollbarwidth; } var w1, w2, div = $( "
" + "
" ), innerdiv = div.children()[ 0 ]; $( "body" ).append( div ); w1 = innerdiv.offsetwidth; div.css( "overflow", "scroll" ); w2 = innerdiv.offsetwidth; if ( w1 === w2 ) { w2 = div[ 0 ].clientwidth; } div.remove(); return ( cachedscrollbarwidth = w1 - w2 ); }, getscrollinfo: function( within ) { var overflowx = within.iswindow || within.isdocument ? "" : within.element.css( "overflow-x" ), overflowy = within.iswindow || within.isdocument ? "" : within.element.css( "overflow-y" ), hasoverflowx = overflowx === "scroll" || ( overflowx === "auto" && within.width < within.element[ 0 ].scrollwidth ), hasoverflowy = overflowy === "scroll" || ( overflowy === "auto" && within.height < within.element[ 0 ].scrollheight ); return { width: hasoverflowy ? $.position.scrollbarwidth() : 0, height: hasoverflowx ? $.position.scrollbarwidth() : 0 }; }, getwithininfo: function( element ) { var withinelement = $( element || window ), iswindow = $.iswindow( withinelement[ 0 ] ), isdocument = !!withinelement[ 0 ] && withinelement[ 0 ].nodetype === 9, hasoffset = !iswindow && !isdocument; return { element: withinelement, iswindow: iswindow, isdocument: isdocument, offset: hasoffset ? $( element ).offset() : { left: 0, top: 0 }, scrollleft: withinelement.scrollleft(), scrolltop: withinelement.scrolltop(), width: withinelement.outerwidth(), height: withinelement.outerheight() }; } }; $.fn.position = function( options ) { if ( !options || !options.of ) { return _position.apply( this, arguments ); } // make a copy, we don't want to modify arguments options = $.extend( {}, options ); var atoffset, targetwidth, targetheight, targetoffset, baseposition, dimensions, target = $( options.of ), within = $.position.getwithininfo( options.within ), scrollinfo = $.position.getscrollinfo( within ), collision = ( options.collision || "flip" ).split( " " ), offsets = {}; dimensions = getdimensions( target ); if ( target[ 0 ].preventdefault ) { // force left top to allow flipping options.at = "left top"; } targetwidth = dimensions.width; targetheight = dimensions.height; targetoffset = dimensions.offset; // clone to reuse original targetoffset later baseposition = $.extend( {}, targetoffset ); // force my and at to have valid horizontal and vertical positions // if a value is missing or invalid, it will be converted to center $.each( [ "my", "at" ], function() { var pos = ( options[ this ] || "" ).split( " " ), horizontaloffset, verticaloffset; if ( pos.length === 1 ) { pos = rhorizontal.test( pos[ 0 ] ) ? pos.concat( [ "center" ] ) : rvertical.test( pos[ 0 ] ) ? [ "center" ].concat( pos ) : [ "center", "center" ]; } pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; // calculate offsets horizontaloffset = roffset.exec( pos[ 0 ] ); verticaloffset = roffset.exec( pos[ 1 ] ); offsets[ this ] = [ horizontaloffset ? horizontaloffset[ 0 ] : 0, verticaloffset ? verticaloffset[ 0 ] : 0 ]; // reduce to just the positions without the offsets options[ this ] = [ rposition.exec( pos[ 0 ] )[ 0 ], rposition.exec( pos[ 1 ] )[ 0 ] ]; } ); // normalize collision option if ( collision.length === 1 ) { collision[ 1 ] = collision[ 0 ]; } if ( options.at[ 0 ] === "right" ) { baseposition.left += targetwidth; } else if ( options.at[ 0 ] === "center" ) { baseposition.left += targetwidth / 2; } if ( options.at[ 1 ] === "bottom" ) { baseposition.top += targetheight; } else if ( options.at[ 1 ] === "center" ) { baseposition.top += targetheight / 2; } atoffset = getoffsets( offsets.at, targetwidth, targetheight ); baseposition.left += atoffset[ 0 ]; baseposition.top += atoffset[ 1 ]; return this.each( function() { var collisionposition, using, elem = $( this ), elemwidth = elem.outerwidth(), elemheight = elem.outerheight(), marginleft = parsecss( this, "marginleft" ), margintop = parsecss( this, "margintop" ), collisionwidth = elemwidth + marginleft + parsecss( this, "marginright" ) + scrollinfo.width, collisionheight = elemheight + margintop + parsecss( this, "marginbottom" ) + scrollinfo.height, position = $.extend( {}, baseposition ), myoffset = getoffsets( offsets.my, elem.outerwidth(), elem.outerheight() ); if ( options.my[ 0 ] === "right" ) { position.left -= elemwidth; } else if ( options.my[ 0 ] === "center" ) { position.left -= elemwidth / 2; } if ( options.my[ 1 ] === "bottom" ) { position.top -= elemheight; } else if ( options.my[ 1 ] === "center" ) { position.top -= elemheight / 2; } position.left += myoffset[ 0 ]; position.top += myoffset[ 1 ]; collisionposition = { marginleft: marginleft, margintop: margintop }; $.each( [ "left", "top" ], function( i, dir ) { if ( $.ui.position[ collision[ i ] ] ) { $.ui.position[ collision[ i ] ][ dir ]( position, { targetwidth: targetwidth, targetheight: targetheight, elemwidth: elemwidth, elemheight: elemheight, collisionposition: collisionposition, collisionwidth: collisionwidth, collisionheight: collisionheight, offset: [ atoffset[ 0 ] + myoffset[ 0 ], atoffset [ 1 ] + myoffset[ 1 ] ], my: options.my, at: options.at, within: within, elem: elem } ); } } ); if ( options.using ) { // adds feedback as second argument to using callback, if present using = function( props ) { var left = targetoffset.left - position.left, right = left + targetwidth - elemwidth, top = targetoffset.top - position.top, bottom = top + targetheight - elemheight, feedback = { target: { element: target, left: targetoffset.left, top: targetoffset.top, width: targetwidth, height: targetheight }, element: { element: elem, left: position.left, top: position.top, width: elemwidth, height: elemheight }, horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" }; if ( targetwidth < elemwidth && abs( left + right ) < targetwidth ) { feedback.horizontal = "center"; } if ( targetheight < elemheight && abs( top + bottom ) < targetheight ) { feedback.vertical = "middle"; } if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { feedback.important = "horizontal"; } else { feedback.important = "vertical"; } options.using.call( this, props, feedback ); }; } elem.offset( $.extend( position, { using: using } ) ); } ); }; $.ui.position = { fit: { left: function( position, data ) { var within = data.within, withinoffset = within.iswindow ? within.scrollleft : within.offset.left, outerwidth = within.width, collisionposleft = position.left - data.collisionposition.marginleft, overleft = withinoffset - collisionposleft, overright = collisionposleft + data.collisionwidth - outerwidth - withinoffset, newoverright; // element is wider than within if ( data.collisionwidth > outerwidth ) { // element is initially over the left side of within if ( overleft > 0 && overright <= 0 ) { newoverright = position.left + overleft + data.collisionwidth - outerwidth - withinoffset; position.left += overleft - newoverright; // element is initially over right side of within } else if ( overright > 0 && overleft <= 0 ) { position.left = withinoffset; // element is initially over both left and right sides of within } else { if ( overleft > overright ) { position.left = withinoffset + outerwidth - data.collisionwidth; } else { position.left = withinoffset; } } // too far left -> align with left edge } else if ( overleft > 0 ) { position.left += overleft; // too far right -> align with right edge } else if ( overright > 0 ) { position.left -= overright; // adjust based on position and margin } else { position.left = max( position.left - collisionposleft, position.left ); } }, top: function( position, data ) { var within = data.within, withinoffset = within.iswindow ? within.scrolltop : within.offset.top, outerheight = data.within.height, collisionpostop = position.top - data.collisionposition.margintop, overtop = withinoffset - collisionpostop, overbottom = collisionpostop + data.collisionheight - outerheight - withinoffset, newoverbottom; // element is taller than within if ( data.collisionheight > outerheight ) { // element is initially over the top of within if ( overtop > 0 && overbottom <= 0 ) { newoverbottom = position.top + overtop + data.collisionheight - outerheight - withinoffset; position.top += overtop - newoverbottom; // element is initially over bottom of within } else if ( overbottom > 0 && overtop <= 0 ) { position.top = withinoffset; // element is initially over both top and bottom of within } else { if ( overtop > overbottom ) { position.top = withinoffset + outerheight - data.collisionheight; } else { position.top = withinoffset; } } // too far up -> align with top } else if ( overtop > 0 ) { position.top += overtop; // too far down -> align with bottom edge } else if ( overbottom > 0 ) { position.top -= overbottom; // adjust based on position and margin } else { position.top = max( position.top - collisionpostop, position.top ); } } }, flip: { left: function( position, data ) { var within = data.within, withinoffset = within.offset.left + within.scrollleft, outerwidth = within.width, offsetleft = within.iswindow ? within.scrollleft : within.offset.left, collisionposleft = position.left - data.collisionposition.marginleft, overleft = collisionposleft - offsetleft, overright = collisionposleft + data.collisionwidth - outerwidth - offsetleft, myoffset = data.my[ 0 ] === "left" ? -data.elemwidth : data.my[ 0 ] === "right" ? data.elemwidth : 0, atoffset = data.at[ 0 ] === "left" ? data.targetwidth : data.at[ 0 ] === "right" ? -data.targetwidth : 0, offset = -2 * data.offset[ 0 ], newoverright, newoverleft; if ( overleft < 0 ) { newoverright = position.left + myoffset + atoffset + offset + data.collisionwidth - outerwidth - withinoffset; if ( newoverright < 0 || newoverright < abs( overleft ) ) { position.left += myoffset + atoffset + offset; } } else if ( overright > 0 ) { newoverleft = position.left - data.collisionposition.marginleft + myoffset + atoffset + offset - offsetleft; if ( newoverleft > 0 || abs( newoverleft ) < overright ) { position.left += myoffset + atoffset + offset; } } }, top: function( position, data ) { var within = data.within, withinoffset = within.offset.top + within.scrolltop, outerheight = within.height, offsettop = within.iswindow ? within.scrolltop : within.offset.top, collisionpostop = position.top - data.collisionposition.margintop, overtop = collisionpostop - offsettop, overbottom = collisionpostop + data.collisionheight - outerheight - offsettop, top = data.my[ 1 ] === "top", myoffset = top ? -data.elemheight : data.my[ 1 ] === "bottom" ? data.elemheight : 0, atoffset = data.at[ 1 ] === "top" ? data.targetheight : data.at[ 1 ] === "bottom" ? -data.targetheight : 0, offset = -2 * data.offset[ 1 ], newovertop, newoverbottom; if ( overtop < 0 ) { newoverbottom = position.top + myoffset + atoffset + offset + data.collisionheight - outerheight - withinoffset; if ( newoverbottom < 0 || newoverbottom < abs( overtop ) ) { position.top += myoffset + atoffset + offset; } } else if ( overbottom > 0 ) { newovertop = position.top - data.collisionposition.margintop + myoffset + atoffset + offset - offsettop; if ( newovertop > 0 || abs( newovertop ) < overbottom ) { position.top += myoffset + atoffset + offset; } } } }, flipfit: { left: function() { $.ui.position.flip.left.apply( this, arguments ); $.ui.position.fit.left.apply( this, arguments ); }, top: function() { $.ui.position.flip.top.apply( this, arguments ); $.ui.position.fit.top.apply( this, arguments ); } } }; } )(); var position = $.ui.position; /*! * jquery ui :data 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: :data selector //>>group: core //>>description: selects elements which have data stored under the specified key. //>>docs: http://api.jqueryui.com/data-selector/ var data = $.extend( $.expr[ ":" ], { data: $.expr.createpseudo ? $.expr.createpseudo( function( dataname ) { return function( elem ) { return !!$.data( elem, dataname ); }; } ) : // support: jquery <1.8 function( elem, i, match ) { return !!$.data( elem, match[ 3 ] ); } } ); /*! * jquery ui disable selection 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: disableselection //>>group: core //>>description: disable selection of text content within the set of matched elements. //>>docs: http://api.jqueryui.com/disableselection/ // this file is deprecated var disableselection = $.fn.extend( { disableselection: ( function() { var eventtype = "onselectstart" in document.createelement( "div" ) ? "selectstart" : "mousedown"; return function() { return this.on( eventtype + ".ui-disableselection", function( event ) { event.preventdefault(); } ); }; } )(), enableselection: function() { return this.off( ".ui-disableselection" ); } } ); /*! * jquery ui effects 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: effects core //>>group: effects // jscs:disable maximumlinelength //>>description: extends the internal jquery effects. includes morphing and easing. required by all other effects. // jscs:enable maximumlinelength //>>docs: http://api.jqueryui.com/category/effects-core/ //>>demos: http://jqueryui.com/effect/ var dataspace = "ui-effects-", dataspacestyle = "ui-effects-style", dataspaceanimated = "ui-effects-animated", // create a local jquery because jquery color relies on it and the // global may not exist with amd and a custom build (#10199) jquery = $; $.effects = { effect: {} }; /*! * jquery color animations v2.1.2 * https://github.com/jquery/jquery-color * * copyright 2014 jquery foundation and other contributors * released under the mit license. * http://jquery.org/license * * date: wed jan 16 08:47:09 2013 -0600 */ ( function( jquery, undefined ) { var stephooks = "backgroundcolor borderbottomcolor borderleftcolor borderrightcolor " + "bordertopcolor color columnrulecolor outlinecolor textdecorationcolor textemphasiscolor", // plusequals test for += 100 -= 100 rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, // a set of re's that can match strings and generate color tuples. stringparsers = [ { re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, parse: function( execresult ) { return [ execresult[ 1 ], execresult[ 2 ], execresult[ 3 ], execresult[ 4 ] ]; } }, { re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, parse: function( execresult ) { return [ execresult[ 1 ] * 2.55, execresult[ 2 ] * 2.55, execresult[ 3 ] * 2.55, execresult[ 4 ] ]; } }, { // this regex ignores a-f because it's compared against an already lowercased string re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, parse: function( execresult ) { return [ parseint( execresult[ 1 ], 16 ), parseint( execresult[ 2 ], 16 ), parseint( execresult[ 3 ], 16 ) ]; } }, { // this regex ignores a-f because it's compared against an already lowercased string re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, parse: function( execresult ) { return [ parseint( execresult[ 1 ] + execresult[ 1 ], 16 ), parseint( execresult[ 2 ] + execresult[ 2 ], 16 ), parseint( execresult[ 3 ] + execresult[ 3 ], 16 ) ]; } }, { re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, space: "hsla", parse: function( execresult ) { return [ execresult[ 1 ], execresult[ 2 ] / 100, execresult[ 3 ] / 100, execresult[ 4 ] ]; } } ], // jquery.color( ) color = jquery.color = function( color, green, blue, alpha ) { return new jquery.color.fn.parse( color, green, blue, alpha ); }, spaces = { rgba: { props: { red: { idx: 0, type: "byte" }, green: { idx: 1, type: "byte" }, blue: { idx: 2, type: "byte" } } }, hsla: { props: { hue: { idx: 0, type: "degrees" }, saturation: { idx: 1, type: "percent" }, lightness: { idx: 2, type: "percent" } } } }, proptypes = { "byte": { floor: true, max: 255 }, "percent": { max: 1 }, "degrees": { mod: 360, floor: true } }, support = color.support = {}, // element for support tests supportelem = jquery( "

" )[ 0 ], // colors = jquery.color.names colors, // local aliases of functions called often each = jquery.each; // determine rgba support immediately supportelem.style.csstext = "background-color:rgba(1,1,1,.5)"; support.rgba = supportelem.style.backgroundcolor.indexof( "rgba" ) > -1; // define cache name and alpha properties // for rgba and hsla spaces each( spaces, function( spacename, space ) { space.cache = "_" + spacename; space.props.alpha = { idx: 3, type: "percent", def: 1 }; } ); function clamp( value, prop, allowempty ) { var type = proptypes[ prop.type ] || {}; if ( value == null ) { return ( allowempty || !prop.def ) ? null : prop.def; } // ~~ is an short way of doing floor for positive numbers value = type.floor ? ~~value : parsefloat( value ); // ie will pass in empty strings as value for alpha, // which will hit this case if ( isnan( value ) ) { return prop.def; } if ( type.mod ) { // we add mod before modding to make sure that negatives values // get converted properly: -10 -> 350 return ( value + type.mod ) % type.mod; } // for now all property types without mod have min and max return 0 > value ? 0 : type.max < value ? type.max : value; } function stringparse( string ) { var inst = color(), rgba = inst._rgba = []; string = string.tolowercase(); each( stringparsers, function( i, parser ) { var parsed, match = parser.re.exec( string ), values = match && parser.parse( match ), spacename = parser.space || "rgba"; if ( values ) { parsed = inst[ spacename ]( values ); // if this was an rgba parse the assignment might happen twice // oh well.... inst[ spaces[ spacename ].cache ] = parsed[ spaces[ spacename ].cache ]; rgba = inst._rgba = parsed._rgba; // exit each( stringparsers ) here because we matched return false; } } ); // found a stringparser that handled it if ( rgba.length ) { // if this came from a parsed string, force "transparent" when alpha is 0 // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0) if ( rgba.join() === "0,0,0,0" ) { jquery.extend( rgba, colors.transparent ); } return inst; } // named colors return colors[ string ]; } color.fn = jquery.extend( color.prototype, { parse: function( red, green, blue, alpha ) { if ( red === undefined ) { this._rgba = [ null, null, null, null ]; return this; } if ( red.jquery || red.nodetype ) { red = jquery( red ).css( green ); green = undefined; } var inst = this, type = jquery.type( red ), rgba = this._rgba = []; // more than 1 argument specified - assume ( red, green, blue, alpha ) if ( green !== undefined ) { red = [ red, green, blue, alpha ]; type = "array"; } if ( type === "string" ) { return this.parse( stringparse( red ) || colors._default ); } if ( type === "array" ) { each( spaces.rgba.props, function( key, prop ) { rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); } ); return this; } if ( type === "object" ) { if ( red instanceof color ) { each( spaces, function( spacename, space ) { if ( red[ space.cache ] ) { inst[ space.cache ] = red[ space.cache ].slice(); } } ); } else { each( spaces, function( spacename, space ) { var cache = space.cache; each( space.props, function( key, prop ) { // if the cache doesn't exist, and we know how to convert if ( !inst[ cache ] && space.to ) { // if the value was null, we don't need to copy it // if the key was alpha, we don't need to copy it either if ( key === "alpha" || red[ key ] == null ) { return; } inst[ cache ] = space.to( inst._rgba ); } // this is the only case where we allow nulls for all properties. // call clamp with alwaysallowempty inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); } ); // everything defined but alpha? if ( inst[ cache ] && jquery.inarray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { // use the default of 1 inst[ cache ][ 3 ] = 1; if ( space.from ) { inst._rgba = space.from( inst[ cache ] ); } } } ); } return this; } }, is: function( compare ) { var is = color( compare ), same = true, inst = this; each( spaces, function( _, space ) { var localcache, iscache = is[ space.cache ]; if ( iscache ) { localcache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || []; each( space.props, function( _, prop ) { if ( iscache[ prop.idx ] != null ) { same = ( iscache[ prop.idx ] === localcache[ prop.idx ] ); return same; } } ); } return same; } ); return same; }, _space: function() { var used = [], inst = this; each( spaces, function( spacename, space ) { if ( inst[ space.cache ] ) { used.push( spacename ); } } ); return used.pop(); }, transition: function( other, distance ) { var end = color( other ), spacename = end._space(), space = spaces[ spacename ], startcolor = this.alpha() === 0 ? color( "transparent" ) : this, start = startcolor[ space.cache ] || space.to( startcolor._rgba ), result = start.slice(); end = end[ space.cache ]; each( space.props, function( key, prop ) { var index = prop.idx, startvalue = start[ index ], endvalue = end[ index ], type = proptypes[ prop.type ] || {}; // if null, don't override start value if ( endvalue === null ) { return; } // if null - use end if ( startvalue === null ) { result[ index ] = endvalue; } else { if ( type.mod ) { if ( endvalue - startvalue > type.mod / 2 ) { startvalue += type.mod; } else if ( startvalue - endvalue > type.mod / 2 ) { startvalue -= type.mod; } } result[ index ] = clamp( ( endvalue - startvalue ) * distance + startvalue, prop ); } } ); return this[ spacename ]( result ); }, blend: function( opaque ) { // if we are already opaque - return ourself if ( this._rgba[ 3 ] === 1 ) { return this; } var rgb = this._rgba.slice(), a = rgb.pop(), blend = color( opaque )._rgba; return color( jquery.map( rgb, function( v, i ) { return ( 1 - a ) * blend[ i ] + a * v; } ) ); }, torgbastring: function() { var prefix = "rgba(", rgba = jquery.map( this._rgba, function( v, i ) { return v == null ? ( i > 2 ? 1 : 0 ) : v; } ); if ( rgba[ 3 ] === 1 ) { rgba.pop(); prefix = "rgb("; } return prefix + rgba.join() + ")"; }, tohslastring: function() { var prefix = "hsla(", hsla = jquery.map( this.hsla(), function( v, i ) { if ( v == null ) { v = i > 2 ? 1 : 0; } // catch 1 and 2 if ( i && i < 3 ) { v = math.round( v * 100 ) + "%"; } return v; } ); if ( hsla[ 3 ] === 1 ) { hsla.pop(); prefix = "hsl("; } return prefix + hsla.join() + ")"; }, tohexstring: function( includealpha ) { var rgba = this._rgba.slice(), alpha = rgba.pop(); if ( includealpha ) { rgba.push( ~~( alpha * 255 ) ); } return "#" + jquery.map( rgba, function( v ) { // default to 0 when nulls exist v = ( v || 0 ).tostring( 16 ); return v.length === 1 ? "0" + v : v; } ).join( "" ); }, tostring: function() { return this._rgba[ 3 ] === 0 ? "transparent" : this.torgbastring(); } } ); color.fn.parse.prototype = color.fn; // hsla conversions adapted from: // https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/hue2rgb.as?r=5021 function hue2rgb( p, q, h ) { h = ( h + 1 ) % 1; if ( h * 6 < 1 ) { return p + ( q - p ) * h * 6; } if ( h * 2 < 1 ) { return q; } if ( h * 3 < 2 ) { return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6; } return p; } spaces.hsla.to = function( rgba ) { if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { return [ null, null, null, rgba[ 3 ] ]; } var r = rgba[ 0 ] / 255, g = rgba[ 1 ] / 255, b = rgba[ 2 ] / 255, a = rgba[ 3 ], max = math.max( r, g, b ), min = math.min( r, g, b ), diff = max - min, add = max + min, l = add * 0.5, h, s; if ( min === max ) { h = 0; } else if ( r === max ) { h = ( 60 * ( g - b ) / diff ) + 360; } else if ( g === max ) { h = ( 60 * ( b - r ) / diff ) + 120; } else { h = ( 60 * ( r - g ) / diff ) + 240; } // chroma (diff) == 0 means greyscale which, by definition, saturation = 0% // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add) if ( diff === 0 ) { s = 0; } else if ( l <= 0.5 ) { s = diff / add; } else { s = diff / ( 2 - add ); } return [ math.round( h ) % 360, s, l, a == null ? 1 : a ]; }; spaces.hsla.from = function( hsla ) { if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) { return [ null, null, null, hsla[ 3 ] ]; } var h = hsla[ 0 ] / 360, s = hsla[ 1 ], l = hsla[ 2 ], a = hsla[ 3 ], q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s, p = 2 * l - q; return [ math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ), math.round( hue2rgb( p, q, h ) * 255 ), math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ), a ]; }; each( spaces, function( spacename, space ) { var props = space.props, cache = space.cache, to = space.to, from = space.from; // makes rgba() and hsla() color.fn[ spacename ] = function( value ) { // generate a cache for this space if it doesn't exist if ( to && !this[ cache ] ) { this[ cache ] = to( this._rgba ); } if ( value === undefined ) { return this[ cache ].slice(); } var ret, type = jquery.type( value ), arr = ( type === "array" || type === "object" ) ? value : arguments, local = this[ cache ].slice(); each( props, function( key, prop ) { var val = arr[ type === "object" ? key : prop.idx ]; if ( val == null ) { val = local[ prop.idx ]; } local[ prop.idx ] = clamp( val, prop ); } ); if ( from ) { ret = color( from( local ) ); ret[ cache ] = local; return ret; } else { return color( local ); } }; // makes red() green() blue() alpha() hue() saturation() lightness() each( props, function( key, prop ) { // alpha is included in more than one space if ( color.fn[ key ] ) { return; } color.fn[ key ] = function( value ) { var vtype = jquery.type( value ), fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spacename ), local = this[ fn ](), cur = local[ prop.idx ], match; if ( vtype === "undefined" ) { return cur; } if ( vtype === "function" ) { value = value.call( this, cur ); vtype = jquery.type( value ); } if ( value == null && prop.empty ) { return this; } if ( vtype === "string" ) { match = rplusequals.exec( value ); if ( match ) { value = cur + parsefloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 ); } } local[ prop.idx ] = value; return this[ fn ]( local ); }; } ); } ); // add csshook and .fx.step function for each named hook. // accept a space separated string of properties color.hook = function( hook ) { var hooks = hook.split( " " ); each( hooks, function( i, hook ) { jquery.csshooks[ hook ] = { set: function( elem, value ) { var parsed, curelem, backgroundcolor = ""; if ( value !== "transparent" && ( jquery.type( value ) !== "string" || ( parsed = stringparse( value ) ) ) ) { value = color( parsed || value ); if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { curelem = hook === "backgroundcolor" ? elem.parentnode : elem; while ( ( backgroundcolor === "" || backgroundcolor === "transparent" ) && curelem && curelem.style ) { try { backgroundcolor = jquery.css( curelem, "backgroundcolor" ); curelem = curelem.parentnode; } catch ( e ) { } } value = value.blend( backgroundcolor && backgroundcolor !== "transparent" ? backgroundcolor : "_default" ); } value = value.torgbastring(); } try { elem.style[ hook ] = value; } catch ( e ) { // wrapped to prevent ie from throwing errors on "invalid" values like // 'auto' or 'inherit' } } }; jquery.fx.step[ hook ] = function( fx ) { if ( !fx.colorinit ) { fx.start = color( fx.elem, hook ); fx.end = color( fx.end ); fx.colorinit = true; } jquery.csshooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) ); }; } ); }; color.hook( stephooks ); jquery.csshooks.bordercolor = { expand: function( value ) { var expanded = {}; each( [ "top", "right", "bottom", "left" ], function( i, part ) { expanded[ "border" + part + "color" ] = value; } ); return expanded; } }; // basic color names only. // usage of any of the other color names requires adding yourself or including // jquery.color.svg-names.js. colors = jquery.color.names = { // 4.1. basic color keywords aqua: "#00ffff", black: "#000000", blue: "#0000ff", fuchsia: "#ff00ff", gray: "#808080", green: "#008000", lime: "#00ff00", maroon: "#800000", navy: "#000080", olive: "#808000", purple: "#800080", red: "#ff0000", silver: "#c0c0c0", teal: "#008080", white: "#ffffff", yellow: "#ffff00", // 4.2.3. "transparent" color keyword transparent: [ null, null, null, 0 ], _default: "#ffffff" }; } )( jquery ); /******************************************************************************/ /****************************** class animations ******************************/ /******************************************************************************/ ( function() { var classanimationactions = [ "add", "remove", "toggle" ], shorthandstyles = { border: 1, borderbottom: 1, bordercolor: 1, borderleft: 1, borderright: 1, bordertop: 1, borderwidth: 1, margin: 1, padding: 1 }; $.each( [ "borderleftstyle", "borderrightstyle", "borderbottomstyle", "bordertopstyle" ], function( _, prop ) { $.fx.step[ prop ] = function( fx ) { if ( fx.end !== "none" && !fx.setattr || fx.pos === 1 && !fx.setattr ) { jquery.style( fx.elem, prop, fx.end ); fx.setattr = true; } }; } ); function getelementstyles( elem ) { var key, len, style = elem.ownerdocument.defaultview ? elem.ownerdocument.defaultview.getcomputedstyle( elem, null ) : elem.currentstyle, styles = {}; if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) { len = style.length; while ( len-- ) { key = style[ len ]; if ( typeof style[ key ] === "string" ) { styles[ $.camelcase( key ) ] = style[ key ]; } } // support: opera, ie <9 } else { for ( key in style ) { if ( typeof style[ key ] === "string" ) { styles[ key ] = style[ key ]; } } } return styles; } function styledifference( oldstyle, newstyle ) { var diff = {}, name, value; for ( name in newstyle ) { value = newstyle[ name ]; if ( oldstyle[ name ] !== value ) { if ( !shorthandstyles[ name ] ) { if ( $.fx.step[ name ] || !isnan( parsefloat( value ) ) ) { diff[ name ] = value; } } } } return diff; } // support: jquery <1.8 if ( !$.fn.addback ) { $.fn.addback = function( selector ) { return this.add( selector == null ? this.prevobject : this.prevobject.filter( selector ) ); }; } $.effects.animateclass = function( value, duration, easing, callback ) { var o = $.speed( duration, easing, callback ); return this.queue( function() { var animated = $( this ), baseclass = animated.attr( "class" ) || "", applyclasschange, allanimations = o.children ? animated.find( "*" ).addback() : animated; // map the animated objects to store the original styles. allanimations = allanimations.map( function() { var el = $( this ); return { el: el, start: getelementstyles( this ) }; } ); // apply class change applyclasschange = function() { $.each( classanimationactions, function( i, action ) { if ( value[ action ] ) { animated[ action + "class" ]( value[ action ] ); } } ); }; applyclasschange(); // map all animated objects again - calculate new styles and diff allanimations = allanimations.map( function() { this.end = getelementstyles( this.el[ 0 ] ); this.diff = styledifference( this.start, this.end ); return this; } ); // apply original class animated.attr( "class", baseclass ); // map all animated objects again - this time collecting a promise allanimations = allanimations.map( function() { var styleinfo = this, dfd = $.deferred(), opts = $.extend( {}, o, { queue: false, complete: function() { dfd.resolve( styleinfo ); } } ); this.el.animate( this.diff, opts ); return dfd.promise(); } ); // once all animations have completed: $.when.apply( $, allanimations.get() ).done( function() { // set the final class applyclasschange(); // for each animated element, // clear all css properties that were animated $.each( arguments, function() { var el = this.el; $.each( this.diff, function( key ) { el.css( key, "" ); } ); } ); // this is guarnteed to be there if you use jquery.speed() // it also handles dequeuing the next anim... o.complete.call( animated[ 0 ] ); } ); } ); }; $.fn.extend( { addclass: ( function( orig ) { return function( classnames, speed, easing, callback ) { return speed ? $.effects.animateclass.call( this, { add: classnames }, speed, easing, callback ) : orig.apply( this, arguments ); }; } )( $.fn.addclass ), removeclass: ( function( orig ) { return function( classnames, speed, easing, callback ) { return arguments.length > 1 ? $.effects.animateclass.call( this, { remove: classnames }, speed, easing, callback ) : orig.apply( this, arguments ); }; } )( $.fn.removeclass ), toggleclass: ( function( orig ) { return function( classnames, force, speed, easing, callback ) { if ( typeof force === "boolean" || force === undefined ) { if ( !speed ) { // without speed parameter return orig.apply( this, arguments ); } else { return $.effects.animateclass.call( this, ( force ? { add: classnames } : { remove: classnames } ), speed, easing, callback ); } } else { // without force parameter return $.effects.animateclass.call( this, { toggle: classnames }, force, speed, easing ); } }; } )( $.fn.toggleclass ), switchclass: function( remove, add, speed, easing, callback ) { return $.effects.animateclass.call( this, { add: add, remove: remove }, speed, easing, callback ); } } ); } )(); /******************************************************************************/ /*********************************** effects **********************************/ /******************************************************************************/ ( function() { if ( $.expr && $.expr.filters && $.expr.filters.animated ) { $.expr.filters.animated = ( function( orig ) { return function( elem ) { return !!$( elem ).data( dataspaceanimated ) || orig( elem ); }; } )( $.expr.filters.animated ); } if ( $.uibackcompat !== false ) { $.extend( $.effects, { // saves a set of properties in a data storage save: function( element, set ) { var i = 0, length = set.length; for ( ; i < length; i++ ) { if ( set[ i ] !== null ) { element.data( dataspace + set[ i ], element[ 0 ].style[ set[ i ] ] ); } } }, // restores a set of previously saved properties from a data storage restore: function( element, set ) { var val, i = 0, length = set.length; for ( ; i < length; i++ ) { if ( set[ i ] !== null ) { val = element.data( dataspace + set[ i ] ); element.css( set[ i ], val ); } } }, setmode: function( el, mode ) { if ( mode === "toggle" ) { mode = el.is( ":hidden" ) ? "show" : "hide"; } return mode; }, // wraps the element around a wrapper that copies position properties createwrapper: function( element ) { // if the element is already wrapped, return it if ( element.parent().is( ".ui-effects-wrapper" ) ) { return element.parent(); } // wrap the element var props = { width: element.outerwidth( true ), height: element.outerheight( true ), "float": element.css( "float" ) }, wrapper = $( "

" ) .addclass( "ui-effects-wrapper" ) .css( { fontsize: "100%", background: "transparent", border: "none", margin: 0, padding: 0 } ), // store the size in case width/height are defined in % - fixes #5245 size = { width: element.width(), height: element.height() }, active = document.activeelement; // support: firefox // firefox incorrectly exposes anonymous content // https://bugzilla.mozilla.org/show_bug.cgi?id=561664 try { active.id; } catch ( e ) { active = document.body; } element.wrap( wrapper ); // fixes #7595 - elements lose focus when wrapped. if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { $( active ).trigger( "focus" ); } // hotfix for jquery 1.4 since some change in wrap() seems to actually // lose the reference to the wrapped element wrapper = element.parent(); // transfer positioning properties to the wrapper if ( element.css( "position" ) === "static" ) { wrapper.css( { position: "relative" } ); element.css( { position: "relative" } ); } else { $.extend( props, { position: element.css( "position" ), zindex: element.css( "z-index" ) } ); $.each( [ "top", "left", "bottom", "right" ], function( i, pos ) { props[ pos ] = element.css( pos ); if ( isnan( parseint( props[ pos ], 10 ) ) ) { props[ pos ] = "auto"; } } ); element.css( { position: "relative", top: 0, left: 0, right: "auto", bottom: "auto" } ); } element.css( size ); return wrapper.css( props ).show(); }, removewrapper: function( element ) { var active = document.activeelement; if ( element.parent().is( ".ui-effects-wrapper" ) ) { element.parent().replacewith( element ); // fixes #7595 - elements lose focus when wrapped. if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { $( active ).trigger( "focus" ); } } return element; } } ); } $.extend( $.effects, { version: "1.12.1", define: function( name, mode, effect ) { if ( !effect ) { effect = mode; mode = "effect"; } $.effects.effect[ name ] = effect; $.effects.effect[ name ].mode = mode; return effect; }, scaleddimensions: function( element, percent, direction ) { if ( percent === 0 ) { return { height: 0, width: 0, outerheight: 0, outerwidth: 0 }; } var x = direction !== "horizontal" ? ( ( percent || 100 ) / 100 ) : 1, y = direction !== "vertical" ? ( ( percent || 100 ) / 100 ) : 1; return { height: element.height() * y, width: element.width() * x, outerheight: element.outerheight() * y, outerwidth: element.outerwidth() * x }; }, cliptobox: function( animation ) { return { width: animation.clip.right - animation.clip.left, height: animation.clip.bottom - animation.clip.top, left: animation.clip.left, top: animation.clip.top }; }, // injects recently queued functions to be first in line (after "inprogress") unshift: function( element, queuelength, count ) { var queue = element.queue(); if ( queuelength > 1 ) { queue.splice.apply( queue, [ 1, 0 ].concat( queue.splice( queuelength, count ) ) ); } element.dequeue(); }, savestyle: function( element ) { element.data( dataspacestyle, element[ 0 ].style.csstext ); }, restorestyle: function( element ) { element[ 0 ].style.csstext = element.data( dataspacestyle ) || ""; element.removedata( dataspacestyle ); }, mode: function( element, mode ) { var hidden = element.is( ":hidden" ); if ( mode === "toggle" ) { mode = hidden ? "show" : "hide"; } if ( hidden ? mode === "hide" : mode === "show" ) { mode = "none"; } return mode; }, // translates a [top,left] array into a baseline value getbaseline: function( origin, original ) { var y, x; switch ( origin[ 0 ] ) { case "top": y = 0; break; case "middle": y = 0.5; break; case "bottom": y = 1; break; default: y = origin[ 0 ] / original.height; } switch ( origin[ 1 ] ) { case "left": x = 0; break; case "center": x = 0.5; break; case "right": x = 1; break; default: x = origin[ 1 ] / original.width; } return { x: x, y: y }; }, // creates a placeholder element so that the original element can be made absolute createplaceholder: function( element ) { var placeholder, cssposition = element.css( "position" ), position = element.position(); // lock in margins first to account for form elements, which // will change margin if you explicitly set height // see: http://jsfiddle.net/jzsmt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380 // support: safari element.css( { margintop: element.css( "margintop" ), marginbottom: element.css( "marginbottom" ), marginleft: element.css( "marginleft" ), marginright: element.css( "marginright" ) } ) .outerwidth( element.outerwidth() ) .outerheight( element.outerheight() ); if ( /^(static|relative)/.test( cssposition ) ) { cssposition = "absolute"; placeholder = $( "<" + element[ 0 ].nodename + ">" ).insertafter( element ).css( { // convert inline to inline block to account for inline elements // that turn to inline block based on content (like img) display: /^(inline|ruby)/.test( element.css( "display" ) ) ? "inline-block" : "block", visibility: "hidden", // margins need to be set to account for margin collapse margintop: element.css( "margintop" ), marginbottom: element.css( "marginbottom" ), marginleft: element.css( "marginleft" ), marginright: element.css( "marginright" ), "float": element.css( "float" ) } ) .outerwidth( element.outerwidth() ) .outerheight( element.outerheight() ) .addclass( "ui-effects-placeholder" ); element.data( dataspace + "placeholder", placeholder ); } element.css( { position: cssposition, left: position.left, top: position.top } ); return placeholder; }, removeplaceholder: function( element ) { var datakey = dataspace + "placeholder", placeholder = element.data( datakey ); if ( placeholder ) { placeholder.remove(); element.removedata( datakey ); } }, // removes a placeholder if it exists and restores // properties that were modified during placeholder creation cleanup: function( element ) { $.effects.restorestyle( element ); $.effects.removeplaceholder( element ); }, settransition: function( element, list, factor, value ) { value = value || {}; $.each( list, function( i, x ) { var unit = element.cssunit( x ); if ( unit[ 0 ] > 0 ) { value[ x ] = unit[ 0 ] * factor + unit[ 1 ]; } } ); return value; } } ); // return an effect options object for the given parameters: function _normalizearguments( effect, options, speed, callback ) { // allow passing all options as the first parameter if ( $.isplainobject( effect ) ) { options = effect; effect = effect.effect; } // convert to an object effect = { effect: effect }; // catch (effect, null, ...) if ( options == null ) { options = {}; } // catch (effect, callback) if ( $.isfunction( options ) ) { callback = options; speed = null; options = {}; } // catch (effect, speed, ?) if ( typeof options === "number" || $.fx.speeds[ options ] ) { callback = speed; speed = options; options = {}; } // catch (effect, options, callback) if ( $.isfunction( speed ) ) { callback = speed; speed = null; } // add options to effect if ( options ) { $.extend( effect, options ); } speed = speed || options.duration; effect.duration = $.fx.off ? 0 : typeof speed === "number" ? speed : speed in $.fx.speeds ? $.fx.speeds[ speed ] : $.fx.speeds._default; effect.complete = callback || options.complete; return effect; } function standardanimationoption( option ) { // valid standard speeds (nothing, number, named speed) if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) { return true; } // invalid strings - treat as "normal" speed if ( typeof option === "string" && !$.effects.effect[ option ] ) { return true; } // complete callback if ( $.isfunction( option ) ) { return true; } // options hash (but not naming an effect) if ( typeof option === "object" && !option.effect ) { return true; } // didn't match any standard api return false; } $.fn.extend( { effect: function( /* effect, options, speed, callback */ ) { var args = _normalizearguments.apply( this, arguments ), effectmethod = $.effects.effect[ args.effect ], defaultmode = effectmethod.mode, queue = args.queue, queuename = queue || "fx", complete = args.complete, mode = args.mode, modes = [], prefilter = function( next ) { var el = $( this ), normalizedmode = $.effects.mode( el, mode ) || defaultmode; // sentinel for duck-punching the :animated psuedo-selector el.data( dataspaceanimated, true ); // save effect mode for later use, // we can't just call $.effects.mode again later, // as the .show() below destroys the initial state modes.push( normalizedmode ); // see $.uibackcompat inside of run() for removal of defaultmode in 1.13 if ( defaultmode && ( normalizedmode === "show" || ( normalizedmode === defaultmode && normalizedmode === "hide" ) ) ) { el.show(); } if ( !defaultmode || normalizedmode !== "none" ) { $.effects.savestyle( el ); } if ( $.isfunction( next ) ) { next(); } }; if ( $.fx.off || !effectmethod ) { // delegate to the original method (e.g., .show()) if possible if ( mode ) { return this[ mode ]( args.duration, complete ); } else { return this.each( function() { if ( complete ) { complete.call( this ); } } ); } } function run( next ) { var elem = $( this ); function cleanup() { elem.removedata( dataspaceanimated ); $.effects.cleanup( elem ); if ( args.mode === "hide" ) { elem.hide(); } done(); } function done() { if ( $.isfunction( complete ) ) { complete.call( elem[ 0 ] ); } if ( $.isfunction( next ) ) { next(); } } // override mode option on a per element basis, // as toggle can be either show or hide depending on element state args.mode = modes.shift(); if ( $.uibackcompat !== false && !defaultmode ) { if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) { // call the core method to track "olddisplay" properly elem[ mode ](); done(); } else { effectmethod.call( elem[ 0 ], args, done ); } } else { if ( args.mode === "none" ) { // call the core method to track "olddisplay" properly elem[ mode ](); done(); } else { effectmethod.call( elem[ 0 ], args, cleanup ); } } } // run prefilter on all elements first to ensure that // any showing or hiding happens before placeholder creation, // which ensures that any layout changes are correctly captured. return queue === false ? this.each( prefilter ).each( run ) : this.queue( queuename, prefilter ).queue( queuename, run ); }, show: ( function( orig ) { return function( option ) { if ( standardanimationoption( option ) ) { return orig.apply( this, arguments ); } else { var args = _normalizearguments.apply( this, arguments ); args.mode = "show"; return this.effect.call( this, args ); } }; } )( $.fn.show ), hide: ( function( orig ) { return function( option ) { if ( standardanimationoption( option ) ) { return orig.apply( this, arguments ); } else { var args = _normalizearguments.apply( this, arguments ); args.mode = "hide"; return this.effect.call( this, args ); } }; } )( $.fn.hide ), toggle: ( function( orig ) { return function( option ) { if ( standardanimationoption( option ) || typeof option === "boolean" ) { return orig.apply( this, arguments ); } else { var args = _normalizearguments.apply( this, arguments ); args.mode = "toggle"; return this.effect.call( this, args ); } }; } )( $.fn.toggle ), cssunit: function( key ) { var style = this.css( key ), val = []; $.each( [ "em", "px", "%", "pt" ], function( i, unit ) { if ( style.indexof( unit ) > 0 ) { val = [ parsefloat( style ), unit ]; } } ); return val; }, cssclip: function( clipobj ) { if ( clipobj ) { return this.css( "clip", "rect(" + clipobj.top + "px " + clipobj.right + "px " + clipobj.bottom + "px " + clipobj.left + "px)" ); } return parseclip( this.css( "clip" ), this ); }, transfer: function( options, done ) { var element = $( this ), target = $( options.to ), targetfixed = target.css( "position" ) === "fixed", body = $( "body" ), fixtop = targetfixed ? body.scrolltop() : 0, fixleft = targetfixed ? body.scrollleft() : 0, endposition = target.offset(), animation = { top: endposition.top - fixtop, left: endposition.left - fixleft, height: target.innerheight(), width: target.innerwidth() }, startposition = element.offset(), transfer = $( "
" ) .appendto( "body" ) .addclass( options.classname ) .css( { top: startposition.top - fixtop, left: startposition.left - fixleft, height: element.innerheight(), width: element.innerwidth(), position: targetfixed ? "fixed" : "absolute" } ) .animate( animation, options.duration, options.easing, function() { transfer.remove(); if ( $.isfunction( done ) ) { done(); } } ); } } ); function parseclip( str, element ) { var outerwidth = element.outerwidth(), outerheight = element.outerheight(), clipregex = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/, values = clipregex.exec( str ) || [ "", 0, outerwidth, outerheight, 0 ]; return { top: parsefloat( values[ 1 ] ) || 0, right: values[ 2 ] === "auto" ? outerwidth : parsefloat( values[ 2 ] ), bottom: values[ 3 ] === "auto" ? outerheight : parsefloat( values[ 3 ] ), left: parsefloat( values[ 4 ] ) || 0 }; } $.fx.step.clip = function( fx ) { if ( !fx.clipinit ) { fx.start = $( fx.elem ).cssclip(); if ( typeof fx.end === "string" ) { fx.end = parseclip( fx.end, fx.elem ); } fx.clipinit = true; } $( fx.elem ).cssclip( { top: fx.pos * ( fx.end.top - fx.start.top ) + fx.start.top, right: fx.pos * ( fx.end.right - fx.start.right ) + fx.start.right, bottom: fx.pos * ( fx.end.bottom - fx.start.bottom ) + fx.start.bottom, left: fx.pos * ( fx.end.left - fx.start.left ) + fx.start.left } ); }; } )(); /******************************************************************************/ /*********************************** easing ***********************************/ /******************************************************************************/ ( function() { // based on easing equations from robert penner (http://www.robertpenner.com/easing) var baseeasings = {}; $.each( [ "quad", "cubic", "quart", "quint", "expo" ], function( i, name ) { baseeasings[ name ] = function( p ) { return math.pow( p, i + 2 ); }; } ); $.extend( baseeasings, { sine: function( p ) { return 1 - math.cos( p * math.pi / 2 ); }, circ: function( p ) { return 1 - math.sqrt( 1 - p * p ); }, elastic: function( p ) { return p === 0 || p === 1 ? p : -math.pow( 2, 8 * ( p - 1 ) ) * math.sin( ( ( p - 1 ) * 80 - 7.5 ) * math.pi / 15 ); }, back: function( p ) { return p * p * ( 3 * p - 2 ); }, bounce: function( p ) { var pow2, bounce = 4; while ( p < ( ( pow2 = math.pow( 2, --bounce ) ) - 1 ) / 11 ) {} return 1 / math.pow( 4, 3 - bounce ) - 7.5625 * math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 ); } } ); $.each( baseeasings, function( name, easein ) { $.easing[ "easein" + name ] = easein; $.easing[ "easeout" + name ] = function( p ) { return 1 - easein( 1 - p ); }; $.easing[ "easeinout" + name ] = function( p ) { return p < 0.5 ? easein( p * 2 ) / 2 : 1 - easein( p * -2 + 2 ) / 2; }; } ); } )(); var effect = $.effects; /*! * jquery ui effects blind 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: blind effect //>>group: effects //>>description: blinds the element. //>>docs: http://api.jqueryui.com/blind-effect/ //>>demos: http://jqueryui.com/effect/ var effectseffectblind = $.effects.define( "blind", "hide", function( options, done ) { var map = { up: [ "bottom", "top" ], vertical: [ "bottom", "top" ], down: [ "top", "bottom" ], left: [ "right", "left" ], horizontal: [ "right", "left" ], right: [ "left", "right" ] }, element = $( this ), direction = options.direction || "up", start = element.cssclip(), animate = { clip: $.extend( {}, start ) }, placeholder = $.effects.createplaceholder( element ); animate.clip[ map[ direction ][ 0 ] ] = animate.clip[ map[ direction ][ 1 ] ]; if ( options.mode === "show" ) { element.cssclip( animate.clip ); if ( placeholder ) { placeholder.css( $.effects.cliptobox( animate ) ); } animate.clip = start; } if ( placeholder ) { placeholder.animate( $.effects.cliptobox( animate ), options.duration, options.easing ); } element.animate( animate, { queue: false, duration: options.duration, easing: options.easing, complete: done } ); } ); /*! * jquery ui effects bounce 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: bounce effect //>>group: effects //>>description: bounces an element horizontally or vertically n times. //>>docs: http://api.jqueryui.com/bounce-effect/ //>>demos: http://jqueryui.com/effect/ var effectseffectbounce = $.effects.define( "bounce", function( options, done ) { var upanim, downanim, refvalue, element = $( this ), // defaults: mode = options.mode, hide = mode === "hide", show = mode === "show", direction = options.direction || "up", distance = options.distance, times = options.times || 5, // number of internal animations anims = times * 2 + ( show || hide ? 1 : 0 ), speed = options.duration / anims, easing = options.easing, // utility: ref = ( direction === "up" || direction === "down" ) ? "top" : "left", motion = ( direction === "up" || direction === "left" ), i = 0, queuelen = element.queue().length; $.effects.createplaceholder( element ); refvalue = element.css( ref ); // default distance for the biggest bounce is the outer distance / 3 if ( !distance ) { distance = element[ ref === "top" ? "outerheight" : "outerwidth" ]() / 3; } if ( show ) { downanim = { opacity: 1 }; downanim[ ref ] = refvalue; // if we are showing, force opacity 0 and set the initial position // then do the "first" animation element .css( "opacity", 0 ) .css( ref, motion ? -distance * 2 : distance * 2 ) .animate( downanim, speed, easing ); } // start at the smallest distance if we are hiding if ( hide ) { distance = distance / math.pow( 2, times - 1 ); } downanim = {}; downanim[ ref ] = refvalue; // bounces up/down/left/right then back to 0 -- times * 2 animations happen here for ( ; i < times; i++ ) { upanim = {}; upanim[ ref ] = ( motion ? "-=" : "+=" ) + distance; element .animate( upanim, speed, easing ) .animate( downanim, speed, easing ); distance = hide ? distance * 2 : distance / 2; } // last bounce when hiding if ( hide ) { upanim = { opacity: 0 }; upanim[ ref ] = ( motion ? "-=" : "+=" ) + distance; element.animate( upanim, speed, easing ); } element.queue( done ); $.effects.unshift( element, queuelen, anims + 1 ); } ); /*! * jquery ui effects clip 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: clip effect //>>group: effects //>>description: clips the element on and off like an old tv. //>>docs: http://api.jqueryui.com/clip-effect/ //>>demos: http://jqueryui.com/effect/ var effectseffectclip = $.effects.define( "clip", "hide", function( options, done ) { var start, animate = {}, element = $( this ), direction = options.direction || "vertical", both = direction === "both", horizontal = both || direction === "horizontal", vertical = both || direction === "vertical"; start = element.cssclip(); animate.clip = { top: vertical ? ( start.bottom - start.top ) / 2 : start.top, right: horizontal ? ( start.right - start.left ) / 2 : start.right, bottom: vertical ? ( start.bottom - start.top ) / 2 : start.bottom, left: horizontal ? ( start.right - start.left ) / 2 : start.left }; $.effects.createplaceholder( element ); if ( options.mode === "show" ) { element.cssclip( animate.clip ); animate.clip = start; } element.animate( animate, { queue: false, duration: options.duration, easing: options.easing, complete: done } ); } ); /*! * jquery ui effects drop 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: drop effect //>>group: effects //>>description: moves an element in one direction and hides it at the same time. //>>docs: http://api.jqueryui.com/drop-effect/ //>>demos: http://jqueryui.com/effect/ var effectseffectdrop = $.effects.define( "drop", "hide", function( options, done ) { var distance, element = $( this ), mode = options.mode, show = mode === "show", direction = options.direction || "left", ref = ( direction === "up" || direction === "down" ) ? "top" : "left", motion = ( direction === "up" || direction === "left" ) ? "-=" : "+=", oppositemotion = ( motion === "+=" ) ? "-=" : "+=", animation = { opacity: 0 }; $.effects.createplaceholder( element ); distance = options.distance || element[ ref === "top" ? "outerheight" : "outerwidth" ]( true ) / 2; animation[ ref ] = motion + distance; if ( show ) { element.css( animation ); animation[ ref ] = oppositemotion + distance; animation.opacity = 1; } // animate element.animate( animation, { queue: false, duration: options.duration, easing: options.easing, complete: done } ); } ); /*! * jquery ui effects explode 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: explode effect //>>group: effects // jscs:disable maximumlinelength //>>description: explodes an element in all directions into n pieces. implodes an element to its original wholeness. // jscs:enable maximumlinelength //>>docs: http://api.jqueryui.com/explode-effect/ //>>demos: http://jqueryui.com/effect/ var effectseffectexplode = $.effects.define( "explode", "hide", function( options, done ) { var i, j, left, top, mx, my, rows = options.pieces ? math.round( math.sqrt( options.pieces ) ) : 3, cells = rows, element = $( this ), mode = options.mode, show = mode === "show", // show and then visibility:hidden the element before calculating offset offset = element.show().css( "visibility", "hidden" ).offset(), // width and height of a piece width = math.ceil( element.outerwidth() / cells ), height = math.ceil( element.outerheight() / rows ), pieces = []; // children animate complete: function childcomplete() { pieces.push( this ); if ( pieces.length === rows * cells ) { animcomplete(); } } // clone the element for each row and cell. for ( i = 0; i < rows; i++ ) { // ===> top = offset.top + i * height; my = i - ( rows - 1 ) / 2; for ( j = 0; j < cells; j++ ) { // ||| left = offset.left + j * width; mx = j - ( cells - 1 ) / 2; // create a clone of the now hidden main element that will be absolute positioned // within a wrapper div off the -left and -top equal to size of our pieces element .clone() .appendto( "body" ) .wrap( "
" ) .css( { position: "absolute", visibility: "visible", left: -j * width, top: -i * height } ) // select the wrapper - make it overflow: hidden and absolute positioned based on // where the original was located +left and +top equal to the size of pieces .parent() .addclass( "ui-effects-explode" ) .css( { position: "absolute", overflow: "hidden", width: width, height: height, left: left + ( show ? mx * width : 0 ), top: top + ( show ? my * height : 0 ), opacity: show ? 0 : 1 } ) .animate( { left: left + ( show ? 0 : mx * width ), top: top + ( show ? 0 : my * height ), opacity: show ? 1 : 0 }, options.duration || 500, options.easing, childcomplete ); } } function animcomplete() { element.css( { visibility: "visible" } ); $( pieces ).remove(); done(); } } ); /*! * jquery ui effects fade 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: fade effect //>>group: effects //>>description: fades the element. //>>docs: http://api.jqueryui.com/fade-effect/ //>>demos: http://jqueryui.com/effect/ var effectseffectfade = $.effects.define( "fade", "toggle", function( options, done ) { var show = options.mode === "show"; $( this ) .css( "opacity", show ? 0 : 1 ) .animate( { opacity: show ? 1 : 0 }, { queue: false, duration: options.duration, easing: options.easing, complete: done } ); } ); /*! * jquery ui effects fold 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: fold effect //>>group: effects //>>description: folds an element first horizontally and then vertically. //>>docs: http://api.jqueryui.com/fold-effect/ //>>demos: http://jqueryui.com/effect/ var effectseffectfold = $.effects.define( "fold", "hide", function( options, done ) { // create element var element = $( this ), mode = options.mode, show = mode === "show", hide = mode === "hide", size = options.size || 15, percent = /([0-9]+)%/.exec( size ), horizfirst = !!options.horizfirst, ref = horizfirst ? [ "right", "bottom" ] : [ "bottom", "right" ], duration = options.duration / 2, placeholder = $.effects.createplaceholder( element ), start = element.cssclip(), animation1 = { clip: $.extend( {}, start ) }, animation2 = { clip: $.extend( {}, start ) }, distance = [ start[ ref[ 0 ] ], start[ ref[ 1 ] ] ], queuelen = element.queue().length; if ( percent ) { size = parseint( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ]; } animation1.clip[ ref[ 0 ] ] = size; animation2.clip[ ref[ 0 ] ] = size; animation2.clip[ ref[ 1 ] ] = 0; if ( show ) { element.cssclip( animation2.clip ); if ( placeholder ) { placeholder.css( $.effects.cliptobox( animation2 ) ); } animation2.clip = start; } // animate element .queue( function( next ) { if ( placeholder ) { placeholder .animate( $.effects.cliptobox( animation1 ), duration, options.easing ) .animate( $.effects.cliptobox( animation2 ), duration, options.easing ); } next(); } ) .animate( animation1, duration, options.easing ) .animate( animation2, duration, options.easing ) .queue( done ); $.effects.unshift( element, queuelen, 4 ); } ); /*! * jquery ui effects highlight 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: highlight effect //>>group: effects //>>description: highlights the background of an element in a defined color for a custom duration. //>>docs: http://api.jqueryui.com/highlight-effect/ //>>demos: http://jqueryui.com/effect/ var effectseffecthighlight = $.effects.define( "highlight", "show", function( options, done ) { var element = $( this ), animation = { backgroundcolor: element.css( "backgroundcolor" ) }; if ( options.mode === "hide" ) { animation.opacity = 0; } $.effects.savestyle( element ); element .css( { backgroundimage: "none", backgroundcolor: options.color || "#ffff99" } ) .animate( animation, { queue: false, duration: options.duration, easing: options.easing, complete: done } ); } ); /*! * jquery ui effects size 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: size effect //>>group: effects //>>description: resize an element to a specified width and height. //>>docs: http://api.jqueryui.com/size-effect/ //>>demos: http://jqueryui.com/effect/ var effectseffectsize = $.effects.define( "size", function( options, done ) { // create element var baseline, factor, temp, element = $( this ), // copy for children cprops = [ "fontsize" ], vprops = [ "bordertopwidth", "borderbottomwidth", "paddingtop", "paddingbottom" ], hprops = [ "borderleftwidth", "borderrightwidth", "paddingleft", "paddingright" ], // set options mode = options.mode, restore = mode !== "effect", scale = options.scale || "both", origin = options.origin || [ "middle", "center" ], position = element.css( "position" ), pos = element.position(), original = $.effects.scaleddimensions( element ), from = options.from || original, to = options.to || $.effects.scaleddimensions( element, 0 ); $.effects.createplaceholder( element ); if ( mode === "show" ) { temp = from; from = to; to = temp; } // set scaling factor factor = { from: { y: from.height / original.height, x: from.width / original.width }, to: { y: to.height / original.height, x: to.width / original.width } }; // scale the css box if ( scale === "box" || scale === "both" ) { // vertical props scaling if ( factor.from.y !== factor.to.y ) { from = $.effects.settransition( element, vprops, factor.from.y, from ); to = $.effects.settransition( element, vprops, factor.to.y, to ); } // horizontal props scaling if ( factor.from.x !== factor.to.x ) { from = $.effects.settransition( element, hprops, factor.from.x, from ); to = $.effects.settransition( element, hprops, factor.to.x, to ); } } // scale the content if ( scale === "content" || scale === "both" ) { // vertical props scaling if ( factor.from.y !== factor.to.y ) { from = $.effects.settransition( element, cprops, factor.from.y, from ); to = $.effects.settransition( element, cprops, factor.to.y, to ); } } // adjust the position properties based on the provided origin points if ( origin ) { baseline = $.effects.getbaseline( origin, original ); from.top = ( original.outerheight - from.outerheight ) * baseline.y + pos.top; from.left = ( original.outerwidth - from.outerwidth ) * baseline.x + pos.left; to.top = ( original.outerheight - to.outerheight ) * baseline.y + pos.top; to.left = ( original.outerwidth - to.outerwidth ) * baseline.x + pos.left; } element.css( from ); // animate the children if desired if ( scale === "content" || scale === "both" ) { vprops = vprops.concat( [ "margintop", "marginbottom" ] ).concat( cprops ); hprops = hprops.concat( [ "marginleft", "marginright" ] ); // only animate children with width attributes specified // todo: is this right? should we include anything with css width specified as well element.find( "*[width]" ).each( function() { var child = $( this ), childoriginal = $.effects.scaleddimensions( child ), childfrom = { height: childoriginal.height * factor.from.y, width: childoriginal.width * factor.from.x, outerheight: childoriginal.outerheight * factor.from.y, outerwidth: childoriginal.outerwidth * factor.from.x }, childto = { height: childoriginal.height * factor.to.y, width: childoriginal.width * factor.to.x, outerheight: childoriginal.height * factor.to.y, outerwidth: childoriginal.width * factor.to.x }; // vertical props scaling if ( factor.from.y !== factor.to.y ) { childfrom = $.effects.settransition( child, vprops, factor.from.y, childfrom ); childto = $.effects.settransition( child, vprops, factor.to.y, childto ); } // horizontal props scaling if ( factor.from.x !== factor.to.x ) { childfrom = $.effects.settransition( child, hprops, factor.from.x, childfrom ); childto = $.effects.settransition( child, hprops, factor.to.x, childto ); } if ( restore ) { $.effects.savestyle( child ); } // animate children child.css( childfrom ); child.animate( childto, options.duration, options.easing, function() { // restore children if ( restore ) { $.effects.restorestyle( child ); } } ); } ); } // animate element.animate( to, { queue: false, duration: options.duration, easing: options.easing, complete: function() { var offset = element.offset(); if ( to.opacity === 0 ) { element.css( "opacity", from.opacity ); } if ( !restore ) { element .css( "position", position === "static" ? "relative" : position ) .offset( offset ); // need to save style here so that automatic style restoration // doesn't restore to the original styles from before the animation. $.effects.savestyle( element ); } done(); } } ); } ); /*! * jquery ui effects scale 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: scale effect //>>group: effects //>>description: grows or shrinks an element and its content. //>>docs: http://api.jqueryui.com/scale-effect/ //>>demos: http://jqueryui.com/effect/ var effectseffectscale = $.effects.define( "scale", function( options, done ) { // create element var el = $( this ), mode = options.mode, percent = parseint( options.percent, 10 ) || ( parseint( options.percent, 10 ) === 0 ? 0 : ( mode !== "effect" ? 0 : 100 ) ), newoptions = $.extend( true, { from: $.effects.scaleddimensions( el ), to: $.effects.scaleddimensions( el, percent, options.direction || "both" ), origin: options.origin || [ "middle", "center" ] }, options ); // fade option to support puff if ( options.fade ) { newoptions.from.opacity = 1; newoptions.to.opacity = 0; } $.effects.effect.size.call( this, newoptions, done ); } ); /*! * jquery ui effects puff 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: puff effect //>>group: effects //>>description: creates a puff effect by scaling the element up and hiding it at the same time. //>>docs: http://api.jqueryui.com/puff-effect/ //>>demos: http://jqueryui.com/effect/ var effectseffectpuff = $.effects.define( "puff", "hide", function( options, done ) { var newoptions = $.extend( true, {}, options, { fade: true, percent: parseint( options.percent, 10 ) || 150 } ); $.effects.effect.scale.call( this, newoptions, done ); } ); /*! * jquery ui effects pulsate 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: pulsate effect //>>group: effects //>>description: pulsates an element n times by changing the opacity to zero and back. //>>docs: http://api.jqueryui.com/pulsate-effect/ //>>demos: http://jqueryui.com/effect/ var effectseffectpulsate = $.effects.define( "pulsate", "show", function( options, done ) { var element = $( this ), mode = options.mode, show = mode === "show", hide = mode === "hide", showhide = show || hide, // showing or hiding leaves off the "last" animation anims = ( ( options.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ), duration = options.duration / anims, animateto = 0, i = 1, queuelen = element.queue().length; if ( show || !element.is( ":visible" ) ) { element.css( "opacity", 0 ).show(); animateto = 1; } // anims - 1 opacity "toggles" for ( ; i < anims; i++ ) { element.animate( { opacity: animateto }, duration, options.easing ); animateto = 1 - animateto; } element.animate( { opacity: animateto }, duration, options.easing ); element.queue( done ); $.effects.unshift( element, queuelen, anims + 1 ); } ); /*! * jquery ui effects shake 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: shake effect //>>group: effects //>>description: shakes an element horizontally or vertically n times. //>>docs: http://api.jqueryui.com/shake-effect/ //>>demos: http://jqueryui.com/effect/ var effectseffectshake = $.effects.define( "shake", function( options, done ) { var i = 1, element = $( this ), direction = options.direction || "left", distance = options.distance || 20, times = options.times || 3, anims = times * 2 + 1, speed = math.round( options.duration / anims ), ref = ( direction === "up" || direction === "down" ) ? "top" : "left", positivemotion = ( direction === "up" || direction === "left" ), animation = {}, animation1 = {}, animation2 = {}, queuelen = element.queue().length; $.effects.createplaceholder( element ); // animation animation[ ref ] = ( positivemotion ? "-=" : "+=" ) + distance; animation1[ ref ] = ( positivemotion ? "+=" : "-=" ) + distance * 2; animation2[ ref ] = ( positivemotion ? "-=" : "+=" ) + distance * 2; // animate element.animate( animation, speed, options.easing ); // shakes for ( ; i < times; i++ ) { element .animate( animation1, speed, options.easing ) .animate( animation2, speed, options.easing ); } element .animate( animation1, speed, options.easing ) .animate( animation, speed / 2, options.easing ) .queue( done ); $.effects.unshift( element, queuelen, anims + 1 ); } ); /*! * jquery ui effects slide 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: slide effect //>>group: effects //>>description: slides an element in and out of the viewport. //>>docs: http://api.jqueryui.com/slide-effect/ //>>demos: http://jqueryui.com/effect/ var effectseffectslide = $.effects.define( "slide", "show", function( options, done ) { var startclip, startref, element = $( this ), map = { up: [ "bottom", "top" ], down: [ "top", "bottom" ], left: [ "right", "left" ], right: [ "left", "right" ] }, mode = options.mode, direction = options.direction || "left", ref = ( direction === "up" || direction === "down" ) ? "top" : "left", positivemotion = ( direction === "up" || direction === "left" ), distance = options.distance || element[ ref === "top" ? "outerheight" : "outerwidth" ]( true ), animation = {}; $.effects.createplaceholder( element ); startclip = element.cssclip(); startref = element.position()[ ref ]; // define hide animation animation[ ref ] = ( positivemotion ? -1 : 1 ) * distance + startref; animation.clip = element.cssclip(); animation.clip[ map[ direction ][ 1 ] ] = animation.clip[ map[ direction ][ 0 ] ]; // reverse the animation if we're showing if ( mode === "show" ) { element.cssclip( animation.clip ); element.css( ref, animation[ ref ] ); animation.clip = startclip; animation[ ref ] = startref; } // actually animate element.animate( animation, { queue: false, duration: options.duration, easing: options.easing, complete: done } ); } ); /*! * jquery ui effects transfer 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: transfer effect //>>group: effects //>>description: displays a transfer effect from one element to another. //>>docs: http://api.jqueryui.com/transfer-effect/ //>>demos: http://jqueryui.com/effect/ var effect; if ( $.uibackcompat !== false ) { effect = $.effects.define( "transfer", function( options, done ) { $( this ).transfer( options, done ); } ); } var effectseffecttransfer = effect; /*! * jquery ui focusable 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: :focusable selector //>>group: core //>>description: selects elements which can be focused. //>>docs: http://api.jqueryui.com/focusable-selector/ // selectors $.ui.focusable = function( element, hastabindex ) { var map, mapname, img, focusableifvisible, fieldset, nodename = element.nodename.tolowercase(); if ( "area" === nodename ) { map = element.parentnode; mapname = map.name; if ( !element.href || !mapname || map.nodename.tolowercase() !== "map" ) { return false; } img = $( "img[usemap='#" + mapname + "']" ); return img.length > 0 && img.is( ":visible" ); } if ( /^(input|select|textarea|button|object)$/.test( nodename ) ) { focusableifvisible = !element.disabled; if ( focusableifvisible ) { // form controls within a disabled fieldset are disabled. // however, controls within the fieldset's legend do not get disabled. // since controls generally aren't placed inside legends, we skip // this portion of the check. fieldset = $( element ).closest( "fieldset" )[ 0 ]; if ( fieldset ) { focusableifvisible = !fieldset.disabled; } } } else if ( "a" === nodename ) { focusableifvisible = element.href || hastabindex; } else { focusableifvisible = hastabindex; } return focusableifvisible && $( element ).is( ":visible" ) && visible( $( element ) ); }; // support: ie 8 only // ie 8 doesn't resolve inherit to visible/hidden for computed values function visible( element ) { var visibility = element.css( "visibility" ); while ( visibility === "inherit" ) { element = element.parent(); visibility = element.css( "visibility" ); } return visibility !== "hidden"; } $.extend( $.expr[ ":" ], { focusable: function( element ) { return $.ui.focusable( element, $.attr( element, "tabindex" ) != null ); } } ); var focusable = $.ui.focusable; // support: ie8 only // ie8 does not support the form attribute and when it is supplied. it overwrites the form prop // with a string, so we need to find the proper form. var form = $.fn.form = function() { return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form ); }; /*! * jquery ui form reset mixin 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: form reset mixin //>>group: core //>>description: refresh input widgets when their form is reset //>>docs: http://api.jqueryui.com/form-reset-mixin/ var formresetmixin = $.ui.formresetmixin = { _formresethandler: function() { var form = $( this ); // wait for the form reset to actually happen before refreshing settimeout( function() { var instances = form.data( "ui-form-reset-instances" ); $.each( instances, function() { this.refresh(); } ); } ); }, _bindformresethandler: function() { this.form = this.element.form(); if ( !this.form.length ) { return; } var instances = this.form.data( "ui-form-reset-instances" ) || []; if ( !instances.length ) { // we don't use _on() here because we use a single event handler per form this.form.on( "reset.ui-form-reset", this._formresethandler ); } instances.push( this ); this.form.data( "ui-form-reset-instances", instances ); }, _unbindformresethandler: function() { if ( !this.form.length ) { return; } var instances = this.form.data( "ui-form-reset-instances" ); instances.splice( $.inarray( this, instances ), 1 ); if ( instances.length ) { this.form.data( "ui-form-reset-instances", instances ); } else { this.form .removedata( "ui-form-reset-instances" ) .off( "reset.ui-form-reset" ); } } }; /*! * jquery ui support for jquery core 1.7.x 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license * */ //>>label: jquery 1.7 support //>>group: core //>>description: support version 1.7.x of jquery core // support: jquery 1.7 only // not a great way to check versions, but since we only support 1.7+ and only // need to detect <1.8, this is a simple check that should suffice. checking // for "1.7." would be a bit safer, but the version string is 1.7, not 1.7.0 // and we'll never reach 1.70.0 (if we do, we certainly won't be supporting // 1.7 anymore). see #11197 for why we're not using feature detection. if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) { // setters for .innerwidth(), .innerheight(), .outerwidth(), .outerheight() // unlike jquery core 1.8+, these only support numeric values to set the // dimensions in pixels $.each( [ "width", "height" ], function( i, name ) { var side = name === "width" ? [ "left", "right" ] : [ "top", "bottom" ], type = name.tolowercase(), orig = { innerwidth: $.fn.innerwidth, innerheight: $.fn.innerheight, outerwidth: $.fn.outerwidth, outerheight: $.fn.outerheight }; function reduce( elem, size, border, margin ) { $.each( side, function() { size -= parsefloat( $.css( elem, "padding" + this ) ) || 0; if ( border ) { size -= parsefloat( $.css( elem, "border" + this + "width" ) ) || 0; } if ( margin ) { size -= parsefloat( $.css( elem, "margin" + this ) ) || 0; } } ); return size; } $.fn[ "inner" + name ] = function( size ) { if ( size === undefined ) { return orig[ "inner" + name ].call( this ); } return this.each( function() { $( this ).css( type, reduce( this, size ) + "px" ); } ); }; $.fn[ "outer" + name ] = function( size, margin ) { if ( typeof size !== "number" ) { return orig[ "outer" + name ].call( this, size ); } return this.each( function() { $( this ).css( type, reduce( this, size, true, margin ) + "px" ); } ); }; } ); $.fn.addback = function( selector ) { return this.add( selector == null ? this.prevobject : this.prevobject.filter( selector ) ); }; } ; /*! * jquery ui keycode 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: keycode //>>group: core //>>description: provide keycodes as keynames //>>docs: http://api.jqueryui.com/jquery.ui.keycode/ var keycode = $.ui.keycode = { backspace: 8, comma: 188, delete: 46, down: 40, end: 35, enter: 13, escape: 27, home: 36, left: 37, page_down: 34, page_up: 33, period: 190, right: 39, space: 32, tab: 9, up: 38 }; // internal use only var escapeselector = $.ui.escapeselector = ( function() { var selectorescape = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g; return function( selector ) { return selector.replace( selectorescape, "\\$1" ); }; } )(); /*! * jquery ui labels 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: labels //>>group: core //>>description: find all the labels associated with a given input //>>docs: http://api.jqueryui.com/labels/ var labels = $.fn.labels = function() { var ancestor, selector, id, labels, ancestors; // check control.labels first if ( this[ 0 ].labels && this[ 0 ].labels.length ) { return this.pushstack( this[ 0 ].labels ); } // support: ie <= 11, ff <= 37, android <= 2.3 only // above browsers do not support control.labels. everything below is to support them // as well as document fragments. control.labels does not work on document fragments labels = this.eq( 0 ).parents( "label" ); // look for the label based on the id id = this.attr( "id" ); if ( id ) { // we don't search against the document in case the element // is disconnected from the dom ancestor = this.eq( 0 ).parents().last(); // get a full set of top level ancestors ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() ); // create a selector for the label based on the id selector = "label[for='" + $.ui.escapeselector( id ) + "']"; labels = labels.add( ancestors.find( selector ).addback( selector ) ); } // return whatever we have found for labels return this.pushstack( labels ); }; /*! * jquery ui scroll parent 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: scrollparent //>>group: core //>>description: get the closest ancestor element that is scrollable. //>>docs: http://api.jqueryui.com/scrollparent/ var scrollparent = $.fn.scrollparent = function( includehidden ) { var position = this.css( "position" ), excludestaticparent = position === "absolute", overflowregex = includehidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/, scrollparent = this.parents().filter( function() { var parent = $( this ); if ( excludestaticparent && parent.css( "position" ) === "static" ) { return false; } return overflowregex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) ); } ).eq( 0 ); return position === "fixed" || !scrollparent.length ? $( this[ 0 ].ownerdocument || document ) : scrollparent; }; /*! * jquery ui tabbable 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: :tabbable selector //>>group: core //>>description: selects elements which can be tabbed to. //>>docs: http://api.jqueryui.com/tabbable-selector/ var tabbable = $.extend( $.expr[ ":" ], { tabbable: function( element ) { var tabindex = $.attr( element, "tabindex" ), hastabindex = tabindex != null; return ( !hastabindex || tabindex >= 0 ) && $.ui.focusable( element, hastabindex ); } } ); /*! * jquery ui unique id 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: uniqueid //>>group: core //>>description: functions to generate and remove uniqueid's //>>docs: http://api.jqueryui.com/uniqueid/ var uniqueid = $.fn.extend( { uniqueid: ( function() { var uuid = 0; return function() { return this.each( function() { if ( !this.id ) { this.id = "ui-id-" + ( ++uuid ); } } ); }; } )(), removeuniqueid: function() { return this.each( function() { if ( /^ui-id-\d+$/.test( this.id ) ) { $( this ).removeattr( "id" ); } } ); } } ); /*! * jquery ui accordion 1.12.1 * http://jqueryui.com * * copyright jquery foundation and other contributors * released under the mit license. * http://jquery.org/license */ //>>label: accordion //>>group: widgets // jscs:disable maximumlinelength //>>description: displays collapsible content panels for presenting information in a limited amount of space. // jscs:enable maximumlinelength //>>docs: http://api.jqueryui.com/accordion/ //>>demos: http://jqueryui.com/accordion/ //>>css.structure: ../../themes/base/core.css //>>css.structure: ../../themes/base/accordion.css //>>css.theme: ../../themes/base/theme.css var widgetsaccordion = $.widget( "ui.accordion", { version: "1.12.1", options: { active: 0, animate: {}, classes: { "ui-accordion-header": "ui-corner-top", "ui-accordion-header-collapsed": "ui-corner-all", "ui-accordion-content": "ui-corner-bottom" }, collapsible: false, event: "click", header: "> li > :first-child, > :not(li):even", heightstyle: "auto", icons: { activeheader: "ui-icon-triangle-1-s", header: "ui-icon-triangle-1-e" }, // callbacks activate: null, beforeactivate: null }, hideprops: { bordertopwidth: "hide", borderbottomwidth: "hide", paddingtop: "hide", paddingbottom: "hide", height: "hide" }, showprops: { bordertopwidth: "show", borderbottomwidth: "show", paddingtop: "show", paddingbottom: "show", height: "show" }, _create: function() { var options = this.options; this.prevshow = this.prevhide = $(); this._addclass( "ui-accordion", "ui-widget ui-helper-reset" ); this.element.attr( "role", "tablist" ); // don't allow collapsible: false and active: false / null if ( !options.collapsible && ( options.active === false || options.active == null ) ) { options.active = 0; } this._processpanels(); // handle negative values if ( options.active < 0 ) { options.active += this.headers.length; } this._refresh(); }, _getcreateeventdata: function() { return { header: this.active, panel: !this.active.length ? $() : this.active.next() }; }, _createicons: function() { var icon, children, icons = this.options.icons; if ( icons ) { icon = $( "" ); this._addclass( icon, "ui-accordion-header-icon", "ui-icon " + icons.header ); icon.prependto( this.headers ); children = this.active.children( ".ui-accordion-header-icon" ); this._removeclass( children, icons.header ) ._addclass( children, null, icons.activeheader ) ._addclass( this.headers, "ui-accordion-icons" ); } }, _destroyicons: function() { this._removeclass( this.headers, "ui-accordion-icons" ); this.headers.children( ".ui-accordion-header-icon" ).remove(); }, _destroy: function() { var contents; // clean up main element this.element.removeattr( "role" ); // clean up headers this.headers .removeattr( "role aria-expanded aria-selected aria-controls tabindex" ) .removeuniqueid(); this._destroyicons(); // clean up content panels contents = this.headers.next() .css( "display", "" ) .removeattr( "role aria-hidden aria-labelledby" ) .removeuniqueid(); if ( this.options.heightstyle !== "content" ) { contents.css( "height", "" ); } }, _setoption: function( key, value ) { if ( key === "active" ) { // _activate() will handle invalid values and update this.options this._activate( value ); return; } if ( key === "event" ) { if ( this.options.event ) { this._off( this.headers, this.options.event ); } this._setupevents( value ); } this._super( key, value ); // setting collapsible: false while collapsed; open first panel if ( key === "collapsible" && !value && this.options.active === false ) { this._activate( 0 ); } if ( key === "icons" ) { this._destroyicons(); if ( value ) { this._createicons(); } } }, _setoptiondisabled: function( value ) { this._super( value ); this.element.attr( "aria-disabled", value ); // support: ie8 only // #5332 / #6059 - opacity doesn't cascade to positioned elements in ie // so we need to add the disabled class to the headers and panels this._toggleclass( null, "ui-state-disabled", !!value ); this._toggleclass( this.headers.add( this.headers.next() ), null, "ui-state-disabled", !!value ); }, _keydown: function( event ) { if ( event.altkey || event.ctrlkey ) { return; } var keycode = $.ui.keycode, length = this.headers.length, currentindex = this.headers.index( event.target ), tofocus = false; switch ( event.keycode ) { case keycode.right: case keycode.down: tofocus = this.headers[ ( currentindex + 1 ) % length ]; break; case keycode.left: case keycode.up: tofocus = this.headers[ ( currentindex - 1 + length ) % length ]; break; case keycode.space: case keycode.enter: this._eventhandler( event ); break; case keycode.home: tofocus = this.headers[ 0 ]; break; case keycode.end: tofocus = this.headers[ length - 1 ]; break; } if ( tofocus ) { $( event.target ).attr( "tabindex", -1 ); $( tofocus ).attr( "tabindex", 0 ); $( tofocus ).trigger( "focus" ); event.preventdefault(); } }, _panelkeydown: function( event ) { if ( event.keycode === $.ui.keycode.up && event.ctrlkey ) { $( event.currenttarget ).prev().trigger( "focus" ); } }, refresh: function() { var options = this.options; this._processpanels(); // was collapsed or no panel if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) { options.active = false; this.active = $(); // active false only when collapsible is true } else if ( options.active === false ) { this._activate( 0 ); // was active, but active panel is gone } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { // all remaining panel are disabled if ( this.headers.length === this.headers.find( ".ui-state-disabled" ).length ) { options.active = false; this.active = $(); // activate previous panel } else { this._activate( math.max( 0, options.active - 1 ) ); } // was active, active panel still exists } else { // make sure active index is correct options.active = this.headers.index( this.active ); } this._destroyicons(); this._refresh(); }, _processpanels: function() { var prevheaders = this.headers, prevpanels = this.panels; this.headers = this.element.find( this.options.header ); this._addclass( this.headers, "ui-accordion-header ui-accordion-header-collapsed", "ui-state-default" ); this.panels = this.headers.next().filter( ":not(.ui-accordion-content-active)" ).hide(); this._addclass( this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content" ); // avoid memory leaks (#10056) if ( prevpanels ) { this._off( prevheaders.not( this.headers ) ); this._off( prevpanels.not( this.panels ) ); } }, _refresh: function() { var maxheight, options = this.options, heightstyle = options.heightstyle, parent = this.element.parent(); this.active = this._findactive( options.active ); this._addclass( this.active, "ui-accordion-header-active", "ui-state-active" ) ._removeclass( this.active, "ui-accordion-header-collapsed" ); this._addclass( this.active.next(), "ui-accordion-content-active" ); this.active.next().show(); this.headers .attr( "role", "tab" ) .each( function() { var header = $( this ), headerid = header.uniqueid().attr( "id" ), panel = header.next(), panelid = panel.uniqueid().attr( "id" ); header.attr( "aria-controls", panelid ); panel.attr( "aria-labelledby", headerid ); } ) .next() .attr( "role", "tabpanel" ); this.headers .not( this.active ) .attr( { "aria-selected": "false", "aria-expanded": "false", tabindex: -1 } ) .next() .attr( { "aria-hidden": "true" } ) .hide(); // make sure at least one header is in the tab order if ( !this.active.length ) { this.headers.eq( 0 ).attr( "tabindex", 0 ); } else { this.active.attr( { "aria-selected": "true", "aria-expanded": "true", tabindex: 0 } ) .next() .attr( { "aria-hidden": "false" } ); } this._createicons(); this._setupevents( options.event ); if ( heightstyle === "fill" ) { maxheight = parent.height(); this.element.siblings( ":visible" ).each( function() { var elem = $( this ), position = elem.css( "position" ); if ( position === "absolute" || position === "fixed" ) { return; } maxheight -= elem.outerheight( true ); } ); this.headers.each( function() { maxheight -= $( this ).outerheight( true ); } ); this.headers.next() .each( function() { $( this ).height( math.max( 0, maxheight - $( this ).innerheight() + $( this ).height() ) ); } ) .css( "overflow", "auto" ); } else if ( heightstyle === "auto" ) { maxheight = 0; this.headers.next() .each( function() { var isvisible = $( this ).is( ":visible" ); if ( !isvisible ) { $( this ).show(); } maxheight = math.max( maxheight, $( this ).css( "height", "" ).height() ); if ( !isvisible ) { $( this ).hide(); } } ) .height( maxheight ); } }, _activate: function( index ) { var active = this._findactive( index )[ 0 ]; // trying to activate the already active panel if ( active === this.active[ 0 ] ) { return; } // trying to collapse, simulate a click on the currently active header active = active || this.active[ 0 ]; this._eventhandler( { target: active, currenttarget: active, preventdefault: $.noop } ); }, _findactive: function( selector ) { return typeof selector === "number" ? this.headers.eq( selector ) : $(); }, _setupevents: function( event ) { var events = { keydown: "_keydown" }; if ( event ) { $.each( event.split( " " ), function( index, eventname ) { events[ eventname ] = "_eventhandler"; } ); } this._off( this.headers.add( this.headers.next() ) ); this._on( this.headers, events ); this._on( this.headers.next(), { keydown: "_panelkeydown" } ); this._hoverable( this.headers ); this._focusable( this.headers ); }, _eventhandler: function( event ) { var activechildren, clickedchildren, options = this.options, active = this.active, clicked = $( event.currenttarget ), clickedisactive = clicked[ 0 ] === active[ 0 ], collapsing = clickedisactive && options.collapsible, toshow = collapsing ? $() : clicked.next(), tohide = active.next(), eventdata = { oldheader: active, oldpanel: tohide, newheader: collapsing ? $() : clicked, newpanel: toshow }; event.preventdefault(); if ( // click on active header, but not collapsible ( clickedisactive && !options.collapsible ) || // allow canceling activation ( this._trigger( "beforeactivate", event, eventdata ) === false ) ) { return; } options.active = collapsing ? false : this.headers.index( clicked ); // when the call to ._toggle() comes after the class changes // it causes a very odd bug in ie 8 (see #6720) this.active = clickedisactive ? $() : clicked; this._toggle( eventdata ); // switch classes // corner classes on the previously active header stay after the animation this._removeclass( active, "ui-accordion-header-active", "ui-state-active" ); if ( options.icons ) { activechildren = active.children( ".ui-accordion-header-icon" ); this._removeclass( activechildren, null, options.icons.activeheader ) ._addclass( activechildren, null, options.icons.header ); } if ( !clickedisactive ) { this._removeclass( clicked, "ui-accordion-header-collapsed" ) ._addclass( clicked, "ui-accordion-header-active", "ui-state-active" ); if ( options.icons ) { clickedchildren = clicked.children( ".ui-accordion-header-icon" ); this._removeclass( clickedchildren, null, options.icons.header ) ._addclass( clickedchildren, null, options.icons.activeheader ); } this._addclass( clicked.next(), "ui-accordion-content-active" ); } }, _toggle: function( data ) { var toshow = data.newpanel, tohide = this.prevshow.length ? this.prevshow : data.oldpanel; // handle activating a panel during the animation for another activation this.prevshow.add( this.prevhide ).stop( true, true ); this.prevshow = toshow; this.prevhide = tohide; if ( this.options.animate ) { this._animate( toshow, tohide, data ); } else { tohide.hide(); toshow.show(); this._togglecomplete( data ); } tohide.attr( { "aria-hidden": "true" } ); tohide.prev().attr( { "aria-selected": "false", "aria-expanded": "false" } ); // if we're switching panels, remove the old header from the tab order // if we're opening from collapsed state, remove the previous header from the tab order // if we're collapsing, then keep the collapsing header in the tab order if ( toshow.length && tohide.length ) { tohide.prev().attr( { "tabindex": -1, "aria-expanded": "false" } ); } else if ( toshow.length ) { this.headers.filter( function() { return parseint( $( this ).attr( "tabindex" ), 10 ) === 0; } ) .attr( "tabindex", -1 ); } toshow .attr( "aria-hidden", "false" ) .prev() .attr( { "aria-selected": "true", "aria-expanded": "true", tabindex: 0 } ); }, _animate: function( toshow, tohide, data ) { var total, easing, duration, that = this, adjust = 0, boxsizing = toshow.css( "box-sizing" ), down = toshow.length && ( !tohide.length || ( toshow.index() < tohide.index() ) ), animate = this.options.animate || {}, options = down && animate.down || animate, complete = function() { that._togglecomplete( data ); }; if ( typeof options === "number" ) { duration = options; } if ( typeof options === "string" ) { easing = options; } // fall back from options to animation in case of partial down settings easing = easing || options.easing || animate.easing; duration = duration || options.duration || animate.duration; if ( !tohide.length ) { return toshow.animate( this.showprops, duration, easing, complete ); } if ( !toshow.length ) { return tohide.animate( this.hideprops, duration, easing, complete ); } total = toshow.show().outerheight(); tohide.animate( this.hideprops, { duration: duration, easing: easing, step: function( now, fx ) { fx.now = math.round( now ); } } ); toshow .hide() .animate( this.showprops, { duration: duration, easing: easing, complete: complete, step: function( now, fx ) { fx.now = math.round( now ); if ( fx.prop !== "height" ) { if ( boxsizing === "content-box" ) { adjust += fx.now; } } else if ( that.options.heightstyle !== "content" ) { fx.now = math.round( total - tohide.outerheight() - adjust ); adjust = 0; } } } ); }, _togglecomplete: function( data ) { var tohide = data.oldpanel, prev = tohide.prev(); this._removeclass( tohide, "ui-accordion-content-active" ); this._removeclass( prev, "ui-accordion-header-active" ) ._addclass( prev, "ui-accordion-header-collapsed" ); // work around for rendering bug in ie (#5421) if ( tohide.length ) { tohide.parent()[ 0 ].classname = tohide.parent()[ 0 ].classname; } this._trigger( "activate", null, data ); } } ); var safeactiveelement = $.ui.safeactiveelement = function( document ) { var activeelement; // support: ie 9 only // ie9 throws an "unspecified error" accessing document.activeelement from an