'+a.addText+" "),m=b.find("tr:last a")):(d.filter(":last").after('"),m=d.filter(":last").next().find("a")));m.click(function(b){b.preventDefault();b=c("#"+a.prefix+"-empty");
+var f=b.clone(!0);f.removeClass(a.emptyCssClass).addClass(a.formCssClass).attr("id",a.prefix+"-"+l);f.is("tr")?f.children(":last").append('"):f.is("ul")||f.is("ol")?f.append(''+a.deleteText+" "):f.children(":first").append(''+a.deleteText+" ");f.find("*").each(function(){k(this,a.prefix,e.val())});f.insertBefore(c(b));
+c(e).val(parseInt(e.val(),10)+1);l+=1;""!==g.val()&&0>=g.val()-e.val()&&m.parent().hide();f.find("a."+a.deleteCssClass).click(function(b){b.preventDefault();f.remove();--l;a.removed&&a.removed(f);c(document).trigger("formset:removed",[f,a.prefix]);b=c("."+a.formCssClass);c("#id_"+a.prefix+"-TOTAL_FORMS").val(b.length);(""===g.val()||0 0) {
+ values.push(field.val());
+ }
+ });
+ prepopulatedField.val(URLify(values.join(' '), maxLength, allowUnicode));
+ };
+
+ prepopulatedField.data('_changed', false);
+ prepopulatedField.change(function() {
+ prepopulatedField.data('_changed', true);
+ });
+
+ if (!prepopulatedField.val()) {
+ $(dependencies.join(',')).keyup(populate).change(populate).focus(populate);
+ }
+ });
+ };
+})(django.jQuery);
diff --git a/assets/admin/js/prepopulate.min.js b/assets/admin/js/prepopulate.min.js
new file mode 100644
index 0000000000000000000000000000000000000000..75f3c17aa98b1ee8b37e840ee7cc71a7aee54a66
--- /dev/null
+++ b/assets/admin/js/prepopulate.min.js
@@ -0,0 +1 @@
+(function(c){c.fn.prepopulate=function(e,f,g){return this.each(function(){var a=c(this),b=function(){if(!a.data("_changed")){var b=[];c.each(e,function(a,d){d=c(d);0= 0 && j < len ? [ this[ j ] ] : [] );
+ },
+
+ end: function() {
+ return this.prevObject || this.constructor();
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: push,
+ sort: arr.sort,
+ splice: arr.splice
+};
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[ 0 ] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+
+ // Skip the boolean and the target
+ target = arguments[ i ] || {};
+ i++;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
+ target = {};
+ }
+
+ // Extend jQuery itself if only one argument is passed
+ if ( i === length ) {
+ target = this;
+ i--;
+ }
+
+ for ( ; i < length; i++ ) {
+
+ // Only deal with non-null/undefined values
+ if ( ( options = arguments[ i ] ) != null ) {
+
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
+ ( copyIsArray = jQuery.isArray( copy ) ) ) ) {
+
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray( src ) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject( src ) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend( {
+
+ // Unique for each copy of jQuery on the page
+ expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
+
+ // Assume jQuery is ready without the ready module
+ isReady: true,
+
+ error: function( msg ) {
+ throw new Error( msg );
+ },
+
+ noop: function() {},
+
+ isFunction: function( obj ) {
+ return jQuery.type( obj ) === "function";
+ },
+
+ isArray: Array.isArray,
+
+ isWindow: function( obj ) {
+ return obj != null && obj === obj.window;
+ },
+
+ isNumeric: function( obj ) {
+
+ // parseFloat NaNs numeric-cast false positives (null|true|false|"")
+ // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
+ // subtraction forces infinities to NaN
+ // adding 1 corrects loss of precision from parseFloat (#15100)
+ var realStringObj = obj && obj.toString();
+ return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;
+ },
+
+ isPlainObject: function( obj ) {
+ var key;
+
+ // Not plain objects:
+ // - Any object or value whose internal [[Class]] property is not "[object Object]"
+ // - DOM nodes
+ // - window
+ if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ // Not own constructor property must be Object
+ if ( obj.constructor &&
+ !hasOwn.call( obj, "constructor" ) &&
+ !hasOwn.call( obj.constructor.prototype || {}, "isPrototypeOf" ) ) {
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own
+ for ( key in obj ) {}
+
+ return key === undefined || hasOwn.call( obj, key );
+ },
+
+ isEmptyObject: function( obj ) {
+ var name;
+ for ( name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ type: function( obj ) {
+ if ( obj == null ) {
+ return obj + "";
+ }
+
+ // Support: Android<4.0, iOS<6 (functionish RegExp)
+ return typeof obj === "object" || typeof obj === "function" ?
+ class2type[ toString.call( obj ) ] || "object" :
+ typeof obj;
+ },
+
+ // Evaluates a script in a global context
+ globalEval: function( code ) {
+ var script,
+ indirect = eval;
+
+ code = jQuery.trim( code );
+
+ if ( code ) {
+
+ // If the code includes a valid, prologue position
+ // strict mode pragma, execute code by injecting a
+ // script tag into the document.
+ if ( code.indexOf( "use strict" ) === 1 ) {
+ script = document.createElement( "script" );
+ script.text = code;
+ document.head.appendChild( script ).parentNode.removeChild( script );
+ } else {
+
+ // Otherwise, avoid the DOM node creation, insertion
+ // and removal by using an indirect global eval
+
+ indirect( code );
+ }
+ }
+ },
+
+ // Convert dashed to camelCase; used by the css and data modules
+ // Support: IE9-11+
+ // Microsoft forgot to hump their vendor prefix (#9572)
+ camelCase: function( string ) {
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+ },
+
+ each: function( obj, callback ) {
+ var length, i = 0;
+
+ if ( isArrayLike( obj ) ) {
+ length = obj.length;
+ for ( ; i < length; i++ ) {
+ if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
+ break;
+ }
+ }
+ }
+
+ return obj;
+ },
+
+ // Support: Android<4.1
+ trim: function( text ) {
+ return text == null ?
+ "" :
+ ( text + "" ).replace( rtrim, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( arr, results ) {
+ var ret = results || [];
+
+ if ( arr != null ) {
+ if ( isArrayLike( Object( arr ) ) ) {
+ jQuery.merge( ret,
+ typeof arr === "string" ?
+ [ arr ] : arr
+ );
+ } else {
+ push.call( ret, arr );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, arr, i ) {
+ return arr == null ? -1 : indexOf.call( arr, elem, i );
+ },
+
+ merge: function( first, second ) {
+ var len = +second.length,
+ j = 0,
+ i = first.length;
+
+ for ( ; j < len; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, invert ) {
+ var callbackInverse,
+ matches = [],
+ i = 0,
+ length = elems.length,
+ callbackExpect = !invert;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( ; i < length; i++ ) {
+ callbackInverse = !callback( elems[ i ], i );
+ if ( callbackInverse !== callbackExpect ) {
+ matches.push( elems[ i ] );
+ }
+ }
+
+ return matches;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var length, value,
+ i = 0,
+ ret = [];
+
+ // Go through the array, translating each of the items to their new values
+ if ( isArrayLike( elems ) ) {
+ length = elems.length;
+ for ( ; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret.push( value );
+ }
+ }
+
+ // Go through every key on the object,
+ } else {
+ for ( i in elems ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret.push( value );
+ }
+ }
+ }
+
+ // Flatten any nested arrays
+ return concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ // Bind a function to a context, optionally partially applying any
+ // arguments.
+ proxy: function( fn, context ) {
+ var tmp, args, proxy;
+
+ if ( typeof context === "string" ) {
+ tmp = fn[ context ];
+ context = fn;
+ fn = tmp;
+ }
+
+ // Quick check to determine if target is callable, in the spec
+ // this throws a TypeError, but we will just return undefined.
+ if ( !jQuery.isFunction( fn ) ) {
+ return undefined;
+ }
+
+ // Simulated bind
+ args = slice.call( arguments, 2 );
+ proxy = function() {
+ return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
+ };
+
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+ return proxy;
+ },
+
+ now: Date.now,
+
+ // jQuery.support is not used in Core but other projects attach their
+ // properties to it so it needs to exist.
+ support: support
+} );
+
+// JSHint would error on this code due to the Symbol not being defined in ES5.
+// Defining this global in .jshintrc would create a danger of using the global
+// unguarded in another place, it seems safer to just disable JSHint for these
+// three lines.
+/* jshint ignore: start */
+if ( typeof Symbol === "function" ) {
+ jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
+}
+/* jshint ignore: end */
+
+// Populate the class2type map
+jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
+function( i, name ) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+} );
+
+function isArrayLike( obj ) {
+
+ // Support: iOS 8.2 (not reproducible in simulator)
+ // `in` check used to prevent JIT error (gh-2145)
+ // hasOwn isn't used here due to false negatives
+ // regarding Nodelist length in IE
+ var length = !!obj && "length" in obj && obj.length,
+ type = jQuery.type( obj );
+
+ if ( type === "function" || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ return type === "array" || length === 0 ||
+ typeof length === "number" && length > 0 && ( length - 1 ) in obj;
+}
+var Sizzle =
+/*!
+ * Sizzle CSS Selector Engine v2.2.1
+ * http://sizzlejs.com/
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2015-10-17
+ */
+(function( window ) {
+
+var i,
+ support,
+ Expr,
+ getText,
+ isXML,
+ tokenize,
+ compile,
+ select,
+ outermostContext,
+ sortInput,
+ hasDuplicate,
+
+ // Local document vars
+ setDocument,
+ document,
+ docElem,
+ documentIsHTML,
+ rbuggyQSA,
+ rbuggyMatches,
+ matches,
+ contains,
+
+ // Instance-specific data
+ expando = "sizzle" + 1 * new Date(),
+ preferredDoc = window.document,
+ dirruns = 0,
+ done = 0,
+ classCache = createCache(),
+ tokenCache = createCache(),
+ compilerCache = createCache(),
+ sortOrder = function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ }
+ return 0;
+ },
+
+ // General-purpose constants
+ MAX_NEGATIVE = 1 << 31,
+
+ // Instance methods
+ hasOwn = ({}).hasOwnProperty,
+ arr = [],
+ pop = arr.pop,
+ push_native = arr.push,
+ push = arr.push,
+ slice = arr.slice,
+ // Use a stripped-down indexOf as it's faster than native
+ // http://jsperf.com/thor-indexof-vs-for/5
+ indexOf = function( list, elem ) {
+ var i = 0,
+ len = list.length;
+ for ( ; i < len; i++ ) {
+ if ( list[i] === elem ) {
+ return i;
+ }
+ }
+ return -1;
+ },
+
+ booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
+
+ // Regular expressions
+
+ // http://www.w3.org/TR/css3-selectors/#whitespace
+ whitespace = "[\\x20\\t\\r\\n\\f]",
+
+ // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+ identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
+
+ // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
+ attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
+ // Operator (capture 2)
+ "*([*^$|!~]?=)" + whitespace +
+ // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
+ "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
+ "*\\]",
+
+ pseudos = ":(" + identifier + ")(?:\\((" +
+ // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
+ // 1. quoted (capture 3; capture 4 or capture 5)
+ "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
+ // 2. simple (capture 6)
+ "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
+ // 3. anything else (capture 2)
+ ".*" +
+ ")\\)|)",
+
+ // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+ rwhitespace = new RegExp( whitespace + "+", "g" ),
+ rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+ rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+ rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
+
+ rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
+
+ rpseudo = new RegExp( pseudos ),
+ ridentifier = new RegExp( "^" + identifier + "$" ),
+
+ matchExpr = {
+ "ID": new RegExp( "^#(" + identifier + ")" ),
+ "CLASS": new RegExp( "^\\.(" + identifier + ")" ),
+ "TAG": new RegExp( "^(" + identifier + "|[*])" ),
+ "ATTR": new RegExp( "^" + attributes ),
+ "PSEUDO": new RegExp( "^" + pseudos ),
+ "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
+ "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+ "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+ "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
+ // For use in libraries implementing .is()
+ // We use this for POS matching in `select`
+ "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+ whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+ },
+
+ rinputs = /^(?:input|select|textarea|button)$/i,
+ rheader = /^h\d$/i,
+
+ rnative = /^[^{]+\{\s*\[native \w/,
+
+ // Easily-parseable/retrievable ID or TAG or CLASS selectors
+ rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+ rsibling = /[+~]/,
+ rescape = /'|\\/g,
+
+ // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+ runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
+ funescape = function( _, escaped, escapedWhitespace ) {
+ var high = "0x" + escaped - 0x10000;
+ // NaN means non-codepoint
+ // Support: Firefox<24
+ // Workaround erroneous numeric interpretation of +"0x"
+ return high !== high || escapedWhitespace ?
+ escaped :
+ high < 0 ?
+ // BMP codepoint
+ String.fromCharCode( high + 0x10000 ) :
+ // Supplemental Plane codepoint (surrogate pair)
+ String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+ },
+
+ // Used for iframes
+ // See setDocument()
+ // Removing the function wrapper causes a "Permission Denied"
+ // error in IE
+ unloadHandler = function() {
+ setDocument();
+ };
+
+// Optimize for push.apply( _, NodeList )
+try {
+ push.apply(
+ (arr = slice.call( preferredDoc.childNodes )),
+ preferredDoc.childNodes
+ );
+ // Support: Android<4.0
+ // Detect silently failing push.apply
+ arr[ preferredDoc.childNodes.length ].nodeType;
+} catch ( e ) {
+ push = { apply: arr.length ?
+
+ // Leverage slice if possible
+ function( target, els ) {
+ push_native.apply( target, slice.call(els) );
+ } :
+
+ // Support: IE<9
+ // Otherwise append directly
+ function( target, els ) {
+ var j = target.length,
+ i = 0;
+ // Can't trust NodeList.length
+ while ( (target[j++] = els[i++]) ) {}
+ target.length = j - 1;
+ }
+ };
+}
+
+function Sizzle( selector, context, results, seed ) {
+ var m, i, elem, nid, nidselect, match, groups, newSelector,
+ newContext = context && context.ownerDocument,
+
+ // nodeType defaults to 9, since context defaults to document
+ nodeType = context ? context.nodeType : 9;
+
+ results = results || [];
+
+ // Return early from calls with invalid selector or context
+ if ( typeof selector !== "string" || !selector ||
+ nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
+
+ return results;
+ }
+
+ // Try to shortcut find operations (as opposed to filters) in HTML documents
+ if ( !seed ) {
+
+ if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
+ setDocument( context );
+ }
+ context = context || document;
+
+ if ( documentIsHTML ) {
+
+ // If the selector is sufficiently simple, try using a "get*By*" DOM method
+ // (excepting DocumentFragment context, where the methods don't exist)
+ if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
+
+ // ID selector
+ if ( (m = match[1]) ) {
+
+ // Document context
+ if ( nodeType === 9 ) {
+ if ( (elem = context.getElementById( m )) ) {
+
+ // Support: IE, Opera, Webkit
+ // TODO: identify versions
+ // getElementById can match elements by name instead of ID
+ if ( elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ } else {
+ return results;
+ }
+
+ // Element context
+ } else {
+
+ // Support: IE, Opera, Webkit
+ // TODO: identify versions
+ // getElementById can match elements by name instead of ID
+ if ( newContext && (elem = newContext.getElementById( m )) &&
+ contains( context, elem ) &&
+ elem.id === m ) {
+
+ results.push( elem );
+ return results;
+ }
+ }
+
+ // Type selector
+ } else if ( match[2] ) {
+ push.apply( results, context.getElementsByTagName( selector ) );
+ return results;
+
+ // Class selector
+ } else if ( (m = match[3]) && support.getElementsByClassName &&
+ context.getElementsByClassName ) {
+
+ push.apply( results, context.getElementsByClassName( m ) );
+ return results;
+ }
+ }
+
+ // Take advantage of querySelectorAll
+ if ( support.qsa &&
+ !compilerCache[ selector + " " ] &&
+ (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
+
+ if ( nodeType !== 1 ) {
+ newContext = context;
+ newSelector = selector;
+
+ // qSA looks outside Element context, which is not what we want
+ // Thanks to Andrew Dupont for this workaround technique
+ // Support: IE <=8
+ // Exclude object elements
+ } else if ( context.nodeName.toLowerCase() !== "object" ) {
+
+ // Capture the context ID, setting it first if necessary
+ if ( (nid = context.getAttribute( "id" )) ) {
+ nid = nid.replace( rescape, "\\$&" );
+ } else {
+ context.setAttribute( "id", (nid = expando) );
+ }
+
+ // Prefix every selector in the list
+ groups = tokenize( selector );
+ i = groups.length;
+ nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']";
+ while ( i-- ) {
+ groups[i] = nidselect + " " + toSelector( groups[i] );
+ }
+ newSelector = groups.join( "," );
+
+ // Expand context for sibling selectors
+ newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
+ context;
+ }
+
+ if ( newSelector ) {
+ try {
+ push.apply( results,
+ newContext.querySelectorAll( newSelector )
+ );
+ return results;
+ } catch ( qsaError ) {
+ } finally {
+ if ( nid === expando ) {
+ context.removeAttribute( "id" );
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // All others
+ return select( selector.replace( rtrim, "$1" ), context, results, seed );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {function(string, object)} Returns the Object data after storing it on itself with
+ * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ * deleting the oldest entry
+ */
+function createCache() {
+ var keys = [];
+
+ function cache( key, value ) {
+ // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+ if ( keys.push( key + " " ) > Expr.cacheLength ) {
+ // Only keep the most recent entries
+ delete cache[ keys.shift() ];
+ }
+ return (cache[ key + " " ] = value);
+ }
+ return cache;
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+ fn[ expando ] = true;
+ return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created div and expects a boolean result
+ */
+function assert( fn ) {
+ var div = document.createElement("div");
+
+ try {
+ return !!fn( div );
+ } catch (e) {
+ return false;
+ } finally {
+ // Remove from its parent by default
+ if ( div.parentNode ) {
+ div.parentNode.removeChild( div );
+ }
+ // release memory in IE
+ div = null;
+ }
+}
+
+/**
+ * Adds the same handler for all of the specified attrs
+ * @param {String} attrs Pipe-separated list of attributes
+ * @param {Function} handler The method that will be applied
+ */
+function addHandle( attrs, handler ) {
+ var arr = attrs.split("|"),
+ i = arr.length;
+
+ while ( i-- ) {
+ Expr.attrHandle[ arr[i] ] = handler;
+ }
+}
+
+/**
+ * Checks document order of two siblings
+ * @param {Element} a
+ * @param {Element} b
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
+ */
+function siblingCheck( a, b ) {
+ var cur = b && a,
+ diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
+ ( ~b.sourceIndex || MAX_NEGATIVE ) -
+ ( ~a.sourceIndex || MAX_NEGATIVE );
+
+ // Use IE sourceIndex if available on both nodes
+ if ( diff ) {
+ return diff;
+ }
+
+ // Check if b follows a
+ if ( cur ) {
+ while ( (cur = cur.nextSibling) ) {
+ if ( cur === b ) {
+ return -1;
+ }
+ }
+ }
+
+ return a ? 1 : -1;
+}
+
+/**
+ * Returns a function to use in pseudos for input types
+ * @param {String} type
+ */
+function createInputPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for buttons
+ * @param {String} type
+ */
+function createButtonPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for positionals
+ * @param {Function} fn
+ */
+function createPositionalPseudo( fn ) {
+ return markFunction(function( argument ) {
+ argument = +argument;
+ return markFunction(function( seed, matches ) {
+ var j,
+ matchIndexes = fn( [], seed.length, argument ),
+ i = matchIndexes.length;
+
+ // Match elements found at the specified indexes
+ while ( i-- ) {
+ if ( seed[ (j = matchIndexes[i]) ] ) {
+ seed[j] = !(matches[j] = seed[j]);
+ }
+ }
+ });
+ });
+}
+
+/**
+ * Checks a node for validity as a Sizzle context
+ * @param {Element|Object=} context
+ * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
+ */
+function testContext( context ) {
+ return context && typeof context.getElementsByTagName !== "undefined" && context;
+}
+
+// Expose support vars for convenience
+support = Sizzle.support = {};
+
+/**
+ * Detects XML nodes
+ * @param {Element|Object} elem An element or a document
+ * @returns {Boolean} True iff elem is a non-HTML XML node
+ */
+isXML = Sizzle.isXML = function( elem ) {
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+setDocument = Sizzle.setDocument = function( node ) {
+ var hasCompare, parent,
+ doc = node ? node.ownerDocument || node : preferredDoc;
+
+ // Return early if doc is invalid or already selected
+ if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+ return document;
+ }
+
+ // Update global variables
+ document = doc;
+ docElem = document.documentElement;
+ documentIsHTML = !isXML( document );
+
+ // Support: IE 9-11, Edge
+ // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
+ if ( (parent = document.defaultView) && parent.top !== parent ) {
+ // Support: IE 11
+ if ( parent.addEventListener ) {
+ parent.addEventListener( "unload", unloadHandler, false );
+
+ // Support: IE 9 - 10 only
+ } else if ( parent.attachEvent ) {
+ parent.attachEvent( "onunload", unloadHandler );
+ }
+ }
+
+ /* Attributes
+ ---------------------------------------------------------------------- */
+
+ // Support: IE<8
+ // Verify that getAttribute really returns attributes and not properties
+ // (excepting IE8 booleans)
+ support.attributes = assert(function( div ) {
+ div.className = "i";
+ return !div.getAttribute("className");
+ });
+
+ /* getElement(s)By*
+ ---------------------------------------------------------------------- */
+
+ // Check if getElementsByTagName("*") returns only elements
+ support.getElementsByTagName = assert(function( div ) {
+ div.appendChild( document.createComment("") );
+ return !div.getElementsByTagName("*").length;
+ });
+
+ // Support: IE<9
+ support.getElementsByClassName = rnative.test( document.getElementsByClassName );
+
+ // Support: IE<10
+ // Check if getElementById returns elements by name
+ // The broken getElementById methods don't pick up programatically-set names,
+ // so use a roundabout getElementsByName test
+ support.getById = assert(function( div ) {
+ docElem.appendChild( div ).id = expando;
+ return !document.getElementsByName || !document.getElementsByName( expando ).length;
+ });
+
+ // ID find and filter
+ if ( support.getById ) {
+ Expr.find["ID"] = function( id, context ) {
+ if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
+ var m = context.getElementById( id );
+ return m ? [ m ] : [];
+ }
+ };
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ return elem.getAttribute("id") === attrId;
+ };
+ };
+ } else {
+ // Support: IE6/7
+ // getElementById is not reliable as a find shortcut
+ delete Expr.find["ID"];
+
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ var node = typeof elem.getAttributeNode !== "undefined" &&
+ elem.getAttributeNode("id");
+ return node && node.value === attrId;
+ };
+ };
+ }
+
+ // Tag
+ Expr.find["TAG"] = support.getElementsByTagName ?
+ function( tag, context ) {
+ if ( typeof context.getElementsByTagName !== "undefined" ) {
+ return context.getElementsByTagName( tag );
+
+ // DocumentFragment nodes don't have gEBTN
+ } else if ( support.qsa ) {
+ return context.querySelectorAll( tag );
+ }
+ } :
+
+ function( tag, context ) {
+ var elem,
+ tmp = [],
+ i = 0,
+ // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
+ results = context.getElementsByTagName( tag );
+
+ // Filter out possible comments
+ if ( tag === "*" ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem.nodeType === 1 ) {
+ tmp.push( elem );
+ }
+ }
+
+ return tmp;
+ }
+ return results;
+ };
+
+ // Class
+ Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
+ if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
+ return context.getElementsByClassName( className );
+ }
+ };
+
+ /* QSA/matchesSelector
+ ---------------------------------------------------------------------- */
+
+ // QSA and matchesSelector support
+
+ // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+ rbuggyMatches = [];
+
+ // qSa(:focus) reports false when true (Chrome 21)
+ // We allow this because of a bug in IE8/9 that throws an error
+ // whenever `document.activeElement` is accessed on an iframe
+ // So, we allow :focus to pass through QSA all the time to avoid the IE error
+ // See http://bugs.jquery.com/ticket/13378
+ rbuggyQSA = [];
+
+ if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
+ // Build QSA regex
+ // Regex strategy adopted from Diego Perini
+ assert(function( div ) {
+ // Select is set to empty string on purpose
+ // This is to test IE's treatment of not explicitly
+ // setting a boolean content attribute,
+ // since its presence should be enough
+ // http://bugs.jquery.com/ticket/12359
+ docElem.appendChild( div ).innerHTML = " " +
+ "" +
+ " ";
+
+ // Support: IE8, Opera 11-12.16
+ // Nothing should be selected when empty strings follow ^= or $= or *=
+ // The test attribute must be unknown in Opera but "safe" for WinRT
+ // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
+ if ( div.querySelectorAll("[msallowcapture^='']").length ) {
+ rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
+ }
+
+ // Support: IE8
+ // Boolean attributes and "value" are not treated correctly
+ if ( !div.querySelectorAll("[selected]").length ) {
+ rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
+ }
+
+ // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
+ if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
+ rbuggyQSA.push("~=");
+ }
+
+ // Webkit/Opera - :checked should return selected option elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":checked").length ) {
+ rbuggyQSA.push(":checked");
+ }
+
+ // Support: Safari 8+, iOS 8+
+ // https://bugs.webkit.org/show_bug.cgi?id=136851
+ // In-page `selector#id sibing-combinator selector` fails
+ if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {
+ rbuggyQSA.push(".#.+[+~]");
+ }
+ });
+
+ assert(function( div ) {
+ // Support: Windows 8 Native Apps
+ // The type and name attributes are restricted during .innerHTML assignment
+ var input = document.createElement("input");
+ input.setAttribute( "type", "hidden" );
+ div.appendChild( input ).setAttribute( "name", "D" );
+
+ // Support: IE8
+ // Enforce case-sensitivity of name attribute
+ if ( div.querySelectorAll("[name=d]").length ) {
+ rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
+ }
+
+ // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":enabled").length ) {
+ rbuggyQSA.push( ":enabled", ":disabled" );
+ }
+
+ // Opera 10-11 does not throw on post-comma invalid pseudos
+ div.querySelectorAll("*,:x");
+ rbuggyQSA.push(",.*:");
+ });
+ }
+
+ if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
+ docElem.webkitMatchesSelector ||
+ docElem.mozMatchesSelector ||
+ docElem.oMatchesSelector ||
+ docElem.msMatchesSelector) )) ) {
+
+ assert(function( div ) {
+ // Check to see if it's possible to do matchesSelector
+ // on a disconnected node (IE 9)
+ support.disconnectedMatch = matches.call( div, "div" );
+
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ matches.call( div, "[s!='']:x" );
+ rbuggyMatches.push( "!=", pseudos );
+ });
+ }
+
+ rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
+ rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
+
+ /* Contains
+ ---------------------------------------------------------------------- */
+ hasCompare = rnative.test( docElem.compareDocumentPosition );
+
+ // Element contains another
+ // Purposefully self-exclusive
+ // As in, an element does not contain itself
+ contains = hasCompare || rnative.test( docElem.contains ) ?
+ function( a, b ) {
+ var adown = a.nodeType === 9 ? a.documentElement : a,
+ bup = b && b.parentNode;
+ return a === bup || !!( bup && bup.nodeType === 1 && (
+ adown.contains ?
+ adown.contains( bup ) :
+ a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+ ));
+ } :
+ function( a, b ) {
+ if ( b ) {
+ while ( (b = b.parentNode) ) {
+ if ( b === a ) {
+ return true;
+ }
+ }
+ }
+ return false;
+ };
+
+ /* Sorting
+ ---------------------------------------------------------------------- */
+
+ // Document order sorting
+ sortOrder = hasCompare ?
+ function( a, b ) {
+
+ // Flag for duplicate removal
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ // Sort on method existence if only one input has compareDocumentPosition
+ var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
+ if ( compare ) {
+ return compare;
+ }
+
+ // Calculate position if both inputs belong to the same document
+ compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
+ a.compareDocumentPosition( b ) :
+
+ // Otherwise we know they are disconnected
+ 1;
+
+ // Disconnected nodes
+ if ( compare & 1 ||
+ (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
+
+ // Choose the first element that is related to our preferred document
+ if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
+ return -1;
+ }
+ if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
+ return 1;
+ }
+
+ // Maintain original order
+ return sortInput ?
+ ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
+ 0;
+ }
+
+ return compare & 4 ? -1 : 1;
+ } :
+ function( a, b ) {
+ // Exit early if the nodes are identical
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ var cur,
+ i = 0,
+ aup = a.parentNode,
+ bup = b.parentNode,
+ ap = [ a ],
+ bp = [ b ];
+
+ // Parentless nodes are either documents or disconnected
+ if ( !aup || !bup ) {
+ return a === document ? -1 :
+ b === document ? 1 :
+ aup ? -1 :
+ bup ? 1 :
+ sortInput ?
+ ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
+ 0;
+
+ // If the nodes are siblings, we can do a quick check
+ } else if ( aup === bup ) {
+ return siblingCheck( a, b );
+ }
+
+ // Otherwise we need full lists of their ancestors for comparison
+ cur = a;
+ while ( (cur = cur.parentNode) ) {
+ ap.unshift( cur );
+ }
+ cur = b;
+ while ( (cur = cur.parentNode) ) {
+ bp.unshift( cur );
+ }
+
+ // Walk down the tree looking for a discrepancy
+ while ( ap[i] === bp[i] ) {
+ i++;
+ }
+
+ return i ?
+ // Do a sibling check if the nodes have a common ancestor
+ siblingCheck( ap[i], bp[i] ) :
+
+ // Otherwise nodes in our document sort first
+ ap[i] === preferredDoc ? -1 :
+ bp[i] === preferredDoc ? 1 :
+ 0;
+ };
+
+ return document;
+};
+
+Sizzle.matches = function( expr, elements ) {
+ return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ // Make sure that attribute selectors are quoted
+ expr = expr.replace( rattributeQuotes, "='$1']" );
+
+ if ( support.matchesSelector && documentIsHTML &&
+ !compilerCache[ expr + " " ] &&
+ ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
+ ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
+
+ try {
+ var ret = matches.call( elem, expr );
+
+ // IE 9's matchesSelector returns false on disconnected nodes
+ if ( ret || support.disconnectedMatch ||
+ // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9
+ elem.document && elem.document.nodeType !== 11 ) {
+ return ret;
+ }
+ } catch (e) {}
+ }
+
+ return Sizzle( expr, document, null, [ elem ] ).length > 0;
+};
+
+Sizzle.contains = function( context, elem ) {
+ // Set document vars if needed
+ if ( ( context.ownerDocument || context ) !== document ) {
+ setDocument( context );
+ }
+ return contains( context, elem );
+};
+
+Sizzle.attr = function( elem, name ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ var fn = Expr.attrHandle[ name.toLowerCase() ],
+ // Don't get fooled by Object.prototype properties (jQuery #13807)
+ val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
+ fn( elem, name, !documentIsHTML ) :
+ undefined;
+
+ return val !== undefined ?
+ val :
+ support.attributes || !documentIsHTML ?
+ elem.getAttribute( name ) :
+ (val = elem.getAttributeNode(name)) && val.specified ?
+ val.value :
+ null;
+};
+
+Sizzle.error = function( msg ) {
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Document sorting and removing duplicates
+ * @param {ArrayLike} results
+ */
+Sizzle.uniqueSort = function( results ) {
+ var elem,
+ duplicates = [],
+ j = 0,
+ i = 0;
+
+ // Unless we *know* we can detect duplicates, assume their presence
+ hasDuplicate = !support.detectDuplicates;
+ sortInput = !support.sortStable && results.slice( 0 );
+ results.sort( sortOrder );
+
+ if ( hasDuplicate ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem === results[ i ] ) {
+ j = duplicates.push( i );
+ }
+ }
+ while ( j-- ) {
+ results.splice( duplicates[ j ], 1 );
+ }
+ }
+
+ // Clear input after sorting to release objects
+ // See https://github.com/jquery/sizzle/pull/225
+ sortInput = null;
+
+ return results;
+};
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+ var node,
+ ret = "",
+ i = 0,
+ nodeType = elem.nodeType;
+
+ if ( !nodeType ) {
+ // If no nodeType, this is expected to be an array
+ while ( (node = elem[i++]) ) {
+ // Do not traverse comment nodes
+ ret += getText( node );
+ }
+ } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+ // Use textContent for elements
+ // innerText usage removed for consistency of new lines (jQuery #11153)
+ if ( typeof elem.textContent === "string" ) {
+ return elem.textContent;
+ } else {
+ // Traverse its children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ ret += getText( elem );
+ }
+ }
+ } else if ( nodeType === 3 || nodeType === 4 ) {
+ return elem.nodeValue;
+ }
+ // Do not include comment or processing instruction nodes
+
+ return ret;
+};
+
+Expr = Sizzle.selectors = {
+
+ // Can be adjusted by the user
+ cacheLength: 50,
+
+ createPseudo: markFunction,
+
+ match: matchExpr,
+
+ attrHandle: {},
+
+ find: {},
+
+ relative: {
+ ">": { dir: "parentNode", first: true },
+ " ": { dir: "parentNode" },
+ "+": { dir: "previousSibling", first: true },
+ "~": { dir: "previousSibling" }
+ },
+
+ preFilter: {
+ "ATTR": function( match ) {
+ match[1] = match[1].replace( runescape, funescape );
+
+ // Move the given value to match[3] whether quoted or unquoted
+ match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
+
+ if ( match[2] === "~=" ) {
+ match[3] = " " + match[3] + " ";
+ }
+
+ return match.slice( 0, 4 );
+ },
+
+ "CHILD": function( match ) {
+ /* matches from matchExpr["CHILD"]
+ 1 type (only|nth|...)
+ 2 what (child|of-type)
+ 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+ 4 xn-component of xn+y argument ([+-]?\d*n|)
+ 5 sign of xn-component
+ 6 x of xn-component
+ 7 sign of y-component
+ 8 y of y-component
+ */
+ match[1] = match[1].toLowerCase();
+
+ if ( match[1].slice( 0, 3 ) === "nth" ) {
+ // nth-* requires argument
+ if ( !match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ // numeric x and y parameters for Expr.filter.CHILD
+ // remember that false/true cast respectively to 0/1
+ match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+ match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+ // other types prohibit arguments
+ } else if ( match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ return match;
+ },
+
+ "PSEUDO": function( match ) {
+ var excess,
+ unquoted = !match[6] && match[2];
+
+ if ( matchExpr["CHILD"].test( match[0] ) ) {
+ return null;
+ }
+
+ // Accept quoted arguments as-is
+ if ( match[3] ) {
+ match[2] = match[4] || match[5] || "";
+
+ // Strip excess characters from unquoted arguments
+ } else if ( unquoted && rpseudo.test( unquoted ) &&
+ // Get excess from tokenize (recursively)
+ (excess = tokenize( unquoted, true )) &&
+ // advance to the next closing parenthesis
+ (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+ // excess is a negative index
+ match[0] = match[0].slice( 0, excess );
+ match[2] = unquoted.slice( 0, excess );
+ }
+
+ // Return only captures needed by the pseudo filter method (type and argument)
+ return match.slice( 0, 3 );
+ }
+ },
+
+ filter: {
+
+ "TAG": function( nodeNameSelector ) {
+ var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+ return nodeNameSelector === "*" ?
+ function() { return true; } :
+ function( elem ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+ };
+ },
+
+ "CLASS": function( className ) {
+ var pattern = classCache[ className + " " ];
+
+ return pattern ||
+ (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+ classCache( className, function( elem ) {
+ return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
+ });
+ },
+
+ "ATTR": function( name, operator, check ) {
+ return function( elem ) {
+ var result = Sizzle.attr( elem, name );
+
+ if ( result == null ) {
+ return operator === "!=";
+ }
+ if ( !operator ) {
+ return true;
+ }
+
+ result += "";
+
+ return operator === "=" ? result === check :
+ operator === "!=" ? result !== check :
+ operator === "^=" ? check && result.indexOf( check ) === 0 :
+ operator === "*=" ? check && result.indexOf( check ) > -1 :
+ operator === "$=" ? check && result.slice( -check.length ) === check :
+ operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
+ operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
+ false;
+ };
+ },
+
+ "CHILD": function( type, what, argument, first, last ) {
+ var simple = type.slice( 0, 3 ) !== "nth",
+ forward = type.slice( -4 ) !== "last",
+ ofType = what === "of-type";
+
+ return first === 1 && last === 0 ?
+
+ // Shortcut for :nth-*(n)
+ function( elem ) {
+ return !!elem.parentNode;
+ } :
+
+ function( elem, context, xml ) {
+ var cache, uniqueCache, outerCache, node, nodeIndex, start,
+ dir = simple !== forward ? "nextSibling" : "previousSibling",
+ parent = elem.parentNode,
+ name = ofType && elem.nodeName.toLowerCase(),
+ useCache = !xml && !ofType,
+ diff = false;
+
+ if ( parent ) {
+
+ // :(first|last|only)-(child|of-type)
+ if ( simple ) {
+ while ( dir ) {
+ node = elem;
+ while ( (node = node[ dir ]) ) {
+ if ( ofType ?
+ node.nodeName.toLowerCase() === name :
+ node.nodeType === 1 ) {
+
+ return false;
+ }
+ }
+ // Reverse direction for :only-* (if we haven't yet done so)
+ start = dir = type === "only" && !start && "nextSibling";
+ }
+ return true;
+ }
+
+ start = [ forward ? parent.firstChild : parent.lastChild ];
+
+ // non-xml :nth-child(...) stores cache data on `parent`
+ if ( forward && useCache ) {
+
+ // Seek `elem` from a previously-cached index
+
+ // ...in a gzip-friendly way
+ node = parent;
+ outerCache = node[ expando ] || (node[ expando ] = {});
+
+ // Support: IE <9 only
+ // Defend against cloned attroperties (jQuery gh-1709)
+ uniqueCache = outerCache[ node.uniqueID ] ||
+ (outerCache[ node.uniqueID ] = {});
+
+ cache = uniqueCache[ type ] || [];
+ nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
+ diff = nodeIndex && cache[ 2 ];
+ node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+
+ // Fallback to seeking `elem` from the start
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ // When found, cache indexes on `parent` and break
+ if ( node.nodeType === 1 && ++diff && node === elem ) {
+ uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
+ break;
+ }
+ }
+
+ } else {
+ // Use previously-cached element index if available
+ if ( useCache ) {
+ // ...in a gzip-friendly way
+ node = elem;
+ outerCache = node[ expando ] || (node[ expando ] = {});
+
+ // Support: IE <9 only
+ // Defend against cloned attroperties (jQuery gh-1709)
+ uniqueCache = outerCache[ node.uniqueID ] ||
+ (outerCache[ node.uniqueID ] = {});
+
+ cache = uniqueCache[ type ] || [];
+ nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
+ diff = nodeIndex;
+ }
+
+ // xml :nth-child(...)
+ // or :nth-last-child(...) or :nth(-last)?-of-type(...)
+ if ( diff === false ) {
+ // Use the same loop as above to seek `elem` from the start
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ if ( ( ofType ?
+ node.nodeName.toLowerCase() === name :
+ node.nodeType === 1 ) &&
+ ++diff ) {
+
+ // Cache the index of each encountered element
+ if ( useCache ) {
+ outerCache = node[ expando ] || (node[ expando ] = {});
+
+ // Support: IE <9 only
+ // Defend against cloned attroperties (jQuery gh-1709)
+ uniqueCache = outerCache[ node.uniqueID ] ||
+ (outerCache[ node.uniqueID ] = {});
+
+ uniqueCache[ type ] = [ dirruns, diff ];
+ }
+
+ if ( node === elem ) {
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ // Incorporate the offset, then check against cycle size
+ diff -= last;
+ return diff === first || ( diff % first === 0 && diff / first >= 0 );
+ }
+ };
+ },
+
+ "PSEUDO": function( pseudo, argument ) {
+ // pseudo-class names are case-insensitive
+ // http://www.w3.org/TR/selectors/#pseudo-classes
+ // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+ // Remember that setFilters inherits from pseudos
+ var args,
+ fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+ Sizzle.error( "unsupported pseudo: " + pseudo );
+
+ // The user may use createPseudo to indicate that
+ // arguments are needed to create the filter function
+ // just as Sizzle does
+ if ( fn[ expando ] ) {
+ return fn( argument );
+ }
+
+ // But maintain support for old signatures
+ if ( fn.length > 1 ) {
+ args = [ pseudo, pseudo, "", argument ];
+ return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+ markFunction(function( seed, matches ) {
+ var idx,
+ matched = fn( seed, argument ),
+ i = matched.length;
+ while ( i-- ) {
+ idx = indexOf( seed, matched[i] );
+ seed[ idx ] = !( matches[ idx ] = matched[i] );
+ }
+ }) :
+ function( elem ) {
+ return fn( elem, 0, args );
+ };
+ }
+
+ return fn;
+ }
+ },
+
+ pseudos: {
+ // Potentially complex pseudos
+ "not": markFunction(function( selector ) {
+ // Trim the selector passed to compile
+ // to avoid treating leading and trailing
+ // spaces as combinators
+ var input = [],
+ results = [],
+ matcher = compile( selector.replace( rtrim, "$1" ) );
+
+ return matcher[ expando ] ?
+ markFunction(function( seed, matches, context, xml ) {
+ var elem,
+ unmatched = matcher( seed, null, xml, [] ),
+ i = seed.length;
+
+ // Match elements unmatched by `matcher`
+ while ( i-- ) {
+ if ( (elem = unmatched[i]) ) {
+ seed[i] = !(matches[i] = elem);
+ }
+ }
+ }) :
+ function( elem, context, xml ) {
+ input[0] = elem;
+ matcher( input, null, xml, results );
+ // Don't keep the element (issue #299)
+ input[0] = null;
+ return !results.pop();
+ };
+ }),
+
+ "has": markFunction(function( selector ) {
+ return function( elem ) {
+ return Sizzle( selector, elem ).length > 0;
+ };
+ }),
+
+ "contains": markFunction(function( text ) {
+ text = text.replace( runescape, funescape );
+ return function( elem ) {
+ return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+ };
+ }),
+
+ // "Whether an element is represented by a :lang() selector
+ // is based solely on the element's language value
+ // being equal to the identifier C,
+ // or beginning with the identifier C immediately followed by "-".
+ // The matching of C against the element's language value is performed case-insensitively.
+ // The identifier C does not have to be a valid language name."
+ // http://www.w3.org/TR/selectors/#lang-pseudo
+ "lang": markFunction( function( lang ) {
+ // lang value must be a valid identifier
+ if ( !ridentifier.test(lang || "") ) {
+ Sizzle.error( "unsupported lang: " + lang );
+ }
+ lang = lang.replace( runescape, funescape ).toLowerCase();
+ return function( elem ) {
+ var elemLang;
+ do {
+ if ( (elemLang = documentIsHTML ?
+ elem.lang :
+ elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
+
+ elemLang = elemLang.toLowerCase();
+ return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+ }
+ } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+ return false;
+ };
+ }),
+
+ // Miscellaneous
+ "target": function( elem ) {
+ var hash = window.location && window.location.hash;
+ return hash && hash.slice( 1 ) === elem.id;
+ },
+
+ "root": function( elem ) {
+ return elem === docElem;
+ },
+
+ "focus": function( elem ) {
+ return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+ },
+
+ // Boolean properties
+ "enabled": function( elem ) {
+ return elem.disabled === false;
+ },
+
+ "disabled": function( elem ) {
+ return elem.disabled === true;
+ },
+
+ "checked": function( elem ) {
+ // In CSS3, :checked should return both checked and selected elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ var nodeName = elem.nodeName.toLowerCase();
+ return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+ },
+
+ "selected": function( elem ) {
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ if ( elem.parentNode ) {
+ elem.parentNode.selectedIndex;
+ }
+
+ return elem.selected === true;
+ },
+
+ // Contents
+ "empty": function( elem ) {
+ // http://www.w3.org/TR/selectors/#empty-pseudo
+ // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
+ // but not by others (comment: 8; processing instruction: 7; etc.)
+ // nodeType < 6 works because attributes (2) do not appear as children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ if ( elem.nodeType < 6 ) {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ "parent": function( elem ) {
+ return !Expr.pseudos["empty"]( elem );
+ },
+
+ // Element/input types
+ "header": function( elem ) {
+ return rheader.test( elem.nodeName );
+ },
+
+ "input": function( elem ) {
+ return rinputs.test( elem.nodeName );
+ },
+
+ "button": function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === "button" || name === "button";
+ },
+
+ "text": function( elem ) {
+ var attr;
+ return elem.nodeName.toLowerCase() === "input" &&
+ elem.type === "text" &&
+
+ // Support: IE<8
+ // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
+ ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
+ },
+
+ // Position-in-collection
+ "first": createPositionalPseudo(function() {
+ return [ 0 ];
+ }),
+
+ "last": createPositionalPseudo(function( matchIndexes, length ) {
+ return [ length - 1 ];
+ }),
+
+ "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ return [ argument < 0 ? argument + length : argument ];
+ }),
+
+ "even": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 0;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "odd": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 1;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; --i >= 0; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; ++i < length; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ })
+ }
+};
+
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+ Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+ Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
+ var matched, match, tokens, type,
+ soFar, groups, preFilters,
+ cached = tokenCache[ selector + " " ];
+
+ if ( cached ) {
+ return parseOnly ? 0 : cached.slice( 0 );
+ }
+
+ soFar = selector;
+ groups = [];
+ preFilters = Expr.preFilter;
+
+ while ( soFar ) {
+
+ // Comma and first run
+ if ( !matched || (match = rcomma.exec( soFar )) ) {
+ if ( match ) {
+ // Don't consume trailing commas as valid
+ soFar = soFar.slice( match[0].length ) || soFar;
+ }
+ groups.push( (tokens = []) );
+ }
+
+ matched = false;
+
+ // Combinators
+ if ( (match = rcombinators.exec( soFar )) ) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ // Cast descendant combinators to space
+ type: match[0].replace( rtrim, " " )
+ });
+ soFar = soFar.slice( matched.length );
+ }
+
+ // Filters
+ for ( type in Expr.filter ) {
+ if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+ (match = preFilters[ type ]( match ))) ) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ type: type,
+ matches: match
+ });
+ soFar = soFar.slice( matched.length );
+ }
+ }
+
+ if ( !matched ) {
+ break;
+ }
+ }
+
+ // Return the length of the invalid excess
+ // if we're just parsing
+ // Otherwise, throw an error or return tokens
+ return parseOnly ?
+ soFar.length :
+ soFar ?
+ Sizzle.error( selector ) :
+ // Cache the tokens
+ tokenCache( selector, groups ).slice( 0 );
+};
+
+function toSelector( tokens ) {
+ var i = 0,
+ len = tokens.length,
+ selector = "";
+ for ( ; i < len; i++ ) {
+ selector += tokens[i].value;
+ }
+ return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+ var dir = combinator.dir,
+ checkNonElements = base && dir === "parentNode",
+ doneName = done++;
+
+ return combinator.first ?
+ // Check against closest ancestor/preceding element
+ function( elem, context, xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ return matcher( elem, context, xml );
+ }
+ }
+ } :
+
+ // Check against all ancestor/preceding elements
+ function( elem, context, xml ) {
+ var oldCache, uniqueCache, outerCache,
+ newCache = [ dirruns, doneName ];
+
+ // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
+ if ( xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ if ( matcher( elem, context, xml ) ) {
+ return true;
+ }
+ }
+ }
+ } else {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ outerCache = elem[ expando ] || (elem[ expando ] = {});
+
+ // Support: IE <9 only
+ // Defend against cloned attroperties (jQuery gh-1709)
+ uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});
+
+ if ( (oldCache = uniqueCache[ dir ]) &&
+ oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
+
+ // Assign to newCache so results back-propagate to previous elements
+ return (newCache[ 2 ] = oldCache[ 2 ]);
+ } else {
+ // Reuse newcache so results back-propagate to previous elements
+ uniqueCache[ dir ] = newCache;
+
+ // A match means we're done; a fail means we have to keep checking
+ if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ };
+}
+
+function elementMatcher( matchers ) {
+ return matchers.length > 1 ?
+ function( elem, context, xml ) {
+ var i = matchers.length;
+ while ( i-- ) {
+ if ( !matchers[i]( elem, context, xml ) ) {
+ return false;
+ }
+ }
+ return true;
+ } :
+ matchers[0];
+}
+
+function multipleContexts( selector, contexts, results ) {
+ var i = 0,
+ len = contexts.length;
+ for ( ; i < len; i++ ) {
+ Sizzle( selector, contexts[i], results );
+ }
+ return results;
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+ var elem,
+ newUnmatched = [],
+ i = 0,
+ len = unmatched.length,
+ mapped = map != null;
+
+ for ( ; i < len; i++ ) {
+ if ( (elem = unmatched[i]) ) {
+ if ( !filter || filter( elem, context, xml ) ) {
+ newUnmatched.push( elem );
+ if ( mapped ) {
+ map.push( i );
+ }
+ }
+ }
+ }
+
+ return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+ if ( postFilter && !postFilter[ expando ] ) {
+ postFilter = setMatcher( postFilter );
+ }
+ if ( postFinder && !postFinder[ expando ] ) {
+ postFinder = setMatcher( postFinder, postSelector );
+ }
+ return markFunction(function( seed, results, context, xml ) {
+ var temp, i, elem,
+ preMap = [],
+ postMap = [],
+ preexisting = results.length,
+
+ // Get initial elements from seed or context
+ elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+ // Prefilter to get matcher input, preserving a map for seed-results synchronization
+ matcherIn = preFilter && ( seed || !selector ) ?
+ condense( elems, preMap, preFilter, context, xml ) :
+ elems,
+
+ matcherOut = matcher ?
+ // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+ postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+ // ...intermediate processing is necessary
+ [] :
+
+ // ...otherwise use results directly
+ results :
+ matcherIn;
+
+ // Find primary matches
+ if ( matcher ) {
+ matcher( matcherIn, matcherOut, context, xml );
+ }
+
+ // Apply postFilter
+ if ( postFilter ) {
+ temp = condense( matcherOut, postMap );
+ postFilter( temp, [], context, xml );
+
+ // Un-match failing elements by moving them back to matcherIn
+ i = temp.length;
+ while ( i-- ) {
+ if ( (elem = temp[i]) ) {
+ matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+ }
+ }
+ }
+
+ if ( seed ) {
+ if ( postFinder || preFilter ) {
+ if ( postFinder ) {
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts
+ temp = [];
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) ) {
+ // Restore matcherIn since elem is not yet a final match
+ temp.push( (matcherIn[i] = elem) );
+ }
+ }
+ postFinder( null, (matcherOut = []), temp, xml );
+ }
+
+ // Move matched elements from seed to results to keep them synchronized
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) &&
+ (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
+
+ seed[temp] = !(results[temp] = elem);
+ }
+ }
+ }
+
+ // Add elements to results, through postFinder if defined
+ } else {
+ matcherOut = condense(
+ matcherOut === results ?
+ matcherOut.splice( preexisting, matcherOut.length ) :
+ matcherOut
+ );
+ if ( postFinder ) {
+ postFinder( null, results, matcherOut, xml );
+ } else {
+ push.apply( results, matcherOut );
+ }
+ }
+ });
+}
+
+function matcherFromTokens( tokens ) {
+ var checkContext, matcher, j,
+ len = tokens.length,
+ leadingRelative = Expr.relative[ tokens[0].type ],
+ implicitRelative = leadingRelative || Expr.relative[" "],
+ i = leadingRelative ? 1 : 0,
+
+ // The foundational matcher ensures that elements are reachable from top-level context(s)
+ matchContext = addCombinator( function( elem ) {
+ return elem === checkContext;
+ }, implicitRelative, true ),
+ matchAnyContext = addCombinator( function( elem ) {
+ return indexOf( checkContext, elem ) > -1;
+ }, implicitRelative, true ),
+ matchers = [ function( elem, context, xml ) {
+ var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+ (checkContext = context).nodeType ?
+ matchContext( elem, context, xml ) :
+ matchAnyContext( elem, context, xml ) );
+ // Avoid hanging onto element (issue #299)
+ checkContext = null;
+ return ret;
+ } ];
+
+ for ( ; i < len; i++ ) {
+ if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+ matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+ } else {
+ matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+ // Return special upon seeing a positional matcher
+ if ( matcher[ expando ] ) {
+ // Find the next relative operator (if any) for proper handling
+ j = ++i;
+ for ( ; j < len; j++ ) {
+ if ( Expr.relative[ tokens[j].type ] ) {
+ break;
+ }
+ }
+ return setMatcher(
+ i > 1 && elementMatcher( matchers ),
+ i > 1 && toSelector(
+ // If the preceding token was a descendant combinator, insert an implicit any-element `*`
+ tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
+ ).replace( rtrim, "$1" ),
+ matcher,
+ i < j && matcherFromTokens( tokens.slice( i, j ) ),
+ j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+ j < len && toSelector( tokens )
+ );
+ }
+ matchers.push( matcher );
+ }
+ }
+
+ return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+ var bySet = setMatchers.length > 0,
+ byElement = elementMatchers.length > 0,
+ superMatcher = function( seed, context, xml, results, outermost ) {
+ var elem, j, matcher,
+ matchedCount = 0,
+ i = "0",
+ unmatched = seed && [],
+ setMatched = [],
+ contextBackup = outermostContext,
+ // We must always have either seed elements or outermost context
+ elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
+ // Use integer dirruns iff this is the outermost matcher
+ dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
+ len = elems.length;
+
+ if ( outermost ) {
+ outermostContext = context === document || context || outermost;
+ }
+
+ // Add elements passing elementMatchers directly to results
+ // Support: IE<9, Safari
+ // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id
+ for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
+ if ( byElement && elem ) {
+ j = 0;
+ if ( !context && elem.ownerDocument !== document ) {
+ setDocument( elem );
+ xml = !documentIsHTML;
+ }
+ while ( (matcher = elementMatchers[j++]) ) {
+ if ( matcher( elem, context || document, xml) ) {
+ results.push( elem );
+ break;
+ }
+ }
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ }
+ }
+
+ // Track unmatched elements for set filters
+ if ( bySet ) {
+ // They will have gone through all possible matchers
+ if ( (elem = !matcher && elem) ) {
+ matchedCount--;
+ }
+
+ // Lengthen the array for every element, matched or not
+ if ( seed ) {
+ unmatched.push( elem );
+ }
+ }
+ }
+
+ // `i` is now the count of elements visited above, and adding it to `matchedCount`
+ // makes the latter nonnegative.
+ matchedCount += i;
+
+ // Apply set filters to unmatched elements
+ // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
+ // equals `i`), unless we didn't visit _any_ elements in the above loop because we have
+ // no element matchers and no seed.
+ // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
+ // case, which will result in a "00" `matchedCount` that differs from `i` but is also
+ // numerically zero.
+ if ( bySet && i !== matchedCount ) {
+ j = 0;
+ while ( (matcher = setMatchers[j++]) ) {
+ matcher( unmatched, setMatched, context, xml );
+ }
+
+ if ( seed ) {
+ // Reintegrate element matches to eliminate the need for sorting
+ if ( matchedCount > 0 ) {
+ while ( i-- ) {
+ if ( !(unmatched[i] || setMatched[i]) ) {
+ setMatched[i] = pop.call( results );
+ }
+ }
+ }
+
+ // Discard index placeholder values to get only actual matches
+ setMatched = condense( setMatched );
+ }
+
+ // Add matches to results
+ push.apply( results, setMatched );
+
+ // Seedless set matches succeeding multiple successful matchers stipulate sorting
+ if ( outermost && !seed && setMatched.length > 0 &&
+ ( matchedCount + setMatchers.length ) > 1 ) {
+
+ Sizzle.uniqueSort( results );
+ }
+ }
+
+ // Override manipulation of globals by nested matchers
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ outermostContext = contextBackup;
+ }
+
+ return unmatched;
+ };
+
+ return bySet ?
+ markFunction( superMatcher ) :
+ superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
+ var i,
+ setMatchers = [],
+ elementMatchers = [],
+ cached = compilerCache[ selector + " " ];
+
+ if ( !cached ) {
+ // Generate a function of recursive functions that can be used to check each element
+ if ( !match ) {
+ match = tokenize( selector );
+ }
+ i = match.length;
+ while ( i-- ) {
+ cached = matcherFromTokens( match[i] );
+ if ( cached[ expando ] ) {
+ setMatchers.push( cached );
+ } else {
+ elementMatchers.push( cached );
+ }
+ }
+
+ // Cache the compiled function
+ cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+
+ // Save selector and tokenization
+ cached.selector = selector;
+ }
+ return cached;
+};
+
+/**
+ * A low-level selection function that works with Sizzle's compiled
+ * selector functions
+ * @param {String|Function} selector A selector or a pre-compiled
+ * selector function built with Sizzle.compile
+ * @param {Element} context
+ * @param {Array} [results]
+ * @param {Array} [seed] A set of elements to match against
+ */
+select = Sizzle.select = function( selector, context, results, seed ) {
+ var i, tokens, token, type, find,
+ compiled = typeof selector === "function" && selector,
+ match = !seed && tokenize( (selector = compiled.selector || selector) );
+
+ results = results || [];
+
+ // Try to minimize operations if there is only one selector in the list and no seed
+ // (the latter of which guarantees us context)
+ if ( match.length === 1 ) {
+
+ // Reduce context if the leading compound selector is an ID
+ tokens = match[0] = match[0].slice( 0 );
+ if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+ support.getById && context.nodeType === 9 && documentIsHTML &&
+ Expr.relative[ tokens[1].type ] ) {
+
+ context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+ if ( !context ) {
+ return results;
+
+ // Precompiled matchers will still verify ancestry, so step up a level
+ } else if ( compiled ) {
+ context = context.parentNode;
+ }
+
+ selector = selector.slice( tokens.shift().value.length );
+ }
+
+ // Fetch a seed set for right-to-left matching
+ i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+ while ( i-- ) {
+ token = tokens[i];
+
+ // Abort if we hit a combinator
+ if ( Expr.relative[ (type = token.type) ] ) {
+ break;
+ }
+ if ( (find = Expr.find[ type ]) ) {
+ // Search, expanding context for leading sibling combinators
+ if ( (seed = find(
+ token.matches[0].replace( runescape, funescape ),
+ rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
+ )) ) {
+
+ // If seed is empty or no tokens remain, we can return early
+ tokens.splice( i, 1 );
+ selector = seed.length && toSelector( tokens );
+ if ( !selector ) {
+ push.apply( results, seed );
+ return results;
+ }
+
+ break;
+ }
+ }
+ }
+ }
+
+ // Compile and execute a filtering function if one is not provided
+ // Provide `match` to avoid retokenization if we modified the selector above
+ ( compiled || compile( selector, match ) )(
+ seed,
+ context,
+ !documentIsHTML,
+ results,
+ !context || rsibling.test( selector ) && testContext( context.parentNode ) || context
+ );
+ return results;
+};
+
+// One-time assignments
+
+// Sort stability
+support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
+
+// Support: Chrome 14-35+
+// Always assume duplicates if they aren't passed to the comparison function
+support.detectDuplicates = !!hasDuplicate;
+
+// Initialize against the default document
+setDocument();
+
+// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Detached nodes confoundingly follow *each other*
+support.sortDetached = assert(function( div1 ) {
+ // Should return 1, but returns 4 (following)
+ return div1.compareDocumentPosition( document.createElement("div") ) & 1;
+});
+
+// Support: IE<8
+// Prevent attribute/property "interpolation"
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !assert(function( div ) {
+ div.innerHTML = " ";
+ return div.firstChild.getAttribute("href") === "#" ;
+}) ) {
+ addHandle( "type|href|height|width", function( elem, name, isXML ) {
+ if ( !isXML ) {
+ return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
+ }
+ });
+}
+
+// Support: IE<9
+// Use defaultValue in place of getAttribute("value")
+if ( !support.attributes || !assert(function( div ) {
+ div.innerHTML = " ";
+ div.firstChild.setAttribute( "value", "" );
+ return div.firstChild.getAttribute( "value" ) === "";
+}) ) {
+ addHandle( "value", function( elem, name, isXML ) {
+ if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
+ return elem.defaultValue;
+ }
+ });
+}
+
+// Support: IE<9
+// Use getAttributeNode to fetch booleans when getAttribute lies
+if ( !assert(function( div ) {
+ return div.getAttribute("disabled") == null;
+}) ) {
+ addHandle( booleans, function( elem, name, isXML ) {
+ var val;
+ if ( !isXML ) {
+ return elem[ name ] === true ? name.toLowerCase() :
+ (val = elem.getAttributeNode( name )) && val.specified ?
+ val.value :
+ null;
+ }
+ });
+}
+
+return Sizzle;
+
+})( window );
+
+
+
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[ ":" ] = jQuery.expr.pseudos;
+jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+
+var dir = function( elem, dir, until ) {
+ var matched = [],
+ truncate = until !== undefined;
+
+ while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
+ if ( elem.nodeType === 1 ) {
+ if ( truncate && jQuery( elem ).is( until ) ) {
+ break;
+ }
+ matched.push( elem );
+ }
+ }
+ return matched;
+};
+
+
+var siblings = function( n, elem ) {
+ var matched = [];
+
+ for ( ; n; n = n.nextSibling ) {
+ if ( n.nodeType === 1 && n !== elem ) {
+ matched.push( n );
+ }
+ }
+
+ return matched;
+};
+
+
+var rneedsContext = jQuery.expr.match.needsContext;
+
+var rsingleTag = ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ );
+
+
+
+var risSimple = /^.[^:#\[\.,]*$/;
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, not ) {
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep( elements, function( elem, i ) {
+ /* jshint -W018 */
+ return !!qualifier.call( elem, i, elem ) !== not;
+ } );
+
+ }
+
+ if ( qualifier.nodeType ) {
+ return jQuery.grep( elements, function( elem ) {
+ return ( elem === qualifier ) !== not;
+ } );
+
+ }
+
+ if ( typeof qualifier === "string" ) {
+ if ( risSimple.test( qualifier ) ) {
+ return jQuery.filter( qualifier, elements, not );
+ }
+
+ qualifier = jQuery.filter( qualifier, elements );
+ }
+
+ return jQuery.grep( elements, function( elem ) {
+ return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
+ } );
+}
+
+jQuery.filter = function( expr, elems, not ) {
+ var elem = elems[ 0 ];
+
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ return elems.length === 1 && elem.nodeType === 1 ?
+ jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
+ jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
+ return elem.nodeType === 1;
+ } ) );
+};
+
+jQuery.fn.extend( {
+ find: function( selector ) {
+ var i,
+ len = this.length,
+ ret = [],
+ self = this;
+
+ if ( typeof selector !== "string" ) {
+ return this.pushStack( jQuery( selector ).filter( function() {
+ for ( i = 0; i < len; i++ ) {
+ if ( jQuery.contains( self[ i ], this ) ) {
+ return true;
+ }
+ }
+ } ) );
+ }
+
+ for ( i = 0; i < len; i++ ) {
+ jQuery.find( selector, self[ i ], ret );
+ }
+
+ // Needed because $( selector, context ) becomes $( context ).find( selector )
+ ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
+ ret.selector = this.selector ? this.selector + " " + selector : selector;
+ return ret;
+ },
+ filter: function( selector ) {
+ return this.pushStack( winnow( this, selector || [], false ) );
+ },
+ not: function( selector ) {
+ return this.pushStack( winnow( this, selector || [], true ) );
+ },
+ is: function( selector ) {
+ return !!winnow(
+ this,
+
+ // If this is a positional/relative selector, check membership in the returned set
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
+ typeof selector === "string" && rneedsContext.test( selector ) ?
+ jQuery( selector ) :
+ selector || [],
+ false
+ ).length;
+ }
+} );
+
+
+// Initialize a jQuery object
+
+
+// A central reference to the root jQuery(document)
+var rootjQuery,
+
+ // A simple way to check for HTML strings
+ // Prioritize #id over to avoid XSS via location.hash (#9521)
+ // Strict HTML recognition (#11290: must start with <)
+ rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
+
+ init = jQuery.fn.init = function( selector, context, root ) {
+ var match, elem;
+
+ // HANDLE: $(""), $(null), $(undefined), $(false)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Method init() accepts an alternate rootjQuery
+ // so migrate can support jQuery.sub (gh-2101)
+ root = root || rootjQuery;
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ if ( selector[ 0 ] === "<" &&
+ selector[ selector.length - 1 ] === ">" &&
+ selector.length >= 3 ) {
+
+ // Assume that strings that start and end with <> are HTML and skip the regex check
+ match = [ null, selector, null ];
+
+ } else {
+ match = rquickExpr.exec( selector );
+ }
+
+ // Match html or make sure no context is specified for #id
+ if ( match && ( match[ 1 ] || !context ) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[ 1 ] ) {
+ context = context instanceof jQuery ? context[ 0 ] : context;
+
+ // Option to run scripts is true for back-compat
+ // Intentionally let the error be thrown if parseHTML is not present
+ jQuery.merge( this, jQuery.parseHTML(
+ match[ 1 ],
+ context && context.nodeType ? context.ownerDocument || context : document,
+ true
+ ) );
+
+ // HANDLE: $(html, props)
+ if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
+ for ( match in context ) {
+
+ // Properties of context are called as methods if possible
+ if ( jQuery.isFunction( this[ match ] ) ) {
+ this[ match ]( context[ match ] );
+
+ // ...and otherwise set as attributes
+ } else {
+ this.attr( match, context[ match ] );
+ }
+ }
+ }
+
+ return this;
+
+ // HANDLE: $(#id)
+ } else {
+ elem = document.getElementById( match[ 2 ] );
+
+ // Support: Blackberry 4.6
+ // gEBID returns nodes no longer in the document (#6963)
+ if ( elem && elem.parentNode ) {
+
+ // Inject the element directly into the jQuery object
+ this.length = 1;
+ this[ 0 ] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return ( context || root ).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return this.constructor( context ).find( selector );
+ }
+
+ // HANDLE: $(DOMElement)
+ } else if ( selector.nodeType ) {
+ this.context = this[ 0 ] = selector;
+ this.length = 1;
+ return this;
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return root.ready !== undefined ?
+ root.ready( selector ) :
+
+ // Execute immediately if ready is not present
+ selector( jQuery );
+ }
+
+ if ( selector.selector !== undefined ) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ };
+
+// Give the init function the jQuery prototype for later instantiation
+init.prototype = jQuery.fn;
+
+// Initialize central reference
+rootjQuery = jQuery( document );
+
+
+var rparentsprev = /^(?:parents|prev(?:Until|All))/,
+
+ // Methods guaranteed to produce a unique set when starting from a unique set
+ guaranteedUnique = {
+ children: true,
+ contents: true,
+ next: true,
+ prev: true
+ };
+
+jQuery.fn.extend( {
+ has: function( target ) {
+ var targets = jQuery( target, this ),
+ l = targets.length;
+
+ return this.filter( function() {
+ var i = 0;
+ for ( ; i < l; i++ ) {
+ if ( jQuery.contains( this, targets[ i ] ) ) {
+ return true;
+ }
+ }
+ } );
+ },
+
+ closest: function( selectors, context ) {
+ var cur,
+ i = 0,
+ l = this.length,
+ matched = [],
+ pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
+ jQuery( selectors, context || this.context ) :
+ 0;
+
+ for ( ; i < l; i++ ) {
+ for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
+
+ // Always skip document fragments
+ if ( cur.nodeType < 11 && ( pos ?
+ pos.index( cur ) > -1 :
+
+ // Don't pass non-elements to Sizzle
+ cur.nodeType === 1 &&
+ jQuery.find.matchesSelector( cur, selectors ) ) ) {
+
+ matched.push( cur );
+ break;
+ }
+ }
+ }
+
+ return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
+ },
+
+ // Determine the position of an element within the set
+ index: function( elem ) {
+
+ // No argument, return index in parent
+ if ( !elem ) {
+ return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
+ }
+
+ // Index in selector
+ if ( typeof elem === "string" ) {
+ return indexOf.call( jQuery( elem ), this[ 0 ] );
+ }
+
+ // Locate the position of the desired element
+ return indexOf.call( this,
+
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[ 0 ] : elem
+ );
+ },
+
+ add: function( selector, context ) {
+ return this.pushStack(
+ jQuery.uniqueSort(
+ jQuery.merge( this.get(), jQuery( selector, context ) )
+ )
+ );
+ },
+
+ addBack: function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter( selector )
+ );
+ }
+} );
+
+function sibling( cur, dir ) {
+ while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
+ return cur;
+}
+
+jQuery.each( {
+ parent: function( elem ) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function( elem ) {
+ return dir( elem, "parentNode" );
+ },
+ parentsUntil: function( elem, i, until ) {
+ return dir( elem, "parentNode", until );
+ },
+ next: function( elem ) {
+ return sibling( elem, "nextSibling" );
+ },
+ prev: function( elem ) {
+ return sibling( elem, "previousSibling" );
+ },
+ nextAll: function( elem ) {
+ return dir( elem, "nextSibling" );
+ },
+ prevAll: function( elem ) {
+ return dir( elem, "previousSibling" );
+ },
+ nextUntil: function( elem, i, until ) {
+ return dir( elem, "nextSibling", until );
+ },
+ prevUntil: function( elem, i, until ) {
+ return dir( elem, "previousSibling", until );
+ },
+ siblings: function( elem ) {
+ return siblings( ( elem.parentNode || {} ).firstChild, elem );
+ },
+ children: function( elem ) {
+ return siblings( elem.firstChild );
+ },
+ contents: function( elem ) {
+ return elem.contentDocument || jQuery.merge( [], elem.childNodes );
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function( until, selector ) {
+ var matched = jQuery.map( this, fn, until );
+
+ if ( name.slice( -5 ) !== "Until" ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ matched = jQuery.filter( selector, matched );
+ }
+
+ if ( this.length > 1 ) {
+
+ // Remove duplicates
+ if ( !guaranteedUnique[ name ] ) {
+ jQuery.uniqueSort( matched );
+ }
+
+ // Reverse order for parents* and prev-derivatives
+ if ( rparentsprev.test( name ) ) {
+ matched.reverse();
+ }
+ }
+
+ return this.pushStack( matched );
+ };
+} );
+var rnotwhite = ( /\S+/g );
+
+
+
+// Convert String-formatted options into Object-formatted ones
+function createOptions( options ) {
+ var object = {};
+ jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
+ object[ flag ] = true;
+ } );
+ return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ * options: an optional list of space-separated options that will change how
+ * the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ * once: will ensure the callback list can only be fired once (like a Deferred)
+ *
+ * memory: will keep track of previous values and will call any callback added
+ * after the list has been fired right away with the latest "memorized"
+ * values (like a Deferred)
+ *
+ * unique: will ensure a callback can only be added once (no duplicate in the list)
+ *
+ * stopOnFalse: interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+ // Convert options from String-formatted to Object-formatted if needed
+ // (we check in cache first)
+ options = typeof options === "string" ?
+ createOptions( options ) :
+ jQuery.extend( {}, options );
+
+ var // Flag to know if list is currently firing
+ firing,
+
+ // Last fire value for non-forgettable lists
+ memory,
+
+ // Flag to know if list was already fired
+ fired,
+
+ // Flag to prevent firing
+ locked,
+
+ // Actual callback list
+ list = [],
+
+ // Queue of execution data for repeatable lists
+ queue = [],
+
+ // Index of currently firing callback (modified by add/remove as needed)
+ firingIndex = -1,
+
+ // Fire callbacks
+ fire = function() {
+
+ // Enforce single-firing
+ locked = options.once;
+
+ // Execute callbacks for all pending executions,
+ // respecting firingIndex overrides and runtime changes
+ fired = firing = true;
+ for ( ; queue.length; firingIndex = -1 ) {
+ memory = queue.shift();
+ while ( ++firingIndex < list.length ) {
+
+ // Run callback and check for early termination
+ if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
+ options.stopOnFalse ) {
+
+ // Jump to end and forget the data so .add doesn't re-fire
+ firingIndex = list.length;
+ memory = false;
+ }
+ }
+ }
+
+ // Forget the data if we're done with it
+ if ( !options.memory ) {
+ memory = false;
+ }
+
+ firing = false;
+
+ // Clean up if we're done firing for good
+ if ( locked ) {
+
+ // Keep an empty list if we have data for future add calls
+ if ( memory ) {
+ list = [];
+
+ // Otherwise, this object is spent
+ } else {
+ list = "";
+ }
+ }
+ },
+
+ // Actual Callbacks object
+ self = {
+
+ // Add a callback or a collection of callbacks to the list
+ add: function() {
+ if ( list ) {
+
+ // If we have memory from a past run, we should fire after adding
+ if ( memory && !firing ) {
+ firingIndex = list.length - 1;
+ queue.push( memory );
+ }
+
+ ( function add( args ) {
+ jQuery.each( args, function( _, arg ) {
+ if ( jQuery.isFunction( arg ) ) {
+ if ( !options.unique || !self.has( arg ) ) {
+ list.push( arg );
+ }
+ } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) {
+
+ // Inspect recursively
+ add( arg );
+ }
+ } );
+ } )( arguments );
+
+ if ( memory && !firing ) {
+ fire();
+ }
+ }
+ return this;
+ },
+
+ // Remove a callback from the list
+ remove: function() {
+ jQuery.each( arguments, function( _, arg ) {
+ var index;
+ while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+ list.splice( index, 1 );
+
+ // Handle firing indexes
+ if ( index <= firingIndex ) {
+ firingIndex--;
+ }
+ }
+ } );
+ return this;
+ },
+
+ // Check if a given callback is in the list.
+ // If no argument is given, return whether or not list has callbacks attached.
+ has: function( fn ) {
+ return fn ?
+ jQuery.inArray( fn, list ) > -1 :
+ list.length > 0;
+ },
+
+ // Remove all callbacks from the list
+ empty: function() {
+ if ( list ) {
+ list = [];
+ }
+ return this;
+ },
+
+ // Disable .fire and .add
+ // Abort any current/pending executions
+ // Clear all callbacks and values
+ disable: function() {
+ locked = queue = [];
+ list = memory = "";
+ return this;
+ },
+ disabled: function() {
+ return !list;
+ },
+
+ // Disable .fire
+ // Also disable .add unless we have memory (since it would have no effect)
+ // Abort any pending executions
+ lock: function() {
+ locked = queue = [];
+ if ( !memory ) {
+ list = memory = "";
+ }
+ return this;
+ },
+ locked: function() {
+ return !!locked;
+ },
+
+ // Call all callbacks with the given context and arguments
+ fireWith: function( context, args ) {
+ if ( !locked ) {
+ args = args || [];
+ args = [ context, args.slice ? args.slice() : args ];
+ queue.push( args );
+ if ( !firing ) {
+ fire();
+ }
+ }
+ return this;
+ },
+
+ // Call all the callbacks with the given arguments
+ fire: function() {
+ self.fireWith( this, arguments );
+ return this;
+ },
+
+ // To know if the callbacks have already been called at least once
+ fired: function() {
+ return !!fired;
+ }
+ };
+
+ return self;
+};
+
+
+jQuery.extend( {
+
+ Deferred: function( func ) {
+ var tuples = [
+
+ // action, add listener, listener list, final state
+ [ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ],
+ [ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ],
+ [ "notify", "progress", jQuery.Callbacks( "memory" ) ]
+ ],
+ state = "pending",
+ promise = {
+ state: function() {
+ return state;
+ },
+ always: function() {
+ deferred.done( arguments ).fail( arguments );
+ return this;
+ },
+ then: function( /* fnDone, fnFail, fnProgress */ ) {
+ var fns = arguments;
+ return jQuery.Deferred( function( newDefer ) {
+ jQuery.each( tuples, function( i, tuple ) {
+ var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
+
+ // deferred[ done | fail | progress ] for forwarding actions to newDefer
+ deferred[ tuple[ 1 ] ]( function() {
+ var returned = fn && fn.apply( this, arguments );
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
+ returned.promise()
+ .progress( newDefer.notify )
+ .done( newDefer.resolve )
+ .fail( newDefer.reject );
+ } else {
+ newDefer[ tuple[ 0 ] + "With" ](
+ this === promise ? newDefer.promise() : this,
+ fn ? [ returned ] : arguments
+ );
+ }
+ } );
+ } );
+ fns = null;
+ } ).promise();
+ },
+
+ // Get a promise for this deferred
+ // If obj is provided, the promise aspect is added to the object
+ promise: function( obj ) {
+ return obj != null ? jQuery.extend( obj, promise ) : promise;
+ }
+ },
+ deferred = {};
+
+ // Keep pipe for back-compat
+ promise.pipe = promise.then;
+
+ // Add list-specific methods
+ jQuery.each( tuples, function( i, tuple ) {
+ var list = tuple[ 2 ],
+ stateString = tuple[ 3 ];
+
+ // promise[ done | fail | progress ] = list.add
+ promise[ tuple[ 1 ] ] = list.add;
+
+ // Handle state
+ if ( stateString ) {
+ list.add( function() {
+
+ // state = [ resolved | rejected ]
+ state = stateString;
+
+ // [ reject_list | resolve_list ].disable; progress_list.lock
+ }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
+ }
+
+ // deferred[ resolve | reject | notify ]
+ deferred[ tuple[ 0 ] ] = function() {
+ deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments );
+ return this;
+ };
+ deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
+ } );
+
+ // Make the deferred a promise
+ promise.promise( deferred );
+
+ // Call given func if any
+ if ( func ) {
+ func.call( deferred, deferred );
+ }
+
+ // All done!
+ return deferred;
+ },
+
+ // Deferred helper
+ when: function( subordinate /* , ..., subordinateN */ ) {
+ var i = 0,
+ resolveValues = slice.call( arguments ),
+ length = resolveValues.length,
+
+ // the count of uncompleted subordinates
+ remaining = length !== 1 ||
+ ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+
+ // the master Deferred.
+ // If resolveValues consist of only a single Deferred, just use that.
+ deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+ // Update function for both resolve and progress values
+ updateFunc = function( i, contexts, values ) {
+ return function( value ) {
+ contexts[ i ] = this;
+ values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
+ if ( values === progressValues ) {
+ deferred.notifyWith( contexts, values );
+ } else if ( !( --remaining ) ) {
+ deferred.resolveWith( contexts, values );
+ }
+ };
+ },
+
+ progressValues, progressContexts, resolveContexts;
+
+ // Add listeners to Deferred subordinates; treat others as resolved
+ if ( length > 1 ) {
+ progressValues = new Array( length );
+ progressContexts = new Array( length );
+ resolveContexts = new Array( length );
+ for ( ; i < length; i++ ) {
+ if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
+ resolveValues[ i ].promise()
+ .progress( updateFunc( i, progressContexts, progressValues ) )
+ .done( updateFunc( i, resolveContexts, resolveValues ) )
+ .fail( deferred.reject );
+ } else {
+ --remaining;
+ }
+ }
+ }
+
+ // If we're not waiting on anything, resolve the master
+ if ( !remaining ) {
+ deferred.resolveWith( resolveContexts, resolveValues );
+ }
+
+ return deferred.promise();
+ }
+} );
+
+
+// The deferred used on DOM ready
+var readyList;
+
+jQuery.fn.ready = function( fn ) {
+
+ // Add the callback
+ jQuery.ready.promise().done( fn );
+
+ return this;
+};
+
+jQuery.extend( {
+
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
+
+ // Hold (or release) the ready event
+ holdReady: function( hold ) {
+ if ( hold ) {
+ jQuery.readyWait++;
+ } else {
+ jQuery.ready( true );
+ }
+ },
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+
+ // Abort if there are pending holds or we're already ready
+ if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+ return;
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ readyList.resolveWith( document, [ jQuery ] );
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.triggerHandler ) {
+ jQuery( document ).triggerHandler( "ready" );
+ jQuery( document ).off( "ready" );
+ }
+ }
+} );
+
+/**
+ * The ready event handler and self cleanup method
+ */
+function completed() {
+ document.removeEventListener( "DOMContentLoaded", completed );
+ window.removeEventListener( "load", completed );
+ jQuery.ready();
+}
+
+jQuery.ready.promise = function( obj ) {
+ if ( !readyList ) {
+
+ readyList = jQuery.Deferred();
+
+ // Catch cases where $(document).ready() is called
+ // after the browser event has already occurred.
+ // Support: IE9-10 only
+ // Older IE sometimes signals "interactive" too soon
+ if ( document.readyState === "complete" ||
+ ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
+
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ window.setTimeout( jQuery.ready );
+
+ } else {
+
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", completed );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", completed );
+ }
+ }
+ return readyList.promise( obj );
+};
+
+// Kick off the DOM ready check even if the user does not
+jQuery.ready.promise();
+
+
+
+
+// Multifunctional method to get and set values of a collection
+// The value/s can optionally be executed if it's a function
+var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
+ var i = 0,
+ len = elems.length,
+ bulk = key == null;
+
+ // Sets many values
+ if ( jQuery.type( key ) === "object" ) {
+ chainable = true;
+ for ( i in key ) {
+ access( elems, fn, i, key[ i ], true, emptyGet, raw );
+ }
+
+ // Sets one value
+ } else if ( value !== undefined ) {
+ chainable = true;
+
+ if ( !jQuery.isFunction( value ) ) {
+ raw = true;
+ }
+
+ if ( bulk ) {
+
+ // Bulk operations run against the entire set
+ if ( raw ) {
+ fn.call( elems, value );
+ fn = null;
+
+ // ...except when executing function values
+ } else {
+ bulk = fn;
+ fn = function( elem, key, value ) {
+ return bulk.call( jQuery( elem ), value );
+ };
+ }
+ }
+
+ if ( fn ) {
+ for ( ; i < len; i++ ) {
+ fn(
+ elems[ i ], key, raw ?
+ value :
+ value.call( elems[ i ], i, fn( elems[ i ], key ) )
+ );
+ }
+ }
+ }
+
+ return chainable ?
+ elems :
+
+ // Gets
+ bulk ?
+ fn.call( elems ) :
+ len ? fn( elems[ 0 ], key ) : emptyGet;
+};
+var acceptData = function( owner ) {
+
+ // Accepts only:
+ // - Node
+ // - Node.ELEMENT_NODE
+ // - Node.DOCUMENT_NODE
+ // - Object
+ // - Any
+ /* jshint -W018 */
+ return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
+};
+
+
+
+
+function Data() {
+ this.expando = jQuery.expando + Data.uid++;
+}
+
+Data.uid = 1;
+
+Data.prototype = {
+
+ register: function( owner, initial ) {
+ var value = initial || {};
+
+ // If it is a node unlikely to be stringify-ed or looped over
+ // use plain assignment
+ if ( owner.nodeType ) {
+ owner[ this.expando ] = value;
+
+ // Otherwise secure it in a non-enumerable, non-writable property
+ // configurability must be true to allow the property to be
+ // deleted with the delete operator
+ } else {
+ Object.defineProperty( owner, this.expando, {
+ value: value,
+ writable: true,
+ configurable: true
+ } );
+ }
+ return owner[ this.expando ];
+ },
+ cache: function( owner ) {
+
+ // We can accept data for non-element nodes in modern browsers,
+ // but we should not, see #8335.
+ // Always return an empty object.
+ if ( !acceptData( owner ) ) {
+ return {};
+ }
+
+ // Check if the owner object already has a cache
+ var value = owner[ this.expando ];
+
+ // If not, create one
+ if ( !value ) {
+ value = {};
+
+ // We can accept data for non-element nodes in modern browsers,
+ // but we should not, see #8335.
+ // Always return an empty object.
+ if ( acceptData( owner ) ) {
+
+ // If it is a node unlikely to be stringify-ed or looped over
+ // use plain assignment
+ if ( owner.nodeType ) {
+ owner[ this.expando ] = value;
+
+ // Otherwise secure it in a non-enumerable property
+ // configurable must be true to allow the property to be
+ // deleted when data is removed
+ } else {
+ Object.defineProperty( owner, this.expando, {
+ value: value,
+ configurable: true
+ } );
+ }
+ }
+ }
+
+ return value;
+ },
+ set: function( owner, data, value ) {
+ var prop,
+ cache = this.cache( owner );
+
+ // Handle: [ owner, key, value ] args
+ if ( typeof data === "string" ) {
+ cache[ data ] = value;
+
+ // Handle: [ owner, { properties } ] args
+ } else {
+
+ // Copy the properties one-by-one to the cache object
+ for ( prop in data ) {
+ cache[ prop ] = data[ prop ];
+ }
+ }
+ return cache;
+ },
+ get: function( owner, key ) {
+ return key === undefined ?
+ this.cache( owner ) :
+ owner[ this.expando ] && owner[ this.expando ][ key ];
+ },
+ access: function( owner, key, value ) {
+ var stored;
+
+ // In cases where either:
+ //
+ // 1. No key was specified
+ // 2. A string key was specified, but no value provided
+ //
+ // Take the "read" path and allow the get method to determine
+ // which value to return, respectively either:
+ //
+ // 1. The entire cache object
+ // 2. The data stored at the key
+ //
+ if ( key === undefined ||
+ ( ( key && typeof key === "string" ) && value === undefined ) ) {
+
+ stored = this.get( owner, key );
+
+ return stored !== undefined ?
+ stored : this.get( owner, jQuery.camelCase( key ) );
+ }
+
+ // When the key is not a string, or both a key and value
+ // are specified, set or extend (existing objects) with either:
+ //
+ // 1. An object of properties
+ // 2. A key and value
+ //
+ this.set( owner, key, value );
+
+ // Since the "set" path can have two possible entry points
+ // return the expected data based on which path was taken[*]
+ return value !== undefined ? value : key;
+ },
+ remove: function( owner, key ) {
+ var i, name, camel,
+ cache = owner[ this.expando ];
+
+ if ( cache === undefined ) {
+ return;
+ }
+
+ if ( key === undefined ) {
+ this.register( owner );
+
+ } else {
+
+ // Support array or space separated string of keys
+ if ( jQuery.isArray( key ) ) {
+
+ // If "name" is an array of keys...
+ // When data is initially created, via ("key", "val") signature,
+ // keys will be converted to camelCase.
+ // Since there is no way to tell _how_ a key was added, remove
+ // both plain key and camelCase key. #12786
+ // This will only penalize the array argument path.
+ name = key.concat( key.map( jQuery.camelCase ) );
+ } else {
+ camel = jQuery.camelCase( key );
+
+ // Try the string as a key before any manipulation
+ if ( key in cache ) {
+ name = [ key, camel ];
+ } else {
+
+ // If a key with the spaces exists, use it.
+ // Otherwise, create an array by matching non-whitespace
+ name = camel;
+ name = name in cache ?
+ [ name ] : ( name.match( rnotwhite ) || [] );
+ }
+ }
+
+ i = name.length;
+
+ while ( i-- ) {
+ delete cache[ name[ i ] ];
+ }
+ }
+
+ // Remove the expando if there's no more data
+ if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
+
+ // Support: Chrome <= 35-45+
+ // Webkit & Blink performance suffers when deleting properties
+ // from DOM nodes, so set to undefined instead
+ // https://code.google.com/p/chromium/issues/detail?id=378607
+ if ( owner.nodeType ) {
+ owner[ this.expando ] = undefined;
+ } else {
+ delete owner[ this.expando ];
+ }
+ }
+ },
+ hasData: function( owner ) {
+ var cache = owner[ this.expando ];
+ return cache !== undefined && !jQuery.isEmptyObject( cache );
+ }
+};
+var dataPriv = new Data();
+
+var dataUser = new Data();
+
+
+
+// Implementation Summary
+//
+// 1. Enforce API surface and semantic compatibility with 1.9.x branch
+// 2. Improve the module's maintainability by reducing the storage
+// paths to a single mechanism.
+// 3. Use the same single mechanism to support "private" and "user" data.
+// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
+// 5. Avoid exposing implementation details on user objects (eg. expando properties)
+// 6. Provide a clear path for implementation upgrade to WeakMap in 2014
+
+var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
+ rmultiDash = /[A-Z]/g;
+
+function dataAttr( elem, key, data ) {
+ var name;
+
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && elem.nodeType === 1 ) {
+ name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
+ data = elem.getAttribute( name );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null :
+
+ // Only convert to a number if it doesn't change the string
+ +data + "" === data ? +data :
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
+ data;
+ } catch ( e ) {}
+
+ // Make sure we set the data so it isn't changed later
+ dataUser.set( elem, key, data );
+ } else {
+ data = undefined;
+ }
+ }
+ return data;
+}
+
+jQuery.extend( {
+ hasData: function( elem ) {
+ return dataUser.hasData( elem ) || dataPriv.hasData( elem );
+ },
+
+ data: function( elem, name, data ) {
+ return dataUser.access( elem, name, data );
+ },
+
+ removeData: function( elem, name ) {
+ dataUser.remove( elem, name );
+ },
+
+ // TODO: Now that all calls to _data and _removeData have been replaced
+ // with direct calls to dataPriv methods, these can be deprecated.
+ _data: function( elem, name, data ) {
+ return dataPriv.access( elem, name, data );
+ },
+
+ _removeData: function( elem, name ) {
+ dataPriv.remove( elem, name );
+ }
+} );
+
+jQuery.fn.extend( {
+ data: function( key, value ) {
+ var i, name, data,
+ elem = this[ 0 ],
+ attrs = elem && elem.attributes;
+
+ // Gets all values
+ if ( key === undefined ) {
+ if ( this.length ) {
+ data = dataUser.get( elem );
+
+ if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
+ i = attrs.length;
+ while ( i-- ) {
+
+ // Support: IE11+
+ // The attrs elements can be null (#14894)
+ if ( attrs[ i ] ) {
+ name = attrs[ i ].name;
+ if ( name.indexOf( "data-" ) === 0 ) {
+ name = jQuery.camelCase( name.slice( 5 ) );
+ dataAttr( elem, name, data[ name ] );
+ }
+ }
+ }
+ dataPriv.set( elem, "hasDataAttrs", true );
+ }
+ }
+
+ return data;
+ }
+
+ // Sets multiple values
+ if ( typeof key === "object" ) {
+ return this.each( function() {
+ dataUser.set( this, key );
+ } );
+ }
+
+ return access( this, function( value ) {
+ var data, camelKey;
+
+ // The calling jQuery object (element matches) is not empty
+ // (and therefore has an element appears at this[ 0 ]) and the
+ // `value` parameter was not undefined. An empty jQuery object
+ // will result in `undefined` for elem = this[ 0 ] which will
+ // throw an exception if an attempt to read a data cache is made.
+ if ( elem && value === undefined ) {
+
+ // Attempt to get data from the cache
+ // with the key as-is
+ data = dataUser.get( elem, key ) ||
+
+ // Try to find dashed key if it exists (gh-2779)
+ // This is for 2.2.x only
+ dataUser.get( elem, key.replace( rmultiDash, "-$&" ).toLowerCase() );
+
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ camelKey = jQuery.camelCase( key );
+
+ // Attempt to get data from the cache
+ // with the key camelized
+ data = dataUser.get( elem, camelKey );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // Attempt to "discover" the data in
+ // HTML5 custom data-* attrs
+ data = dataAttr( elem, camelKey, undefined );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // We tried really hard, but the data doesn't exist.
+ return;
+ }
+
+ // Set the data...
+ camelKey = jQuery.camelCase( key );
+ this.each( function() {
+
+ // First, attempt to store a copy or reference of any
+ // data that might've been store with a camelCased key.
+ var data = dataUser.get( this, camelKey );
+
+ // For HTML5 data-* attribute interop, we have to
+ // store property names with dashes in a camelCase form.
+ // This might not apply to all properties...*
+ dataUser.set( this, camelKey, value );
+
+ // *... In the case of properties that might _actually_
+ // have dashes, we need to also store a copy of that
+ // unchanged property.
+ if ( key.indexOf( "-" ) > -1 && data !== undefined ) {
+ dataUser.set( this, key, value );
+ }
+ } );
+ }, null, value, arguments.length > 1, null, true );
+ },
+
+ removeData: function( key ) {
+ return this.each( function() {
+ dataUser.remove( this, key );
+ } );
+ }
+} );
+
+
+jQuery.extend( {
+ queue: function( elem, type, data ) {
+ var queue;
+
+ if ( elem ) {
+ type = ( type || "fx" ) + "queue";
+ queue = dataPriv.get( elem, type );
+
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( data ) {
+ if ( !queue || jQuery.isArray( data ) ) {
+ queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
+ } else {
+ queue.push( data );
+ }
+ }
+ return queue || [];
+ }
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ),
+ startLength = queue.length,
+ fn = queue.shift(),
+ hooks = jQuery._queueHooks( elem, type ),
+ next = function() {
+ jQuery.dequeue( elem, type );
+ };
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ startLength--;
+ }
+
+ if ( fn ) {
+
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift( "inprogress" );
+ }
+
+ // Clear up the last queue stop function
+ delete hooks.stop;
+ fn.call( elem, next, hooks );
+ }
+
+ if ( !startLength && hooks ) {
+ hooks.empty.fire();
+ }
+ },
+
+ // Not public - generate a queueHooks object, or return the current one
+ _queueHooks: function( elem, type ) {
+ var key = type + "queueHooks";
+ return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
+ empty: jQuery.Callbacks( "once memory" ).add( function() {
+ dataPriv.remove( elem, [ type + "queue", key ] );
+ } )
+ } );
+ }
+} );
+
+jQuery.fn.extend( {
+ queue: function( type, data ) {
+ var setter = 2;
+
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
+ setter--;
+ }
+
+ if ( arguments.length < setter ) {
+ return jQuery.queue( this[ 0 ], type );
+ }
+
+ return data === undefined ?
+ this :
+ this.each( function() {
+ var queue = jQuery.queue( this, type, data );
+
+ // Ensure a hooks for this queue
+ jQuery._queueHooks( this, type );
+
+ if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
+ jQuery.dequeue( this, type );
+ }
+ } );
+ },
+ dequeue: function( type ) {
+ return this.each( function() {
+ jQuery.dequeue( this, type );
+ } );
+ },
+ clearQueue: function( type ) {
+ return this.queue( type || "fx", [] );
+ },
+
+ // Get a promise resolved when queues of a certain type
+ // are emptied (fx is the type by default)
+ promise: function( type, obj ) {
+ var tmp,
+ count = 1,
+ defer = jQuery.Deferred(),
+ elements = this,
+ i = this.length,
+ resolve = function() {
+ if ( !( --count ) ) {
+ defer.resolveWith( elements, [ elements ] );
+ }
+ };
+
+ if ( typeof type !== "string" ) {
+ obj = type;
+ type = undefined;
+ }
+ type = type || "fx";
+
+ while ( i-- ) {
+ tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
+ if ( tmp && tmp.empty ) {
+ count++;
+ tmp.empty.add( resolve );
+ }
+ }
+ resolve();
+ return defer.promise( obj );
+ }
+} );
+var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
+
+var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
+
+
+var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
+
+var isHidden = function( elem, el ) {
+
+ // isHidden might be called from jQuery#filter function;
+ // in that case, element will be second argument
+ elem = el || elem;
+ return jQuery.css( elem, "display" ) === "none" ||
+ !jQuery.contains( elem.ownerDocument, elem );
+ };
+
+
+
+function adjustCSS( elem, prop, valueParts, tween ) {
+ var adjusted,
+ scale = 1,
+ maxIterations = 20,
+ currentValue = tween ?
+ function() { return tween.cur(); } :
+ function() { return jQuery.css( elem, prop, "" ); },
+ initial = currentValue(),
+ unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
+
+ // Starting value computation is required for potential unit mismatches
+ initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
+ rcssNum.exec( jQuery.css( elem, prop ) );
+
+ if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
+
+ // Trust units reported by jQuery.css
+ unit = unit || initialInUnit[ 3 ];
+
+ // Make sure we update the tween properties later on
+ valueParts = valueParts || [];
+
+ // Iteratively approximate from a nonzero starting point
+ initialInUnit = +initial || 1;
+
+ do {
+
+ // If previous iteration zeroed out, double until we get *something*.
+ // Use string for doubling so we don't accidentally see scale as unchanged below
+ scale = scale || ".5";
+
+ // Adjust and apply
+ initialInUnit = initialInUnit / scale;
+ jQuery.style( elem, prop, initialInUnit + unit );
+
+ // Update scale, tolerating zero or NaN from tween.cur()
+ // Break the loop if scale is unchanged or perfect, or if we've just had enough.
+ } while (
+ scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations
+ );
+ }
+
+ if ( valueParts ) {
+ initialInUnit = +initialInUnit || +initial || 0;
+
+ // Apply relative offset (+=/-=) if specified
+ adjusted = valueParts[ 1 ] ?
+ initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
+ +valueParts[ 2 ];
+ if ( tween ) {
+ tween.unit = unit;
+ tween.start = initialInUnit;
+ tween.end = adjusted;
+ }
+ }
+ return adjusted;
+}
+var rcheckableType = ( /^(?:checkbox|radio)$/i );
+
+var rtagName = ( /<([\w:-]+)/ );
+
+var rscriptType = ( /^$|\/(?:java|ecma)script/i );
+
+
+
+// We have to close these tags to support XHTML (#13200)
+var wrapMap = {
+
+ // Support: IE9
+ option: [ 1, "", " " ],
+
+ // XHTML parsers do not magically insert elements in the
+ // same way that tag soup parsers do. So we cannot shorten
+ // this by omitting or other required elements.
+ thead: [ 1, "" ],
+ col: [ 2, "" ],
+ tr: [ 2, "" ],
+ td: [ 3, "" ],
+
+ _default: [ 0, "", "" ]
+};
+
+// Support: IE9
+wrapMap.optgroup = wrapMap.option;
+
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+
+function getAll( context, tag ) {
+
+ // Support: IE9-11+
+ // Use typeof to avoid zero-argument method invocation on host objects (#15151)
+ var ret = typeof context.getElementsByTagName !== "undefined" ?
+ context.getElementsByTagName( tag || "*" ) :
+ typeof context.querySelectorAll !== "undefined" ?
+ context.querySelectorAll( tag || "*" ) :
+ [];
+
+ return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
+ jQuery.merge( [ context ], ret ) :
+ ret;
+}
+
+
+// Mark scripts as having already been evaluated
+function setGlobalEval( elems, refElements ) {
+ var i = 0,
+ l = elems.length;
+
+ for ( ; i < l; i++ ) {
+ dataPriv.set(
+ elems[ i ],
+ "globalEval",
+ !refElements || dataPriv.get( refElements[ i ], "globalEval" )
+ );
+ }
+}
+
+
+var rhtml = /<|?\w+;/;
+
+function buildFragment( elems, context, scripts, selection, ignored ) {
+ var elem, tmp, tag, wrap, contains, j,
+ fragment = context.createDocumentFragment(),
+ nodes = [],
+ i = 0,
+ l = elems.length;
+
+ for ( ; i < l; i++ ) {
+ elem = elems[ i ];
+
+ if ( elem || elem === 0 ) {
+
+ // Add nodes directly
+ if ( jQuery.type( elem ) === "object" ) {
+
+ // Support: Android<4.1, PhantomJS<2
+ // push.apply(_, arraylike) throws on ancient WebKit
+ jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
+
+ // Convert non-html into a text node
+ } else if ( !rhtml.test( elem ) ) {
+ nodes.push( context.createTextNode( elem ) );
+
+ // Convert html into DOM nodes
+ } else {
+ tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
+
+ // Deserialize a standard representation
+ tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
+ wrap = wrapMap[ tag ] || wrapMap._default;
+ tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
+
+ // Descend through wrappers to the right content
+ j = wrap[ 0 ];
+ while ( j-- ) {
+ tmp = tmp.lastChild;
+ }
+
+ // Support: Android<4.1, PhantomJS<2
+ // push.apply(_, arraylike) throws on ancient WebKit
+ jQuery.merge( nodes, tmp.childNodes );
+
+ // Remember the top-level container
+ tmp = fragment.firstChild;
+
+ // Ensure the created nodes are orphaned (#12392)
+ tmp.textContent = "";
+ }
+ }
+ }
+
+ // Remove wrapper from fragment
+ fragment.textContent = "";
+
+ i = 0;
+ while ( ( elem = nodes[ i++ ] ) ) {
+
+ // Skip elements already in the context collection (trac-4087)
+ if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
+ if ( ignored ) {
+ ignored.push( elem );
+ }
+ continue;
+ }
+
+ contains = jQuery.contains( elem.ownerDocument, elem );
+
+ // Append to fragment
+ tmp = getAll( fragment.appendChild( elem ), "script" );
+
+ // Preserve script evaluation history
+ if ( contains ) {
+ setGlobalEval( tmp );
+ }
+
+ // Capture executables
+ if ( scripts ) {
+ j = 0;
+ while ( ( elem = tmp[ j++ ] ) ) {
+ if ( rscriptType.test( elem.type || "" ) ) {
+ scripts.push( elem );
+ }
+ }
+ }
+ }
+
+ return fragment;
+}
+
+
+( function() {
+ var fragment = document.createDocumentFragment(),
+ div = fragment.appendChild( document.createElement( "div" ) ),
+ input = document.createElement( "input" );
+
+ // Support: Android 4.0-4.3, Safari<=5.1
+ // Check state lost if the name is set (#11217)
+ // Support: Windows Web Apps (WWA)
+ // `name` and `type` must use .setAttribute for WWA (#14901)
+ input.setAttribute( "type", "radio" );
+ input.setAttribute( "checked", "checked" );
+ input.setAttribute( "name", "t" );
+
+ div.appendChild( input );
+
+ // Support: Safari<=5.1, Android<4.2
+ // Older WebKit doesn't clone checked state correctly in fragments
+ support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+ // Support: IE<=11+
+ // Make sure textarea (and checkbox) defaultValue is properly cloned
+ div.innerHTML = "";
+ support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
+} )();
+
+
+var
+ rkeyEvent = /^key/,
+ rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
+ rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
+
+function returnTrue() {
+ return true;
+}
+
+function returnFalse() {
+ return false;
+}
+
+// Support: IE9
+// See #13393 for more info
+function safeActiveElement() {
+ try {
+ return document.activeElement;
+ } catch ( err ) { }
+}
+
+function on( elem, types, selector, data, fn, one ) {
+ var origFn, type;
+
+ // Types can be a map of types/handlers
+ if ( typeof types === "object" ) {
+
+ // ( types-Object, selector, data )
+ if ( typeof selector !== "string" ) {
+
+ // ( types-Object, data )
+ data = data || selector;
+ selector = undefined;
+ }
+ for ( type in types ) {
+ on( elem, type, selector, data, types[ type ], one );
+ }
+ return elem;
+ }
+
+ if ( data == null && fn == null ) {
+
+ // ( types, fn )
+ fn = selector;
+ data = selector = undefined;
+ } else if ( fn == null ) {
+ if ( typeof selector === "string" ) {
+
+ // ( types, selector, fn )
+ fn = data;
+ data = undefined;
+ } else {
+
+ // ( types, data, fn )
+ fn = data;
+ data = selector;
+ selector = undefined;
+ }
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ } else if ( !fn ) {
+ return elem;
+ }
+
+ if ( one === 1 ) {
+ origFn = fn;
+ fn = function( event ) {
+
+ // Can use an empty set, since event contains the info
+ jQuery().off( event );
+ return origFn.apply( this, arguments );
+ };
+
+ // Use same guid so caller can remove using origFn
+ fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+ }
+ return elem.each( function() {
+ jQuery.event.add( this, types, fn, data, selector );
+ } );
+}
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+ global: {},
+
+ add: function( elem, types, handler, data, selector ) {
+
+ var handleObjIn, eventHandle, tmp,
+ events, t, handleObj,
+ special, handlers, type, namespaces, origType,
+ elemData = dataPriv.get( elem );
+
+ // Don't attach events to noData or text/comment nodes (but allow plain objects)
+ if ( !elemData ) {
+ return;
+ }
+
+ // Caller can pass in an object of custom data in lieu of the handler
+ if ( handler.handler ) {
+ handleObjIn = handler;
+ handler = handleObjIn.handler;
+ selector = handleObjIn.selector;
+ }
+
+ // Make sure that the handler has a unique ID, used to find/remove it later
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
+
+ // Init the element's event structure and main handler, if this is the first
+ if ( !( events = elemData.events ) ) {
+ events = elemData.events = {};
+ }
+ if ( !( eventHandle = elemData.handle ) ) {
+ eventHandle = elemData.handle = function( e ) {
+
+ // Discard the second event of a jQuery.event.trigger() and
+ // when an event is called after a page has unloaded
+ return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
+ jQuery.event.dispatch.apply( elem, arguments ) : undefined;
+ };
+ }
+
+ // Handle multiple events separated by a space
+ types = ( types || "" ).match( rnotwhite ) || [ "" ];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[ t ] ) || [];
+ type = origType = tmp[ 1 ];
+ namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
+
+ // There *must* be a type, no attaching namespace-only handlers
+ if ( !type ) {
+ continue;
+ }
+
+ // If event changes its type, use the special event handlers for the changed type
+ special = jQuery.event.special[ type ] || {};
+
+ // If selector defined, determine special event api type, otherwise given type
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+
+ // Update special based on newly reset type
+ special = jQuery.event.special[ type ] || {};
+
+ // handleObj is passed to all event handlers
+ handleObj = jQuery.extend( {
+ type: type,
+ origType: origType,
+ data: data,
+ handler: handler,
+ guid: handler.guid,
+ selector: selector,
+ needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+ namespace: namespaces.join( "." )
+ }, handleObjIn );
+
+ // Init the event handler queue if we're the first
+ if ( !( handlers = events[ type ] ) ) {
+ handlers = events[ type ] = [];
+ handlers.delegateCount = 0;
+
+ // Only use addEventListener if the special events handler returns false
+ if ( !special.setup ||
+ special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, eventHandle );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
+ }
+
+ // Add to the element's handler list, delegates in front
+ if ( selector ) {
+ handlers.splice( handlers.delegateCount++, 0, handleObj );
+ } else {
+ handlers.push( handleObj );
+ }
+
+ // Keep track of which events have ever been used, for event optimization
+ jQuery.event.global[ type ] = true;
+ }
+
+ },
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler, selector, mappedTypes ) {
+
+ var j, origCount, tmp,
+ events, t, handleObj,
+ special, handlers, type, namespaces, origType,
+ elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
+
+ if ( !elemData || !( events = elemData.events ) ) {
+ return;
+ }
+
+ // Once for each type.namespace in types; type may be omitted
+ types = ( types || "" ).match( rnotwhite ) || [ "" ];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[ t ] ) || [];
+ type = origType = tmp[ 1 ];
+ namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
+
+ // Unbind all events (on this namespace, if provided) for the element
+ if ( !type ) {
+ for ( type in events ) {
+ jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+ }
+ continue;
+ }
+
+ special = jQuery.event.special[ type ] || {};
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+ handlers = events[ type ] || [];
+ tmp = tmp[ 2 ] &&
+ new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
+
+ // Remove matching events
+ origCount = j = handlers.length;
+ while ( j-- ) {
+ handleObj = handlers[ j ];
+
+ if ( ( mappedTypes || origType === handleObj.origType ) &&
+ ( !handler || handler.guid === handleObj.guid ) &&
+ ( !tmp || tmp.test( handleObj.namespace ) ) &&
+ ( !selector || selector === handleObj.selector ||
+ selector === "**" && handleObj.selector ) ) {
+ handlers.splice( j, 1 );
+
+ if ( handleObj.selector ) {
+ handlers.delegateCount--;
+ }
+ if ( special.remove ) {
+ special.remove.call( elem, handleObj );
+ }
+ }
+ }
+
+ // Remove generic event handler if we removed something and no more handlers exist
+ // (avoids potential for endless recursion during removal of special event handlers)
+ if ( origCount && !handlers.length ) {
+ if ( !special.teardown ||
+ special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+
+ jQuery.removeEvent( elem, type, elemData.handle );
+ }
+
+ delete events[ type ];
+ }
+ }
+
+ // Remove data and the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ dataPriv.remove( elem, "handle events" );
+ }
+ },
+
+ dispatch: function( event ) {
+
+ // Make a writable jQuery.Event from the native event object
+ event = jQuery.event.fix( event );
+
+ var i, j, ret, matched, handleObj,
+ handlerQueue = [],
+ args = slice.call( arguments ),
+ handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],
+ special = jQuery.event.special[ event.type ] || {};
+
+ // Use the fix-ed jQuery.Event rather than the (read-only) native event
+ args[ 0 ] = event;
+ event.delegateTarget = this;
+
+ // Call the preDispatch hook for the mapped type, and let it bail if desired
+ if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+ return;
+ }
+
+ // Determine handlers
+ handlerQueue = jQuery.event.handlers.call( this, event, handlers );
+
+ // Run delegates first; they may want to stop propagation beneath us
+ i = 0;
+ while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
+ event.currentTarget = matched.elem;
+
+ j = 0;
+ while ( ( handleObj = matched.handlers[ j++ ] ) &&
+ !event.isImmediatePropagationStopped() ) {
+
+ // Triggered event must either 1) have no namespace, or 2) have namespace(s)
+ // a subset or equal to those in the bound event (both can have no namespace).
+ if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {
+
+ event.handleObj = handleObj;
+ event.data = handleObj.data;
+
+ ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
+ handleObj.handler ).apply( matched.elem, args );
+
+ if ( ret !== undefined ) {
+ if ( ( event.result = ret ) === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+ }
+ }
+ }
+
+ // Call the postDispatch hook for the mapped type
+ if ( special.postDispatch ) {
+ special.postDispatch.call( this, event );
+ }
+
+ return event.result;
+ },
+
+ handlers: function( event, handlers ) {
+ var i, matches, sel, handleObj,
+ handlerQueue = [],
+ delegateCount = handlers.delegateCount,
+ cur = event.target;
+
+ // Support (at least): Chrome, IE9
+ // Find delegate handlers
+ // Black-hole SVG instance trees (#13180)
+ //
+ // Support: Firefox<=42+
+ // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)
+ if ( delegateCount && cur.nodeType &&
+ ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) {
+
+ for ( ; cur !== this; cur = cur.parentNode || this ) {
+
+ // Don't check non-elements (#13208)
+ // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
+ if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) {
+ matches = [];
+ for ( i = 0; i < delegateCount; i++ ) {
+ handleObj = handlers[ i ];
+
+ // Don't conflict with Object.prototype properties (#13203)
+ sel = handleObj.selector + " ";
+
+ if ( matches[ sel ] === undefined ) {
+ matches[ sel ] = handleObj.needsContext ?
+ jQuery( sel, this ).index( cur ) > -1 :
+ jQuery.find( sel, this, null, [ cur ] ).length;
+ }
+ if ( matches[ sel ] ) {
+ matches.push( handleObj );
+ }
+ }
+ if ( matches.length ) {
+ handlerQueue.push( { elem: cur, handlers: matches } );
+ }
+ }
+ }
+ }
+
+ // Add the remaining (directly-bound) handlers
+ if ( delegateCount < handlers.length ) {
+ handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );
+ }
+
+ return handlerQueue;
+ },
+
+ // Includes some event props shared by KeyEvent and MouseEvent
+ props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " +
+ "metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " ),
+
+ fixHooks: {},
+
+ keyHooks: {
+ props: "char charCode key keyCode".split( " " ),
+ filter: function( event, original ) {
+
+ // Add which for key events
+ if ( event.which == null ) {
+ event.which = original.charCode != null ? original.charCode : original.keyCode;
+ }
+
+ return event;
+ }
+ },
+
+ mouseHooks: {
+ props: ( "button buttons clientX clientY offsetX offsetY pageX pageY " +
+ "screenX screenY toElement" ).split( " " ),
+ filter: function( event, original ) {
+ var eventDoc, doc, body,
+ button = original.button;
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == null && original.clientX != null ) {
+ eventDoc = event.target.ownerDocument || document;
+ doc = eventDoc.documentElement;
+ body = eventDoc.body;
+
+ event.pageX = original.clientX +
+ ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -
+ ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+ event.pageY = original.clientY +
+ ( doc && doc.scrollTop || body && body.scrollTop || 0 ) -
+ ( doc && doc.clientTop || body && body.clientTop || 0 );
+ }
+
+ // Add which for click: 1 === left; 2 === middle; 3 === right
+ // Note: button is not normalized, so don't use it
+ if ( !event.which && button !== undefined ) {
+ event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+ }
+
+ return event;
+ }
+ },
+
+ fix: function( event ) {
+ if ( event[ jQuery.expando ] ) {
+ return event;
+ }
+
+ // Create a writable copy of the event object and normalize some properties
+ var i, prop, copy,
+ type = event.type,
+ originalEvent = event,
+ fixHook = this.fixHooks[ type ];
+
+ if ( !fixHook ) {
+ this.fixHooks[ type ] = fixHook =
+ rmouseEvent.test( type ) ? this.mouseHooks :
+ rkeyEvent.test( type ) ? this.keyHooks :
+ {};
+ }
+ copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+ event = new jQuery.Event( originalEvent );
+
+ i = copy.length;
+ while ( i-- ) {
+ prop = copy[ i ];
+ event[ prop ] = originalEvent[ prop ];
+ }
+
+ // Support: Cordova 2.5 (WebKit) (#13255)
+ // All events should have a target; Cordova deviceready doesn't
+ if ( !event.target ) {
+ event.target = document;
+ }
+
+ // Support: Safari 6.0+, Chrome<28
+ // Target should not be a text node (#504, #13143)
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
+ return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
+ },
+
+ special: {
+ load: {
+
+ // Prevent triggered image.load events from bubbling to window.load
+ noBubble: true
+ },
+ focus: {
+
+ // Fire native event if possible so blur/focus sequence is correct
+ trigger: function() {
+ if ( this !== safeActiveElement() && this.focus ) {
+ this.focus();
+ return false;
+ }
+ },
+ delegateType: "focusin"
+ },
+ blur: {
+ trigger: function() {
+ if ( this === safeActiveElement() && this.blur ) {
+ this.blur();
+ return false;
+ }
+ },
+ delegateType: "focusout"
+ },
+ click: {
+
+ // For checkbox, fire native event so checked state will be right
+ trigger: function() {
+ if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {
+ this.click();
+ return false;
+ }
+ },
+
+ // For cross-browser consistency, don't fire native .click() on links
+ _default: function( event ) {
+ return jQuery.nodeName( event.target, "a" );
+ }
+ },
+
+ beforeunload: {
+ postDispatch: function( event ) {
+
+ // Support: Firefox 20+
+ // Firefox doesn't alert if the returnValue field is not set.
+ if ( event.result !== undefined && event.originalEvent ) {
+ event.originalEvent.returnValue = event.result;
+ }
+ }
+ }
+ }
+};
+
+jQuery.removeEvent = function( elem, type, handle ) {
+
+ // This "if" is needed for plain objects
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle );
+ }
+};
+
+jQuery.Event = function( src, props ) {
+
+ // Allow instantiation without the 'new' keyword
+ if ( !( this instanceof jQuery.Event ) ) {
+ return new jQuery.Event( src, props );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+
+ // Events bubbling up the document may have been marked as prevented
+ // by a handler lower down the tree; reflect the correct value.
+ this.isDefaultPrevented = src.defaultPrevented ||
+ src.defaultPrevented === undefined &&
+
+ // Support: Android<4.0
+ src.returnValue === false ?
+ returnTrue :
+ returnFalse;
+
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // Put explicitly provided properties onto the event object
+ if ( props ) {
+ jQuery.extend( this, props );
+ }
+
+ // Create a timestamp if incoming event doesn't have one
+ this.timeStamp = src && src.timeStamp || jQuery.now();
+
+ // Mark it as fixed
+ this[ jQuery.expando ] = true;
+};
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+ constructor: jQuery.Event,
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse,
+
+ preventDefault: function() {
+ var e = this.originalEvent;
+
+ this.isDefaultPrevented = returnTrue;
+
+ if ( e ) {
+ e.preventDefault();
+ }
+ },
+ stopPropagation: function() {
+ var e = this.originalEvent;
+
+ this.isPropagationStopped = returnTrue;
+
+ if ( e ) {
+ e.stopPropagation();
+ }
+ },
+ stopImmediatePropagation: function() {
+ var e = this.originalEvent;
+
+ this.isImmediatePropagationStopped = returnTrue;
+
+ if ( e ) {
+ e.stopImmediatePropagation();
+ }
+
+ this.stopPropagation();
+ }
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+// so that event delegation works in jQuery.
+// Do the same for pointerenter/pointerleave and pointerover/pointerout
+//
+// Support: Safari 7 only
+// Safari sends mouseenter too often; see:
+// https://code.google.com/p/chromium/issues/detail?id=470258
+// for the description of the bug (it existed in older Chrome versions as well).
+jQuery.each( {
+ mouseenter: "mouseover",
+ mouseleave: "mouseout",
+ pointerenter: "pointerover",
+ pointerleave: "pointerout"
+}, function( orig, fix ) {
+ jQuery.event.special[ orig ] = {
+ delegateType: fix,
+ bindType: fix,
+
+ handle: function( event ) {
+ var ret,
+ target = this,
+ related = event.relatedTarget,
+ handleObj = event.handleObj;
+
+ // For mouseenter/leave call the handler if related is outside the target.
+ // NB: No relatedTarget if the mouse left/entered the browser window
+ if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
+ event.type = handleObj.origType;
+ ret = handleObj.handler.apply( this, arguments );
+ event.type = fix;
+ }
+ return ret;
+ }
+ };
+} );
+
+jQuery.fn.extend( {
+ on: function( types, selector, data, fn ) {
+ return on( this, types, selector, data, fn );
+ },
+ one: function( types, selector, data, fn ) {
+ return on( this, types, selector, data, fn, 1 );
+ },
+ off: function( types, selector, fn ) {
+ var handleObj, type;
+ if ( types && types.preventDefault && types.handleObj ) {
+
+ // ( event ) dispatched jQuery.Event
+ handleObj = types.handleObj;
+ jQuery( types.delegateTarget ).off(
+ handleObj.namespace ?
+ handleObj.origType + "." + handleObj.namespace :
+ handleObj.origType,
+ handleObj.selector,
+ handleObj.handler
+ );
+ return this;
+ }
+ if ( typeof types === "object" ) {
+
+ // ( types-object [, selector] )
+ for ( type in types ) {
+ this.off( type, selector, types[ type ] );
+ }
+ return this;
+ }
+ if ( selector === false || typeof selector === "function" ) {
+
+ // ( types [, fn] )
+ fn = selector;
+ selector = undefined;
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ }
+ return this.each( function() {
+ jQuery.event.remove( this, types, fn, selector );
+ } );
+ }
+} );
+
+
+var
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,
+
+ // Support: IE 10-11, Edge 10240+
+ // In IE/Edge using regex groups here causes severe slowdowns.
+ // See https://connect.microsoft.com/IE/feedback/details/1736512/
+ rnoInnerhtml = /
+
+ Tanggung Jawab Lowongan
+ { !this.state.loading &&
+ }
+
+
+
+ Keuntungan
+ { !this.state.loading && }
+
+
+ Persyaratan
+ { !this.state.loading &&
+ }
+
+
+
+
+
+
(
-
- {this.props.children}
-
+
{this.props.children}
- )
+ );
}
-
diff --git a/assets/js/EditProfile.jsx b/assets/js/EditProfile.jsx
new file mode 100644
index 0000000000000000000000000000000000000000..28fb93b7d59ed402bedc6da38a9abde964185064
--- /dev/null
+++ b/assets/js/EditProfile.jsx
@@ -0,0 +1,429 @@
+import React from 'react';
+import { Segment, Image, Header, Icon, Checkbox, Button, Form } from 'semantic-ui-react';
+import Server from './lib/Server';
+import Storage from './lib/Storage';
+import ModalAlert from './components/ModalAlert';
+import Dumper from './lib/Dumper';
+
+export default class ProfilePage extends React.Component {
+
+ static propTypes = {
+ route: React.PropTypes.object.isRequired,
+ params: React.PropTypes.object.isRequired,
+ user: React.PropTypes.object.isRequired,
+ };
+
+ constructor(props) {
+ super(props);
+ /* istanbul ignore next */
+ this.state = {
+ id: '',
+ npm: '',
+ name: '',
+ major: '',
+ batch: '',
+ email: '',
+ gender: '',
+ region: '',
+ cityOfBirth: '',
+ dateOfBirth: '',
+ resume: '',
+ phone_number: '',
+ portfolio_link: '',
+ show_transcript: '',
+ photo: '',
+ age: '',
+ intro: '',
+ expected_salary: '',
+ job_seeking_status: '',
+ volunteer: '',
+ skills: '',
+ form: {
+ picture: '',
+ email: '',
+ phone_number: '',
+ gender: '',
+ region: '',
+ skills: '',
+ resume: '',
+ portfolio_link: '',
+ show_transcript: '',
+ volunteer: '',
+ intro: '',
+ job_seeking_status: '',
+ latest_work: '',
+ latest_work_desc: '',
+ github_url: '',
+ awards: '',
+ },
+ bagikanTranskrip: '',
+ acceptedNo: 0,
+ readNo: 0,
+ refresh: 1,
+ loading: false,
+ linkedin_url: '',
+ hackerrank_url: '',
+ self_description: '',
+ student_gpa: 0.0,
+ website_url: '',
+ latest_work: '',
+ latest_work_desc: '',
+ github_url: '',
+ awards: '',
+ };
+ this.getProfile = this.getProfile.bind(this);
+ this.handleChange = this.handleChange.bind(this);
+ this.handleCheckbox = this.handleCheckbox.bind(this);
+ this.handleSubmit = this.handleSubmit.bind(this);
+ this.handleFile = this.handleFile.bind(this);
+ this.gotoLink = this.gotoLink.bind(this);
+ this.gotoStudentResume = this.gotoStudentResume.bind(this);
+ this.gotoStudentTranscript = this.gotoStudentTranscript.bind(this);
+ this.getProfile();
+ }
+
+ getProfile() {
+ const id = this.props.route.own ? this.props.user.data.student.id : this.props.params.id;
+ return Server.get(`/students/${id}/`).then((data) => {
+ this.setState({
+ id: data.id,
+ name: data.name,
+ npm: data.npm,
+ resume: data.resume,
+ major: data.major,
+ batch: data.batch,
+ email: data.user.email,
+ gender: data.gender,
+ region: data.region,
+ cityOfBirth: data.birth_place,
+ dateOfBirth: this.parseIndonesianDateFormat(data.birth_date),
+ phone_number: data.phone_number,
+ portfolio_link: data.portfolio_link,
+ photo: data.photo,
+ show_transcript: data.show_transcript,
+ acceptedNo: data.accepted_no,
+ readNo: data.read_no,
+ bagikanTranskrip: data.show_transcript,
+ refresh: this.state.refresh + 1,
+ age: data.age,
+ intro: data.intro,
+ expected_salary: data.expected_salary,
+ job_seeking_status: data.job_seeking_status,
+ volunteer: data.volunteer,
+ linkedin_url: data.linkedin_url,
+ hackerrank_url: data.hackerrank_url,
+ self_description: data.self_description,
+ student_gpa: data.student_gpa,
+ website_url: data.website_url,
+ latest_work: data.latest_work,
+ latest_work_desc: data.latest_work_desc,
+ skills: data.skills,
+ github_url: data.github_url,
+ awards: data.awards,
+ });
+ if (this.props.route.own) {
+ const newSession = this.props.user.data;
+ newSession.student = data;
+ Storage.set('user-data', newSession);
+ window.scrollTo(0, 0);
+ }
+ }, error => error.then(() => {
+ this.state.name = 'Gagal mendapatkan informasi';
+ }));
+ }
+
+ isFromGithubLinkValid = () => {
+ var github_link = this.state.form.github_url;
+ if (github_link == null) return;
+ return github_link.includes("https://github.com/");
+ }
+
+ parseIndonesianDateFormat(dateIndex) {
+ const monthNameIndex = {
+ '01': 'Januarxi',
+ '02': 'Februari',
+ '03': 'Maret',
+ '04': 'April',
+ '05': 'Mei',
+ '06': 'Juni',
+ '07': 'Juli',
+ '08': 'Agustus',
+ '09': 'September',
+ '10': 'Oktober',
+ '11': 'November',
+ '12': 'Desember',
+ };
+
+ const dateIndexArray = dateIndex.split('-');
+ dateIndexArray[1] = monthNameIndex[dateIndexArray[1]];
+
+ return dateIndexArray.reverse().join(' ');
+ }
+
+ handleSubmit = (e) => {
+ e.preventDefault();
+ if (!this.isFromGithubLinkValid()) {
+ alert("Pastikan link github yang anda tulis benar. (Berpola : https://github.com/");
+ return;
+ }
+
+ const submitForm = {};
+ Object.keys(this.state.form).forEach((key) => {
+ if (this.state.form[key] !== '') {
+ submitForm[key] = this.state.form[key];
+ }
+ });
+ this.setState({ loading: true });
+ Server.submit(`/students/${this.state.id}/profile/`, submitForm, 'PATCH').then(() => {
+ this.setState({ loading: false });
+ this.modalAlert.open('Profil berhasil diperbaharui', 'Silakan periksa kembali profil anda', this.getProfile);
+ }, error => error.then((r) => {
+ this.setState({ loading: false });
+ this.modalAlert.open('Pembaharuan profil gagal', Dumper.dump(r));
+ }));
+ };
+
+ handleFile = (e) => {
+ const form = this.state.form;
+ form[e.target.name] = e.target.files[0];
+ this.setState({ form });
+ };
+
+ handleChange = (e) => {
+ const form = this.state.form;
+ form[e.target.name] = e.target.value;
+ this.setState({ form });
+ };
+
+ handleCheckbox = (e, d) => {
+ const form = this.state.form;
+ form[d.name] = d.checked;
+ this.setState({ form, show_transcript: d.checked });
+ };
+
+ handleRadioGender = (e, {value}) => {
+ const form = this.state.form;
+ form.gender = value;
+ this.setState({ form })
+ }
+
+ handleRadio = (e, { value }) => {
+ const form = this.state.form;
+ form.job_seeking_status = value;
+ this.setState({ form });
+ }
+
+ gotoLink = (url) => {
+ const win = window.open(url);
+ win.focus();
+ };
+
+ gotoStudentResume = () => this.gotoLink(this.state.resume || '#');
+
+ gotoStudentTranscript = () => this.gotoLink(`transkrip/${this.state.id}`);
+
+ updateForm(show){
+ if (show) {
+ return (
+
+
+
+
+ Edit Profile Page
+
+
+ { this.modalAlert = modal; }} />
+
+ Profile Picture
+
+
+
+ Email
+
+
+
+ No. Hp
+
+
+
+ Jenis Kelamin
+
+
+
+
+ Deskripsi Diri
+
+
+
+ URL Profile LinkedIn
+
+
+
+ URL Profile Hackerrank
+
+
+
+ Portfolio Link
+
+
+
+ Website URL
+
+
+
+ URL Profile Github
+
+
+
+ Region
+
+
+
+ Skills
+
+
+
+ Latest Working Experience
+
+
+
+ Latest Working Experience Description
+
+
+
+ Awards and Achievements
+
+
+
+ Resume
+
+
+
+ Expected Salary
+
+
+
+ Intro
+
+
+
+ Volunteering Experience
+
+
+
+ Status Pencarian Kerja
+
+
+
+
+
+
+
+ GPA
+
+
+
+ Submit
+
+
+ );
+ }
+
+ return (
);
+ }
+
+ render() {
+ return (
+
+ { this.updateForm(this.props.route.own) }
+
+ );
+ }
+}
\ No newline at end of file
diff --git a/assets/js/FeedbackPage.jsx b/assets/js/FeedbackPage.jsx
new file mode 100644
index 0000000000000000000000000000000000000000..b18cd44d9d3f902f1dc145f568aa53c3f1dfdc22
--- /dev/null
+++ b/assets/js/FeedbackPage.jsx
@@ -0,0 +1,58 @@
+import React, { Component } from 'react';
+import {
+ Button, Container, Form, TextArea,
+} from 'semantic-ui-react';
+import Server from './lib/Server';
+import ModalAlert from './components/ModalAlert';
+import ModalSuccess from './components/ModalSuccess';
+
+
+class FeedbackPage extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {};
+ this.handleChange = this.handleChange.bind(this);
+ this.handleSubmit = this.handleSubmit.bind(this);
+ }
+
+
+ handleChange = (e) => {
+ this.setState({ [e.target.name]: e.target.value });
+ };
+
+ handleSubmit = (e) => {
+ e.preventDefault();
+
+ Server.submit('/feedbacks/', this.state).then(() => {
+ this.modalSuccess.open('Berhasil mengirim umpan balik');
+ }, (error) => error.then(() => {
+ this.modalAlert.open('Gagal mengirim umpan balik');
+ }));
+ };
+
+ render() {
+ return (
+
+ { this.modalAlert = modal; }} />
+ { this.modalSuccess = modal; }} />
+ Berikan Umpan Balik
+ Silahkan berikan umpan balik atas layanan yang disediakan oleh KaPe
+
+ {/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}
+ Judul
+
+
+
+ {/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}
+ Umpan Balik
+
+
+ Simpan
+
+
+ );
+ }
+}
+
+export default FeedbackPage;
diff --git a/assets/js/Login.jsx b/assets/js/Login.jsx
old mode 100644
new mode 100755
index 236ecfa86861dc64029f838a17872b735e9b93a2..427149a0c599d5b86db0716eb6306603de8cb51b
--- a/assets/js/Login.jsx
+++ b/assets/js/Login.jsx
@@ -1,11 +1,19 @@
import React from 'react';
-import { Grid, Segment, Header, Card, Image } from 'semantic-ui-react';
+import { Grid, Segment, Header, Card, Image, Button } from 'semantic-ui-react';
import LoginForm from './components/LoginForm';
import CompanyRegisterModal from './components/CompanyRegisterModal';
import Footer from './components/Footer';
+import InfoModal from './components/InfoModal';
export default class Login extends React.Component {
+ constructor() {
+ super();
+ this.state = {
+ activeForm: 'user',
+ };
+ }
+
static defaultProps = {
children: null,
};
@@ -17,33 +25,52 @@ export default class Login extends React.Component {
]),
};
+ renderForm() {
+ if (this.state.activeForm == 'company') {
+ return (
+
+
+ {this.props.children}
+
+ this.setState({activeForm : 'user'})}> Login as User
+
+
+ )
+ } else if (this.state.activeForm == 'user') {
+ return (
+
+
+ {this.props.children}
+
+ this.setState({activeForm : 'company'})}> Login as Company
+
+
+ )
+ }
+ }
+
render = () => (
-
+
-
- Kanal Akses Pendaftaran KP Elektronik
-
+ Kanal Akses Pendaftaran KP Elektronik
+ TEST
-
-
- {this.props.children}
-
-
-
-
-
-
- {this.props.children}
-
-
+ {this.renderForm()}
+
-
+
@@ -60,6 +87,5 @@ export default class Login extends React.Component {
- )
+ );
}
-
diff --git a/assets/js/ProfilePage.jsx b/assets/js/ProfilePage.jsx
old mode 100644
new mode 100755
index a9c0fc9f29dbfc420d46ed7f1090672f04d5e391..fe3c370056be8d4d294ad518334af073d64e2d75
--- a/assets/js/ProfilePage.jsx
+++ b/assets/js/ProfilePage.jsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { Segment, Image, Header, Icon, Checkbox, Container, Button, Form, Grid } from 'semantic-ui-react';
+import { Segment, Image, Header, Icon, Checkbox, Container, Button, Form, Grid, Message } from 'semantic-ui-react';
import Server from './lib/Server';
import Storage from './lib/Storage';
import ModalAlert from './components/ModalAlert';
@@ -23,23 +23,53 @@ export default class ProfilePage extends React.Component {
major: '',
batch: '',
email: '',
+ gender: '',
+ region: '',
cityOfBirth: '',
dateOfBirth: '',
resume: '',
phone_number: '',
+ portfolio_link: '',
show_transcript: '',
photo: '',
+ age: '',
+ intro: '',
+ expected_salary: '',
+ job_seeking_status: '',
+ volunteer: '',
+ skills: '',
form: {
picture: '',
email: '',
phone_number: '',
+ gender: '',
+ region: '',
+ skills: '',
resume: '',
+ portfolio_link: '',
show_transcript: '',
+ volunteer: '',
+ intro: '',
+ job_seeking_status: '',
+ latest_work: '',
+ latest_work_desc: '',
+ github_url: '',
+ awards: '',
},
bagikanTranskrip: '',
acceptedNo: 0,
+ readNo: 0,
refresh: 1,
loading: false,
+ linkedin_url: '',
+ hackerrank_url: '',
+ self_description: '',
+ student_gpa: 0.0,
+ website_url: '',
+ latest_work: '',
+ latest_work_desc: '',
+ github_url: '',
+ awards: '',
};
this.getProfile = this.getProfile.bind(this);
this.handleChange = this.handleChange.bind(this);
@@ -63,14 +93,33 @@ export default class ProfilePage extends React.Component {
major: data.major,
batch: data.batch,
email: data.user.email,
+ gender: data.gender,
+ region: data.region,
cityOfBirth: data.birth_place,
- dateOfBirth: data.birth_date,
+ dateOfBirth: this.parseIndonesianDateFormat(data.birth_date),
phone_number: data.phone_number,
+ portfolio_link: data.portfolio_link,
photo: data.photo,
show_transcript: data.show_transcript,
acceptedNo: data.accepted_no,
+ readNo: data.read_no,
bagikanTranskrip: data.show_transcript,
refresh: this.state.refresh + 1,
+ age: data.age,
+ intro: data.intro,
+ expected_salary: data.expected_salary,
+ job_seeking_status: data.job_seeking_status,
+ volunteer: data.volunteer,
+ linkedin_url: data.linkedin_url,
+ hackerrank_url: data.hackerrank_url,
+ self_description: data.self_description,
+ student_gpa: data.student_gpa,
+ website_url: data.website_url,
+ latest_work: data.latest_work,
+ latest_work_desc: data.latest_work_desc,
+ skills: data.skills,
+ github_url: data.github_url,
+ awards: data.awards,
});
if (this.props.route.own) {
const newSession = this.props.user.data;
@@ -82,9 +131,41 @@ export default class ProfilePage extends React.Component {
this.state.name = 'Gagal mendapatkan informasi';
}));
}
+
+ isFromGithubLinkValid = () => {
+ var github_link = this.state.form.github_url;
+ if (github_link == null) return;
+ return github_link.includes("https://github.com/");
+ }
+
+ parseIndonesianDateFormat(dateIndex) {
+ const monthNameIndex = {
+ '01': 'Januarxi',
+ '02': 'Februari',
+ '03': 'Maret',
+ '04': 'April',
+ '05': 'Mei',
+ '06': 'Juni',
+ '07': 'Juli',
+ '08': 'Agustus',
+ '09': 'September',
+ '10': 'Oktober',
+ '11': 'November',
+ '12': 'Desember',
+ };
+
+ const dateIndexArray = dateIndex.split('-');
+ dateIndexArray[1] = monthNameIndex[dateIndexArray[1]];
+
+ return dateIndexArray.reverse().join(' ');
+ }
handleSubmit = (e) => {
e.preventDefault();
+ if (!this.isFromGithubLinkValid()) {
+ alert("Pastikan link github yang anda tulis benar. (Berpola : https://github.com/");
+ return;
+ }
const submitForm = {};
Object.keys(this.state.form).forEach((key) => {
@@ -102,7 +183,6 @@ export default class ProfilePage extends React.Component {
}));
};
-
handleFile = (e) => {
const form = this.state.form;
form[e.target.name] = e.target.files[0];
@@ -121,6 +201,18 @@ export default class ProfilePage extends React.Component {
this.setState({ form, show_transcript: d.checked });
};
+ handleRadioGender = (e, {value}) => {
+ const form = this.state.form;
+ form.gender = value;
+ this.setState({ form })
+ }
+
+ handleRadio = (e, { value }) => {
+ const form = this.state.form;
+ form.job_seeking_status = value;
+ this.setState({ form });
+ }
+
gotoLink = (url) => {
const win = window.open(url);
win.focus();
@@ -130,7 +222,7 @@ export default class ProfilePage extends React.Component {
gotoStudentTranscript = () => this.gotoLink(`transkrip/${this.state.id}`);
- updateForm(show) {
+ updateForm(show){
if (show) {
return (
@@ -148,16 +240,158 @@ export default class ProfilePage extends React.Component {
Email
-
+
No. Hp
-
+
+
+
+ Jenis Kelamin
+
+
+
+
+ Deskripsi Diri
+
+
+
+ URL Profile LinkedIn
+
+
+
+ URL Profile Hackerrank
+
+
+
+ Portfolio Link
+
+
+
+ Website URL
+
+
+
+ URL Profile Github
+
+
+
+ Region
+
+
+
+ Skills
+
+
+
+ Latest Working Experience
+
+
+
+ Latest Working Experience Description
+
+
+
+ Awards and Achievements
+
Resume
+
+ Expected Salary
+
+
+
+ Intro
+
+
+
+ Volunteering Experience
+
+
+
+ Status Pencarian Kerja
+
+
+
+
+ GPA
+
+
+
Submit
@@ -192,7 +436,7 @@ export default class ProfilePage extends React.Component {
- { this.state.name }
+ {this.state.name}
@@ -201,19 +445,18 @@ export default class ProfilePage extends React.Component {
- { this.state.major || 'N/A' }, { this.state.batch || 'N/A' }
+ {this.state.major || 'N/A'}, {this.state.batch || 'N/A'}
-
- { this.state.email || 'N/A' }
+ {this.state.email || 'N/A'}
@@ -224,7 +467,29 @@ export default class ProfilePage extends React.Component {
- { this.state.phone_number || 'N/A' }
+ {this.state.phone_number || 'N/A'}
+
+
+
+
+
+
+
+
+
+
+ {this.state.portfolio_link || 'N/A'}
+
+
+
+
+
+
+
+
+
+
+ { this.state.gender || 'N/A' }
@@ -235,12 +500,189 @@ export default class ProfilePage extends React.Component {
- { this.state.cityOfBirth || 'N/A' }, { this.state.dateOfBirth || 'N/A' }
+ {this.state.cityOfBirth || 'N/A'}, {this.state.dateOfBirth || 'N/A'}
+
+
+
+
+
+
+
+
+
+
+ { this.state.self_description || 'N/A' }
+
+
+
+
+
+
+
+
+
+
+ {this.state.linkedin_url || 'N/A'}
+
+
+
+
+
+
+
+
+
+
+ {this.state.hackerrank_url || 'N/A'}
+
+
+
+
+
+
+
+
+
+
+ {this.state.student_gpa || 'null'}
+
+
+
+
+
+
+
+
+
+
+ {this.state.website_url || 'N/A'}
+
+
+
+
+
+
+
+
+
+ {
+ this.state.github_url ?
+ { this.state.github_url } :
+ N/A
+ }
+
+
+
+
+
+
+
+ {this.state.region || 'N/A'}
+
+
+
+
+
+
+
+
+
+ {this.state.skills || 'Skills belum ditambahkan'}
+
+
+
+
+
+
+
+
+
+ Latest working experience as: {this.state.latest_work || 'N/A'}
+ Description: {this.state.latest_work_desc || 'N/A'}
+
+
+
+
+
+
+
+
+
+
+ { this.state.expected_salary || 'N/A' }
+
+
+
+
+
+
+
+
+
+
+ {this.state.volunteer || 'N/A'}
+
+
+
+
+
+
+
+
+
+
+ {this.state.awards || 'Awards belum ditambahkan'}
+
+
+
+
+
+
+
+ Age
+
+
+ {this.state.age + ' years' || 'N/A'}
+
+
+
+
+
+
+
+
+
+
+
+
+ { this.state.region || 'N/A' }
+ Intro
+
+
+ {this.state.intro || 'N/A'}
+
+
+
+
+
+
+
+ Intro
+
+
+ { this.state.intro || 'N/A' }
+
+ Jumlah lamaran diterima: {this.state.acceptedNo || '0' }
+
+
+ Jumlah lamaran dibaca perusahaan: {this.state.readNo || '0'}
+
+
Resume
@@ -248,15 +690,37 @@ export default class ProfilePage extends React.Component {
-
Bagikan Transkrip : { this.state.bagikanTranskrip ? 'Ya' : 'Tidak' }
+ Bagikan Transkrip : {this.state.bagikanTranskrip ? 'Ya' : 'Tidak'}
-
+
-
- { this.updateForm(this.props.route.own) }
+
+
+
+
+
+
+ Status Mencari Pekerjaan
+
+
+
+
{ this.state.job_seeking_status === 'Active' ?
+
+ Sedang mencari pekerjaan
+ Saya sedang mencari pekerjaan sekarang dan saya terbuka untuk
+ mendapat informasi mengenai lowongan kerja.
+ :
+ Tidak mencari pekerjaan
+ Saya sedang tidak mencari pekerjaan. Mohon jangan kirimkan
+ informasi mengenai lowongan pekerjaan.
+ }
+
+
+
+ {/* { this.updateForm(this.props.route.own) } */}
);
}
-}
+}
\ No newline at end of file
diff --git a/assets/js/SupervisorPage.jsx b/assets/js/SupervisorPage.jsx
old mode 100644
new mode 100755
index 3b9edbe20f2e24509eadfc0fd30eb7ffe38c8f7a..1aa981cf3d358016ad2a82cacd89455a26f7ae16
--- a/assets/js/SupervisorPage.jsx
+++ b/assets/js/SupervisorPage.jsx
@@ -7,6 +7,7 @@ import ApplicationList from './components/ApplicationList';
const cols = [
{ key: 'StudentName', label: 'Nama' },
{ key: 'StudentID', label: 'NPM' },
+ { key: 'Major', label: 'Major' },
{ key: 'Perusahaan', label: 'Perusahaan' },
{ key: 'Posisi', label: 'Posisi' },
{ key: 'Status', label: 'Status' },
diff --git a/assets/js/TranscriptPage.jsx b/assets/js/TranscriptPage.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/VacancyPage.jsx b/assets/js/VacancyPage.jsx
old mode 100644
new mode 100755
index 28e3f52cadeffc3b6ed6ca0402655052ba91c5e9..a9731a1d126288d22362f33b6d24a47b31890a5c
--- a/assets/js/VacancyPage.jsx
+++ b/assets/js/VacancyPage.jsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { Segment, Button } from 'semantic-ui-react';
+import { Segment, Button, Dropdown, Container } from 'semantic-ui-react';
import { Link } from 'react-router';
import Tabs from './components/Tabs';
import Pane from './components/Pane';
@@ -31,7 +31,13 @@ export default class VacancyPage extends React.Component {
this.state = {
vacancies: [],
id: VacancyPage.getId(this.props.user),
+ sort: '',
+ sortBy: [
+ { key: 'ASC', text: 'Ascending', value: 'ASC' },
+ { key: 'DESC', text: 'Descending', value: 'DESC' }
+ ]
};
+ this.handleChange = this.handleChange.bind(this);
}
@@ -48,6 +54,7 @@ export default class VacancyPage extends React.Component {
user={this.props.user}
key={1}
userId={this.state.id}
+ sort={this.state.sort}
/>
}
/>
@@ -78,6 +85,19 @@ export default class VacancyPage extends React.Component {
}
/>
+
+
+ }
+ />
+
);
} else if ((this.props.user.role === 'admin' && this.props.user.data.company != null)
@@ -154,9 +174,24 @@ export default class VacancyPage extends React.Component {
return '';
}
+ handleChange = (e, data) => {
+ this.setState({ sort: data.value });
+ };
+
render() {
+ console.log(this.props.user)
return (
+
+
+
+
{this.props.user.role === 'student' || (
{ this.companyHeader() }
diff --git a/assets/js/__test__/ApplicantPage-test.jsx b/assets/js/__test__/ApplicantPage-test.jsx
old mode 100644
new mode 100755
index e2c9d00d87be3cda180e83999daf0e2c431e8c74..a193486e3d87ef1561bd977f373c5cac8b0e73ec
--- a/assets/js/__test__/ApplicantPage-test.jsx
+++ b/assets/js/__test__/ApplicantPage-test.jsx
@@ -2,9 +2,9 @@ import React from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import fetchMock from 'fetch-mock';
import ApplicantPage from '../ApplicantPage';
+import Tabs from '../components/Tabs';
describe('ApplicantPage', () => {
-
const companyUser = {
role: 'company',
data: {
@@ -23,7 +23,8 @@ describe('ApplicantPage', () => {
name: 'Tutuplapak',
created: '2017-03-28T07:30:10.535000Z',
updated: '2017-03-28T07:30:10.535000Z',
- description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
+ description:
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
verified: true,
logo: 'http://localhost:8001/files/company-logo/8a258a48-3bce-4873-b5d1-538b360d0059.png',
address: 'Jl. Kebayoran Baru nomor 13, Jakarta Barat',
@@ -46,7 +47,8 @@ describe('ApplicantPage', () => {
name: 'Tutuplapak',
created: '2017-03-28T07:30:10.535240Z',
updated: '2017-05-07T13:22:19.175033Z',
- description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
+ description:
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
registeredStatus: 1,
logo: null,
address: 'Jl. Kebayoran Baru nomor 13, Jakarta Barat',
@@ -74,7 +76,8 @@ describe('ApplicantPage', () => {
name: 'Tutuplapak',
created: '2017-03-28T07:30:10.535240Z',
updated: '2017-05-07T13:22:19.175033Z',
- description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
+ description:
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
registeredStatus: 1,
logo: 'http://localhost:8000/files/company-logo/8a258a48-3bce-4873-b5d1-538b360d0059.png',
address: 'Jl. Kebayoran Baru nomor 13, Jakarta Barat',
@@ -102,7 +105,8 @@ describe('ApplicantPage', () => {
name: 'Tutuplapak',
created: '2017-03-28T07:30:10.535240Z',
updated: '2017-05-07T13:22:19.175033Z',
- description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
+ description:
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
registeredStatus: 1,
logo: null,
address: 'Jl. Kebayoran Baru nomor 13, Jakarta Barat',
@@ -130,7 +134,8 @@ describe('ApplicantPage', () => {
name: 'Tutuplapak',
created: '2017-03-28T07:30:10.535240Z',
updated: '2017-05-07T13:22:19.175033Z',
- description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
+ description:
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
registeredStatus: 1,
logo: null,
address: 'Jl. Kebayoran Baru nomor 13, Jakarta Barat',
@@ -158,7 +163,8 @@ describe('ApplicantPage', () => {
name: 'Tutuplapak',
created: '2017-03-28T07:30:10.535240Z',
updated: '2017-05-07T13:22:19.175033Z',
- description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
+ description:
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
registeredStatus: 1,
logo: null,
address: 'Jl. Kebayoran Baru nomor 13, Jakarta Barat',
@@ -177,29 +183,32 @@ describe('ApplicantPage', () => {
];
it('renders for companies without problem', () => {
- const applicantPage = ReactTestUtils.renderIntoDocument(
-
);
+ const applicantPage = ReactTestUtils.renderIntoDocument(
);
expect(applicantPage).to.exist;
});
+ it('renders all status tabs', () => {
+ const applicantPage = ReactTestUtils.renderIntoDocument(
);
+ const paginationTabs = ReactTestUtils.findRenderedComponentWithType(applicantPage, Tabs);
+ expect(paginationTabs.props.children.length).to.equal(7);
+ });
+
it('handle dropdown changes without problem', () => {
fetchMock.get('*', newResponse);
- const applicantPage = ReactTestUtils.renderIntoDocument(
-
);
- const dropdown = ReactTestUtils.findRenderedDOMComponentWithTag(applicantPage, 'select');
+ const applicantPage = ReactTestUtils.renderIntoDocument(
);
+ const dropdown = ReactTestUtils.findRenderedDOMComponentWithClass(applicantPage, 'selection');
ReactTestUtils.Simulate.change(dropdown);
- applicantPage.handleChange({}, {value: 'pilih'});
+ applicantPage.handleChange({}, { value: 'pilih' });
expect(applicantPage).to.exist;
fetchMock.restore();
});
it('handle dropdown changes without problem', () => {
fetchMock.get('*', 404);
- const applicantPage = ReactTestUtils.renderIntoDocument(
-
);
- const dropdown = ReactTestUtils.findRenderedDOMComponentWithTag(applicantPage, 'select');
+ const applicantPage = ReactTestUtils.renderIntoDocument(
);
+ const dropdown = ReactTestUtils.findRenderedDOMComponentWithClass(applicantPage, 'selection');
ReactTestUtils.Simulate.change(dropdown);
- applicantPage.handleChange({}, {value: 'pilih'});
+ applicantPage.handleChange({}, { value: 'pilih' });
expect(applicantPage).to.exist;
fetchMock.restore();
});
diff --git a/assets/js/__test__/CompanyPage-test.jsx b/assets/js/__test__/CompanyPage-test.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/__test__/CompanyProfile-test.jsx b/assets/js/__test__/CompanyProfile-test.jsx
old mode 100644
new mode 100755
index 8e80e7babb36f63eb064199fdd0f2b3e3b7b6e72..073ec50c9c5882a36e89a1f86ae090daf953aa8d
--- a/assets/js/__test__/CompanyProfile-test.jsx
+++ b/assets/js/__test__/CompanyProfile-test.jsx
@@ -2,7 +2,7 @@ import React from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import CompanyProfile from '../CompanyProfile';
-const companyUser = {
+const companyUserVerified = {
role: 'company',
data: {
url: 'http://localhost:8001/api/users/8/',
@@ -24,6 +24,8 @@ const companyUser = {
verified: true,
logo: 'http://localhost:8001/files/company-logo/8a258a48-3bce-4873-b5d1-538b360d0059.png',
address: 'Jl. Kebayoran Baru nomor 13, Jakarta Barat',
+ category: 'Belum ada kategori perusahaan',
+ website: 'Belum ada link website'
},
supervisor: null,
student: null,
@@ -33,7 +35,40 @@ const companyUser = {
describe('CompanyProfile', () => {
it('renders without problem', () => {
const companyProfile = ReactTestUtils.renderIntoDocument(
-
);
+
);
expect(companyProfile).to.exist;
});
-});
+
+ it('renders Doughnut chart without problem', () => {
+ const companyProfile = ReactTestUtils.renderIntoDocument(
+
);
+ const chart = ReactTestUtils.scryRenderedDOMComponentsWithTag(companyProfile, 'Doughnut');
+ expect(chart).to.exist;
+ });
+
+ it('get company\'s profile without problem', () => {
+ const profile = ReactTestUtils.renderIntoDocument(
+
);
+ expect(profile.state.id).to.equal(companyUserVerified.data.company.id);
+ profile.getProfile().then(()=> {
+ expect(profile.state.name).to.equal(companyUserVerified.data.company.name);
+ expect(profile.state.address).to.equal(companyUserVerified.data.company.address);
+ expect(profile.state.category).to.equal(companyUserVerified.data.company.category);
+ expect(profile.state.description).to.equal(companyUserVerified.data.company.description);
+ expect(profile.state.website).to.equal(companyUserVerified.data.company.website);
+ expect(profile.state.logo).to.equal(companyUserVerified.data.company.logo);
+ });
+ });
+
+ it('submit edit form of verified company without problem', () => {
+ const profile = ReactTestUtils.renderIntoDocument(
+
);
+ profile.state.form = {name:'Restopedia', address:'Bulan', description:'Martabak Tilaar', website:'www.uenak.com'};
+ const submitButton = ReactTestUtils.scryRenderedDOMComponentsWithTag(profile, 'Input')[1];
+ ReactTestUtils.Simulate.click(submitButton);
+
+ const form = ReactTestUtils.findRenderedDOMComponentWithTag(profile, 'Form');
+ ReactTestUtils.Simulate.submit(form);
+ });
+
+});
\ No newline at end of file
diff --git a/assets/js/__test__/CreateVacancy-test.jsx b/assets/js/__test__/CreateVacancy-test.jsx
old mode 100644
new mode 100755
index 7cdc39c75abcbfd52dbf2d134c2755f92acc724b..f6e8e2277701d680a9c337663980edcc444943ee
--- a/assets/js/__test__/CreateVacancy-test.jsx
+++ b/assets/js/__test__/CreateVacancy-test.jsx
@@ -24,6 +24,10 @@ describe('CreateVacancy', () => {
updated: '2017-03-28T07:30:10.535000Z',
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
verified: true,
+ benefits: 'Makan siang gratis, Waktu kerja fleksibel, Asuransi kesehatan, Liburan berbayar',
+ working_period: '5 hari',
+ max_accepted_applicants: 10,
+ salary: 5000000,
logo: 'http://localhost:8001/files/company-logo/8a258a48-3bce-4873-b5d1-538b360d0059.png',
address: 'Jl. Kebayoran Baru nomor 13, Jakarta Barat',
},
@@ -71,6 +75,9 @@ describe('CreateVacancy', () => {
createVacancy.setState({
name: 'stub',
description: 'stub',
+ benefits: 'stub',
+ requirements: 'stub',
+ responsibilities: 'stub',
});
createVacancy.handleChange({ target: { name: 'test', value: 'hue' } });
expect(createVacancy.state.test).to.equal('hue');
@@ -87,6 +94,9 @@ describe('CreateVacancy', () => {
createVacancy.setState({
name: 'stub',
description: 'stub',
+ benefits: 'stub',
+ requirements: 'stub',
+ responsibilities: 'stub',
});
const openField = ReactTestUtils.findRenderedDOMComponentWithClass(createVacancy, 'open-time-field');
@@ -112,6 +122,9 @@ describe('CreateVacancy', () => {
createVacancy.setState({
name: 'stub',
description: 'stub',
+ benefits: 'stub',
+ requirements: 'stub',
+ responsibilities: 'stub',
});
expect(createVacancy.state.formLoading).to.equal(false);
@@ -130,6 +143,9 @@ describe('CreateVacancy', () => {
createVacancy.setState({
name: 'stub',
description: 'stub',
+ benefits: 'stub',
+ requirements: 'stub',
+ responsibilities: 'stub',
});
const openField = ReactTestUtils.findRenderedDOMComponentWithClass(createVacancy, 'open-time-field');
@@ -157,6 +173,9 @@ describe('CreateVacancy', () => {
createVacancy.setState({
name: 'stub',
description: 'stub',
+ benefits: 'stub',
+ responsibilities: 'stub',
+ requirements: 'stub',
});
expect(createVacancy.state.formLoading).to.equal(false);
diff --git a/assets/js/__test__/Dashboard-test.jsx b/assets/js/__test__/Dashboard-test.jsx
old mode 100644
new mode 100755
index 1e01baf0b8a823f910eb9fb99fefcb0be0218a8b..a64fd09cb2ce641e0316e3beca96e800f3358f53
--- a/assets/js/__test__/Dashboard-test.jsx
+++ b/assets/js/__test__/Dashboard-test.jsx
@@ -3,142 +3,21 @@ import React from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import fetchMock from 'fetch-mock';
import Dashboard from '../Dashboard';
+import { studentUser, companyUser, adminUser, supervisorUser, errorUser } from '../object/Response';
describe('Dashboard', () => {
fetchMock.get('*', { data: 'value' });
- const studentUser = {
- role: 'student',
- data: {
- url: 'http://localhost:8000/api/users/9/',
- username: 'muhammad.reza42',
- email: 'muhammad.reza42@ui.ac.id',
- is_staff: false,
- company: null,
- supervisor: null,
- student: {
- id: 3,
- user: {
- url: 'http://localhost:8000/api/users/9/',
- username: 'muhammad.reza42',
- email: 'muhammad.reza42@ui.ac.id',
- is_staff: false,
- },
- name: 'Muhammad R.',
- created: '2017-03-28T13:33:46.147241Z',
- updated: '2017-03-28T13:33:46.148248Z',
- npm: 1406543593,
- resume: null,
- phone_number: null,
- bookmarked_vacancies: [
- 3,
- ],
- applied_vacancies: [
- 3,
- 1,
- ],
- },
- },
- };
-
- const companyUser = {
- role: 'company',
- data: {
- url: 'http://localhost:8001/api/users/8/',
- username: 'Tutuplapak',
- email: '',
- is_staff: false,
- company: {
- id: 3,
- user: {
- url: 'http://localhost:8001/api/users/8/',
- username: 'Tutuplapak',
- email: '',
- is_staff: false,
- },
- name: 'Tutuplapak',
- created: '2017-03-28T07:30:10.535000Z',
- updated: '2017-03-28T07:30:10.535000Z',
- description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
- verified: true,
- logo: 'http://localhost:8001/files/company-logo/8a258a48-3bce-4873-b5d1-538b360d0059.png',
- address: 'Jl. Kebayoran Baru nomor 13, Jakarta Barat',
- },
- supervisor: null,
- student: null,
- },
- };
-
- const adminUser = {
- role: 'admin',
- data: {
- url: 'http://localhost:8001/api/users/8/',
- username: 'Tutuplapak',
- email: '',
- is_staff: false,
- company: null,
- supervisor: null,
- student: null,
- },
- };
-
- const supervisorUser = {
- role: 'supervisor',
- data: {
- url: 'http://localhost:8001/api/users/8/',
- username: 'Tutuplapak',
- email: '',
- is_staff: false,
- company: null,
- supervisor: {
- id: 3,
- user: {
- url: 'http://localhost:8000/api/users/9/',
- username: 'muhammad.reza42',
- email: 'muhammad.reza42@ui.ac.id',
- is_staff: false,
- },
- name: 'Muhammad R.',
- created: '2017-03-28T13:33:46.147241Z',
- updated: '2017-03-28T13:33:46.148248Z',
- npm: 1406543593,
- resume: null,
- phone_number: null,
- bookmarked_vacancies: [
- 3,
- ],
- applied_vacancies: [
- 3,
- 1,
- ],
- },
- student: null,
- },
- };
-
- const errorUser = {
- role: 'error',
- data: {
- url: 'http://localhost:8001/api/users/8/',
- username: 'Tutuplapak',
- email: '',
- is_staff: false,
- company: null,
- supervisor: null,
- student: null,
- },
- };
-
it('renders for company without problem', () => {
const dashboard = ReactTestUtils.renderIntoDocument(
-
);
+
);
expect(dashboard).to.exist;
});
it('renders for supervisor without problem', () => {
const dashboard = ReactTestUtils.renderIntoDocument(
- test
+ test
);
expect(dashboard).to.exist;
});
@@ -146,7 +25,7 @@ describe('Dashboard', () => {
it('renders for admin without problem', () => {
const dashboard = ReactTestUtils.renderIntoDocument(
- test
+ test
);
expect(dashboard).to.exist;
});
@@ -154,7 +33,7 @@ describe('Dashboard', () => {
it('renders for student without problem', () => {
const dashboard = ReactTestUtils.renderIntoDocument(
- test
+ test
);
expect(dashboard).to.exist;
});
@@ -162,9 +41,8 @@ describe('Dashboard', () => {
it('renders for error without problem', () => {
const dashboard = ReactTestUtils.renderIntoDocument(
- test
+ test
);
expect(dashboard).to.exist;
});
});
-
diff --git a/assets/js/__test__/EditProfile-test.jsx b/assets/js/__test__/EditProfile-test.jsx
new file mode 100644
index 0000000000000000000000000000000000000000..7e7de59cfac0bfe28634fea55702d0c6812ff1c8
--- /dev/null
+++ b/assets/js/__test__/EditProfile-test.jsx
@@ -0,0 +1,52 @@
+import React from 'react';
+import ReactTestUtils from 'react-addons-test-utils';
+import fetchMock from 'fetch-mock';
+import EditProfil from '../EditProfile';
+import { studentSession, response, response2 } from '../object/Response';
+
+describe('EditProfil', () => {
+ it('show/hide transcript without problem', () => {
+ fetchMock.get('*', response2);
+ const profile = ReactTestUtils.renderIntoDocument(
+ );
+
+ const checkboxNode = ReactTestUtils.scryRenderedDOMComponentsWithTag(profile, 'Input')[8];
+ const checkbox = false;
+ checkboxNode.value = checkbox;
+ profile.getProfile().then(()=> expect(profile.state.show_transcript).to.equal(true));
+ profile.handleCheckbox({name: 'show_transcript', value: checkbox}, {name: 'show_transcript', checked: false});
+ // ReactTestUtils.Simulate.change(checkboxNode, { target: {name: 'show_transcript', value: checkbox} }, {name: 'show_transcript', checked: false});
+ expect(profile.state.form.show_transcript).to.equal(false);
+ fetchMock.restore();
+ });
+
+ it('render without problem when submit file error', () => {
+ fetchMock.patch('*', 400);
+ fetchMock.get('*', response);
+ const profile = ReactTestUtils.renderIntoDocument(
+ );
+
+ profile.state.form = {name: 'abra', email:''};
+ const submitButton = ReactTestUtils.scryRenderedDOMComponentsWithTag(profile, 'Input')[1];
+ ReactTestUtils.Simulate.click(submitButton);
+
+ const form = ReactTestUtils.findRenderedDOMComponentWithTag(profile, 'Form');
+ ReactTestUtils.Simulate.submit(form);
+ fetchMock.restore();
+ });
+
+ it('handle email input without problem', () => {
+ fetchMock.patch('*', { data: 'value' });
+ fetchMock.get('*', response);
+ const profile = ReactTestUtils.renderIntoDocument(
+ );
+
+ const emailNode = ReactTestUtils.scryRenderedDOMComponentsWithTag(profile, 'Input')[1];
+ // const passwordNode = ReactDOM.findDOMNode(formLogin.refs.password);
+ const password = 'passwd';
+ emailNode.value = password;
+ expect(profile.state.form.email).to.equal('');
+ ReactTestUtils.Simulate.change(emailNode, { target: { value: password } });
+ expect(emailNode.value).to.equal(password);
+ });
+});
diff --git a/assets/js/__test__/FeedbackPage-test.jsx b/assets/js/__test__/FeedbackPage-test.jsx
new file mode 100644
index 0000000000000000000000000000000000000000..f6db74dc69e6b0790c2ae96a72ab2546d67b921a
--- /dev/null
+++ b/assets/js/__test__/FeedbackPage-test.jsx
@@ -0,0 +1,21 @@
+import React from 'react';
+import ReactTestUtils from 'react-addons-test-utils';
+import FeedbackPage from '../FeedbackPage';
+
+describe('FeedbackPage', () => {
+ it('renders without problem', () => {
+ const feedbackPage = ReactTestUtils.renderIntoDocument(
+ ,
+ );
+ expect(feedbackPage).to.exist;
+ });
+ it('contains page title', () => {
+ const feedbackPage = ReactTestUtils.renderIntoDocument(
+ ,
+ );
+ const titleh1 = ReactTestUtils.findRenderedDOMComponentWithTag(feedbackPage, 'h1');
+ const titleh2 = ReactTestUtils.findRenderedDOMComponentWithTag(feedbackPage, 'h2');
+ expect(titleh1.textContent).to.equal('Berikan Umpan Balik');
+ expect(titleh2.textContent).to.equal('Silahkan berikan umpan balik atas layanan yang disediakan oleh KaPe');
+ });
+});
diff --git a/assets/js/__test__/Login.jsx b/assets/js/__test__/Login.jsx
old mode 100644
new mode 100755
index b562c29070ef12b17468e801f2b152aa0a26beac..14bd9335f20d123f602b82866e438469e929da98
--- a/assets/js/__test__/Login.jsx
+++ b/assets/js/__test__/Login.jsx
@@ -4,8 +4,11 @@ import Login from '../Login';
describe('Login', () => {
it('renders for login without problem', () => {
- const login = ReactTestUtils.renderIntoDocument(test
);
+ const login = ReactTestUtils.renderIntoDocument(
+
+ test
+ ,
+ );
expect(login).to.exist;
});
});
-
diff --git a/assets/js/__test__/ProfilePage-test.jsx b/assets/js/__test__/ProfilePage-test.jsx
old mode 100644
new mode 100755
index a98b3452c0d522446eed60d064e2b328e2249c59..32762b6af4a36278d367d2b903fbd971e0e465a8
--- a/assets/js/__test__/ProfilePage-test.jsx
+++ b/assets/js/__test__/ProfilePage-test.jsx
@@ -3,117 +3,15 @@ import React from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import fetchMock from 'fetch-mock';
import ProfilePage from '../ProfilePage';
+import { studentSession, companyUser, response, response2 } from '../object/Response';
describe('ProfilePage', () => {
- const studentSession = {
- url: 'http://localhost:8000/api/users/9/',
- username: 'muhammad.reza42',
- email: 'muhammad.reza42@ui.ac.id',
- is_staff: false,
- company: null,
- supervisor: null,
- student: {
- id: 3,
- user: {
- url: 'http://localhost:8000/api/users/9/',
- username: 'muhammad.reza42',
- email: 'muhammad.reza42@ui.ac.id',
- is_staff: false,
- },
- name: 'Muhammad R.',
- created: '2017-03-28T13:33:46.147241Z',
- updated: '2017-03-28T13:33:46.148248Z',
- npm: 1406543593,
- resume: null,
- phone_number: null,
- birth_place: null,
- birth_date: null,
- major: null,
- batch: null,
- show_resume: false,
- bookmarked_vacancies: [
- 3,
- 2,
- ],
- applied_vacancies: [
- 3,
- 1,
- ],
- },
- };
-
- const companyUser = {
- role: 'company',
- data: {
- url: 'http://localhost:8001/api/users/8/',
- username: 'Tutuplapak',
- email: '',
- is_staff: false,
- company: {
- id: 3,
- user: {
- url: 'http://localhost:8001/api/users/8/',
- username: 'Tutuplapak',
- email: '',
- is_staff: false,
- },
- name: 'Tutuplapak',
- created: '2017-03-28T07:30:10.535000Z',
- updated: '2017-03-28T07:30:10.535000Z',
- description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
- verified: true,
- logo: 'http://localhost:8001/files/company-logo/8a258a48-3bce-4873-b5d1-538b360d0059.png',
- address: 'Jl. Kebayoran Baru nomor 13, Jakarta Barat',
- },
- supervisor: null,
- student: null,
- },
- };
-
- const response = {
- id: 3,
- name: 'Muhammad R.',
- user: {
- url: 'http://localhost:8000/api/users/9/',
- username: 'muhammad.reza42',
- email: 'muhammad.reza42@ui.ac.id',
- is_staff: false,
- },
- npm: 1406543593,
- resume: null,
- phone_number: null,
- birth_place: null,
- birth_date: null,
- photo: 'dor',
- major: null,
- batch: null,
- show_transcript: false,
- };
-
- const response2 = {
- id: 3,
- name: 'Muhammad R.',
- user: {
- url: 'http://localhost:8000/api/users/9/',
- username: 'muhammad.reza42',
- email: 'muhammad.reza42@ui.ac.id',
- is_staff: false,
- },
- npm: 1406543593,
- resume: null,
- phone_number: null,
- birth_place: null,
- birth_date: null,
- major: null,
- batch: null,
- show_transcript: true,
- };
-
it('renders without problem', () => {
fetchMock.get('*', response);
const profile = ReactTestUtils.renderIntoDocument(
);
- profile.getProfile().then(()=> expect(profile.state.name).to.equal(response.name));
+ profile.getProfile().then(() => expect(profile.state.name).to.equal(response.name));
+ profile.getProfile().then(() => expect(profile.state.birth_date).to.equal('24 Februari 1995'));
profile.updateForm(true);
fetchMock.restore();
});
@@ -134,18 +32,14 @@ describe('ProfilePage', () => {
fetchMock.restore();
});
- it('show/hide transcript without problem', () => {
- fetchMock.get('*', response2);
+ it('renders edit profile default value', () => {
+ fetchMock.get('*', response);
const profile = ReactTestUtils.renderIntoDocument(
- );
+ );
- const checkboxNode = ReactTestUtils.scryRenderedDOMComponentsWithTag(profile, 'Input')[4];
- const checkbox = false;
- checkboxNode.value = checkbox;
- profile.getProfile().then(()=> expect(profile.state.show_transcript).to.equal(true));
- profile.handleCheckbox({name: 'show_transcript', value: checkbox}, {name: 'show_transcript', checked: false});
- // ReactTestUtils.Simulate.change(checkboxNode, { target: {name: 'show_transcript', value: checkbox} }, {name: 'show_transcript', checked: false});
- expect(profile.state.form.show_transcript).to.equal(false);
+ const phoneNumberNode = ReactTestUtils.scryRenderedDOMComponentsWithTag(profile, 'Input')[2];
+ profile.getProfile().then(()=> expect(profile.state.phone_number).to.equal(phoneNumberNode.value));
+ profile.updateForm(true);
fetchMock.restore();
});
@@ -156,61 +50,25 @@ describe('ProfilePage', () => {
profile.getProfile().then(()=> expect(profile.state.name).to.equal('Gagal mendapatkan informasi'));
});
- it('submit form without problem', () => {
- fetchMock.patch('*', { data: 'value' });
- const profile = ReactTestUtils.renderIntoDocument(
- );
-
- profile.state.form = {name: 'abra', email:''};
- const submitButton = ReactTestUtils.scryRenderedDOMComponentsWithTag(profile, 'Input')[1];
- ReactTestUtils.Simulate.click(submitButton);
-
- const form = ReactTestUtils.findRenderedDOMComponentWithTag(profile, 'Form');
- ReactTestUtils.Simulate.submit(form);
- fetchMock.restore();
- });
-
- it('render without problem when submit file error', () => {
- fetchMock.patch('*', 400);
- fetchMock.get('*', response);
- const profile = ReactTestUtils.renderIntoDocument(
- );
-
- profile.state.form = {name: 'abra', email:''};
- const submitButton = ReactTestUtils.scryRenderedDOMComponentsWithTag(profile, 'Input')[1];
- ReactTestUtils.Simulate.click(submitButton);
-
- const form = ReactTestUtils.findRenderedDOMComponentWithTag(profile, 'Form');
- ReactTestUtils.Simulate.submit(form);
- fetchMock.restore();
- });
-
- it('handle email input without problem', () => {
- fetchMock.patch('*', { data: 'value' });
- fetchMock.get('*', response);
- const profile = ReactTestUtils.renderIntoDocument(
- );
-
- const emailNode = ReactTestUtils.scryRenderedDOMComponentsWithTag(profile, 'Input')[1];
- // const passwordNode = ReactDOM.findDOMNode(formLogin.refs.password);
- const password = 'passwd';
- emailNode.value = password;
- expect(profile.state.form.email).to.equal('');
- ReactTestUtils.Simulate.change(emailNode, { target: { value: password } });
- expect(emailNode.value).to.equal(password);
- });
-
it('handle file input without problem', () => {
fetchMock.patch('*', { data: 'value' });
fetchMock.get('*', response);
const profile = ReactTestUtils.renderIntoDocument(
);
- const emailNode = ReactTestUtils.scryRenderedDOMComponentsWithTag(profile, 'Input')[0];
+ ReactTestUtils.scryRenderedDOMComponentsWithTag(profile, 'Input')[0];
// const passwordNode = ReactDOM.findDOMNode(formLogin.refs.password);
profile.handleFile({ target: { name: 'photo', files: ['abc', 'def'] } });
expect(profile.state.form.photo).to.equal('abc');
});
+ it('renders count application without problem', () => {
+ fetchMock.get('*', response);
+ const profile = ReactTestUtils.renderIntoDocument(
+ );
+ profile.getProfile().then(()=> expect(profile.state.acceptedNo).to.not.equal(''));
+ profile.getProfile().then(()=> expect(profile.state.readNo).to.not.equal(''));
+ fetchMock.restore();
+ });
});
diff --git a/assets/js/__test__/SupervisorPage-test.jsx b/assets/js/__test__/SupervisorPage-test.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/__test__/TranscriptPage-test.jsx b/assets/js/__test__/TranscriptPage-test.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/__test__/VacancyPage-test.jsx b/assets/js/__test__/VacancyPage-test.jsx
old mode 100644
new mode 100755
index dcccff16e1a09c5f74f18bfdc43281185bbb13ea..0bbe878b0ceb4d9ac45a373bb9b68acde2563f8b
--- a/assets/js/__test__/VacancyPage-test.jsx
+++ b/assets/js/__test__/VacancyPage-test.jsx
@@ -3,72 +3,11 @@ import React from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import fetchMock from 'fetch-mock';
import VacancyPage from '../VacancyPage';
+import { studentUser, companyUser } from '../object/Response';
describe('VacancyPage', () => {
fetchMock.get('*', { data: 'value' });
- const studentUser = {
- role: 'student',
- data: {
- url: 'http://localhost:8000/api/users/9/',
- username: 'muhammad.reza42',
- email: 'muhammad.reza42@ui.ac.id',
- is_staff: false,
- company: null,
- supervisor: null,
- student: {
- id: 3,
- user: {
- url: 'http://localhost:8000/api/users/9/',
- username: 'muhammad.reza42',
- email: 'muhammad.reza42@ui.ac.id',
- is_staff: false,
- },
- name: 'Muhammad R.',
- created: '2017-03-28T13:33:46.147241Z',
- updated: '2017-03-28T13:33:46.148248Z',
- npm: 1406543593,
- resume: null,
- phone_number: null,
- bookmarked_vacancies: [
- 3,
- ],
- applied_vacancies: [
- 3,
- 1,
- ],
- },
- },
- };
-
- const companyUser = {
- role: 'company',
- data: {
- url: 'http://localhost:8001/api/users/8/',
- username: 'Tutuplapak',
- email: '',
- is_staff: false,
- company: {
- id: 3,
- user: {
- url: 'http://localhost:8001/api/users/8/',
- username: 'Tutuplapak',
- email: '',
- is_staff: false,
- },
- name: 'Tutuplapak',
- created: '2017-03-28T07:30:10.535000Z',
- updated: '2017-03-28T07:30:10.535000Z',
- description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
- verified: true,
- logo: 'http://localhost:8001/files/company-logo/8a258a48-3bce-4873-b5d1-538b360d0059.png',
- address: 'Jl. Kebayoran Baru nomor 13, Jakarta Barat',
- },
- supervisor: null,
- student: null,
- },
- };
-
const errorUser = {
role: 'error',
data: {
@@ -99,5 +38,13 @@ describe('VacancyPage', () => {
);
expect(vacancyPage).to.exist;
});
+
+ it('renders sort feature without problem', () => {
+ const vacancyPage = ReactTestUtils.renderIntoDocument(
+ );
+ vacancyPage.handleChange({}, { value: 'ASC' });
+ expect(vacancyPage).to.exist;
+ expect(vacancyPage.state.sort).to.equals('ASC');
+ });
});
diff --git a/assets/js/__test__/components/AdminVacancy-test.jsx b/assets/js/__test__/components/AdminVacancy-test.jsx
old mode 100644
new mode 100755
index 3ed5a1b0f011ca14c10eddcbc532023bdaa8896a..32fe5bc6f83934fe43d1f2b785ea9c58bb4f2e6b
--- a/assets/js/__test__/components/AdminVacancy-test.jsx
+++ b/assets/js/__test__/components/AdminVacancy-test.jsx
@@ -3,81 +3,10 @@ import React from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import AdminVacancy from '../../components/AdminVacancy';
import Storage from '../../lib/Storage';
+import { response, response2 } from '../../object/Response';
describe('AdminVacancy', () => {
- const fetchMock = require('fetch-mock');
- const response = {
- close_time: '2019-03-28T05:55:42Z',
- company: {
- address: 'kebayoran baru',
- id: 1,
- logo: null,
- name: 'tutup lapak',
- },
- created: '2017-03-28T07:05:47.128672Z',
- description: 'Lorem ipsum dolbh.',
- id: 3,
- name: 'Software Engineer',
- open_time: '2017-03-28T05:55:38Z',
- updated: '2017-03-28T07:34:13.122093Z',
- verified: true,
- };
-
- const response2 = {
- close_time: '2019-03-28T05:55:42Z',
- company: {
- address: 'kebayoran baru',
- id: 1,
- logo: 'pictures',
- name: 'tutup lapak',
- },
- created: '2017-03-28T07:05:47.128672Z',
- description: 'Lorem ipsum dolbh.',
- id: 3,
- name: 'Software Engineer',
- open_time: '2017-03-28T05:55:38Z',
- updated: '2017-03-28T07:34:13.122093Z',
- verified: false,
- };
-
- const supervisorUser = {
- role: 'supervisor',
- data: {
- url: 'http://localhost:8001/api/users/8/',
- username: 'Tutuplapak',
- email: '',
- is_staff: false,
- student: {
- id: 3,
- user: {
- url: 'http://localhost:8000/api/users/9/',
- username: 'muhammad.reza42',
- email: 'muhammad.reza42@ui.ac.id',
- is_staff: false,
- },
- name: 'Muhammad R.',
- created: '2017-03-28T13:33:46.147241Z',
- updated: '2017-03-28T13:33:46.148248Z',
- npm: 1406543593,
- resume: null,
- phone_number: null,
- birth_place: null,
- birth_date: null,
- major: null,
- batch: null,
- show_resume: false,
- bookmarked_vacancies: [
- 3,
- 2,
- ],
- applied_vacancies: [
- 3,
- 1,
- ],
- },
- },
- };
-
+
it('renders for verified without problem', () => {
const lowongan = ReactTestUtils.renderIntoDocument(
);
diff --git a/assets/js/__test__/components/AdminVerificationModal-test.jsx b/assets/js/__test__/components/AdminVerificationModal-test.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/__test__/components/Applicant-test.jsx b/assets/js/__test__/components/Applicant-test.jsx
old mode 100644
new mode 100755
index d9db8170b088fb87a80b90795feb1049b08f1944..a506b72c8f157df36c7b5c9cdd958e027f7cc885
--- a/assets/js/__test__/components/Applicant-test.jsx
+++ b/assets/js/__test__/components/Applicant-test.jsx
@@ -52,4 +52,22 @@ describe('Applicant', () => {
expect(applicant).to.exist;
fetchMock.restore();
});
+
+ it('show application status if in all status', () => {
+ fetchMock.get('*', stub);
+ const applicant = ReactTestUtils.renderIntoDocument(
+ ,
+ );
+ expect(applicant.getApplicationStatus()).to.equal('Ditandai');
+ fetchMock.restore();
+ });
+
+ it('not show application status if not in all status', () => {
+ fetchMock.get('*', stub);
+ const applicant = ReactTestUtils.renderIntoDocument(
+ ,
+ );
+ expect(applicant.getApplicationStatus()).to.equal('');
+ fetchMock.restore();
+ });
});
diff --git a/assets/js/__test__/components/ApplicantList-test.jsx b/assets/js/__test__/components/ApplicantList-test.jsx
old mode 100644
new mode 100755
index 0a907611d4bb5a7738ee5382dd141aca3da3b43a..6205cb4645765aa62bcbb428d5b020a8a72ea825
--- a/assets/js/__test__/components/ApplicantList-test.jsx
+++ b/assets/js/__test__/components/ApplicantList-test.jsx
@@ -82,5 +82,12 @@ describe('ApplicantList', () => {
applicantList.updateStatus(1, Applicant.APPLICATION_STATUS.BOOKMARKED);
expect(applicantList.state).to.not.equal(response);
});
+
+ it('can show all applicant', () => {
+ const applicantList = ReactTestUtils.renderIntoDocument(
+ );
+ // eslint-disable-next-line no-unused-expressions
+ expect(applicantList).to.exist;
+ });
});
diff --git a/assets/js/__test__/components/ApplyModal-test.jsx b/assets/js/__test__/components/ApplyModal-test.jsx
old mode 100644
new mode 100755
index 1119ff7caf68e2043b4803570fb7d64bdd3f3a76..cb640147717eba3cb96e2019389e4c3f890232d7
--- a/assets/js/__test__/components/ApplyModal-test.jsx
+++ b/assets/js/__test__/components/ApplyModal-test.jsx
@@ -49,4 +49,11 @@ describe('ApplyModal', () => {
expect(modalPendaftaran.state.modalOpen).to.equal(false);
});
+ it('shows company description', () => {
+ const modalPendaftaran = ReactTestUtils.renderIntoDocument(
+ );
+
+ modalPendaftaran.handleChange({ target: { value: 'duar' } });
+ expect(modalPendaftaran.props.data.companydescription).to.equal('compdesc');
+ });
});
diff --git a/assets/js/__test__/components/ApproveModal-test.jsx b/assets/js/__test__/components/ApproveModal-test.jsx
old mode 100644
new mode 100755
index 2f0a3bf025769cd70c5cdf2159939e661b759209..86c5b3c25d232d074835c3beec37ac4a64e51763
--- a/assets/js/__test__/components/ApproveModal-test.jsx
+++ b/assets/js/__test__/components/ApproveModal-test.jsx
@@ -8,14 +8,26 @@ import Applicant from '../../components/Applicant';
describe('ApproveModal', () => {
it('renders without problem', () => {
const modalApproval = ReactTestUtils.renderIntoDocument(
- {}} data={{ key: 'value', student: { resume: 'asdasd' } }} />);
+ {}}
+ data={{ key: 'value', student: { resume: 'asdasd' } }}
+ />,
+ );
expect(modalApproval).to.exist;
});
it('open without problem', () => {
fetchMock.get('*', { student: { resume: 'asdasd' } });
const modalApproval = ReactTestUtils.renderIntoDocument(
- {}} data={{ key: 'value', student: { resume: 'asdasd' }, status: Applicant.APPLICATION_STATUS.NEW }} />);
+ {}}
+ data={{
+ key: 'value',
+ student: { resume: 'asdasd' },
+ status: Applicant.APPLICATION_STATUS.NEW,
+ }}
+ />,
+ );
const modal = ReactTestUtils.findRenderedDOMComponentWithTag(modalApproval, 'Button');
ReactTestUtils.Simulate.click(modal);
@@ -25,7 +37,16 @@ describe('ApproveModal', () => {
it('open resume without problem', () => {
fetchMock.get('*', { student: { resume: 'asdasd' } });
const modalApproval = ReactTestUtils.renderIntoDocument(
- {}} data={{ key: 'value', student: { resume: 'asdasd' }, status: Applicant.APPLICATION_STATUS.NEW, show_transcript: true }} />);
+ {}}
+ data={{
+ key: 'value',
+ student: { resume: 'asdasd' },
+ status: Applicant.APPLICATION_STATUS.NEW,
+ show_transcript: true,
+ }}
+ />,
+ );
modalApproval.gotoStudentResume();
fetchMock.restore();
});
@@ -33,7 +54,16 @@ describe('ApproveModal', () => {
it('open transcript without problem', () => {
fetchMock.get('*', { student: { resume: 'asdasd' } });
const modalApproval = ReactTestUtils.renderIntoDocument(
- {}} data={{ key: 'value', student: { resume: 'asdasd' }, status: Applicant.APPLICATION_STATUS.NEW, show_transcript: true }} />);
+ {}}
+ data={{
+ key: 'value',
+ student: { resume: 'asdasd' },
+ status: Applicant.APPLICATION_STATUS.NEW,
+ show_transcript: true,
+ }}
+ />,
+ );
modalApproval.gotoStudentTranscript();
fetchMock.restore();
});
@@ -42,7 +72,15 @@ describe('ApproveModal', () => {
fetchMock.get('*', { student: { resume: 'asdasd' } });
fetchMock.patch('*', { student: { resume: 'asdasd' } });
const modalApproval = ReactTestUtils.renderIntoDocument(
- {}} data={{ key: 'value', student: { resume: 'asdasd' }, status: Applicant.APPLICATION_STATUS.NEW }} />);
+ {}}
+ data={{
+ key: 'value',
+ student: { resume: 'asdasd' },
+ status: Applicant.APPLICATION_STATUS.NEW,
+ }}
+ />,
+ );
modalApproval.handleClose();
expect(modalApproval.state.modalOpen).to.equal(false);
@@ -51,9 +89,13 @@ describe('ApproveModal', () => {
it('reject without problem', () => {
fetchMock.get('*', { student: { resume: 'asdasd' } });
- fetchMock.patch('*', { });
+ fetchMock.patch('*', {});
const modalApproval = ReactTestUtils.renderIntoDocument(
- {}} data={{ key: 'value', student: { resume: 'asdasd' }, cover_letter: 'asdasd' }} />);
+ {}}
+ data={{ key: 'value', student: { resume: 'asdasd' }, cover_letter: 'asdasd' }}
+ />,
+ );
modalApproval.modal = { open: () => {} };
modalApproval.reject();
modalApproval.rejectApplication();
@@ -62,11 +104,32 @@ describe('ApproveModal', () => {
fetchMock.restore();
});
+ it('finish without problem', () => {
+ fetchMock.get('*', { student: { resume: 'asdasd' } });
+ fetchMock.patch('*', {});
+ const modalApproval = ReactTestUtils.renderIntoDocument(
+ {}}
+ data={{ key: 'value', student: { resume: 'asdasd' }, cover_letter: 'asdasd' }}
+ />,
+ );
+ modalApproval.modal = { open: () => {} };
+ modalApproval.finish();
+ modalApproval.finishApplication();
+ modalApproval.gotoLink('link random');
+ expect(modalApproval.state.finishLoading).to.equal(true);
+ fetchMock.restore();
+ });
+
it('apply without problem', () => {
fetchMock.get('*', { student: { resume: 'asdasd' } });
- fetchMock.patch('*', { });
+ fetchMock.patch('*', {});
const modalApproval = ReactTestUtils.renderIntoDocument(
- {}} data={{ key: 'value', student: { resume: 'asdasd', show_transcript: true } }} />);
+ {}}
+ data={{ key: 'value', student: { resume: 'asdasd', show_transcript: true } }}
+ />,
+ );
modalApproval.modal = { open: () => {} };
modalApproval.accept();
modalApproval.acceptApplication();
diff --git a/assets/js/__test__/components/CancelModal-test.jsx b/assets/js/__test__/components/CancelModal-test.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/__test__/components/Company-test.jsx b/assets/js/__test__/components/Company-test.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/__test__/components/CompanyList-test.jsx b/assets/js/__test__/components/CompanyList-test.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/__test__/components/CompanyRegisterModal-test.jsx b/assets/js/__test__/components/CompanyRegisterModal-test.jsx
new file mode 100755
index 0000000000000000000000000000000000000000..8a47ca63254e915c537955d1073b306ed049ca88
--- /dev/null
+++ b/assets/js/__test__/components/CompanyRegisterModal-test.jsx
@@ -0,0 +1,45 @@
+import React from 'react';
+import ReactTestUtils from 'react-addons-test-utils';
+import CompanyRegisterModal from '../../components/CompanyRegisterModal';
+
+describe('CompanyRegisterModal', () => {
+ function validatePassword(password) {
+ const lowerCaseLetters = /[a-z]/g;
+ const upperCaseLetters = /[A-Z]/g;
+ const numbers = /[0-9]/g;
+ if(password.length < 8) {
+ return "Password less than 8";
+ } else {
+ if(!lowerCaseLetters.test(password)) {
+ return "Password at least one lowercase letter";
+ }
+
+ if(!upperCaseLetters.test(password)) {
+ return "Password at least one uppercase letter";
+ }
+
+ if(!numbers.test(password)) {
+ return "Password at least one number";
+ }
+
+ return true
+ }
+ }
+
+ it('renders without problem', () => {
+ const companyRegister = ReactTestUtils.renderIntoDocument(
+ );
+ expect(companyRegister).to.exist;
+ });
+
+ it('handle password validation', () => {
+ const password = '3s24Aasd';
+ expect(validatePassword(password)).to.equal(true);
+ });
+
+ it('Register modals state contain benefits', () => {
+ const companyRegister = ReactTestUtils.renderIntoDocument(
+ );
+ expect(companyRegister.state.benefits).to.exist;
+ });
+});
diff --git a/assets/js/__test__/components/CompanyVacancy-test.js b/assets/js/__test__/components/CompanyVacancy-test.js
old mode 100644
new mode 100755
diff --git a/assets/js/__test__/components/ConfirmationModal-test.jsx b/assets/js/__test__/components/ConfirmationModal-test.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/__test__/components/Footer-test.jsx b/assets/js/__test__/components/Footer-test.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/__test__/components/InfoModal-test.jsx b/assets/js/__test__/components/InfoModal-test.jsx
new file mode 100644
index 0000000000000000000000000000000000000000..abdc95a4f5f0eb00a0cb7e1de90218614521845d
--- /dev/null
+++ b/assets/js/__test__/components/InfoModal-test.jsx
@@ -0,0 +1,26 @@
+/* eslint-disable no-unused-expressions */
+import React from 'react';
+import ReactTestUtils from 'react-addons-test-utils';
+import InfoModal from '../../components/InfoModal';
+
+describe('InfoModal', () => {
+ it('renders without problem', () => {
+ const modalInfo = ReactTestUtils.renderIntoDocument( );
+ expect(modalInfo).to.exist;
+ });
+
+ it('open without problem', () => {
+ const modalPendaftaran = ReactTestUtils.renderIntoDocument( );
+ const modal = ReactTestUtils.findRenderedDOMComponentWithTag(modalPendaftaran, 'Button');
+ modalPendaftaran.handleApply();
+ ReactTestUtils.Simulate.click(modal);
+ expect(modalPendaftaran).to.exist;
+ });
+
+ it('open with problem', () => {
+ const modalInfo = ReactTestUtils.renderIntoDocument( );
+ const modal = ReactTestUtils.findRenderedDOMComponentWithTag(modalInfo, 'Button');
+ ReactTestUtils.Simulate.click(modal);
+ expect(modalInfo).to.exist;
+ });
+});
diff --git a/assets/js/__test__/components/LoginForm-test.jsx b/assets/js/__test__/components/LoginForm-test.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/__test__/components/ModalAlert-test.jsx b/assets/js/__test__/components/ModalAlert-test.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/__test__/components/ModalSuccess-test.jsx b/assets/js/__test__/components/ModalSuccess-test.jsx
new file mode 100644
index 0000000000000000000000000000000000000000..1e11cee96993f63ea3ba6baaf3469b7586eed118
--- /dev/null
+++ b/assets/js/__test__/components/ModalSuccess-test.jsx
@@ -0,0 +1,28 @@
+/* eslint-disable no-unused-expressions */
+import React from 'react';
+import ReactTestUtils from 'react-addons-test-utils';
+import ModalSuccess from '../../components/ModalSuccess';
+
+describe('ModalAlert', () => {
+ it('renders without problem', () => {
+ const modalAlert = ReactTestUtils.renderIntoDocument( );
+ expect(modalAlert).to.exist;
+ });
+
+ it('renders with open state set to false', () => {
+ const modalAlert = ReactTestUtils.renderIntoDocument( );
+ expect(modalAlert.state.open).to.equal(false);
+ });
+
+ it('modal state should be true when opened', () => {
+ const modalAlert = ReactTestUtils.renderIntoDocument( );
+ modalAlert.open();
+ expect(modalAlert.state.open).to.equal(true);
+ });
+
+ it('modal closed properly with open state should be false', () => {
+ const modalAlert = ReactTestUtils.renderIntoDocument( );
+ modalAlert.close();
+ expect(modalAlert.state.open).to.equal(false);
+ });
+});
diff --git a/assets/js/__test__/components/Pagination-test.jsx b/assets/js/__test__/components/Pagination-test.jsx
old mode 100644
new mode 100755
index c822d2ce9ee6c82d77d2f60cf582c2f9e751ac97..0bf87e2fa614f060454f74be9753c97d02106628
--- a/assets/js/__test__/components/Pagination-test.jsx
+++ b/assets/js/__test__/components/Pagination-test.jsx
@@ -3,7 +3,6 @@ import React from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import fetchMock from 'fetch-mock';
import Pagination from '../../components/Pagination';
-import Logger from '../../lib/Logger';
describe('Pagination', () => {
const response = {
diff --git a/assets/js/__test__/components/Tabs-test.jsx b/assets/js/__test__/components/Tabs-test.jsx
old mode 100644
new mode 100755
index 3f809c710d246067e7b5d21554a518a13a048758..82238f8f2427e4570c0ac45ba137d09365bcb424
--- a/assets/js/__test__/components/Tabs-test.jsx
+++ b/assets/js/__test__/components/Tabs-test.jsx
@@ -2,7 +2,7 @@ import React from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import Tabs from '../../components/Tabs';
-describe('ApplyModal', () => {
+describe('InfoModal', () => {
it('renders without problem', () => {
const tabs = ReactTestUtils.renderIntoDocument(
,
diff --git a/assets/js/__test__/components/TopMenu-test.jsx b/assets/js/__test__/components/TopMenu-test.jsx
old mode 100644
new mode 100755
index b33982630be5208446e9211056ebe737580b7a22..a3c8d8015c6587b9adc8a564605e297e38fea027
--- a/assets/js/__test__/components/TopMenu-test.jsx
+++ b/assets/js/__test__/components/TopMenu-test.jsx
@@ -3,6 +3,7 @@ import React from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import fetchMock from 'fetch-mock';
import TopMenu from '../../components/TopMenu';
+import moment from 'moment';
describe('TopMenu', () => {
fetchMock.restore();
@@ -214,5 +215,24 @@ describe('TopMenu', () => {
topmenu.handleItemClick(new Event('click'), 'undefined');
expect(topmenu.state.activeItem).to.equal(undefined);
});
+
+ it('check topmenu state containst today quotes', () => {
+ const topmenu = ReactTestUtils.renderIntoDocument(
+
+ test
+ );
+ expect(topmenu.state.todayQuote).to.not.equal(undefined);
+ });
+
+ it('TopMenu state contain right current date time', () => {
+ moment.locale('id');
+ const date = new Date();
+ const expectedDate = moment(date).format('dddd') + ', ' + moment(date).format('LL');
+ const topMenu = ReactTestUtils.renderIntoDocument(
+
+ test
+ );
+ expect(topMenu.state.currentDate).to.equal(expectedDate);
+ });
});
diff --git a/assets/js/__test__/components/Vacancy-test.jsx b/assets/js/__test__/components/Vacancy-test.jsx
old mode 100644
new mode 100755
index 9f1e253be4d99c08928d497fd48ffa00f183b6c3..045ed69e935523d4b23bfcff9a69e874e064cd7c
--- a/assets/js/__test__/components/Vacancy-test.jsx
+++ b/assets/js/__test__/components/Vacancy-test.jsx
@@ -7,6 +7,7 @@ import Storage from '../../lib/Storage';
describe('Vacancy', () => {
const fetchMock = require('fetch-mock');
const response = {
+ salary: '1',
close_time: '2019-03-28T05:55:42Z',
company: {
address: 'kebayoran baru',
@@ -16,14 +17,20 @@ describe('Vacancy', () => {
},
created: '2017-03-28T07:05:47.128672Z',
description: 'Lorem ipsum dolbh.',
+ requirements: 'requirements',
+ responsibilities: 'This is a responsibility.',
id: 3,
name: 'Software Engineer',
open_time: '2017-03-28T05:55:38Z',
updated: '2017-03-28T07:34:13.122093Z',
+ working_period: 'Juli-Agustus',
verified: true,
+ max_accepted_applicants: 3,
+ total_accepted_applicants: 0,
};
const response2 = {
+ salary: '1',
close_time: '2019-03-28T05:55:42Z',
company: {
address: 'kebayoran baru',
@@ -33,17 +40,23 @@ describe('Vacancy', () => {
},
created: '2017-03-28T07:05:47.128672Z',
description: 'Lorem ipsum dolbh.',
+ requirements: 'requirements',
+ responsibilities: 'This is a responsibility.',
id: 3,
name: 'Software Engineer',
open_time: '2017-03-28T05:55:38Z',
updated: '2017-03-28T07:34:13.122093Z',
+ working_period: 'Oktober-Desember',
verified: true,
+ max_accepted_applicants: 10,
+ total_accepted_applicants: 0,
};
const studentUser = {
role: 'company',
data: {
url: 'http://localhost:8001/api/users/8/',
+
username: 'Tutuplapak',
email: '',
is_staff: false,
@@ -128,6 +141,7 @@ describe('Vacancy', () => {
it('cancel bookmarks without problem', () => {
fetchMock.delete('*', { data: 'value' });
+ fetchMock.get('*', { count: 'value' });
const lowongan = ReactTestUtils.renderIntoDocument(
);
const response3 = { student: { id: 1, name: 2 } };
@@ -142,6 +156,7 @@ describe('Vacancy', () => {
it('cancel bookmarks with problem', () => {
fetchMock.delete('*', 404);
+ fetchMock.get('*', { count: 'value' });
const lowongan = ReactTestUtils.renderIntoDocument(
);
const response3 = { student: { id: 1, name: 2 } };
diff --git a/assets/js/__test__/components/VacancyList-test.jsx b/assets/js/__test__/components/VacancyList-test.jsx
old mode 100644
new mode 100755
index 0ac2b46c3132983fe241dd3c7567ba7b3949b9e5..c3dce105dd45b6fabebad3a1bd8d9e5adc345709
--- a/assets/js/__test__/components/VacancyList-test.jsx
+++ b/assets/js/__test__/components/VacancyList-test.jsx
@@ -26,6 +26,7 @@ describe('VacancyList', () => {
updated: '2017-03-28T07:30:10.535000Z',
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
verified: true,
+ benefits: 'Makan siang gratis, Waktu kerja fleksibel, Asuransi kesehatan, Liburan berbayar',
logo: 'http://localhost:8001/files/company-logo/8a258a48-3bce-4873-b5d1-538b360d0059.png',
address: 'Jl. Kebayoran Baru nomor 13, Jakarta Barat',
},
@@ -129,12 +130,17 @@ describe('VacancyList', () => {
updated: '2017-05-07T13:22:19.175033Z',
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
registeredStatus: 1,
+ benefits: 'Makan siang gratis, Waktu kerja fleksibel, Asuransi kesehatan, Liburan berbayar',
logo: null,
address: 'Jl. Kebayoran Baru nomor 13, Jakarta Barat',
},
verified: true,
open_time: '2017-04-26T03:39:11Z',
description: 'deskripsi',
+ benefits: 'keuntungan',
+ requirements: 'requirements',
+ responsibilities: 'This is a responsibility.',
+ salary: '1',
close_time: '2017-04-30T03:39:11Z',
created: '2017-04-26T03:39:39.916758Z',
updated: '2017-04-26T03:41:07.157634Z',
@@ -142,6 +148,9 @@ describe('VacancyList', () => {
status: 0,
bookmarked: false,
id: 4,
+ max_accepted_applicants: 3,
+ total_accepted_applicants: 0,
+ working_period: 'Juli-Agustus',
},
{
company: {
@@ -157,12 +166,17 @@ describe('VacancyList', () => {
updated: '2017-05-07T13:22:19.175033Z',
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
registeredStatus: 1,
+ benefits: 'Makan siang gratis, Waktu kerja fleksibel, Asuransi kesehatan, Liburan berbayar',
logo: 'http://localhost:8000/files/company-logo/8a258a48-3bce-4873-b5d1-538b360d0059.png',
address: 'Jl. Kebayoran Baru nomor 13, Jakarta Barat',
},
verified: true,
open_time: '2017-04-26T03:39:11Z',
description: 'deskripsi',
+ benefits: 'keuntungan',
+ requirements: 'requirements',
+ responsibilities: 'This is a responsibility.',
+ salary: '1',
close_time: '2017-04-30T03:39:11Z',
created: '2017-04-26T03:39:39.916758Z',
updated: '2017-04-26T03:41:07.157634Z',
@@ -170,6 +184,9 @@ describe('VacancyList', () => {
status: 1,
bookmarked: false,
id: 4,
+ max_accepted_applicants: 3,
+ total_accepted_applicants: 0,
+ working_period: 'Juli-Agustus',
},
{
company: {
@@ -185,12 +202,17 @@ describe('VacancyList', () => {
updated: '2017-05-07T13:22:19.175033Z',
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
registeredStatus: 1,
+ benefits: 'Makan siang gratis, Waktu kerja fleksibel, Asuransi kesehatan, Liburan berbayar',
logo: null,
address: 'Jl. Kebayoran Baru nomor 13, Jakarta Barat',
},
verified: true,
open_time: '2017-04-26T03:39:11Z',
description: 'deskripsi',
+ benefits: 'keuntungan',
+ requirements: 'requirements',
+ responsibilities: 'This is a responsibility.',
+ salary: '1',
close_time: '2017-04-30T03:39:11Z',
created: '2017-04-26T03:39:39.916758Z',
updated: '2017-04-26T03:41:07.157634Z',
@@ -198,6 +220,9 @@ describe('VacancyList', () => {
status: 2,
bookmarked: true,
id: 4,
+ max_accepted_applicants: 3,
+ total_accepted_applicants: 0,
+ working_period: 'Juli-Agustus',
},
{
company: {
@@ -213,12 +238,17 @@ describe('VacancyList', () => {
updated: '2017-05-07T13:22:19.175033Z',
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
registeredStatus: 1,
+ benefits: 'Makan siang gratis, Waktu kerja fleksibel, Asuransi kesehatan, Liburan berbayar',
logo: null,
address: 'Jl. Kebayoran Baru nomor 13, Jakarta Barat',
},
verified: true,
open_time: '2017-04-26T03:39:11Z',
description: 'deskripsi',
+ benefits: 'keuntungan',
+ requirements: 'requirements',
+ responsibilities: 'This is a responsibility.',
+ salary: '1',
close_time: '2017-04-30T03:39:11Z',
created: '2017-04-26T03:39:39.916758Z',
updated: '2017-04-26T03:41:07.157634Z',
@@ -226,6 +256,9 @@ describe('VacancyList', () => {
status: 3,
bookmarked: true,
id: 4,
+ max_accepted_applicants: 3,
+ total_accepted_applicants: 0,
+ working_period: 'Juli-Agustus',
},
{
company: {
@@ -241,12 +274,17 @@ describe('VacancyList', () => {
updated: '2017-05-07T13:22:19.175033Z',
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
registeredStatus: 1,
+ benefits: 'Makan siang gratis, Waktu kerja fleksibel, Asuransi kesehatan, Liburan berbayar',
logo: null,
address: 'Jl. Kebayoran Baru nomor 13, Jakarta Barat',
},
verified: true,
open_time: '2017-04-26T03:39:11Z',
description: 'deskripsi',
+ benefits: 'keuntungan',
+ requirements: 'requirements',
+ responsibilities: 'This is a responsibility.',
+ salary: '1',
close_time: '2017-04-30T03:39:11Z',
created: '2017-04-26T03:39:39.916758Z',
updated: '2017-04-26T03:41:07.157634Z',
@@ -254,10 +292,14 @@ describe('VacancyList', () => {
status: 4,
bookmarked: true,
id: 4,
+ max_accepted_applicants: 3,
+ total_accepted_applicants: 0,
+ working_period: 'Juli-Agustus',
},
];
const response = [{
+ salary: '1',
close_time: '2019-03-28T05:55:42Z',
company: {
address: 'kebayoran baru',
@@ -267,12 +309,18 @@ describe('VacancyList', () => {
},
created: '2017-03-28T07:05:47.128672Z',
description: 'Lorem ipsum dolbh.',
+ requirements: 'requirements',
+ responsibilities: 'This is a responsibility.',
id: 1,
name: 'Software Engineer',
open_time: '2017-03-28T05:55:38Z',
updated: '2017-03-28T07:34:13.122093Z',
verified: true,
+ max_accepted_applicants: 3,
+ total_accepted_applicants: 0,
+ working_period: 'Juli-Agustus',
}, {
+ salary: '1',
close_time: '2019-03-28T05:55:42Z',
company: {
address: 'kebayoran baru',
@@ -282,14 +330,20 @@ describe('VacancyList', () => {
},
created: '2017-03-28T07:05:47.128672Z',
description: 'Lorem ipsum dolbh.',
+ requirements: 'requirements',
+ responsibilities: 'This is a responsibility.',
id: 2,
name: 'Software Engineer',
open_time: '2017-03-28T05:55:38Z',
updated: '2017-03-28T07:34:13.122093Z',
verified: true,
+ max_accepted_applicants: 3,
+ total_accepted_applicants: 0,
+ working_period: 'Juli-Agustus',
}];
const response2 = [{
+ salary: '1',
close_time: '2019-03-28T05:55:42Z',
company: {
address: 'kebayoran baru',
@@ -299,11 +353,16 @@ describe('VacancyList', () => {
},
created: '2017-03-28T07:05:47.128672Z',
description: 'Lorem ipsum dolbh.',
+ requirements: 'requirements',
+ responsibilities: 'This is a responsibility.',
id: 2,
name: 'Software Engineer',
open_time: '2017-03-28T05:55:38Z',
updated: '2017-03-28T07:34:13.122093Z',
verified: true,
+ max_accepted_applicants: 3,
+ total_accepted_applicants: 0,
+ working_period: 'Juli-Agustus',
}];
it('renders without problem', () => {
diff --git a/assets/js/__test__/components/VerifyAdminModal-test.jsx b/assets/js/__test__/components/VerifyAdminModal-test.jsx
old mode 100644
new mode 100755
index 84523ac190ce9df8fdfedfd23491284dd2e3804b..28215b83a30f72eace8fd113804d0eb4e787807f
--- a/assets/js/__test__/components/VerifyAdminModal-test.jsx
+++ b/assets/js/__test__/components/VerifyAdminModal-test.jsx
@@ -1,8 +1,6 @@
import React from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import VerifyAdminModal from '../../components/VerifyAdminModal';
-import fetchMock from 'fetch-mock';
-import Storage from '../../lib/Storage';
describe('VerifyAdminModal', () => {
diff --git a/assets/js/__test__/lib/Dumper-test.jsx b/assets/js/__test__/lib/Dumper-test.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/__test__/lib/Logger-test.jsx b/assets/js/__test__/lib/Logger-test.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/__test__/lib/Server-test.jsx b/assets/js/__test__/lib/Server-test.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/__test__/lib/Storage-test.jsx b/assets/js/__test__/lib/Storage-test.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/components/AdminVacancy.jsx b/assets/js/components/AdminVacancy.jsx
old mode 100644
new mode 100755
index ad02b00b1eb68123410766a618c549cded1532dc..578f58e2a6568b806ea41b893c7de43c12c25343
--- a/assets/js/components/AdminVacancy.jsx
+++ b/assets/js/components/AdminVacancy.jsx
@@ -1,6 +1,5 @@
import React from 'react';
import { Item, Grid, Button } from 'semantic-ui-react';
-import VerifyAdminModal from './VerifyAdminModal';
import Server from '../lib/Server';
export default class AdminVacancy extends React.Component {
diff --git a/assets/js/components/AdminVerificationModal.jsx b/assets/js/components/AdminVerificationModal.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/components/Applicant.jsx b/assets/js/components/Applicant.jsx
old mode 100644
new mode 100755
index 6970946a95e508069184df7746d8f4ba2d0e5ec3..1677b80ca9b253d096654813673c736719194462
--- a/assets/js/components/Applicant.jsx
+++ b/assets/js/components/Applicant.jsx
@@ -10,6 +10,7 @@ export default class Applicant extends React.Component {
static propTypes = {
data: React.PropTypes.object.isRequired,
updateStatus: React.PropTypes.func.isRequired,
+ isAll: React.PropTypes.bool.isRequired,
};
static APPLICATION_STATUS = {
@@ -18,9 +19,11 @@ export default class Applicant extends React.Component {
BOOKMARKED: 2,
REJECTED: 3,
ACCEPTED: 4,
+ FINISHED: 6,
+ ALL: 1000,
};
- static APPLICATION_STATUS_TEXT = ['Baru', 'Sudah Dibaca', 'Ditandai', 'Diterima', 'Ditolak'];
+ static APPLICATION_STATUS_TEXT = ['Baru', 'Sudah Dibaca', 'Ditandai', 'Ditolak', 'Diterima', '', 'Selesai'];
constructor(props) {
super(props);
@@ -35,7 +38,10 @@ export default class Applicant extends React.Component {
}
if (this.props.data.status > 2) {
- this.modalAlert.open('Gagal Menandai', 'Lamaran yang sudah ditolak atau diterima tidak bisa ditandai');
+ this.modalAlert.open(
+ 'Gagal Menandai',
+ 'Lamaran yang sudah ditolak atau diterima tidak bisa ditandai',
+ );
} else {
Server.patch(`/applications/${this.props.data.id}/`, data).then((status) => {
this.props.updateStatus(this.props.data.id, status.status);
@@ -43,10 +49,18 @@ export default class Applicant extends React.Component {
}
};
+ getApplicationStatus() {
+ return this.props.isAll ? Applicant.APPLICATION_STATUS_TEXT[this.props.data.status] : '';
+ }
+
render() {
return (
- -
-
{ this.modalAlert = modal; }} />
+ -
+
{
+ this.modalAlert = modal;
+ }}
+ />
@@ -59,13 +73,17 @@ export default class Applicant extends React.Component {
+ {this.getApplicationStatus()}
diff --git a/assets/js/components/ApplicantList.jsx b/assets/js/components/ApplicantList.jsx
old mode 100644
new mode 100755
index 7dd3a3a840e981b0ef6022e591672089dc75fb03..abd6424add56f293a13997f493e7dd99851d0f2b
--- a/assets/js/components/ApplicantList.jsx
+++ b/assets/js/components/ApplicantList.jsx
@@ -45,9 +45,12 @@ export default class ApplicantList extends React.Component {
);
}
return this.state.applications.map(application =>
- application.status === this.props.status && ( ),
);
}
diff --git a/assets/js/components/ApplicationList.jsx b/assets/js/components/ApplicationList.jsx
old mode 100644
new mode 100755
index bf2decbd0d10eac594f0f4ce91099a1a2c9e1781..6432a009276e6b187f0c4056ae6f1a6551e421ad
--- a/assets/js/components/ApplicationList.jsx
+++ b/assets/js/components/ApplicationList.jsx
@@ -23,9 +23,10 @@ export default class ApplicationList extends React.Component {
generateRows() {
return this.props.items.map(item =>
(
-
+
{item.name}
{item.npm}
+ {item.major}
{item.company_name}
diff --git a/assets/js/components/ApplyModal.jsx b/assets/js/components/ApplyModal.jsx
old mode 100644
new mode 100755
index fbd6d622165bdd08a52a8031dc28f8bc655a8342..c7c2081ce938c5c5a9a39ed5d72000acc9e802cc
--- a/assets/js/components/ApplyModal.jsx
+++ b/assets/js/components/ApplyModal.jsx
@@ -1,4 +1,5 @@
import React from 'react';
+import moment from 'moment';
import { Icon, Modal, Button, TextArea, Form, Message } from 'semantic-ui-react';
import ModalAlert from './../components/ModalAlert';
import Server from './../lib/Server';
@@ -65,6 +66,7 @@ export default class ApplyModal extends React.Component {
};
render() {
+ const isApplicationClosed = moment(this.props.data.close_time) < moment.now()
return (
{this.props.buttonTitle}}
@@ -78,7 +80,25 @@ export default class ApplyModal extends React.Component {
Deskripsi Lowongan
{
}
+ Deskripsi Perusahaan
+ {
}
+
+
+ Tanggung Jawab Lowongan
+ {
}
+
+
+
+ Keuntungan
+ {
}
+
+
+
+ Persyaratan
+ {
}
+
+
{this.props.active && (
@@ -104,7 +124,7 @@ export default class ApplyModal extends React.Component {
)}
-
+
{ this.props.active ? 'Daftar' : 'Sudah Terdaftar' }
diff --git a/assets/js/components/ApproveModal.jsx b/assets/js/components/ApproveModal.jsx
old mode 100644
new mode 100755
index 1329bf587d549326b723ec66030c08c041d7bde6..a08313c94a10da01472b95f9188e59e92a676600
--- a/assets/js/components/ApproveModal.jsx
+++ b/assets/js/components/ApproveModal.jsx
@@ -17,13 +17,17 @@ export default class ApproveModal extends React.Component {
modalOpen: false,
rejectLoading: false,
acceptLoading: false,
+ formValue: '',
+ finishLoading: false,
};
this.handleOpen = this.handleOpen.bind(this);
this.reject = this.reject.bind(this);
this.accept = this.accept.bind(this);
+ this.finish = this.finish.bind(this);
this.gotoStudentProfile = this.gotoStudentProfile.bind(this);
this.gotoStudentResume = this.gotoStudentResume.bind(this);
this.gotoStudentTranscript = this.gotoStudentTranscript.bind(this);
+ this.formValueHandler = this.formValueHandler.bind(this);
}
componentWillUpdate() {
@@ -40,17 +44,27 @@ export default class ApproveModal extends React.Component {
};
handleOpen = () => this.setState({ modalOpen: true });
- handleClose = () => { this.readApplication(); this.setState({ modalOpen: false }); }
+ handleClose = () => {
+ this.readApplication();
+ this.setState({ modalOpen: false });
+ };
+
+ formValueHandler(event) {
+ this.setState({ formValue: event });
+ }
readApplication = () => {
const data = { status: Applicant.APPLICATION_STATUS.READ };
- return this.props.data.status === Applicant.APPLICATION_STATUS.NEW && Server.patch(`/applications/${this.props.data.id}/`, data).then((status) => {
- this.props.updateStatus(this.props.data.id, status.status);
- });
+ return (
+ this.props.data.status === Applicant.APPLICATION_STATUS.NEW &&
+ Server.patch(`/applications/${this.props.data.id}/`, data).then((status) => {
+ this.props.updateStatus(this.props.data.id, status.status);
+ })
+ );
};
rejectApplication = () => {
- const data = { status: Applicant.APPLICATION_STATUS.REJECTED };
+ const data = { status: Applicant.APPLICATION_STATUS.REJECTED, reason: this.state.formValue };
this.setState({ rejectLoading: true });
Server.patch(`/applications/${this.props.data.id}/`, data).then((status) => {
this.props.updateStatus(this.props.data.id, status.status);
@@ -63,6 +77,7 @@ export default class ApproveModal extends React.Component {
'Apakah anda yakin untuk menolak lamaran ini?',
'trash',
this.rejectApplication,
+ true,
);
};
@@ -74,6 +89,14 @@ export default class ApproveModal extends React.Component {
});
};
+ finishApplication = () => {
+ const data = { status: Applicant.APPLICATION_STATUS.FINISHED };
+ this.setState({ finishLoading: true });
+ Server.patch(`/applications/${this.props.data.id}/`, data).then((status) => {
+ this.props.updateStatus(this.props.data.id, status.status);
+ });
+ };
+
gotoLink = (url) => {
const win = window.open(url);
win.focus();
@@ -91,46 +114,91 @@ export default class ApproveModal extends React.Component {
'Apakah anda yakin untuk menerima lamaran ini?',
'checkmark',
this.acceptApplication,
+ false,
+ );
+ };
+
+ finish = () => {
+ this.modal.open(
+ 'Selesaikan Lamaran?',
+ 'Apakah anda yakin bahwa pelamar telah menyelesaikan kegiatan KP?',
+ 'checkmark',
+ this.finishApplication,
);
};
render = () => (
Detail}
+ trigger={
+
+ Detail
+
+ }
closeIcon="close"
open={this.state.modalOpen}
onClose={this.handleClose}
>
- { this.modal = modal; }} />
+ { this.modal = modal; }} formValueHandler={this.formValueHandler}
+ />
Data Lamaran
Cover Letter
-
- { this.props.data.cover_letter ? this.props.data.cover_letter : 'Kosong' }
-
+ {this.props.data.cover_letter ? this.props.data.cover_letter : 'Kosong'}
- {this.props.data.student.resume ? CV Pelamar : 'Pelamar tidak memiliki CV'}
+ {this.props.data.student.resume ? (
+
+ CV Pelamar{' '}
+
+ ) : (
+ 'Pelamar tidak memiliki CV'
+ )}
- {this.props.data.student.show_transcript ? Transkrip Pelamar : 'Pelamar tidak mengijinkan transkrip dilihat'}
+ {this.props.data.student.show_transcript ? (
+
+ Transkrip Pelamar
+
+ ) : (
+ 'Pelamar tidak mengijinkan transkrip dilihat'
+ )}
-
+
Lihat Profil
-
- Tolak Lamaran
-
- Terima Lamaran
-
+ {this.props.data.status >= 4 ? (
+
+ Selesai KP
+
+ ) : (
+
+
+ Tolak Lamaran
+
+
+
+ Terima Lamaran
+
+
+ )}
- )
+ );
}
-
diff --git a/assets/js/components/Company.jsx b/assets/js/components/Company.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/components/CompanyList.jsx b/assets/js/components/CompanyList.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/components/CompanyRegisterModal.jsx b/assets/js/components/CompanyRegisterModal.jsx
old mode 100644
new mode 100755
index e33732d80cde8a017c9b8509d4bf6db89d58f92b..3153b97dddbc14ca76669c9fedfec862a84561f5
--- a/assets/js/components/CompanyRegisterModal.jsx
+++ b/assets/js/components/CompanyRegisterModal.jsx
@@ -1,6 +1,6 @@
import React from 'react';
import { browserHistory } from 'react-router';
-import { Modal, Button, Form, Input, TextArea, Header, Icon } from 'semantic-ui-react';
+import { Modal, Button, Form, Input, TextArea, Header, Icon, Dropdown } from 'semantic-ui-react';
import ModalAlert from './../components/ModalAlert';
import Server from './../lib/Server';
import Storage from './../lib/Storage';
@@ -11,12 +11,39 @@ export default class CompanyRegisterModal extends React.Component {
constructor(props) {
super(props);
/* istanbul ignore next */
- this.state = { loading: false };
+ this.state = {
+ loading: false,
+ benefits: [
+ {"text": "Mendapatkan peserta magang dari lulusan universitas terbaik di Indonesia"},
+ {"text": "Mempermudah mencari calon peserta magang"},
+ {"text": "Dan banyak keuntungan lainnya"}
+ ]
+ };
this.handleChange = this.handleChange.bind(this);
this.handleFile = this.handleFile.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
}
+ categoryOptions = [
+ { value: 'Perusahaan Asuransi', text: 'Perusahaan Asuransi' },
+ { value: 'Perusahaan Bioteknologi', text: 'Perusahaan Bioteknologi' },
+ { value: 'Perusahaan Elektronik', text: 'Perusahaan Elektronik' },
+ { value: 'Perusahaan Energi', text: 'Perusahaan Energi' },
+ { value: 'Perusahaan Farmasi', text: 'Perusahaan Farmasi' },
+ { value: 'Firma Akuntansi', text: 'Firma Akuntansi' },
+ { value: 'Agen Periklanan', text: 'Agen Periklanan' },
+ { value: 'Perusahaan Internet', text: 'Perusahaan Internet' },
+ { value: 'Perusahaan Jasa', text: 'Perusahaan Jasa' },
+ { value: 'Perusahaan Komputer', text: 'Perusahaan Komputer' },
+ { value: 'Perusahaan Konsultansi', text: 'Perusahaan Konsultansi' },
+ { value: 'Perusahaan Logistik', text: 'Perusahaan Logistik' },
+ { value: 'Perusahaan Media', text: 'Perusahaan Media' },
+ { value: 'Perusahaan Perangkat Keras', text: 'Perusahaan Perangkat Keras' },
+ { value: 'Perusahaan Perangkat Lunak', text: 'Perusahaan Perangkat Lunak' },
+ { value: 'Perusahaan Teknologi', text: 'Perusahaan Teknologi' },
+ { value: 'Perusahaan Telekomunikasi', text: 'Perusahaan Telekomunikasi' },
+ ]
+
componentWillUpdate() {
this.fixBody();
}
@@ -34,15 +61,32 @@ export default class CompanyRegisterModal extends React.Component {
this.setState({ [e.target.name]: e.target.value });
};
+ handleSelectChange = (e, data) => {
+ this.setState({ [data.name]: data.value });
+ }
+
handleFile = (e) => {
this.setState({ [e.target.name]: e.target.files[0] });
};
handlePassword = (e) => {
- if (e.target.name === 'password') this.passwordField = e.target; else
- if (e.target.name === 'password-confirm') this.passwordConfirmField = e.target;
+ if (e.target.name === 'password') {
+ this.passwordField = e.target;
+ } else if (e.target.name === 'password-confirm') {
+ this.passwordConfirmField = e.target;
+ }
+
+ const validatePassword = /(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}/g;
+
+ if(!validatePassword.test(this.passwordField.value)) {
+ this.passwordField.setCustomValidity("Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters");
+ } else {
+ this.passwordField.setCustomValidity("");
+ }
+
const isExist = this.passwordField && this.passwordConfirmField;
+
if (isExist) {
if (this.passwordField.value !== this.passwordConfirmField.value) {
this.passwordConfirmField.setCustomValidity("Passwords Don't Match");
@@ -64,9 +108,18 @@ export default class CompanyRegisterModal extends React.Component {
}));
};
- render = () => (
+ render(){
+ const benefitViews = [];
+ this.state.benefits.map((benefit, idx) => {
+ const benefitView = (
+
{benefit.text}
+ )
+ benefitViews.push(benefitView);
+ });
+ return (
Register} closeIcon="close">
+
{ this.modalAlert = modal; }} />
+ Kategori Perusahaan
+
+
+
Logo
Alamat
+
+ Website
+
+
Submit
- )
+ )}
}
diff --git a/assets/js/components/CompanyVacancy.jsx b/assets/js/components/CompanyVacancy.jsx
old mode 100644
new mode 100755
index c986fc28dfb029f2369fdad2ce3c8c3fd6b913d2..07e1413fc52e9e409cb50e61f3279577fa4b282c
--- a/assets/js/components/CompanyVacancy.jsx
+++ b/assets/js/components/CompanyVacancy.jsx
@@ -37,6 +37,7 @@ export default class CompanyVacancy extends React.Component {
{ this.state.count } Pendaftar
{ this.state.countNew } Pendaftar Baru
+ { this.props.data.total_accepted_applicants } / {this.props.data.max_accepted_applicants } Diterima
Ditutup {moment(moment(this.props.data.close_time)).fromNow()}
diff --git a/assets/js/components/ConfirmationModal.jsx b/assets/js/components/ConfirmationModal.jsx
old mode 100644
new mode 100755
index 800e30175e6fd8b4cf1858ff6c6f3a7cc97e2767..75357a654c9dcf0f64a006b049a6677ad35ec04f
--- a/assets/js/components/ConfirmationModal.jsx
+++ b/assets/js/components/ConfirmationModal.jsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { Modal, Button, Icon, Header } from 'semantic-ui-react';
+import { Modal, Button, Icon, Header, Form } from 'semantic-ui-react';
export default class ConfirmationModal extends React.Component {
@@ -10,11 +10,15 @@ export default class ConfirmationModal extends React.Component {
modalOpen: false,
header: '',
content: '',
+ formValue: '',
+ formPlaceholder: 'Tulis alasan penolakan',
icon: 'trash',
+ isForm: false,
callback: () => {},
};
this.open = this.open.bind(this);
this.handleYes = this.handleYes.bind(this);
+ this.handleChange = this.handleChange.bind(this);
}
componentWillUpdate() {
@@ -34,10 +38,17 @@ export default class ConfirmationModal extends React.Component {
modalOpen: false,
});
+ handleChange = (event) => {
+ this.setState({ formValue: event.target.value });
+ this.props.formValueHandler(this.state.formValue);
+ };
+
handleYes = () => { this.state.callback(); this.handleClose(); }
- open = (header = this.state.header, content = this.state.content, icon = this.state.icon, callback = this.state.callback()) => {
- this.setState({ modalOpen: true, header, content, callback, icon });
+ open = (
+ header = this.state.header, content = this.state.content, icon = this.state.icon,
+ callback = this.state.callback(), isForm = this.state.isForm) => {
+ this.setState({ modalOpen: true, header, content, callback, icon, isForm });
};
render = () => (
@@ -48,6 +59,8 @@ export default class ConfirmationModal extends React.Component {
{this.state.content}
+ {this.state.isForm ?
+ : null }
diff --git a/assets/js/components/Course.jsx b/assets/js/components/Course.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/components/CourseList.jsx b/assets/js/components/CourseList.jsx
old mode 100644
new mode 100755
index af5fcda2ec841a0994738e5b34b60300440bb103..91a3ca189285a3cd30b74355dc63102adf3a6e6f
--- a/assets/js/components/CourseList.jsx
+++ b/assets/js/components/CourseList.jsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { Grid, Segment, Table, Header, Image, Container } from 'semantic-ui-react';
+import { Grid, Segment, Table, Image, Container } from 'semantic-ui-react';
import Course from './Course';
export default class CourseList extends React.Component {
diff --git a/assets/js/components/Footer.jsx b/assets/js/components/Footer.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/components/InfoModal.jsx b/assets/js/components/InfoModal.jsx
new file mode 100644
index 0000000000000000000000000000000000000000..43eb5aab09df8d38b7234d5b5136198808b95247
--- /dev/null
+++ b/assets/js/components/InfoModal.jsx
@@ -0,0 +1,95 @@
+import React from 'react';
+import { Modal, Button } from 'semantic-ui-react';
+import ModalAlert from './../components/ModalAlert';
+
+export default class InfoModal extends React.Component {
+ static propTypes = {
+ data: React.PropTypes.object.isRequired,
+ active: React.PropTypes.bool.isRequired,
+ buttonTitle: React.PropTypes.string.isRequired,
+ resume: React.PropTypes.string,
+ studentId: React.PropTypes.number.isRequired,
+ updateStatus: React.PropTypes.func.isRequired,
+ };
+
+ constructor(props) {
+ super(props);
+ /* istanbul ignore next */
+ this.state = {
+ modalOpen: false,
+ coverLetter: '',
+ load: false,
+ };
+ this.handleChange = this.handleChange.bind(this);
+ this.handleOpen = this.handleOpen.bind(this);
+ this.handleApply = this.handleApply.bind(this);
+ }
+
+ componentWillUpdate() {
+ this.fixBody();
+ }
+
+ componentDidUpdate() {
+ this.fixBody();
+ }
+
+ fixBody = () => {
+ const anotherModal = document.getElementsByClassName('ui page modals').length;
+ if (anotherModal > 0) document.body.classList.add('scrolling', 'dimmable', 'dimmed');
+ };
+
+ handleChange(event) {
+ this.setState({ coverLetter: event.target.value });
+ }
+
+ handleOpen() {
+ this.setState({ modalOpen: true });
+ }
+
+ handleClose = () =>
+ this.setState({
+ modalOpen: false,
+ load: false,
+ });
+
+ handleApply = () => {
+ this.setState({ load: true });
+ };
+
+ render() {
+ return (
+
+ INFO TENTANG KAPE
+
+ }
+ closeIcon="close"
+ open={this.state.modalOpen}
+ onClose={this.handleClose}
+ >
+ KAPE INFO
+
+ {
+ this.modalAlert = modal;
+ }}
+ />
+
+
+ {' '}
+ KAPE MERUPAKAN TEMPAT UNTUK MENCARI TEMPAT KERJA PRAKTIK
+
+
+ Jika anda mahasiswa silahkan login dengan mengunakan sso ui kalian
+
+ {' '}
+ Jika anda merupakan perusahaan silahakan register perusahaan anda atau login dengan
+ username dan password perusahaan yang anda sudah buat
+
+
+
+
+ );
+ }
+}
diff --git a/assets/js/components/LoginForm.jsx b/assets/js/components/LoginForm.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/components/ModalAlert.jsx b/assets/js/components/ModalAlert.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/components/ModalSuccess.jsx b/assets/js/components/ModalSuccess.jsx
new file mode 100644
index 0000000000000000000000000000000000000000..36aa87223be7450e82606c700c1736d1f818c866
--- /dev/null
+++ b/assets/js/components/ModalSuccess.jsx
@@ -0,0 +1,59 @@
+import React from 'react';
+import {
+ Button, Header, Icon, Modal,
+} from 'semantic-ui-react';
+
+export default class ModalSuccess extends React.Component {
+ constructor(props) {
+ super(props);
+ /* istanbul ignore next */
+ this.state = {
+ open: false, header: '', content: '', callback: () => {},
+ };
+ this.open = this.open.bind(this);
+ this.close = this.close.bind(this);
+ }
+
+ componentWillUpdate() {
+ this.fixBody();
+ }
+
+ componentDidUpdate() {
+ this.fixBody();
+ }
+
+ fixBody = () => {
+ const anotherModal = document.getElementsByClassName('ui page modals').length;
+ if (anotherModal > 0) document.body.classList.add('scrolling', 'dimmable', 'dimmed');
+ };
+
+ open = (header = this.state.header, content = this.state.content, callback = this.state.callback) => {
+ this.setState({
+ open: true, header, content, callback,
+ });
+ };
+
+ close = () => {
+ this.setState({ open: false });
+ this.state.callback();
+ };
+
+ render = () => {
+ const style = { whiteSpace: 'pre-wrap' };
+ return (
+
+
+
+ {this.state.content}
+
+
+
+
+ {' '}
+OK
+
+
+
+ );
+ };
+}
diff --git a/assets/js/components/Pagination.jsx b/assets/js/components/Pagination.jsx
old mode 100644
new mode 100755
index d2a50ae2229e941d73ec3c5eda0a4c534f620ded..5ff59e64b6773bb326dc4ed097fb17fa1e6b1af7
--- a/assets/js/components/Pagination.jsx
+++ b/assets/js/components/Pagination.jsx
@@ -29,38 +29,85 @@ export default class Pagination extends React.Component {
dir: 0,
start: true,
finish: false,
+ search: '',
};
this.handleNext = this.handleNext.bind(this);
this.handlePrev = this.handlePrev.bind(this);
this.getItemsData = this.getItemsData.bind(this);
this.handleMovement = this.handleMovement.bind(this);
+ this.handleSearchChange = this.handleSearchChange.bind(this);
+ this.handleSearchSubmit = this.handleSearchSubmit.bind(this);
this.refresh = this.refresh.bind(this);
this.content = this.content.bind(this);
this.pageMenu = this.pageMenu.bind(this);
this.getItemsData();
}
- getItemsData = () => Server.get(this.state.url, false).then((data) => {
- this.setState({ current: this.state.current + this.state.dir });
- this.setState(
- { items: data.results,
- next: `${this.props.url}?page=${this.state.current + 1}`,
- prev: `${this.props.url}?page=${this.state.current - 1}`,
- loading: false,
+ getItemsData = () => {
+ const prefix = this.state.dir === 0 ? '?' : '&';
+ const searchPrefix = this.state.search !== '' ? prefix : '';
+ const searchValue = this.state.search !== '' ? `search=${this.state.search}` : '';
+ return Server.get(`${this.state.url}${searchPrefix}${searchValue}`, false).then((data) => {
+ console.log('GET ITEM DATA');
+ this.setState({
+ current: this.state.current + this.state.dir,
+ });
+ this.setState(
+ {
+ items: data.results,
+ next: `${this.props.url}?page=${this.state.current + 1}`,
+ prev: `${this.props.url}?page=${this.state.current - 1}`,
+ loading: false,
+ });
+ let first = true;
+ let last = true;
+ if (data.previous) {
+ first = false;
+ }
+ if (data.next) {
+ last = false;
+ }
+ this.setState({first, last});
+ }, error => error.then((r) => {
+ this.modalAlert.open(this.props.error, r.detail);
+ this.setState({loading: false});
+ }));
+ };
+
+ handleSearchChange(e) {
+ this.setState({ search: e.target.value });
+ if (e.target.value === '') {
+ this.setState({
+ items: [],
+ current: 1,
+ next: '',
+ prev: '',
+ url: this.props.url,
+ loading: true,
+ dir: 0,
+ start: true,
+ finish: false,
+ }, function() {
+ this.getItemsData();
});
- let first = true;
- let last = true;
- if (data.previous) {
- first = false;
- }
- if (data.next) {
- last = false;
}
- this.setState({ first, last });
- }, error => error.then((r) => {
- this.modalAlert.open(this.props.error, r.detail);
- this.setState({ loading: false });
- }));
+ }
+
+ handleSearchSubmit() {
+ this.setState({
+ items: [],
+ current: 1,
+ next: '',
+ prev: '',
+ url: this.props.url,
+ loading: true,
+ dir: 0,
+ start: true,
+ finish: false,
+ }, function() {
+ this.getItemsData();
+ });
+ }
refresh() {
this.forceUpdate();
@@ -112,6 +159,10 @@ export default class Pagination extends React.Component {
render = () => (
+
+
+ Cari
+
{ this.modalAlert = modal; }} />
{!this.state.loading && this.content()}
{!this.state.loading && this.pageMenu()}
diff --git a/assets/js/components/Pane.jsx b/assets/js/components/Pane.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/components/Tabs.jsx b/assets/js/components/Tabs.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/components/TopMenu.jsx b/assets/js/components/TopMenu.jsx
old mode 100644
new mode 100755
index e2229eccb8830495687416399296c0d10fc6b52f..ca6bc2e410cc36dc8e8bd3a072b9a2ef5c958b9c
--- a/assets/js/components/TopMenu.jsx
+++ b/assets/js/components/TopMenu.jsx
@@ -3,7 +3,9 @@ import { Menu, Image, Popup, Button, Card } from 'semantic-ui-react';
import { Link, browserHistory } from 'react-router';
import Server from '../lib/Server';
import Storage from '../lib/Storage';
+import moment from 'moment';
+var quotes = require('starwars');
const defaultPicture = 'https://semantic-ui.com/images/avatar/small/elliot.jpg';
export default class TopMenu extends React.Component {
@@ -35,9 +37,16 @@ export default class TopMenu extends React.Component {
constructor(props) {
super(props);
/* istanbul ignore next */
- this.state = { activeItem: 'Beranda', logoutLoading: false };
+ moment.locale('id');
+ this.state = {
+ activeItem: 'Beranda',
+ logoutLoading: false,
+ currentDate: moment(new Date()).format('dddd') + ', ' + moment(new Date()).format('LL'),
+ todayQuote: quotes(),
+ };
this.logout = this.logout.bind(this);
this.logoutCompany = this.logoutCompany.bind(this);
+ console.log(this.state.todayQuote);
}
handleItemClick = (e, { name }) => this.setState({ activeItem: name });
@@ -64,6 +73,9 @@ export default class TopMenu extends React.Component {
const data = TopMenu.getInfo(this.props.user);
return (
+
+ { this.state.todayQuote }
+
{ this.props.user.data.is_staff && this.props.user.data.company && (
@@ -76,9 +88,13 @@ export default class TopMenu extends React.Component {
+
+ { this.state.currentDate }
+
{ this.props.user.role === 'student' &&
}
+ }
{ this.props.user.role === 'company' &&
}
{ this.props.user.data.is_staff &&
diff --git a/assets/js/components/Vacancy.jsx b/assets/js/components/Vacancy.jsx
old mode 100644
new mode 100755
index a755cca4af553ec413c1e6dd5eb80bd977b7811f..597139de5bb5ec8ae0bcb9b5fd3c2a891296fade
--- a/assets/js/components/Vacancy.jsx
+++ b/assets/js/components/Vacancy.jsx
@@ -41,6 +41,7 @@ export default class Vacancy extends React.Component {
deleteLoading: false,
};
moment.locale('id');
+ this.count();
this.bookmark = this.bookmark.bind(this);
this.updateStatus = this.updateStatus.bind(this);
this.generateAction = this.generateAction.bind(this);
@@ -48,6 +49,12 @@ export default class Vacancy extends React.Component {
this.removeVacancyApplication = this.removeVacancyApplication.bind(this);
}
+ count() {
+ Server.get(`/applications/${this.props.data.id}/count/`, false).then((data) => {
+ this.setState({ count: data.count });
+ });
+ }
+
bookmark() {
const data = { vacancy_id: this.props.data.id };
if (this.state.bookmarked < 1) {
@@ -88,7 +95,12 @@ export default class Vacancy extends React.Component {
data={{
header: this.props.data.name,
description: this.props.data.description,
+ benefits: this.props.data.benefits,
+ requirements: this.props.data.requirements,
+ companydescription: this.props.data.company.description,
+ responsibilities: this.props.data.responsibilities,
id: this.props.data.id,
+ close_time: this.props.data.close_time,
}}
resume={this.props.user.data.student.resume}
buttonTitle="Detail"
@@ -124,8 +136,16 @@ export default class Vacancy extends React.Component {
{ this.props.data.name }
{ this.props.data.company.name }
- { this.props.data.company.address }
- {`Ditutup ${moment(moment(this.props.data.close_time)).fromNow()}`}
+ { this.props.data.company.address }
+ { this.props.data.working_period}
+ { this.state.count } orang telah mendaftar!
+
+ { this.props.data.total_accepted_applicants }
+ / { this.props.data.max_accepted_applicants }
+ diterima
+ {`Ditutup ${moment(moment(this.props.data.close_time)).fromNow()}`}
+ Rp. { this.props.data.salary }
+ {this.props.data.apply_before}
diff --git a/assets/js/components/VacancyList.jsx b/assets/js/components/VacancyList.jsx
old mode 100644
new mode 100755
index 56efd84c7b8b7d143524d6cfd78780939a4f79a6..164a7eb586f94a8b410484882ad63da333f784b8
--- a/assets/js/components/VacancyList.jsx
+++ b/assets/js/components/VacancyList.jsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { Item, Grid, Container } from 'semantic-ui-react';
+import { Item, Grid, Container, Dropdown } from 'semantic-ui-react';
import Vacancy from './Vacancy';
import CompanyVacancy from './CompanyVacancy';
import AdminVacancy from './AdminVacancy';
@@ -11,6 +11,7 @@ export default class VacancyList extends React.Component {
user: React.PropTypes.object.isRequired,
userId: React.PropTypes.number.isRequired,
items: React.PropTypes.array,
+ sort: React.PropTypes.string.isRequired,
};
static defaultProps = {
@@ -25,9 +26,18 @@ export default class VacancyList extends React.Component {
bookmarkList: [],
appliedList: [],
loading: true,
+ salaryFilter: 0,
+ salaryFilterBy: [
+ { key: 0, text: 'Semua', value: 0 },
+ { key: 1, text: '< 1 juta', value: 1 },
+ { key: 2, text: '1-3 juta', value: 2 },
+ { key: 3, text: '3-5 juta', value: 3 },
+ { key: 4, text: '> 5 juta', value: 4 },
+ ],
};
this.generateVacancies = this.generateVacancies.bind(this);
this.updateStatus = this.updateStatus.bind(this);
+ this.handleChangeSalaryFilter = this.handleChangeSalaryFilter.bind(this);
}
updateStatus(id, status) {
@@ -48,6 +58,26 @@ export default class VacancyList extends React.Component {
this.modalAlert.open('Gagal Menghapus Lowongan', r.error);
}));
+ filterVacanciesBasedOnSalary = (vacancies) => {
+ const salaryFilter = this.state.salaryFilter;
+ let filteredVacancies = vacancies;
+ if (salaryFilter === 1) {
+ filteredVacancies = filteredVacancies.filter((vacancy) => vacancy.props.data.salary < 1000000);
+ } else if (salaryFilter === 2) {
+ filteredVacancies = filteredVacancies.filter((vacancy) => vacancy.props.data.salary >= 1000000 && vacancy.props.data.salary < 3000000);
+ } else if (salaryFilter === 3) {
+ filteredVacancies = filteredVacancies.filter((vacancy) => vacancy.props.data.salary >= 3000000 && vacancy.props.data.salary < 5000000);
+ } else if (salaryFilter === 4){
+ filteredVacancies = filteredVacancies.filter((vacancy) => vacancy.props.data.salary >= 5000000);
+ }
+
+ return filteredVacancies;
+ }
+
+ handleChangeSalaryFilter = (e, data) => {
+ this.setState({ salaryFilter: data.value });
+ }
+
generateVacancies() {
if (this.state.vacancies.length === 0) {
return (
@@ -61,7 +91,7 @@ export default class VacancyList extends React.Component {
);
}
if (this.props.user.role === 'student') {
- return this.state.vacancies.map(vacancy =>
+ let vacancies = this.state.vacancies.map(vacancy =>
(
),
);
+ if (this.props.sort === 'ASC') {
+ return vacancies.sort((vac1, vac2) => {
+ return vac1.props.data.name.localeCompare(vac2.props.data.name);
+ });
+ } else if (this.props.sort === 'DESC') {
+ return vacancies.sort((vac1, vac2) => {
+ return vac2.props.data.name.localeCompare(vac1.props.data.name);
+ });
+ }
+ vacancies = this.filterVacanciesBasedOnSalary(vacancies);
+ return vacancies;
} else if ((this.props.user.role === 'admin' && this.props.user.data.company != null)
|| this.props.user.role === 'company') {
return this.state.vacancies.map(vacancy => (
@@ -98,6 +140,13 @@ export default class VacancyList extends React.Component {
render = () => (
+
{ this.generateVacancies() }
diff --git a/assets/js/components/VerifyAdminModal.jsx b/assets/js/components/VerifyAdminModal.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/index.jsx b/assets/js/index.jsx
old mode 100644
new mode 100755
index 5d205006426a3eb84eeea562dc9b776ce5938b51..2d20ff4f50218b1f4a441723a90325c6baa5acf9
--- a/assets/js/index.jsx
+++ b/assets/js/index.jsx
@@ -1,6 +1,8 @@
import React from 'react';
import ReactDOM from 'react-dom';
-import { Router, Route, browserHistory, Redirect } from 'react-router';
+import {
+ Router, Route, browserHistory, Redirect,
+} from 'react-router';
import Dashboard from './Dashboard';
import Login from './Login';
import VacancyPage from './VacancyPage';
@@ -14,21 +16,29 @@ import TranscriptPage from './TranscriptPage';
import AdminVacancyPage from './AdminVacancyPage';
import CompanyPage from './CompanyPage';
import SupervisorPage from './SupervisorPage';
+import FeedbackPage from './FeedbackPage';
+import EditProfile from './EditProfile';
export default class App extends React.Component {
-
static getRole() {
if (Server.isLoggedIn()) {
const data = Storage.get('user-data');
if (data.is_staff) {
return 'admin';
- } else if (data.supervisor) {
+ }
+
+ if (data.supervisor) {
return 'supervisor';
- } else if (data.student) {
+ }
+
+ if (data.student) {
return 'student';
- } else if (data.company) {
+ }
+
+ if (data.company) {
return 'company';
}
+
return 'error';
}
return 'not-logged-in';
@@ -41,29 +51,34 @@ export default class App extends React.Component {
this.handleHome = this.handleHome.bind(this);
}
- authorization = allowedRoles =>
- WrappedComponent => (
- /* eslint-disable no-multi-comp */
- class WithAuthorization extends React.Component {
- constructor(props) {
- super(props);
- this.state = {
- user: {
- role: App.getRole(),
- data: Storage.get('user-data'),
- },
- };
- }
+ authorization = (allowedRoles) => (WrappedComponent) => (
+ /* eslint-disable no-multi-comp */
+ class WithAuthorization extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ user: {
+ role: App.getRole(),
+ data: Storage.get('user-data'),
+ },
+ };
+ }
- render() {
- const { role } = this.state.user;
- // const props = this.props;
- if (allowedRoles.includes(role)) {
- return ;
- }
- return { browserHistory.push('/home') }
;
+ render() {
+ const { role } = this.state.user;
+ // const props = this.props;
+ if (allowedRoles.includes(role)) {
+ return ;
}
- });
+ return (
+
+ {' '}
+ { browserHistory.push('/home') }
+ {' '}
+
+ );
+ }
+ });
handleAuth = (nextState, replace) => {
if (!Server.isLoggedIn()) replace({ pathname: '/login' });
@@ -111,10 +126,12 @@ export default class App extends React.Component {
+
+
diff --git a/assets/js/lib/Dumper.jsx b/assets/js/lib/Dumper.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/lib/Server.jsx b/assets/js/lib/Server.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/lib/Storage.jsx b/assets/js/lib/Storage.jsx
old mode 100644
new mode 100755
diff --git a/assets/js/object/Response.jsx b/assets/js/object/Response.jsx
new file mode 100644
index 0000000000000000000000000000000000000000..92b00fad5b55677397f07bee522b1b238213ef51
--- /dev/null
+++ b/assets/js/object/Response.jsx
@@ -0,0 +1,202 @@
+export const studentUser = {
+ role: 'student',
+ data: {
+ url: 'http://localhost:8000/api/users/9/',
+ username: 'muhammad.reza42',
+ email: 'muhammad.reza42@ui.ac.id',
+ is_staff: false,
+ company: null,
+ supervisor: null,
+ student: {
+ id: 3,
+ user: {
+ url: 'http://localhost:8000/api/users/9/',
+ username: 'muhammad.reza42',
+ email: 'muhammad.reza42@ui.ac.id',
+ is_staff: false,
+ },
+ name: 'Muhammad R.',
+ created: '2017-03-28T13:33:46.147241Z',
+ updated: '2017-03-28T13:33:46.148248Z',
+ npm: 1406543593,
+ resume: null,
+ phone_number: null,
+ bookmarked_vacancies: [
+ 3,
+ ],
+ applied_vacancies: [
+ 3,
+ 1,
+ ],
+ },
+ },
+};
+
+export const studentSession = {
+ url: 'http://localhost:8000/api/users/9/',
+ username: 'muhammad.reza42',
+ email: 'muhammad.reza42@ui.ac.id',
+ is_staff: false,
+ company: null,
+ supervisor: null,
+ student: {
+ id: 3,
+ user: {
+ url: 'http://localhost:8000/api/users/9/',
+ username: 'muhammad.reza42',
+ email: 'muhammad.reza42@ui.ac.id',
+ is_staff: false,
+ },
+ name: 'Muhammad R.',
+ created: '2017-03-28T13:33:46.147241Z',
+ updated: '2017-03-28T13:33:46.148248Z',
+ npm: 1406543593,
+ resume: null,
+ phone_number: null,
+ birth_place: null,
+ birth_date: '1995-02-24',
+ major: null,
+ batch: null,
+ show_resume: false,
+ bookmarked_vacancies: [
+ 3,
+ 2,
+ ],
+ applied_vacancies: [
+ 3,
+ 1,
+ ],
+ },
+};
+
+export const companyUser = {
+ role: 'company',
+ data: {
+ url: 'http://localhost:8001/api/users/8/',
+ username: 'Tutuplapak',
+ email: '',
+ is_staff: false,
+ company: {
+ id: 3,
+ user: {
+ url: 'http://localhost:8001/api/users/8/',
+ username: 'Tutuplapak',
+ email: '',
+ is_staff: false,
+ },
+ name: 'Tutuplapak',
+ created: '2017-03-28T07:30:10.535000Z',
+ updated: '2017-03-28T07:30:10.535000Z',
+ description:
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
+ verified: true,
+ logo: 'http://localhost:8001/files/company-logo/8a258a48-3bce-4873-b5d1-538b360d0059.png',
+ address: 'Jl. Kebayoran Baru nomor 13, Jakarta Barat',
+ },
+ supervisor: null,
+ student: null,
+ },
+};
+
+export const companySession = {
+ url: 'http://localhost:8001/api/users/8/',
+ username: 'Tutuplapak',
+ email: '',
+ is_staff: false,
+ company: {
+ id: 3,
+ user: {
+ url: 'http://localhost:8001/api/users/8/',
+ username: 'Tutuplapak',
+ email: '',
+ is_staff: false,
+ },
+ name: 'Tutuplapak',
+ created: '2017-03-28T07:30:10.535000Z',
+ updated: '2017-03-28T07:30:10.535000Z',
+ description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla aliquet semper neque a fermentum. Duis ac tellus vitae augue iaculis ultrices. Curabitur commodo et neque nec feugiat. Morbi ac diam vel nunc commodo cursus. Phasellus nulla sapien, hendrerit vitae bibendum at, sollicitudin eu ante. Maecenas maximus, ante eu sollicitudin convallis, mauris nunc posuere risus, eu porttitor diam lacus vitae enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse at lectus a elit sollicitudin tempor. Nullam condimentum, justo nec tincidunt maximus, neque mi vulputate leo, sit amet lacinia massa ex eget sem. Duis ac erat facilisis, fringilla mauris in, consequat neque. In et neque consequat, vehicula magna at, efficitur ante. Mauris ac lacinia nibh.\r\n\r\nProin sagittis, lectus quis maximus varius, libero justo sollicitudin augue, non lacinia risus orci a enim. Curabitur iaculis enim quis ullamcorper commodo. Vivamus id nisi rhoncus, dignissim tellus quis, interdum est. Fusce sollicitudin eu libero ac feugiat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas semper posuere ex, sed accumsan libero iaculis faucibus. Fusce laoreet ac ligula ut consectetur. Donec tortor mauris, rutrum at sodales et, viverra in dolor. Sed bibendum elit et maximus volutpat. Phasellus justo ipsum, laoreet sit amet faucibus eu, ultricies suscipit mauris. Nullam aliquam libero eu ante ultrices mattis. Donec non justo hendrerit neque volutpat placerat. Ut euismod est nec sem mollis, sit amet porttitor massa rhoncus. Aenean id erat sit amet nunc ultrices scelerisque non in ipsum. Curabitur sollicitudin nulla id mi accumsan venenatis.',
+ verified: true,
+ benefits: 'Makan siang gratis, Waktu kerja fleksibel, Asuransi kesehatan, Liburan berbayar',
+ logo: 'http://localhost:8001/files/company-logo/8a258a48-3bce-4873-b5d1-538b360d0059.png',
+ address: 'Jl. Kebayoran Baru nomor 13, Jakarta Barat',
+ },
+ supervisor: null,
+ student: null,
+};
+
+export const supervisorUser = {
+ role: 'supervisor',
+ data: {
+ url: 'http://localhost:8001/api/users/8/',
+ username: 'Tutuplapak',
+ email: '',
+ is_staff: false,
+ company: null,
+ supervisor: {
+ id: 3,
+ user: {
+ url: 'http://localhost:8000/api/users/9/',
+ username: 'muhammad.reza42',
+ email: 'muhammad.reza42@ui.ac.id',
+ is_staff: false,
+ },
+ name: 'Muhammad R.',
+ created: '2017-03-28T13:33:46.147241Z',
+ updated: '2017-03-28T13:33:46.148248Z',
+ npm: 1406543593,
+ resume: null,
+ phone_number: null,
+ bookmarked_vacancies: [
+ 3,
+ ],
+ applied_vacancies: [
+ 3,
+ 1,
+ ],
+ },
+ student: null,
+ },
+};
+
+const userData = {
+ url: 'http://localhost:8001/api/users/8/',
+ username: 'Tutuplapak',
+ email: '',
+ is_staff: false,
+ company: null,
+ supervisor: null,
+ student: null,
+};
+
+export const errorSession = userData;
+
+export const adminUser = {
+ role: 'admin',
+ data: userData,
+};
+
+
+export const errorUser = {
+ role: 'error',
+ data: userData,
+};
+
+const getResponse = (isVerified) => ({
+ close_time: '2019-03-28T05:55:42Z',
+ company: {
+ address: 'kebayoran baru',
+ id: 1,
+ logo: null,
+ name: 'tutup lapak',
+ },
+ created: '2017-03-28T07:05:47.128672Z',
+ description: 'Lorem ipsum dolbh.',
+ id: 3,
+ name: 'Software Engineer',
+ open_time: '2017-03-28T05:55:38Z',
+ updated: '2017-03-28T07:34:13.122093Z',
+ verified: isVerified,
+});
+
+export const response = getResponse(true);
+export const response2 = getResponse(false);
diff --git a/assets/pdf/pdf-coba.pdf b/assets/pdf/pdf-coba.pdf
new file mode 100755
index 0000000000000000000000000000000000000000..379cb93fd41385e7ea21e9f02d44b2fb84fd860d
Binary files /dev/null and b/assets/pdf/pdf-coba.pdf differ
diff --git a/assets/pdf/pdf_coba.PDF b/assets/pdf/pdf_coba.PDF
new file mode 100644
index 0000000000000000000000000000000000000000..c7a0a87014c753e9548ebaf10641a3ef64d84833
Binary files /dev/null and b/assets/pdf/pdf_coba.PDF differ
diff --git a/assets/rest_framework/css/bootstrap-tweaks.css b/assets/rest_framework/css/bootstrap-tweaks.css
new file mode 100644
index 0000000000000000000000000000000000000000..c2fcb303d919997fa47ed13606c3411d11b9927b
--- /dev/null
+++ b/assets/rest_framework/css/bootstrap-tweaks.css
@@ -0,0 +1,233 @@
+/*
+
+This CSS file contains some tweaks specific to the included Bootstrap theme.
+It's separate from `style.css` so that it can be easily overridden by replacing
+a single block in the template.
+
+*/
+
+.form-actions {
+ background: transparent;
+ border-top-color: transparent;
+ padding-top: 0;
+ text-align: right;
+}
+
+#generic-content-form textarea {
+ font-family:Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace;
+ font-size: 80%;
+}
+
+.navbar-inverse .brand a {
+ color: #999999;
+}
+.navbar-inverse .brand:hover a {
+ color: white;
+ text-decoration: none;
+}
+
+/* custom navigation styles */
+.navbar {
+ width: 100%;
+ position: fixed;
+ left: 0;
+ top: 0;
+}
+
+.navbar {
+ background: #2C2C2C;
+ color: white;
+ border: none;
+ border-top: 5px solid #A30000;
+ border-radius: 0px;
+}
+
+.navbar .nav li, .navbar .nav li a, .navbar .brand:hover {
+ color: white;
+}
+
+.nav-list > .active > a, .nav-list > .active > a:hover {
+ background: #2C2C2C;
+}
+
+.navbar .dropdown-menu li a, .navbar .dropdown-menu li {
+ color: #A30000;
+}
+
+.navbar .dropdown-menu li a:hover {
+ background: #EEEEEE;
+ color: #C20000;
+}
+
+ul.breadcrumb {
+ margin: 70px 0 0 0;
+}
+
+.breadcrumb li.active a {
+ color: #777;
+}
+
+.pagination>.disabled>a,
+.pagination>.disabled>a:hover,
+.pagination>.disabled>a:focus {
+ cursor: not-allowed;
+ pointer-events: none;
+}
+
+.pager>.disabled>a,
+.pager>.disabled>a:hover,
+.pager>.disabled>a:focus {
+ pointer-events: none;
+}
+
+.pager .next {
+ margin-left: 10px;
+}
+
+/*=== dabapps bootstrap styles ====*/
+
+html {
+ width:100%;
+ background: none;
+}
+
+/*body, .navbar .container-fluid {
+ max-width: 1150px;
+ margin: 0 auto;
+}*/
+
+body {
+ background: url("../img/grid.png") repeat-x;
+ background-attachment: fixed;
+}
+
+#content {
+ margin: 0;
+ padding-bottom: 60px;
+}
+
+/* sticky footer and footer */
+html, body {
+ height: 100%;
+}
+
+.wrapper {
+ position: relative;
+ top: 0;
+ left: 0;
+ padding-top: 60px;
+ margin: -60px 0;
+ min-height: 100%;
+}
+
+.form-switcher {
+ margin-bottom: 0;
+}
+
+.well {
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+}
+
+.well .form-actions {
+ padding-bottom: 0;
+ margin-bottom: 0;
+}
+
+.well form {
+ margin-bottom: 0;
+}
+
+.nav-tabs {
+ border: 0;
+}
+
+.nav-tabs > li {
+ float: right;
+}
+
+.nav-tabs li a {
+ margin-right: 0;
+}
+
+.nav-tabs > .active > a {
+ background: #F5F5F5;
+}
+
+.nav-tabs > .active > a:hover {
+ background: #F5F5F5;
+}
+
+.tabbable.first-tab-active .tab-content {
+ border-top-right-radius: 0;
+}
+
+footer {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ clear: both;
+ z-index: 10;
+ height: 60px;
+ width: 95%;
+ margin: 0 2.5%;
+}
+
+footer p {
+ text-align: center;
+ color: gray;
+ border-top: 1px solid #DDDDDD;
+ padding-top: 10px;
+}
+
+footer a {
+ color: gray !important;
+ font-weight: bold;
+}
+
+footer a:hover {
+ color: gray;
+}
+
+.page-header {
+ border-bottom: none;
+ padding-bottom: 0px;
+ margin: 0;
+}
+
+/* custom general page styles */
+.hero-unit h1, .hero-unit h2 {
+ color: #A30000;
+}
+
+body a {
+ color: #A30000;
+}
+
+body a:hover {
+ color: #c20000;
+}
+
+.request-info {
+ clear:both;
+}
+
+.horizontal-checkbox label {
+ padding-top: 0;
+}
+
+.horizontal-checkbox label {
+ padding-top: 0 !important;
+}
+
+.horizontal-checkbox input {
+ float: left;
+ width: 20px;
+ margin-top: 3px;
+}
+
+.modal-footer form {
+ margin-left: 5px;
+ margin-right: 5px;
+}
diff --git a/assets/rest_framework/css/bootstrap.min.css b/assets/rest_framework/css/bootstrap.min.css
new file mode 100644
index 0000000000000000000000000000000000000000..ed3905e0e0c91d4ed7d8aa14412dffeb038745ff
--- /dev/null
+++ b/assets/rest_framework/css/bootstrap.min.css
@@ -0,0 +1,6 @@
+/*!
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-co