if(!function(n,t,i,r){function v(n,t){var i=Math.max(0,n[0]-t[0],t[0]-n[1]),r=Math.max(0,n[2]-t[1],t[1]-n[3]);return i+r}function y(t,i,r,u){var o=t.length,s=u?"offset":"position",e,f;for(r=r||0;o--;)e=t[o].el?t[o].el:n(t[o]),f=e[s](),f.left+=parseInt(e.css("margin-left"),10),f.top+=parseInt(e.css("margin-top"),10),i[o]=[f.left-r,f.left+e.outerWidth()+r,f.top-r,f.top+e.outerHeight()+r]}function o(n,t){var i=t.offset();return{left:n.left-i.left,top:n.top-i.top}}function p(n,t,i){t=[t.left,t.top];i=i&&[i.left,i.top];for(var u,r=n.length,f=[];r--;)u=n[r],f[r]=[r,v(u,t),i&&v(u,i)];return f.sort(function(n,t){return t[1]-n[1]||t[2]-n[2]||t[0]-n[0]})}function s(t){this.options=n.extend({},u,t);this.containers=[];this.options.rootGroup||(this.scrollProxy=n.proxy(this.scroll,this),this.dragProxy=n.proxy(this.drag,this),this.dropProxy=n.proxy(this.drop,this),this.placeholder=n(this.options.placeholder),t.isValidTarget||(this.options.isValidTarget=r))}function l(t,i){this.el=t;this.options=n.extend({},w,i);this.group=s.get(this.options);this.rootGroup=this.options.rootGroup||this.group;this.handle=this.rootGroup.options.handle||this.rootGroup.options.itemSelector;var r=this.rootGroup.options.itemPath;this.target=r?this.el.find(r):this.el;this.target.on(c.start,this.handle,n.proxy(this.dragInit,this));this.options.drop&&this.group.containers.push(this)}var w={drag:!0,drop:!0,exclude:"",nested:!0,vertical:!0},u={afterMove:function(){},containerPath:"",containerSelector:"ol, ul",distance:0,delay:0,handle:"",itemPath:"",itemSelector:"li",bodyClass:"dragging",draggedClass:"dragged",isValidTarget:function(){return!0},onCancel:function(){},onDrag:function(n,t){n.css(t)},onDragStart:function(t,i){t.css({height:t.outerHeight(),width:t.outerWidth()});t.addClass(i.group.options.draggedClass);n("body").addClass(i.group.options.bodyClass)},onDrop:function(t,i){t.removeClass(i.group.options.draggedClass).removeAttr("style");n("body").removeClass(i.group.options.bodyClass)},onMousedown:function(n,t,i){if(!i.target.nodeName.match(/^(input|select|textarea)$/i))return i.preventDefault(),!0},placeholderClass:"placeholder",placeholder:'<li class="placeholder"><\/li>',pullPlaceholder:!0,serialize:function(t,i,r){var u=n.extend({},t.data());return r?[i]:(i[0]&&(u.children=i),delete u.subContainers,delete u.sortable,u)},tolerance:0},f={},a=0,b={left:0,top:0,bottom:0,right:0},c={start:"touchstart.sortable mousedown.sortable",drop:"touchend.sortable touchcancel.sortable mouseup.sortable",drag:"touchmove.sortable mousemove.sortable",scroll:"scroll.sortable"},e="subContainers",h;s.get=function(n){return f[n.group]||(n.group===r&&(n.group=a++),f[n.group]=new s(n)),f[n.group]};s.prototype={dragInit:function(t,i){this.$document=n(i.el[0].ownerDocument);var r=n(t.target).closest(this.options.itemSelector);if(r.length){if(this.item=r,this.itemContainer=i,this.item.is(this.options.exclude)||!this.options.onMousedown(this.item,u.onMousedown,t))return;this.setPointer(t);this.toggleListeners("on");this.setupDelayTimer();this.dragInitDone=!0}},drag:function(n){if(!this.dragging){if(!this.distanceMet(n)||!this.delayMet)return;this.options.onDragStart(this.item,this.itemContainer,u.onDragStart,n);this.item.before(this.placeholder);this.dragging=!0}this.setPointer(n);this.options.onDrag(this.item,o(this.pointer,this.item.offsetParent()),u.onDrag,n);var i=this.getPointer(n),t=this.sameResultBox,f=this.options.tolerance;(!t||t.top-f>i.top||t.bottom+f<i.top||t.left-f>i.left||t.right+f<i.left)&&(this.searchValidTarget()||(this.placeholder.detach(),this.lastAppendedItem=r))},drop:function(n){if(this.toggleListeners("off"),this.dragInitDone=!1,this.dragging){if(this.placeholder.closest("html")[0])this.placeholder.before(this.item).detach();else this.options.onCancel(this.item,this.itemContainer,u.onCancel,n);this.options.onDrop(this.item,this.getContainer(this.item),u.onDrop,n);this.clearDimensions();this.clearOffsetParent();this.lastAppendedItem=this.sameResultBox=r;this.dragging=!1}},searchValidTarget:function(n,t){var i,u,s,h,f,e;for(n||(n=this.relativePointer||this.pointer,t=this.lastRelativePointer||this.lastPointer),i=p(this.getContainerDimensions(),n,t),u=i.length;u--;)if(s=i[u][0],h=i[u][1],(!h||this.options.pullPlaceholder)&&(f=this.containers[s],!f.disabled&&(this.$getOffsetParent()||(e=f.getItemOffsetParent(),n=o(n,e),t=o(t,e)),f.searchValidTarget(n,t))))return!0;this.sameResultBox&&(this.sameResultBox=r)},movePlaceholder:function(n,t,i,r){var u=this.lastAppendedItem;(r||!u||u[0]!==t[0])&&(t[i](this.placeholder),this.lastAppendedItem=t,this.sameResultBox=r,this.options.afterMove(this.placeholder,n,t))},getContainerDimensions:function(){return this.containerDimensions||y(this.containers,this.containerDimensions=[],this.options.tolerance,!this.$getOffsetParent()),this.containerDimensions},getContainer:function(n){return n.closest(this.options.containerSelector).data(i)},$getOffsetParent:function(){if(this.offsetParent===r){var n=this.containers.length-1,t=this.containers[n].getItemOffsetParent();if(!this.options.rootGroup)while(n--)if(t[0]!=this.containers[n].getItemOffsetParent()[0]){t=!1;break}this.offsetParent=t}return this.offsetParent},setPointer:function(n){var t=this.getPointer(n),i;this.$getOffsetParent()&&(i=o(t,this.$getOffsetParent()),this.lastRelativePointer=this.relativePointer,this.relativePointer=i);this.lastPointer=this.pointer;this.pointer=t},distanceMet:function(n){var t=this.getPointer(n);return Math.max(Math.abs(this.pointer.left-t.left),Math.abs(this.pointer.top-t.top))>=this.options.distance},getPointer:function(n){var t=n.originalEvent||n.originalEvent.touches&&n.originalEvent.touches[0];return{left:n.pageX||t.pageX,top:n.pageY||t.pageY}},setupDelayTimer:function(){var n=this;this.delayMet=!this.options.delay;this.delayMet||(clearTimeout(this._mouseDelayTimer),this._mouseDelayTimer=setTimeout(function(){n.delayMet=!0},this.options.delay))},scroll:function(){this.clearDimensions();this.clearOffsetParent()},toggleListeners:function(t){var i=this;n.each(["drag","drop","scroll"],function(n,r){i.$document[t](c[r],i[r+"Proxy"])})},clearOffsetParent:function(){this.offsetParent=r},clearDimensions:function(){this.traverse(function(n){n._clearDimensions()})},traverse:function(n){n(this);for(var t=this.containers.length;t--;)this.containers[t].traverse(n)},_clearDimensions:function(){this.containerDimensions=r},_destroy:function(){f[this.options.group]=r}};l.prototype={dragInit:function(n){var t=this.rootGroup;!this.disabled&&!t.dragInitDone&&this.options.drag&&this.isValidDrag(n)&&t.dragInit(n,this)},isValidDrag:function(n){return n.which==1||n.type=="touchstart"&&n.originalEvent.touches.length==1},searchValidTarget:function(n,t){var f=p(this.getItemDimensions(),n,t),i=f.length,r=this.rootGroup,e=!r.options.isValidTarget||r.options.isValidTarget(r.item,this),u,o,s;if(!i&&e)return r.movePlaceholder(this,this.target,"append"),!0;while(i--)if(u=f[i][0],o=f[i][1],!o&&this.hasChildGroup(u)){if(s=this.getContainerGroup(u).searchValidTarget(n,t),s)return!0}else if(e)return this.movePlaceholder(u,n),!0},movePlaceholder:function(t,i){var u=n(this.items[t]),f=this.itemDimensions[t],o="after",s=u.outerWidth(),h=u.outerHeight(),e=u.offset(),r={left:e.left,right:e.left+s,top:e.top,bottom:e.top+h},c,l,a,v;this.options.vertical?(c=(f[2]+f[3])/2,l=i.top<=c,l?(o="before",r.bottom-=h/2):r.top+=h/2):(a=(f[0]+f[1])/2,v=i.left<=a,v?(o="before",r.right-=s/2):r.left+=s/2);this.hasChildGroup(t)&&(r=b);this.rootGroup.movePlaceholder(this,u,o,r)},getItemDimensions:function(){return this.itemDimensions||(this.items=this.$getChildren(this.el,"item").filter(":not(."+this.group.options.placeholderClass+", ."+this.group.options.draggedClass+")").get(),y(this.items,this.itemDimensions=[],this.options.tolerance)),this.itemDimensions},getItemOffsetParent:function(){var n=this.el;return n.css("position")==="relative"||n.css("position")==="absolute"||n.css("position")==="fixed"?n:n.offsetParent()},hasChildGroup:function(n){return this.options.nested&&this.getContainerGroup(n)},getContainerGroup:function(t){var u=n.data(this.items[t],e),f,o;return u===r&&(f=this.$getChildren(this.items[t],"container"),u=!1,f[0]&&(o=n.extend({},this.options,{rootGroup:this.rootGroup,group:a++}),u=f[i](o).data(i).group),n.data(this.items[t],e,u)),u},$getChildren:function(t,i){var r=this.rootGroup.options,u=r[i+"Path"],f=r[i+"Selector"];return t=n(t),u&&(t=t.find(u)),t.children(f)},_serialize:function(t,i){var r=this,u=i?"item":"container",f=this.$getChildren(t,u).not(this.options.exclude).map(function(){return r._serialize(n(this),!i)}).get();return this.rootGroup.options.serialize(t,f,i)},traverse:function(t){n.each(this.items||[],function(){var i=n.data(this,e);i&&i.traverse(t)});t(this)},_clearDimensions:function(){this.itemDimensions=r},_destroy:function(){var t=this;this.target.off(c.start,this.handle);this.el.removeData(i);this.options.drop&&(this.group.containers=n.grep(this.group.containers,function(n){return n!=t}));n.each(this.items||[],function(){n.removeData(this,e)})}};h={enable:function(){this.traverse(function(n){n.disabled=!1})},disable:function(){this.traverse(function(n){n.disabled=!0})},serialize:function(){return this._serialize(this.el,!0)},refresh:function(){this.traverse(function(n){n._clearDimensions()})},destroy:function(){this.traverse(function(n){n._destroy()})}};n.extend(l.prototype,h);n.fn[i]=function(t){var u=Array.prototype.slice.call(arguments,1);return this.map(function(){var f=n(this),e=f.data(i);return e&&h[t]?h[t].apply(e,u)||this:(e||t!==r&&typeof t!="object"||f.data(i,new l(f,t)),this)})}}(jQuery,window,"sortable"),!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=n(require("jquery")):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.on("click.validate",":submit",function(t){i.settings.submitHandler&&(i.submitButton=t.target);n(this).hasClass("cancel")&&(i.cancelSubmit=!0);void 0!==n(this).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.on("submit.validate",function(t){function r(){var u,r;return i.settings.submitHandler?(i.submitButton&&(u=n("<input type='hidden'/>").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,r;return n(this[0]).is("form")?t=this.validate().form():(r=[],t=!0,i=n(this[0].form).validate(),this.each(function(){t=i.element(this)&&t;t||(r=r.concat(i.errorList))}),i.errorList=r),t},rules:function(t,i){if(this.length){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){var i=n(t).val();return null!==i&&!!n.trim(""+i)},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)}:void 0===i?t:(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",pendingClass:"pending",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(t,i){9===i.which&&""===this.elementValue(t)||-1!==n.inArray(i.keyCode,[16,17,18,20,35,36,37,38,39,40,45,144,225])||(t.name in this.submitted||t.name in this.invalid)&&this.element(t)},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.",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}."),step:n.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function i(t){var r=n.data(this.form,"validator"),u="on"+t.type.replace(/^validate/,""),i=r.settings;i[u]&&!n(this).is(i.ignore)&&i[u].call(r,this,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).on("focusin.validate focusout.validate keyup.validate",":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'], [contenteditable]",i).on("click.validate","select, option, [type='radio'], [type='checkbox']",i);this.settings.invalidHandler&&n(this.currentForm).on("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 e,o,i=this.clean(t),r=this.validationTargetFor(i),u=this,f=!0;return void 0===r?delete this.invalid[i.name]:(this.prepareElement(r),this.currentElements=n(r),o=this.groups[r.name],o&&n.each(this.groups,function(n,t){t===o&&n!==r.name&&(i=u.validationTargetFor(u.clean(u.findByName(n))),i&&i.name in u.invalid&&(u.currentElements.push(i),f=f&&u.check(i)))}),e=this.check(r)!==!1,f=f&&e,this.invalid[r.name]=e?!1:!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),n(t).attr("aria-invalid",!e)),f},showErrors:function(t){if(t){var i=this;n.extend(this.errorMap,t);this.errorList=n.map(this.errorMap,function(n,t){return{message:n,element:i.findByName(t)[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.invalid={};this.submitted={};this.prepareForm();this.hideErrors();var t=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(t)},resetElements:function(n){var t;if(this.settings.unhighlight)for(t=0;n[t];t++)this.settings.unhighlight.call(this,n[t],this.settings.errorClass,""),this.findByName(n[t].name).removeClass(this.settings.validClass);else n.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(n){var t,i=0;for(t in n)n[t]&&i++;return i},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, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var r=this.name||n(this).attr("name");return!r&&t.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=n(this).closest("form")[0]),r in i||!t.objectLength(n(this).rules())?!1:(i[r]=!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)},resetInternals:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=n([]);this.toHide=n([])},reset:function(){this.resetInternals();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,r,f=n(t),u=t.type;return"radio"===u||"checkbox"===u?this.findByName(t.name).filter(":checked").val():"number"===u&&"undefined"!=typeof t.validity?t.validity.badInput?"NaN":f.val():(i=t.hasAttribute("contenteditable")?f.text():f.val(),"file"===u?"C:\\fakepath\\"===i.substr(0,12)?i.substr(12):(r=i.lastIndexOf("/"),r>=0?i.substr(r+1):(r=i.lastIndexOf("\\"),r>=0?i.substr(r+1):i)):"string"==typeof i?i.replace(/\r/g,""):i)},check:function(t){t=this.validationTargetFor(this.clean(t));var u,f,r,i=n(t).rules(),h=n.map(i,function(n,t){return t}).length,s=!1,e=this.elementValue(t);if("function"==typeof i.normalizer){if(e=i.normalizer.call(t,e),"string"!=typeof e)throw new TypeError("The normalizer should return a string value.");delete i.normalizer}for(f in i){r={method:f,parameters:i[f]};try{if(u=n.validator.methods[f].call(this,e,t,r.parameters),"dependency-mismatch"===u&&1===h){s=!0;continue}if(s=!1,"pending"===u)return void(this.toHide=this.toHide.not(this.errorsFor(t)));if(!u)return this.formatAndAdd(t,r),!1}catch(o){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+t.id+", check the '"+r.method+"' method.",o),o instanceof TypeError&&(o.message+=".  Exception occurred when checking element "+t.id+", check the '"+r.method+"' method."),o;}}if(!s)return this.objectLength(i)&&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]},defaultMessage:function(t,i){var r=this.findDefined(this.customMessage(t.name,i.method),this.customDataMessage(t,i.method),!this.settings.ignoreTitle&&t.title||void 0,n.validator.messages[i.method],"<strong>Warning: No message defined for "+t.name+"<\/strong>"),u=/\$?\{(\d+)\}/g;return"function"==typeof r?r=r.call(this,i.parameters,t):u.test(r)&&(r=n.validator.format(r.replace(u,"{$1}"),i.parameters)),r},formatAndAdd:function(n,t){var i=this.defaultMessage(n,t);this.errorList.push({message:i,element:n,method:t.method});this.errorMap[n.name]=i;this.submitted[n.name]=i},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,s,e,o,r=this.errorsFor(t),h=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",h+"-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",h):0===r.parents("label[for='"+this.escapeCssMeta(h)+"']").length&&(e=r.attr("id"),f?f.match(new RegExp("\\b"+this.escapeCssMeta(e)+"\\b"))||(f+=" "+e):f=e,n(t).attr("aria-describedby",f),s=this.groups[t.name],s&&(o=this,n.each(o.groups,function(t,i){i===s&&n("[name='"+o.escapeCssMeta(t)+"']",o.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.escapeCssMeta(this.idOrName(t)),u=n(t).attr("aria-describedby"),i="label[for='"+r+"'], label[for='"+r+"'] *";return u&&(i=i+", #"+this.escapeCssMeta(u).replace(/\s+/g,", #")),this.errors().filter(i)},escapeCssMeta:function(n){return n.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},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='"+this.escapeCssMeta(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.name).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(t){this.pending[t.name]||(this.pendingRequest++,n(t).addClass(this.settings.pendingClass),this.pending[t.name]=!0)},stopRequest:function(t,i){this.pendingRequest--;this.pendingRequest<0&&(this.pendingRequest=0);delete this.pending[t.name];n(t).removeClass(this.settings.pendingClass);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,i){return n.data(t,"previousValue")||n.data(t,"previousValue",{old:null,valid:!0,message:this.defaultMessage(t,{method:i})})},destroy:function(){this.resetForm();n(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},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},normalizeAttributeRule:function(n,t,i,r){/min|max|step/.test(i)&&(null===t||/number|range|text/.test(t))&&(r=Number(r),isNaN(r)&&(r=void 0));r||0===r?n[i]=r:t===i&&"range"!==t&&(n[i]=!0)},attributeRules:function(t){var r,i,u={},f=n(t),e=t.getAttribute("type");for(r in n.validator.methods)"required"===r?(i=t.getAttribute(r),""===i&&(i=!0),i=!!i):i=f.attr(r),this.normalizeAttributeRule(u,e,r,i);return u.maxlength&&/-1|2147483647|524288/.test(u.maxlength)&&delete u.maxlength,u},dataRules:function(t){var i,r,u={},f=n(t),e=t.getAttribute("type");for(i in n.validator.methods)r=f.data("rule"+i.charAt(0).toUpperCase()+i.substring(1).toLowerCase()),this.normalizeAttributeRule(u,e,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:(n.data(i.form,"validator").resetElements(n(i)),delete t[r])}}),n.each(t,function(r,u){t[r]=n.isFunction(u)&&"normalizer"!==r?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: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?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/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)},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]},step:function(t,i,r){var u=n(i).attr("type"),f="Step attribute on input type "+u+" is not supported.",e=new RegExp("\\b"+u+"\\b"),o=u&&!e.test("text,number,range");if(o)throw new Error(f);return this.optional(i)||t%r==0},equalTo:function(t,i,r){var u=n(r);return this.settings.onfocusout&&u.not(".validate-equalTo-blur").length&&u.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){n(i).valid()}),t===u.val()},remote:function(t,i,r,u){if(this.optional(i))return"dependency-mismatch";u="string"==typeof u&&u||"remote";var f,o,s,e=this.previousValue(i,u);return this.settings.messages[i.name]||(this.settings.messages[i.name]={}),e.originalMessage=e.originalMessage||this.settings.messages[i.name][u],this.settings.messages[i.name][u]=e.message,r="string"==typeof r&&{url:r}||r,s=n.param(n.extend({data:t},r.data)),e.old===s?e.valid:(e.old=s,f=this,this.startRequest(i),o={},o[i.name]=t,n.ajax(n.extend(!0,{mode:"abort",port:"validate"+i.name,dataType:"json",data:o,context:f.currentForm,success:function(n){var r,s,h,o=n===!0||"true"===n;f.settings.messages[i.name][u]=e.originalMessage;o?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(i),f.formSubmitted=h,f.successList.push(i),f.invalid[i.name]=!1,f.showErrors()):(r={},s=n||f.defaultMessage(i,{method:u,parameters:t}),r[i.name]=e.message=s,f.invalid[i.name]=!0,f.showErrors(r));e.valid=o;f.stopRequest(i,o)}},r)),"pending")}}});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)})}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(){"use strict";var n=jQuery.fn.jquery.split(" ")[0].split(".");if(n[0]<2&&n[1]<9||1==n[0]&&9==n[1]&&n[2]<1||3<n[0])throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4");}(),function(n){"use strict";n.fn.emulateTransitionEnd=function(t){var i=!1,r=this;n(this).one("bsTransitionEnd",function(){i=!0});return setTimeout(function(){i||n(r).trigger(n.support.transition.end)},t),this};n(function(){n.support.transition=function(){var i=document.createElement("bootstrap"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var t in n)if(i.style[t]!==undefined)return{end:n[t]};return!1}();n.support.transition&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(n){"use strict";var i='[data-dismiss="alert"]',t=function(t){n(t).on("click",i,this.close)},r;t.VERSION="3.4.1";t.TRANSITION_DURATION=150;t.prototype.close=function(i){function e(){u.detach().trigger("closed.bs.alert").remove()}var f=n(this),r=f.attr("data-target"),u;r||(r=(r=f.attr("href"))&&r.replace(/.*(?=#[^\s]*$)/,""));r="#"===r?[]:r;u=n(document).find(r);i&&i.preventDefault();u.length||(u=f.closest(".alert"));u.trigger(i=n.Event("close.bs.alert"));i.isDefaultPrevented()||(u.removeClass("in"),n.support.transition&&u.hasClass("fade")?u.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e())};r=n.fn.alert;n.fn.alert=function(i){return this.each(function(){var r=n(this),u=r.data("bs.alert");u||r.data("bs.alert",u=new t(this));"string"==typeof i&&u[i].call(r)})};n.fn.alert.Constructor=t;n.fn.alert.noConflict=function(){return n.fn.alert=r,this};n(document).on("click.bs.alert.data-api",i,t.prototype.close)}(jQuery),function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.button"),f="object"==typeof i&&i;r||u.data("bs.button",r=new t(this,f));"toggle"==i?r.toggle():i&&r.setState(i)})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.isLoading=!1},r;t.VERSION="3.4.1";t.DEFAULTS={loadingText:"loading..."};t.prototype.setState=function(t){var i="disabled",r=this.$element,f=r.is("input")?"val":"html",u=r.data();t+="Text";null==u.resetText&&r.data("resetText",r[f]());setTimeout(n.proxy(function(){r[f](null==u[t]?this.options[t]:u[t]);"loadingText"==t?(this.isLoading=!0,r.addClass(i).attr(i,i).prop(i,!0)):this.isLoading&&(this.isLoading=!1,r.removeClass(i).removeAttr(i).prop(i,!1))},this),0)};t.prototype.toggle=function(){var t=!0,i=this.$element.closest('[data-toggle="buttons"]'),n;i.length?(n=this.$element.find("input"),"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),i.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")):(this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active"))};r=n.fn.button;n.fn.button=i;n.fn.button.Constructor=t;n.fn.button.noConflict=function(){return n.fn.button=r,this};n(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var r=n(t.target).closest(".btn");i.call(r,"toggle");n(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),r.is("input,button")?r.trigger("focus"):r.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){n(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery),function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.carousel"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i),e="string"==typeof i?i:f.slide;r||u.data("bs.carousel",r=new t(this,f));"number"==typeof i?r.to(i):e?r[e]():f.interval&&r.pause().cycle()})}var t=function(t,i){this.$element=n(t);this.$indicators=this.$element.find(".carousel-indicators");this.options=i;this.paused=null;this.sliding=null;this.interval=null;this.$active=null;this.$items=null;this.options.keyboard&&this.$element.on("keydown.bs.carousel",n.proxy(this.keydown,this));"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",n.proxy(this.pause,this)).on("mouseleave.bs.carousel",n.proxy(this.cycle,this))},u,r;t.VERSION="3.4.1";t.TRANSITION_DURATION=600;t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0};t.prototype.keydown=function(n){if(!/input|textarea/i.test(n.target.tagName)){switch(n.which){case 37:this.prev();break;case 39:this.next();break;default:return}n.preventDefault()}};t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(n.proxy(this.next,this),this.options.interval)),this};t.prototype.getItemIndex=function(n){return this.$items=n.parent().children(".item"),this.$items.index(n||this.$active)};t.prototype.getItemForDirection=function(n,t){var i=this.getItemIndex(t),r;return("prev"==n&&0===i||"next"==n&&i==this.$items.length-1)&&!this.options.wrap?t:(r=(i+("prev"==n?-1:1))%this.$items.length,this.$items.eq(r))};t.prototype.to=function(n){var i=this,t=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(n>this.$items.length-1||n<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){i.to(n)}):t==n?this.pause().cycle():this.slide(t<n?"next":"prev",this.$items.eq(n))};t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&n.support.transition&&(this.$element.trigger(n.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this};t.prototype.next=function(){if(!this.sliding)return this.slide("next")};t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")};t.prototype.slide=function(i,r){var e=this.$element.find(".item.active"),u=r||this.getItemForDirection(i,e),l=this.interval,f="next"==i?"left":"right",a=this,o,s,h,c;return u.hasClass("active")?this.sliding=!1:(o=u[0],s=n.Event("slide.bs.carousel",{relatedTarget:o,direction:f}),(this.$element.trigger(s),!s.isDefaultPrevented())?((this.sliding=!0,l&&this.pause(),this.$indicators.length)&&(this.$indicators.find(".active").removeClass("active"),h=n(this.$indicators.children()[this.getItemIndex(u)]),h&&h.addClass("active")),c=n.Event("slid.bs.carousel",{relatedTarget:o,direction:f}),n.support.transition&&this.$element.hasClass("slide")?(u.addClass(i),"object"==typeof u&&u.length&&u[0].offsetWidth,e.addClass(f),u.addClass(f),e.one("bsTransitionEnd",function(){u.removeClass([i,f].join(" ")).addClass("active");e.removeClass(["active",f].join(" "));a.sliding=!1;setTimeout(function(){a.$element.trigger(c)},0)}).emulateTransitionEnd(t.TRANSITION_DURATION)):(e.removeClass("active"),u.addClass("active"),this.sliding=!1,this.$element.trigger(c)),l&&this.cycle(),this):void 0)};u=n.fn.carousel;n.fn.carousel=i;n.fn.carousel.Constructor=t;n.fn.carousel.noConflict=function(){return n.fn.carousel=u,this};r=function(t){var u=n(this),f=u.attr("href"),s,r,o,e;f&&(f=f.replace(/.*(?=#[^\s]+$)/,""));s=u.attr("data-target")||f;r=n(document).find(s);r.hasClass("carousel")&&(o=n.extend({},r.data(),u.data()),e=u.attr("data-slide-to"),e&&(o.interval=!1),i.call(r,o),e&&r.data("bs.carousel").to(e),t.preventDefault())};n(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r);n(window).on("load",function(){n('[data-ride="carousel"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery),function(n){"use strict";function r(t){var i,r=t.attr("data-target")||(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return n(document).find(r)}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.collapse"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i);!r&&f.toggle&&/show|hide/.test(i)&&(f.toggle=!1);r||u.data("bs.collapse",r=new t(this,f));"string"==typeof i&&r[i]()})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.$trigger=n('[data-toggle="collapse"][href="#'+i.id+'"],[data-toggle="collapse"][data-target="#'+i.id+'"]');this.transitioning=null;this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger);this.options.toggle&&this.toggle()},u;t.VERSION="3.4.1";t.TRANSITION_DURATION=350;t.DEFAULTS={toggle:!0};t.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"};t.prototype.show=function(){var f,r,e,u,o,s;if(!this.transitioning&&!this.$element.hasClass("in")&&(r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing"),!(r&&r.length&&(f=r.data("bs.collapse"))&&f.transitioning)&&(e=n.Event("show.bs.collapse"),this.$element.trigger(e),!e.isDefaultPrevented()))){if(r&&r.length&&(i.call(r,"hide"),f||r.data("bs.collapse",null)),u=this.dimension(),this.$element.removeClass("collapse").addClass("collapsing")[u](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1,o=function(){this.$element.removeClass("collapsing").addClass("collapse in")[u]("");this.transitioning=0;this.$element.trigger("shown.bs.collapse")},!n.support.transition)return o.call(this);s=n.camelCase(["scroll",u].join("-"));this.$element.one("bsTransitionEnd",n.proxy(o,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[u](this.$element[0][s])}};t.prototype.hide=function(){var r,i,u;if(!this.transitioning&&this.$element.hasClass("in")&&(r=n.Event("hide.bs.collapse"),this.$element.trigger(r),!r.isDefaultPrevented())){if(i=this.dimension(),this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1,u=function(){this.transitioning=0;this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")},!n.support.transition)return u.call(this);this.$element[i](0).one("bsTransitionEnd",n.proxy(u,this)).emulateTransitionEnd(t.TRANSITION_DURATION)}};t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};t.prototype.getParent=function(){return n(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(n.proxy(function(t,i){var u=n(i);this.addAriaAndCollapsedClass(r(u),u)},this)).end()};t.prototype.addAriaAndCollapsedClass=function(n,t){var i=n.hasClass("in");n.attr("aria-expanded",i);t.toggleClass("collapsed",!i).attr("aria-expanded",i)};u=n.fn.collapse;n.fn.collapse=i;n.fn.collapse.Constructor=t;n.fn.collapse.noConflict=function(){return n.fn.collapse=u,this};n(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var u=n(this),f,e;u.attr("data-target")||t.preventDefault();f=r(u);e=f.data("bs.collapse")?"toggle":u.data();i.call(f,e)})}(jQuery),function(n){"use strict";function r(t){var i=t.attr("data-target"),r;return i||(i=(i=t.attr("href"))&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),r="#"!==i?n(document).find(i):null,r&&r.length?r:t.parent()}function u(t){t&&3===t.which||(n(".dropdown-backdrop").remove(),n(i).each(function(){var u=n(this),i=r(u),f={relatedTarget:this};i.hasClass("open")&&(t&&"click"==t.type&&/input|textarea/i.test(t.target.tagName)&&n.contains(i[0],t.target)||(i.trigger(t=n.Event("hide.bs.dropdown",f)),t.isDefaultPrevented()||(u.attr("aria-expanded","false"),i.removeClass("open").trigger(n.Event("hidden.bs.dropdown",f)))))}))}var i='[data-toggle="dropdown"]',t=function(t){n(t).on("click.bs.dropdown",this.toggle)},f;t.VERSION="3.4.1";t.prototype.toggle=function(t){var f=n(this),i,o,e;if(!f.is(".disabled, :disabled")){if(i=r(f),o=i.hasClass("open"),u(),!o){if("ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&n(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(n(this)).on("click",u),e={relatedTarget:this},i.trigger(t=n.Event("show.bs.dropdown",e)),t.isDefaultPrevented())return;f.trigger("focus").attr("aria-expanded","true");i.toggleClass("open").trigger(n.Event("shown.bs.dropdown",e))}return!1}};t.prototype.keydown=function(t){var e,o,s,f,u;if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)&&(e=n(this),t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled"))){if(o=r(e),s=o.hasClass("open"),!s&&27!=t.which||s&&27==t.which)return 27==t.which&&o.find(i).trigger("focus"),e.trigger("click");f=o.find(".dropdown-menu li:not(.disabled):visible a");f.length&&(u=f.index(t.target),38==t.which&&0<u&&u--,40==t.which&&u<f.length-1&&u++,~u||(u=0),f.eq(u).trigger("focus"))}};f=n.fn.dropdown;n.fn.dropdown=function(i){return this.each(function(){var r=n(this),u=r.data("bs.dropdown");u||r.data("bs.dropdown",u=new t(this));"string"==typeof i&&u[i].call(r)})};n.fn.dropdown.Constructor=t;n.fn.dropdown.noConflict=function(){return n.fn.dropdown=f,this};n(document).on("click.bs.dropdown.data-api",u).on("click.bs.dropdown.data-api",".dropdown form",function(n){n.stopPropagation()}).on("click.bs.dropdown.data-api",i,t.prototype.toggle).on("keydown.bs.dropdown.data-api",i,t.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",t.prototype.keydown)}(jQuery),function(n){"use strict";function i(i,r){return this.each(function(){var f=n(this),u=f.data("bs.modal"),e=n.extend({},t.DEFAULTS,f.data(),"object"==typeof i&&i);u||f.data("bs.modal",u=new t(this,e));"string"==typeof i?u[i](r):e.show&&u.show(r)})}var t=function(t,i){this.options=i;this.$body=n(document.body);this.$element=n(t);this.$dialog=this.$element.find(".modal-dialog");this.$backdrop=null;this.isShown=null;this.originalBodyPad=null;this.scrollbarWidth=0;this.ignoreBackdropClick=!1;this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom";this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,n.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))},r;t.VERSION="3.4.1";t.TRANSITION_DURATION=300;t.BACKDROP_TRANSITION_DURATION=150;t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};t.prototype.toggle=function(n){return this.isShown?this.hide():this.show(n)};t.prototype.show=function(i){var r=this,u=n.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(u);this.isShown||u.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',n.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){r.$element.one("mouseup.dismiss.bs.modal",function(t){n(t.target).is(r.$element)&&(r.ignoreBackdropClick=!0)})}),this.backdrop(function(){var f=n.support.transition&&r.$element.hasClass("fade"),u;r.$element.parent().length||r.$element.appendTo(r.$body);r.$element.show().scrollTop(0);r.adjustDialog();f&&r.$element[0].offsetWidth;r.$element.addClass("in");r.enforceFocus();u=n.Event("shown.bs.modal",{relatedTarget:i});f?r.$dialog.one("bsTransitionEnd",function(){r.$element.trigger("focus").trigger(u)}).emulateTransitionEnd(t.TRANSITION_DURATION):r.$element.trigger("focus").trigger(u)}))};t.prototype.hide=function(i){i&&i.preventDefault();i=n.Event("hide.bs.modal");this.$element.trigger(i);this.isShown&&!i.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),n(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),n.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",n.proxy(this.hideModal,this)).emulateTransitionEnd(t.TRANSITION_DURATION):this.hideModal())};t.prototype.enforceFocus=function(){n(document).off("focusin.bs.modal").on("focusin.bs.modal",n.proxy(function(n){document===n.target||this.$element[0]===n.target||this.$element.has(n.target).length||this.$element.trigger("focus")},this))};t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",n.proxy(function(n){27==n.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")};t.prototype.resize=function(){this.isShown?n(window).on("resize.bs.modal",n.proxy(this.handleUpdate,this)):n(window).off("resize.bs.modal")};t.prototype.hideModal=function(){var n=this;this.$element.hide();this.backdrop(function(){n.$body.removeClass("modal-open");n.resetAdjustments();n.resetScrollbar();n.$element.trigger("hidden.bs.modal")})};t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};t.prototype.backdrop=function(i){var e=this,f=this.$element.hasClass("fade")?"fade":"",r,u;if(this.isShown&&this.options.backdrop){if(r=n.support.transition&&f,this.$backdrop=n(document.createElement("div")).addClass("modal-backdrop "+f).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",n.proxy(function(n){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:n.target===n.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())},this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!i)return;r?this.$backdrop.one("bsTransitionEnd",i).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):i()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),u=function(){e.removeBackdrop();i&&i()},n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",u).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):u()):i&&i()};t.prototype.handleUpdate=function(){this.adjustDialog()};t.prototype.adjustDialog=function(){var n=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&n?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!n?this.scrollbarWidth:""})};t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})};t.prototype.checkScrollbar=function(){var n=window.innerWidth,t;n||(t=document.documentElement.getBoundingClientRect(),n=t.right-Math.abs(t.left));this.bodyIsOverflowing=document.body.clientWidth<n;this.scrollbarWidth=this.measureScrollbar()};t.prototype.setScrollbar=function(){var i=parseInt(this.$body.css("padding-right")||0,10),t;this.originalBodyPad=document.body.style.paddingRight||"";t=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",i+t),n(this.fixedContent).each(function(i,r){var u=r.style.paddingRight,f=n(r).css("padding-right");n(r).data("padding-right",u).css("padding-right",parseFloat(f)+t+"px")}))};t.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad);n(this.fixedContent).each(function(t,i){var r=n(i).data("padding-right");n(i).removeData("padding-right");i.style.paddingRight=r||""})};t.prototype.measureScrollbar=function(){var n=document.createElement("div"),t;return n.className="modal-scrollbar-measure",this.$body.append(n),t=n.offsetWidth-n.clientWidth,this.$body[0].removeChild(n),t};r=n.fn.modal;n.fn.modal=i;n.fn.modal.Constructor=t;n.fn.modal.noConflict=function(){return n.fn.modal=r,this};n(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var r=n(this),f=r.attr("href"),e=r.attr("data-target")||f&&f.replace(/.*(?=#[^\s]+$)/,""),u=n(document).find(e),o=u.data("bs.modal")?"toggle":n.extend({remote:!/#/.test(f)&&f},u.data(),r.data());r.is("a")&&t.preventDefault();u.one("show.bs.modal",function(n){n.isDefaultPrevented()||u.one("hidden.bs.modal",function(){r.is(":visible")&&r.trigger("focus")})});i.call(u,o,this)})}(jQuery),function(n){"use strict";function s(t,i){var r=t.nodeName.toLowerCase();if(-1!==n.inArray(r,i))return-1===n.inArray(r,f)||Boolean(t.nodeValue.match(e)||t.nodeValue.match(o));for(var s=n(i).filter(function(n,t){return t instanceof RegExp}),u=0,h=s.length;u<h;u++)if(r.match(s[u]))return!0;return!1}function i(t,i,r){var f,u,h;if(0===t.length)return t;if(r&&"function"==typeof r)return r(t);if(!document.implementation||!document.implementation.createHTMLDocument)return t;f=document.implementation.createHTMLDocument("sanitization");f.body.innerHTML=t;for(var a=n.map(i,function(n,t){return t}),l=n(f.body).find("*"),o=0,v=l.length;o<v;o++)if(u=l[o],h=u.nodeName.toLowerCase(),-1!==n.inArray(h,a))for(var c=n.map(u.attributes,function(n){return n}),y=[].concat(i["*"]||[],i[h]||[]),e=0,p=c.length;e<p;e++)s(c[e],y)||u.removeAttribute(c[e].nodeName);else u.parentNode.removeChild(u);return f.body.innerHTML}var u=["sanitize","whiteList","sanitizeFn"],f=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],e=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,o=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i,t=function(n,t){this.type=null;this.options=null;this.enabled=null;this.timeout=null;this.hoverState=null;this.$element=null;this.inState=null;this.init("tooltip",n,t)},r;t.VERSION="3.4.1";t.TRANSITION_DURATION=150;t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]}};t.prototype.init=function(t,i,r){var f,e,u,o,s;if(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&n(document).find(n.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],"click"==u)this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else"manual"!=u&&(o="hover"==u?"mouseenter":"focusin",s="hover"==u?"mouseleave":"focusout",this.$element.on(o+"."+this.type,this.options.selector,n.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,n.proxy(this.leave,this)));this.options.selector?this._options=n.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.getOptions=function(t){var r=this.$element.data();for(var f in r)r.hasOwnProperty(f)&&-1!==n.inArray(f,u)&&delete r[f];return(t=n.extend({},this.getDefaults(),r,t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t.sanitize&&(t.template=i(t.template,t.whiteList,t.sanitizeFn)),t};t.prototype.getDelegateOptions=function(){var t={},i=this.getDefaults();return this._options&&n.each(this._options,function(n,r){i[n]!=r&&(t[n]=r)}),t};t.prototype.enter=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState["focusin"==t.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState)i.hoverState="in";else{if(clearTimeout(i.timeout),i.hoverState="in",!i.options.delay||!i.options.delay.show)return i.show();i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)}};t.prototype.isInStateTrue=function(){for(var n in this.inState)if(this.inState[n])return!0;return!1};t.prototype.leave=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState["focusout"==t.type?"focus":"hover"]=!1),!i.isInStateTrue()){if(clearTimeout(i.timeout),i.hoverState="out",!i.options.delay||!i.options.delay.hide)return i.hide();i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)}};t.prototype.show=function(){var c=n.Event("show.bs."+this.type),l,p,e,w,h;if(this.hasContent()&&this.enabled){if(this.$element.trigger(c),l=n.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]),c.isDefaultPrevented()||!l)return;var u=this,r=this.tip(),a=this.getUID(this.type);this.setContent();r.attr("id",a);this.$element.attr("aria-describedby",a);this.options.animation&&r.addClass("fade");var i="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,v=/\s?auto?\s?/i,y=v.test(i);y&&(i=i.replace(v,"")||"top");r.detach().css({top:0,left:0,display:"block"}).addClass(i).data("bs."+this.type,this);this.options.container?r.appendTo(n(document).find(this.options.container)):r.insertAfter(this.$element);this.$element.trigger("inserted.bs."+this.type);var f=this.getPosition(),o=r[0].offsetWidth,s=r[0].offsetHeight;y&&(p=i,e=this.getPosition(this.$viewport),i="bottom"==i&&f.bottom+s>e.bottom?"top":"top"==i&&f.top-s<e.top?"bottom":"right"==i&&f.right+o>e.width?"left":"left"==i&&f.left-o<e.left?"right":i,r.removeClass(p).addClass(i));w=this.getCalculatedOffset(i,f,o,s);this.applyPlacement(w,i);h=function(){var n=u.hoverState;u.$element.trigger("shown.bs."+u.type);u.hoverState=null;"out"==n&&u.leave(u)};n.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",h).emulateTransitionEnd(t.TRANSITION_DURATION):h()}};t.prototype.applyPlacement=function(t,i){var r=this.tip(),l=r[0].offsetWidth,e=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),s=parseInt(r.css("margin-left"),10),h,f,u;isNaN(o)&&(o=0);isNaN(s)&&(s=0);t.top+=o;t.left+=s;n.offset.setOffset(r[0],n.extend({using:function(n){r.css({top:Math.round(n.top),left:Math.round(n.left)})}},t),0);r.addClass("in");h=r[0].offsetWidth;f=r[0].offsetHeight;"top"==i&&f!=e&&(t.top=t.top+e-f);u=this.getViewportAdjustedDelta(i,t,h,f);u.left?t.left+=u.left:t.top+=u.top;var c=/top|bottom/.test(i),a=c?2*u.left-l+h:2*u.top-e+f,v=c?"offsetWidth":"offsetHeight";r.offset(t);this.replaceArrow(a,r[0][v],c)};t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i?"left":"top",50*(1-n/t)+"%").css(i?"top":"left","")};t.prototype.setContent=function(){var t=this.tip(),n=this.getTitle();this.options.html?(this.options.sanitize&&(n=i(n,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(n)):t.find(".tooltip-inner").text(n);t.removeClass("fade in top bottom left right")};t.prototype.hide=function(i){function e(){"in"!=r.hoverState&&u.detach();r.$element&&r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type);i&&i()}var r=this,u=n(this.$tip),f=n.Event("hide.bs."+this.type);if(this.$element.trigger(f),!f.isDefaultPrevented())return u.removeClass("in"),n.support.transition&&u.hasClass("fade")?u.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e(),this.hoverState=null,this};t.prototype.fixTitle=function(){var n=this.$element;(n.attr("title")||"string"!=typeof n.attr("data-original-title"))&&n.attr("data-original-title",n.attr("title")||"").attr("title","")};t.prototype.hasContent=function(){return this.getTitle()};t.prototype.getPosition=function(t){var r=(t=t||this.$element)[0],u="BODY"==r.tagName,i=r.getBoundingClientRect();null==i.width&&(i=n.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var f=window.SVGElement&&r instanceof window.SVGElement,e=u?{top:0,left:0}:f?null:t.offset(),o={scroll:u?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},s=u?{width:n(window).width(),height:n(window).height()}:null;return n.extend({},i,o,s,e)};t.prototype.getCalculatedOffset=function(n,t,i,r){return"bottom"==n?{top:t.top+t.height,left:t.left+t.width/2-i/2}:"top"==n?{top:t.top-r,left:t.left+t.width/2-i/2}:"left"==n?{top:t.top+t.height/2-r/2,left:t.left-i}:{top:t.top+t.height/2-r/2,left:t.left+t.width}};t.prototype.getViewportAdjustedDelta=function(n,t,i,r){var f={top:0,left:0},e,u,o,s,h,c;return this.$viewport?(e=this.options.viewport&&this.options.viewport.padding||0,u=this.getPosition(this.$viewport),/right|left/.test(n)?(o=t.top-e-u.scroll,s=t.top+e-u.scroll+r,o<u.top?f.top=u.top-o:s>u.top+u.height&&(f.top=u.top+u.height-s)):(h=t.left-e,c=t.left+e+i,h<u.left?f.left=u.left-h:c>u.right&&(f.left=u.left+u.width-c)),f):f};t.prototype.getTitle=function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)};t.prototype.getUID=function(n){for(;n+=~~(1e6*Math.random()),document.getElementById(n););return n};t.prototype.tip=function(){if(!this.$tip&&(this.$tip=n(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};t.prototype.enable=function(){this.enabled=!0};t.prototype.disable=function(){this.enabled=!1};t.prototype.toggleEnabled=function(){this.enabled=!this.enabled};t.prototype.toggle=function(t){var i=this;t&&((i=n(t.currentTarget).data("bs."+this.type))||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)));t?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)};t.prototype.destroy=function(){var n=this;clearTimeout(this.timeout);this.hide(function(){n.$element.off("."+n.type).removeData("bs."+n.type);n.$tip&&n.$tip.detach();n.$tip=null;n.$arrow=null;n.$viewport=null;n.$element=null})};t.prototype.sanitizeHtml=function(n){return i(n,this.options.whiteList,this.options.sanitizeFn)};r=n.fn.tooltip;n.fn.tooltip=function(i){return this.each(function(){var u=n(this),r=u.data("bs.tooltip"),f="object"==typeof i&&i;!r&&/destroy|hide/.test(i)||(r||u.data("bs.tooltip",r=new t(this,f)),"string"==typeof i&&r[i]())})};n.fn.tooltip.Constructor=t;n.fn.tooltip.noConflict=function(){return n.fn.tooltip=r,this}}(jQuery),function(n){"use strict";var t=function(n,t){this.init("popover",n,t)},i;if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");t.VERSION="3.4.1";t.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'});((t.prototype=n.extend({},n.fn.tooltip.Constructor.prototype)).constructor=t).prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.setContent=function(){var n=this.tip(),i=this.getTitle(),t=this.getContent(),r;this.options.html?(r=typeof t,this.options.sanitize&&(i=this.sanitizeHtml(i),"string"===r&&(t=this.sanitizeHtml(t))),n.find(".popover-title").html(i),n.find(".popover-content").children().detach().end()["string"===r?"html":"append"](t)):(n.find(".popover-title").text(i),n.find(".popover-content").children().detach().end().text(t));n.removeClass("fade top bottom left right in");n.find(".popover-title").html()||n.find(".popover-title").hide()};t.prototype.hasContent=function(){return this.getTitle()||this.getContent()};t.prototype.getContent=function(){var t=this.$element,n=this.options;return t.attr("data-content")||("function"==typeof n.content?n.content.call(t[0]):n.content)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};i=n.fn.popover;n.fn.popover=function(i){return this.each(function(){var u=n(this),r=u.data("bs.popover"),f="object"==typeof i&&i;!r&&/destroy|hide/.test(i)||(r||u.data("bs.popover",r=new t(this,f)),"string"==typeof i&&r[i]())})};n.fn.popover.Constructor=t;n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(jQuery),function(n){"use strict";function t(i,r){this.$body=n(document.body);this.$scrollElement=n(i).is(document.body)?n(window):n(i);this.options=n.extend({},t.DEFAULTS,r);this.selector=(this.options.target||"")+" .nav li > a";this.offsets=[];this.targets=[];this.activeTarget=null;this.scrollHeight=0;this.$scrollElement.on("scroll.bs.scrollspy",n.proxy(this.process,this));this.refresh();this.process()}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.scrollspy"),f="object"==typeof i&&i;r||u.data("bs.scrollspy",r=new t(this,f));"string"==typeof i&&r[i]()})}t.VERSION="3.4.1";t.DEFAULTS={offset:10};t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)};t.prototype.refresh=function(){var t=this,i="offset",r=0;this.offsets=[];this.targets=[];this.scrollHeight=this.getScrollHeight();n.isWindow(this.$scrollElement[0])||(i="position",r=this.$scrollElement.scrollTop());this.$body.find(this.selector).map(function(){var f=n(this),u=f.data("target")||f.attr("href"),t=/^#./.test(u)&&n(u);return t&&t.length&&t.is(":visible")&&[[t[i]().top+r,u]]||null}).sort(function(n,t){return n[0]-t[0]}).each(function(){t.offsets.push(this[0]);t.targets.push(this[1])})};t.prototype.process=function(){var n,i=this.$scrollElement.scrollTop()+this.options.offset,f=this.getScrollHeight(),e=this.options.offset+f-this.$scrollElement.height(),t=this.offsets,r=this.targets,u=this.activeTarget;if(this.scrollHeight!=f&&this.refresh(),e<=i)return u!=(n=r[r.length-1])&&this.activate(n);if(u&&i<t[0])return this.activeTarget=null,this.clear();for(n=t.length;n--;)u!=r[n]&&i>=t[n]&&(t[n+1]===undefined||i<t[n+1])&&this.activate(r[n])};t.prototype.activate=function(t){this.activeTarget=t;this.clear();var r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=n(r).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active"));i.trigger("activate.bs.scrollspy")};t.prototype.clear=function(){n(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var r=n.fn.scrollspy;n.fn.scrollspy=i;n.fn.scrollspy.Constructor=t;n.fn.scrollspy.noConflict=function(){return n.fn.scrollspy=r,this};n(window).on("load.bs.scrollspy.data-api",function(){n('[data-spy="scroll"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery),function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.tab");r||u.data("bs.tab",r=new t(this));"string"==typeof i&&r[i]()})}var t=function(t){this.element=n(t)},u,i;t.VERSION="3.4.1";t.TRANSITION_DURATION=150;t.prototype.show=function(){var t=this.element,f=t.closest("ul:not(.dropdown-menu)"),i=t.data("target"),u;if(i||(i=(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var r=f.find(".active:last a"),e=n.Event("hide.bs.tab",{relatedTarget:t[0]}),o=n.Event("show.bs.tab",{relatedTarget:r[0]});(r.trigger(e),t.trigger(o),o.isDefaultPrevented()||e.isDefaultPrevented())||(u=n(document).find(i),this.activate(t.closest("li"),f),this.activate(u,u.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:t[0]});t.trigger({type:"shown.bs.tab",relatedTarget:r[0]})}))}};t.prototype.activate=function(i,r,u){function o(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1);i.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0);e?(i[0].offsetWidth,i.addClass("in")):i.removeClass("fade");i.parent(".dropdown-menu").length&&i.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0);u&&u()}var f=r.find("> .active"),e=u&&n.support.transition&&(f.length&&f.hasClass("fade")||!!r.find("> .fade").length);f.length&&e?f.one("bsTransitionEnd",o).emulateTransitionEnd(t.TRANSITION_DURATION):o();f.removeClass("in")};u=n.fn.tab;n.fn.tab=r;n.fn.tab.Constructor=t;n.fn.tab.noConflict=function(){return n.fn.tab=u,this};i=function(t){t.preventDefault();r.call(n(this),"show")};n(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.affix"),f="object"==typeof i&&i;r||u.data("bs.affix",r=new t(this,f));"string"==typeof i&&r[i]()})}var t=function(i,r){this.options=n.extend({},t.DEFAULTS,r);var u=this.options.target===t.DEFAULTS.target?n(this.options.target):n(document).find(this.options.target);this.$target=u.on("scroll.bs.affix.data-api",n.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",n.proxy(this.checkPositionWithEventLoop,this));this.$element=n(i);this.affixed=null;this.unpin=null;this.pinnedOffset=null;this.checkPosition()},r;t.VERSION="3.4.1";t.RESET="affix affix-top affix-bottom";t.DEFAULTS={offset:0,target:window};t.prototype.getState=function(n,t,i,r){var u=this.$target.scrollTop(),e=this.$element.offset(),o=this.$target.height(),f,s;return null!=i&&"top"==this.affixed?u<i&&"top":"bottom"==this.affixed?null!=i?!(u+this.unpin<=e.top)&&"bottom":!(u+o<=n-r)&&"bottom":(f=null==this.affixed,s=f?u:e.top,null!=i&&u<=i?"top":null!=r&&n-r<=s+(f?o:t)&&"bottom")};t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var n=this.$target.scrollTop(),i=this.$element.offset();return this.pinnedOffset=i.top-n};t.prototype.checkPositionWithEventLoop=function(){setTimeout(n.proxy(this.checkPosition,this),1)};t.prototype.checkPosition=function(){var i,e,o;if(this.$element.is(":visible")){var s=this.$element.height(),r=this.options.offset,f=r.top,u=r.bottom,h=Math.max(n(document).height(),n(document.body).height());if("object"!=typeof r&&(u=f=r),"function"==typeof f&&(f=r.top(this.$element)),"function"==typeof u&&(u=r.bottom(this.$element)),i=this.getState(h,s,f,u),this.affixed!=i){if(null!=this.unpin&&this.$element.css("top",""),e="affix"+(i?"-"+i:""),o=n.Event(e+".bs.affix"),this.$element.trigger(o),o.isDefaultPrevented())return;this.affixed=i;this.unpin="bottom"==i?this.getPinnedOffset():null;this.$element.removeClass(t.RESET).addClass(e).trigger(e.replace("affix","affixed")+".bs.affix")}"bottom"==i&&this.$element.offset({top:h-s-u})}};r=n.fn.affix;n.fn.affix=i;n.fn.affix.Constructor=t;n.fn.affix.noConflict=function(){return n.fn.affix=r,this};n(window).on("load",function(){n('[data-spy="affix"]').each(function(){var r=n(this),t=r.data();t.offset=t.offset||{};null!=t.offsetBottom&&(t.offset.bottom=t.offsetBottom);null!=t.offsetTop&&(t.offset.top=t.offsetTop);i.call(r,t)})})}(jQuery);!function(n,t,i){"use strict";function s(t,i){this.$element=n(t);i&&("string"===n.type(i.delay)||"number"===n.type(i.delay))&&(i.delay={show:i.delay,hide:i.delay});this.options=n.extend({},l,i);this._defaults=l;this._name=f;this._targetclick=!1;this.init();o.push(this.$element)}var f="webuiPopover",u="webui-popover",e="webui.popover",l={placement:"auto",width:"auto",height:"auto",trigger:"click",style:"",delay:{show:null,hide:null},async:{before:null,success:null},cache:!0,multi:!1,arrow:!0,title:"",content:"",closeable:!1,padding:!0,url:"",type:"html",animation:null,template:'<div class="webui-popover"><div class="arrow"><\/div><div class="webui-popover-inner"><a href="#" class="close">x<\/a><h3 class="webui-popover-title"><\/h3><div class="webui-popover-content"><i class="icon-refresh"><\/i> <p>&nbsp;<\/p><\/div><\/div><\/div>',backdrop:!1,dismissible:!0,onShow:null,onHide:null,abortXHR:!0,autoHide:!1,offsetTop:0,offsetLeft:0},o=[],h=n('<div class="webui-popover-backdrop"><\/div>'),a=0,v=!1,r=-2e3,c=n(i),y=function(n,t){return isNaN(n)?t||0:Number(n)};s.prototype={init:function(){"click"===this.getTrigger()?this.$element.off("click touchend").on("click touchend",n.proxy(this.toggle,this)):"hover"===this.getTrigger()&&this.$element.off("mouseenter mouseleave click").on("mouseenter",n.proxy(this.mouseenterHandler,this)).on("mouseleave",n.proxy(this.mouseleaveHandler,this));this._poped=!1;this._inited=!0;this._opened=!1;this._idSeed=a;this.options.backdrop&&h.appendTo(i.body).hide();a++;"sticky"===this.getTrigger()&&this.show()},destroy:function(){for(var t=-1,n=0;n<o.length;n++)if(o[n]===this.$element){t=n;break}o.splice(t,1);this.hide();this.$element.data("plugin_"+f,null);"click"===this.getTrigger()?this.$element.off("click"):"hover"===this.getTrigger()&&this.$element.off("mouseenter mouseleave");this.$target&&this.$target.remove()},hide:function(t,i){var r,u;(t||"sticky"!==this.getTrigger())&&this._opened&&(i&&(i.preventDefault(),i.stopPropagation()),this.xhr&&this.options.abortXHR===!0&&(this.xhr.abort(),this.xhr=null),r=n.Event("hide."+e),(this.$element.trigger(r,[this.$target]),this.$target)&&(this.$target.removeClass("in").addClass(this.getHideAnimation()),u=this,setTimeout(function(){u.$target.hide()},300)),this.options.backdrop&&h.hide(),this._opened=!1,this.$element.trigger("hidden."+e,[this.$target]),this.options.onHide&&this.options.onHide(this.$target))},resetAutoHide:function(){var n=this,t=n.getAutoHide();t&&(n.autoHideHandler&&clearTimeout(n.autoHideHandler),n.autoHideHandler=setTimeout(function(){n.hide()},t))},toggle:function(n){n&&(n.preventDefault(),n.stopPropagation());this[this.getTarget().hasClass("in")?"hide":"show"]()},hideAll:function(){for(var n=0;n<o.length;n++)o[n].webuiPopover("hide");c.trigger("hiddenAll."+e)},show:function(){var n=this.getTarget().removeClass().addClass(u).addClass(this._customTargetClass);this.options.multi||this.hideAll();this._opened||(this.getCache()&&this._poped&&""!==this.content||(this.content="",this.setTitle(this.getTitle()),this.options.closeable||n.find(".close").off("click").remove(),this.isAsync()?this.setContentASync(this.options.content):this.setContent(this.getContent()),n.show()),this.displayContent(),this.options.onShow&&this.options.onShow(n),this.bindBodyEvents(),this.options.backdrop&&h.show(),this._opened=!0,this.resetAutoHide())},displayContent:function(){var l=this.getElementPosition(),t=this.getTarget().removeClass().addClass(u).addClass(this._customTargetClass),s=this.getContentElement(),a=t[0].offsetWidth,v=t[0].offsetHeight,h="bottom",y=n.Event("show."+e),f,c,o;this.$element.trigger(y,[t]);"auto"!==this.options.width&&t.width(this.options.width);"auto"!==this.options.height&&s.height(this.options.height);this.options.style&&this.$target.addClass(u+"-"+this.options.style);this.options.arrow||t.find(".arrow").remove();t.detach().css({top:r,left:r,display:"block"});this.getAnimation()&&t.addClass(this.getAnimation());t.appendTo(i.body);h=this.getPlacement(l);this.$element.trigger("added."+e);this.initTargetEvents();this.options.padding||("auto"!==this.options.height&&s.css("height",s.outerHeight()),this.$target.addClass("webui-no-padding"));a=t[0].offsetWidth;v=t[0].offsetHeight;f=this.getTargetPositin(l,h,a,v);(this.$target.css(f.position).addClass(h).addClass("in"),"iframe"===this.options.type)&&(c=t.find("iframe"),c.width(t.width()).height(c.parent().height()));(this.options.arrow||this.$target.css({margin:0}),this.options.arrow)&&(o=this.$target.find(".arrow"),o.removeAttr("style"),f.arrowOffset&&(-1===f.arrowOffset.left||-1===f.arrowOffset.top?o.hide():o.css(f.arrowOffset)));this._poped=!0;this.$element.trigger("shown."+e,[this.$target])},isTargetLoaded:function(){return 0===this.getTarget().find("i.glyphicon-refresh").length},getTriggerElement:function(){return this.$element},getTarget:function(){if(!this.$target){var t=f+this._idSeed;this.$target=n(this.options.template).attr("id",t).data("trigger-element",this.getTriggerElement());this._customTargetClass=this.$target.attr("class")!==u?this.$target.attr("class"):null;this.getTriggerElement().attr("data-target",t)}return this.$target},getTitleElement:function(){return this.getTarget().find("."+u+"-title")},getContentElement:function(){return this.$contentElement||(this.$contentElement=this.getTarget().find("."+u+"-content"),console.log(this.$contentElement),this.$contentElement.show()),this.$contentElement},getTitle:function(){return this.$element.attr("data-title")||this.options.title||this.$element.attr("title")},getUrl:function(){return this.$element.attr("data-url")||this.options.url},getAutoHide:function(){return this.$element.attr("data-auto-hide")||this.options.autoHide},getOffsetTop:function(){return y(this.$element.attr("data-offset-top"))||this.options.offsetTop},getOffsetLeft:function(){return y(this.$element.attr("data-offset-left"))||this.options.offsetLeft},getCache:function(){var n=this.$element.attr("data-cache");if("undefined"!=typeof n)switch(n.toLowerCase()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":return!1}return this.options.cache},getTrigger:function(){return this.$element.attr("data-trigger")||this.options.trigger},getDelayShow:function(){var n=this.$element.attr("data-delay-show");return"undefined"!=typeof n?n:0===this.options.delay.show?0:this.options.delay.show||100},getHideDelay:function(){var n=this.$element.attr("data-delay-hide");return"undefined"!=typeof n?n:0===this.options.delay.hide?0:this.options.delay.hide||100},getAnimation:function(){var n=this.$element.attr("data-animation");return n||this.options.animation},getHideAnimation:function(){var n=this.getAnimation();return n?n+"-out":"out"},setTitle:function(n){var t=this.getTitleElement();n?t.html(n):t.remove()},hasContent:function(){return this.getContent()},getContent:function(){var i,t;if(this.getUrl())switch(this.options.type){case"iframe":this.content=n('<iframe frameborder="0"><\/iframe>').attr("src",this.getUrl());break;case"html":try{this.content=n(this.getUrl());this.content.is(":visible")||this.content.show()}catch(r){throw new Error("Unable to get popover content. Invalid selector specified.");}}else this.content||(i="",(i=n.isFunction(this.options.content)?this.options.content.apply(this.$element[0],[this]):this.options.content,this.content=this.$element.attr("data-content")||i,this.content)||(t=this.$element.next(),t&&t.hasClass(u+"-content")&&(this.content=t)));return this.content},setContent:function(n){var i=this.getTarget(),t=this.getContentElement();"string"==typeof n?t.html(n):n instanceof jQuery&&(n.removeClass(u+"-content"),t.html(""),n.appendTo(t));this.$target=i},isAsync:function(){return"async"===this.options.type},setContentASync:function(t){var i=this;this.xhr||(this.xhr=n.ajax({url:this.getUrl(),type:"GET",cache:this.getCache(),beforeSend:function(n){i.options.async.before&&i.options.async.before(i,n)},success:function(r){i.bindBodyEvents();i.content=t&&n.isFunction(t)?t.apply(i.$element[0],[r]):r;i.setContent(i.content);var u=i.getContentElement();u.removeAttr("style");i.displayContent();i.options.async.success&&i.options.async.success(i,r)},complete:function(){i.xhr=null}}))},bindBodyEvents:function(){this.options.dismissible&&"click"===this.getTrigger()&&!v&&(c.off("keyup.webui-popover").on("keyup.webui-popover",n.proxy(this.escapeHandler,this)),c.off("click.webui-popover touchend.webui-popover").on("click.webui-popover touchend.webui-popover",n.proxy(this.bodyClickHandler,this)))},mouseenterHandler:function(){var n=this;n._timeout&&clearTimeout(n._timeout);n._enterTimeout=setTimeout(function(){n.getTarget().is(":visible")||n.show()},this.getDelayShow())},mouseleaveHandler:function(){var n=this;clearTimeout(n._enterTimeout);n._timeout=setTimeout(function(){n.hide()},this.getHideDelay())},escapeHandler:function(n){27===n.keyCode&&this.hideAll()},bodyClickHandler:function(){v=!0;"click"===this.getTrigger()&&(this._targetclick?this._targetclick=!1:this.hideAll())},targetClickHandler:function(){this._targetclick=!0},initTargetEvents:function(){"hover"===this.getTrigger()&&this.$target.off("mouseenter mouseleave").on("mouseenter",n.proxy(this.mouseenterHandler,this)).on("mouseleave",n.proxy(this.mouseleaveHandler,this));this.$target.find(".close").off("click").on("click",n.proxy(this.hide,this,!0));this.$target.off("click.webui-popover").on("click.webui-popover",n.proxy(this.targetClickHandler,this))},getPlacement:function(n){var t,s=i.documentElement,c=i.body,f=s.clientWidth,r=s.clientHeight,l=Math.max(c.scrollTop,s.scrollTop),a=Math.max(c.scrollLeft,s.scrollLeft),e=Math.max(0,n.left-a),u=Math.max(0,n.top-l);t="function"==typeof this.options.placement?this.options.placement.call(this,this.getTarget()[0],this.$element[0]):this.$element.data("placement")||this.options.placement;var o="horizontal"===t,h="vertical"===t,v="auto"===t||o||h;return v?t=f/3>e?r/3>u?o?"right-bottom":"bottom-right":2*r/3>u?h?r/2>=u?"bottom-right":"top-right":"right":o?"right-top":"top-right":2*f/3>e?r/3>u?o?f/2>=e?"right-bottom":"left-bottom":"bottom":2*r/3>u?o?f/2>=e?"right":"left":r/2>=u?"bottom":"top":o?f/2>=e?"right-top":"left-top":"top":r/3>u?o?"left-bottom":"bottom-left":2*r/3>u?h?r/2>=u?"bottom-left":"top-left":"left":o?"left-top":"top-left":"auto-top"===t?t=f/3>e?"top-right":2*f/3>e?"top":"top-left":"auto-bottom"===t?t=f/3>e?"bottom-right":2*f/3>e?"bottom":"bottom-left":"auto-left"===t?t=r/3>u?"left-top":2*r/3>u?"left":"left-bottom":"auto-right"===t&&(t=r/3>u?"right-top":2*r/3>u?"right":"right-bottom"),t},getElementPosition:function(){return n.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTargetPositin:function(n,t,u,f){var e=n,p=i.documentElement,nt=i.body,tt=p.clientWidth,it=p.clientHeight,v=this.$element.outerWidth(),y=this.$element.outerHeight(),rt=Math.max(nt.scrollTop,p.scrollTop),ut=Math.max(nt.scrollLeft,p.scrollLeft),o={},l=null,w=this.options.arrow?20:0,s=10,h=w+s>v?w:0,c=w+s>y?w:0,a=0,ft=it+rt,et=tt+ut,b=e.left+e.width/2-h>0,k=e.left+e.width/2+h<et,d=e.top+e.height/2-c>0,g=e.top+e.height/2+c<ft;switch(t){case"bottom":o={top:e.top+e.height,left:e.left+e.width/2-u/2};break;case"top":o={top:e.top-f,left:e.left+e.width/2-u/2};break;case"left":o={top:e.top+e.height/2-f/2,left:e.left-u};break;case"right":o={top:e.top+e.height/2-f/2,left:e.left+e.width};break;case"top-right":o={top:e.top-f,left:b?e.left-h:s};l={left:b?Math.min(v,u)/2+h:r};break;case"top-left":a=k?h:-s;o={top:e.top-f,left:e.left-u+e.width+a};l={left:k?u-Math.min(v,u)/2-h:r};break;case"bottom-right":o={top:e.top+e.height,left:b?e.left-h:s};l={left:b?Math.min(v,u)/2+h:r};break;case"bottom-left":a=k?h:-s;o={top:e.top+e.height,left:e.left-u+e.width+a};l={left:k?u-Math.min(v,u)/2-h:r};break;case"right-top":a=g?c:-s;o={top:e.top-f+e.height+a,left:e.left+e.width};l={top:g?f-Math.min(y,f)/2-c:r};break;case"right-bottom":o={top:d?e.top-c:s,left:e.left+e.width};l={top:d?Math.min(y,f)/2+c:r};break;case"left-top":a=g?c:-s;o={top:e.top-f+e.height+a,left:e.left-u};l={top:g?f-Math.min(y,f)/2-c:r};break;case"left-bottom":o={top:d?e.top-c:s,left:e.left-u};l={top:d?Math.min(y,f)/2+c:r}}return o.top+=this.getOffsetTop(),o.left+=this.getOffsetLeft(),{position:o,arrowOffset:l}}};n.fn[f]=function(t,i){var r=[],u=this.each(function(){var u=n.data(this,"plugin_"+f);u?"destroy"===t?u.destroy():"string"==typeof t&&r.push(u[t]()):(t?"string"==typeof t?"destroy"!==t&&(i||(u=new s(this,null),r.push(u[t]()))):"object"==typeof t&&(u=new s(this,t)):u=new s(this,null),n.data(this,"plugin_"+f,u))});return r.length?r:u}}(jQuery,window,document);!function(n){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],n):"object"==typeof module&&module.exports?module.exports=n(require("jquery")):n(jQuery)}(function(n){!function(){function t(n){return n.replace(/<.[^<>]*?>/g," ").replace(/&nbsp;|&#160;/gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}n.validator.addMethod("maxWords",function(n,i,r){return this.optional(i)||t(n).match(/\b\w+\b/g).length<=r},n.validator.format("Please enter {0} words or less."));n.validator.addMethod("minWords",function(n,i,r){return this.optional(i)||t(n).match(/\b\w+\b/g).length>=r},n.validator.format("Please enter at least {0} words."));n.validator.addMethod("rangeWords",function(n,i,r){var u=t(n),f=/\b\w+\b/g;return this.optional(i)||u.match(f).length>=r[0]&&u.match(f).length<=r[1]},n.validator.format("Please enter between {0} and {1} words."))}();n.validator.addMethod("accept",function(t,i,r){var u,e,o,f="string"==typeof r?r.replace(/\s/g,""):"image/*",s=this.optional(i);if(s)return s;if("file"===n(i).attr("type")&&(f=f.replace(/[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g,"\\$&").replace(/,/g,"|").replace("/*","/.*"),i.files&&i.files.length))for(o=new RegExp(".?("+f+")$","i"),u=0;u<i.files.length;u++)if(e=i.files[u],!e.type.match(o))return!1;return!0},n.validator.format("Please enter a value with a valid mimetype."));n.validator.addMethod("alphanumeric",function(n,t){return this.optional(t)||/^\w+$/i.test(n)},"Letters, numbers, and underscores only please");n.validator.addMethod("bankaccountNL",function(n,t){if(this.optional(t))return!0;if(!/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(n))return!1;for(var r,u,f=n.replace(/ /g,""),e=0,o=f.length,i=0;o>i;i++)r=o-i,u=f.substring(i,i+1),e+=r*u;return e%11==0},"Please specify a valid bank account number");n.validator.addMethod("bankorgiroaccountNL",function(t,i){return this.optional(i)||n.validator.methods.bankaccountNL.call(this,t,i)||n.validator.methods.giroaccountNL.call(this,t,i)},"Please specify a valid bank or giro account number");n.validator.addMethod("bic",function(n,t){return this.optional(t)||/^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test(n.toUpperCase())},"Please specify a valid BIC code");n.validator.addMethod("cifES",function(n){"use strict";var f,i,r,u,e,o,t=[];if(n=n.toUpperCase(),!n.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)"))return!1;for(r=0;9>r;r++)t[r]=parseInt(n.charAt(r),10);for(i=t[2]+t[4]+t[6],u=1;8>u;u+=2)e=(2*t[u]).toString(),o=e.charAt(1),i+=parseInt(e.charAt(0),10)+(""===o?0:parseInt(o,10));return/^[ABCDEFGHJNPQRSUVW]{1}/.test(n)?(i+="",f=10-parseInt(i.charAt(i.length-1),10),n+=f,t[8].toString()===String.fromCharCode(64+f)||t[8].toString()===n.charAt(n.length-1)):!1},"Please specify a valid CIF number.");n.validator.addMethod("cpfBR",function(n){if(n=n.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==n.length)return!1;var u,f,r,t,i=0;if(u=parseInt(n.substring(9,10),10),f=parseInt(n.substring(10,11),10),r=function(n,t){var i=10*n%11;return 10!==i&&11!==i||(i=0),i===t},""===n||"00000000000"===n||"11111111111"===n||"22222222222"===n||"33333333333"===n||"44444444444"===n||"55555555555"===n||"66666666666"===n||"77777777777"===n||"88888888888"===n||"99999999999"===n)return!1;for(t=1;9>=t;t++)i+=parseInt(n.substring(t-1,t),10)*(11-t);if(r(i,u)){for(i=0,t=1;10>=t;t++)i+=parseInt(n.substring(t-1,t),10)*(12-t);return r(i,f)}return!1},"Please specify a valid CPF number");n.validator.addMethod("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},"Please enter a valid credit card number.");n.validator.addMethod("creditcardtypes",function(n,t,i){if(/[^0-9\-]+/.test(n))return!1;n=n.replace(/\D/g,"");var r=0;return i.mastercard&&(r|=1),i.visa&&(r|=2),i.amex&&(r|=4),i.dinersclub&&(r|=8),i.enroute&&(r|=16),i.discover&&(r|=32),i.jcb&&(r|=64),i.unknown&&(r|=128),i.all&&(r=255),1&r&&/^(5[12345])/.test(n)?16===n.length:2&r&&/^(4)/.test(n)?16===n.length:4&r&&/^(3[47])/.test(n)?15===n.length:8&r&&/^(3(0[012345]|[68]))/.test(n)?14===n.length:16&r&&/^(2(014|149))/.test(n)?15===n.length:32&r&&/^(6011)/.test(n)?16===n.length:64&r&&/^(3)/.test(n)?16===n.length:64&r&&/^(2131|1800)/.test(n)?15===n.length:!!(128&r)},"Please enter a valid credit card number.");n.validator.addMethod("currency",function(n,t,i){var u,f="string"==typeof i,r=f?i:i[0],e=f?!0:i[1];return r=r.replace(/,/g,""),r=e?r+"]":r+"]?",u="^["+r+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",u=new RegExp(u),this.optional(t)||u.test(n)},"Please specify a valid currency");n.validator.addMethod("dateFA",function(n,t){return this.optional(t)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(n)},n.validator.messages.date);n.validator.addMethod("dateITA",function(n,t){var i,u,f,e,r,o=!1;return/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(n)?(i=n.split("/"),u=parseInt(i[0],10),f=parseInt(i[1],10),e=parseInt(i[2],10),r=new Date(Date.UTC(e,f-1,u,12,0,0,0)),o=r.getUTCFullYear()===e&&r.getUTCMonth()===f-1&&r.getUTCDate()===u):o=!1,this.optional(t)||o},n.validator.messages.date);n.validator.addMethod("dateNL",function(n,t){return this.optional(t)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(n)},n.validator.messages.date);n.validator.addMethod("extension",function(n,t,i){return i="string"==typeof i?i.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(t)||n.match(new RegExp("\\.("+i+")$","i"))},n.validator.format("Please enter a value with a valid extension."));n.validator.addMethod("giroaccountNL",function(n,t){return this.optional(t)||/^[0-9]{1,7}$/.test(n)},"Please specify a valid giro account number");n.validator.addMethod("iban",function(n,t){if(this.optional(t))return!0;var c,f,e,l,o,a,v,r,u,i=n.replace(/ /g,"").toUpperCase(),s="",y=!0,h="",p="";if(c=i.substring(0,2),a={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{24}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"},o=a[c],"undefined"!=typeof o&&(v=new RegExp("^[A-Z]{2}\\d{2}"+o+"$",""),!v.test(i)))return!1;for(f=i.substring(4,i.length)+i.substring(0,4),r=0;r<f.length;r++)e=f.charAt(r),"0"!==e&&(y=!1),y||(s+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(e));for(u=0;u<s.length;u++)l=s.charAt(u),p=""+h+l,h=p%97;return 1===h},"Please specify a valid IBAN");n.validator.addMethod("integer",function(n,t){return this.optional(t)||/^-?\d+$/.test(n)},"A positive or negative non-decimal number please");n.validator.addMethod("ipv4",function(n,t){return this.optional(t)||/^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(n)},"Please enter a valid IP v4 address.");n.validator.addMethod("ipv6",function(n,t){return this.optional(t)||/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(n)},"Please enter a valid IP v6 address.");n.validator.addMethod("lettersonly",function(n,t){return this.optional(t)||/^[a-z]+$/i.test(n)},"Letters only please");n.validator.addMethod("letterswithbasicpunc",function(n,t){return this.optional(t)||/^[a-z\-.,()'"\s]+$/i.test(n)},"Letters or punctuation only please");n.validator.addMethod("mobileNL",function(n,t){return this.optional(t)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(n)},"Please specify a valid mobile number");n.validator.addMethod("mobileUK",function(n,t){return n=n.replace(/\(|\)|\s+|-/g,""),this.optional(t)||n.length>9&&n.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number");n.validator.addMethod("nieES",function(n){"use strict";return n=n.toUpperCase(),n.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[T]{1}/.test(n)?n[8]===/^[T]{1}[A-Z0-9]{8}$/.test(n):/^[XYZ]{1}/.test(n)?n[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(n.replace("X","0").replace("Y","1").replace("Z","2").substring(0,8)%23):!1:!1},"Please specify a valid NIE number.");n.validator.addMethod("nifES",function(n){"use strict";return n=n.toUpperCase(),n.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[0-9]{8}[A-Z]{1}$/.test(n)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(n.substring(8,0)%23)===n.charAt(8):/^[KLM]{1}/.test(n)?n[8]===String.fromCharCode(64):!1:!1},"Please specify a valid NIF number.");jQuery.validator.addMethod("notEqualTo",function(t,i,r){return this.optional(i)||!n.validator.methods.equalTo.call(this,t,i,r)},"Please enter a different value, values must not be the same.");n.validator.addMethod("nowhitespace",function(n,t){return this.optional(t)||/^\S+$/i.test(n)},"No white space please");n.validator.addMethod("pattern",function(n,t,i){return this.optional(t)?!0:("string"==typeof i&&(i=new RegExp("^(?:"+i+")$")),i.test(n))},"Invalid format.");n.validator.addMethod("phoneNL",function(n,t){return this.optional(t)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(n)},"Please specify a valid phone number.");n.validator.addMethod("phoneUK",function(n,t){return n=n.replace(/\(|\)|\s+|-/g,""),this.optional(t)||n.length>9&&n.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number");n.validator.addMethod("phoneUS",function(n,t){return n=n.replace(/\s+/g,""),this.optional(t)||n.length>9&&n.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number");n.validator.addMethod("phonesUK",function(n,t){return n=n.replace(/\(|\)|\s+|-/g,""),this.optional(t)||n.length>9&&n.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number");n.validator.addMethod("postalCodeCA",function(n,t){return this.optional(t)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(n)},"Please specify a valid postal code");n.validator.addMethod("postalcodeBR",function(n,t){return this.optional(t)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(n)},"Informe um CEP válido.");n.validator.addMethod("postalcodeIT",function(n,t){return this.optional(t)||/^\d{5}$/.test(n)},"Please specify a valid postal code");n.validator.addMethod("postalcodeNL",function(n,t){return this.optional(t)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(n)},"Please specify a valid postal code");n.validator.addMethod("postcodeUK",function(n,t){return this.optional(t)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(n)},"Please specify a valid UK postcode");n.validator.addMethod("require_from_group",function(t,i,r){var u=n(r[1],i.form),f=u.eq(0),e=f.data("valid_req_grp")?f.data("valid_req_grp"):n.extend({},this),o=u.filter(function(){return e.elementValue(this)}).length>=r[0];return f.data("valid_req_grp",e),n(i).data("being_validated")||(u.data("being_validated",!0),u.each(function(){e.element(this)}),u.data("being_validated",!1)),o},n.validator.format("Please fill at least {0} of these fields."));n.validator.addMethod("skip_or_fill_minimum",function(t,i,r){var u=n(r[1],i.form),f=u.eq(0),e=f.data("valid_skip")?f.data("valid_skip"):n.extend({},this),o=u.filter(function(){return e.elementValue(this)}).length,s=0===o||o>=r[0];return f.data("valid_skip",e),n(i).data("being_validated")||(u.data("being_validated",!0),u.each(function(){e.element(this)}),u.data("being_validated",!1)),s},n.validator.format("Please either skip these fields or fill at least {0} of them."));n.validator.addMethod("stateUS",function(n,t,i){var r,u="undefined"==typeof i,o=u||"undefined"==typeof i.caseSensitive?!1:i.caseSensitive,f=u||"undefined"==typeof i.includeTerritories?!1:i.includeTerritories,e=u||"undefined"==typeof i.includeMilitary?!1:i.includeMilitary;return r=f||e?f&&e?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":f?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",r=o?new RegExp(r):new RegExp(r,"i"),this.optional(t)||r.test(n)},"Please specify a valid state");n.validator.addMethod("strippedminlength",function(t,i,r){return n(t).text().length>=r},n.validator.format("Please enter at least {0} characters"));n.validator.addMethod("time",function(n,t){return this.optional(t)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(n)},"Please enter a valid time, between 00:00 and 23:59");n.validator.addMethod("time12h",function(n,t){return this.optional(t)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(n)},"Please enter a valid time in 12-hour am/pm format");n.validator.addMethod("url2",function(n,t){return this.optional(t)||/^(https?|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)},n.validator.messages.url);n.validator.addMethod("vinUS",function(n){if(17!==n.length)return!1;for(var r,t,e,u,f,o=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],h=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],c=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],s=0,i=0;17>i;i++){if(e=c[i],t=n.slice(i,i+1),8===i&&(f=t),isNaN(t)){for(r=0;r<o.length;r++)if(t.toUpperCase()===o[r]){t=h[r];t*=e;isNaN(f)&&8===r&&(f=o[r]);break}}else t*=e;s+=t}return u=s%11,10===u&&(u="X"),u===f},"The specified vehicle identification number (VIN) is invalid.");n.validator.addMethod("zipcodeUS",function(n,t){return this.optional(t)||/^\d{5}(-\d{4})?$/.test(n)},"The specified US ZIP Code is invalid");n.validator.addMethod("ziprange",function(n,t){return this.optional(t)||/^90[2-5]\d\{2\}-\d{4}$/.test(n)},"Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx")});!function(){var n=function(){function n(){}function r(n){return decodeURIComponent(n.replace(/\+/g," "))}function t(n,t){var r=n.charAt(0),i=t.split(r);return r===n?i:(n=parseInt(n.substring(1),10),i[n<0?i.length+n:n-1])}function i(n,t){n=n.toLowerCase();t=t.toLowerCase();for(var h=n.charAt(0),o=t.split("&"),i=[],u={},f=[],s=n.substring(1),e=0,c=o.length;e<c;e++)if(i=o[e].match(/(.*?)=(.*)/),i||(i=[o[e],o[e],""]),""!==i[1].replace(/\s/g,"")){if(i[2]=r(i[2]||""),s===i[1])return i[2];f=i[1].match(/(.*)\[([0-9]+)\]/);f?(u[f[1]]=u[f[1]]||[],u[f[1]][f[2]]=i[2]):u[i[1]]=i[2]}return h===n?u:u[s]}return function(r,u){var f,e={};if("tld?"===r)return n();if(u=u||window.location.toString(),!r)return u;if(r=r.toString(),f=u.match(/^mailto:([^\/].+)/))e.protocol="mailto",e.email=f[1];else{if((f=u.match(/(.*?)\/#\!(.*)/))&&(u=f[1]+f[2]),(f=u.match(/(.*?)#(.*)/))&&(e.hash=f[2],u=f[1]),e.hash&&r.match(/^#/))return i(r,e.hash);if((f=u.match(/(.*?)\?(.*)/))&&(e.query=f[2],u=f[1]),e.query&&r.match(/^\?/))return i(r,e.query);if((f=u.match(/(.*?)\:?\/\/(.*)/))&&(e.protocol=f[1].toLowerCase(),u=f[2]),(f=u.match(/(.*?)(\/.*)/))&&(e.path=f[2],u=f[1]),e.path=(e.path||"").replace(/^([^\/])/,"/$1"),r.match(/^[\-0-9]+$/)&&(r=r.replace(/^([^\/])/,"/$1")),r.match(/^\//))return t(r,e.path.substring(1));if(f=t("/-1",e.path.substring(1)),f&&(f=f.match(/(.*?)\.([^.]+)$/))&&(e.file=f[0],e.filename=f[1],e.fileext=f[2]),(f=u.match(/(.*)\:([0-9]+)$/))&&(e.port=f[2],u=f[1]),(f=u.match(/(.*?)@(.*)/))&&(e.auth=f[1],u=f[2]),e.auth&&(f=e.auth.match(/(.*)\:(.*)/),e.user=f?f[1]:e.auth,e.pass=f?f[2]:void 0),e.hostname=u.toLowerCase(),"."===r.charAt(0))return t(r,e.hostname);n()&&(f=e.hostname.match(n()),f&&(e.tld=f[3],e.domain=f[2]?f[2]+"."+f[3]:void 0,e.sub=f[1]||void 0));e.port=e.port||("https"===e.protocol?"443":"80");e.protocol=e.protocol||("443"===e.port?"https":"http")}return r in e?e[r]:"{}"===r?e:void 0}}();"function"==typeof define&&window.define.amd?window.define("js-url",[],function(){return n}):("undefined"!=typeof jQuery&&window.jQuery.extend({url:function(n,t){return window.url(n,t)}}),window.url=n)}();!function(n){var t,i;n.hasInitialised||(t={escapeRegExp:function(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},hasClass:function(n,t){var i=" ";return 1===n.nodeType&&(i+n.className+i).replace(/[\n\t]/g,i).indexOf(i+t+i)>=0},addClass:function(n,t){n.className+=" "+t},removeClass:function(n,t){var i=new RegExp("\\b"+this.escapeRegExp(t)+"\\b");n.className=n.className.replace(i,"")},interpolateString:function(n,t){return n.replace(/{{([a-z][a-z0-9\-_]*)}}/gi,function(){return t(arguments[1])||""})},getCookie:function(n){var i="; "+document.cookie,t=i.split("; "+n+"=");if(2==t.length)return t.pop().split(";").shift()},setCookie:function(n,t,i,r,u){var f=new Date,e;f.setDate(f.getDate()+(i||365));e=[n+"="+t,"expires="+f.toUTCString(),"path="+(u||"/")];r&&e.push("domain="+r);document.cookie=e.join(";")},deepExtend:function(n,t){for(var i in t)t.hasOwnProperty(i)&&(i in n&&this.isPlainObject(n[i])&&this.isPlainObject(t[i])?this.deepExtend(n[i],t[i]):n[i]=t[i]);return n},throttle:function(n,t){var i=!1;return function(){i||(n.apply(this,arguments),i=!0,setTimeout(function(){i=!1},t))}},hash:function(n){var i,r,u,t=0;if(0===n.length)return t;for(i=0,u=n.length;i<u;++i)r=n.charCodeAt(i),t=(t<<5)-t+r,t|=0;return t},normaliseHex:function(n){return"#"==n[0]&&(n=n.substr(1)),3==n.length&&(n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]),n},getContrast:function(n){n=this.normaliseHex(n);var t=parseInt(n.substr(0,2),16),i=parseInt(n.substr(2,2),16),r=parseInt(n.substr(4,2),16),u=(299*t+587*i+114*r)/1e3;return u>=128?"#000":"#fff"},getLuminance:function(n){var t=parseInt(this.normaliseHex(n),16),i=38,r=(t>>16)+i,u=(t>>8&255)+i,f=(255&t)+i,e=(16777216+65536*(r<255?r<1?0:r:255)+256*(u<255?u<1?0:u:255)+(f<255?f<1?0:f:255)).toString(16).slice(1);return"#"+e},isMobile:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},isPlainObject:function(n){return"object"==typeof n&&null!==n&&n.constructor==Object}},n.status={deny:"deny",allow:"allow",dismiss:"dismiss"},n.transitionEnd=function(){var i=document.createElement("div"),n={t:"transitionend",OT:"oTransitionEnd",msT:"MSTransitionEnd",MozT:"transitionend",WebkitT:"webkitTransitionEnd"};for(var t in n)if(n.hasOwnProperty(t)&&"undefined"!=typeof i.style[t+"ransition"])return n[t];return""}(),n.hasTransition=!!n.transitionEnd,i=Object.keys(n.status).map(t.escapeRegExp),n.customStyles={},n.Popup=function(){function r(){this.initialise.apply(this,arguments)}function f(n){this.openingTimeout=null;t.removeClass(n,"cc-invisible")}function e(t){t.style.display="none";t.removeEventListener(n.transitionEnd,this.afterTransition);this.afterTransition=null}function h(){var t=this.options.onInitialise.bind(this);if(!window.navigator.cookieEnabled)return t(n.status.deny),!0;if(window.CookiesOK||window.navigator.CookiesOK)return t(n.status.allow),!0;var u=Object.keys(n.status),i=this.getStatus(),r=u.indexOf(i)>=0;return r&&t(i),r}function o(){var t=this.options.position.split("-"),n=[];return t.forEach(function(t){n.push("cc-"+t)}),n}function c(){var i=this.options,r="top"==i.position||"bottom"==i.position?"banner":"floating",n;return t.isMobile()&&(r="floating"),n=["cc-"+r,"cc-type-"+i.type,"cc-theme-"+i.theme],i.static&&n.push("cc-static"),n.push.apply(n,o.call(this)),v.call(this,this.options.palette),this.customStyleSelector&&n.push(this.customStyleSelector),n}function l(){var i={},n=this.options,r,u;return n.showLink||(n.elements.link="",n.elements.messagelink=n.elements.message),Object.keys(n.elements).forEach(function(r){i[r]=t.interpolateString(n.elements[r],function(t){var i=n.content[t];return t&&"string"==typeof i&&i.length?i:""})}),r=n.compliance[n.type],r||(r=n.compliance.info),i.compliance=t.interpolateString(r,function(n){return i[n]}),u=n.layouts[n.layout],u||(u=n.layouts.basic),t.interpolateString(u,function(n){return i[n]})}function u(i){var u=this.options,e=document.createElement("div"),f=u.container&&1===u.container.nodeType?u.container:document.body,r;return e.innerHTML=i,r=e.children[0],r.style.display="none",t.hasClass(r,"cc-window")&&n.hasTransition&&t.addClass(r,"cc-invisible"),this.onButtonClick=a.bind(this),r.addEventListener("click",this.onButtonClick),u.autoAttach&&(f.firstChild?f.insertBefore(r,f.firstChild):f.appendChild(r)),r}function a(r){var u=r.target,f,e;t.hasClass(u,"cc-btn")&&(f=u.className.match(new RegExp("\\bcc-("+i.join("|")+")\\b")),e=f&&f[1]||!1,e&&(this.setStatus(e),this.close(!0)));t.hasClass(u,"cc-close")&&(this.setStatus(n.status.dismiss),this.close(!0));t.hasClass(u,"cc-revoke")&&this.revokeChoice()}function v(n){var r=t.hash(JSON.stringify(n)),u="cc-color-override-"+r,i=t.isPlainObject(n);return this.customStyleSelector=i?u:null,i&&y(r,n,"."+u),i}function y(i,r,u){var h,l,c;if(n.customStyles[i])return void++n.customStyles[i].references;var s={},f=r.popup,e=r.button,o=r.highlight;f&&(f.text=f.text?f.text:t.getContrast(f.background),f.link=f.link?f.link:f.text,s[u+".cc-window"]=["color: "+f.text,"background-color: "+f.background],s[u+".cc-revoke"]=["color: "+f.text,"background-color: "+f.background],s[u+" .cc-link,"+u+" .cc-link:active,"+u+" .cc-link:visited"]=["color: "+f.link],e&&(e.text=e.text?e.text:t.getContrast(e.background),e.border=e.border?e.border:"transparent",s[u+" .cc-btn"]=["color: "+e.text,"border-color: "+e.border,"background-color: "+e.background],"transparent"!=e.background&&(s[u+" .cc-btn:hover, "+u+" .cc-btn:focus"]=["background-color: "+p(e.background)]),o?(o.text=o.text?o.text:t.getContrast(o.background),o.border=o.border?o.border:"transparent",s[u+" .cc-highlight .cc-btn:first-child"]=["color: "+o.text,"border-color: "+o.border,"background-color: "+o.background]):s[u+" .cc-highlight .cc-btn:first-child"]=["color: "+f.text]));h=document.createElement("style");document.head.appendChild(h);n.customStyles[i]={references:1,element:h.sheet};l=-1;for(c in s)s.hasOwnProperty(c)&&h.sheet.insertRule(c+"{"+s[c].join(";")+"}",++l)}function p(n){return n=t.normaliseHex(n),"000000"==n?"#222":t.getLuminance(n)}function w(i){var f,u,r;t.isPlainObject(i)&&(f=t.hash(JSON.stringify(i)),u=n.customStyles[f],u&&!--u.references&&(r=u.element.ownerNode,r&&r.parentNode&&r.parentNode.removeChild(r),n.customStyles[f]=null))}function s(n,t){for(var i,r=0,u=n.length;r<u;++r)if(i=n[r],i instanceof RegExp&&i.test(t)||"string"==typeof i&&i.length&&i===t)return!0;return!1}function b(){var u=this.setStatus.bind(this),r=this.options.dismissOnTimeout,t,i;"number"==typeof r&&r>=0&&(this.dismissTimeout=window.setTimeout(function(){u(n.status.dismiss)},Math.floor(r)));t=this.options.dismissOnScroll;"number"==typeof t&&t>=0&&(i=function(){window.pageYOffset>Math.floor(t)&&(u(n.status.dismiss),window.removeEventListener("scroll",i),this.onWindowScroll=null)},this.onWindowScroll=i,window.addEventListener("scroll",i))}function k(){var i,f,n,r;("info"!=this.options.type&&(this.options.revokable=!0),t.isMobile()&&(this.options.animateRevokable=!1),this.options.revokable)&&(i=o.call(this),this.options.animateRevokable&&i.push("cc-animate"),this.customStyleSelector&&i.push(this.customStyleSelector),f=this.options.revokeBtn.replace("{{classes}}",i.join(" ")),this.revokeBtn=u.call(this,f),n=this.revokeBtn,this.options.animateRevokable&&(r=t.throttle(function(i){var r=!1,u=window.innerHeight-20;t.hasClass(n,"cc-top")&&i.clientY<20&&(r=!0);t.hasClass(n,"cc-bottom")&&i.clientY>u&&(r=!0);r?t.hasClass(n,"cc-active")||t.addClass(n,"cc-active"):t.hasClass(n,"cc-active")&&t.removeClass(n,"cc-active")},200),this.onMouseMove=r,window.addEventListener("mousemove",r)))}var d={enabled:!0,container:null,cookie:{name:"cookieconsent_status",path:"/",domain:"",expiryDays:365},onPopupOpen:function(){},onPopupClose:function(){},onInitialise:function(){},onStatusChange:function(){},onRevokeChoice:function(){},content:{header:"Cookies used on the website!",message:"This website uses cookies to ensure you get the best experience on our website.",dismiss:"Got it!",allow:"Allow cookies",deny:"Decline",link:"Learn more",href:"http://cookiesandyou.com",close:"&#x274c;"},elements:{header:'<span class="cc-header">{{header}}<\/span>&nbsp;',message:'<span id="cookieconsent:desc" class="cc-message">{{message}}<\/span>',messagelink:'<span id="cookieconsent:desc" class="cc-message">{{message}} <a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" target="_blank">{{link}}<\/a><\/span>',dismiss:'<a aria-label="dismiss cookie message" role=button tabindex="0" class="cc-btn cc-dismiss">{{dismiss}}<\/a>',allow:'<a aria-label="allow cookies" role=button tabindex="0"  class="cc-btn cc-allow">{{allow}}<\/a>',deny:'<a aria-label="deny cookies" role=button tabindex="0" class="cc-btn cc-deny">{{deny}}<\/a>',link:'<a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" target="_blank">{{link}}<\/a>',close:'<span aria-label="dismiss cookie message" role=button tabindex="0" class="cc-close">{{close}}<\/span>'},window:'<div role="dialog" aria-live="polite" aria-label="cookieconsent" aria-describedby="cookieconsent:desc" class="cc-window {{classes}}"><!--googleoff: all-->{{children}}<!--googleon: all--><\/div>',revokeBtn:'<div class="cc-revoke {{classes}}">Cookie Policy<\/div>',compliance:{info:'<div class="cc-compliance">{{dismiss}}<\/div>',"opt-in":'<div class="cc-compliance cc-highlight">{{dismiss}}{{allow}}<\/div>',"opt-out":'<div class="cc-compliance cc-highlight">{{deny}}{{dismiss}}<\/div>'},type:"info",layouts:{basic:"{{messagelink}}{{compliance}}","basic-close":"{{messagelink}}{{compliance}}{{close}}","basic-header":"{{header}}{{message}}{{link}}{{compliance}}"},layout:"basic",position:"bottom",theme:"block",static:!1,palette:null,revokable:!1,animateRevokable:!0,showLink:!0,dismissOnScroll:!1,dismissOnTimeout:!1,autoOpen:!0,autoAttach:!0,whitelistPage:[],blacklistPage:[],overrideHTML:null};return r.prototype.initialise=function(n){var i,r,f;this.options&&this.destroy();t.deepExtend(this.options={},d);t.isPlainObject(n)&&t.deepExtend(this.options,n);h.call(this)&&(this.options.enabled=!1);s(this.options.blacklistPage,location.pathname)&&(this.options.enabled=!1);s(this.options.whitelistPage,location.pathname)&&(this.options.enabled=!0);i=this.options.window.replace("{{classes}}",c.call(this).join(" ")).replace("{{children}}",l.call(this));r=this.options.overrideHTML;("string"==typeof r&&r.length&&(i=r),this.options.static)?(f=u.call(this,'<div class="cc-grower">'+i+"<\/div>"),f.style.display="",this.element=f.firstChild,this.element.style.display="none",t.addClass(this.element,"cc-invisible")):this.element=u.call(this,i);b.call(this);k.call(this);this.options.autoOpen&&this.autoOpen()},r.prototype.destroy=function(){this.onButtonClick&&this.element&&(this.element.removeEventListener("click",this.onButtonClick),this.onButtonClick=null);this.dismissTimeout&&(clearTimeout(this.dismissTimeout),this.dismissTimeout=null);this.onWindowScroll&&(window.removeEventListener("scroll",this.onWindowScroll),this.onWindowScroll=null);this.onMouseMove&&(window.removeEventListener("mousemove",this.onMouseMove),this.onMouseMove=null);this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element);this.element=null;this.revokeBtn&&this.revokeBtn.parentNode&&this.revokeBtn.parentNode.removeChild(this.revokeBtn);this.revokeBtn=null;w(this.options.palette);this.options=null},r.prototype.open=function(){if(this.element)return this.isOpen()||(n.hasTransition?this.fadeIn():this.element.style.display="",this.options.revokable&&this.toggleRevokeButton(),this.options.onPopupOpen.call(this)),this},r.prototype.close=function(t){if(this.element)return this.isOpen()&&(n.hasTransition?this.fadeOut():this.element.style.display="none",t&&this.options.revokable&&this.toggleRevokeButton(!0),this.options.onPopupClose.call(this)),this},r.prototype.fadeIn=function(){var i=this.element,r,u;n.hasTransition&&i&&(this.afterTransition&&e.call(this,i),t.hasClass(i,"cc-invisible"))&&((i.style.display="",this.options.static)&&(r=this.element.clientHeight,this.element.parentNode.style.maxHeight=r+"px"),u=20,this.openingTimeout=setTimeout(f.bind(this,i),u))},r.prototype.fadeOut=function(){var i=this.element;n.hasTransition&&i&&(this.openingTimeout&&(clearTimeout(this.openingTimeout),f.bind(this,i)),t.hasClass(i,"cc-invisible")||(this.options.static&&(this.element.parentNode.style.maxHeight=""),this.afterTransition=e.bind(this,i),i.addEventListener(n.transitionEnd,this.afterTransition),t.addClass(i,"cc-invisible")))},r.prototype.isOpen=function(){return this.element&&""==this.element.style.display&&(!n.hasTransition||!t.hasClass(this.element,"cc-invisible"))},r.prototype.toggleRevokeButton=function(n){this.revokeBtn&&(this.revokeBtn.style.display=n?"":"none")},r.prototype.revokeChoice=function(n){this.options.enabled=!0;this.clearStatus();this.options.onRevokeChoice.call(this);n||this.autoOpen()},r.prototype.hasAnswered=function(){return Object.keys(n.status).indexOf(this.getStatus())>=0},r.prototype.hasConsented=function(){var t=this.getStatus();return t==n.status.allow||t==n.status.dismiss},r.prototype.autoOpen=function(){!this.hasAnswered()&&this.options.enabled&&this.open()},r.prototype.setStatus=function(i){var r=this.options.cookie,u=t.getCookie(r.name),f=Object.keys(n.status).indexOf(u)>=0;Object.keys(n.status).indexOf(i)>=0?(t.setCookie(r.name,i,r.expiryDays,r.domain,r.path),this.options.onStatusChange.call(this,i,f)):this.clearStatus()},r.prototype.getStatus=function(){return t.getCookie(this.options.cookie.name)},r.prototype.clearStatus=function(){var n=this.options.cookie;t.setCookie(n.name,"",-1,n.domain,n.path)},r}(),n.Location=function(){function n(n){t.deepExtend(this.options={},f);t.isPlainObject(n)&&t.deepExtend(this.options,n);this.currentServiceIndex=-1}function r(n,t,i){var u,r=document.createElement("script");r.type="text/"+(n.type||"javascript");r.src=n.src||n;r.async=!1;r.onreadystatechange=r.onload=function(){var n=r.readyState;clearTimeout(u);t.done||n&&!/loaded|complete/.test(n)||(t.done=!0,t(),r.onreadystatechange=r.onload=null)};document.body.appendChild(r);u=setTimeout(function(){t.done=!0;t();r.onreadystatechange=r.onload=null},i)}function u(n,t,i,r,u){var f=new(window.XMLHttpRequest||window.ActiveXObject)("MSXML2.XMLHTTP.3.0"),e,s,o;if(f.open(r?"POST":"GET",n,1),f.setRequestHeader("X-Requested-With","XMLHttpRequest"),f.setRequestHeader("Content-type","application/x-www-form-urlencoded"),Array.isArray(u))for(e=0,s=u.length;e<s;++e)o=u[e].split(":",2),f.setRequestHeader(o[0].replace(/^\s+|\s+$/g,""),o[1].replace(/^\s+|\s+$/g,""));"function"==typeof t&&(f.onreadystatechange=function(){f.readyState>3&&t(f)});f.send(r)}function i(n){return new Error("Error ["+(n.code||"UNKNOWN")+"]: "+n.error)}var f={timeout:5e3,services:["freegeoip","ipinfo","maxmind"],serviceDefinitions:{freegeoip:function(){return{url:"//freegeoip.net/json/?callback={callback}",isScript:!0,callback:function(n,t){try{var r=JSON.parse(t);return r.error?i(r):{code:r.country_code}}catch(u){return i({error:"Invalid response ("+u+")"})}}}},ipinfo:function(){return{url:"//ipinfo.io",headers:["Accept: application/json"],callback:function(n,t){try{var r=JSON.parse(t);return r.error?i(r):{code:r.country}}catch(u){return i({error:"Invalid response ("+u+")"})}}}},ipinfodb:function(){return{url:"//api.ipinfodb.com/v3/ip-country/?key={api_key}&format=json&callback={callback}",isScript:!0,callback:function(n,t){try{var r=JSON.parse(t);return"ERROR"==r.statusCode?i({error:r.statusMessage}):{code:r.countryCode}}catch(u){return i({error:"Invalid response ("+u+")"})}}}},maxmind:function(){return{url:"//js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js",isScript:!0,callback:function(n){return window.geoip2?void geoip2.country(function(t){try{n({code:t.country.iso_code})}catch(r){n(i(r))}},function(t){n(i(t))}):void n(new Error("Unexpected response format. The downloaded script should have exported `geoip2` to the global scope"))}}}}};return n.prototype.getNextService=function(){var n;do n=this.getServiceByIdx(++this.currentServiceIndex);while(this.currentServiceIndex<this.options.services.length&&!n);return n},n.prototype.getServiceByIdx=function(n){var i=this.options.services[n],r;return"function"==typeof i?(r=i(),r.name&&t.deepExtend(r,this.options.serviceDefinitions[r.name](r)),r):"string"==typeof i?this.options.serviceDefinitions[i]():t.isPlainObject(i)?this.options.serviceDefinitions[i.name](i):null},n.prototype.locate=function(n,t){var i=this.getNextService();return i?(this.callbackComplete=n,this.callbackError=t,void this.runService(i,this.runNextServiceOnError.bind(this))):void t(new Error("No services to run"))},n.prototype.setupUrl=function(n){var t=this.getCurrentServiceOpts();return n.url.replace(/\{(.*?)\}/g,function(i,r){if("callback"===r){var u="callback"+Date.now();return window[u]=function(t){n.__JSONP_DATA=JSON.stringify(t)},u}if(r in t.interpolateUrl)return t.interpolateUrl[r]})},n.prototype.runService=function(n,t){var i=this,f,e;n&&n.url&&n.callback&&(f=n.isScript?r:u,e=this.setupUrl(n),f(e,function(r){var u=r?r.responseText:"";n.__JSONP_DATA&&(u=n.__JSONP_DATA,delete n.__JSONP_DATA);i.runServiceCallback.call(i,t,n,u)},this.options.timeout,n.data,n.headers))},n.prototype.runServiceCallback=function(n,t,i){var u=this,f=function(t){r||u.onServiceResult.call(u,n,t)},r=t.callback(f,i);r&&this.onServiceResult.call(this,n,r)},n.prototype.onServiceResult=function(n,t){t instanceof Error||t&&t.error?n.call(this,t,null):n.call(this,null,t)},n.prototype.runNextServiceOnError=function(n,t){if(n){this.logError(n);var i=this.getNextService();i?this.runService(i,this.runNextServiceOnError.bind(this)):this.completeService.call(this,this.callbackError,new Error("All services failed"))}else this.completeService.call(this,this.callbackComplete,t)},n.prototype.getCurrentServiceOpts=function(){var n=this.options.services[this.currentServiceIndex];return"string"==typeof n?{name:n}:"function"==typeof n?n():t.isPlainObject(n)?n:{}},n.prototype.completeService=function(n,t){this.currentServiceIndex=-1;n&&n(t)},n.prototype.logError=function(n){var t=this.currentServiceIndex,i=this.getServiceByIdx(t);console.error("The service["+t+"] ("+i.url+") responded with the following error",n)},n}(),n.Law=function(){function n(){this.initialise.apply(this,arguments)}var i={regionalLaw:!0,hasLaw:["AT","BE","BG","HR","CZ","CY","DK","EE","FI","FR","DE","EL","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","SK","SI","ES","SE","GB","UK"],revokable:["HR","CY","DK","EE","FR","DE","LV","LT","NL","PT","ES"],explicitAction:["HR","IT","ES"]};return n.prototype.initialise=function(n){t.deepExtend(this.options={},i);t.isPlainObject(n)&&t.deepExtend(this.options,n)},n.prototype.get=function(n){var t=this.options;return{hasLaw:t.hasLaw.indexOf(n)>=0,revokable:t.revokable.indexOf(n)>=0,explicitAction:t.explicitAction.indexOf(n)>=0}},n.prototype.applyLaw=function(n,t){var i=this.get(t);return i.hasLaw||(n.enabled=!1),this.options.regionalLaw&&(i.revokable&&(n.revokable=!0),i.explicitAction&&(n.dismissOnScroll=!1,n.dismissOnTimeout=!1)),n},n}(),n.initialise=function(t,i,r){var u=new n.Law(t.law);i||(i=function(){});r||(r=function(){});n.getCountryCode(t,function(r){delete t.law;delete t.location;r.code&&(t=u.applyLaw(t,r.code));i(new n.Popup(t))},function(i){delete t.law;delete t.location;r(i,new n.Popup(t))})},n.getCountryCode=function(t,i,r){if(t.law&&t.law.countryCode)return void i({code:t.law.countryCode});if(t.location){var u=new n.Location(t.location);return void u.locate(function(n){i(n||{})},r)}i({})},n.utils=t,n.hasInitialised=!0,window.cookieconsent=n)}(window.cookieconsent||{}),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();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(typeof document!="undefined"){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=i.write?i.write(u,t):encodeURIComponent(String(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":"","; samesite=strict"].join("")}t||(o={});for(var l=document.cookie?document.cookie.split("; "):[],a=/(%[0-9A-Z]{2})+/g,c=0;c<l.length;c++){var v=l[c].split("="),h=v[0].replace(a,decodeURIComponent),e=v.slice(1).join("=");e.charAt(0)==='"'&&(e=e.slice(1,-1));try{if(e=i.read?i.read(e,h):i(e,h)||e.replace(a,decodeURIComponent),this.json)try{e=JSON.parse(e)}catch(y){}if(t===h){o=e;break}t||(o[h]=e)}catch(y){}}return o}}return r.set=r,r.get=function(n){return r(n)},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(){})}),function(n){n.fn.bootpag=function(t){function f(t,f){var l;f=parseInt(f,10);var o,e=0==i.maxVisible?1:i.maxVisible,h=1==i.maxVisible?0:1,c=Math.floor((f-1)/e)*e,s=t.find("li");i.page=f=0>f?0:f>i.total?i.total:f;s.removeClass(i.activeClass);o=1>f-1?1:i.leaps&&f-1>=i.maxVisible?Math.floor((f-1)/e)*e:f-1;i.firstLastUse&&s.first().toggleClass(i.disabledClass,1===f);e=s.first();i.firstLastUse&&(e=e.next());e.toggleClass(i.disabledClass,1===f).attr("data-lp",o).find("a").attr("href",r(o));h=1==i.maxVisible?0:1;o=f+1>i.total?i.total:i.leaps&&f+1<i.total-i.maxVisible?c+i.maxVisible+h:f+1;e=s.last();i.firstLastUse&&(e=e.prev());e.toggleClass(i.disabledClass,f===i.total).attr("data-lp",o).find("a").attr("href",r(o));s.last().toggleClass(i.disabledClass,f===i.total);e=s.filter("[data-lp="+f+"]");h="."+[i.nextClass,i.prevClass,i.firstClass,i.lastClass].join(",.");e.not(h).length||(l=f<=c?-i.maxVisible:0,s.not(h).each(function(t){o=t+1+c+l;n(this).attr("data-lp",o).toggle(o<=i.total).find("a").html(o).attr("href",r(o))}),e=s.filter("[data-lp="+f+"]"));e.not(h).addClass(i.activeClass);u.data("settings",i)}function r(n){return i.href.replace(i.hrefVariable,n)}var u=this,i=n.extend({total:0,page:1,maxVisible:null,leaps:!0,href:"javascript:void(0);",hrefVariable:"{{number}}",next:"&raquo;",prev:"&laquo;",firstLastUse:!1,first:'<span aria-hidden="true">&larr;<\/span>',last:'<span aria-hidden="true">&rarr;<\/span>',wrapClass:"pagination",activeClass:"active",disabledClass:"disabled",nextClass:"next",prevClass:"prev",lastClass:"last",firstClass:"first"},u.data("settings")||{},t||{});return 0>=i.total?this:(n.isNumeric(i.maxVisible)||i.maxVisible||(i.maxVisible=parseInt(i.total,10)),u.data("settings",i),this.each(function(){var t,e,o=n(this);for(t=['<ul class="',i.wrapClass,' bootpag">'],i.firstLastUse&&(t=t.concat(['<li data-lp="1" class="',i.firstClass,'"><a href="',r(1),'">',i.first,"<\/a><\/li>"])),i.prev&&(t=t.concat(['<li data-lp="1" class="',i.prevClass,'"><a href="',r(1),'">',i.prev,"<\/a><\/li>"])),e=1;e<=Math.min(i.total,i.maxVisible);e++)t=t.concat(['<li data-lp="',e,'"><a href="',r(e),'">',e,"<\/a><\/li>"]);i.next&&(e=i.leaps&&i.total>i.maxVisible?Math.min(i.maxVisible+1,i.total):2,t=t.concat(['<li data-lp="',e,'" class="',i.nextClass,'"><a href="',r(e),'">',i.next,"<\/a><\/li>"]));i.firstLastUse&&(t=t.concat(['<li data-lp="',i.total,'" class="last"><a href="',r(i.total),'">',i.last,"<\/a><\/li>"]));t.push("<\/ul>");o.find("ul.bootpag").remove();o.append(t.join(""));t=o.find("ul.bootpag");o.find("li").click(function(){var t=n(this),r;t.hasClass(i.disabledClass)||t.hasClass(i.activeClass)||(r=parseInt(t.attr("data-lp"),10),u.find("ul.bootpag").each(function(){f(n(this),r)}),u.trigger("page",r))});f(t,i.page)}))}}(jQuery,window);!function(n){"function"==typeof define&&define.amd?define(["inputmask.dependencyLib"],n):"object"==typeof exports?module.exports=n(require("./inputmask.dependencyLib.jquery")):n(window.dependencyLib||jQuery)}(function(n){function t(i,r){return this instanceof t?(n.isPlainObject(i)?r=i:(r=r||{},r.alias=i),this.el=void 0,this.opts=n.extend(!0,{},this.defaults,r),this.noMasksCache=r&&void 0!==r.definitions,this.userOptions=r||{},this.events={},void u(this.opts.alias,r,this.opts)):new t(i,r)}function o(n){var t=document.createElement("input"),i="on"+n,r=i in t;return r||(t.setAttribute(i,"return;"),r="function"==typeof t[i]),t=null,r}function s(t,i){var f=t.getAttribute("type"),u="INPUT"===t.tagName&&n.inArray(f,i.supportsInputType)!==-1||t.isContentEditable||"TEXTAREA"===t.tagName,r;return u||"INPUT"!==t.tagName||(r=document.createElement("input"),r.setAttribute("type",f),u="text"===r.type,r=null),u}function u(t,i,r){var f=r.aliases[t];return f?(f.alias&&u(f.alias,void 0,r),n.extend(!0,r,f),n.extend(!0,r,i),!0):(null===r.mask&&(r.mask=t),!1)}function h(t,i,r){function c(n,i){i=void 0!==i?i:t.getAttribute("data-inputmask-"+n);null!==i&&("string"==typeof i&&(0===n.indexOf("on")?i=window[i]:"false"===i?i=!1:"true"===i&&(i=!0)),r[n]=i)}var h,f,e,o,s=t.getAttribute("data-inputmask");if(s&&""!==s&&(s=s.replace(new RegExp("'","g"),'"'),f=JSON.parse("{"+s+"}")),f){e=void 0;for(o in f)if("alias"===o.toLowerCase()){e=f[o];break}}c("alias",e);r.alias&&u(r.alias,r,i);for(h in i){if(f){e=void 0;for(o in f)if(o.toLowerCase()===h.toLowerCase()){e=f[o];break}}c(h,e)}return n.extend(!0,i,r),i}function r(i,r){function s(t){function h(n,t,i,r){this.matches=[];this.isGroup=n||!1;this.isOptional=t||!1;this.isQuantifier=i||!1;this.isAlternator=r||!1;this.quantifier={min:1,max:1}}function d(t,r,u){var f=i.definitions[r],e;if(u=void 0!==u?u:t.matches.length,e=t.matches[u-1],f&&!y){f.placeholder=n.isFunction(f.placeholder)?f.placeholder(i):f.placeholder;for(var h=f.prevalidator,a=h?h.length:0,o=1;o<f.cardinality;o++){var c=a>=o?h[o-1]:[],s=c.validator,l=c.cardinality;t.matches.splice(u++,0,{fn:s?"string"==typeof s?new RegExp(s):new function(){this.test=s}:new RegExp("."),cardinality:l?l:1,optionality:t.isOptional,newBlockMarker:void 0===e||e.def!==(f.definitionSymbol||r),casing:f.casing,def:f.definitionSymbol||r,placeholder:f.placeholder,mask:r});e=t.matches[u-1]}t.matches.splice(u++,0,{fn:f.validator?"string"==typeof f.validator?new RegExp(f.validator):new function(){this.test=f.validator}:new RegExp("."),cardinality:f.cardinality,optionality:t.isOptional,newBlockMarker:void 0===e||e.def!==(f.definitionSymbol||r),casing:f.casing,def:f.definitionSymbol||r,placeholder:f.placeholder,mask:r})}else t.matches.splice(u++,0,{fn:null,cardinality:0,optionality:t.isOptional,newBlockMarker:void 0===e||e.def!==r,casing:null,def:i.staticDefinitionSymbol||r,placeholder:void 0!==i.staticDefinitionSymbol?r:void 0,mask:r}),y=!1}function g(n,t){n.isGroup&&(n.isGroup=!1,d(n,i.groupmarker.start,0),t!==!0&&d(n,i.groupmarker.end))}function rt(n,t,i,r){t.matches.length>0&&(void 0===r||r)&&(i=t.matches[t.matches.length-1],g(i));d(t,n)}function nt(){if(r.length>0){if(u=r[r.length-1],rt(c,u,s,!u.isAlternator),u.isAlternator){f=r.pop();for(var n=0;n<f.matches.length;n++)f.matches[n].isGroup=!1;r.length>0?(u=r[r.length-1],u.matches.push(f)):e.matches.push(f)}}else rt(c,e,s)}function ut(n){function f(n){return n===i.optionalmarker.start?n=i.optionalmarker.end:n===i.optionalmarker.end?n=i.optionalmarker.start:n===i.groupmarker.start?n=i.groupmarker.end:n===i.groupmarker.end&&(n=i.groupmarker.start),n}var t,r,u;n.matches=n.matches.reverse();for(t in n.matches)r=parseInt(t),n.matches[t].isQuantifier&&n.matches[r+1]&&n.matches[r+1].isGroup&&(u=n.matches[t],n.matches.splice(t,1),n.matches.splice(r+1,0,u)),n.matches[t]=void 0!==n.matches[t].matches?ut(n.matches[t]):f(n.matches[t]);return n}for(var p,w,k,o,c,l,u,f,s,v,ft=/(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g,y=!1,e=new h,r=[],tt=[];o=ft.exec(t);)if(c=o[0],y)nt();else switch(c.charAt(0)){case i.escapeChar:y=!0;break;case i.optionalmarker.end:case i.groupmarker.end:if(l=r.pop(),void 0!==l)if(r.length>0){if(u=r[r.length-1],u.matches.push(l),u.isAlternator){for(f=r.pop(),p=0;p<f.matches.length;p++)f.matches[p].isGroup=!1;r.length>0?(u=r[r.length-1],u.matches.push(f)):e.matches.push(f)}}else e.matches.push(l);else nt();break;case i.optionalmarker.start:r.push(new h(!1,!0));break;case i.groupmarker.start:r.push(new h(!0));break;case i.quantifiermarker.start:w=new h(!1,!1,!0);c=c.replace(/[{}]/g,"");var a=c.split(","),it=isNaN(a[0])?a[0]:parseInt(a[0]),b=1===a.length?it:isNaN(a[1])?a[1]:parseInt(a[1]);("*"!==b&&"+"!==b||(it="*"===b?0:1),w.quantifier={min:it,max:b},r.length>0)?(k=r[r.length-1].matches,o=k.pop(),o.isGroup||(v=new h(!0),v.matches.push(o),o=v),k.push(o),k.push(w)):(o=e.matches.pop(),o.isGroup||(v=new h(!0),v.matches.push(o),o=v),e.matches.push(o),e.matches.push(w));break;case i.alternatormarker:r.length>0?(u=r[r.length-1],s=u.matches.pop()):s=e.matches.pop();s.isAlternator?r.push(s):(f=new h(!1,!1,!1,!0),f.matches.push(s),r.push(f));break;default:nt()}for(;r.length>0;)l=r.pop(),g(l,!0),e.matches.push(l);return e.matches.length>0&&(s=e.matches[e.matches.length-1],g(s),tt.push(e)),i.numericInput&&ut(tt[0]),tt}function f(u,f){var o,e;if(null!==u&&""!==u)return(1===u.length&&i.greedy===!1&&0!==i.repeat&&(i.placeholder=""),i.repeat>0||"*"===i.repeat||"+"===i.repeat)&&(o="*"===i.repeat?0:"+"===i.repeat?1:i.repeat,u=i.groupmarker.start+u+i.groupmarker.end+i.quantifiermarker.start+o+","+i.repeat+i.quantifiermarker.end),void 0===t.prototype.masksCache[u]||r===!0?(e={mask:u,maskToken:s(u),validPositions:{},_buffer:void 0,buffer:void 0,tests:{},metadata:f,maskLength:void 0},r!==!0&&(t.prototype.masksCache[i.numericInput?u.split("").reverse().join(""):u]=e,e=n.extend(!0,{},t.prototype.masksCache[i.numericInput?u.split("").reverse().join(""):u]))):e=n.extend(!0,{},t.prototype.masksCache[i.numericInput?u.split("").reverse().join(""):u]),e}function e(n){return n.toString()}var o,u;if(n.isFunction(i.mask)&&(i.mask=i.mask(i)),n.isArray(i.mask)){if(i.mask.length>1)return i.keepStatic=null===i.keepStatic||i.keepStatic,u="(",n.each(i.numericInput?i.mask.reverse():i.mask,function(t,i){u.length>1&&(u+=")|(");u+=e(void 0===i.mask||n.isFunction(i.mask)?i:i.mask)}),u+=")",f(u,i.mask);i.mask=i.mask.pop()}return i.mask&&(o=void 0===i.mask.mask||n.isFunction(i.mask.mask)?f(e(i.mask),i.mask):f(e(i.mask.mask),i.mask)),o}function i(r,u,f){function hi(n,t,i){var o;t=t||0;var s,u,c,e=[],r=0,l=y();wt=void 0!==a?a.maxLength:void 0;wt===-1&&(wt=void 0);do n===!0&&h().validPositions[r]?(o=h().validPositions[r],u=o.match,s=o.locator.slice(),e.push(i===!0?o.input:rt(r,u))):(c=ct(r,s,r-1),u=c.match,s=c.locator.slice(),(f.jitMasking===!1||r<l||isFinite(f.jitMasking)&&f.jitMasking>r)&&e.push(rt(r,u))),r++;while((void 0===wt||r<wt)&&(null!==u.fn||""!==u.def)||t>r);return""===e[e.length-1]&&e.pop(),h().maskLength=r+1,e}function h(){return u}function nt(n){var t=h();t.buffer=void 0;n!==!0&&(t._buffer=void 0,t.validPositions={},t.p=0)}function y(n,t,i){var u=-1,f=-1,e=i||h().validPositions,o,r;void 0===n&&(n=-1);for(o in e)r=parseInt(o),e[r]&&(t||null!==e[r].match.fn)&&(r<=n&&(u=r),r>=n&&(f=r));return u!==-1&&n-u>1||f<n?u:f}function ci(t,i,r,u){function v(n){var t=h().validPositions[n],i,r;return void 0!==t&&null===t.match.fn?(i=h().validPositions[n-1],r=h().validPositions[n+1],void 0!==i&&void 0!==r):!1}var e,o=t,c=n.extend(!0,{},h().validPositions),l=!1,a,s;for(h().p=t,e=i-1;e>=o;e--)void 0===h().validPositions[e]||r!==!0&&(v(e)||f.canClearPosition(h(),e,y(),u,f)===!1)||delete h().validPositions[e];for(nt(!0),e=o+1;e<=y();){for(;void 0!==h().validPositions[o];)o++;a=h().validPositions[o];(e<o&&(e=o+1),void 0===h().validPositions[e]&&g(e)||void 0!==a)?e++:(s=ct(e),l===!1&&c[o]&&c[o].match.def===s.match.def?(h().validPositions[o]=n.extend(!0,{},c[o]),h().validPositions[o].input=s.input,delete h().validPositions[e],e++):li(o,s.match.def)?et(o,s.input||rt(e),!0)!==!1&&(delete h().validPositions[e],e++,l=!0):g(e)||(e++,o--),o++)}nt(!0)}function vt(n,t){for(var i,e=n,o=y(),r=h().validPositions[o]||tt(0)[0],s=void 0!==r.alternation?r.locator[r.alternation].toString().split(","):[],u=0;u<e.length&&(i=e[u],!(i.match&&(f.greedy&&i.match.optionalQuantifier!==!0||(i.match.optionality===!1||i.match.newBlockMarker===!1)&&i.match.optionalQuantifier!==!0)&&(void 0===r.alternation||r.alternation!==i.alternation||void 0!==i.locator[r.alternation]&&ni(i.locator[r.alternation].toString().split(","),s)))||t===!0&&(null!==i.match.fn||/[0-9a-bA-Z]/.test(i.match.def)));u++);return i}function ct(n,t,i){return h().validPositions[n]||vt(tt(n,t?t.slice():t,i))}function ot(n){return h().validPositions[n]?h().validPositions[n]:tt(n)[0]}function li(n,t){for(var u=!1,r=tt(n),i=0;i<r.length;i++)if(r[i].match&&r[i].match.def===t){u=!0;break}return u}function ki(t,i){var u,r;return(h().tests[t]||h().validPositions[t])&&n.each(h().tests[t]||[h().validPositions[t]],function(n,t){var f=t.alternation?t.locator[t.alternation].toString().indexOf(i):-1;(void 0===r||f<r)&&f!==-1&&(u=t,r=f)}),u}function tt(t,i,r){function y(i,r,o,c){function l(o,c,p){function ht(t,i){var r=0===n.inArray(t,i.matches);return r||n.each(i.matches,function(n,u){if(u.isQuantifier===!0&&(r=ht(t,i.matches[n-1])))return!1}),r}function yt(n,t){var i=ki(n,t);if(i)return i.locator.slice(i.alternation+1)}function pt(n,i){return null===n.match.fn&&null!==i.match.fn&&i.match.fn.test(n.match.def,h(),t,!1,f,!1)}var at,ft,rt,et,w,lt,ot,b,it,nt,st;if(e>1e4)throw"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+h().mask;if(e===t&&void 0===o.matches)return u.push({match:o,locator:c.reverse(),cd:v}),!0;if(void 0!==o.matches){if(o.isGroup&&p!==o){if(o=l(i.matches[n.inArray(o,i.matches)+1],c))return!0}else if(o.isOptional){if(at=o,o=y(o,r,c,p)){if(s=u[u.length-1].match,!ht(s,at))return!0;a=!0;e=t}}else if(o.isAlternator){var ct,ut=o,tt=[],wt=u.slice(),bt=c.length,k=r.length>0?r.shift():-1;if(k===-1||"string"==typeof k){var d,kt=e,vt=r.slice(),g=[];if("string"==typeof k)g=k.split(",");else for(d=0;d<ut.matches.length;d++)g.push(d);for(ft=0;ft<g.length;ft++)for((d=parseInt(g[ft]),u=[],r=yt(e,d)||vt.slice(),o=l(ut.matches[d]||i.matches[d],[d].concat(c),p)||o,o!==!0&&void 0!==o&&g[g.length-1]<ut.matches.length)&&(rt=n.inArray(o,i.matches)+1,i.matches.length>rt&&(o=l(i.matches[rt],[rt].concat(c.slice(1,c.length)),p),o&&(g.push(rt.toString()),n.each(u,function(n,t){t.alternation=c.length-1})))),ct=u.slice(),e=kt,u=[],et=0;et<ct.length;et++){for(w=ct[et],lt=!1,w.alternation=w.alternation||bt,ot=0;ot<tt.length;ot++)if(b=tt[ot],("string"!=typeof k||n.inArray(w.locator[w.alternation].toString(),g)!==-1)&&(w.match.def===b.match.def||pt(w,b))){lt=w.match.mask===b.match.mask;b.locator[w.alternation].toString().indexOf(w.locator[w.alternation])===-1&&(b.locator[w.alternation]=b.locator[w.alternation]+","+w.locator[w.alternation],b.alternation=w.alternation,null==w.match.fn&&(b.na=b.na||w.locator[w.alternation].toString(),b.na.indexOf(w.locator[w.alternation])===-1&&(b.na=b.na+","+w.locator[w.alternation])));break}lt||tt.push(w)}"string"==typeof k&&(tt=n.map(tt,function(t,i){var e,r,f,u;if(isFinite(i)){for(r=t.alternation,f=t.locator[r].toString().split(","),t.locator[r]=void 0,t.alternation=void 0,u=0;u<f.length;u++)e=n.inArray(f[u],g)!==-1,e&&(void 0!==t.locator[r]?(t.locator[r]+=",",t.locator[r]+=f[u]):t.locator[r]=parseInt(f[u]),t.alternation=r);if(void 0!==t.locator[r])return t}}));u=wt.concat(tt);e=t;a=u.length>0;r=vt.slice()}else o=l(ut.matches[k]||i.matches[k],[k].concat(c),p);if(o)return!0}else if(o.isQuantifier&&p!==i.matches[n.inArray(o,i.matches)-1]){for(it=o,nt=r.length>0?r.shift():0;nt<(isNaN(it.quantifier.max)?nt+1:it.quantifier.max)&&e<=t;nt++)if(st=i.matches[n.inArray(it,i.matches)-1],o=l(st,[nt].concat(c),st)){if(s=u[u.length-1].match,s.optionalQuantifier=nt>it.quantifier.min-1,ht(s,st)){if(nt>it.quantifier.min-1){a=!0;e=t;break}return!0}return!0}}else if(o=y(o,r,c,p))return!0}else e++}for(var w,p=r.length>0?r.shift():0;p<i.matches.length;p++)if(i.matches[p].isQuantifier!==!0){if(w=l(i.matches[p],[p].concat(o),c),w&&e===t)return w;if(e>t)break}}function d(t){var i=[];return n.isArray(t)||(t=[t]),t.length>0&&(void 0===t[0].alternation?(i=vt(t.slice()).locator.slice(),0===i.length&&(i=t[0].locator.slice())):n.each(t,function(n,t){if(""!==t.def)if(0===i.length)i=t.locator.slice();else for(var r=0;r<i.length;r++)t.locator[r]&&i[r].toString().indexOf(t.locator[r])===-1&&(i[r]+=","+t.locator[r])})),i}function p(n){return f.keepStatic&&t>0&&n.length>1+(""===n[n.length-1].match.def?1:0)&&n[0].match.optionality!==!0&&n[0].match.optionalQuantifier!==!0&&null===n[0].match.fn&&!/[0-9a-bA-Z]/.test(n[0].match.def)?[vt(n)]:n}var s,b=h().maskToken,e=i?r:0,l=i?i.slice():[0],u=[],a=!1,v=i?i.join(""):"",w,o,c,k;if(t>-1){if(void 0===i){for(o=t-1;void 0===(w=h().validPositions[o]||h().tests[o])&&o>-1;)o--;void 0!==w&&o>-1&&(l=d(w),v=l.join(""),e=o)}if(h().tests[t]&&h().tests[t][0].cd===v)return p(h().tests[t]);for(c=l.shift();c<b.length;c++)if(k=y(b[c],l,[c]),k&&e===t||e>t)break}return(0===u.length||a)&&u.push({match:{fn:null,cardinality:0,optionality:!0,casing:null,def:"",placeholder:""},locator:[],cd:v}),void 0!==i&&h().tests[t]?p(n.extend(!0,[],u)):(h().tests[t]=n.extend(!0,[],u),p(h().tests[t]))}function d(){return void 0===h()._buffer&&(h()._buffer=hi(!1,1),void 0===h().buffer&&h()._buffer.slice()),h()._buffer}function v(n){return void 0!==h().buffer&&n!==!0||(h().buffer=hi(!0,y(),!0)),h().buffer}function bt(n,t,i){var r;if(n===!0)nt(),n=0,t=i.length;else for(r=n;r<t;r++)delete h().validPositions[r];for(r=n;r<t;r++)nt(!0),i[r]!==f.skipOptionalPartCharacter&&et(r,i[r],!0,!0)}function di(n,i,r){switch(f.casing||i.casing){case"upper":n=n.toUpperCase();break;case"lower":n=n.toLowerCase();break;case"title":var u=h().validPositions[r-1];n=0===r||u&&u.input===String.fromCharCode(t.keyCode.SPACE)?n.toUpperCase():n.toLowerCase()}return n}function ni(t,i){for(var e=f.greedy?i:i.slice(0,1),u=!1,r=0;r<t.length;r++)if(n.inArray(t[r],e)!==-1){u=!0;break}return u}function et(i,r,u,e,o){function k(n){return p?n.begin-n.end>1||n.begin-n.end==1&&f.insertMode:n.end-n.begin>1||n.end-n.begin==1&&f.insertMode}function d(t,r,u){var o=!1;return n.each(tt(t),function(s,c){for(var p,a,g,w,l=c.match,tt=r?1:0,b="",d=l.cardinality;d>tt;d--)b+=gi(t-(d-1));if(r&&(b+=r),v(!0),o=null!=l.fn?l.fn.test(b,h(),t,u,f,k(i)):(r===l.def||r===f.skipOptionalPartCharacter)&&""!==l.def&&{c:l.placeholder||l.def,pos:t},o!==!1){if(p=void 0!==o.c?o.c:r,p=p===f.skipOptionalPartCharacter&&null===l.fn?l.placeholder||l.def:p,a=t,g=v(),void 0!==o.remove&&(n.isArray(o.remove)||(o.remove=[o.remove]),n.each(o.remove.sort(function(n,t){return t-n}),function(n,t){ci(t,t+1,!0)})),void 0!==o.insert&&(n.isArray(o.insert)||(o.insert=[o.insert]),n.each(o.insert.sort(function(n,t){return n-t}),function(n,t){et(t.pos,t.c,!1,e)})),o.refreshFromBuffer){if(w=o.refreshFromBuffer,u=!0,bt(w===!0?w:w.start,w.end,g),void 0===o.pos&&void 0===o.c)return o.pos=y(),!1;if(a=void 0!==o.pos?o.pos:t,a!==t)return o=n.extend(o,et(a,p,!0,e)),!1}else if(o!==!0&&void 0!==o.pos&&o.pos!==t&&(a=o.pos,bt(t,a,v().slice()),a!==t))return o=n.extend(o,et(a,p,!0)),!1;return(o===!0||void 0!==o.pos||void 0!==o.c)&&(s>0&&nt(!0),ut(a,n.extend({},c,{input:di(p,l,a)}),e,k(i))||(o=!1),!1)}}),o}function ht(t,i,r){for(var d,c,l,o,s,v,u,it=n.extend(!0,{},h().validPositions),p=!1,w=y(),b,k,g,a=h().validPositions[w];w>=0;w--)if(l=h().validPositions[w],l&&void 0!==l.alternation){if(d=w,c=h().validPositions[d].alternation,a.locator[l.alternation]!==l.locator[l.alternation])break;a=l}return void 0!==c&&(u=parseInt(d),b=void 0!==a.locator[a.alternation||c]?a.locator[a.alternation||c]:v[0],b.length>0&&(b=b.split(",")[0]),k=h().validPositions[u],g=h().validPositions[u-1],n.each(tt(u,g?g.locator:void 0,u-1),function(l,a){var w,ot,rt,ut;for(v=a.locator[c]?a.locator[c].toString().split(","):[],w=0;w<v.length;w++){var d=[],tt=0,g=0,ft=!1;if(b<v[w]&&(void 0===a.na||n.inArray(v[w],a.na.split(","))===-1)){for(h().validPositions[u]=n.extend(!0,{},a),ot=h().validPositions[u].locator,h().validPositions[u].locator[c]=parseInt(v[w]),null==a.match.fn?(k.input!==a.match.def&&(ft=!0,k.generatedInput!==!0&&d.push(k.input)),g++,h().validPositions[u].generatedInput=!/[0-9a-bA-Z]/.test(a.match.def),h().validPositions[u].input=a.match.def):h().validPositions[u].input=k.input,o=u+1;o<y(void 0,!0)+1;o++)s=h().validPositions[o],s&&s.generatedInput!==!0&&/[0-9a-bA-Z]/.test(s.input)?d.push(s.input):o<t&&tt++,delete h().validPositions[o];for(ft&&d[0]===a.match.def&&d.shift(),nt(!0),p=!0;d.length>0;)if(rt=d.shift(),rt!==f.skipOptionalPartCharacter&&!(p=et(y(void 0,!0)+1,rt,!1,e,!0)))break;if(p){for(h().validPositions[u].locator=ot,ut=y(t)+1,o=u+1;o<y()+1;o++)s=h().validPositions[o],(void 0===s||null==s.match.fn)&&o<t+(g-tt)&&g++;t+=g-tt;p=et(t>ut?ut:t,i,r,e,!0)}if(p)return!1;nt();h().validPositions=n.extend(!0,{},it)}}})),p}function lt(t,i){for(var s=h().validPositions[i],f=s.locator,c=f.length,r=t;r<i;r++)if(void 0===h().validPositions[r]&&!g(r,!0)){var e=tt(r),u=e[0],o=-1;n.each(e,function(n,t){for(var i=0;i<c&&void 0!==t.locator[i]&&ni(t.locator[i].toString().split(","),f[i].toString().split(","));i++)o<i&&(o=i,u=t)});ut(r,n.extend({},u,{input:u.match.placeholder||u.match.def}),!0)}}function ut(t,i,r,u){var o,c,p,s,e,v;if(u||f.insertMode&&void 0!==h().validPositions[t]&&void 0===r){for(c=n.extend(!0,{},h().validPositions),p=y(),o=t;o<=p;o++)delete h().validPositions[o];h().validPositions[t]=n.extend(!0,{},i);var a,l=!0,w=h().validPositions,b=!1,k=h().maskLength;for(o=a=t;o<=p;o++){if(s=c[o],void 0!==s)for(e=a;e<h().maskLength&&(null==s.match.fn&&w[o]&&(w[o].match.optionalQuantifier===!0||w[o].match.optionality===!0)||null!=s.match.fn);)if((e++,b===!1&&c[e]&&c[e].match.def===s.match.def)?(h().validPositions[e]=n.extend(!0,{},c[e]),h().validPositions[e].input=s.input,ft(e),a=e,l=!0):li(e,s.match.def)?(v=et(e,s.input,!0,!0),l=v!==!1,a=v.caret||v.insert?y():e,b=!0):l=s.generatedInput===!0,h().maskLength<k&&(h().maskLength=k),l)break;if(!l)break}if(!l)return h().validPositions=n.extend(!0,{},c),nt(!0),!1}else h().validPositions[t]=n.extend(!0,{},i);return nt(!0),!0}function ft(t){for(var r,u,i=t-1;i>-1&&!h().validPositions[i];i--);for(i++;i<t;i++)void 0===h().validPositions[i]&&(f.jitMasking===!1||f.jitMasking>i)&&(u=tt(i,ct(i-1).locator,i-1).slice(),""===u[u.length-1].match.def&&u.pop(),r=vt(u),r&&(r.match.def===f.radixPointDefinitionSymbol||!g(i,!0)||n.inArray(f.radixPoint,v())<i&&r.match.fn&&r.match.fn.test(rt(i),h(),i,!1,f))&&(s=d(i,r.match.placeholder||(null==r.match.fn?r.match.def:""!==rt(i)?rt(i):v()[i]),!0),s!==!1&&(h().validPositions[s.pos||i].generatedInput=!0)))}var c,s,ot,it,b,l,a,st;if(u=u===!0,c=i,void 0!==i.begin&&(c=p&&!k(i)?i.end:i.begin),s=!1,ot=n.extend(!0,{},h().validPositions),ft(c),k(i)&&(ii(void 0,t.keyCode.DELETE,i),c=h().p),c<h().maskLength&&(s=d(c,r,u),(!u||e===!0)&&s===!1))if(it=h().validPositions[c],it&&null===it.match.fn&&(it.match.def===r||r===f.skipOptionalPartCharacter))s={caret:w(c)};else if((f.insertMode||void 0===h().validPositions[w(c)])&&!g(c,!0))for(b=tt(c).slice(),""===b[b.length-1].match.def&&b.pop(),l=vt(b,!0),l&&(l=l.match.placeholder||l.match.def,d(c,l,u),h().validPositions[c].generatedInput=!0),a=c+1,st=w(c);a<=st;a++)if(s=d(a,r,u),s!==!1){lt(c,a);c=a;break}return s===!1&&f.keepStatic&&!u&&o!==!0&&(s=ht(c,r,u)),s===!0&&(s={pos:c}),n.isFunction(f.postValidation)&&s!==!1&&!u&&e!==!0&&(s=!!f.postValidation(v(!0),s,f)&&s),void 0===s.pos&&(s.pos=c),s===!1&&(nt(!0),h().validPositions=n.extend(!0,{},ot)),s}function g(n,t){var i,r;return(t?(i=ct(n).match,""===i.def&&(i=ot(n).match)):i=ot(n).match,null!=i.fn)?i.fn:t!==!0&&n>-1?(r=tt(n),r.length>1+(""===r[r.length-1].match.def?1:0)):!1}function w(n,t){var r=h().maskLength,i;if(n>=r)return r;for(i=n;++i<r&&(t===!0&&(ot(i).match.newBlockMarker!==!0||!g(i))||t!==!0&&!g(i)););return i}function at(n,t){var r,i=n;if(i<=0)return 0;for(;--i>0&&(t===!0&&ot(i).match.newBlockMarker!==!0||t!==!0&&!g(i)&&(r=tt(i),r.length<2||2===r.length&&""===r[1].match.def)););return i}function gi(n){return void 0===h().validPositions[n]?rt(n):h().validPositions[n].input}function ut(t,i,r,u,e){var o,s;u&&n.isFunction(f.onBeforeWrite)&&(o=f.onBeforeWrite(u,i,r,f),o&&(o.refreshFromBuffer&&(s=o.refreshFromBuffer,bt(s===!0?s:s.start,s.end,o.buffer||i),i=v(!0)),void 0!==r&&(r=void 0!==o.caret?o.caret:r)));t.inputmask._valueSet(i.join(""));void 0===r||void 0!==u&&"blur"===u.type||b(t,r);e===!0&&(dt=!0,n(t).trigger("input"))}function rt(n,t){var e,i,u,r;if(t=t||ot(n).match,void 0!==t.placeholder)return t.placeholder;if(null===t.fn){if(n>-1&&void 0===h().validPositions[n]&&(i=tt(n),u=[],i.length>1+(""===i[i.length-1].match.def?1:0)))for(r=0;r<i.length;r++)if(i[r].match.optionality!==!0&&i[r].match.optionalQuantifier!==!0&&(null===i[r].match.fn||void 0===e||i[r].match.fn.test(e.match.def,h(),n,!0,f)!==!1)&&(u.push(i[r]),null===i[r].match.fn&&(e=i[r]),u.length>1&&/[0-9a-bA-Z]/.test(u[0].match.def)))return f.placeholder.charAt(n%f.placeholder.length);return t.def}return f.placeholder.charAt(n%f.placeholder.length)}function st(i,r,u,e,o,s){function ft(){var t=!1,r=d().slice(l,w(l)).join("").indexOf(tt),i,n;if(r!==-1&&!g(l))for(t=!0,i=d().slice(l,l+r),n=0;n<i.length;n++)if(" "!==i[n]){t=!1;break}return t}var k=e.slice(),tt="",l=0,c=void 0,it,p,a,rt;(nt(),h().p=w(-1),u)||(f.autoUnmask!==!0?(it=d().slice(0,w(-1)).join(""),p=k.join("").match(new RegExp("^"+t.escapeRegex(it),"g")),p&&p.length>0&&(k.splice(0,p.length*it.length),l=w(l))):l=w(l));(n.each(k,function(t,r){var o,a,s;if(void 0!==r){o=new n.Event("keypress");o.which=r.charCodeAt(0);tt+=r;var e=y(void 0,!0),p=h().validPositions[e],w=ct(e+1,p?p.locator.slice():void 0,e);!ft()||u||f.autoUnmask?(a=u?t:null==w.match.fn&&w.match.optionality&&e+1<h().p?e+1:h().p,c=pt.call(i,o,!0,!1,u,a),l=a+1,tt=""):c=pt.call(i,o,!0,!1,!0,e+1);!u&&n.isFunction(f.onBeforeWrite)&&(c=f.onBeforeWrite(o,v(),c.forwardPosition,f),c&&c.refreshFromBuffer)&&(s=c.refreshFromBuffer,bt(s===!0?s:s.start,s.end,c.buffer),nt(!0),c.caret&&(h().p=c.caret))}}),r)&&(a=void 0,rt=y(),document.activeElement===i&&(o||c)&&(a=b(i).begin-(s===!0?1:0),c&&s!==!0&&(a<rt+1||rt===-1)&&(a=f.numericInput&&void 0===c.caret?at(c.forwardPosition):c.forwardPosition)),ut(i,v(),a,o||new n.Event("checkval")))}function ai(t){var i,r,e,u,o;if(t&&void 0===t.inputmask)return t.value;i=[];r=h().validPositions;for(e in r)r[e].match&&null!=r[e].match.fn&&i.push(r[e].input);return u=0===i.length?"":(p?i.reverse():i).join(""),n.isFunction(f.onUnMask)&&(o=(p?v().slice().reverse():v()).join(""),u=f.onUnMask(o,u,f)||u),u}function b(n,t,i,r){function e(n){if(r!==!0&&p&&"number"==typeof n&&(!f.greedy||""!==f.placeholder)){var t=v().join("").length;n=t-n}return n}var u,o,h,s;if("number"!=typeof t)return n.setSelectionRange?(t=n.selectionStart,i=n.selectionEnd):window.getSelection?(u=window.getSelection().getRangeAt(0),u.commonAncestorContainer.parentNode!==n&&u.commonAncestorContainer!==n||(t=u.startOffset,i=u.endOffset)):document.selection&&document.selection.createRange&&(u=document.selection.createRange(),t=0-u.duplicate().moveStart("character",-n.inputmask._valueGet().length),i=t+u.text.length),{begin:e(t),end:e(i)};t=e(t);i=e(i);i="number"==typeof i?i:t;o=parseInt(((n.ownerDocument.defaultView||window).getComputedStyle?(n.ownerDocument.defaultView||window).getComputedStyle(n,null):n.currentStyle).fontSize)*i;(n.scrollLeft=o>n.scrollWidth?o:0,c||f.insertMode!==!1||t!==i||i++,n.setSelectionRange)?(n.selectionStart=t,n.selectionEnd=i):window.getSelection?((u=document.createRange(),void 0===n.firstChild||null===n.firstChild)&&(h=document.createTextNode(""),n.appendChild(h)),u.setStart(n.firstChild,t<n.inputmask._valueGet().length?t:n.inputmask._valueGet().length),u.setEnd(n.firstChild,i<n.inputmask._valueGet().length?i:n.inputmask._valueGet().length),u.collapse(!0),s=window.getSelection(),s.removeAllRanges(),s.addRange(u)):n.createTextRange&&(u=n.createTextRange(),u.collapse(!0),u.moveEnd("character",i),u.moveStart("character",t),u.select())}function ti(t){for(var r,s=v(),f=s.length,c=y(),e={},u=h().validPositions[c],l=void 0!==u?u.locator.slice():void 0,o,i=c+1;i<s.length;i++)r=ct(i,l,i-1),l=r.locator.slice(),e[i]=n.extend(!0,{},r);for(o=u&&void 0!==u.alternation?u.locator[u.alternation]:void 0,i=f-1;i>c&&(r=e[i],(r.match.optionality||r.match.optionalQuantifier||o&&(o!==e[i].locator[u.alternation]&&null!=r.match.fn||null===r.match.fn&&r.locator[u.alternation]&&ni(r.locator[u.alternation].toString().split(","),o.toString().split(","))&&""!==tt(i)[0].def))&&s[i]===rt(i,r.match));i--)f--;return t?{l:f,def:e[f]?e[f].match:void 0}:f}function yt(n){for(var i=ti(),t=n.length-1;t>i&&!g(t);t--);return n.splice(i,t+1-i),n}function ht(t){var i,r;if(n.isFunction(f.isComplete))return f.isComplete(t,f);if("*"!==f.repeat){var e=!1,u=ti(!0),o=at(u.l);if(void 0===u.def||u.def.newBlockMarker||u.def.optionality||u.def.optionalQuantifier)for(e=!0,i=0;i<=o;i++)if(r=ct(i).match,null!==r.fn&&void 0===h().validPositions[i]&&r.optionality!==!0&&r.optionalQuantifier!==!0||null===r.fn&&t[i]!==rt(i,r)){e=!1;break}return e}}function nr(t){function s(t){if(n.valHooks&&(void 0===n.valHooks[t]||n.valHooks[t].inputmaskpatch!==!0)){var i=n.valHooks[t]&&n.valHooks[t].get?n.valHooks[t].get:function(n){return n.value},r=n.valHooks[t]&&n.valHooks[t].set?n.valHooks[t].set:function(n,t){return n.value=t,n};n.valHooks[t]={get:function(n){if(n.inputmask){if(n.inputmask.opts.autoUnmask)return n.inputmask.unmaskedvalue();var t=i(n);return y(void 0,void 0,n.inputmask.maskset.validPositions)!==-1||f.nullable!==!0?t:""}return i(n)},set:function(t,i){var u,f=n(t);return u=r(t,i),t.inputmask&&f.trigger("setvalue"),u},inputmaskpatch:!0}}}function e(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():y()!==-1||f.nullable!==!0?document.activeElement===this&&f.clearMaskOnLostFocus?(p?yt(v().slice()).reverse():yt(v().slice())).join(""):i.call(this):"":i.call(this)}function o(t){r.call(this,t);this.inputmask&&n(this).trigger("setvalue")}function h(t){k.on(t,"mouseenter",function(){var t=n(this),i=this,r=i.inputmask._valueGet();r!==v().join("")&&t.trigger("setvalue")})}var i,r,u;t.inputmask.__valueGet||(Object.getOwnPropertyDescriptor?("function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"==typeof"test".__proto__?function(n){return n.__proto__}:function(n){return n.constructor.prototype}),u=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value"):void 0,u&&u.get&&u.set?(i=u.get,r=u.set,Object.defineProperty(t,"value",{get:e,set:o,configurable:!0})):"INPUT"!==t.tagName&&(i=function(){return this.textContent},r=function(n){this.textContent=n},Object.defineProperty(t,"value",{get:e,set:o,configurable:!0}))):document.__lookupGetter__&&t.__lookupGetter__("value")&&(i=t.__lookupGetter__("value"),r=t.__lookupSetter__("value"),t.__defineGetter__("value",e),t.__defineSetter__("value",o)),t.inputmask.__valueGet=i,t.inputmask._valueGet=function(n){return p&&n!==!0?i.call(this.el).split("").reverse().join(""):i.call(this.el)},t.inputmask.__valueSet=r,t.inputmask._valueSet=function(n,t){r.call(this.el,null===n||void 0===n?"":t!==!0&&p?n.split("").reverse().join(""):n)},void 0===i&&(i=function(){return this.value},r=function(n){this.value=n},s(t.type),h(t)))}function ii(i,r,u,e){function c(){var t,e;if(f.keepStatic){for(var u=[],r=y(-1,!0),s=n.extend(!0,{},h().validPositions),o=h().validPositions[r];r>=0;r--)if(t=h().validPositions[r],t){if(t.generatedInput!==!0&&/[0-9a-bA-Z]/.test(t.input)&&u.push(t.input),delete h().validPositions[r],void 0!==t.alternation&&t.locator[t.alternation]!==o.locator[t.alternation])break;o=t}if(r>-1)for(h().p=w(y(-1,!0));u.length>0;)e=new n.Event("keypress"),e.which=u.pop().charCodeAt(0),pt.call(i,e,!0,!1,!1,h().p);else h().validPositions=n.extend(!0,{},s)}}var s,o;(f.numericInput||p)&&(r===t.keyCode.BACKSPACE?r=t.keyCode.DELETE:r===t.keyCode.DELETE&&(r=t.keyCode.BACKSPACE),p)&&(s=u.end,u.end=u.begin,u.begin=s);r===t.keyCode.BACKSPACE&&(u.end-u.begin<1||f.insertMode===!1)?(u.begin=at(u.begin),void 0===h().validPositions[u.begin]||h().validPositions[u.begin].input!==f.groupSeparator&&h().validPositions[u.begin].input!==f.radixPoint||u.begin--):r===t.keyCode.DELETE&&u.begin===u.end&&(u.end=g(u.end,!0)?u.end+1:w(u.end)+1,void 0===h().validPositions[u.begin]||h().validPositions[u.begin].input!==f.groupSeparator&&h().validPositions[u.begin].input!==f.radixPoint||u.end++);ci(u.begin,u.end,!1,e);e!==!0&&c();o=y(u.begin,!0);o<u.begin?h().p=w(o):e!==!0&&(h().p=u.begin)}function vi(i){var u=this,c=n(u),e=i.keyCode,r=b(u),s;e===t.keyCode.BACKSPACE||e===t.keyCode.DELETE||l&&e===t.keyCode.BACKSPACE_SAFARI||i.ctrlKey&&e===t.keyCode.X&&!o("cut")?(i.preventDefault(),ii(u,e,r),ut(u,v(!0),h().p,i,u.inputmask._valueGet()!==v().join("")),u.inputmask._valueGet()===d().join("")?c.trigger("cleared"):ht(v())===!0&&c.trigger("complete"),f.showTooltip&&(u.title=f.tooltip||h().mask)):e===t.keyCode.END||e===t.keyCode.PAGE_DOWN?(i.preventDefault(),s=w(y()),f.insertMode||s!==h().maskLength||i.shiftKey||s--,b(u,i.shiftKey?r.begin:s,s,!0)):e===t.keyCode.HOME&&!i.shiftKey||e===t.keyCode.PAGE_UP?(i.preventDefault(),b(u,0,i.shiftKey?r.begin:0,!0)):(f.undoOnEscape&&e===t.keyCode.ESCAPE||90===e&&i.ctrlKey)&&i.altKey!==!0?(st(u,!0,!1,ft.split("")),c.trigger("click")):e!==t.keyCode.INSERT||i.shiftKey||i.ctrlKey?f.tabThrough===!0&&e===t.keyCode.TAB?(i.shiftKey===!0?(null===ot(r.begin).match.fn&&(r.begin=w(r.begin)),r.end=at(r.begin,!0),r.begin=at(r.end,!0)):(r.begin=w(r.begin,!0),r.end=w(r.begin,!0),r.end<h().maskLength&&r.end--),r.begin<h().maskLength&&(i.preventDefault(),b(u,r.begin,r.end))):f.insertMode!==!1||i.shiftKey||(e===t.keyCode.RIGHT?setTimeout(function(){var n=b(u);b(u,n.begin)},0):e===t.keyCode.LEFT&&setTimeout(function(){var n=b(u);b(u,p?n.begin+1:n.begin-1)},0)):(f.insertMode=!f.insertMode,b(u,f.insertMode||r.begin!==h().maskLength?r.begin:r.begin-1));f.onKeyDown.call(this,i,v(),b(u).begin,f);pi=n.inArray(e,f.ignorables)!==-1}function pt(i,r,u,e,o){var a=this,p=n(a),c=i.which||i.charCode||i.keyCode,l,k,d,s,g,y;return!(r===!0||i.ctrlKey&&i.altKey)&&(i.ctrlKey||i.metaKey||pi)?(c===t.keyCode.ENTER&&ft!==v().join("")&&(ft=v().join(""),setTimeout(function(){p.trigger("change")},0)),!0):c&&(46===c&&i.shiftKey===!1&&","===f.radixPoint&&(c=44),k=r?{begin:o,end:o}:b(a),d=String.fromCharCode(c),h().writeOutBuffer=!0,s=et(k,d,e),(s!==!1&&(nt(!0),l=void 0!==s.caret?s.caret:r?s.pos+1:w(s.pos),h().p=l),u!==!1)&&(g=this,(setTimeout(function(){f.onKeyValidation.call(g,c,s,f)},0),h().writeOutBuffer&&s!==!1)&&(y=v(),ut(a,y,f.numericInput&&void 0===s.caret?at(l):l,i,r!==!0),r!==!0&&setTimeout(function(){ht(y)===!0&&p.trigger("complete")},0))),f.showTooltip&&(a.title=f.tooltip||h().mask),i.preventDefault(),r)?(s.forwardPosition=l,s):void 0}function ri(t){var h,s=this,c=t.originalEvent||t,l=n(s),i=s.inputmask._valueGet(!0),r=b(s),u,e,o;if(p&&(h=r.end,r.end=r.begin,r.begin=h),u=i.substr(0,r.begin),e=i.substr(r.end,i.length),u===(p?d().reverse():d()).slice(0,r.begin).join("")&&(u=""),e===(p?d().reverse():d()).slice(r.end).join("")&&(e=""),p&&(h=u,u=e,e=h),window.clipboardData&&window.clipboardData.getData)i=u+window.clipboardData.getData("Text")+e;else{if(!c.clipboardData||!c.clipboardData.getData)return!0;i=u+c.clipboardData.getData("text/plain")+e}if(o=i,n.isFunction(f.onBeforePaste)){if(o=f.onBeforePaste(i,f),o===!1)return t.preventDefault();o||(o=i)}return st(s,!1,!1,p?o.split("").reverse():o.toString().split("")),ut(s,v(),w(y()),t,ft!==v().join("")),ht(v())===!0&&l.trigger("complete"),t.preventDefault()}function tr(i){var f=this,r=f.inputmask._valueGet(),u,s,c,l,o;if(v().join("")!==r){if(u=b(f),(r=r.replace(new RegExp("("+t.escapeRegex(d().join(""))+")*"),""),e)&&(s=r.replace(v().join(""),""),1===s.length))return c=new n.Event("keypress"),c.which=s.charCodeAt(0),pt.call(f,c,!0,!0,!1,h().validPositions[u.begin-1]?u.begin:u.begin-1),!1;if(u.begin>r.length&&(b(f,r.length),u=b(f)),v().length-r.length!=1||r.charAt(u.begin)===v()[u.begin]||r.charAt(u.begin+1)===v()[u.begin]||g(u.begin)){for(l=y()+1,o=v().slice(l).join("");null===r.match(t.escapeRegex(o)+"$");)o=o.slice(1);r=r.replace(o,"");r=r.split("");st(f,!0,!1,r,i,u.begin<l);ht(v())===!0&&n(f).trigger("complete")}else i.keyCode=t.keyCode.BACKSPACE,vi.call(f,i);i.preventDefault()}}function ir(){var t=this,i=t.inputmask._valueGet();st(t,!0,!1,(n.isFunction(f.onBeforeMask)?f.onBeforeMask(i,f)||i:i).split(""));ft=v().join("");(f.clearMaskOnLostFocus||f.clearIncomplete)&&t.inputmask._valueGet()===d().join("")&&t.inputmask._valueSet("")}function rr(n){var t=this,i=t.inputmask._valueGet();f.showMaskOnFocus&&(!f.showMaskOnHover||f.showMaskOnHover&&""===i)?t.inputmask._valueGet()!==v().join("")&&ut(t,v(),w(y())):fi===!1&&b(t,w(y()));f.positionCaretOnTab===!0&&setTimeout(function(){yi.apply(this,[n])},0);ft=v().join("")}function ur(){var n=this,t,i;(fi=!1,f.clearMaskOnLostFocus&&document.activeElement!==n)&&(t=v().slice(),i=n.inputmask._valueGet(),i!==n.getAttribute("placeholder")&&""!==i&&(y()===-1&&i===d().join("")?t=[]:yt(t),ut(n,t)))}function yi(){function i(t){var i,u,r;if(""!==f.radixPoint&&(i=h().validPositions,void 0===i[t]||i[t].input===rt(t))){if(t<w(-1))return!0;if(u=n.inArray(f.radixPoint,v()),u!==-1){for(r in i)if(u<r&&i[r].input!==rt(r))return!1;return!0}}return!1}var t=this;setTimeout(function(){var e,s,o;if(document.activeElement===t&&(e=b(t),e.begin===e.end))switch(f.positionCaretOnClick){case"none":break;case"radixFocus":if(i(e.begin)){s=n.inArray(f.radixPoint,v().join(""));b(t,f.numericInput?w(s):s);break}default:var u=e.begin,h=y(u,!0),r=w(h);u<r?b(t,g(u)||g(u-1)?u:w(u)):(o=rt(r),(""===o||v()[r]===o||ot(r).match.optionalQuantifier===!0)&&(g(r,!0)||ot(r).match.def!==o)||(r=w(r)),b(t,r))}},0)}function fr(){var n=this;setTimeout(function(){b(n,0,w(y()))},0)}function er(i){var r=this,o=n(r),u=b(r),s=i.originalEvent||i,c=window.clipboardData||s.clipboardData,e=p?v().slice(u.end,u.begin):v().slice(u.begin,u.end);c.setData("text",p?e.reverse().join(""):e.join(""));document.execCommand&&document.execCommand("copy");ii(r,t.keyCode.DELETE,u);ut(r,v(),h().p,i,ft!==v().join(""));r.inputmask._valueGet()===d().join("")&&o.trigger("cleared");f.showTooltip&&(r.title=f.tooltip||h().mask)}function or(t){var e=n(this),r=this,u,i;r.inputmask&&(u=r.inputmask._valueGet(),i=v().slice(),ft!==i.join("")&&setTimeout(function(){e.trigger("change");ft=i.join("")},0),""!==u&&(f.clearMaskOnLostFocus&&(y()===-1&&u===d().join("")?i=[]:yt(i)),ht(i)===!1&&(setTimeout(function(){e.trigger("incomplete")},0),f.clearIncomplete&&(nt(),i=f.clearMaskOnLostFocus?[]:d().slice())),ut(r,i,void 0,t)))}function sr(){var n=this;fi=!0;document.activeElement!==n&&f.showMaskOnHover&&n.inputmask._valueGet()!==v().join("")&&ut(n,v())}function hr(){ft!==v().join("")&&kt.trigger("change");f.clearMaskOnLostFocus&&y()===-1&&a.inputmask._valueGet&&a.inputmask._valueGet()===d().join("")&&a.inputmask._valueSet("");f.removeMaskOnSubmit&&(a.inputmask._valueSet(a.inputmask.unmaskedvalue(),!0),setTimeout(function(){ut(a,v())},0))}function cr(){setTimeout(function(){kt.trigger("setvalue")},0)}function lr(t){var r,i;(a=t,kt=n(a),f.showTooltip&&(a.title=f.tooltip||h().mask),("rtl"===a.dir||f.rightAlign)&&(a.style.textAlign="right"),("rtl"===a.dir||f.numericInput)&&(a.dir="ltr",a.removeAttribute("dir"),a.inputmask.isRTL=!0,p=!0),k.off(a),nr(a),s(a,f)&&(k.on(a,"submit",hr),k.on(a,"reset",cr),k.on(a,"mouseenter",sr),k.on(a,"blur",or),k.on(a,"focus",rr),k.on(a,"mouseleave",ur),k.on(a,"click",yi),k.on(a,"dblclick",fr),k.on(a,"paste",ri),k.on(a,"dragdrop",ri),k.on(a,"drop",ri),k.on(a,"cut",er),k.on(a,"complete",f.oncomplete),k.on(a,"incomplete",f.onincomplete),k.on(a,"cleared",f.oncleared),f.inputEventOnly!==!0&&(k.on(a,"keydown",vi),k.on(a,"keypress",pt)),k.on(a,"input",tr)),k.on(a,"setvalue",ir),d(),""!==a.inputmask._valueGet()||f.clearMaskOnLostFocus===!1||document.activeElement===a)&&(r=n.isFunction(f.onBeforeMask)?f.onBeforeMask(a.inputmask._valueGet(),f)||a.inputmask._valueGet():a.inputmask._valueGet(),st(a,!0,!1,r.split("")),i=v().slice(),ft=i.join(""),ht(i)===!1&&f.clearIncomplete&&nt(),f.clearMaskOnLostFocus&&document.activeElement!==a&&(y()===-1?i=[]:yt(i)),ut(a,i),document.activeElement===a&&b(a,w(y())))}var ft,a,kt,wt,it,p=!1,ui=!1,dt=!1,pi=!1,fi=!0,k={on:function(i,r,u){var o=function(i){var r,s,o;if(void 0===this.inputmask&&"FORM"!==this.nodeName)r=n.data(this,"_inputmask_opts"),r?new t(r).mask(this):k.off(this);else{if("setvalue"===i.type||!(this.disabled||this.readOnly&&!("keydown"===i.type&&i.ctrlKey&&67===i.keyCode||f.tabThrough===!1&&i.keyCode===t.keyCode.TAB))){switch(i.type){case"input":if(dt===!0)return dt=!1,i.preventDefault();break;case"keydown":ui=!1;dt=!1;break;case"keypress":if(ui===!0)return i.preventDefault();ui=!0;break;case"click":if(e)return s=this,setTimeout(function(){u.apply(s,arguments)},0),!1}return o=u.apply(this,arguments),o===!1&&(i.preventDefault(),i.stopPropagation()),o}i.preventDefault()}};i.inputmask.events[r]=i.inputmask.events[r]||[];i.inputmask.events[r].push(o);n.inArray(r,["submit","reset"])!==-1?null!=i.form&&n(i.form).on(r,o):n(i).on(r,o)},off:function(t,i){if(t.inputmask&&t.inputmask.events){var r;i?(r=[],r[i]=t.inputmask.events[i]):r=t.inputmask.events;n.each(r,function(i,r){for(;r.length>0;){var u=r.pop();n.inArray(i,["submit","reset"])!==-1?null!=t.form&&n(t.form).off(i,u):n(t).off(i,u)}delete t.inputmask.events[i]})}}},wi,si,bi,lt;if(void 0!==r)switch(r.action){case"isComplete":return a=r.el,ht(v());case"unmaskedvalue":return a=r.el,void 0!==a&&void 0!==a.inputmask?(u=a.inputmask.maskset,f=a.inputmask.opts,p=a.inputmask.isRTL):(it=r.value,f.numericInput&&(p=!0),it=(n.isFunction(f.onBeforeMask)?f.onBeforeMask(it,f)||it:it).split(""),st(void 0,!1,!1,p?it.reverse():it),n.isFunction(f.onBeforeWrite)&&f.onBeforeWrite(void 0,v(),0,f)),ai(a);case"mask":a=r.el;u=a.inputmask.maskset;f=a.inputmask.opts;p=a.inputmask.isRTL;lr(a);break;case"format":return f.numericInput&&(p=!0),it=(n.isFunction(f.onBeforeMask)?f.onBeforeMask(r.value,f)||r.value:r.value).split(""),st(void 0,!1,!1,p?it.reverse():it),n.isFunction(f.onBeforeWrite)&&f.onBeforeWrite(void 0,v(),0,f),r.metadata?{value:p?v().slice().reverse().join(""):v().join(""),metadata:i({action:"getmetadata"},u,f)}:p?v().slice().reverse().join(""):v().join("");case"isValid":f.numericInput&&(p=!0);r.value?(it=r.value.split(""),st(void 0,!1,!0,p?it.reverse():it)):r.value=v().join("");for(var ei=v(),oi=ti(),gt=ei.length-1;gt>oi&&!g(gt);gt--);return ei.splice(oi,gt+1-oi),ht(ei)&&r.value===v().join("");case"getemptymask":return d().join("");case"remove":a=r.el;kt=n(a);u=a.inputmask.maskset;f=a.inputmask.opts;a.inputmask._valueSet(ai(a));k.off(a);Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?(wi=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(a),"value"),wi&&a.inputmask.__valueGet&&Object.defineProperty(a,"value",{get:a.inputmask.__valueGet,set:a.inputmask.__valueSet,configurable:!0})):document.__lookupGetter__&&a.__lookupGetter__("value")&&a.inputmask.__valueGet&&(a.__defineGetter__("value",a.inputmask.__valueGet),a.__defineSetter__("value",a.inputmask.__valueSet));a.inputmask=void 0;break;case"getmetadata":if(n.isArray(u.metadata)){for(bi=y(void 0,!0),lt=bi;lt>=0;lt--)if(h().validPositions[lt]&&void 0!==h().validPositions[lt].alternation){si=h().validPositions[lt].alternation;break}return void 0!==si?u.metadata[h().validPositions[lt].locator[si]]:[]}return u.metadata}}t.prototype={defaults:{placeholder:"_",optionalmarker:{start:"[",end:"]"},quantifiermarker:{start:"{",end:"}"},groupmarker:{start:"(",end:")"},alternatormarker:"|",escapeChar:"\\",mask:null,oncomplete:n.noop,onincomplete:n.noop,oncleared:n.noop,repeat:0,greedy:!0,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,aliases:{},alias:null,onKeyDown:n.noop,onBeforeMask:null,onBeforePaste:function(t,i){return n.isFunction(i.onBeforeMask)?i.onBeforeMask(t,i):t},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:n.noop,skipOptionalPartCharacter:" ",showTooltip:!1,tooltip:void 0,numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",radixPointDefinitionSymbol:void 0,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","password"],definitions:{"9":{validator:"[0-9]",cardinality:1,definitionSymbol:"*"},"8":{validator:"[1-9]",cardinality:1,definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,definitionSymbol:"*"},"*":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",cardinality:1}},ignorables:[8,9,13,19,27,33,34,35,36,37,38,39,40,45,46,93,112,113,114,115,116,117,118,119,120,121,122,123],isComplete:null,canClearPosition:n.noop,postValidation:null,staticDefinitionSymbol:void 0,jitMasking:!1,nullable:!0,inputEventOnly:!1,positionCaretOnClick:"lvp",casing:null},masksCache:{},mask:function(u){var f=this;return"string"==typeof u&&(u=document.getElementById(u)||document.querySelectorAll(u)),u=u.nodeName?[u]:u,n.each(u,function(u,e){var o=n.extend(!0,{},f.opts),s;h(e,o,n.extend(!0,{},f.userOptions));s=r(o,f.noMasksCache);void 0!==s&&(void 0!==e.inputmask&&e.inputmask.remove(),e.inputmask=new t,e.inputmask.opts=o,e.inputmask.noMasksCache=f.noMasksCache,e.inputmask.userOptions=n.extend(!0,{},f.userOptions),e.inputmask.el=e,e.inputmask.maskset=s,e.inputmask.isRTL=!1,n.data(e,"_inputmask_opts",o),i({action:"mask",el:e}))}),u&&u[0]?u[0].inputmask||this:this},option:function(t,i){return"string"==typeof t?this.opts[t]:"object"==typeof t?(n.extend(this.userOptions,t),this.el&&i!==!0&&this.mask(this.el),this):void 0},unmaskedvalue:function(n){return i({action:"unmaskedvalue",el:this.el,value:n},this.el&&this.el.inputmask?this.el.inputmask.maskset:r(this.opts,this.noMasksCache),this.opts)},remove:function(){if(this.el)return i({action:"remove",el:this.el}),this.el.inputmask=void 0,this.el},getemptymask:function(){return i({action:"getemptymask"},this.maskset||r(this.opts,this.noMasksCache),this.opts)},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return i({action:"isComplete",el:this.el},this.maskset||r(this.opts,this.noMasksCache),this.opts)},getmetadata:function(){return i({action:"getmetadata"},this.maskset||r(this.opts,this.noMasksCache),this.opts)},isValid:function(n){return i({action:"isValid",value:n},this.maskset||r(this.opts,this.noMasksCache),this.opts)},format:function(n,t){return i({action:"format",value:n,metadata:t},this.maskset||r(this.opts,this.noMasksCache),this.opts)}};t.extendDefaults=function(i){n.extend(!0,t.prototype.defaults,i)};t.extendDefinitions=function(i){n.extend(!0,t.prototype.defaults.definitions,i)};t.extendAliases=function(i){n.extend(!0,t.prototype.defaults.aliases,i)};t.format=function(n,i,r){return t(i).format(n,r)};t.unmask=function(n,i){return t(i).unmaskedvalue(n)};t.isValid=function(n,i){return t(i).isValid(n)};t.remove=function(t){n.each(t,function(n,t){t.inputmask&&t.inputmask.remove()})};t.escapeRegex=function(n){return n.replace(new RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^)","gim"),"\\$1")};t.keyCode={ALT:18,BACKSPACE:8,BACKSPACE_SAFARI:127,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91,X:88};var f=navigator.userAgent,c=/mobile/i.test(f),e=/iemobile/i.test(f),l=/iphone/i.test(f)&&!e;return window.Inputmask=t,t});!function(n){"function"==typeof define&&define.amd?define(["jquery","inputmask"],n):"object"==typeof exports?module.exports=n(require("jquery"),require("./inputmask")):n(jQuery,window.Inputmask)}(function(n,t){return void 0===n.fn.inputmask&&(n.fn.inputmask=function(i,r){var f,u=this[0];if(void 0===r&&(r={}),"string"==typeof i)switch(i){case"unmaskedvalue":return u&&u.inputmask?u.inputmask.unmaskedvalue():n(u).val();case"remove":return this.each(function(){this.inputmask&&this.inputmask.remove()});case"getemptymask":return u&&u.inputmask?u.inputmask.getemptymask():"";case"hasMaskedValue":return!(!u||!u.inputmask)&&u.inputmask.hasMaskedValue();case"isComplete":return!u||!u.inputmask||u.inputmask.isComplete();case"getmetadata":return u&&u.inputmask?u.inputmask.getmetadata():void 0;case"setvalue":n(u).val(r);u&&void 0===u.inputmask&&n(u).triggerHandler("setvalue");break;case"option":if("string"!=typeof r)return this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(r)});if(u&&void 0!==u.inputmask)return u.inputmask.option(r);break;default:return r.alias=i,f=new t(r),this.each(function(){f.mask(this)})}else{if("object"==typeof i)return f=new t(i),void 0===i.mask&&void 0===i.alias?this.each(function(){return void 0!==this.inputmask?this.inputmask.option(i):void f.mask(this)}):this.each(function(){f.mask(this)});if(void 0===i)return this.each(function(){f=new t(r);f.mask(this)})}}),n.fn.inputmask});!function(n){"function"==typeof define&&define.amd?define(["inputmask.dependencyLib","inputmask"],n):"object"==typeof exports?module.exports=n(require("./inputmask.dependencyLib.jquery"),require("./inputmask")):n(window.dependencyLib||jQuery,window.Inputmask)}(function(n,t){return t.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,casing:"upper"},"#":{validator:"[0-9A-Fa-f]",cardinality:1,casing:"upper"}}),t.extendAliases({url:{definitions:{i:{validator:".",cardinality:1}},mask:"(\\http://)|(\\http\\s://)|(ftp://)|(ftp\\s://)i{+}",insertMode:!1,autoUnmask:!1},ip:{mask:"i[i[i]].i[i[i]].i[i[i]].i[i[i]]",definitions:{i:{validator:function(n,t,i){return i-1>-1&&"."!==t.buffer[i-1]?(n=t.buffer[i-1]+n,n=i-2>-1&&"."!==t.buffer[i-2]?t.buffer[i-2]+n:"0"+n):n="00"+n,new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(n)},cardinality:1}},onUnMask:function(n){return n}},email:{mask:"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",greedy:!1,onBeforePaste:function(n){return n=n.toLowerCase(),n.replace("mailto:","")},definitions:{"*":{validator:"[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]",cardinality:1,casing:"lower"},"-":{validator:"[0-9A-Za-z-]",cardinality:1,casing:"lower"}},onUnMask:function(n){return n}},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",cardinality:1,casing:"upper"}},clearIncomplete:!0,autoUnmask:!0}}),t});!function(n){"function"==typeof define&&define.amd?define(["inputmask.dependencyLib","inputmask"],n):"object"==typeof exports?module.exports=n(require("./inputmask.dependencyLib.jquery"),require("./inputmask")):n(window.dependencyLib||jQuery,window.Inputmask)}(function(n,t){return t.extendAliases({Regex:{mask:"r",greedy:!1,repeat:"*",regex:null,regexTokens:null,tokenizer:/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,quantifierFilter:/[0-9]+[^,]/,isComplete:function(n,t){return new RegExp(t.regex).test(n.join(""))},definitions:{r:{validator:function(t,i,r,u,f){function h(n,t){this.matches=[];this.isGroup=n||!1;this.isQuantifier=t||!1;this.quantifier={min:1,max:1};this.repeaterPart=void 0}function w(){var n,i,r=new h,t=[],e,s;for(f.regexTokens=[];n=f.tokenizer.exec(f.regex);)switch(i=n[0],i.charAt(0)){case"(":t.push(new h(!0));break;case")":o=t.pop();t.length>0?t[t.length-1].matches.push(o):r.matches.push(o);break;case"{":case"+":case"*":e=new h(!1,!0);i=i.replace(/[{}]/g,"");var u=i.split(","),c=isNaN(u[0])?u[0]:parseInt(u[0]),l=1===u.length?c:isNaN(u[1])?u[1]:parseInt(u[1]);(e.quantifier={min:c,max:l},t.length>0)?(s=t[t.length-1].matches,n=s.pop(),n.isGroup||(o=new h(!0),o.matches.push(n),n=o),s.push(n),s.push(e)):(n=r.matches.pop(),n.isGroup||(o=new h(!0),o.matches.push(n),n=o),r.matches.push(n),r.matches.push(e));break;default:t.length>0?t[t.length-1].matches.push(i):r.matches.push(i)}r.matches.length>0&&f.regexTokens.push(r)}function s(t,i){var u=!1,l,r,w,k,v,f,h,d,o,y;for(i&&(e+="(",c++),l=0;l<t.matches.length;l++){if(r=t.matches[l],r.isGroup===!0)u=s(r,!0);else if(r.isQuantifier===!0){var g=n.inArray(r,t.matches),p=t.matches[g-1],b=e;if(isNaN(r.quantifier.max)){for(;r.repeaterPart&&r.repeaterPart!==e&&r.repeaterPart.length>e.length&&!(u=s(p,!0)););u=u||s(p,!0);u&&(r.repeaterPart=e);e=b+r.quantifier.max}else{for(w=0,k=r.quantifier.max-1;w<k&&!(u=s(p,!0));w++);e=b+"{"+r.quantifier.min+","+r.quantifier.max+"}"}}else if(void 0!==r.matches)for(v=0;v<r.length&&!(u=s(r[v],i));v++);else{if("["==r.charAt(0)){for(f=e,f+=r,o=0;o<c;o++)f+=")";y=new RegExp("^("+f+")$");u=y.test(a)}else for(h=0,d=r.length;h<d;h++)if("\\"!==r.charAt(h)){for(f=e,f+=r.substr(0,h+1),f=f.replace(/\|$/,""),o=0;o<c;o++)f+=")";if(y=new RegExp("^("+f+")$"),u=y.test(a))break}e+=r}if(u)break}return i&&(e+=")",c--),u}var a,o,y=i.buffer.slice(),e="",p=!1,c=0,l,v;for(null===f.regexTokens&&w(),y.splice(r,0,t),a=y.join(""),l=0;l<f.regexTokens.length;l++)if(v=f.regexTokens[l],p=s(v,v.isGroup))break;return p},cardinality:1}}}}),t});!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):n("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(n){function v(t){var i={},r=/^jQuery\d+$/;return n.each(t.attributes,function(n,t){t.specified&&!r.test(t.name)&&(i[t.name]=t.value)}),i}function i(i,r){var e=this,u=n(this);if(e.value===u.attr(f?"placeholder-x":"placeholder")&&u.hasClass(t.customClass))if(e.value="",u.removeClass(t.customClass),u.data("placeholder-password")){if(u=u.hide().nextAll('input[type="password"]:first').show().attr("id",u.removeAttr("id").data("placeholder-id")),i===!0)return u[0].value=r,r;u.focus()}else e==h()&&e.select()}function o(r){var e,o=this,u=n(this),h=o.id,s;if(!r||"blur"!==r.type||!u.hasClass(t.customClass))if(""===o.value){if("password"===o.type){if(!u.data("placeholder-textinput")){try{e=u.clone().prop({type:"text"})}catch(c){e=n("<input>").attr(n.extend(v(this),{type:"text"}))}e.removeAttr("name").data({"placeholder-enabled":!0,"placeholder-password":u,"placeholder-id":h}).bind("focus.placeholder",i);u.data({"placeholder-textinput":e,"placeholder-id":h}).before(e)}o.value="";u=u.removeAttr("id").hide().prevAll('input[type="text"]:first').attr("id",u.data("placeholder-id")).show()}else s=u.data("placeholder-password"),s&&(s[0].value="",u.attr("id",u.data("placeholder-id")).show().nextAll('input[type="password"]:last').hide().removeAttr("id"));u.addClass(t.customClass);u[0].value=u.attr(f?"placeholder-x":"placeholder")}else u.removeClass(t.customClass)}function h(){try{return document.activeElement}catch(n){}}var u,r,f=!1,c="[object OperaMini]"===Object.prototype.toString.call(window.operamini),e="placeholder"in document.createElement("input")&&!c&&!f,s="placeholder"in document.createElement("textarea")&&!c&&!f,l=n.valHooks,a=n.propHooks,t={};e&&s?(r=n.fn.placeholder=function(){return this},r.input=!0,r.textarea=!0):(r=n.fn.placeholder=function(r){return t=n.extend({},{customClass:"placeholder"},r),this.filter((e?"textarea":":input")+"["+(f?"placeholder-x":"placeholder")+"]").not("."+t.customClass).not(":radio, :checkbox, [type=hidden]").bind({"focus.placeholder":i,"blur.placeholder":o}).data("placeholder-enabled",!0).trigger("blur.placeholder")},r.input=e,r.textarea=s,u={get:function(i){var r=n(i),u=r.data("placeholder-password");return u?u[0].value:r.data("placeholder-enabled")&&r.hasClass(t.customClass)?"":i.value},set:function(r,u){var e,s,f=n(r);return""!==u&&(e=f.data("placeholder-textinput"),s=f.data("placeholder-password"),e?(i.call(e[0],!0,u)||(r.value=u),e[0].value=u):s&&(i.call(r,!0,u)||(s[0].value=u),r.value=u)),f.data("placeholder-enabled")?(""===u?(r.value=u,r!=h()&&o.call(r)):(f.hasClass(t.customClass)&&i.call(r),r.value=u),f):(r.value=u,f)}},e||(l.input=u,a.value=u),s||(l.textarea=u,a.value=u),n(function(){n(document).delegate("form","submit.placeholder",function(){var r=n("."+t.customClass,this).each(function(){i.call(this,!0,"")});setTimeout(function(){r.each(o)},10)})}),n(window).bind("beforeunload.placeholder",function(){var i=!0;try{"javascript:void(0)"===document.activeElement.toString()&&(i=!1)}catch(r){}i&&n("."+t.customClass).each(function(){this.value=""})}))}),function(n){function e(t){return i?t.data("events"):n._data(t[0]).events}function o(n,t,r){var f=e(n),u=f[t],o;if(!i)return o=r?u.splice(u.delegateCount-1,1)[0]:u.pop(),u.splice(r?0:u.delegateCount||0,0,o),void 0;r?f.live.unshift(f.live.pop()):u.unshift(u.pop())}function t(t,i,r){var u=i.split(/\s+/);t.each(function(){for(var i,t=0;u.length>t;++t)i=n.trim(u[t]).match(/[^\.]+/i)[0],o(n(this),i,r)})}function r(i){n.fn[i+"First"]=function(){var u=n.makeArray(arguments),r=u.shift();return r&&(n.fn[i].apply(this,arguments),t(this,r)),this}}var u=n.fn.jquery.split("."),f=parseInt(u[0]),s=parseInt(u[1]),i=1>f||1==f&&7>s;r("bind");r("one");n.fn.delegateFirst=function(){var i=n.makeArray(arguments),r=i[1];return r&&(i.splice(0,2),n.fn.delegate.apply(this,arguments),t(this,r,!0)),this};n.fn.liveFirst=function(){var t=n.makeArray(arguments);return t.unshift(this.selector),n.fn.delegateFirst.apply(n(document),t),this};i||(n.fn.onFirst=function(i,r){var u=n(this),f="string"==typeof r;if(n.fn.on.apply(u,arguments),"object"==typeof i)for(type in i)i.hasOwnProperty(type)&&t(u,type,f);else"string"==typeof i&&t(u,i,f);return u})}(jQuery);var myCurrentPage=null,Pagination=function(n,t){t.labels=t.labels||{};var a=$(n),r,s,k=-1,v=-1,y=-2,p=-3,w=-4,d=t.showFirstLastButton||!1,yt=t.showPageDropDown||!1,h=t.isDisabled||!1,g=t.itemsCount,i=t.currentPage||1,nt=t.pageRange||[10,20,30,-1],c=t.pageSize||nt[0],pt=t.disablePageCookieUpdate||!1,wt=t.labels.all||"All",bt=t.firstPageLabel||"First",kt=t.lastPageLabel||"Last",dt=t.nextPageLabel||"&raquo;",gt=t.previousPageLabel||"&laquo;",tt,it,l,b,rt,f,ut,ft,u,et,ot,st,e,ht,o,ct,lt,at,vt;tt=function(){a.html(st());r=a.find(".pagination");s=a.find(".page-range");o();r.on("click","li",ct);s.on("change",lt);e()};lt=function(){var n=Number($(this).val()),i=n===k?g:n;if(!h){if(typeof t.onPageSizeChange=="function")t.onPageSizeChange(i);it(i);o()}};saveCurrentPage=function(n){myCurrentPage=n;pt||(NumberChooser.saveLocalStorageData("numberchooserpage",n),NumberChooser.currentPage=n)};ct=function(){var t=$(this),n=t.data("page");if(n>0&&saveCurrentPage(n),!h&&!t.hasClass("active")){switch(n){case v:ft();break;case y:ut();break;case p:at();break;case w:vt();break;default:u(n)}o()}};o=function(){var n=f();r.find('li[data-page="'+v+'"]').toggleClass("disabled",i===1);r.find('li[data-page="'+y+'"]').toggleClass("disabled",i===n);r.find('li[data-page="'+p+'"]').toggleClass("disabled",i===1);r.find('li[data-page="'+w+'"]').toggleClass("disabled",i===n)};it=function(n){c=n;u(1)};l=function(){r.html(b())};st=function(){return'<ul class="pagination">'+b()+"<\/ul>"+(yt?ht():"")};ht=function(){var n='<select class="page-range">';return $.each(nt,function(t,i){var r=c===i?'selected="selected"':"";n+="<option "+r+' value="'+i+'">'+(i===k?wt:i)+"<\/option>"}),n+="<\/select>"};b=function(){var t=rt(),n;return n=(d?'<li data-page="'+p+'"><a href="javascript:void(0);"><span aria-hidden="true">'+bt+"<\/span><\/a><\/li>":"")+'<li data-page="'+v+'"><a href="javascript:void(0);"><span aria-hidden="true">'+gt+"<\/span><\/a><\/li>",$.each(t,function(t,r){n+='<li data-page="'+r+'" '+(r===i?'class="active"':"")+'><a href="javascript:void(0)">'+r+"<\/a><\/li>"}),n+='<li data-page="'+y+'"><a href="javascript:void(0);"><span aria-hidden="true">'+dt+"<\/span><\/a><\/li>"+(d?'<li data-page="'+w+'"><a href="javascript:void(0;)"><span aria-hidden="true">'+kt+"<\/span><\/a><\/li>":"")};rt=function(){var r=[],u,t=5,e=1,n=f();for(n<5&&(t=n),u=i===1||i===2?1:i===n?i-(t-1):n-i==1&&n>=5?i-3:i-2;e<=t;)r.push(u++),e++;return r};f=function(){return Math.ceil(g/c)};ut=function(){if(i<f()){var n=i++;n++;saveCurrentPage(n);l();e()}};ft=function(){if(i>1){var n=i--;n--;saveCurrentPage(n);l();e()}};at=function(){i!==1&&u(1)};vt=function(){var n=f();i!==n&&u(n)};u=function(n){i=n;l();e();o()};et=function(){h=!0;r.addClass("disabled");s.prop("disabled",!0)};ot=function(){h=!1;r.removeClass("disabled");s.prop("disabled",!1)};e=function(){if(typeof t.onPageChange=="function")t.onPageChange({currentPage:i,pageSize:c})};tt();this.disable=et;this.enable=ot;this.goToPage=u};!function(){var n,u,f,r,i,l,a,v,y,p,w,b,k,d,g,nt,tt,it,rt,ut,ft,et,ot,st,ht,ct,lt,at,vt,yt,pt,wt,bt,kt,dt,gt,ni,ti,ii,ri,ui,t,fi,e,o,s,h,ei,c,oi,si,hi,ci,li,ai,vi,yi,pi,wi,bi,ki,di,gi,nr,ir=[].slice,tr=[].indexOf||function(n){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===n)return t;return-1};n=jQuery;n.formance={};n.formance.fn={};n.fn.formance=function(){var t,i;return i=arguments[0],t=2<=arguments.length?ir.call(arguments,1):[],n.formance.fn[i].apply(this,t)};vi=function(t){var r,i;return(r=n(t.target),t.metaKey||t.ctrlKey)?!0:t.which===32?!1:t.which===0?!0:t.which<33?!0:(i=String.fromCharCode(t.which),!!/[\d\s]/.test(i))};oi=function(t){var r,i;return(r=n(t.target),t.metaKey||t.ctrlKey)?!0:t.which===32?!1:t.which===0?!0:t.which<33?!0:(i=String.fromCharCode(t.which),!!/[\d\sA-Za-z]/.test(i))};t=function(n){var t;return n.prop("selectionStart")!=null&&n.prop("selectionStart")!==n.prop("selectionEnd")?!0:(typeof document!="undefined"&&document!==null?(t=document.selection)!=null?typeof t.createRange=="function"?t.createRange().text:void 0:void 0:void 0)?!0:!1};n.formance.fn.restrictNumeric=function(){this.on("keypress",vi);return this};n.formance.fn.restrictAlphaNumeric=function(){this.on("keypress",oi);return this};n.formance.fn.hasTextSelected=t;n=jQuery;t=n.formance.fn.hasTextSelected;i=/(\d{1,4})/g;r=[{type:"maestro",pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,format:i,length:[12,13,14,15,16,17,18,19],cvcLength:[3],luhn:!0},{type:"dinersclub",pattern:/^(36|38|30[0-5])/,format:i,length:[14],cvcLength:[3],luhn:!0},{type:"laser",pattern:/^(6706|6771|6709)/,format:i,length:[16,17,18,19],cvcLength:[3],luhn:!0},{type:"jcb",pattern:/^35/,format:i,length:[16],cvcLength:[3],luhn:!0},{type:"unionpay",pattern:/^62/,format:i,length:[16,17,18,19],cvcLength:[3],luhn:!1},{type:"discover",pattern:/^(6011|65|64[4-9]|622)/,format:i,length:[16],cvcLength:[3],luhn:!0},{type:"mastercard",pattern:/^5[1-5]/,format:i,length:[16],cvcLength:[3],luhn:!0},{type:"amex",pattern:/^3[47]/,format:/(\d{1,4})(\d{1,6})?(\d{1,5})?/,length:[15],cvcLength:[3,4],luhn:!0},{type:"visa",pattern:/^4/,format:i,length:[13,14,15,16],cvcLength:[3],luhn:!0}];u=function(n){var i,t,u;for(n=(n+"").replace(/\D/g,""),t=0,u=r.length;t<u;t++)if(i=r[t],i.pattern.test(n))return i};f=function(n){for(var i,t=0,u=r.length;t<u;t++)if(i=r[t],i.type===n)return i};si=function(t){var r,i,u;if(r=n(t.currentTarget),i=String.fromCharCode(t.which),/^\d+$/.test(i))return u=r.val()+i,u.length<=4};n.formance.fn.format_credit_card_cvc=function(){this.formance("restrictNumeric");this.on("keypress",si);return this};n.formance.fn.validate_credit_card_cvc=function(){var t,i,r,u;return(i=n(this).data("credit_card_type"),t=n(this).val(),t=n.trim(t),!/^\d+$/.test(t))?!1:i?(r=t.length,tr.call((u=f(i))!=null?u.cvcLength:void 0,r)>=0):t.length>=3&&t.length<=4};n=jQuery;t=n.formance.fn.hasTextSelected;ai=function(i){var u,f,r;if(u=n(i.currentTarget),f=String.fromCharCode(i.which),/^\d+$/.test(f))return t(u)?void 0:(r=u.val()+f,r=r.replace(/\D/g,""),r.length>6?!1:void 0)};ut=function(t){var r,u,i;if(u=String.fromCharCode(t.which),/^\d+$/.test(u))return(r=n(t.currentTarget),i=r.val()+u,/^\d$/.test(i)&&i!=="0"&&i!=="1")?(t.preventDefault(),r.val("0"+i+" / ")):/^\d\d$/.test(i)?(t.preventDefault(),r.val(""+i+" / ")):void 0};ot=function(t){var i,u,r;if(u=String.fromCharCode(t.which),/^\d+$/.test(u))return i=n(t.currentTarget),r=i.val(),/^\d\d$/.test(r)?i.val(""+r+" / "):void 0};ct=function(t){var r,u,i;if(u=String.fromCharCode(t.which),u==="/")return r=n(t.currentTarget),i=r.val(),/^\d$/.test(i)&&i!=="0"?r.val("0"+i+" / "):void 0};y=function(t){var i,r;if(!t.meta)return(i=n(t.currentTarget),r=i.val(),t.which!==8)?void 0:i.prop("selectionStart")!=null&&i.prop("selectionStart")!==r.length?void 0:/\d(\s|\/)+$/.test(r)?(t.preventDefault(),i.val(r.replace(/\d(\s|\/)*$/,""))):/\s\/\s?\d?$/.test(r)?(t.preventDefault(),i.val(r.replace(/\s\/\s?\d?$/,""))):void 0};n.formance.fn.format_credit_card_expiry=function(){this.formance("restrictNumeric");this.on("keypress",ai);this.on("keypress",ut);this.on("keypress",ct);this.on("keypress",ot);this.on("keydown",y);return this};e=function(n){var i,r,f,t,u;return f=n.replace(/\s/g,""),u=f.split("/",2),i=u[0],t=u[1],(t!=null?t.length:void 0)===2&&/^\d+$/.test(t)&&(r=(new Date).getFullYear(),r=r.toString().slice(0,2),t=r+t),i=parseInt(i,10),t=parseInt(t,10),{month:i,year:t}};n.formance.fn.val_credit_card_expiry=function(){var n;return(n=e(this.val()),n.month==null||isNaN(n.month))?!1:n.year==null||isNaN(n.year)?!1:new Date(n.year,n.month-1)};n.formance.fn.validate_credit_card_expiry=function(){var s,r,f,t,u,i,o;return(f=e(this.val()),t=f.month,i=f.year,typeof t=="object"&&"month"in t&&(o=t,t=o.month,i=o.year),!(t&&i))?!1:(t=n.trim(t),i=n.trim(i),!/^\d+$/.test(t))?!1:/^\d+$/.test(i)?(parseInt(t,10)<=12)?(i.length===2&&(u=(new Date).getFullYear(),u=u.toString().slice(0,2),i=u+i),r=new Date(i,t),s=new Date,r.setMonth(r.getMonth()-1),r.setMonth(r.getMonth()+1,1),r>s):!1:!1};n=jQuery;t=n.formance.fn.hasTextSelected;i=/(\d{1,4})/g;r=[{type:"maestro",pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,format:i,length:[12,13,14,15,16,17,18,19],cvcLength:[3],luhn:!0},{type:"dinersclub",pattern:/^(36|38|30[0-5])/,format:i,length:[14],cvcLength:[3],luhn:!0},{type:"laser",pattern:/^(6706|6771|6709)/,format:i,length:[16,17,18,19],cvcLength:[3],luhn:!0},{type:"jcb",pattern:/^35/,format:i,length:[16],cvcLength:[3],luhn:!0},{type:"unionpay",pattern:/^62/,format:i,length:[16,17,18,19],cvcLength:[3],luhn:!1},{type:"discover",pattern:/^(6011|65|64[4-9]|622)/,format:i,length:[16],cvcLength:[3],luhn:!0},{type:"mastercard",pattern:/^5[1-5]/,format:i,length:[16],cvcLength:[3],luhn:!0},{type:"amex",pattern:/^3[47]/,format:/(\d{1,4})(\d{1,6})?(\d{1,5})?/,length:[15],cvcLength:[3,4],luhn:!0},{type:"visa",pattern:/^4/,format:i,length:[13,14,15,16],cvcLength:[3],luhn:!0}];u=function(n){var i,t,u;for(n=(n+"").replace(/\D/g,""),t=0,u=r.length;t<u;t++)if(i=r[t],i.pattern.test(n))return i};f=function(n){for(var i,t=0,u=r.length;t<u;t++)if(i=r[t],i.type===n)return i};fi=function(n){var t,r,u,f,i,e;for(u=!0,f=0,r=(n+"").split("").reverse(),i=0,e=r.length;i<e;i++)t=r[i],t=parseInt(t,10),(u=!u)&&(t*=2),t>9&&(t-=9),f+=t;return f%10==0};hi=function(i){var e,r,o,f;if(e=n(i.currentTarget),o=String.fromCharCode(i.which),/^\d+$/.test(o))return t(e)?void 0:(f=(e.val()+o).replace(/\D/g,""),r=u(f),r?f.length<=r.length[r.length.length-1]:f.length<=16)};ei=function(t){var i=this;return setTimeout(function(){var r,i;return r=n(t.currentTarget),i=r.val(),i=n.formance.formatCardNumber(i),r.val(i)})};tt=function(t){var f,e,r,h,o,s,i;if(r=String.fromCharCode(t.which),/^\d+$/.test(r))return(f=n(t.currentTarget),i=f.val(),e=u(i+r),h=(i.replace(/\D/g,"")+r).length,s=16,e&&(s=e.length[e.length.length-1]),h>=s)?void 0:f.prop("selectionStart")!=null&&f.prop("selectionStart")!==i.length?void 0:(o=e&&e.type==="amex"?/^(\d{4}|\d{4}\s\d{6})$/:/(?:^|\s)(\d{4})$/,o.test(i))?(t.preventDefault(),f.val(i+" "+r)):o.test(i+r)?(t.preventDefault(),f.val(i+r+" ")):void 0};l=function(t){var i,r;if(i=n(t.currentTarget),r=i.val(),!t.meta)return t.which!==8?void 0:i.prop("selectionStart")!=null&&i.prop("selectionStart")!==r.length?void 0:/\d\s$/.test(r)?(t.preventDefault(),i.val(r.replace(/\d\s$/,""))):/\s\d?$/.test(r)?(t.preventDefault(),i.val(r.replace(/\s\d?$/,""))):void 0};nr=function(t){var i,f,e,u,o;return i=n(t.currentTarget),o=i.val(),u=n.formance.creditCardType(o)||"unknown",i.hasClass(u)?void 0:(f=function(){var n,i,t;for(t=[],n=0,i=r.length;n<i;n++)e=r[n],t.push(e.type);return t}(),i.removeClass("unknown"),i.removeClass(f.join(" ")),i.addClass(u),i.toggleClass("identified",u!=="unknown"),i.trigger("payment.cardType",u))};n.formance.creditCardType=function(n){var t;return n?((t=u(n))!=null?t.type:void 0)||null:null};n.formance.formatCreditCardNumber=function(n){var t,i,r,f;return(t=u(n),!t)?n:(r=t.length[t.length.length-1],n=n.replace(/\D/g,""),n=n.slice(0,+r+1||9e9),t.format.global?(f=n.match(t.format))!=null?f.join(" "):void 0:(i=t.format.exec(n),i!=null&&i.shift(),i!=null?i.join(" "):void 0))};n.formance.fn.format_credit_card_number=function(){this.formance("restrictNumeric");this.on("keypress",hi);this.on("keypress",tt);this.on("keydown",l);this.on("keyup",nr);this.on("paste",ei);return this};n.formance.fn.validate_credit_card_number=function(){var i,t,r;return(t=n(this).val(),t=(t+"").replace(/\s+|-/g,""),!/^\d+$/.test(t))?!1:(i=u(t),!i)?!1:(r=t.length,tr.call(i.length,r)>=0)&&(i.luhn===!1||fi(t))};n=jQuery;t=n.formance.fn.hasTextSelected;ci=function(i){var u,f,r;if(u=n(i.currentTarget),f=String.fromCharCode(i.which),/^\d+$/.test(f))return t(u)?void 0:(r=u.val()+f,r=r.replace(/\D/g,""),r.length>8?!1:void 0)};it=function(t){var u,i,f,r;if(i=String.fromCharCode(t.which),/^\d+$/.test(i))return(u=n(t.currentTarget),f=u.val(),r=f+i,/^\d$/.test(r)&&i!=="0"&&i!=="1"&&i!=="2"&&i!=="3")?(t.preventDefault(),u.val("0"+r+" / ")):/^\d{2}$/.test(r)?(t.preventDefault(),u.val(""+r+" / ")):/^\d{2}\s\/\s\d$/.test(r)&&i!=="0"&&i!=="1"?(t.preventDefault(),u.val(""+f+"0"+i+" / ")):/^\d{2}\s\/\s\d{2}$/.test(r)?(t.preventDefault(),u.val(""+r+" / ")):void 0};ft=function(t){var r,u,i;if(u=String.fromCharCode(t.which),/^\d+$/.test(u))return r=n(t.currentTarget),i=r.val(),/^\d{2}$/.test(i)||/^\d{2}\s\/\s\d{2}$/.test(i)?r.val(""+i+" / "):void 0};st=function(t){var r,c,o,f,s,e,h,i,u;if(h=String.fromCharCode(t.which),h==="/")return(r=n(t.currentTarget),i=r.val(),s=/^(\d)$/,e=/^(\d{2})\s\/\s(\d)$/,s.test(i)&&i!=="0")?r.val("0"+i+" / "):e.test(i)&&(u=i.match(e),c=u[0],o=u[1],f=u[2],f!=="0")?r.val(""+o+" / 0"+f+" / "):void 0};a=function(t){var i,r;if(!t.meta)return(i=n(t.currentTarget),r=i.val(),t.which!==8)?void 0:i.prop("selectionStart")!=null&&i.prop("selectionStart")!==r.length?void 0:/\d(\s|\/)+$/.test(r)?(t.preventDefault(),i.val(r.replace(/\d(\s|\/)*$/,""))):/\s\/\s?\d?$/.test(r)?(t.preventDefault(),i.val(r.replace(/\s\/\s?\d?$/,""))):void 0};n.formance.fn.format_dd_mm_yyyy=function(){this.formance("restrictNumeric");this.on("keypress",ci);this.on("keypress",it);this.on("keypress",st);this.on("keypress",ft);this.on("keydown",a);return this};o=function(n){var i,r,t,u;return u=n!=null?n.replace(/\s/g,"").split("/",3):[NaN,NaN,NaN],i=u[0],r=u[1],t=u[2],t!=null&&t.length===4||(t=NaN),i=parseInt(i,10),r=parseInt(r,10),t=parseInt(t,10),{day:i,month:r,year:t}};n.formance.fn.val_dd_mm_yyyy=function(){var n;return(n=o(this.val()),n.day==null||isNaN(n.day))?!1:n.month==null||isNaN(n.month)?!1:n.year==null||isNaN(n.year)?!1:new Date(n.year,n.month-1,n.day)};n.formance.fn.validate_dd_mm_yyyy=function(){var n,t;return(t=o(this.val()),n=this.formance("val_dd_mm_yyyy"),!(n!=null&&n instanceof Date))?!1:n.getDate()!==t.day?!1:n.getMonth()+1!==t.month?!1:n.getFullYear()!==t.year?!1:!0};n=jQuery;t=n.formance.fn.hasTextSelected;n.formance.fn.format_email=function(){return this};n.formance.fn.validate_email=function(){var u,t,i,r;return(t={simple:/^\S+@\S+$/,complex:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\ ".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA -Z\-0-9]+\.)+[a-zA-Z]{2,}))$/},u=n(this),i=u.val(),i==null)?!1:(r=u.data("formance_algorithm"),r!=null&&r in t)?t[r].test(i):t.simple.test(i)};n=jQuery;n.formance.fn.format_number=function(){var t;return t=n(this).data("formance_length"),t!=null&&n(this).attr("maxLength",t),this.formance("restrictNumeric"),this};n.formance.fn.validate_number=function(){var r,t,i;return(r=n(this),i=r.val(),t=r.data("formance_length"),t!=null&&typeof t=="number"&&i.length!==t)?!1:t!=null&&typeof t=="string"&&t!==""&&(isNaN(parseInt(t,10))||i.length!==parseInt(t,10))?!1:/^\d+$/.test(i)};n=jQuery;t=n.formance.fn.hasTextSelected;yi=function(i){var u,f,r;if(u=n(i.currentTarget),f=String.fromCharCode(i.which),/^[a-zA-Z\d]+$/.test(f))return t(u)?void 0:(r=u.val()+f,r=r.replace(/[^a-zA-Z\d]/g,""),r.length>15?!1:void 0)};yt=function(t){var r,f,u,i;if(f=String.fromCharCode(t.which),/^[a-zA-Z\d]+$/.test(f))if(r=n(t.currentTarget),u=r.val(),i=u+f.toUpperCase(),u===""){if(t.preventDefault(),/^[A-Za-z]$/.test(i))return r.val(i)}else if(/^[A-Za-z]\d{0,3}$/.test(u)){if(t.preventDefault(),/^[A-Za-z]\d{4}$/.test(i)&&(i=""+i+" - "),/^[A-Za-z]\d{0,4}[\s|\-]*$/.test(i))return r.val(i)}else if(/^[A-Za-z]\d{4}[\s|\-]*\d{0,4}$/.test(u)&&(t.preventDefault(),/^[A-Za-z]\d{4}[\s|\-]*\d{5}$/.test(i)&&(i=""+i+" - "),/^[A-Za-z]\d{4}[\s|\-]*\d{0,5}[\s|\-]*$/.test(i)))return r.val(i)};p=function(t){var i,r;if(!t.meta)return(i=n(t.currentTarget),r=i.val(),t.which!==8)?void 0:i.prop("selectionStart")!=null&&i.prop("selectionStart")!==r.length?void 0:/\d(\s|\-)+$/.test(r)?(t.preventDefault(),i.val(r.replace(/\d(\s|\-)+$/,""))):void 0};bt=function(t){var i=this;return setTimeout(function(){var r,u,s,f,e,o,i;return r=n(t.currentTarget),o=r.val(),i=o.match(/^([A-Za-z\d]{5})[\s|\-]*(\d{5})[\s|\-]*(\d{5})$/),s=i[0],u=i[1],e=i[2],f=i[3],r.val(""+u+" - "+e+" - "+f)})};n.formance.fn.format_ontario_drivers_license_number=function(){this.formance("restrictAlphaNumeric");this.on("keypress",yi);this.on("keypress",yt);this.on("keydown",p);this.on("paste",bt);return this};n.formance.fn.validate_ontario_drivers_license_number=function(){var i,t;return(t=n(this).val(),t==null)?!1:(t=t.replace(/[\s|\-]/g,""),!/^[a-zA-Z\d]+$/.test())?!1:(i=/^[A-Za-z]\d{4}[\s|\-]*\d{5}[\s|\-]*\d{5}$/,i.test(t))};n=jQuery;t=n.formance.fn.hasTextSelected;pi=function(i){var u,f,r;if(u=n(i.currentTarget),f=String.fromCharCode(i.which),/^\d+$/.test(f))return t(u)?void 0:(r=u.val()+f,r=r.replace(/\D/g,""),r.length>15?!1:void 0)};pt=function(t){var r,u,f,i;if(u=String.fromCharCode(t.which),/^\d+$/.test(u))return(r=n(t.currentTarget),f=r.val(),i=r.val()+u,f==="")?(t.preventDefault(),i=/^7$/.test(i)?"708158 ":"708158 "+i,r.val(i)):/^\d{5}$/.test(f)&&(t.preventDefault(),/^\d{6}$/.test(i)&&(i=""+i+" "),/^\d{6}\s*$/.test(i))?target.val(i):void 0};w=function(t){var i,r;if(!t.meta)return(i=n(t.currentTarget),r=i.val(),t.which!==8)?void 0:i.prop("selectionStart")!=null&&i.prop("selectionStart")!==r.length?void 0:/708158\s+$/.test(r)?(t.preventDefault(),i.val(r.replace(/708158\s+$/,""))):void 0};kt=function(t){var i=this;return setTimeout(function(){var r,u,o,f,e,i;return r=n(t.currentTarget),e=r.val(),i=e.match(/^(\d{6})\s*(\d{9})$/),o=i[0],u=i[1],f=i[2],r.val(""+u+" "+f)})};n.formance.fn.format_ontario_outdoors_card_number=function(){this.formance("restrictNumeric");this.on("keypress",pi);this.on("keypress",pt);this.on("keydown",w);this.on("paste",kt);return this};n.formance.fn.validate_ontario_outdoors_card_number=function(){var i,t;return(t=n(this).val(),t==null)?!1:(t=t.replace(/\s/g,""),!/^\d+$/.test(t))?!1:(i=/^708158\s*\d{9}$/,i.test(t))};n=jQuery;t=n.formance.fn.hasTextSelected;wi=function(i){var u,f,r;if(u=n(i.currentTarget),f=String.fromCharCode(i.which),/^[a-zA-Z\d]+$/.test(f))return t(u)?void 0:(r=u.val()+f,r=r.replace(/[^a-zA-Z\d]/g,""),r.length>12?!1:void 0)};wt=function(t){var r,f,u,i;if(f=String.fromCharCode(t.which),/^[a-zA-Z\d]+$/.test(f))if(r=n(t.currentTarget),u=r.val(),i=u+f.toUpperCase(),/^\d{0,3}$/.test(u)){if(t.preventDefault(),/^\d{4}$/.test(i)&&(i=""+i+" - "),/^\d{0,4}[\s|\-]*$/.test(i))return r.val(i)}else if(/^\d{4}[\s|\-]*\d{0,2}$/.test(u)){if(t.preventDefault(),/^\d{4}[\s|\-]*\d{3}$/.test(i)&&(i=""+i+" - "),/^\d{4}[\s|\-]*\d{0,3}[\s|\-]*$/.test(i))return r.val(i)}else if(/^\d{4}[\s|\-]*\d{3}[\s|\-]*\d{0,2}$/.test(u)){if(t.preventDefault(),/^\d{4}[\s|\-]*\d{3}[\s|\-]*\d{3}$/.test(i)&&(i=""+i+" - "),/^\d{4}[\s|\-]*\d{3}[\s|\-]*\d{0,3}[\s|\-]*$/.test(i))return r.val(i)}else if(/^\d{4}[\s|\-]*\d{3}[\s|\-]*\d{3}[\s|\-]*[A-Za-z]{0,1}$/.test(u)&&(t.preventDefault(),/^\d{4}[\s|\-]*\d{3}[\s|\-]*\d{3}[\s|\-]*[A-Za-z]{0,2}$/.test(i)))return r.val(i)};b=function(t){var i,r;if(!t.meta)return(i=n(t.currentTarget),r=i.val(),t.which!==8)?void 0:i.prop("selectionStart")!=null&&i.prop("selectionStart")!==r.length?void 0:/\d(\s|\-)+$/.test(r)?(t.preventDefault(),i.val(r.replace(/\d(\s|\-)+$/,""))):void 0};dt=function(t){var i=this;return setTimeout(function(){var r,u,h,f,e,o,s,i;return r=n(t.currentTarget),s=r.val(),i=s.match(/^(\d{4})[\s|\-]*(\d{3})[\s|\-]*(\d{3})[\s|\-]*([A-Za-z]{2})$/),h=i[0],u=i[1],e=i[2],o=i[3],f=i[4],r.val(""+u+" - "+e+" - "+o+" - "+f)})};n.formance.fn.format_ontario_photo_health_card_number=function(){this.formance("restrictAlphaNumeric");this.on("keypress",wi);this.on("keypress",wt);this.on("keydown",b);this.on("paste",dt);return this};n.formance.fn.validate_ontario_photo_health_card_number=function(){var i,t;return(t=n(this).val(),t==null)?!1:(t=t.replace(/[\s|\-]/g,""),!/^[a-zA-Z\d]+$/.test())?!1:(i=/^\d{4}[\s|\-]*\d{3}[\s|\-]*\d{3}[\s|\-]*[A-Za-z]{2}$/,i.test(t))};n=jQuery;t=n.formance.fn.hasTextSelected;c=function(n){var i,r,f,e,t,u;return e=n.replace(/\D/g,"").match(/^(\d{0,3})?(\d{0,3})?(\d{0,4})?$/),u=e,e=u[0],i=u[1],r=u[2],f=u[3],t="",i!=null&&(t+="("+i),(i!=null?i.length:void 0)===3&&(t+=") "),r!=null&&(t+=""+r),(r!=null?r.length:void 0)===3&&(t+=" - "),f!=null&&(t+=""+f),t};bi=function(i){var u,f,r;if(u=n(i.currentTarget),f=String.fromCharCode(i.which),/^\d+$/.test(f))return t(u)?void 0:(r=u.val()+f,r=r.replace(/\D/g,""),r.length>10?!1:void 0)};ti=function(t){var i,r,u,f;if(r=String.fromCharCode(t.which),/^\d+$/.test(r))return i=n(t.currentTarget),f=i.val()+r,u=c(f),t.preventDefault(),i.val(u)};k=function(t){var i,r;if(!t.meta)return(i=n(t.currentTarget),r=i.val(),t.which!==8)?void 0:i.prop("selectionStart")!=null&&i.prop("selectionStart")!==r.length?void 0:/\(\d$/.test(r)?(t.preventDefault(),i.val("")):/\d\)(\s)+$/.test(r)?(t.preventDefault(),i.val(r.replace(/\d\)(\s)*$/,""))):/\d(\s|\-)+$/.test(r)?(t.preventDefault(),i.val(r.replace(/\d(\s|\-)+$/,""))):void 0};gt=function(t){var i=this;return setTimeout(function(){var i,r,u;return i=n(t.currentTarget),u=i.val(),r=c(u),i.val(r)})};n.formance.fn.format_phone_number=function(){this.formance("restrictNumeric");this.on("keypress",bi);this.on("keypress",ti);this.on("keydown",k);this.on("paste",gt);return this};n.formance.fn.validate_phone_number=function(){var t;return(t=n(this).val(),t==null)?!1:(t=t.replace(/\(|\)|\s+|-/g,""),!/^\d+$/.test(t))?!1:t.replace(/\D/g,"").length===10};n=jQuery;t=n.formance.fn.hasTextSelected;ki=function(i){var u,f,r;if(u=n(i.currentTarget),f=String.fromCharCode(i.which),/^[a-zA-Z\d]+$/.test(f))return t(u)?void 0:(r=u.val()+f,r=r.replace(/[^a-zA-Z\d]/g,""),r.length>6?!1:void 0)};ii=function(t){var r,f,u,i;if(f=String.fromCharCode(t.which),/^[a-zA-Z\d]+$/.test(f))if(r=n(t.currentTarget),u=r.val(),i=u+f.toUpperCase(),u===""){if(t.preventDefault(),/^[ABCEFGHJKLMNPRSTVXY]$/.test(i))return r.val(i)}else if(/^[ABCEFGHJKLMNPRSTVXY]$/.test(u)){if(t.preventDefault(),/^[ABCEFGHJKLMNPRSTVXY][0-9]$/.test(i))return r.val(i)}else if(/^[ABCEFGHJKLMNPRSTVXY][0-9]$/.test(u)){if(t.preventDefault(),/^[ABCEFGHJKLMNPRSTVXY][0-9][ABCEFGHJKLMNPRSTVWXYZ]$/.test(i))return r.val(""+i+" ")}else if(/^[ABCEFGHJKLMNPRSTVXY][0-9][ABCEFGHJKLMNPRSTVWXYZ]\s$/.test(u)){if(t.preventDefault(),/^[ABCEFGHJKLMNPRSTVXY][0-9][ABCEFGHJKLMNPRSTVWXYZ]\s?[0-9]$/.test(i))return r.val(i)}else if(/^[ABCEFGHJKLMNPRSTVXY][0-9][ABCEFGHJKLMNPRSTVWXYZ]\s?[0-9]$/.test(u)){if(t.preventDefault(),/^[ABCEFGHJKLMNPRSTVXY][0-9][ABCEFGHJKLMNPRSTVWXYZ]\s?[0-9][ABCEFGHJKLMNPRSTVWXYZ]$/.test(i))return r.val(i)}else if(/^[ABCEFGHJKLMNPRSTVXY][0-9][ABCEFGHJKLMNPRSTVWXYZ]\s?[0-9][ABCEFGHJKLMNPRSTVWXYZ]$/.test(u)&&(t.preventDefault(),/^[ABCEFGHJKLMNPRSTVXY][0-9][ABCEFGHJKLMNPRSTVWXYZ]\s?[0-9][ABCEFGHJKLMNPRSTVWXYZ][0-9]$/.test(i)))return r.val(i)};d=function(t){var i,r;if(!t.meta)return(i=n(t.currentTarget),r=i.val(),t.which!==8)?void 0:i.prop("selectionStart")!=null&&i.prop("selectionStart")!==r.length?void 0:/[ABCEFGHJKLMNPRSTVWXYZ](\s)+$/.test(r)?(t.preventDefault(),i.val(r.replace(/[ABCEFGHJKLMNPRSTVWXYZ](\s)*$/,""))):void 0};ni=function(t){var i=this;return setTimeout(function(){var r,u,o,f,e,i;return r=n(t.currentTarget),e=r.val(),i=e.match(/^([ABCEFGHJKLMNPRSTVXY][0-9][ABCEFGHJKLMNPRSTVWXYZ])\s?([0-9][ABCEFGHJKLMNPRSTVWXYZ][0-9])$/),o=i[0],u=i[1],f=i[2],r.val(""+u+" "+f)})};n.formance.fn.format_postal_code=function(){this.formance("restrictAlphaNumeric");this.on("keypress",ki);this.on("keypress",ii);this.on("keydown",d);this.on("paste",ni);return this};n.formance.fn.validate_postal_code=function(){var t;return(t=n(this).val(),t==null)?!1:(t=t.replace(/\s+/g,""),!/^[a-zA-Z\d]+$/.test(t))?!1:(t=t.replace(/[^a-zA-Z\d]/g,""),/^[ABCEFGHJKLMNPRSTVXY][0-9][ABCEFGHJKLMNPRSTVWXYZ]\s?[0-9][ABCEFGHJKLMNPRSTVWXYZ][0-9]$/.test(t.toUpperCase()))};n=jQuery;t=n.formance.fn.hasTextSelected;di=function(i){var u,f,r;if(u=n(i.currentTarget),f=String.fromCharCode(i.which),/^\d+$/.test(f))return t(u)?void 0:(r=u.val()+f,r=r.replace(/\D/g,""),r.length>4?!1:void 0)};ri=function(t){var r,i,f,u;if(i=String.fromCharCode(t.which),/^\d+$/.test(i))return(r=n(t.currentTarget),f=r.val(),u=f+i,/^\d{2}$/.test(u))?(t.preventDefault(),r.val(""+u+" / ")):/^\d{2}\s\/\s\d{1}$/.test(u)&&i!=="0"&&i!=="1"?(t.preventDefault(),r.val(""+f+"0"+i)):void 0};at=function(t){var i,u,r;if(u=String.fromCharCode(t.which),/^\d+$/.test(u))return i=n(t.currentTarget),r=i.val(),/^\d{2}$/.test(r)?i.val(""+r+" / "):void 0};lt=function(t){var r,u,f,i;if(f=String.fromCharCode(t.which),f==="/")return r=n(t.currentTarget),i=r.val(),u=/^(\d)$/,u.test(i)&&i.length===2||i.length===1?r.val("0"+i+" / "):void 0};g=function(t){var i,r;if(!t.meta)return(i=n(t.currentTarget),r=i.val(),t.which!==8)?void 0:i.prop("selectionStart")!=null&&i.prop("selectionStart")!==r.length?void 0:/\d(\s|\/)+$/.test(r)?(t.preventDefault(),i.val(r.replace(/\d(\s|\/)*$/,""))):/\s\/\s?\d?$/.test(r)?(t.preventDefault(),i.val(r.replace(/\s\/\s?\d?$/,""))):void 0};n.formance.fn.format_time_yy_mm=function(){this.formance("restrictNumeric");this.on("keypress",di);this.on("keypress",ri);this.on("keypress",at);this.on("keypress",lt);this.on("keydown",g);return this};s=function(n){var t,i,r;return r=n!=null?n.replace(/\s/g,"").split("/",2):[NaN,NaN],i=r[0],t=r[1],t=parseInt(t,10),i=parseInt(i,10),{years:i,months:t}};n.formance.fn.val_time_yy_mm=function(){var n;return(n=s(this.val()),n.years==null||isNaN(n.years))?!1:n.months==null||isNaN(n.months)?!1:n};n.formance.fn.validate_time_yy_mm=function(){var t,i,r;return(i=s(this.val()),t=this.formance("val_time_yy_mm"),r=n(this).val(),t.months!==i.months)?!1:t.years!==i.years?!1:/^(\d{1}[\d{1}]*)[\s\/]*(\d{1}[\d{1}]*)[\s\/]*$/.test(r)?!0:!1};n=jQuery;t=n.formance.fn.hasTextSelected;gi=function(i){var u,f,r;if(u=n(i.currentTarget),f=String.fromCharCode(i.which),/^\d+$/.test(f))return t(u)?void 0:(r=u.val()+f,r=r.replace(/\D/g,""),r.length>6?!1:void 0)};vt=function(t){var r,u,i;if(u=String.fromCharCode(t.which),/^\d+$/.test(u))return r=n(t.currentTarget),i=r.val(),/^\d{2}$/.test(i)||/^\d{2}\s\-\s\d{2}$/.test(i)?r.val(""+i+" - "):void 0};nt=function(t){var i,r;if(!t.meta)return(i=n(t.currentTarget),r=i.val(),t.which!==8)?void 0:i.prop("selectionStart")!=null&&i.prop("selectionStart")!==r.length?void 0:/\d(\s|\-)+$/.test(r)?(t.preventDefault(),i.val(r.replace(/\d(\s|\-)+$/,""))):/\s\-\s?\d?$/.test(r)?(t.preventDefault(),i.val(r.replace(/\s\-\s?\d?$/,""))):void 0};ui=function(t){var r,u,f,i;if(u=String.fromCharCode(t.which),/^\d+$/.test(u))return(r=n(t.currentTarget),f=r.val(),i=f+u,/^\d{2}$/.test(i))?(t.preventDefault(),r.val(""+i+" - ")):/^\d{2}\s\-\s\d{2}$/.test(i)?(t.preventDefault(),r.val(""+i+" - ")):void 0};n.formance.fn.format_uk_sort_code=function(){this.formance("restrictNumeric");this.on("keypress",gi);this.on("keypress",ui);this.on("keypress",vt);this.on("keydown",nt);return this};n.formance.fn.validate_uk_sort_code=function(){var t;return(t=n(this).val(),/^(\d{2})[\s\-]*(\d{2})[\s\-]*(\d{2})[\s]*$/.test(t))?!0:!1};n=jQuery;t=n.formance.fn.hasTextSelected;li=function(i){var u,f,r;if(u=n(i.currentTarget),f=String.fromCharCode(i.which),/^\d+$/.test(f))return t(u)?void 0:(r=u.val()+f,r=r.replace(/\D/g,""),r.length>8?!1:void 0)};rt=function(t){var u,i,f,r;if(i=String.fromCharCode(t.which),/^\d+$/.test(i))return(u=n(t.currentTarget),f=u.val(),r=f+i,/^\d{4}$/.test(r))?(t.preventDefault(),u.val(""+r+" / ")):/^\d{4}\s\/\s\d$/.test(r)&&i!=="0"&&i!=="1"?(t.preventDefault(),u.val(""+f+"0"+i+" / ")):/^\d{4}\s\/\s\d{2}$/.test(r)?(t.preventDefault(),u.val(""+r+" / ")):/^\d{4}\s\/\s\d{2}\s\/\s\d$/.test(r)&&i!=="0"&&i!=="1"&&i!=="2"&&i!=="3"?(t.preventDefault(),u.val(""+f+"0"+i)):void 0};et=function(t){var r,u,i;if(u=String.fromCharCode(t.which),/^\d+$/.test(u))return r=n(t.currentTarget),i=r.val(),/^\d{4}$/.test(i)||/^\d{4}\s\/\s\d{2}$/.test(i)?r.val(""+i+" / "):void 0};ht=function(t){var r,h,u,f,o,e,s,i;if(o=String.fromCharCode(t.which),o==="/")return r=n(t.currentTarget),e=r.val(),f=/^(\d{4})\s\/\s(\d)$/,f.test(e)&&(i=e.match(f),h=i[0],s=i[1],u=i[2],u!=="0")?r.val(""+s+" / 0"+u+" / "):void 0};v=function(t){var i,r;if(!t.meta)return(i=n(t.currentTarget),r=i.val(),t.which!==8)?void 0:i.prop("selectionStart")!=null&&i.prop("selectionStart")!==r.length?void 0:/\d(\s|\/)+$/.test(r)?(t.preventDefault(),i.val(r.replace(/\d(\s|\/)*$/,""))):/\s\/\s?\d?$/.test(r)?(t.preventDefault(),i.val(r.replace(/\s\/\s?\d?$/,""))):void 0};n.formance.fn.format_yyyy_mm_dd=function(){this.formance("restrictNumeric");this.on("keypress",li);this.on("keypress",rt);this.on("keypress",ht);this.on("keypress",et);this.on("keydown",v);return this};h=function(n){var i,r,t,u;return u=n!=null?n.replace(/\s/g,"").split("/",3):[NaN,NaN,NaN],t=u[0],r=u[1],i=u[2],t!=null&&t.length===4||(t=NaN),i=parseInt(i,10),r=parseInt(r,10),t=parseInt(t,10),{day:i,month:r,year:t}};n.formance.fn.val_yyyy_mm_dd=function(){var n;return(n=h(this.val()),n.day==null||isNaN(n.day))?!1:n.month==null||isNaN(n.month)?!1:n.year==null||isNaN(n.year)?!1:new Date(n.year,n.month-1,n.day)};n.formance.fn.validate_yyyy_mm_dd=function(){var n,t;return(t=h(this.val()),n=this.formance("val_yyyy_mm_dd"),!(n!=null&&n instanceof Date))?!1:n.getDate()!==t.day?!1:n.getMonth()+1!==t.month?!1:n.getFullYear()!==t.year?!1:!0}}.call(this),function(n){function k(){return"!@#$%^&*()+=[]\\';,/{}|\":<>?~`.-_ "}function d(){return"¬€£¦"}function o(t,i,r){t.each(function(){var t=n(this);t.off(".alphanum").on("keyup.alphanum change.alphanum paste.alphanum",function(n){var u="";n.originalEvent&&n.originalEvent.clipboardData&&n.originalEvent.clipboardData.getData&&(u=n.originalEvent.clipboardData.getData("text/plain"));setTimeout(function(){tt(t,i,r,u)},0)}).on("keypress.alphanum",function(n){var u=n.charCode?n.charCode:n.which;if(!nt(u)&&!n.ctrlKey&&!n.metaKey){var s=String.fromCharCode(u),f=t.selection(),h=f.start,c=f.end,e=t.val(),o=e.substring(0,h)+s+e.substring(c),l=i(o,r);l!=o&&n.preventDefault()}})})}function g(t,i){var r=parseFloat(n(t).val()),u=n(t);if(isNaN(r)){u.val("");return}c(i.min)&&r<i.min&&u.val("");c(i.max)&&r>i.max&&u.val("")}function c(n){return!isNaN(n)}function nt(n){return n>=32?!1:n==10?!1:n==13?!1:!0}function tt(n,t,i,r){var u=n.val(),f,e;(u==""&&r.length>0&&(u=r),f=t(u,i),u!=f)&&(e=n.alphanum_caret(),n.val(f),u.length==f.length+1?n.alphanum_caret(e-1):n.alphanum_caret(e))}function u(t,i){typeof i=="undefined"&&(i=v);var u,r={};return u=typeof t=="string"?p[t]:typeof t=="undefined"?{}:t,n.extend(r,i,u),typeof r.blacklist=="undefined"&&(r.blacklistSet=at(r.allow,r.disallow)),r}function l(t){var i,r={};return i=typeof t=="string"?w[t]:typeof t=="undefined"?{}:t,n.extend(r,y,i),r}function it(n,t,i){return i.maxLength&&n.length>=i.maxLength?!1:i.allow.indexOf(t)>=0?!0:i.allowSpace&&t==" "?!0:!i.allowNewline&&(t=="\n"||t=="\r")?!1:i.blacklistSet.contains(t)?!1:!i.allowNumeric&&e[t]?!1:!i.allowUpper&&ht(t)?!1:!i.allowLower&&ct(t)?!1:!i.allowCaseless&&lt(t)?!1:!i.allowLatin&&h.contains(t)?!1:i.allowOtherCharSets?!0:e[t]||h.contains(t)?!0:!1}function rt(n,t,u){if(e[t])return ut(n,u)?!1:et(n,u)?!1:ft(n,u)?!1:ot(n+t,u)?!1:st(n+t,u)?!1:!0;if(u.allowPlus&&t=="+"&&n==""||u.allowMinus&&t=="-"&&n==""||t==r&&u.allowThouSep&&pt(n))return!0;if(t==i){if(n.indexOf(i)>=0||u.allowDecSep&&u.maxDecimalPlaces===0)return!1;if(u.allowDecSep)return!0}return!1}function f(n){return n=n+"",n.replace(/[^0-9]/g,"").length}function ut(n,t){var i=t.maxDigits,r;return i===""||isNaN(i)?!1:(r=f(n),r>=i)?!0:!1}function ft(n,t){var r=t.maxDecimalPlaces,u,e,o;return r===""||isNaN(r)?!1:(u=n.indexOf(i),u==-1)?!1:(e=n.substring(u),o=f(e),o>=r)?!0:!1}function et(n,t){var r=t.maxPreDecimalPlaces,u,e;return r===""||isNaN(r)?!1:(u=n.indexOf(i),u>=0)?!1:(e=f(n),e>=r)?!0:!1}function ot(n,t){if(!t.max||t.max<0)return!1;var i=parseFloat(n);return i>t.max?!0:!1}function st(n,t){if(!t.min||t.min>0)return!1;var i=parseFloat(n);return i<t.min?!0:!1}function s(n,t){var o,i;if(typeof n!="string")return n;for(var e=n.split(""),u=[],r=0,f,r=0;r<e.length;r++)f=e[r],o=u.join(""),it(o,f,t)&&u.push(f);return i=u.join(""),t.forceLower?i=i.toLowerCase():t.forceUpper&&(i=i.toUpperCase()),i}function a(n,t){var e;if(typeof n!="string")return n;for(var f=n.split(""),r=[],i=0,u,i=0;i<f.length;i++)u=f[i],e=r.join(""),rt(e,u,t)&&r.push(u);return r.join("")}function ht(n){var t=n.toUpperCase(),i=n.toLowerCase();return n==t&&t!=i?!0:!1}function ct(n){var i=n.toUpperCase(),t=n.toLowerCase();return n==t&&i!=t?!0:!1}function lt(n){return n.toUpperCase()==n.toLowerCase()?!0:!1}function at(n,i){var r=new t(b+i),u=new t(n);return r.subtract(u)}function vt(){for(var t="0123456789".split(""),i={},n=0,r,n=0;n<t.length;n++)r=t[n],i[r]=!0;return i}function yt(){var n="abcdefghijklmnopqrstuvwxyz",i=n.toUpperCase();return new t(n+i)}function pt(n){var u,t,e,o,s;return n.length==0?!1:(u=n.indexOf(i),u>=0)?!1:(t=n.indexOf(r),t<0)?!0:(e=n.lastIndexOf(r),o=n.length-e-1,o<3)?!1:(s=f(n.substring(t)),s%3>0)?!1:!0}function t(n){this.map=typeof n=="string"?wt(n):{}}function wt(n){for(var i={},r=n.split(""),t=0,u,t=0;t<r.length;t++)u=r[t],i[u]=!0;return i}n.fn.alphanum=function(n){var t=u(n),i=this;return o(i,s,t),this};n.fn.alpha=function(n){var t=u("alpha"),i=u(n,t),r=this;return o(r,s,i),this};n.fn.numeric=function(n){var t=l(n),i=this;return o(i,a,t),i.blur(function(){g(this,t)}),this};var v={allow:"",disallow:"",allowSpace:!0,allowNewline:!0,allowNumeric:!0,allowUpper:!0,allowLower:!0,allowCaseless:!0,allowLatin:!0,allowOtherCharSets:!0,forceUpper:!1,forceLower:!1,maxLength:NaN},y={allowPlus:!1,allowMinus:!0,allowThouSep:!0,allowDecSep:!0,allowLeadingSpaces:!1,maxDigits:NaN,maxDecimalPlaces:NaN,maxPreDecimalPlaces:NaN,max:NaN,min:NaN},p={alpha:{allowNumeric:!1},upper:{allowNumeric:!1,allowUpper:!0,allowLower:!1,allowCaseless:!0},lower:{allowNumeric:!1,allowUpper:!1,allowLower:!0,allowCaseless:!0}},w={integer:{allowPlus:!1,allowMinus:!0,allowThouSep:!1,allowDecSep:!1},positiveInteger:{allowPlus:!1,allowMinus:!1,allowThouSep:!1,allowDecSep:!1}},b=k()+d(),r=",",i=".",e=vt(),h=yt();t.prototype.add=function(n){var t=this.clone();for(var i in n.map)t.map[i]=!0;return t};t.prototype.subtract=function(n){var t=this.clone();for(var i in n.map)delete t.map[i];return t};t.prototype.contains=function(n){return this.map[n]?!0:!1};t.prototype.clone=function(){var n=new t;for(var i in this.map)n.map[i]=!0;return n};n.fn.alphanum.backdoorAlphaNum=function(n,t){var i=u(t);return s(n,i)};n.fn.alphanum.backdoorNumeric=function(n,t){var i=l(t);return a(n,i)};n.fn.alphanum.setNumericSeparators=function(n){n.thousandsSeparator.length==1&&n.decimalSeparator.length==1&&(r=n.thousandsSeparator,i=n.decimalSeparator)}}(jQuery),function(n){function t(n,t){if(n.createTextRange){var i=n.createTextRange();i.move("character",t);i.select()}else n.selectionStart!=null&&(n.focus(),n.setSelectionRange(t,t))}function i(n){if("selection"in document){var t=n.createTextRange();try{t.setEndPoint("EndToStart",document.selection.createRange())}catch(i){return 0}return t.text.length}if(n.selectionStart!=null)return n.selectionStart}n.fn.alphanum_caret=function(r,u){return typeof r=="undefined"?i(this.get(0)):this.queue(function(i){if(isNaN(r)){var f=n(this).val().indexOf(r);u===!0?f+=r.length:typeof u!="undefined"&&(f+=u);t(this,f)}else t(this,r);i()})}}(jQuery),function(n){var o=function(n){return n.replace(/([a-z])([a-z]+)/gi,function(n,t,i){return t+i.toLowerCase()}).replace(/_/g,"")},s=function(n){return n.replace(/^([a-z]+)_TO_([a-z]+)/i,function(n,t,i){return i+"_TO_"+t})},t=function(n){return n?n.ownerDocument.defaultView||n.ownerDocument.parentWindow:window},r=function(t){var i=n.Range.current(t).clone(),r=n.Range(t).select(t);return i.overlaps(r)?(i.compare("START_TO_START",r)<1?(startPos=0,i.move("START_TO_START",r)):(fromElementToCurrent=r.clone(),fromElementToCurrent.move("END_TO_START",i),startPos=fromElementToCurrent.toString().length),endPos=i.compare("END_TO_END",r)>=0?r.toString().length:startPos+i.toString().length,{start:startPos,end:endPos}):null},u=function(i){var f=t(i),e,o,s,u;if(i.selectionStart!==undefined)return document.activeElement&&document.activeElement!=i&&i.selectionStart==i.selectionEnd&&i.selectionStart==0?{start:i.value.length,end:i.value.length}:{start:i.selectionStart,end:i.selectionEnd};if(f.getSelection)return r(i,f);try{if(i.nodeName.toLowerCase()=="input")return e=t(i).document.selection.createRange(),o=i.createTextRange(),o.setEndPoint("EndToStart",e),s=o.text.length,{start:s,end:s+e.text.length};if(u=r(i,f),!u)return u;var h=n.Range.current().clone(),c=h.clone().collapse().range,l=h.clone().collapse(!1).range;return c.moveStart("character",-1),l.moveStart("character",-1),u.startPos!=0&&c.text==""&&(u.startPos+=2),u.endPos!=0&&l.text==""&&(u.endPos+=2),u}catch(a){return{start:i.value.length,end:i.value.length}}},f=function(n,r,u){var o=t(n),s,f;if(n.setSelectionRange)u===undefined?(n.focus(),n.setSelectionRange(r,r)):(n.select(),n.selectionStart=r,n.selectionEnd=u);else if(n.createTextRange)s=n.createTextRange(),s.moveStart("character",r),u=u||r,s.moveEnd("character",u-n.value.length),s.select();else if(o.getSelection){var c=o.document,h=o.getSelection(),f=c.createRange(),e=[r,u!==undefined?u:r];i([n],e);f.setStart(e[0].el,e[0].count);f.setEnd(e[1].el,e[1].count);h.removeAllRanges();h.addRange(f)}else o.document.body.createTextRange&&(f=document.body.createTextRange(),f.moveToElementText(n),f.collapse(),f.moveStart("character",r),f.moveEnd("character",u!==undefined?u:r),f.select())},e=function(n,t,i,r){typeof i[0]=="number"&&i[0]<t&&(i[0]={el:r,count:i[0]-n});typeof i[1]=="number"&&i[1]<=t&&(i[1]={el:r,count:i[1]-n})},i=function(n,t,r){var u,o,f;for(r=r||0,f=0;n[f];f++)u=n[f],u.nodeType===3||u.nodeType===4?(o=r,r+=u.nodeValue.length,e(o,r,t,u)):u.nodeType!==8&&(r=i(u.childNodes,t,r));return r};jQuery.fn.selection=function(n,t){return n!==undefined?this.each(function(){f(this,n,t)}):u(this[0])};n.fn.selection.getCharElement=i}(jQuery);$(".ccjs-card").length>0&&function(){function pt(n){var t=typeof n,i;if("object"==t)if(n){if(n instanceof Array)return"array";if(n instanceof Object)return t;if(i=Object.prototype.toString.call(n),"[object Window]"==i)return"object";if("[object Array]"==i||"number"==typeof n.length&&"undefined"!=typeof n.splice&&"undefined"!=typeof n.propertyIsEnumerable&&!n.propertyIsEnumerable("splice"))return"array";if("[object Function]"==i||"undefined"!=typeof n.call&&"undefined"!=typeof n.propertyIsEnumerable&&!n.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==t&&"undefined"==typeof n.call)return"object";return t}function wt(n){return"array"==pt(n)}function gf(n){var t=pt(n);return"array"==t||"object"==t&&"number"==typeof n.length}function h(n){return"string"==typeof n}function bi(n){return"number"==typeof n}function ri(n){var t=typeof n;return"object"==t&&null!=n||"function"==t}function te(n){return n.call.apply(n.bind,arguments)}function ie(n,t){if(!n)throw Error();if(2<arguments.length){var i=Array.prototype.slice.call(arguments,2);return function(){var r=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(r,i),n.apply(t,r)}}return function(){return n.apply(t,arguments)}}function ui(){return ui=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?te:ie,ui.apply(null,arguments)}function fu(n){var t=Array.prototype.slice.call(arguments,1);return function(){var i=t.slice();return i.push.apply(i,arguments),n.apply(this,i)}}function fi(n,t){function i(){}i.prototype=t.prototype;n.pa=t.prototype;n.prototype=new i}function eu(n){return se.test(n)?(-1!=n.indexOf("&")&&(n=n.replace(ue,"&amp;")),-1!=n.indexOf("<")&&(n=n.replace(fe,"&lt;")),-1!=n.indexOf(">")&&(n=n.replace(ee,"&gt;")),-1!=n.indexOf('"')&&(n=n.replace(oe,"&quot;")),n):n}function ou(n){n=String(n);var t=n.indexOf(".");return-1==t&&(t=n.length),t=Math.max(0,2-t),Array(t+1).join("0")+n}function ki(n,t){return n<t?-1:n>t?1:0}function su(){return r.navigator?r.navigator.userAgent:null}function cu(){var n=r.document;if(n)return n.documentMode}function e(n){var t,i,r;if(!(t=tr[n])){t=0;for(var f=String(si).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(n).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),o=Math.max(f.length,e.length),u=0;0==t&&u<o;u++){var s=f[u]||"",h=e[u]||"",c=RegExp("(\\d*)(\\D*)","g"),l=RegExp("(\\d*)(\\D*)","g");do{if(i=c.exec(s)||["","",""],r=l.exec(h)||["","",""],0==i[0].length&&0==r[0].length)break;t=ki(0==i[1].length?0:parseInt(i[1],10),0==r[1].length?0:parseInt(r[1],10))||ki(0==i[2].length,0==r[2].length)||ki(i[2],r[2])}while(0==t)}t=tr[n]=0<=t}return t}function lu(n){var u=0,f=0,t,r,o,e;if(au(n))u=n.selectionStart,f=n.selectionEnd;else if(i&&(t=n.ownerDocument||n.document,r=t.selection.createRange(),"textarea"==n.type?(t=t.body.createTextRange(),t.moveToElementText(n)):t=n.createTextRange(),t=[t,r],r=t[0],t=t[1],r.inRange(t))){if(r.setEndPoint("EndToStart",t),"textarea"==n.type){for(n=t.duplicate(),o=r.text,u=o,t=f=n.text,e=!1;!e;)0==r.compareEndPoints("StartToEnd",r)?e=!0:(r.moveEnd("character",-1),r.text==o?u+="\r\n":e=!0);for(r=!1;!r;)0==n.compareEndPoints("StartToEnd",n)?r=!0:(n.moveEnd("character",-1),n.text==f?t+="\r\n":r=!0);return[u.length,u.length+t.length]}u=r.text.length;f=r.text.length+t.text.length}return[u,f]}function rr(n,t){if(au(n))n.selectionStart=t,n.selectionEnd=t;else if(i){var r=t;"textarea"==n.type&&(r=n.value.substring(0,r).replace(/(\r\n|\r|\n)/g,"\n").length);t=r;r=n.createTextRange();r.collapse(!0);r.move("character",t);r.select()}}function au(n){try{return"number"==typeof n.selectionStart}catch(t){return!1}}function n(n){return"ccjs-"+n}function y(n,t){if(h(n))return h(t)&&1==t.length?n.indexOf(t,0):-1;for(var i=0;i<n.length;i++)if(i in n&&n[i]===t)return i;return-1}function c(n,t){for(var u=n.length,r=h(n)?n.split(""):n,i=0;i<u;i++)i in r&&t.call(void 0,r[i],i,n)}function he(n,t){for(var r=h(n)?n.split(""):n,i=n.length-1;0<=i;--i)i in r&&t.call(void 0,r[i],i,n)}function ut(n,t){for(var r,e=n.length,u=[],o=0,f=h(n)?n.split(""):n,i=0;i<e;i++)i in f&&(r=f[i],t.call(void 0,r,i,n)&&(u[o++]=r));return u}function vu(n,t){for(var r=n.length,u=Array(r),f=h(n)?n.split(""):n,i=0;i<r;i++)i in f&&(u[i]=t.call(void 0,f[i],i,n));return u}function ce(n,t){var i={};return c(n,function(r,u){i=t.call(void 0,i,r,u,n)}),i}function ft(n){var i=n.length,r,t;if(0<i){for(r=Array(i),t=0;t<i;t++)r[t]=n[t];return r}return[]}function li(n){return a.splice.apply(n,yu(arguments,1))}function yu(n,t,i){return 2>=arguments.length?a.slice.call(n,t):a.slice.call(n,t,i)}function pu(n,t,i){if(this.o=null,n.length!=t.length)return null;this.o=n;for(var r=1;r<n.length;r++)null==n[r]?n[r]=n[r-1]+1:i&&(n[r]+=n[r-1]);this.N=t}function wu(n,t){var i=ur(n,t);return 0>i?null:n.N[i]}function ur(n,t){for(var u,f=n.o,i=0,r=f.length;8<r-i;)u=r+i>>1,f[u]<=t?i=u:r=u;for(;i<r&&!(t<f[i]);++i);return i-1}function ae(n,t,i){var r=n.value,s=0<=r.indexOf("-")?"-":" ";var r=ve(r),f=we(r),e=f||o.P,r=ke(r,e),u=r.qa,h=r.ma;setTimeout(function(){var r=lu(n)[1];li(u,r,0,"cursor");for(var v=y(u,"cursor"),l=e.h,r=ft(u),v=h?u.length:v,c=0,o=0;o<v;){switch(r[o]){case"delimiter":-1===y(l,c)&&(a.splice.call(r,o,1),o--,c--);break;case"cursor":c--;break;default:-1!==y(l,c)&&(li(r,o,0,"delimiter"),c++,o++)}c++;o++}l=pe(r,s);v=y(r,"cursor");n.value=l;i||rr(n,v);r=de(ut(r,bi),f);t(f,r,l.replace(/\D/g,""))},0)}function ve(n){return n=n.replace(/[^0-9 -]/g,"").split(""),vu(n,function(n){return/[ -]/.test(n)?"delimiter":parseInt(n,10)})}function ye(n){return ut(n,function(n){return"cursor"!==n&&"delimiter"!==n}).join("")}function pe(n,t){var i=t||" ";return vu(ut(n,function(n){return"cursor"!==n}),function(n){return"delimiter"==n?i:n}).join("")}function we(n){return n=ye(n),o.fa(n)}function be(n,t){var i=ft(n);return he(t,function(n){a.splice.call(i,n,1)}),i}function ke(n,t){for(var u=t.d[t.d.length-1],f=[],r=0,i=0;i<n.length;i++)/\d/.test(n[i])&&(r++,r>u&&f.push(i));return{qa:be(n,f),ma:r>=u}}function de(n,t){var r;if(t){if(n.length<t.d[0])return 0;if(r=t.i){r=n[n.length-1];for(var o=n.slice(0,-1),u=0,i,e=!0,f=o.length-1;0<=f;f--)i=o[f],e?(i*=2,u=10<=i?u+(i-9):u+i):u+=i,e=!e;r=r!==9*u%10}if(r)return 1}else return 6<=n.length?2:0;return null}function l(n,t,i){i?st(n,t):ku(n,t)}function gu(t){var i=n("active"),r=!vi(t,i);l(t,i,r)}function fr(n,t,i){bi(n)?(this.b=new Date(n,t||0,i||1),er(this,i||1)):ri(n)?(this.b=new Date(n.getFullYear(),n.getMonth(),n.getDate()),er(this,n.getDate())):(this.b=new Date(re()),this.b.setHours(0),this.b.setMinutes(0),this.b.setSeconds(0),this.b.setMilliseconds(0))}function er(n,t){n!=null&&n.getDate()!=t&&n.b.setUTCHours(n.b.getUTCHours()+(n.getDate()<t?1:-1))}function no(n){var t;t=n.className;t=h(t)&&t.match(/\S+/g)||[];for(var i=yu(arguments,1),f=t.length+i.length,u=t,r=0;r<i.length;r++)0<=y(u,i[r])||u.push(i[r]);return n.className=t.join(" "),t.length==f}function to(n,t){for(var i in n)t.call(void 0,n[i],i,n)}function nf(n){for(var t,i,u,r=1;r<arguments.length;r++){i=arguments[r];for(t in i)n[t]=i[t];for(u=0;u<or.length;u++)t=or[u],Object.prototype.hasOwnProperty.call(i,t)&&(n[t]=i[t])}}function sr(n,t){var i=t||document;return i.querySelectorAll&&i.querySelector?i.querySelectorAll("."+n):i.getElementsByClassName?i.getElementsByClassName(n):gt("*",n,t)}function s(n,t){var i=t||document,r=null;return(r=i.querySelectorAll&&i.querySelector?i.querySelector("."+n):sr(n,t)[0])||null}function gt(n,t,i){var u=document,f,e,r,o;if(i=i||u,r=n&&"*"!=n?n.toUpperCase():"",i.querySelectorAll&&i.querySelector&&(r||t))return i.querySelectorAll(r+(t?"."+t:""));if(t&&i.getElementsByClassName){if(n=i.getElementsByClassName(t),r){for(i={},f=u=0;e=n[f];f++)r==e.nodeName&&(i[u++]=e);return i.length=u,i}return n}if(n=i.getElementsByTagName(r||"*"),t){for(i={},f=u=0;e=n[f];f++)r=e.className,(o="function"==typeof r.split)&&(o=0<=y(r.split(/\s+/),t)),o&&(i[u++]=e);return i.length=u,i}return n}function fo(n,t){to(t,function(t,i){"style"==i?n.style.cssText=t:"class"==i?n.className=t:"for"==i?n.htmlFor=t:i in hr?n.setAttribute(hr[i],t):0==i.lastIndexOf("aria-",0)||0==i.lastIndexOf("data-",0)?n.setAttribute(i,t):n[i]=t})}function cr(){var i=arguments,u=document,t=i[0],n=i[1],r;return!io&&n&&(n.name||n.type)&&(t=["<",t],n.name&&t.push(' name="',eu(n.name),'"'),n.type&&(t.push(' type="',eu(n.type),'"'),r={},nf(r,n),delete r.type,n=r),t.push(">"),t=t.join("")),t=u.createElement(t),n&&(h(n)?t.className=n:wt(n)?no.apply(null,[t].concat(n)):fo(t,n)),2<i.length&&rf(u,t,i,2),t}function rf(n,t,i,r){function f(i){i&&t.appendChild(h(i)?n.createTextNode(i):i)}for(;r<i.length;r++){var u=i[r];!gf(u)||ri(u)&&0<u.nodeType?f(u):c(co(u)?ft(u):u,f)}}function eo(){var n,t=document;if(n=t.createElement("div"),i?(n.innerHTML="<br><div class=ccjs-csc-diagram-wrapper><div class=ccjs-csc-diagram><div class=ccjs-barcode><\/div><div class=ccjs-signature>Signature and digits from card #<\/div><div class=ccjs-card-code>123<\/div><div class=ccjs-explanation>On most cards, the 3-digit security code is on the back, to the right of the signature.<\/div><button type=button class=ccjs-close>&times;<\/button><\/div><div class=ccjs-csc-diagram-amex><div class=ccjs-card-number>XXXX XXXXXX XXXXX<\/div><div class=ccjs-explanation>On American Express cards, the 4-digit security code is on the front, to the top-right of the card number.<\/div><div class=ccjs-card-code>1234<\/div><button type=button class=ccjs-close>&times;<\/button><\/div><\/div>",n.removeChild(n.firstChild)):n.innerHTML="<div class=ccjs-csc-diagram-wrapper><div class=ccjs-csc-diagram><div class=ccjs-barcode><\/div><div class=ccjs-signature>Signature and digits from card #<\/div><div class=ccjs-card-code>123<\/div><div class=ccjs-explanation>On most cards, the 3-digit security code is on the back, to the right of the signature.<\/div><button type=button class=ccjs-close>&times;<\/button><\/div><div class=ccjs-csc-diagram-amex><div class=ccjs-card-number>XXXX XXXXXX XXXXX<\/div><div class=ccjs-explanation>On American Express cards, the 4-digit security code is on the front, to the top-right of the card number.<\/div><div class=ccjs-card-code>1234<\/div><button type=button class=ccjs-close>&times;<\/button><\/div><\/div>",1==n.childNodes.length)n=n.removeChild(n.firstChild);else{for(t=t.createDocumentFragment();n.firstChild;)t.appendChild(n.firstChild);n=t}return n}function oo(n){rf(ar(n),n,arguments,1)}function lr(n,t){t.parentNode&&t.parentNode.insertBefore(n,t.nextSibling)}function so(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function uf(n){if(n!=null)return ro&&void 0!=n.children?n.children:ut(n.childNodes,function(n){return 1==n.nodeType})}function ho(n){return uo&&!(i&&e("9")&&!e("10")&&r.SVGElement&&n instanceof r.SVGElement)?n.parentElement:(n=n.parentNode,ri(n)&&1==n.nodeType?n:null)}function ar(n){return 9==n.nodeType?n:n.ownerDocument||n.document}function ht(n,t){if("textContent"in n)n.textContent=t;else if(n.firstChild&&3==n.firstChild.nodeType){for(;n.lastChild!=n.firstChild;)n.removeChild(n.lastChild);n.firstChild.data=t}else{for(var i;i=n.firstChild;)n.removeChild(i);n.appendChild(ar(n).createTextNode(String(t)))}}function ef(n){if(tf&&"innerText"in n)n=n.innerText.replace(/(\r\n|\r|\n)/g,"\n");else{var t=[];of(n,t,!0);n=t.join("")}return n=n.replace(/ \xAD /g," ").replace(/\xAD/g,""),n=n.replace(/\u200B/g,""),tf||(n=n.replace(/ +/g," "))," "!=n&&(n=n.replace(/^\s*/,"")),n}function of(n,t,i){if(!(n.nodeName in ff))if(3==n.nodeType)i?t.push(String(n.nodeValue).replace(/(\r\n|\r|\n)/g,"")):t.push(n.nodeValue);else if(n.nodeName in vr)t.push(vr[n.nodeName]);else for(n=n.firstChild;n;)of(n,t,i),n=n.nextSibling}function co(n){if(n&&"number"==typeof n.length){if(ri(n))return"function"==typeof n.item||"string"==typeof n.item;if("function"==pt(n))return"function"==typeof n.item}return!1}function lo(){var n=document;try{return n&&n.activeElement}catch(t){}return null}function yi(){0!=sf&&(this[uu]||(this[uu]=++ne))}function pi(n){try{return!(!n||!n[yr])}catch(t){return!1}}function ao(n,t,i,r,u){this.m=n;this.F=null;this.src=t;this.type=i;this.capture=!!r;this.B=u;this.key=++hf;this.r=this.w=!1}function pr(n){n.r=!0;n.m=null;n.F=null;n.src=null;n.B=null}function ct(n){this.src=n;this.g={};this.G=0}function wr(n,t){var i=t.type,r,u,f;i in n.g&&(r=n.g[i],u=y(r,t),(f=0<=u)&&a.splice.call(r,u,1),f&&(pr(t),0==n.g[i].length&&(delete n.g[i],n.G--)))}function br(n,t,i,r){for(var f,u=0;u<n.length;++u)if(f=n[u],!f.r&&f.m==t&&f.capture==!!i&&f.B==r)return u;return-1}function p(n,t){this.type=n;this.currentTarget=this.target=t}function dr(n){return dr[" "](n),n}function lt(n,t){var r,i,u;if(n){if(r=this.type=n.type,p.call(this,r),this.target=n.target||n.srcElement,this.currentTarget=t,i=n.relatedTarget,i){if(g){try{dr(i.nodeName);u=!0}catch(f){}u=!1;u||(i=null)}}else"mouseover"==r?i=n.fromElement:"mouseout"==r&&(i=n.toElement);this.relatedTarget=i;this.offsetX=nt||void 0!==n.offsetX?n.offsetX:n.layerX;this.offsetY=nt||void 0!==n.offsetY?n.offsetY:n.layerY;this.clientX=void 0!==n.clientX?n.clientX:n.pageX;this.clientY=void 0!==n.clientY?n.clientY:n.pageY;this.screenX=n.screenX||0;this.screenY=n.screenY||0;this.button=n.button;this.keyCode=n.keyCode||0;this.charCode=n.charCode||("keypress"==r?n.keyCode:0);this.ctrlKey=n.ctrlKey;this.altKey=n.altKey;this.shiftKey=n.shiftKey;this.metaKey=n.metaKey;this.state=n.state;this.I=n;n.defaultPrevented&&this.preventDefault();delete this.n}}function v(n,t,i,r,u){var f,e;if(n!=null){if(wt(t)){for(f=0;f<t.length;f++)v(n,t[f],i,r,u);return null}if(i=iu(i),pi(n))n=n.L(t,i,r,u);else{if(!t)throw Error("Invalid event type");f=!!r;e=ni(n);e||(n[gr]=e=new ct(n));i=e.add(t,i,!1,r,u);i.F||(r=vo(),i.F=r,r.src=n,r.m=i,n.addEventListener?n.addEventListener(t,r,f):n.attachEvent(t in at?at[t]:at[t]="on"+t,r),lf++);n=i}return n}}function vo(){var t=yo,n=kr?function(i){return t.call(n.src,n.m,i)}:function(i){return i=t.call(n.src,n.m,i),i?void 0:i};return n}function af(n,t,i,r,u){if(wt(t))for(var f=0;f<t.length;f++)af(n,t[f],i,r,u);else i=iu(i),pi(n)?n.M(t,i,r,u):n&&(n=ni(n))&&(t=n.t(t,i,!!r,u))&&nu(t)}function nu(n){var i,t,r;bi(n)||!n||n.r||(i=n.src,pi(i)?wr(i.p,n):(t=n.type,r=n.F,i.removeEventListener?i.removeEventListener(t,r,n.capture):i.detachEvent&&i.detachEvent(t in at?at[t]:at[t]="on"+t,r),lf--,(t=ni(i))?(wr(t,n),0==t.G&&(t.src=null,i[gr]=null)):pr(n)))}function vf(n,t,i,r){var f=1,u;if((n=ni(n))&&(t=n.g[t]))for(t=ft(t),n=0;n<t.length;n++)u=t[n],u&&u.capture==i&&!u.r&&(f&=!1!==yf(u,r));return Boolean(f)}function yf(n,t){var i=n.m,r=n.B||n.src;return n.w&&nu(n),i.call(r,t)}function yo(n,t){var u,o,i,f,e;if(n.r)return!0;if(!kr){if(!(u=t))n:{for(u=["window","event"],o=r;i=u.shift();)if(null!=o[i])o=o[i];else{u=null;break n}u=o}if(i=u,u=new lt(i,this),o=!0,!(0>i.keyCode||void 0!=i.returnValue)){if(f=!1,0==i.keyCode)try{i.keyCode=-1}catch(s){f=!0}for((f||void 0==i.returnValue)&&(i.returnValue=!0),i=[],f=u.currentTarget;f;f=f.parentNode)i.push(f);for(f=n.type,e=i.length-1;!u.n&&0<=e;e--)u.currentTarget=i[e],o&=vf(i[e],f,!0,u);for(e=0;!u.n&&e<i.length;e++)u.currentTarget=i[e],o&=vf(i[e],f,!1,u)}return o}return yf(n,new lt(t,this))}function ni(n){if(n!=null)return n=n[gr],n instanceof ct?n:null}function iu(n){return"function"==pt(n)?n:n[tu]||(n[tu]=function(t){return n.handleEvent(t)})}function ti(){yi.call(this);this.p=new ct(this);this.ca=this}function wi(n,t,i,r){var f,e,u,o,s;if(t=n.p.g[t],!t)return!0;for(t=ft(t),f=!0,e=0;e<t.length;++e)u=t[e],u&&!u.r&&u.capture==i&&(o=u.m,s=u.B||u.src,u.w&&wr(n.p,u),f=!1!==o.call(s,r)&&f);return f&&!1!=r.Z}function po(n,t){if("function"==pt(n))t&&(n=ui(n,t));else if(n&&"function"==typeof n.handleEvent)n=ui(n.handleEvent,n);else throw Error("Invalid listener argument");return r.setTimeout(n,0)}function ii(n){yi.call(this);this.V=n;this.W={}}function wo(n){if(n.altKey&&!n.ctrlKey||n.metaKey||112<=n.keyCode&&123>=n.keyCode)return!1;switch(n.keyCode){case 18:case 20:case 93:case 17:case 40:case 35:case 27:case 36:case 45:case 37:case 224:case 91:case 144:case 12:case 34:case 33:case 19:case 255:case 44:case 39:case 145:case 16:case 38:case 224:case 92:return!1;case 0:return!g;default:return 166>n.keyCode||183<n.keyCode}}function vt(n){ti.call(this);this.s=n;n=i||nt&&!e("531")&&"TEXTAREA"==n.tagName;this.ea=new ii(this);this.ea.L(this.s,n?["keydown","paste","cut","drop","input"]:"input",this)}function pf(n){null!=n.v&&(r.clearTimeout(n.v),n.v=null)}function wf(n){return n=new lt(n.I),n.type="input",n}function yt(n,t){n!=null&&null==n.getAttribute("autocomplete")&&(n.setAttribute("autocomplete",t),n.setAttribute("autocompletetype",t),n.setAttribute("x-autocompletetype",t))}function bo(n,t){if(n!=null){for(var u=uf(n),h=u.length-1,e=u[u.length-1],l=e.value.length,e=ef(e).length,i=String(t),o=parseInt(i,10),s=[],f,r=0;r<h;r++)f=i.slice(i.length-l,i.length),i=i.slice(i.length-e,i.length),f=cr("option",{value:f}),ht(f,i),s.push(f),o++,i=String(o);for(r=u.length;1<=r;r--)so(u[r]);c(s,function(t){oo(n,t)})}}function ko(n,t,i){setTimeout(function(){var r,f,u;if(t!==i){if(r=lu(n)[1],n.value=i,t.length>i.length){for(f=t.length,u=0;u<i.length;u++)if(t.charAt(u)!==i.charAt(u)){f=u;break}r=f===r?r:f+1===r?Math.max(0,r-1):r}else r=t.length<i.length?r+1:r;rr(n,r)}},0)}function go(t){var i=f,r=s(n("hidden-card-type"),i),u;r?(t.H=r,u=uf(r),u=ft(u),t.A=ce(u,function(n,t){var i=t.className;return i&&(n[i]=ef(t)),n}),(i=s(n("type-read-only"),i))?t.l=i:(t.l=cr("div",n("type-read-only")),lr(t.l,r))):t.l=cr("div",n("type-read-only"))}var t,r=this,uu="closure_uid_"+(1e9*Math.random()>>>0),ne=0,re=Date.now||function(){return+new Date},ue=/&/g,fe=/</g,ee=/>/g,oe=/\"/g,se=/[&<>\"]/,it,rt,ei,di,bt,hu,si,dt,hi,gi,kt,nr,tr,ir,ci,a,et,or,hr,ff,vr,sf,yr,hf,kr,cf,tu,ru;di=ei=rt=it=!1;(bt=su())&&(hu=r.navigator,it=0==bt.lastIndexOf("Opera",0),rt=!it&&(-1!=bt.indexOf("MSIE")||-1!=bt.indexOf("Trident")),ei=!it&&-1!=bt.indexOf("WebKit"),di=!it&&!ei&&!rt&&"Gecko"==hu.product);var oi=it,i=rt,g=di,nt=ei;kt="";oi&&r.opera?(hi=r.opera.version,kt="function"==typeof hi?hi():hi):(g?dt=/rv\:([^\);]+)(\)|;)/:i?dt=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:nt&&(dt=/WebKit\/(\S+)/),dt)&&(gi=dt.exec(su()),kt=gi?gi[1]:"");i&&(nr=cu(),nr>parseFloat(kt)&&(si=String(nr)));si=kt;tr={};ir=r.document;ci=ir&&i?cu()||("CSS1Compat"==ir.compatMode?parseInt(si,10):5):void 0;a=Array.prototype;var w=[4,8,12],b=[4,9,14],o={O:{j:[[34],[37]],d:[15],e:3,c:4,a:n("amex"),k:"American Express",f:[4,10],h:[4,11],i:!0},ta:{j:[[300,305],[309],[36],[38,39]],d:[14],e:3,c:3,a:n("diners-club"),k:"Diners Club",f:[4,10],h:[4,11],i:!0},va:{j:[[3528,3589]],d:[16],e:3,c:3,a:n("jcb"),k:"JCB",f:w,h:b,i:!0},ua:{j:[[6011],[622126,622925],[644,649],[65]],d:[16],e:3,c:3,a:n("discover"),k:"Discover",f:w,h:b,i:!0},sa:{j:[[5019]],d:[16],e:3,c:3,a:n("dankort"),k:"Dankort",f:w,h:b,i:!0},wa:{j:[[6304],[6706],[6771],[6709]],d:[16,17,18],e:3,c:3,a:n("laser"),k:"Laser",f:w,h:b,i:!0},aa:{j:[[5018],[5020],[5038],[5893],[6304],[6759],[6761],[6762],[6763],[6390]],d:[16,12,13,14,15,17,18,19],e:3,c:3,a:n("maestro"),k:"Maestro",f:w,h:b,i:!0},xa:{j:[[2221,2720],[50,55]],d:[16],e:3,c:3,a:n("mastercard"),k:"MasterCard",f:w,h:b,i:!0},ya:{j:[[62],[88]],d:[16,17,18,19],e:3,c:3,a:n("unionpay"),k:"UnionPay",f:[4,8,12,16],h:[4,9,14,19],la:!0,i:!1},P:{j:[[4]],d:[16],e:3,c:3,a:n("visa"),k:"Visa",f:w,h:b,i:!0},Q:{j:[[4026],[417500],[4405],[4508],[4844],[4913],[4917]],d:[16],e:3,c:3,a:n("visa-electron"),k:"Visa Electron",f:w,h:b,i:!0}},tt=new pu([],[]),bu=[],k;for(var le in o)for(k=o[le],bu.push(k.a),c(k.j,function(n){var t=n[0],i,r;n=1===n.length?t:n[1];t=new pu([t,n+1],[k,wu(tt,n+1)],void 0);i=t.o[0];n=ur(tt,i);r=t.o;r=ur(tt,r[r.length-1]);i!=tt.o[n]&&n++;i=r-n+1;fu(li,tt.o,n,i).apply(null,t.o);fu(li,tt.N,n,i).apply(null,t.N)}),k.ba=[],et=0;et<k.f.length;et++)k.ba[et]=k.f[et]-et;o.ha=function(){return bu};o.fa=function(n){var r=n.split(""),t,i;if(0==r[0])return 0===n.indexOf("0604")?o.aa:null;for(n=Math.min(r.length,6),i=n-1;0<=i&&(t=wu(tt,r.slice(0,i+1).join("")),null==t);i--);return!t||t.la&&6!==n?null:t};var ot=!!r.DOMTokenList,ai=ot?function(n){return n.classList}:function(n){return n=n.className,h(n)&&n.match(/\S+/g)||[]},vi=ot?function(n,t){return n.classList.contains(t)}:function(n,t){var i=ai(n);return 0<=y(i,t)},st=ot?function(n,t){n!=null&&n.classList.add(t)}:function(n,t){vi(n,t)||(n.className+=0<n.className.length?" "+t:t)},ge=ot?function(n,t){c(t,function(t){st(n,t)})}:function(n,t){var i={},r;c(ai(n),function(n){i[n]=!0});c(t,function(n){i[n]=!0});n.className="";for(r in i)n.className+=0<n.className.length?" "+r:r},ku=ot?function(n,t){n!=null&&n.classList.remove(t)}:function(n,t){vi(n,t)&&(n.className=ut(ai(n),function(n){return n!=t}).join(" "))},du=ot?function(n,t){c(t,function(t){ku(n,t)})}:function(n,t){n.className=ut(ai(n),function(n){return!(0<=y(t,n))}).join(" ")};t=fr.prototype;t.getFullYear=function(){return this.b.getFullYear()};t.getYear=function(){return this.getFullYear()};t.getMonth=function(){return this.b.getMonth()};t.getDate=function(){return this.b.getDate()};t.getTime=function(){return this.b.getTime()};t.getUTCHours=function(){return this.b.getUTCHours()};t.setFullYear=function(n){this.b.setFullYear(n)};t.setMonth=function(n){this.b.setMonth(n)};t.setDate=function(n){this.b.setDate(n)};t.add=function(n){var i;if(n.ra||n.na){var t=this.getMonth()+n.na+12*n.ra,r=this.getYear()+Math.floor(t/12),t=t%12;0>t&&(t+=12);n:{switch(t){case 1:i=0!=r%4||0==r%100&&0!=r%400?28:29;break n;case 5:case 8:case 10:case 3:i=30;break n}i=31}i=Math.min(i,this.getDate());this.setDate(1);this.setFullYear(r);this.setMonth(t);this.setDate(i)}n.da&&(n=new Date(new Date(this.getYear(),this.getMonth(),this.getDate(),12).getTime()+864e5*n.da),this.setDate(1),this.setFullYear(n.getFullYear()),this.setMonth(n.getMonth()),this.setDate(n.getDate()),er(this,n.getDate()))};t.toString=function(){return[this.getFullYear(),ou(this.getMonth()+1),ou(this.getDate())].join("")+""};t.valueOf=function(){return this.b.valueOf()};or="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");var io=!i||i&&9<=ci,ro=!g&&!i||i&&i&&9<=ci||g&&e("1.9.1"),tf=i&&!e("9"),uo=i||oi||nt;hr={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};ff={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1};vr={IMG:" ",BR:"\n"};sf=0;yr="closure_listenable_"+(1e6*Math.random()|0);hf=0;ct.prototype.add=function(n,t,i,r,u){var f=this.g[n],e;return f||(f=this.g[n]=[],this.G++),e=br(f,t,r,u),-1<e?(n=f[e],i||(n.w=!1)):(n=new ao(t,this.src,n,!!r,u),n.w=i,f.push(n)),n};ct.prototype.remove=function(n,t,i,r){if(!(n in this.g))return!1;var u=this.g[n];return t=br(u,t,i,r),-1<t?(pr(u[t]),a.splice.call(u,t,1),0==u.length&&(delete this.g[n],this.G--),!0):!1};ct.prototype.t=function(n,t,i,r){n=this.g[n];var u=-1;return n&&(u=br(n,t,i,r)),-1<u?n[u]:null};kr=!i||i&&9<=ci;cf=i&&!e("9");nt&&e("528");g&&e("1.9b")||i&&e("8")||oi&&e("9.5")||nt&&e("528");g&&!e("8")||i&&e("9");p.prototype.n=!1;p.prototype.defaultPrevented=!1;p.prototype.Z=!0;p.prototype.preventDefault=function(){this.defaultPrevented=!0;this.Z=!1};dr[" "]=function(){};fi(lt,p);t=lt.prototype;t.target=null;t.relatedTarget=null;t.offsetX=0;t.offsetY=0;t.clientX=0;t.clientY=0;t.screenX=0;t.screenY=0;t.button=0;t.keyCode=0;t.charCode=0;t.ctrlKey=!1;t.altKey=!1;t.shiftKey=!1;t.metaKey=!1;t.I=null;t.preventDefault=function(){lt.pa.preventDefault.call(this);var n=this.I;if(n.preventDefault)n.preventDefault();else if(n.returnValue=!1,cf)try{(n.ctrlKey||112<=n.keyCode&&123>=n.keyCode)&&(n.keyCode=-1)}catch(t){}};var gr="closure_lm_"+(1e6*Math.random()|0),at={},lf=0;tu="__closure_events_fn_"+(1e9*Math.random()>>>0);fi(ti,yi);ti.prototype[yr]=!0;t=ti.prototype;t.Y=null;t.addEventListener=function(n,t,i,r){v(this,n,t,i,r)};t.removeEventListener=function(n,t,i,r){af(this,n,t,i,r)};t.dispatchEvent=function(n){var r,i=this.Y,e,t,f,u;if(i)for(r=[];i;i=i.Y)r.push(i);if(i=this.ca,e=n.type||n,h(n)?n=new p(n,i):n instanceof p?n.target=n.target||i:(t=n,n=new p(e,i),nf(n,t)),t=!0,r)for(u=r.length-1;!n.n&&0<=u;u--)f=n.currentTarget=r[u],t=wi(f,e,!0,n)&&t;if(n.n||(f=n.currentTarget=i,t=wi(f,e,!0,n)&&t,n.n||(t=wi(f,e,!1,n)&&t)),r)for(u=0;!n.n&&u<r.length;u++)f=n.currentTarget=r[u],t=wi(f,e,!1,n)&&t;return t};t.L=function(n,t,i,r){return this.p.add(n,t,!1,i,r)};t.M=function(n,t,i,r){return this.p.remove(n,t,i,r)};t.t=function(n,t,i,r){return this.p.t(n,t,i,r)};fi(ii,yi);ru=[];ii.prototype.L=function(n,t,i,r,u){var f,e;for(wt(t)||(ru[0]=t,t=ru),f=0;f<t.length;f++){if(e=v(n,t[f],i||this,r||!1,u||this.V||this),!e)break;this.W[e.key]=e}return this};ii.prototype.M=function(n,t,i,r,u){if(wt(t))for(var f=0;f<t.length;f++)this.M(n,t[f],i,r,u);else u=u||this.V||this,i=iu(i||this),r=!!r,t=pi(n)?n.t(t,i,r,u):n?(n=ni(n))?n.t(t,i,r,u):null:null,t&&(nu(t),delete this.W[t.key]);return this};ii.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};fi(vt,ti);vt.prototype.v=null;vt.prototype.handleEvent=function(n){var t,r;"input"==n.type?(pf(this),oi&&this.s!=ar(this.s).activeElement||this.dispatchEvent(wf(n))):("keydown"!=n.type||wo(n))&&(t="keydown"==n.type?this.s.value:null,i&&229==n.keyCode&&(t=null),r=wf(n),pf(this),this.v=po(function(){this.v=null;this.s.value!=t&&this.dispatchEvent(r)},this))};var bf=n("card-type-set"),kf=n("card-type-error"),df=function(){return a.concat.apply(a,arguments)}(o.ha(),bf,kf),u=r.ccjs||{},f=s(n("card")),d=new function(){function g(){var n=t.u;t.u=t.C&&t.D&&t.K&&t.J;n!==t.u&&c(t.X,function(n){n(t.u)})}function ut(){vi(b,"disabled")||(b.focus(),gu(b),gu(it))}function ft(n,i){var r=new fr(i,n,1),r=tt.getFullYear()<r.getFullYear()?!0:tt.getFullYear()===r.getFullYear()?tt.getMonth()<=r.getMonth()?!0:!1:!1;return t.J=r,g(),r}var u,w,et,t,e,nt,it,b,p,h,k,d;if(this.X=[],$(".ccjs-card").length!=0){this.$="Sorry, we don't accept %s.";var a=gt("fieldset",n("expiration"),f)[0],r=gt("input",n("csc"),f)[0],y=gt("input",n("number"),f)[0],i=y.cloneNode(!0);i.removeAttribute("data-encrypted-name");i.className=n("number-formatted");st(y,n("hidden"));lr(i,y);i.className=$(y).attr("class");$(y).remove();lo()===y&&(i.focus(),u=i.value,u&&(u=u.length,0<u&&rr(i,u)));w=gt("input",n("name"),f)[0];st(f,n("js-enabled"));go(this);et=/\D/g;t=this;i.setAttribute("inputmode","numeric");yt(i,"cc-number");this.u=this.J=this.K=this.D=this.C=!1;u=this.ka=function(u){ae(i,function(u,h,c){var a,v;(e=u)&&e!==o.Q&&(t.A.hasOwnProperty(e.a)||(h=1));u=t;a=e;a?(u.H&&(u.H.selectedIndex=-1,v=s(a.a,u.H),v&&(v.selected=!0)),du(u.l,df),u.A&&(v=u.A[a.a],null==v&&(a===o.Q?v=u.A[o.P.a]:(st(f,kf),ht(u.l,u.$.replace(/%s/,a.k)))),ge(f,[a.a,bf]),ht(u.l,v),st(u.l,a.a))):du(f,df);e?(r.value=r.value.slice(0,e.c),r.setAttribute("placeholder","••••".slice(0,e.c))):r.setAttribute("placeholder","•••");y.value=c;null===h?(l(i,n("complete"),!0),t.C=!0):(l(i,n("complete"),!1),t.C=!1);g();1===h||2===h?l(i,n("error"),!0):l(i,n("error"),!1)},u)};v(new vt(i),"input",u);nt=!1;this.T=function(){nt=""!==w.value;t.K=nt;g();l(w,n("complete"),nt)};v(new vt(w),"input",this.T);u=eo();lr(u,ho(r));it=sr(n("csc-diagram-wrapper"),f)[0];b=s(n("csc-help"),f);b.setAttribute("tabindex",-1);v(b,"click",ut);c(sr(n("close"),it),function(n){v(n,"click",ut)});r.setAttribute("inputmode","numeric");r.setAttribute("pattern","\\d*");yt(r,"cc-csc");this.R=function(){var i=r.value,u=i.replace(et,""),f,s;null!=e?(f=e.c,s=e.e):(f=o.O.c,s=o.O.e);u=u.slice(0,f);ko(r,i,u);i=u.length;t.D=i===s||i===f?!0:!1;g();l(r,n("complete"),t.D)};v(new vt(r),"input",this.R);yt(w,"cc-full-name");p=s(n("month"),a);h=s(n("year"),a);rt=s(n("monthyear"),a);yt(p,"cc-exp-month");yt(h,"cc-exp-year");yt(rt,"cc-exp-monthyear");var tt=new fr,u=tt.getYear(),wt=u.toString().slice(0,-2);bo(h,u);this.S=function(){if(p!=null){var t=p.value;"MM"!==t&&(k=parseInt(t,10)-1,null!=k&&null!=d&&(t=ft(k,d),l(a,n("complete"),t),l(a,n("error"),!t)))}};v(p,"change",this.S);this.U=function(){if(h!=null){var t=h.value;"YY"!==t&&(d=parseInt(wt+t,10),null!=k&&null!=d&&(t=ft(k,d),l(a,n("complete"),t),l(a,n("error"),!t)))}};v(h,"change",this.U);this.ia=function(){return i.value};this.ja=function(){return r.value};this.getMonth=function(){if(p!=null)return p.value};this.getYear=function(){if(h!=null)return h.value};this.getName=function(){return w.value};var ot="",ct="",lt="",at="",pt="";this.ga=function(){var n=t.ia();ot!==n&&(ot=n,t.ka(!0));n=t.ja();ct!==n&&(ct=n,t.R());n=t.getMonth();lt!==n&&(lt=n,t.S());n=t.getYear();at!==n&&(at=n,t.U());n=t.getName();pt!==n&&(pt=n,t.T())};this.oa=function(){t.ga();setTimeout(arguments.callee,1e3)}}};r.ccjs=r.ccjs||u;r.creditcardjs=r.creditcardjs||u;u.CARD_NUMBER="CARD_NUMBER";u.SECURITY_CODE="SECURITY_CODE";u.EXPIRATION="EXPIRATION";u.NAME="NAME";u.onload=function(n){n()};u.getInvalidFields=function(){var n=[];return d.C||n.push(u.CARD_NUMBER),d.D||n.push(u.SECURITY_CODE),d.J||n.push(u.EXPIRATION),d.K||n.push(u.NAME),n};u.isValid=function(){return d.u};u.onValidityChange=function(n){d.X.push(n)};u.setLocale=function(t){var u=s(n("signature"),f),i=s(n("csc-diagram"),f),r=s(n("csc-diagram-amex"),f),i=s(n("explanation"),i),r=s(n("explanation"),r);ht(u,t.signatureHelp);ht(r,t.americanHelp);ht(i,t.cardsHelp);(t=t.unsupportedCard)&&(d.$=t)};d.oa();c(u.q||[],function(n){n[0]()})}()