function retry(a,b){var c=0,d=50,e=!1,f=window.setInterval(function(){a()&&(window.clearInterval(f),b(e)),c++>d&&(window.clearInterval(f),e=!0,b(e))},10)}function isIE10OrLater(a){var b=a.toLowerCase();if(0===b.indexOf("msie")&&0===b.indexOf("trident"))return!1;var c=/(?:msie|rv:)\s?([\d\.]+)/.exec(b);return c&&parseInt(c[1],10)>=10?!0:!1}function detectPrivateMode(a){var b;if(window.webkitRequestFileSystem)window.webkitRequestFileSystem(window.TEMPORARY,1,function(){b=!1},function(a){console.log(a),b=!0});else if(window.indexedDB&&/Firefox/.test(window.navigator.userAgent)){var c;try{c=window.indexedDB.open("test")}catch(d){b=!0}"undefined"==typeof b&&retry(function(){return"done"===c.readyState?!0:!1},function(a){a||(b=c.result?!1:!0)})}else if(isIE10OrLater(window.navigator.userAgent)){b=!1;try{window.indexedDB||(b=!0)}catch(d){b=!0}}else if(window.localStorage&&/Safari/.test(window.navigator.userAgent)){try{window.localStorage.setItem("test",1)}catch(d){b=!0}"undefined"==typeof b&&(b=!1,window.localStorage.removeItem("test"))}retry(function(){return"undefined"!=typeof b?!0:!1},function(c){a(b)})}(function(a){function b(a,b){return function(c){return i(a.call(this,c),b)}}function c(a,b){return function(c){return this.lang().ordinal(a.call(this,c),b)}}function d(){}function e(a){g(this,a)}function f(a){var b=a.years||a.year||a.y||0,c=a.months||a.month||a.M||0,d=a.weeks||a.week||a.w||0,e=a.days||a.day||a.d||0,f=a.hours||a.hour||a.h||0,g=a.minutes||a.minute||a.m||0,h=a.seconds||a.second||a.s||0,i=a.milliseconds||a.millisecond||a.ms||0;this._input=a,this._milliseconds=+i+1e3*h+6e4*g+36e5*f,this._days=+e+7*d,this._months=+c+12*b,this._data={},this._bubble()}function g(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function h(a){return 0>a?Math.ceil(a):Math.floor(a)}function i(a,b){for(var c=a+"";c.lengthc;c++)~~a[c]!==~~b[c]&&f++;return f+e}function m(a){return a?ia[a]||a.toLowerCase().replace(/(.)s$/,"$1"):a}function n(a,b){return b.abbr=a,P[a]||(P[a]=new d),P[a].set(b),P[a]}function o(a){delete P[a]}function p(a){if(!a)return L.fn._lang;if(!P[a]&&Q)try{require("./lang/"+a)}catch(b){return L.fn._lang}return P[a]||L.fn._lang}function q(a){return a.match(/\[.*\]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function r(a){var b,c,d=a.match(T);for(b=0,c=d.length;c>b;b++)d[b]=ma[d[b]]?ma[d[b]]:q(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 s(a,b){return b=t(b,a.lang()),ja[b]||(ja[b]=r(b)),ja[b](a)}function t(a,b){function c(a){return b.longDateFormat(a)||a}for(var d=5;d--&&(U.lastIndex=0,U.test(a));)a=a.replace(U,c);return a}function u(a,b){switch(a){case"DDDD":return X;case"YYYY":return Y;case"YYYYY":return Z;case"S":case"SS":case"SSS":case"DDD":return W;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return $;case"a":case"A":return p(b._l)._meridiemParse;case"X":return ba;case"Z":case"ZZ":return _;case"T":return aa;case"MM":case"DD":case"YY":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":return V;default:return new RegExp(a.replace("\\",""))}}function v(a){var b=(_.exec(a)||[])[0],c=(b+"").match(fa)||["-",0,0],d=+(60*c[1])+~~c[2];return"+"===c[0]?-d:d}function w(a,b,c){var d,e=c._a;switch(a){case"M":case"MM":null!=b&&(e[1]=~~b-1);break;case"MMM":case"MMMM":d=p(c._l).monthsParse(b),null!=d?e[1]=d:c._isValid=!1;break;case"D":case"DD":null!=b&&(e[2]=~~b);break;case"DDD":case"DDDD":null!=b&&(e[1]=0,e[2]=~~b);break;case"YY":e[0]=~~b+(~~b>68?1900:2e3);break;case"YYYY":case"YYYYY":e[0]=~~b;break;case"a":case"A":c._isPm=p(c._l).isPM(b);break;case"H":case"HH":case"h":case"hh":e[3]=~~b;break;case"m":case"mm":e[4]=~~b;break;case"s":case"ss":e[5]=~~b;break;case"S":case"SS":case"SSS":e[6]=~~(1e3*("0."+b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=v(b)}null==b&&(c._isValid=!1)}function x(a){var b,c,d,e=[];if(!a._d){for(d=z(a),b=0;3>b&&null==a._a[b];++b)a._a[b]=e[b]=d[b];for(;7>b;b++)a._a[b]=e[b]=null==a._a[b]?2===b?1:0:a._a[b];e[3]+=~~((a._tzm||0)/60),e[4]+=~~((a._tzm||0)%60),c=new Date(0),a._useUTC?(c.setUTCFullYear(e[0],e[1],e[2]),c.setUTCHours(e[3],e[4],e[5],e[6])):(c.setFullYear(e[0],e[1],e[2]),c.setHours(e[3],e[4],e[5],e[6])),a._d=c}}function y(a){var b=a._i;a._d||(a._a=[b.years||b.year||b.y,b.months||b.month||b.M,b.days||b.day||b.d,b.hours||b.hour||b.h,b.minutes||b.minute||b.m,b.seconds||b.second||b.s,b.milliseconds||b.millisecond||b.ms],x(a))}function z(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function A(a){var b,c,d,e=p(a._l),f=""+a._i;for(d=t(a._f,e).match(T),a._a=[],b=0;bh&&(i=h,d=c);g(a,d)}function C(a){var b,c=a._i,d=ca.exec(c);if(d){for(a._f="YYYY-MM-DD"+(d[2]||" "),b=0;4>b;b++)if(ea[b][1].exec(c)){a._f+=ea[b][0];break}_.exec(c)&&(a._f+=" Z"),A(a)}else a._d=new Date(c)}function D(b){var c=b._i,d=R.exec(c);c===a?b._d=new Date:d?b._d=new Date(+d[1]):"string"==typeof c?C(b):k(c)?(b._a=c.slice(0),x(b)):c instanceof Date?b._d=new Date(+c):"object"==typeof c?y(b):b._d=new Date(c)}function E(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function F(a,b,c){var d=O(Math.abs(a)/1e3),e=O(d/60),f=O(e/60),g=O(f/24),h=O(g/365),i=45>d&&["s",d]||1===e&&["m"]||45>e&&["mm",e]||1===f&&["h"]||22>f&&["hh",f]||1===g&&["d"]||25>=g&&["dd",g]||45>=g&&["M"]||345>g&&["MM",O(g/30)]||1===h&&["y"]||["yy",h];return i[2]=b,i[3]=a>0,i[4]=c,E.apply({},i)}function G(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=L(a).add("d",f),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function H(a){var b=a._i,c=a._f;return null===b||""===b?null:("string"==typeof b&&(a._i=b=p().preparse(b)),L.isMoment(b)?(a=g({},b),a._d=new Date(+b._d)):c?k(c)?B(a):A(a):D(a),new e(a))}function I(a,b){L.fn[a]=L.fn[a+"s"]=function(a){var c=this._isUTC?"UTC":"";return null!=a?(this._d["set"+c+b](a),L.updateOffset(this),this):this._d["get"+c+b]()}}function J(a){L.duration.fn[a]=function(){return this._data[a]}}function K(a,b){L.duration.fn["as"+a]=function(){return+this/b}}for(var L,M,N="2.2.1",O=Math.round,P={},Q="undefined"!=typeof module&&module.exports,R=/^\/?Date\((\-?\d+)/i,S=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)\:(\d+)\.?(\d{3})?/,T=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|SS?S?|X|zz?|ZZ?|.)/g,U=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,V=/\d\d?/,W=/\d{1,3}/,X=/\d{3}/,Y=/\d{1,4}/,Z=/[+\-]?\d{1,6}/,$=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,_=/Z|[\+\-]\d\d:?\d\d/i,aa=/T/i,ba=/[\+\-]?\d+(\.\d{1,3})?/,ca=/^\s*\d{4}-\d\d-\d\d((T| )(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,da="YYYY-MM-DDTHH:mm:ssZ",ea=[["HH:mm:ss.S",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],fa=/([\+\-]|\d\d)/gi,ga="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),ha={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},ia={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",w:"week",W:"isoweek",M:"month",y:"year"},ja={},ka="DDD w W M D d".split(" "),la="M D H h m s w W".split(" "),ma={M:function(){return this.month()+1},MMM:function(a){return this.lang().monthsShort(this,a)},MMMM:function(a){return this.lang().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.lang().weekdaysMin(this,a)},ddd:function(a){return this.lang().weekdaysShort(this,a)},dddd:function(a){return this.lang().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return i(this.year()%100,2)},YYYY:function(){return i(this.year(),4)},YYYYY:function(){return i(this.year(),5)},gg:function(){return i(this.weekYear()%100,2)},gggg:function(){return this.weekYear()},ggggg:function(){return i(this.weekYear(),5)},GG:function(){return i(this.isoWeekYear()%100,2)},GGGG:function(){return this.isoWeekYear()},GGGGG:function(){return i(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return~~(this.milliseconds()/100)},SS:function(){return i(~~(this.milliseconds()/10),2)},SSS:function(){return i(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+i(~~(a/60),2)+":"+i(~~a%60,2)},ZZ:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+i(~~(10*a/6),4)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()}};ka.length;)M=ka.pop(),ma[M+"o"]=c(ma[M],M);for(;la.length;)M=la.pop(),ma[M+M]=b(ma[M],2);for(ma.DDDD=b(ma.DDD,3),g(d.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a){var b,c,d;for(this._monthsParse||(this._monthsParse=[]),b=0;12>b;b++)if(this._monthsParse[b]||(c=L.utc([2e3,b]),d="^"+this.months(c,"")+"|^"+this.monthsShort(c,""),this._monthsParse[b]=new RegExp(d.replace(".",""),"i")),this._monthsParse[b].test(a))return b},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=L([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},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b){var c=this._calendar[a];return"function"==typeof c?c.apply(b):c},_relativeTime:{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"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",preparse:function(a){return a},postformat:function(a){return a},week:function(a){return G(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6}}),L=function(a,b,c){return H({_i:a,_f:b,_l:c,_isUTC:!1})},L.utc=function(a,b,c){return H({_useUTC:!0,_isUTC:!0,_l:c,_i:a,_f:b}).utc()},L.unix=function(a){return L(1e3*a)},L.duration=function(a,b){var c,d,e=L.isDuration(a),g="number"==typeof a,h=e?a._input:g?{}:a,i=S.exec(a);return g?b?h[b]=a:h.milliseconds=a:i&&(c="-"===i[1]?-1:1,h={y:0,d:~~i[2]*c,h:~~i[3]*c,m:~~i[4]*c,s:~~i[5]*c,ms:~~i[6]*c}),d=new f(h),e&&a.hasOwnProperty("_lang")&&(d._lang=a._lang),d},L.version=N,L.defaultFormat=da,L.updateOffset=function(){},L.lang=function(a,b){return a?(a=a.toLowerCase(),a=a.replace("_","-"),b?n(a,b):null===b?(o(a),a="en"):P[a]||p(a),void(L.duration.fn._lang=L.fn._lang=p(a))):L.fn._lang._abbr},L.langData=function(a){return a&&a._lang&&a._lang._abbr&&(a=a._lang._abbr),p(a)},L.isMoment=function(a){return a instanceof e},L.isDuration=function(a){return a instanceof f},g(L.fn=e.prototype,{clone:function(){return L(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){return s(L(this).utc(),"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return null==this._isValid&&(this._isValid=this._a?!l(this._a,(this._isUTC?L.utc(this._a):L(this._a)).toArray()):!isNaN(this._d.getTime())),!!this._isValid},invalidAt:function(){var a,b=this._a,c=(this._isUTC?L.utc(this._a):L(this._a)).toArray();for(a=6;a>=0&&b[a]===c[a];--a);return a},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(a){var b=s(this,a||L.defaultFormat);return this.lang().postformat(b)},add:function(a,b){var c;return c="string"==typeof a?L.duration(+b,a):L.duration(a,b),j(this,c,1),this},subtract:function(a,b){var c;return c="string"==typeof a?L.duration(+b,a):L.duration(a,b),j(this,c,-1),this},diff:function(a,b,c){var d,e,f=this._isUTC?L(a).zone(this._offset||0):L(a).local(),g=6e4*(this.zone()-f.zone());return b=m(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+f.daysInMonth()),e=12*(this.year()-f.year())+(this.month()-f.month()),e+=(this-L(this).startOf("month")-(f-L(f).startOf("month")))/d,e-=6e4*(this.zone()-L(this).startOf("month").zone()-(f.zone()-L(f).startOf("month").zone()))/d,"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:h(e)},from:function(a,b){return L.duration(this.diff(a)).lang(this.lang()._abbr).humanize(!b)},fromNow:function(a){return this.from(L(),a)},calendar:function(){var a=this.diff(L().zone(this.zone()).startOf("day"),"days",!0),b=-6>a?"sameElse":-1>a?"lastWeek":0>a?"lastDay":1>a?"sameDay":2>a?"nextDay":7>a?"nextWeek":"sameElse";return this.format(this.lang().calendar(b,this))},isLeapYear:function(){var a=this.year();return 0===a%4&&0!==a%100||0===a%400},isDST:function(){return this.zone()+L(a).startOf(b)},isBefore:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)<+L(a).startOf(b)},isSame:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)===+L(a).startOf(b)},min:function(a){return a=L.apply(null,arguments),this>a?this:a},max:function(a){return a=L.apply(null,arguments),a>this?this:a},zone:function(a){var b=this._offset||0;return null==a?this._isUTC?b:this._d.getTimezoneOffset():("string"==typeof a&&(a=v(a)),Math.abs(a)<16&&(a=60*a),this._offset=a,this._isUTC=!0,b!==a&&j(this,L.duration(b-a,"m"),1,!0),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},hasAlignedHourOffset:function(a){return a=a?L(a).zone():0,0===(this.zone()-a)%60},daysInMonth:function(){return L.utc([this.year(),this.month()+1,0]).date()},dayOfYear:function(a){var b=O((L(this).startOf("day")-L(this).startOf("year"))/864e5)+1;return null==a?b:this.add("d",a-b)},weekYear:function(a){var b=G(this,this.lang()._week.dow,this.lang()._week.doy).year;return null==a?b:this.add("y",a-b)},isoWeekYear:function(a){var b=G(this,1,4).year;return null==a?b:this.add("y",a-b)},week:function(a){var b=this.lang().week(this);return null==a?b:this.add("d",7*(a-b))},isoWeek:function(a){var b=G(this,1,4).week;return null==a?b:this.add("d",7*(a-b))},weekday:function(a){var b=(this._d.getDay()+7-this.lang()._week.dow)%7;return null==a?b:this.add("d",a-b)},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},get:function(a){return a=m(a),this[a.toLowerCase()]()},set:function(a,b){a=m(a),this[a.toLowerCase()](b)},lang:function(b){return b===a?this._lang:(this._lang=p(b),this)}}),M=0;M>2,f=(3&b)<<4|c>>4,g=(15&c)<<2|d>>6,h=63&d,isNaN(c)?g=h=64:isNaN(d)&&(h=64),i=i+this._keyStr.charAt(e)+this._keyStr.charAt(f)+this._keyStr.charAt(g)+this._keyStr.charAt(h);return i},decode:function(a){var b,c,d,e,f,g,h,i="",j=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");j>4,c=(15&f)<<4|g>>2,d=(3&g)<<6|h,i+=String.fromCharCode(b),64!=g&&(i+=String.fromCharCode(c)),64!=h&&(i+=String.fromCharCode(d));return i=Base64._utf8_decode(i)},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;cd?b+=String.fromCharCode(d):d>127&&2048>d?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},_utf8_decode:function(a){for(var b="",c=0,d=c1=c2=0;cd?(b+=String.fromCharCode(d),c++):d>191&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&c2),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&c2)<<6|63&c3),c+=3);return b}};"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),function(a){a.map||(a.map=function(a){for(var b=[],c=0;cd;d++)x[c[d]]=c[d]in s;return x.list&&(x.list=!!b.createElement("datalist")&&!!a.HTMLDataListElement),x}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "))}var k,l,m="2.6.2",n={},o=b.documentElement,p="modernizr",q=b.createElement(p),r=q.style,s=b.createElement("input"),t=({}.toString,"Webkit Moz O ms"),u=t.split(" "),v=t.toLowerCase().split(" "),w={},x={},y=[],z=y.slice,A={}.hasOwnProperty;l=e(A,"undefined")||e(A.call,"undefined")?function(a,b){return b in a&&e(a.constructor.prototype[b],"undefined")}:function(a,b){return A.call(a,b)},Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError;var c=z.call(arguments,1),d=function(){if(this instanceof d){var e=function(){};e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(z.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(z.call(arguments)))};return d}),w.borderradius=function(){return i("borderRadius")};for(var B in w)l(w,B)&&(k=B.toLowerCase(),n[k]=w[B](),y.push((n[k]?"":"no-")+k));return n.input||j(),n.addTest=function(a,b){if("object"==typeof a)for(var d in a)l(a,d)&&n.addTest(d,a[d]);else{if(a=a.toLowerCase(),n[a]!==c)return n;b="function"==typeof b?b():b,"undefined"!=typeof enableClasses&&enableClasses&&(o.className+=" "+(b?"":"no-")+a),n[a]=b}return n},d(""),q=s=null,n._version=m,n._domPrefixes=v,n._cssomPrefixes=u,n.testProp=function(a){return g([a])},n.testAllProps=i,n}(this,this.document),$(document).ready(function(){Modernizr.input.placeholder||$("input").each(function(){var a=$(this);if(""===a.val()&&""!==a.attr("placeholder"))if("password"!==a.attr("type"))a.val(a.attr("placeholder")),a.focus(function(){a.val()==a.attr("placeholder")&&a.val("")}),a.blur(function(){""==a.val()&&a.val(a.attr("placeholder"))}),$(a).closest("form").submit(function(){var a=$(this);a.hasClass("placeholderPending")||($("input",this).each(function(){var a=$(this);a.val()===a.attr("placeholder")&&a.val("")}),a.addClass("placeholderPending"))});else{a.after('');var b=$("#"+a.attr("id")+"-faux");b.show().attr("class",a.attr("class")).attr("style",a.attr("style")),a.hide(),b.focus(function(){b.hide(),a.show().focus()}),a.blur(function(){""===a.val()&&(a.hide(),b.show())})}})}),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.transition","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.bindHtml","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdownToggle","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/datepicker/popup.html","template/modal/backdrop.html","template/modal/window.html","template/pagination/pager.html","template/pagination/pagination.html","template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html","template/popover/popover.html","template/progressbar/bar.html","template/progressbar/progress.html","template/progressbar/progressbar.html","template/rating/rating.html","template/tabs/tab.html","template/tabs/tabset.html","template/timepicker/timepicker.html","template/typeahead/typeahead-match.html","template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.transition",[]).factory("$transition",["$q","$timeout","$rootScope",function(a,b,c){function d(a){for(var b in a)if(void 0!==f.style[b])return a[b]}var e=function(d,f,g){g=g||{};var h=a.defer(),i=e[g.animation?"animationEndEventName":"transitionEndEventName"],j=function(){c.$apply(function(){d.unbind(i,j),h.resolve(d)})};return i&&d.bind(i,j),b(function(){angular.isString(f)?d.addClass(f):angular.isFunction(f)?f(d):angular.isObject(f)&&d.css(f),i||h.resolve(d)}),h.promise.cancel=function(){i&&d.unbind(i,j),h.reject("Transition cancelled")},h.promise},f=document.createElement("trans"),g={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},h={WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"};return e.transitionEndEventName=d(g),e.animationEndEventName=d(h),e}]),angular.module("ui.bootstrap.collapse",["ui.bootstrap.transition"]).directive("collapse",["$transition",function(a){var b=function(a,b,c){b.removeClass("collapse"),b.css({height:c}),b[0].offsetWidth,b.addClass("collapse")};return{link:function(c,d,e){function f(){g||(b(c,d,"auto"),d.addClass("in"))}var g,h=!0;c.$watch(e.collapse,function(a){a?l():k()});var i,j=function(b){return i&&i.cancel(),i=a(d,b),i.then(function(){i=void 0},function(){i=void 0}),i},k=function(){if(g=!1,h)h=!1,f();else{var a=d[0].scrollHeight;a?j({height:a+"px"}).then(f):f()}},l=function(){g=!0,d.removeClass("in"),h?(h=!1,b(c,d,0)):(b(c,d,d[0].scrollHeight+"px"),j({height:"0"}))}}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("accordionConfig",{closeOthers:!0}).controller("AccordionController",["$scope","$attrs","accordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(this.groups.indexOf(a),1)}}]).directive("accordion",function(){return{restrict:"EA",controller:"AccordionController",transclude:!0,replace:!1,templateUrl:"template/accordion/accordion.html"}}).directive("accordionGroup",["$parse",function(a){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/accordion/accordion-group.html",scope:{heading:"@"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(b,c,d,e){var f,g;e.addGroup(b),b.isOpen=!1,d.isOpen&&(f=a(d.isOpen),g=f.assign,b.$parent.$watch(f,function(a){b.isOpen=!!a})),b.$watch("isOpen",function(a){a&&e.closeOthers(b),g&&g(b.$parent,a)})}}}]).directive("accordionHeading",function(){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",compile:function(a,b,c){return function(a,b,d,e){e.setHeading(c(a,function(){}))}}}}).directive("accordionTransclude",function(){return{require:"^accordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.accordionTransclude]},function(a){a&&(b.html(""),b.append(a))})}}}),angular.module("ui.bootstrap.alert",[]).controller("AlertController",["$scope","$attrs",function(a,b){a.closeable="close"in b}]).directive("alert",function(){return{restrict:"EA",controller:"AlertController",templateUrl:"template/alert/alert.html",transclude:!0,replace:!0,scope:{type:"=",close:"&"}}}),angular.module("ui.bootstrap.bindHtml",[]).directive("bindHtmlUnsafe",function(){return function(a,b,c){b.addClass("ng-binding").data("$binding",c.bindHtmlUnsafe),a.$watch(c.bindHtmlUnsafe,function(a){b.html(a||"")})}}),angular.module("ui.bootstrap.buttons",[]).constant("buttonConfig",{activeClass:"active",toggleEvent:"click"}).controller("ButtonsController",["buttonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("btnRadio",function(){return{require:["btnRadio","ngModel"],controller:"ButtonsController",link:function(a,b,c,d){var e=d[0],f=d[1];f.$render=function(){b.toggleClass(e.activeClass,angular.equals(f.$modelValue,a.$eval(c.btnRadio)))},b.bind(e.toggleEvent,function(){b.hasClass(e.activeClass)||a.$apply(function(){f.$setViewValue(a.$eval(c.btnRadio)),f.$render()})})}}}).directive("btnCheckbox",function(){return{require:["btnCheckbox","ngModel"],controller:"ButtonsController",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){var d=a.$eval(b);return angular.isDefined(d)?d:c}var h=d[0],i=d[1];i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.bind(h.toggleEvent,function(){a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",["ui.bootstrap.transition"]).controller("CarouselController",["$scope","$timeout","$transition","$q",function(a,b,c){function d(){e();var c=+a.interval;!isNaN(c)&&c>=0&&(g=b(f,c))}function e(){g&&(b.cancel(g),g=null)}function f(){h?(a.next(),d()):a.pause()}var g,h,i=this,j=i.slides=[],k=-1;i.currentSlide=null;var l=!1;i.select=function(e,f){function g(){l||(i.currentSlide&&angular.isString(f)&&!a.noTransition&&e.$element?(e.$element.addClass(f),e.$element[0].offsetWidth,angular.forEach(j,function(a){angular.extend(a,{direction:"",entering:!1,leaving:!1,active:!1})}),angular.extend(e,{direction:f,active:!0,entering:!0}),angular.extend(i.currentSlide||{},{direction:f,leaving:!0 }),a.$currentTransition=c(e.$element,{}),function(b,c){a.$currentTransition.then(function(){h(b,c)},function(){h(b,c)})}(e,i.currentSlide)):h(e,i.currentSlide),i.currentSlide=e,k=m,d())}function h(b,c){angular.extend(b,{direction:"",active:!0,leaving:!1,entering:!1}),angular.extend(c||{},{direction:"",active:!1,leaving:!1,entering:!1}),a.$currentTransition=null}var m=j.indexOf(e);void 0===f&&(f=m>k?"next":"prev"),e&&e!==i.currentSlide&&(a.$currentTransition?(a.$currentTransition.cancel(),b(g)):g())},a.$on("$destroy",function(){l=!0}),i.indexOfSlide=function(a){return j.indexOf(a)},a.next=function(){var b=(k+1)%j.length;return a.$currentTransition?void 0:i.select(j[b],"next")},a.prev=function(){var b=0>k-1?j.length-1:k-1;return a.$currentTransition?void 0:i.select(j[b],"prev")},a.select=function(a){i.select(a)},a.isActive=function(a){return i.currentSlide===a},a.slides=function(){return j},a.$watch("interval",d),a.$on("$destroy",e),a.play=function(){h||(h=!0,d())},a.pause=function(){a.noPause||(h=!1,e())},i.addSlide=function(b,c){b.$element=c,j.push(b),1===j.length||b.active?(i.select(j[j.length-1]),1==j.length&&a.play()):b.active=!1},i.removeSlide=function(a){var b=j.indexOf(a);j.splice(b,1),j.length>0&&a.active?b>=j.length?i.select(j[b-1]):i.select(j[b]):k>b&&k--}}]).directive("carousel",[function(){return{restrict:"EA",transclude:!0,replace:!0,controller:"CarouselController",require:"carousel",templateUrl:"template/carousel/carousel.html",scope:{interval:"=",noTransition:"=",noPause:"="}}}]).directive("slide",["$parse",function(a){return{require:"^carousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/carousel/slide.html",scope:{},link:function(b,c,d,e){if(d.active){var f=a(d.active),g=f.assign,h=b.active=f(b.$parent);b.$watch(function(){var a=f(b.$parent);return a!==b.active&&(a!==h?h=b.active=a:g(b.$parent,a=h=b.active)),a})}e.addSlide(b,c),b.$on("$destroy",function(){e.removeSlide(b)}),b.$watch("active",function(a){a&&e.select(b)})}}}]),angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(a,b){function c(a,c){return a.currentStyle?a.currentStyle[c]:b.getComputedStyle?b.getComputedStyle(a)[c]:a.style[c]}function d(a){return"static"===(c(a,"position")||"static")}var e=function(b){for(var c=a[0],e=b.offsetParent||c;e&&e!==c&&d(e);)e=e.offsetParent;return e||c};return{position:function(b){var c=this.offset(b),d={top:0,left:0},f=e(b[0]);f!=a[0]&&(d=this.offset(angular.element(f)),d.top+=f.clientTop-f.scrollTop,d.left+=f.clientLeft-f.scrollLeft);var g=b[0].getBoundingClientRect();return{width:g.width||b.prop("offsetWidth"),height:g.height||b.prop("offsetHeight"),top:c.top-d.top,left:c.left-d.left}},offset:function(c){var d=c[0].getBoundingClientRect();return{width:d.width||c.prop("offsetWidth"),height:d.height||c.prop("offsetHeight"),top:d.top+(b.pageYOffset||a[0].body.scrollTop||a[0].documentElement.scrollTop),left:d.left+(b.pageXOffset||a[0].body.scrollLeft||a[0].documentElement.scrollLeft)}}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.position"]).constant("datepickerConfig",{dayFormat:"dd",monthFormat:"MMMM",yearFormat:"yyyy",dayHeaderFormat:"EEE",dayTitleFormat:"MMMM yyyy",monthTitleFormat:"yyyy",showWeeks:!0,startingDay:0,yearRange:20,minDate:null,maxDate:null}).controller("DatepickerController",["$scope","$attrs","dateFilter","datepickerConfig",function(a,b,c,d){function e(b,c){return angular.isDefined(b)?a.$parent.$eval(b):c}function f(a,b){return new Date(a,b,0).getDate()}function g(a,b){for(var c=new Array(b),d=a,e=0;b>e;)c[e++]=new Date(d),d.setDate(d.getDate()+1);return c}function h(a,b,d,e){return{date:a,label:c(a,b),selected:!!d,secondary:!!e}}var i={day:e(b.dayFormat,d.dayFormat),month:e(b.monthFormat,d.monthFormat),year:e(b.yearFormat,d.yearFormat),dayHeader:e(b.dayHeaderFormat,d.dayHeaderFormat),dayTitle:e(b.dayTitleFormat,d.dayTitleFormat),monthTitle:e(b.monthTitleFormat,d.monthTitleFormat)},j=e(b.startingDay,d.startingDay),k=e(b.yearRange,d.yearRange);this.minDate=d.minDate?new Date(d.minDate):null,this.maxDate=d.maxDate?new Date(d.maxDate):null,this.modes=[{name:"day",getVisibleDates:function(a,b){var d=a.getFullYear(),e=a.getMonth(),k=new Date(d,e,1),l=j-k.getDay(),m=l>0?7-l:-l,n=new Date(k),o=0;m>0&&(n.setDate(-m+1),o+=m),o+=f(d,e+1),o+=(7-o%7)%7;for(var p=g(n,o),q=new Array(7),r=0;o>r;r++){var s=new Date(p[r]);p[r]=h(s,i.day,b&&b.getDate()===s.getDate()&&b.getMonth()===s.getMonth()&&b.getFullYear()===s.getFullYear(),s.getMonth()!==e)}for(var t=0;7>t;t++)q[t]=c(p[t].date,i.dayHeader);return{objects:p,title:c(a,i.dayTitle),labels:q}},compare:function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},split:7,step:{months:1}},{name:"month",getVisibleDates:function(a,b){for(var d=new Array(12),e=a.getFullYear(),f=0;12>f;f++){var g=new Date(e,f,1);d[f]=h(g,i.month,b&&b.getMonth()===f&&b.getFullYear()===e)}return{objects:d,title:c(a,i.monthTitle)}},compare:function(a,b){return new Date(a.getFullYear(),a.getMonth())-new Date(b.getFullYear(),b.getMonth())},split:3,step:{years:1}},{name:"year",getVisibleDates:function(a,b){for(var c=new Array(k),d=a.getFullYear(),e=parseInt((d-1)/k,10)*k+1,f=0;k>f;f++){var g=new Date(e+f,0,1);c[f]=h(g,i.year,b&&b.getFullYear()===g.getFullYear())}return{objects:c,title:[c[0].label,c[k-1].label].join(" - ")}},compare:function(a,b){return a.getFullYear()-b.getFullYear()},split:5,step:{years:k}}],this.isDisabled=function(b,c){var d=this.modes[c||0];return this.minDate&&d.compare(b,this.minDate)<0||this.maxDate&&d.compare(b,this.maxDate)>0||a.dateDisabled&&a.dateDisabled({date:b,mode:d.name})}}]).directive("datepicker",["dateFilter","$parse","datepickerConfig","$log",function(a,b,c,d){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/datepicker.html",scope:{dateDisabled:"&"},require:["datepicker","?^ngModel"],controller:"DatepickerController",link:function(a,e,f,g){function h(){a.showWeekNumbers=0===o&&q}function i(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c}function j(b){var c=null,e=!0;n.$modelValue&&(c=new Date(n.$modelValue),isNaN(c)?(e=!1,d.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):b&&(p=c)),n.$setValidity("date",e);var f=m.modes[o],g=f.getVisibleDates(p,c);angular.forEach(g.objects,function(a){a.disabled=m.isDisabled(a.date,o)}),n.$setValidity("date-disabled",!c||!m.isDisabled(c)),a.rows=i(g.objects,f.split),a.labels=g.labels||[],a.title=g.title}function k(a){o=a,h(),j()}function l(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var m=g[0],n=g[1];if(n){var o=0,p=new Date,q=c.showWeeks;f.showWeeks?a.$parent.$watch(b(f.showWeeks),function(a){q=!!a,h()}):h(),f.min&&a.$parent.$watch(b(f.min),function(a){m.minDate=a?new Date(a):null,j()}),f.max&&a.$parent.$watch(b(f.max),function(a){m.maxDate=a?new Date(a):null,j()}),n.$render=function(){j(!0)},a.select=function(a){if(0===o){var b=n.$modelValue?new Date(n.$modelValue):new Date(0,0,0,0,0,0,0);b.setFullYear(a.getFullYear(),a.getMonth(),a.getDate()),n.$setViewValue(b),j(!0)}else p=a,k(o-1)},a.move=function(a){var b=m.modes[o].step;p.setMonth(p.getMonth()+a*(b.months||0)),p.setFullYear(p.getFullYear()+a*(b.years||0)),j()},a.toggleMode=function(){k((o+1)%m.modes.length)},a.getWeekNumber=function(b){return 0===o&&a.showWeekNumbers&&7===b.length?l(b[0].date):null}}}}}]).constant("datepickerPopupConfig",{dateFormat:"yyyy-MM-dd",currentText:"Today",toggleWeeksText:"Weeks",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0}).directive("datepickerPopup",["$compile","$parse","$document","$position","dateFilter","datepickerPopupConfig","datepickerConfig",function(a,b,c,d,e,f,g){return{restrict:"EA",require:"ngModel",link:function(h,i,j,k){function l(a){u?u(h,!!a):q.isOpen=!!a}function m(a){if(a){if(angular.isDate(a))return k.$setValidity("date",!0),a;if(angular.isString(a)){var b=new Date(a);return isNaN(b)?void k.$setValidity("date",!1):(k.$setValidity("date",!0),b)}return void k.$setValidity("date",!1)}return k.$setValidity("date",!0),null}function n(a,c,d){a&&(h.$watch(b(a),function(a){q[c]=a}),y.attr(d||c,c))}function o(){q.position=s?d.offset(i):d.position(i),q.position.top=q.position.top+i.prop("offsetHeight")}var p,q=h.$new(),r=angular.isDefined(j.closeOnDateSelection)?h.$eval(j.closeOnDateSelection):f.closeOnDateSelection,s=angular.isDefined(j.datepickerAppendToBody)?h.$eval(j.datepickerAppendToBody):f.appendToBody;j.$observe("datepickerPopup",function(a){p=a||f.dateFormat,k.$render()}),q.showButtonBar=angular.isDefined(j.showButtonBar)?h.$eval(j.showButtonBar):f.showButtonBar,h.$on("$destroy",function(){B.remove(),q.$destroy()}),j.$observe("currentText",function(a){q.currentText=angular.isDefined(a)?a:f.currentText}),j.$observe("toggleWeeksText",function(a){q.toggleWeeksText=angular.isDefined(a)?a:f.toggleWeeksText}),j.$observe("clearText",function(a){q.clearText=angular.isDefined(a)?a:f.clearText}),j.$observe("closeText",function(a){q.closeText=angular.isDefined(a)?a:f.closeText});var t,u;j.isOpen&&(t=b(j.isOpen),u=t.assign,h.$watch(t,function(a){q.isOpen=!!a})),q.isOpen=t?t(h):!1;var v=function(a){q.isOpen&&a.target!==i[0]&&q.$apply(function(){l(!1)})},w=function(){q.$apply(function(){l(!0)})},x=angular.element("
");x.attr({"ng-model":"date","ng-change":"dateSelection()"});var y=angular.element(x.children()[0]);j.datepickerOptions&&y.attr(angular.extend({},h.$eval(j.datepickerOptions))),k.$parsers.unshift(m),q.dateSelection=function(a){angular.isDefined(a)&&(q.date=a),k.$setViewValue(q.date),k.$render(),r&&l(!1)},i.bind("input change keyup",function(){q.$apply(function(){q.date=k.$modelValue})}),k.$render=function(){var a=k.$viewValue?e(k.$viewValue,p):"";i.val(a),q.date=k.$modelValue},n(j.min,"min"),n(j.max,"max"),j.showWeeks?n(j.showWeeks,"showWeeks","show-weeks"):(q.showWeeks=g.showWeeks,y.attr("show-weeks","showWeeks")),j.dateDisabled&&y.attr("date-disabled",j.dateDisabled);var z=!1,A=!1;q.$watch("isOpen",function(a){a?(o(),c.bind("click",v),A&&i.unbind("focus",w),i[0].focus(),z=!0):(z&&c.unbind("click",v),i.bind("focus",w),A=!0),u&&u(h,a)}),q.today=function(){q.dateSelection(new Date)},q.clear=function(){q.dateSelection(null)};var B=a(x)(q);s?c.find("body").append(B):i.after(B)}}}]).directive("datepickerPopupWrap",function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"template/datepicker/popup.html",link:function(a,b){b.bind("click",function(a){a.preventDefault(),a.stopPropagation()})}}}),angular.module("ui.bootstrap.dropdownToggle",[]).directive("dropdownToggle",["$document","$location",function(a){var b=null,c=angular.noop;return{restrict:"CA",link:function(d,e){d.$watch("$location.path",function(){c()}),e.parent().bind("click",function(){c()}),e.bind("click",function(d){var f=e===b;d.preventDefault(),d.stopPropagation(),b&&c(),f||e.hasClass("disabled")||e.prop("disabled")||(e.parent().addClass("open"),b=e,c=function(d){d&&(d.preventDefault(),d.stopPropagation()),a.unbind("click",c),e.parent().removeClass("open"),c=angular.noop,b=null},a.bind("click",c))})}}}]),angular.module("ui.bootstrap.modal",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c0),h&&-1==e()&&(h.remove(),h=void 0),d.modalScope.$destroy()}var g,h,i="modal-open",j=c.$new(!0),k=d.createNew(),l={};return c.$watch(e,function(a){j.index=a}),a.bind("keydown",function(a){var b;27===a.which&&(b=k.top(),b&&b.value.keyboard&&c.$apply(function(){l.dismiss(b.key)}))}),l.open=function(c,d){k.add(c,{deferred:d.deferred,modalScope:d.scope,backdrop:d.backdrop,keyboard:d.keyboard});var f=a.find("body").eq(0);e()>=0&&!h&&(g=angular.element("
"),h=b(g)(j),f.append(h));var l=angular.element("
");l.attr("window-class",d.windowClass),l.attr("index",k.length()-1),l.html(d.content);var m=b(l)(d.scope);k.top().value.modalDomEl=m,f.append(m),f.addClass(i)},l.close=function(a,b){var c=k.get(a);c&&(c.value.deferred.resolve(b),f(a))},l.dismiss=function(a,b){var c=k.get(a).value;c&&(c.deferred.reject(b),f(a))},l.getTop=function(){return k.top()},l}]).provider("$modal",function(){var a={options:{backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$http","$templateCache","$controller","$modalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?d.when(a.template):e.get(a.templateUrl,{cache:f}).then(function(a){return a.data})}function j(a){var c=[];return angular.forEach(a,function(a){(angular.isFunction(a)||angular.isArray(a))&&c.push(d.when(b.invoke(a)))}),c}var k={};return k.open=function(b){var e=d.defer(),f=d.defer(),k={result:e.promise,opened:f.promise,close:function(a){h.close(k,a)},dismiss:function(a){h.dismiss(k,a)}};if(b=angular.extend({},a.options,b),b.resolve=b.resolve||{},!b.template&&!b.templateUrl)throw new Error("One of template or templateUrl options is required.");var l=d.all([i(b)].concat(j(b.resolve)));return l.then(function(a){var d=(b.scope||c).$new();d.$close=k.close,d.$dismiss=k.dismiss;var f,i={},j=1;b.controller&&(i.$scope=d,i.$modalInstance=k,angular.forEach(b.resolve,function(b,c){i[c]=a[j++]}),f=g(b.controller,i)),h.open(k,{scope:d,deferred:e,content:a[0],backdrop:b.backdrop,keyboard:b.keyboard,windowClass:b.windowClass})},function(a){e.reject(a)}),l.then(function(){f.resolve(!0)},function(){f.reject(!1)}),k},k}]};return a}),angular.module("ui.bootstrap.pagination",[]).controller("PaginationController",["$scope","$attrs","$parse","$interpolate",function(a,b,c,d){var e=this,f=b.numPages?c(b.numPages).assign:angular.noop;this.init=function(d){b.itemsPerPage?a.$parent.$watch(c(b.itemsPerPage),function(b){e.itemsPerPage=parseInt(b,10),a.totalPages=e.calculateTotalPages()}):this.itemsPerPage=d},this.noPrevious=function(){return 1===this.page},this.noNext=function(){return this.page===a.totalPages},this.isActive=function(a){return this.page===a},this.calculateTotalPages=function(){var b=this.itemsPerPage<1?1:Math.ceil(a.totalItems/this.itemsPerPage);return Math.max(b||0,1)},this.getAttributeValue=function(b,c,e){return angular.isDefined(b)?e?d(b)(a.$parent):a.$parent.$eval(b):c},this.render=function(){this.page=parseInt(a.page,10)||1,this.page>0&&this.page<=a.totalPages&&(a.pages=this.getPages(this.page,a.totalPages))},a.selectPage=function(b){!e.isActive(b)&&b>0&&b<=a.totalPages&&(a.page=b,a.onSelectPage({page:b}))},a.$watch("page",function(){e.render()}),a.$watch("totalItems",function(){a.totalPages=e.calculateTotalPages()}),a.$watch("totalPages",function(b){f(a.$parent,b),e.page>b?a.selectPage(b):e.render()})}]).constant("paginationConfig",{itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("pagination",["$parse","paginationConfig",function(a,b){return{restrict:"EA",scope:{page:"=",totalItems:"=",onSelectPage:" &"},controller:"PaginationController",templateUrl:"template/pagination/pagination.html",replace:!0,link:function(c,d,e,f){function g(a,b,c,d){return{number:a,text:b,active:c,disabled:d}}var h,i=f.getAttributeValue(e.boundaryLinks,b.boundaryLinks),j=f.getAttributeValue(e.directionLinks,b.directionLinks),k=f.getAttributeValue(e.firstText,b.firstText,!0),l=f.getAttributeValue(e.previousText,b.previousText,!0),m=f.getAttributeValue(e.nextText,b.nextText,!0),n=f.getAttributeValue(e.lastText,b.lastText,!0),o=f.getAttributeValue(e.rotate,b.rotate);f.init(b.itemsPerPage),e.maxSize&&c.$parent.$watch(a(e.maxSize),function(a){h=parseInt(a,10),f.render()}),f.getPages=function(a,b){var c=[],d=1,e=b,p=angular.isDefined(h)&&b>h;p&&(o?(d=Math.max(a-Math.floor(h/2),1),e=d+h-1,e>b&&(e=b,d=e-h+1)):(d=(Math.ceil(a/h)-1)*h+1,e=Math.min(d+h-1,b)));for(var q=d;e>=q;q++){var r=g(q,q,f.isActive(q),!1);c.push(r)}if(p&&!o){if(d>1){var s=g(d-1,"...",!1,!1);c.unshift(s)}if(b>e){var t=g(e+1,"...",!1,!1);c.push(t)}}if(j){var u=g(a-1,l,!1,f.noPrevious());c.unshift(u);var v=g(a+1,m,!1,f.noNext());c.push(v)}if(i){var w=g(1,k,!1,f.noPrevious());c.unshift(w);var x=g(b,n,!1,f.noNext());c.push(x)}return c}}}}]).constant("pagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("pager",["pagerConfig",function(a){return{restrict:"EA",scope:{page:"=",totalItems:"=",onSelectPage:" &"},controller:"PaginationController",templateUrl:"template/pagination/pager.html",replace:!0,link:function(b,c,d,e){function f(a,b,c,d,e){return{number:a,text:b,disabled:c,previous:i&&d,next:i&&e}}var g=e.getAttributeValue(d.previousText,a.previousText,!0),h=e.getAttributeValue(d.nextText,a.nextText,!0),i=e.getAttributeValue(d.align,a.align);e.init(a.itemsPerPage),e.getPages=function(a){return[f(a-1,g,e.noPrevious(),!0,!1),f(a+1,h,e.noNext(),!1,!0)]}}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).provider("$tooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",animation:!0,popupDelay:0},c={mouseenter:"mouseleave",click:"click",focus:"blur"},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$parse","$document","$position","$interpolate",function(e,f,g,h,i,j,k){return function(e,l,m){function n(a){var b=a||o.trigger||m,d=c[b]||b;return{show:b,hide:d}}var o=angular.extend({},b,d),p=a(e),q=k.startSymbol(),r=k.endSymbol(),s="
';return{restrict:"EA",scope:!0,link:function(a,b,c){function d(){a.tt_isOpen?m():k()}function k(){(!y||a.$eval(c[l+"Enable"]))&&(a.tt_popupDelay?t=g(p,a.tt_popupDelay):a.$apply(p))}function m(){a.$apply(function(){q()})}function p(){var c,d,e,f;if(a.tt_content){switch(r&&g.cancel(r),u.css({top:0,left:0,display:"block"}),v?i.find("body").append(u):b.after(u),c=v?j.offset(b):j.position(b),d=u.prop("offsetWidth"),e=u.prop("offsetHeight"),a.tt_placement){case"right":f={top:c.top+c.height/2-e/2,left:c.left+c.width};break;case"bottom":f={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"left":f={top:c.top+c.height/2-e/2,left:c.left-d};break;default:f={top:c.top-e,left:c.left+c.width/2-d/2}}f.top+="px",f.left+="px",u.css(f),a.tt_isOpen=!0}}function q(){a.tt_isOpen=!1,g.cancel(t),a.tt_animation?r=g(function(){u.remove()},500):u.remove()}var r,t,u=f(s)(a),v=angular.isDefined(o.appendToBody)?o.appendToBody:!1,w=n(void 0),x=!1,y=angular.isDefined(c[l+"Enable"]);a.tt_isOpen=!1,c.$observe(e,function(b){a.tt_content=b,!b&&a.tt_isOpen&&q()}),c.$observe(l+"Title",function(b){a.tt_title=b}),c.$observe(l+"Placement",function(b){a.tt_placement=angular.isDefined(b)?b:o.placement}),c.$observe(l+"PopupDelay",function(b){var c=parseInt(b,10);a.tt_popupDelay=isNaN(c)?o.popupDelay:c});var z=function(){x&&(b.unbind(w.show,k),b.unbind(w.hide,m))};c.$observe(l+"Trigger",function(a){z(),w=n(a),w.show===w.hide?b.bind(w.show,d):(b.bind(w.show,k),b.bind(w.hide,m)),x=!0});var A=a.$eval(c[l+"Animation"]);a.tt_animation=angular.isDefined(A)?!!A:o.animation,c.$observe(l+"AppendToBody",function(b){v=angular.isDefined(b)?h(b)(a):v}),v&&a.$on("$locationChangeSuccess",function(){a.tt_isOpen&&q()}),a.$on("$destroy",function(){g.cancel(r),g.cancel(t),z(),u.remove(),u.unbind(),u=null})}}}}]}).directive("tooltipPopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html"}}).directive("tooltip",["$tooltip",function(a){return a("tooltip","tooltip","mouseenter")}]).directive("tooltipHtmlUnsafePopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-unsafe-popup.html"}}).directive("tooltipHtmlUnsafe",["$tooltip",function(a){return a("tooltipHtmlUnsafe","tooltip","mouseenter")}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("popoverPopup",function(){return{restrict:"EA",replace:!0,scope:{title:"@",content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html"}}).directive("popover",["$compile","$timeout","$parse","$window","$tooltip",function(a,b,c,d,e){return e("popover","popover","click")}]),angular.module("ui.bootstrap.progressbar",["ui.bootstrap.transition"]).constant("progressConfig",{animate:!0,max:100}).controller("ProgressController",["$scope","$attrs","progressConfig","$transition",function(a,b,c,d){var e=this,f=[],g=angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max,h=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.addBar=function(a,b){var c=0,d=a.$parent.$index;angular.isDefined(d)&&f[d]&&(c=f[d].value),f.push(a),this.update(b,a.value,c),a.$watch("value",function(a,c){a!==c&&e.update(b,a,c)}),a.$on("$destroy",function(){e.removeBar(a)})},this.update=function(a,b,c){var e=this.getPercentage(b);h?(a.css("width",this.getPercentage(c)+"%"),d(a,{width:e+"%"})):a.css({transition:"none",width:e+"%"})},this.removeBar=function(a){f.splice(f.indexOf(a),1)},this.getPercentage=function(a){return Math.round(100*a/g)}}]).directive("progress",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",require:"progress",scope:{},template:'
'}}).directive("bar",function(){return{restrict:"EA",replace:!0,transclude:!0,require:"^progress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b)}}}).directive("progressbar",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]))}}}),angular.module("ui.bootstrap.rating",[]).constant("ratingConfig",{max:5,stateOn:null,stateOff:null}).controller("RatingController",["$scope","$attrs","$parse","ratingConfig",function(a,b,c,d){this.maxRange=angular.isDefined(b.max)?a.$parent.$eval(b.max):d.max,this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):d.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):d.stateOff,this.createRateObjects=function(a){for(var b={stateOn:this.stateOn,stateOff:this.stateOff},c=0,d=a.length;d>c;c++)a[c]=angular.extend({index:c},b,a[c]);return a},a.range=angular.isDefined(b.ratingStates)?this.createRateObjects(angular.copy(a.$parent.$eval(b.ratingStates))):this.createRateObjects(new Array(this.maxRange)),a.rate=function(b){a.readonly||a.value===b||(a.value=b)},a.enter=function(b){a.readonly||(a.val=b),a.onHover({value:b})},a.reset=function(){a.val=angular.copy(a.value),a.onLeave()},a.$watch("value",function(b){a.val=b}),a.readonly=!1,b.readonly&&a.$parent.$watch(c(b.readonly),function(b){a.readonly=!!b})}]).directive("rating",function(){return{restrict:"EA",scope:{value:"=",onHover:"&",onLeave:"&"},controller:"RatingController",templateUrl:"template/rating/rating.html",replace:!0}}),angular.module("ui.bootstrap.tabs",[]).controller("TabsetController",["$scope",function(a){var b=this,c=b.tabs=a.tabs=[];b.select=function(a){angular.forEach(c,function(a){a.active=!1}),a.active=!0},b.addTab=function(a){c.push(a),(1===c.length||a.active)&&b.select(a)},b.removeTab=function(a){var d=c.indexOf(a);if(a.active&&c.length>1){var e=d==c.length-1?d-1:d+1;b.select(c[e])}c.splice(d,1)}}]).directive("tabset",function(){return{restrict:"EA",transclude:!0,replace:!0,scope:{},controller:"TabsetController",templateUrl:"template/tabs/tabset.html",link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.type=angular.isDefined(c.type)?a.$parent.$eval(c.type):"tabs"}}}).directive("tab",["$parse",function(a){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},compile:function(b,c,d){return function(b,c,e,f){var g,h;e.active?(g=a(e.active),h=g.assign,b.$parent.$watch(g,function(a,c){a!==c&&(b.active=!!a)}),b.active=g(b.$parent)):h=g=angular.noop,b.$watch("active",function(a){h(b.$parent,a),a?(f.select(b),b.onSelect()):b.onDeselect()}),b.disabled=!1,e.disabled&&b.$parent.$watch(a(e.disabled),function(a){b.disabled=!!a}),b.select=function(){b.disabled||(b.active=!0)},f.addTab(b),b.$on("$destroy",function(){f.removeTab(b)}),b.$transcludeFn=d}}}}]).directive("tabHeadingTransclude",[function(){return{restrict:"A",require:"^tab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}]).directive("tabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("tab-heading")||a.hasAttribute("data-tab-heading")||"tab-heading"===a.tagName.toLowerCase()||"data-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^tabset",link:function(b,c,d){var e=b.$eval(d.tabContentTransclude);e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("timepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:null,readonlyInput:!1,mousewheel:!0}).directive("timepicker",["$parse","$log","timepickerConfig","$locale",function(a,b,c,d){return{restrict:"EA",require:"?^ngModel",replace:!0,scope:{},templateUrl:"template/timepicker/timepicker.html",link:function(e,f,g,h){function i(){var a=parseInt(e.hours,10),b=e.showMeridian?a>0&&13>a:a>=0&&24>a;return b?(e.showMeridian&&(12===a&&(a=0),e.meridian===q[1]&&(a+=12)),a):void 0}function j(){var a=parseInt(e.minutes,10);return a>=0&&60>a?a:void 0}function k(a){return angular.isDefined(a)&&a.toString().length<2?"0"+a:a}function l(a){m(),h.$setViewValue(new Date(p)),n(a)}function m(){h.$setValidity("time",!0),e.invalidHours=!1,e.invalidMinutes=!1}function n(a){var b=p.getHours(),c=p.getMinutes();e.showMeridian&&(b=0===b||12===b?12:b%12),e.hours="h"===a?b:k(b),e.minutes="m"===a?c:k(c),e.meridian=p.getHours()<12?q[0]:q[1]}function o(a){var b=new Date(p.getTime()+6e4*a);p.setHours(b.getHours(),b.getMinutes()),l()}if(h){var p=new Date,q=angular.isDefined(g.meridians)?e.$parent.$eval(g.meridians):c.meridians||d.DATETIME_FORMATS.AMPMS,r=c.hourStep;g.hourStep&&e.$parent.$watch(a(g.hourStep),function(a){r=parseInt(a,10)});var s=c.minuteStep;g.minuteStep&&e.$parent.$watch(a(g.minuteStep),function(a){s=parseInt(a,10)}),e.showMeridian=c.showMeridian,g.showMeridian&&e.$parent.$watch(a(g.showMeridian),function(a){if(e.showMeridian=!!a,h.$error.time){var b=i(),c=j();angular.isDefined(b)&&angular.isDefined(c)&&(p.setHours(b),l())}else n()});var t=f.find("input"),u=t.eq(0),v=t.eq(1),w=angular.isDefined(g.mousewheel)?e.$eval(g.mousewheel):c.mousewheel;if(w){var x=function(a){a.originalEvent&&(a=a.originalEvent);var b=a.wheelDelta?a.wheelDelta:-a.deltaY;return a.detail||b>0};u.bind("mousewheel wheel",function(a){e.$apply(x(a)?e.incrementHours():e.decrementHours()),a.preventDefault()}),v.bind("mousewheel wheel",function(a){e.$apply(x(a)?e.incrementMinutes():e.decrementMinutes()),a.preventDefault()})}if(e.readonlyInput=angular.isDefined(g.readonlyInput)?e.$eval(g.readonlyInput):c.readonlyInput,e.readonlyInput)e.updateHours=angular.noop,e.updateMinutes=angular.noop;else{var y=function(a,b){h.$setViewValue(null),h.$setValidity("time",!1),angular.isDefined(a)&&(e.invalidHours=a),angular.isDefined(b)&&(e.invalidMinutes=b)};e.updateHours=function(){var a=i();angular.isDefined(a)?(p.setHours(a),l("h")):y(!0)},u.bind("blur",function(){!e.validHours&&e.hours<10&&e.$apply(function(){e.hours=k(e.hours)})}),e.updateMinutes=function(){var a=j();angular.isDefined(a)?(p.setMinutes(a),l("m")):y(void 0,!0)},v.bind("blur",function(){!e.invalidMinutes&&e.minutes<10&&e.$apply(function(){e.minutes=k(e.minutes)})})}h.$render=function(){var a=h.$modelValue?new Date(h.$modelValue):null;isNaN(a)?(h.$setValidity("time",!1),b.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(a&&(p=a),m(),n())},e.incrementHours=function(){o(60*r)},e.decrementHours=function(){o(60*-r)},e.incrementMinutes=function(){o(s)},e.decrementMinutes=function(){o(-s)},e.toggleMeridian=function(){o(720*(p.getHours()<12?1:-1))}}}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).factory("typeaheadParser",["$parse",function(a){var b=/^\s*(.*?)(?:\s+as\s+(.*?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+(.*)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error("Expected typeahead specification in form of '_modelValue_ (as _label_)? for _item_ in _collection_' but got '"+c+"'.");return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$position","typeaheadParser",function(a,b,c,d,e,f,g){var h=[9,13,27,38,40];return{require:"ngModel",link:function(i,j,k,l){var m,n=i.$eval(k.typeaheadMinLength)||1,o=i.$eval(k.typeaheadWaitMs)||0,p=i.$eval(k.typeaheadEditable)!==!1,q=b(k.typeaheadLoading).assign||angular.noop,r=b(k.typeaheadOnSelect),s=k.typeaheadInputFormatter?b(k.typeaheadInputFormatter):void 0,t=k.typeaheadAppendToBody?b(k.typeaheadAppendToBody):!1,u=b(k.ngModel).assign,v=g.parse(k.typeahead),w=angular.element("
");w.attr({matches:"matches",active:"activeIdx",select:"select(activeIdx)",query:"query",position:"position"}),angular.isDefined(k.typeaheadTemplateUrl)&&w.attr("template-url",k.typeaheadTemplateUrl);var x=i.$new();i.$on("$destroy",function(){x.$destroy()});var y=function(){x.matches=[],x.activeIdx=-1},z=function(a){var b={$viewValue:a};q(i,!0),c.when(v.source(i,b)).then(function(c){if(a===l.$viewValue&&m){if(c.length>0){x.activeIdx=0,x.matches.length=0;for(var d=0;d=n?o>0?(A&&d.cancel(A),A=d(function(){z(a)},o)):z(a):(q(i,!1), y()),p?a:a?void l.$setValidity("editable",!1):(l.$setValidity("editable",!0),a)}),l.$formatters.push(function(a){var b,c,d={};return s?(d.$model=a,s(i,d)):(d[v.itemName]=a,b=v.viewMapper(i,d),d[v.itemName]=void 0,c=v.viewMapper(i,d),b!==c?b:a)}),x.select=function(a){var b,c,d={};d[v.itemName]=c=x.matches[a].model,b=v.modelMapper(i,d),u(i,b),l.$setValidity("editable",!0),r(i,{$item:c,$model:b,$label:v.viewMapper(i,d)}),y(),j[0].focus()},j.bind("keydown",function(a){0!==x.matches.length&&-1!==h.indexOf(a.which)&&(a.preventDefault(),40===a.which?(x.activeIdx=(x.activeIdx+1)%x.matches.length,x.$digest()):38===a.which?(x.activeIdx=(x.activeIdx?x.activeIdx:x.matches.length)-1,x.$digest()):13===a.which||9===a.which?x.$apply(function(){x.select(x.activeIdx)}):27===a.which&&(a.stopPropagation(),y(),x.$digest()))}),j.bind("blur",function(){m=!1});var B=function(a){j[0]!==a.target&&(y(),x.$digest())};e.bind("click",B),i.$on("$destroy",function(){e.unbind("click",B)});var C=a(w)(x);t?e.find("body").append(C):j.after(C)}}}]).directive("typeaheadPopup",function(){return{restrict:"EA",scope:{matches:"=",query:"=",active:"=",position:"=",select:"&"},replace:!0,templateUrl:"template/typeahead/typeahead-popup.html",link:function(a,b,c){a.templateUrl=c.templateUrl,a.isOpen=function(){return a.matches.length>0},a.isActive=function(b){return a.active==b},a.selectActive=function(b){a.active=b},a.selectMatch=function(b){a.select({activeIdx:b})}}}}).directive("typeaheadMatch",["$http","$templateCache","$compile","$parse",function(a,b,c,d){return{restrict:"EA",scope:{index:"=",match:"=",query:"="},link:function(e,f,g){var h=d(g.templateUrl)(e.$parent)||"template/typeahead/typeahead-match.html";a.get(h,{cache:b}).success(function(a){f.replaceWith(c(a.trim())(e))})}}}]).filter("typeaheadHighlight",function(){function a(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(b,c){return c?b.replace(new RegExp(a(c),"gi"),"$&"):b}}),angular.module("template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("template/accordion/accordion-group.html",'
\n \n
\n
\n
')}]),angular.module("template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("template/accordion/accordion.html",'
')}]),angular.module("template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("template/alert/alert.html","
\n \n
\n
\n")}]),angular.module("template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("template/carousel/carousel.html",'\n')}]),angular.module("template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("template/carousel/slide.html","
\n")}]),angular.module("template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/datepicker.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
#{{label}}
{{ getWeekNumber(row) }}\n \n
\n')}]),angular.module("template/datepicker/popup.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/popup.html","
    \n
  • \n"+'
  • \n \n \n \n \n \n \n
  • \n
\n')}]),angular.module("template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("template/modal/backdrop.html",'')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function(a){a.put("template/modal/window.html",'')}]),angular.module("template/pagination/pager.html",[]).run(["$templateCache",function(a){a.put("template/pagination/pager.html",'
\n \n
\n')}]),angular.module("template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("template/pagination/pagination.html",'\n')}]),angular.module("template/tooltip/tooltip-html-unsafe-popup.html",[]).run(["$templateCache",function(a){a.put("template/tooltip/tooltip-html-unsafe-popup.html",'
\n
\n
\n
\n')}]),angular.module("template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("template/tooltip/tooltip-popup.html",'
\n
\n
\n
\n')}]),angular.module("template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("template/popover/popover.html",'
\n
\n\n
\n

\n
\n
\n
\n')}]),angular.module("template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("template/progressbar/bar.html",'
')}]),angular.module("template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("template/progressbar/progress.html",'
')}]),angular.module("template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("template/progressbar/progressbar.html",'
')}]),angular.module("template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("template/rating/rating.html",'\n \n')}]),angular.module("template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("template/tabs/tab.html",'
  • \n {{heading}}\n
  • \n')}]),angular.module("template/tabs/tabset-titles.html",[]).run(["$templateCache",function(a){a.put("template/tabs/tabset-titles.html","
      \n
    \n")}]),angular.module("template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("template/tabs/tabset.html",'\n
    \n \n
    \n
    \n
    \n
    \n
    \n')}]),angular.module("template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("template/timepicker/timepicker.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
     
    :
     
    \n')}]),angular.module("template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("template/typeahead/typeahead-match.html",'')}]),angular.module("template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("template/typeahead/typeahead-popup.html","
      \n"+'
    • \n
      \n
    • \n
    ')}]),function(a,b){"object"==typeof exports?module.exports=b(require("./punycode"),require("./IPv6"),require("./SecondLevelDomains")):"function"==typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],b):a.URI=b(a.punycode,a.IPv6,a.SecondLevelDomains,a)}(this,function(a,b,c,d){function e(a,b){return this instanceof e?(void 0===a&&(a="undefined"!=typeof location?location.href+"":""),this.href(a),void 0!==b?this.absoluteTo(b):this):new e(a,b)}function f(a){return a.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function g(a){return void 0===a?"Undefined":String(Object.prototype.toString.call(a)).slice(8,-1)}function h(a){return"Array"===g(a)}function i(a,b){var c,d;if(h(b)){for(c=0,d=b.length;d>c;c++)if(!i(a,b[c]))return!1;return!0}var e=g(b);for(c=0,d=a.length;d>c;c++)if("RegExp"===e){if("string"==typeof a[c]&&a[c].match(b))return!0}else if(a[c]===b)return!0;return!1}function j(a,b){if(!h(a)||!h(b)||a.length!==b.length)return!1;a.sort(),b.sort();for(var c=0,d=a.length;d>c;c++)if(a[c]!==b[c])return!1;return!0}function k(a){return escape(a)}function l(a){return encodeURIComponent(a).replace(/[!'()*]/g,k).replace(/\*/g,"%2A")}var m=d&&d.URI,n=e.prototype,o=Object.prototype.hasOwnProperty;e._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,duplicateQueryParameters:e.duplicateQueryParameters,escapeQuerySpace:e.escapeQuerySpace}},e.duplicateQueryParameters=!1,e.escapeQuerySpace=!0,e.protocol_expression=/^[a-z][a-z0-9-+-]*$/i,e.idn_expression=/[^a-z0-9\.-]/i,e.punycode_expression=/(xn--)/i,e.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,e.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,e.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/gi,e.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},e.invalid_hostname_characters=/[^a-zA-Z0-9\.-]/,e.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src"},e.getDomAttribute=function(a){if(a&&a.nodeName){var b=a.nodeName.toLowerCase();return"input"===b&&"image"!==a.type?void 0:e.domAttributes[b]}},e.encode=l,e.decode=decodeURIComponent,e.iso8859=function(){e.encode=escape,e.decode=unescape},e.unicode=function(){e.encode=l,e.decode=decodeURIComponent},e.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}}},e.encodeQuery=function(a,b){var c=e.encode(a+"");return b?c.replace(/%20/g,"+"):c},e.decodeQuery=function(a,b){a+="";try{return e.decode(b?a.replace(/\+/g,"%20"):a)}catch(c){return a}},e.recodePath=function(a){a=(a+"").split("/");for(var b=0,c=a.length;c>b;b++)a[b]=e.encodePathSegment(e.decode(a[b]));return a.join("/")},e.decodePath=function(a){a=(a+"").split("/");for(var b=0,c=a.length;c>b;b++)a[b]=e.decodePathSegment(a[b]);return a.join("/")};var p,q={encode:"encode",decode:"decode"},r=function(a,b){return function(c){return e[b](c+"").replace(e.characters[a][b].expression,function(c){return e.characters[a][b].map[c]})}};for(p in q)e[p+"PathSegment"]=r("pathname",q[p]);e.encodeReserved=r("reserved","encode"),e.parse=function(a,b){var c;return b||(b={}),c=a.indexOf("#"),c>-1&&(b.fragment=a.substring(c+1)||null,a=a.substring(0,c)),c=a.indexOf("?"),c>-1&&(b.query=a.substring(c+1)||null,a=a.substring(0,c)),"//"===a.substring(0,2)?(b.protocol=null,a=a.substring(2),a=e.parseAuthority(a,b)):(c=a.indexOf(":"),c>-1&&(b.protocol=a.substring(0,c)||null,b.protocol&&!b.protocol.match(e.protocol_expression)?b.protocol=void 0:"file"===b.protocol?a=a.substring(c+3):"//"===a.substring(c+1,c+3)?(a=a.substring(c+3),a=e.parseAuthority(a,b)):(a=a.substring(c+1),b.urn=!0))),b.path=a,b},e.parseHost=function(a,b){var c,d=a.indexOf("/");return-1===d&&(d=a.length),"["===a.charAt(0)?(c=a.indexOf("]"),b.hostname=a.substring(1,c)||null,b.port=a.substring(c+2,d)||null):a.indexOf(":")!==a.lastIndexOf(":")?(b.hostname=a.substring(0,d)||null,b.port=null):(c=a.substring(0,d).split(":"),b.hostname=c[0]||null,b.port=c[1]||null),b.hostname&&"/"!==a.substring(d).charAt(0)&&(d++,a="/"+a),a.substring(d)||"/"},e.parseAuthority=function(a,b){return a=e.parseUserinfo(a,b),e.parseHost(a,b)},e.parseUserinfo=function(a,b){var c=a.indexOf("/"),d=c>-1?a.lastIndexOf("@",c):a.indexOf("@");return d>-1&&(-1===c||c>d)?(c=a.substring(0,d).split(":"),b.username=c[0]?e.decode(c[0]):null,c.shift(),b.password=c[0]?e.decode(c.join(":")):null,a=a.substring(d+1)):(b.username=null,b.password=null),a},e.parseQuery=function(a,b){if(!a)return{};if(a=a.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!a)return{};for(var c,d,f={},g=a.split("&"),h=g.length,i=0;h>i;i++)c=g[i].split("="),d=e.decodeQuery(c.shift(),b),c=c.length?e.decodeQuery(c.join("="),b):null,f[d]?("string"==typeof f[d]&&(f[d]=[f[d]]),f[d].push(c)):f[d]=c;return f},e.build=function(a){var b="";return a.protocol&&(b+=a.protocol+":"),a.urn||!b&&!a.hostname||(b+="//"),b+=e.buildAuthority(a)||"","string"==typeof a.path&&("/"!==a.path.charAt(0)&&"string"==typeof a.hostname&&(b+="/"),b+=a.path),"string"==typeof a.query&&a.query&&(b+="?"+a.query),"string"==typeof a.fragment&&a.fragment&&(b+="#"+a.fragment),b},e.buildHost=function(a){var b="";return a.hostname?(e.ip6_expression.test(a.hostname)?b=a.port?b+("["+a.hostname+"]:"+a.port):b+a.hostname:(b+=a.hostname,a.port&&(b+=":"+a.port)),b):""},e.buildAuthority=function(a){return e.buildUserinfo(a)+e.buildHost(a)},e.buildUserinfo=function(a){var b="";return a.username&&(b+=e.encode(a.username),a.password&&(b+=":"+e.encode(a.password)),b+="@"),b},e.buildQuery=function(a,b,c){var d,f,g,i,j="";for(f in a)if(o.call(a,f)&&f)if(h(a[f]))for(d={},g=0,i=a[f].length;i>g;g++)void 0!==a[f][g]&&void 0===d[a[f][g]+""]&&(j+="&"+e.buildQueryParameter(f,a[f][g],c),!0!==b&&(d[a[f][g]+""]=!0));else void 0!==a[f]&&(j+="&"+e.buildQueryParameter(f,a[f],c));return j.substring(1)},e.buildQueryParameter=function(a,b,c){return e.encodeQuery(a,c)+(null!==b?"="+e.encodeQuery(b,c):"")},e.addQuery=function(a,b,c){if("object"==typeof b)for(var d in b)o.call(b,d)&&e.addQuery(a,d,b[d]);else{if("string"!=typeof b)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");void 0===a[b]?a[b]=c:("string"==typeof a[b]&&(a[b]=[a[b]]),h(c)||(c=[c]),a[b]=a[b].concat(c))}},e.removeQuery=function(a,b,c){var d;if(h(b))for(c=0,d=b.length;d>c;c++)a[b[c]]=void 0;else if("object"==typeof b)for(d in b)o.call(b,d)&&e.removeQuery(a,d,b[d]);else{if("string"!=typeof b)throw new TypeError("URI.addQuery() accepts an object, string as the first parameter");if(void 0!==c){if(a[b]===c)a[b]=void 0;else if(h(a[b])){d=a[b];var f,g,i={};if(h(c))for(f=0,g=c.length;g>f;f++)i[c[f]]=!0;else i[c]=!0;for(f=0,g=d.length;g>f;f++)void 0!==i[d[f]]&&(d.splice(f,1),g--,f--);a[b]=d}}else a[b]=void 0}},e.hasQuery=function(a,b,c,d){if("object"==typeof b){for(var f in b)if(o.call(b,f)&&!e.hasQuery(a,f,b[f]))return!1;return!0}if("string"!=typeof b)throw new TypeError("URI.hasQuery() accepts an object, string as the name parameter");switch(g(c)){case"Undefined":return b in a;case"Boolean":return a=Boolean(h(a[b])?a[b].length:a[b]),c===a;case"Function":return!!c(a[b],b,a);case"Array":return h(a[b])?(d?i:j)(a[b],c):!1;case"RegExp":return h(a[b])?d?i(a[b],c):!1:Boolean(a[b]&&a[b].match(c));case"Number":c=String(c);case"String":return h(a[b])?d?i(a[b],c):!1:a[b]===c;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},e.commonPath=function(a,b){var c,d=Math.min(a.length,b.length);for(c=0;d>c;c++)if(a.charAt(c)!==b.charAt(c)){c--;break}return 1>c?a.charAt(0)===b.charAt(0)&&"/"===a.charAt(0)?"/":"":(("/"!==a.charAt(c)||"/"!==b.charAt(c))&&(c=a.substring(0,c).lastIndexOf("/")),a.substring(0,c+1))},e.withinString=function(a,b){return a.replace(e.find_uri_expression,b)},e.ensureValidHostname=function(b){if(b.match(e.invalid_hostname_characters)){if(!a)throw new TypeError("Hostname '"+b+"' contains characters other than [A-Z0-9.-] and Punycode.js is not available");if(a.toASCII(b).match(e.invalid_hostname_characters))throw new TypeError("Hostname '"+b+"' contains characters other than [A-Z0-9.-]")}},e.noConflict=function(a){return a?(a={URI:this.noConflict()},URITemplate&&"function"==typeof URITemplate.noConflict&&(a.URITemplate=URITemplate.noConflict()),b&&"function"==typeof b.noConflict&&(a.IPv6=b.noConflict()),SecondLevelDomains&&"function"==typeof SecondLevelDomains.noConflict&&(a.SecondLevelDomains=SecondLevelDomains.noConflict()),a):(d.URI===this&&(d.URI=m),this)},n.build=function(a){return!0===a?this._deferred_build=!0:(void 0===a||this._deferred_build)&&(this._string=e.build(this._parts),this._deferred_build=!1),this},n.clone=function(){return new e(this)},n.valueOf=n.toString=function(){return this.build(!1)._string},q={protocol:"protocol",username:"username",password:"password",hostname:"hostname",port:"port"},r=function(a){return function(b,c){return void 0===b?this._parts[a]||"":(this._parts[a]=b||null,this.build(!c),this)}};for(p in q)n[p]=r(q[p]);q={query:"?",fragment:"#"},r=function(a,b){return function(c,d){return void 0===c?this._parts[a]||"":(null!==c&&(c+="",c.charAt(0)===b&&(c=c.substring(1))),this._parts[a]=c,this.build(!d),this)}};for(p in q)n[p]=r(p,q[p]);q={search:["?","query"],hash:["#","fragment"]},r=function(a,b){return function(c,d){var e=this[a](c,d);return"string"==typeof e&&e.length?b+e:e}};for(p in q)n[p]=r(q[p][1],q[p][0]);n.pathname=function(a,b){if(void 0===a||!0===a){var c=this._parts.path||(this._parts.hostname?"/":"");return a?e.decodePath(c):c}return this._parts.path=a?e.recodePath(a):"/",this.build(!b),this},n.path=n.pathname,n.href=function(a,b){var c;if(void 0===a)return this.toString();this._string="",this._parts=e._parts();var d=a instanceof e,f="object"==typeof a&&(a.hostname||a.path||a.pathname);if(a.nodeName&&(f=e.getDomAttribute(a),a=a[f]||"",f=!1),!d&&f&&void 0!==a.pathname&&(a=a.toString()),"string"==typeof a)this._parts=e.parse(a,this._parts);else{if(!d&&!f)throw new TypeError("invalid input");for(c in d=d?a._parts:a)o.call(this._parts,c)&&(this._parts[c]=d[c])}return this.build(!b),this},n.is=function(a){var b=!1,d=!1,f=!1,g=!1,h=!1,i=!1,j=!1,k=!this._parts.urn;switch(this._parts.hostname&&(k=!1,d=e.ip4_expression.test(this._parts.hostname),f=e.ip6_expression.test(this._parts.hostname),b=d||f,h=(g=!b)&&c&&c.has(this._parts.hostname),i=g&&e.idn_expression.test(this._parts.hostname),j=g&&e.punycode_expression.test(this._parts.hostname)),a.toLowerCase()){case"relative":return k;case"absolute":return!k;case"domain":case"name":return g;case"sld":return h;case"ip":return b;case"ip4":case"ipv4":case"inet4":return d;case"ip6":case"ipv6":case"inet6":return f;case"idn":return i;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return j}return null};var s=n.protocol,t=n.port,u=n.hostname;n.protocol=function(a,b){if(void 0!==a&&a&&(a=a.replace(/:(\/\/)?$/,""),a.match(/[^a-zA-z0-9\.+-]/)))throw new TypeError("Protocol '"+a+"' contains characters other than [A-Z0-9.+-]");return s.call(this,a,b)},n.scheme=n.protocol,n.port=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0!==a&&(0===a&&(a=null),a&&(a+="",":"===a.charAt(0)&&(a=a.substring(1)),a.match(/[^0-9]/))))throw new TypeError("Port '"+a+"' contains characters other than [0-9]");return t.call(this,a,b)},n.hostname=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0!==a){var c={};e.parseHost(a,c),a=c.hostname}return u.call(this,a,b)},n.host=function(a,b){return this._parts.urn?void 0===a?"":this:void 0===a?this._parts.hostname?e.buildHost(this._parts):"":(e.parseHost(a,this._parts),this.build(!b),this)},n.authority=function(a,b){return this._parts.urn?void 0===a?"":this:void 0===a?this._parts.hostname?e.buildAuthority(this._parts):"":(e.parseAuthority(a,this._parts),this.build(!b),this)},n.userinfo=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){if(!this._parts.username)return"";var c=e.buildUserinfo(this._parts);return c.substring(0,c.length-1)}return"@"!==a[a.length-1]&&(a+="@"),e.parseUserinfo(a,this._parts),this.build(!b),this},n.resource=function(a,b){var c;return void 0===a?this.path()+this.search()+this.hash():(c=e.parse(a),this._parts.path=c.path,this._parts.query=c.query,this._parts.fragment=c.fragment,this.build(!b),this)},n.subdomain=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var c=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,c)||""}return c=this._parts.hostname.length-this.domain().length,c=this._parts.hostname.substring(0,c),c=RegExp("^"+f(c)),a&&"."!==a.charAt(a.length-1)&&(a+="."),a&&e.ensureValidHostname(a),this._parts.hostname=this._parts.hostname.replace(c,a),this.build(!b),this},n.domain=function(a,b){if(this._parts.urn)return void 0===a?"":this;if("boolean"==typeof a&&(b=a,a=void 0),void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var c=this._parts.hostname.match(/\./g);return c&&2>c.length?this._parts.hostname:(c=this._parts.hostname.length-this.tld(b).length-1,c=this._parts.hostname.lastIndexOf(".",c-1)+1,this._parts.hostname.substring(c)||"")}if(!a)throw new TypeError("cannot set domain empty");return e.ensureValidHostname(a),!this._parts.hostname||this.is("IP")?this._parts.hostname=a:(c=RegExp(f(this.domain())+"$"),this._parts.hostname=this._parts.hostname.replace(c,a)),this.build(!b),this},n.tld=function(a,b){if(this._parts.urn)return void 0===a?"":this;if("boolean"==typeof a&&(b=a,a=void 0),void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var d=this._parts.hostname.lastIndexOf("."),d=this._parts.hostname.substring(d+1);return!0!==b&&c&&c.list[d.toLowerCase()]?c.get(this._parts.hostname)||d:d}if(!a)throw new TypeError("cannot set TLD empty");if(a.match(/[^a-zA-Z0-9-]/)){if(!c||!c.is(a))throw new TypeError("TLD '"+a+"' contains characters other than [A-Z0-9]");d=RegExp(f(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(d,a)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");d=RegExp(f(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(d,a)}return this.build(!b),this},n.directory=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var c=this._parts.path.length-this.filename().length-1,c=this._parts.path.substring(0,c)||(this._parts.hostname?"/":"");return a?e.decodePath(c):c}return c=this._parts.path.length-this.filename().length,c=this._parts.path.substring(0,c),c=RegExp("^"+f(c)),this.is("relative")||(a||(a="/"),"/"!==a.charAt(0)&&(a="/"+a)),a&&"/"!==a.charAt(a.length-1)&&(a+="/"),a=e.recodePath(a),this._parts.path=this._parts.path.replace(c,a),this.build(!b),this},n.filename=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path||"/"===this._parts.path)return"";var c=this._parts.path.lastIndexOf("/"),c=this._parts.path.substring(c+1);return a?e.decodePathSegment(c):c}c=!1,"/"===a.charAt(0)&&(a=a.substring(1)),a.match(/\.?\//)&&(c=!0);var d=RegExp(f(this.filename())+"$");return a=e.recodePath(a),this._parts.path=this._parts.path.replace(d,a),c?this.normalizePath(b):this.build(!b),this},n.suffix=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path||"/"===this._parts.path)return"";var c=this.filename(),d=c.lastIndexOf(".");return-1===d?"":(c=c.substring(d+1),c=/^[a-z0-9%]+$/i.test(c)?c:"",a?e.decodePathSegment(c):c)}if("."===a.charAt(0)&&(a=a.substring(1)),c=this.suffix())d=a?RegExp(f(c)+"$"):RegExp(f("."+c)+"$");else{if(!a)return this;this._parts.path+="."+e.recodePath(a)}return d&&(a=e.recodePath(a),this._parts.path=this._parts.path.replace(d,a)),this.build(!b),this},n.segment=function(a,b,c){var d=this._parts.urn?":":"/",e=this.path(),f="/"===e.substring(0,1),e=e.split(d);if(void 0!==a&&"number"!=typeof a&&(c=b,b=a,a=void 0),void 0!==a&&"number"!=typeof a)throw Error("Bad segment '"+a+"', must be 0-based integer");if(f&&e.shift(),0>a&&(a=Math.max(e.length+a,0)),void 0===b)return void 0===a?e:e[a];if(null===a||void 0===e[a])if(h(b)){e=[],a=0;for(var g=b.length;g>a;a++)(b[a].length||e.length&&e[e.length-1].length)&&(e.length&&!e[e.length-1].length&&e.pop(),e.push(b[a]))}else(b||"string"==typeof b)&&(""===e[e.length-1]?e[e.length-1]=b:e.push(b));else b||"string"==typeof b&&b.length?e[a]=b:e.splice(a,1);return f&&e.unshift(""),this.path(e.join(d),c)},n.segmentCoded=function(a,b,c){var d,f;if("number"!=typeof a&&(c=b,b=a,a=void 0),void 0===b){if(a=this.segment(a,b,c),h(a))for(d=0,f=a.length;f>d;d++)a[d]=e.decode(a[d]);else a=void 0!==a?e.decode(a):void 0;return a}if(h(b))for(d=0,f=b.length;f>d;d++)b[d]=e.decode(b[d]);else b="string"==typeof b?e.encode(b):b;return this.segment(a,b,c)};var v=n.query;return n.query=function(a,b){if(!0===a)return e.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof a){var c=e.parseQuery(this._parts.query,this._parts.escapeQuerySpace),d=a.call(this,c);return this._parts.query=e.buildQuery(d||c,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!b),this}return void 0!==a&&"string"!=typeof a?(this._parts.query=e.buildQuery(a,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!b),this):v.call(this,a,b)},n.setQuery=function(a,b,c){var d=e.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("object"==typeof a)for(var f in a)o.call(a,f)&&(d[f]=a[f]);else{if("string"!=typeof a)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter"); d[a]=void 0!==b?b:null}return this._parts.query=e.buildQuery(d,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof a&&(c=b),this.build(!c),this},n.addQuery=function(a,b,c){var d=e.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return e.addQuery(d,a,void 0===b?null:b),this._parts.query=e.buildQuery(d,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof a&&(c=b),this.build(!c),this},n.removeQuery=function(a,b,c){var d=e.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return e.removeQuery(d,a,b),this._parts.query=e.buildQuery(d,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof a&&(c=b),this.build(!c),this},n.hasQuery=function(a,b,c){var d=e.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return e.hasQuery(d,a,b,c)},n.setSearch=n.setQuery,n.addSearch=n.addQuery,n.removeSearch=n.removeQuery,n.hasSearch=n.hasQuery,n.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},n.normalizeProtocol=function(a){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!a)),this},n.normalizeHostname=function(c){return this._parts.hostname&&(this.is("IDN")&&a?this._parts.hostname=a.toASCII(this._parts.hostname):this.is("IPv6")&&b&&(this._parts.hostname=b.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!c)),this},n.normalizePort=function(a){return"string"==typeof this._parts.protocol&&this._parts.port===e.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!a)),this},n.normalizePath=function(a){if(this._parts.urn||!this._parts.path||"/"===this._parts.path)return this;var b,c,d,f=this._parts.path;for("/"!==f.charAt(0)&&(b=!0,f="/"+f),f=f.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/");c=f.indexOf("/../"),-1!==c;){if(0===c){f=f.substring(3);break}d=f.substring(0,c).lastIndexOf("/"),-1===d&&(d=c),f=f.substring(0,d)+f.substring(c+3)}return b&&this.is("relative")&&(f=f.substring(1)),f=e.recodePath(f),this._parts.path=f,this.build(!a),this},n.normalizePathname=n.normalizePath,n.normalizeQuery=function(a){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(e.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!a)),this},n.normalizeFragment=function(a){return this._parts.fragment||(this._parts.fragment=null,this.build(!a)),this},n.normalizeSearch=n.normalizeQuery,n.normalizeHash=n.normalizeFragment,n.iso8859=function(){var a=e.encode,b=e.decode;return e.encode=escape,e.decode=decodeURIComponent,this.normalize(),e.encode=a,e.decode=b,this},n.unicode=function(){var a=e.encode,b=e.decode;return e.encode=l,e.decode=unescape,this.normalize(),e.encode=a,e.decode=b,this},n.readable=function(){var b=this.clone();b.username("").password("").normalize();var c="";if(b._parts.protocol&&(c+=b._parts.protocol+"://"),b._parts.hostname&&(b.is("punycode")&&a?(c+=a.toUnicode(b._parts.hostname),b._parts.port&&(c+=":"+b._parts.port)):c+=b.host()),b._parts.hostname&&b._parts.path&&"/"!==b._parts.path.charAt(0)&&(c+="/"),c+=b.path(!0),b._parts.query){for(var d="",f=0,g=b._parts.query.split("&"),h=g.length;h>f;f++){var i=(g[f]||"").split("="),d=d+("&"+e.decodeQuery(i[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"));void 0!==i[1]&&(d+="="+e.decodeQuery(i[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}c+="?"+d.substring(1)}return c+=e.decodeQuery(b.hash(),!0)},n.absoluteTo=function(a){var b,c,d=this.clone(),f=["protocol","username","password","hostname","port"];if(this._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");if(a instanceof e||(a=new e(a)),d._parts.protocol||(d._parts.protocol=a._parts.protocol),this._parts.hostname)return d;for(b=0;c=f[b];b++)d._parts[c]=a._parts[c];for(f=["query","path"],b=0;c=f[b];b++)!d._parts[c]&&a._parts[c]&&(d._parts[c]=a._parts[c]);return"/"!==d.path().charAt(0)&&(a=a.directory(),d._parts.path=(a?a+"/":"")+d._parts.path,d.normalizePath()),d.build(),d},n.relativeTo=function(a){var b,c,d,f,g=this.clone().normalize();if(g._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");if(a=new e(a).normalize(),b=g._parts,c=a._parts,d=g.path(),f=a.path(),"/"!==d.charAt(0))throw Error("URI is already relative");if("/"!==f.charAt(0))throw Error("Cannot calculate a URI relative to another relative URI");return b.protocol===c.protocol&&(b.protocol=null),b.username!==c.username||b.password!==c.password||null!==b.protocol||null!==b.username||null!==b.password||b.hostname!==c.hostname||b.port!==c.port?g.build():(b.hostname=null,b.port=null,d===f?(b.path="",g.build()):(a=e.commonPath(g.path(),a.path()))?(c=c.path.substring(a.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../"),b.path=c+b.path.substring(a.length),g.build()):g.build())},n.equals=function(a){var b=this.clone();a=new e(a);var c,d={},f={},g={};if(b.normalize(),a.normalize(),b.toString()===a.toString())return!0;if(d=b.query(),f=a.query(),b.query(""),a.query(""),b.toString()!==a.toString()||d.length!==f.length)return!1;d=e.parseQuery(d,this._parts.escapeQuerySpace),f=e.parseQuery(f,this._parts.escapeQuerySpace);for(c in d)if(o.call(d,c)){if(h(d[c])){if(!j(d[c],f[c]))return!1}else if(d[c]!==f[c])return!1;g[c]=!0}for(c in f)if(o.call(f,c)&&!g[c])return!1;return!0},n.duplicateQueryParameters=function(a){return this._parts.duplicateQueryParameters=!!a,this},n.escapeQuerySpace=function(a){return this._parts.escapeQuerySpace=!!a,this},e}),function(){function a(a,b){return a.set(b[0],b[1]),a}function b(a,b){return a.add(b),a}function c(a,b,c){var d=c.length;switch(d){case 0:return a.call(b);case 1:return a.call(b,c[0]);case 2:return a.call(b,c[0],c[1]);case 3:return a.call(b,c[0],c[1],c[2])}return a.apply(b,c)}function d(a,b,c,d){for(var e=-1,f=a.length;++e-1}function k(a,b,c){for(var d=-1,e=a.length;++d-1;);return c}function D(a,b){for(var c=a.length;c--&&t(b,a[c],0)>-1;);return c}function E(a){return a&&a.Object===Object?a:null}function F(a,b){if(a!==b){var c=null===a,d=a===W,e=a===a,f=null===b,g=b===W,h=b===b;if(a>b&&!f||!e||c&&!g&&h||d&&h)return 1;if(b>a&&!c||!h||f&&!d&&e||g&&e)return-1}return 0}function G(a,b,c){for(var d=-1,e=a.criteria,f=b.criteria,g=e.length,h=c.length;++d=h)return i;var j=c[d];return i*("desc"==j?-1:1)}}return a.index-b.index}function H(a,b){for(var c=a.length,d=0;c--;)a[c]===b&&d++;return d}function I(a){return sc[a]}function J(a){return tc[a]}function K(a){return"\\"+wc[a]}function L(a,b,c){for(var d=a.length,e=b+(c?0:-1);c?e--:++e-1&&a%1==0&&b>a}function O(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function P(a){var b=-1,c=Array(a.size);return a.forEach(function(a,d){c[++b]=[d,a]}),c}function Q(a,b){for(var c=-1,d=a.length,e=0,f=[];++cb,e=c?a.length:0,f=qe(0,e,this.__views__),g=f.start,h=f.end,i=h-g,j=d?h:g-1,k=this.__iteratees__,l=k.length,m=0,n=sj(i,this.__takeCount__);if(!c||Y>e||e==i&&n==i)return Ad(a,this.__actions__);var o=[];a:for(;i--&&n>m;){j+=b;for(var p=-1,q=a[j];++pc)return!1;var d=a.length-1;return c==d?a.pop():lj.call(a,c,1),!0}function bc(a,b){var c=dc(a,b);return 0>c?W:a[c][1]}function cc(a,b){return dc(a,b)>-1}function dc(a,b){for(var c=a.length;c--;)if(vg(a[c][0],b))return c;return-1}function ec(a,b,c){var d=dc(a,b);0>d?a.push([b,c]):a[d][1]=c}function fc(a,b,c,d){return a===W||vg(a,Ti[c])&&!Vi.call(d,c)?b:a}function gc(a,b,c){(c!==W&&!vg(a[b],c)||"number"==typeof b&&c===W&&!(b in a))&&(a[b]=c)}function hc(a,b,c){var d=a[b];Vi.call(a,b)&&vg(d,c)&&(c!==W||b in a)||(a[b]=c)}function jc(a,b,c,d){return Jj(a,function(a,e,f){b(d,a,c(a),f)}),d}function sc(a,b){return a&&Nd(b,Ah(b),a)}function tc(a,b){for(var c=-1,d=null==a,e=b.length,f=Array(e);++c=a?a:c),b!==W&&(a=a>=b?a:b)),a}function Ac(a,b,c,d,e,g,h){var i;if(d&&(i=g?d(a,e,g,h):d(a)),i!==W)return i;if(!Ng(a))return a;var j=zk(a);if(j){if(i=se(a),!b)return Md(a,i)}else{var k=pe(a),l=k==Fa||k==Ga;if(Ak(a))return Dd(a,b);if(k==Ja||k==Aa||l&&!g){if(M(a))return g?a:{};if(i=te(l?{}:a),!b)return i=sc(i,a),c?Pd(a,i):i}else{if(!rc[k])return g?a:{};i=ue(a,k,b)}}h||(h=new Wb);var m=h.get(a);return m?m:(h.set(a,i),(j?f:Nc)(a,function(e,f){hc(i,f,Ac(e,b,c,d,f,a,h))}),c&&!j?Pd(a,i):i)}function Cc(a){var b=Ah(a),c=b.length;return function(d){if(null==d)return!c;for(var e=c;e--;){var f=b[e],g=a[f],h=d[f];if(h===W&&!(f in Object(d))||!g(h))return!1}return!0}}function Dc(a){return Ng(a)?ij(a):{}}function Ec(a,b,c){if("function"!=typeof a)throw new Ri(Z);return kj(function(){a.apply(W,c)},b)}function Fc(a,b,c,d){var e=-1,f=j,g=!0,h=a.length,i=[],m=b.length;if(!h)return i;c&&(b=l(b,A(c))),d?(f=k,g=!1):b.length>=Y&&(f=Ub,g=!1,b=new Tb(b));a:for(;++ec&&(c=-c>e?0:e+c),d=d===W||d>e?e:ih(d),0>d&&(d+=e),d=c>d?0:jh(d);d>c;)a[c++]=b;return a}function Kc(a,b){var c=[];return Jj(a,function(a,d,e){b(a,d,e)&&c.push(a)}),c}function Lc(a,b,c,d){d||(d=[]);for(var e=-1,f=a.length;++e0&&Bg(g)&&(c||zk(g)||yg(g))?b>1?Lc(g,b-1,c,d):m(d,g):c||(d[d.length]=g)}return d}function Mc(a,b){return null==a?a:Lj(a,b,Bh)}function Nc(a,b){return a&&Lj(a,b,Ah)}function Oc(a,b){return a&&Mj(a,b,Ah)}function Pc(a,b){return i(b,function(b){return Kg(a[b])})}function Qc(a,b){b=xe(b,a)?[b+""]:wc(b);for(var c=0,d=b.length;null!=a&&d>c;)a=a[b[c++]];return c&&c==d?a:W}function Rc(a,b){return Vi.call(a,b)||"object"==typeof a&&b in a&&null===fj(a)}function Sc(a,b){return b in Object(a)}function Tc(a,b,c){return a>=sj(b,c)&&a=120&&n.length>=120)?new Tb(g&&n):W}n=a[0];var o=-1,p=h[0];a:for(;++o-1;)h!==a&&lj.call(h,i,1),lj.call(a,i,1);return a}function md(a,b){for(var c=a?b.length:0,d=c-1;c--;){var e=b[c];if(d==c||e!=f){var f=e;if(N(e))lj.call(a,e,1);else if(xe(e,a))delete a[e];else{var g=wc(e),h=Ee(a,g);null!=h&&delete h[Ze(g)]}}}return a}function nd(a,b){return a+nj(uj()*(b-a+1))}function od(a,b,c,d){for(var e=-1,f=rj(mj((b-a)/(c||1)),0),g=Array(f);f--;)g[d?f:++e]=a,a+=c;return g}function pd(a,b,c,d){b=xe(b,a)?[b+""]:wc(b);for(var e=-1,f=b.length,g=f-1,h=a;null!=h&&++eb&&(b=-b>e?0:e+b),c=c>e?e:c,0>c&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Array(e);++d=e){for(;e>d;){var f=d+e>>>1,g=a[f];(c?b>=g:b>g)&&null!==g?d=f+1:e=f}return e}return td(a,b,ri,c)}function td(a,b,c,d){b=c(b);for(var e=0,f=a?a.length:0,g=b!==b,h=null===b,i=b===W;f>e;){var j=nj((e+f)/2),k=c(a[j]),l=k!==W,m=k===k;if(g)var n=m||d;else n=h?m&&l&&(d||null!=k):i?m&&(d||l):null==k?!1:d?b>=k:b>k;n?e=j+1:f=j}return sj(f,ya)}function ud(a){return vd(a)}function vd(a,b){for(var c=0,d=a.length,e=a[0],f=b?b(e):e,g=f,h=1,i=[e];++c=Y){var l=b?null:Oj(a);if(l)return R(l);g=!1,e=Ub,i=new Tb}else i=b?[]:h;a:for(;++dd?b[d]:W);return g}function Dd(a,b){if(b)return a.slice();var c=new a.constructor(a.length);return a.copy(c),c}function Ed(a){var b=new a.constructor(a.byteLength);return new cj(b).set(new cj(a)),b}function Fd(b){return n(P(b),a,new b.constructor)}function Gd(a){var b=new a.constructor(a.source,sb.exec(a));return b.lastIndex=a.lastIndex,b}function Hd(a){return n(R(a),b,new a.constructor)}function Id(a){return Hj?Object(Hj.call(a)):{}}function Jd(a,b){var c=b?Ed(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}function Kd(a,b,c,d){for(var e=-1,f=a.length,g=c.length,h=-1,i=b.length,j=rj(f-g,0),k=Array(i+j),l=!d;++he)&&(k[c[e]]=a[e]);for(;j--;)k[h++]=a[e++];return k}function Ld(a,b,c,d){for(var e=-1,f=a.length,g=-1,h=c.length,i=-1,j=b.length,k=rj(f-h,0),l=Array(k+j),m=!d;++ee)&&(l[n+c[g]]=a[e++]);return l}function Md(a,b){var c=-1,d=a.length;for(b||(b=Array(d));++c1?c[e-1]:W,g=e>2?c[2]:W;for(f="function"==typeof f?(e--,f):W,g&&we(c[0],c[1],g)&&(f=3>e?W:f,e=1),b=Object(b);++dg&&h[0]!==j&&h[g-1]!==j?[]:Q(h,j);if(g-=k.length,d>g)return ee(a,b,$d,e.placeholder,W,h,k,W,W,d-g);var l=this&&this!==Gc&&this instanceof e?f:a;return c(l,this,h)}var f=Xd(a);return e}function Zd(a){return lg(function(b){b=Lc(b,1);var c=b.length,d=c,e=Db.prototype.thru;for(a&&b.reverse();d--;){var f=b[d];if("function"!=typeof f)throw new Ri(Z);if(e&&!g&&"wrapper"==ke(f))var g=new Db([],!0)}for(d=g?d:c;++d=Y)return g.plant(d).value();for(var e=0,f=c?b[e].apply(this,a):d;++er){var w=Q(t,u);return ee(a,b,$d,k.placeholder,c,t,w,h,i,j-r)}var x=m?c:this,y=n?x[a]:a;return r=t.length,h?t=Fe(t,h):p&&r>1&&t.reverse(),l&&r>i&&(t.length=i),this&&this!==Gc&&this instanceof k&&(y=q||Xd(y)),y.apply(x,t)}var l=b&ha,m=b&aa,n=b&ba,o=b&(da|ea),p=b&ja,q=n?W:Xd(a);return k}function _d(a,b){return function(c,d){return Vc(c,a,b(d),{})}}function ae(a){return lg(function(b){return b=l(Lc(b,1),le()),lg(function(d){var e=this;return a(b,function(a){return c(a,e,d)})})})}function be(a,b,c){b=ih(b);var d=S(a);if(!b||d>=b)return"";var e=b-d;c=c===W?" ":c+"";var f=bi(c,mj(e/S(c)));return kc.test(c)?T(f).slice(0,e).join(""):f.slice(0,e)}function ce(a,b,d,e){function f(){for(var b=-1,i=arguments.length,j=-1,k=e.length,l=Array(k+i),m=this&&this!==Gc&&this instanceof f?h:a;++jb?1:-1:kh(d)||0,od(b,c,d,a)}}function ee(a,b,c,d,e,f,g,h,i,j){var k=b&da,l=h?Md(h):W,m=k?g:W,n=k?W:g,o=k?f:W,p=k?W:f;b|=k?fa:ga,b&=~(k?ga:fa),b&ca||(b&=~(aa|ba));var q=[a,b,e,o,m,p,n,l,i,j],r=c.apply(W,q);return ze(a)&&Sj(r,q),r.placeholder=d,r}function fe(a){var b=Pi[a];return function(a,c){if(a=kh(a),c=ih(c)){var d=(nh(a)+"e").split("e"),e=b(d[0]+"e"+(+d[1]+c));return d=(nh(e)+"e").split("e"),+(d[0]+"e"+(+d[1]-c))}return b(a)}}function ge(a,b,c,d,e,f,g,h){var i=b&ba;if(!i&&"function"!=typeof a)throw new Ri(Z);var j=d?d.length:0;if(j||(b&=~(fa|ga),d=e=W),g=g===W?g:rj(ih(g),0),h=h===W?h:ih(h),j-=e?e.length:0,b&ga){var k=d,l=e;d=e=W}var m=i?W:Pj(a),n=[a,b,c,d,e,k,l,f,g,h];if(m&&Ce(n,m),a=n[0],b=n[1],c=n[2],d=n[3],e=n[4],h=n[9]=null==n[9]?i?0:a.length:rj(n[9]-j,0),!h&&b&(da|ea)&&(b&=~(da|ea)),b&&b!=aa)o=b==da||b==ea?Yd(a,b,h):b!=fa&&b!=(aa|fa)||e.length?$d.apply(W,n):ce(a,b,c,d);else var o=Ud(a,b,c);var p=m?Nj:Sj;return p(o,n)}function he(a,b,c,d,e,f){var g=-1,h=e&la,i=e&ka,j=a.length,k=b.length;if(j!=k&&!(h&&k>j))return!1;var l=f.get(a);if(l)return l==b;var m=!0;for(f.set(a,b);++ge,g=d==ha&&c==da||d==ha&&c==ia&&a[7].length<=b[8]||d==(ha|ia)&&b[7].length<=b[8]&&c==da;if(!f&&!g)return a;d&aa&&(a[2]=b[2],e|=c&aa?0:ca);var h=b[3];if(h){var i=a[3];a[3]=i?Kd(i,h,b[4]):Md(h),a[4]=i?Q(a[3],_):Md(b[4])}return h=b[5],h&&(i=a[5],a[5]=i?Ld(i,h,b[6]):Md(h),a[6]=i?Q(a[5],_):Md(b[6])),h=b[7],h&&(a[7]=Md(h)),d&ha&&(a[8]=null==a[8]?b[8]:sj(a[8],b[8])),null==a[9]&&(a[9]=b[9]),a[0]=b[0],a[1]=e,a}function De(a,b,c,d,e,f){return Ng(a)&&Ng(b)&&ed(a,b,W,De,f.set(b,a)),a}function Ee(a,b){return 1==b.length?a:xh(a,qd(b,0,-1))}function Fe(a,b){for(var c=a.length,d=sj(b.length,c),e=Md(a);d--;){var f=b[d];a[d]=N(f,c)?e[f]:W}return a}function Ge(a){var b=[];return nh(a).replace(kb,function(a,c,d,e){b.push(d?e.replace(qb,"$1"):c||a)}),b}function He(a){if(a instanceof Eb)return a.clone();var b=new Db(a.__wrapped__,a.__chain__);return b.__actions__=Md(a.__actions__),b.__index__=a.__index__,b.__values__=a.__values__,b}function Ie(a,b){b=rj(ih(b),0);var c=a?a.length:0;if(!c||1>b)return[];for(var d=0,e=0,f=Array(mj(c/b));c>d;)f[e++]=qd(a,d,d+=b);return f}function Je(a){for(var b=-1,c=a?a.length:0,d=0,e=[];++bb?0:b,d)):[]}function Le(a,b,c){var d=a?a.length:0;return d?(b=c||b===W?1:ih(b),b=d-b,qd(a,0,0>b?0:b)):[]}function Me(a,b){return a&&a.length?zd(a,le(b,3),!0,!0):[]}function Ne(a,b){return a&&a.length?zd(a,le(b,3),!0):[]}function Oe(a,b,c,d){var e=a?a.length:0;return e?(c&&"number"!=typeof c&&we(a,b,c)&&(c=0,d=e),Jc(a,b,c,d)):[]}function Pe(a,b){return a&&a.length?s(a,le(b,3)):-1}function Qe(a,b){return a&&a.length?s(a,le(b,3),!0):-1}function Re(a){var b=a?a.length:0;return b?Lc(a,1):[]}function Se(a){var b=a?a.length:0;return b?Lc(a,ta):[]}function Te(a,b){var c=a?a.length:0;return c?(b=b===W?1:ih(b),Lc(a,b)):[]}function Ue(a){for(var b=-1,c=a?a.length:0,d={};++bc&&(c=rj(d+c,0)),t(a,b,c)):-1}function Xe(a){return Le(a,1)}function Ye(a,b){return a?pj.call(a,b):""}function Ze(a){var b=a?a.length:0;return b?a[b-1]:W}function $e(a,b,c){var d=a?a.length:0;if(!d)return-1;var e=d;if(c!==W&&(e=ih(c),e=(0>e?rj(d+e,0):sj(e,d-1))+1),b!==b)return L(a,e,!0);for(;e--;)if(a[e]===b)return e;return-1}function _e(a,b){return a&&a.length&&b&&b.length?ld(a,b):a}function af(a,b,c){return a&&a.length&&b&&b.length?ld(a,b,le(c)):a}function bf(a,b,c){return a&&a.length&&b&&b.length?ld(a,b,W,c):a}function cf(a,b){var c=[];if(!a||!a.length)return c;var d=-1,e=[],f=a.length;for(b=le(b,3);++dd&&vg(a[d],b))return d}return-1}function jf(a,b){return sd(a,b,!0)}function kf(a,b,c){return td(a,b,le(c),!0)}function lf(a,b){var c=a?a.length:0;if(c){var d=sd(a,b,!0)-1;if(vg(a[d],b))return d}return-1}function mf(a){return a&&a.length?ud(a):[]}function nf(a,b){return a&&a.length?vd(a,le(b)):[]}function of(a){return Ke(a,1)}function pf(a,b,c){return a&&a.length?(b=c||b===W?1:ih(b),qd(a,0,0>b?0:b)):[]}function qf(a,b,c){var d=a?a.length:0;return d?(b=c||b===W?1:ih(b),b=d-b,qd(a,0>b?0:b,d)):[]}function rf(a,b){return a&&a.length?zd(a,le(b,3),!1,!0):[]}function sf(a,b){return a&&a.length?zd(a,le(b,3)):[]}function tf(a){return a&&a.length?wd(a):[]}function uf(a,b){return a&&a.length?wd(a,le(b)):[]}function vf(a,b){return a&&a.length?wd(a,W,b):[]}function wf(a){if(!a||!a.length)return[];var b=0;return a=i(a,function(a){return Bg(a)?(b=rj(a.length,b),!0):void 0}),y(b,function(b){return l(a,jd(b))})}function xf(a,b){if(!a||!a.length)return[];var d=wf(a);return null==b?d:l(d,function(a){return c(b,W,a)})}function yf(a,b){return Cd(a||[],b||[],hc)}function zf(a,b){return Cd(a||[],b||[],pd)}function Af(a){var b=yb(a);return b.__chain__=!0,b}function Bf(a,b){return b(a),a}function Cf(a,b){return b(a)}function Df(){return Af(this)}function Ef(){return new Db(this.value(),this.__chain__)}function Ff(a){return this.map(a).flatten()}function Gf(){this.__values__===W&&(this.__values__=hh(this.value()));var a=this.__index__>=this.__values__.length,b=a?W:this.__values__[this.__index__++];return{done:a,value:b}}function Hf(){return this}function If(a){for(var b,c=this;c instanceof Cb;){var d=He(c);d.__index__=0,d.__values__=W,b?e.__wrapped__=d:b=d;var e=d;c=c.__wrapped__}return e.__wrapped__=a,b}function Jf(){var a=this.__wrapped__;if(a instanceof Eb){var b=a;return this.__actions__.length&&(b=new Eb(this)),b=b.reverse(),b.__actions__.push({func:Cf,args:[df],thisArg:W}),new Db(b,this.__chain__)}return this.thru(df)}function Kf(){return Ad(this.__wrapped__,this.__actions__)}function Lf(a,b,c){var d=zk(a)?h:Ic;return c&&we(a,b,c)&&(b=W),d(a,le(b,3))}function Mf(a,b){var c=zk(a)?i:Kc;return c(a,le(b,3))}function Nf(a,b){if(b=le(b,3),zk(a)){var c=s(a,b);return c>-1?a[c]:W}return r(a,b,Jj)}function Of(a,b){if(b=le(b,3),zk(a)){var c=s(a,b,!0);return c>-1?a[c]:W}return r(a,b,Kj)}function Pf(a,b){return Lc(Tf(a,b),1)}function Qf(a,b){return"function"==typeof b&&zk(a)?f(a,b):Jj(a,vc(b))}function Rf(a,b){return"function"==typeof b&&zk(a)?g(a,b):Kj(a,vc(b))}function Sf(a,b,c,d){a=Ag(a)?a:Ph(a),c=c&&!d?ih(c):0;var e=a.length;return 0>c&&(c=rj(e+c,0)),_g(a)?e>=c&&a.indexOf(b,c)>-1:!!e&&t(a,b,c)>-1}function Tf(a,b){var c=zk(a)?l:bd;return c(a,le(b,3))}function Uf(a,b,c,d){return null==a?[]:(zk(b)||(b=null==b?[]:[b]),c=d?W:c,zk(c)||(c=null==c?[]:[c]),gd(a,b,c))}function Vf(a,b,c){var d=zk(a)?n:v,e=arguments.length<3;return d(a,le(b,4),c,e,Jj)}function Wf(a,b,c){var d=zk(a)?o:v,e=arguments.length<3;return d(a,le(b,4),c,e,Kj)}function Xf(a,b){var c=zk(a)?i:Kc;return b=le(b,3),c(a,function(a,c,d){return!b(a,c,d)})}function Yf(a){var b=Ag(a)?a:Ph(a),c=b.length;return c>0?b[nd(0,c-1)]:W}function Zf(a,b){var c=-1,d=hh(a),e=d.length,f=e-1;for(b=zc(ih(b),0,e);++c0&&(c=b.apply(this,arguments)),1>=a&&(b=W),c}}function eg(a,b,c){b=c?W:b;var d=ge(a,da,W,W,W,W,W,b);return d.placeholder=eg.placeholder,d}function fg(a,b,c){b=c?W:b;var d=ge(a,ea,W,W,W,W,W,b);return d.placeholder=fg.placeholder,d}function gg(a,b,c){function d(){o&&dj(o),k&&dj(k),q=0,j=k=n=o=p=W}function e(b,c){c&&dj(c),k=o=p=W,b&&(q=qk(),l=a.apply(n,j),o||k||(j=n=W))}function f(){var a=b-(qk()-m);0>=a||a>b?e(p,k):o=kj(f,a)}function g(){return(o&&p||k&&t)&&(l=a.apply(n,j)),d(),l}function h(){e(t,o)}function i(){if(j=arguments,m=qk(),n=this,p=t&&(o||!r),s===!1)var c=r&&!o;else{q||k||r||(q=m);var d=s-(m-q),e=(0>=d||d>s)&&(r||k);e?(k&&(k=dj(k)),q=m,l=a.apply(n,j)):k||(k=kj(h,d))}return e&&o?o=dj(o):o||b===s||(o=kj(f,b)),c&&(e=!0,l=a.apply(n,j)),!e||o||k||(j=n=W),l}var j,k,l,m,n,o,p,q=0,r=!1,s=!1,t=!0;if("function"!=typeof a)throw new Ri(Z);return b=kh(b)||0,Ng(c)&&(r=!!c.leading,s="maxWait"in c&&rj(kh(c.maxWait)||0,b),t="trailing"in c?!!c.trailing:t),i.cancel=d,i.flush=g,i}function hg(a){return ge(a,ja)}function ig(a,b){if("function"!=typeof a||b&&"function"!=typeof b)throw new Ri(Z);var c=function(){var d=arguments,e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);var g=a.apply(this,d);return c.cache=f.set(e,g),g};return c.cache=new ig.Cache,c}function jg(a){if("function"!=typeof a)throw new Ri(Z);return function(){return!a.apply(this,arguments)}}function kg(a){return dg(2,a)}function lg(a,b){if("function"!=typeof a)throw new Ri(Z);return b=rj(b===W?a.length-1:ih(b),0),function(){for(var d=arguments,e=-1,f=rj(d.length-b,0),g=Array(f);++eb}function xg(a,b){return a>=b}function yg(a){return Bg(a)&&Vi.call(a,"callee")&&(!jj.call(a,"callee")||Yi.call(a)==Aa)}function zg(a){return Og(a)&&Yi.call(a)==Qa}function Ag(a){return null!=a&&Mg(Qj(a))&&!Kg(a)}function Bg(a){return Og(a)&&Ag(a)}function Cg(a){return a===!0||a===!1||Og(a)&&Yi.call(a)==Ca}function Dg(a){return Og(a)&&Yi.call(a)==Da}function Eg(a){return!!a&&1===a.nodeType&&Og(a)&&!Xg(a)}function Fg(a){if(Ag(a)&&(zk(a)||_g(a)||Kg(a.splice)||yg(a)))return!a.length;for(var b in a)if(Vi.call(a,b))return!1;return!0}function Gg(a,b){return Xc(a,b)}function Hg(a,b,c){c="function"==typeof c?c:W;var d=c?c(a,b):W;return d===W?Xc(a,b,c):!!d}function Ig(a){return Og(a)?Yi.call(a)==Ea||"string"==typeof a.message&&"string"==typeof a.name:!1}function Jg(a){return"number"==typeof a&&oj(a)}function Kg(a){var b=Ng(a)?Yi.call(a):"";return b==Fa||b==Ga}function Lg(a){return"number"==typeof a&&a==ih(a)}function Mg(a){return"number"==typeof a&&a>-1&&a%1==0&&ua>=a}function Ng(a){var b=typeof a;return!!a&&("object"==b||"function"==b)}function Og(a){return!!a&&"object"==typeof a}function Pg(a){return Og(a)&&pe(a)==Ha}function Qg(a,b){return a===b||Zc(a,b,me(b))}function Rg(a,b,c){return c="function"==typeof c?c:W,Zc(a,b,me(b),c)}function Sg(a){return Wg(a)&&a!=+a}function Tg(a){return null==a?!1:Kg(a)?$i.test(Ui.call(a)):Og(a)&&(M(a)?$i:wb).test(a)}function Ug(a){return null===a}function Vg(a){return null==a}function Wg(a){return"number"==typeof a||Og(a)&&Yi.call(a)==Ia}function Xg(a){if(!Og(a)||Yi.call(a)!=Ja||M(a))return!1;var b=fj(a);if(null===b)return!0;var c=b.constructor;return"function"==typeof c&&c instanceof c&&Ui.call(c)==Xi}function Yg(a){return Ng(a)&&Yi.call(a)==Ka}function Zg(a){return Lg(a)&&a>=-ua&&ua>=a}function $g(a){return Og(a)&&pe(a)==La}function _g(a){return"string"==typeof a||!zk(a)&&Og(a)&&Yi.call(a)==Ma}function ah(a){return"symbol"==typeof a||Og(a)&&Yi.call(a)==Na}function bh(a){return Og(a)&&Mg(a.length)&&!!qc[Yi.call(a)]}function ch(a){return a===W}function dh(a){return Og(a)&&pe(a)==Oa}function eh(a){return Og(a)&&Yi.call(a)==Pa}function fh(a,b){return b>a}function gh(a,b){return b>=a}function hh(a){if(!a)return[];if(Ag(a))return _g(a)?T(a):Md(a);if(hj&&a[hj])return O(a[hj]());var b=pe(a),c=b==Ha?P:b==La?R:Ph;return c(a)}function ih(a){if(!a)return 0===a?a:0;if(a=kh(a),a===ta||a===-ta){var b=0>a?-1:1;return b*va}var c=a%1;return a===a?c?a-c:a:0}function jh(a){return a?zc(ih(a),0,xa):0}function kh(a){if(Ng(a)){var b=Kg(a.valueOf)?a.valueOf():a;a=Ng(b)?b+"":b}if("string"!=typeof a)return 0===a?a:+a;a=a.replace(nb,"");var c=vb.test(a);return c||xb.test(a)?yc(a.slice(2),c?2:8):ub.test(a)?wa:+a}function lh(a){return Nd(a,Bh(a))}function mh(a){return zc(ih(a),-ua,ua)}function nh(a){if("string"==typeof a)return a;if(null==a)return"";if(ah(a))return Ij?Ij.call(a):"";var b=a+"";return"0"==b&&1/a==-ta?"-0":b}function oh(a,b){var c=Dc(a);return b?sc(c,b):c}function ph(a,b){return r(a,le(b,3),Nc,!0)}function qh(a,b){return r(a,le(b,3),Oc,!0)}function rh(a,b){return null==a?a:Lj(a,vc(b),Bh)}function sh(a,b){return null==a?a:Mj(a,vc(b),Bh)}function th(a,b){return a&&Nc(a,vc(b))}function uh(a,b){return a&&Oc(a,vc(b))}function vh(a){return null==a?[]:Pc(a,Ah(a))}function wh(a){return null==a?[]:Pc(a,Bh(a))}function xh(a,b,c){var d=null==a?W:Qc(a,b);return d===W?c:d}function yh(a,b){return re(a,b,Rc)}function zh(a,b){return re(a,b,Sc)}function Ah(a){var b=Ae(a);if(!b&&!Ag(a))return _c(a);var c=ve(a),d=!!c,e=c||[],f=e.length;for(var g in a)!Rc(a,g)||d&&("length"==g||N(g,f))||b&&"constructor"==g||e.push(g);return e}function Bh(a){for(var b=-1,c=Ae(a),d=ad(a),e=d.length,f=ve(a),g=!!f,h=f||[],i=h.length;++bb){var d=a;a=b,b=d}if(c||a%1||b%1){var e=uj();return sj(a+e*(b-a+xc("1e-"+((e+"").length-1))),b)}return nd(a,b)}function Uh(a){return Tk(nh(a).toLowerCase())}function Vh(a){return a=nh(a),a&&a.replace(zb,I).replace(ic,"")}function Wh(a,b,c){a=nh(a),b="string"==typeof b?b:b+"";var d=a.length;return c=c===W?d:zc(ih(c),0,d),c-=b.length,c>=0&&a.indexOf(b,c)==c}function Xh(a){return a=nh(a),a&&eb.test(a)?a.replace(cb,J):a}function Yh(a){return a=nh(a),a&&mb.test(a)?a.replace(lb,"\\$&"):a}function Zh(a,b,c){a=nh(a),b=ih(b);var d=S(a);if(!b||d>=b)return a;var e=(b-d)/2,f=nj(e),g=mj(e);return be("",f,c)+a+be("",g,c)}function $h(a,b,c){return a=nh(a),a+be(a,b,c)}function _h(a,b,c){return a=nh(a),be(a,b,c)+a}function ai(a,b,c){return c||null==b?b=0:b&&(b=+b),a=nh(a).replace(nb,""),tj(a,b||(tb.test(a)?16:10))}function bi(a,b){a=nh(a),b=ih(b);var c="";if(!a||1>b||b>ua)return c;do b%2&&(c+=a),b=nj(b/2),a+=a;while(b);return c}function ci(){var a=arguments,b=nh(a[0]);return a.length<3?b:b.replace(a[1],a[2])}function di(a,b,c){return nh(a).split(b,c)}function ei(a,b,c){return a=nh(a),c=zc(ih(c),0,a.length),a.lastIndexOf(b,c)==c}function fi(a,b,c){var d=yb.templateSettings;c&&we(a,b,c)&&(b=W),a=nh(a),b=Dk({},b,d,fc);var e,f,g=Dk({},b.imports,d.imports,fc),h=Ah(g),i=B(g,h),j=0,k=b.interpolate||Ab,l="__p += '",m=Qi((b.escape||Ab).source+"|"+k.source+"|"+(k===hb?rb:Ab).source+"|"+(b.evaluate||Ab).source+"|$","g"),n="//# sourceURL="+("sourceURL"in b?b.sourceURL:"lodash.templateSources["+ ++pc+"]")+"\n";a.replace(m,function(b,c,d,g,h,i){return d||(d=g),l+=a.slice(j,i).replace(Bb,K),c&&(e=!0,l+="' +\n__e("+c+") +\n'"),h&&(f=!0,l+="';\n"+h+";\n__p += '"),d&&(l+="' +\n((__t = ("+d+")) == null ? '' : __t) +\n'"),j=i+b.length,b}),l+="';\n";var o=b.variable;o||(l="with (obj) {\n"+l+"\n}\n"),l=(f?l.replace($a,""):l).replace(_a,"$1").replace(ab,"$1;"),l="function("+(o||"obj")+") {\n"+(o?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(e?", __e = _.escape":"")+(f?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var p=Xk(function(){return Function(h,n+"return "+l).apply(W,i)});if(p.source=l,Ig(p))throw p;return p}function gi(a){return nh(a).toLowerCase()}function hi(a){return nh(a).toUpperCase()}function ii(a,b,c){if(a=nh(a),!a)return a;if(c||b===W)return a.replace(nb,"");if(b+="",!b)return a;var d=T(a),e=T(b);return d.slice(C(d,e),D(d,e)+1).join("")}function ji(a,b,c){if(a=nh(a),!a)return a;if(c||b===W)return a.replace(pb,"");if(b+="",!b)return a;var d=T(a);return d.slice(0,D(d,T(b))+1).join("")}function ki(a,b,c){if(a=nh(a),!a)return a;if(c||b===W)return a.replace(ob,"");if(b+="",!b)return a;var d=T(a);return d.slice(C(d,T(b))).join("")}function li(a,b){var c=ma,d=na;if(Ng(b)){var e="separator"in b?b.separator:e;c="length"in b?ih(b.length):c,d="omission"in b?nh(b.omission):d}a=nh(a);var f=a.length;if(kc.test(a)){var g=T(a);f=g.length}if(c>=f)return a;var h=c-S(d);if(1>h)return d;var i=g?g.slice(0,h).join(""):a.slice(0,h);if(e===W)return i+d;if(g&&(h+=i.length-h),Yg(e)){if(a.slice(h).search(e)){var j,k=i;for(e.global||(e=Qi(e.source,nh(sb.exec(e))+"g")),e.lastIndex=0;j=e.exec(k);)var l=j.index;i=i.slice(0,l===W?h:l)}}else if(a.indexOf(e,h)!=h){var m=i.lastIndexOf(e);m>-1&&(i=i.slice(0,m))}return i+d}function mi(a){return a=nh(a),a&&db.test(a)?a.replace(bb,U):a}function ni(a,b,c){return a=nh(a),b=c?W:b,b===W&&(b=nc.test(a)?mc:lc),a.match(b)||[]}function oi(a){var b=a?a.length:0,d=le();return a=b?l(a,function(a){if("function"!=typeof a[1])throw new Ri(Z);return[d(a[0]),a[1]]}):[],lg(function(d){for(var e=-1;++ea||a>ua)return[];var c=xa,d=sj(a,xa);b=vc(b),a-=xa;for(var e=y(d,b);++c0){if(++a>=oa)return c}else a=0;return Nj(c,d)}}(),Tj=lg(function(a,b){return zk(a)||(a=null==a?[]:[Object(a)]),b=Lc(b,1),e(a,b)}),Uj=lg(function(a,b){return Bg(a)?Fc(a,Lc(b,1,!0)):[]}),Vj=lg(function(a,b){var c=Ze(b);return Bg(c)&&(c=W),Bg(a)?Fc(a,Lc(b,1,!0),le(c)):[]}),Wj=lg(function(a,b){var c=Ze(b);return Bg(c)&&(c=W),Bg(a)?Fc(a,Lc(b,1,!0),W,c):[]}),Xj=lg(function(a){var b=l(a,uc);return b.length&&b[0]===a[0]?Uc(b):[]}),Yj=lg(function(a){var b=Ze(a),c=l(a,uc);return b===Ze(c)?b=W:c.pop(),c.length&&c[0]===a[0]?Uc(c,le(b)):[]}),Zj=lg(function(a){var b=Ze(a),c=l(a,uc);return b===Ze(c)?b=W:c.pop(),c.length&&c[0]===a[0]?Uc(c,W,b):[]}),$j=lg(_e),_j=lg(function(a,b){b=l(Lc(b,1),String);var c=tc(a,b);return md(a,b.sort(F)),c}),ak=lg(function(a){return wd(Lc(a,1,!0))}),bk=lg(function(a){var b=Ze(a);return Bg(b)&&(b=W),wd(Lc(a,1,!0),le(b))}),ck=lg(function(a){var b=Ze(a);return Bg(b)&&(b=W),wd(Lc(a,1,!0),W,b)}),dk=lg(function(a,b){return Bg(a)?Fc(a,b):[]}),ek=lg(function(a){return Bd(i(a,Bg))}),fk=lg(function(a){var b=Ze(a);return Bg(b)&&(b=W),Bd(i(a,Bg),le(b))}),gk=lg(function(a){var b=Ze(a);return Bg(b)&&(b=W),Bd(i(a,Bg),W,b)}),hk=lg(wf),ik=lg(function(a){var b=a.length,c=b>1?a[b-1]:W;return c="function"==typeof c?(a.pop(),c):W,xf(a,c)}),jk=lg(function(a){a=Lc(a,1);var b=a.length,c=b?a[0]:0,d=this.__wrapped__,e=function(b){return tc(b,a)};return!(b>1||this.__actions__.length)&&d instanceof Eb&&N(c)?(d=d.slice(c,+c+(b?1:0)),d.__actions__.push({func:Cf,args:[e],thisArg:W}),new Db(d,this.__chain__).thru(function(a){return b&&!a.length&&a.push(W),a})):this.thru(e)}),kk=Qd(function(a,b,c){Vi.call(a,c)?++a[c]:a[c]=1}),lk=Qd(function(a,b,c){Vi.call(a,c)?a[c].push(b):a[c]=[b]}),mk=lg(function(a,b,d){var e=-1,f="function"==typeof b,g=xe(b),h=Ag(a)?Array(a.length):[];return Jj(a,function(a){var i=f?b:g&&null!=a?a[b]:W;h[++e]=i?c(i,a,d):Wc(a,b,d)}),h}),nk=Qd(function(a,b,c){a[c]=b}),ok=Qd(function(a,b,c){a[c?0:1].push(b)},function(){return[[],[]]}),pk=lg(function(a,b){if(null==a)return[];var c=b.length;return c>1&&we(a,b[0],b[1])?b=[]:c>2&&we(b[0],b[1],b[2])&&(b.length=1),gd(a,Lc(b,1),[])}),qk=Ni.now,rk=lg(function(a,b,c){var d=aa;if(c.length){var e=Q(c,oe(rk));d|=fa}return ge(a,d,b,c,e)}),sk=lg(function(a,b,c){var d=aa|ba;if(c.length){var e=Q(c,oe(sk));d|=fa}return ge(b,d,a,c,e)}),tk=lg(function(a,b){return Ec(a,1,b)}),uk=lg(function(a,b,c){return Ec(a,kh(b)||0,c)}),vk=lg(function(a,b){b=l(Lc(b,1),le());var d=b.length;return lg(function(e){for(var f=-1,g=sj(e.length,d);++f0||0>b)?new Eb(c):(0>a?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==W&&(b=ih(b),c=0>b?c.dropRight(-b):c.take(b-a)),c)},Eb.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},Eb.prototype.toArray=function(){return this.take(xa)},Nc(Eb.prototype,function(a,b){var c=/^(?:filter|find|map|reject)|While$/.test(b),d=/^(?:head|last)$/.test(b),e=yb[d?"take"+("last"==b?"Right":""):b],f=d||/^find/.test(b);e&&(yb.prototype[b]=function(){var b=this.__wrapped__,g=d?[1]:arguments,h=b instanceof Eb,i=g[0],j=h||zk(b),k=function(a){var b=e.apply(yb,m([a],g));return d&&l?b[0]:b};j&&c&&"function"==typeof i&&1!=i.length&&(h=j=!1);var l=this.__chain__,n=!!this.__actions__.length,o=f&&!l,p=h&&!n;if(!f&&j){b=p?b:new Eb(this);var q=a.apply(b,g);return q.__actions__.push({func:Cf,args:[k],thisArg:W}),new Db(q,l)}return o&&p?a.apply(this,g):(q=this.thru(k),o?d?q.value()[0]:q.value():q)})}),f(["pop","push","shift","sort","splice","unshift"],function(a){var b=Si[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",d=/^(?:pop|shift)$/.test(a);yb.prototype[a]=function(){var a=arguments;return d&&!this.__chain__?b.apply(this.value(),a):this[c](function(c){return b.apply(c,a)})}}),Nc(Eb.prototype,function(a,b){var c=yb[b];if(c){var d=c.name+"",e=Cj[d]||(Cj[d]=[]);e.push({name:b,func:c})}}),Cj[$d(W,ba).name]=[{name:"wrapper",func:W}],Eb.prototype.clone=Fb,Eb.prototype.reverse=Gb,Eb.prototype.value=Hb,yb.prototype.at=jk,yb.prototype.chain=Df,yb.prototype.commit=Ef,yb.prototype.flatMap=Ff,yb.prototype.next=Gf,yb.prototype.plant=If,yb.prototype.reverse=Jf,yb.prototype.toJSON=yb.prototype.valueOf=yb.prototype.value=Kf,hj&&(yb.prototype[hj]=Hf),yb}var W,X="4.6.1",Y=200,Z="Expected a function",$="__lodash_hash_undefined__",_="__lodash_placeholder__",aa=1,ba=2,ca=4,da=8,ea=16,fa=32,ga=64,ha=128,ia=256,ja=512,ka=1,la=2,ma=30,na="...",oa=150,pa=16,qa=1,ra=2,sa=3,ta=1/0,ua=9007199254740991,va=1.7976931348623157e308,wa=NaN,xa=4294967295,ya=xa-1,za=xa>>>1,Aa="[object Arguments]",Ba="[object Array]",Ca="[object Boolean]",Da="[object Date]",Ea="[object Error]",Fa="[object Function]",Ga="[object GeneratorFunction]",Ha="[object Map]",Ia="[object Number]",Ja="[object Object]",Ka="[object RegExp]",La="[object Set]",Ma="[object String]",Na="[object Symbol]",Oa="[object WeakMap]",Pa="[object WeakSet]",Qa="[object ArrayBuffer]",Ra="[object Float32Array]",Sa="[object Float64Array]",Ta="[object Int8Array]",Ua="[object Int16Array]",Va="[object Int32Array]",Wa="[object Uint8Array]",Xa="[object Uint8ClampedArray]",Ya="[object Uint16Array]",Za="[object Uint32Array]",$a=/\b__p \+= '';/g,_a=/\b(__p \+=) '' \+/g,ab=/(__e\(.*?\)|\b__t\)) \+\n'';/g,bb=/&(?:amp|lt|gt|quot|#39|#96);/g,cb=/[&<>"'`]/g,db=RegExp(bb.source),eb=RegExp(cb.source),fb=/<%-([\s\S]+?)%>/g,gb=/<%([\s\S]+?)%>/g,hb=/<%=([\s\S]+?)%>/g,ib=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jb=/^\w*$/,kb=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,lb=/[\\^$.*+?()[\]{}|]/g,mb=RegExp(lb.source),nb=/^\s+|\s+$/g,ob=/^\s+/,pb=/\s+$/,qb=/\\(\\)?/g,rb=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,sb=/\w*$/,tb=/^0x/i,ub=/^[-+]0x[0-9a-f]+$/i,vb=/^0b[01]+$/i,wb=/^\[object .+?Constructor\]$/,xb=/^0o[0-7]+$/i,yb=/^(?:0|[1-9]\d*)$/,zb=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Ab=/($^)/,Bb=/['\n\r\u2028\u2029\\]/g,Cb="\\ud800-\\udfff",Db="\\u0300-\\u036f\\ufe20-\\ufe23",Eb="\\u20d0-\\u20f0",Fb="\\u2700-\\u27bf",Gb="a-z\\xdf-\\xf6\\xf8-\\xff",Hb="\\xac\\xb1\\xd7\\xf7",Ib="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Jb="\\u2018\\u2019\\u201c\\u201d",Kb=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Lb="A-Z\\xc0-\\xd6\\xd8-\\xde",Mb="\\ufe0e\\ufe0f",Nb=Hb+Ib+Jb+Kb,Ob="["+Cb+"]",Pb="["+Nb+"]",Qb="["+Db+Eb+"]",Rb="\\d+",Sb="["+Fb+"]",Tb="["+Gb+"]",Ub="[^"+Cb+Nb+Rb+Fb+Gb+Lb+"]",Vb="\\ud83c[\\udffb-\\udfff]",Wb="(?:"+Qb+"|"+Vb+")",Xb="[^"+Cb+"]",Yb="(?:\\ud83c[\\udde6-\\uddff]){2}",Zb="[\\ud800-\\udbff][\\udc00-\\udfff]",$b="["+Lb+"]",_b="\\u200d",ac="(?:"+Tb+"|"+Ub+")",bc="(?:"+$b+"|"+Ub+")",cc=Wb+"?",dc="["+Mb+"]?",ec="(?:"+_b+"(?:"+[Xb,Yb,Zb].join("|")+")"+dc+cc+")*",fc=dc+cc+ec,gc="(?:"+[Sb,Yb,Zb].join("|")+")"+fc,hc="(?:"+[Xb+Qb+"?",Qb,Yb,Zb,Ob].join("|")+")",ic=RegExp(Qb,"g"),jc=RegExp(Vb+"(?="+Vb+")|"+hc+fc,"g"),kc=RegExp("["+_b+Cb+Db+Eb+Mb+"]"),lc=/[a-zA-Z0-9]+/g,mc=RegExp([$b+"?"+Tb+"+(?="+[Pb,$b,"$"].join("|")+")",bc+"+(?="+[Pb,$b+ac,"$"].join("|")+")",$b+"?"+ac+"+",$b+"+",Rb,gc].join("|"),"g"),nc=/[a-z][A-Z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,oc=["Array","Buffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Reflect","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],pc=-1,qc={}; qc[Ra]=qc[Sa]=qc[Ta]=qc[Ua]=qc[Va]=qc[Wa]=qc[Xa]=qc[Ya]=qc[Za]=!0,qc[Aa]=qc[Ba]=qc[Qa]=qc[Ca]=qc[Da]=qc[Ea]=qc[Fa]=qc[Ha]=qc[Ia]=qc[Ja]=qc[Ka]=qc[La]=qc[Ma]=qc[Oa]=!1;var rc={};rc[Aa]=rc[Ba]=rc[Qa]=rc[Ca]=rc[Da]=rc[Ra]=rc[Sa]=rc[Ta]=rc[Ua]=rc[Va]=rc[Ha]=rc[Ia]=rc[Ja]=rc[Ka]=rc[La]=rc[Ma]=rc[Na]=rc[Wa]=rc[Xa]=rc[Ya]=rc[Za]=!0,rc[Ea]=rc[Fa]=rc[Oa]=!1;var sc={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},tc={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},uc={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},vc={"function":!0,object:!0},wc={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},xc=parseFloat,yc=parseInt,zc=vc[typeof exports]&&exports&&!exports.nodeType?exports:W,Ac=vc[typeof module]&&module&&!module.nodeType?module:W,Bc=Ac&&Ac.exports===zc?zc:W,Cc=E(zc&&Ac&&"object"==typeof global&&global),Dc=E(vc[typeof self]&&self),Ec=E(vc[typeof window]&&window),Fc=E(vc[typeof this]&&this),Gc=Cc||Ec!==(Fc&&Fc.window)&&Ec||Dc||Fc||Function("return this")(),Hc=V();(Ec||Dc||{})._=Hc,"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return Hc}):zc&&Ac?(Bc&&((Ac.exports=Hc)._=Hc),zc._=Hc):Gc._=Hc}.call(this),function(){"use strict";function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;b0&&a.each(b.childNodes,function(a,b){var c=b.nodeType,g=e(b.localName||b.nodeName),j=b.text||b.nodeValue||"";if(8!=c)if(3!=c&&4!=c&&g)i=i||{},i[g]?(i[g].length||(i[g]=f(i[g])),i[g]=f(i[g]),i[g][i[g].length]=d(b,!0),i[g].length=i[g].length):i[g]=d(b);else{if(j.match(/^\s+$/))return;h+=j.replace(/^\s+/,"").replace(/\s+$/,"")}}),b.attributes&&b.attributes.length>0&&(j={},i=i||{},a.each(b.attributes,function(a,b){var c=e(b.name),d=b.value;j[c]=d,i[c]?(i[cnn]=f(i[cnn]),i[c][i[c].length]=d,i[c].length=i[c].length):i[c]=d})),i&&(i=a.extend(""!=h?new String(h):{},i||{}),h=i.text?[i.text||""].concat([h]):h,h&&(i.text=h),h="");var k=i||h;return c&&(h&&(k={}),h=k.text||h||"",h&&(k.text=h),g||(k=f(k))),k}if(!b)return{};var e=function(a){return String(a||"").replace(/-/g,"_")},f=function(b){return a.isArray(b)||(b=[b]),b.length=b.length,b};if("string"==typeof b&&(b=a.text2xml(b)),b.nodeType){if(3==b.nodeType||4==b.nodeType)return b.nodeValue;var g=9==b.nodeType?b.documentElement:b,h=d(g,!0);return b=null,g=null,h}},text2xml:function(b){return a.parseXML(b)}})}(jQuery),function(a,b,c){"use strict";function d(a,b){return("string"==typeof b||b instanceof String)&&(b=new RegExp(b)),b instanceof RegExp?b.test(a):b&&Array.isArray(b.and)?b.and.every(function(b){return d(a,b)}):b&&Array.isArray(b.or)?b.or.some(function(b){return d(a,b)}):b&&b.not?!d(a,b.not):!1}function e(a,b){return("string"==typeof b||b instanceof String)&&(b=new RegExp(b)),b instanceof RegExp?b.exec(a):b&&Array.isArray(b)?b.reduce(function(b,c){return b?b:e(a,c)},null):null}c&&c.module("reTree",[]).factory("reTree",[function(){return{test:d,exec:e}}]),b&&(b.reTree={test:d,exec:e}),a&&a.exports&&(a.exports={test:d,exec:e})}("undefined"==typeof module?null:module,"undefined"==typeof window?null:window,"undefined"==typeof angular?null:angular),function(a){"use strict";a.module("ng.deviceDetector",["reTree"]).constant("BROWSERS",{CHROME:"chrome",FIREFOX:"firefox",SAFARI:"safari",OPERA:"opera",IE:"ie",MS_EDGE:"ms-edge",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("DEVICES",{ANDROID:"android",I_PAD:"ipad",IPHONE:"iphone",I_POD:"ipod",BLACKBERRY:"blackberry",FIREFOX_OS:"firefox-os",CHROME_BOOK:"chrome-book",WINDOWS_PHONE:"windows-phone",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("OS",{WINDOWS:"windows",MAC:"mac",IOS:"ios",ANDROID:"android",LINUX:"linux",UNIX:"unix",FIREFOX_OS:"firefox-os",CHROME_OS:"chrome-os",WINDOWS_PHONE:"windows-phone",PS4:"ps4",VITA:"vita",UNKNOWN:"unknown"}).constant("OS_VERSIONS",{WINDOWS_3_11:"windows-3-11",WINDOWS_95:"windows-95",WINDOWS_ME:"windows-me",WINDOWS_98:"windows-98",WINDOWS_CE:"windows-ce",WINDOWS_2000:"windows-2000",WINDOWS_XP:"windows-xp",WINDOWS_SERVER_2003:"windows-server-2003",WINDOWS_VISTA:"windows-vista",WINDOWS_7:"windows-7",WINDOWS_8_1:"windows-8-1",WINDOWS_8:"windows-8",WINDOWS_10:"windows-10",WINDOWS_PHONE_7_5:"windows-phone-7-5",WINDOWS_PHONE_8_1:"windows-phone-8-1",WINDOWS_PHONE_10:"windows-phone-10",WINDOWS_NT_4_0:"windows-nt-4-0",UNKNOWN:"unknown"}).service("detectUtils",["deviceDetector","DEVICES","BROWSERS","OS",function(a,b,c,d){var e=a;this.isMobile=function(){return"unknown"!==e.device},this.isAndroid=function(){return e.device===b.ANDROID||e.OS===d.ANDROID},this.isIOS=function(){return e.os===d.IOS||e.device===b.I_POD||e.device===b.IPHONE}}]).factory("deviceDetector",["$window","DEVICES","BROWSERS","OS","OS_VERSIONS","reTree",function(a,b,c,d,e,f){var g={WINDOWS:{and:[{or:[/\bWindows|(Win\d\d)\b/,/\bWin 9x\b/]},{not:/\bWindows Phone\b/}]},MAC:{and:[/\bMac OS\b/,{not:/Windows Phone/}]},IOS:{and:[{or:[/\biPad\b/,/\biPhone\b/,/\biPod\b/]},{not:/Windows Phone/}]},ANDROID:{and:[/\bAndroid\b/,{not:/Windows Phone/}]},LINUX:/\bLinux\b/,UNIX:/\bUNIX\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/Mobile\b/]},CHROME_OS:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},h={CHROME:{and:[{or:[/\bChrome\b/,/\bCriOS\b/]},{not:{or:[/\bOPR\b/,/\bEdge\b/]}}]},FIREFOX:/\bFirefox\b/,SAFARI:{and:[/^((?!CriOS).)*\Safari\b.*$/,{not:{or:[/\bOPR\b/,/\bEdge\b/,/Windows Phone/]}}]},OPERA:{or:[/Opera\b/,/\bOPR\b/]},IE:{or:[/\bMSIE\b/,/\bTrident\b/]},MS_EDGE:{or:[/\bEdge\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},i={ANDROID:{and:[/\bAndroid\b/,{not:/Windows Phone/}]},I_PAD:/\biPad\b/,IPHONE:{and:[/\biPhone\b/,{not:/Windows Phone/}]},I_POD:/\biPod\b/,BLACKBERRY:/\bblackberry\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/\bMobile\b/]},CHROME_BOOK:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},j={WINDOWS_3_11:/Win16/,WINDOWS_95:/(Windows 95|Win95|Windows_95)/,WINDOWS_ME:/(Win 9x 4.90|Windows ME)/,WINDOWS_98:/(Windows 98|Win98)/,WINDOWS_CE:/Windows CE/,WINDOWS_2000:/(Windows NT 5.0|Windows 2000)/,WINDOWS_XP:/(Windows NT 5.1|Windows XP)/,WINDOWS_SERVER_2003:/Windows NT 5.2/,WINDOWS_VISTA:/Windows NT 6.0/,WINDOWS_7:/(Windows 7|Windows NT 6.1)/,WINDOWS_8_1:/(Windows 8.1|Windows NT 6.3)/,WINDOWS_8:/(Windows 8|Windows NT 6.2)/,WINDOWS_10:/(Windows NT 10.0)/,WINDOWS_PHONE_7_5:/(Windows Phone OS 7.5)/,WINDOWS_PHONE_8_1:/(Windows Phone 8.1)/,WINDOWS_PHONE_10:/(Windows Phone 10)/,WINDOWS_NT_4_0:{and:[/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/,{not:/Windows NT 10.0/}]}},k={CHROME:[/\bChrome\/([\d\.]+)\b/,/\bCriOS\/([\d\.]+)\b/],FIREFOX:/\bFirefox\/([\d\.]+)\b/,SAFARI:/\bVersion\/([\d\.]+)\b/,OPERA:[/\bVersion\/([\d\.]+)\b/,/\bOPR\/([\d\.]+)\b/],IE:[/\bMSIE ([\d\.]+\w?)\b/,/\brv:([\d\.]+\w?)\b/],MS_EDGE:/\bEdge\/([\d\.]+)\b/},l=Object.keys(k).reduce(function(a,b){return a[c[b]]=k[b],a},{}),m=a.navigator.userAgent,n={raw:{userAgent:m,os:{},browser:{},device:{}}};if(n.raw.os=Object.keys(d).reduce(function(a,b){return a[d[b]]=f.test(m,g[b]),a},{}),n.raw.browser=Object.keys(c).reduce(function(a,b){return a[c[b]]=f.test(m,h[b]),a},{}),n.raw.device=Object.keys(b).reduce(function(a,c){return a[b[c]]=f.test(m,i[c]),a},{}),n.raw.os_version=Object.keys(e).reduce(function(a,b){return a[e[b]]=f.test(m,j[b]),a},{}),n.os=[d.WINDOWS,d.IOS,d.MAC,d.ANDROID,d.LINUX,d.UNIX,d.FIREFOX_OS,d.CHROME_OS,d.WINDOWS_PHONE,d.PS4,d.VITA].reduce(function(a,b){return a===d.UNKNOWN&&n.raw.os[b]?b:a},d.UNKNOWN),n.browser=[c.CHROME,c.FIREFOX,c.SAFARI,c.OPERA,c.IE,c.MS_EDGE,c.PS4,c.VITA].reduce(function(a,b){return a===c.UNKNOWN&&n.raw.browser[b]?b:a},c.UNKNOWN),n.device=[b.ANDROID,b.I_PAD,b.IPHONE,b.I_POD,b.BLACKBERRY,b.FIREFOX_OS,b.CHROME_BOOK,b.WINDOWS_PHONE,b.PS4,b.VITA].reduce(function(a,c){return a===b.UNKNOWN&&n.raw.device[c]?c:a},b.UNKNOWN),n.os_version=[e.WINDOWS_3_11,e.WINDOWS_95,e.WINDOWS_ME,e.WINDOWS_98,e.WINDOWS_CE,e.WINDOWS_2000,e.WINDOWS_XP,e.WINDOWS_SERVER_2003,e.WINDOWS_VISTA,e.WINDOWS_7,e.WINDOWS_8_1,e.WINDOWS_8,e.WINDOWS_10,e.WINDOWS_PHONE_7_5,e.WINDOWS_PHONE_8_1,e.WINDOWS_PHONE_10,e.WINDOWS_NT_4_0].reduce(function(a,b){return a===e.UNKNOWN&&n.raw.os_version[b]?b:a},e.UNKNOWN),n.browser_version="0",n.browser!==c.UNKNOWN){var o=l[n.browser],p=f.exec(m,o);p&&(n.browser_version=p[1])}return n.isMobile=function(){return[b.ANDROID,b.I_PAD,b.IPHONE,b.I_POD,b.BLACKBERRY,b.FIREFOX_OS,b.WINDOWS_PHONE,b.VITA].some(function(a){return n.device==a})},n.isTablet=function(){return[b.I_PAD,b.FIREFOX_OS].some(function(a){return n.device==a})},n.isDesktop=function(){return[b.PS4,b.CHROME_BOOK,b.UNKNOWN].some(function(a){return n.device==a})},n}]).directive("deviceDetector",["deviceDetector",function(a){return{restrict:"A",link:function(b,c){c.addClass("os-"+a.os),c.addClass("browser-"+a.browser),c.addClass("device-"+a.device)}}}])}(angular),function(a,b){"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?module.exports=b():a.download=b()}(this,function(){return function a(b,c,d){function e(a){var b=a.split(/[:;,]/),c=b[1],d="base64"==b[2]?atob:decodeURIComponent,e=d(b.pop()),f=e.length,g=0,h=new Uint8Array(f);for(g;f>g;++g)h[g]=e.charCodeAt(g);return new p([h],{type:c})}function f(a,b){if("download"in n)return n.href=a,n.setAttribute("download",q),n.className="download-js-link",n.innerHTML="downloading...",n.style.display="none",document.body.appendChild(n),setTimeout(function(){n.click(),document.body.removeChild(n),b===!0&&setTimeout(function(){i.URL.revokeObjectURL(n.href)},250)},66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(a)&&(a="data:"+a.replace(/^data:([\w\/\-\+]+)/,j)),window.open(a)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=a),!0;var c=document.createElement("iframe");document.body.appendChild(c),!b&&/^data:/.test(a)&&(a="data:"+a.replace(/^data:([\w\/\-\+]+)/,j)),c.src=a,setTimeout(function(){document.body.removeChild(c)},333)}var g,h,i=window,j="application/octet-stream",k=d||j,l=b,m=!c&&!d&&l,n=document.createElement("a"),o=function(a){return String(a)},p=i.Blob||i.MozBlob||i.WebKitBlob||o,q=c||"download";if(p=p.call?p.bind(i):Blob,"true"===String(this)&&(l=[l,k],k=l[0],l=l[1]),m&&m.length<2048&&(q=m.split("/").pop().split("?")[0],n.href=m,-1!==n.href.indexOf(m))){var r=new XMLHttpRequest;return r.open("GET",m,!0),r.responseType="blob",r.onload=function(b){a(b.target.response,q,j)},setTimeout(function(){r.send()},0),r}if(/^data\:[\w+\-]+\/[\w+\-\.]+[,;]/.test(l)){if(!(l.length>2096103.424&&p!==o))return navigator.msSaveBlob?navigator.msSaveBlob(e(l),q):f(l);l=e(l),k=l.type||j}else if(/([\x80-\xff])/.test(l)){var s=0,t=new Uint8Array(l.length),u=t.length;for(s;u>s;++s)t[s]=l.charCodeAt(s);l=new p([t],{type:k})}if(g=l instanceof p?l:new p([l],{type:k}),navigator.msSaveBlob)return navigator.msSaveBlob(g,q);if(i.URL)f(i.URL.createObjectURL(g),!0);else{if("string"==typeof g||g.constructor===o)try{return f("data:"+k+";base64,"+i.btoa(g))}catch(v){return f("data:"+k+","+encodeURIComponent(g))}h=new FileReader,h.onload=function(a){f(this.result)},h.readAsDataURL(g)}return!0}});