%PDF- %PDF-
Direktori : /home1/dimen328/dimensaocondominios.com.br--/espace/verification/index/ |
Current File : //home1/dimen328/dimensaocondominios.com.br--/espace/verification/index/sf-comp.js.tВlВchargement |
define("comp/utils/formatters/default-formatter",[],function(){function t(t){this.options=t}return t.prototype.parse=function(t){return t.trim()},t.prototype.format=function(t){return t?""+t:""},t.prototype.dataFormat=function(t){return t?""+t:""},t.prototype.editFormat=function(t){return t?this.format(t):""},t}),function(t){define("iban",[],function(){return function(){return function(t){function e(t){return t=t.toUpperCase(),t=t.substr(4)+t.substr(0,4),t.split("").map(function(t){var e=t.charCodeAt(0);return a>e||e>l?t:e-a+10}).join("")}function i(t){for(var e,i=t;i.length>2;)e=i.slice(0,9),i=parseInt(e,10)%97+i.slice(e.length);return parseInt(i,10)%97}function n(t){var e=t.match(/(.{3})/g).map(function(t){var e,i=t.slice(0,1),n=parseInt(t.slice(1),10);switch(i){case"A":e="0-9A-Za-z";break;case"B":e="0-9A-Z";break;case"C":e="A-Za-z";break;case"F":e="0-9";break;case"L":e="a-z";break;case"U":e="A-Z";break;case"W":e="0-9a-z"}return"(["+e+"]{"+n+"})"});return RegExp("^"+e.join("")+"$")}function s(t,e,i,n){this.countryCode=t,this.length=e,this.structure=i,this.example=n}function o(t){c[t.countryCode]=t}function r(t){return"string"==typeof t||t instanceof String}Array.prototype.map||(Array.prototype.map=function(t){if(void 0===this||null===this)throw new TypeError;var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var n=Array(i),s=arguments.length<2?void 0:arguments[1],o=0;i>o;o++)o in e&&(n[o]=t.call(s,e[o],o,e));return n});var a="A".charCodeAt(0),l="Z".charCodeAt(0);s.prototype._regex=function(){return this._cachedRegex||(this._cachedRegex=n(this.structure))},s.prototype.isValid=function(t){return this.length==t.length&&this.countryCode===t.slice(0,2)&&this._regex().test(t.slice(4))&&1==i(e(t))},s.prototype.toBBAN=function(t,e){return this._regex().exec(t.slice(4)).slice(1).join(e)},s.prototype.fromBBAN=function(t){if(!this.isValidBBAN(t))throw Error("Invalid BBAN");var n=i(e(this.countryCode+"00"+t)),s=("0"+(98-n)).slice(-2);return this.countryCode+s+t},s.prototype.isValidBBAN=function(t){return this.length-4==t.length&&this._regex().test(t)};var c={};o(new s("AD",24,"F04F04A12","AD1200012030200359100100")),o(new s("AE",23,"F03F16","AE070331234567890123456")),o(new s("AL",28,"F08A16","AL47212110090000000235698741")),o(new s("AT",20,"F05F11","AT611904300234573201")),o(new s("AZ",28,"U04A20","AZ21NABZ00000000137010001944")),o(new s("BA",20,"F03F03F08F02","BA391290079401028494")),o(new s("BE",16,"F03F07F02","BE68539007547034")),o(new s("BG",22,"U04F04F02A08","BG80BNBG96611020345678")),o(new s("BH",22,"U04A14","BH67BMAG00001299123456")),o(new s("BR",29,"F08F05F10U01A01","BR9700360305000010009795493P1")),o(new s("CH",21,"F05A12","CH9300762011623852957")),o(new s("CR",21,"F03F14","CR0515202001026284066")),o(new s("CY",28,"F03F05A16","CY17002001280000001200527600")),o(new s("CZ",24,"F04F06F10","CZ6508000000192000145399")),o(new s("DE",22,"F08F10","DE89370400440532013000")),o(new s("DK",18,"F04F09F01","DK5000400440116243")),o(new s("DO",28,"U04F20","DO28BAGR00000001212453611324")),o(new s("EE",20,"F02F02F11F01","EE382200221020145685")),o(new s("ES",24,"F04F04F01F01F10","ES9121000418450200051332")),o(new s("FI",18,"F06F07F01","FI2112345600000785")),o(new s("FO",18,"F04F09F01","FO6264600001631634")),o(new s("FR",27,"F05F05A11F02","FR1420041010050500013M02606")),o(new s("GB",22,"U04F06F08","GB29NWBK60161331926819")),o(new s("GE",22,"U02F16","GE29NB0000000101904917")),o(new s("GI",23,"U04A15","GI75NWBK000000007099453")),o(new s("GL",18,"F04F09F01","GL8964710001000206")),o(new s("GR",27,"F03F04A16","GR1601101250000000012300695")),o(new s("GT",28,"A04A20","GT82TRAJ01020000001210029690")),o(new s("HR",21,"F07F10","HR1210010051863000160")),o(new s("HU",28,"F03F04F01F15F01","HU42117730161111101800000000")),o(new s("IE",22,"U04F06F08","IE29AIBK93115212345678")),o(new s("IL",23,"F03F03F13","IL620108000000099999999")),o(new s("IS",26,"F04F02F06F10","IS140159260076545510730339")),o(new s("IT",27,"U01F05F05A12","IT60X0542811101000000123456")),o(new s("KW",30,"U04A22","KW81CBKU0000000000001234560101")),o(new s("KZ",20,"F03A13","KZ86125KZT5004100100")),o(new s("LB",28,"F04A20","LB62099900000001001901229114")),o(new s("LI",21,"F05A12","LI21088100002324013AA")),o(new s("LT",20,"F05F11","LT121000011101001000")),o(new s("LU",20,"F03A13","LU280019400644750000")),o(new s("LV",21,"U04A13","LV80BANK0000435195001")),o(new s("MC",27,"F05F05A11F02","MC5811222000010123456789030")),o(new s("MD",24,"U02F18","MD24AG000225100013104168")),o(new s("ME",22,"F03F13F02","ME25505000012345678951")),o(new s("MK",19,"F03A10F02","MK07250120000058984")),o(new s("MR",27,"F05F05F11F02","MR1300020001010000123456753")),o(new s("MT",31,"U04F05A18","MT84MALT011000012345MTLCAST001S")),o(new s("MU",30,"U04F02F02F12F03U03","MU17BOMM0101101030300200000MUR")),o(new s("NL",18,"U04F10","NL91ABNA0417164300")),o(new s("NO",15,"F04F06F01","NO9386011117947")),o(new s("PK",24,"U04A16","PK36SCBL0000001123456702")),o(new s("PL",28,"F08F16","PL61109010140000071219812874")),o(new s("PS",29,"U04A21","PS92PALS000000000400123456702")),o(new s("PT",25,"F04F04F11F02","PT50000201231234567890154")),o(new s("RO",24,"U04A16","RO49AAAA1B31007593840000")),o(new s("RS",22,"F03F13F02","RS35260005601001611379")),o(new s("SA",24,"F02A18","SA0380000000608010167519")),o(new s("SE",24,"F03F16F01","SE4550000000058398257466")),o(new s("SI",19,"F05F08F02","SI56263300012039086")),o(new s("SK",24,"F04F06F10","SK3112000000198742637541")),o(new s("SM",27,"U01F05F05A12","SM86U0322509800000000270100")),o(new s("TN",24,"F02F03F13F02","TN5910006035183598478831")),o(new s("TR",26,"F05A01A16","TR330006100519786457841326")),o(new s("VG",24,"U04F16","VG96VPVG0000012345678901"));var h=/[^a-zA-Z0-9]/g,d=/(.{4})(?!$)/g;t.isValid=function(t){if(!r(t))return!1;t=this.electronicFormat(t);var e=c[t.slice(0,2)];return!!e&&e.isValid(t)},t.toBBAN=function(t,e){void 0===e&&(e=" "),t=this.electronicFormat(t);var i=c[t.slice(0,2)];if(!i)throw Error("No country with code "+t.slice(0,2));return i.toBBAN(t,e)},t.fromBBAN=function(t,e){var i=c[t];if(!i)throw Error("No country with code "+t);return i.fromBBAN(this.electronicFormat(e))},t.isValidBBAN=function(t,e){if(!r(e))return!1;var i=c[t];return i&&i.isValidBBAN(this.electronicFormat(e))},t.printFormat=function(t,e){return void 0===e&&(e=" "),this.electronicFormat(t).replace(d,"$1"+e)},t.electronicFormat=function(t){return t.replace(h,"").toUpperCase()},t.countries=c}("undefined"==typeof exports?this.IBAN={}:exports),t.IBAN=IBAN}.apply(t,arguments)})}(this),define("comp/utils/formatters/iban-formatter",["iban","./default-formatter"],function(t,e){function i(t){e.call(this,t)}return i.prototype=new e,i.prototype.parse=function(e){return t.electronicFormat(e)},i.prototype.format=function(e){return t.printFormat(e)},i.prototype.dataFormat=function(e){return t.electronicFormat(e)},i}),define("comp/utils/formatters/number-formatter",["./default-formatter","underscore"],function(t,e){function i(e){if(e=e||{},e.fractionCount&&!e.decimalSeparator)throw Error("To have fractions, a decimalSeparator must be specified.");t.call(this,e)}return i.prototype=new t,i.prototype.parse=function(t){if(!t||""===t.trim())return null;var i=t;if(this.options.decimalSeparator)var i=i.replace(this.options.decimalSeparator,".");var n=parseFloat(i);if(e.isNaN(n))throw Error("Value is not a number.");return n},i.prototype.format=function(t){if(!t)return"";var e=t.toFixed(this.options.fractionCount);return e=e.replace(".",this.options.decimalSeparator)},i}),define("comp/utils/formatters/structured-formatter",["./default-formatter","underscore"],function(t,e){function i(e){t.call(this,e)}return i.prototype=new t,i.prototype.parse=function(t){if(""!==t)for(var i=0;i<this.options.structure.length;i++){var n=this.options.structure[i];if(!e.isNumber(n)){var s=RegExp(escapeUnwantedChars(n),"g");t=t.replace(s,"")}}return t},i.prototype.format=function(t){var i="",n=t.replace(/ /g,"");if(""!==n)for(var s=0;s<this.options.structure.length;s++){var o=this.options.structure[s];e.isNumber(o)?(i+=n.substring(0,o),n=n.substring(o,n.length)):i+=o}return i},i.prototype.dataFormat=function(t){if(""!==t)for(var i=0;i<this.options.structure.length;i++){var n=this.options.structure[i];if(!e.isNumber(n)){var s=RegExp(escapeUnwantedChars(n),"g");t=t.replace(s,"")}}return t},i.prototype.editFormat=function(t){if(""!==t)for(var i=0;i<this.options.structure.length;i++){var n=this.options.structure[i];if(!e.isNumber(n)){var s=RegExp(escapeUnwantedChars(n),"g");t=t.replace(s,"")}}return t},escapeUnwantedChars=function(t){return t.replace(/([()[{*+.$^\\|?])/g,"\\$1")},i}),define("comp/utils/formatters",["./formatters/default-formatter","./formatters/iban-formatter","./formatters/number-formatter","./formatters/structured-formatter"],function(t,e,i,n){return{"default":t,iban:e,number:i,structured:n}}),define("comp/utils/validators/default-validator",[],function(){function t(){}return t.prototype.validate=function(){return[]},t}),define("comp/utils/validators/custom-validator",[],function(){function t(t){this.validationFunction=t.validate}return t.prototype.validate=function(t){return this.validationFunction.call(this,t)},t}),define("comp/utils/validators/iban-validator",["iban"],function(t){function e(){}return e.prototype.validate=function(e){var i=[];return""==e||t.isValid(t.electronicFormat(e))||i.push("IBAN is invalid"),i},e}),define("comp/utils/validators/regex-validator",["underscore"],function(t){function e(e){if(!e.pattern)throw Error("Cannot instantiate RegexValidator without supplied pattern");if(this.pattern=e.pattern,t.isString(this.pattern))this.regex=RegExp("^"+this.pattern+"$","g");else{if(!(this.pattern instanceof RegExp))throw Error("Pattern supplied is of the incorrect type");this.regex=this.pattern}}return e.prototype.validate=function(t){var e=[];return""!=t&&(this.regex.lastIndex=0,this.regex.test(t)||e.push("The value doesn't correspond to the correct format.")),e},e}),define("comp/utils/validators",["./validators/default-validator","./validators/custom-validator","./validators/iban-validator","./validators/regex-validator"],function(t,e,i,n){return{"default":t,custom:e,iban:i,regex:n}}),define("comp/utils/main",["module","backbone","underscore","./formatters","./validators"],function(t,e,i,n,s){function o(){return"sf-gen-"+u++}function r(t,e){return $("<div>"+t+"</div>").find('script[type="text/x-jquery-tmpl"][data-template-id="'+e+'"]').html()}function a(){return void 0!==t.config().mobile?!t.config().mobile:!/Android|webOS|iPhone|iPad|iPod|Silk|BB10|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}function l(){return/iPhone|iPad|iPod/i.test(navigator.userAgent)}function c(){return/(Android|Silk)/i.test(navigator.userAgent)}function h(){return/(IEMobile)/i.test(navigator.userAgent)}function d(t){return n[t]}function p(t){return s[t]}var u=0,f={generateID:o,getTemplate:r,isMobile:!a(),isDesktop:a(),isIOS:l(),isAndroid:c(),isWindowsPhone:h(),getFormatter:d,getValidator:p};return f}),define("comp/utils",["comp/utils/main"],function(t){return t}),define("comp/utils/device-dependent-view",["backbone","underscore","comp/utils"],function(t,e,i){return t.View.extend({initialize:function(t){var n=this.resolveView(i,t);e.extend(this,n.prototype),t||(t={}),e.extend(this,e.pick(t,["model","collection","el","id","attributes","className","tagName","events"])),n.prototype.initialize.apply(this,arguments)},resolveView:function(t){return t.isMobile?this.mobile:this.desktop}})}),define("text!comp/forms/field/field-template.html",[],function(){return'<script type="text/x-jquery-tmpl" data-template-id="field"><div class="form-group"><label class="control-label" for="<%=id%>"><%=label%></label><% if (errorLocation === \'top\') { %><div class="field-errors"></div><% } %><div class="inner-component"></div><% if (errorLocation === \'bottom\') { %><div class="field-errors"></div><% } %></div><\/script><script type="text/x-jquery-tmpl" data-template-id="field-error"><% _.each(errors, function(error) { %><span class="help-block"><%=error%></span><% }); %><\/script>'}),define("comp/forms/field/main",["text!./field-template.html","jquery","backbone","underscore","comp/utils","sf"],function(t,e,i,n,s){var o=n.template(s.getTemplate(t,"field")),r=n.template(s.getTemplate(t,"field-error")),a=i.View.extend({initialize:function(t){this.id=t.id||s.generateID(),n.defaults(t,{inputName:this.id,tabIndex:"0",errorLocation:"bottom",label:"",validator:{type:"default"}}),this.options=t,this.value=null,this.enabled=!0,this.createValidator(),this.render(),this.$("label").click(this.preventEvent)},render:function(){var t=o({label:this.options.label,id:this.id,errorLocation:this.options.errorLocation}),e=this.$el.children();this.$el.prepend(t),this.$(".inner-component").append(e),this.options.value&&(this.setValue(this.options.value),this.options.value=null)},preventEvent:function(t){return t.preventDefault(),!1},createValidator:function(){var t,e=this.options.validator;n.isFunction(e)?(t=s.getValidator("custom"),this.validator=new t({validate:e})):n.isObject(e)&&e.type?(t=s.getValidator(e.type),this.validator=new t(e)):n.isObject(e)&&!e.type&&(this.validator=n.extend({},e))},setErrors:function(t){t.length>0?(this.markInvalid(),this.$(".field-errors").html(r({errors:t}))):this.resetInvalid()},getErrors:function(){return this.validator.validate(this.getValue())},markInvalid:function(){this.$(".form-group").addClass("has-error"),this.valid=!1},resetInvalid:function(){this.$(".form-group").removeClass("has-error"),this.valid=!0,this.$(".field-errors").empty()},validate:function(){this.resetInvalid();var t=this.getErrors();if(!n.isArray(t))throw Error("The validation did not return an array.");this.setErrors(t)},isValid:function(){return this.validate(),this.valid},setValue:function(t){var e=!this.valueEquals(t,this.value),i=this.value;this.value=t,this.value||(this.value=null),e&&(this.trigger("change",t,i),this.validate())},valueEquals:function(t,e){return t===e},getValue:function(){return this.value},disable:function(){this.enabled=!1},enable:function(){this.enabled=!0},isEnabled:function(){return this.enabled},setDisabled:function(t){t&&!this.isEnabled()?this.enable():!t&&this.isEnabled()&&this.disable()}});return a}),define("comp/forms/field",["comp/forms/field/main"],function(t){return t}),define("comp/forms/selectionList/abstractView",["backbone","underscore","comp/forms/field"],function(t,e,i){return i.extend({initialize:function(n){if(e.defaults(n,{data:new t.Collection,placeholder:"",valueField:"id",labelField:"label",searchField:n.labelField||"label",openOnFocus:!0,hideSearch:!1}),n.group){if(n.group=e.defaults(n.group,{valueField:"id",labelField:"label"}),!n.group.data)throw Error('The option "group.data" must be present for grouping');if(!n.group.field)throw Error('The option "group.field" must be present for grouping')}if(i.prototype.initialize.call(this,n),0===this.$el.closest("html").length)throw Error("The selectionlist's el must be part of a DOM, otherwise selectize width calculation will fail");n.data.on("add remove reset",e.bind(this.refresh,this))},render:function(){this.$el.html(this.preCompiledTemplate({id:this.id,inputName:this.options.inputName,tabIndex:this.options.tabIndex,placeholder:this.options.placeholder})),this.customRender(),i.prototype.render.apply(this,arguments)},customRender:function(){},collectionToArray:function(t){if(t.toArray)return e.map(t.toArray(),function(t){return t.attributes});throw Error('The option "data" must be a Backbone.Collection')},findById:function(t){var e={};return e[this.options.valueField]=t,this.options.data.findWhere(e)},findGroupById:function(t){if(this.options.group){var e={};return e[this.options.group.valueField]=t,this.options.group.data.findWhere(e)}},valueEquals:function(t,e){return t&&!e||e&&!t?!1:!t&!e?!0:t.get(this.options.valueField)===e.get(this.options.valueField)},refresh:function(){}})}),function(t,e){"function"==typeof define&&define.amd?define("sifter",e):"object"==typeof exports?module.exports=e():t.Sifter=e()}(this,function(){var t=function(t,e){this.items=t,this.settings=e||{diacritics:!0}};t.prototype.tokenize=function(t){if(t=i(((t||"")+"").toLowerCase()),!t||!t.length)return[];var e,s,r,a,l=[],c=t.split();for(e=0,s=c.length;s>e;e++){if(r=n(c[e]),this.settings.diacritics)for(a in o)o.hasOwnProperty(a)&&(r=r.replace(RegExp(a,"g"),o[a]));l.push({string:c[e],regex:RegExp("^"+t,"i")})}return l},t.prototype.iterator=function(t,e){var i;i=s(t)?Array.prototype.forEach||function(t){for(var e=0,i=this.length;i>e;e++)t(this[e],e,this)}:function(t){for(var e in this)this.hasOwnProperty(e)&&t(this[e],e,this)},i.apply(t,[e])},t.prototype.getScoreFunction=function(t,e){var i,n,s,o;i=this,t=i.prepareSearch(t,e),s=t.tokens,n=t.options.fields,o=s.length;var r=function(t,e){var i,n;return t?(t=(t||"")+"",n=t.search(e.regex),-1===n?0:(i=e.string.length/t.length,0===n&&(i+=.5),i)):0},a=function(){var t=n.length;return t?1===t?function(t,e){return r(e[n[0]],t)}:function(e,i){for(var s=0,o=0;t>s;s++)o+=r(i[n[s]],e);return o/t}:function(){return 0}}();return o?1===o?function(t){return a(s[0],t)}:function(t){for(var e=0,i=0;o>e;e++)i+=a(s[e],t);return i/o}:function(){return 0}},t.prototype.prepareSearch=function(t,i){return"object"==typeof t?t:{options:e({},i),query:((t||"")+"").toLowerCase(),tokens:this.tokenize(t),total:0,items:[]}},t.prototype.search=function(t,e){var i,n,o,r=this;return n=this.prepareSearch(t,e),e=n.options,t=n.query,s(e.fields)||(e.fields=[e.fields]),o=e.score||r.getScoreFunction(n),t.length?r.iterator(r.items,function(t,e){i=o(t),i>0&&n.items.push({score:i,id:e})}):(r.iterator(r.items,function(t,e){n.items.push({score:1,id:e})}),e.sort&&n.items.sort(function(){var t=e.sort,i="desc"===e.direction?-1:1;return function(e,n){return e=e&&((r.items[e.id][t]||"")+"").toLowerCase(),n=n&&((r.items[n.id][t]||"")+"").toLowerCase(),e>n?1*i:n>e?-1*i:0}}())),n.total=n.items.length,"number"==typeof e.limit&&(n.items=n.items.slice(0,e.limit)),n};var e=function(t){var e,i,n,s;for(e=1,i=arguments.length;i>e;e++)if(s=arguments[e])for(n in s)s.hasOwnProperty(n)&&(t[n]=s[n]);return t},i=function(t){return(t+"").replace(/^\s+|\s+$|/g,"")},n=function(t){return(t+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},s=Array.isArray||$&&$.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},o={a:"[aÀÁÂÃÄÅàáâãäå]",c:"[cÇç]",e:"[eÈÉÊËèéêë]",i:"[iÌÍÎÏìíîï]",n:"[nÑñ]",o:"[oÒÓÔÕÕÖØòóôõöø]",s:"[sŠš]",u:"[uÙÚÛÜùúûü]",y:"[yŸÿý]",z:"[zŽž]"};return t}),function(t,e){"function"==typeof define&&define.amd?define("microplugin",e):"object"==typeof exports?module.exports=e():t.MicroPlugin=e()}(this,function(){var t={};t.mixin=function(t){t.plugins={},t.prototype.initializePlugins=function(t){var i,n,s,o=this,r=[];if(o.plugins={names:[],settings:{},requested:{},loaded:{}},e.isArray(t))for(i=0,n=t.length;n>i;i++)"string"==typeof t[i]?r.push(t[i]):(o.plugins.settings[t[i].name]=t[i].options,r.push(t[i].name));else if(t)for(s in t)t.hasOwnProperty(s)&&(o.plugins.settings[s]=t[s],r.push(s));for(;r.length;)o.require(r.shift())},t.prototype.loadPlugin=function(e){var i=this,n=i.plugins,s=t.plugins[e];if(!t.plugins.hasOwnProperty(e))throw Error('Unable to find "'+e+'" plugin');n.requested[e]=!0,n.loaded[e]=s.fn.apply(i,[i.plugins.settings[e]||{}]),n.names.push(e)},t.prototype.require=function(t){var e=this,i=e.plugins;if(!e.plugins.loaded.hasOwnProperty(t)){if(i.requested[t])throw Error('Plugin has circular dependency ("'+t+'")');e.loadPlugin(t)}return i.loaded[t]},t.define=function(e,i){t.plugins[e]={name:e,fn:i}}};var e={isArray:Array.isArray||function(){return"[object Array]"===Object.prototype.toString.call(vArg)}};return t}),function(t,e){"function"==typeof define&&define.amd?define("selectize",["jquery","sifter","microplugin"],e):"object"==typeof exports?module.exports=e(require("jquery"),require("sifter"),require("microplugin")):t.Selectize=e(t.jQuery,t.Sifter,t.MicroPlugin)}(this,function(t,e,i){var n=function(t,e){if("string"!=typeof e||e.length){var i="string"==typeof e?RegExp(e,"i"):e,n=function(t){var e=0;if(3===t.nodeType){var s=t.data.search(i);if(s>=0&&t.data.length>0){var o=t.data.match(i),r=document.createElement("span");r.className="highlight";var a=t.splitText(s),l=(a.splitText(o[0].length),a.cloneNode(!0));r.appendChild(l),a.parentNode.replaceChild(r,a),e=1}}else if(1===t.nodeType&&t.childNodes&&!/(script|style)/i.test(t.tagName))for(var c=0;c<t.childNodes.length;++c)c+=n(t.childNodes[c]);return e};return t.each(function(){n(this)})}},s=function(){};s.prototype={on:function(t,e){this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(e)},off:function(t,e){var i=arguments.length;return 0===i?delete this._events:1===i?delete this._events[t]:(this._events=this._events||{},void(t in this._events!=0&&this._events[t].splice(this._events[t].indexOf(e),1)))},trigger:function(t){if(this._events=this._events||{},t in this._events!=0)for(var e=0;e<this._events[t].length;e++)this._events[t][e].apply(this,Array.prototype.slice.call(arguments,1))}},s.mixin=function(t){for(var e=["on","off","trigger"],i=0;i<e.length;i++)t.prototype[e[i]]=s.prototype[e[i]]};var o=/Mac/.test(navigator.userAgent),r=65,a=13,l=27,c=37,h=38,d=80,p=39,u=40,f=78,m=8,g=46,v=16,y=o?91:17,b=o?18:17,w=9,T=1,S=2,x=0,C=function(t){return void 0!==t},k=function(t){return void 0===t||null===t?"":"boolean"==typeof t?t?"1":"0":t+""},$=function(t){return(t+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},E=function(t){return(t+"").replace(/\$/g,"$$$$")},A={};A.before=function(t,e,i){var n=t[e];t[e]=function(){return i.apply(t,arguments),n.apply(t,arguments)}},A.after=function(t,e,i){var n=t[e];t[e]=function(){var e=n.apply(t,arguments);return i.apply(t,arguments),e}};var I=function(e,i){if(!t.isArray(i))return i;var n,s,o={};for(n=0,s=i.length;s>n;n++)i[n].hasOwnProperty(e)&&(o[i[n][e]]=i[n]);return o},F=function(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}},O=function(t,e){var i;return function(){var n=this,s=arguments;window.clearTimeout(i),i=window.setTimeout(function(){t.apply(n,s)},e)}},P=function(t,e,i){var n,s=t.trigger,o={};t.trigger=function(){var i=arguments[0];return-1===e.indexOf(i)?s.apply(t,arguments):void(o[i]=arguments)},i.apply(t,[]),t.trigger=s;for(n in o)o.hasOwnProperty(n)&&s.apply(t,o[n])},D=function(t,e,i,n){t.on(e,i,function(e){for(var i=e.target;i&&i.parentNode!==t[0];)i=i.parentNode;return e.currentTarget=i,n.apply(this,[e])})},M=function(t){var e={};if("selectionStart"in t)e.start=t.selectionStart,e.length=t.selectionEnd-e.start;else if(document.selection){t.focus();var i=document.selection.createRange(),n=document.selection.createRange().text.length;i.moveStart("character",-t.value.length),e.start=i.text.length-n,e.length=n}return e},H=function(t,e,i){var n,s,o={};if(i)for(n=0,s=i.length;s>n;n++)o[i[n]]=t.css(i[n]);else o=t.css();e.css(o)},_=function(e,i){if(!e)return 0;var n=t("<test>").css({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).text(e).appendTo("body");H(i,n,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]);var s=n.width();return n.remove(),s},z=function(t){var e=null,i=function(i,n){var s,o,r,a,l,c,h,d;i=i||window.event||{},n=n||{},i.metaKey||i.altKey||(n.force||t.data("grow")!==!1)&&(s=t.val(),i.type&&"keydown"===i.type.toLowerCase()&&(o=i.keyCode,r=o>=97&&122>=o||o>=65&&90>=o||o>=48&&57>=o||32===o,o===g||o===m?(d=M(t[0]),d.length?s=s.substring(0,d.start)+s.substring(d.start+d.length):o===m&&d.start?s=s.substring(0,d.start-1)+s.substring(d.start+1):o===g&&void 0!==d.start&&(s=s.substring(0,d.start)+s.substring(d.start+1))):r&&(c=i.shiftKey,h=String.fromCharCode(i.keyCode),h=c?h.toUpperCase():h.toLowerCase(),s+=h)),a=t.attr("placeholder"),!s&&a&&(s=a),l=_(s,t)+4,l!==e&&(e=l,t.width(l),t.triggerHandler("resize")))};t.on("keydown keyup update blur",i),i()},L=function(i,n){var s,o,r=this;o=i[0],o.selectize=r,s=window.getComputedStyle?window.getComputedStyle(o,null).getPropertyValue("direction"):o.currentStyle&&o.currentStyle.direction,s=s||i.parents("[dir]:first").attr("dir")||"",t.extend(r,{settings:n,$input:i,tagType:"select"===o.tagName.toLowerCase()?T:S,rtl:/rtl/i.test(s),eventNS:".selectize"+ ++L.count,highlightedValue:null,isOpen:!1,isDisabled:!1,isRequired:i.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===n.loadThrottle?r.onSearchChange:O(r.onSearchChange,n.loadThrottle)}),r.sifter=new e(this.options,{diacritics:n.diacritics}),t.extend(r.options,I(n.valueField,n.options)),delete r.settings.options,t.extend(r.optgroups,I(n.optgroupValueField,n.optgroups)),delete r.settings.optgroups,r.settings.mode=r.settings.mode||(1===r.settings.maxItems?"single":"multi"),"boolean"!=typeof r.settings.hideSelected&&(r.settings.hideSelected="multi"===r.settings.mode),r.settings.create&&(r.canCreate=function(t){var e=r.settings.createFilter;return!(!t.length||"function"==typeof e&&!e.apply(r,[t])||"string"==typeof e&&!RegExp(e).test(t)||e instanceof RegExp&&!e.test(t))}),r.initializePlugins(r.settings.plugins),r.setupCallbacks(),r.setupTemplates(),r.setup()};return s.mixin(L),i.mixin(L),t.extend(L.prototype,{setup:function(){var e,i,n,s,r,a,l,c,h,d,p=this,u=p.settings,f=p.eventNS,m=t(window),g=t(document),w=p.$input;l=p.settings.mode,c=w.attr("tabindex")||"",h=w.attr("class")||"",e=t("<div>").addClass(u.wrapperClass).addClass(h).addClass(l),i=t("<div>").addClass(u.inputClass).addClass("items").appendTo(e),n=t('<input type="text" autocomplete="off" />').appendTo(i).attr("tabindex",c),a=t(u.dropdownParent||e),s=t("<div>").addClass(u.dropdownClass).addClass(h).addClass(l).hide().appendTo(a),r=t("<div>").addClass(u.dropdownContentClass).appendTo(s),e.css({width:w[0].style.width}),p.plugins.names.length&&(d="plugin-"+p.plugins.names.join(" plugin-"),e.addClass(d),s.addClass(d)),(null===u.maxItems||u.maxItems>1)&&p.tagType===T&&w.attr("multiple","multiple"),p.settings.placeholder&&n.attr("placeholder",u.placeholder),w.attr("autocorrect")&&n.attr("autocorrect",w.attr("autocorrect")),w.attr("autocapitalize")&&n.attr("autocapitalize",w.attr("autocapitalize")),p.$wrapper=e,p.$control=i,p.$control_input=n,p.$dropdown=s,p.$dropdown_content=r,s.on("mouseenter","[data-selectable]",function(){return p.onOptionHover.apply(p,arguments)}),s.on("mousedown","[data-selectable]",function(){return p.onOptionSelect.apply(p,arguments)}),D(i,"mousedown","*:not(input)",function(){return p.onItemSelect.apply(p,arguments)}),z(n),i.on({mousedown:function(){return p.onMouseDown.apply(p,arguments)},click:function(){return p.onClick.apply(p,arguments)}}),n.on({mousedown:function(t){t.stopPropagation()},keydown:function(){return p.onKeyDown.apply(p,arguments)},keyup:function(){return p.onKeyUp.apply(p,arguments)},keypress:function(){return p.onKeyPress.apply(p,arguments)},resize:function(){p.positionDropdown.apply(p,[])},blur:function(){return p.onBlur.apply(p,arguments)},focus:function(){return p.ignoreBlur=!1,p.onFocus.apply(p,arguments)},paste:function(){return p.onPaste.apply(p,arguments)}}),g.on("keydown"+f,function(t){p.isCmdDown=t[o?"metaKey":"ctrlKey"],p.isCtrlDown=t[o?"altKey":"ctrlKey"],p.isShiftDown=t.shiftKey}),g.on("keyup"+f,function(t){t.keyCode===b&&(p.isCtrlDown=!1),t.keyCode===v&&(p.isShiftDown=!1),t.keyCode===y&&(p.isCmdDown=!1)}),g.on("mousedown"+f,function(t){if(p.isFocused){if(t.target===p.$dropdown[0]||t.target.parentNode===p.$dropdown[0])return x=1,!1;p.$control.has(t.target).length||t.target===p.$control[0]||(x=0,p.blur())}}),m.on(["scroll"+f,"resize"+f].join(" "),function(){p.isOpen&&p.positionDropdown.apply(p,arguments)}),m.on("mousemove"+f,function(){p.ignoreHover=!1}),this.revertSettings={$children:w.children().detach(),tabindex:w.attr("tabindex")},w.attr("tabindex",-1).hide().after(p.$wrapper),t.isArray(u.items)&&(p.setValue(u.items),delete u.items),w[0].validity&&w.on("invalid"+f,function(t){t.preventDefault(),p.isInvalid=!0,p.refreshState()}),p.updateOriginalInput(),p.refreshItems(),p.refreshState(),p.updatePlaceholder(),p.isSetup=!0,w.is(":disabled")&&p.disable(),p.on("change",this.onChange),w.data("selectize",p),w.addClass("selectized"),p.trigger("initialize"),u.preload===!0&&p.onSearchChange("")},setupTemplates:function(){var e=this,i=e.settings.labelField,n=e.settings.optgroupLabelField,s={optgroup:function(t){return'<div class="optgroup">'+t.html+"</div>"},optgroup_header:function(t,e){return'<div class="optgroup-header">'+e(t[n])+"</div>"},option:function(t,e){return'<div class="option">'+e(t[i])+"</div>"},item:function(t,e){return'<div class="item">'+e(t[i])+"</div>"},option_create:function(t,e){return'<div class="create">Add <strong>'+e(t.input)+"</strong>…</div>"}};e.settings.render=t.extend({},s,e.settings.render)},setupCallbacks:function(){var t,e,i={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType"};for(t in i)i.hasOwnProperty(t)&&(e=this.settings[i[t]],e&&this.on(t,e))},onClick:function(t){var e=this;e.isFocused||(e.focus(),t.preventDefault())},onMouseDown:function(e){var i=this,n=e.isDefaultPrevented();if(t(e.target),i.isFocused){if(e.target!==i.$control_input[0])return"single"===i.settings.mode?i.isOpen?i.close():i.open():n||i.setActiveItem(null),!1}else n||window.setTimeout(function(){i.focus()},0)},onChange:function(){this.$input.trigger("change")},onPaste:function(t){var e=this;(e.isFull()||e.isInputHidden||e.isLocked)&&t.preventDefault()},onKeyPress:function(t){if(this.isLocked)return t&&t.preventDefault();var e=String.fromCharCode(t.keyCode||t.which);return this.settings.create&&e===this.settings.delimiter?(this.createItem(),t.preventDefault(),!1):void 0},onKeyDown:function(t){var e=(t.target===this.$control_input[0],this);if(e.isLocked)return void(t.keyCode!==w&&t.preventDefault());switch(t.keyCode){case r:if(e.isCmdDown)return void e.selectAll();break;case l:return void e.close();case f:if(!t.ctrlKey||t.altKey)break;case u:if(!e.isOpen&&e.hasOptions)e.open();else if(e.$activeOption){e.ignoreHover=!0;var i=e.getAdjacentOption(e.$activeOption,1);i.length&&e.setActiveOption(i,!0,!0)}return void t.preventDefault();case d:if(!t.ctrlKey||t.altKey)break;case h:if(e.$activeOption){e.ignoreHover=!0;var n=e.getAdjacentOption(e.$activeOption,-1);n.length&&e.setActiveOption(n,!0,!0)}return void t.preventDefault();case a:return e.isOpen&&e.$activeOption&&e.onOptionSelect({currentTarget:e.$activeOption}),void t.preventDefault();case c:return void e.advanceSelection(-1,t);case p:return void e.advanceSelection(1,t);case w:return e.settings.selectOnTab&&e.isOpen&&e.$activeOption&&(e.onOptionSelect({currentTarget:e.$activeOption}),t.preventDefault()),void(e.settings.create&&e.createItem()&&t.preventDefault());case m:case g:return void e.deleteSelection(t)}return!e.isFull()&&!e.isInputHidden||(o?t.metaKey:t.ctrlKey)?void 0:void t.preventDefault()},onKeyUp:function(t){var e=this;if(e.isLocked)return t&&t.preventDefault();var i=e.$control_input.val()||"";e.lastValue!==i&&(e.lastValue=i,e.onSearchChange(i),e.refreshOptions(),e.trigger("type",i))},onSearchChange:function(t){var e=this,i=e.settings.load;i&&(e.loadedSearches.hasOwnProperty(t)||(e.loadedSearches[t]=!0,e.load(function(n){i.apply(e,[t,n])})))},onFocus:function(t){var e=this;return e.isFocused=!0,e.isDisabled?(e.blur(),t&&t.preventDefault(),!1):void(e.ignoreFocus||("focus"===e.settings.preload&&e.onSearchChange(""),e.$activeItems.length||(e.showInput(),e.setActiveItem(null),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState())) },onBlur:function(t){if(1!=x){var e=this;if(e.isFocused=!1,!e.ignoreFocus){if(!e.ignoreBlur&&document.activeElement===e.$dropdown_content[0])return e.ignoreBlur=!0,void e.onFocus(t);e.settings.create&&e.settings.createOnBlur&&e.createItem(!1),e.close(),e.setTextboxValue(""),e.setActiveItem(null),e.setActiveOption(null),e.setCaret(e.items.length),e.refreshState()}}},onOptionHover:function(t){this.ignoreHover||this.setActiveOption(t.currentTarget,!1)},onOptionSelect:function(e){var i,n,s=this;e.preventDefault&&(e.preventDefault(),e.stopPropagation()),n=t(e.currentTarget),n.hasClass("create")?s.createItem():(i=n.attr("data-value"),i&&(s.lastQuery=null,s.setTextboxValue(""),s.addItem(i),!s.settings.hideSelected&&e.type&&/mouse/.test(e.type)&&s.setActiveOption(s.getOption(i))))},onItemSelect:function(t){var e=this;e.isLocked||"multi"===e.settings.mode&&(t.preventDefault(),e.setActiveItem(t.currentTarget,t))},load:function(t){var e=this,i=e.$wrapper.addClass("loading");e.loading++,t.apply(e,[function(t){e.loading=Math.max(e.loading-1,0),t&&t.length&&(e.addOption(t),e.refreshOptions(e.isFocused&&!e.isInputHidden)),e.loading||i.removeClass("loading"),e.trigger("load",t)}])},setTextboxValue:function(t){var e=this.$control_input,i=e.val()!==t;i&&(e.val(t).triggerHandler("update"),this.lastValue=t)},getValue:function(){return this.tagType===T&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(t){P(this,["change"],function(){this.clear(),this.addItems(t)})},setActiveItem:function(e,i){var n,s,o,r,a,l,c,h,d=this;if("single"!==d.settings.mode){if(e=t(e),!e.length)return t(d.$activeItems).removeClass("active"),d.$activeItems=[],void(d.isFocused&&d.showInput());if(n=i&&i.type.toLowerCase(),"mousedown"===n&&d.isShiftDown&&d.$activeItems.length){for(h=d.$control.children(".active:last"),r=Array.prototype.indexOf.apply(d.$control[0].childNodes,[h[0]]),a=Array.prototype.indexOf.apply(d.$control[0].childNodes,[e[0]]),r>a&&(c=r,r=a,a=c),s=r;a>=s;s++)l=d.$control[0].childNodes[s],-1===d.$activeItems.indexOf(l)&&(t(l).addClass("active"),d.$activeItems.push(l));i.preventDefault()}else"mousedown"===n&&d.isCtrlDown||"keydown"===n&&this.isShiftDown?e.hasClass("active")?(o=d.$activeItems.indexOf(e[0]),d.$activeItems.splice(o,1),e.removeClass("active")):d.$activeItems.push(e.addClass("active")[0]):(t(d.$activeItems).removeClass("active"),d.$activeItems=[e.addClass("active")[0]]);d.hideInput(),this.isFocused||d.focus()}},setActiveOption:function(e,i,n){var s,o,r,a,l,c=this;c.$activeOption&&c.$activeOption.removeClass("active"),c.$activeOption=null,e=t(e),e.length&&(c.$activeOption=e.addClass("active"),(i||!C(i))&&(s=c.$dropdown_content.height(),o=c.$activeOption.outerHeight(!0),i=c.$dropdown_content.scrollTop()||0,r=c.$activeOption.offset().top-c.$dropdown_content.offset().top+i,a=r,l=r-s+o,r+o>s+i?c.$dropdown_content.stop().animate({scrollTop:l},n?c.settings.scrollDuration:0):i>r&&c.$dropdown_content.stop().animate({scrollTop:a},n?c.settings.scrollDuration:0)))},selectAll:function(){var t=this;"single"!==t.settings.mode&&(t.$activeItems=Array.prototype.slice.apply(t.$control.children(":not(input)").addClass("active")),t.$activeItems.length&&(t.hideInput(),t.close()),t.focus())},hideInput:function(){var t=this;t.setTextboxValue(""),t.$control_input.css({opacity:0,position:"absolute",left:t.rtl?1e4:-1e4}),t.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1,position:"relative",left:0}),this.isInputHidden=!1},focus:function(){var t=this;t.isDisabled||(t.ignoreFocus=!0,t.$control_input[0].focus(),window.setTimeout(function(){t.ignoreFocus=!1,t.onFocus()},0))},blur:function(){this.$control_input.trigger("blur")},getScoreFunction:function(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())},getSearchOptions:function(){var t=this.settings,e=t.sortField;return"string"==typeof e&&(e={field:e}),{fields:t.searchField,conjunction:t.searchConjunction,sort:e}},search:function(e){var i,n,s,o=this,r=o.settings,a=this.getSearchOptions();if(r.score&&(s=o.settings.score.apply(this,[e]),"function"!=typeof s))throw Error('Selectize "score" setting must be a function that returns a function');if(e!==o.lastQuery?(o.lastQuery=e,n=o.sifter.search(e,t.extend(a,{score:s})),o.currentResults=n):n=t.extend(!0,{},o.currentResults),r.hideSelected)for(i=n.items.length-1;i>=0;i--)-1!==o.items.indexOf(k(n.items[i].id))&&n.items.splice(i,1);return n},refreshOptions:function(e){var i,s,o,r,a,l,c,h,d,p,u,f,m,g,v,y;void 0===e&&(e=!0);var b=this,w=b.$control_input.val(),T=b.search(w),S=b.$dropdown_content,x=b.$activeOption&&k(b.$activeOption.attr("data-value"));if(r=T.items.length,"number"==typeof b.settings.maxOptions&&(r=Math.min(r,b.settings.maxOptions)),a={},b.settings.optgroupOrder)for(l=b.settings.optgroupOrder,i=0;i<l.length;i++)a[l[i]]=[];else l=[];for(i=0;r>i;i++)for(c=b.options[T.items[i].id],h=b.render("option",c),d=c[b.settings.optgroupField]||"",p=t.isArray(d)?d:[d],s=0,o=p&&p.length;o>s;s++)d=p[s],b.optgroups.hasOwnProperty(d)||(d=""),a.hasOwnProperty(d)||(a[d]=[],l.push(d)),a[d].push(h);for(u=[],i=0,r=l.length;r>i;i++)d=l[i],b.optgroups.hasOwnProperty(d)&&a[d].length?(f=b.render("optgroup_header",b.optgroups[d])||"",f+=a[d].join(""),u.push(b.render("optgroup",t.extend({},b.optgroups[d],{html:f})))):u.push(a[d].join(""));if(S.html(u.join("")),b.settings.highlight&&T.query.length&&T.tokens.length)for(i=0,r=T.tokens.length;r>i;i++)n(S,T.tokens[i].regex);if(!b.settings.hideSelected)for(i=0,r=b.items.length;r>i;i++)b.getOption(b.items[i]).addClass("selected");m=b.settings.create&&b.canCreate(T.query),m&&(S.prepend(b.render("option_create",{input:w})),y=t(S[0].childNodes[0])),b.hasOptions=T.items.length>0||m,b.hasOptions?(T.items.length>0?(v=x&&b.getOption(x),v&&v.length?g=v:"single"===b.settings.mode&&b.items.length&&(g=b.getOption(b.items[0])),g&&g.length||(g=y&&!b.settings.addPrecedence?b.getAdjacentOption(y,1):S.find("[data-selectable]:first"))):g=y,b.setActiveOption(g),e&&!b.isOpen&&b.open()):(b.setActiveOption(null),e&&b.isOpen&&b.close())},addOption:function(e){var i,n,s,o=this;if(t.isArray(e))for(i=0,n=e.length;n>i;i++)o.addOption(e[i]);else s=k(e[o.settings.valueField]),s&&!o.options.hasOwnProperty(s)&&(o.userOptions[s]=!0,o.options[s]=e,o.lastQuery=null,o.trigger("option_add",s,e))},addOptionGroup:function(t,e){this.optgroups[t]=e,this.trigger("optgroup_add",t,e)},updateOption:function(e,i){var n,s,o,r,a,l,c=this;if(e=k(e),o=k(i[c.settings.valueField]),c.options.hasOwnProperty(e)){if(!o)throw Error("Value must be set in option data");o!==e&&(delete c.options[e],r=c.items.indexOf(e),-1!==r&&c.items.splice(r,1,o)),c.options[o]=i,a=c.renderCache.item,l=c.renderCache.option,a&&(delete a[e],delete a[o]),l&&(delete l[e],delete l[o]),-1!==c.items.indexOf(o)&&(n=c.getItem(e),s=t(c.render("item",i)),n.hasClass("active")&&s.addClass("active"),n.replaceWith(s)),c.isOpen&&c.refreshOptions(!1)}},removeOption:function(t){var e=this;t=k(t);var i=e.renderCache.item,n=e.renderCache.option;i&&delete i[t],n&&delete n[t],delete e.userOptions[t],delete e.options[t],e.lastQuery=null,e.trigger("option_remove",t),e.removeItem(t)},clearOptions:function(){var t=this;t.loadedSearches={},t.userOptions={},t.renderCache={},t.options=t.sifter.items={},t.lastQuery=null,t.trigger("option_clear"),t.clear()},getOption:function(t){return this.getElementWithValue(t,this.$dropdown_content.find("[data-selectable]"))},getAdjacentOption:function(e,i){var n=this.$dropdown.find("[data-selectable]"),s=n.index(e)+i;return s>=0&&s<n.length?n.eq(s):t()},getElementWithValue:function(e,i){if(e=k(e))for(var n=0,s=i.length;s>n;n++)if(i[n].getAttribute("data-value")===e)return t(i[n]);return t()},getItem:function(t){return this.getElementWithValue(t,this.$control.children())},addItems:function(e){for(var i=t.isArray(e)?e:[e],n=0,s=i.length;s>n;n++)this.isPending=s-1>n,this.addItem(i[n])},addItem:function(e){P(this,["change"],function(){var i,n,s,o,r,a=this,l=a.settings.mode;return e=k(e),-1!==a.items.indexOf(e)?void("single"===l&&a.close()):void(a.options.hasOwnProperty(e)&&("single"===l&&a.clear(),"multi"===l&&a.isFull()||(i=t(a.render("item",a.options[e])),r=a.isFull(),a.items.splice(a.caretPos,0,e),a.insertAtCaret(i),(!a.isPending||!r&&a.isFull())&&a.refreshState(),a.isSetup&&(s=a.$dropdown_content.find("[data-selectable]"),a.isPending||(n=a.getOption(e),o=a.getAdjacentOption(n,1).attr("data-value"),a.refreshOptions(a.isFocused&&"single"!==l),o&&a.setActiveOption(a.getOption(o))),!s.length||a.isFull()?a.close():a.positionDropdown(),a.updatePlaceholder(),a.trigger("item_add",e,i),a.updateOriginalInput()))))})},removeItem:function(t){var e,i,n,s=this;e="object"==typeof t?t:s.getItem(t),t=k(e.attr("data-value")),i=s.items.indexOf(t),-1!==i&&(e.remove(),e.hasClass("active")&&(n=s.$activeItems.indexOf(e[0]),s.$activeItems.splice(n,1)),s.items.splice(i,1),s.lastQuery=null,!s.settings.persist&&s.userOptions.hasOwnProperty(t)&&s.removeOption(t),i<s.caretPos&&s.setCaret(s.caretPos-1),s.refreshState(),s.updatePlaceholder(),s.updateOriginalInput(),s.positionDropdown(),s.trigger("item_remove",t))},createItem:function(e){var i=this,n=t.trim(i.$control_input.val()||""),s=i.caretPos;if(!i.canCreate(n))return!1;i.lock(),void 0===e&&(e=!0);var o="function"==typeof i.settings.create?this.settings.create:function(t){var e={};return e[i.settings.labelField]=t,e[i.settings.valueField]=t,e},r=F(function(t){if(i.unlock(),t&&"object"==typeof t){var n=k(t[i.settings.valueField]);n&&(i.setTextboxValue(""),i.addOption(t),i.setCaret(s),i.addItem(n),i.refreshOptions(e&&"single"!==i.settings.mode))}}),a=o.apply(this,[n,r]);return void 0!==a&&r(a),!0},refreshItems:function(){if(this.lastQuery=null,this.isSetup)for(var t=0;t<this.items.length;t++)this.addItem(this.items);this.refreshState(),this.updateOriginalInput()},refreshState:function(){var t,e=this;e.isRequired&&(e.items.length&&(e.isInvalid=!1),e.$control_input.prop("required",t)),e.refreshClasses()},refreshClasses:function(){var e=this,i=e.isFull(),n=e.isLocked;e.$wrapper.toggleClass("rtl",e.rtl),e.$control.toggleClass("focus",e.isFocused).toggleClass("disabled",e.isDisabled).toggleClass("required",e.isRequired).toggleClass("invalid",e.isInvalid).toggleClass("locked",n).toggleClass("full",i).toggleClass("not-full",!i).toggleClass("input-active",e.isFocused&&!e.isInputHidden).toggleClass("dropdown-active",e.isOpen).toggleClass("has-options",!t.isEmptyObject(e.options)).toggleClass("has-items",e.items.length>0),e.$control_input.data("grow",!i&&!n)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(){var t,e,i,n=this;if(n.tagType===T){for(i=[],t=0,e=n.items.length;e>t;t++)i.push('<option value="'+$(n.items[t])+'" selected="selected"></option>');i.length||this.$input.attr("multiple")||i.push('<option value="" selected="selected"></option>'),n.$input.html(i.join(""))}else n.$input.val(n.getValue()),n.$input.attr("value",n.$input.val());n.isSetup&&n.trigger("change",n.$input.val())},updatePlaceholder:function(){if(this.settings.placeholder){var t=this.$control_input;this.items.length?t.removeAttr("placeholder"):t.attr("placeholder",this.settings.placeholder),t.triggerHandler("update",{force:!0})}},open:function(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.focus(),t.isOpen=!0,t.refreshState(),t.$dropdown.css({visibility:"hidden",display:"block"}),t.positionDropdown(),t.$dropdown.css({visibility:"visible"}),t.trigger("dropdown_open",t.$dropdown))},close:function(){var t=this,e=t.isOpen;"single"===t.settings.mode&&t.items.length&&t.hideInput(),t.isOpen=!1,t.$dropdown.hide(),t.setActiveOption(null),t.refreshState(),e&&t.trigger("dropdown_close",t.$dropdown)},positionDropdown:function(){var t=this.$control,e="body"===this.settings.dropdownParent?t.offset():t.position();e.top+=t.outerHeight(!0),this.$dropdown.css({width:t.outerWidth(),top:e.top,left:e.left})},clear:function(){var t=this;t.items.length&&(t.$control.children(":not(input)").remove(),t.items=[],t.lastQuery=null,t.setCaret(0),t.setActiveItem(null),t.updatePlaceholder(),t.updateOriginalInput(),t.refreshState(),t.showInput(),t.trigger("clear"))},insertAtCaret:function(e){var i=Math.min(this.caretPos,this.items.length);0===i?this.$control.prepend(e):t(this.$control[0].childNodes[i]).before(e),this.setCaret(i+1)},deleteSelection:function(e){var i,n,s,o,r,a,l,c,h,d=this;if(!d.settings.disableDelete){if(s=e&&e.keyCode===m?-1:1,o=M(d.$control_input[0]),d.$activeOption&&!d.settings.hideSelected&&(l=d.getAdjacentOption(d.$activeOption,-1).attr("data-value")),r=[],d.$activeItems.length){for(h=d.$control.children(".active:"+(s>0?"last":"first")),a=d.$control.children(":not(input)").index(h),s>0&&a++,i=0,n=d.$activeItems.length;n>i;i++)r.push(t(d.$activeItems[i]).attr("data-value"));e&&(e.preventDefault(),e.stopPropagation())}else(d.isFocused||"single"===d.settings.mode)&&d.items.length&&(0>s&&0===o.start&&0===o.length?r.push(d.items[d.caretPos-1]):s>0&&o.start===d.$control_input.val().length&&r.push(d.items[d.caretPos]));if(!r.length||"function"==typeof d.settings.onDelete&&d.settings.onDelete.apply(d,[r])===!1)return!1;for(void 0!==a&&d.setCaret(a);r.length;)d.removeItem(r.pop());return d.showInput(),d.positionDropdown(),d.refreshOptions(!0),l&&(c=d.getOption(l),c.length&&d.setActiveOption(c)),!0}},advanceSelection:function(t,e){var i,n,s,o,r,a,l=this;0!==t&&(l.rtl&&(t*=-1),i=t>0?"last":"first",n=M(l.$control_input[0]),l.isFocused&&!l.isInputHidden?(o=l.$control_input.val().length,r=0>t?0===n.start&&0===n.length:n.start===o,r&&!o&&l.advanceCaret(t,e)):(a=l.$control.children(".active:"+i),a.length&&(s=l.$control.children(":not(input)").index(a),l.setActiveItem(null),l.setCaret(t>0?s+1:s))))},advanceCaret:function(t,e){var i,n,s=this;0!==t&&(i=t>0?"next":"prev",s.isShiftDown?(n=s.$control_input[i](),n.length&&(s.hideInput(),s.setActiveItem(n),e&&e.preventDefault())):s.setCaret(s.caretPos+t))},setCaret:function(e){var i=this;if(e="single"===i.settings.mode?i.items.length:Math.max(0,Math.min(i.items.length,e)),!i.isPending){var n,s,o,r;for(o=i.$control.children(":not(input)"),n=0,s=o.length;s>n;n++)r=t(o[n]).detach(),e>n?i.$control_input.before(r):i.$control.append(r)}i.caretPos=e},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){var t=this;t.$input.prop("disabled",!0),t.isDisabled=!0,t.lock()},enable:function(){var t=this;t.$input.prop("disabled",!1),t.isDisabled=!1,t.unlock()},destroy:function(){var e=this,i=e.eventNS,n=e.revertSettings;e.trigger("destroy"),e.off(),e.$wrapper.remove(),e.$dropdown.remove(),e.$input.html("").append(n.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:n.tabindex}).show(),e.$control_input.removeData("grow"),e.$input.removeData("selectize"),t(window).off(i),t(document).off(i),t(document.body).off(i),delete e.$input[0].selectize},render:function(t,e){var i,n,s="",o=!1,r=this,a=/^[\t ]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;return("option"===t||"item"===t)&&(i=k(e[r.settings.valueField]),o=!!i),o&&(C(r.renderCache[t])||(r.renderCache[t]={}),r.renderCache[t].hasOwnProperty(i))?r.renderCache[t][i]:(s=r.settings.render[t].apply(this,[e,$]),("option"===t||"option_create"===t)&&(s=s.replace(a,"<$1 data-selectable")),"optgroup"===t&&(n=e[r.settings.optgroupValueField]||"",s=s.replace(a,'<$1 data-group="'+E($(n))+'"')),("option"===t||"item"===t)&&(s=s.replace(a,'<$1 data-value="'+E($(i||""))+'"')),o&&(r.renderCache[t][i]=s),s)},clearCache:function(t){var e=this;void 0===t?e.renderCache={}:delete e.renderCache[t]}}),L.count=0,L.defaults={plugins:[],delimiter:",",persist:!0,diacritics:!0,create:!1,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!1,preload:!1,scrollDuration:60,loadThrottle:300,dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",optgroupLabelField:"label",optgroupValueField:"value",optgroupOrder:null,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"selectize-control",inputClass:"selectize-input",dropdownClass:"selectize-dropdown",dropdownContentClass:"selectize-dropdown-content",dropdownParent:null,disableDelete:!0,render:{}},t.fn.selectize=function(e){var i=t.fn.selectize.defaults,n=t.extend({},i,e),s=n.dataAttr,o=n.labelField,r=n.valueField,a=n.optgroupField,l=n.optgroupLabelField,c=n.optgroupValueField,h=function(e,i){var s,a,l,c,h=t.trim(e.val()||"");if(h.length){for(l=h.split(n.delimiter),s=0,a=l.length;a>s;s++)c={},c[o]=l[s],c[r]=l[s],i.options[l[s]]=c;i.items=l}},d=function(e,i){var n,h,d,p,u=0,f=i.options,m=function(t){var e=s&&t.attr(s);return"string"==typeof e&&e.length?JSON.parse(e):null},g=function(e,n){var s,l;if(e=t(e),s=e.attr("value")||"",s.length){if(f.hasOwnProperty(s))return void(n&&(f[s].optgroup?t.isArray(f[s].optgroup)?f[s].optgroup.push(n):f[s].optgroup=[f[s].optgroup,n]:f[s].optgroup=n));l=m(e)||{},l[o]=l[o]||e.text(),l[r]=l[r]||s,l[a]=l[a]||n,l.$order=++u,f[s]=l,e.is(":selected")&&i.items.push(s)}},v=function(e){var n,s,o,r,a;for(e=t(e),o=e.attr("label"),o&&(r=m(e)||{},r[l]=o,r[c]=o,i.optgroups[o]=r),a=t("option",e),n=0,s=a.length;s>n;n++)g(a[n],o)};for(i.maxItems=e.attr("multiple")?null:1,p=e.children(),n=0,h=p.length;h>n;n++)d=p[n].tagName.toLowerCase(),"optgroup"===d?v(p[n]):"option"===d&&g(p[n])};return this.each(function(){if(!this.selectize){var n,s=t(this),o=this.tagName.toLowerCase(),r={placeholder:s.children('option[value=""]').text()||s.attr("placeholder"),options:{},optgroups:{},items:[]};"select"===o?d(s,r):h(s,r),n=new L(s,t.extend(!0,{},i,r,e))}})},t.fn.selectize.defaults=L.defaults,L.define("drag_drop",function(){if(!t.fn.sortable)throw Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===this.settings.mode){var e=this;e.lock=function(){var t=e.lock;return function(){var i=e.$control.data("sortable");return i&&i.disable(),t.apply(e,arguments)}}(),e.unlock=function(){var t=e.unlock;return function(){var i=e.$control.data("sortable");return i&&i.enable(),t.apply(e,arguments)}}(),e.setup=function(){var i=e.setup;return function(){i.apply(this,arguments);var n=e.$control.sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:e.isLocked,start:function(t,e){e.placeholder.css("width",e.helper.css("width")),n.css({overflow:"visible"})},stop:function(){n.css({overflow:"hidden"});var i=e.$activeItems?e.$activeItems.slice():null,s=[];n.children("[data-value]").each(function(){s.push(t(this).attr("data-value"))}),e.setValue(s),e.setActiveItem(i)}})}}()}}),L.define("dropdown_header",function(e){var i=this;e=t.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(t){return'<div class="'+t.headerClass+'"><div class="'+t.titleRowClass+'"><span class="'+t.labelClass+'">'+t.title+'</span><a href="javascript:void(0)" class="'+t.closeClass+'">×</a></div></div>'}},e),i.setup=function(){var n=i.setup;return function(){n.apply(i,arguments),i.$dropdown_header=t(e.html(e)),i.$dropdown.prepend(i.$dropdown_header)}}()}),L.define("optgroup_columns",function(e){var i=this;e=t.extend({equalizeWidth:!0,equalizeHeight:!0},e),this.getAdjacentOption=function(e,i){var n=e.closest("[data-group]").find("[data-selectable]"),s=n.index(e)+i;return s>=0&&s<n.length?n.eq(s):t()},this.onKeyDown=function(){var t=i.onKeyDown;return function(e){var n,s,o,r;return!this.isOpen||e.keyCode!==c&&e.keyCode!==p?t.apply(this,arguments):(i.ignoreHover=!0,r=this.$activeOption.closest("[data-group]"),n=r.find("[data-selectable]").index(this.$activeOption),r=e.keyCode===c?r.prev("[data-group]"):r.next("[data-group]"),o=r.find("[data-selectable]"),s=o.eq(Math.min(o.length-1,n)),void(s.length&&this.setActiveOption(s)))}}();var n=function(){var t,e=n.width,i=document;return void 0===e&&(t=i.createElement("div"),t.innerHTML='<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>',t=t.firstChild,i.body.appendChild(t),e=n.width=t.offsetWidth-t.clientWidth,i.body.removeChild(t)),e},s=function(){var s,o,r,a,l,c,h;if(h=t("[data-group]",i.$dropdown_content),o=h.length,o&&i.$dropdown_content.width()){if(e.equalizeHeight){for(r=0,s=0;o>s;s++)r=Math.max(r,h.eq(s).height());h.css({height:r})}e.equalizeWidth&&(c=i.$dropdown_content.innerWidth()-n(),a=Math.round(c/o),h.css({width:a}),o>1&&(l=c-a*(o-1),h.eq(o-1).css({width:l})))}};(e.equalizeHeight||e.equalizeWidth)&&(A.after(this,"positionDropdown",s),A.after(this,"refreshOptions",s))}),L.define("remove_button",function(e){if("single"!==this.settings.mode){e=t.extend({label:"×",title:"Remove",className:"remove",append:!0},e);var i=this,n='<a href="javascript:void(0)" class="'+e.className+'" tabindex="-1" title="'+$(e.title)+'">'+e.label+"</a>",s=function(t,e){var i=t.search(/(<\/[^>]+>\s*)$/);return t.substring(0,i)+e+t.substring(i)};this.setup=function(){var o=i.setup;return function(){if(e.append){var r=i.settings.render.item;i.settings.render.item=function(){return s(r.apply(this,arguments),n)}}o.apply(this,arguments),this.$control.on("click","."+e.className,function(e){if(e.preventDefault(),!i.isLocked){var n=t(e.currentTarget).parent();i.setActiveItem(n),i.deleteSelection()&&i.setCaret(i.items.length)}})}}()}}),L.define("restore_on_backspace",function(t){var e=this;t.text=t.text||function(t){return t[this.settings.labelField]},this.onKeyDown=function(){var i=e.onKeyDown;return function(e){var n,s;return e.keyCode!==m||""!==this.$control_input.val()||this.$activeItems.length||(n=this.caretPos-1,0>n||n>=this.items.length)?i.apply(this,arguments):(s=this.options[this.items[n]],this.deleteSelection(e)&&(this.setTextboxValue(t.text.apply(this,[s])),this.refreshOptions(!0)),void e.preventDefault())}}()}),L}),define("text!comp/forms/selectionList/sf-selection-list-template.html",[],function(){return'<script type="text/x-jquery-tmpl" data-template-id="desktop"><div class="selectize_field sf-selection-list sf-desktop"><select id="<%=id%>" class="select-account" placeholder="<%=placeholder%>" name="<%=inputName%>" tabindex="<%=tabIndex%>"></select></div><\/script><script type="text/x-jquery-tmpl" data-template-id="mobile"><div class="selectize_field sf-selection-list sf-mobile"><div class="selectize-control single"><div class="selectize-input-overlay"></div><div class="selectize-input items not-full has-options"><input id="<%=id%>" type="text" autocomplete="off" placeholder="<%=placeholder%>"></div></div></div><input type="hidden" name="<%=inputName%>"><\/script><script type="text/x-jquery-tmpl" data-template-id="mobile-search-template"><div class="inputWrapper"><div class="input-group"><div class="input-group-addon"><span class="glyphicon glyphicon-search"></span></div><form class="searchForm"><input class="form-control searchField" type="search" placeholder="<%=placeholder%>" id="<%=searchFieldId%>"></form></div></div><\/script><script type="text/x-jquery-tmpl" data-template-id="mobile-list-template"><div class="select-account fromHolder single dropdown_content selectize-dropdown" style="height: <%=initialHeight%>px;"><ul class="list-group"></ul></div><\/script><script type="text/x-jquery-tmpl" data-template-id="mobile-list-item-template"><li data-selectable data-value="<%=value%>" class="option list-group-item"><%=label%></li><\/script><script type="text/x-jquery-tmpl" data-template-id="mobile-group-header-template"><li class="optgroup-header list-group-item"><%=label%></li><\/script>'}),define("comp/forms/selectionList/desktopView",["./abstractView","underscore","selectize","comp/forms/field","comp/utils","text!./sf-selection-list-template.html","backbone"],function(t,e,i,n,s,o,r){return t.extend({initialize:function(){this.preCompiledTemplate=e.template(s.getTemplate(o,"desktop")),t.prototype.initialize.apply(this,arguments)},customRender:function(){this.createSelectize()},setValue:function(t){"string"==typeof t?t=this.findById(t):(!t||t&&null==this.findById(t.get(this.options.valueField)))&&(t=null),null==t?this.selectize.clear():this.selectize.setValue(t.get(this.options.valueField))},close:function(){this.selectize.close()},refresh:function(){var t=this.getValue();this.selectize.destroy(),this.selectize=null,this.render(),this.setValue(t)},createSelectize:function(){var e=this,i={options:this.collectionToArray(this.options.data),optgroups:this.options.group?e.collectionToArray(this.options.group.data):void 0,optgroupField:this.options.group?this.options.group.field:void 0,optgroupLabelField:this.options.group?this.options.group.labelField:void 0,optgroupValueField:this.options.group?this.options.group.valueField:void 0,optgroupOrder:this.options.group?this.options.group.order:void 0,labelField:this.options.labelField,valueField:this.options.valueField,searchField:this.options.searchField,openOnFocus:this.options.openOnFocus,sortField:null,onChange:function(i){var n=e.findById(i);t.prototype.setValue.call(e,n),e.options.hideSearch&&e.fixHideSearchPlaceholder()},onDropdownOpen:function(){e.trigger("dropDownOpen")},onDropdownClose:function(){e.trigger("dropDownClose")},onType:function(){e.trigger("search",e.getArrayOfHits())}};if(this.options.renderOption&&(i.render=i.render||{},i.render.option=function(t,i){return"<div>"+e.options.renderOption.call(e,e.findById(t[e.options.valueField]),i)+"</div>"}),this.options.group&&this.options.group.renderGroupHeader&&(i.render=i.render||{},i.render.optgroup_header=function(t,i){return"<div>"+e.options.group.renderGroupHeader.call(e,e.findGroupById(t[e.options.group.valueField]),i)+"</div>"}),this.$el.find("select").selectize(i),this.options.hideSearch){var n=this.$el.find(".selectize-input");n.addClass("hideSearch"),n.find("input").bind("keydown keypress keyup",function(t){(t.keyCode>=48&&t.keyCode<=90||t.keyCode>=96)&&t.preventDefault()}),this.fixHideSearchPlaceholder()}this.selectize=this.$el.find("select")[0].selectize},fixHideSearchPlaceholder:function(){if(this.options.placeholder){if(!this.getValue()&&0==this.$(".selectize-input .placeholder").length){var t=this.$el.find(".selectize-input");t.append($("<div>").text(this.options.placeholder).addClass("placeholder"))}this.getValue()&&this.$(".selectize-input .placeholder").remove()}},getArrayOfHits:function(){var t=this;return new r.Collection(e.map(this.selectize.currentResults.items,function(e){return t.findById(e.id)}))},disable:function(){this.selectize.disable(),n.prototype.disable.call(this)},enable:function(){this.selectize.enable(),n.prototype.enable.call(this)}})}),define("comp/container/container/main",["backbone","underscore","jquery"],function(t,e,i){return t.View.extend({initialize:function(t){t=t||{},e.defaults(t,{items:[]}),this.options=t,this.render()},getItems:function(){return this.options.items},getItem:function(t){return this.checkBounds(t),this.options.items[t]},getNumberOfItems:function(){return this.options.items.length},checkBounds:function(t){if(!this.isWithinBounds(t))throw Error("The index is out of bounds or invalid")},isWithinBounds:function(t){return e.isNumber(t)&&this.getNumberOfItems()>0&&t>=0&&t<this.getNumberOfItems()},renderItem:function(n){if(e.isNumber(n))return this.renderItem(this.getItem(n));if(e.isString(n))return i(i.parseHTML(n.trim()));if(n.nodeType)return i(n);if(n.jquery)return n;if(n instanceof t.View)return n.render(),n.$el;throw Error("item is not supported by containers")}})}),define("comp/container/container",["comp/container/container/main"],function(t){return t}),define("text!comp/container/modal/modal-template.html",[],function(){return'<script type="text/x-jquery-tmpl" data-template-id="modal"><div class="modal <%=classes%>" id="<%=id%>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"><div class="modal-dialog"><div class="modal-content"><% if (header && (header.closeButton || header.title)) { %><div class="modal-header bg-primary"><% if (header.closeButton) {%><button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button><% } %><h4 class="modal-title" id="<%=id%>-label"><%=header.title%></h4></div><% } %><div class="modal-body"></div></div></div></div><\/script><script type="text/x-jquery-tmpl" data-template-id="modal-open-style"><style type="text/css" id="<%=id%>">\r\n html.<%=className%> {\r\n position: fixed;\r\n left: 0px;\r\n top: -<%=scrollPosition%>px;\r\n width: <%=bodyWidth%>px;\r\n padding-right: 0px !important;\r\n }\r\n </style><\/script>'}),function(t){define("bootstrap",["jquery"],function(){return function(){if("undefined"==typeof jQuery)throw Error("Bootstrap's JavaScript requires jQuery");+function(t){function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,n=this;t(this).one("bsTransitionEnd",function(){i=!0});var s=function(){i||t(n).trigger(t.support.transition.end)};return setTimeout(s,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(t){function e(e){return this.each(function(){var i=t(this),s=i.data("bs.alert");s||i.data("bs.alert",s=new n(this)),"string"==typeof e&&s[e].call(i)})}var i='[data-dismiss="alert"]',n=function(e){t(e).on("click",i,this.close)};n.VERSION="3.2.0",n.prototype.close=function(e){function i(){o.detach().trigger("closed.bs.alert").remove()}var n=t(this),s=n.attr("data-target");s||(s=n.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,""));var o=t(s);e&&e.preventDefault(),o.length||(o=n.hasClass("alert")?n:n.parent()),o.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(o.removeClass("in"),t.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",i).emulateTransitionEnd(150):i())};var s=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=s,this},t(document).on("click.bs.alert.data-api",i,n.prototype.close)}(jQuery),+function(t){function e(e){return this.each(function(){var n=t(this),s=n.data("bs.button"),o="object"==typeof e&&e;s||n.data("bs.button",s=new i(this,o)),"toggle"==e?s.toggle():e&&s.setState(e)})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.isLoading=!1};i.VERSION="3.2.0",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var i="disabled",n=this.$element,s=n.is("input")?"val":"html",o=n.data();e+="Text",null==o.resetText&&n.data("resetText",n[s]()),n[s](null==o[e]?this.options[e]:o[e]),setTimeout(t.proxy(function(){"loadingText"==e?(this.isLoading=!0,n.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,n.removeClass(i).removeAttr(i))},this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")&&(i.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&i.prop("checked",!this.$element.hasClass("active")).trigger("change")}t&&this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(i){var n=t(i.target); n.hasClass("btn")||(n=n.closest(".btn")),e.call(n,"toggle"),i.preventDefault()})}(jQuery),+function(t){function e(e){return this.each(function(){var n=t(this),s=n.data("bs.carousel"),o=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e),r="string"==typeof e?e:o.slide;s||n.data("bs.carousel",s=new i(this,o)),"number"==typeof e?s.to(e):r?s[r]():o.interval&&s.pause().cycle()})}var i=function(e,i){this.$element=t(e).on("keydown.bs.carousel",t.proxy(this.keydown,this)),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};i.VERSION="3.2.0",i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},i.prototype.keydown=function(t){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},i.prototype.to=function(e){var i=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));return e>this.$items.length-1||0>e?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){i.to(e)}):n==e?this.pause().cycle():this.slide(e>n?"next":"prev",t(this.$items[e]))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){return this.sliding?void 0:this.slide("next")},i.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},i.prototype.slide=function(e,i){var n=this.$element.find(".item.active"),s=i||n[e](),o=this.interval,r="next"==e?"left":"right",a="next"==e?"first":"last",l=this;if(!s.length){if(!this.options.wrap)return;s=this.$element.find(".item")[a]()}if(s.hasClass("active"))return this.sliding=!1;var c=s[0],h=t.Event("slide.bs.carousel",{relatedTarget:c,direction:r});if(this.$element.trigger(h),!h.isDefaultPrevented()){if(this.sliding=!0,o&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var d=t(this.$indicators.children()[this.getItemIndex(s)]);d&&d.addClass("active")}var p=t.Event("slid.bs.carousel",{relatedTarget:c,direction:r});return t.support.transition&&this.$element.hasClass("slide")?(s.addClass(e),s[0].offsetWidth,n.addClass(r),s.addClass(r),n.one("bsTransitionEnd",function(){s.removeClass([e,r].join(" ")).addClass("active"),n.removeClass(["active",r].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(p)},0)}).emulateTransitionEnd(1e3*n.css("transition-duration").slice(0,-1))):(n.removeClass("active"),s.addClass("active"),this.sliding=!1,this.$element.trigger(p)),o&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this},t(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(i){var n,s=t(this),o=t(s.attr("data-target")||(n=s.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""));if(o.hasClass("carousel")){var r=t.extend({},o.data(),s.data()),a=s.attr("data-slide-to");a&&(r.interval=!1),e.call(o,r),a&&o.data("bs.carousel").to(a),i.preventDefault()}}),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var i=t(this);e.call(i,i.data())})})}(jQuery),+function(t){function e(e){return this.each(function(){var n=t(this),s=n.data("bs.collapse"),o=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);!s&&o.toggle&&"show"==e&&(e=!e),s||n.data("bs.collapse",s=new i(this,o)),"string"==typeof e&&s[e]()})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.transitioning=null,this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};i.VERSION="3.2.0",i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var i=t.Event("show.bs.collapse");if(this.$element.trigger(i),!i.isDefaultPrevented()){var n=this.$parent&&this.$parent.find("> .panel > .in");if(n&&n.length){var s=n.data("bs.collapse");if(s&&s.transitioning)return;e.call(n,"hide"),s||n.data("bs.collapse",null)}var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0),this.transitioning=1;var r=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return r.call(this);var a=t.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(350)[o](this.$element[0][a])}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var n=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(n,this)).emulateTransitionEnd(350):n.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var n=t.fn.collapse;t.fn.collapse=e,t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=n,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var n,s=t(this),o=s.attr("data-target")||i.preventDefault()||(n=s.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""),r=t(o),a=r.data("bs.collapse"),l=a?"toggle":s.data(),c=s.attr("data-parent"),h=c&&t(c);a&&a.transitioning||(h&&h.find('[data-toggle="collapse"][data-parent="'+c+'"]').not(s).addClass("collapsed"),s[r.hasClass("in")?"addClass":"removeClass"]("collapsed")),e.call(r,l)})}(jQuery),+function(t){function e(e){e&&3===e.which||(t(s).remove(),t(o).each(function(){var n=i(t(this)),s={relatedTarget:this};n.hasClass("open")&&(n.trigger(e=t.Event("hide.bs.dropdown",s)),e.isDefaultPrevented()||n.removeClass("open").trigger("hidden.bs.dropdown",s))}))}function i(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n=i&&t(i);return n&&n.length?n:e.parent()}function n(e){return this.each(function(){var i=t(this),n=i.data("bs.dropdown");n||i.data("bs.dropdown",n=new r(this)),"string"==typeof e&&n[e].call(i)})}var s=".dropdown-backdrop",o='[data-toggle="dropdown"]',r=function(e){t(e).on("click.bs.dropdown",this.toggle)};r.VERSION="3.2.0",r.prototype.toggle=function(n){var s=t(this);if(!s.is(".disabled, :disabled")){var o=i(s),r=o.hasClass("open");if(e(),!r){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t('<div class="dropdown-backdrop"/>').insertAfter(t(this)).on("click",e);var a={relatedTarget:this};if(o.trigger(n=t.Event("show.bs.dropdown",a)),n.isDefaultPrevented())return;s.trigger("focus"),o.toggleClass("open").trigger("shown.bs.dropdown",a)}return!1}},r.prototype.keydown=function(e){if(/(38|40|27)/.test(e.keyCode)){var n=t(this);if(e.preventDefault(),e.stopPropagation(),!n.is(".disabled, :disabled")){var s=i(n),r=s.hasClass("open");if(!r||r&&27==e.keyCode)return 27==e.which&&s.find(o).trigger("focus"),n.trigger("click");var a=" li:not(.divider):visible a",l=s.find('[role="menu"]'+a+', [role="listbox"]'+a);if(l.length){var c=l.index(l.filter(":focus"));38==e.keyCode&&c>0&&c--,40==e.keyCode&&c<l.length-1&&c++,~c||(c=0),l.eq(c).trigger("focus")}}}};var a=t.fn.dropdown;t.fn.dropdown=n,t.fn.dropdown.Constructor=r,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=a,this},t(document).on("click.bs.dropdown.data-api",e).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",o,r.prototype.toggle).on("keydown.bs.dropdown.data-api",o+', [role="menu"], [role="listbox"]',r.prototype.keydown)}(jQuery),+function(t){function e(e,n){return this.each(function(){var s=t(this),o=s.data("bs.modal"),r=t.extend({},i.DEFAULTS,s.data(),"object"==typeof e&&e);o||s.data("bs.modal",o=new i(this,r)),"string"==typeof e?o[e](n):r.show&&o.show(n)})}var i=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};i.VERSION="3.2.0",i.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},i.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},i.prototype.show=function(e){var i=this,n=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(n),this.isShown||n.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.$body.addClass("modal-open"),this.setScrollbar(),this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.backdrop(function(){var n=t.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),n&&i.$element[0].offsetWidth,i.$element.addClass("in").attr("aria-hidden",!1),i.enforceFocus();var s=t.Event("shown.bs.modal",{relatedTarget:e});n?i.$element.find(".modal-dialog").one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(s)}).emulateTransitionEnd(300):i.$element.trigger("focus").trigger(s)}))},i.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},i.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},i.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},i.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$element.trigger("hidden.bs.modal")})},i.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},i.prototype.backdrop=function(e){var i=this,n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=t.support.transition&&n;if(this.$backdrop=t('<div class="modal-backdrop '+n+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),s&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;s?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(150):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var o=function(){i.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",o).emulateTransitionEnd(150):o()}else e&&e()},i.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},i.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",t+this.scrollbarWidth)},i.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},i.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var n=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=i,t.fn.modal.noConflict=function(){return t.fn.modal=n,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(i){var n=t(this),s=n.attr("href"),o=t(n.attr("data-target")||s&&s.replace(/.*(?=#[^\s]+$)/,"")),r=o.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(s)&&s},o.data(),n.data());n.is("a")&&i.preventDefault(),o.one("show.bs.modal",function(t){t.isDefaultPrevented()||o.one("hidden.bs.modal",function(){n.is(":visible")&&n.trigger("focus")})}),e.call(o,r,this)})}(jQuery),+function(t){function e(e){return this.each(function(){var n=t(this),s=n.data("bs.tooltip"),o="object"==typeof e&&e;(s||"destroy"!=e)&&(s||n.data("bs.tooltip",s=new i(this,o)),"string"==typeof e&&s[e]())})}var i=function(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",t,e)};i.VERSION="3.2.0",i.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},i.prototype.init=function(e,i,n){this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(this.options.viewport.selector||this.options.viewport);for(var s=this.options.trigger.split(" "),o=s.length;o--;){var r=s[o];if("click"==r)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=r){var a="hover"==r?"mouseenter":"focusin",l="hover"==r?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},i.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,n){i[t]!=n&&(e[t]=n)}),e},i.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show()},i.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()},i.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var i=t.contains(document.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!i)return;var n=this,s=this.tip(),o=this.getUID(this.type);this.setContent(),s.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&s.addClass("fade");var r="function"==typeof this.options.placement?this.options.placement.call(this,s[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,l=a.test(r);l&&(r=r.replace(a,"")||"top"),s.detach().css({top:0,left:0,display:"block"}).addClass(r).data("bs."+this.type,this),this.options.container?s.appendTo(this.options.container):s.insertAfter(this.$element);var c=this.getPosition(),h=s[0].offsetWidth,d=s[0].offsetHeight;if(l){var p=r,u=this.$element.parent(),f=this.getPosition(u);r="bottom"==r&&c.top+c.height+d-f.scroll>f.height?"top":"top"==r&&c.top-f.scroll-d<0?"bottom":"right"==r&&c.right+h>f.width?"left":"left"==r&&c.left-h<f.left?"right":r,s.removeClass(p).addClass(r)}var m=this.getCalculatedOffset(r,c,h,d);this.applyPlacement(m,r);var g=function(){n.$element.trigger("shown.bs."+n.type),n.hoverState=null};t.support.transition&&this.$tip.hasClass("fade")?s.one("bsTransitionEnd",g).emulateTransitionEnd(150):g()}},i.prototype.applyPlacement=function(e,i){var n=this.tip(),s=n[0].offsetWidth,o=n[0].offsetHeight,r=parseInt(n.css("margin-top"),10),a=parseInt(n.css("margin-left"),10);isNaN(r)&&(r=0),isNaN(a)&&(a=0),e.top=e.top+r,e.left=e.left+a,t.offset.setOffset(n[0],t.extend({using:function(t){n.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),n.addClass("in");var l=n[0].offsetWidth,c=n[0].offsetHeight;"top"==i&&c!=o&&(e.top=e.top+o-c);var h=this.getViewportAdjustedDelta(i,e,l,c);h.left?e.left+=h.left:e.top+=h.top;var d=h.left?2*h.left-s+l:2*h.top-o+c,p=h.left?"left":"top",u=h.left?"offsetWidth":"offsetHeight";n.offset(e),this.replaceArrow(d,n[0][u],p)},i.prototype.replaceArrow=function(t,e,i){this.arrow().css(i,t?50*(1-t/e)+"%":"")},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},i.prototype.hide=function(){function e(){"in"!=i.hoverState&&n.detach(),i.$element.trigger("hidden.bs."+i.type)}var i=this,n=this.tip(),s=t.Event("hide.bs."+this.type);return this.$element.removeAttr("aria-describedby"),this.$element.trigger(s),s.isDefaultPrevented()?void 0:(n.removeClass("in"),t.support.transition&&this.$tip.hasClass("fade")?n.one("bsTransitionEnd",e).emulateTransitionEnd(150):e(),this.hoverState=null,this)},i.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},i.prototype.hasContent=function(){return this.getTitle()},i.prototype.getPosition=function(e){e=e||this.$element;var i=e[0],n="BODY"==i.tagName;return t.extend({},"function"==typeof i.getBoundingClientRect?i.getBoundingClientRect():null,{scroll:n?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop(),width:n?t(window).width():e.outerWidth(),height:n?t(window).height():e.outerHeight()},n?{top:0,left:0}:e.offset())},i.prototype.getCalculatedOffset=function(t,e,i,n){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-n,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-n/2,left:e.left-i}:{top:e.top+e.height/2-n/2,left:e.left+e.width}},i.prototype.getViewportAdjustedDelta=function(t,e,i,n){var s={top:0,left:0};if(!this.$viewport)return s;var o=this.options.viewport&&this.options.viewport.padding||0,r=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-o-r.scroll,l=e.top+o-r.scroll+n;a<r.top?s.top=r.top-a:l>r.top+r.height&&(s.top=r.top+r.height-l)}else{var c=e.left-o,h=e.left+o+i;c<r.left?s.left=r.left-c:h>r.width&&(s.left=r.left+r.width-h)}return s},i.prototype.getTitle=function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},i.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},i.prototype.tip=function(){return this.$tip=this.$tip||t(this.options.template)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},i.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},i.prototype.enable=function(){this.enabled=!0},i.prototype.disable=function(){this.enabled=!1},i.prototype.toggleEnabled=function(){this.enabled=!this.enabled},i.prototype.toggle=function(e){var i=this;e&&(i=t(e.currentTarget).data("bs."+this.type),i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),i.tip().hasClass("in")?i.leave(i):i.enter(i)},i.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var n=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=i,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=n,this}}(jQuery),+function(t){function e(e){return this.each(function(){var n=t(this),s=n.data("bs.popover"),o="object"==typeof e&&e;(s||"destroy"!=e)&&(s||n.data("bs.popover",s=new i(this,o)),"string"==typeof e&&s[e]())})}var i=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw Error("Popover requires tooltip.js");i.VERSION="3.2.0",i.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),i.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),i.prototype.constructor=i,i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").empty()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},i.prototype.hasContent=function(){return this.getTitle()||this.getContent()},i.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},i.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var n=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=i,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(jQuery),+function(t){function e(i,n){var s=t.proxy(this.process,this);this.$body=t("body"),this.$scrollElement=t(t(i).is("body")?window:i),this.options=t.extend({},e.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",s),this.refresh(),this.process()}function i(i){return this.each(function(){var n=t(this),s=n.data("bs.scrollspy"),o="object"==typeof i&&i;s||n.data("bs.scrollspy",s=new e(this,o)),"string"==typeof i&&s[i]()})}e.VERSION="3.2.0",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e="offset",i=0;t.isWindow(this.$scrollElement[0])||(e="position",i=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var n=this;this.$body.find(this.selector).map(function(){var n=t(this),s=n.data("target")||n.attr("href"),o=/^#./.test(s)&&t(s);return o&&o.length&&o.is(":visible")&&[[o[e]().top+i,s]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){n.offsets.push(this[0]),n.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),n=this.options.offset+i-this.$scrollElement.height(),s=this.offsets,o=this.targets,r=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),e>=n)return r!=(t=o[o.length-1])&&this.activate(t);if(r&&e<=s[0])return r!=(t=o[0])&&this.activate(t);for(t=s.length;t--;)!(r==o[t]||e<s[t]||s[t+1]&&e>s[t+1]||!this.activate(o[t]))},e.prototype.activate=function(e){this.activeTarget=e,t(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var i=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',n=t(i).parents("li").addClass("active");n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate.bs.scrollspy")};var n=t.fn.scrollspy;t.fn.scrollspy=i,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=n,this},t(window).on("load.bs.scrollspy.data-api",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);i.call(e,e.data())})})}(jQuery),+function(t){function e(e){return this.each(function(){var n=t(this),s=n.data("bs.tab");s||n.data("bs.tab",s=new i(this)),"string"==typeof e&&s[e]()})}var i=function(e){this.element=t(e)};i.VERSION="3.2.0",i.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),n=e.data("target");if(n||(n=e.attr("href"),n=n&&n.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var s=i.find(".active:last a")[0],o=t.Event("show.bs.tab",{relatedTarget:s});if(e.trigger(o),!o.isDefaultPrevented()){var r=t(n);this.activate(e.closest("li"),i),this.activate(r,r.parent(),function(){e.trigger({type:"shown.bs.tab",relatedTarget:s})})}}},i.prototype.activate=function(e,i,n){function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),e.addClass("active"),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),n&&n()}var o=i.find("> .active"),r=n&&t.support.transition&&o.hasClass("fade");r?o.one("bsTransitionEnd",s).emulateTransitionEnd(150):s(),o.removeClass("in")};var n=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=n,this},t(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(i){i.preventDefault(),e.call(t(this),"show")})}(jQuery),+function(t){function e(e){return this.each(function(){var n=t(this),s=n.data("bs.affix"),o="object"==typeof e&&e;s||n.data("bs.affix",s=new i(this,o)),"string"==typeof e&&s[e]()})}var i=function(e,n){this.options=t.extend({},i.DEFAULTS,n),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.2.0",i.RESET="affix affix-top affix-bottom",i.DEFAULTS={offset:0,target:window},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=t(document).height(),n=this.$target.scrollTop(),s=this.$element.offset(),o=this.options.offset,r=o.top,a=o.bottom;"object"!=typeof o&&(a=r=o),"function"==typeof r&&(r=o.top(this.$element)),"function"==typeof a&&(a=o.bottom(this.$element));var l=null==this.unpin||n+this.unpin>s.top?null==a||s.top+this.$element.height()<e-a?null==r||n>r?!1:"top":"bottom":!1;if(this.affixed!==l){null!=this.unpin&&this.$element.css("top","");var c="affix"+(l?"-"+l:""),h=t.Event(c+".bs.affix");this.$element.trigger(h),h.isDefaultPrevented()||(this.affixed=l,this.unpin="bottom"==l?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(c).trigger(t.Event(c.replace("affix","affixed"))),"bottom"==l&&this.$element.offset({top:e-this.$element.height()-a}))}}};var n=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=i,t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var i=t(this),n=i.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),e.call(i,n)})})}(jQuery)}.apply(t,arguments)})}(this),define("comp/container/modal/main",["backbone","underscore","jquery","comp/container/container","text!./modal-template.html","comp/utils","sf","bootstrap"],function(t,e,i,n,s,o,r,a){var l=e.template(o.getTemplate(s,"modal")),c=e.template(o.getTemplate(s,"modal-open-style"));return n.extend({initialize:function(t){t=t||{},this.id=this.id||o.generateID(),e.defaults(t,{show:!0,history:!0,animations:!0,freezeBackground:!0,autoHeight:!1}),i.support.transition||(t.animations=!1),n.prototype.initialize.call(this,t)},showing:!1,hiding:!1,render:function(){var t,n=this;this.$el.html(l({id:this.id,header:this.options.header,classes:[this.options.animations?"fade":"",this.className].join(" ")})),this.$el=this.$el.find(".modal"),t=this.$(".modal-body"),e.each(this.getItems(),function(e){t.append(n.renderItem(e))}),i("body").append(this.$el),this.className="sf-comp-container-modal-"+i.map(Array(10),function(){return"abcdefghijklmnopqrstuvwxyz"[Math.floor(26*Math.random())]}).join(""),this.openState=this.className+"-open",this.closedState=this.className+"-closed",this.$el.modal({show:!1}),this.$el.on("show.bs.modal",e.bind(this.modalOpen,this)),this.$el.on("shown.bs.modal",e.bind(this.handleModalShown,this)),this.$el.on("hide.bs.modal",e.bind(this.bootstrapHide,this)),this.$el.on("hidden.bs.modal",e.bind(this.bootstrapHidden,this)),this.options.history&&a.history&&r.history.register(this.className,function(t){n.openState===t?n.show():n.isOpen()&&n.hideWithBootstrap()},this.closedState),this.options.autoHeight&&(this.$el.addClass("auto-height"),this.boundFixAutoHeight=e.bind(this.fixAutoHeight,this)),this.options.show&&this.show()},fixAutoHeight:function(){var t=this.$(".modal-dialog"),n=i(window).innerHeight()-parseInt(t.css("margin-top"))-parseInt(t.css("margin-bottom"));e.isNaN(n)||n===t.height()||(t.css("height",n),this.trigger("modalCalculatedHeight"))},handleModalShown:function(){var t=this;t.trigger("modalShown"),t.showing=!1},modalOpen:function(t){this.showing?(this.options.history&&a.history&&!this.isCurrentHistoryStateOpen()&&r.history.push(this.className,this.openState),this.options.autoHeight&&(this.fixAutoHeight(),i(window).on("resize orientationchange",this.boundFixAutoHeight)),this.trigger("modalShow")):(t.preventDefault(),this.show())},bootstrapHide:function(t){this.hiding||(t.preventDefault(),this.hide())},unfreezeBackground:function(){i("html").removeClass(this.className),i("#"+this.styleStatus.styleId).remove(),i(window).scrollTop(this.styleStatus.scrollTop),this.styleStatus={}},freezeBackground:function(){this.styleStatus={scrollTop:i(window).scrollTop(),styleId:o.generateID()},i("head").append(c({id:this.styleStatus.styleId,className:this.className,scrollPosition:this.styleStatus.scrollTop,bodyWidth:i("body").width()})),i("html").addClass(this.className)},bootstrapHidden:function(){this.trigger("modalHidden"),i(window).off("resize orientationchange",this.boundFixAutoHeight),this.hiding=!1},show:function(){return i("body").hasClass("modal-open")||this.hiding||this.showing?!1:(this.showing=!0,this.options.freezeBackground&&this.freezeBackground(),this.$el.modal("show"),!0)},hide:function(){!this.isOpen()||this.hiding||this.showing||(this.hiding=!0,this.options.history&&a.history?window.history.back():this.hideWithBootstrap())},hideWithBootstrap:function(){this.isOpen()&&(this.hiding=!0,this.options.freezeBackground&&this.unfreezeBackground(),this.$el.modal("hide"))},isOpen:function(){var t=this.$el.data("bs.modal");return t&&t.isShown||this.$el.is(".in:visible").length>0||t&&t.$backdrop&&t.$backdrop.is(":visible")||i("body").hasClass(this.className) },isOpenAndReady:function(){return this.isOpen()&&!this.showing&&!this.hiding},isClosedAndReady:function(){return!this.isOpen()&&!this.showing&&!this.hiding},isCurrentHistoryStateOpen:function(){return a.history&&window.history.state&&window.history.state[this.className]&&window.history.state[this.className]===this.openState},remove:function(){var e=this,i=arguments;this.isOpen()?(this.hide(),this.on("modalHidden",function(){t.View.prototype.remove.apply(e,i)})):t.View.prototype.remove.apply(this,i)}})}),define("comp/container/modal",["comp/container/modal/main"],function(t){return t}),function(t){define("iscroll",[],function(){return function(){return function(t,e,i){function n(t,i){this.wrapper="string"==typeof t?e.querySelector(t):t,this.scroller=this.wrapper.children[0],this.scrollerStyle=this.scroller.style,this.options={resizeScrollbars:!0,keyBindings:!0,mouseWheelSpeed:20,snapThreshold:.334,startX:0,startY:0,scrollY:!0,directionLockThreshold:5,momentum:!0,bounce:!0,bounceTime:600,bounceEasing:"",preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},HWCompositing:!0,useTransition:!0,useTransform:!0};for(var n in i)this.options[n]=i[n];this.translateZ=this.options.HWCompositing&&a.hasPerspective?" translateZ(0)":"",this.options.useTransition=a.hasTransition&&this.options.useTransition,this.options.useTransform=a.hasTransform&&this.options.useTransform,this.options.eventPassthrough=this.options.eventPassthrough===!0?"vertical":this.options.eventPassthrough,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollY="vertical"==this.options.eventPassthrough?!1:this.options.scrollY,this.options.scrollX="horizontal"==this.options.eventPassthrough?!1:this.options.scrollX,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,this.options.bounceEasing="string"==typeof this.options.bounceEasing?a.ease[this.options.bounceEasing]||a.ease.circular:this.options.bounceEasing,this.options.resizePolling=void 0===this.options.resizePolling?60:this.options.resizePolling,this.options.tap===!0&&(this.options.tap="tap"),"scale"==this.options.shrinkScrollbars&&(this.options.useTransition=!1),this.options.invertWheelDirection=this.options.invertWheelDirection?-1:1,this.x=0,this.y=0,this.directionX=0,this.directionY=0,this._events={},this._init(),this.refresh(),this.scrollTo(this.options.startX,this.options.startY),this.enable()}function s(t,i,n){var s=e.createElement("div"),o=e.createElement("div");return n===!0&&(s.style.cssText="position:absolute;z-index:9999",o.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px"),o.className="iScrollIndicator","h"==t?(n===!0&&(s.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",o.style.height="100%"),s.className="iScrollHorizontalScrollbar"):(n===!0&&(s.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",o.style.width="100%"),s.className="iScrollVerticalScrollbar"),s.style.cssText+=";overflow:hidden",i||(s.style.pointerEvents="none"),s.appendChild(o),s}function o(i,n){this.wrapper="string"==typeof n.el?e.querySelector(n.el):n.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=i,this.options={listenX:!0,listenY:!0,interactive:!1,resize:!0,defaultScrollbars:!1,shrink:!1,fade:!1,speedRatioX:0,speedRatioY:0};for(var s in n)this.options[s]=n[s];this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.options.interactive&&(this.options.disableTouch||(a.addEvent(this.indicator,"touchstart",this),a.addEvent(t,"touchend",this)),this.options.disablePointer||(a.addEvent(this.indicator,"MSPointerDown",this),a.addEvent(t,"MSPointerUp",this)),this.options.disableMouse||(a.addEvent(this.indicator,"mousedown",this),a.addEvent(t,"mouseup",this))),this.options.fade&&(this.wrapperStyle[a.style.transform]=this.scroller.translateZ,this.wrapperStyle[a.style.transitionDuration]=a.isBadAndroid?"0.001s":"0ms",this.wrapperStyle.opacity="0")}var r=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e){t.setTimeout(e,1e3/60)},a=function(){function n(t){return r===!1?!1:""===r?t:r+t.charAt(0).toUpperCase()+t.substr(1)}var s={},o=e.createElement("div").style,r=function(){for(var t,e=["t","webkitT","MozT","msT","OT"],i=0,n=e.length;n>i;i++)if(t=e[i]+"ransform",t in o)return e[i].substr(0,e[i].length-1);return!1}();s.getTime=Date.now||function(){return(new Date).getTime()},s.extend=function(t,e){for(var i in e)t[i]=e[i]},s.addEvent=function(t,e,i,n){t.addEventListener(e,i,!!n)},s.removeEvent=function(t,e,i,n){t.removeEventListener(e,i,!!n)},s.momentum=function(t,e,n,s,o,r){var a,l,c=t-e,h=i.abs(c)/n;return r=void 0===r?6e-4:r,a=t+h*h/(2*r)*(0>c?-1:1),l=h/r,s>a?(a=o?s-o/2.5*(h/8):s,c=i.abs(a-t),l=c/h):a>0&&(a=o?o/2.5*(h/8):0,c=i.abs(t)+a,l=c/h),{destination:i.round(a),duration:l}};var a=n("transform");return s.extend(s,{hasTransform:a!==!1,hasPerspective:n("perspective")in o,hasTouch:"ontouchstart"in t,hasPointer:navigator.msPointerEnabled,hasTransition:n("transition")in o}),s.isBadAndroid=/Android /.test(t.navigator.appVersion)&&!/Chrome\/\d/.test(t.navigator.appVersion),s.extend(s.style={},{transform:a,transitionTimingFunction:n("transitionTimingFunction"),transitionDuration:n("transitionDuration"),transitionDelay:n("transitionDelay"),transformOrigin:n("transformOrigin")}),s.hasClass=function(t,e){var i=RegExp("(^|\\s)"+e+"(\\s|$)");return i.test(t.className)},s.addClass=function(t,e){if(!s.hasClass(t,e)){var i=t.className.split(" ");i.push(e),t.className=i.join(" ")}},s.removeClass=function(t,e){if(s.hasClass(t,e)){var i=RegExp("(^|\\s)"+e+"(\\s|$)","g");t.className=t.className.replace(i," ")}},s.offset=function(t){for(var e=-t.offsetLeft,i=-t.offsetTop;t=t.offsetParent;)e-=t.offsetLeft,i-=t.offsetTop;return{left:e,top:i}},s.preventDefaultException=function(t,e){for(var i in e)if(e[i].test(t[i]))return!0;return!1},s.extend(s.eventType={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,MSPointerDown:3,MSPointerMove:3,MSPointerUp:3}),s.extend(s.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(t){return t*(2-t)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(t){return i.sqrt(1- --t*t)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(t){var e=4;return(t-=1)*t*((e+1)*t+e)+1}},bounce:{style:"",fn:function(t){return(t/=1)<1/2.75?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},elastic:{style:"",fn:function(t){var e=.22,n=.4;return 0===t?0:1==t?1:n*i.pow(2,-10*t)*i.sin(2*(t-e/4)*i.PI/e)+1}}}),s.tap=function(t,i){var n=e.createEvent("Event");n.initEvent(i,!0,!0),n.pageX=t.pageX,n.pageY=t.pageY,t.target.dispatchEvent(n)},s.click=function(t){var i,n=t.target;/(SELECT|INPUT|TEXTAREA)/i.test(n.tagName)||(i=e.createEvent("MouseEvents"),i.initMouseEvent("click",!0,!0,t.view,1,n.screenX,n.screenY,n.clientX,n.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,0,null),i._constructed=!0,n.dispatchEvent(i))},s}();n.prototype={version:"5.1.1",_init:function(){this._initEvents(),(this.options.scrollbars||this.options.indicators)&&this._initIndicators(),this.options.mouseWheel&&this._initWheel(),this.options.snap&&this._initSnap(),this.options.keyBindings&&this._initKeys()},destroy:function(){this._initEvents(!0),this._execEvent("destroy")},_transitionEnd:function(t){t.target==this.scroller&&this.isInTransition&&(this._transitionTime(),this.resetPosition(this.options.bounceTime)||(this.isInTransition=!1,this._execEvent("scrollEnd")))},_start:function(t){if(!(1!=a.eventType[t.type]&&0!==t.button||!this.enabled||this.initiated&&a.eventType[t.type]!==this.initiated)){!this.options.preventDefault||a.isBadAndroid||a.preventDefaultException(t.target,this.options.preventDefaultException)||t.preventDefault();var e,n=t.touches?t.touches[0]:t;this.initiated=a.eventType[t.type],this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.directionLocked=0,this._transitionTime(),this.startTime=a.getTime(),this.options.useTransition&&this.isInTransition?(this.isInTransition=!1,e=this.getComputedPosition(),this._translate(i.round(e.x),i.round(e.y)),this._execEvent("scrollEnd")):!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this._execEvent("scrollEnd")),this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=n.pageX,this.pointY=n.pageY,this._execEvent("beforeScrollStart")}},_move:function(t){if(this.enabled&&a.eventType[t.type]===this.initiated){this.options.preventDefault&&t.preventDefault();var e,n,s,o,r=t.touches?t.touches[0]:t,l=r.pageX-this.pointX,c=r.pageY-this.pointY,h=a.getTime();if(this.pointX=r.pageX,this.pointY=r.pageY,this.distX+=l,this.distY+=c,s=i.abs(this.distX),o=i.abs(this.distY),!(h-this.endTime>300&&10>s&&10>o)){if(this.directionLocked||this.options.freeScroll||(this.directionLocked=s>o+this.options.directionLockThreshold?"h":o<s+this.options.directionLockThreshold?"n":"v"),"h"==this.directionLocked){if("vertical"==this.options.eventPassthrough)t.preventDefault();else if("horizontal"==this.options.eventPassthrough)return void(this.initiated=!1);c=0}else if("v"==this.directionLocked){if("horizontal"==this.options.eventPassthrough)t.preventDefault();else if("vertical"==this.options.eventPassthrough)return void(this.initiated=!1);l=0}l=this.hasHorizontalScroll?l:0,c=this.hasVerticalScroll?c:0,e=this.x+l,n=this.y+c,(e>0||e<this.maxScrollX)&&(e=this.options.bounce?this.x+l/3:e>0?0:this.maxScrollX),(n>0||n<this.maxScrollY)&&(n=this.options.bounce?this.y+c/3:n>0?0:this.maxScrollY),this.directionX=l>0?-1:0>l?1:0,this.directionY=c>0?-1:0>c?1:0,this.moved||this._execEvent("scrollStart"),this.moved=!0,this._translate(e,n),h-this.startTime>300&&(this.startTime=h,this.startX=this.x,this.startY=this.y)}}},_end:function(t){if(this.enabled&&a.eventType[t.type]===this.initiated){this.options.preventDefault&&!a.preventDefaultException(t.target,this.options.preventDefaultException)&&t.preventDefault();var e,n,s=(t.changedTouches?t.changedTouches[0]:t,a.getTime()-this.startTime),o=i.round(this.x),r=i.round(this.y),l=i.abs(o-this.startX),c=i.abs(r-this.startY),h=0,d="";if(this.isInTransition=0,this.initiated=0,this.endTime=a.getTime(),!this.resetPosition(this.options.bounceTime)){if(this.scrollTo(o,r),!this.moved)return this.options.tap&&a.tap(t,this.options.tap),this.options.click&&a.click(t),void this._execEvent("scrollCancel");if(this._events.flick&&200>s&&100>l&&100>c)return void this._execEvent("flick");if(this.options.momentum&&300>s&&(e=this.hasHorizontalScroll?a.momentum(this.x,this.startX,s,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options.deceleration):{destination:o,duration:0},n=this.hasVerticalScroll?a.momentum(this.y,this.startY,s,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options.deceleration):{destination:r,duration:0},o=e.destination,r=n.destination,h=i.max(e.duration,n.duration),this.isInTransition=1),this.options.snap){var p=this._nearestSnap(o,r);this.currentPage=p,h=this.options.snapSpeed||i.max(i.max(i.min(i.abs(o-p.x),1e3),i.min(i.abs(r-p.y),1e3)),300),o=p.x,r=p.y,this.directionX=0,this.directionY=0,d=this.options.bounceEasing}return o!=this.x||r!=this.y?((o>0||o<this.maxScrollX||r>0||r<this.maxScrollY)&&(d=a.ease.quadratic),void this.scrollTo(o,r,h,d)):void this._execEvent("scrollEnd")}}},_resize:function(){var t=this;clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){t.refresh()},this.options.resizePolling)},resetPosition:function(t){var e=this.x,i=this.y;return t=t||0,!this.hasHorizontalScroll||this.x>0?e=0:this.x<this.maxScrollX&&(e=this.maxScrollX),!this.hasVerticalScroll||this.y>0?i=0:this.y<this.maxScrollY&&(i=this.maxScrollY),e==this.x&&i==this.y?!1:(this.scrollTo(e,i,t,this.options.bounceEasing),!0)},disable:function(){this.enabled=!1},enable:function(){this.enabled=!0},refresh:function(){this.wrapper.offsetHeight,this.wrapperWidth=this.wrapper.clientWidth,this.wrapperHeight=this.wrapper.clientHeight,this.scrollerWidth=this.scroller.offsetWidth,this.scrollerHeight=this.scroller.offsetHeight,this.maxScrollX=this.wrapperWidth-this.scrollerWidth,this.maxScrollY=this.wrapperHeight-this.scrollerHeight,this.hasHorizontalScroll=this.options.scrollX&&this.maxScrollX<0,this.hasVerticalScroll=this.options.scrollY&&this.maxScrollY<0,this.hasHorizontalScroll||(this.maxScrollX=0,this.scrollerWidth=this.wrapperWidth),this.hasVerticalScroll||(this.maxScrollY=0,this.scrollerHeight=this.wrapperHeight),this.endTime=0,this.directionX=0,this.directionY=0,this.wrapperOffset=a.offset(this.wrapper),this._execEvent("refresh"),this.resetPosition()},on:function(t,e){this._events[t]||(this._events[t]=[]),this._events[t].push(e)},off:function(t,e){if(this._events[t]){var i=this._events[t].indexOf(e);i>-1&&this._events[t].splice(i,1)}},_execEvent:function(t){if(this._events[t]){var e=0,i=this._events[t].length;if(i)for(;i>e;e++)this._events[t][e].apply(this,[].slice.call(arguments,1))}},scrollBy:function(t,e,i,n){t=this.x+t,e=this.y+e,i=i||0,this.scrollTo(t,e,i,n)},scrollTo:function(t,e,i,n){n=n||a.ease.circular,this.isInTransition=this.options.useTransition&&i>0,!i||this.options.useTransition&&n.style?(this._transitionTimingFunction(n.style),this._transitionTime(i),this._translate(t,e)):this._animate(t,e,i,n.fn)},scrollToElement:function(t,e,n,s,o){if(t=t.nodeType?t:this.scroller.querySelector(t)){var r=a.offset(t);r.left-=this.wrapperOffset.left,r.top-=this.wrapperOffset.top,n===!0&&(n=i.round(t.offsetWidth/2-this.wrapper.offsetWidth/2)),s===!0&&(s=i.round(t.offsetHeight/2-this.wrapper.offsetHeight/2)),r.left-=n||0,r.top-=s||0,r.left=r.left>0?0:r.left<this.maxScrollX?this.maxScrollX:r.left,r.top=r.top>0?0:r.top<this.maxScrollY?this.maxScrollY:r.top,e=void 0===e||null===e||"auto"===e?i.max(i.abs(this.x-r.left),i.abs(this.y-r.top)):e,this.scrollTo(r.left,r.top,e,o)}},_transitionTime:function(t){if(t=t||0,this.scrollerStyle[a.style.transitionDuration]=t+"ms",!t&&a.isBadAndroid&&(this.scrollerStyle[a.style.transitionDuration]="0.001s"),this.indicators)for(var e=this.indicators.length;e--;)this.indicators[e].transitionTime(t)},_transitionTimingFunction:function(t){if(this.scrollerStyle[a.style.transitionTimingFunction]=t,this.indicators)for(var e=this.indicators.length;e--;)this.indicators[e].transitionTimingFunction(t)},_translate:function(t,e){if(this.options.useTransform?this.scrollerStyle[a.style.transform]="translate("+t+"px,"+e+"px)"+this.translateZ:(t=i.round(t),e=i.round(e),this.scrollerStyle.left=t+"px",this.scrollerStyle.top=e+"px"),this.x=t,this.y=e,this.indicators)for(var n=this.indicators.length;n--;)this.indicators[n].updatePosition()},_initEvents:function(e){var i=e?a.removeEvent:a.addEvent,n=this.options.bindToWrapper?this.wrapper:t;i(t,"orientationchange",this),i(t,"resize",this),this.options.click&&i(this.wrapper,"click",this,!0),this.options.disableMouse||(i(this.wrapper,"mousedown",this),i(n,"mousemove",this),i(n,"mousecancel",this),i(n,"mouseup",this)),a.hasPointer&&!this.options.disablePointer&&(i(this.wrapper,"MSPointerDown",this),i(n,"MSPointerMove",this),i(n,"MSPointerCancel",this),i(n,"MSPointerUp",this)),a.hasTouch&&!this.options.disableTouch&&(i(this.wrapper,"touchstart",this),i(n,"touchmove",this),i(n,"touchcancel",this),i(n,"touchend",this)),i(this.scroller,"transitionend",this),i(this.scroller,"webkitTransitionEnd",this),i(this.scroller,"oTransitionEnd",this),i(this.scroller,"MSTransitionEnd",this)},getComputedPosition:function(){var e,i,n=t.getComputedStyle(this.scroller,null);return this.options.useTransform?(n=n[a.style.transform].split(")")[0].split(", "),e=+(n[12]||n[4]),i=+(n[13]||n[5])):(e=+n.left.replace(/[^-\d.]/g,""),i=+n.top.replace(/[^-\d.]/g,"")),{x:e,y:i}},_initIndicators:function(){function t(t){for(var e=a.indicators.length;e--;)t.call(a.indicators[e])}var e,i=this.options.interactiveScrollbars,n="string"!=typeof this.options.scrollbars,r=[],a=this;this.indicators=[],this.options.scrollbars&&(this.options.scrollY&&(e={el:s("v",i,this.options.scrollbars),interactive:i,defaultScrollbars:!0,customStyle:n,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenX:!1},this.wrapper.appendChild(e.el),r.push(e)),this.options.scrollX&&(e={el:s("h",i,this.options.scrollbars),interactive:i,defaultScrollbars:!0,customStyle:n,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenY:!1},this.wrapper.appendChild(e.el),r.push(e))),this.options.indicators&&(r=r.concat(this.options.indicators));for(var l=r.length;l--;)this.indicators.push(new o(this,r[l]));this.options.fadeScrollbars&&(this.on("scrollEnd",function(){t(function(){this.fade()})}),this.on("scrollCancel",function(){t(function(){this.fade()})}),this.on("scrollStart",function(){t(function(){this.fade(1)})}),this.on("beforeScrollStart",function(){t(function(){this.fade(1,!0)})})),this.on("refresh",function(){t(function(){this.refresh()})}),this.on("destroy",function(){t(function(){this.destroy()}),delete this.indicators})},_initWheel:function(){a.addEvent(this.wrapper,"wheel",this),a.addEvent(this.wrapper,"mousewheel",this),a.addEvent(this.wrapper,"DOMMouseScroll",this),this.on("destroy",function(){a.removeEvent(this.wrapper,"wheel",this),a.removeEvent(this.wrapper,"mousewheel",this),a.removeEvent(this.wrapper,"DOMMouseScroll",this)})},_wheel:function(t){if(this.enabled){t.preventDefault(),t.stopPropagation();var e,n,s,o,r=this;if(void 0===this.wheelTimeout&&r._execEvent("scrollStart"),clearTimeout(this.wheelTimeout),this.wheelTimeout=setTimeout(function(){r._execEvent("scrollEnd"),r.wheelTimeout=void 0},400),"deltaX"in t)e=-t.deltaX,n=-t.deltaY;else if("wheelDeltaX"in t)e=t.wheelDeltaX/120*this.options.mouseWheelSpeed,n=t.wheelDeltaY/120*this.options.mouseWheelSpeed;else if("wheelDelta"in t)e=n=t.wheelDelta/120*this.options.mouseWheelSpeed;else{if(!("detail"in t))return;e=n=-t.detail/3*this.options.mouseWheelSpeed}if(e*=this.options.invertWheelDirection,n*=this.options.invertWheelDirection,this.hasVerticalScroll||(e=n,n=0),this.options.snap)return s=this.currentPage.pageX,o=this.currentPage.pageY,e>0?s--:0>e&&s++,n>0?o--:0>n&&o++,void this.goToPage(s,o);s=this.x+i.round(this.hasHorizontalScroll?e:0),o=this.y+i.round(this.hasVerticalScroll?n:0),s>0?s=0:s<this.maxScrollX&&(s=this.maxScrollX),o>0?o=0:o<this.maxScrollY&&(o=this.maxScrollY),this.scrollTo(s,o,0)}},_initSnap:function(){this.currentPage={},"string"==typeof this.options.snap&&(this.options.snap=this.scroller.querySelectorAll(this.options.snap)),this.on("refresh",function(){var t,e,n,s,o,r,a=0,l=0,c=0,h=this.options.snapStepX||this.wrapperWidth,d=this.options.snapStepY||this.wrapperHeight;if(this.pages=[],this.wrapperWidth&&this.wrapperHeight&&this.scrollerWidth&&this.scrollerHeight){if(this.options.snap===!0)for(n=i.round(h/2),s=i.round(d/2);c>-this.scrollerWidth;){for(this.pages[a]=[],t=0,o=0;o>-this.scrollerHeight;)this.pages[a][t]={x:i.max(c,this.maxScrollX),y:i.max(o,this.maxScrollY),width:h,height:d,cx:c-n,cy:o-s},o-=d,t++;c-=h,a++}else for(r=this.options.snap,t=r.length,e=-1;t>a;a++)(0===a||r[a].offsetLeft<=r[a-1].offsetLeft)&&(l=0,e++),this.pages[l]||(this.pages[l]=[]),c=i.max(-r[a].offsetLeft,this.maxScrollX),o=i.max(-r[a].offsetTop,this.maxScrollY),n=c-i.round(r[a].offsetWidth/2),s=o-i.round(r[a].offsetHeight/2),this.pages[l][e]={x:c,y:o,width:r[a].offsetWidth,height:r[a].offsetHeight,cx:n,cy:s},c>this.maxScrollX&&l++;this.goToPage(this.currentPage.pageX||0,this.currentPage.pageY||0,0),this.options.snapThreshold%1===0?(this.snapThresholdX=this.options.snapThreshold,this.snapThresholdY=this.options.snapThreshold):(this.snapThresholdX=i.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width*this.options.snapThreshold),this.snapThresholdY=i.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height*this.options.snapThreshold))}}),this.on("flick",function(){var t=this.options.snapSpeed||i.max(i.max(i.min(i.abs(this.x-this.startX),1e3),i.min(i.abs(this.y-this.startY),1e3)),300);this.goToPage(this.currentPage.pageX+this.directionX,this.currentPage.pageY+this.directionY,t)})},_nearestSnap:function(t,e){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var n=0,s=this.pages.length,o=0;if(i.abs(t-this.absStartX)<this.snapThresholdX&&i.abs(e-this.absStartY)<this.snapThresholdY)return this.currentPage;for(t>0?t=0:t<this.maxScrollX&&(t=this.maxScrollX),e>0?e=0:e<this.maxScrollY&&(e=this.maxScrollY);s>n;n++)if(t>=this.pages[n][0].cx){t=this.pages[n][0].x;break}for(s=this.pages[n].length;s>o;o++)if(e>=this.pages[0][o].cy){e=this.pages[0][o].y;break}return n==this.currentPage.pageX&&(n+=this.directionX,0>n?n=0:n>=this.pages.length&&(n=this.pages.length-1),t=this.pages[n][0].x),o==this.currentPage.pageY&&(o+=this.directionY,0>o?o=0:o>=this.pages[0].length&&(o=this.pages[0].length-1),e=this.pages[0][o].y),{x:t,y:e,pageX:n,pageY:o}},goToPage:function(t,e,n,s){s=s||this.options.bounceEasing,t<this.pages.length?0>t&&(t=0):t=this.pages.length-1,e<this.pages[t].length?0>e&&(e=0):e=this.pages[t].length-1;var o=this.pages[t][e].x,r=this.pages[t][e].y;n=void 0===n?this.options.snapSpeed||i.max(i.max(i.min(i.abs(o-this.x),1e3),i.min(i.abs(r-this.y),1e3)),300):n,this.currentPage={x:o,y:r,pageX:t,pageY:e},this.scrollTo(o,r,n,s)},next:function(t,e){var i=this.currentPage.pageX,n=this.currentPage.pageY;i++,i>=this.pages.length&&this.hasVerticalScroll&&(i=0,n++),this.goToPage(i,n,t,e)},prev:function(t,e){var i=this.currentPage.pageX,n=this.currentPage.pageY;i--,0>i&&this.hasVerticalScroll&&(i=0,n--),this.goToPage(i,n,t,e)},_initKeys:function(){var e,i={pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40};if("object"==typeof this.options.keyBindings)for(e in this.options.keyBindings)"string"==typeof this.options.keyBindings[e]&&(this.options.keyBindings[e]=this.options.keyBindings[e].toUpperCase().charCodeAt(0));else this.options.keyBindings={};for(e in i)this.options.keyBindings[e]=this.options.keyBindings[e]||i[e];a.addEvent(t,"keydown",this),this.on("destroy",function(){a.removeEvent(t,"keydown",this)})},_key:function(t){if(this.enabled){var e,n=this.options.snap,s=n?this.currentPage.pageX:this.x,o=n?this.currentPage.pageY:this.y,r=a.getTime(),l=this.keyTime||0,c=.25;switch(this.options.useTransition&&this.isInTransition&&(e=this.getComputedPosition(),this._translate(i.round(e.x),i.round(e.y)),this.isInTransition=!1),this.keyAcceleration=200>r-l?i.min(this.keyAcceleration+c,50):0,t.keyCode){case this.options.keyBindings.pageUp:this.hasHorizontalScroll&&!this.hasVerticalScroll?s+=n?1:this.wrapperWidth:o+=n?1:this.wrapperHeight;break;case this.options.keyBindings.pageDown:this.hasHorizontalScroll&&!this.hasVerticalScroll?s-=n?1:this.wrapperWidth:o-=n?1:this.wrapperHeight;break;case this.options.keyBindings.end:s=n?this.pages.length-1:this.maxScrollX,o=n?this.pages[0].length-1:this.maxScrollY;break;case this.options.keyBindings.home:s=0,o=0;break;case this.options.keyBindings.left:s+=n?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.up:o+=n?1:60+this.keyAcceleration>>0;break;case this.options.keyBindings.right:s-=n?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.down:o-=n?1:60+this.keyAcceleration>>0;break;default:return}if(n)return void this.goToPage(s,o);s>0?(s=0,this.keyAcceleration=0):s<this.maxScrollX&&(s=this.maxScrollX,this.keyAcceleration=0),o>0?(o=0,this.keyAcceleration=0):o<this.maxScrollY&&(o=this.maxScrollY,this.keyAcceleration=0),this.scrollTo(s,o,0),this.keyTime=r}},_animate:function(t,e,i,n){function s(){var p,u,f,m=a.getTime();return d>m?(m=(m-h)/i,f=n(m),p=(t-l)*f+l,u=(e-c)*f+c,o._translate(p,u),void(o.isAnimating&&r(s))):(o.isAnimating=!1,o._translate(t,e),void(o.resetPosition(o.options.bounceTime)||o._execEvent("scrollEnd")))}var o=this,l=this.x,c=this.y,h=a.getTime(),d=h+i;this.isAnimating=!0,s()},handleEvent:function(t){switch(t.type){case"touchstart":case"MSPointerDown":case"mousedown":this._start(t);break;case"touchmove":case"MSPointerMove":case"mousemove":this._move(t);break;case"touchend":case"MSPointerUp":case"mouseup":case"touchcancel":case"MSPointerCancel":case"mousecancel":this._end(t);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"oTransitionEnd":case"MSTransitionEnd":this._transitionEnd(t);break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._wheel(t);break;case"keydown":this._key(t);break;case"click":t._constructed||(t.preventDefault(),t.stopPropagation())}}},o.prototype={handleEvent:function(t){switch(t.type){case"touchstart":case"MSPointerDown":case"mousedown":this._start(t);break;case"touchmove":case"MSPointerMove":case"mousemove":this._move(t);break;case"touchend":case"MSPointerUp":case"mouseup":case"touchcancel":case"MSPointerCancel":case"mousecancel":this._end(t)}},destroy:function(){this.options.interactive&&(a.removeEvent(this.indicator,"touchstart",this),a.removeEvent(this.indicator,"MSPointerDown",this),a.removeEvent(this.indicator,"mousedown",this),a.removeEvent(t,"touchmove",this),a.removeEvent(t,"MSPointerMove",this),a.removeEvent(t,"mousemove",this),a.removeEvent(t,"touchend",this),a.removeEvent(t,"MSPointerUp",this),a.removeEvent(t,"mouseup",this)),this.options.defaultScrollbars&&this.wrapper.parentNode.removeChild(this.wrapper)},_start:function(e){var i=e.touches?e.touches[0]:e;e.preventDefault(),e.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=i.pageX,this.lastPointY=i.pageY,this.startTime=a.getTime(),this.options.disableTouch||a.addEvent(t,"touchmove",this),this.options.disablePointer||a.addEvent(t,"MSPointerMove",this),this.options.disableMouse||a.addEvent(t,"mousemove",this),this.scroller._execEvent("beforeScrollStart")},_move:function(t){var e,i,n,s,o=t.touches?t.touches[0]:t;a.getTime(),this.moved||this.scroller._execEvent("scrollStart"),this.moved=!0,e=o.pageX-this.lastPointX,this.lastPointX=o.pageX,i=o.pageY-this.lastPointY,this.lastPointY=o.pageY,n=this.x+e,s=this.y+i,this._pos(n,s),t.preventDefault(),t.stopPropagation()},_end:function(e){if(this.initiated){if(this.initiated=!1,e.preventDefault(),e.stopPropagation(),a.removeEvent(t,"touchmove",this),a.removeEvent(t,"MSPointerMove",this),a.removeEvent(t,"mousemove",this),this.scroller.options.snap){var n=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),s=this.options.snapSpeed||i.max(i.max(i.min(i.abs(this.scroller.x-n.x),1e3),i.min(i.abs(this.scroller.y-n.y),1e3)),300);(this.scroller.x!=n.x||this.scroller.y!=n.y)&&(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=n,this.scroller.scrollTo(n.x,n.y,s,this.scroller.options.bounceEasing))}this.moved&&this.scroller._execEvent("scrollEnd")}},transitionTime:function(t){t=t||0,this.indicatorStyle[a.style.transitionDuration]=t+"ms",!t&&a.isBadAndroid&&(this.indicatorStyle[a.style.transitionDuration]="0.001s")},transitionTimingFunction:function(t){this.indicatorStyle[a.style.transitionTimingFunction]=t},refresh:function(){this.transitionTime(),this.indicatorStyle.display=this.options.listenX&&!this.options.listenY?this.scroller.hasHorizontalScroll?"block":"none":this.options.listenY&&!this.options.listenX?this.scroller.hasVerticalScroll?"block":"none":this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?"block":"none",this.scroller.hasHorizontalScroll&&this.scroller.hasVerticalScroll?(a.addClass(this.wrapper,"iScrollBothScrollbars"),a.removeClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="8px":this.wrapper.style.bottom="8px")):(a.removeClass(this.wrapper,"iScrollBothScrollbars"),a.addClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="2px":this.wrapper.style.bottom="2px")),this.wrapper.offsetHeight,this.options.listenX&&(this.wrapperWidth=this.wrapper.clientWidth,this.options.resize?(this.indicatorWidth=i.max(i.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px"):this.indicatorWidth=this.indicator.clientWidth,this.maxPosX=this.wrapperWidth-this.indicatorWidth,"clip"==this.options.shrink?(this.minBoundaryX=-this.indicatorWidth+8,this.maxBoundaryX=this.wrapperWidth-8):(this.minBoundaryX=0,this.maxBoundaryX=this.maxPosX),this.sizeRatioX=this.options.speedRatioX||this.scroller.maxScrollX&&this.maxPosX/this.scroller.maxScrollX),this.options.listenY&&(this.wrapperHeight=this.wrapper.clientHeight,this.options.resize?(this.indicatorHeight=i.max(i.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px"):this.indicatorHeight=this.indicator.clientHeight,this.maxPosY=this.wrapperHeight-this.indicatorHeight,"clip"==this.options.shrink?(this.minBoundaryY=-this.indicatorHeight+8,this.maxBoundaryY=this.wrapperHeight-8):(this.minBoundaryY=0,this.maxBoundaryY=this.maxPosY),this.maxPosY=this.wrapperHeight-this.indicatorHeight,this.sizeRatioY=this.options.speedRatioY||this.scroller.maxScrollY&&this.maxPosY/this.scroller.maxScrollY),this.updatePosition()},updatePosition:function(){var t=this.options.listenX&&i.round(this.sizeRatioX*this.scroller.x)||0,e=this.options.listenY&&i.round(this.sizeRatioY*this.scroller.y)||0;this.options.ignoreBoundaries||(t<this.minBoundaryX?("scale"==this.options.shrink&&(this.width=i.max(this.indicatorWidth+t,8),this.indicatorStyle.width=this.width+"px"),t=this.minBoundaryX):t>this.maxBoundaryX?"scale"==this.options.shrink?(this.width=i.max(this.indicatorWidth-(t-this.maxPosX),8),this.indicatorStyle.width=this.width+"px",t=this.maxPosX+this.indicatorWidth-this.width):t=this.maxBoundaryX:"scale"==this.options.shrink&&this.width!=this.indicatorWidth&&(this.width=this.indicatorWidth,this.indicatorStyle.width=this.width+"px"),e<this.minBoundaryY?("scale"==this.options.shrink&&(this.height=i.max(this.indicatorHeight+3*e,8),this.indicatorStyle.height=this.height+"px"),e=this.minBoundaryY):e>this.maxBoundaryY?"scale"==this.options.shrink?(this.height=i.max(this.indicatorHeight-3*(e-this.maxPosY),8),this.indicatorStyle.height=this.height+"px",e=this.maxPosY+this.indicatorHeight-this.height):e=this.maxBoundaryY:"scale"==this.options.shrink&&this.height!=this.indicatorHeight&&(this.height=this.indicatorHeight,this.indicatorStyle.height=this.height+"px")),this.x=t,this.y=e,this.scroller.options.useTransform?this.indicatorStyle[a.style.transform]="translate("+t+"px,"+e+"px)"+this.scroller.translateZ:(this.indicatorStyle.left=t+"px",this.indicatorStyle.top=e+"px")},_pos:function(t,e){0>t?t=0:t>this.maxPosX&&(t=this.maxPosX),0>e?e=0:e>this.maxPosY&&(e=this.maxPosY),t=this.options.listenX?i.round(t/this.sizeRatioX):this.scroller.x,e=this.options.listenY?i.round(e/this.sizeRatioY):this.scroller.y,this.scroller.scrollTo(t,e)},fade:function(t,e){if(!e||this.visible){clearTimeout(this.fadeTimeout),this.fadeTimeout=null;var i=t?250:500,n=t?0:300;t=t?"1":"0",this.wrapperStyle[a.style.transitionDuration]=i+"ms",this.fadeTimeout=setTimeout(function(t){this.wrapperStyle.opacity=t,this.visible=+t}.bind(this,t),n)}}},n.utils=a,"undefined"!=typeof module&&module.exports?module.exports=n:t.IScroll=n}(window,document,Math),t.IScroll=IScroll}.apply(t,arguments)})}(this),function(t,e){function i(){n.READY||(y.determineEventTypes(),v.each(n.gestures,function(t){w.register(t) }),y.onTouch(n.DOCUMENT,u,w.detect),y.onTouch(n.DOCUMENT,f,w.detect),n.READY=!0)}var n=function T(t,e){return new T.Instance(t,e||{})};n.VERSION="1.1.3",n.defaults={behavior:{userSelect:"none",touchAction:"pan-y",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},n.DOCUMENT=document,n.HAS_POINTEREVENTS=navigator.pointerEnabled||navigator.msPointerEnabled,n.HAS_TOUCHEVENTS="ontouchstart"in t,n.IS_MOBILE=/mobile|tablet|ip(ad|hone|od)|android|silk/i.test(navigator.userAgent),n.NO_MOUSEEVENTS=n.HAS_TOUCHEVENTS&&n.IS_MOBILE||n.HAS_POINTEREVENTS,n.CALCULATE_INTERVAL=25;var s={},o=n.DIRECTION_DOWN="down",r=n.DIRECTION_LEFT="left",a=n.DIRECTION_UP="up",l=n.DIRECTION_RIGHT="right",c=n.POINTER_MOUSE="mouse",h=n.POINTER_TOUCH="touch",d=n.POINTER_PEN="pen",p=n.EVENT_START="start",u=n.EVENT_MOVE="move",f=n.EVENT_END="end",m=n.EVENT_RELEASE="release",g=n.EVENT_TOUCH="touch";n.READY=!1,n.plugins=n.plugins||{},n.gestures=n.gestures||{};var v=n.utils={extend:function(t,i,n){for(var s in i)!i.hasOwnProperty(s)||t[s]!==e&&n||(t[s]=i[s]);return t},on:function(t,e,i){t.addEventListener(e,i,!1)},off:function(t,e,i){t.removeEventListener(e,i,!1)},each:function(t,i,n){var s,o;if("forEach"in t)t.forEach(i,n);else if(t.length!==e){for(s=0,o=t.length;o>s;s++)if(i.call(n,t[s],s,t)===!1)return}else for(s in t)if(t.hasOwnProperty(s)&&i.call(n,t[s],s,t)===!1)return},inStr:function(t,e){return t.indexOf(e)>-1},inArray:function(t,e){if(t.indexOf){var i=t.indexOf(e);return-1===i?!1:i}for(var n=0,s=t.length;s>n;n++)if(t[n]===e)return n;return!1},toArray:function(t){return Array.prototype.slice.call(t,0)},hasParent:function(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1},getCenter:function(t){var e=[],i=[],n=[],s=[],o=Math.min,r=Math.max;return 1===t.length?{pageX:t[0].pageX,pageY:t[0].pageY,clientX:t[0].clientX,clientY:t[0].clientY}:(v.each(t,function(t){e.push(t.pageX),i.push(t.pageY),n.push(t.clientX),s.push(t.clientY)}),{pageX:(o.apply(Math,e)+r.apply(Math,e))/2,pageY:(o.apply(Math,i)+r.apply(Math,i))/2,clientX:(o.apply(Math,n)+r.apply(Math,n))/2,clientY:(o.apply(Math,s)+r.apply(Math,s))/2})},getVelocity:function(t,e,i){return{x:Math.abs(e/t)||0,y:Math.abs(i/t)||0}},getAngle:function(t,e){var i=e.clientX-t.clientX,n=e.clientY-t.clientY;return 180*Math.atan2(n,i)/Math.PI},getDirection:function(t,e){var i=Math.abs(t.clientX-e.clientX),n=Math.abs(t.clientY-e.clientY);return n>i?t.clientY-e.clientY>0?a:o:t.clientX-e.clientX>0?r:l},getDistance:function(t,e){var i=e.clientX-t.clientX,n=e.clientY-t.clientY;return Math.sqrt(i*i+n*n)},getScale:function(t,e){return t.length<2||e.length<2?1:this.getDistance(e[0],e[1])/this.getDistance(t[0],t[1])},getRotation:function(t,e){return t.length<2||e.length<2?0:this.getAngle(e[1],e[0])-this.getAngle(t[1],t[0])},isVertical:function(t){return t==a||t==o},setPrefixedCss:function(t,e,i,n){var s=["","Webkit","Moz","O","ms"];e=v.toCamelCase(e);for(var o=0;o<s.length;o++){var r=e;if(s[o]&&(r=s[o]+r.slice(0,1).toUpperCase()+r.slice(1)),r in t.style){t.style[r]=(null==n||n)&&i||"";break}}},toggleBehavior:function(t,e,i){if(e&&t&&t.style){v.each(e,function(e,n){v.setPrefixedCss(t,n,e,i)});var n=i&&function(){return!1};"none"==e.userSelect&&(t.onselectstart=n),"none"==e.userDrag&&(t.ondragstart=n)}},toCamelCase:function(t){return t.replace(/[_-]([a-z])/g,function(t){return t[1].toUpperCase()})}},y=n.event={preventMouseEvents:!1,started:!1,shouldDetect:!1,on:function(t,e,i,n){var s=e.split(" ");v.each(s,function(e){v.on(t,e,i),n&&n(e)})},off:function(t,e,i,n){var s=e.split(" ");v.each(s,function(e){v.off(t,e,i),n&&n(e)})},onTouch:function(t,e,i){var o=this,r=function(s){var r,a=s.type.toLowerCase(),l=n.HAS_POINTEREVENTS,c=v.inStr(a,"mouse");c&&o.preventMouseEvents||(c&&e==p&&0===s.button?(o.preventMouseEvents=!1,o.shouldDetect=!0):l&&e==p?o.shouldDetect=1===s.buttons||b.matchType(h,s):c||e!=p||(o.preventMouseEvents=!0,o.shouldDetect=!0),l&&e!=f&&b.updatePointer(e,s),o.shouldDetect&&(r=o.doDetect.call(o,s,e,t,i)),r==f&&(o.preventMouseEvents=!1,o.shouldDetect=!1,b.reset()),l&&e==f&&b.updatePointer(e,s))};return this.on(t,s[e],r),r},doDetect:function(t,e,i,n){var s=this.getTouchList(t,e),o=s.length,r=e,a=s.trigger,l=o;e==p?a=g:e==f&&(a=m,l=s.length-(t.changedTouches?t.changedTouches.length:1)),l>0&&this.started&&(r=u),this.started=!0;var c=this.collectEventData(i,r,s,t);return e!=f&&n.call(w,c),a&&(c.changedLength=l,c.eventType=a,n.call(w,c),c.eventType=r,delete c.changedLength),r==f&&(n.call(w,c),this.started=!1),r},determineEventTypes:function(){var e;return e=n.HAS_POINTEREVENTS?t.PointerEvent?["pointerdown","pointermove","pointerup pointercancel lostpointercapture"]:["MSPointerDown","MSPointerMove","MSPointerUp MSPointerCancel MSLostPointerCapture"]:n.NO_MOUSEEVENTS?["touchstart","touchmove","touchend touchcancel"]:["touchstart mousedown","touchmove mousemove","touchend touchcancel mouseup"],s[p]=e[0],s[u]=e[1],s[f]=e[2],s},getTouchList:function(t,e){if(n.HAS_POINTEREVENTS)return b.getTouchList();if(t.touches){if(e==u)return t.touches;var i=[],s=[].concat(v.toArray(t.touches),v.toArray(t.changedTouches)),o=[];return v.each(s,function(t){v.inArray(i,t.identifier)===!1&&o.push(t),i.push(t.identifier)}),o}return t.identifier=1,[t]},collectEventData:function(t,e,i,n){var s=h;return v.inStr(n.type,"mouse")||b.matchType(c,n)?s=c:b.matchType(d,n)&&(s=d),{center:v.getCenter(i),timeStamp:Date.now(),target:n.target,touches:i,eventType:e,pointerType:s,srcEvent:n,preventDefault:function(){var t=this.srcEvent;t.preventManipulation&&t.preventManipulation(),t.preventDefault&&t.preventDefault()},stopPropagation:function(){this.srcEvent.stopPropagation()},stopDetect:function(){return w.stopDetect()}}}},b=n.PointerEvent={pointers:{},getTouchList:function(){var t=[];return v.each(this.pointers,function(e){t.push(e)}),t},updatePointer:function(t,e){t==f||t!=f&&1!==e.buttons?delete this.pointers[e.pointerId]:(e.identifier=e.pointerId,this.pointers[e.pointerId]=e)},matchType:function(t,e){if(!e.pointerType)return!1;var i=e.pointerType,n={};return n[c]=i===(e.MSPOINTER_TYPE_MOUSE||c),n[h]=i===(e.MSPOINTER_TYPE_TOUCH||h),n[d]=i===(e.MSPOINTER_TYPE_PEN||d),n[t]},reset:function(){this.pointers={}}},w=n.detection={gestures:[],current:null,previous:null,stopped:!1,startDetect:function(t,e){this.current||(this.stopped=!1,this.current={inst:t,startEvent:v.extend({},e),lastEvent:!1,lastCalcEvent:!1,futureCalcEvent:!1,lastCalcData:{},name:""},this.detect(e))},detect:function(t){if(this.current&&!this.stopped){t=this.extendEventData(t);var e=this.current.inst,i=e.options;return v.each(this.gestures,function(n){!this.stopped&&e.enabled&&i[n.name]&&n.handler.call(n,t,e)},this),this.current&&(this.current.lastEvent=t),t.eventType==f&&this.stopDetect(),t}},stopDetect:function(){this.previous=v.extend({},this.current),this.current=null,this.stopped=!0},getCalculatedData:function(t,e,i,s,o){var r=this.current,a=!1,l=r.lastCalcEvent,c=r.lastCalcData;l&&t.timeStamp-l.timeStamp>n.CALCULATE_INTERVAL&&(e=l.center,i=t.timeStamp-l.timeStamp,s=t.center.clientX-l.center.clientX,o=t.center.clientY-l.center.clientY,a=!0),(t.eventType==g||t.eventType==m)&&(r.futureCalcEvent=t),(!r.lastCalcEvent||a)&&(c.velocity=v.getVelocity(i,s,o),c.angle=v.getAngle(e,t.center),c.direction=v.getDirection(e,t.center),r.lastCalcEvent=r.futureCalcEvent||t,r.futureCalcEvent=t),t.velocityX=c.velocity.x,t.velocityY=c.velocity.y,t.interimAngle=c.angle,t.interimDirection=c.direction},extendEventData:function(t){var e=this.current,i=e.startEvent,n=e.lastEvent||i;(t.eventType==g||t.eventType==m)&&(i.touches=[],v.each(t.touches,function(t){i.touches.push({clientX:t.clientX,clientY:t.clientY})}));var s=t.timeStamp-i.timeStamp,o=t.center.clientX-i.center.clientX,r=t.center.clientY-i.center.clientY;return this.getCalculatedData(t,n.center,s,o,r),v.extend(t,{startEvent:i,deltaTime:s,deltaX:o,deltaY:r,distance:v.getDistance(i.center,t.center),angle:v.getAngle(i.center,t.center),direction:v.getDirection(i.center,t.center),scale:v.getScale(i.touches,t.touches),rotation:v.getRotation(i.touches,t.touches)}),t},register:function(t){var i=t.defaults||{};return i[t.name]===e&&(i[t.name]=!0),v.extend(n.defaults,i,!0),t.index=t.index||1e3,this.gestures.push(t),this.gestures.sort(function(t,e){return t.index<e.index?-1:t.index>e.index?1:0}),this.gestures}};n.Instance=function(t,e){var s=this;i(),this.element=t,this.enabled=!0,v.each(e,function(t,i){delete e[i],e[v.toCamelCase(i)]=t}),this.options=v.extend(v.extend({},n.defaults),e||{}),this.options.behavior&&v.toggleBehavior(this.element,this.options.behavior,!0),this.eventStartHandler=y.onTouch(t,p,function(t){s.enabled&&t.eventType==p?w.startDetect(s,t):t.eventType==g&&w.detect(t)}),this.eventHandlers=[]},n.Instance.prototype={on:function(t,e){var i=this;return y.on(i.element,t,e,function(t){i.eventHandlers.push({gesture:t,handler:e})}),i},off:function(t,e){var i=this;return y.off(i.element,t,e,function(t){var n=v.inArray({gesture:t,handler:e});n!==!1&&i.eventHandlers.splice(n,1)}),i},trigger:function(t,e){e||(e={});var i=n.DOCUMENT.createEvent("Event");i.initEvent(t,!0,!0),i.gesture=e;var s=this.element;return v.hasParent(e.target,s)&&(s=e.target),s.dispatchEvent(i),this},enable:function(t){return this.enabled=t,this},dispose:function(){var t,e;for(v.toggleBehavior(this.element,this.options.behavior,!1),t=-1;e=this.eventHandlers[++t];)v.off(this.element,e.gesture,e.handler);return this.eventHandlers=[],y.off(this.element,s[p],this.eventStartHandler),null}},function(t){function e(e,n){var s=w.current;if(n.options.dragMaxTouches<=0||e.touches.length<=n.options.dragMaxTouches)switch(e.eventType){case p:i=!1;break;case u:if(e.distance<n.options.dragMinDistance&&s.name!=t)return;var c=s.startEvent.center;if(s.name!=t&&(s.name=t,n.options.dragDistanceCorrection&&e.distance>0)){var h=Math.abs(n.options.dragMinDistance/e.distance);c.pageX+=e.deltaX*h,c.pageY+=e.deltaY*h,c.clientX+=e.deltaX*h,c.clientY+=e.deltaY*h,e=w.extendEventData(e)}(s.lastEvent.dragLockToAxis||n.options.dragLockToAxis&&n.options.dragLockMinDistance<=e.distance)&&(e.dragLockToAxis=!0);var d=s.lastEvent.direction;e.dragLockToAxis&&d!==e.direction&&(e.direction=v.isVertical(d)?e.deltaY<0?a:o:e.deltaX<0?r:l),i||(n.trigger(t+"start",e),i=!0),n.trigger(t,e),n.trigger(t+e.direction,e);var g=v.isVertical(e.direction);(n.options.dragBlockVertical&&g||n.options.dragBlockHorizontal&&!g)&&e.preventDefault();break;case m:i&&e.changedLength<=n.options.dragMaxTouches&&(n.trigger(t+"end",e),i=!1);break;case f:i=!1}}var i=!1;n.gestures.Drag={name:t,index:50,handler:e,defaults:{dragMinDistance:10,dragDistanceCorrection:!0,dragMaxTouches:1,dragBlockHorizontal:!1,dragBlockVertical:!1,dragLockToAxis:!1,dragLockMinDistance:25}}}("drag"),n.gestures.Gesture={name:"gesture",index:1337,handler:function(t,e){e.trigger(this.name,t)}},function(t){function e(e,n){var s=n.options,o=w.current;switch(e.eventType){case p:clearTimeout(i),o.name=t,i=setTimeout(function(){o&&o.name==t&&n.trigger(t,e)},s.holdTimeout);break;case u:e.distance>s.holdThreshold&&clearTimeout(i);break;case m:clearTimeout(i)}}var i;n.gestures.Hold={name:t,index:10,defaults:{holdTimeout:500,holdThreshold:2},handler:e}}("hold"),n.gestures.Release={name:"release",index:1/0,handler:function(t,e){t.eventType==m&&e.trigger(this.name,t)}},n.gestures.Swipe={name:"swipe",index:40,defaults:{swipeMinTouches:1,swipeMaxTouches:1,swipeVelocityX:.6,swipeVelocityY:.6},handler:function(t,e){if(t.eventType==m){var i=t.touches.length,n=e.options;if(i<n.swipeMinTouches||i>n.swipeMaxTouches)return;(t.velocityX>n.swipeVelocityX||t.velocityY>n.swipeVelocityY)&&(e.trigger(this.name,t),e.trigger(this.name+t.direction,t))}}},function(t){function e(e,n){var s,o,r=n.options,a=w.current,l=w.previous;switch(e.eventType){case p:i=!1;break;case u:i=i||e.distance>r.tapMaxDistance;break;case f:!v.inStr(e.srcEvent.type,"cancel")&&e.deltaTime<r.tapMaxTime&&!i&&(s=l&&l.lastEvent&&e.timeStamp-l.lastEvent.timeStamp,o=!1,l&&l.name==t&&s&&s<r.doubleTapInterval&&e.distance<r.doubleTapDistance&&(n.trigger("doubletap",e),o=!0),(!o||r.tapAlways)&&(a.name=t,n.trigger(a.name,e)))}}var i=!1;n.gestures.Tap={name:t,index:100,handler:e,defaults:{tapMaxTime:250,tapMaxDistance:10,tapAlways:!0,doubleTapDistance:20,doubleTapInterval:300}}}("tap"),n.gestures.Touch={name:"touch",index:-1/0,defaults:{preventDefault:!1,preventMouse:!1},handler:function(t,e){return e.options.preventMouse&&t.pointerType==c?void t.stopDetect():(e.options.preventDefault&&t.preventDefault(),void(t.eventType==g&&e.trigger("touch",t)))}},function(t){function e(e,n){switch(e.eventType){case p:i=!1;break;case u:if(e.touches.length<2)return;var s=Math.abs(1-e.scale),o=Math.abs(e.rotation);if(s<n.options.transformMinScale&&o<n.options.transformMinRotation)return;w.current.name=t,i||(n.trigger(t+"start",e),i=!0),n.trigger(t,e),o>n.options.transformMinRotation&&n.trigger("rotate",e),s>n.options.transformMinScale&&(n.trigger("pinch",e),n.trigger("pinch"+(e.scale<1?"in":"out"),e));break;case m:i&&e.changedLength<2&&(n.trigger(t+"end",e),i=!1)}}var i=!1;n.gestures.Transform={name:t,index:45,defaults:{transformMinScale:.01,transformMinRotation:1},handler:e}}("transform"),"function"==typeof define&&define.amd?define("hammerjs",[],function(){return n}):"undefined"!=typeof module&&module.exports?module.exports=n:t.Hammer=n}(window),function(t,e){function i(t,i){Date.now||(Date.now=function(){return(new Date).getTime()}),t.utils.each(["on","off"],function(n){t.utils[n]=function(t,s,o){i(t)[n](s,function(t){var n=i.extend({},t.originalEvent,t);n.button===e&&(n.button=t.which-1),o.call(this,n)})}}),t.Instance.prototype.trigger=function(t,e){var n=i(this.element);return n.has(e.target).length&&(n=i(e.target)),n.trigger({type:t,gesture:e})},i.fn.hammer=function(e){return this.each(function(){var n=i(this),s=n.data("hammer");s?s&&e&&t.utils.extend(s.options,e):n.data("hammer",new t(this,e||{}))})}}"function"==typeof define&&define.amd?define("jquery.hammer",["hammerjs","jquery"],i):i(t.Hammer,t.jQuery||t.Zepto)}(window),define("comp/forms/selectionList/mobileListView",["backbone","underscore","sifter","jquery","comp/utils","text!./sf-selection-list-template.html","iscroll","jquery.hammer"],function(t,e,i,n,s,o,r){function a(t,e){if("string"!=typeof e||e.length){var i="string"==typeof e?RegExp(e,"i"):e,n=function(t){var e=0;if(3===t.nodeType){var s=t.data.search(i);if(s>=0&&t.data.length>0){var o=t.data.match(i),r=document.createElement("span");r.className="highlight";var a=t.splitText(s),l=(a.splitText(o[0].length),a.cloneNode(!0));r.appendChild(l),a.parentNode.replaceChild(r,a),e=1}}else if(1===t.nodeType&&t.childNodes&&!/(script|style)/i.test(t.tagName))for(var c=0;c<t.childNodes.length;++c)c+=n(t.childNodes[c]);return e};return t.each(function(){n(this)})}}return t.View.extend({template:e.template(s.getTemplate(o,"mobile-list-template"),{initialHeight:window.innerHeight}),listItemTemplate:e.template(s.getTemplate(o,"mobile-list-item-template")),groupTemplate:e.template(s.getTemplate(o,"mobile-group-header-template")),groupCache:null,itemCache:null,itemSifter:null,className:"mobile-list-view",initialize:function(t){t=t||{},this.options=t,this.initializeItemCache()},valueEquals:function(t,e){return t&&!e||e&&!t?!1:!t&!e?!0:t.get(this.options.valueField)===e.get(this.options.valueField)},render:function(){return this.$el.html(this.template),this.options.autoHeight?this.setHeight(n(window).innerHeight()):this.options.height&&this.setHeight(this.options.height),this.renderList(),this.createScroller(),this},refreshScroll:function(){this.iscroll&&this.iscroll.refresh()},setHeight:function(t){this.$(".dropdown_content").height(t),this.refreshScroll()},createScroller:function(){var t=this;s.isWindowsPhone||!this.options.customScroller?this.$(".dropdown_content").addClass("no-iscroll"):(this.iscroll=new r(this.$(".dropdown_content")[0],{tap:!0,scrollbars:!0}),this.iscroll.on("beforeScrollStart",function(){t.trigger("beforeScrollStart")}))},refresh:function(){this.initializeItemCache(),this.renderList()},initializeItemCache:function(){var e=this;if(this.groupCache=null,this.itemCache=null,this.itemSifter=null,this.itemCache=new t.Collection(this.options.data.map(function(i){var s=new t.Model;return s.set("id",i.get(e.options.valueField)),s.set("data",i),s.set("html",n(e.listItemTemplate({value:i.get(e.options.valueField),label:e.options.renderOption?e.options.renderOption.call(e,i,window.decodeURIComponent):i.get(e.options.labelField)}).trim())),s})),this.itemSifter=new i(this.itemCache.map(function(t){return t.get("data").attributes})),this.options.group){var s=this.options.group.order,o=this.options.group.valueField;this.groupCache=this.options.group.data.clone(),s&&(this.groupCache.comparator=function(t,e){return s.indexOf(t.get(o))-s.indexOf(e.get(o))},this.groupCache.sort()),this.groupCache=new t.Collection(this.groupCache.map(function(i){var s={};s[e.options.group.field]=i.get(o);var r=new t.Model;return r.set("data",i),r.set("html",n(e.groupTemplate({label:e.options.group.renderGroupHeader?e.options.group.renderGroupHeader.call(e,i,window.decodeURIComponent):i.get(e.options.group.labelField)}).trim())),r}))}},renderList:function(i,n){function s(t){e.each(t,function(t){var e=t.get(o.options.valueField);if(e){var s=o.itemCache.get(e).get("html");""===i||n?(n&&o.valueEquals(t,n)&&(s=s.clone(),s.addClass("selected")),r.append(s)):r.append(a(s.clone(),l))}})}var o=this,r=this.$("ul"),i=i||"",l=null,c=e.isArray(this.options.searchField)?this.options.searchField:[this.options.searchField],h=this.options.data;if(r.empty(),!n&&""!==i){var d=this.itemSifter.search(i,{fields:c});l=d.tokens[0].regex,h=new t.Collection(e.map(e.pluck(d.items,"id"),function(t){return o.options.data.at(t)})),o.trigger("search",h)}this.options.group?this.groupCache.each(function(t){var e={};e[o.options.group.field]=t.get("data").get(o.options.group.valueField);var i=h.where(e);i.length>0&&(r.append(t.get("html")),s(i))}):s(h.models),this.$("li.option").hammer({}).on("tap",e.bind(this.handleTap,this)),this.refreshScroll()},handleTap:function(t){if(!this.iscroll||t.originalEvent){var e=n(t.currentTarget).attr("data-value");this.trigger("item-tapped",e)}}})}),define("comp/forms/selectionList/mobileView",["./abstractView","backbone","underscore","comp/utils","comp/container/modal","./mobileListView","comp/forms/field","text!./sf-selection-list-template.html"],function(t,e,i,n,s,o,r,a){return t.extend({mobileSearchTemplate:i.template(n.getTemplate(a,"mobile-search-template")),events:{"click .selectize-input-overlay":"handleOverlayClick"},initialize:function(e){this.preCompiledTemplate=i.template(n.getTemplate(a,"mobile")),this.boundFixHeight=i.bind(this.fixHeight,this),i.defaults(e,{autoHeight:!0,customScroller:!0,height:300}),t.prototype.initialize.call(this,e)},handleOverlayClick:function(){this.isEnabled()&&this.openListView()},customRender:function(){var t=this,e=[];this.options.hideSearch||e.push(this.mobileSearchTemplate({placeholder:this.options.placeholder,searchFieldId:n.generateID()})),this.mobileList=new o(i.omit(this.options,"el","id")),e.push(this.mobileList),this.modal=new s({show:!1,header:{title:this.options.label,closeButton:!0},autoHeight:!0,items:e,className:"selectionlist-modal"}),this.modal.$("form").on("submit",function(t){t.preventDefault(),$(this).find("input.searchField").blur()}),this.modal.on("modalShown",function(){t.mobileList.refreshScroll(),t.options.autoHeight&&t.boundFixHeight(),t.trigger("dropDownOpen")}),this.modal.on("modalCalculatedHeight",function(){t.boundFixHeight()}),this.modal.on("modalHidden",function(){t.trigger("dropDownClose")}),this.mobileList.on("item-tapped",function(e){t.close(),t.setValue(e)}),this.mobileList.on("search",function(e){t.trigger("search",e)}),this.mobileList.on("beforeScrollStart",function(){t.modal.$(".searchField").blur()}),this.configureSearch()},fixHeight:function(){var t=this.modal.$(".modal-dialog").height()-(this.mobileList.$(".dropdown_content").offset().top-this.modal.$(".modal-dialog").offset().top);this.mobileList.setHeight(t)},openListView:function(){this.valueInSearch?(this.modal.$(".searchField").val(this.getValue().get(this.options.labelField)),this.modal.$(".searchField").one("focus",function(){$(this).val("")}),this.mobileList.renderList(null,this.getValue())):(this.modal.$(".searchField").val(""),this.mobileList.renderList("")),this.modal.show()},refresh:function(){this.mobileList&&this.mobileList.refresh()},close:function(){this.modal.hide()},disable:function(){this.close(),this.$(".selectize-input").addClass("disabled"),r.prototype.disable.call(this)},enable:function(){this.$(".selectize-input").removeClass("disabled"),r.prototype.enable.call(this)},setValue:function(e){"string"==typeof e?e=this.findById(e):(!e||e&&null==this.findById(e.get(this.options.valueField)))&&(e=null),this.$("input[type=hidden]").val(e?e.get(this.options.valueField):""),this.$("input[type=text]").val(e?e.get(this.options.labelField):""),this.valueInSearch=!!e,t.prototype.setValue.call(this,e)},configureSearch:function(){var t=this;this.modal.$el.find(".searchField").on("input",function(){t.mobileList.renderList($(this).val())})},remove:function(){this.modal.remove(),t.prototype.remove.apply(this,arguments)}})}),define("comp/forms/selectionList/main",["comp/utils/device-dependent-view","./desktopView","./mobileView"],function(t,e){return t.extend({mobile:e,desktop:e})}),define("comp/forms/selectionList",["comp/forms/selectionList/main"],function(t){return t}),define("text!comp/forms/textField/text-field-template.html",[],function(){return'<script type="text/x-jquery-tmpl" data-template-id="main"><input id="<%=id%>" name="<%=inputName%>-string" type="<%=fieldType%>" class="form-control" tabIndex="<%=tabIndex%>" data-format="string" <% if (placeholder) { %> placeholder="<%=placeholder%>" <% } %> ><input type="hidden" name="<%=inputName%>" data-format="raw"><\/script>'}),function(t){"function"==typeof define&&define.amd?define("jquery.mask",["jquery"],t):t(window.jQuery||window.Zepto)}(function(t){var e=function(e,i,n){var s,o,r=this;e=t(e),i="function"==typeof i?i(e.val(),void 0,e,n):i,r.init=function(){n=n||{},r.byPassKeys=[9,16,17,18,36,37,38,39,40,91],r.translation={0:{pattern:/\d/},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},S:{pattern:/[a-zA-Z]/}},r.translation=t.extend({},r.translation,n.translation),r=t.extend(!0,{},r,n),o=a.getRegexMask(),e.each(function(){n.maxlength!==!1&&e.attr("maxlength",i.length),n.placeholder&&e.attr("placeholder",n.placeholder),e.attr("autocomplete","off"),a.destroyEvents(),a.events();var t=a.getCaret();a.val(a.getMasked()),a.setCaret(t+a.getMaskCharactersBeforeCount(t,!0))})};var a={getCaret:function(){var t,i=0,n=e.get(0),s=document.selection,o=n.selectionStart;return s&&!~navigator.appVersion.indexOf("MSIE 10")?(t=s.createRange(),t.moveStart("character",e.is("input")?-e.val().length:-e.text().length),i=t.text.length):(o||"0"===o)&&(i=o),i},setCaret:function(t){if(e.is(":focus")){var i,n=e.get(0);n.setSelectionRange?n.setSelectionRange(t,t):n.createTextRange&&(i=n.createTextRange(),i.collapse(!0),i.moveEnd("character",t),i.moveStart("character",t),i.select())}},events:function(){e.on("keydown.mask",function(){s=a.val()}),e.on("keyup.mask",a.behaviour),e.on("paste.mask drop.mask",function(){setTimeout(function(){e.keydown().keyup()},100)}),e.on("change.mask",function(){e.data("changeCalled",!0)}),e.on("blur.mask",function(e){var i=t(e.target);i.prop("defaultValue")!==i.val()&&(i.prop("defaultValue",i.val()),i.data("changeCalled")||i.trigger("change")),i.data("changeCalled",!1)}),e.on("focusout.mask",function(){n.clearIfNotMatch&&!o.test(a.val())&&a.val("")})},getRegexMask:function(){for(var t,e,n,s,o,a,l=[],c=0;c<i.length;c++)t=r.translation[i[c]],t?(e=(""+t.pattern).replace(/.{1}$|^.{1}/g,""),n=t.optional,s=t.recursive,s?(l.push(i[c]),o={digit:i[c],pattern:e}):l.push(n||s?e+"?":e)):l.push("\\"+i[c]);return a=l.join(""),o&&(a=a.replace(RegExp("("+o.digit+"(.*"+o.digit+")?)"),"($1)?").replace(RegExp(o.digit,"g"),o.pattern)),RegExp(a)},destroyEvents:function(){e.off("keydown.mask keyup.mask paste.mask drop.mask change.mask blur.mask focusout.mask").removeData("changeCalled")},val:function(t){var i=e.is("input");return arguments.length>0?i?e.val(t):e.text(t):i?e.val():e.text()},getMaskCharactersBeforeCount:function(t,e){for(var n=0,s=0,o=i.length;o>s&&t>s;s++)r.translation[i.charAt(s)]||(t=e?t+1:t,n++);return n},determineCaretPos:function(t,e,n,s){var o=r.translation[i.charAt(Math.min(t-1,i.length-1))];return o?Math.min(t+n-e-s,n):a.determineCaretPos(t+1,e,n,s)},behaviour:function(e){e=e||window.event;var i=e.keyCode||e.which;if(-1===t.inArray(i,r.byPassKeys)){var n=a.getCaret(),s=a.val(),o=s.length,l=o>n,c=a.getMasked(),h=c.length,d=a.getMaskCharactersBeforeCount(h-1)-a.getMaskCharactersBeforeCount(o-1);return c!==s&&a.val(c),!l||65===i&&e.ctrlKey||(8!==i&&46!==i&&(n=a.determineCaretPos(n,o,h,d)),a.setCaret(n)),a.callbacks(e)}},getMasked:function(t){var e,s,o=[],l=a.val(),c=0,h=i.length,d=0,p=l.length,u=1,f="push",m=-1;for(n.reverse?(f="unshift",u=-1,e=0,c=h-1,d=p-1,s=function(){return c>-1&&d>-1}):(e=h-1,s=function(){return h>c&&p>d});s();){var g=i.charAt(c),v=l.charAt(d),y=r.translation[g];y?(v.match(y.pattern)?(o[f](v),y.recursive&&(-1===m?m=c:c===e&&(c=m-u),e===m&&(c-=u)),c+=u):y.optional&&(c+=u,d-=u),d+=u):(t||o[f](g),v===g&&(d+=u),c+=u)}var b=i.charAt(e);return h!==p+1||r.translation[b]||o.push(b),o.join("")},callbacks:function(t){var o=a.val(),r=a.val()!==s;r===!0&&"function"==typeof n.onChange&&n.onChange(o,t,e,n),r===!0&&"function"==typeof n.onKeyPress&&n.onKeyPress(o,t,e,n),"function"==typeof n.onComplete&&o.length===i.length&&n.onComplete(o,t,e,n)}};r.remove=function(){var t=a.getCaret(),e=a.getMaskCharactersBeforeCount(t);a.destroyEvents(),a.val(r.getCleanVal()).removeAttr("maxlength"),a.setCaret(t-e)},r.getCleanVal=function(){return a.getMasked(!0)},r.init()};t.fn.mask=function(i,n){return this.unmask(),this.each(function(){t(this).data("mask",new e(this,i,n))})},t.fn.unmask=function(){return this.each(function(){try{t(this).data("mask").remove()}catch(e){}})},t.fn.cleanVal=function(){return t(this).data("mask").getCleanVal()},t("*[data-mask]").each(function(){var e=t(this),i={},n="data-mask-";"true"===e.attr(n+"reverse")&&(i.reverse=!0),"false"===e.attr(n+"maxlength")&&(i.maxlength=!1),"true"===e.attr(n+"clearifnotmatch")&&(i.clearIfNotMatch=!0),e.mask(e.attr("data-mask"),i)})}),define("comp/forms/textField/main",["comp/forms/field","text!./text-field-template.html","jquery","backbone","underscore","comp/utils","sf","jquery.mask"],function(t,e,i,n,s,o){var r=s.template(o.getTemplate(e,"main")),a=t.extend({events:{"blur input[data-format=string]":"blurHandler","focus input[data-format=string]":"focusHandler"},initialize:function(e){if(e=e||{},"hidden"===e.fieldType)throw Error('Field type cannot be "hidden".');s.defaults(e,{fieldType:"text",placeholder:"",formatter:{type:"default"}}),e.mask&&s.defaults(e.mask,{mask:void 0,translation:{},reverse:!1,maxLength:!1,clearIfNotMatch:!1}),this.formatter=this.createFormatter(e),void 0===this.formatter&&this.createFormatter(e),t.prototype.initialize.call(this,e),this.value=""},render:function(){this.$el.html(r({placeholder:this.options.placeholder,inputName:this.options.inputName,tabIndex:this.options.tabIndex,id:this.id,fieldType:this.options.fieldType})),t.prototype.render.apply(this,arguments),this.inputString=this.$el.find("input[data-format=string]"),this.inputRaw=this.$el.find("input[data-format!=string]"),void 0!==this.options.mask&&void 0!==this.options.mask.mask&&this.inputString.mask(this.options.mask.mask,this.getMaskOptions())},createFormatter:function(t){var e=t.formatter;if(s.isObject(e)&&e.type){var i=o.getFormatter(e.type);return new i(e)}return s.isObject(e)&&!e.type?s.extend({},e):void 0},getMaskOptions:function(){var t={maxlength:this.options.mask.maxLength,reverse:this.options.mask.reverse,clearIfNotMatch:this.options.mask.clearIfNotMatch};return t.translation=this.options.mask.translation,t},blurHandler:function(t){this.setValueString(i(t.target).val())},focusHandler:function(){this.inputString.val(this.formatter.editFormat(this.getValue()))},setValue:function(e){this.inputString.val(this.formatter.format(e)),this.inputRaw.val(this.formatter.dataFormat(e)),t.prototype.setValue.call(this,e)},setValueString:function(t){var e;try{e=this.formatter.parse(t)}catch(i){return void this.setErrors([i.message])}this.setValue(e)},getValueString:function(){return this.inputString.val()}});return a}),define("comp/forms/textField",["comp/forms/textField/main"],function(t){return t}),define("comp/forms/IBANField/main",["comp/forms/textField","jquery","backbone","underscore","comp/utils","sf"],function(t,e,i,n){var s=t.extend({initialize:function(e){e=e||{},n.extend(e,{fieldType:"text",formatter:{type:"iban"},validator:{type:"iban"}}),t.prototype.initialize.call(this,e)}});return s}),define("comp/forms/IBANField",["comp/forms/IBANField/main"],function(t){return t}),define("comp/forms/numberField/main",["comp/forms/textField","jquery","backbone","underscore","comp/utils"],function(t,e,i,n,s){var o=t.extend({initialize:function(e){e=e||{},n.defaults(e,{decimalSeparator:",",integerCount:9,fractionCount:2}),n.extend(e,{fieldType:s.isMobile&&!s.isIOS?"tel":"text",mask:{mask:this.createMask(e)},formatter:{type:"number",decimalSeparator:e.decimalSeparator,integerCount:e.integerCount,fractionCount:e.fractionCount}}),t.prototype.initialize.call(this,e)},createMask:function(t){var e=[],i=0;if(t.integerCount>0)for(i=0;i<t.integerCount;i++)e.push("9");else e.push("#");if(t.fractionCount>0)for(e.push(t.decimalSeparator),i=0;i<t.fractionCount;i++)e.push("0");return e.join("")}});return o}),define("comp/forms/numberField",["comp/forms/numberField/main"],function(t){return t}),define("comp/forms/main",["./selectionList/main","./field/main","./textField/main","./IBANField/main","./numberField/main"],function(t,e,i,n,s){return{SelectionList:t,Field:e,TextField:i,IBANField:n,NumberField:s}}),define("comp/forms",["comp/forms/main"],function(t){return t}),define("text!comp/container/card/card-template.html",[],function(){return'<script type="text/x-jquery-tmpl" data-template-id="card"><div id="<%=id%>" class="container card"></div><\/script><script type="text/x-jquery-tmpl" data-template-id="card-item"><div id="<%=id%>" class="card-item <% if (active) { %>active<% } %>"></div><\/script>'}),define("comp/container/card/main",["comp/container/container","backbone","underscore","text!./card-template.html","comp/utils"],function(t,e,i,n,s){var o=i.template(s.getTemplate(n,"card")),r=i.template(s.getTemplate(n,"card-item"));return t.extend({initialize:function(e){e=e||{},i.extend(e,{id:s.generateID()}),i.defaults(e,{activeItem:0,infinite:!1}),i.defaults(this,{containerTemplate:o,itemTemplate:r}),t.prototype.initialize.call(this,e)},render:function(){var t,e=this;this.$el.html(this.containerTemplate(this.options)),t=this.getChildLocation(),i.each(this.options.items,function(i,n){t.append(e.renderItem(i,n,n===e.options.activeItem))})},renderItem:function(e,i,n){var o=$(this.itemTemplate({id:s.generateID(),active:n}).trim());return o.append(t.prototype.renderItem.call(this,e)),o},renderActiveItem:function(t){var e=this.getChildLocation().find("> *");e.eq(t.oldIndex).removeClass("active"),e.eq(t.newIndex).addClass("active")},getChildLocation:function(){return this.$el.find(".card")},nextCycleIndex:function(){var t=this.getActiveItemIndex()+1;return this.isWithinBounds(t)?t:this.options.infinite?0:-1},prevCycleIndex:function(){var t=this.getActiveItemIndex()-1;return this.isWithinBounds(t)?t:this.options.infinite?this.getNumberOfItems()-1:-1},setActiveItem:function(t){var e,n,s;return i.isNumber(t)&&(s=t),i.isString(t)&&"prev"===t&&(s=this.prevCycleIndex()),i.isString(t)&&"next"===t&&(s=this.nextCycleIndex()),this.checkBounds(s),s!==this.options.activeItem?(e=this.getActiveItem(),n=this.options.activeItem,this.options.activeItem=s,this.renderActiveItem({newIndex:this.options.activeItem,oldIndex:n,next:i.isString(t)&&"next"===t,prev:i.isString(t)&&"prev"===t}),this.trigger("activeItemChange",this.getActiveItem(),e,this.getActiveItemIndex()),!0):!1 },getActiveItem:function(){return this.getItems()[this.options.activeItem]},getActiveItemIndex:function(){return this.options.activeItem},canCycle:function(){return-1!=this.nextCycleIndex()},canCycleBack:function(){return-1!=this.prevCycleIndex()},cycle:function(){this.canCycle()&&this.setActiveItem("next")},cycleBack:function(){this.canCycleBack()&&this.setActiveItem("prev")}})}),define("comp/container/card",["comp/container/card/main"],function(t){return t}),define("text!comp/container/carousel/carousel-template.html",[],function(){return'<script type="text/x-jquery-tmpl" data-template-id="carousel-indicator"><li class="carousel-indicator <% if (active) { %> active <% } %>" data-target="#<%=containerID%>" data-slide-to="<%=index%>"></li><\/script><script type="text/x-jquery-tmpl" data-template-id="carousel-item"><div id="<%=id%>" class="carousel-item <% if (active) { %>active<% } %>"></div><\/script><script type="text/x-jquery-tmpl" data-template-id="carousel"><div id="<%=id%>" class="container card carousel"><div class="carousel-inner"></div></div><\/script>'}),function(t){"function"==typeof define&&define.amd?define("slick",["jquery"],t):t(jQuery)}(function(t){var e=window.Slick||{};e=function(){function e(e,n){var s,o,r=this;if(r.defaults={accessibility:!0,appendArrows:t(e),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(t,e){return'<button type="button" data-role="none">'+(e+1)+"</button>"},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",fade:!1,focusOnSelect:!1,infinite:!0,lazyLoad:"ondemand",onBeforeChange:null,onAfterChange:null,onInit:null,onReInit:null,pauseOnHover:!0,pauseOnDotsHover:!1,responsive:null,rtl:!1,slide:"div",slidesToShow:1,slidesToScroll:1,speed:300,swipe:!0,touchMove:!0,touchThreshold:5,useCSS:!0,vertical:!1},r.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentSlide:0,currentLeft:null,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1},t.extend(r,r.initials),r.activeBreakpoint=null,r.animType=null,r.animProp=null,r.breakpoints=[],r.breakpointSettings=[],r.cssTransitions=!1,r.paused=!1,r.positionProp=null,r.$slider=t(e),r.$slidesCache=null,r.transformType=null,r.transitionType=null,r.windowWidth=0,r.windowTimer=null,r.options=t.extend({},r.defaults,n),r.originalSettings=r.options,s=r.options.responsive||null,s&&s.length>-1){for(o in s)s.hasOwnProperty(o)&&(r.breakpoints.push(s[o].breakpoint),r.breakpointSettings[s[o].breakpoint]=s[o].settings);r.breakpoints.sort(function(t,e){return e-t})}r.autoPlay=t.proxy(r.autoPlay,r),r.autoPlayClear=t.proxy(r.autoPlayClear,r),r.changeSlide=t.proxy(r.changeSlide,r),r.selectHandler=t.proxy(r.selectHandler,r),r.setPosition=t.proxy(r.setPosition,r),r.swipeHandler=t.proxy(r.swipeHandler,r),r.dragHandler=t.proxy(r.dragHandler,r),r.keyHandler=t.proxy(r.keyHandler,r),r.autoPlayIterator=t.proxy(r.autoPlayIterator,r),r.instanceUid=i++,r.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,r.init()}var i=0;return e}(),e.prototype.addSlide=function(e,i,n){var s=this;if("boolean"==typeof i)n=i,i=null;else if(0>i||i>=s.slideCount)return!1;s.unload(),"number"==typeof i?0===i&&0===s.$slides.length?t(e).appendTo(s.$slideTrack):n?t(e).insertBefore(s.$slides.eq(i)):t(e).insertAfter(s.$slides.eq(i)):n===!0?t(e).prependTo(s.$slideTrack):t(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,i){t(i).attr("index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateSlide=function(e,i){var n={},s=this;s.options.rtl===!0&&s.options.vertical===!1&&(e=-e),s.transformsEnabled===!1?s.options.vertical===!1?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,i):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,i):s.cssTransitions===!1?t({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(t){s.options.vertical===!1?(n[s.animType]="translate("+t+"px, 0px)",s.$slideTrack.css(n)):(n[s.animType]="translate(0px,"+t+"px)",s.$slideTrack.css(n))},complete:function(){i&&i.call()}}):(s.applyTransition(),n[s.animType]=s.options.vertical===!1?"translate3d("+e+"px, 0px, 0px)":"translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(n),i&&setTimeout(function(){s.disableTransition(),i.call()},s.options.speed))},e.prototype.applyTransition=function(t){var e=this,i={};i[e.transitionType]=e.options.fade===!1?e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:"opacity "+e.options.speed+"ms "+e.options.cssEase,e.options.fade===!1?e.$slideTrack.css(i):e.$slides.eq(t).css(i)},e.prototype.autoPlay=function(){var t=this;t.autoPlayTimer&&clearInterval(t.autoPlayTimer),t.slideCount>t.options.slidesToShow&&t.paused!==!0&&(t.autoPlayTimer=setInterval(t.autoPlayIterator,t.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var t=this;t.autoPlayTimer&&clearInterval(t.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var e=this,i=null!=e.options.asNavFor?t(e.options.asNavFor).getSlick():null;e.options.infinite===!1?1===e.direction?(e.currentSlide+1===e.slideCount-1&&(e.direction=0),e.slideHandler(e.currentSlide+e.options.slidesToScroll),null!=i&&i.slideHandler(i.currentSlide+i.options.slidesToScroll)):(e.currentSlide-1===0&&(e.direction=1),e.slideHandler(e.currentSlide-e.options.slidesToScroll),null!=i&&i.slideHandler(i.currentSlide-i.options.slidesToScroll)):(e.slideHandler(e.currentSlide+e.options.slidesToScroll),null!=i&&i.slideHandler(i.currentSlide+i.options.slidesToScroll))},e.prototype.buildArrows=function(){var e=this;e.options.arrows===!0&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow=t(e.options.prevArrow),e.$nextArrow=t(e.options.nextArrow),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.appendTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),e.options.infinite!==!0&&e.$prevArrow.addClass("slick-disabled"))},e.prototype.buildDots=function(){var e,i,n=this;if(n.options.dots===!0&&n.slideCount>n.options.slidesToShow){for(i='<ul class="'+n.options.dotsClass+'">',e=0;e<=n.getDotCount();e+=1)i+="<li>"+n.options.customPaging.call(this,n,e)+"</li>";i+="</ul>",n.$dots=t(i).appendTo(n.$slider),n.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,i){t(i).attr("index",e)}),e.$slidesCache=e.$slides,e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?t('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),e.options.centerMode===!0&&(e.options.slidesToScroll=1,e.options.slidesToShow%2===0&&(e.options.slidesToShow=3)),t("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.options.accessibility===!0&&e.$list.prop("tabIndex",0),e.setSlideClasses("number"==typeof this.currentSlide?this.currentSlide:0),e.options.draggable===!0&&e.$list.addClass("draggable")},e.prototype.checkResponsive=function(){var e,i,n=this;if(n.originalSettings.responsive&&n.originalSettings.responsive.length>-1&&null!==n.originalSettings.responsive){i=null;for(e in n.breakpoints)n.breakpoints.hasOwnProperty(e)&&t(window).width()<n.breakpoints[e]&&(i=n.breakpoints[e]);null!==i?null!==n.activeBreakpoint?i!==n.activeBreakpoint&&(n.activeBreakpoint=i,n.options=t.extend({},n.options,n.breakpointSettings[i]),n.refresh()):(n.activeBreakpoint=i,n.options=t.extend({},n.options,n.breakpointSettings[i]),n.refresh()):null!==n.activeBreakpoint&&(n.activeBreakpoint=null,n.options=t.extend({},n.options,n.originalSettings),n.refresh())}},e.prototype.changeSlide=function(e){var i=this,n=t(e.target),s=null!=i.options.asNavFor?t(i.options.asNavFor).getSlick():null;switch(n.is("a")&&e.preventDefault(),e.data.message){case"previous":i.slideCount>i.options.slidesToShow&&(i.slideHandler(i.currentSlide-i.options.slidesToScroll),null!=s&&s.slideHandler(s.currentSlide-s.options.slidesToScroll));break;case"next":i.slideCount>i.options.slidesToShow&&(i.slideHandler(i.currentSlide+i.options.slidesToScroll),null!=s&&s.slideHandler(s.currentSlide+s.options.slidesToScroll));break;case"index":var o=t(e.target).parent().index()*i.options.slidesToScroll;i.slideHandler(o),null!=s&&s.slideHandler(o);break;default:return!1}},e.prototype.destroy=function(){var e=this;e.autoPlayClear(),e.touchObject={},t(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&(e.$prevArrow.remove(),e.$nextArrow.remove()),e.$slides.parent().hasClass("slick-track")&&e.$slides.unwrap().unwrap(),e.$slides.removeClass("slick-slide slick-active slick-visible").removeAttr("style"),e.$slider.removeClass("slick-slider"),e.$slider.removeClass("slick-initialized"),e.$list.off(".slick"),t(window).off(".slick-"+e.instanceUid),t(document).off(".slick-"+e.instanceUid)},e.prototype.disableTransition=function(t){var e=this,i={};i[e.transitionType]="",e.options.fade===!1?e.$slideTrack.css(i):e.$slides.eq(t).css(i)},e.prototype.fadeSlide=function(t,e){var i=this;i.cssTransitions===!1?(i.$slides.eq(t).css({zIndex:1e3}),i.$slides.eq(t).animate({opacity:1},i.options.speed,i.options.easing,e)):(i.applyTransition(t),i.$slides.eq(t).css({opacity:1,zIndex:1e3}),e&&setTimeout(function(){i.disableTransition(t),e.call()},i.options.speed))},e.prototype.filterSlides=function(t){var e=this;null!==t&&(e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(t).appendTo(e.$slideTrack),e.reinit())},e.prototype.getCurrent=function(){var t=this;return t.currentSlide},e.prototype.getDotCount=function(){var t,e=this,i=0,n=0,s=0;for(t=e.options.infinite===!0?e.slideCount+e.options.slidesToShow-e.options.slidesToScroll:e.slideCount;t>i;)s++,n+=e.options.slidesToScroll,i=n+e.options.slidesToShow;return s},e.prototype.getLeft=function(t){var e,i,n=this,s=0;return n.slideOffset=0,i=n.$slides.first().outerHeight(),n.options.infinite===!0?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=i*n.options.slidesToShow*-1),n.slideCount%n.options.slidesToScroll!==0&&t+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideCount%n.options.slidesToShow*n.slideWidth*-1,s=n.slideCount%n.options.slidesToShow*i*-1)):n.slideCount%n.options.slidesToShow!==0&&t+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.options.slidesToShow*n.slideWidth-n.slideCount%n.options.slidesToShow*n.slideWidth,s=n.slideCount%n.options.slidesToShow*i),n.options.centerMode===!0&&n.options.infinite===!0?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:n.options.centerMode===!0&&(n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=n.options.vertical===!1?t*n.slideWidth*-1+n.slideOffset:t*i*-1+s},e.prototype.init=function(){var e=this;t(e.$slider).hasClass("slick-initialized")||(t(e.$slider).addClass("slick-initialized"),e.buildOut(),e.setProps(),e.startLoad(),e.loadSlider(),e.initializeEvents(),e.checkResponsive()),null!==e.options.onInit&&e.options.onInit.call(this,e)},e.prototype.initArrowEvents=function(){var t=this;t.options.arrows===!0&&t.slideCount>t.options.slidesToShow&&(t.$prevArrow.on("click.slick",{message:"previous"},t.changeSlide),t.$nextArrow.on("click.slick",{message:"next"},t.changeSlide))},e.prototype.initDotEvents=function(){var e=this;e.options.dots===!0&&e.slideCount>e.options.slidesToShow&&t("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),e.options.dots===!0&&e.options.pauseOnDotsHover===!0&&e.options.autoplay===!0&&t("li",e.$dots).on("mouseenter.slick",e.autoPlayClear).on("mouseleave.slick",e.autoPlay)},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"},e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.options.pauseOnHover===!0&&e.options.autoplay===!0&&(e.$list.on("mouseenter.slick",e.autoPlayClear),e.$list.on("mouseleave.slick",e.autoPlay)),e.options.accessibility===!0&&e.$list.on("keydown.slick",e.keyHandler),e.options.focusOnSelect===!0&&t(e.options.slide,e.$slideTrack).on("click.slick",e.selectHandler),t(window).on("orientationchange.slick.slick-"+e.instanceUid,function(){e.checkResponsive(),e.setPosition()}),t(window).on("resize.slick.slick-"+e.instanceUid,function(){t(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=t(window).width(),e.checkResponsive(),e.setPosition()},50))}),t(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),t(document).on("ready.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.initUI=function(){var t=this;t.options.arrows===!0&&t.slideCount>t.options.slidesToShow&&(t.$prevArrow.show(),t.$nextArrow.show()),t.options.dots===!0&&t.slideCount>t.options.slidesToShow&&t.$dots.show(),t.options.autoplay===!0&&t.autoPlay()},e.prototype.keyHandler=function(t){var e=this;37===t.keyCode?e.changeSlide({data:{message:"previous"}}):39===t.keyCode&&e.changeSlide({data:{message:"next"}})},e.prototype.lazyLoad=function(){function e(e){t("img[data-lazy]",e).each(function(){var e=t(this),i=t(this).attr("data-lazy")+"?"+(new Date).getTime();e.load(function(){e.animate({opacity:1},200)}).css({opacity:0}).attr("src",i).removeAttr("data-lazy").removeClass("slick-loading")})}var i,n,s,o,r=this;r.options.centerMode===!0?r.options.infinite===!0?(s=r.currentSlide+(r.options.slidesToShow/2+1),o=s+r.options.slidesToShow+2):(s=Math.max(0,r.currentSlide-(r.options.slidesToShow/2+1)),o=2+(r.options.slidesToShow/2+1)+r.currentSlide):(s=r.options.infinite?r.options.slidesToShow+r.currentSlide:r.currentSlide,o=s+r.options.slidesToShow,r.options.fade===!0&&(s>0&&s--,o<=r.slideCount&&o++)),i=r.$slider.find(".slick-slide").slice(s,o),e(i),1==r.slideCount?(n=r.$slider.find(".slick-slide"),e(n)):r.currentSlide<r.slideCount-r.options.slidesToShow?0===r.currentSlide&&(n=r.$slider.find(".slick-cloned").slice(-1*r.options.slidesToShow),e(n)):(n=r.$slider.find(".slick-cloned").slice(0,r.options.slidesToShow),e(n))},e.prototype.loadSlider=function(){var t=this;t.setPosition(),t.$slideTrack.css({opacity:1}),t.$slider.removeClass("slick-loading"),t.initUI(),"progressive"===t.options.lazyLoad&&t.progressiveLazyLoad()},e.prototype.postSlide=function(t){var e=this;null!==e.options.onAfterChange&&e.options.onAfterChange.call(this,e,t),e.animating=!1,e.setPosition(),e.swipeLeft=null,e.options.autoplay===!0&&e.paused===!1&&e.autoPlay()},e.prototype.progressiveLazyLoad=function(){var e,i,n=this;e=t("img[data-lazy]").length,e>0&&(i=t("img[data-lazy]",n.$slider).first(),i.attr("src",i.attr("data-lazy")).removeClass("slick-loading").load(function(){i.removeAttr("data-lazy"),n.progressiveLazyLoad()}))},e.prototype.refresh=function(){var e=this,i=e.currentSlide;e.destroy(),t.extend(e,e.initials),e.currentSlide=i,e.init()},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.options.focusOnSelect===!0&&t(e.options.slide,e.$slideTrack).on("click.slick",e.selectHandler),e.setSlideClasses(0),e.setPosition(),null!==e.options.onReInit&&e.options.onReInit.call(this,e)},e.prototype.removeSlide=function(t,e){var i=this;return"boolean"==typeof t?(e=t,t=e===!0?0:i.slideCount-1):t=e===!0?--t:t,i.slideCount<1||0>t||t>i.slideCount-1?!1:(i.unload(),i.$slideTrack.children(this.options.slide).eq(t).remove(),i.$slides=i.$slideTrack.children(this.options.slide),i.$slideTrack.children(this.options.slide).detach(),i.$slideTrack.append(i.$slides),i.$slidesCache=i.$slides,void i.reinit())},e.prototype.setCSS=function(t){var e,i,n=this,s={};n.options.rtl===!0&&(t=-t),e="left"==n.positionProp?t+"px":"0px",i="top"==n.positionProp?t+"px":"0px",s[n.positionProp]=t,n.transformsEnabled===!1?n.$slideTrack.css(s):(s={},n.cssTransitions===!1?(s[n.animType]="translate("+e+", "+i+")",n.$slideTrack.css(s)):(s[n.animType]="translate3d("+e+", "+i+", 0px)",n.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var t=this;t.options.vertical===!1?t.options.centerMode===!0&&t.$list.css({padding:"0px "+t.options.centerPadding}):(t.$list.height(t.$slides.first().outerHeight(!0)*t.options.slidesToShow),t.options.centerMode===!0&&t.$list.css({padding:t.options.centerPadding+" 0px"})),t.listWidth=t.$list.width(),t.listHeight=t.$list.height(),t.options.vertical===!1?(t.slideWidth=Math.ceil(t.listWidth/t.options.slidesToShow),t.$slideTrack.width(Math.ceil(t.slideWidth*t.$slideTrack.children(".slick-slide").length))):(t.slideWidth=Math.ceil(t.listWidth),t.$slideTrack.height(Math.ceil(t.$slides.first().outerHeight(!0)*t.$slideTrack.children(".slick-slide").length)));var e=t.$slides.first().outerWidth(!0)-t.$slides.first().width();t.$slideTrack.children(".slick-slide").width(t.slideWidth-e)},e.prototype.setFade=function(){var e,i=this;i.$slides.each(function(n,s){e=i.slideWidth*n*-1,t(s).css({position:"relative",left:e,top:0,zIndex:800,opacity:0})}),i.$slides.eq(i.currentSlide).css({zIndex:900,opacity:1})},e.prototype.setPosition=function(){var t=this;t.setDimensions(),t.options.fade===!1?t.setCSS(t.getLeft(t.currentSlide)):t.setFade()},e.prototype.setProps=function(){var t=this,e=document.body.style;t.positionProp=t.options.vertical===!0?"top":"left","top"===t.positionProp?t.$slider.addClass("slick-vertical"):t.$slider.removeClass("slick-vertical"),(void 0!==e.WebkitTransition||void 0!==e.MozTransition||void 0!==e.msTransition)&&t.options.useCSS===!0&&(t.cssTransitions=!0),void 0!==e.OTransform&&(t.animType="OTransform",t.transformType="-o-transform",t.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(t.animType=!1)),void 0!==e.MozTransform&&(t.animType="MozTransform",t.transformType="-moz-transform",t.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(t.animType=!1)),void 0!==e.webkitTransform&&(t.animType="webkitTransform",t.transformType="-webkit-transform",t.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(t.animType=!1)),void 0!==e.msTransform&&(t.animType="msTransform",t.transformType="-ms-transform",t.transitionType="msTransition",void 0===e.msTransform&&(t.animType=!1)),void 0!==e.transform&&t.animType!==!1&&(t.animType="transform",t.transformType="transform",t.transitionType="transition"),t.transformsEnabled=null!==t.animType&&t.animType!==!1},e.prototype.setSlideClasses=function(t){var e,i,n,s,o=this;o.$slider.find(".slick-slide").removeClass("slick-active").removeClass("slick-center"),i=o.$slider.find(".slick-slide"),o.options.centerMode===!0?(e=Math.floor(o.options.slidesToShow/2),o.options.infinite===!0&&(e>t||t>o.slideCount-1-e?(n=o.options.slidesToShow+t,i.slice(n-e+1,n+e+2).addClass("slick-active")):o.$slides.slice(t-e,t+e+1).addClass("slick-active"),0===t?i.eq(i.length-1-o.options.slidesToShow).addClass("slick-center"):t===o.slideCount-1&&i.eq(o.options.slidesToShow).addClass("slick-center")),o.$slides.eq(t).addClass("slick-center")):0>t||t>o.slideCount-o.options.slidesToShow?i.length>o.options.slidesToShow?(s=o.slideCount%o.options.slidesToShow,n=o.options.infinite===!0?o.options.slidesToShow+t:t,o.options.slidesToShow==o.options.slidesToScroll&&o.slideCount-t<o.options.slidesToShow?i.slice(n-(o.options.slidesToShow-s),n+s).addClass("slick-active"):i.slice(n,n+o.options.slidesToShow).addClass("slick-active")):i.addClass("slick-active"):o.$slides.slice(t,t+o.options.slidesToShow).addClass("slick-active"),"ondemand"===o.options.lazyLoad&&o.lazyLoad()},e.prototype.setupInfinite=function(){var e,i,n,s=this;if((s.options.fade===!0||s.options.vertical===!0)&&(s.options.centerMode=!1),s.options.infinite===!0&&s.options.fade===!1&&(i=null,s.slideCount>s.options.slidesToShow)){for(n=s.options.centerMode===!0?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-n;e-=1)i=e-1,t(s.$slides[i]).clone(!0).attr("id","").prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;n>e;e+=1)i=e,t(s.$slides[i]).clone(!0).attr("id","").appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){t(this).attr("id","")})}},e.prototype.selectHandler=function(e){var i=this,n=null!=i.options.asNavFor?t(i.options.asNavFor).getSlick():null,s=parseInt(t(e.target).parent().attr("index"));if(s||(s=0),!(i.slideCount<=i.options.slidesToShow)&&(i.slideHandler(s),null!=n)){if(n.slideCount<=n.options.slidesToShow)return;n.slideHandler(s)}},e.prototype.slideHandler=function(t){var e,i,n,s,o=null,r=this;return r.animating===!0?!1:(e=t,o=r.getLeft(e),n=r.getLeft(r.currentSlide),s=r.slideCount%r.options.slidesToScroll!==0?r.options.slidesToScroll:0,r.currentLeft=null===r.swipeLeft?n:r.swipeLeft,r.options.infinite===!1&&r.options.centerMode===!1&&(0>t||t>r.slideCount-r.options.slidesToShow+s)?(r.options.fade===!1&&(e=r.currentSlide,r.animateSlide(n,function(){r.postSlide(e)})),!1):r.options.infinite===!1&&r.options.centerMode===!0&&(0>t||t>r.slideCount-r.options.slidesToScroll)?(r.options.fade===!1&&(e=r.currentSlide,r.animateSlide(n,function(){r.postSlide(e)})),!1):(r.options.autoplay===!0&&clearInterval(r.autoPlayTimer),i=0>e?r.slideCount%r.options.slidesToScroll!==0?r.slideCount-r.slideCount%r.options.slidesToScroll:r.slideCount-r.options.slidesToScroll:e>r.slideCount-1?0:e,r.animating=!0,null!==r.options.onBeforeChange&&t!==r.currentSlide&&r.options.onBeforeChange.call(this,r,r.currentSlide,i),r.currentSlide=i,r.setSlideClasses(r.currentSlide),r.updateDots(),r.updateArrows(),r.options.fade===!0?(r.fadeSlide(i,function(){r.postSlide(i)}),!1):void r.animateSlide(o,function(){r.postSlide(i)})))},e.prototype.startLoad=function(){var t=this;t.options.arrows===!0&&t.slideCount>t.options.slidesToShow&&(t.$prevArrow.hide(),t.$nextArrow.hide()),t.options.dots===!0&&t.slideCount>t.options.slidesToShow&&t.$dots.hide(),t.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var t,e,i,n,s=this;return t=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,i=Math.atan2(e,t),n=Math.round(180*i/Math.PI),0>n&&(n=360-Math.abs(n)),(n>45||0>n)&&(n>360||315>n)?135>n||n>225?"vertical":"right":"left"},e.prototype.swipeEnd=function(e){var i=this,n=null!=i.options.asNavFor?t(i.options.asNavFor).getSlick():null;if(i.dragging=!1,void 0===i.touchObject.curX)return!1;if(i.touchObject.swipeLength<i.touchObject.minSwipe)i.touchObject.startX!==i.touchObject.curX&&(i.slideHandler(i.currentSlide),null!=n&&n.slideHandler(n.currentSlide),i.touchObject={});else switch(t(e.target).on("click.slick",function(e){e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t(e.target).off("click.slick")}),i.swipeDirection()){case"left":i.slideHandler(i.currentSlide+i.options.slidesToScroll),null!=n&&n.slideHandler(n.currentSlide+n.options.slidesToScroll),i.touchObject={};break;case"right":i.slideHandler(i.currentSlide-i.options.slidesToScroll),null!=n&&n.slideHandler(n.currentSlide-n.options.slidesToScroll),i.touchObject={}}},e.prototype.swipeHandler=function(t){var e=this;if(!(e.options.swipe===!1||"ontouchend"in document&&e.options.swipe===!1||e.options.draggable===!1||e.options.draggable===!1&&!t.originalEvent.touches))switch(e.touchObject.fingerCount=t.originalEvent&&void 0!==t.originalEvent.touches?t.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,t.data.action){case"start":e.swipeStart(t);break;case"move":e.swipeMove(t);break;case"end":e.swipeEnd(t)}},e.prototype.swipeMove=function(t){var e,i,n,s,o=this;return s=void 0!==t.originalEvent?t.originalEvent.touches:null,e=o.getLeft(o.currentSlide),!o.dragging||s&&1!==s.length?!1:(o.touchObject.curX=void 0!==s?s[0].pageX:t.clientX,o.touchObject.curY=void 0!==s?s[0].pageY:t.clientY,o.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(o.touchObject.curX-o.touchObject.startX,2))),i=o.swipeDirection(),"vertical"!==i?(void 0!==t.originalEvent&&o.touchObject.swipeLength>4&&t.preventDefault(),n=o.touchObject.curX>o.touchObject.startX?1:-1,o.swipeLeft=o.options.vertical===!1?e+o.touchObject.swipeLength*n:e+o.touchObject.swipeLength*(o.$list.height()/o.listWidth)*n,o.options.fade===!0||o.options.touchMove===!1?!1:o.animating===!0?(o.swipeLeft=null,!1):void o.setCSS(o.swipeLeft)):void 0)},e.prototype.swipeStart=function(t){var e,i=this;return 1===i.touchObject.fingerCount&&i.slideCount>i.options.slidesToShow?(void 0!==t.originalEvent&&void 0!==t.originalEvent.touches&&(e=t.originalEvent.touches[0]),i.touchObject.startX=i.touchObject.curX=void 0!==e?e.pageX:t.clientX,i.touchObject.startY=i.touchObject.curY=void 0!==e?e.pageY:t.clientY,void(i.dragging=!0)):(i.touchObject={},!1)},e.prototype.unfilterSlides=function(){var t=this;null!==t.$slidesCache&&(t.unload(),t.$slideTrack.children(this.options.slide).detach(),t.$slidesCache.appendTo(t.$slideTrack),t.reinit())},e.prototype.unload=function(){var e=this;t(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&(e.$prevArrow.remove(),e.$nextArrow.remove()),e.$slides.removeClass("slick-slide slick-active slick-visible").removeAttr("style")},e.prototype.updateArrows=function(){var t=this;t.options.arrows===!0&&t.options.infinite!==!0&&t.slideCount>t.options.slidesToShow&&(t.$prevArrow.removeClass("slick-disabled"),t.$nextArrow.removeClass("slick-disabled"),0===t.currentSlide?(t.$prevArrow.addClass("slick-disabled"),t.$nextArrow.removeClass("slick-disabled")):t.currentSlide>=t.slideCount-t.options.slidesToShow&&(t.$nextArrow.addClass("slick-disabled"),t.$prevArrow.removeClass("slick-disabled")))},e.prototype.updateDots=function(){var t=this;null!==t.$dots&&(t.$dots.find("li").removeClass("slick-active"),t.$dots.find("li").eq(Math.floor(t.currentSlide/t.options.slidesToScroll)).addClass("slick-active"))},t.fn.slick=function(t){var i=this;return i.each(function(i,n){n.slick=new e(n,t)})},t.fn.slickAdd=function(t,e,i){var n=this;return n.each(function(n,s){s.slick.addSlide(t,e,i)})},t.fn.slickCurrentSlide=function(){var t=this;return t.get(0).slick.getCurrent()},t.fn.slickFilter=function(t){var e=this;return e.each(function(e,i){i.slick.filterSlides(t)})},t.fn.slickGoTo=function(e){var i=this;return i.each(function(i,n){var s=null!=n.slick.options.asNavFor?t(n.slick.options.asNavFor):null;null!=s&&s.slickGoTo(e),n.slick.slideHandler(e)})},t.fn.slickNext=function(){var t=this;return t.each(function(t,e){e.slick.changeSlide({data:{message:"next"}})})},t.fn.slickPause=function(){var t=this;return t.each(function(t,e){e.slick.autoPlayClear(),e.slick.paused=!0})},t.fn.slickPlay=function(){var t=this;return t.each(function(t,e){e.slick.paused=!1,e.slick.autoPlay()})},t.fn.slickPrev=function(){var t=this;return t.each(function(t,e){e.slick.changeSlide({data:{message:"previous"}})})},t.fn.slickRemove=function(t,e){var i=this;return i.each(function(i,n){n.slick.removeSlide(t,e)})},t.fn.slickGetOption=function(t){var e=this;return e.get(0).slick.options[t]},t.fn.slickSetOption=function(t,e,i){var n=this;return n.each(function(n,s){s.slick.options[t]=e,i===!0&&(s.slick.unload(),s.slick.reinit())})},t.fn.slickUnfilter=function(){var t=this;return t.each(function(t,e){e.slick.unfilterSlides()})},t.fn.unslick=function(){var t=this;return t.each(function(t,e){e.slick&&e.slick.destroy()})},t.fn.getSlick=function(){var t=null,e=this;return e.each(function(e,i){t=i.slick}),t}}),define("comp/container/carousel/main",["backbone","comp/container/card","underscore","text!./carousel-template.html","comp/utils","comp/container/container","slick"],function(t,e,i,n,s){var o=i.template(s.getTemplate(n,"carousel")),r=i.template(s.getTemplate(n,"carousel-item"));return e.extend({initialize:function(t){t=t||{},i.defaults(t,{arrows:!1,dots:!1,autoplaySpeed:!1,pauseOnHover:!0,infinite:!0}),i.extend(this,{containerTemplate:o,itemTemplate:r}),e.prototype.initialize.call(this,t)},render:function(){e.prototype.render.call(this),this.slick=this.getChildLocation().slick(this.getSlickParameters())},getSlickParameters:function(){return{onBeforeChange:i.bind(this.slideStarted,this),onAfterChange:i.bind(this.slideFinished,this),autoplay:!!this.options.autoplaySpeed,autoplaySpeed:this.options.autoplaySpeed,infinite:this.options.infinite,pauseOnHover:this.options.pauseOnHover,dots:this.options.dots,arrows:this.options.arrows,appendArrows:this.$el.find(".card"),currentSlide:this.options.activeItem}},slideStarted:function(t,e,i){if(this.sliding=!0,i!=this.options.activeItem){var n=this.getActiveItem();this.options.activeItem=i,this.trigger("activeItemChange",this.getActiveItem(),n,this.getActiveItemIndex())}},slideFinished:function(){this.sliding=!1},setActiveItem:function(){return this.sliding?!1:e.prototype.setActiveItem.apply(this,arguments)},renderActiveItem:function(t){t.next?this.slick.slickNext():t.prev?this.slick.slickPrev():this.slick.slickGoTo(t.newIndex)},getChildLocation:function(){return this.$el.find(".carousel-inner")}})}),define("comp/container/carousel",["comp/container/carousel/main"],function(t){return t}),define("text!comp/container/tab/tab-template.html",[],function(){return'<script type="text/x-jquery-tmpl" data-template-id="tab-bar-item"><li class="<%=active%>"><a href="#<%=target%>" role="tab" data-toggle="tab" data-index="<%=index%>"><%=label%></a></li><\/script><script type="text/x-jquery-tmpl" data-template-id="tab-content-item"><div class="tab-pane <%=active%><%=fade%><%=fadeIn%>" id="<%=id%>"></div><\/script><script type="text/x-jquery-tmpl" data-template-id="tab-container"><ul class="nav nav-tabs" role="tablist"></ul><div class="tab-content"></div><\/script>'}),define("comp/container/tab/main",["backbone","comp/container/card","underscore","text!./tab-template.html","comp/utils","comp/container/container","bootstrap"],function(t,e,i,n,s,o){var r=i.template(s.getTemplate(n,"tab-container")),a=i.template(s.getTemplate(n,"tab-bar-item")),l=i.template(s.getTemplate(n,"tab-content-item"));return e.extend({events:{"show.bs.tab .nav":"tabChangeStarted","shown.bs.tab .nav":"tabChangeFinished"},initialize:function(t){if(t=t||{},i.defaults(t,{fade:!1,labels:[]}),t.items&&t.labels.length!=t.items.length)throw Error("Labels must be provided to sf.comp.container.Tab");i.defaults(this,{containerTemplate:r}),e.prototype.initialize.call(this,t)},render:function(){e.prototype.render.call(this),this.$el.find(".nav > li > a").click(function(t){t.preventDefault(),$(this).tab("show")})},setActiveItem:function(){return this.tabChanging?!1:e.prototype.setActiveItem.apply(this,arguments)},renderItem:function(t,e,i){var n=s.generateID(),r=$(l({id:n,active:i?"active":"",fade:this.options.fade?"fade":"",fadeIn:this.options.fade&&i?"in":""}).trim());r.append(o.prototype.renderItem.call(this,t)); var c=$(a({active:i?"active":"",target:n,label:this.options.labels[e],index:e}).trim());return this.$el.find(".nav").append(c),r},renderActiveItem:function(t){this.$el.find(".nav > li > a").eq(t.newIndex).tab("show")},getChildLocation:function(){return this.$el.find(".tab-content")},tabChangeStarted:function(t){this.tabChanging=!0;var e=parseInt($(t.target).attr("data-index"),10);if(e!=this.options.activeItem){var i=this.getActiveItem();this.options.activeItem=e,this.trigger("activeItemChange",this.getActiveItem(),i,this.getActiveItemIndex())}},tabChangeFinished:function(){this.tabChanging=!1}})}),define("comp/container/tab",["comp/container/tab/main"],function(t){return t}),define("comp/container/main",["./card/main","./carousel/main","./container/main","./tab/main","./modal/main"],function(t,e,i,n,s){return{Card:t,Carousel:e,Container:i,Tab:n,Modal:s}}),define("comp/main",["sf","./forms/main","./container/main"],function(t,e,i){var n=t.comp={forms:e,container:i};return n}),define("comp",["comp/main"],function(t){return t}),define("less",["require"],function(t){var e={};if(e.pluginBuilder="./less-builder","undefined"==typeof window)return e.load=function(t,e,i){i()},e;e.normalize=function(t,e){return".less"==t.substr(t.length-5,5)&&(t=t.substr(0,t.length-5)),t=e(t)};var i=document.getElementsByTagName("head")[0],n=document.getElementsByTagName("base");n=n&&n[0]&&n[0]&&n[0].href;var s=(n||window.location.href.split("#")[0].split("?")[0]).split("/");s[s.length-1]="",s=s.join("/");var o,r=0;return e.inject=function(t){31>r&&(o=document.createElement("style"),o.type="text/css",i.appendChild(o),r++),o.styleSheet?o.styleSheet.cssText+=t:o.appendChild(document.createTextNode(t))},e.load=function(i,n,o,r){window.less=r.less||{},window.less.env="development",t(["./lessc","./normalize"],function(t,a){var l=n.toUrl(i+".less");l=a.absoluteURI(l,s);var c=new t.Parser(window.less);c.parse('@import (multiple) "'+l+'";',function(t,i){return t?o.error(t):(e.inject(a(i.toCSS(r.less),l,s)),void setTimeout(o,7))},window.less)})},e}),define("less!sf-comp-build",[],function(){});