(function(){function n(t){var i=n.modules[t];if(!i)throw new Error('failed to require "'+t+'"');return"exports"in i||typeof i.definition!="function"||(i.client=i.component=!0,i.definition.call(this,i.exports={},i),delete i.definition),i.exports}n.loader="component";n.helper={};n.helper.semVerSort=function(n,t){for(var f,e,r,u,o=n.version.split("."),s=t.version.split("."),i=0;i<o.length;++i)if(f=parseInt(o[i],10),e=parseInt(s[i],10),f===e){if(r=o[i].substr((""+f).length),u=s[i].substr((""+e).length),r===""&&u!=="")return 1;if(r!==""&&u==="")return-1;if(r!==""&&u!=="")return r>u?1:-1;continue}else return f>e?1:-1;return 0};n.latest=function(t,i){function h(n){throw new Error('failed to find latest module of "'+n+'"');}var e,r,s,l,u;/(.*)~(.*)/.test(t)||h(t);var c=Object.keys(n.modules),f=[],o=[];for(e=0;e<c.length;e++)r=c[e],new RegExp(t+"@").test(r)&&(s=r.substr(t.length+1),l=/(.*)~(.*)@v?(\d+\.\d+\.\d+[^\/]*)$/.exec(r),l!=null?f.push({version:s,name:r}):o.push({version:s,name:r}));return(f.concat(o).length===0&&h(t),f.length>0)?(u=f.sort(n.helper.semVerSort).pop().name,i===!0)?u:n(u):(u=o.sort(function(n,t){return n.name>t.name})[0].name,i===!0)?u:n(u)};n.modules={};n.register=function(t,i){n.modules[t]={definition:i}};n.define=function(t,i){n.modules[t]={exports:i}};n.register("abpetkov~transitionize@0.0.3",function(n,t){function i(n,t){if(!(this instanceof i))return new i(n,t);this.element=n;this.props=t||{};this.init()}t.exports=i;i.prototype.isSafari=function(){return/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)};i.prototype.init=function(){var n=[];for(var t in this.props)n.push(t+" "+this.props[t]);this.element.style.transition=n.join(", ");this.isSafari()&&(this.element.style.webkitTransition=n.join(", "))}});n.register("ftlabs~fastclick@v0.6.11",function(n,t){function i(n){"use strict";var r,t=this;if(this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=10,this.layer=n,!n||!n.nodeType)throw new TypeError("Layer must be a document node");(this.onClick=function(){return i.prototype.onClick.apply(t,arguments)},this.onMouse=function(){return i.prototype.onMouse.apply(t,arguments)},this.onTouchStart=function(){return i.prototype.onTouchStart.apply(t,arguments)},this.onTouchMove=function(){return i.prototype.onTouchMove.apply(t,arguments)},this.onTouchEnd=function(){return i.prototype.onTouchEnd.apply(t,arguments)},this.onTouchCancel=function(){return i.prototype.onTouchCancel.apply(t,arguments)},i.notNeeded(n))||(this.deviceIsAndroid&&(n.addEventListener("mouseover",this.onMouse,!0),n.addEventListener("mousedown",this.onMouse,!0),n.addEventListener("mouseup",this.onMouse,!0)),n.addEventListener("click",this.onClick,!0),n.addEventListener("touchstart",this.onTouchStart,!1),n.addEventListener("touchmove",this.onTouchMove,!1),n.addEventListener("touchend",this.onTouchEnd,!1),n.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(n.removeEventListener=function(t,i,r){var u=Node.prototype.removeEventListener;t==="click"?u.call(n,t,i.hijacked||i,r):u.call(n,t,i,r)},n.addEventListener=function(t,i,r){var u=Node.prototype.addEventListener;t==="click"?u.call(n,t,i.hijacked||(i.hijacked=function(n){n.propagationStopped||i(n)}),r):u.call(n,t,i,r)}),typeof n.onclick=="function"&&(r=n.onclick,n.addEventListener("click",function(n){r(n)},!1),n.onclick=null))}i.prototype.deviceIsAndroid=navigator.userAgent.indexOf("Android")>0;i.prototype.deviceIsIOS=/iP(ad|hone|od)/.test(navigator.userAgent);i.prototype.deviceIsIOS4=i.prototype.deviceIsIOS&&/OS 4_\d(_\d)?/.test(navigator.userAgent);i.prototype.deviceIsIOSWithBadTarget=i.prototype.deviceIsIOS&&/OS ([6-9]|\d{2})_\d/.test(navigator.userAgent);i.prototype.needsClick=function(n){"use strict";switch(n.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(n.disabled)return!0;break;case"input":if(this.deviceIsIOS&&n.type==="file"||n.disabled)return!0;break;case"label":case"video":return!0}return/\bneedsclick\b/.test(n.className)};i.prototype.needsFocus=function(n){"use strict";switch(n.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!this.deviceIsAndroid;case"input":switch(n.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!n.disabled&&!n.readOnly;default:return/\bneedsfocus\b/.test(n.className)}};i.prototype.sendClick=function(n,t){"use strict";var r,i;document.activeElement&&document.activeElement!==n&&document.activeElement.blur();i=t.changedTouches[0];r=document.createEvent("MouseEvents");r.initMouseEvent(this.determineEventType(n),!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null);r.forwardedTouchEvent=!0;n.dispatchEvent(r)};i.prototype.determineEventType=function(n){"use strict";return this.deviceIsAndroid&&n.tagName.toLowerCase()==="select"?"mousedown":"click"};i.prototype.focus=function(n){"use strict";var t;this.deviceIsIOS&&n.setSelectionRange&&n.type.indexOf("date")!==0&&n.type!=="time"?(t=n.value.length,n.setSelectionRange(t,t)):n.focus()};i.prototype.updateScrollParent=function(n){"use strict";var i,t;if(i=n.fastClickScrollParent,!i||!i.contains(n)){t=n;do{if(t.scrollHeight>t.offsetHeight){i=t;n.fastClickScrollParent=t;break}t=t.parentElement}while(t)}i&&(i.fastClickLastScrollTop=i.scrollTop)};i.prototype.getTargetElementFromEventTarget=function(n){"use strict";return n.nodeType===Node.TEXT_NODE?n.parentNode:n};i.prototype.onTouchStart=function(n){"use strict";var i,t,r;if(n.targetTouches.length>1)return!0;if(i=this.getTargetElementFromEventTarget(n.target),t=n.targetTouches[0],this.deviceIsIOS){if(r=window.getSelection(),r.rangeCount&&!r.isCollapsed)return!0;if(!this.deviceIsIOS4){if(t.identifier===this.lastTouchIdentifier)return n.preventDefault(),!1;this.lastTouchIdentifier=t.identifier;this.updateScrollParent(i)}}return this.trackingClick=!0,this.trackingClickStart=n.timeStamp,this.targetElement=i,this.touchStartX=t.pageX,this.touchStartY=t.pageY,n.timeStamp-this.lastClickTime<200&&n.preventDefault(),!0};i.prototype.touchHasMoved=function(n){"use strict";var t=n.changedTouches[0],i=this.touchBoundary;return Math.abs(t.pageX-this.touchStartX)>i||Math.abs(t.pageY-this.touchStartY)>i?!0:!1};i.prototype.onTouchMove=function(n){"use strict";return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(n.target)||this.touchHasMoved(n))&&(this.trackingClick=!1,this.targetElement=null),!0):!0};i.prototype.findControl=function(n){"use strict";return n.control!==undefined?n.control:n.htmlFor?document.getElementById(n.htmlFor):n.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")};i.prototype.onTouchEnd=function(n){"use strict";var u,e,i,r,f,t=this.targetElement;if(!this.trackingClick)return!0;if(n.timeStamp-this.lastClickTime<200)return this.cancelNextClick=!0,!0;if(this.cancelNextClick=!1,this.lastClickTime=n.timeStamp,e=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,this.deviceIsIOSWithBadTarget&&(f=n.changedTouches[0],t=document.elementFromPoint(f.pageX-window.pageXOffset,f.pageY-window.pageYOffset)||t,t.fastClickScrollParent=this.targetElement.fastClickScrollParent),i=t.tagName.toLowerCase(),i==="label"){if(u=this.findControl(t),u){if(this.focus(t),this.deviceIsAndroid)return!1;t=u}}else if(this.needsFocus(t))return n.timeStamp-e>100||this.deviceIsIOS&&window.top!==window&&i==="input"?(this.targetElement=null,!1):(this.focus(t),this.deviceIsIOS4&&i==="select"||(this.targetElement=null,n.preventDefault()),!1);return this.deviceIsIOS&&!this.deviceIsIOS4&&(r=t.fastClickScrollParent,r&&r.fastClickLastScrollTop!==r.scrollTop)?!0:(this.needsClick(t)||(n.preventDefault(),this.sendClick(t,n)),!1)};i.prototype.onTouchCancel=function(){"use strict";this.trackingClick=!1;this.targetElement=null};i.prototype.onMouse=function(n){"use strict";return this.targetElement?n.forwardedTouchEvent?!0:n.cancelable?!this.needsClick(this.targetElement)||this.cancelNextClick?(n.stopImmediatePropagation?n.stopImmediatePropagation():n.propagationStopped=!0,n.stopPropagation(),n.preventDefault(),!1):!0:!0:!0};i.prototype.onClick=function(n){"use strict";var t;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):n.target.type==="submit"&&n.detail===0?!0:(t=this.onMouse(n),t||(this.targetElement=null),t)};i.prototype.destroy=function(){"use strict";var n=this.layer;this.deviceIsAndroid&&(n.removeEventListener("mouseover",this.onMouse,!0),n.removeEventListener("mousedown",this.onMouse,!0),n.removeEventListener("mouseup",this.onMouse,!0));n.removeEventListener("click",this.onClick,!0);n.removeEventListener("touchstart",this.onTouchStart,!1);n.removeEventListener("touchmove",this.onTouchMove,!1);n.removeEventListener("touchend",this.onTouchEnd,!1);n.removeEventListener("touchcancel",this.onTouchCancel,!1)};i.notNeeded=function(n){"use strict";var t,r;if(typeof ontouchstart=="undefined")return!0;if(r=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],r)if(i.prototype.deviceIsAndroid){if(t=document.querySelector("meta[name=viewport]"),t&&(t.content.indexOf("user-scalable=no")!==-1||r>31&&window.innerWidth<=window.screen.width))return!0}else return!0;return n.style.msTouchAction==="none"?!0:!1};i.attach=function(n){"use strict";return new i(n)};typeof define!="undefined"&&define.amd?define(function(){"use strict";return i}):typeof t!="undefined"&&t.exports?(t.exports=i.attach,t.exports.FastClick=i):window.FastClick=i});n.register("component~indexof@0.0.3",function(n,t){t.exports=function(n,t){if(n.indexOf)return n.indexOf(t);for(var i=0;i<n.length;++i)if(n[i]===t)return i;return-1}});n.register("component~classes@1.2.1",function(t,i){function r(n){if(!n)throw new Error("A DOM element reference is required");this.el=n;this.list=n.classList}var u=n("component~indexof@0.0.3"),f=/\s+/,e=Object.prototype.toString;i.exports=function(n){return new r(n)};r.prototype.add=function(n){if(this.list)return this.list.add(n),this;var t=this.array(),i=u(t,n);return~i||t.push(n),this.el.className=t.join(" "),this};r.prototype.remove=function(n){if("[object RegExp]"==e.call(n))return this.removeMatching(n);if(this.list)return this.list.remove(n),this;var t=this.array(),i=u(t,n);return~i&&t.splice(i,1),this.el.className=t.join(" "),this};r.prototype.removeMatching=function(n){for(var i=this.array(),t=0;t<i.length;t++)n.test(i[t])&&this.remove(i[t]);return this};r.prototype.toggle=function(n,t){return this.list?("undefined"!=typeof t?t!==this.list.toggle(n,t)&&this.list.toggle(n):this.list.toggle(n),this):("undefined"!=typeof t?t?this.add(n):this.remove(n):this.has(n)?this.remove(n):this.add(n),this)};r.prototype.array=function(){var t=this.el.className.replace(/^\s+|\s+$/g,""),n=t.split(f);return""===n[0]&&n.shift(),n};r.prototype.has=r.prototype.contains=function(n){return this.list?this.list.contains(n):!!~u(this.array(),n)}});n.register("component~event@0.1.4",function(n){var t=window.addEventListener?"addEventListener":"attachEvent",r=window.removeEventListener?"removeEventListener":"detachEvent",i=t!=="addEventListener"?"on":"";n.bind=function(n,r,u,f){return n[t](i+r,u,f||!1),u};n.unbind=function(n,t,u,f){return n[r](i+t,u,f||!1),u}});n.register("component~query@0.0.3",function(n,t){function i(n,t){return t.querySelector(n)}n=t.exports=function(n,t){return t=t||document,i(n,t)};n.all=function(n,t){return t=t||document,t.querySelectorAll(n)};n.engine=function(t){if(!t.one)throw new Error(".one callback required");if(!t.all)throw new Error(".all callback required");return i=t.one,n.all=t.all,n}});n.register("component~matches-selector@0.1.5",function(t,i){function e(n,t){var r,i;if(!n||n.nodeType!==1)return!1;if(u)return u.call(n,t);for(r=f.all(t,n.parentNode),i=0;i<r.length;++i)if(r[i]==n)return!0;return!1}var f=n("component~query@0.0.3"),r=Element.prototype,u=r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector;i.exports=e});n.register("component~closest@0.1.4",function(t,i){var r=n("component~matches-selector@0.1.5");i.exports=function(n,t,i,u){for(n=i?{parentNode:n}:n,u=u||document;(n=n.parentNode)&&n!==document;){if(r(n,t))return n;if(n===u)return}}});n.register("component~delegate@0.2.3",function(t){var r=n("component~closest@0.1.4"),i=n("component~event@0.1.4");t.bind=function(n,t,u,f,e){return i.bind(n,u,function(i){var u=i.target||i.srcElement;i.delegateTarget=r(u,t,!0,n);i.delegateTarget&&f.call(n,i)},e)};t.unbind=function(n,t,r,u){i.unbind(n,t,r,u)}});n.register("component~events@1.0.9",function(t,i){function r(n,t){if(!(this instanceof r))return new r(n,t);if(!n)throw new Error("element required");if(!t)throw new Error("object required");this.el=n;this.obj=t;this._events={}}function e(n){var t=n.split(/ +/);return{name:t.shift(),selector:t.join(" ")}}var u=n("component~event@0.1.4"),f=n("component~delegate@0.2.3");i.exports=r;r.prototype.sub=function(n,t,i){this._events[n]=this._events[n]||{};this._events[n][t]=i};r.prototype.bind=function(n,t){function i(){var n=[].slice.call(arguments).concat(c);h[t].apply(h,n)}var o=e(n),s=this.el,h=this.obj,r=o.name,t=t||"on"+r,c=[].slice.call(arguments,2);return o.selector?i=f.bind(s,o.selector,r,i):u.bind(s,r,i),this.sub(r,t,i),i};r.prototype.unbind=function(n,t){var i,r;if(0==arguments.length)return this.unbindAll();if(1==arguments.length)return this.unbindAllOf(n);(i=this._events[n],i)&&(r=i[t],r)&&u.unbind(this.el,n,r)};r.prototype.unbindAll=function(){for(var n in this._events)this.unbindAllOf(n)};r.prototype.unbindAllOf=function(n){var t=this._events[n],i;if(t)for(i in t)this.unbind(n,i)}});n.register("switchery",function(t,i){function r(n,t){if(!(this instanceof r))return new r(n,t);this.element=n;this.options=t||{};for(var i in u)this.options[i]==null&&(this.options[i]=u[i]);this.element!=null&&this.element.type=="checkbox"&&this.init();this.isDisabled()===!0&&this.disable()}var e=n("abpetkov~transitionize@0.0.3"),o=n("ftlabs~fastclick@v0.6.11"),f=n("component~classes@1.2.1"),s=n("component~events@1.0.9"),u;i.exports=r;u={color:"#64bd63",secondaryColor:"#dfdfdf",jackColor:"#fff",jackSecondaryColor:null,className:"switchery",disabled:!1,disabledOpacity:.5,speed:"0.4s",size:"default"};r.prototype.hide=function(){this.element.style.display="none"};r.prototype.show=function(){var n=this.create();this.insertAfter(this.element,n)};r.prototype.create=function(){return this.switcher=document.createElement("span"),this.jack=document.createElement("small"),this.switcher.appendChild(this.jack),this.switcher.className=this.options.className,this.events=s(this.switcher,this),this.switcher};r.prototype.insertAfter=function(n,t){n.parentNode.insertBefore(t,n.nextSibling)};r.prototype.setPosition=function(n){var t=this.isChecked(),r=this.switcher,i=this.jack;n&&t?t=!1:n&&!t&&(t=!0);t===!0?(this.element.checked=!0,i.style.left=window.getComputedStyle?parseInt(window.getComputedStyle(r).width)-parseInt(window.getComputedStyle(i).width)+"px":parseInt(r.currentStyle.width)-parseInt(i.currentStyle.width)+"px",this.options.color&&this.colorize(),this.setSpeed()):(i.style.left=0,this.element.checked=!1,this.switcher.style.boxShadow="inset 0 0 0 0 "+this.options.secondaryColor,this.switcher.style.borderColor=this.options.secondaryColor,this.switcher.style.backgroundColor=this.options.secondaryColor!==u.secondaryColor?this.options.secondaryColor:"#fff",this.jack.style.backgroundColor=this.options.jackSecondaryColor!==this.options.jackColor?this.options.jackSecondaryColor:this.options.jackColor,this.setSpeed())};r.prototype.setSpeed=function(){var n={},t={"background-color":this.options.speed,left:this.options.speed.replace(/[a-z]/,"")/2+"s"};n=this.isChecked()?{border:this.options.speed,"box-shadow":this.options.speed,"background-color":this.options.speed.replace(/[a-z]/,"")*3+"s"}:{border:this.options.speed,"box-shadow":this.options.speed};e(this.switcher,n);e(this.jack,t)};r.prototype.setSize=function(){switch(this.options.size){case"small":f(this.switcher).add("switchery-small");break;case"large":f(this.switcher).add("switchery-large");break;default:f(this.switcher).add("switchery-default")}};r.prototype.colorize=function(){var n=this.switcher.offsetHeight/2;this.switcher.style.backgroundColor=this.options.color;this.switcher.style.borderColor=this.options.color;this.switcher.style.boxShadow="inset 0 0 0 "+n+"px "+this.options.color;this.jack.style.backgroundColor=this.options.jackColor};r.prototype.handleOnchange=function(){if(document.dispatchEvent){var n=document.createEvent("HTMLEvents");n.initEvent("change",!0,!0);this.element.dispatchEvent(n)}else this.element.fireEvent("onchange")};r.prototype.handleChange=function(){var t=this,n=this.element;n.addEventListener?n.addEventListener("change",function(){t.setPosition()}):n.attachEvent("onchange",function(){t.setPosition()})};r.prototype.handleClick=function(){var n=this.switcher;o(n);this.events.bind("click","bindClick")};r.prototype.bindClick=function(){var n=this.element.parentNode.tagName.toLowerCase(),t=n==="label"?!1:!0;this.setPosition(t);this.handleOnchange(this.element.checked)};r.prototype.markAsSwitched=function(){this.element.setAttribute("data-switchery",!0)};r.prototype.markedAsSwitched=function(){return this.element.getAttribute("data-switchery")};r.prototype.init=function(){this.hide();this.show();this.setSize();this.setPosition();this.markAsSwitched();this.handleChange();this.handleClick()};r.prototype.isChecked=function(){return this.element.checked};r.prototype.isDisabled=function(){return this.options.disabled||this.element.disabled||this.element.readOnly};r.prototype.destroy=function(){this.events.unbind()};r.prototype.enable=function(){this.options.disabled&&(this.options.disabled=!1);this.element.disabled&&(this.element.disabled=!1);this.element.readOnly&&(this.element.readOnly=!1);this.switcher.style.opacity=1;this.events.bind("click","bindClick")};r.prototype.disable=function(){this.options.disabled||(this.options.disabled=!0);this.element.disabled||(this.element.disabled=!0);this.element.readOnly||(this.element.readOnly=!0);this.switcher.style.opacity=this.options.disabledOpacity;this.destroy()}});typeof exports=="object"?module.exports=n("switchery"):typeof define=="function"&&define.amd?define("Switchery",[],function(){return n("switchery")}):(this||window).Switchery=n("switchery")})()