!(function (n) { "function" == typeof define && define.amd ? define(["jquery"], n) : n(jQuery); })(function (n) { n.extend(n.fn, { validate: function (t) { if (!this.length) return void ( t && t.debug && window.console && console.warn("Nothing selected, can't validate, returning nothing.") ); var i = n.data(this[0], "validator"); return i ? i : (this.attr("novalidate", "novalidate"), (i = new n.validator(t, this[0])), n.data(this[0], "validator", i), i.settings.onsubmit && (this.validateDelegate(":submit", "click", function (t) { i.settings.submitHandler && (i.submitButton = t.target); n(t.target).hasClass("cancel") && (i.cancelSubmit = !0); void 0 !== n(t.target).attr("formnovalidate") && (i.cancelSubmit = !0); }), this.submit(function (t) { function r() { var u, r; return i.settings.submitHandler ? (i.submitButton && (u = n("") .attr("name", i.submitButton.name) .val(n(i.submitButton).val()) .appendTo(i.currentForm)), (r = i.settings.submitHandler.call(i, i.currentForm, t)), i.submitButton && u.remove(), void 0 !== r ? r : !1) : !0; } return ( i.settings.debug && t.preventDefault(), i.cancelSubmit ? ((i.cancelSubmit = !1), r()) : i.form() ? i.pendingRequest ? ((i.formSubmitted = !0), !1) : r() : (i.focusInvalid(), !1) ); })), i); }, valid: function () { var t, i; return ( n(this[0]).is("form") ? (t = this.validate().form()) : ((t = !0), (i = n(this[0].form).validate()), this.each(function () { t = i.element(this) && t; })), t ); }, removeAttrs: function (t) { var i = {}, r = this; return ( n.each(t.split(/\s/), function (n, t) { i[t] = r.attr(t); r.removeAttr(t); }), i ); }, rules: function (t, i) { var e, s, f, u, o, h, r = this[0]; if (t) switch ( ((e = n.data(r.form, "validator").settings), (s = e.rules), (f = n.validator.staticRules(r)), t) ) { case "add": n.extend(f, n.validator.normalizeRule(i)); delete f.messages; s[r.name] = f; i.messages && (e.messages[r.name] = n.extend(e.messages[r.name], i.messages)); break; case "remove": return i ? ((h = {}), n.each(i.split(/\s/), function (t, i) { h[i] = f[i]; delete f[i]; "required" === i && n(r).removeAttr("aria-required"); }), h) : (delete s[r.name], f); } return ( (u = n.validator.normalizeRules( n.extend( {}, n.validator.classRules(r), n.validator.attributeRules(r), n.validator.dataRules(r), n.validator.staticRules(r) ), r )), u.required && ((o = u.required), delete u.required, (u = n.extend({ required: o }, u)), n(r).attr("aria-required", "true")), u.remote && ((o = u.remote), delete u.remote, (u = n.extend(u, { remote: o }))), u ); }, }); n.extend(n.expr[":"], { blank: function (t) { return !n.trim("" + n(t).val()); }, filled: function (t) { return !!n.trim("" + n(t).val()); }, unchecked: function (t) { return !n(t).prop("checked"); }, }); n.validator = function (t, i) { this.settings = n.extend(!0, {}, n.validator.defaults, t); this.currentForm = i; this.init(); }; n.validator.format = function (t, i) { return 1 === arguments.length ? function () { var i = n.makeArray(arguments); return i.unshift(t), n.validator.format.apply(this, i); } : (arguments.length > 2 && i.constructor !== Array && (i = n.makeArray(arguments).slice(1)), i.constructor !== Array && (i = [i]), n.each(i, function (n, i) { t = t.replace(new RegExp("\\{" + n + "\\}", "g"), function () { return i; }); }), t); }; n.extend(n.validator, { defaults: { messages: {}, groups: {}, rules: {}, errorClass: "error", validClass: "valid", errorElement: "label", focusCleanup: !1, focusInvalid: !0, errorContainer: n([]), errorLabelContainer: n([]), onsubmit: !0, ignore: ":hidden", ignoreTitle: !1, onfocusin: function (n) { this.lastActive = n; this.settings.focusCleanup && (this.settings.unhighlight && this.settings.unhighlight.call( this, n, this.settings.errorClass, this.settings.validClass ), this.hideThese(this.errorsFor(n))); }, onfocusout: function (n) { !this.checkable(n) && (n.name in this.submitted || !this.optional(n)) && this.element(n); }, onkeyup: function (n, t) { (9 !== t.which || "" !== this.elementValue(n)) && (n.name in this.submitted || n === this.lastElement) && this.element(n); }, onclick: function (n) { n.name in this.submitted ? this.element(n) : n.parentNode.name in this.submitted && this.element(n.parentNode); }, highlight: function (t, i, r) { "radio" === t.type ? this.findByName(t.name).addClass(i).removeClass(r) : n(t).addClass(i).removeClass(r); }, unhighlight: function (t, i, r) { "radio" === t.type ? this.findByName(t.name).removeClass(i).addClass(r) : n(t).removeClass(i).addClass(r); }, }, setDefaults: function (t) { n.extend(n.validator.defaults, t); }, messages: { required: "This field is required.", remote: "Please fix this field.", email: "Please enter a valid email address.", url: "Please enter a valid URL.", date: "Please enter a valid date.", dateISO: "Please enter a valid date ( ISO ).", number: "Please enter a valid number.", digits: "Please enter only digits.", creditcard: "Please enter a valid credit card number.", equalTo: "Please enter the same value again.", maxlength: n.validator.format( "Please enter no more than {0} characters." ), minlength: n.validator.format("Please enter at least {0} characters."), rangelength: n.validator.format( "Please enter a value between {0} and {1} characters long." ), range: n.validator.format("Please enter a value between {0} and {1}."), max: n.validator.format( "Please enter a value less than or equal to {0}." ), min: n.validator.format( "Please enter a value greater than or equal to {0}." ), }, autoCreateRanges: !1, prototype: { init: function () { function i(t) { var r = n.data(this[0].form, "validator"), u = "on" + t.type.replace(/^validate/, ""), i = r.settings; i[u] && !this.is(i.ignore) && i[u].call(r, this[0], t); } this.labelContainer = n(this.settings.errorLabelContainer); this.errorContext = (this.labelContainer.length && this.labelContainer) || n(this.currentForm); this.containers = n(this.settings.errorContainer).add( this.settings.errorLabelContainer ); this.submitted = {}; this.valueCache = {}; this.pendingRequest = 0; this.pending = {}; this.invalid = {}; this.reset(); var t, r = (this.groups = {}); n.each(this.settings.groups, function (t, i) { "string" == typeof i && (i = i.split(/\s/)); n.each(i, function (n, i) { r[i] = t; }); }); t = this.settings.rules; n.each(t, function (i, r) { t[i] = n.validator.normalizeRule(r); }); n(this.currentForm) .validateDelegate( ":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']", "focusin focusout keyup", i ) .validateDelegate( "select, option, [type='radio'], [type='checkbox']", "click", i ); this.settings.invalidHandler && n(this.currentForm).bind( "invalid-form.validate", this.settings.invalidHandler ); n(this.currentForm) .find("[required], [data-rule-required], .required") .attr("aria-required", "true"); }, form: function () { return ( this.checkForm(), n.extend(this.submitted, this.errorMap), (this.invalid = n.extend({}, this.errorMap)), this.valid() || n(this.currentForm).triggerHandler("invalid-form", [this]), this.showErrors(), this.valid() ); }, checkForm: function () { this.prepareForm(); for (var n = 0, t = (this.currentElements = this.elements()); t[n]; n++) this.check(t[n]); return this.valid(); }, element: function (t) { var u = this.clean(t), i = this.validationTargetFor(u), r = !0; return ( (this.lastElement = i), void 0 === i ? delete this.invalid[u.name] : (this.prepareElement(i), (this.currentElements = n(i)), (r = this.check(i) !== !1), r ? delete this.invalid[i.displayName] : (this.invalid[i.displayName] = !0)), n(t).attr("aria-invalid", !r), this.numberOfInvalids() || (this.toHide = this.toHide.add(this.containers)), this.showErrors(), r ); }, showErrors: function (t) { if (t) { n.extend(this.errorMap, t); this.errorList = []; for (var i in t) this.errorList.push({ message: t[i], element: this.findByName(i)[0], }); this.successList = n.grep(this.successList, function (n) { return !(n.name in t); }); } this.settings.showErrors ? this.settings.showErrors.call(this, this.errorMap, this.errorList) : this.defaultShowErrors(); }, resetForm: function () { n.fn.resetForm && n(this.currentForm).resetForm(); this.submitted = {}; this.lastElement = null; this.prepareForm(); this.hideErrors(); this.elements() .removeClass(this.settings.errorClass) .removeData("previousValue") .removeAttr("aria-invalid"); }, numberOfInvalids: function () { return this.objectLength(this.invalid); }, objectLength: function (n) { var i, t = 0; for (i in n) t++; return t; }, hideErrors: function () { this.hideThese(this.toHide); }, hideThese: function (n) { n.not(this.containers).text(""); this.addWrapper(n).hide(); }, valid: function () { return 0 === this.size(); }, size: function () { return this.errorList.length; }, focusInvalid: function () { if (this.settings.focusInvalid) try { n( this.findLastActive() || (this.errorList.length && this.errorList[0].element) || [] ) .filter(":visible") .focus() .trigger("focusin"); } catch (t) { } }, findLastActive: function () { var t = this.lastActive; return ( t && 1 === n.grep(this.errorList, function (n) { return n.element.name === t.name; }).length && t ); }, elements: function () { var t = this, i = {}; return n(this.currentForm) .find("input, select, textarea") .not(":submit, :reset, :image, [disabled], [readonly]") .not(this.settings.ignore) .filter(function () { return ( !this.name && t.settings.debug && window.console && console.error("%o has no name assigned", this), this.name in i || !t.objectLength(n(this).rules()) ? !1 : ((i[this.name] = !0), !0) ); }); }, clean: function (t) { return n(t)[0]; }, errors: function () { var t = this.settings.errorClass.split(" ").join("."); return n(this.settings.errorElement + "." + t, this.errorContext); }, reset: function () { this.successList = []; this.errorList = []; this.errorMap = {}; this.toShow = n([]); this.toHide = n([]); this.currentElements = n([]); }, prepareForm: function () { this.reset(); this.toHide = this.errors().add(this.containers); }, prepareElement: function (n) { this.reset(); this.toHide = this.errorsFor(n); }, elementValue: function (t) { var i, u = n(t), r = t.type; return "radio" === r || "checkbox" === r ? n("input[name='" + t.name + "']:checked").val() : "number" === r && "undefined" != typeof t.validity ? t.validity.badInput ? !1 : u.val() : ((i = u.val()), "string" == typeof i ? i.replace(/\r/g, "") : i); }, check: function (t) { t = this.validationTargetFor(this.clean(t)); var i, r, u, f = n(t).rules(), s = n.map(f, function (n, t) { return t; }).length, e = !1, h = this.elementValue(t); for (r in f) { u = { method: r, parameters: f[r] }; try { if ( ((i = n.validator.methods[r].call(this, h, t, u.parameters)), "dependency-mismatch" === i && 1 === s) ) { e = !0; continue; } if (((e = !1), "pending" === i)) return void (this.toHide = this.toHide.not(this.errorsFor(t))); if (!i) return this.formatAndAdd(t, u), !1; } catch (o) { throw ( (this.settings.debug && window.console && console.log( "Exception occurred when checking element " + t.id + ", check the '" + u.method + "' method.", o ), o) ); } } if (!e) return this.objectLength(f) && this.successList.push(t), !0; }, customDataMessage: function (t, i) { return ( n(t).data( "msg" + i.charAt(0).toUpperCase() + i.substring(1).toLowerCase() ) || n(t).data("msg") ); }, customMessage: function (n, t) { var i = this.settings.messages[n]; return i && (i.constructor === String ? i : i[t]); }, findDefined: function () { for (var n = 0; n < arguments.length; n++) if (void 0 !== arguments[n]) return arguments[n]; return void 0; }, defaultMessage: function (t, i) { return this.findDefined( this.customMessage(t.name, i), this.customDataMessage(t, i), (!this.settings.ignoreTitle && t.title) || void 0, n.validator.messages[i], "Warning: No message defined for " + t.name + "" ); }, formatAndAdd: function (t, i) { var r = this.defaultMessage(t, i.method), u = /\$?\{(\d+)\}/g; "function" == typeof r ? (r = r.call(this, i.parameters, t)) : u.test(r) && (r = n.validator.format(r.replace(u, "{$1}"), i.parameters)); this.errorList.push({ message: r, element: t, method: i.method }); this.errorMap[t.name] = r; this.submitted[t.name] = r; }, addWrapper: function (n) { return ( this.settings.wrapper && (n = n.add(n.parent(this.settings.wrapper))), n ); }, defaultShowErrors: function () { for (var i, t, n = 0; this.errorList[n]; n++) (t = this.errorList[n]), this.settings.highlight && this.settings.highlight.call( this, t.element, this.settings.errorClass, this.settings.validClass ), this.showLabel(t.element, t.message); if ( (this.errorList.length && (this.toShow = this.toShow.add(this.containers)), this.settings.success) ) for (n = 0; this.successList[n]; n++) this.showLabel(this.successList[n]); if (this.settings.unhighlight) for (n = 0, i = this.validElements(); i[n]; n++) this.settings.unhighlight.call( this, i[n], this.settings.errorClass, this.settings.validClass ); this.toHide = this.toHide.not(this.toShow); this.hideErrors(); this.addWrapper(this.toShow).show(); }, validElements: function () { return this.currentElements.not(this.invalidElements()); }, invalidElements: function () { return n(this.errorList).map(function () { return this.element; }); }, showLabel: function (t, i) { var u, o, e, r = this.errorsFor(t), s = this.idOrName(t), f = n(t).attr("aria-describedby"); r.length ? (r .removeClass(this.settings.validClass) .addClass(this.settings.errorClass), r.html(i)) : ((r = n("<" + this.settings.errorElement + ">") .attr("id", s + "-error") .addClass(this.settings.errorClass) .html(i || "")), (u = r), this.settings.wrapper && (u = r .hide() .show() .wrap("<" + this.settings.wrapper + "/>") .parent()), this.labelContainer.length ? this.labelContainer.append(u) : this.settings.errorPlacement ? this.settings.errorPlacement(u, n(t)) : u.insertAfter(t), r.is("label") ? r.attr("for", s) : 0 === r.parents("label[for='" + s + "']").length && ((e = r.attr("id").replace(/(:|\.|\[|\])/g, "\\$1")), f ? f.match(new RegExp("\\b" + e + "\\b")) || (f += " " + e) : (f = e), n(t).attr("aria-describedby", f), (o = this.groups[t.name]), o && n.each(this.groups, function (t, i) { i === o && n("[name='" + t + "']", this.currentForm).attr( "aria-describedby", r.attr("id") ); }))); !i && this.settings.success && (r.text(""), "string" == typeof this.settings.success ? r.addClass(this.settings.success) : this.settings.success(r, t)); this.toShow = this.toShow.add(r); }, errorsFor: function (t) { var r = this.idOrName(t), u = n(t).attr("aria-describedby"), i = "label[for='" + r + "'], label[for='" + r + "'] *"; return ( u && (i = i + ", #" + u.replace(/\s+/g, ", #")), this.errors().filter(i) ); }, idOrName: function (n) { return ( this.groups[n.name] || (this.checkable(n) ? n.name : n.id || n.name) ); }, validationTargetFor: function (t) { return ( this.checkable(t) && (t = this.findByName(t.name)), n(t).not(this.settings.ignore)[0] ); }, checkable: function (n) { return /radio|checkbox/i.test(n.type); }, findByName: function (t) { return n(this.currentForm).find("[name='" + t + "']"); }, getLength: function (t, i) { switch (i.nodeName.toLowerCase()) { case "select": return n("option:selected", i).length; case "input": if (this.checkable(i)) return this.findByName(i.displayName).filter(":checked").length; } return t.length; }, depend: function (n, t) { return this.dependTypes[typeof n] ? this.dependTypes[typeof n](n, t) : !0; }, dependTypes: { boolean: function (n) { return n; }, string: function (t, i) { return !!n(t, i.form).length; }, function: function (n, t) { return n(t); }, }, optional: function (t) { var i = this.elementValue(t); return ( !n.validator.methods.required.call(this, i, t) && "dependency-mismatch" ); }, startRequest: function (n) { this.pending[n.name] || (this.pendingRequest++, (this.pending[n.name] = !0)); }, stopRequest: function (t, i) { this.pendingRequest--; this.pendingRequest < 0 && (this.pendingRequest = 0); delete this.pending[t.name]; i && 0 === this.pendingRequest && this.formSubmitted && this.form() ? (n(this.currentForm).submit(), (this.formSubmitted = !1)) : !i && 0 === this.pendingRequest && this.formSubmitted && (n(this.currentForm).triggerHandler("invalid-form", [this]), (this.formSubmitted = !1)); }, previousValue: function (t) { return ( n.data(t, "previousValue") || n.data(t, "previousValue", { old: null, valid: !0, message: this.defaultMessage(t, "remote"), }) ); }, }, classRuleSettings: { required: { required: !0 }, email: { email: !0 }, url: { url: !0 }, date: { date: !0 }, dateISO: { dateISO: !0 }, number: { number: !0 }, digits: { digits: !0 }, creditcard: { creditcard: !0 }, }, addClassRules: function (t, i) { t.constructor === String ? (this.classRuleSettings[t] = i) : n.extend(this.classRuleSettings, t); }, classRules: function (t) { var i = {}, r = n(t).attr("class"); return ( r && n.each(r.split(" "), function () { this in n.validator.classRuleSettings && n.extend(i, n.validator.classRuleSettings[this]); }), i ); }, attributeRules: function (t) { var r, i, u = {}, e = n(t), f = t.getAttribute("type"); for (r in n.validator.methods) "required" === r ? ((i = t.getAttribute(r)), "" === i && (i = !0), (i = !!i)) : (i = e.attr(r)), /min|max/.test(r) && (null === f || /number|range|text/.test(f)) && (i = Number(i)), i || 0 === i ? (u[r] = i) : f === r && "range" !== f && (u[r] = !0); return ( u.maxlength && /-1|2147483647|524288/.test(u.maxlength) && delete u.maxlength, u ); }, dataRules: function (t) { var i, r, u = {}, f = n(t); for (i in n.validator.methods) (r = f.data( "rule" + i.charAt(0).toUpperCase() + i.substring(1).toLowerCase() )), void 0 !== r && (u[i] = r); return u; }, staticRules: function (t) { var i = {}, r = n.data(t.form, "validator"); return ( r.settings.rules && (i = n.validator.normalizeRule(r.settings.rules[t.name]) || {}), i ); }, normalizeRules: function (t, i) { return ( n.each(t, function (r, u) { if (u === !1) return void delete t[r]; if (u.param || u.depends) { var f = !0; switch (typeof u.depends) { case "string": f = !!n(u.depends, i.form).length; break; case "function": f = u.depends.call(i, i); } f ? (t[r] = void 0 !== u.param ? u.param : !0) : delete t[r]; } }), n.each(t, function (r, u) { t[r] = n.isFunction(u) ? u(i) : u; }), n.each(["minlength", "maxlength"], function () { t[this] && (t[this] = Number(t[this])); }), n.each(["rangelength", "range"], function () { var i; t[this] && (n.isArray(t[this]) ? (t[this] = [Number(t[this][0]), Number(t[this][1])]) : "string" == typeof t[this] && ((i = t[this].replace(/[\[\]]/g, "").split(/[\s,]+/)), (t[this] = [Number(i[0]), Number(i[1])]))); }), n.validator.autoCreateRanges && (null != t.min && null != t.max && ((t.range = [t.min, t.max]), delete t.min, delete t.max), null != t.minlength && null != t.maxlength && ((t.rangelength = [t.minlength, t.maxlength]), delete t.minlength, delete t.maxlength)), t ); }, normalizeRule: function (t) { if ("string" == typeof t) { var i = {}; n.each(t.split(/\s/), function () { i[this] = !0; }); t = i; } return t; }, addMethod: function (t, i, r) { n.validator.methods[t] = i; n.validator.messages[t] = void 0 !== r ? r : n.validator.messages[t]; i.length < 3 && n.validator.addClassRules(t, n.validator.normalizeRule(t)); }, methods: { required: function (t, i, r) { if (!this.depend(r, i)) return "dependency-mismatch"; if ("select" === i.nodeName.toLowerCase()) { var u = n(i).val(); return u && u.length > 0; } return this.checkable(i) ? this.getLength(t, i) > 0 : n.trim(t).length > 0; }, email: function (n, t) { return ( this.optional(t) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( n ) ); }, url: function (n, t) { return ( this.optional(t) || /^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test( n ) ); }, date: function (n, t) { return this.optional(t) || !/Invalid|NaN/.test(new Date(n).toString()); }, dateISO: function (n, t) { return ( this.optional(t) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(n) ); }, number: function (n, t) { return ( this.optional(t) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(n) ); }, digits: function (n, t) { return this.optional(t) || /^\d+$/.test(n); }, creditcard: function (n, t) { if (this.optional(t)) return "dependency-mismatch"; if (/[^0-9 \-]+/.test(n)) return !1; var i, f, e = 0, r = 0, u = !1; if (((n = n.replace(/\D/g, "")), n.length < 13 || n.length > 19)) return !1; for (i = n.length - 1; i >= 0; i--) (f = n.charAt(i)), (r = parseInt(f, 10)), u && (r *= 2) > 9 && (r -= 9), (e += r), (u = !u); return e % 10 == 0; }, minlength: function (t, i, r) { var u = n.isArray(t) ? t.length : this.getLength(t, i); return this.optional(i) || u >= r; }, maxlength: function (t, i, r) { var u = n.isArray(t) ? t.length : this.getLength(t, i); return this.optional(i) || r >= u; }, rangelength: function (t, i, r) { var u = n.isArray(t) ? t.length : this.getLength(t, i); return this.optional(i) || (u >= r[0] && u <= r[1]); }, min: function (n, t, i) { return this.optional(t) || n >= i; }, max: function (n, t, i) { return this.optional(t) || i >= n; }, range: function (n, t, i) { return this.optional(t) || (n >= i[0] && n <= i[1]); }, equalTo: function (t, i, r) { var u = n(r); return ( this.settings.onfocusout && u .unbind(".validate-equalTo") .bind("blur.validate-equalTo", function () { n(i).valid(); }), t === u.val() ); }, remote: function (t, i, r) { if (this.optional(i)) return "dependency-mismatch"; var u, e, f = this.previousValue(i); return ( this.settings.messages[i.displayName] || (this.settings.messages[i.displayName] = {}), (f.originalMessage = this.settings.messages[i.displayName].remote), (this.settings.messages[i.displayName].remote = f.message), (r = ("string" == typeof r && { url: r }) || r), f.old === t ? f.valid : ((f.old = t), (u = this), this.startRequest(i), (e = {}), (e[i.displayName] = t), n.ajax( n.extend( !0, { url: r, mode: "abort", port: "validate" + i.displayName, dataType: "json", data: e, context: u.currentForm, success: function (r) { var o, e, h, s = r === !0 || "true" === r; u.settings.messages[i.displayName].remote = f.originalMessage; s ? ((h = u.formSubmitted), u.prepareElement(i), (u.formSubmitted = h), u.successList.push(i), delete u.invalid[i.displayName], u.showErrors()) : ((o = {}), (e = r || u.defaultMessage(i, "remote")), (o[i.displayName] = f.message = n.isFunction(e) ? e(t) : e), (u.invalid[i.displayName] = !0), u.showErrors(o)); f.valid = s; u.stopRequest(i, s); }, }, r ) ), "pending") ); }, }, }); n.format = function () { throw "$.format has been deprecated. Please use $.validator.format instead."; }; var i, t = {}; n.ajaxPrefilter ? n.ajaxPrefilter(function (n, i, r) { var u = n.port; "abort" === n.mode && (t[u] && t[u].abort(), (t[u] = r)); }) : ((i = n.ajax), (n.ajax = function (r) { var f = ("mode" in r ? r : n.ajaxSettings).mode, u = ("port" in r ? r : n.ajaxSettings).port; return "abort" === f ? (t[u] && t[u].abort(), (t[u] = i.apply(this, arguments)), t[u]) : i.apply(this, arguments); })); n.extend(n.fn, { validateDelegate: function (t, i, r) { return this.bind(i, function (i) { var u = n(i.target); if (u.is(t)) return r.apply(u, arguments); }); }, }); }), (function (n, t) { function i(n) { var t, r = n.lastIndexOf("/"); if (-1 === r) throw Error('Module "' + n + '" not found'); return (t = n.substr(r + 1)), i.modules[t] || (i.modules[t] = {}); } i.modules = {}; (n.di = i("./ng-di")), (function (n) { "use strict"; function f(n) { return n && "number" == typeof n.length ? "function" != typeof n.hasOwnProperty && "function" != typeof n.constructor ? !0 : "[object Object]" !== Object.prototype.toString.call(n) || "function" == typeof n.callee : !1; } function i(n, t, u) { var e; if (n) if (r(n)) for (e in n) "prototype" != e && "length" != e && "name" != e && n.hasOwnProperty(e) && t.call(u, n[e], e); else if (n.forEach && n.forEach !== i) n.forEach(t, u); else if (f(n)) for (e = 0; n.length > e; e++) t.call(u, n[e], e); else for (e in n) n.hasOwnProperty(e) && t.call(u, n[e], e); return n; } function e(n) { return ( i(arguments, function (t) { t !== n && i(t, function (t, i) { n[i] = t; }); }), n ); } function o(n) { return function (t, i) { n(i, t); }; } function s() { for (var i, n = t.length; n;) { if ((n--, (i = t[n].charCodeAt(0)), 57 == i)) return (t[n] = "A"), t.join(""); if (90 != i) return (t[n] = String.fromCharCode(i + 1)), t.join(""); t[n] = "0"; } return t.unshift("0"), t.join(""); } function h(n) { return function () { return n; }; } function c(n) { return null != n && "object" == typeof n; } function l(n) { return "string" == typeof n; } function u(n) { return "[object Array]" == Object.prototype.toString.apply(n); } function r(n) { return "function" == typeof n; } function a(n, t, i) { if (!n) throw Error( "Argument '" + (t || "?") + "' is " + (i || "required") ); return n; } function v(n, t, i) { return ( i && u(n) && (n = n[n.length - 1]), a( r(n), t, "not a function, got " + (n && "object" == typeof n ? n.constructor.name || "Object" : typeof n) ), n ); } var t = ["0", "0", "0"]; n.forEach = i; n.reverseParams = o; n.extend = e; n.nextUid = s; n.assertArgFn = v; n.valueFn = h; n.isString = l; n.isArray = u; n.isFunction = r; n.isObject = c; })("undefined" == typeof exports ? i("./utils") : exports), (function (n) { "use strict"; n.setupModuleLoader = function (n) { function t(n, t, i) { return n[t] || (n[t] = i()); } return t(n, "module", function () { var n = {}; return function (i, r, u) { return ( r && n.hasOwnProperty(i) && (n[i] = null), t(n, i, function () { function n(n, i, r) { return function () { return t[r || "push"]([n, i, arguments]), o; }; } if (!r) throw Error("No module: " + i); var t = [], f = [], e = n("$injector", "invoke"), o = { _invokeQueue: t, _runBlocks: f, requires: r, name: i, provider: n("$provide", "provider"), factory: n("$provide", "factory"), service: n("$provide", "service"), value: n("$provide", "value"), constant: n("$provide", "constant", "unshift"), config: e, run: function (n) { return f.push(n), this; }, }; return u && e(u), o; }) ); }; }); }; })("undefined" == typeof exports ? i("./module") : exports), (function (n) { "use strict"; var u = i("./utils"), r = function (n) { var i, r = typeof n; return ( "object" === r && null !== n ? "function" == typeof (i = n.$$hashKey) ? (i = n.$$hashKey()) : i === t && (i = n.$$hashKey = u.nextUid()) : (i = n), r + ":" + i ); }; n.HashMap = function (n) { u.forEach(n, this.put, this); }; n.HashMap.prototype = { put: function (n, t) { this[r(n)] = t; }, get: function (n) { return this[r(n)]; }, remove: function (n) { var t = this[(n = r(n))]; return delete this[n], t; }, }; })("undefined" == typeof exports ? i("./hashmap") : exports), (function (n) { "use strict"; var f = i("./hashmap"), r = i("./utils"), e = i("./ng-di"), o = /^function\s*[^\(]*\(\s*([^\)]*)\)/m, s = /,/, h = /^\s*(_?)(\S+?)\1\s*$/, c = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm, u = (n.annotate = function (n) { var t, u, f, i; return ( "function" == typeof n ? (t = n.$inject) || ((t = []), (u = ("" + n).replace(c, "")), (f = u.match(o)), r.forEach(f[1].split(s), function (n) { n.replace(h, function (n, i, r) { t.push(r); }); }), (n.$inject = t)) : r.isArray(n) ? ((i = n.length - 1), r.assertArgFn(n[i], "fn"), (t = n.slice(0, i))) : r.assertArgFn(n, "fn", !0), t ); }); n.createInjector = function (n) { function o(n) { return function (i, u) { return r.isObject(i) ? (r.forEach(i, r.reverseParams(n)), t) : n(i, u); }; } function y(n, t) { if ( ((r.isFunction(t) || r.isArray(t)) && (t = i.instantiate(t)), !t.$get) ) throw Error( "Provider " + n + " must define $get factory method." ); return (c[n + a] = t); } function l(n, t) { return y(n, { $get: t }); } function d(n, t) { return l(n, [ "$injector", function (n) { return n.instantiate(t); }, ]); } function g(n, t) { return l(n, r.valueFn(t)); } function nt(n, t) { c[n] = t; v[n] = t; } function tt(n, t) { var r = i.get(n + a), u = r.$get; r.$get = function () { var n = s.invoke(u, r); return s.invoke(t, null, { $delegate: n }); }; } function p(n) { var t = []; return ( r.forEach(n, function (n) { var f, o, h; if (!k.get(n)) if ((k.put(n, !0), r.isString(n))) { f = e.module(n); t = t.concat(p(f.requires)).concat(f._runBlocks); try { for ( var c = f._invokeQueue, s = 0, l = c.length; l > s; s++ ) (o = c[s]), (h = i.get(o[0])), h[o[1]].apply(h, o[2]); } catch (u) { throw (u.message && (u.message += " from " + n), u); } } else if (r.isFunction(n)) try { t.push(i.invoke(n)); } catch (u) { throw (u.message && (u.message += " from " + n), u); } else if (r.isArray(n)) try { t.push(i.invoke(n)); } catch (u) { throw ( (u.message && (u.message += " from " + (n[n.length - 1] + "")), u) ); } else r.assertArgFn(n, "module"); }), t ); } function w(n, t) { function i(i) { if ("string" != typeof i) throw Error("Service name expected"); if (n.hasOwnProperty(i)) { if (n[i] === b) throw Error("Circular dependency: " + h.join(" <- ")); return n[i]; } try { return h.unshift(i), (n[i] = b), (n[i] = t(i)); } finally { h.shift(); } } function f(n, t, r) { for (var o, f = [], h = u(n), e = 0, s = h.length; s > e; e++) (o = h[e]), f.push(r && r.hasOwnProperty(o) ? r[o] : i(o)); switch ((n.$inject || (n = n[s]), t ? -1 : f.length)) { case 0: return n(); case 1: return n(f[0]); case 2: return n(f[0], f[1]); case 3: return n(f[0], f[1], f[2]); case 4: return n(f[0], f[1], f[2], f[3]); case 5: return n(f[0], f[1], f[2], f[3], f[4]); case 6: return n(f[0], f[1], f[2], f[3], f[4], f[5]); case 7: return n(f[0], f[1], f[2], f[3], f[4], f[5], f[6]); case 8: return n(f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7]); case 9: return n( f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7], f[8] ); case 10: return n( f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7], f[8], f[9] ); default: return n.apply(t, f); } } function e(n, t) { var i, u, e = function () { }; return ( (e.prototype = (r.isArray(n) ? n[n.length - 1] : n).prototype), (i = new e()), (u = f(n, i, t)), r.isObject(u) ? u : i ); } return { invoke: f, instantiate: e, get: i, annotate: u }; } var b = {}, a = "Provider", h = [], k = new f.HashMap(), c = { $provide: { provider: o(y), factory: o(l), service: o(d), value: o(g), constant: o(nt), decorator: tt, }, }, i = (c.$injector = w(c, function () { throw Error("Unknown provider: " + h.join(" <- ")); })), v = {}, s = (v.$injector = w(v, function (n) { var t = i.get(n + a); return s.invoke(t.$get, t); })); return ( r.forEach(p(n), function (n) { s.invoke(n || function () { }); }), s ); }; })("undefined" == typeof exports ? i("./injector") : exports), (function (n) { "use strict"; n.module = i("./module").setupModuleLoader(n); n.injector = i("./injector").createInjector; })("undefined" == typeof exports ? i("./ng-di") : exports); })(this), (function (n, t) { typeof module != "undefined" && module.exports ? (module.exports = t()) : typeof define == "function" && define.amd ? define(t) : (this[n] = t()); })("$script", function () { function f(n, t) { for (var i = 0, r = n.length; i < r; ++i) if (!t(n[i])) return p; return 1; } function e(n, t) { f(n, function (n) { return !t(n); }); } function n(s, c, l) { function p(n) { return n.call ? n() : r[n]; } function v() { if (!--k) { r[a] = 1; b && b(); for (var n in t) f(n.split("|"), p) && !e(t[n], p) && (t[n] = []); } } s = s[i] ? s : [s]; var w = c && c.call, b = w ? c : l, a = w ? s.join("") : c, k = s.length; return ( setTimeout(function () { e(s, function n(t, i) { if (t === null) return v(); if ( ((t = !i && t.indexOf(".js") === -1 && !/^https?:\/\//.test(t) && o ? o + t + ".js" : t), u[t]) ) return ( a && (y[a] = 1), u[t] == 2 ? v() : setTimeout(function () { n(t, !0); }, 0) ); u[t] = 1; a && (y[a] = 1); h(t, v); }); }, 0), n ); } function h(n, t) { var i = c.createElement("script"), r; i.onload = i.onerror = i[v] = function () { (i[a] && !/^c|loade/.test(i[a])) || r || ((i.onload = i[v] = null), (r = 1), (u[n] = 2), t()); }; i.async = 1; i.src = s ? n + (n.indexOf("?") === -1 ? "?" : "&") + s : n; l.insertBefore(i, l.lastChild); } var c = document, l = c.getElementsByTagName("head")[0], p = !1, i = "push", a = "readyState", v = "onreadystatechange", r = {}, y = {}, t = {}, u = {}, o, s; return ( (n.get = h), (n.order = function (t, i, r) { (function u(f) { f = t.shift(); t.length ? n(f, u) : n(f, i, r); })(); }), (n.path = function (n) { o = n; }), (n.urlArgs = function (n) { s = n; }), (n.ready = function (u, o, s) { u = u[i] ? u : [u]; var h = []; return ( !e(u, function (n) { r[n] || h[i](n); }) && f(u, function (n) { return r[n]; }) ? o() : !(function (n) { t[n] = t[n] || []; t[n][i](o); s && s(h); })(u.join("|")), n ); }), (n.done = function (t) { n([null], t); }), n ); }), (function (n) { if (typeof define == "function" && define.amd) define(n); else if (typeof exports == "object") module.exports = n(); else { var i = window.Cookies, t = (window.Cookies = n(window.jQuery)); t.noConflict = function () { return (window.Cookies = i), t; }; } })(function () { function n() { for (var n = 0, r = {}, t, i; n < arguments.length; n++) { t = arguments[n]; for (i in t) r[i] = t[i]; } return r; } function t(i) { function r(t, u, f) { var o, s; if (arguments.length > 1) { f = n({ path: "/" }, r.defaults, f); typeof f.expires == "number" && ((s = new Date()), s.setMilliseconds(s.getMilliseconds() + f.expires * 864e5), (f.expires = s)); try { o = JSON.stringify(u); /^[\{\[]/.test(o) && (u = o); } catch (y) { } return ( (u = encodeURIComponent(String(u))), (u = u.replace( /%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent )), (t = encodeURIComponent(String(t))), (t = t.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)), (t = t.replace(/[\(\)]/g, escape)), (document.cookie = [ t, "=", u, f.expires && "; expires=" + f.expires.toUTCString(), f.path && "; path=" + f.path, f.domain && "; domain=" + f.domain, f.secure && "; secure", ].join("")) ); } t || (o = {}); for ( var l = document.cookie ? document.cookie.split("; ") : [], a = /(%[0-9A-Z]{2})+/g, h = 0; h < l.length; h++ ) { var v = l[h].split("="), c = v[0].replace(a, decodeURIComponent), e = v.slice(1).join("="); if ( (e.charAt(0) === '"' && (e = e.slice(1, -1)), (e = (i && i(e, c)) || e.replace(a, decodeURIComponent)), this.json) ) try { e = JSON.parse(e); } catch (y) { } if (t === c) { o = e; break; } t || (o[c] = e); } return o; } return ( (r.get = r.set = r), (r.getJSON = function () { return r.apply({ json: !0 }, [].slice.call(arguments)); }), (r.defaults = {}), (r.remove = function (t, i) { r(t, "", n(i, { expires: -1 })); }), (r.withConverter = t), r ); } return t(); }), (function (n) { n.fn.columnize = function (t) { function i(n, t) { try { n.append(t); } catch (i) { n[0].appendChild(t[0]); } } this.cols = []; this.offset = 0; this.before = []; this.lastOther = 0; this.prevMax = 0; this.debug = 0; this.setColumnStart = null; this.elipsisText = ""; var r = { width: 400, columns: !1, buildOnce: !1, overflow: !1, doneFunc: function () { }, target: !1, ignoreImageLoading: !0, columnFloat: "left", lastNeverTallest: !1, accuracy: !1, precise: !1, manualBreaks: !1, cssClassPrefix: "", elipsisText: "...", debug: 0, }; return ( (t = n.extend(r, t)), typeof t.width == "string" && ((t.width = parseInt(t.width, 10)), isNaN(t.width) && (t.width = r.width)), typeof t.setColumnStart == "function" && (this.setColumnStart = t.setColumnStart), typeof t.elipsisText == "string" && (this.elipsisText = t.elipsisText), t.debug && (this.debug = t.debug), t.setWidth || (t.setWidth = t.precise ? function (n) { return 100 / n; } : function (n) { return Math.floor(100 / n); }), this.each(function () { function f(n, t) { var i = t ? "." : ""; return h.length ? i + h + "-" + n : i + n; } function a(r, u, e, o) { for ( var v, p, w, c, h, y, b, l, a; (s || e.height() < o) && u[0].childNodes.length; ) { if ( ((v = u[0].childNodes[0]), n(v).find(f("columnbreak", !0)).length) ) return; if (n(v).hasClass(f("columnbreak"))) return; i(r, n(v)); } if (r[0].childNodes.length !== 0) { if ( ((p = r[0].childNodes), (w = p[p.length - 1]), r[0].removeChild(w), (c = n(w)), c[0].nodeType == 3) ) { for ( h = c[0].nodeValue, y = t.width / 18, t.accuracy && (y = t.accuracy), l = null; e.height() < o && h.length; ) (a = h.indexOf(" ", y)), (b = a != -1 ? h.substring(0, a) : h), (l = document.createTextNode(b)), i(r, n(l)), (h = h.length > y && a != -1 ? h.substring(a) : ""); if ( (e.height() >= o && l !== null && (r[0].removeChild(l), (h = l.nodeValue + h)), h.length) ) c[0].nodeValue = h; else return !1; } return ( u.contents().length ? u.prepend(c) : i(u, c), c[0].nodeType == 3 ); } } function v(n, t, r, u) { var e, o, c, h, l, y; if ( !n.contents(":last").find(f("columnbreak", !0)).length && !n.contents(":last").hasClass(f("columnbreak")) && t.contents().length ) { if ( ((e = t.contents(":first")), typeof e.get(0) == "undefined" || e.get(0).nodeType != 1) ) return; o = e.clone(!0); e.hasClass(f("columnbreak")) ? (i(n, o), e.remove()) : s ? (i(n, o), e.remove()) : o.get(0).nodeType != 1 || o.hasClass(f("dontend")) || (i(n, o), o.is("img") && r.height() < u + 20 ? e.remove() : e.hasClass(f("dontsplit")) && r.height() < u + 20 ? e.remove() : o.is("img") || e.hasClass(f("dontsplit")) ? o.remove() : (o.empty(), a(o, e, r, u) ? e.addClass(f("split")) : (e.addClass(f("split")), e.get(0).tagName == "OL" && ((c = o.get(0).childElementCount + o.get(0).start), e.attr("start", c + 1)), e.children().length && v(o, e, r, u)), o.get(0).childNodes.length === 0 ? (o.remove(), e.removeClass(f("split"))) : o.get(0).childNodes.length == 1 && ((h = o.get(0).childNodes[0]), h.nodeType == 3 && ((l = /\s/), (y = h.nodeValue), l.test(y) && (o.remove(), e.removeClass(f("split"))))))); } } function b() { var c, l, h, r, s, y; if (!u.data("columnized") || u.children().length != 1) { if ( (u.data("columnized", !0), u.data("columnizing", !0), u.empty(), u.append( n( "
" ) ), ($col = u.children().eq(u.children().length - 1)), ($destroyable = e.clone(!0)), t.overflow) ) { for ( targetHeight = t.overflow.height, a($col, $destroyable, $col, targetHeight), $destroyable .contents() .find(":first-child") .hasClass(f("dontend")) || v($col, $destroyable, $col, targetHeight); $col.contents(":last").length && o($col.contents(":last").get(0)); ) (c = $col.contents(":last")), c.remove(), $destroyable.prepend(c); for ( l = "", h = document.createElement("DIV"); $destroyable[0].childNodes.length > 0; ) { if (((r = $destroyable[0].childNodes[0]), r.attributes)) for (s = 0; s < r.attributes.length; s++) r.attributes[s].nodeName.indexOf("jQuery") === 0 && r.removeAttribute(r.attributes[s].nodeName); h.innerHTML = ""; h.appendChild($destroyable[0].childNodes[0]); l += h.innerHTML; } y = n(t.overflow.id)[0]; y.innerHTML = l; } else i($col, $destroyable.contents()); u.data("columnizing", !1); t.overflow && t.overflow.doneFunc && t.overflow.doneFunc(); t.doneFunc(); } } function o(t) { return t.nodeType == 3 ? /^\s+$/.test(t.nodeValue) ? t.previousSibling ? o(t.previousSibling) : !1 : !1 : t.nodeType != 1 ? !1 : n(t).hasClass(f("dontend")) ? !0 : t.childNodes.length === 0 ? !1 : o(t.childNodes[t.childNodes.length - 1]); } function w() { var g, l, nt, r, et, h, vt, yt, ot, ut, rt, pt, ft; if (((c = 0), p != u.width())) { p = u.width(); var w = Math.round(u.width() / t.width), tt = t.width, at = t.height; if ( (t.columns && (w = t.columns), s && ((w = e.find(f("columnbreak", !0)).length + 1), (tt = !1)), w <= 1) ) return b(); if (!u.data("columnizing")) { u.data("columnized", !0); u.data("columnizing", !0); u.empty(); u.append( n( "" ) ); r = u.children(":last"); i(r, e.clone()); y = r.height(); u.empty(); var k = y / w, d = 3, it = !1; for ( t.overflow ? ((d = 1), (k = t.overflow.height)) : at && tt && ((d = 1), (k = at), (it = !0)), g = 0; g < d && g < 20; g++ ) { u.empty(); try { l = e.clone(!0); } catch (kt) { l = e.clone(); } for (l.css("visibility", "hidden"), h = 0; h < w; h++) (nt = h === 0 ? f("first") : ""), (nt += " " + f("column")), (nt = h == w - 1 ? f("last") + " " + nt : nt), u.append( n( "" ) ); for ( h = 0; h < w - (t.overflow ? 0 : 1) || (it && l.contents().length); ) { for ( u.children().length <= h && u.append( n( "" ) ), r = u.children().eq(h), it && r.width(tt + "px"), a(r, l, r, k), v(r, l, r, k); r.contents(":last").length && o(r.contents(":last").get(0)); ) (et = r.contents(":last")), et.remove(), l.prepend(et); h++; r.contents().length === 0 && l.contents().length ? r.append(l.contents(":first")) : h != w - (t.overflow ? 0 : 1) || t.overflow || (l.find(f("columnbreak", !0)).length && w++); } if (t.overflow && !it) if ( ((vt = !1), (yt = document.all && navigator.appVersion.indexOf("MSIE 7.") != -1), vt || yt) ) { for ( ot = "", ut = document.createElement("DIV"); l[0].childNodes.length > 0; ) { for ( rt = l[0].childNodes[0], h = 0; h < rt.attributes.length; h++ ) rt.attributes[h].nodeName.indexOf("jQuery") === 0 && rt.removeAttribute(rt.attributes[h].nodeName); ut.innerHTML = ""; ut.appendChild(l[0].childNodes[0]); ot += ut.innerHTML; } pt = n(t.overflow.id)[0]; pt.innerHTML = ot; } else n(t.overflow.id).empty().append(l.contents().clone(!0)); else if (it) u.children().each(function (n) { r = u.children().eq(n); r.width(tt + "px"); n === 0 ? r.addClass(f("first")) : n == u.children().length - 1 ? r.addClass(f("last")) : (r.removeClass(f("first")), r.removeClass(f("last"))); }), u.width(u.children().length * tt + "px"); else { r = u.children().eq(u.children().length - 1); l.contents().each(function () { r.append(n(this)); }); var bt = r.height(), dt = bt - k, st = 0, ht = 1e7, ct = 0, lt = !1, wt = 0; u.children().each( (function (n) { return function (t) { var r = n.children().eq(t), u = r .children(":last") .find(f("columnbreak", !0)).length, i; u || ((i = r.height()), (lt = !1), (st += i), i > ct && ((ct = i), (lt = !0)), i < ht && (ht = i), wt++); }; })(u) ); ft = st / wt; st === 0 ? (g = d) : t.lastNeverTallest && lt ? ((c += 5), (k = k + 30), g == d - 1 && d++) : ct - ht > 30 ? (k = ft + 30) : Math.abs(ft - k) > 20 ? (k = ft) : (g = d); } u.append(n("