//moment.js !function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.moment=b()}(this,function(){"use strict";function a(){return Hc.apply(null,arguments)}function b(a){Hc=a}function c(a){return"[object Array]"===Object.prototype.toString.call(a)}function d(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function e(a,b){var c,d=[];for(c=0;c0)for(c in Jc)d=Jc[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function n(b){m(this,b),this._d=new Date(null!=b._d?b._d.getTime():NaN),Kc===!1&&(Kc=!0,a.updateOffset(this),Kc=!1)}function o(a){return a instanceof n||null!=a&&null!=a._isAMomentObject}function p(a){return 0>a?Math.ceil(a):Math.floor(a)}function q(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=p(b)),c}function r(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&q(a[d])!==q(b[d]))&&g++;return g+f}function s(){}function t(a){return a?a.toLowerCase().replace("_","-"):a}function u(a){for(var b,c,d,e,f=0;f0;){if(d=v(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&r(e,c,!0)>=b-1)break;b--}f++}return null}function v(a){var b=null;if(!Lc[a]&&"undefined"!=typeof module&&module&&module.exports)try{b=Ic._abbr,require("./locale/"+a),w(b)}catch(c){}return Lc[a]}function w(a,b){var c;return a&&(c="undefined"==typeof b?y(a):x(a,b),c&&(Ic=c)),Ic._abbr}function x(a,b){return null!==b?(b.abbr=a,Lc[a]=Lc[a]||new s,Lc[a].set(b),w(a),Lc[a]):(delete Lc[a],null)}function y(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return Ic;if(!c(a)){if(b=v(a))return b;a=[a]}return u(a)}function z(a,b){var c=a.toLowerCase();Mc[c]=Mc[c+"s"]=Mc[b]=a}function A(a){return"string"==typeof a?Mc[a]||Mc[a.toLowerCase()]:void 0}function B(a){var b,c,d={};for(c in a)f(a,c)&&(b=A(c),b&&(d[b]=a[c]));return d}function C(b,c){return function(d){return null!=d?(E(this,b,d),a.updateOffset(this,c),this):D(this,b)}}function D(a,b){return a._d["get"+(a._isUTC?"UTC":"")+b]()}function E(a,b,c){return a._d["set"+(a._isUTC?"UTC":"")+b](c)}function F(a,b){var c;if("object"==typeof a)for(c in a)this.set(c,a[c]);else if(a=A(a),"function"==typeof this[a])return this[a](b);return this}function G(a,b,c){var d=""+Math.abs(a),e=b-d.length,f=a>=0;return(f?c?"+":"":"-")+Math.pow(10,Math.max(0,e)).toString().substr(1)+d}function H(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&(Qc[a]=e),b&&(Qc[b[0]]=function(){return G(e.apply(this,arguments),b[1],b[2])}),c&&(Qc[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function I(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function J(a){var b,c,d=a.match(Nc);for(b=0,c=d.length;c>b;b++)Qc[d[b]]?d[b]=Qc[d[b]]:d[b]=I(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function K(a,b){return a.isValid()?(b=L(b,a.localeData()),Pc[b]=Pc[b]||J(b),Pc[b](a)):a.localeData().invalidDate()}function L(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Oc.lastIndex=0;d>=0&&Oc.test(a);)a=a.replace(Oc,c),Oc.lastIndex=0,d-=1;return a}function M(a){return"function"==typeof a&&"[object Function]"===Object.prototype.toString.call(a)}function N(a,b,c){dd[a]=M(b)?b:function(a){return a&&c?c:b}}function O(a,b){return f(dd,a)?dd[a](b._strict,b._locale):new RegExp(P(a))}function P(a){return a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Q(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),"number"==typeof b&&(d=function(a,c){c[b]=q(a)}),c=0;cd;d++){if(e=h([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}}function X(a,b){var c;return"string"==typeof b&&(b=a.localeData().monthsParse(b),"number"!=typeof b)?a:(c=Math.min(a.date(),T(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a)}function Y(b){return null!=b?(X(this,b),a.updateOffset(this,!0),this):D(this,"Month")}function Z(){return T(this.year(),this.month())}function $(a){var b,c=a._a;return c&&-2===j(a).overflow&&(b=c[gd]<0||c[gd]>11?gd:c[hd]<1||c[hd]>T(c[fd],c[gd])?hd:c[id]<0||c[id]>24||24===c[id]&&(0!==c[jd]||0!==c[kd]||0!==c[ld])?id:c[jd]<0||c[jd]>59?jd:c[kd]<0||c[kd]>59?kd:c[ld]<0||c[ld]>999?ld:-1,j(a)._overflowDayOfYear&&(fd>b||b>hd)&&(b=hd),j(a).overflow=b),a}function _(b){a.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+b)}function aa(a,b){var c=!0;return g(function(){return c&&(_(a+"\n"+(new Error).stack),c=!1),b.apply(this,arguments)},b)}function ba(a,b){od[a]||(_(b),od[a]=!0)}function ca(a){var b,c,d=a._i,e=pd.exec(d);if(e){for(j(a).iso=!0,b=0,c=qd.length;c>b;b++)if(qd[b][1].exec(d)){a._f=qd[b][0];break}for(b=0,c=rd.length;c>b;b++)if(rd[b][1].exec(d)){a._f+=(e[6]||" ")+rd[b][0];break}d.match(ad)&&(a._f+="Z"),va(a)}else a._isValid=!1}function da(b){var c=sd.exec(b._i);return null!==c?void(b._d=new Date(+c[1])):(ca(b),void(b._isValid===!1&&(delete b._isValid,a.createFromInputFallback(b))))}function ea(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function fa(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function ga(a){return ha(a)?366:365}function ha(a){return a%4===0&&a%100!==0||a%400===0}function ia(){return ha(this.year())}function ja(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=Da(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function ka(a){return ja(a,this._week.dow,this._week.doy).week}function la(){return this._week.dow}function ma(){return this._week.doy}function na(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function oa(a){var b=ja(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")}function pa(a,b,c,d,e){var f,g=6+e-d,h=fa(a,0,1+g),i=h.getUTCDay();return e>i&&(i+=7),c=null!=c?1*c:e,f=1+g+7*(b-1)-i+c,{year:f>0?a:a-1,dayOfYear:f>0?f:ga(a-1)+f}}function qa(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}function ra(a,b,c){return null!=a?a:null!=b?b:c}function sa(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function ta(a){var b,c,d,e,f=[];if(!a._d){for(d=sa(a),a._w&&null==a._a[hd]&&null==a._a[gd]&&ua(a),a._dayOfYear&&(e=ra(a._a[fd],d[fd]),a._dayOfYear>ga(e)&&(j(a)._overflowDayOfYear=!0),c=fa(e,0,a._dayOfYear),a._a[gd]=c.getUTCMonth(),a._a[hd]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=f[b]=d[b];for(;7>b;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b];24===a._a[id]&&0===a._a[jd]&&0===a._a[kd]&&0===a._a[ld]&&(a._nextDay=!0,a._a[id]=0),a._d=(a._useUTC?fa:ea).apply(null,f),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[id]=24)}}function ua(a){var b,c,d,e,f,g,h;b=a._w,null!=b.GG||null!=b.W||null!=b.E?(f=1,g=4,c=ra(b.GG,a._a[fd],ja(Da(),1,4).year),d=ra(b.W,1),e=ra(b.E,1)):(f=a._locale._week.dow,g=a._locale._week.doy,c=ra(b.gg,a._a[fd],ja(Da(),f,g).year),d=ra(b.w,1),null!=b.d?(e=b.d,f>e&&++d):e=null!=b.e?b.e+f:f),h=pa(c,d,e,g,f),a._a[fd]=h.year,a._dayOfYear=h.dayOfYear}function va(b){if(b._f===a.ISO_8601)return void ca(b);b._a=[],j(b).empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,k=0;for(e=L(b._f,b._locale).match(Nc)||[],c=0;c0&&j(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),k+=d.length),Qc[f]?(d?j(b).empty=!1:j(b).unusedTokens.push(f),S(f,d,b)):b._strict&&!d&&j(b).unusedTokens.push(f);j(b).charsLeftOver=i-k,h.length>0&&j(b).unusedInput.push(h),j(b).bigHour===!0&&b._a[id]<=12&&b._a[id]>0&&(j(b).bigHour=void 0),b._a[id]=wa(b._locale,b._a[id],b._meridiem),ta(b),$(b)}function wa(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function xa(a){var b,c,d,e,f;if(0===a._f.length)return j(a).invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;ef)&&(d=f,c=b));g(a,c||b)}function ya(a){if(!a._d){var b=B(a._i);a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],ta(a)}}function za(a){var b=new n($(Aa(a)));return b._nextDay&&(b.add(1,"d"),b._nextDay=void 0),b}function Aa(a){var b=a._i,e=a._f;return a._locale=a._locale||y(a._l),null===b||void 0===e&&""===b?l({nullInput:!0}):("string"==typeof b&&(a._i=b=a._locale.preparse(b)),o(b)?new n($(b)):(c(e)?xa(a):e?va(a):d(b)?a._d=b:Ba(a),a))}function Ba(b){var f=b._i;void 0===f?b._d=new Date:d(f)?b._d=new Date(+f):"string"==typeof f?da(b):c(f)?(b._a=e(f.slice(0),function(a){return parseInt(a,10)}),ta(b)):"object"==typeof f?ya(b):"number"==typeof f?b._d=new Date(f):a.createFromInputFallback(b)}function Ca(a,b,c,d,e){var f={};return"boolean"==typeof c&&(d=c,c=void 0),f._isAMomentObject=!0,f._useUTC=f._isUTC=e,f._l=c,f._i=a,f._f=b,f._strict=d,za(f)}function Da(a,b,c,d){return Ca(a,b,c,d,!1)}function Ea(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return Da();for(d=b[0],e=1;ea&&(a=-a,c="-"),c+G(~~(a/60),2)+b+G(~~a%60,2)})}function Ka(a){var b=(a||"").match(ad)||[],c=b[b.length-1]||[],d=(c+"").match(xd)||["-",0,0],e=+(60*d[1])+q(d[2]);return"+"===d[0]?e:-e}function La(b,c){var e,f;return c._isUTC?(e=c.clone(),f=(o(b)||d(b)?+b:+Da(b))-+e,e._d.setTime(+e._d+f),a.updateOffset(e,!1),e):Da(b).local()}function Ma(a){return 15*-Math.round(a._d.getTimezoneOffset()/15)}function Na(b,c){var d,e=this._offset||0;return null!=b?("string"==typeof b&&(b=Ka(b)),Math.abs(b)<16&&(b=60*b),!this._isUTC&&c&&(d=Ma(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,"m"),e!==b&&(!c||this._changeInProgress?bb(this,Ya(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?e:Ma(this)}function Oa(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function Pa(a){return this.utcOffset(0,a)}function Qa(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Ma(this),"m")),this}function Ra(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Ka(this._i)),this}function Sa(a){return a=a?Da(a).utcOffset():0,(this.utcOffset()-a)%60===0}function Ta(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ua(){if("undefined"!=typeof this._isDSTShifted)return this._isDSTShifted;var a={};if(m(a,this),a=Aa(a),a._a){var b=a._isUTC?h(a._a):Da(a._a);this._isDSTShifted=this.isValid()&&r(a._a,b.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Va(){return!this._isUTC}function Wa(){return this._isUTC}function Xa(){return this._isUTC&&0===this._offset}function Ya(a,b){var c,d,e,g=a,h=null;return Ia(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(g={},b?g[b]=a:g.milliseconds=a):(h=yd.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:q(h[hd])*c,h:q(h[id])*c,m:q(h[jd])*c,s:q(h[kd])*c,ms:q(h[ld])*c}):(h=zd.exec(a))?(c="-"===h[1]?-1:1,g={y:Za(h[2],c),M:Za(h[3],c),d:Za(h[4],c),h:Za(h[5],c),m:Za(h[6],c),s:Za(h[7],c),w:Za(h[8],c)}):null==g?g={}:"object"==typeof g&&("from"in g||"to"in g)&&(e=_a(Da(g.from),Da(g.to)),g={},g.ms=e.milliseconds,g.M=e.months),d=new Ha(g),Ia(a)&&f(a,"_locale")&&(d._locale=a._locale),d}function Za(a,b){var c=a&&parseFloat(a.replace(",","."));return(isNaN(c)?0:c)*b}function $a(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function _a(a,b){var c;return b=La(b,a),a.isBefore(b)?c=$a(a,b):(c=$a(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c}function ab(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(ba(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=Ya(c,d),bb(this,e,a),this}}function bb(b,c,d,e){var f=c._milliseconds,g=c._days,h=c._months;e=null==e?!0:e,f&&b._d.setTime(+b._d+f*d),g&&E(b,"Date",D(b,"Date")+g*d),h&&X(b,D(b,"Month")+h*d),e&&a.updateOffset(b,g||h)}function cb(a,b){var c=a||Da(),d=La(c,this).startOf("day"),e=this.diff(d,"days",!0),f=-6>e?"sameElse":-1>e?"lastWeek":0>e?"lastDay":1>e?"sameDay":2>e?"nextDay":7>e?"nextWeek":"sameElse";return this.format(b&&b[f]||this.localeData().calendar(f,this,Da(c)))}function db(){return new n(this)}function eb(a,b){var c;return b=A("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=o(a)?a:Da(a),+this>+a):(c=o(a)?+a:+Da(a),c<+this.clone().startOf(b))}function fb(a,b){var c;return b=A("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=o(a)?a:Da(a),+a>+this):(c=o(a)?+a:+Da(a),+this.clone().endOf(b)b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)}function kb(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function lb(){var a=this.clone().utc();return 0b;b++)if(this._weekdaysParse[b]||(c=Da([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b}function Pb(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=Kb(a,this.localeData()),this.add(a-b,"d")):b}function Qb(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function Rb(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)}function Sb(a,b){H(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}function Tb(a,b){return b._meridiemParse}function Ub(a){return"p"===(a+"").toLowerCase().charAt(0)}function Vb(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function Wb(a,b){b[ld]=q(1e3*("0."+a))}function Xb(){return this._isUTC?"UTC":""}function Yb(){return this._isUTC?"Coordinated Universal Time":""}function Zb(a){return Da(1e3*a)}function $b(){return Da.apply(null,arguments).parseZone()}function _b(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.call(b,c):d}function ac(a){var b=this._longDateFormat[a],c=this._longDateFormat[a.toUpperCase()];return b||!c?b:(this._longDateFormat[a]=c.replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a])}function bc(){return this._invalidDate}function cc(a){return this._ordinal.replace("%d",a)}function dc(a){return a}function ec(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)}function fc(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)}function gc(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function hc(a,b,c,d){var e=y(),f=h().set(d,b);return e[c](f,a)}function ic(a,b,c,d,e){if("number"==typeof a&&(b=a,a=void 0),a=a||"",null!=b)return hc(a,b,c,e);var f,g=[];for(f=0;d>f;f++)g[f]=hc(a,f,c,e);return g}function jc(a,b){return ic(a,b,"months",12,"month")}function kc(a,b){return ic(a,b,"monthsShort",12,"month")}function lc(a,b){return ic(a,b,"weekdays",7,"day")}function mc(a,b){return ic(a,b,"weekdaysShort",7,"day")}function nc(a,b){return ic(a,b,"weekdaysMin",7,"day")}function oc(){var a=this._data;return this._milliseconds=Wd(this._milliseconds),this._days=Wd(this._days),this._months=Wd(this._months),a.milliseconds=Wd(a.milliseconds),a.seconds=Wd(a.seconds),a.minutes=Wd(a.minutes),a.hours=Wd(a.hours),a.months=Wd(a.months),a.years=Wd(a.years),this}function pc(a,b,c,d){var e=Ya(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=d*e._months,a._bubble()}function qc(a,b){return pc(this,a,b,1)}function rc(a,b){return pc(this,a,b,-1)}function sc(a){return 0>a?Math.floor(a):Math.ceil(a)}function tc(){var a,b,c,d,e,f=this._milliseconds,g=this._days,h=this._months,i=this._data;return f>=0&&g>=0&&h>=0||0>=f&&0>=g&&0>=h||(f+=864e5*sc(vc(h)+g),g=0,h=0),i.milliseconds=f%1e3,a=p(f/1e3),i.seconds=a%60,b=p(a/60),i.minutes=b%60,c=p(b/60),i.hours=c%24,g+=p(c/24),e=p(uc(g)),h+=e,g-=sc(vc(e)),d=p(h/12),h%=12,i.days=g,i.months=h,i.years=d,this}function uc(a){return 4800*a/146097}function vc(a){return 146097*a/4800}function wc(a){var b,c,d=this._milliseconds;if(a=A(a),"month"===a||"year"===a)return b=this._days+d/864e5,c=this._months+uc(b),"month"===a?c:c/12;switch(b=this._days+Math.round(vc(this._months)),a){case"week":return b/7+d/6048e5;case"day":return b+d/864e5;case"hour":return 24*b+d/36e5;case"minute":return 1440*b+d/6e4;case"second":return 86400*b+d/1e3;case"millisecond":return Math.floor(864e5*b)+d;default:throw new Error("Unknown unit "+a)}}function xc(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*q(this._months/12)}function yc(a){return function(){return this.as(a)}}function zc(a){return a=A(a),this[a+"s"]()}function Ac(a){return function(){return this._data[a]}}function Bc(){return p(this.days()/7)}function Cc(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function Dc(a,b,c){var d=Ya(a).abs(),e=ke(d.as("s")),f=ke(d.as("m")),g=ke(d.as("h")),h=ke(d.as("d")),i=ke(d.as("M")),j=ke(d.as("y")),k=e0,k[4]=c,Cc.apply(null,k)}function Ec(a,b){return void 0===le[a]?!1:void 0===b?le[a]:(le[a]=b,!0)}function Fc(a){var b=this.localeData(),c=Dc(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function Gc(){var a,b,c,d=me(this._milliseconds)/1e3,e=me(this._days),f=me(this._months);a=p(d/60),b=p(a/60),d%=60,a%=60,c=p(f/12),f%=12;var g=c,h=f,i=e,j=b,k=a,l=d,m=this.asSeconds();return m?(0>m?"-":"")+"P"+(g?g+"Y":"")+(h?h+"M":"")+(i?i+"D":"")+(j||k||l?"T":"")+(j?j+"H":"")+(k?k+"M":"")+(l?l+"S":""):"P0D"}var Hc,Ic,Jc=a.momentProperties=[],Kc=!1,Lc={},Mc={},Nc=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Oc=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Pc={},Qc={},Rc=/\d/,Sc=/\d\d/,Tc=/\d{3}/,Uc=/\d{4}/,Vc=/[+-]?\d{6}/,Wc=/\d\d?/,Xc=/\d{1,3}/,Yc=/\d{1,4}/,Zc=/[+-]?\d{1,6}/,$c=/\d+/,_c=/[+-]?\d+/,ad=/Z|[+-]\d\d:?\d\d/gi,bd=/[+-]?\d+(\.\d{1,3})?/,cd=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,dd={},ed={},fd=0,gd=1,hd=2,id=3,jd=4,kd=5,ld=6;H("M",["MM",2],"Mo",function(){return this.month()+1}),H("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)}),H("MMMM",0,0,function(a){return this.localeData().months(this,a)}),z("month","M"),N("M",Wc),N("MM",Wc,Sc),N("MMM",cd),N("MMMM",cd),Q(["M","MM"],function(a,b){b[gd]=q(a)-1}),Q(["MMM","MMMM"],function(a,b,c,d){var e=c._locale.monthsParse(a,d,c._strict);null!=e?b[gd]=e:j(c).invalidMonth=a});var md="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),nd="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),od={};a.suppressDeprecationWarnings=!1;var pd=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,qd=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],rd=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],sd=/^\/?Date\((\-?\d+)/i;a.createFromInputFallback=aa("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),H(0,["YY",2],0,function(){return this.year()%100}),H(0,["YYYY",4],0,"year"),H(0,["YYYYY",5],0,"year"),H(0,["YYYYYY",6,!0],0,"year"),z("year","y"),N("Y",_c),N("YY",Wc,Sc),N("YYYY",Yc,Uc),N("YYYYY",Zc,Vc),N("YYYYYY",Zc,Vc),Q(["YYYYY","YYYYYY"],fd),Q("YYYY",function(b,c){c[fd]=2===b.length?a.parseTwoDigitYear(b):q(b)}),Q("YY",function(b,c){c[fd]=a.parseTwoDigitYear(b)}),a.parseTwoDigitYear=function(a){return q(a)+(q(a)>68?1900:2e3)};var td=C("FullYear",!1);H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),z("week","w"),z("isoWeek","W"),N("w",Wc),N("ww",Wc,Sc),N("W",Wc),N("WW",Wc,Sc),R(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=q(a)});var ud={dow:0,doy:6};H("DDD",["DDDD",3],"DDDo","dayOfYear"),z("dayOfYear","DDD"),N("DDD",Xc),N("DDDD",Tc),Q(["DDD","DDDD"],function(a,b,c){c._dayOfYear=q(a)}),a.ISO_8601=function(){};var vd=aa("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var a=Da.apply(null,arguments);return this>a?this:a}),wd=aa("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var a=Da.apply(null,arguments);return a>this?this:a});Ja("Z",":"),Ja("ZZ",""),N("Z",ad),N("ZZ",ad),Q(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=Ka(a)});var xd=/([\+\-]|\d\d)/gi;a.updateOffset=function(){};var yd=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,zd=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;Ya.fn=Ha.prototype;var Ad=ab(1,"add"),Bd=ab(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var Cd=aa("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});H(0,["gg",2],0,function(){return this.weekYear()%100}),H(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Db("gggg","weekYear"),Db("ggggg","weekYear"),Db("GGGG","isoWeekYear"),Db("GGGGG","isoWeekYear"),z("weekYear","gg"),z("isoWeekYear","GG"),N("G",_c),N("g",_c),N("GG",Wc,Sc),N("gg",Wc,Sc),N("GGGG",Yc,Uc),N("gggg",Yc,Uc),N("GGGGG",Zc,Vc),N("ggggg",Zc,Vc),R(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=q(a)}),R(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}),H("Q",0,0,"quarter"),z("quarter","Q"),N("Q",Rc),Q("Q",function(a,b){b[gd]=3*(q(a)-1)}),H("D",["DD",2],"Do","date"),z("date","D"),N("D",Wc),N("DD",Wc,Sc),N("Do",function(a,b){return a?b._ordinalParse:b._ordinalParseLenient}),Q(["D","DD"],hd),Q("Do",function(a,b){b[hd]=q(a.match(Wc)[0],10)});var Dd=C("Date",!0);H("d",0,"do","day"),H("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),H("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),H("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),z("day","d"),z("weekday","e"),z("isoWeekday","E"),N("d",Wc),N("e",Wc),N("E",Wc),N("dd",cd),N("ddd",cd),N("dddd",cd),R(["dd","ddd","dddd"],function(a,b,c){var d=c._locale.weekdaysParse(a);null!=d?b.d=d:j(c).invalidWeekday=a}),R(["d","e","E"],function(a,b,c,d){b[d]=q(a)});var Ed="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Fd="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Gd="Su_Mo_Tu_We_Th_Fr_Sa".split("_");H("H",["HH",2],0,"hour"),H("h",["hh",2],0,function(){return this.hours()%12||12}),Sb("a",!0),Sb("A",!1),z("hour","h"),N("a",Tb),N("A",Tb),N("H",Wc),N("h",Wc),N("HH",Wc,Sc),N("hh",Wc,Sc),Q(["H","HH"],id),Q(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),Q(["h","hh"],function(a,b,c){b[id]=q(a),j(c).bigHour=!0});var Hd=/[ap]\.?m?\.?/i,Id=C("Hours",!0);H("m",["mm",2],0,"minute"),z("minute","m"),N("m",Wc),N("mm",Wc,Sc),Q(["m","mm"],jd);var Jd=C("Minutes",!1);H("s",["ss",2],0,"second"),z("second","s"),N("s",Wc),N("ss",Wc,Sc),Q(["s","ss"],kd);var Kd=C("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)}),H(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,function(){return 10*this.millisecond()}),H(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),H(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),H(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),H(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),H(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),z("millisecond","ms"),N("S",Xc,Rc),N("SS",Xc,Sc),N("SSS",Xc,Tc);var Ld;for(Ld="SSSS";Ld.length<=9;Ld+="S")N(Ld,$c);for(Ld="S";Ld.length<=9;Ld+="S")Q(Ld,Wb);var Md=C("Milliseconds",!1);H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");var Nd=n.prototype;Nd.add=Ad,Nd.calendar=cb,Nd.clone=db,Nd.diff=ib,Nd.endOf=ub,Nd.format=mb,Nd.from=nb,Nd.fromNow=ob,Nd.to=pb,Nd.toNow=qb,Nd.get=F,Nd.invalidAt=Cb,Nd.isAfter=eb,Nd.isBefore=fb,Nd.isBetween=gb,Nd.isSame=hb,Nd.isValid=Ab,Nd.lang=Cd,Nd.locale=rb,Nd.localeData=sb,Nd.max=wd,Nd.min=vd,Nd.parsingFlags=Bb,Nd.set=F,Nd.startOf=tb,Nd.subtract=Bd,Nd.toArray=yb,Nd.toObject=zb,Nd.toDate=xb,Nd.toISOString=lb,Nd.toJSON=lb,Nd.toString=kb,Nd.unix=wb,Nd.valueOf=vb,Nd.year=td,Nd.isLeapYear=ia,Nd.weekYear=Fb,Nd.isoWeekYear=Gb,Nd.quarter=Nd.quarters=Jb,Nd.month=Y,Nd.daysInMonth=Z,Nd.week=Nd.weeks=na,Nd.isoWeek=Nd.isoWeeks=oa,Nd.weeksInYear=Ib,Nd.isoWeeksInYear=Hb,Nd.date=Dd,Nd.day=Nd.days=Pb,Nd.weekday=Qb,Nd.isoWeekday=Rb,Nd.dayOfYear=qa,Nd.hour=Nd.hours=Id,Nd.minute=Nd.minutes=Jd,Nd.second=Nd.seconds=Kd, Nd.millisecond=Nd.milliseconds=Md,Nd.utcOffset=Na,Nd.utc=Pa,Nd.local=Qa,Nd.parseZone=Ra,Nd.hasAlignedHourOffset=Sa,Nd.isDST=Ta,Nd.isDSTShifted=Ua,Nd.isLocal=Va,Nd.isUtcOffset=Wa,Nd.isUtc=Xa,Nd.isUTC=Xa,Nd.zoneAbbr=Xb,Nd.zoneName=Yb,Nd.dates=aa("dates accessor is deprecated. Use date instead.",Dd),Nd.months=aa("months accessor is deprecated. Use month instead",Y),Nd.years=aa("years accessor is deprecated. Use year instead",td),Nd.zone=aa("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Oa);var Od=Nd,Pd={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Qd={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Rd="Invalid date",Sd="%d",Td=/\d{1,2}/,Ud={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Vd=s.prototype;Vd._calendar=Pd,Vd.calendar=_b,Vd._longDateFormat=Qd,Vd.longDateFormat=ac,Vd._invalidDate=Rd,Vd.invalidDate=bc,Vd._ordinal=Sd,Vd.ordinal=cc,Vd._ordinalParse=Td,Vd.preparse=dc,Vd.postformat=dc,Vd._relativeTime=Ud,Vd.relativeTime=ec,Vd.pastFuture=fc,Vd.set=gc,Vd.months=U,Vd._months=md,Vd.monthsShort=V,Vd._monthsShort=nd,Vd.monthsParse=W,Vd.week=ka,Vd._week=ud,Vd.firstDayOfYear=ma,Vd.firstDayOfWeek=la,Vd.weekdays=Lb,Vd._weekdays=Ed,Vd.weekdaysMin=Nb,Vd._weekdaysMin=Gd,Vd.weekdaysShort=Mb,Vd._weekdaysShort=Fd,Vd.weekdaysParse=Ob,Vd.isPM=Ub,Vd._meridiemParse=Hd,Vd.meridiem=Vb,w("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===q(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),a.lang=aa("moment.lang is deprecated. Use moment.locale instead.",w),a.langData=aa("moment.langData is deprecated. Use moment.localeData instead.",y);var Wd=Math.abs,Xd=yc("ms"),Yd=yc("s"),Zd=yc("m"),$d=yc("h"),_d=yc("d"),ae=yc("w"),be=yc("M"),ce=yc("y"),de=Ac("milliseconds"),ee=Ac("seconds"),fe=Ac("minutes"),ge=Ac("hours"),he=Ac("days"),ie=Ac("months"),je=Ac("years"),ke=Math.round,le={s:45,m:45,h:22,d:26,M:11},me=Math.abs,ne=Ha.prototype;ne.abs=oc,ne.add=qc,ne.subtract=rc,ne.as=wc,ne.asMilliseconds=Xd,ne.asSeconds=Yd,ne.asMinutes=Zd,ne.asHours=$d,ne.asDays=_d,ne.asWeeks=ae,ne.asMonths=be,ne.asYears=ce,ne.valueOf=xc,ne._bubble=tc,ne.get=zc,ne.milliseconds=de,ne.seconds=ee,ne.minutes=fe,ne.hours=ge,ne.days=he,ne.weeks=Bc,ne.months=ie,ne.years=je,ne.humanize=Fc,ne.toISOString=Gc,ne.toString=Gc,ne.toJSON=Gc,ne.locale=rb,ne.localeData=sb,ne.toIsoString=aa("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Gc),ne.lang=Cd,H("X",0,0,"unix"),H("x",0,0,"valueOf"),N("x",_c),N("X",bd),Q("X",function(a,b,c){c._d=new Date(1e3*parseFloat(a,10))}),Q("x",function(a,b,c){c._d=new Date(q(a))}),a.version="2.10.6",b(Da),a.fn=Od,a.min=Fa,a.max=Ga,a.utc=h,a.unix=Zb,a.months=jc,a.isDate=d,a.locale=w,a.invalid=l,a.duration=Ya,a.isMoment=o,a.weekdays=lc,a.parseZone=$b,a.localeData=y,a.isDuration=Ia,a.monthsShort=kc,a.weekdaysMin=nc,a.defineLocale=x,a.weekdaysShort=mc,a.normalizeUnits=A,a.relativeTimeThreshold=Ec;var oe=a;return oe}); //tmpl !function(e){"use strict";var n=function(e,t){var r=/[^\w\-\.:]/.test(e)?new Function(n.arg+",tmpl","var _e=tmpl.encode"+n.helper+",_s='"+e.replace(n.regexp,n.func)+"';return _s;"):n.cache[e]=n.cache[e]||n(n.load(e));return t?r(t,n):function(e){return r(e,n)}};n.cache={},n.load=function(e){return document.getElementById(e).innerHTML},n.regexp=/([\s'\\])(?!(?:[^{]|\{(?!%))*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g,n.func=function(e,n,t,r,c,u){return n?{"\n":"\\n","\r":"\\r","\t":"\\t"," ":" "}[n]||"\\"+n:t?"="===t?"'+_e("+r+")+'":"'+("+r+"==null?'':"+r+")+'":c?"';":u?"_s+='":void 0},n.encReg=/[<>&"'\x00]/g,n.encMap={"<":"<",">":">","&":"&",'"':""","'":"'"},n.encode=function(e){return(null==e?"":""+e).replace(n.encReg,function(e){return n.encMap[e]||""})},n.arg="o",n.helper=",print=function(s,e){_s+=e?(s==null?'':s):_e(s);},include=function(s,d){_s+=tmpl(s,d);}","function"==typeof define&&define.amd?define(function(){return n}):"object"==typeof module&&module.exports?module.exports=n:e.tmpl=n}(this); //# sourceMappingURL=tmpl.min.js.map //cookie !function(a){if("function"==typeof define&&define.amd)define(a);else if("object"==typeof exports)module.exports=a();else{var b=window.Cookies,c=window.Cookies=a();c.noConflict=function(){return window.Cookies=b,c}}}(function(){function a(){for(var a=0,b={};a1){if(f=a({path:"/"},d.defaults,f),"number"==typeof f.expires){var h=new Date;h.setMilliseconds(h.getMilliseconds()+864e5*f.expires),f.expires=h}try{g=JSON.stringify(e),/^[\{\[]/.test(g)&&(e=g)}catch(a){}return e=c.write?c.write(e,b):encodeURIComponent(String(e)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),b=encodeURIComponent(String(b)),b=b.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),b=b.replace(/[\(\)]/g,escape),document.cookie=[b,"=",e,f.expires&&"; expires="+f.expires.toUTCString(),f.path&&"; path="+f.path,f.domain&&"; domain="+f.domain,f.secure?"; secure":""].join("")}b||(g={});for(var i=document.cookie?document.cookie.split("; "):[],j=/(%[0-9A-Z]{2})+/g,k=0;k").get(0).files,n.formdata=void 0!==window.FormData;var i=!!e.fn.prop;e.fn.attr2=function(){if(!i)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t){function r(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;o>a;a++)i[a]=i[a].replace(/\+/g," "),n=i[a].split("="),s.push([decodeURIComponent(n[0]),decodeURIComponent(n[1])]);return s}function o(a){for(var n=new FormData,i=0;i').val(m.extraData[d].value).appendTo(w)[0]:e('').val(m.extraData[d]).appendTo(w)[0]);m.iframeTarget||v.appendTo("body"),g.attachEvent?g.attachEvent("onload",s):g.addEventListener("load",s,!1),setTimeout(t,15);try{w.submit()}catch(h){var x=document.createElement("form").submit;x.apply(w)}}finally{w.setAttribute("action",i),w.setAttribute("enctype",c),r?w.setAttribute("target",r):f.removeAttr("target"),e(l).remove()}}function s(t){if(!x.aborted&&!F){if(M=n(g),M||(a("cannot access response document"),t=k),t===D&&x)return x.abort("timeout"),void S.reject(x,"timeout");if(t==k&&x)return x.abort("server abort"),void S.reject(x,"error","server abort");if(M&&M.location.href!=m.iframeSrc||T){g.detachEvent?g.detachEvent("onload",s):g.removeEventListener("load",s,!1);var r,i="success";try{if(T)throw"timeout";var o="xml"==m.dataType||M.XMLDocument||e.isXMLDoc(M);if(a("isXml="+o),!o&&window.opera&&(null===M.body||!M.body.innerHTML)&&--O)return a("requeing onLoad callback, DOM not available"),void setTimeout(s,250);var u=M.body?M.body:M.documentElement;x.responseText=u?u.innerHTML:null,x.responseXML=M.XMLDocument?M.XMLDocument:M,o&&(m.dataType="xml"),x.getResponseHeader=function(e){var t={"content-type":m.dataType};return t[e.toLowerCase()]},u&&(x.status=Number(u.getAttribute("status"))||x.status,x.statusText=u.getAttribute("statusText")||x.statusText);var c=(m.dataType||"").toLowerCase(),l=/(json|script|text)/.test(c);if(l||m.textarea){var f=M.getElementsByTagName("textarea")[0];if(f)x.responseText=f.value,x.status=Number(f.getAttribute("status"))||x.status,x.statusText=f.getAttribute("statusText")||x.statusText;else if(l){var p=M.getElementsByTagName("pre")[0],h=M.getElementsByTagName("body")[0];p?x.responseText=p.textContent?p.textContent:p.innerText:h&&(x.responseText=h.textContent?h.textContent:h.innerText)}}else"xml"==c&&!x.responseXML&&x.responseText&&(x.responseXML=X(x.responseText));try{E=_(x,c,m)}catch(y){i="parsererror",x.error=r=y||i}}catch(y){a("error caught: ",y),i="error",x.error=r=y||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&x.status<300||304===x.status?"success":"error"),"success"===i?(m.success&&m.success.call(m.context,E,"success",x),S.resolve(x.responseText,"success",x),d&&e.event.trigger("ajaxSuccess",[x,m])):i&&(void 0===r&&(r=x.statusText),m.error&&m.error.call(m.context,x,i,r),S.reject(x,"error",r),d&&e.event.trigger("ajaxError",[x,m,r])),d&&e.event.trigger("ajaxComplete",[x,m]),d&&!--e.active&&e.event.trigger("ajaxStop"),m.complete&&m.complete.call(m.context,x,i),F=!0,m.timeout&&clearTimeout(j),setTimeout(function(){m.iframeTarget?v.attr("src",m.iframeSrc):v.remove(),x.responseXML=null},100)}}}var c,l,m,d,p,v,g,x,y,b,T,j,w=f[0],S=e.Deferred();if(S.abort=function(e){x.abort(e)},r)for(l=0;l'),v.css({position:"absolute",top:"-1000px",left:"-1000px"})),g=v[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";a("aborting upload... "+r),this.aborted=1;try{g.contentWindow.document.execCommand&&g.contentWindow.document.execCommand("Stop")}catch(n){}v.attr("src",m.iframeSrc),x.error=r,m.error&&m.error.call(m.context,x,r,t),d&&e.event.trigger("ajaxError",[x,m,r]),m.complete&&m.complete.call(m.context,x,r)}},d=m.global,d&&0===e.active++&&e.event.trigger("ajaxStart"),d&&e.event.trigger("ajaxSend",[x,m]),m.beforeSend&&m.beforeSend.call(m.context,x,m)===!1)return m.global&&e.active--,S.reject(),S;if(x.aborted)return S.reject(),S;y=w.clk,y&&(b=y.name,b&&!y.disabled&&(m.extraData=m.extraData||{},m.extraData[b]=y.value,"image"==y.type&&(m.extraData[b+".x"]=w.clk_x,m.extraData[b+".y"]=w.clk_y)));var D=1,k=2,A=e("meta[name=csrf-token]").attr("content"),L=e("meta[name=csrf-param]").attr("content");L&&A&&(m.extraData=m.extraData||{},m.extraData[L]=A),m.forceSync?o():setTimeout(o,10);var E,M,F,O=50,X=e.parseXML||function(e,t){return window.ActiveXObject?(t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},C=e.parseJSON||function(e){return window.eval("("+e+")")},_=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i="xml"===r||!r&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&("json"===r||!r&&n.indexOf("json")>=0?o=C(o):("script"===r||!r&&n.indexOf("javascript")>=0)&&e.globalEval(o)),o};return S}if(!this.length)return a("ajaxSubmit: skipping submit process - no element selected"),this;var u,c,l,f=this;"function"==typeof t?t={success:t}:void 0===t&&(t={}),u=t.type||this.attr2("method"),c=t.url||this.attr2("action"),l="string"==typeof c?e.trim(c):"",l=l||window.location.href||"",l&&(l=(l.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:l,success:e.ajaxSettings.success,type:u||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var m={};if(this.trigger("form-pre-serialize",[this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&t.beforeSerialize(this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var d=t.traditional;void 0===d&&(d=e.ajaxSettings.traditional);var p,h=[],v=this.formToArray(t.semantic,h);if(t.data&&(t.extraData=t.data,p=e.param(t.data,d)),t.beforeSubmit&&t.beforeSubmit(v,this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[v,this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var g=e.param(v,d);p&&(g=g?g+"&"+p:p),"GET"==t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+g,t.data=null):t.data=g;var x=[];if(t.resetForm&&x.push(function(){f.resetForm()}),t.clearForm&&x.push(function(){f.clearForm(t.includeHidden)}),!t.dataType&&t.target){var y=t.success||function(){};x.push(function(r){var a=t.replaceTarget?"replaceWith":"html";e(t.target)[a](r).each(y,arguments)})}else t.success&&x.push(t.success);if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=x.length;o>i;i++)x[i].apply(n,[e,r,a||f,f])},t.error){var b=t.error;t.error=function(e,r,a){var n=t.context||this;b.apply(n,[e,r,a,f])}}if(t.complete){var T=t.complete;t.complete=function(e,r){var a=t.context||this;T.apply(a,[e,r,f])}}var j=e("input[type=file]:enabled",this).filter(function(){return""!==e(this).val()}),w=j.length>0,S="multipart/form-data",D=f.attr("enctype")==S||f.attr("encoding")==S,k=n.fileapi&&n.formdata;a("fileAPI :"+k);var A,L=(w||D)&&!k;t.iframe!==!1&&(t.iframe||L)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){A=s(v)}):A=s(v):A=(w||D)&&k?o(v):e.ajax(t),f.removeData("jqxhr").data("jqxhr",A);for(var E=0;Ec;c++)if(d=u[c],f=d.name,f&&!d.disabled)if(t&&o.clk&&"image"==d.type)o.clk==d&&(a.push({name:f,value:e(d).val(),type:d.type}),a.push({name:f+".x",value:o.clk_x},{name:f+".y",value:o.clk_y}));else if(m=e.fieldValue(d,!0),m&&m.constructor==Array)for(r&&r.push(d),l=0,h=m.length;h>l;l++)a.push({name:f,value:m[l]});else if(n.fileapi&&"file"==d.type){r&&r.push(d);var v=d.files;if(v.length)for(l=0;li;i++)r.push({name:a,value:n[i]});else null!==n&&"undefined"!=typeof n&&r.push({name:this.name,value:n})}}),e.param(r)},e.fn.fieldValue=function(t){for(var r=[],a=0,n=this.length;n>a;a++){var i=this[a],o=e.fieldValue(i,t);null===o||"undefined"==typeof o||o.constructor==Array&&!o.length||(o.constructor==Array?e.merge(r,o):r.push(o))}return r},e.fieldValue=function(t,r){var a=t.name,n=t.type,i=t.tagName.toLowerCase();if(void 0===r&&(r=!0),r&&(!a||t.disabled||"reset"==n||"button"==n||("checkbox"==n||"radio"==n)&&!t.checked||("submit"==n||"image"==n)&&t.form&&t.form.clk!=t||"select"==i&&-1==t.selectedIndex))return null;if("select"==i){var o=t.selectedIndex;if(0>o)return null;for(var s=[],u=t.options,c="select-one"==n,l=c?o+1:u.length,f=c?o:0;l>f;f++){var m=u[f];if(m.selected){var d=m.value;if(d||(d=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value),c)return d;s.push(d)}}return s}return e(t).val()},e.fn.clearForm=function(t){return this.each(function(){e("input,select,textarea",this).clearFields(t)})},e.fn.clearFields=e.fn.clearInputs=function(t){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var a=this.type,n=this.tagName.toLowerCase();r.test(a)||"textarea"==n?this.value="":"checkbox"==a||"radio"==a?this.checked=!1:"select"==n?this.selectedIndex=-1:"file"==a?/MSIE/.test(navigator.userAgent)?e(this).replaceWith(e(this).clone(!0)):e(this).val(""):t&&(t===!0&&/hidden/.test(a)||"string"==typeof t&&e(this).is(t))&&(this.value="")})},e.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var r=this.type;if("checkbox"==r||"radio"==r)this.checked=t;else if("option"==this.tagName.toLowerCase()){var a=e(this).parent("select");t&&a[0]&&"select-one"==a[0].type&&a.find("option").selected(!1),this.selected=t}})},e.fn.ajaxSubmit.debug=!1}); //validate !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return!c.settings.submitHandler||(c.submitButton&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(null!=j&&null!=j.form){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr.pseudos||a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){!this.form&&this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0]);var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)a[b]&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0]),!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type;return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=b.hasAttribute("contenteditable")?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);if("function"==typeof f.normalizer){if(i=f.normalizer.call(b,i),"string"!=typeof i)throw new TypeError("The normalizer should return a string value.");delete f.normalizer}for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a}); /*! aRund v.1.7.7.1 - 2017-05-20 */ var createSubProps=function(a,b){if(b.length>1)for(var c=0;c1?a[1].length:0):0},inRange:function(a,b,c){return"number"!=typeof b&&"number"!=typeof c?a:(a=aRunD.toNumber(a)||0,"number"==typeof b&&ac?c:a)},ucfirst:function(a){return a.charAt(0).toUpperCase()+a.slice(1)},getAttribute:function(a,b,c){return"undefined"!=typeof a.attr(b)?a.attr(b):(c=c||"","undefined"!=typeof a.attr("data-ao-"+b)?(b=("ao-"+b).replace(/-[a-z]/g,function(a){return a.charAt(1).toUpperCase()}),a.data(b)):void 0)},getRangeObject:function(a,b){var c=!1;return jQuery.each(a,function(a,d){b>=d.from&&(!c||c.from").on({load:function(){b.resolve(c),jQuery(this).remove()},error:function(){b.reject(),jQuery(this).remove()}}).attr("src",c),b},getPropertyPath:getPropertyPath,getPropertyByName:function(a,b,c,d,e){var f="undefined"==typeof c?null:c;if(!a||"object"!=typeof a)return f;var g=getPropertyPath(b,e),h=a;if(!g.length&&d)return f;for(var i=0;i-1&&(d=a),b)for(c=0;c *").each(function(a,f){c(jQuery(f),b,d,e)})};jQuery.fn.aoEmit=function(a,b,d){return jQuery(this).each(function(e,f){c(jQuery(f),a,b,jQuery.extend(!0,{target:f},d||{}))}),this},jQuery.fn.aoTriggerChange=function(){var a=jQuery(this),c=a.filter('[type="radio"]');return a=a.not(c),b(a),c.each(function(a,c){c=jQuery(c),b(c.closest("form, body").find('[name="'+c.attr("name")+'"]'))}),this},jQuery.event.special.aoChange={setup:function(a){var b=jQuery(this),c=!0;if(a=jQuery.extend(a||{},{preventDefault:!0,preventOnlyLink:!1}),(a.preventOnlyLink&&!b.is("a")||!a.preventDefault)&&(c=!1),b.is('[type="checkbox"]'))b.on("click.aoChangeFunc",function(){b.aoTriggerChange()});else if(b.is('[type="radio"]'))b.closest("form, body").find('input[name="'+b.attr("name")+'"]').filter('[type="radio"]').add(b).off(".aoChangeFunc").on("click.aoChangeFunc",function(){jQuery(this).aoTriggerChange()});else if(b.is("option")){b.on("click.aoChangeFunc",function(a){a.stopPropagation(),b.trigger("aoChange")});var d=b.closest("select");d.data("changeOpts")||d.on("change.aoChangeFunc",function(){d.data("changeOpts").filter(":selected").trigger("aoChange")}),d.data("changeOpts",(d.data("changeOpts")||jQuery([])).add(b))}else b.is("textarea")||b.is("input")&&b.is(':not([type="button"]), :not([type="submit"])')?b.on("blur.aoChangeFunc",function(){b.trigger("aoChange")}):b.on("click.aoChangeFunc",function(a){c&&a.preventDefault(),b.trigger("aoChange")})},teardown:function(){var a=jQuery(this);if(a.off(".aoChangeFunc"),a.is("option")){var b=a.closest("select"),c=(b.data("changeOpts")||jQuery([])).not(a);c.length?a.closest("select").data("changeOpts",c):b.off(".aoChangeFunc")}}};var d={};jQuery.event.special.aoClickOut={setup:function(){var b=jQuery(this),c=a.randomId(d);d[c]=!0,b.data("aoClickOut__id",c),a.$doc.on("click.aoClickOut_"+c,function(a){jQuery(a.target).closest(b).length||b.triggerHandler("aoClickOut")})},teardown:function(){var b=jQuery(this).data("aoClickOut__id");a.$doc.off("click.aoClickOut_"+b),delete d[b]}},jQuery.event.special.destroyproxy={remove:function(){var a=jQuery(this),b=a.data("aoDestroyProxyFunc");b&&jQuery.each(b,function(b,c){c.apply(a[0],[])})}},jQuery.event.special.destroyed={add:function(a){if(a.handler){var b=jQuery(this),c=b.data("aoDestroyProxyFunc")||{};c[a.guid]=a.handler,b.data("aoDestroyProxyFunc",c),b.data("hasDestroyProxy")||(b.data("hasDestroyProxy",!0),b.on("destroyproxy",function(){}))}},remove:function(a){a.handler&&setTimeout(function(){var b=jQuery(this),c=b.data("aoDestroyProxyFunc");c&&c[a.guid]&&delete c[a.guid],b.data("aoDestroyProxyFunc",c)},0)}}}(aRunD),function(a){if("undefined"==typeof jQuery)throw"aRunD A-Z requires jQuery to be loaded first";if("undefined"==typeof aRunD)throw"aRunD A-Z requires aRunD to be loaded first";a(jQuery,aRunD)}(function(a,b){var c=function(a,b){if(a instanceof Array)return a;if(!a||"string"!=typeof a)return[];var c=[],d=new RegExp("(([^"+b+"'\"]*)*('[^']*[']?)*(\"[^\"]*[\"]?)*)*","g");return a.replace(d,function(a){a&&c.push(a)}),c},d=function(a,b){var c=!!(b instanceof Array),d=c?[]:{},e=c?function(a){d.push(a)}:function(a,b){d[b]=a};return jQuery.each(b,function(b,c){f(a,c)&&e(c,b)}),d},e=function(a,b,c,d){var e=!!(b instanceof Array),g=e?[]:{},h=e?function(a){g.push(a)}:function(a,b){g[b]=a},i=c instanceof Array?c:[c];return jQuery.each(b,function(b,c){if("object"==typeof c){for(var e=0;ec?g(2*c-a,b,c):a-1)return!0;var d,e=typeof a,g=typeof c;switch(g){case"object":var h=b.getPropertyByName(c,"required",!0),i=j(a,h);if(!h&&i)return!0;if(!i||c.type&&!f(a,c.type,e)||c.allowed&&!(jQuery.inArray(a,c.allowed)>-1)||c.properties&&e!==g)return!1;if(c.properties&&a)for(d in c.properties)if(!k(a[d],c.properties[d]))return!1;break;case"string":return f(a,c,e);case"boolean":return c===Boolean(a);default:return!1}return!0};d.prototype={__aoType:"DataType",type:function(a){return"undefined"==typeof a?this._type:("string"==typeof a?this._type=a:this._type=null,this)},default:function(a){return"undefined"==typeof a?this._default:(this._default=a,this)},structure:function(a){return"undefined"==typeof a?this._structure:("object"==typeof a&&(this._structure=a),this)},check:function(a){return"undefined"==typeof a?this._check:("function"==typeof a&&(this._check=a),this)},regular:function(a){return"undefined"==typeof a?this._regular:("string"==typeof a?(this._reg=new RegExp("^"+a+"$"),this._regular=a):(this._reg=null,this._regular=null),this)},parser:function(a){return"undefined"==typeof a?this._parser:("function"==typeof a?this._parser=a:this._parser=null,this)},stringifier:function(a){var b=typeof a;return"undefined"===b?this._stringifier:("function"===b&&(this._stringifier=a),this)},allowed:function(a){return"undefined"==typeof a?this._allowed:(a instanceof Array&&a.length?this._allowed=a:this._allowed=null,this)},test:function(a){var b=typeof a;return!!(this._allowed&&jQuery.inArray(a,this._allowed)>-1||this._type&&this._type===b||this._structure&&k(a,this._structure)||this._check&&this._check(a,b))||!(!this._reg||"string"!==b||!a)&&this._reg.test(a)},checkStructure:function(a){return this._structure&&k(a,this._structure)},parse:function(a){return this.test(a)?this._parser&&null!==a?this._parser(a,typeof a):a:null},stringify:function(a){var b=this.parse(a);return e(this._stringifier&&i(a)?this._stringifier(b):b)}};var l=function(a){return c[a]||(c[a]=new d),c[a]},m="((?:\\+|\\-)?[0-9]+(\\.[0-9]+)?)",n=m+"([%]?)",o=m+"(?:deg)?",p=m+"((?:[\\%]?)|(?:px)?)";l("number").type("number").default(0).regular(m).parser(function(a,c){if("number"===c)return a;if("string"===c){var d=this._reg.exec(a);if(d&&d.length>1)return b.toNumber(d[1],this._default)}return this._default}),l("percent").type("number").default(100).regular(n).parser(function(a,c){if("number"===c)return a;if("string"===c){var d=this._reg.exec(a);if(d&&d.length>1)return b.toNumber(d[1],this._default)}return this._default}).stringifier(function(a){return a?a+"%":""}),l("degree").type("number").default(0).regular(o).parser(function(a,c){if("number"===c)return a;if("string"===c){var d=this._reg.exec(a);if(d&&d.length>1)return b.toNumber(d[1],this._default)}return this._default}).stringifier(function(a){return a?a+"deg":""}),l("size").type("number").regular(p).structure({properties:{value:"number",type:["%","px"]}}).parser(function(a,c){switch(c){case"number":return{value:a,type:"px"};case"string":var d=this._reg.exec(a);if(d&&d.length>1){var e={value:b.toNumber(d[1],0),type:"px"};return d.length>3&&d[3]&&(e.type=d[3]),e}break;case"object":if(this.checkStructure(a))return{value:a.value,type:a.type}}return null}).stringifier(function(a){return a&&a.value?a.value+a.type:""}),l("url").regular("url\\([^\\(\\)]+\\)");var q=function(a){this._dataType=l(a)},r=function(a){var b,c=typeof a,d={};switch(c){case"string":b=a.split(":"),b[0]&&(d.from=b[0]),b.length>1&&b[1]&&(d.to=b[1]);break;case"object":a.hasOwnProperty("from")&&(d.from=a.from),a.hasOwnProperty("to")&&(d.to=a.to);break;default:d.from=a}return d};q.prototype={__aoType:"RangeDataType",type:function(a){return"undefined"==typeof a?this._type:("string"==typeof a?this._type=a:this._type=null,this)},test:function(a){var b=r(a);return!(i(b.from)&&!this._dataType.test(b.from)||i(b.to)&&!this._dataType.test(b.to))},parse:function(a){var b=r(a);return b.from=b.hasOwnProperty("from")?this._dataType.parse(b.from):null,b.to=b.hasOwnProperty("to")?this._dataType.parse(b.to):null,b},stringify:function(a){var b=r(a);return b.from=b.hasOwnProperty("from")?this._dataType.stringify(b.from):"",b.to=b.hasOwnProperty("to")?this._dataType.stringify(b.to):"",b.from+(b.to?":"+b.to:"")}};var s=function(a,b){return c[a]||(c[a]=new q(b)),c[a]};s("range","number"),s("percentRange","percent"),s("degreeRange","degree"),s("sizeRange","size"),b.type=l,b.rangeType=s,b.hasType=function(a){return!(!a||"string"!=typeof a||!c[a])},b.checkType=function(a,d){return b.hasType(a)?c[a].test(d):typeof d===a},b.types={},b.stringify=e}),function(a){if("undefined"==typeof jQuery)throw"aRunD Parser requires jQuery to be loaded first";if("undefined"==typeof aRunD)throw"aRunD Parser requires aRunD to be loaded first";a(jQuery,aRunD)}(function(a,b){var c=function(b,c,d){var e=a.extend({},d||{},c||{});return a.each(e,function(a,c){"function"==typeof b[a]&&b[a](c)}),b},d=function(a,b){c(this,a,{name:b||null,type:a})},e=function(a){return b.isOf(a,"ValueCheck")};d.prototype={__aoType:"ValueCheck",name:function(a){var b=typeof a;switch(b){case"undefined":return this._name||this._type||"__anonimous__";case"string":this._name=a;break;default:this._name=null}return this},type:function(a){var b=typeof a;switch(b){case"undefined":return this._type;case"string":this._type=a;break;default:this._type=null}return this},regular:function(a){var b=typeof a;switch(b){case"undefined":return this._regular;case"string":this._reg=new RegExp(a),this._regular=a;break;default:this._reg=null,this._regular=null}return this},allowed:function(a){return"undefined"==typeof a?this._allowed:(a instanceof Array&&a.length?this._allowed=a:this._allowed=null,this)},check:function(a){var b=typeof a;return"undefined"===b?this._check:("function"===b?this._check={test:a}:e(a)?this._check=a:this._check=null,this)},keyObj:function(a){var b=typeof a;switch(b){case"undefined":return this._keys;case"object":this._keys=a;break;default:this._keys=null}return this},test:function(c){var d=this,e=b.toJsValue(c);return"undefined"!=typeof e&&!(d._type||d._reg||d._allowed||d._keys||d._check)||d._type&&b.checkType(d._type,e)||d._reg&&"string"==typeof e&&d._reg.test(e)||d._allowed&&a.inArray(e,d._allowed)!==-1||d._keys&&d._keys[e]||d._check&&d._check.test(e)},parser:function(a){var b=typeof a;return"undefined"===b?this._parser:("function"===b&&(this._parser=a),this)},stringifier:function(a){var b=typeof a;return"undefined"===b?this._stringifier:("function"===b&&(this._stringifier=a),this)},parse:function(a){var c=b.toJsValue(a);if(this._parser)return this._parser(c);var d=this._type;return d&&b.hasType(d)?b.type(d).parse(c):c},stringify:function(a){if(this._stringifier)return this._stringifier(a);var c=this._type;return c&&b.hasType(c)?b.type(c).stringify(a):b.stringify(a)}};var f=function(a){this._list=[],c(this,a)};f.prototype={__aoType:"PropertyCheck",name:function(a){var b=typeof a;switch(b){case"undefined":return this._name;case"string":this._name=a;break;default:this._name=null}return this},checks:function(a){if("undefined"==typeof a)return this._list;if(this._list=[],a instanceof Array&&a.length)for(var b=0;bthis._maxLength?this._maxLength:a.length,f=0,g=0;for(a=a.slice(0,e);f=g;h--)if("string"==typeof this._list[h].parse(c.value).name){for(;h>=g;h--)d.push("-");break}g=f+1,d.push(c.value),delete e[c.name]}++f}return d.join(" ")}};var h=function(a){c(this,a,{type:"datastring"})},i=function(a){var c=b.splitWords(a);return this._dataCheck?this._dataCheck.parse(c):c},j=function(a){return b.hasType(this._type)?b.type(this._type).test(a)?b.type(this._type).parse(a):null:b.toJsValue(a)},k=function(a){return!(a&&"0"!==a&&"false"!==a)},l=function(a){return this._dataCheck?this._dataCheck.stringify(a):""+a},m=function(a){return b.hasType(this._type)?b.type(this._type).test(a)?b.type(this._type).stringify(a):"":b.stringify(a)},n=function(a){return a?"1":"0"};h.prototype={__aoType:"StructuredProperty",data:function(a){return"undefined"==typeof a?this._data:(this._data=a,this)},type:function(a){if(b.isOf(a,"DataCheck"))this._type="datastring",this._dataCheck=a;else{var c=typeof a;switch(c){case"undefined":return this._type;case"string":this._type=a;break;case"function":this._type="process";break;case"object":this._type="datastring",this._dataCheck=new g(a);break;default:this._type=null}}switch(this._type){case"bool":this.parse=k,this.stringify=n;break;case"process":this.parse=a,this.stringify=a;break;case"datastring":this.parse=i,this.stringify=l;break;default:this.parse=j,this.stringify=m}return this},allowEmpty:function(a){return"undefined"==typeof a?"boolean"==typeof this._allowEmpty?this._allowEmpty:"datastring"===this._type:(this._allowEmpty=!!a,this)},dataCheck:function(){return this._dataCheck||(this._dataCheck=new g),this._dataCheck}};var o=function(a){this._list={},c(this,a)};o.prototype={__aoType:"StructuredData",keyCheck:function(a){return"undefined"==typeof a?this._keyCheck:(b.isOf(a,"ValueCheck")?this._keyCheck=a:a&&"object"==typeof a&&(this._keyCheck=new d(a)),this)},default:function(a){var c=typeof a;return"undefined"===c?this._default:(b.isOf(a,"StructuredProperty")?this._default=a:"object"===c?this._default=new h(a):this._default=null,this)},properties:function(b){var c=typeof b;if("undefined"===c)return this._list;if(this._list={},"object"===c){var d=this;a.each(b,function(a,b){d.addProperty(a,b)})}return this},addProperty:function(a,c){if(b.isOf(c,"ValueCheck")||b.isOf(c,"StructuredProperty"))this._list[a]=c;else{var d=typeof c;switch(d){case"string":this._list[a]=new h({type:c});break;case"object":this._list[a]=new h(c)}}return this},parse:function(c,d){if("string"!=typeof c)return{};for(var e,f,g,h=b.splitText(c,";"),i=null,j=null,k=null,l=d?[]:{},m=0;m0&&(j=a.trim(i[0]),j&&(k=!(i.length>1)||a.trim(i.slice(1).join(":")),""===k?k=!0:(f=!1,this._keyCheck&&"string"==typeof k&&(i=b.splitWords(k),g=this._keyCheck.name(),f=j,!this._keyCheck.test(j)&&i.length&&this._keyCheck.test(i[0])&&(f=i[0],k=i.slice(1).join(" "))),e=this._list[f||j]||this._default,e?(k=e.parse(k),f&&f!==j&&this._list[f]&&"datastring"===this._list[f].type()&&(k[g]=f)):k=b.toJsValue(k)),d?l.push({name:j,value:k}):l[j]=k));return l},stringify:function(c){if("object"!=typeof c)return c;var d,e,f,g,h,i,j,k=a.extend(!0,{},c),l=[];for(d in k){if(f=c[d],g=b.stringify(d),h=[],e=!1,f&&"object"==typeof f&&this._keyCheck&&(i=this._keyCheck.name(),e=d,!this._keyCheck.test(d)&&f[i]&&this._keyCheck.test(f[i])&&(e=f[i],h.push(e),delete f[i])),j=this._list[e||d]||this._default){if(f=j.stringify(f),!f&&!j.allowEmpty())continue}else f=b.stringify(f);f&&h.push(f),h.length&&(g+=":"+h.join(" ")),l.push(g)}return l.join(";")}};var p={},q=function(a,b){return p[a]?b&&c(p[a],"string"==typeof b?{type:b}:b):p[a]=new d(b,a),p[a]};q("display",{allowed:["block","none","inline","inline-block","table","table-cell"]}),q("insert",{allowed:["append","prepend","before","after"]}),q("range"),q("vAction",{check:function(a){var b=typeof a;return"boolean"===b||"show"===a||"hide"===a},parser:function(a){return"string"==typeof a?"show"===a:!!a},stringifier:function(a){return a&&"hide"!==a?"show":"hide"}});var r=new o,s=function(a,c){return"undefined"==typeof c?r.parse(a):b.isOf(c,"ValueCheck")||b.isOf(c,"PropertyCheck")||b.isOf(c,"DataCheck")||b.isOf(c,"StructuredProperty")||b.isOf(c,"StructuredData")?c.parse(a):a};b.parser={newCheck:function(a,b){return new d(b,a)},newPropertyCheck:function(a){return new f(a)},newDataCheck:function(a){return new g(a)},newProperty:function(a){return new h(a)},newData:function(a){return new o(a)},check:q,hasCheck:function(a){return!!p[a]},isCheck:e,parse:s,fromAttr:function(a,c,d){return b.hasDataString(a,c)?s(a.data(c),d):null},stringify:function(a,c){return"undefined"==typeof c?r.stringify(a):b.isOf(c,"ValueCheck")||b.isOf(c,"PropertyCheck")||b.isOf(c,"DataCheck")||b.isOf(c,"StructuredProperty")||b.isOf(c,"StructuredData")?c.stringify(a):JSON.stringify(a)}}}),function(a){if("undefined"==typeof jQuery)throw"aRunD Color requires jQuery to be loaded first";if("undefined"==typeof aRunD)throw"aRunD Color requires aRunD to be loaded first";a(jQuery,aRunD)}(function(a,b){var c=function(a,b,d,e){if("transparent"===a||e&&!a)return d&&"transparent"!==d?jQuery.extend({},"object"==typeof d?d:c(d),{a:0}):{r:0,g:0,b:0,a:0};if("object"==typeof a)return a;for(var f,g="#"===a.charAt(0)?a.slice(1):a,h=g.length/3,i={},j=["r","g","b"],k=0;k255)return"FF";if(a<0)return"00";var b=a.toString(16);return 1===b.length?"0"+b:b},f="#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})",g="rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)",h="rgba\\((\\d+),\\s*(\\d+),\\s*(\\d+),\\s*(1|0(?:\\.\\d+)?)\\)";b.type("color").allowed(["transparent"]).regular("(?:(?:"+f+")|(?:"+g+")|(?:"+h+"))").structure({properties:{a:{type:"number",required:!1},r:"number",g:"number",b:"number"}}).parser(function(a,b){switch(b){case"string":if("transparent"===a)return a;var d=this._reg.exec(a);if(d&&d.length>1){if(d[1])return c(d[1]);if(d[2])return{r:parseInt(d[2]),g:parseInt(d[3]),b:parseInt(d[4]),a:1};if(d[5])return{r:parseInt(d[5]),g:parseInt(d[6]),b:parseInt(d[7]),a:parseInt(d[8])}}break;case"object":if(this.checkStructure(a))return{r:a.r,g:a.g,b:a.b,a:a.hasOwnProperty("a")?a.a:1}}return null}).stringifier(function(a){return a?"transparent"===a?a:d(a):""}),b.color={toRGBA:c,stringify:d,delta:function(a,e,f,g){var h="number"==typeof f?f:.5,i="object"==typeof a?a:c(a,null,e),j="object"==typeof e?e:c(e,null,a),k={r:b.delta(i.r,j.r,h),g:b.delta(i.g,j.g,h),b:b.delta(i.b,j.b,h),a:b.delta(i.a,j.a,h)};return g?d(k):k},RGBAdiff:function(a,b){for(var c=[],d=["r","g","b","a"],e=0;e=0;b--)if(h[b]===a){h.splice(b,1);break}},l=function(a,b){var c=!1;switch(b){case"display":c=a.css(b),"none"===c&&(c=a.data("ao__display")||"block");break;default:c=a.css(b)}return c},m=function(b){var c=[],d="",e=typeof b;if(b instanceof Array)for(var f=0;fc&&(d[a]=c,l=!0)),f[a]&&(c=j[a]?d[b]*f[a].value/100:f[a].value,d[a]-1?g={top:0,left:0}:(j!==this.position()&&(l=this.unifyPosition()),g=this.offset(a,b,c,l))),h=this.parentSize(a),i.position=l,i.posX=b?n(b,h.width):{align:"left",value:g.left,type:"px"},i.posY=c?o(c,h.height):{align:"top",value:g.top,type:"px"},d&&(i.toX=n(d,h.width,i.posX)),e&&(i.toY=o(e,h.height,i.posY)),s(i.posX),s(i.posY),s(i.toX),s(i.toY),i}};var u=function(a,b){return jQuery("").css(jQuery.extend({width:0,height:0,display:"inline-block"},b||{})).insertBefore(a)},v=function(a){if("none"!==a.css("display")&&"absolute"===a.css("position"))return jQuery(a[0].offsetParent);var b=u(a,{position:"absolute"}),c=jQuery(b[0].offsetParent);return b.remove(),c};r("window",{isGlobal:!0,position:"absolute",getFn:function(a,c,d,e,f){var g,h,k={},l=L(),m=a.parent(),n=m.is(".oa-window-fake-wrap")?m:b.$w,o=e||a.css("position"),p=o!==this.position(),q=f||{},r=n.scrollLeft(),s=n.scrollTop();return(c||p)&&(c||(g=a.offset(),h=g.left-r),k.left=i(a,c,l.width,h,0,q.width)),(d||p)&&(d||(g=g||a.offset(),h=g.top-s),k.top=j(a,d,l.height,h,0,q.height)),k},offsetFn:function(a,b,c){return a.parent().is(".oa-window-fake-wrap")?{top:parseInt(a.css("top")),left:parseInt(a.css("left"))}:p(a,b,c)},parentSizeFn:function(){return L()}}),r("document",{position:"absolute",getFn:function(a,b,c,d,e){var f={},g=O(),h=e||{},k=b&&c?{}:a.offset();return f.left=i(a,b,g.width,k.left,0,h.width),f.top=j(a,c,g.height,k.top,0,h.height),f},offsetFn:function(a){return"none"===a.css("display")?{top:0,left:0}:a.offset()},parentSizeFn:function(){return O()}}),r("fixed",{position:"fixed",unifyPosition:"window",getFn:function(a,c,d,e,f){var g,h,k,l={},m=L(),n=e||a.css("position"),o=n!==this.position(),p=f||{};return(c||o)&&(c||(g=a.offset(),h=g.left-b.$w.scrollLeft()),l.left=i(a,c,m.width,h,0,p.width)),(d||o)&&(d||(g=g||a.offset(),k=g.top-b.$w.scrollTop()),l.top=j(a,d,m.height,k,0,p.height)),l},offsetFn:function(a,c,d,e){if(e===this.position())return p(a,c,d);if("none"===a.css("display"))return{top:0,left:0};var f=a.offset();return f.top-=b.$w.scrollTop(),f.left-=b.$w.scrollLeft(),f},parentSizeFn:function(){return L()}}),r("absolute",{position:"absolute",getFn:function(a,b,c,d,e){var f,g,h,k,l={},m=v(a),n=this.parentSize(a,m),o=d||a.css("position"),p="fixed"===o||"static"===o,q=e||{};return(b||p)&&(b||("fixed"===o?(f=a.offset(),g=m.offset(),h=f.left-g.left):"static"===o&&(f=a.position(),h=f.left)),l.left=i(a,b,n.width,h,0,q.width)),(c||p)&&(c||("fixed"===o?(f=f||a.offset(),g=g||m.offset(),k=f.top-g.top):"static"===o&&(f=f||a.position(),k=f.top)),l.top=j(a,c,n.height,k,0,q.height)),l},offsetFn:function(a){return{top:parseInt(a.css("top")),left:parseInt(a.css("left"))}},parentSizeFn:function(a,b){var c=b||v(a);return{width:c.innerWidth(),height:c.innerHeight()}}}),r("relative",{position:"relative",getFn:function(a,b,c,d,e){var f={},g=a.parent(),h=this.parentSize(a,g),k=d||a.css("position"),l=k!==this.position(),m=e||{},n={};return b||c||!l||(n=this.offset(a,b,c)),(b||l)&&(f.left=i(a,b,h.width,n.left,0,m.width)),(c||l)&&(f.top=j(a,c,h.height,n.top,0,m.height)),f},offsetFn:function(a,b,c){var d={};return b||(d.left=parseInt(a.css("left"))||0),c||(d.top=parseInt(a.css("top"))||0),d}});var w=["left","center","right"],x=["top","middle","bottom"],y="(?=$|(?:\\+|\\-)[0-9])",z=function(a){var c=[];if(a&&a.length)for(var d=0;d0?"+":"")+a.value),a.type&&c.push(a.type)),a.offset&&c.push((c.length&&a.offset>0?"+":"")+a.offset+"#"),c.length?c.join(""):b};b.type("positionX").type("number").structure({required:[["align","value","offset"]],properties:{align:{allowed:w,required:!1},value:{type:"number",required:!1},offset:{type:"number",required:!1},type:{allowed:["%","px"],required:!1}}}).allowed(w).regular(z(w)).parser(function(a){return A(this,a,"left")}).stringifier(function(a){return B(a,"left")}),b.type("positionY").type("number").structure({required:[["align","value","offset"]],properties:{align:{allowed:x,required:!1},value:{type:"number",required:!1},offset:{type:"number",required:!1},type:{allowed:["%","px"],required:!1}}}).allowed(x).regular(z(x)).parser(function(a){return A(this,a,"top")}).stringifier(function(a){return B(a,"top")}),b.parser.check("position",{allowed:["absolute","fixed","relative"]}),b.parser.check("absposition",{name:"position",allowed:["absolute","fixed","window","document","relative"]});var C={},D=function(a){jQuery.each(C,function(b,c){c(a)})},E=function(a){return q[a]&&q[a].isGlobal()},F=function(a,b,c,d,e){var f=a.data("ao__position")||a.css("position"),g=d||f;return(b||c||f!==g)&&q[g]?q[g].get(a,b,c,f,e):null},G=function(a,b,c,d){var e=a.data("ao__position")||a.css("position"),f=d||e;return(b||c||e!==f)&&q[f]?{position:q[f].position()}:null};b.addStyling(["position","x","y"],function(a,c,e){var f,g,h,i;if("undefined"!=typeof e.x&&(f=e.x,delete e.x),"undefined"!=typeof e.y&&(g=e.y,delete e.y),"undefined"==typeof e.top&&"undefined"==typeof e.left){if("undefined"!=typeof e.position){i=!0,h=e.position,delete e.position;var j=a.data("ao__position");if(j!==h){var k;if(E(h)){if(a.data("ao__position",h),!a.data("ao__tmpparent")){if(a.data("ao__replacer")||a.data("ao__replacer",jQuery('
').insertBefore(a)),"window"===h){var l=b.getWindowSize();k=jQuery("
").css({position:"absolute",top:b.$w.scrollTop(),left:b.$w.scrollLeft(),width:l.width,height:l.height}).addClass("oa-window-fake-wrap").appendTo(d).append(a).on("aoresize",function(){var a=jQuery(this),c=a.offset(),d=parseInt(a.css("width")),e=parseInt(a.css("height")),f=b.getWindowSize(),g=b.getContentSize(),h={height:f.height,width:f.width};c.top+e>g.height&&(h.top=g.height-f.height),c.left+d>g.width&&(h.left=g.width-f.width),a.css(h)}),a.data("ao__tmpparent",k)}else a.data("ao__tmpparent",d),a.appendTo(d);D(a)}}else if(E(j)){var m=a.data("ao__replacer");k=a.data("ao__tmpparent"),m&&m.length&&(a.data("ao__replacer",null).insertBefore(m),m.remove(),m=null,D(a)),k&&k.is(".oa-window-fake-wrap")&&k.remove(),k=null,a.data("ao__tmpparent",null)}a.data("ao__position",h)}}if(f||g||E(h)){var n=G(a,f,g,h);n&&(jQuery.extend(c,n),e.onComplete.push(function(){a.css(F(a,f,g,h))}))}else i&&(c.position=h)}});var H,I,J=function(a,c,d){var e=b.getWindowSize(),f={},g=d||{};return a&&(f[g.width||"width"]=e.width*a),c&&(f[g.height||"height"]=e.height*c),f},K=function(){var a=b.$w.width(),c=b.$w.height(),d=b.$w.data("ao_windowresize_timeout");if(d&&clearTimeout(d),!H||H.width!==a||H.height!==c){H={width:a,height:c};var e=function(){N(),P();var a=b.$w.data("aoWindowResizeFunc");if(a)for(var c=0;c-1&&c.splice(f,1)}delete b[d]}},e=function(a){a.timeStuck.length?(a.minTime=a.timeStuck[0],a.maxTime=a.timeStuck[a.timeStuck.length-1]):(a.minTime=!1,a.maxTime=!1)},f=function(a,b,c){var d;for(d=0;db)return c||!d?d:--d;if(a[d]===b)return d}return d},g=function(a,b,c){for(var d,e=0,f=a.length-1;;){if(e>=f)return c?e:f;if(b<=a[e])return b===a[e]||c?e:e-1;if(b>=a[f])return b!==a[f]&&c?f+1:f;if(d=Math.ceil((e+f)/2),ba[d]))return d;--f,e=d+1}}},h=function(a,b,c){for(var d,e=0,f=a.length-1;;){if(e>=f)return c?e:f;if(b<=a[e])return b===a[e]||c?e:e-1;if(b>=a[f])return b!==a[f]&&c?f+1:f;if(d=e+Math.ceil((b-a[e])/(a[f]-a[e])*(f-e)),ba[d]))return d;--f,e=d+1}}},i=function(a,b,c){return a.length>20?h(a,b,c):a.length>10?g(a,b,c):f(a,b,c)};tirray.prototype={__aoType:"tirray",clear:function(){return this.length=0,this.items={},this.timeStuck=[],this.at={},this.keys={},this.minTime=!1,this.maxTime=!1,this},remove:function(c){if(this.items[c]){var f=a.inArray(c,this.at[this.items[c].time]);f!==-1&&(this.at[this.items[c].time].splice(f,1),d(this.at,this.timeStuck,this.items[c].time)),b(this,c),e(this)}return this},each:function(a){if(this.length&&"function"==typeof a)for(var b in this.timeStuck){var c=this.at[this.timeStuck[b]];if(c&&c.length)for(var d=0;df.time)&&(this.minTime=f.time,h||(this.timeStuck.unshift(f.time),h=!0)),(this.minTime===!1||this.maxTimeb.length)){b.length-c.length<2&&(c=b);break}c=b}return c},h=function(a,b){return"number"==typeof a&&f[b]&&(a*=f[b].div),a},i=function(a,b,c){if("undefined"==typeof moment)return aRunD.log("Please include moment.js!"),null;try{return moment(a,b,c)}catch(a){return aRunD.log("getMoment error:"),aRunD.log(a),null}},j=function(a,b,c,d){if("undefined"==typeof moment)return aRunD.log("Please include moment.js!"),null;if(null===a)return null;if("object"==typeof a&&a.isValid&&a.isValid())return a;try{if("today"===a)a=moment(new Date).startOf("day");else if("tomorrow"===a)a=moment(new Date).startOf("day").add(1,"day");else if(jQuery.inArray(a.charAt(0),["-","+"])!==-1)switch(d=d||moment(new Date).startOf("day"),a.charAt(0)){case"+":case"-":a=d.add(parseInt(a),a.split(" ").pop())}else c=c||!1,a=moment(a,b,c)}catch(a){return aRunD.log("toDate error:"),aRunD.log(a),null}return a},k=function(){c.length?d||l():d&&(clearTimeout(d),d=!1)},l=function(){d=setTimeout(function(){for(var a=moment(),e=c.length-1;e>=0;e--)b[c[e]]?b[c[e]](a):c.splice(e,1);d=!1,k()},20)},m=function(a){this.name=a,this.$els=jQuery([]),this.time=null,this.timeLeft=null,this.timePass=null,this.now=null,e[a]=this},n=a.type("number").regular()+"([smh]?)";m.prototype={__aoType:"TimeMark",setTime:function(b){return this.time=j(b),this.time&&this.time.isValid()?this.timerName||(this.timerName=a.addTimer(this)):this.timerName&&(a.removeTimer(this.timerName),this.timerName=null),this.trigger()._elsTrigger("aoTimeMarkChange")},clearDate:function(){return this.time=null,this.trigger()._elsTrigger("aoTimeMarkChange")},addElement:function(a){return this.$els=this.$els.add(a),this.trigger()},removeElement:function(a){return this.$els=this.$els.not(a),this},trigger:function(a){return this.now=a||moment(),this.timeLeft=null,this.timePass=null,this.time&&(this.now.isBefore(this.time)?(this.timeLeft=moment.duration(this.time.diff(this.now)),this.timePass=moment.duration(0)):(this.timeLeft=moment.duration(0),this.timePass=moment.duration(this.now.diff(this.time)))),this._elsTrigger("aoTimeMarkTick")},_elsTrigger:function(a){var b=this;return this.timerName?(b.$els.length&&b.$els.each(function(c,d){jQuery(d).triggerHandler(a,[b])}),this):this},remove:function(){this._elsTrigger("aoTimeMarkRemove"),a.removeTimer(this.timerName),this.$els=null,delete e[name]}},a.getMoment=i,a.toDate=j,a.getTimeMark=function(a){return e[a]||null},a.createTimeMark=function(a,b){var c=e[a]||new m(a);return b&&c.setTime(b),c},a.addTimer=function(d){var e,f=typeof d,g=a.randomId(b);switch(f){case"function":e=d;break;case"object":d.trigger&&(e=function(a){d.trigger(a)});break;case"string":e=function(b){a.$doc.trigger(d,[b])}}return e?(b[g]=e,c.unshift(g),k(),g):null},a.removeTimer=function(a){return!!b[a]&&(delete b[a],!0)},a.type("time").type("number").regular(n).parser(function(b,c){var d=0;if("number"===c&&(d=b),"string"===c){var e=this._reg.exec(b);e&&e.length>1&&(d=a.toNumber(e[1],d),e.length>3&&(d=h(d,e[3])))}return d}).stringifier(g),a.rangeType("timeRange","time"),a.parser.check("delay","time"),a.parser.check("duration","time"),a.pushFlist("init",function(b,c){b[c]("[data-ao-timemark]").each(function(b,c){var d=a.parser.fromAttr(jQuery(c),"aoTimemark");if(d)for(var e in d)d.hasOwnProperty(e)&&a.createTimeMark(e,d[e])})})}(aRunD),function(a){if("undefined"==typeof jQuery)throw"aRunD Animaze requires jQuery to be loaded first";if("undefined"==typeof aRunD)throw"aRunD Animaze requires aRunD to be loaded first";if("undefined"==typeof tirray)throw"aRunD Animaze requires tirray to be loaded first";a(jQuery,aRunD,tirray)}(function(a,b,c){var d=function(b,c){var d=a.extend(!0,{},c||{});return a.each(d,function(a,c){"function"==typeof b[a]&&b[a](c)}),b},e=function(a){return function(b,c){return 1-a(1-b,c)}},f=function(a){return function(b,c){return b<.5?a(2*b,c)/2:(2-a(2*(1-b),c))/2}},g=function(a,b){var c=b&&b>0?b:2;return Math.pow(a,c)},h={linear:function(a){return a},easeIn:g,easeOut:e(g),easeInOut:f(g)},i=function(a,c,d,g,i){if(arguments.length<2)return"undefined"==typeof a?h:h[a]||null;var j=b.ucfirst(a);return d===!0||void 0===d?h["easeIn"+j]=c:"function"==typeof d?h["easeIn"+j]=d:h[a]=c,g===!0||void 0===g?h["easeOut"+j]=e(c):"function"==typeof g&&(h["easeOut"+j]=g),i===!0||void 0===i?h["easeInOut"+j]=f(c):"function"==typeof i&&(h["easeInOut"+j]=i),b};i("circ",function(a){return 1-Math.sin(Math.acos(a))}),i("back",function(a,b){var c=b||1.5;return Math.pow(a,2)*((c+1)*a-c)}),i("bounce",function(a){for(var b=0,c=1;1;b+=c,c/=2)if(a>=(7-4*b)/11)return-Math.pow((11-6*b-11*a)/4,2)+Math.pow(c,2)}),i("elastic",function(a,b){var c=b&&b>0?b:10;return Math.pow(2,c*(a-1))*Math.sin(10.5*Math.PI*a)}),i("wave",function(a,b){var c=(b&&b>0?b:2)-1;return(c?Math.pow(2-1/c,2*(a-1)):1)*Math.sin((2*c+.5)*Math.PI*a)});var j={},k=b.parser.newData({keyCheck:{name:"animation",keyObj:j},properties:{delay:"time"}}),l=function(a,b){j[a]=b,k.addProperty(a,b._parser)},m=function(a){var c="object"==typeof a?a:{duration:a},d={delay:c.delay===!0?0:b.toNumber(c.delay,0),duration:c.duration===!0?0:b.toNumber(c.duration,0)};return"number"==typeof c.easeX&&(d.easeX=c.easeX),c.ease?"function"==typeof c.ease?d.ease=c.ease:"string"==typeof c.ease&&h[c.ease]?d.ease=h[c.ease]:d.ease=h.linear:d.ease=h.linear,d},n=function(c){this._parser=b.parser.newProperty(),this._aliases=[],this._keys=[],this._name=c,this._check=a.noop,this._init=a.noop,this._start=a.noop,this._step=a.noop,this._finish=a.noop,this._stop=a.noop,this._dataFn=m,l(c,this)};n.prototype={__aoType:"AnimationType",options:function(a){return d(this,a),this},properties:function(a){if(void 0===a)return this._parser.dataCheck();if(a instanceof Array)for(var b=0;b-1)return!0;return!1},init:function(b){var c={};return this._list.each(function(d){c[d.data.name]={},d.data.animation.initFn()(b,a.extend(!0,c[d.data.name],d.data.data||{}))}),c.animationsLength=this._list.length,c},stop:function(a,b){var c,d=[],e=this;return b.animationsLength=e._list.length,e._list.each(function(f){var g=b[f.data.name];--b.animationsLength,g.stopped=!0,c=f.data.animation.stopFn()(a,g,e),c&&d.push(c)}),d},finish:function(a,b){var c,d=[],e=this;return b.animationsLength=e._list.length,e._list.each(function(f){--b.animationsLength,c=w(e,a,f,b[f.data.name]),c.length&&(d=d.concat(c))}),d},step:function(a,b,c){var d,e=[],f=this;return b.animationsLength=f._list.length,f._list.each(function(g){var h=b[g.data.name];if(h.finished||h.stopped)--b.animationsLength;else if(c>=g.time)if(h.started||(h.started=!0,d=g.data.animation.startFn()(a,h,f),h.endTime=h.delay+h.duration,d&&e.push(d)),c>=h.endTime)--b.animationsLength,d=w(f,a,g,b[g.data.name]),d.length&&(e=e.concat(d));else{h.progress=(c-h.delay)/h.duration;var i=h.ease(h.progress,h.easeX);h.delta!==i&&(h.delta=i,d=g.data.animation.stepFn()(a,h,f),d&&e.push(d))}}),e}},b.animation={ease:i,hasEase:function(a){return!!h[a]},getEasings:function(){return Object.keys(h)},type:s,hasType:function(a){return!!j[a]},new:function(a){return new v(a)},getTypes:function(){return Object.keys(j)},data:m,parse:function(a){return k.parse(a)},stringify:function(a){return k.stringify(a)}}}),function(a){if("undefined"==typeof jQuery)throw"aRunD Animaze requires jQuery to be loaded first";if("undefined"==typeof aRunD)throw"aRunD Animaze requires aRunD to be loaded first";if("undefined"==typeof tirray)throw"aRunD Animaze requires tirray to be loaded first";a(jQuery,aRunD,tirray)}(function(a,b,c){var d=function(b){var d=this;d.current=new c,d.pending=new c,d.timerName=null,d._cache={},d._onComplete={},d.$el=a(b),d.$el.data("aoAnimazeObj",d),d.$el.on("destroyed.aoAnimazeDestroy",function(){d.destroy(),d=null})},e=function(c,d,e){if(!e||"string"!=typeof e)return{};var f=d.attr("data-ao-animaze-"+e);return c._cache[e]&&c._cache[e].key===f||(c._cache[e]={key:f,obj:b.animation.parse(f)}),a.extend(!0,{},c._cache[e].obj)},f=function(a,c,d,e,f){var g,h,i,j=[];switch(f){case"current":h={current:!0};break;case"pending":h={pending:!0};break;default:h={current:!0,pending:!0}}if(c&&c.length){g=b.createKeys(c);for(i in h)h.hasOwnProperty(i)&&h[i]&&(j=j.concat(a[i].getByKeys(g,d,e)))}else for(i in h)h.hasOwnProperty(i)&&h[i]&&(j=j.concat(a[i].getData(d,e)));return j},g=function(c,d,e){if(c.isAnimating(e))return c;d.stopKeys&&(d.stopKeys.length&&c.stop(d.stopKeys),delete d.stopKeys);var f=b.animation.new(),g=0,h=a.noop;if("undefined"!=typeof d.delay&&(g+=b.toNumber(d.delay,0),delete d.delay),"undefined"!=typeof d.extraDelay&&(g+=b.toNumber(d.extraDelay,0),delete d.extraDelay),"undefined"!=typeof d.onComplete&&("function"==typeof d.onComplete&&(h=d.onComplete),delete d.onComplete),"undefined"!=typeof d.keys&&(f.addKeys(d.keys),delete d.keys),f.animations(d).addKeys(e),f.hasAnimations()){var i=f.keys();i.length&&c.stop(i);var j={animation:f,delay:g,onComplete:h,data:f.init(c.$el)};c.pending.add(j,Date.now()+g,b.createKeys(i,e)),c.timerName||(c.$el.css("transition","none").addClass(b.css.isAnimated),c.timerName=b.addTimer(c))}return c},h=function(a,c){if(!a.destroyed){var d=c?c.valueOf():Date.now();a.pending.getUpTo(d,function(b){b.data.last=d,b.data.pass=0,a.current.add(b.data,b.time,b.keys)},!0);var e,f=[];a.current.each(function(b){b.data.pass+=d-b.data.last,b.data.last=d,e=b.data.animation.step(a.$el,b.data.data,b.data.pass),e&&(f=f.concat(e)),b.data.data.animationsLength||(a.destroyed||setTimeout(function(){a.destroyed||b.data.onComplete(a.$el)}),a.current.remove(b.id))}),f.length&&b.setCss(a.$el,jQuery.extend.apply({},f))}};d.prototype={__aoType:"Animaze",destroy:function(){this.stop(),this.$el.data("aoAnimazeObj",null),this.destroyed=!0,this.$el=a([])},getAnimations:function(a){return f(this,a)},isAnimating:function(a){return!!f(this,a).length},animate:function(b,c,d,f){if(this.destroyed)return this;var h=c,i=b;return"string"==typeof b&&(h=b,i=!1),i&&i.force||(i=a.extend({},d,e(this,this.$el,h),i)),("undefined"==typeof f||f)&&(this.triggerSub("animated"),h&&"string"==typeof h&&this.triggerSub(h)),g(this,i,h)},triggerSub:function(a,b){var c=this.$el.find("[data-ao-animaze-on-"+a+"]");return("undefined"==typeof b||b)&&this.$el.is("[data-ao-animaze-on-"+a+"]")&&(c=c.add(this.$el)),c.length&&c.aoAnimaze({extraDelay:10},"on-"+a,!1,!1),this},stop:function(c){var d,e=this,g=[];return f(e,c,function(a){d=a.data.animation.stop(e.$el,a.data.data),d&&g.push(d)},!0),g.length&&b.setCss(e.$el,a.extend.apply({},g)),e.check()},check:function(){return(this.destroyed||!this.current.length&&!this.pending.length)&&(this.timerName&&(b.removeTimer(this.timerName),this.timerName=null),this.$el.css("transition","").removeClass(b.css.isAnimated)),this},finish:function(c){var d,e=this,g=[];return f(e,c,function(a){e.destroyed||(setTimeout(function(){a.data.onComplete(e.$el)}),d=a.data.animation.finish(e.$el,a.data.data,a.data.pass||0)||[],d.length&&(g=g.concat(d)))},!0),g.length&&b.setCss(e.$el,a.extend.apply({},g)),e.check(),e},run:function(a){return h(this,a),this.check(),this}},d.prototype.trigger=d.prototype.run,b.css.isAnimated="ao-is-animated",b.getAniObj=function(a){var b=jQuery(a);return b.data("aoAnimazeObj")||new d(b)},b.animaze=function(a,c,d,e,f){return b.getAniObj(a).animate(c,d,e,f)},b.animazeStop=function(a,c){var d=jQuery(a).data("aoAnimazeObj");d&&b.isOf(d,"Animaze")&&d.stop(c)},b.animazeFinish=function(a,c){var d=jQuery(a).data("aoAnimazeObj");d&&b.isOf(d,"Animaze")&&d.finish(c)},jQuery.fn.aoAnimaze=function(a,c,d,e){return b.hasElements(this,"aRunD - Animaze: Nothing selected.")?(jQuery(this).each(function(f,g){b.animaze(g,a,c,d,e)}),this):this},jQuery.fn.aoAnimazeStop=function(a){return jQuery(this).each(function(c,d){b.animazeStop(d,a)}),this},jQuery.fn.aoAnimazeFinish=function(a){return jQuery(this).each(function(c,d){b.animazeFinish(d,a)}),this},jQuery.fn.aoHasAnimation=function(a){if(!b.hasElements(this,"aRunD - Animaze: Nothing selected."))return this;var c=jQuery(this[0]),d=c.data("aoAnimazeObj");return!!d&&!!d.getAnimations(a).length},jQuery.fn.aoShow=function(a,c,d,e){if(!b.hasElements(this,"aRunD - Animaze: show - Nothing selected."))return this;var f={show:!0,stopKeys:"hide",onComplete:c};return d&&"string"==typeof d&&(f[d]=!0),jQuery(this).aoAnimaze(a,"show",jQuery.extend(f,e)),this},jQuery.fn.aoHide=function(a,c){if(!b.hasElements(this,"aRunD - Animaze: hide - Nothing selected."))return this;var d={hide:!0,stopKeys:"show",onComplete:c};return jQuery(this).aoAnimaze(a,"hide",d),this},jQuery.fn.aoAnimazeDelayed=function(a,c){var d=jQuery(this),e=a||"resize",f=b.toNumber(c,0),g="ao_aniElTimeout_"+e,h=d.data(g);return h&&clearTimeout(h),d.data(g,setTimeout(function(){d.data(g,null),d.aoAnimaze(e)},f)),this}}),function(a){if("undefined"==typeof jQuery)throw"aRunD Animaze Color requires jQuery to be loaded first";if("undefined"==typeof aRunD)throw"aRunD Animaze Color requires aRunD to be loaded first";a(jQuery,aRunD)}(function(a,b){var c={dataFn:function(a){var c=b.animation.data(a);return c.toCurrent=!!a.toCurrent||!a.toColor,c.toColor=a.toColor,c.fromColor=a.fromColor,c},startFn:function(a,c){var d={},e=b.type("color").parse(b.getStyle(a,c._cssName,"current"));return c.toColor=b.color.toRGBA(c.toCurrent?e:c.toColor,null,c.fromColor,!0),c.fromColor&&c.toColor?c.fromColor=b.color.toRGBA(c.fromColor||e,null,c.toColor,!0):c.fromColor=jQuery.extend({},e,{a:0}),c._parts=b.color.RGBAdiff(c.fromColor,c.toColor),b.storeStyle(a,c._cssName,c.toColor,"current"),c._parts.length?(c._current=jQuery.extend({},c.fromColor),d[c._cssName]=b.color.stringify(c.fromColor),d):void(c.duration=0)},stepFn:function(a,c){for(var d=0;dc.toHeight&&f.push(e.height/c.toHeight),c.toWidth&&e.width>c.toWidth&&f.push(e.width/c.toWidth)),{sizeScale:f.length?Math.min.apply(Math,f):1}},properties:[{checks:b.parser.newCheck("width","range")},{checks:b.parser.newCheck("height","range")}]},!1,!1,!1),b.animation.type("transformOrigin",{checkFn:function(a){return!(!a.height&&!a.width)},dataFn:function(a){var c=b.animation.data(a);return c._css={},a.height&&(a.height.from&&(c.toHeight=a.height.from),a.height.to&&(c.fromHeight=a.height.to),c._css.height="transformOriginY"),a.width&&(a.width.from&&(c.toWidth=a.width.from),a.width.to&&(c.fromWidth=a.width.to),c._css.width="transformOriginX"),a.distance&&(a.distance.from&&(c.toDistance=a.distance.from),a.distance.to&&(c.fromDistance=a.distance.to),c._css.distance="transformOriginZ"),c},startFn:function(a,c){if(c.duration){var d=g(a);return c._parts=[],c._uparts=[],c._current={},c.toHeight&&(c.fromHeight||(c.fromHeight=d.transformOriginY||{value:50,type:"%"}),b.parentHeightToType(a,c.fromHeight,c.toHeight.type),c._current.height=jQuery.extend({},c.fromHeight),c.fromHeight.value!==c.toHeight.value&&(c._parts.push("height"),c._uparts.push("Height"))),c.toWidth&&(c.fromWidth||(c.fromWidth=d.transformOriginX||{value:50,type:"%"}),b.parentWidthToType(a,c.fromWidth,c.toWidth.type),c._current.width=jQuery.extend({},c.fromWidth),c.fromWidth.value!==c.toWidth.value&&(c._parts.push("width"),c._uparts.push("Width"))),c.toDistance&&(c.fromDistance||(c.fromDistance=d.transformOriginX||{value:0,type:"px"}),c._current.distance=jQuery.extend({},c.fromDistance),c.fromDistance.value!==c.toDistance.value&&(c._parts.push("distance"),c._uparts.push("Distance"))),c._parts.length||(c.duration=0),b.createByObject(c._current,c._css)}},stepFn:function(a,c){for(var d,e=0;e=h)b.canFireOn=!0,b.$w.off(".aoWindowScroll").scrollTop(e.to);else{var c=e.ease((a-g)/e.duration,e.easeX);b.$w.scrollTop(b.loopRange(f+e.distance*c,0,jQuery("body")[0].scrollHeight)),b.$w.data("aoWindowScroll",setTimeout(j,20))}};if(e.ease=b.animation.ease(e.ease&&b.animation.hasEase(e.ease)?e.ease:"linear"),i&&clearTimeout(i),e.block){if(c=b.block.find(e.block),!c.length)return void(b.canFireOn=!0);e.to=c.offset().top}else e.to?e.to=b.fixSizeValue(e.to,b.getContentSize().height):e.to=0;b.canFireOn=!1,d=Math.round(e.to),d!==e.to&&jQuery("body")[0].scrollHeight>=d?e.to=d:e.to=Math.floor(e.to),e.distance=e.to-f,b.$w.data("aoWindowScroll",setTimeout(j,e.delay))};b.scroll={to:e,parse:function(a){return d.parse(a)},stringify:function(a){return d.stringify(a)}},b.pushFlist("init",function(a,b){a[b]("[data-ao-window-scroll]").on("click.aoWindowScroll",function(a){var b=jQuery(this);b.is("a")&&a.preventDefault(),e(d.parse(b.attr("data-ao-window-scroll")))})})}),function(a){if("undefined"==typeof jQuery)throw"aRunD Block requires jQuery to be loaded first";if("undefined"==typeof aRunD)throw"aRunD Block requires aRunD to be loaded first";if("undefined"==typeof tmpl)throw"aRunD Block requires JavaScript Templates to be loaded first";a(jQuery,aRunD,tmpl)}(function(a,b,c){var d=function(b){if(!b)return a([]);var c=b.split(";");if(c.length>1){for(var e,f=a([]),g=0;g1){var o=n.filter(':ao-has-attr-content("'+e+'",data-ao-hide-block)'),p=n.filter(':ao-has-attr-content("'+e+'",data-ao-show-block)');if(d&&(o.not(":checked").length||p.filter(":checked").length)||!d&&(o.filter(":checked").length||p.not(":checked").length))return}}f.prop(l,m).aoTriggerChange()}}})},h=function(a,b){var c=!!b;if(b&&"string"==typeof b){var d=a.data("aoShow__Checks")||{};d[b]?c=!1:(d[b]=c,a.data("aoShow__Checks",d))}return a.data("aoHide__InProggress")||a.is(":hidden")||c},i=function(c,d,e,i){return h(c,e)?(c.data("aoHide__InProggress",null),f(c,"aoBlockPreShow",[{action:d}]),c.aoShow(!1,function(c){ g(c,!0),f(c,"aoBlockShow",[{action:d}]),b.apply(i,c),c.is("[data-ao-animaze-shownresize]")&&c.off("aoresize.aoShownActs").on({"aoresize.aoShownActs":function(){a(this).aoAnimaze("shownresize")},"aoBlockPreHide.aoShownActs":function(){a(this).off("aoresize.aoShownActs")}}).aoAnimaze("shownresize"),b.$w.trigger("aoSetSizes")},e),c):c},j=function(a,c,d){return!a.is(":visible")||a.data("aoHide__InProggress")?a:(a.data("aoShow__Checks",null),a.data("aoHide__InProggress",!0),f(a,"aoBlockPreHide",[{action:c}]),a.aoHide(!1,function(a){a.data("aoHide__InProggress",null),g(a,!1),f(a,"aoBlockHide",[{action:c}]),b.css.isAnimated&&a.filter("."+b.css.isAnimated).add(a.find("."+b.css.isAnimated)).aoAnimazeFinish(),b.apply(d,a),a.is(b.selectors.template)&&a.remove()}),a)},k={},l=function(b,c){var d=a.Deferred(),e=b.filter("[data-ao-load-template]");if(e=e.add(b.not(e).find("[data-ao-preload-template]")),e.length){var f=0,g=function(){++f,f===e.length&&d.resolve()};e.each(function(b,d){var e=a(d),f=e.data("aoLoadTemplateProperty");n(e.data("aoPreloadTemplate"),c[f]||c).done(function(a){e.empty().append(a)}).always(g)})}else d.resolve();return d},m=function(c){var d=a.Deferred(),e=c.find("img");if(e.length){var f=0,g=function(){++f,f===e.length&&d.resolve()};e.each(function(c,d){b.loadImage(a(d).attr("src")).always(g)})}else d.resolve();return d},n=function(d,e){var f=a.Deferred(),g=a.Deferred();if(k[d])g.resolve();else{var h=d instanceof a?d:a('[data-ao-template="'+d+'"]');if(!h.length)return f.reject();k[d]=c(h.html()),g.resolve()}return g.done(function(){var c=a(k[d](e||{})),g=l(c,e),h=m(c);b.form&&c.find("select[value]").each(function(c,d){var e=a(d);b.form.setValue(e,e.attr("value"))}),f.fail(function(){g.reject(),h.reject()}),a.when(g,h).always(function(){f.resolve(c)})}).fail(function(){f.reject()}),f},o=["append","before","after","prepend"],p={},q=b.parser.newProperty({type:{maxLength:2,list:["block","action"]}}),r=b.parser.newData({properties:{parent:"string",group:"string",min:"number",max:"number",position:"string"}}),s=function(c,e,g,h){var i=a('[data-ao-template="'+e+'"]'),j=a.extend(!0,{},i.length?r.parse(i.data("aoTemplateOptions")):{},g||{});return h?j.$parent=h:j.$parent||(j.parent?j.$parent="root"===j.parent?a("body"):d(j.parent):i.length?j.$parent=i:j.$parent=c),a.inArray(j.position,o)<0&&(j.position=o[0]),j.$parent.is(i)&&(j.position="after"),j=a.extend(j,{$creator:c,template:e}),j.$parent.trigger("aoPreCreateBlock",[j]),n(e,j).done(function(a){j.$parent[j.position](a),a=a.filter("*").data({aoBlockCreator:c}).addClass(b.css.template),j.group&&a.attr({"data-ao-block-group":j.group,"data-ao-block-group-min":j.min||null,"data-ao-block-group-max":j.max||null}),f(a,"aoCreateBlock")}).always(function(){j=null})},t=function(b,c,d,e,f){var g,h=a.Deferred();if("string"==typeof c){var k=c.split(";");if(k.length>1){for(var l=a([]),m=0,n=function(a){l=l.add(a)},o=function(){++m,m===k.length&&h.resolve(l)},q=0;q1?r[1]:r[0]}}return c&&c.block&&p[c.block]?(p[c.block].always(function(){t(b,c,d,e,f).done(function(a){h.resolve(a)}).fail(function(){h.reject()})}),h):(g=c&&c.block?a('[data-ao-block="'+c.block+'"]').eq(0):b,d="boolean"==typeof d?d:!g.is(":visible"),d?(g.length?h.resolve(g):c&&c.template&&!g.length?(h=s(b,c.template),p[c.block]=h,h.done(function(a){a.attr("data-ao-block",c.block).aoInit("filter").aoInit(),"object"==typeof FB&&FB.XFBML.parse(a[0]),"object"==typeof gapi&&gapi.plusone.go()}).always(function(){delete p[c.block]})):h.reject(),h.done(function(b){b.is(":hidden")&&b.data("aoToggleGroup")&&a('[data-ao-toggle-group="'+b.data("aoToggleGroup")+'"]:visible').not(b).each(function(b,c){c=a(c),j(c,e)}),i(b,e,f)})):g.length?(h.resolve(g),j(g,e)):h.reject(),h)},u=function(b,c,d,e){var f=a(b),g="undefined"==typeof d||d,h="object"==typeof c?c:q.parse(c);return f.is('[type="checkbox"], [type="radio"]')?t(f,h.block,g?f.is(":checked"):!f.is(":checked"),h.action,e):f.is("option")?t(f,h.block,g?f.is(":selected"):!f.is(":selected"),h.action,e):t(f,h.block,d,h.action,e)},v={},w=function(a){if(a.data("aoBlockCreator")&&a.data("aoBlockGroup")){var b=a.data("aoBlockGroupMin")||!1,c=a.data("aoBlockGroup");if(b&&e(c).length<=b)return}var d=a.data("ao__uniqueId");d&&v[d]&&delete v[d],f(a,"aoRemoveBlock"),a.remove()},x=function(c,d){var f=d.group?e(d.group).length:null;if(!(d.max&&d.group&&f>=d.max)){var g=a.extend(!0,{},d,{index:f}),h=[],i=a.Deferred();return g.field&&b.form&&b.form.closestFields(c,g.field).triggerHandler("aoTemplateCreation",[g,h]),g.uniqueId=b.randomId(v),v[g.uniqueId]=!0,a.when.apply(a,h).done(function(){s(c,g.template,g).done(function(b){b.data("ao__uniqueId",g.uniqueId).aoInit().on("destroyed",function(){var b=a(this).data("ao__uniqueId");b&&v[b]&&delete v[b]}).on("aoFormReset",function(b){b.stopPropagation(),a(this).remove()}),i.resolve(b)}).reject(function(){i.reject(),delete v[g.uniqueId]}).always(function(){g=null})}),i}};b.css.template="ao-template-block",b.selectors.template="."+b.css.template,b.selectors.block=".ao-block",b.selectors.addBlockClosest=b.selectors.block+", "+b.selectors.formGroup,b.selectors.removeBlockClosest=b.selectors.block+", ."+b.css.template,b.block={findGroup:e,fromTemplate:s,template:n,remove:w,add:x,show:i,hide:j,find:d,toggle:t,triggerToggle:u},a.fn.aoShowBlock=function(){return a(this).each(function(a,b){u(b,!1,!0)}),this},a.fn.aoHideBlock=function(){return a(this).each(function(a,b){u(b,!1,!1)}),this},a.fn.aoToggleBlock=function(){return a(this).each(function(a,b){u(b)}),this},a.fn.aoLoadTemplate=function(b,c){return a(this).each(function(d,e){var f=a(e);s(f,b||f.data("aoLoadTemplate"),c)}),this};var y=b.parser.newData({properties:{template:"string",parent:"string",group:"string",min:"number",max:"number",position:"string",field:"string",strict:"boolean",pref:"string",fieldKey:"string"}});b.pushFlist("init",function(c,d){c[d]("[data-ao-load-template]").aoLoadTemplate(),c[d]("[data-ao-add-block]").off(".aoAddBlock").each(function(c,d){var f=a(d);if(b.hasDataString(f,"aoAddBlock")){var g=y.parse(f.data("aoAddBlock"));if(f.data("aoAddBlock__cache",g),g.min&&g.group&&e(g.group).length=d))&&(!a.x||(!a.x.from||b.fixSizeValue(a.x.from,e)<=c)&&(!a.x.to||b.fixSizeValue(a.x.to,e)>=c))},C=function(a,b){if(a.$parent.is(":hidden"))return!1;var c=a.y?a.$parent.innerHeight():null,d=a.x?a.$parent.innerWidth():null,e=b.pageY,f=b.pageX;if(a.$parent){var g=a.$parent.offset();e=b.pageY-g.top,f=b.pageX-g.left}return B(a,f,e,d,c)},D=function(a,c){var d=b.getContentSize(),e=c.pageY,f=c.pageX;if(a.$parent){var g=a.$parent.offset();e=c.pageY-g.top,f=c.pageX-g.left}return B(a,f,e,d.width,d.height)},E=function(a,b){var c=a.data,d=c.mouseInCheck(c,b);return c.mousein!==d&&(c.mousein=d,c.mousein)};y("mouseat",{properties:[{checks:b.parser.newCheck("y","sizeRange")},{checks:b.parser.newCheck("x","sizeRange")}],setupFn:function(a){var c=a.data;switch(A(c,"y",!0),A(c,"x",!0),c.block){case"page":c.mouseInCheck=D;break;default:var d=b.block.find(c.block);c.$parent=d.length?d:c.$el,c.mouseInCheck=C}a.addEvent(["mousemove","mouseleave"],b.$doc,E)}},!1);var F=function(c){var d=c.data;if(d.$blockEl&&d.$blockEl.is(":hidden"))return!1;var e=d.$blockEl||"page",f=b.heightToType(e,a.extend({},d.y.from),"px").value,g=d.y.to?b.heightToType(e,a.extend({},d.y.to),"px").value:f,h=b.getWindowSize(),i=b.$w.scrollTop(),j=b.$w.scrollTop()+h.height,k=!1;if(d.$blockEl){var l=e.offset().top;f+=l,g+=l}return d.crossed?(j<=f||i>g)&&(d.crossed=!1):(i<=f&&j>=g||i>=f&&j<=g)&&(d.crossed=k=!0),k};y("inview",{properties:{checks:b.parser.newCheck("y","sizeRange")},setupFn:function(a){var c=a.data;if(A(c,"y"),c.block){var d=b.block.find(c.block);d.length&&(c.$blockEl=d,a.addEvent("aoBlockShow",d))}a.addEvent(["scroll","load"],b.$w),a.addCheck(F)}},!1);var G=function(c,d,e){var f=d.y.from?b.heightToType(c,a.extend({},d.y.from),"px").value:0,g=d.y.to?b.heightToType(c,a.extend({},d.y.to),"px").value:f;if(d.$blockEl){var h=d.$blockEl.offset().top;f+=h,g+=h}return(d.previousg)&&e>=f&&e<=g},H=function(c,d,e){var f=d.y.from?b.heightToType(c,a.extend({},d.y.from),"px").value:0;return d.$blockEl&&(f+=d.$blockEl.offset().top),d.previouse&&d.previous>f&&f>=e},J=function(a){var c=a.data;if(c.$blockEl&&c.$blockEl.is(":hidden"))return!1;var d=b.$w.scrollTop(),e=c.extraCheck(c.$blockEl||"page",c,d);return c.previous=d,e};y("scroll",{properties:[{checks:b.parser.newCheck("y","sizeRange")}],setupFn:function(a){var c=a.data;if(c.block){var d=b.block.find(c.block);d.length&&(c.$blockEl=d,a.addEvent("aoBlockShow",d))}if(!c.y||!c.y.from&&!c.y.to){if(!c.$blockEl)return c.disabled=!0,c;c.y={from:{value:0,type:"px"}}}c.previous=-1,c.y.from&&c.y.to?c.extraCheck=G:c.extraCheck=c.y.from?H:I,a.addEvent(["scroll","load"],b.$w),a.addCheck(J)}},!1);var K=function(a,b,c){var d=!(!c||!c.action)&&c.action,e=a.data.action||!1;return!(e&&d!==e&&("none"!==e||d))},L=function(a){var c=a.data;c.block?a.addEvent(c.eName+("any"===c.block?"__gl":c.block),b.$doc,K):a.addEvent(c.eName,c.$el,K)};y("blockhide",{data:{eName:"aoBlockHide"},setupFn:L}),y("blockshow",{data:{eName:"aoBlockShow"},setupFn:L}),y("blockprehide",{data:{eName:"aoBlockPreHide"},setupFn:L}),y("blockpreshow",{data:{eName:"aoBlockPreShow"},setupFn:L}),b.canFireOn=!0,b.trigger={new:g,type:v,blockType:y,hasType:function(a){return!!c[a]}},a.fn.aoCancelFireOn=function(c){return c&&b.hasElements(this,"aRunD - FireOn: cancel - Nothing selected.")?(a(this).each(function(b,d){if(d=a(d),d.data("aoFOE"+c)){var e=d.data("aoFOE"+c);e.cancel()}}),this):this},a.fn.aoAddFireOn=function(c,d,f){return b.hasElements(this,"aRunD - FireOn: add - Nothing selected.")?(a(this).each(function(g,h){var i,j=a(h);if("object"==typeof d)i=d;else{var k=j.data("ao"+b.ucfirst(c)+"On");k&&(i=e.parse(k))}if(i){var l="aoFOE"+c,m=j.data(l);m||(m=new o(j,f),j.data(l,m)),m.add(i)}}),this):this},a.fn.aoAddShowOn=function(c,d,e){return b.hasElements(this,"aRunD - FireOn: add showOn - Nothing selected.")?(a(this).aoAddFireOn("show",c,function(c){var f=a(c);f.is("[data-ao-template]")?b.block.triggerToggle(f,f.data("aoTemplate"),!0,"popup"):b.block.show(f,e||"aoShowOn",d)}),this):this},a.fn.aoAddHideOn=function(c){return b.hasElements(this,"aRunD - FireOn: add hideOn - Nothing selected.")?(a(this).aoAddFireOn("hide",c,function(c){b.block.hide(a(c),"aoHideOn")}),this):this},b.pushFlist("init",function(a,b){a[b]("[data-ao-show-on]").aoAddShowOn(),a[b]("[data-ao-hide-on]").aoAddHideOn()})}),function(a){if("undefined"==typeof jQuery)throw"aRunD Lazy requires jQuery to be loaded first";if("undefined"==typeof aRunD)throw"aRunD Lazy requires aRunD to be loaded first";a(jQuery,aRunD)}(function(a,b){var c={},d=function(a,b){"function"==typeof jQuery&&a instanceof jQuery&&(a=a[0]);var c=a.getBoundingClientRect(),d=(window.innerHeight||document.documentElement.clientHeight)+b,e=(window.innerWidth||document.documentElement.clientWidth)+b;return(c.top<=d||c.bottom<=d)&&(c.left<=e||c.right<=e)};b.pushFlist("init",function(e,f){e[f]("[data-ao-lazy]:not(.ao-lazy)").each(function(e,f){var g=b.randomId(c),h=a(f),i=function(){if(h.is(":visible")&&d(h,100)){var c=h.data("aoLazy");a('[data-ao-lazy="'+c+'"]').triggerHandler("aoLazyLoaded"),b.loadImage(c).done(function(b){a('[data-ao-lazy="'+b+'"]').attr("src",b)})}};c[g]=!0,b.$w.on("DOMContentLoaded.aoLazy_"+g+" load.aoLazy_"+g+" resize.aoLazy_"+g+" scroll.aoLazy_"+g,i),b.$doc.on("aoBlockShow.aoLazy_"+g,i),h.addClass("ao-lazy").on("aoLazyLoaded",function(){b.$w.off(".aoLazy_"+g),b.$doc.off(".aoLazy_"+g),h.off("aoLazyLoaded"),delete c[g],h=g=null})})})}),function(a){var b=a.parser.newData({properties:{nextTiming:"time"}}),c=function(c){var d,e=this;this.$el=jQuery(c),this.options=a.parser.fromAttr(this.$el,"aoCountdown",b)||{},d=this.$el.find("[data-ao-counter]"),this.$counter=d.length?d:this.$el,this.setNextTiming(this.options.nextTiming).setTemplate(this.options.template).setRoundType(this.options.roundType).setMinLength(this.options.minLength).setType(this.options.type).setTimeMark(this.options.timeMark).setFormat(this.options.format),e.$el.data("aoCountdown__obj",e).on("destroyed.aoCountdown aoTimeMarkRemove.aoCountdown",function(){e.destroy()}),("undefined"==typeof this.options.autostart||this.options.autostart)&&this.start()},d=function(){var b=this.$val,c=this;return a.block.fromTemplate(this.$el,this.template,this,this.$counter).done(function(a){c.$val=a,b&&b.aoAnimaze(null,"counterhide",{hide:!0,stopKeys:"countershow",onComplete:function(a){a.remove()}}),c.$val.aoAnimaze(null,"countershow",{show:!0,stopKeys:"counterhide"})}),this},e=function(){return this.$counter.html(this.str),this};c.prototype={__aoType:"Countdown",setNextTiming:function(b){return this.nextTiming=a.isInt(b)?b:0,this},setTemplate:function(a){var b=jQuery('[data-ao-template="'+a+'"]');return this.$val&&(this.$val.aoAnimaze(null,"counterhide",{hide:!0,stopKeys:"countershow",onComplete:function(a){a.remove()}}),this.$val=null),b.length?(this.template=a,this.applyValue=d):this.applyValue=e,this},setRoundType:function(b){switch(b){case"round":this.round=Math.round;break;case"no":this.round=a.returnFirst;break;case"ceil":this.round=Math.ceil;break;default:this.round=Math.floor}return this},setMinLength:function(b){return this.minLength=b,this.padLeft=b>0?a.padLeft:a.returnFirst,this},setType:function(a){switch(a){case"timepass":case"pass":this.prop="timePass",this.nextOp=1;break;default:this.prop="timeLeft",this.nextOp=-1}return this},setFormat:function(b){switch(this.format=b,b){case"years":case"months":case"weeks":case"days":case"hours":case"minutes":case"seconds":case"milliseconds":break;default:this.format="seconds"}return this.fullFormat="as"+a.ucfirst(this.format),this.options.full&&(this.format=this.fullFormat),this},setTimeMark:function(b){var c=null;return b&&(c=a.getTimeMark(b)),c||this.timeMark||(c=a.createTimeMark(a.randomId(),this.time||moment())),c&&(this.timeMark&&this.timeMark.removeElement(this.$el),this.timeMark=c,c.addElement(this.$el)),this},getValue:function(){return this.round(this.duration[this.format]())},checkEnded:function(){var a=this.round(this.duration[this.fullFormat]());return a>a+this.nextOp&&!a&&(this.ended=!0,this.stop(),this.options.hideEnded&&this.$el.aoAnimaze(null,"counterended",{hide:!0,onComplete:function(a){a.addClass("ao-countdown-ended")}})),this},trigger:function(){var a=this.timeMark[this.prop].asMilliseconds()+this.nextOp*this.nextTiming;return this.duration=moment.duration(a>0?a:0),a=this.getValue(),this.val!==a&&(this.val=a,this.str=this.padLeft(a,this.minLength,this.options.padStr),this.applyValue(),a||this.checkEnded()),this},stop:function(){return this.isRunning&&(this.isRunning=!1,this.$el.off(".aoCountdownRun")),this},start:function(){if(!this.isRunning&&!this.ended){var a=this;this.isRunning=!0,this.$el.on("aoTimeMarkTick.aoCountdownRun aoTimeMarkChange.aoCountdownRun",function(){a.trigger()})}return this},destroy:function(){this.timeMark.removeElement(this.$el),this.$el.off(".aoCountdown").off(".aoCountdownRun"),this.$el=null}},a.countdown=function(a){return a.data("aoCountdown__obj")||new c(a)},jQuery.fn.aoAddCountdownStartOn=function(b){return a.hasElements(this,"aRunD - FireOn: add CountdownStartOn - Nothing selected.")?(jQuery(this).aoAddFireOn("CountdownStart",b,function(b){a.countdown(jQuery(b)).start()}),this):this},jQuery.fn.aoAddCountdownStopOn=function(b){return a.hasElements(this,"aRunD - FireOn: add CountdownStopOn - Nothing selected.")?(jQuery(this).aoAddFireOn("CountdownStop",b,function(b){a.countdown(jQuery(b)).stop()}),this):this},a.pushFlist("init",function(b,c){b[c]("[data-ao-countdown]").each(function(b,c){a.countdown(jQuery(c))}),b[c]("[data-ao-countdown-start-on]").aoAddCountdownStartOn(),b[c]("[data-ao-countdown-stop-on]").aoAddCountdownStopOn()})}(aRunD),function(a){if("undefined"==typeof jQuery)throw"aRunD Animaze Popup requires jQuery to be loaded first";if("undefined"==typeof aRunD)throw"aRunD Animaze Popup requires aRunD to be loaded first";a(jQuery,aRunD)}(function(a,b){b.positionWatch.blackout=function(a){var c=b.getData(a,"ao__blackOutEls",{});jQuery.each(c,function(b,c){c.insertBefore(a)})},b.animation.type("popup",{keys:["popup"],dataFn:function(a){var c=b.animation.data(a);return c},initFn:function(a){b.getAniObj(a).triggerSub("popup-init")},startFn:function(a,c,d){a.data("aoPopup__precss")||a.data("aoPopup__precss",{position:a.css("position"),zIndex:a.css("zIndex")}),a.addClass("ao-popup").off(".aoPopup").on({"aoBlockShow.aoPopupActs":function(a){if(a.target===a.currentTarget){var c=jQuery(this);c.off("aoresize.aoPopupActs"),c.is("[data-ao-animaze-popupresize]")?c.on("aoresize.aoPopupActs",function(){jQuery(this).aoAnimaze("popupresize")}):c.find("[data-ao-animaze-on-popupresize]").length&&c.on("aoresize.aoPopupActs",function(){b.getAniObj(jQuery(this)).triggerSub("popupresize",!1)}),b.getAniObj(c).triggerSub("popup-shown")}},"aoBlockPreHide.aoPopupActs":function(a){a.target===a.currentTarget&&jQuery(this).off("aoresize.aoPopupActs")},"aoBlockHide.aoPopupActs":function(a){if(a.target===a.currentTarget){var c=jQuery(this);b.setCss(c,c.data("aoPopup__precss")),c.off(".aoPopupActs").removeClass("ao-popup").data("aoPopup__precss",null)}}}),b.getAniObj(a).triggerSub("popup");var e={zIndex:"max"};return d.hasKey("move")||(e.position="window",e.x={value:0,align:"center"},e.y={value:0,align:"middle"}),jQuery.extend(e,b.parser.parse(a.attr("data-ao-popup-css")))}},!0,!1,!1),b.animation.type("blackout",{dataFn:function(a){var c=b.animation.data(a);return c.bName=!!a.bName&&a.bName,c.eName=c.bName||"__default",c.vAction="boolean"!=typeof a.vAction||a.vAction,c},startFn:function(a,c){var d=b.getData(a,"ao__blackOutEls",{}),e=b.getData(a,"ao__blackOutEls_timeouts",{}),f=c.eName,g=d[f],h={};return e[f]&&(clearTimeout(e[f]),e[f]=null),c.vAction?(a.off(".aoBlackoutDestroy").on("destroyed.aoBlackOutDestroy",function(){var a=jQuery(this),c=b.getData(a,"ao__blackOutEls",{}),d=b.getData(a,"ao__blackOutEls_timeouts",{});jQuery.each(d,function(a,b){b&&(clearTimeout(b),d[a]=null)}),jQuery.each(c,function(a,b){b.remove()})}),e[f]=setTimeout(function(){e[f]=!1,"static"===a.css("position")&&a.css("position","relative"),g||(g=jQuery('
').data({ao__blackOut_name:f,ao__blackOut_el:a}).attr(b.getAttrByPref(a,"data-ao-blackout"+(c.bName?"-"+c.bName:"")+"-",!0,"data-ao-")).aoInit("filter",!0),g.is("[data-ao-hide-main]")&&g.off(".aoBlackOutHideMain").on("click.aoBlackOutHideMain",function(a){a.preventDefault();var c=jQuery(this);b.block.toggle(c.data("ao__blackOut_el"),!1,!1,c.data("aoHideMain"))}),d[f]=g),g.css({position:"fixed",left:0,top:0,width:"100%",height:"100%",backgroundColor:"#000",zIndex:a.css("zIndex")}).insertBefore(a).aoShow()}),h.zIndex="max"):g&&g.aoHide(!1,function(a){var b=a.data("ao__blackOut_el"),c=b.data("ao__blackOutEls"),d=a.data("ao__blackOut_name");c&&c[d]&&delete c[d],a.remove()}),h},properties:[{checks:b.parser.check("vAction")},{checks:{name:"bName",type:"string"}}]},!0,!1,!1),b.animation.type("singlescreen",{dataFn:function(a){var c=b.animation.data(a);return c.vAction="boolean"!=typeof a.vAction||a.vAction,c},startFn:function(a,c){var d=jQuery("html, body");d.css("overflow",c.vAction?"hidden":""),b.$doc.off(".aniSinglescreen"),c.vAction&&b.$doc.on("touchmove.aniSinglescreen",function(a){a.preventDefault()})},properties:[{checks:b.parser.check("vAction")}]},!0,!1,!1),jQuery.fn.aoPopup=function(){return jQuery(this).each(function(a,c){b.block.triggerToggle(jQuery(c),!1,!0,"popup")}),this},a.fn.aoAddPopupOn=function(c,d){return b.hasElements(this,"aRunD - FireOn: add showOn - Nothing selected.")?(a(this).aoAddFireOn("popup",c,function(c){var e=a(c);e.is("[data-ao-template]")?b.block.triggerToggle(e,e.data("aoTemplate"),!0,"popup"):b.block.show(e,d||"aoPopupOn","popup")}),this):this},b.pushFlist("init",function(a,c){a[c]("[data-ao-popup-on]").aoAddPopupOn(),a[c]("[data-ao-hide-popup]").off(".pShowPopup").on("aoChange.pShowPopup.aoBlockForced",{preventOnlyLink:!0},function(){var a=jQuery(this),c=a.closest(".ao-popup");c.length&&b.block.toggle(c,!1,!1,a.data("aoHidePopup"))}),a[c]("[data-ao-show-popup]").off(".pShowPopup").on("aoChange.pShowPopup.aoBlockForced",{preventOnlyLink:!0},function(){b.block.triggerToggle(jQuery(this),jQuery(this).data("aoShowPopup"),!0,"popup")})})}); if(typeof onExComplete_6794b61738684b19aaff1b6b2628e882 !== "undefined")(function (fn,w,d,q){if(fn)fn(w,d,q)})(onExComplete_6794b61738684b19aaff1b6b2628e882,window,document,jQuery) if(typeof onExComplete_e262943e8abe4a4c952e3e9dbf6051c4 !== "undefined")(function (fn,w,d,q){if(fn)fn(w,d,q)})(onExComplete_e262943e8abe4a4c952e3e9dbf6051c4,window,document,jQuery) var isLoaded_45f385b638684b19aaff1b6b2628e890={};