function CFEvents(a){function b(a){return c.hasOwnProperty(a)}var c={};this.subscribe=function(a,d){b(a)||(c[a]=[]),c[a].push(d)},this.trigger=function(d,e){b(d)&&c[d].forEach(function(b){void 0===e&&(e=a.getState(d)),b(d,e)})},this.emit=function(a,d){b(a)&&c[a].forEach(function(b){b(d,a)})},this.detach=function(a,d){if(b(a))if(null===d)delete c[a];else for(var e in c[a])d===e&&c[a].splice(e,1)}}function CFState(a,b){function c(a){return m.hasOwnProperty(a)}function d(a){var c=b("#"+a);if(c.length)return c.on("change keyup",function(){var a=b(this);n[a.attr("id")]=f(a),j.mutateState([a.attr("id")],a.val())}),n[a]=f(b(document.getElementById(a))),j.mutateState([c.attr("id")],c.val()),c.trigger("cf.bind",{field:c.attr("id")}),!0;if(c=b("."+a),c.length){if("object"==typeof c){var d=[],e=0;c.each(function(c,h){var i=b(h),j=0;i.prop("checked")&&(j+=g(f(i)),e+=j,d.push(i.val())),n[a]=e})}return c.on("change",function(){var a,d,e=[],h=b(this),i=h.attr("type");switch(i){case"radio":a=h.data("radio-field"),d=b("[data-radio-field="+a+"]"),e="";break;case"checkbox":a=h.data("checkbox-field"),d=b("[data-checkbox-field="+a+"]");break;default:a=h.data("field"),d=b("[data-field="+a+"]")}if("checkbox"===i){var k,l=0;d.length?d.each(function(a,c){k=b(c),k.prop("checked")&&(l+=g(f(k)),e.push(k.val()))}):e=[],n[a]=l}else d.length?1==d.length?e=f(b(d[0])):d.each(function(c,d){var g=b(d);g.prop("checked")&&("radio"===i?(n[a]=f(g),e=g.val()):e.push(g.val()))}):e=0;j.mutateState(a,e),c.trigger("cf.bind",{field:c.attr("id")})}),!0}return j.unbind(a),!1}function e(a,b){m[a]=0,n[a]=0,j.events().subscribe(a,function(a,b){n[a]=b})}function f(a){if(a.is("select")&&a.has("option")&&(a=a.find(":selected")),!a.length)return 0;if(a.is("hidden"))return a.val();var b=0,c=a.attr("data-calc-value");return b=void 0===c||!1===c||isNaN(c)?a.val():a.data("calc-value"),g(b)}function g(a){return!a||isNaN(a)?0:window.parseFloat(a)}function h(a){return"number"==typeof a}function i(a){return"string"==typeof a}var j=this,k=new CFEvents(this),l={},m={},n={};this.init=function(a,b){for(var c in a)"object"==typeof b[c]?"calculation"==b[c].type&&e(c,b[c]):d(c)?(m[c]=a[c],b.hasOwnProperty(c)?n[c]=b[c]:n[c]=null):(m[c]="",l[c]=!0,n[c]=null)},this.getState=function(a){return!!c(a)&&m[a]},this.getCalcValue=function(a,d){var e=0;if(!c(a))return e;if(d){d=0;var k,l=d;return b("#"+a).each(function(){l=0,k=b(this),k.prop("checked")&&(l=f(k),g(l)>g(d)&&(d=g(l)))}),g(d)}if(n.hasOwnProperty(a)){if(!1===n[a]||null===n[a]||0===n[a]){var m=f(b(document.getElementById(a)));i(m)&&(m=g(m)),h(m)&&(n[a]=m)}e=n[a]}else e=j.getState(a),b.isArray(e)&&(e=e.reduce(function(a,b){return g(a)+g(b)},0)),h(e)&&(n[a]=e);return g(e)},this.mutateState=function(a,b){return!!c(a)&&(m[a]!=b&&(m[a]=b,k.trigger(a,b)),!0)},this.unbind=function(a){j.mutateState(a,""),l[a]=!0,delete n[a]},this.rebind=function(a){d(a),delete l[a]},this.events=function(){return{subscribe:function(a,b){c(a)&&k.subscribe(a,b)},detach:function(a,b){k.detach(a,b)},emit:function(a,b){k.emit(a,b)},attatchEvent:function(a,b){k.subscribe(a,b)}}}}function color_picker_init(){jQuery(".minicolor-picker").miniColors()}function toggle_button_init(a,b){var c=jQuery(b),d=c.find(".cf-toggle-group-radio:checked");d.length&&jQuery("#"+d.data("ref")).trigger("click")}function Caldera_Forms_Field_Config(a,b,c,d){function e(a,b,c,d){var e=b.parent().parent();return e.removeClass("has-error"),e.find(".help-block").remove(),a?(e.removeClass("has-error"),h(),!0):(e.addClass("has-error").append('<span id="cf-error-'+b.attr("id")+'" class="help-block '+d+'">'+c+"</span>"),b.prop("required")&&g(b),b.addClass("parsely-error"),!1)}function f(a){return!a.closest(".caldera-form-page").attr("aria-hidden")}function g(a){f(a)&&m.prop("disabled",!0).attr("aria-disabled",!0)}function h(){m.prop("disabled",!1).attr("aria-disabled",!1)}function i(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,c||a.apply(e,f)},h=c&&!d;clearTimeout(d),d=setTimeout(g,b),h&&a.apply(e,f)}}function j(){c.prototype.inputmask&&b.find("[data-inputmask]").inputmask()}var k=this,l={},m=(b.data("instance"),b.find(":submit, .cf-page-btn-next"));this.init=function(){c.each(a,function(a,b){l[b.id]=k[b.type](b)}),j(),c(document).on("cf.add",j)},this.button=function(a){var b=a.id;c(document).on("click dblclick","#"+b,function(a){c("#"+b+"_btn").val(a.type).trigger("change")})},this.html=function(a){if(0!=a.sync){var b,e={},f=a.bindFields,g=c(document.getElementById(a.contentId));b=function(){if(g.length||(g=c(document.getElementById(a.contentId))),g.length){void 0==e[a.tmplId]&&(e[a.tmplId]=c(document.getElementById(a.tmplId)).html());for(var b,h=e[a.tmplId],i=0;i<=f.length;i++)"object"==typeof f[i]&&f[i].hasOwnProperty("to")&&f[i].hasOwnProperty("tag")&&(b=d.getState(f[i].to),b=0===b||"0"===b||b?isNaN(b)?"string"==typeof b?b.replace(/(?:\r\n|\r|\n)/g,"<br />"):b&&void 0!=b.join&&void 0!==b&&void 0!==b?b.join(", "):"":b.toString():"",h=h.replace(f[i].tag,b));g.html(h).trigger("change")}},function(){for(var a=0;a<=f.length;a++)"object"==typeof f[a]&&f[a].hasOwnProperty("to")&&d.events().subscribe(f[a].to,b);c(document).on("cf.pagenav cf.modal",b)}(),b()}},this.summary=this.html;var n={};this.range_slider=function(a){function b(b){b.parent().find(".rangeslider").css("backgroundColor",a.trackcolor),b.parent().find(".rangeslider__fill").css("backgroundColor",a.color),b.parent().find(".rangeslider__handle").css("backgroundColor",a.handle).css("borderColor",a.handleborder)}var e=c(document.getElementById(a.id));c(document).on("cf.pagenav cf.add cf.disable cf.modal",function(){var e=document.getElementById(a.id);if(null!=e){var f=c(e),g=n[a.id].value;if(!f.is(":visible"))return;f.val(g),f.rangeslider("destroy"),f.rangeslider(n[a.id].init),f.val(g).change(),b(f),d.mutateState(a.id,g)}}),function(){"object"!=n[a.id]&&(n[a.id]={value:a.default,init:{},inited:!1});var f={onSlide:function(b,c){d.mutateState(a.id,c),n[a.id].value=c},onInit:function(){this.value=d.getState(a.id),n[a.id].inited=!0,b(e)},polyfill:!1};n[a.id].init=f,d.events().subscribe(a.id,function(b,d){d.length<=0&&(d=a.default),c("#"+a.id+"_value").html(d)}),e.is(":visible")&&e.rangeslider(f)}()},this.star_rating=function(a){var b=a.options.score,d=c(document.getElementById(a.starFieldId)),e=(c(document.getElementById(a.id)),function(){var c=a.options;c.click=function(){b=d.raty("score"),d.trigger("change")},d.raty(c),d.raty("score",b)});e();var f=!1;jQuery(document).on("cf.add",function(){!1===f&&(f=!0,d.length&&(d.raty("destroy"),e()),setTimeout(function(){f=!1},500))})},this.toggle_switch=function(a){c(document).on("reset","#"+a.id,function(b){c.each(a.options,function(b,d){c(document.getElemenetById(d)).removeClass(a.selectedClassName).addClass(a.defaultClassName)}),c(document.getElementById(a.id)).prop("checked","")})},this.phone_better=function(a){var d=a.id,f=!0,g=function(){var a=document.getElementById("cf-error-"+d);f=!0,null!=a&&a.remove()},i=function(){var b=c(document.getElementById(d));g();var h,i=c.trim(b.val());i&&(h=!!b.intlTelInput("isValidNumber"));var j,k=b.intlTelInput("getValidationError"),l=b.intlTelInput("getSelectedCountryData");return 0==k?(h=!0,j=""):i=="+"+l.dialCode?(h=!0,j=""):i?j="undefined"!=a.messages[k]?a.messages[k]:a.messages.generic:(h=!0,j=""),f=h,e(h,b,j,"help-block-phone_better"),h},j=function(){$field=c(document.getElementById(d)),$field.intlTelInput(a.options),$field.on("keyup change",g),$field.blur(function(){g(),i()}),$field.on("keyup change",i),b.on("submit",function(){i()})};c(document).on("cf.pagenav cf.add cf.disable cf.modal",j),c(document).on("cf.add",function(){g(),i()}),c("#"+a.form_id_attr+' [data-page="next"], #'+a.form_id_attr+' form.caldera_forms_form [type="submit"]').click(function(a){!1===i()&&(a.preventDefault(),a.stopPropagation())}),c(document).on("cf.remove",function(a,b){b.hasOwnProperty("field")&&d===b.field&&(f||h())}),j()},this.wysiwyg=function(a){var b=document.getElementById(a.id);if(null!=b){var d=c(b);d.trumbowyg(a.options);var e=d.parent().find(".trumbowyg-editor");e.html(d.val()),e.bind("input propertychange",function(){d.val(e.html())})}},this.credit_card_number=function(a){function b(b){var e={0:"amex",1:"discover",2:"visa",3:"discover",4:"mastercard"},f="credit-card.svg";c.each(e,function(a,c){if(0===b.indexOf(c))return f="cc-"+c+".svg",!1}),d.css("background",'url("'+a.imgPath+f+'")')}var d=c(document.getElementById(a.id));0==a.exp&&0==a.cvc||function(){g(d);var b=c(document.getElementById(a.cvc)),e=c(document.getElementById(a.exp));b.blur(function(){b.val()&&k.creditCardUtil.validateCVC(d,b),e.val()&&k.creditCardUtil.validateExp(e)})}(),d.length&&(d.payment("formatCardNumber"),d.blur(function(){var f=d.val(),g=c.payment.validateCardNumber(f),h=c.payment.cardType(f);e(g,d,a.invalid,"help-block-credit_card_number help-block-credit_card"),g&&b(h)}))},this.credit_card_exp=function(a){var b=c(document.getElementById(a.id));b.length&&(b.payment("formatCardExpiry"),b.blur(function(){e(k.creditCardUtil.validateExp(b),b,a.invalid,"help-block-credit_card_exp help-block-credit_card")}))},this.credit_card_cvc=function(a){var b=c(document.getElementById(a.id));if(b.length&&(b.payment("formatCardCVC"),!1!==a.ccField)){var d=c(document.getElementById(a.ccField));b.blur(function(){e(k.creditCardUtil.validateExp(d,b),b,a.invalid,"help-block-credit_card_cvc help-block-credit_card")})}},this.creditCardUtil={validateCVC:function(a,b){var d=b.val(),e=c.payment.validateCardNumber(a.val()),f=!1;if(e){var g=c.payment.cardType(a.val());f=c.payment.validateCardCVC(d,g)}return f},validateExp:function(a){var b=a.val().split("/");if(b&&2==b.length)return c.payment.validateCardExpiry(b[0].trim(),b[1].trim())}},this.color_picker=function(a){c(document.getElementById(a.id)).miniColors(a.settings),c(document).on("cf.pagenav cf.add cf.disable cf.modal",function(){c(document.getElementById(a.id)).miniColors(a.settings)})},this.calculation=function(a){function b(b){b+="";for(var c=b.split("."),d=c[0],e=c.length>1?a.decimalSeparator+c[1]:"",f=/(\d+)(\d{3})/;f.test(d);)d=d.replace(f,"$1"+a.thousandSeparator+"$2");return d+e}var e=null,f=i(function(){g(d)},250),g=function(){var f=window[a.callback].apply(null,[d]);isFinite(f)||(f=0),e=f,d.mutateState(a.id,f),"number"!=typeof f&&(f=parseInt(f,10)),a.moneyFormat&&(f=f.toFixed(2)),c("#"+a.id).html(b(f)).data("calc-value",f),c("#"+a.targetId).val(f).trigger("change")};c.each(a.fieldBinds,function(a,b){d.events().subscribe(b,f)}),c(document).on("cf.pagenav cf.add cf.remove cf.modal",function(b,c){"cf"==b.type&&"remove"===b.namespace&&"object"==typeof c&&c.hasOwnProperty("field")&&c.field===a.id?e=null:f()}),f()},this.color_picker=function(){function a(){jQuery(".minicolor-picker").miniColors()}document.addEventListener("load",a,!1),jQuery(document).ajaxComplete(function(){a()})}}function CalderaFormsFieldSync(a,b,c,d,e){for(var f=0;f<b.length;f++)d(document).on("keyup change blur mouseover","[data-field='"+b[f]+"']",function(){if(a.data("sync")){var b=a.data("sync");if(id=a.data("field"),reg=new RegExp("{{([^}]*?)}}","g"),template=b.match(reg),!a.data("unsync")&&void 0!=template&&template.length){for(var f=0;f<template.length;f++){for(var g=template[f].replace(/\}/g,"").replace(/\{/g,""),h=new RegExp(template[f],"g"),i=c.find("[data-field='"+g+"']"),j="",k=0;k<i.length;k++){var l=d(i[k]);(!l.is(":radio")&&!l.is(":checkbox")||l.is(":checked"))&&(j+=l.val())}b=b.replace(h,j)}e.mutateState(a.attr("id"),j),a.val(b)}}}),d("[data-field='"+b[f]+"']").trigger("change"),a.on("keyup change",function(){a.attr("data-unsync","1"),a.removeAttr("data-sync"),a.removeAttr("data-binds")})}function CalderaFormsResetNonce(a,b,c){function d(a){return(new Date).getTime()-36e3>a}function e(){c.ajax({url:b.rest.tokens.nonce,method:"POST",beforeSend:function(a){a.setRequestHeader("X-WP-Nonce",b.rest.nonce)},data:{form_id:a}}).done(function(a){f.val(a.nonce),f.data("nonce-time",(new Date).getTime())})}var f;this.init=function(){f=c("#"+b.nonce.field+"_"+a),d(f.data("nonce-time"))&&e()}}function caldera_forms_check_protocol(a){var b=window.location.protocol,c=document.createElement("a");return c.href=a,c.protocol===b}function CalderaFormsCrossOriginWarning(a,b,c){function d(){b(a.data("target")).append('<div class="alert alert-warning">'+c.mixed_protocol+"</div>")}this.maybeWarn=function(){if(a.find('[name="cfajax"]').length){caldera_forms_check_protocol(a.data("request"))||d()}}}function CalderaFormsJQueryWarning(a,b,c){function d(){b(a.data("target")).append('<div class="alert alert-warning">'+c.jquery_old+"</div>")}function e(a){var b=a.split(".");if(1==b[0]){if(12>b[2])return!0;if(4>b[2])return!0}return!1}this.maybeWarn=function(){var a=b.fn.jquery;"string"==typeof a&&"1.12.4"!=a&&e(a)&&d()}}var resBaldrickTriggers;jQuery(function(a){function b(a,b,c){for(var d in a){var e=b.find('[data-field="'+d+'"]'),f=e.parent();if(e.length){f.is("label")&&(f=f.parent(),(f.hasClass("checkbox")||f.hasClass("radio"))&&(f=f.parent()));var g=f.find(".help-block").not(".caldera_ajax_error_block");f.addClass("has-error").addClass("caldera_ajax_error_wrap"),g.length&&g.hide(),f.append('<span class="help-block caldera_ajax_error_block">'+a[d]+"</span>")}else c.html('<p class="alert alert-danger ">'+a[d]+"</p>")}}var c=[],d=function(b,d,e){var f=a("#progress-file-"+d),g=a("."+d+" .file-size");c.push(1),cf_uploader_filelist[d].state=2,a.ajax({xhr:function(){var a=new window.XMLHttpRequest;return a.upload.addEventListener("progress",function(a){if(a.lengthComputable){var b=a.loaded/a.total*100;f.width(b+"%"),g.html(size_format(a.loaded)+" / "+size_format(a.total))}},!1),a.addEventListener("progress",function(a){if(a.lengthComputable){a.loaded,a.total}},!1),a},url:b.data("request")+"/upload/",type:"POST",data:e,processData:!1,contentType:!1,success:function(e,f,g){if(e.success&&!0===e.success){c.pop();var h=a('[data-file="'+d+'"]');h.next().addClass("file-uploaded"),h.remove(),cf_uploader_filelist[d].state=3,b.submit()}else if(e.data&&!e.success)return a("."+d).addClass("has-error"),b.find(":submit").prop("disabled",!1),b.find(".cf-uploader-trigger").slideDown(),void a("."+d+" .file-error").html(e.data)},error:function(a,c,d){b.data("postDisable")||buttons.prop("disabled",!1)}})};(resBaldrickTriggers=function(){var e=function(b){return a("#caldera_notices_"+b.params.trigger.data("instance"))},f=function(b){return a("#caldera-forms-breadcrumb_"+b.params.trigger.data("instance"))},g=function(a){var b=f(a);b.length&&b.show().attr("aria-hidden",!1).css("visibility","visible")},h=function(a){var b=f(a);b.length&&b.show().attr("aria-hidden",!0).css("visibility","hidden")};a(".cfajax-trigger").baldrick({request:"./",method:"POST",init:function(e,f){f.preventDefault();var g=a(e),h=g.find(":submit"),i=[];if(a(document).trigger("cf.ajax.request",{$form:g,formIdAttr:g.attr("id"),displayFieldErrors:b,fieldsBlocking:i,$notice:a("#caldera_notices_"+g.data("instance"))}),"object"==typeof window.cf2)var j=window.cf2[g.attr("id")];if("object"==typeof j){if(j.hasOwnProperty("pending")&&0!==j.pending.length)return!1;if(j.hasOwnProperty("fieldsBlocking")&&0!==j.fieldsBlocking.length)return!1}if(g.data("_cf_manual"))return g.find('[name="cfajax"]').remove(),!1;if(g.data("postDisable")||h.prop("disabled",!0),"object"==typeof cf_uploader_filelist){g.find(".cf-uploader-trigger").slideUp();var k=!1,l=c.length;for(var m in cf_uploader_filelist)if(!(cf_uploader_filelist[m].state>1||0===cf_uploader_filelist[m].state)){k=!0;var n=new FormData,o=m,p=a("#"+o.split("_file_")[0]);if(n.append(p.data("field"),cf_uploader_filelist[m].file),n.append("field",p.data("field")),n.append("control",p.data("controlid")),d(g,o,n),p.val(""),p.attr("type","hidden"),p.val(p.data("controlid")),1===++l)break}if(!0===k||c.length)return!1}},error:function(b){if(404===b.jqxhr.status)this.trigger.data("_cf_manual",!0).trigger("submit");else{var c=e(b);b.jqxhr.responseJSON.data.html&&(c.html(b.jqxhr.responseJSON.data.html),a("html,body").animate({scrollTop:c.offset().top-c.outerHeight()},300))}},callback:function(c){c.params.trigger.find(":submit").prop("disabled",!1);var d=e(c);if(c.params.trigger.data("customCallback")&&"function"==typeof window[c.params.trigger.data("customCallback")]&&window[c.params.trigger.data("customCallback")](c.data),c.params.trigger.data("inhibitnotice")||(a(".caldera_ajax_error_wrap").removeClass("caldera_ajax_error_wrap").removeClass("has-error"),a(".caldera_ajax_error_block").remove(),"complete"===c.data.status||"success"===c.data.type?(h(c),c.data.html&&c.params.target.html(c.data.html),c.params.trigger.data("hiderows")&&c.params.trigger.find("div.row").remove()):"preprocess"===c.data.status?(g(c),c.params.target.html(c.data.html)):"error"===c.data.status&&(g(c),c.params.target.html(c.data.html))),"complete"!==c.data.status&&"success"!==c.data.type||c.data.entry||c.params.trigger[0].reset(),c.data.url&&(c.params.trigger.hide(),window.location=c.data.url),c.params.trigger.find(".cf-uploader-trigger").slideDown(),c.data.fields){var f=c.params.trigger;b(c.data.fields,f,d)}if("undefined"!=c.data.scroll){var i=document.getElementById(c.data.scroll);if(null!=i){var j=a(i);a("html,body").animate({scrollTop:j.offset().top-j.outerHeight()-12},300)}}a(document).trigger("cf.submission",c),a(document).trigger("cf."+c.data.type)}})})()});var calders_forms_check_conditions,calders_forms_init_conditions;!function(a){var b={},c={};Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=this.length>>>0,c=Number(arguments[1])||0;for(c=c<0?Math.ceil(c):Math.floor(c),c<0&&(c+=b);c<b;c++)if(c in this&&this[c]===a)return c;return-1}),cf_debounce=function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,c||a.apply(e,f)},h=c&&!d;clearTimeout(d),d=setTimeout(g,b),h&&a.apply(e,f)}},calders_forms_check_conditions=function(d){function e(a){if(b[a])return b[a]}function f(a){return"object"==typeof window.cfstate&&window.cfstate.hasOwnProperty(a)?window.cfstate[a]:null}function g(a,b,c){var d=f(c);d&&d.events().emit(function(){return"cf.conditionals."+a}(),{fieldIdAttr:b,formIdAttr:c,eventType:a,fieldValue:e(b)})}if("undefined"!=typeof caldera_conditionals&&void 0!==caldera_conditionals[d]){var h=a(document.getElementById(d)),i=f(d);for(var j in caldera_conditionals[d]){if(jQuery("#conditional_"+j).length){var k=caldera_conditionals[d][j].type,l=caldera_conditionals[d][j].group,m=[];for(var n in l){var o={},p=l[n];for(var q in p){var r=h.find('[data-field="'+p[q].field+'"]'),s=[],t="function"==typeof p[q].value?p[q].value():p[q].value;if(void 0!==p[q].selectors)for(var u in p[q].selectors){var v=new RegExp(u,"g");t=t.replace(v,a(p[q].selectors[u]).val())}if(o[q]=!1,r.is(":radio,:checkbox"))r=r.filter(":checked");else if(r.is("div"))r=jQuery("<input>").val(r.html());else if(!r.length){var w=h.find('[data-calc-field="'+p[q].field+'"]');w.length&&(r=h.find('[data-calc-field="'+p[q].field+'"]'))}if(r.length)for(var x=0;x<r.length;x++)s.push(r[x].value);else s.push(p[q].field);switch(p[q].compare){case"is":s.length&&s.indexOf(t.toString())>=0&&(o[q]=!0);break;case"isnot":s.length&&s.indexOf(t)<0&&(o[q]=!0);break;case">":case"greater":o[q]=parseFloat(s.reduce(function(a,b){return a+b}))>parseFloat(t);break;case"<":case"smaller":o[q]=parseFloat(s.reduce(function(a,b){return a+b}))<parseFloat(t);break;case"startswith":for(var x=0;x<s.length;x++)s[x].toLowerCase().substr(0,t.toLowerCase().length)===t.toLowerCase()&&(o[q]=!0);break;case"endswith":for(var x=0;x<s.length;x++)s[x].toLowerCase().substr(s[x].toLowerCase().length-t.toLowerCase().length)===t.toLowerCase()&&(o[q]=!0);break;case"contains":for(var x=0;x<s.length;x++)s[x].toLowerCase().indexOf(t)>=0&&(o[q]=!0)}}istrue=!0;for(var y in o)if(!1===o[y]){istrue=!1;break}m.push(istrue)}var z,A=jQuery("#conditional-"+j+"-tmpl").html(),B=jQuery("#conditional_"+j),C=jQuery('[data-field="'+j+'"]');if(m.length&&m.indexOf(!0)>=0?"show"===k?z="show":"hide"===k?z="hide":"disable"===k&&(z="disable"):z="show"===k?"hide":"disable"===k?"enable":"show","show"===z)B.html().length||(B.html(A).trigger("cf.add",{field:j}),jQuery(document).trigger("cf.add",{field:j}),function(b,d){var f,g=e(b);if(void 0!=g)if("object"==typeof g)for(var i in g)!0===g[i]&&(f=a(document.getElementById(i)),f.prop("checked",!0));else f=a("#"+b),f.val(g);null!==d&&(d.rebind(b),void 0===f&&(f=a("#"+b)),c.hasOwnProperty(b)&&(f.attr("data-unsync","1"),f.removeAttr("data-sync"),f.removeAttr("data-binds")),void 0!==f&&f.data("sync")&&new CalderaFormsFieldSync(f,f.data("binds"),h,a,d))}(j,i)),g("show",j,d);else if("hide"===z)B.html().length&&(!function(d,e){var f=a(document.getElementById(d));if(f.length){var g=f.val();g&&(b[d]=g)}else{var h;f=a("."+d),b[d]={},f.each(function(c,e){h=a(e),h.prop("checked")?b[d][h.attr("id")]=!0:b[d][h.attr("id")]=!1})}f.data("unsync")&&(c[d]=!0),null!==e&&e.unbind(d),b[d]}(j,i),C.val("").empty().prop("checked",!1),B.empty().trigger("cf.remove",{field:j}),jQuery(document).trigger("cf.remove",{field:j})),g("hide",j,d);else if("enable"===z||"disable"===z){var D=jQuery("#"+j);"enable"==z?(B.html().length?D.prop("disabled",!1):(B.html(A).trigger("cf.add",{field:j}),jQuery(document).trigger("cf.add").trigger("cf.enable",{field:j}),D.prop("disabled",!1)),g("enable",j,d)):(B.html().length?D.prop("disabled","disabled",{field:j}):(B.html(A).trigger("cf.remove"),jQuery(document).trigger("cf.remove",{field:j}).trigger("cf.disable",{field:j}),D.prop("disabled","disabled",{field:j})),g("disable",j,d))}}}}},calders_forms_init_conditions=function(){jQuery(".caldera_forms_form").on("change keyup","[data-field]",cf_debounce(function(b){var c=a(this).closest(".caldera_forms_form").prop("id");calders_forms_check_conditions(c)},10))},"undefined"!=typeof caldera_conditionals&&(calders_forms_init_conditions(),jQuery(".caldera_forms_form").find("[data-field]").first().trigger("change"))}(jQuery),function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a.default}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=3)}([function(a,b,c){"use strict";var d,e,f,g;"function"==typeof Symbol&&Symbol.iterator,g=function(a){return a},e=[c(2)],void 0===(f="function"==typeof(d=g)?d.apply(b,e):d)||(a.exports=f)},function(a,b,c){"use strict";var d,e,f,g,h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};g=function(a,b,c,d){function e(b,c,g){if(!(this instanceof e))return new e(b,c,g);this.el=d,this.events={},this.maskset=d,this.refreshValue=!1,!0!==g&&(a.isPlainObject(b)?c=b:(c=c||{},b&&(c.alias=b)),this.opts=a.extend(!0,{},this.defaults,c),this.noMasksCache=c&&c.definitions!==d,this.userOptions=c||{},this.isRTL=this.opts.numericInput,f(this.opts.alias,c,this.opts))}function f(b,c,g){var h=e.prototype.aliases[b];return h?(h.alias&&f(h.alias,d,g),a.extend(!0,g,h),a.extend(!0,g,c),!0):(null===g.mask&&(g.mask=b),!1)}function g(b,c){function f(b,f,g){var h=!1;if(null!==b&&""!==b||((h=null!==g.regex)?b=(b=g.regex).replace(/^(\^)(.*)(\$)$/,"$2"):(h=!0,b=".*")),1===b.length&&!1===g.greedy&&0!==g.repeat&&(g.placeholder=""),g.repeat>0||"*"===g.repeat||"+"===g.repeat){var i="*"===g.repeat?0:"+"===g.repeat?1:g.repeat;b=g.groupmarker[0]+b+g.groupmarker[1]+g.quantifiermarker[0]+i+","+g.repeat+g.quantifiermarker[1]}var j,k=h?"regex_"+g.regex:g.numericInput?b.split("").reverse().join(""):b;return e.prototype.masksCache[k]===d||!0===c?(j={mask:b,maskToken:e.prototype.analyseMask(b,h,g),validPositions:{},_buffer:d,buffer:d,tests:{},excludes:{},metadata:f,maskLength:d},!0!==c&&(e.prototype.masksCache[k]=j,j=a.extend(!0,{},e.prototype.masksCache[k]))):j=a.extend(!0,{},e.prototype.masksCache[k]),j}if(a.isFunction(b.mask)&&(b.mask=b.mask(b)),a.isArray(b.mask)){if(b.mask.length>1){if(null===b.keepStatic){b.keepStatic="auto";for(var g=0;g<b.mask.length;g++)if(b.mask[g].charAt(0)!==b.mask[0].charAt(0)){b.keepStatic=!0;break}}var h=b.groupmarker[0];return a.each(b.isRTL?b.mask.reverse():b.mask,function(c,e){h.length>1&&(h+=b.groupmarker[1]+b.alternatormarker+b.groupmarker[0]),e.mask===d||a.isFunction(e.mask)?h+=e:h+=e.mask}),f(h+=b.groupmarker[1],b.mask,b)}b.mask=b.mask.pop()}return b.mask&&b.mask.mask!==d&&!a.isFunction(b.mask.mask)?f(b.mask.mask,b.mask,b):f(b.mask,b.mask,b)}function i(a){var b=c.createElement("input"),d="on"+a,e=d in b;return e||(b.setAttribute(d,"return;"),e="function"==typeof b[d]),b=null,e}function j(f,g,k){function o(a,b,c,e,f){var g=k.greedy;f&&(k.greedy=!1),b=b||0;var h,i,j,l=[],m=0,n=r();do{if(!0===a&&p().validPositions[m])i=(j=f&&!0===p().validPositions[m].match.optionality&&p().validPositions[m+1]===d&&(!0===p().validPositions[m].generatedInput||p().validPositions[m].input==k.skipOptionalPartCharacter&&m>0)?u(m,y(m,h,m-1)):p().validPositions[m]).match,h=j.locator.slice(),l.push(!0===c?j.input:!1===c?i.nativeDef:L(m,i));else{i=(j=v(m,h,m-1)).match,h=j.locator.slice();var o=!0!==e&&(!1!==k.jitMasking?k.jitMasking:i.jit);(!1===o||o===d||m<n||"number"==typeof o&&isFinite(o)&&o>m)&&l.push(!1===c?i.nativeDef:L(m,i))}"auto"===k.keepStatic&&i.newBlockMarker&&null!==i.fn&&(k.keepStatic=m-1),m++}while((Y===d||m<Y)&&(null!==i.fn||""!==i.def)||b>m);return""===l[l.length-1]&&l.pop(),!1===c&&p().maskLength!==d||(p().maskLength=m-1),k.greedy=g,l}function p(){return g}function q(a){var b=p();b.buffer=d,!0!==a&&(b.validPositions={},b.p=0)}function r(a,b,c){var e=-1,f=-1,g=c||p().validPositions;for(var h in a===d&&(a=-1),g){var i=parseInt(h);g[i]&&(b||!0!==g[i].generatedInput)&&(i<=a&&(e=i),i>=a&&(f=i))}return-1===e||e==a?f:-1==f?e:a-e<f-a?e:f}function s(a){var b=a.locator[a.alternation];return"string"==typeof b&&b.length>0&&(b=b.split(",")[0]),b!==d?b.toString():""}function t(a,b){var c=(a.alternation!=d?a.mloc[s(a)]:a.locator).join("");if(""!==c)for(;c.length<b;)c+="0";return c}function u(a,b){for(var c,e,f,g=t(w(a=a>0?a-1:0)),h=0;h<b.length;h++){var i=b[h];c=t(i,g.length);var j=Math.abs(c-g);(e===d||""!==c&&j<e||f&&f.match.optionality&&"master"===f.match.newBlockMarker&&(!i.match.optionality||!i.match.newBlockMarker)||f&&f.match.optionalQuantifier&&!i.match.optionalQuantifier)&&(e=j,f=i)}return f}function v(a,b,c){return p().validPositions[a]||u(a,y(a,b?b.slice():b,c))}function w(a,b){return p().validPositions[a]?p().validPositions[a]:(b||y(a))[0]}function x(a,b){for(var c=!1,d=y(a),e=0;e<d.length;e++)if(d[e].match&&d[e].match.def===b){c=!0;break}return c}function y(b,c,e){function f(c,e,h,j){function o(h,j,q){function r(b,c){var d=0===a.inArray(b,c.matches);return d||a.each(c.matches,function(a,e){if(!0===e.isQuantifier?d=r(b,c.matches[a-1]):!0===e.isOptional?d=r(b,e):!0===e.isAlternate&&(d=r(b,e)),d)return!1}),d}function s(b,c,e){var f,g;if((p().tests[b]||p().validPositions[b])&&a.each(p().tests[b]||[p().validPositions[b]],function(a,b){if(b.mloc[c])return f=b,!1;var h=e!==d?e:b.alternation,i=b.locator[h]!==d?b.locator[h].toString().indexOf(c):-1;(g===d||i<g)&&-1!==i&&(f=b,g=i)}),f){var h=f.locator[f.alternation];return(f.mloc[c]||f.mloc[h]||f.locator).slice((e!==d?e:f.alternation)+1)}return e!==d?s(b,c):d}function t(a,b){function c(a){for(var b,c,d=[],e=0,f=a.length;e<f;e++)if("-"===a.charAt(e))for(c=a.charCodeAt(e+1);++b<c;)d.push(String.fromCharCode(b));else b=a.charCodeAt(e),d.push(a.charAt(e));return d.join("")}return k.regex&&null!==a.match.fn&&null!==b.match.fn?-1!==c(b.match.def.replace(/[\[\]]/g,"")).indexOf(c(a.match.def.replace(/[\[\]]/g,""))):a.match.def===b.match.nativeDef}function u(a,b){if(b===d||a.alternation===b.alternation&&-1===a.locator[a.alternation].toString().indexOf(b.locator[b.alternation])){a.mloc=a.mloc||{};var c=a.locator[a.alternation];if(c!==d){if("string"==typeof c&&(c=c.split(",")[0]),a.mloc[c]===d&&(a.mloc[c]=a.locator.slice()),b!==d){for(var e in b.mloc)"string"==typeof e&&(e=e.split(",")[0]),a.mloc[e]===d&&(a.mloc[e]=b.mloc[e]);a.locator[a.alternation]=Object.keys(a.mloc).join(",")}return!0}a.alternation=d}return!1}if(i>5e3)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. "+p().mask;if(i===b&&h.matches===d)return l.push({match:h,locator:j.reverse(),cd:n,mloc:{}}),!0;if(h.matches!==d){if(h.isGroup&&q!==h){if(h=o(c.matches[a.inArray(h,c.matches)+1],j,q))return!0}else if(h.isOptional){var v=h;if(h=f(h,e,j,q)){if(a.each(l,function(a,b){b.match.optionality=!0}),g=l[l.length-1].match,q!==d||!r(g,v))return!0;m=!0,i=b}}else if(h.isAlternator){var w,x=h,y=[],z=l.slice(),A=j.length,B=e.length>0?e.shift():-1;if(-1===B||"string"==typeof B){var C,D=i,E=e.slice(),F=[];if("string"==typeof B)F=B.split(",");else for(C=0;C<x.matches.length;C++)F.push(C.toString());if(p().excludes[b]){for(var G=F.slice(),H=0,I=p().excludes[b].length;H<I;H++)F.splice(F.indexOf(p().excludes[b][H].toString()),1);0===F.length&&(p().excludes[b]=d,F=G)}(!0===k.keepStatic||isFinite(parseInt(k.keepStatic))&&D>=k.keepStatic)&&(F=F.slice(0,1));for(var J=!1,K=0;K<F.length;K++){C=parseInt(F[K]),l=[],e="string"==typeof B&&s(i,C,A)||E.slice(),x.matches[C]&&o(x.matches[C],[C].concat(j),q)?h=!0:0===K&&(J=!0),w=l.slice(),i=D,l=[];for(var L=0;L<w.length;L++){var M=w[L],N=!1;M.match.jit=M.match.jit||J,M.alternation=M.alternation||A,u(M);for(var O=0;O<y.length;O++){var P=y[O];if("string"!=typeof B||M.alternation!==d&&-1!==a.inArray(M.locator[M.alternation].toString(),F)){if(M.match.nativeDef===P.match.nativeDef){N=!0,u(P,M);break}if(t(M,P)){u(M,P)&&(N=!0,y.splice(y.indexOf(P),0,M));break}if(t(P,M)){u(P,M);break}if(U=P,null===(T=M).match.fn&&null!==U.match.fn&&U.match.fn.test(T.match.def,p(),b,!1,k,!1)){u(M,P)&&(N=!0,y.splice(y.indexOf(P),0,M));break}}}N||y.push(M)}}l=z.concat(y),i=b,m=l.length>0,h=y.length>0,e=E.slice()}else h=o(x.matches[B]||c.matches[B],[B].concat(j),q);if(h)return!0}else if(h.isQuantifier&&q!==c.matches[a.inArray(h,c.matches)-1])for(var Q=h,R=e.length>0?e.shift():0;R<(isNaN(Q.quantifier.max)?R+1:Q.quantifier.max)&&i<=b;R++){var S=c.matches[a.inArray(Q,c.matches)-1];if(h=o(S,[R].concat(j),S)){if((g=l[l.length-1].match).optionalQuantifier=R>Q.quantifier.min-1,g.jit=R+S.matches.indexOf(g)>=Q.quantifier.jit,r(g,S)&&R>Q.quantifier.min-1){m=!0,i=b;break}if(Q.quantifier.jit!==d&&isNaN(Q.quantifier.max)&&g.optionalQuantifier&&p().validPositions[b-1]===d){l.pop(),m=!0,i=b,n=d;break}return!0}}else if(h=f(h,e,j,q))return!0}else i++;var T,U}for(var q=e.length>0?e.shift():0;q<c.matches.length;q++)if(!0!==c.matches[q].isQuantifier){var r=o(c.matches[q],[q].concat(h),j);if(r&&i===b)return r;if(i>b)break}}var g,h=p().maskToken,i=c?e:0,j=c?c.slice():[0],l=[],m=!1,n=c?c.join(""):"";if(b>-1){if(c===d){for(var o,q=b-1;(o=p().validPositions[q]||p().tests[q])===d&&q>-1;)q--;o!==d&&q>-1&&(j=function(b,c){var e=[];return a.isArray(c)||(c=[c]),c.length>0&&(c[0].alternation===d?0===(e=u(b,c.slice()).locator.slice()).length&&(e=c[0].locator.slice()):a.each(c,function(a,b){if(""!==b.def)if(0===e.length)e=b.locator.slice();else for(var c=0;c<e.length;c++)b.locator[c]&&-1===e[c].toString().indexOf(b.locator[c])&&(e[c]+=","+b.locator[c])})),e}(q,o),n=j.join(""),i=q)}if(p().tests[b]&&p().tests[b][0].cd===n)return p().tests[b];for(var r=j.shift();r<h.length&&!(f(h[r],j,[r])&&i===b||i>b);r++);}return(0===l.length||m)&&l.push({match:{fn:null,optionality:!1,casing:null,def:"",placeholder:""},locator:[],mloc:{},cd:n}),c!==d&&p().tests[b]?a.extend(!0,[],l):(p().tests[b]=a.extend(!0,[],l),p().tests[b])}function z(){return p()._buffer===d&&(p()._buffer=o(!1,1),p().buffer===d&&(p().buffer=p()._buffer.slice())),p()._buffer}function A(a){
return p().buffer!==d&&!0!==a||(p().buffer=o(!0,r(),!0)),p().buffer}function B(a,b,c){var e,f;if(!0===a)q(),a=0,b=c.length;else for(e=a;e<b;e++)delete p().validPositions[e];for(f=a,e=a;e<b;e++)if(q(!0),c[e]!==k.skipOptionalPartCharacter){var g=E(f,c[e],!0,!0);!1!==g&&(q(!0),f=g.caret!==d?g.caret:g.pos+1)}}function C(b,c,e){for(var f,g=k.greedy?c:c.slice(0,1),h=!1,i=e!==d?e.split(","):[],j=0;j<i.length;j++)-1!==(f=b.indexOf(i[j]))&&b.splice(f,1);for(var l=0;l<b.length;l++)if(-1!==a.inArray(b[l],g)){h=!0;break}return h}function D(b,c,e,f,g){var h,i,j,k,l,m,n,o=a.extend(!0,{},p().validPositions),t=!1,u=g!==d?g:r();if(-1===u&&g===d)i=(k=w(h=0)).alternation;else for(;u>=0;u--)if((j=p().validPositions[u])&&j.alternation!==d){if(k&&k.locator[j.alternation]!==j.locator[j.alternation])break;h=u,i=p().validPositions[h].alternation,k=j}if(i!==d){n=parseInt(h),p().excludes[n]=p().excludes[n]||[],!0!==b&&p().excludes[n].push(s(k));var v=[],x=0;for(l=n;l<r(d,!0)+1;l++)(m=p().validPositions[l])&&!0!==m.generatedInput?v.push(m.input):l<b&&x++,delete p().validPositions[l];for(;p().excludes[n]&&p().excludes[n].length<10;){var y=-1*x,z=v.slice();for(p().tests[n]=d,q(!0),t=!0;z.length>0;){var A=z.shift();if(!(t=E(r(d,!0)+1,A,!1,f,!0)))break}if(t&&c!==d){var B=r(b)+1;for(l=n;l<r()+1;l++)((m=p().validPositions[l])===d||null==m.match.fn)&&l<b+y&&y++;t=E((b+=y)>B?B:b,c,e,f,!0)}if(t)break;if(q(),k=w(n),p().validPositions=a.extend(!0,{},o),!p().excludes[n]){t=D(b,c,e,f,n-1);break}var C=s(k);if(-1!==p().excludes[n].indexOf(C)){t=D(b,c,e,f,n-1);break}for(p().excludes[n].push(C),l=n;l<r(d,!0)+1;l++)delete p().validPositions[l]}}return p().excludes[n]=d,t}function E(b,c,f,g,h,i){function j(a){return ba?a.begin-a.end>1||a.begin-a.end==1:a.end-a.begin>1||a.end-a.begin==1}function l(c,f,h){var i=!1;return a.each(y(c),function(l,m){var n=m.match;if(A(!0),!1!==(i=null!=n.fn?n.fn.test(f,p(),c,h,k,j(b)):(f===n.def||f===k.skipOptionalPartCharacter)&&""!==n.def&&{c:L(c,n,!0)||n.def,pos:c})){var o=i.c!==d?i.c:f,q=c;return o=o===k.skipOptionalPartCharacter&&null===n.fn?L(c,n,!0)||n.def:o,i.remove!==d&&(a.isArray(i.remove)||(i.remove=[i.remove]),a.each(i.remove.sort(function(a,b){return b-a}),function(a,b){G({begin:b,end:b+1})})),i.insert!==d&&(a.isArray(i.insert)||(i.insert=[i.insert]),a.each(i.insert.sort(function(a,b){return a-b}),function(a,b){E(b.pos,b.c,!0,g)})),!0!==i&&i.pos!==d&&i.pos!==c&&(q=i.pos),(!0===i||i.pos!==d||i.c!==d)&&(G(b,a.extend({},m,{input:function(b,c,d){switch(k.casing||c.casing){case"upper":b=b.toUpperCase();break;case"lower":b=b.toLowerCase();break;case"title":var f=p().validPositions[d-1];b=0===d||f&&f.input===String.fromCharCode(e.keyCode.SPACE)?b.toUpperCase():b.toLowerCase();break;default:if(a.isFunction(k.casing)){var g=Array.prototype.slice.call(arguments);g.push(p().validPositions),b=k.casing.apply(this,g)}}return b}(o,n,q)}),g,q)||(i=!1),!1)}}),i}f=!0===f;var m=b;b.begin!==d&&(m=ba?b.end:b.begin);var n=!0,o=a.extend(!0,{},p().validPositions);if(a.isFunction(k.preValidation)&&!f&&!0!==g&&!0!==i&&(n=k.preValidation(A(),m,c,j(b),k,p())),!0===n){if(F(d,m,!0),(Y===d||m<Y)&&(n=l(m,c,f),(!f||!0===g)&&!1===n&&!0!==i)){var r=p().validPositions[m];if(!r||null!==r.match.fn||r.match.def!==c&&c!==k.skipOptionalPartCharacter){if((k.insertMode||p().validPositions[I(m)]===d)&&!H(m,!0))for(var s=m+1,t=I(m);s<=t;s++)if(!1!==(n=l(s,c,f))){n=F(m,n.pos!==d?n.pos:s)||n,m=s;break}}else n={caret:I(m)}}!1!==n||!1===k.keepStatic||null!=k.regex&&!S(A())||f||!0===h||(n=D(m,c,f,g)),!0===n&&(n={pos:m})}if(a.isFunction(k.postValidation)&&!1!==n&&!f&&!0!==g&&!0!==i){var u=k.postValidation(A(!0),n,k);if(u!==d){if(u.refreshFromBuffer&&u.buffer){var v=u.refreshFromBuffer;B(!0===v?v:v.start,v.end,u.buffer)}n=!0===u?n:u}}return n&&n.pos===d&&(n.pos=m),!1!==n&&!0!==i||(q(!0),p().validPositions=a.extend(!0,{},o)),n}function F(b,c,e){var f;if(b===d)for(b=c-1;b>0&&!p().validPositions[b];b--);for(var g=b;g<c;g++)if(p().validPositions[g]===d&&!H(g,!0)){var h=0==g?w(g):p().validPositions[g-1];if(h){var i,j=t(h),k=y(g).slice(),l=d,m=w(g);if(""===k[k.length-1].match.def&&k.pop(),a.each(k,function(a,b){i=t(b,j.length);var c=Math.abs(i-j);(l===d||c<l)&&null===b.match.fn&&!0!==b.match.optionality&&!0!==b.match.optionalQuantifier&&(l=c,m=b)}),(m=a.extend({},m,{input:L(g,m.match,!0)||m.match.def})).generatedInput=!0,G(g,m,!0),!0!==e){var n=p().validPositions[c].input;p().validPositions[c]=d,f=E(c,n,!0,!0)}}}return f}function G(b,c,e,f){var g=b.begin!==d?b.begin:b,h=b.end!==d?b.end:b;if(b.begin>b.end&&(g=b.end,h=b.begin),f=f!==d?f:g,g!==h||k.insertMode&&p().validPositions[f]!==d&&e===d){var i=a.extend(!0,{},p().validPositions),j=r(d,!0);for(p().p=g,s=j;s>=g;s--)p().validPositions[s]&&"+"===p().validPositions[s].match.nativeDef&&(k.isNegative=!1),delete p().validPositions[s];var l=!0,m=f,n=(p().validPositions,!1),o=m,s=m;for(c&&(p().validPositions[f]=a.extend(!0,{},c),o++,m++,g<h&&s++);s<=j;s++){var t=i[s];if(t!==d&&(s>=h||s>=g&&!0!==t.generatedInput&&function(a,b,c){var e=b[a];if(e!==d&&(null===e.match.fn&&!0!==e.match.optionality||e.input===k.radixPoint)){var f=c.begin<=a-1?b[a-1]&&null===b[a-1].match.fn&&b[a-1]:b[a-1],g=c.end>a+1?b[a+1]&&null===b[a+1].match.fn&&b[a+1]:b[a+1];return f&&g}return!1}(s,i,{begin:g,end:h}))){for(;""!==w(o).match.def;){if(!1===n&&i[o]&&i[o].match.nativeDef===t.match.nativeDef)p().validPositions[o]=a.extend(!0,{},i[o]),p().validPositions[o].input=t.input,F(d,o,!0),m=o+1,l=!0;else if(x(o,t.match.def)){var u=E(o,t.input,!0,!0);l=!1!==u,m=u.caret||u.insert?r():o+1,n=!0}else if(!(l=!0===t.generatedInput||t.input===k.radixPoint&&!0===k.numericInput)&&""===w(o).match.def)break;if(l)break;o++}""==w(o).match.def&&(l=!1),o=m}if(!l)break}if(!l)return p().validPositions=a.extend(!0,{},i),q(!0),!1}else c&&(p().validPositions[f]=a.extend(!0,{},c));return q(!0),!0}function H(a,b){var c=v(a).match;if(""===c.def&&(c=w(a).match),null!=c.fn)return c.fn;if(!0!==b&&a>-1){var d=y(a);return d.length>1+(""===d[d.length-1].match.def?1:0)}return!1}function I(a,b){for(var c=a+1;""!==w(c).match.def&&(!0===b&&(!0!==w(c).match.newBlockMarker||!H(c))||!0!==b&&!H(c));)c++;return c}function J(a,b){var c,d=a;if(d<=0)return 0;for(;--d>0&&(!0===b&&!0!==w(d).match.newBlockMarker||!0!==b&&!H(d)&&((c=y(d)).length<2||2===c.length&&""===c[1].match.def)););return d}function K(b,c,e,f,g){if(f&&a.isFunction(k.onBeforeWrite)){var h=k.onBeforeWrite.call(_,f,c,e,k);if(h){if(h.refreshFromBuffer){var i=h.refreshFromBuffer;B(!0===i?i:i.start,i.end,h.buffer||c),c=A(!0)}e!==d&&(e=h.caret!==d?h.caret:e)}}if(b!==d&&(b.inputmask._valueSet(c.join("")),e===d||f!==d&&"blur"===f.type?V(b,e,0===c.length):P(b,e),!0===g)){var j=a(b),l=b.inputmask._valueGet();da=!0,j.trigger("input"),setTimeout(function(){l===z().join("")?j.trigger("cleared"):!0===S(c)&&j.trigger("complete")},0)}}function L(b,c,e){if((c=c||w(b).match).placeholder!==d||!0===e)return a.isFunction(c.placeholder)?c.placeholder(k):c.placeholder;if(null===c.fn){if(b>-1&&p().validPositions[b]===d){var f,g=y(b),h=[];if(g.length>1+(""===g[g.length-1].match.def?1:0))for(var i=0;i<g.length;i++)if(!0!==g[i].match.optionality&&!0!==g[i].match.optionalQuantifier&&(null===g[i].match.fn||f===d||!1!==g[i].match.fn.test(f.match.def,p(),b,!0,k))&&(h.push(g[i]),null===g[i].match.fn&&(f=g[i]),h.length>1&&/[0-9a-bA-Z]/.test(h[0].match.def)))return k.placeholder.charAt(b%k.placeholder.length)}return c.def}return k.placeholder.charAt(b%k.placeholder.length)}function M(b,c,f,g,h){var i=this||b.inputmask,j=g.slice(),l="",m=-1,n=d;if(q(),f||!0===k.autoUnmask)m=I(m);else{var s=z().slice(0,I(-1)).join(""),t=j.join("").match(new RegExp("^"+e.escapeRegex(s),"g"));t&&t.length>0&&(j.splice(0,t.length*s.length),m=I(m))}-1===m?(p().p=I(m),m=0):p().p=m,i.caretPos={begin:m},a.each(j,function(c,e){if(e!==d)if(p().validPositions[c]===d&&j[c]===L(c)&&H(c,!0)&&!1===E(c,j[c],!0,d,d,!0))p().p++;else{var g=new a.Event("_checkval");g.which=e.charCodeAt(0),l+=e;var h=r(d,!0);!function(a,b){return-1!==o(!0,0,!1).slice(a,I(a)).join("").replace(/'/g,"").indexOf(b)&&!H(a)&&(w(a).match.nativeDef===b.charAt(0)||null===w(a).match.fn&&w(a).match.nativeDef==="'"+b.charAt(0)||" "===w(a).match.nativeDef&&(w(a+1).match.nativeDef===b.charAt(0)||null===w(a+1).match.fn&&w(a+1).match.nativeDef==="'"+b.charAt(0)))}(m,l)?(n=ha.keypressEvent.call(b,g,!0,!1,f,i.caretPos.begin))&&(m=i.caretPos.begin+1,l=""):n=ha.keypressEvent.call(b,g,!0,!1,f,h+1),n&&(K(d,A(),n.forwardPosition,g,!1),i.caretPos={begin:n.forwardPosition,end:n.forwardPosition})}}),c&&K(b,A(),n?n.forwardPosition:d,h||new a.Event("checkval"),h&&"input"===h.type)}function N(b){if(b){if(b.inputmask===d)return b.value;b.inputmask&&b.inputmask.refreshValue&&ha.setValueEvent.call(b)}var c=[],e=p().validPositions;for(var f in e)e[f].match&&null!=e[f].match.fn&&c.push(e[f].input);var g=0===c.length?"":(ba?c.reverse():c).join("");if(a.isFunction(k.onUnMask)){var h=(ba?A().slice().reverse():A()).join("");g=k.onUnMask.call(_,h,g,k)}return g}function O(a){return!ba||"number"!=typeof a||k.greedy&&""===k.placeholder||!aa||(a=aa.inputmask._valueGet().length-a),a}function P(e,f,g,h){var i;if(f===d)return e.setSelectionRange?(f=e.selectionStart,g=e.selectionEnd):b.getSelection?(i=b.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode!==e&&i.commonAncestorContainer!==e||(f=i.startOffset,g=i.endOffset):c.selection&&c.selection.createRange&&(g=(f=0-(i=c.selection.createRange()).duplicate().moveStart("character",-e.inputmask._valueGet().length))+i.text.length),{begin:h?f:O(f),end:h?g:O(g)};if(a.isArray(f)&&(g=ba?f[0]:f[1],f=ba?f[1]:f[0]),f.begin!==d&&(g=ba?f.begin:f.end,f=ba?f.end:f.begin),"number"==typeof f){f=h?f:O(f),g="number"==typeof(g=h?g:O(g))?g:f;var j=parseInt(((e.ownerDocument.defaultView||b).getComputedStyle?(e.ownerDocument.defaultView||b).getComputedStyle(e,null):e.currentStyle).fontSize)*g;if(e.scrollLeft=j>e.scrollWidth?j:0,n||!1!==k.insertMode||f!==g||g++,e.inputmask.caretPos={begin:f,end:g},e.setSelectionRange)e.selectionStart=f,e.selectionEnd=g;else if(b.getSelection){if(i=c.createRange(),e.firstChild===d||null===e.firstChild){var l=c.createTextNode("");e.appendChild(l)}i.setStart(e.firstChild,f<e.inputmask._valueGet().length?f:e.inputmask._valueGet().length),i.setEnd(e.firstChild,g<e.inputmask._valueGet().length?g:e.inputmask._valueGet().length),i.collapse(!0);var m=b.getSelection();m.removeAllRanges(),m.addRange(i)}else e.createTextRange&&((i=e.createTextRange()).collapse(!0),i.moveEnd("character",g),i.moveStart("character",f),i.select());V(e,{begin:f,end:g})}}function Q(b){var c,e,f=o(!0,r(),!0,!0),g=f.length,h=r(),i={},j=p().validPositions[h],k=j!==d?j.locator.slice():d;for(c=h+1;c<f.length;c++)k=(e=v(c,k,c-1)).locator.slice(),i[c]=a.extend(!0,{},e);var l=j&&j.alternation!==d?j.locator[j.alternation]:d;for(c=g-1;c>h&&((e=i[c]).match.optionality||e.match.optionalQuantifier&&e.match.newBlockMarker||l&&(l!==i[c].locator[j.alternation]&&null!=e.match.fn||null===e.match.fn&&e.locator[j.alternation]&&C(e.locator[j.alternation].toString().split(","),l.toString().split(","))&&""!==y(c)[0].def))&&f[c]===L(c,e.match);c--)g--;return b?{l:g,def:i[g]?i[g].match:d}:g}function R(a){a.length=0;for(var b,c=o(!0,0,!0,d,!0);(b=c.shift())!==d;)a.push(b);return a}function S(b){if(a.isFunction(k.isComplete))return k.isComplete(b,k);if("*"===k.repeat)return d;var c=!1,e=Q(!0),f=J(e.l);if(e.def===d||e.def.newBlockMarker||e.def.optionality||e.def.optionalQuantifier){c=!0;for(var g=0;g<=f;g++){var h=v(g).match;if(null!==h.fn&&p().validPositions[g]===d&&!0!==h.optionality&&!0!==h.optionalQuantifier||null===h.fn&&b[g]!==L(g,h)){c=!1;break}}}return c}function T(a,b,c,f,g){if((k.numericInput||ba)&&(b===e.keyCode.BACKSPACE?b=e.keyCode.DELETE:b===e.keyCode.DELETE&&(b=e.keyCode.BACKSPACE),ba)){var h=c.end;c.end=c.begin,c.begin=h}if(b===e.keyCode.BACKSPACE&&(c.end-c.begin<1||!1===k.insertMode)?(c.begin=J(c.begin),p().validPositions[c.begin]!==d&&p().validPositions[c.begin].input===k.groupSeparator&&c.begin--,!1===k.insertMode&&c.end!==p().maskLength&&c.end--):b===e.keyCode.DELETE&&c.begin===c.end&&(c.end=H(c.end,!0)&&p().validPositions[c.end]&&p().validPositions[c.end].input!==k.radixPoint?c.end+1:I(c.end)+1,p().validPositions[c.begin]!==d&&p().validPositions[c.begin].input===k.groupSeparator&&c.end++),G(c),!0!==f&&!1!==k.keepStatic||null!==k.regex){var i=D(!0);if(i){var j=i.caret!==d?i.caret:i.pos?I(i.pos.begin?i.pos.begin:i.pos):r(-1,!0);(b!==e.keyCode.DELETE||c.begin>j)&&c.begin}}var l=r(c.begin,!0);if(l<c.begin||-1===c.begin)p().p=I(l);else if(!0!==f&&(p().p=c.begin,!0!==g))for(;p().p<l&&p().validPositions[p().p]===d;)p().p++}function U(d){var e=(d.ownerDocument.defaultView||b).getComputedStyle(d,null),f=c.createElement("div");f.style.width=e.width,f.style.textAlign=e.textAlign,Z=c.createElement("div"),d.inputmask.colorMask=Z,Z.className="im-colormask",d.parentNode.insertBefore(Z,d),d.parentNode.removeChild(d),Z.appendChild(d),Z.appendChild(f),d.style.left=f.offsetLeft+"px",a(Z).on("mouseleave",function(a){return ha.mouseleaveEvent.call(d,[a])}),a(Z).on("mouseenter",function(a){return ha.mouseenterEvent.call(d,[a])}),a(Z).on("click",function(a){return P(d,function(a){var b,f=c.createElement("span");for(var g in e)isNaN(g)&&-1!==g.indexOf("font")&&(f.style[g]=e[g]);f.style.textTransform=e.textTransform,f.style.letterSpacing=e.letterSpacing,f.style.position="absolute",f.style.height="auto",f.style.width="auto",f.style.visibility="hidden",f.style.whiteSpace="nowrap",c.body.appendChild(f);var h,i=d.inputmask._valueGet(),j=0;for(b=0,h=i.length;b<=h;b++){if(f.innerHTML+=i.charAt(b)||"_",f.offsetWidth>=a){var k=a-j,l=f.offsetWidth-a;f.innerHTML=i.charAt(b),b=(k-=f.offsetWidth/3)<l?b-1:b;break}j=f.offsetWidth}return c.body.removeChild(f),b}(a.clientX)),ha.clickEvent.call(d,[a])}),a(d).on("keydown",function(a){a.shiftKey||!1===k.insertMode||setTimeout(function(){V(d)},0)})}function V(a,b,e){function f(a){if(a===d&&(a=""),l||null!==g.fn&&h.input!==d)if(l&&(null!==g.fn&&h.input!==d||""===g.def)){l=!1;var b=j.length;j[b-1]=j[b-1]+"</span>",j.push(a)}else j.push(a);else l=!0,j.push("<span class='im-static'>"+a)}var g,h,i,j=[],l=!1,m=0;if(Z!==d){var n=A();if(b===d?b=P(a):b.begin===d&&(b={begin:b,end:b}),!0!==e){var o=r();do{p().validPositions[m]?(h=p().validPositions[m],g=h.match,i=h.locator.slice(),f(n[m])):(h=v(m,i,m-1),g=h.match,i=h.locator.slice(),!1===k.jitMasking||m<o||"number"==typeof k.jitMasking&&isFinite(k.jitMasking)&&k.jitMasking>m?f(L(m,g)):l=!1),m++}while((Y===d||m<Y)&&(null!==g.fn||""!==g.def)||o>m||l);l&&f(),c.activeElement===a&&(j.splice(b.begin,0,b.begin===b.end||b.end>p().maskLength?'<mark class="im-caret" style="border-right-width: 1px;border-right-style: solid;">':'<mark class="im-caret-select">'),j.splice(b.end+1,0,"</mark>"))}var q=Z.getElementsByTagName("div")[0];q.innerHTML=j.join(""),a.inputmask.positionColorMask(a,q)}}g=g||this.maskset,k=k||this.opts;var W,X,Y,Z,$,_=this,aa=this.el,ba=this.isRTL,ca=!1,da=!1,ea=!1,fa=!1,ga={on:function(b,c,f){var g=function(b){var c=this;if(c.inputmask===d&&"FORM"!==this.nodeName){var g=a.data(c,"_inputmask_opts");g?new e(g).mask(c):ga.off(c)}else{if("setvalue"===b.type||"FORM"===this.nodeName||!(c.disabled||c.readOnly&&!("keydown"===b.type&&b.ctrlKey&&67===b.keyCode||!1===k.tabThrough&&b.keyCode===e.keyCode.TAB))){switch(b.type){case"input":if(!0===da)return da=!1,b.preventDefault();if(l){var h=arguments;return setTimeout(function(){f.apply(c,h),P(c,c.inputmask.caretPos,d,!0)},0),!1}break;case"keydown":ca=!1,da=!1;break;case"keypress":if(!0===ca)return b.preventDefault();ca=!0;break;case"click":if(m||n)return h=arguments,setTimeout(function(){f.apply(c,h)},0),!1}var i=f.apply(c,arguments);return!1===i&&(b.preventDefault(),b.stopPropagation()),i}b.preventDefault()}};b.inputmask.events[c]=b.inputmask.events[c]||[],b.inputmask.events[c].push(g),-1!==a.inArray(c,["submit","reset"])?null!==b.form&&a(b.form).on(c,g):a(b).on(c,g)},off:function(b,c){var d;b.inputmask&&b.inputmask.events&&(c?(d=[])[c]=b.inputmask.events[c]:d=b.inputmask.events,a.each(d,function(c,d){for(;d.length>0;){var e=d.pop();-1!==a.inArray(c,["submit","reset"])?null!==b.form&&a(b.form).off(c,e):a(b).off(c,e)}delete b.inputmask.events[c]}))}},ha={keydownEvent:function(b){var c=this,d=a(c),f=b.keyCode,g=P(c);if(f===e.keyCode.BACKSPACE||f===e.keyCode.DELETE||n&&f===e.keyCode.BACKSPACE_SAFARI||b.ctrlKey&&f===e.keyCode.X&&!i("cut"))b.preventDefault(),T(c,f,g),K(c,A(!0),p().p,b,c.inputmask._valueGet()!==A().join(""));else if(f===e.keyCode.END||f===e.keyCode.PAGE_DOWN){b.preventDefault();var h=I(r());k.insertMode||h!==p().maskLength||b.shiftKey||h--,P(c,b.shiftKey?g.begin:h,h,!0)}else f===e.keyCode.HOME&&!b.shiftKey||f===e.keyCode.PAGE_UP?(b.preventDefault(),P(c,0,b.shiftKey?g.begin:0,!0)):(k.undoOnEscape&&f===e.keyCode.ESCAPE||90===f&&b.ctrlKey)&&!0!==b.altKey?(M(c,!0,!1,W.split("")),d.trigger("click")):f!==e.keyCode.INSERT||b.shiftKey||b.ctrlKey?!0===k.tabThrough&&f===e.keyCode.TAB?(!0===b.shiftKey?(null===w(g.begin).match.fn&&(g.begin=I(g.begin)),g.end=J(g.begin,!0),g.begin=J(g.end,!0)):(g.begin=I(g.begin,!0),g.end=I(g.begin,!0),g.end<p().maskLength&&g.end--),g.begin<p().maskLength&&(b.preventDefault(),P(c,g.begin,g.end))):b.shiftKey||!1===k.insertMode&&(f===e.keyCode.RIGHT?setTimeout(function(){var a=P(c);P(c,a.begin)},0):f===e.keyCode.LEFT&&setTimeout(function(){var a=P(c);P(c,ba?a.begin+1:a.begin-1)},0)):(k.insertMode=!k.insertMode,P(c,k.insertMode||g.begin!==p().maskLength?g.begin:g.begin-1));k.onKeyDown.call(this,b,A(),P(c).begin,k),ea=-1!==a.inArray(f,k.ignorables)},keypressEvent:function(b,c,f,g,h){var i=this,j=a(i),l=b.which||b.charCode||b.keyCode;if(!(!0===c||b.ctrlKey&&b.altKey)&&(b.ctrlKey||b.metaKey||ea))return l===e.keyCode.ENTER&&W!==A().join("")&&(W=A().join(""),setTimeout(function(){j.trigger("change")},0)),!0;if(l){46===l&&!1===b.shiftKey&&""!==k.radixPoint&&(l=k.radixPoint.charCodeAt(0));var m,n=c?{begin:h,end:h}:P(i),o=String.fromCharCode(l),r=0;if(k._radixDance&&k.numericInput){var s=A().indexOf(k.radixPoint.charAt(0))+1;n.begin<=s&&(l===k.radixPoint.charCodeAt(0)&&(r=1),n.begin-=1,n.end-=1)}p().writeOutBuffer=!0;var t=E(n,o,g);if(!1!==t&&(q(!0),m=t.caret!==d?t.caret:I(t.pos.begin?t.pos.begin:t.pos),p().p=m),m=(k.numericInput&&t.caret===d?J(m):m)+r,!1!==f&&(setTimeout(function(){k.onKeyValidation.call(i,l,t,k)},0),p().writeOutBuffer&&!1!==t)){var u=A();K(i,u,m,b,!0!==c)}if(b.preventDefault(),c)return!1!==t&&(t.forwardPosition=m),t}},pasteEvent:function(c){var d,e=c.originalEvent||c,f=(a(this),this.inputmask._valueGet(!0)),g=P(this);ba&&(d=g.end,g.end=g.begin,g.begin=d);var h=f.substr(0,g.begin),i=f.substr(g.end,f.length);if(h===(ba?z().reverse():z()).slice(0,g.begin).join("")&&(h=""),i===(ba?z().reverse():z()).slice(g.end).join("")&&(i=""),b.clipboardData&&b.clipboardData.getData)f=h+b.clipboardData.getData("Text")+i;else{if(!e.clipboardData||!e.clipboardData.getData)return!0;f=h+e.clipboardData.getData("text/plain")+i}var j=f;if(a.isFunction(k.onBeforePaste)){if(!1===(j=k.onBeforePaste.call(_,f,k)))return c.preventDefault();j||(j=f)}return M(this,!1,!1,j.toString().split("")),K(this,A(),I(r()),c,W!==A().join("")),c.preventDefault()},inputFallBackEvent:function(b){var c=this,d=c.inputmask._valueGet();if(A().join("")!==d){var f=P(c);if(d=function(a,b,c){if(m){var d=b.replace(A().join(""),"");if(1===d.length){var e=b.split("");e.splice(c.begin,0,d),b=e.join("")}}return b}(0,d=function(a,b,c){return"."===b.charAt(c.begin-1)&&""!==k.radixPoint&&((b=b.split(""))[c.begin-1]=k.radixPoint.charAt(0),b=b.join("")),b}(0,d,f),f),A().join("")!==d){var g=A().join(""),h=!k.numericInput&&d.length>g.length?-1:0,i=d.substr(0,f.begin),j=d.substr(f.begin),l=g.substr(0,f.begin+h),n=g.substr(f.begin+h),o=f,p="",q=!1;if(i!==l){for(var r=(q=i.length>=l.length)?i.length:l.length,s=0;i.charAt(s)===l.charAt(s)&&s<r;s++);q&&(0===h&&(o.begin=s),p+=i.slice(s,o.end))}if(j!==n&&(j.length>n.length?p+=j.slice(0,1):j.length<n.length&&(o.end+=n.length-j.length,q||""===k.radixPoint||""!==j||i.charAt(o.begin+h-1)!==k.radixPoint||(o.begin--,p=k.radixPoint))),K(c,A(),{begin:o.begin+h,end:o.end+h}),p.length>0)a.each(p.split(""),function(b,d){var e=new a.Event("keypress");e.which=d.charCodeAt(0),ea=!1,ha.keypressEvent.call(c,e)});else{o.begin===o.end-1&&(o.begin=J(o.begin+1),o.begin===o.end-1?P(c,o.begin):P(c,o.begin,o.end));var t=new a.Event("keydown");t.keyCode=k.numericInput?e.keyCode.BACKSPACE:e.keyCode.DELETE,ha.keydownEvent.call(c,t),!1===k.insertMode&&P(c,P(c).begin-1)}b.preventDefault()}}},beforeInputEvent:function(b){if(b.cancelable){var c=this;switch(b.inputType){case"insertText":return a.each(b.data.split(""),function(b,d){var e=new a.Event("keypress");e.which=d.charCodeAt(0),ea=!1,ha.keypressEvent.call(c,e)}),b.preventDefault();case"deleteContentBackward":return(d=new a.Event("keydown")).keyCode=e.keyCode.BACKSPACE,ha.keydownEvent.call(c,d),b.preventDefault();case"deleteContentForward":var d;return(d=new a.Event("keydown")).keyCode=e.keyCode.DELETE,ha.keydownEvent.call(c,d),b.preventDefault()}}},setValueEvent:function(b){this.inputmask.refreshValue=!1;var c=(c=b&&b.detail?b.detail[0]:arguments[1])||this.inputmask._valueGet(!0);a.isFunction(k.onBeforeMask)&&(c=k.onBeforeMask.call(_,c,k)||c),M(this,!0,!1,c=c.split("")),W=A().join(""),(k.clearMaskOnLostFocus||k.clearIncomplete)&&this.inputmask._valueGet()===z().join("")&&this.inputmask._valueSet("")},focusEvent:function(a){var b=this.inputmask._valueGet();k.showMaskOnFocus&&(!k.showMaskOnHover||k.showMaskOnHover&&""===b)&&(this.inputmask._valueGet()!==A().join("")?K(this,A(),I(r())):!1===fa&&P(this,I(r()))),!0===k.positionCaretOnTab&&!1===fa&&ha.clickEvent.apply(this,[a,!0]),W=A().join("")},mouseleaveEvent:function(a){if(fa=!1,k.clearMaskOnLostFocus&&c.activeElement!==this){var b=A().slice(),d=this.inputmask._valueGet();d!==this.getAttribute("placeholder")&&""!==d&&(-1===r()&&d===z().join("")?b=[]:R(b),K(this,b))}},clickEvent:function(b,e){var f=this;setTimeout(function(){if(c.activeElement===f){var b=P(f);if(e&&(ba?b.end=b.begin:b.begin=b.end),b.begin===b.end)switch(k.positionCaretOnClick){case"none":break;case"select":P(f,0,A().length);break;case"ignore":P(f,I(r()));break;case"radixFocus":if(function(b){if(""!==k.radixPoint){var c=p().validPositions;if(c[b]===d||c[b].input===L(b)){if(b<I(-1))return!0;var e=a.inArray(k.radixPoint,A());if(-1!==e){for(var f in c)if(e<f&&c[f].input!==L(f))return!1;return!0}}}return!1}(b.begin)){var g=A().join("").indexOf(k.radixPoint);P(f,k.numericInput?I(g):g);break}default:var h=b.begin,i=r(h,!0),j=I(i);if(h<j)P(f,H(h,!0)||H(h-1,!0)?h:I(h));else{var l=p().validPositions[i],m=v(j,l?l.match.locator:d,l),n=L(j,m.match);if(""!==n&&A()[j]!==n&&!0!==m.match.optionalQuantifier&&!0!==m.match.newBlockMarker||!H(j,k.keepStatic)&&m.match.def===n){var o=I(j);(h>=o||h===j)&&(j=o)}P(f,j)}}}},0)},dblclickEvent:function(a){var b=this;setTimeout(function(){P(b,0,I(r()))},0)},cutEvent:function(d){a(this);var f=P(this),g=d.originalEvent||d,h=b.clipboardData||g.clipboardData,i=ba?A().slice(f.end,f.begin):A().slice(f.begin,f.end);h.setData("text",ba?i.reverse().join(""):i.join("")),c.execCommand&&c.execCommand("copy"),T(this,e.keyCode.DELETE,f),K(this,A(),p().p,d,W!==A().join(""))},blurEvent:function(b){var c=a(this);if(this.inputmask){var e=this.inputmask._valueGet(),f=A().slice();""===e&&Z===d||(k.clearMaskOnLostFocus&&(-1===r()&&e===z().join("")?f=[]:R(f)),!1===S(f)&&(setTimeout(function(){c.trigger("incomplete")},0),k.clearIncomplete&&(q(),f=k.clearMaskOnLostFocus?[]:z().slice())),K(this,f,d,b)),W!==A().join("")&&(W=f.join(""),c.trigger("change"))}},mouseenterEvent:function(a){fa=!0,c.activeElement!==this&&k.showMaskOnHover&&this.inputmask._valueGet()!==A().join("")&&K(this,A())},submitEvent:function(a){W!==A().join("")&&X.trigger("change"),k.clearMaskOnLostFocus&&-1===r()&&aa.inputmask._valueGet&&aa.inputmask._valueGet()===z().join("")&&aa.inputmask._valueSet(""),k.clearIncomplete&&!1===S(A())&&aa.inputmask._valueSet(""),k.removeMaskOnSubmit&&(aa.inputmask._valueSet(aa.inputmask.unmaskedvalue(),!0),setTimeout(function(){K(aa,A())},0))},resetEvent:function(a){aa.inputmask.refreshValue=!0,setTimeout(function(){X.trigger("setvalue")},0)}};if(e.prototype.positionColorMask=function(a,b){a.style.left=b.offsetLeft+"px"},f!==d)switch(f.action){case"isComplete":return aa=f.el,S(A());case"unmaskedvalue":return aa!==d&&f.value===d||($=f.value,$=(a.isFunction(k.onBeforeMask)&&k.onBeforeMask.call(_,$,k)||$).split(""),M.call(this,d,!1,!1,$),a.isFunction(k.onBeforeWrite)&&k.onBeforeWrite.call(_,d,A(),0,k)),N(aa);case"mask":!function(b){ga.off(b);var e=function(b,e){var f=b.getAttribute("type"),g="INPUT"===b.tagName&&-1!==a.inArray(f,e.supportsInputType)||b.isContentEditable||"TEXTAREA"===b.tagName;if(!g)if("INPUT"===b.tagName){var i=c.createElement("input");i.setAttribute("type",f),g="text"===i.type,i=null}else g="partial";return!1!==g?function(b){function f(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():-1!==r()||!0!==e.nullable?c.activeElement===this&&e.clearMaskOnLostFocus?(ba?R(A().slice()).reverse():R(A().slice())).join(""):i.call(this):"":i.call(this)}function g(b){j.call(this,b),this.inputmask&&a(this).trigger("setvalue",[b])}var i,j;if(!b.inputmask.__valueGet){if(!0!==e.noValuePatching){if(Object.getOwnPropertyDescriptor){"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===h("test".__proto__)?function(a){return a.__proto__}:function(a){return a.constructor.prototype});var k=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(b),"value"):d;k&&k.get&&k.set?(i=k.get,j=k.set,Object.defineProperty(b,"value",{get:f,set:g,configurable:!0})):"INPUT"!==b.tagName&&(i=function(){return this.textContent},j=function(a){this.textContent=a},Object.defineProperty(b,"value",{get:f,set:g,configurable:!0}))}else c.__lookupGetter__&&b.__lookupGetter__("value")&&(i=b.__lookupGetter__("value"),j=b.__lookupSetter__("value"),b.__defineGetter__("value",f),b.__defineSetter__("value",g));b.inputmask.__valueGet=i,b.inputmask.__valueSet=j}b.inputmask._valueGet=function(a){return ba&&!0!==a?i.call(this.el).split("").reverse().join(""):i.call(this.el)},b.inputmask._valueSet=function(a,b){j.call(this.el,null===a||a===d?"":!0!==b&&ba?a.split("").reverse().join(""):a)},i===d&&(i=function(){return this.value},j=function(a){this.value=a},function(b){if(a.valHooks&&(a.valHooks[b]===d||!0!==a.valHooks[b].inputmaskpatch)){var c=a.valHooks[b]&&a.valHooks[b].get?a.valHooks[b].get:function(a){return a.value},f=a.valHooks[b]&&a.valHooks[b].set?a.valHooks[b].set:function(a,b){return a.value=b,a};a.valHooks[b]={get:function(a){if(a.inputmask){if(a.inputmask.opts.autoUnmask)return a.inputmask.unmaskedvalue();var b=c(a);return-1!==r(d,d,a.inputmask.maskset.validPositions)||!0!==e.nullable?b:""}return c(a)},set:function(b,c){var d,e=a(b);return d=f(b,c),b.inputmask&&e.trigger("setvalue",[c]),d},inputmaskpatch:!0}}}(b.type),function(b){ga.on(b,"mouseenter",function(b){var c=a(this);this.inputmask._valueGet()!==A().join("")&&c.trigger("setvalue")})}(b))}}(b):b.inputmask=d,g}(b,k);if(!1!==e&&(X=a(aa=b),-1===(Y=aa!==d?aa.maxLength:d)&&(Y=d),!0===k.colorMask&&U(aa),l&&("inputmode"in aa&&(aa.inputmode=k.inputmode,aa.setAttribute("inputmode",k.inputmode)),!0===k.disablePredictiveText&&("autocorrect"in aa?aa.autocorrect=!1:(!0!==k.colorMask&&U(aa),aa.type="password"))),!0===e&&(ga.on(aa,"submit",ha.submitEvent),ga.on(aa,"reset",ha.resetEvent),ga.on(aa,"blur",ha.blurEvent),ga.on(aa,"focus",ha.focusEvent),!0!==k.colorMask&&(ga.on(aa,"click",ha.clickEvent),ga.on(aa,"mouseleave",ha.mouseleaveEvent),ga.on(aa,"mouseenter",ha.mouseenterEvent)),ga.on(aa,"dblclick",ha.dblclickEvent),ga.on(aa,"paste",ha.pasteEvent),ga.on(aa,"dragdrop",ha.pasteEvent),ga.on(aa,"drop",ha.pasteEvent),ga.on(aa,"cut",ha.cutEvent),ga.on(aa,"complete",k.oncomplete),ga.on(aa,"incomplete",k.onincomplete),ga.on(aa,"cleared",k.oncleared),l||!0===k.inputEventOnly?aa.removeAttribute("maxLength"):(ga.on(aa,"keydown",ha.keydownEvent),ga.on(aa,"keypress",ha.keypressEvent)),ga.on(aa,"compositionstart",a.noop),ga.on(aa,"compositionupdate",a.noop),ga.on(aa,"compositionend",a.noop),ga.on(aa,"keyup",a.noop),ga.on(aa,"input",ha.inputFallBackEvent),ga.on(aa,"beforeinput",ha.beforeInputEvent)),ga.on(aa,"setvalue",ha.setValueEvent),W=z().join(""),""!==aa.inputmask._valueGet(!0)||!1===k.clearMaskOnLostFocus||c.activeElement===aa)){var f=a.isFunction(k.onBeforeMask)&&k.onBeforeMask.call(_,aa.inputmask._valueGet(!0),k)||aa.inputmask._valueGet(!0);""!==f&&M(aa,!0,!1,f.split(""));var g=A().slice();W=g.join(""),!1===S(g)&&k.clearIncomplete&&q(),k.clearMaskOnLostFocus&&c.activeElement!==aa&&(-1===r()?g=[]:R(g)),(!1===k.clearMaskOnLostFocus||k.showMaskOnFocus&&c.activeElement===aa||""!==aa.inputmask._valueGet(!0))&&K(aa,g),c.activeElement===aa&&P(aa,I(r()))}}(aa);break;case"format":return $=(a.isFunction(k.onBeforeMask)&&k.onBeforeMask.call(_,f.value,k)||f.value).split(""),M.call(this,d,!0,!1,$),f.metadata?{value:ba?A().slice().reverse().join(""):A().join(""),metadata:j.call(this,{action:"getmetadata"},g,k)}:ba?A().slice().reverse().join(""):A().join("");case"isValid":f.value?($=f.value.split(""),M.call(this,d,!0,!0,$)):f.value=A().join("");for(var ia=A(),ja=Q(),ka=ia.length-1;ka>ja&&!H(ka);ka--);return ia.splice(ja,ka+1-ja),S(ia)&&f.value===A().join("");case"getemptymask":return z().join("");case"remove":return aa&&aa.inputmask&&(a.data(aa,"_inputmask_opts",null),X=a(aa),aa.inputmask._valueSet(k.autoUnmask?N(aa):aa.inputmask._valueGet(!0)),ga.off(aa),aa.inputmask.colorMask&&((Z=aa.inputmask.colorMask).removeChild(aa),Z.parentNode.insertBefore(aa,Z),Z.parentNode.removeChild(Z)),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(aa),"value")&&aa.inputmask.__valueGet&&Object.defineProperty(aa,"value",{get:aa.inputmask.__valueGet,set:aa.inputmask.__valueSet,configurable:!0}):c.__lookupGetter__&&aa.__lookupGetter__("value")&&aa.inputmask.__valueGet&&(aa.__defineGetter__("value",aa.inputmask.__valueGet),aa.__defineSetter__("value",aa.inputmask.__valueSet)),aa.inputmask=d),aa;case"getmetadata":if(a.isArray(g.metadata)){var la=o(!0,0,!1).join("");return a.each(g.metadata,function(a,b){if(b.mask===la)return la=b,!1}),la}return g.metadata}}var k=navigator.userAgent,l=i("touchstart"),m=/iemobile/i.test(k),n=/iphone/i.test(k)&&!m;return e.prototype={dataAttribute:"data-inputmask",defaults:{placeholder:"_",optionalmarker:["[","]"],quantifiermarker:["{","}"],groupmarker:["(",")"],alternatormarker:"|",escapeChar:"\\",mask:null,regex:null,oncomplete:a.noop,onincomplete:a.noop,oncleared:a.noop,repeat:0,greedy:!1,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,alias:null,onKeyDown:a.noop,onBeforeMask:null,onBeforePaste:function(b,c){return a.isFunction(c.onBeforeMask)?c.onBeforeMask.call(this,b,c):b},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:a.noop,skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",_radixDance:!1,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","password","search"],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,0,229],isComplete:null,preValidation:null,postValidation:null,staticDefinitionSymbol:d,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"verbatim",colorMask:!1,disablePredictiveText:!1,importDataAttributes:!0},definitions:{9:{validator:"[0-9１-９]",definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",definitionSymbol:"*"},"*":{validator:"[0-9１-９A-Za-zА-яЁёÀ-ÿµ]"}},aliases:{},masksCache:{},mask:function(h){var i=this;return"string"==typeof h&&(h=c.getElementById(h)||c.querySelectorAll(h)),h=h.nodeName?[h]:h,a.each(h,function(c,h){
var k=a.extend(!0,{},i.opts);if(function(c,e,g,h){if(!0===e.importDataAttributes){var i,j,k,l,m=function(a,e){null!==(e=e!==d?e:c.getAttribute(h+"-"+a))&&("string"==typeof e&&(0===a.indexOf("on")?e=b[e]:"false"===e?e=!1:"true"===e&&(e=!0)),g[a]=e)},n=c.getAttribute(h);if(n&&""!==n&&(n=n.replace(/'/g,'"'),j=JSON.parse("{"+n+"}")),j)for(l in k=d,j)if("alias"===l.toLowerCase()){k=j[l];break}for(i in m("alias",k),g.alias&&f(g.alias,g,e),e){if(j)for(l in k=d,j)if(l.toLowerCase()===i.toLowerCase()){k=j[l];break}m(i,k)}}return a.extend(!0,e,g),("rtl"===c.dir||e.rightAlign)&&(c.style.textAlign="right"),("rtl"===c.dir||e.numericInput)&&(c.dir="ltr",c.removeAttribute("dir"),e.isRTL=!0),Object.keys(g).length}(h,k,a.extend(!0,{},i.userOptions),i.dataAttribute)){var l=g(k,i.noMasksCache);l!==d&&(h.inputmask!==d&&(h.inputmask.opts.autoUnmask=!0,h.inputmask.remove()),h.inputmask=new e(d,d,!0),h.inputmask.opts=k,h.inputmask.noMasksCache=i.noMasksCache,h.inputmask.userOptions=a.extend(!0,{},i.userOptions),h.inputmask.isRTL=k.isRTL||k.numericInput,h.inputmask.el=h,h.inputmask.maskset=l,a.data(h,"_inputmask_opts",k),j.call(h.inputmask,{action:"mask"}))}}),h&&h[0]&&h[0].inputmask||this},option:function(b,c){return"string"==typeof b?this.opts[b]:"object"===(void 0===b?"undefined":h(b))?(a.extend(this.userOptions,b),this.el&&!0!==c&&this.mask(this.el),this):void 0},unmaskedvalue:function(a){return this.maskset=this.maskset||g(this.opts,this.noMasksCache),j.call(this,{action:"unmaskedvalue",value:a})},remove:function(){return j.call(this,{action:"remove"})},getemptymask:function(){return this.maskset=this.maskset||g(this.opts,this.noMasksCache),j.call(this,{action:"getemptymask"})},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||g(this.opts,this.noMasksCache),j.call(this,{action:"isComplete"})},getmetadata:function(){return this.maskset=this.maskset||g(this.opts,this.noMasksCache),j.call(this,{action:"getmetadata"})},isValid:function(a){return this.maskset=this.maskset||g(this.opts,this.noMasksCache),j.call(this,{action:"isValid",value:a})},format:function(a,b){return this.maskset=this.maskset||g(this.opts,this.noMasksCache),j.call(this,{action:"format",value:a,metadata:b})},setValue:function(b){this.el&&a(this.el).trigger("setvalue",[b])},analyseMask:function(b,c,f){function g(a,b,c,d){this.matches=[],this.openGroup=a||!1,this.alternatorGroup=!1,this.isGroup=a||!1,this.isOptional=b||!1,this.isQuantifier=c||!1,this.isAlternator=d||!1,this.quantifier={min:1,max:1}}function h(b,g,h){h=h!==d?h:b.matches.length;var i=b.matches[h-1];if(c)0===g.indexOf("[")||s&&/\\d|\\s|\\w]/i.test(g)||"."===g?b.matches.splice(h++,0,{fn:new RegExp(g,f.casing?"i":""),optionality:!1,newBlockMarker:i===d?"master":i.def!==g,casing:null,def:g,placeholder:d,nativeDef:g}):(s&&(g=g[g.length-1]),a.each(g.split(""),function(a,c){i=b.matches[h-1],b.matches.splice(h++,0,{fn:null,optionality:!1,newBlockMarker:i===d?"master":i.def!==c&&null!==i.fn,casing:null,def:f.staticDefinitionSymbol||c,placeholder:f.staticDefinitionSymbol!==d?c:d,nativeDef:(s?"'":"")+c})})),s=!1;else{var j=(f.definitions?f.definitions[g]:d)||e.prototype.definitions[g];j&&!s?b.matches.splice(h++,0,{fn:j.validator?"string"==typeof j.validator?new RegExp(j.validator,f.casing?"i":""):new function(){this.test=j.validator}:new RegExp("."),optionality:!1,newBlockMarker:i===d?"master":i.def!==(j.definitionSymbol||g),casing:j.casing,def:j.definitionSymbol||g,placeholder:j.placeholder,nativeDef:g}):(b.matches.splice(h++,0,{fn:null,optionality:!1,newBlockMarker:i===d?"master":i.def!==g&&null!==i.fn,casing:null,def:f.staticDefinitionSymbol||g,placeholder:f.staticDefinitionSymbol!==d?g:d,nativeDef:(s?"'":"")+g}),s=!1)}}function i(){if(u.length>0){if(h(n=u[u.length-1],l),n.isAlternator){o=u.pop();for(var a=0;a<o.matches.length;a++)o.matches[a].isGroup&&(o.matches[a].isGroup=!1);u.length>0?(n=u[u.length-1]).matches.push(o):t.matches.push(o)}}else h(t,l)}function j(a){var b=new g(!0);return b.openGroup=!1,b.matches=a,b}var k,l,m,n,o,p,q=/(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?(?:\|[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g,r=/\[\^?]?(?:[^\\\]]+|\\[\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,s=!1,t=new g,u=[],v=[];for(c&&(f.optionalmarker[0]=d,f.optionalmarker[1]=d);k=c?r.exec(b):q.exec(b);){if(l=k[0],c)switch(l.charAt(0)){case"?":l="{0,1}";break;case"+":case"*":l="{"+l+"}"}if(s)i();else switch(l.charAt(0)){case"(?=":case"(?!":case"(?<=":case"(?<!":break;case f.escapeChar:s=!0,c&&i();break;case f.optionalmarker[1]:case f.groupmarker[1]:if((m=u.pop()).openGroup=!1,m!==d)if(u.length>0){if((n=u[u.length-1]).matches.push(m),n.isAlternator){o=u.pop();for(var w=0;w<o.matches.length;w++)o.matches[w].isGroup=!1,o.matches[w].alternatorGroup=!1;u.length>0?(n=u[u.length-1]).matches.push(o):t.matches.push(o)}}else t.matches.push(m);else i();break;case f.optionalmarker[0]:u.push(new g(!1,!0));break;case f.groupmarker[0]:u.push(new g(!0));break;case f.quantifiermarker[0]:var x=new g(!1,!1,!0),y=(l=l.replace(/[{}]/g,"")).split("|"),z=y[0].split(","),A=isNaN(z[0])?z[0]:parseInt(z[0]),B=1===z.length?A:isNaN(z[1])?z[1]:parseInt(z[1]);"*"!==A&&"+"!==A||(A="*"===B?0:1),x.quantifier={min:A,max:B,jit:y[1]};var C=u.length>0?u[u.length-1].matches:t.matches;if((k=C.pop()).isAlternator){C.push(k),C=k.matches;var D=new g(!0),E=C.pop();C.push(D),C=D.matches,k=E}k.isGroup||(k=j([k])),C.push(k),C.push(x);break;case f.alternatormarker:var F=function(a){var b=a.pop();return b.isQuantifier&&(b=j([a.pop(),b])),b};if(u.length>0){var G=(n=u[u.length-1]).matches[n.matches.length-1];p=n.openGroup&&(G.matches===d||!1===G.isGroup&&!1===G.isAlternator)?u.pop():F(n.matches)}else p=F(t.matches);if(p.isAlternator)u.push(p);else if(p.alternatorGroup?(o=u.pop(),p.alternatorGroup=!1):o=new g(!1,!1,!1,!0),o.matches.push(p),u.push(o),p.openGroup){p.openGroup=!1;var H=new g(!0);H.alternatorGroup=!0,u.push(H)}break;default:i()}}for(;u.length>0;)m=u.pop(),t.matches.push(m);return t.matches.length>0&&(function b(e){e&&e.matches&&a.each(e.matches,function(a,g){var i=e.matches[a+1];(i===d||i.matches===d||!1===i.isQuantifier)&&g&&g.isGroup&&(g.isGroup=!1,c||(h(g,f.groupmarker[0],0),!0!==g.openGroup&&h(g,f.groupmarker[1]))),b(g)})}(t),v.push(t)),(f.numericInput||f.isRTL)&&function a(b){for(var c in b.matches=b.matches.reverse(),b.matches)if(b.matches.hasOwnProperty(c)){var e=parseInt(c);if(b.matches[c].isQuantifier&&b.matches[e+1]&&b.matches[e+1].isGroup){var g=b.matches[c];b.matches.splice(c,1),b.matches.splice(e+1,0,g)}b.matches[c].matches!==d?b.matches[c]=a(b.matches[c]):b.matches[c]=((h=b.matches[c])===f.optionalmarker[0]?h=f.optionalmarker[1]:h===f.optionalmarker[1]?h=f.optionalmarker[0]:h===f.groupmarker[0]?h=f.groupmarker[1]:h===f.groupmarker[1]&&(h=f.groupmarker[0]),h)}var h;return b}(v[0]),v}},e.extendDefaults=function(b){a.extend(!0,e.prototype.defaults,b)},e.extendDefinitions=function(b){a.extend(!0,e.prototype.definitions,b)},e.extendAliases=function(b){a.extend(!0,e.prototype.aliases,b)},e.format=function(a,b,c){return e(b).format(a,c)},e.unmask=function(a,b){return e(b).unmaskedvalue(a)},e.isValid=function(a,b){return e(b).isValid(a)},e.remove=function(b){"string"==typeof b&&(b=c.getElementById(b)||c.querySelectorAll(b)),b=b.nodeName?[b]:b,a.each(b,function(a,b){b.inputmask&&b.inputmask.remove()})},e.setValue=function(b,d){"string"==typeof b&&(b=c.getElementById(b)||c.querySelectorAll(b)),b=b.nodeName?[b]:b,a.each(b,function(b,c){c.inputmask?c.inputmask.setValue(d):a(c).trigger("setvalue",[d])})},e.escapeRegex=function(a){return a.replace(new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"].join("|\\")+")","gim"),"\\$1")},e.keyCode={BACKSPACE:8,BACKSPACE_SAFARI:127,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,RIGHT:39,SPACE:32,TAB:9,UP:38,X:88,CONTROL:17},e},e=[c(0),c(5),c(6)],void 0===(f="function"==typeof(d=g)?d.apply(b,e):d)||(a.exports=f)},function(a,b){a.exports=jQuery},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}c(4),c(7),c(8),c(9);var e=d(c(1)),f=d(c(0)),g=d(c(2));f.default===g.default&&c(10),window.Inputmask=e.default},function(a,b,c){"use strict";var d,e,f,g;"function"==typeof Symbol&&Symbol.iterator,g=function(a,b){function c(a){if(!a.tokenizer){var b=[];for(var c in g)-1===b.indexOf(c[0])&&b.push(c[0]);a.tokenizer="("+b.join("+|")+")+?|.",a.tokenizer=new RegExp(a.tokenizer,"g")}return a.tokenizer}function d(a,d,e){for(var f,h="";f=c(e).exec(a);)if(void 0===d)if(g[f[0]])h+="("+g[f[0]][0]+")";else switch(f[0]){case"[":h+="(";break;case"]":h+=")?";break;default:h+=b.escapeRegex(f[0])}else g[f[0]]?h+=g[f[0]][3].call(d.date):h+=f[0];return h}function e(a,b){for(a=String(a),b=b||2;a.length<b;)a="0"+a;return a}function f(a,b,d){function e(a){var b=4===a.length?a:(new Date).getFullYear().toString().substr(0,4-a.length)+a;return d.min&&d.min.year&&d.max&&d.max.year?(b=b.replace(/[^0-9]/g,""),b+=d.min.year==d.max.year?d.min.year.substr(b.length):(""!==b&&0==d.max.year.indexOf(b)?parseInt(d.max.year)-1:parseInt(d.min.year)+1).toString().substr(b.length)):b=b.replace(/[^0-9]/g,"0"),b}var f,h,i,j={date:new Date(1,0,1)},k=a;if("string"==typeof k){for(;h=c(d).exec(b);){var l=k.slice(0,h[0].length);g.hasOwnProperty(h[0])&&(f=g[h[0]][2],i=g[h[0]][1],function(a,b,c){"year"===f?(a[f]=e(b),a["raw"+f]=b):a[f]=c.min&&b.match(/[^0-9]/)?c.min[f]:b,void 0!==i&&i.call(a.date,"month"==f?parseInt(a[f])-1:a[f])}(j,l,d)),k=k.slice(l.length)}return j}}var g={d:["[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",Date.prototype.getDate],dd:["0[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",function(){return e(Date.prototype.getDate.call(this),2)}],ddd:[""],dddd:[""],m:["[1-9]|1[012]",Date.prototype.setMonth,"month",function(){return Date.prototype.getMonth.call(this)+1}],mm:["0[1-9]|1[012]",Date.prototype.setMonth,"month",function(){return e(Date.prototype.getMonth.call(this)+1,2)}],mmm:[""],mmmm:[""],yy:["[0-9]{2}",Date.prototype.setFullYear,"year",function(){return e(Date.prototype.getFullYear.call(this),2)}],yyyy:["[0-9]{4}",Date.prototype.setFullYear,"year",function(){return e(Date.prototype.getFullYear.call(this),4)}],h:["[1-9]|1[0-2]",Date.prototype.setHours,"hours",Date.prototype.getHours],hh:["0[1-9]|1[0-2]",Date.prototype.setHours,"hours",function(){return e(Date.prototype.getHours.call(this),2)}],hhh:["[0-9]+",Date.prototype.setHours,"hours",Date.prototype.getHours],H:["1?[0-9]|2[0-3]",Date.prototype.setHours,"hours",Date.prototype.getHours],HH:["[01][0-9]|2[0-3]",Date.prototype.setHours,"hours",function(){return e(Date.prototype.getHours.call(this),2)}],HHH:["[0-9]+",Date.prototype.setHours,"hours",Date.prototype.getHours],M:["[1-5]?[0-9]",Date.prototype.setMinutes,"minutes",Date.prototype.getMinutes],MM:["[0-5][0-9]",Date.prototype.setMinutes,"minutes",function(){return e(Date.prototype.getMinutes.call(this),2)}],s:["[1-5]?[0-9]",Date.prototype.setSeconds,"seconds",Date.prototype.getSeconds],ss:["[0-5][0-9]",Date.prototype.setSeconds,"seconds",function(){return e(Date.prototype.getSeconds.call(this),2)}],l:["[0-9]{3}",Date.prototype.setMilliseconds,"milliseconds",function(){return e(Date.prototype.getMilliseconds.call(this),3)}],L:["[0-9]{2}",Date.prototype.setMilliseconds,"milliseconds",function(){return e(Date.prototype.getMilliseconds.call(this),2)}],t:["[ap]"],tt:["[ap]m"],T:["[AP]"],TT:["[AP]M"],Z:[""],o:[""],S:[""]},h={isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};return b.extendAliases({datetime:{mask:function(a){return g.S=a.i18n.ordinalSuffix.join("|"),a.inputFormat=h[a.inputFormat]||a.inputFormat,a.displayFormat=h[a.displayFormat]||a.displayFormat||a.inputFormat,a.outputFormat=h[a.outputFormat]||a.outputFormat||a.inputFormat,a.placeholder=""!==a.placeholder?a.placeholder:a.inputFormat.replace(/[\[\]]/,""),a.min=f(a.min,a.inputFormat,a),a.max=f(a.max,a.inputFormat,a),a.regex=d(a.inputFormat,void 0,a),null},placeholder:"",inputFormat:"isoDateTime",displayFormat:void 0,outputFormat:void 0,min:null,max:null,i18n:{dayNames:["Mon","Tue","Wed","Thu","Fri","Sat","Sun","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],ordinalSuffix:["st","nd","rd","th"]},postValidation:function(a,b,c){var d=b,e=f(a.join(""),c.inputFormat,c);return d&&e.date.getTime()==e.date.getTime()&&(d=(d=function(a,b){return(!isFinite(a.day)||"29"==a.day&&!isFinite(a.rawyear)||new Date(a.date.getFullYear(),isFinite(a.month)?a.month:a.date.getMonth()+1,0).getDate()>=a.day)&&b}(e,d))&&function(a,b){var c=!0;return b.min&&b.min.date.getTime()==b.min.date.getTime()&&(c=b.min.date.getTime()<=a.date.getTime()),c&&b.max&&b.max.date.getTime()==b.max.date.getTime()&&(c=b.max.date.getTime()>=a.date.getTime()),c}(e,c)),d},onKeyDown:function(d,f,g,h){if(d.ctrlKey&&d.keyCode===b.keyCode.RIGHT){for(var i,j=new Date,k="";i=c(h).exec(h.inputFormat);)"d"===i[0].charAt(0)?k+=e(j.getDate(),i[0].length):"m"===i[0].charAt(0)?k+=e(j.getMonth()+1,i[0].length):"yyyy"===i[0]?k+=j.getFullYear().toString():"y"===i[0].charAt(0)&&(k+=e(j.getYear(),i[0].length));this.inputmask._valueSet(k),a(this).trigger("setvalue")}},onUnMask:function(a,b,c){return d(c.outputFormat,f(a,c.inputFormat,c),c)},casing:function(a,b,c,d){return 0==b.nativeDef.indexOf("[ap]")?a.toLowerCase():0==b.nativeDef.indexOf("[AP]")?a.toUpperCase():a},insertMode:!1}}),b},e=[c(0),c(1)],void 0===(f="function"==typeof(d=g)?d.apply(b,e):d)||(a.exports=f)},function(a,b,c){"use strict";var d;"function"==typeof Symbol&&Symbol.iterator,void 0===(d=function(){return window}.call(b,c,b,a))||(a.exports=d)},function(a,b,c){"use strict";var d;"function"==typeof Symbol&&Symbol.iterator,void 0===(d=function(){return document}.call(b,c,b,a))||(a.exports=d)},function(a,b,c){"use strict";var d,e,f,g;"function"==typeof Symbol&&Symbol.iterator,g=function(a,b){return b.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"#":{validator:"[0-9A-Fa-f]",casing:"upper"}}),b.extendAliases({cssunit:{regex:"[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)"},url:{regex:"(https?|ftp)//.*",autoUnmask:!1},ip:{mask:"i[i[i]].i[i[i]].i[i[i]].i[i[i]]",definitions:{i:{validator:function(a,b,c,d,e){return c-1>-1&&"."!==b.buffer[c-1]?(a=b.buffer[c-1]+a,a=c-2>-1&&"."!==b.buffer[c-2]?b.buffer[c-2]+a:"0"+a):a="00"+a,new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(a)}}},onUnMask:function(a,b,c){return a},inputmode:"numeric"},email:{mask:"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",greedy:!1,casing:"lower",onBeforePaste:function(a,b){return(a=a.toLowerCase()).replace("mailto:","")},definitions:{"*":{validator:"[0-9１-９A-Za-zА-яЁёÀ-ÿµ!#$%&'*+/=?^_`{|}~-]"},"-":{validator:"[0-9A-Za-z-]"}},onUnMask:function(a,b,c){return a},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",casing:"upper"}},clearIncomplete:!0,autoUnmask:!0}}),b},e=[c(0),c(1)],void 0===(f="function"==typeof(d=g)?d.apply(b,e):d)||(a.exports=f)},function(a,b,c){"use strict";var d,e,f,g;"function"==typeof Symbol&&Symbol.iterator,g=function(a,b,c){function d(a,c){for(var d="",e=0;e<a.length;e++)b.prototype.definitions[a.charAt(e)]||c.definitions[a.charAt(e)]||c.optionalmarker.start===a.charAt(e)||c.optionalmarker.end===a.charAt(e)||c.quantifiermarker.start===a.charAt(e)||c.quantifiermarker.end===a.charAt(e)||c.groupmarker.start===a.charAt(e)||c.groupmarker.end===a.charAt(e)||c.alternatormarker===a.charAt(e)?d+="\\"+a.charAt(e):d+=a.charAt(e);return d}return b.extendAliases({numeric:{mask:function(a){if(0!==a.repeat&&isNaN(a.integerDigits)&&(a.integerDigits=a.repeat),a.repeat=0,a.groupSeparator===a.radixPoint&&a.digits&&"0"!==a.digits&&("."===a.radixPoint?a.groupSeparator=",":","===a.radixPoint?a.groupSeparator=".":a.groupSeparator="")," "===a.groupSeparator&&(a.skipOptionalPartCharacter=c),a.autoGroup=a.autoGroup&&""!==a.groupSeparator,a.autoGroup&&("string"==typeof a.groupSize&&isFinite(a.groupSize)&&(a.groupSize=parseInt(a.groupSize)),isFinite(a.integerDigits))){var b=Math.floor(a.integerDigits/a.groupSize),e=a.integerDigits%a.groupSize;a.integerDigits=parseInt(a.integerDigits)+(0===e?b-1:b),a.integerDigits<1&&(a.integerDigits="*")}a.placeholder.length>1&&(a.placeholder=a.placeholder.charAt(0)),"radixFocus"===a.positionCaretOnClick&&""===a.placeholder&&!1===a.integerOptional&&(a.positionCaretOnClick="lvp"),a.definitions[";"]=a.definitions["~"],a.definitions[";"].definitionSymbol="~",!0===a.numericInput&&(a.positionCaretOnClick="radixFocus"===a.positionCaretOnClick?"lvp":a.positionCaretOnClick,a.digitsOptional=!1,isNaN(a.digits)&&(a.digits=2),a.decimalProtect=!1);var f="[+]";if(f+=d(a.prefix,a),!0===a.integerOptional?f+="~{1,"+a.integerDigits+"}":f+="~{"+a.integerDigits+"}",a.digits!==c){var g=a.decimalProtect?":":a.radixPoint,h=a.digits.toString().split(",");isFinite(h[0])&&h[1]&&isFinite(h[1])?f+=g+";{"+a.digits+"}":(isNaN(a.digits)||parseInt(a.digits)>0)&&(a.digitsOptional?f+="["+g+";{1,"+a.digits+"}]":f+=g+";{"+a.digits+"}")}return f+=d(a.suffix,a),f+="[-]",a.greedy=!1,f},placeholder:"",greedy:!1,digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",groupSize:3,groupSeparator:"",autoGroup:!1,allowMinus:!0,negationSymbol:{front:"-",back:""},integerDigits:"+",integerOptional:!0,prefix:"",suffix:"",rightAlign:!0,decimalProtect:!0,min:null,max:null,step:1,insertMode:!0,autoUnmask:!1,unmaskAsNumber:!1,inputmode:"numeric",preValidation:function(b,d,e,f,g,h){if("-"===e||e===g.negationSymbol.front)return!0===g.allowMinus&&(g.isNegative=g.isNegative===c||!g.isNegative,""===b.join("")||{caret:d,dopost:!0});if(!1===f&&e===g.radixPoint&&g.digits!==c&&(isNaN(g.digits)||parseInt(g.digits)>0)){var i=a.inArray(g.radixPoint,b);if(-1!==i&&h.validPositions[i]!==c)return!0===g.numericInput?d===i:{caret:i+1}}return!0},postValidation:function(d,e,f){var g=f.suffix.split(""),h=f.prefix.split("");if(e.pos===c&&e.caret!==c&&!0!==e.dopost)return e;var i=e.caret!==c?e.caret:e.pos,j=d.slice();f.numericInput&&(i=j.length-i-1,j=j.reverse());var k=j[i];if(k===f.groupSeparator&&(k=j[i+=1]),i===j.length-f.suffix.length-1&&k===f.radixPoint)return e;k!==c&&k!==f.radixPoint&&k!==f.negationSymbol.front&&k!==f.negationSymbol.back&&(j[i]="?",f.prefix.length>0&&i>=(!1===f.isNegative?1:0)&&i<f.prefix.length-1+(!1===f.isNegative?1:0)?h[i-(!1===f.isNegative?1:0)]="?":f.suffix.length>0&&i>=j.length-f.suffix.length-(!1===f.isNegative?1:0)&&(g[i-(j.length-f.suffix.length-(!1===f.isNegative?1:0))]="?")),h=h.join(""),g=g.join("");var l=j.join("").replace(h,"");if(l=(l=(l=(l=l.replace(g,"")).replace(new RegExp(b.escapeRegex(f.groupSeparator),"g"),"")).replace(new RegExp("[-"+b.escapeRegex(f.negationSymbol.front)+"]","g"),"")).replace(new RegExp(b.escapeRegex(f.negationSymbol.back)+"$"),""),isNaN(f.placeholder)&&(l=l.replace(new RegExp(b.escapeRegex(f.placeholder),"g"),"")),l.length>1&&1!==l.indexOf(f.radixPoint)&&("0"===k&&(l=l.replace(/^\?/g,"")),l=l.replace(/^0/g,"")),l.charAt(0)===f.radixPoint&&""!==f.radixPoint&&!0!==f.numericInput&&(l="0"+l),""!==l){if(l=l.split(""),(!f.digitsOptional||f.enforceDigitsOnBlur&&"blur"===e.event)&&isFinite(f.digits)){var m=a.inArray(f.radixPoint,l),n=a.inArray(f.radixPoint,j);-1===m&&(l.push(f.radixPoint),m=l.length-1);for(var o=1;o<=f.digits;o++)f.digitsOptional&&(!f.enforceDigitsOnBlur||"blur"!==e.event)||l[m+o]!==c&&l[m+o]!==f.placeholder.charAt(0)?-1!==n&&j[n+o]!==c&&(l[m+o]=l[m+o]||j[n+o]):l[m+o]=e.placeholder||f.placeholder.charAt(0)}if(!0!==f.autoGroup||""===f.groupSeparator||k===f.radixPoint&&e.pos===c&&!e.dopost)l=l.join("");else{var p=l[l.length-1]===f.radixPoint&&e.c===f.radixPoint;l=b(function(a,b){var c="";if(c+="("+b.groupSeparator+"*{"+b.groupSize+"}){*}",""!==b.radixPoint){var d=a.join("").split(b.radixPoint);d[1]&&(c+=b.radixPoint+"*{"+d[1].match(/^\d*\??\d*/)[0].length+"}")}return c}(l,f),{numericInput:!0,jitMasking:!0,definitions:{"*":{validator:"[0-9?]",cardinality:1}}}).format(l.join("")),p&&(l+=f.radixPoint),l.charAt(0)===f.groupSeparator&&l.substr(1)}}if(f.isNegative&&"blur"===e.event&&(f.isNegative="0"!==l),l=h+l,l+=g,f.isNegative&&(l=f.negationSymbol.front+l,l+=f.negationSymbol.back),l=l.split(""),k!==c)if(k!==f.radixPoint&&k!==f.negationSymbol.front&&k!==f.negationSymbol.back)(i=a.inArray("?",l))>-1?l[i]=k:i=e.caret||0;else if(k===f.radixPoint||k===f.negationSymbol.front||k===f.negationSymbol.back){var q=a.inArray(k,l);-1!==q&&(i=q)}f.numericInput&&(i=l.length-i-1,l=l.reverse());var r={caret:k===c||e.pos!==c?i+(f.numericInput?-1:1):i,buffer:l,refreshFromBuffer:e.dopost||d.join("")!==l.join("")};return r.refreshFromBuffer?r:e},onBeforeWrite:function(d,e,f,g){if(d)switch(d.type){case"keydown":return g.postValidation(e,{caret:f,dopost:!0},g);case"blur":case"checkval":var h;if(function(a){a.parseMinMaxOptions===c&&(null!==a.min&&(a.min=a.min.toString().replace(new RegExp(b.escapeRegex(a.groupSeparator),"g"),""),","===a.radixPoint&&(a.min=a.min.replace(a.radixPoint,".")),a.min=isFinite(a.min)?parseFloat(a.min):NaN,isNaN(a.min)&&(a.min=Number.MIN_VALUE)),null!==a.max&&(a.max=a.max.toString().replace(new RegExp(b.escapeRegex(a.groupSeparator),"g"),""),","===a.radixPoint&&(a.max=a.max.replace(a.radixPoint,".")),a.max=isFinite(a.max)?parseFloat(a.max):NaN,isNaN(a.max)&&(a.max=Number.MAX_VALUE)),a.parseMinMaxOptions="done")}(g),null!==g.min||null!==g.max){if(h=g.onUnMask(e.join(""),c,a.extend({},g,{unmaskAsNumber:!0})),null!==g.min&&h<g.min)return g.isNegative=g.min<0,g.postValidation(g.min.toString().replace(".",g.radixPoint).split(""),{caret:f,dopost:!0,placeholder:"0"},g);if(null!==g.max&&h>g.max)return g.isNegative=g.max<0,g.postValidation(g.max.toString().replace(".",g.radixPoint).split(""),{caret:f,dopost:!0,placeholder:"0"},g)}return g.postValidation(e,{caret:f,placeholder:"0",event:"blur"},g);case"_checkval":return{caret:f}}},regex:{integerPart:function(a,c){return c?new RegExp("["+b.escapeRegex(a.negationSymbol.front)+"+]?"):new RegExp("["+b.escapeRegex(a.negationSymbol.front)+"+]?\\d+")},integerNPart:function(a){return new RegExp("[\\d"+b.escapeRegex(a.groupSeparator)+b.escapeRegex(a.placeholder.charAt(0))+"]+")}},definitions:{"~":{validator:function(a,d,e,f,g,h){var i;if("k"===a||"m"===a){i={insert:[],c:0};for(var j=0,k="k"===a?2:5;j<k;j++)i.insert.push({pos:e+j,c:0});return i.pos=e+k,i}if(!0===(i=f?new RegExp("[0-9"+b.escapeRegex(g.groupSeparator)+"]").test(a):new RegExp("[0-9]").test(a))){if(!0!==g.numericInput&&d.validPositions[e]!==c&&"~"===d.validPositions[e].match.def&&!h){var l=d.buffer.join(""),m=(l=(l=l.replace(new RegExp("[-"+b.escapeRegex(g.negationSymbol.front)+"]","g"),"")).replace(new RegExp(b.escapeRegex(g.negationSymbol.back)+"$"),"")).split(g.radixPoint);m.length>1&&(m[1]=m[1].replace(/0/g,g.placeholder.charAt(0))),"0"===m[0]&&(m[0]=m[0].replace(/0/g,g.placeholder.charAt(0))),l=m[0]+g.radixPoint+m[1]||"";var n=d._buffer.join("");for(l===g.radixPoint&&(l=n);null===l.match(b.escapeRegex(n)+"$");)n=n.slice(1);i=(l=(l=l.replace(n,"")).split(""))[e]===c?{pos:e,remove:e}:{pos:e}}}else f||a!==g.radixPoint||d.validPositions[e-1]!==c||(i={insert:{pos:e,c:0},pos:e+1});return i},cardinality:1},"+":{validator:function(a,b,c,d,e){return e.allowMinus&&("-"===a||a===e.negationSymbol.front)},cardinality:1,placeholder:""},"-":{validator:function(a,b,c,d,e){return e.allowMinus&&a===e.negationSymbol.back},cardinality:1,placeholder:""},":":{validator:function(a,c,d,e,f){var g="["+b.escapeRegex(f.radixPoint)+"]",h=new RegExp(g).test(a);return h&&c.validPositions[d]&&c.validPositions[d].match.placeholder===f.radixPoint&&(h={caret:d+1}),h},cardinality:1,placeholder:function(a){return a.radixPoint}}},onUnMask:function(a,c,d){if(""===c&&!0===d.nullable)return c;var e=a.replace(d.prefix,"");return e=(e=e.replace(d.suffix,"")).replace(new RegExp(b.escapeRegex(d.groupSeparator),"g"),""),""!==d.placeholder.charAt(0)&&(e=e.replace(new RegExp(d.placeholder.charAt(0),"g"),"0")),d.unmaskAsNumber?(""!==d.radixPoint&&-1!==e.indexOf(d.radixPoint)&&(e=e.replace(b.escapeRegex.call(this,d.radixPoint),".")),e=(e=e.replace(new RegExp("^"+b.escapeRegex(d.negationSymbol.front)),"-")).replace(new RegExp(b.escapeRegex(d.negationSymbol.back)+"$"),""),Number(e)):e},isComplete:function(a,c){var d=(c.numericInput?a.slice().reverse():a).join("");return d=(d=(d=(d=(d=d.replace(new RegExp("^"+b.escapeRegex(c.negationSymbol.front)),"-")).replace(new RegExp(b.escapeRegex(c.negationSymbol.back)+"$"),"")).replace(c.prefix,"")).replace(c.suffix,"")).replace(new RegExp(b.escapeRegex(c.groupSeparator)+"([0-9]{3})","g"),"$1"),","===c.radixPoint&&(d=d.replace(b.escapeRegex(c.radixPoint),".")),isFinite(d)},onBeforeMask:function(d,e){if(e.isNegative=c,"number"==typeof d&&""!==e.radixPoint&&(d=d.toString().replace(".",e.radixPoint)),d=d.toString().charAt(d.length-1)===e.radixPoint?d.toString().substr(0,d.length-1):d.toString(),""!==e.radixPoint&&isFinite(d)){var f=d.split("."),g=""!==e.groupSeparator?parseInt(e.groupSize):0;2===f.length&&(f[0].length>g||f[1].length>g||f[0].length<=g&&f[1].length<g)&&(d=d.replace(".",e.radixPoint))}var h=d.match(/,/g),i=d.match(/\./g);if(d=i&&h?i.length>h.length?(d=d.replace(/\./g,"")).replace(",",e.radixPoint):h.length>i.length?(d=d.replace(/,/g,"")).replace(".",e.radixPoint):d.indexOf(".")<d.indexOf(",")?d.replace(/\./g,""):d.replace(/,/g,""):d.replace(new RegExp(b.escapeRegex(e.groupSeparator),"g"),""),0===e.digits&&(-1!==d.indexOf(".")?d=d.substring(0,d.indexOf(".")):-1!==d.indexOf(",")&&(d=d.substring(0,d.indexOf(",")))),""!==e.radixPoint&&isFinite(e.digits)&&-1!==d.indexOf(e.radixPoint)){var j=d.split(e.radixPoint)[1].match(new RegExp("\\d*"))[0];if(parseInt(e.digits)<j.toString().length){var k=Math.pow(10,parseInt(e.digits));d=d.replace(b.escapeRegex(e.radixPoint),"."),d=(d=Math.round(parseFloat(d)*k)/k).toString().replace(".",e.radixPoint)}}return function(b,c){var d=a.inArray(c.radixPoint,b);-1===d&&(b.push(c.radixPoint),d=b.length-1);for(var e=1;e<=c.digits;e++)b[d+e]=b[d+e]||"0";return b}(d.toString().split(""),e).join("")},onKeyDown:function(c,d,e,f){var g=a(this);if(c.ctrlKey)switch(c.keyCode){case b.keyCode.UP:g.val(parseFloat(this.inputmask.unmaskedvalue())+parseInt(f.step)),g.trigger("setvalue");break;case b.keyCode.DOWN:g.val(parseFloat(this.inputmask.unmaskedvalue())-parseInt(f.step)),g.trigger("setvalue")}}},currency:{prefix:"$ ",groupSeparator:",",alias:"numeric",placeholder:"0",autoGroup:!0,digits:2,digitsOptional:!1,clearMaskOnLostFocus:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",digits:0,radixPoint:""},percentage:{alias:"numeric",digits:2,digitsOptional:!0,radixPoint:".",placeholder:"0",autoGroup:!1,min:0,max:100,suffix:" %",allowMinus:!1}}),b},e=[c(0),c(1)],void 0===(f="function"==typeof(d=g)?d.apply(b,e):d)||(a.exports=f)},function(a,b,c){"use strict";var d,e,f,g;"function"==typeof Symbol&&Symbol.iterator,g=function(a,b){function c(a,b){var c=(a.mask||a).replace(/#/g,"0").replace(/\)/,"0").replace(/[+()#-]/g,""),d=(b.mask||b).replace(/#/g,"0").replace(/\)/,"0").replace(/[+()#-]/g,"");return c.localeCompare(d)}var d=b.prototype.analyseMask;return b.prototype.analyseMask=function(b,c,e){var f={};return e.phoneCodes&&(e.phoneCodes&&e.phoneCodes.length>1e3&&(function a(c,d,e){d=d||"",e=e||f,""!==d&&(e[d]={});for(var g="",h=e[d]||e,i=c.length-1;i>=0;i--)h[g=(b=c[i].mask||c[i]).substr(0,1)]=h[g]||[],h[g].unshift(b.substr(1)),c.splice(i,1);for(var j in h)h[j].length>500&&a(h[j].slice(),j,h)}((b=b.substr(1,b.length-2)).split(e.groupmarker[1]+e.alternatormarker+e.groupmarker[0])),b=function b(c){var d="",f=[];for(var g in c)a.isArray(c[g])?1===c[g].length?f.push(g+c[g]):f.push(g+e.groupmarker[0]+c[g].join(e.groupmarker[1]+e.alternatormarker+e.groupmarker[0])+e.groupmarker[1]):f.push(g+b(c[g]));return 1===f.length?d+=f[0]:d+=e.groupmarker[0]+f.join(e.groupmarker[1]+e.alternatormarker+e.groupmarker[0])+e.groupmarker[1],d}(f)),b=b.replace(/9/g,"\\9")),d.call(this,b,c,e)},b.extendAliases({abstractphone:{groupmarker:["<",">"],countrycode:"",phoneCodes:[],keepStatic:"auto",mask:function(a){return a.definitions={"#":b.prototype.definitions[9]},a.phoneCodes.sort(c)},onBeforeMask:function(a,b){var c=a.replace(/^0{1,2}/,"").replace(/[\s]/g,"");return(c.indexOf(b.countrycode)>1||-1===c.indexOf(b.countrycode))&&(c="+"+b.countrycode+c),c},onUnMask:function(a,b,c){return a.replace(/[()#-]/g,"")},inputmode:"tel"}}),b},e=[c(0),c(1)],void 0===(f="function"==typeof(d=g)?d.apply(b,e):d)||(a.exports=f)},function(a,b,c){"use strict";var d,e,f,g,h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};g=function(a,b){return void 0===a.fn.inputmask&&(a.fn.inputmask=function(c,d){var e,f=this[0];if(void 0===d&&(d={}),"string"==typeof c)switch(c){case"unmaskedvalue":return f&&f.inputmask?f.inputmask.unmaskedvalue():a(f).val();case"remove":return this.each(function(){this.inputmask&&this.inputmask.remove()});case"getemptymask":return f&&f.inputmask?f.inputmask.getemptymask():"";case"hasMaskedValue":return!(!f||!f.inputmask)&&f.inputmask.hasMaskedValue();case"isComplete":return!f||!f.inputmask||f.inputmask.isComplete();case"getmetadata":return f&&f.inputmask?f.inputmask.getmetadata():void 0;case"setvalue":b.setValue(f,d);break;case"option":if("string"!=typeof d)return this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(d)});if(f&&void 0!==f.inputmask)return f.inputmask.option(d);break;default:return d.alias=c,e=new b(d),this.each(function(){e.mask(this)})}else{if("object"==(void 0===c?"undefined":h(c)))return e=new b(c),void 0===c.mask&&void 0===c.alias?this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(c);e.mask(this)}):this.each(function(){e.mask(this)});if(void 0===c)return this.each(function(){(e=new b(d)).mask(this)})}}),a.fn.inputmask},e=[c(2),c(1)],void 0===(f="function"==typeof(d=g)?d.apply(b,e):d)||(a.exports=f)}]),jQuery&&function(a){a.extend(a.fn,{miniColors:function(b,c){var d=function(b,c,d){var e=s(b.val());e||(e="ffffff");var f=x(e),h=a('<span class="input-group-addon" style="background-color: #'+e+'" href="#"></span>');h.insertAfter(b),b.addClass("miniColors").data("original-maxlength",b.attr("maxlength")||null).data("original-autocomplete",b.attr("autocomplete")||null).data("letterCase",c.letterCase?c.letterCase:"uppercase").data("trigger",h).data("hsb",f).data("change",c.change?c.change:null).data("close",c.close?c.close:null).data("open",c.open?c.open:null).attr("maxlength",7).attr("autocomplete","off").val("#"+o(e,c.letterCase)).trigger("change"),c.readonly&&b.prop("readonly",!0),c.disabled&&g(b),h.on("click.miniColors",function(a){a.preventDefault(),""===b.val()&&b.val("#").trigger("change"),i(b)}),b.on("focus.miniColors",function(a){""===b.val()&&b.val("#").trigger("change"),i(b)}),b.on("blur.miniColors",function(a){var c=s(y(b.data("hsb")));b.val(c?"#"+o(c,b.data("letterCase")):"").trigger("change")}),b.on("keydown.miniColors",function(a){9===a.keyCode&&j(b)}),b.on("keyup.miniColors",function(a){n(b)}),b.on("paste.miniColors",function(a){setTimeout(function(){n(b)},5)})},e=function(b){j(),b=a(b),b.data("trigger").remove(),b.attr("autocomplete",b.data("original-autocomplete")).attr("maxlength",b.data("original-maxlength")).removeData().removeClass("miniColors").off(".miniColors"),a(document).off(".miniColors")},f=function(a){
a.prop("disabled",!1).data("trigger").css("opacity",1)},g=function(a){j(a),a.prop("disabled",!0).data("trigger").css("opacity",.5)},i=function(b){if(b.prop("disabled"))return!1;j();var c=a('<div class="miniColors-selector"></div>');c.append('<div class="miniColors-colors" style="background-color: #FFF;"><div class="miniColors-colorPicker"><div class="miniColors-colorPicker-inner"></div></div>').append('<div class="miniColors-hues"><div class="miniColors-huePicker"></div></div>').css("display","none").addClass(b.attr("class")).removeClass("form-control");var d=b.data("hsb");c.find(".miniColors-colors").css("backgroundColor","#"+y({h:d.h,s:100,b:100}));var e=b.data("colorPosition");e||(e=p(d)),c.find(".miniColors-colorPicker").css("top",e.y+"px").css("left",e.x+"px");var f=b.data("huePosition");f||(f=q(d)),c.find(".miniColors-huePicker").css("top",f.y+"px"),b.data("selector",c).data("huePicker",c.find(".miniColors-huePicker")).data("colorPicker",c.find(".miniColors-colorPicker")).data("mousebutton",0),a("BODY").append(c);var g=b.data("trigger"),h=!b.is(":visible"),i=h?g.offset().top+g.outerHeight():b.offset().top+b.outerHeight(),m=h?g.offset().left:b.offset().left,n=c.outerWidth(),o=c.outerHeight(),r=g.outerWidth(),s=g.outerHeight(),u=a(window).height(),v=a(window).width(),w=a(window).scrollTop(),x=a(window).scrollLeft();i+o>u+w&&(i=i-o-s),m+n>v+x&&(m=m-n+r),c.css({top:i,left:m}).fadeIn(100),c.on("selectstart",function(){return!1}),a(document).on("mousedown.miniColors touchstart.miniColors",function(c){b.data("mousebutton",1);var d=a(c.target).parents().andSelf();if(d.hasClass("miniColors-colors")&&(c.preventDefault(),b.data("moving","colors"),k(b,c)),d.hasClass("miniColors-hues")&&(c.preventDefault(),b.data("moving","hues"),l(b,c)),d.hasClass("miniColors-selector"))return void c.preventDefault();d.hasClass("miniColors")||j(b)}),a(document).on("mouseup.miniColors touchend.miniColors",function(a){a.preventDefault(),b.data("mousebutton",0).removeData("moving")}).on("mousemove.miniColors touchmove.miniColors",function(a){a.preventDefault(),1===b.data("mousebutton")&&("colors"===b.data("moving")&&k(b,a),"hues"===b.data("moving")&&l(b,a))}),b.data("open")&&b.data("open").call(b.get(0),"#"+y(d),t(d))},j=function(b){b||(b=a(".miniColors")),b.each(function(){var c=a(this).data("selector");a(this).removeData("selector"),a(c).fadeOut(100,function(){if(b.data("close")){var c=b.data("hsb"),d=y(c);b.data("close").call(b.get(0),"#"+d,t(c))}a(this).remove()})}),a(document).off(".miniColors")},k=function(a,b){var c=a.data("colorPicker");c.hide();var d={x:b.pageX,y:b.pageY};b.originalEvent.changedTouches&&(d.x=b.originalEvent.changedTouches[0].pageX,d.y=b.originalEvent.changedTouches[0].pageY),d.x=d.x-a.data("selector").find(".miniColors-colors").offset().left-5,d.y=d.y-a.data("selector").find(".miniColors-colors").offset().top-5,d.x<=-5&&(d.x=-5),d.x>=144&&(d.x=144),d.y<=-5&&(d.y=-5),d.y>=144&&(d.y=144),a.data("colorPosition",d),c.css("left",d.x).css("top",d.y).show();var e=Math.round(.67*(d.x+5));e<0&&(e=0),e>100&&(e=100);var f=100-Math.round(.67*(d.y+5));f<0&&(f=0),f>100&&(f=100);var g=a.data("hsb");g.s=e,g.b=f,m(a,g,!0)},l=function(a,b){var c=a.data("huePicker");c.hide();var d={y:b.pageY};b.originalEvent.changedTouches&&(d.y=b.originalEvent.changedTouches[0].pageY),d.y=d.y-a.data("selector").find(".miniColors-colors").offset().top-1,d.y<=-1&&(d.y=-1),d.y>=149&&(d.y=149),a.data("huePosition",d),c.css("top",d.y).show();var e=Math.round(2.4*(150-d.y-1));e<0&&(e=0),e>360&&(e=360);var f=a.data("hsb");f.h=e,m(a,f,!0)},m=function(a,b,c){a.data("hsb",b);var d=y(b);if(c&&a.val("#"+o(d,a.data("letterCase"))).trigger("change"),a.data("trigger").css("backgroundColor","#"+d),a.data("selector")&&a.data("selector").find(".miniColors-colors").css("backgroundColor","#"+y({h:b.h,s:100,b:100})),a.data("change")){if(d===a.data("lastChange"))return;a.data("change").call(a.get(0),"#"+d,t(b)),a.data("lastChange",d)}},n=function(b){b.val("#"+r(b.val())).trigger("change");var c=s(b.val());if(!c)return!1;var d=x(c),e=b.data("hsb");if(d.h===e.h&&d.s===e.s&&d.b===e.b)return!0;var f=p(d);a(b.data("colorPicker")).css("top",f.y+"px").css("left",f.x+"px"),b.data("colorPosition",f);var g=q(d);return a(b.data("huePicker")).css("top",g.y+"px"),b.data("huePosition",g),m(b,d),!0},o=function(a,b){return"lowercase"===b?a.toLowerCase():"uppercase"===b?a.toUpperCase():a},p=function(a){var b=Math.ceil(a.s/.67);b<0&&(b=0),b>150&&(b=150);var c=150-Math.ceil(a.b/.67);return c<0&&(c=0),c>150&&(c=150),{x:b-5,y:c-5}},q=function(a){var b=150-a.h/2.4;return b<0&&(h=0),b>150&&(h=150),{y:b-1}},r=function(a){return a.replace(/[^A-F0-9]/gi,"")},s=function(a){return(a=r(a))?(3===a.length&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),6===a.length?a:null):null},t=function(a){var b={},c=Math.round(a.h),d=Math.round(255*a.s/100),e=Math.round(255*a.b/100);if(0===d)b.r=b.g=b.b=e;else{var f=e,g=(255-d)*e/255,h=c%60*(f-g)/60;360===c&&(c=0),c<60?(b.r=f,b.b=g,b.g=g+h):c<120?(b.g=f,b.b=g,b.r=f-h):c<180?(b.g=f,b.r=g,b.b=g+h):c<240?(b.b=f,b.r=g,b.g=f-h):c<300?(b.b=f,b.g=g,b.r=g+h):c<360?(b.r=f,b.g=g,b.b=f-h):(b.r=0,b.g=0,b.b=0)}return{r:Math.round(b.r),g:Math.round(b.g),b:Math.round(b.b)}},u=function(b){var c=[b.r.toString(16),b.g.toString(16),b.b.toString(16)];return a.each(c,function(a,b){1===b.length&&(c[a]="0"+b)}),c.join("")},v=function(a){return a=parseInt(a.indexOf("#")>-1?a.substring(1):a,16),{r:a>>16,g:(65280&a)>>8,b:255&a}},w=function(a){var b={h:0,s:0,b:0},c=Math.min(a.r,a.g,a.b),d=Math.max(a.r,a.g,a.b),e=d-c;return b.b=d,b.s=0!==d?255*e/d:0,0!==b.s?a.r===d?b.h=(a.g-a.b)/e:a.g===d?b.h=2+(a.b-a.r)/e:b.h=4+(a.r-a.g)/e:b.h=-1,b.h*=60,b.h<0&&(b.h+=360),b.s*=100/255,b.b*=100/255,b},x=function(a){var b=w(v(a));return 0===b.s&&(b.h=360),b},y=function(a){return u(t(a))};switch(b){case"readonly":return a(this).each(function(){a(this).hasClass("miniColors")&&a(this).prop("readonly",c)}),a(this);case"disabled":return a(this).each(function(){a(this).hasClass("miniColors")&&(c?g(a(this)):f(a(this)))}),a(this);case"value":if(void 0===c){if(!a(this).hasClass("miniColors"))return;var z=a(this),A=s(z.val());return A?"#"+o(A,z.data("letterCase")):null}return a(this).each(function(){a(this).hasClass("miniColors")&&(a(this).val(c).trigger("change"),n(a(this)))}),a(this);case"destroy":return a(this).each(function(){a(this).hasClass("miniColors")&&e(a(this))}),a(this);default:return b||(b={}),a(this).each(function(){"input"===a(this)[0].tagName.toLowerCase()&&(a(this).data("trigger")||d(a(this),b))}),a(this)}}})}(jQuery),document.addEventListener("load",color_picker_init,!1),jQuery(document).ajaxComplete(function(){color_picker_init()}),function(a,b){function c(){return new Date(Date.UTC.apply(Date,arguments))}function d(){var a=new Date;return c(a.getFullYear(),a.getMonth(),a.getDate())}function e(a){return function(){return this[a].apply(this,arguments)}}function f(b,c){function d(a,b){return b.toLowerCase()}var e,f=a(b).data(),g={},h=new RegExp("^"+c.toLowerCase()+"([A-Z])");c=new RegExp("^"+c.toLowerCase());for(var i in f)c.test(i)&&(e=i.replace(h,d),g[e]=f[i]);return g}function g(b){var c={};if(o[b]||(b=b.split("-")[0],o[b])){var d=o[b];return a.each(n,function(a,b){b in d&&(c[b]=d[b])}),c}}var h=a(window),i=function(){var b={get:function(a){return this.slice(a)[0]},contains:function(a){for(var b=a&&a.valueOf(),c=0,d=this.length;c<d;c++)if(this[c].valueOf()===b)return c;return-1},remove:function(a){this.splice(a,1)},replace:function(b){b&&(a.isArray(b)||(b=[b]),this.clear(),this.push.apply(this,b))},clear:function(){this.splice(0)},copy:function(){var a=new i;return a.replace(this),a}};return function(){var c=[];return c.push.apply(c,arguments),a.extend(c,b),c}}(),j=function(b,c){this.dates=new i,this.viewDate=d(),this.focusDate=null,this._process_options(c),this.element=a(b),this.isInline=!1,this.isInput=this.element.is("input"),this.component=!!this.element.is(".date")&&this.element.find(".add-on, .input-group-addon, .btn"),this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.picker=a(p.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("cfdatepicker-inline").appendTo(this.element):this.picker.addClass("cfdatepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("cfdatepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.today").attr("colspan",function(a,b){return parseInt(b)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};j.prototype={constructor:j,_process_options:function(b){this._o=a.extend({},this._o,b);var c=this.o=a.extend({},this._o),d=c.language;switch(o[d]||(d=d.split("-")[0],o[d]||(d=m.language)),c.language=d,c.startView){case 2:case"decade":c.startView=2;break;case 1:case"year":c.startView=1;break;default:c.startView=0}switch(c.minViewMode){case 1:case"months":c.minViewMode=1;break;case 2:case"years":c.minViewMode=2;break;default:c.minViewMode=0}c.startView=Math.max(c.startView,c.minViewMode),!0!==c.multidate&&(c.multidate=Number(c.multidate)||!1,!1!==c.multidate?c.multidate=Math.max(0,c.multidate):c.multidate=1),c.multidateSeparator=String(c.multidateSeparator),c.weekStart%=7,c.weekEnd=(c.weekStart+6)%7;var e=p.parseFormat(c.format);c.startDate!==-1/0&&(c.startDate?c.startDate instanceof Date?c.startDate=this._local_to_utc(this._zero_time(c.startDate)):c.startDate=p.parseDate(c.startDate,e,c.language):c.startDate=-1/0),c.endDate!==1/0&&(c.endDate?c.endDate instanceof Date?c.endDate=this._local_to_utc(this._zero_time(c.endDate)):c.endDate=p.parseDate(c.endDate,e,c.language):c.endDate=1/0),c.daysOfWeekDisabled=c.daysOfWeekDisabled||[],a.isArray(c.daysOfWeekDisabled)||(c.daysOfWeekDisabled=c.daysOfWeekDisabled.split(/[,\s]*/)),c.daysOfWeekDisabled=a.map(c.daysOfWeekDisabled,function(a){return parseInt(a,10)});var f=String(c.orientation).toLowerCase().split(/\s+/g),g=c.orientation.toLowerCase();if(f=a.grep(f,function(a){return/^auto|left|right|top|bottom$/.test(a)}),c.orientation={x:"auto",y:"auto"},g&&"auto"!==g)if(1===f.length)switch(f[0]){case"top":case"bottom":c.orientation.y=f[0];break;case"left":case"right":c.orientation.x=f[0]}else g=a.grep(f,function(a){return/^left|right$/.test(a)}),c.orientation.x=g[0]||"auto",g=a.grep(f,function(a){return/^top|bottom$/.test(a)}),c.orientation.y=g[0]||"auto";else;},_events:[],_secondaryEvents:[],_applyEvents:function(a){for(var b,c,d,e=0;e<a.length;e++)b=a[e][0],2===a[e].length?(c=void 0,d=a[e][1]):3===a[e].length&&(c=a[e][1],d=a[e][2]),b.on(d,c)},_unapplyEvents:function(a){for(var b,c,d,e=0;e<a.length;e++)b=a[e][0],2===a[e].length?(d=void 0,c=a[e][1]):3===a[e].length&&(d=a[e][1],c=a[e][2]),b.off(c,d)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:a.proxy(this.show,this),keyup:a.proxy(function(b){-1===a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:a.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:a.proxy(this.show,this),keyup:a.proxy(function(b){-1===a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:a.proxy(this.keydown,this)}],[this.component,{click:a.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:a.proxy(this.show,this)}]],this._events.push([this.element,"*",{blur:a.proxy(function(a){this._focused_from=a.target},this)}],[this.element,{blur:a.proxy(function(a){this._focused_from=a.target},this)}]),this._secondaryEvents=[[this.picker,{click:a.proxy(this.click,this)}],[a(window),{resize:a.proxy(this.place,this)}],[a(document),{"mousedown touchstart":a.proxy(function(a){this.element.is(a.target)||this.element.find(a.target).length||this.picker.is(a.target)||this.picker.find(a.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(b,c){var d=c||this.dates.get(-1),e=this._utc_to_local(d);this.element.trigger({type:b,date:e,dates:a.map(this.dates,this._utc_to_local),format:a.proxy(function(a,b){0===arguments.length?(a=this.dates.length-1,b=this.o.format):"string"==typeof a&&(b=a,a=this.dates.length-1),b=b||this.o.format;var c=this.dates.get(a);return p.formatDate(c,b,this.o.language)},this)})},show:function(){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.place(),this._attachSecondaryEvents(),this._trigger("show")},hide:function(){this.isInline||this.picker.is(":visible")&&(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"))},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().cfdatepicker,this.isInput||delete this.element.data().date},_utc_to_local:function(a){return a&&new Date(a.getTime()+6e4*a.getTimezoneOffset())},_local_to_utc:function(a){return a&&new Date(a.getTime()-6e4*a.getTimezoneOffset())},_zero_time:function(a){return a&&new Date(a.getFullYear(),a.getMonth(),a.getDate())},_zero_utc_time:function(a){return a&&new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()))},getDates:function(){return a.map(this.dates,this._utc_to_local)},getUTCDates:function(){return a.map(this.dates,function(a){return new Date(a)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){return new Date(this.dates.get(-1))},setDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,b),this._trigger("changeDate"),this.setValue()},setUTCDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,a.map(b,this._utc_to_local)),this._trigger("changeDate"),this.setValue()},setDate:e("setDates"),setUTCDate:e("setUTCDates"),setValue:function(){var a=this.getFormattedDate();this.isInput?this.element.val(a).change():this.component&&this.element.find("input").val(a).change()},getFormattedDate:function(b){void 0===b&&(b=this.o.format);var c=this.o.language;return a.map(this.dates,function(a){return p.formatDate(a,b,c)}).join(this.o.multidateSeparator)},setStartDate:function(a){this._process_options({startDate:a}),this.update(),this.updateNavArrows()},setEndDate:function(a){this._process_options({endDate:a}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(a){this._process_options({daysOfWeekDisabled:a}),this.update(),this.updateNavArrows()},place:function(){if(!this.isInline){var b,c=this.picker.outerWidth(),d=this.picker.outerHeight(),e=h.width(),f=h.height(),g=h.scrollTop(),i=jQuery(this.element).data("form-id"),j=document.getElementById("modal-"+i+"-content");b=null!==j?1e4:parseInt(this.element.parents().filter(function(){return"auto"!==a(this).css("z-index")}).first().css("z-index"))+10;var k=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),m=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),n=k.left,o=k.top;this.picker.removeClass("cfdatepicker-orient-top cfdatepicker-orient-bottom cfdatepicker-orient-right cfdatepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("cfdatepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(n-=c-m)):(this.picker.addClass("cfdatepicker-orient-left"),k.left<0?n-=k.left-10:k.left+c>e&&(n=e-c-10));var p,q,r=this.o.orientation.y;"auto"===r&&(p=-g+k.top-d,q=g+f-(k.top+l+d),r=Math.max(p,q)===q?"top":"bottom"),this.picker.addClass("cfdatepicker-orient-"+r),"top"===r?o+=l:o-=d+parseInt(this.picker.css("padding-top")),this.picker.css({top:o,left:n,zIndex:b})}},_allow_update:!0,update:function(){if(this._allow_update){var b=this.dates.copy(),c=[],d=!1;arguments.length?(a.each(arguments,a.proxy(function(a,b){b instanceof Date&&(b=this._local_to_utc(b)),c.push(b)},this)),d=!0):(c=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),c=c&&this.o.multidate?c.split(this.o.multidateSeparator):[c],delete this.element.data().date),c=a.map(c,a.proxy(function(a){return p.parseDate(a,this.o.format,this.o.language)},this)),c=a.grep(c,a.proxy(function(a){return a<this.o.startDate||a>this.o.endDate||!a},this),!0),this.dates.replace(c),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),d?this.setValue():c.length&&String(b)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&b.length&&this._trigger("clearDate"),this.fill()}},fillDow:function(){var a=this.o.weekStart,b="<tr>";if(this.o.calendarWeeks){var c='<th class="cw">&nbsp;</th>';b+=c,this.picker.find(".cfdatepicker-days thead tr:first-child").prepend(c)}for(;a<this.o.weekStart+7;)b+='<th class="dow">'+o[this.o.language].daysMin[a++%7]+"</th>";b+="</tr>",this.picker.find(".cfdatepicker-days thead").append(b)},fillMonths:function(){for(var a="",b=0;b<12;)a+='<span class="month">'+o[this.o.language].monthsShort[b++]+"</span>";this.picker.find(".cfdatepicker-months td").html(a)},setRange:function(b){b&&b.length?this.range=a.map(b,function(a){return a.valueOf()}):delete this.range,this.fill()},getClassNames:function(b){var c=[],d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),f=new Date;return b.getUTCFullYear()<d||b.getUTCFullYear()===d&&b.getUTCMonth()<e?c.push("old"):(b.getUTCFullYear()>d||b.getUTCFullYear()===d&&b.getUTCMonth()>e)&&c.push("new"),this.focusDate&&b.valueOf()===this.focusDate.valueOf()&&c.push("focused"),this.o.todayHighlight&&b.getUTCFullYear()===f.getFullYear()&&b.getUTCMonth()===f.getMonth()&&b.getUTCDate()===f.getDate()&&c.push("today"),-1!==this.dates.contains(b)&&c.push("active"),(b.valueOf()<this.o.startDate||b.valueOf()>this.o.endDate||-1!==a.inArray(b.getUTCDay(),this.o.daysOfWeekDisabled))&&c.push("disabled"),this.range&&(b>this.range[0]&&b<this.range[this.range.length-1]&&c.push("range"),-1!==a.inArray(b.valueOf(),this.range)&&c.push("selected")),c},fill:function(){var b,d=new Date(this.viewDate),e=d.getUTCFullYear(),f=d.getUTCMonth(),g=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,h=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,i=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,j=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,k=o[this.o.language].today||o.en.today||"",l=o[this.o.language].clear||o.en.clear||"";this.picker.find(".cfdatepicker-days thead th.cfdatepicker-switch").text(o[this.o.language].months[f]+" "+e),this.picker.find("tfoot th.today").text(k).toggle(!1!==this.o.todayBtn),this.picker.find("tfoot th.clear").text(l).toggle(!1!==this.o.clearBtn),this.updateNavArrows(),this.fillMonths();var m=c(e,f-1,28),n=p.getDaysInMonth(m.getUTCFullYear(),m.getUTCMonth());m.setUTCDate(n),m.setUTCDate(n-(m.getUTCDay()-this.o.weekStart+7)%7);var q=new Date(m);q.setUTCDate(q.getUTCDate()+42),q=q.valueOf();for(var r,s=[];m.valueOf()<q;){if(m.getUTCDay()===this.o.weekStart&&(s.push("<tr>"),this.o.calendarWeeks)){var t=new Date(+m+(this.o.weekStart-m.getUTCDay()-7)%7*864e5),u=new Date(Number(t)+(11-t.getUTCDay())%7*864e5),v=new Date(Number(v=c(u.getUTCFullYear(),0,1))+(11-v.getUTCDay())%7*864e5),w=(u-v)/864e5/7+1;s.push('<td class="cw">'+w+"</td>")}if(r=this.getClassNames(m),r.push("day"),this.o.beforeShowDay!==a.noop){var x=this.o.beforeShowDay(this._utc_to_local(m));void 0===x?x={}:"boolean"==typeof x?x={enabled:x}:"string"==typeof x&&(x={classes:x}),!1===x.enabled&&r.push("disabled"),x.classes&&(r=r.concat(x.classes.split(/\s+/))),x.tooltip&&(b=x.tooltip)}r=a.unique(r),s.push('<td class="'+r.join(" ")+'"'+(b?' title="'+b+'"':"")+">"+m.getUTCDate()+"</td>"),m.getUTCDay()===this.o.weekEnd&&s.push("</tr>"),m.setUTCDate(m.getUTCDate()+1)}this.picker.find(".cfdatepicker-days tbody").empty().append(s.join(""));var y=this.picker.find(".cfdatepicker-months").find("th:eq(1)").text(e).end().find("span").removeClass("active");a.each(this.dates,function(a,b){b.getUTCFullYear()===e&&y.eq(b.getUTCMonth()).addClass("active")}),(e<g||e>i)&&y.addClass("disabled"),e===g&&y.slice(0,h).addClass("disabled"),e===i&&y.slice(j+1).addClass("disabled"),s="",e=10*parseInt(e/10,10);var z=this.picker.find(".cfdatepicker-years").find("th:eq(1)").text(e+"-"+(e+9)).end().find("td");e-=1;for(var A,B=a.map(this.dates,function(a){return a.getUTCFullYear()}),C=-1;C<11;C++)A=["year"],-1===C?A.push("old"):10===C&&A.push("new"),-1!==a.inArray(e,B)&&A.push("active"),(e<g||e>i)&&A.push("disabled"),s+='<span class="'+A.join(" ")+'">'+e+"</span>",e+=1;z.html(s)},updateNavArrows:function(){if(this._allow_update){var a=new Date(this.viewDate),b=a.getUTCFullYear(),c=a.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()&&c<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()&&c>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(b){b.preventDefault();var d,e,f,g=a(b.target).closest("span, td, th");if(1===g.length)switch(g[0].nodeName.toLowerCase()){case"th":switch(g[0].className){case"cfdatepicker-switch":this.showMode(1);break;case"prev":case"next":var h=p.modes[this.viewMode].navStep*("prev"===g[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,h),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,h),1===this.viewMode&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"today":var i=new Date;i=c(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0),this.showMode(-2);var j="linked"===this.o.todayBtn?null:"view";this._setDate(i,j);break;case"clear":var k;this.isInput?k=this.element:this.component&&(k=this.element.find("input")),k&&k.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()}break;case"span":g.is(".disabled")||(this.viewDate.setUTCDate(1),g.is(".month")?(f=1,e=g.parent().find("span").index(g),d=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(e),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode&&this._setDate(c(d,e,f))):(f=1,e=0,d=parseInt(g.text(),10)||0,this.viewDate.setUTCFullYear(d),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(c(d,e,f))),this.showMode(-1),this.fill());break;case"td":g.is(".day")&&!g.is(".disabled")&&(f=parseInt(g.text(),10)||1,d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),g.is(".old")?0===e?(e=11,d-=1):e-=1:g.is(".new")&&(11===e?(e=0,d+=1):e+=1),this._setDate(c(d,e,f)))}this.picker.is(":visible")&&this._focused_from&&a(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(a){var b=this.dates.contains(a);if(a?-1!==b?this.dates.remove(b):this.dates.push(a):this.dates.clear(),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(a,b){b&&"date"!==b||this._toggle_multidate(a&&new Date(a)),b&&"view"!==b||(this.viewDate=a&&new Date(a)),this.fill(),this.setValue(),this._trigger("changeDate");var c;this.isInput?c=this.element:this.component&&(c=this.element.find("input")),c&&c.change(),!this.o.autoclose||b&&"date"!==b||this.hide()},moveMonth:function(a,b){if(a){if(!b)return a;var c,d,e=new Date(a.valueOf()),f=e.getUTCDate(),g=e.getUTCMonth(),h=Math.abs(b);if(b=b>0?1:-1,1===h)d=-1===b?function(){return e.getUTCMonth()===g}:function(){return e.getUTCMonth()!==c},c=g+b,e.setUTCMonth(c),(c<0||c>11)&&(c=(c+12)%12);else{for(var i=0;i<h;i++)e=this.moveMonth(e,b);c=e.getUTCMonth(),e.setUTCDate(f),d=function(){return c!==e.getUTCMonth()}}for(;d();)e.setUTCDate(--f),e.setUTCMonth(c);return e}},moveYear:function(a,b){return this.moveMonth(a,12*b)},dateWithinRange:function(a){return a>=this.o.startDate&&a<=this.o.endDate},keydown:function(a){if(this.picker.is(":not(:visible)"))return void(27===a.keyCode&&this.show());var b,c,e,f=!1,g=this.focusDate||this.viewDate;switch(a.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),a.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;b=37===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+b),e=new Date(g),e.setUTCDate(g.getUTCDate()+b)),this.dateWithinRange(c)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;b=38===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+7*b),e=new Date(g),e.setUTCDate(g.getUTCDate()+7*b)),this.dateWithinRange(c)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 32:break;case 13:g=this.focusDate||this.dates.get(-1)||this.viewDate,this._toggle_multidate(g),f=!0,this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(a.preventDefault(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(f){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var h;this.isInput?h=this.element:this.component&&(h=this.element.find("input")),h&&h.change()}},showMode:function(a){a&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+a))),this.picker.find(">div").hide().filter(".cfdatepicker-"+p.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var k=function(b,c){this.element=a(b),this.inputs=a.map(c.inputs,function(a){return a.jquery?a[0]:a}),delete c.inputs,a(this.inputs).cfdatepicker(c).bind("changeDate",a.proxy(this.dateUpdated,this)),this.pickers=a.map(this.inputs,function(b){return a(b).data("cfdatepicker")}),this.updateDates()};k.prototype={updateDates:function(){this.dates=a.map(this.pickers,function(a){return a.getUTCDate()}),this.updateRanges()},updateRanges:function(){var b=a.map(this.dates,function(a){return a.valueOf()});a.each(this.pickers,function(a,c){c.setRange(b)})},dateUpdated:function(b){if(!this.updating){this.updating=!0;var c=a(b.target).data("cfdatepicker"),d=c.getUTCDate(),e=a.inArray(b.target,this.inputs),f=this.inputs.length;if(-1!==e){if(a.each(this.pickers,function(a,b){b.getUTCDate()||b.setUTCDate(d)}),d<this.dates[e])for(;e>=0&&d<this.dates[e];)this.pickers[e--].setUTCDate(d);else if(d>this.dates[e])for(;e<f&&d>this.dates[e];)this.pickers[e++].setUTCDate(d);this.updateDates(),delete this.updating}}},remove:function(){a.map(this.pickers,function(a){a.remove()}),delete this.element.data().cfdatepicker}};var l=a.fn.cfdatepicker;a.fn.cfdatepicker=function(b){var c=Array.apply(null,arguments);c.shift();var d;return this.each(function(){var e=a(this),h=e.data("cfdatepicker"),i="object"==typeof b&&b;if(!h){var l=f(this,"date"),n=a.extend({},m,l,i),o=g(n.language),p=a.extend({},m,o,l,i);if(e.is(".input-daterange")||p.inputs){var q={inputs:p.inputs||e.find("input").toArray()};e.data("cfdatepicker",h=new k(this,a.extend(p,q)))}else e.data("cfdatepicker",h=new j(this,p))}if("string"==typeof b&&"function"==typeof h[b]&&void 0!==(d=h[b].apply(h,c)))return!1}),void 0!==d?d:this};var m=a.fn.cfdatepicker.defaults={autoclose:!1,beforeShowDay:a.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},n=a.fn.cfdatepicker.locale_opts=["format","rtl","weekStart"];a.fn.cfdatepicker.Constructor=j;var o=a.fn.cfdatepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},p={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(a){return a%4==0&&a%100!=0||a%400==0},getDaysInMonth:function(a,b){return[31,p.isLeapYear(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(a){var b=a.replace(this.validParts,"\0").split("\0"),c=a.match(this.validParts);if(!b||!b.length||!c||0===c.length)throw new Error("Invalid date format.");return{separators:b,parts:c}},parseDate:function(b,d,e){function f(){var a=this.slice(0,l[i].length);return a===l[i].slice(0,a.length)}if(b){if(b instanceof Date)return b;"string"==typeof d&&(d=p.parseFormat(d));var g,h,i,k=/([\-+]\d+)([dmwy])/,l=b.match(/([\-+]\d+)([dmwy])/g);if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(b)){for(b=new Date,i=0;i<l.length;i++)switch(g=k.exec(l[i]),h=parseInt(g[1]),g[2]){case"d":b.setUTCDate(b.getUTCDate()+h);break;case"m":b=j.prototype.moveMonth.call(j.prototype,b,h);break;case"w":b.setUTCDate(b.getUTCDate()+7*h);break;case"y":b=j.prototype.moveYear.call(j.prototype,b,h)}return c(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate(),0,0,0)}l=b&&b.match(this.nonpunctuation)||[],b=new Date;var m,n,q={},r=["yyyy","yy","M","MM","m","mm","d","dd"],s={yyyy:function(a,b){return a.setUTCFullYear(b)},yy:function(a,b){return a.setUTCFullYear(2e3+b)},m:function(a,b){if(isNaN(a))return a;for(b-=1;b<0;)b+=12;for(b%=12,a.setUTCMonth(b);a.getUTCMonth()!==b;)a.setUTCDate(a.getUTCDate()-1);return a},d:function(a,b){return a.setUTCDate(b)}};s.M=s.MM=s.mm=s.m,s.dd=s.d,b=c(b.getFullYear(),b.getMonth(),b.getDate(),0,0,0);var t=d.parts.slice();if(l.length!==t.length&&(t=a(t).filter(function(b,c){return-1!==a.inArray(c,r)}).toArray()),l.length===t.length){var u;for(i=0,u=t.length;i<u;i++){if(m=parseInt(l[i],10),g=t[i],isNaN(m))switch(g){case"MM":n=a(o[e].months).filter(f),m=a.inArray(n[0],o[e].months)+1;break;case"M":n=a(o[e].monthsShort).filter(f),m=a.inArray(n[0],o[e].monthsShort)+1}q[g]=m}var v,w
;for(i=0;i<r.length;i++)(w=r[i])in q&&!isNaN(q[w])&&(v=new Date(b),s[w](v,q[w]),isNaN(v)||(b=v))}return b}},formatDate:function(b,c,d){if(!b)return"";"string"==typeof c&&(c=p.parseFormat(c));var e={d:b.getUTCDate(),D:o[d].daysShort[b.getUTCDay()],DD:o[d].days[b.getUTCDay()],m:b.getUTCMonth()+1,M:o[d].monthsShort[b.getUTCMonth()],MM:o[d].months[b.getUTCMonth()],yy:b.getUTCFullYear().toString().substring(2),yyyy:b.getUTCFullYear()};e.dd=(e.d<10?"0":"")+e.d,e.mm=(e.m<10?"0":"")+e.m,b=[];for(var f=a.extend([],c.separators),g=0,h=c.parts.length;g<=h;g++)f.length&&b.push(f.shift()),b.push(e[c.parts[g]]);return b.join("")},headTemplate:'<thead><tr><th class="prev">&laquo;</th><th colspan="5" class="cfdatepicker-switch"></th><th class="next">&raquo;</th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};p.template='<div class="cfdatepicker"><div class="cfdatepicker-days"><table class=" table-condensed">'+p.headTemplate+"<tbody></tbody>"+p.footTemplate+'</table></div><div class="cfdatepicker-months"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+'</table></div><div class="cfdatepicker-years"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+"</table></div></div>",a.fn.cfdatepicker.DPGlobal=p,a.fn.cfdatepicker.noConflict=function(){return a.fn.cfdatepicker=l,this},a(document).on("focus.cfdatepicker.data-api click.cfdatepicker.data-api",'[data-provide="cfdatepicker"]',function(b){var c=a(this);c.data("cfdatepicker")||(b.preventDefault(),c.cfdatepicker("show").on("show",function(){a(this).trigger("blur")}).on("hide",function(){a(this).attr("disabled",!1),c.hasClass("parsley-error")&&""!==c.val()&&(c.removeClass("parsley-error"),c.addClass("parsley-success"),a("#parsley-id-"+c.data("parsley-id")).hide())}))})}(window.jQuery),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a,b){var c=Array.prototype.slice.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)}function c(a,b){return b=b||100,function(){if(!a.debouncing){var c=Array.prototype.slice.apply(arguments);a.lastReturnVal=a.apply(window,c),a.debouncing=!0}return clearTimeout(a.debounceTimeout),a.debounceTimeout=setTimeout(function(){a.debouncing=!1},b),a.lastReturnVal}}function d(d,f){if(this.$window=a(window),this.$document=a(document),this.$element=a(d),this.options=a.extend({},h,f),this._defaults=h,this._name=e,this.startEvent=this.options.startEvent.join("."+e+" ")+"."+e,this.moveEvent=this.options.moveEvent.join("."+e+" ")+"."+e,this.endEvent=this.options.endEvent.join("."+e+" ")+"."+e,this.polyfill=this.options.polyfill,this.onInit=this.options.onInit,this.onSlide=this.options.onSlide,this.onSlideEnd=this.options.onSlideEnd,this.polyfill&&g)return!1;this.identifier="js-"+e+"-"+ +new Date,this.min=parseFloat(this.$element[0].getAttribute("min")||0),this.max=parseFloat(this.$element[0].getAttribute("max")||100),this.value=parseFloat(this.$element[0].value||this.min+(this.max-this.min)/2),this.step=parseFloat(this.$element[0].getAttribute("step")||1),this.$fill=a('<div class="'+this.options.fillClass+'" />'),this.$handle=a('<div class="'+this.options.handleClass+'" />'),this.$range=a('<div class="'+this.options.rangeClass+'" id="'+this.identifier+'" />').insertAfter(this.$element).prepend(this.$fill,this.$handle),this.$element.css({position:"absolute",width:"1px",height:"1px",overflow:"hidden",opacity:"0"}),this.handleDown=a.proxy(this.handleDown,this),this.handleMove=a.proxy(this.handleMove,this),this.handleEnd=a.proxy(this.handleEnd,this),this.init();var i=this;this.$window.on("resize."+e,c(function(){b(function(){i.update()},300)},20)),this.$document.on(this.startEvent,"#"+this.identifier+":not(."+this.options.disabledClass+")",this.handleDown),this.$element.on("change."+e,function(a,b){if(!b||b.origin!==e){var c=a.target.value,d=i.getPositionFromValue(c);i.setPosition(d)}})}var e="rangeslider",f=[],g=function(){var a=document.createElement("input");return a.setAttribute("type","range"),"text"!==a.type}(),h={polyfill:!0,rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",startEvent:["mousedown","touchstart","pointerdown"],moveEvent:["mousemove","touchmove","pointermove"],endEvent:["mouseup","touchend","pointerup"]};d.prototype.init=function(){this.onInit&&"function"==typeof this.onInit&&this.onInit(),this.update()},d.prototype.update=function(){this.handleWidth=this.$handle[0].offsetWidth,this.rangeWidth=this.$range[0].offsetWidth,this.maxHandleX=this.rangeWidth-this.handleWidth,this.grabX=this.handleWidth/2,this.position=this.getPositionFromValue(this.value),this.$element[0].disabled?this.$range.addClass(this.options.disabledClass):this.$range.removeClass(this.options.disabledClass),this.setPosition(this.position)},d.prototype.handleDown=function(a){if(a.preventDefault(),this.$document.on(this.moveEvent,this.handleMove),this.$document.on(this.endEvent,this.handleEnd),!((" "+a.target.className+" ").replace(/[\n\t]/g," ").indexOf(this.options.handleClass)>-1)){var b=this.getRelativePosition(this.$range[0],a),c=this.getPositionFromNode(this.$handle[0])-this.getPositionFromNode(this.$range[0]);this.setPosition(b-this.grabX),b>=c&&b<c+this.handleWidth&&(this.grabX=b-c)}},d.prototype.handleMove=function(a){a.preventDefault();var b=this.getRelativePosition(this.$range[0],a);this.setPosition(b-this.grabX)},d.prototype.handleEnd=function(a){a.preventDefault(),this.$document.off(this.moveEvent,this.handleMove),this.$document.off(this.endEvent,this.handleEnd);var b=this.getRelativePosition(this.$range[0],a);this.onSlideEnd&&"function"==typeof this.onSlideEnd&&this.onSlideEnd(b-this.grabX,this.value)},d.prototype.cap=function(a,b,c){return a<b?b:a>c?c:a},d.prototype.setPosition=function(a){var b,c;b=this.getValueFromPosition(this.cap(a,0,this.maxHandleX))/this.step*this.step,c=this.getPositionFromValue(b),this.$fill[0].style.width=c+this.grabX+"px",this.$handle[0].style.left=c+"px",this.setValue(b),this.position=c,this.value=b,this.onSlide&&"function"==typeof this.onSlide&&this.onSlide(c,b)},d.prototype.getPositionFromNode=function(a){for(var b=0;null!==a;)b+=a.offsetLeft,a=a.offsetParent;return b},d.prototype.getRelativePosition=function(a,b){return(b.pageX||b.originalEvent.clientX||b.originalEvent.touches[0].clientX||b.currentPoint.x)-this.getPositionFromNode(a)},d.prototype.getPositionFromValue=function(a){var b;return b=(a-this.min)/(this.max-this.min),b*this.maxHandleX},d.prototype.getValueFromPosition=function(a){var b,c;return b=a/(this.maxHandleX||1),c=this.step*Math.ceil((b*(this.max-this.min)+this.min)/this.step),Number(c.toFixed(2))},d.prototype.setValue=function(a){a!==this.value&&this.$element.val(a).trigger("change",{origin:e})},d.prototype.destroy=function(){this.$document.off(this.startEvent,"#"+this.identifier,this.handleDown),this.$element.off("."+e).removeAttr("style").removeData("plugin_"+e),this.$range&&this.$range.length&&this.$range[0].parentNode.removeChild(this.$range[0]),f.splice(f.indexOf(this.$element[0]),1),f.length||this.$window.off("."+e)},a.fn[e]=function(b){return this.each(function(){var c=a(this),g=c.data("plugin_"+e);g||(c.data("plugin_"+e,g=new d(this,b)),f.push(this)),"string"==typeof b&&g[b]()})}}),function(a){"use strict";var b={init:function(c){return this.each(function(){this.self=a(this),b.destroy.call(this.self),this.opt=a.extend(!0,{},a.fn.raty.defaults,c),b._adjustCallback.call(this),b._adjustNumber.call(this),"img"!==this.opt.starType&&b._adjustStarType.call(this),b._adjustPath.call(this),b._createStars.call(this),this.opt.cancel&&b._createCancel.call(this),this.opt.precision&&b._adjustPrecision.call(this),b._createScore.call(this),b._apply.call(this,this.opt.score),b._target.call(this,this.opt.score),this.opt.readOnly?b._lock.call(this):(this.style.cursor="pointer",b._binds.call(this)),this.self.data("options",this.opt)})},_adjustCallback:function(){for(var a=["number","readOnly","score","scoreName"],b=0;b<a.length;b++)"function"==typeof this.opt[a[b]]&&(this.opt[a[b]]=this.opt[a[b]].call(this))},_adjustNumber:function(){this.opt.number=b._between(this.opt.number,1,this.opt.numberMax)},_adjustPath:function(){this.opt.path=this.opt.path||"",this.opt.path&&"/"!==this.opt.path.charAt(this.opt.path.length-1)&&(this.opt.path+="/")},_adjustPrecision:function(){this.opt.half=!0,this.opt.targetType="score"},_adjustStarType:function(){this.opt.path="";for(var a=["cancelOff","cancelOn","starHalf","starOff","starOn"],b=0;b<a.length;b++)this.opt[a[b]]=this.opt[a[b]].replace(".","-")},_apply:function(a){b._fill.call(this,a),a&&(a>0&&this.score.val(b._between(a,0,this.opt.number)),b._roundStars.call(this,a))},_between:function(a,b,c){return Math.min(Math.max(parseFloat(a),b),c)},_binds:function(){this.cancel&&(b._bindOverCancel.call(this),b._bindClickCancel.call(this),b._bindOutCancel.call(this)),b._bindOver.call(this),b._bindClick.call(this),b._bindOut.call(this)},_bindClick:function(){var b=this;b.stars.on("click.raty",function(c){var d=a(this);b.score.val(b.opt.half||b.opt.precision?b.self.data("score"):this.alt||d.data("alt")),b.opt.click&&b.opt.click.call(b,+b.score.val(),c)})},_bindClickCancel:function(){var a=this;a.cancel.on("click.raty",function(b){a.score.removeAttr("value"),a.opt.click&&a.opt.click.call(a,null,b)})},_bindOut:function(){var a=this;a.self.on("mouseleave.raty",function(c){var d=+a.score.val()||void 0;b._apply.call(a,d),b._target.call(a,d,c),a.opt.mouseout&&a.opt.mouseout.call(a,d,c)})},_bindOutCancel:function(){var b=this;b.cancel.on("mouseleave.raty",function(c){var d=a(this),e=b.opt.path+b.opt.cancelOff;if("img"===b.opt.starType)d.attr("src",e);else{var f=b.opt.path+b.opt.cancelOn;d.removeClass(f).addClass(e)}if(b.opt.mouseout){var g=+b.score.val()||void 0;b.opt.mouseout.call(b,g,c)}})},_bindOver:function(){var a=this,c=a.opt.half?"mousemove.raty":"mouseover.raty";a.stars.on(c,function(c){var d=b._getScoreByPosition.call(a,c,this);b._fill.call(a,d),a.opt.half&&(b._roundStars.call(a,d),a.self.data("score",d)),b._target.call(a,d,c),a.opt.mouseover&&a.opt.mouseover.call(a,d,c)})},_bindOverCancel:function(){var c=this;c.cancel.on("mouseover.raty",function(d){var e=c.opt.path+c.opt.cancelOn,f=a(this),g=c.opt.path+c.opt.starOff;if("img"===c.opt.starType)f.attr("src",e),c.stars.attr("src",g);else{c.stars.attr("class",g);var h=c.opt.path+c.opt.cancelOff;f.removeClass(h).addClass(e).css("color",c.opt.starColor)}b._target.call(c,null,d),c.opt.mouseover&&c.opt.mouseover.call(c,null)})},_buildScoreField:function(){return a("<input />",{name:this.opt.scoreName,type:"hidden"}).appendTo(this)},_createCancel:function(){var b=this.opt.path+this.opt.cancelOff,c=a("<"+this.opt.starType+" />",{title:this.opt.cancelHint,class:"raty-cancel"}).css("marginRight",this.opt.space?this.opt.spaceWidth+"px":"0");"img"===this.opt.starType?c.attr({src:b,alt:"x"}):c.attr("data-alt","x").addClass(b),"left"===this.opt.cancelPlace?this.self.prepend("&#160;").prepend(c):this.self.append("&#160;").append(c),this.cancel=c},_createScore:function(){var c=a(this.opt.targetScore);this.score=c.length?c:b._buildScoreField.call(this)},_createStars:function(){for(var c=1;c<=this.opt.number;c++){var d,e=this.opt.score&&this.opt.score>=c?"starOn":"starOff",f=b._getHint.call(this,c);e=this.opt.path+this.opt[e],d="img"!==this.opt.starType?{"data-alt":c,class:e}:{src:e,alt:c},d.title=f,a("<"+this.opt.starType+" />",d).css("marginRight",c<this.opt.number&&this.opt.space?this.opt.spaceWidth+"px":"0").appendTo(this),this.opt.space}this.stars=this.self.children(this.opt.starType)},_error:function(b){a(this).text(b),a.error(b)},_fill:function(a){for(var c=0,d=1;d<=this.stars.length;d++){var e,f=this.stars.eq(d-1),g=b._turnOn.call(this,d,a);if(this.opt.iconRange&&this.opt.iconRange.length>c){var h=this.opt.iconRange[c];e=b._getIconRange.call(this,h,g),d<=h.range&&("img"===this.opt.starType?f.attr("src",e):f.attr("class",e)),d===h.range&&c++}else e=this.opt.path+this.opt[g?"starOn":"starOff"],"img"===this.opt.starType?f.attr("src",e):f.attr("class",e),g?f.css("color",this.opt.starColor):f.css("color","")}},_getIconRange:function(a,b){return this.opt.path+(b?a.on||this.opt.starOn:a.off||this.opt.starOff)},_getScoreByPosition:function(c,d){var e=a(d),f=parseInt(d.alt||e.data("alt"),10);if(this.opt.half){var g=b._getSize.call(this),h=parseFloat((c.pageX-e.offset().left)/g);f=this.opt.precision?f-1+h:f-1+(h>.5?1:.5)}return f},_getSize:function(){var a;return a="img"===this.opt.starType?this.stars[0].width:parseFloat(this.stars.eq(0).css("font-size")),a||b._error.call(this,"Could not be possible get the icon size!"),a},_turnOn:function(a,b){return this.opt.single?a===b:a<=b},_getHint:function(a){var b=this.opt.hints[a-1];return""===b?"":b||a},_lock:function(){var a=parseInt(this.score.val(),10),c=a?b._getHint.call(this,a):this.opt.noRatedMsg;this.style.cursor="",this.title=c,this.score.prop("readonly",!0),this.stars.prop("title",c),this.cancel&&this.cancel.hide(),this.self.data("readonly",!0)},_roundStars:function(a){var b=(a%1).toFixed(2);if(b>this.opt.round.down){var c="starOn";this.opt.halfShow&&b<this.opt.round.up?c="starHalf":b<this.opt.round.full&&(c="starOff");var d=this.stars[Math.ceil(a)-1];"img"===this.opt.starType?d.src=this.opt.path+this.opt[c]:d.style.className=this.opt[c]}},_target:function(c,d){if(this.opt.target){var e=a(this.opt.target);e.length||b._error.call(this,"Target selector invalid or missing!");var f=d&&"mouseover"===d.type;if(void 0===c)c=this.opt.targetText;else if(null===c)c=f?this.opt.cancelHint:this.opt.targetText;else{"hint"===this.opt.targetType?c=b._getHint.call(this,Math.ceil(c)):this.opt.precision&&(c=parseFloat(c).toFixed(1));var g=d&&"mousemove"===d.type;f||g||this.opt.targetKeep||(c=this.opt.targetText)}c&&(c=this.opt.targetFormat.toString().replace("{score}",c)),e.is(":input")?e.val(c):e.html(c)}},_unlock:function(){this.style.cursor="pointer",this.removeAttribute("title"),this.score.removeAttr("readonly"),this.self.data("readonly",!1);for(var a=0;a<this.opt.number;a++)this.stars[a].title=b._getHint.call(this,a+1);this.cancel&&this.cancel.css("display","")},cancel:function(c){return this.each(function(){var d=a(this);!0!==d.data("readonly")&&(b[c?"click":"score"].call(d,null),this.score.removeAttr("value"))})},click:function(c){return this.each(function(){!0!==a(this).data("readonly")&&(b._apply.call(this,c),this.opt.click&&this.opt.click.call(this,c,a.Event("click")),b._target.call(this,c))})},destroy:function(){return this.each(function(){var b=a(this),c=b.data("raw");c?b.off(".raty").empty().css({cursor:c.style.cursor}).removeData("readonly"):b.data("raw",b.clone()[0])})},getScore:function(){var a,b=[];return this.each(function(){a=this.score.val(),b.push(a?+a:void 0)}),b.length>1?b:b[0]},move:function(c){return this.each(function(){var d=parseInt(c,10),e=a(this).data("options"),f=(+c).toFixed(1).split(".")[1];d>=e.number&&(d=e.number-1,f=10);var g=b._getSize.call(this),h=g/10,i=a(this.stars[d]),j=i.offset().left+h*parseInt(f,10),k=a.Event("mousemove",{pageX:j});i.trigger(k)})},readOnly:function(c){return this.each(function(){var d=a(this);d.data("readonly")!==c&&(c?(d.off(".raty").children("img").off(".raty"),b._lock.call(this)):(b._binds.call(this),b._unlock.call(this)),d.data("readonly",c))})},reload:function(){return b.set.call(this,{})},score:function(){var c=a(this);return arguments.length?b.setScore.apply(c,arguments):b.getScore.call(c)},set:function(b){return this.each(function(){var c=a(this),d=c.data("options"),e=a.extend({},d,b);c.raty(e)})},setScore:function(c){return this.each(function(){!0!==a(this).data("readonly")&&(b._apply.call(this,c),b._target.call(this,c))})}};a.fn.raty=function(c){return b[c]?b[c].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof c&&c?void a.error("Method "+c+" does not exist!"):b.init.apply(this,arguments)},a.fn.raty.defaults={cancel:!1,cancelHint:"Cancel this rating!",cancelOff:"raty-cancel-off",cancelOn:"raty-cancel-on",cancelPlace:"left",click:void 0,half:!1,halfShow:!0,hints:["1"],iconRange:void 0,mouseout:void 0,mouseover:void 0,noRatedMsg:"Not rated yet!",number:5,numberMax:20,path:void 0,precision:!1,readOnly:!1,round:{down:.25,full:.6,up:.76},score:void 0,scoreName:"score",single:!1,space:!0,spaceWidth:3,starColor:"#ff00aa",starHalf:"star-half.png",starOff:"raty-dot-off",starOn:"raty-dot-on",starType:"img",target:void 0,targetFormat:"{score}",targetKeep:!1,targetScore:void 0,targetText:"",targetType:"hint"}}(jQuery),jQuery(function(a){a("body").on("click",".cf-toggle-group-buttons a",function(){var b=a(this),c=b.closest(".caldera-config-field"),d=c.find('[data-ref="'+b.attr("id")+'"]');c.find(".btn").removeClass(b.data("active")).addClass(b.data("default")),b.addClass(b.data("active")).removeClass(b.data("default")),d.prop("checked",!0).trigger("change")})}),jQuery(document).on("cf.init",function(){toggle_button_init()});var cf_jsfields_init,cf_presubmit;!function(a){cf_validate_form=function(b){return b.parsley({errorsWrapper:'<span class="help-block caldera_ajax_error_block"></span>',errorTemplate:"<span></span>",errorsContainer:function(a){return a.$element.closest(".form-group")}}).on("field:error",function(c){this.$element.closest(".form-group").addClass("has-error"),a(document).trigger("cf.validate.fieldError",{inst:c,form:b,el:this.$element})}).on("field:success",function(c){if("star"===this.$element.data("type")&&this.$element.prop("required")&&0==this.$element.val())return void(c.validationResult=!1);this.$element.closest(".form-group").removeClass("has-error"),a(document).trigger("cf.validate.fieldSuccess",{inst:c,form:b,el:this.$element})}).on("form:success",function(c){a(document).trigger("cf.validate.FormSuccess",{inst:c,form:b,el:this.$element})}).on("form:error",function(c){a(document).trigger("cf.validate.FormError",{inst:c,form:b,el:this.$element})})},cf_jsfields_init=function(){a(".init_field_type[data-type]").each(function(b,c){var d=a(c);"function"==typeof window[d.data("type")+"_init"]&&window[d.data("type")+"_init"](d.prop("id"),d[0])}),window.Parsley.on("field:validated",function(){setTimeout(function(){a(document).trigger("cf.error")},15)}),void 0===resBaldrickTriggers&&a(".caldera_forms_form").length,a(document).trigger("cf.fieldsInit")},a("document").ready(function(){cf_jsfields_init()}),a(".caldera-form-page").length&&a(".caldera-form-page").on("keypress","[data-field]:not(textarea)",function(a){13===a.keyCode&&a.preventDefault()}),a(document).on("click",".cf_modal_button",function(b){b.preventDefault();var c=a(this);a(c.attr("href")).show()}),a(document).on("click",".caldera-front-modal-closer",function(b){b.preventDefault(),a(this).closest(".caldera-front-modal-container").hide()}),a(document).on("cf.add cf.enable cf.disable cf.pagenav",cf_jsfields_init),a(document).on("click","[data-page]",function(b){function c(a,b,c){window=window||{};var d="object"==typeof window.cf2&&"object"==typeof window.cf2[b]?window.cf2[b]:null,e=a.attr("id");return function(a,b){return!(!d||!d.fields)&&(!!d.fields.hasOwnProperty(a)&&d.fields[a])}(e,b)?(c=d.component.isFieldValid(e))||d.component.addFieldMessage(e,ParsleyValidator.getErrorMessage("required"),!0):c=a.parsley().isValid(),c}var d,e,f,g=a(this),h=g.closest(".caldera-form-page"),i=g.closest("form.caldera_forms_form"),j=i.attr("id"),k=i.data("instance"),l=i.find(".caldera-form-page:visible").data("formpage"),m=h.data("formpage")?h.data("formpage"):g.data("page"),n=a('.breadcrumb[data-form="caldera_form_'+k+'"]'),o=!0,p=l;if(i.length){if(cf_validate_form(i).destroy(),f=i.find("[data-field]"),i.find(".has-error").removeClass("has-error"),"prev"!==g.data("page")&&m>=l){f=a("#caldera_form_"+k+' [data-formpage="'+l+'"] [data-field]');for(var q,r,s=0;s<f.length;s++)q=a(f[s]),q.hasClass("cf-multi-uploader")||q.hasClass("cf-multi-uploader-list")||!0!==(r=c(q,j,r))&&(b.preventDefault(),o=!1);if(!0===o&&m>l)for(var t=m-1;t>=1;t--){f=a("#caldera_form_"+k+' [data-formpage="'+t+'"] [data-field]');for(var s=0;s<f.length;s++)q=a(f[s]),!0!==(r=c(q,j,r))&&(b.preventDefault(),o=!1,t>p&&(p=t))}}if(!1===o)return p!==l&&(a("#form_page_"+k+"_pg_"+l).hide().attr("aria-hidden","true").css("visibility","hidden"),a("#form_page_"+k+"_pg_"+p).show().attr("aria-hidden","false").css("visibility","visible")),cf_validate_form(i).validate(),!1;"next"===g.data("page")?(n&&n.find("li.active").removeClass("active").children().attr("aria-expanded","false"),d=i.find('.caldera-form-page[data-formpage="'+(m+1)+'"]'),d.length&&(h.hide().attr("aria-hidden","true").css("visibility","hidden"),d.show().attr("aria-hidden","false").css("visibility","visible"),n&&n.find('a[data-page="'+(m+1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):"prev"===g.data("page")?(n&&n.find("li.active").removeClass("active").children().attr("aria-expanded","false"),e=i.find('.caldera-form-page[data-formpage="'+(m-1)+'"]'),e.length&&(h.hide().attr("aria-hidden","true").css("visibility","hidden"),e.show().attr("aria-hidden","false").css("visibility","visible"),n&&n.find('a[data-page="'+(m-1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):g.data("pagenav")&&(b.preventDefault(),g.closest(".breadcrumb").find("li.active").removeClass("active").children().attr("aria-expanded","false"),a("#"+g.data("pagenav")+" .caldera-form-page").hide().attr("aria-hidden","true").css("visibility","hidden"),a("#"+g.data("pagenav")+'\t.caldera-form-page[data-formpage="'+g.data("page")+'"]').show().attr("aria-hidden","false").css("visibility","visible"),g.parent().addClass("active").children().attr("aria-expanded","true")),a("html, body").animate({scrollTop:i.offset().top-100},200),a(document).trigger("cf.pagenav")}});var b;a(".caldera-grid .breadcrumb").each(function(c,d){a(d).find("a[data-pagenav]").each(function(c,d){var e=a(d),f=e.data("pagenav");a("#"+f+' .caldera-form-page[data-formpage="'+e.data("page")+'"]').find(".has-error").length&&(e.parent().addClass("error"),void 0===b&&(e.trigger("click"),b=!0))})}),a(document).on("click",'form.caldera_forms_form [type="submit"]',function(b){var c=a(this),d=c.closest(".caldera_forms_form"),e=cf_validate_form(d);if(a(document).trigger("cf.form.submit",{e:b,$form:d}),e.validate())a(document).trigger("cf.form.validated",{e:b,$form:d}),e.destroy();else{if(a(".caldera-form-page").length){var f=c.parents(".caldera-form-page").data("formpage"),g=[],h=[];if(e.fields.forEach(function(a,b){if(!0!==a.validationResult){var c=a.$element.parents(".caldera-form-page");if(void 0!=c&&c.length&&a.$element.parents(".caldera-form-page").data("formpage")>f)return void h.push(a.$element.data("field"));g.push(a)}}),!g.length)return h.length&&d.append('<input type="hidden" name="_cf_future" value="'+h.toString()+'">'),void e.destroy()}b.preventDefault()}})}(jQuery),window.addEventListener("load",function(){!function(a){"use strict";var b=void 0===typeof window.wp;if(window.CALDERA_FORMS={},"object"==typeof CFFIELD_CONFIG){var c,d,e,f,g,h,i,j,k,l=!1,m=!1;a(".caldera_forms_form").each(function(n,o){if(h=a(o),c=h.attr("id"),g=h.data("instance"),"object"==typeof CFFIELD_CONFIG[g])if(k=a(document.getElementById(c)),b)a(k.data("target")).append('<div class="alert alert-warning">'+CFFIELD_CONFIG[g].error_strings.wp_not_defined+"</div>");else{m||(i=new CalderaFormsCrossOriginWarning(h,a,CFFIELD_CONFIG[g].error_strings),i.maybeWarn(),m=!0),!l&&CFFIELD_CONFIG[g].error_strings.hasOwnProperty("jquery_old")&&(j=new CalderaFormsJQueryWarning(h,a,CFFIELD_CONFIG[g].error_strings),j.maybeWarn(),l=!0),d=h.data("form-id"),f=CFFIELD_CONFIG[g].configs;var p=new CFState(d,a);p.init(CFFIELD_CONFIG[g].fields.defaults,CFFIELD_CONFIG[g].fields.calcDefaults),"object"!=typeof window.cfstate&&(window.cfstate={}),window.cfstate[c]=p,k.find("[data-sync]").each(function(){var b=a(this);b.data("unsync")||new CalderaFormsFieldSync(b,b.data("binds"),k,a,p)}),e=new Caldera_Forms_Field_Config(f,a(document.getElementById(c)),a,p),e.init(),a(document).trigger("cf.form.init",{$form:k,idAttr:c,formId:d,state:p,fieldIds:CFFIELD_CONFIG[g].fields.hasOwnProperty("ids")?CFFIELD_CONFIG[g].fields.ids:[],nonce:jQuery("#_cf_verify_"+d).val()})}})}}(jQuery)});