/*!
* jquery migrate - v1.2.1
*/
(function( jquery, window, undefined ) {
// "use strict";
var warnedabout = {};
// list of warnings already given; public read only
jquery.migratewarnings = [];
// set to true to prevent console output; migratewarnings still maintained
// jquery.migratemute = false;
// show a message on the console so devs know we're active
if ( !jquery.migratemute && window.console && window.console.log ) {
window.console.log("jqmigrate: logging is active");
}
// set to false to disable traces that appear with warnings
if ( jquery.migratetrace === undefined ) {
jquery.migratetrace = true;
}
// forget any warnings we've already given; public
jquery.migratereset = function() {
warnedabout = {};
jquery.migratewarnings.length = 0;
};
function migratewarn( msg) {
var console = window.console;
if ( !warnedabout[ msg ] ) {
warnedabout[ msg ] = true;
jquery.migratewarnings.push( msg );
if ( console && console.warn && !jquery.migratemute ) {
//console.warn( "jqmigrate: " + msg );
if ( jquery.migratetrace && console.trace ) {
//console.trace();
}
}
}
}
function migratewarnprop( obj, prop, value, msg ) {
if ( object.defineproperty ) {
// on es5 browsers (non-oldie), warn if the code tries to get prop;
// allow property to be overwritten in case some other plugin wants it
try {
object.defineproperty( obj, prop, {
configurable: true,
enumerable: true,
get: function() {
migratewarn( msg );
return value;
},
set: function( newvalue ) {
migratewarn( msg );
value = newvalue;
}
});
return;
} catch( err ) {
// ie8 is a dope about object.defineproperty, can't warn there
}
}
// non-es5 (or broken) browser; just set the property
jquery._definepropertybroken = true;
obj[ prop ] = value;
}
if ( document.compatmode === "backcompat" ) {
// jquery has never supported or tested quirks mode
migratewarn( "jquery is not compatible with quirks mode" );
}
var attrfn = jquery( "", { size: 1 } ).attr("size") && jquery.attrfn,
oldattr = jquery.attr,
valueattrget = jquery.attrhooks.value && jquery.attrhooks.value.get ||
function() { return null; },
valueattrset = jquery.attrhooks.value && jquery.attrhooks.value.set ||
function() { return undefined; },
rnotype = /^(?:input|button)$/i,
rnoattrnodetype = /^[238]$/,
rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
rusedefault = /^(?:checked|selected)$/i;
// jquery.attrfn
migratewarnprop( jquery, "attrfn", attrfn || {}, "jquery.attrfn is deprecated" );
jquery.attr = function( elem, name, value, pass ) {
var lowername = name.tolowercase(),
ntype = elem && elem.nodetype;
if ( pass ) {
// since pass is used internally, we only warn for new jquery
// versions where there isn't a pass arg in the formal params
if ( oldattr.length < 4 ) {
migratewarn("jquery.fn.attr( props, pass ) is deprecated");
}
if ( elem && !rnoattrnodetype.test( ntype ) &&
(attrfn ? name in attrfn : jquery.isfunction(jquery.fn[name])) ) {
return jquery( elem )[ name ]( value );
}
}
// warn if user tries to set `type`, since it breaks on ie 6/7/8; by checking
// for disconnected elements we don't warn on $( "