jQuery.webshims.register("form-number-date-api",function(a,f){var k,n,v;if(!f.getStep)f.getStep=function(d,f){var b=a.attr(d,"step");if("any"===b)return b;f=f||o(d);if(!g[f]||!g[f].step)return b;b=k.asNumber(b);return(!isNaN(b)&&0').prop("type")===d},o=function(d){return(d.getAttribute("type")||"").toLowerCase()},w=f.addMinMaxNumberToCache,s=function(d,a){for(var d=""+d,a=a-d.length,b=0;b=c||1.0E-7>=Math.abs(c-b.step))}return c});[{name:"rangeOverflow",attr:"max",factor:1},{name:"rangeUnderflow",attr:"min",factor:-1}].forEach(function(a){f.addValidityRule(a.name,
function(f,b,c,e){e=(e||{})[a.name]||!1;if(""===b)return e;if(!("type"in c))c.type=o(f[0]);if(g[c.type]&&g[c.type].asNumber){if(!("valueAsNumber"in c))c.valueAsNumber=g[c.type].asNumber(b);if(isNaN(c.valueAsNumber))return!1;w(a.attr,f,c);if(isNaN(c[a.attr+"AsNumber"]))return e;e=c[a.attr+"AsNumber"]*a.factorf.browserVersion||500>a(k).width()&&500>a(k).height()}catch(u){}var d={tabindex:1,tabIndex:1,title:1,"aria-required":1,"aria-invalid":1};if(!j.copyAttrs)j.copyAttrs={};f.extendUNDEFProp(j.copyAttrs,d);i.common=function(b,c,e){Modernizr.formvalidation&&b.bind("firstinvalid",function(a){(f.fromSubmit||!s)&&b.unbind("invalid.replacedwidgetbubble").bind("invalid.replacedwidgetbubble",
function(c){!a.isInvalidUIPrevented()&&!c.isDefaultPrevented()&&(f.validityAlert.showFor(a.target),a.preventDefault(),c.preventDefault());b.unbind("invalid.replacedwidgetbubble")})});var g,p,i=a("input, span.ui-slider-handle",c),h=b[0].attributes;for(g in j.copyAttrs)if((p=h[g])&&p.specified)d[g]&&i[0]?i.attr(g,p.nodeValue):c[0].setAttribute(g,p.nodeValue);p=b.attr("id");g=j.calculateWidth?{css:{marginRight:b.css("marginRight"),marginLeft:b.css("marginLeft")},outerWidth:b.outerWidth()}:{};g.label=
p?a('label[for="'+p+'"]',b[0].form):w;p=f.getID(g.label);c.addClass(b[0].className);f.addShadowDom(b,c,{data:e||{},shadowFocusElement:a("input.input-datetime-local-date, span.ui-slider-handle",c)[0],shadowChilds:i});b.after(c).hide();b[0].form&&a(b[0].form).bind("reset",function(a){a.originalEvent&&!a.isDefaultPrevented()&&setTimeout(function(){b.prop("value",b.prop("value"))},0)});1==c.length&&!a("*",c)[0]&&(c.attr("aria-labelledby",p),g.label.bind("click",function(){c.focus();return!1}));return g};
Modernizr.formvalidation&&["input","form"].forEach(function(a){var c=f.defineNodeNameProperty(a,"checkValidity",{prop:{value:function(){s=!0;var a=c.prop._supvalue.apply(this,arguments);s=!1;return a}}})});if(!q.date||j.replaceUI){var h=function(b,c,e,d){var g,i,h=function(){m.dpDiv.unbind("mousedown.webshimsmousedownhandler");i=g=!1},m=c.bind("focusin",function(){h();m.dpDiv.unbind("mousedown.webshimsmousedownhandler").bind("mousedown.webshimsmousedownhandler",function(){g=!0})}).bind("focusout blur",
function(a){g&&(i=!0,a.stopImmediatePropagation())}).datepicker(a.extend({onClose:function(){i&&n.activeElement!==c[0]?(h(),c.trigger("focusout"),c.triggerHandler("blur")):h()}},o,j.datepicker,b.data("datepicker"))).bind("change",e).data("datepicker");m.dpDiv.addClass("input-date-datepicker-control");d&&f.triggerDomUpdate(d[0]);["disabled","min","max","value","step"].forEach(function(a){var c=b.prop(a);""!==c&&("disabled"!=a||!c)&&b.prop(a,c)});return m};i.date=function(b){if(a.fn.datepicker){var c=
a(''),e=this.common(b,c,i.date.attrs),f=h(b,c,function(e){i.date.blockAttr=!0;var f;if(j.lazyDate){var d=a.data(c[0],"setDateLazyTimer");d&&(clearTimeout(d),a.removeData(c[0],"setDateLazyTimer"))}try{f=(f=a.datepicker.parseDate(c.datepicker("option","dateFormat"),c.prop("value")))?a.datepicker.formatDate("yy-mm-dd",f):c.prop("value")}catch(m){f=c.prop("value")}b.prop("value",f);i.date.blockAttr=!1;e.stopImmediatePropagation();g(b[0],"input");g(b[0],"change")});
e.css&&(c.css(e.css),e.outerWidth&&c.outerWidth(e.outerWidth),f.trigger[0]&&r(c,f.trigger))}};i.date.attrs={disabled:function(b,c,e){a.prop(c,"disabled",!!e)},min:function(b,c,e){try{e=a.datepicker.parseDate("yy-mm-dd",e)}catch(f){e=!1}e&&a(c).datepicker("option","minDate",e)},max:function(b,c,e){try{e=a.datepicker.parseDate("yy-mm-dd",e)}catch(f){e=!1}e&&a(c).datepicker("option","maxDate",e)},value:function(b,c,e){if(!i.date.blockAttr){try{var f=a.datepicker.parseDate("yy-mm-dd",e)}catch(d){f=!1}f?
t(a(c),f):a.prop(c,"value",e)}}}}if(!q.range||j.replaceUI)i.range=function(b){if(a.fn.slider){var c=a(''),e=this.common(b,c,i.range.attrs);a("span",c).attr("aria-labelledby",e.label.attr("id"));e.label.bind("click",function(){a("span",c).focus();return!1});e.css&&(c.css(e.css),e.outerWidth&&c.outerWidth(e.outerWidth));c.slider(a.extend({},j.slider,b.data("slider"),{slide:function(a,c){if(a.originalEvent)i.range.blockAttr=
!0,b.prop("value",c.value),i.range.blockAttr=!1,g(b[0],"input"),g(b[0],"change")}}));["disabled","min","max","step","value"].forEach(function(c){var e=b.attr(c),f;"value"==c&&!e&&(f=b.getShadowElement())&&(e=(a(f).slider("option","max")-a(f).slider("option","min"))/2);null!=e&&b.attr(c,e)})}},i.range.attrs={disabled:function(b,c,e){e=!!e;a(c).slider("option","disabled",e);a("span",c).attr({"aria-disabled":e+"",tabindex:e?"-1":"0"})},min:function(b,c,e){e=e?1*e||0:0;a(c).slider("option","min",e);a("span",
c).attr({"aria-valuemin":e})},max:function(b,c,e){e=e||0===e?1*e||100:100;a(c).slider("option","max",e);a("span",c).attr({"aria-valuemax":e})},value:function(b,c,e){e=a(b).prop("valueAsNumber");isNaN(e)||(i.range.blockAttr||a(c).slider("option","value",e),a("span",c).attr({"aria-valuenow":e,"aria-valuetext":e}))},step:function(b,c,e){e=e&&a.trim(e)?1*e||1:1;a(c).slider("option","step",e)}};if(!f.bugs.valueAsNumberSet&&(j.replaceUI||!Modernizr.inputtypes.date||!Modernizr.inputtypes.range))k=function(){f.data(this,
"hasShadow")&&a.prop(this,"value",a.prop(this,"value"))},f.onNodeNamesPropertyModify("input","valueAsNumber",k),f.onNodeNamesPropertyModify("input","valueAsDate",k);a.each(["disabled","min","max","value","step"],function(a,c){f.onNodeNamesPropertyModify("input",c,function(a){var b=f.data(this,"shadowData");if(b&&b.data&&b.data[c]&&b.nativeElement===this)b.data[c](this,b.shadowElement,a)})});if(!j.availabeLangs)j.availabeLangs="af ar ar-DZ az bg bs ca cs da de el en-AU en-GB en-NZ eo es et eu fa fi fo fr fr-CH gl he hr hu hy id is it ja ko kz lt lv ml ms nl no pl pt-BR rm ro ru sk sl sq sr sr-SR sv ta th tr uk vi zh-CN zh-HK zh-TW".split(" ");
k=function(){a.datepicker&&(f.activeLang({langObj:a.datepicker.regional,module:"form-number-date-ui",callback:function(b){a("input.hasDatepicker").filter(".input-date, .input-datetime-local-date").datepicker("option",a.extend(o,b,j.datepicker))}}),a(n).unbind("jquery-uiReady.langchange input-widgetsReady.langchange"))};a(n).bind("jquery-uiReady.langchange input-widgetsReady.langchange",k);k();(function(){var b=function(){var b={};return function(c){return c in b?b[c]:b[c]=a('')[0].type===
c}}();if(!b("number")){var c=f.cfg["forms-ext"],e=f.inputTypes,d=function(b,c,d){d=d||{};if(!("type"in d))d.type=a.prop(b,"type");if(!("step"in d))d.step=f.getStep(b,d.type);if(!("valueAsNumber"in d))d.valueAsNumber=e[d.type].asNumber(a.prop(b,"value"));var g="any"==d.step?e[d.type].step*e[d.type].stepScaleFactor:d.step;f.addMinMaxNumberToCache("min",a(b),d);f.addMinMaxNumberToCache("max",a(b),d);if(isNaN(d.valueAsNumber))d.valueAsNumber=e[d.type].stepBase||0;if("any"!==d.step&&(b=Math.round(1E7*
((d.valueAsNumber-(d.minAsnumber||0))%d.step))/1E7)&&Math.abs(b)!=d.step)d.valueAsNumber-=b;b=d.valueAsNumber+g*c;return b=!isNaN(d.minAsNumber)&&bd.maxAsNumber?d.valueAsNumber*c>d.maxAsNumber?d.maxAsNumber:isNaN(d.minAsNumber)?d.valueAsNumber:d.minAsNumber:Math.round(1E7*b)/1E7};f.modules["form-number-date-ui"].getNextStep=d;var i=function(b,c,f){if(!b.disabled&&
!b.readOnly&&!a(f).hasClass("step-controls")&&(a.prop(b,"value",e[c].numberToString(d(b,a(f).hasClass("step-up")?1:-1,{type:c}))),a(b).unbind("blur.stepeventshim"),g(b,"input"),n.activeElement)){if(n.activeElement!==b)try{b.focus()}catch(i){}setTimeout(function(){if(n.activeElement!==b)try{b.focus()}catch(c){}a(b).one("blur.stepeventshim",function(){g(b,"change")})},0)}};if(c.stepArrows){var h={set:function(){var a=f.data(this,"step-controls");if(a)a[this.disabled||this.readonly?"addClass":"removeClass"]("disabled-step-control")}};
f.onNodeNamesPropertyModify("input","disabled",h);f.onNodeNamesPropertyModify("input","readonly",a.extend({},h))}var j={38:1,40:-1};f.addReady(function(h,k){c.stepArrows&&a("input",h).add(k.filter("input")).each(function(){var h=a.prop(this,"type");if(e[h]&&e[h].asNumber&&c.stepArrows&&!(!0!==c.stepArrows&&!c.stepArrows[h]||b(h)||a(l).hasClass("has-step-controls"))){var l=this,k=a('').insertAfter(l).bind("selectstart dragstart",
function(){return!1}).bind("mousedown mousepress",function(a){i(l,h,a.target);return!1}).bind("mousepressstart mousepressend",function(b){a(b.target)["mousepressstart"==b.type?"addClass":"removeClass"]("mousepress-ui")}),n=function(b,c){if(!l.disabled&&!l.readOnly)return a.prop(l,"value",e[h].numberToString(d(l,c,{type:h}))),g(l,"input"),!1},m=a(l).addClass("has-step-controls").attr({readonly:l.readOnly,disabled:l.disabled,autocomplete:"off",role:"spinbutton"}).bind(a.browser.msie?"keydown":"keypress",
function(b){if(!l.disabled&&!l.readOnly&&j[b.keyCode])return a.prop(l,"value",e[h].numberToString(d(l,j[b.keyCode],{type:h}))),g(l,"input"),!1});a.fn.mwheelIntent?m.add(k).bind("mwheelIntent",n):m.bind("focus",function(){m.add(k).unbind(".mwhellwebshims").bind("mousewheel.mwhellwebshims",n)}).bind("blur",function(){a(l).add(k).unbind(".mwhellwebshims")});f.data(l,"step-controls",k);c.calculateWidth&&(r(m,k),k.css("marginTop",(m.outerHeight()-k.outerHeight())/2))}})})}})();f.addReady(function(b,c){a(n).bind("jquery-uiReady.initinputui input-widgetsReady.initinputui",
function(){(a.datepicker||a.fn.slider)&&i(b,c);a.datepicker&&a.fn.slider?a(n).unbind(".initinputui"):f.modules["input-widgets"].src||f.warn('jQuery UI Widget factory is already included, but not datepicker or slider. configure src of $.webshims.modules["input-widgets"].src')})})});