403Webshell
Server IP : 85.158.181.41  /  Your IP : 216.73.217.12
Web Server : Apache
System : Linux cloud9-vm129 6.1.178+1-ph #ph SMP PREEMPT_DYNAMIC Wed Jul 29 09:00:54 UTC 2026 x86_64
User : moncbefd ( 1024)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/moncbefd/www.moneta.at/StyleEdit3/assets/javascript/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/moncbefd/www.moneta.at/StyleEdit3/assets/javascript/vendor.min.js
if(Date.CultureInfo={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence)/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od(ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)?s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|utc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i},timezones:[{name:"UTC",offset:"-000"},{name:"GMT",offset:"-000"},{name:"EST",offset:"-0500"},{name:"EDT",offset:"-0400"},{name:"CST",offset:"-0600"},{name:"CDT",offset:"-0500"},{name:"MST",offset:"-0700"},{name:"MDT",offset:"-0600"},{name:"PST",offset:"-0800"},{name:"PDT",offset:"-0700"}]},function(){var t=Date,e=t.prototype,i=t.CultureInfo,n=function(t,e){return e||(e=2),("000"+t).slice(e*-1)};e.clearTime=function(){return this.setHours(0),this.setMinutes(0),this.setSeconds(0),this.setMilliseconds(0),this},e.setTimeToNow=function(){var t=new Date;return this.setHours(t.getHours()),this.setMinutes(t.getMinutes()),this.setSeconds(t.getSeconds()),this.setMilliseconds(t.getMilliseconds()),this},t.today=function(){return(new Date).clearTime()},t.compare=function(t,e){if(isNaN(t)||isNaN(e))throw new Error(t+" - "+e);if(t instanceof Date&&e instanceof Date)return t<e?-1:t>e?1:0;throw new TypeError(t+" - "+e)},t.equals=function(t,e){return 0===t.compareTo(e)},t.getDayNumberFromName=function(t){for(var e=i.dayNames,n=i.abbreviatedDayNames,r=i.shortestDayNames,o=t.toLowerCase(),s=0;s<e.length;s++)if(e[s].toLowerCase()==o||n[s].toLowerCase()==o||r[s].toLowerCase()==o)return s;return-1},t.getMonthNumberFromName=function(t){for(var e=i.monthNames,n=i.abbreviatedMonthNames,r=t.toLowerCase(),o=0;o<e.length;o++)if(e[o].toLowerCase()==r||n[o].toLowerCase()==r)return o;return-1},t.isLeapYear=function(t){return t%4===0&&t%100!==0||t%400===0},t.getDaysInMonth=function(e,i){return[31,t.isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31][i]},t.getTimezoneAbbreviation=function(t){for(var e=i.timezones,n=0;n<e.length;n++)if(e[n].offset===t)return e[n].name;return null},t.getTimezoneOffset=function(t){for(var e=i.timezones,n=0;n<e.length;n++)if(e[n].name===t.toUpperCase())return e[n].offset;return null},e.clone=function(){return new Date(this.getTime())},e.compareTo=function(t){return Date.compare(this,t)},e.equals=function(t){return Date.equals(this,t||new Date)},e.between=function(t,e){return this.getTime()>=t.getTime()&&this.getTime()<=e.getTime()},e.isAfter=function(t){return 1===this.compareTo(t||new Date)},e.isBefore=function(t){return this.compareTo(t||new Date)===-1},e.isToday=function(){return this.isSameDay(new Date)},e.isSameDay=function(t){return this.clone().clearTime().equals(t.clone().clearTime())},e.addMilliseconds=function(t){return this.setMilliseconds(this.getMilliseconds()+t),this},e.addSeconds=function(t){return this.addMilliseconds(1e3*t)},e.addMinutes=function(t){return this.addMilliseconds(6e4*t)},e.addHours=function(t){return this.addMilliseconds(36e5*t)},e.addDays=function(t){return this.setDate(this.getDate()+t),this},e.addWeeks=function(t){return this.addDays(7*t)},e.addMonths=function(e){var i=this.getDate();return this.setDate(1),this.setMonth(this.getMonth()+e),this.setDate(Math.min(i,t.getDaysInMonth(this.getFullYear(),this.getMonth()))),this},e.addYears=function(t){return this.addMonths(12*t)},e.add=function(t){if("number"==typeof t)return this._orient=t,this;var e=t;return e.milliseconds&&this.addMilliseconds(e.milliseconds),e.seconds&&this.addSeconds(e.seconds),e.minutes&&this.addMinutes(e.minutes),e.hours&&this.addHours(e.hours),e.weeks&&this.addWeeks(e.weeks),e.months&&this.addMonths(e.months),e.years&&this.addYears(e.years),e.days&&this.addDays(e.days),this};var r,o,s;e.getWeek=function(){var t,e,i,n,a,l,c,u,h,d;return r=r?r:this.getFullYear(),o=o?o:this.getMonth()+1,s=s?s:this.getDate(),o<=2?(t=r-1,e=(t/4|0)-(t/100|0)+(t/400|0),i=((t-1)/4|0)-((t-1)/100|0)+((t-1)/400|0),h=e-i,a=0,l=s-1+31*(o-1)):(t=r,e=(t/4|0)-(t/100|0)+(t/400|0),i=((t-1)/4|0)-((t-1)/100|0)+((t-1)/400|0),h=e-i,a=h+1,l=s+(153*(o-3)+2)/5+58+h),c=(t+e)%7,n=(l+c-a)%7,u=l+3-n|0,d=u<0?53-((c-h)/5|0):u>364+h?1:(u/7|0)+1,r=o=s=null,d},e.getISOWeek=function(){return r=this.getUTCFullYear(),o=this.getUTCMonth()+1,s=this.getUTCDate(),n(this.getWeek())},e.setWeek=function(t){return this.moveToDayOfWeek(1).addWeeks(t-this.getWeek())},t._validate=function(t,e,i,n){if("undefined"==typeof t)return!1;if("number"!=typeof t)throw new TypeError(t+" is not a Number.");if(t<e||t>i)throw new RangeError(t+" is not a valid value for "+n+".");return!0},t.validateMillisecond=function(e){return t._validate(e,0,999,"millisecond")},t.validateSecond=function(e){return t._validate(e,0,59,"second")},t.validateMinute=function(e){return t._validate(e,0,59,"minute")},t.validateHour=function(e){return t._validate(e,0,23,"hour")},t.validateDay=function(e,i,n){return t._validate(e,1,t.getDaysInMonth(i,n),"day")},t.validateMonth=function(e){return t._validate(e,0,11,"month")},t.validateYear=function(e){return t._validate(e,0,9999,"year")},e.set=function(e){return t.validateMillisecond(e.millisecond)&&this.addMilliseconds(e.millisecond-this.getMilliseconds()),t.validateSecond(e.second)&&this.addSeconds(e.second-this.getSeconds()),t.validateMinute(e.minute)&&this.addMinutes(e.minute-this.getMinutes()),t.validateHour(e.hour)&&this.addHours(e.hour-this.getHours()),t.validateMonth(e.month)&&this.addMonths(e.month-this.getMonth()),t.validateYear(e.year)&&this.addYears(e.year-this.getFullYear()),t.validateDay(e.day,this.getFullYear(),this.getMonth())&&this.addDays(e.day-this.getDate()),e.timezone&&this.setTimezone(e.timezone),e.timezoneOffset&&this.setTimezoneOffset(e.timezoneOffset),e.week&&t._validate(e.week,0,53,"week")&&this.setWeek(e.week),this},e.moveToFirstDayOfMonth=function(){return this.set({day:1})},e.moveToLastDayOfMonth=function(){return this.set({day:t.getDaysInMonth(this.getFullYear(),this.getMonth())})},e.moveToNthOccurrence=function(t,e){var i=0;if(e>0)i=e-1;else if(e===-1)return this.moveToLastDayOfMonth(),this.getDay()!==t&&this.moveToDayOfWeek(t,-1),this;return this.moveToFirstDayOfMonth().addDays(-1).moveToDayOfWeek(t,1).addWeeks(i)},e.moveToDayOfWeek=function(t,e){var i=(t-this.getDay()+7*(e||1))%7;return this.addDays(0===i?i+=7*(e||1):i)},e.moveToMonth=function(t,e){var i=(t-this.getMonth()+12*(e||1))%12;return this.addMonths(0===i?i+=12*(e||1):i)},e.getOrdinalNumber=function(){return Math.ceil((this.clone().clearTime()-new Date(this.getFullYear(),0,1))/864e5)+1},e.getTimezone=function(){return t.getTimezoneAbbreviation(this.getUTCOffset())},e.setTimezoneOffset=function(t){var e=this.getTimezoneOffset(),i=Number(t)*-6/10;return this.addMinutes(i-e)},e.setTimezone=function(e){return this.setTimezoneOffset(t.getTimezoneOffset(e))},e.hasDaylightSavingTime=function(){return Date.today().set({month:0,day:1}).getTimezoneOffset()!==Date.today().set({month:6,day:1}).getTimezoneOffset()},e.isDaylightSavingTime=function(){return this.hasDaylightSavingTime()&&(new Date).getTimezoneOffset()===Date.today().set({month:6,day:1}).getTimezoneOffset()},e.getUTCOffset=function(){var t,e=this.getTimezoneOffset()*-10/6;return e<0?(t=(e-1e4).toString(),t.charAt(0)+t.substr(2)):(t=(e+1e4).toString(),"+"+t.substr(1))},e.getElapsed=function(t){return(t||new Date)-this},e.toISOString||(e.toISOString=function(){function t(t){return t<10?"0"+t:t}return'"'+this.getUTCFullYear()+"-"+t(this.getUTCMonth()+1)+"-"+t(this.getUTCDate())+"T"+t(this.getUTCHours())+":"+t(this.getUTCMinutes())+":"+t(this.getUTCSeconds())+'Z"'}),e._toString=e.toString,e.toString=function(t){var e=this;if(t&&1==t.length){var r=i.formatPatterns;switch(e.t=e.toString,t){case"d":return e.t(r.shortDate);case"D":return e.t(r.longDate);case"F":return e.t(r.fullDateTime);case"m":return e.t(r.monthDay);case"r":return e.t(r.rfc1123);case"s":return e.t(r.sortableDateTime);case"t":return e.t(r.shortTime);case"T":return e.t(r.longTime);case"u":return e.t(r.universalSortableDateTime);case"y":return e.t(r.yearMonth)}}var o=function(t){switch(1*t){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};return t?t.replace(/(\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S)/g,function(t){if("\\"===t.charAt(0))return t.replace("\\","");switch(e.h=e.getHours,t){case"hh":return n(e.h()<13?0===e.h()?12:e.h():e.h()-12);case"h":return e.h()<13?0===e.h()?12:e.h():e.h()-12;case"HH":return n(e.h());case"H":return e.h();case"mm":return n(e.getMinutes());case"m":return e.getMinutes();case"ss":return n(e.getSeconds());case"s":return e.getSeconds();case"yyyy":return n(e.getFullYear(),4);case"yy":return n(e.getFullYear());case"dddd":return i.dayNames[e.getDay()];case"ddd":return i.abbreviatedDayNames[e.getDay()];case"dd":return n(e.getDate());case"d":return e.getDate();case"MMMM":return i.monthNames[e.getMonth()];case"MMM":return i.abbreviatedMonthNames[e.getMonth()];case"MM":return n(e.getMonth()+1);case"M":return e.getMonth()+1;case"t":return e.h()<12?i.amDesignator.substring(0,1):i.pmDesignator.substring(0,1);case"tt":return e.h()<12?i.amDesignator:i.pmDesignator;case"S":return o(e.getDate());default:return t}}):this._toString()}}(),function(){var t=Date,e=t.prototype,i=t.CultureInfo,n=Number.prototype;e._orient=1,e._nth=null,e._is=!1,e._same=!1,e._isSecond=!1,n._dateElement="day",e.next=function(){return this._orient=1,this},t.next=function(){return t.today().next()},e.last=e.prev=e.previous=function(){return this._orient=-1,this},t.last=t.prev=t.previous=function(){return t.today().last()},e.is=function(){return this._is=!0,this},e.same=function(){return this._same=!0,this._isSecond=!1,this},e.today=function(){return this.same().day()},e.weekday=function(){return!!this._is&&(this._is=!1,!this.is().sat()&&!this.is().sun())},e.at=function(e){return"string"==typeof e?t.parse(this.toString("d")+" "+e):this.set(e)},n.fromNow=n.after=function(t){var e={};return e[this._dateElement]=this,(t?t.clone():new Date).add(e)},n.ago=n.before=function(t){var e={};return e[this._dateElement]=this*-1,(t?t.clone():new Date).add(e)};var r,o="sunday monday tuesday wednesday thursday friday saturday".split(/\s/),s="january february march april may june july august september october november december".split(/\s/),a="Millisecond Second Minute Hour Day Week Month Year".split(/\s/),l="Milliseconds Seconds Minutes Hours Date Week Month FullYear".split(/\s/),c="final first second third fourth fifth".split(/\s/);e.toObject=function(){for(var t={},e=0;e<a.length;e++)t[a[e].toLowerCase()]=this["get"+l[e]]();return t},t.fromObject=function(t){return t.week=null,Date.today().set(t)};for(var u=function(e){return function(){if(this._is)return this._is=!1,this.getDay()==e;if(null!==this._nth){this._isSecond&&this.addSeconds(this._orient*-1),this._isSecond=!1;var i=this._nth;this._nth=null;var n=this.clone().moveToLastDayOfMonth();if(this.moveToNthOccurrence(e,i),this>n)throw new RangeError(t.getDayName(e)+" does not occur "+i+" times in the month of "+t.getMonthName(n.getMonth())+" "+n.getFullYear()+".");return this}return this.moveToDayOfWeek(e,this._orient)}},h=function(e){return function(){var n=t.today(),r=e-n.getDay();return 0===e&&1===i.firstDayOfWeek&&0!==n.getDay()&&(r+=7),n.addDays(r)}},d=0;d<o.length;d++)t[o[d].toUpperCase()]=t[o[d].toUpperCase().substring(0,3)]=d,t[o[d]]=t[o[d].substring(0,3)]=h(d),e[o[d]]=e[o[d].substring(0,3)]=u(d);for(var p=function(t){return function(){return this._is?(this._is=!1,this.getMonth()===t):this.moveToMonth(t,this._orient)}},f=function(e){return function(){return t.today().set({month:e,day:1})}},g=0;g<s.length;g++)t[s[g].toUpperCase()]=t[s[g].toUpperCase().substring(0,3)]=g,t[s[g]]=t[s[g].substring(0,3)]=f(g),e[s[g]]=e[s[g].substring(0,3)]=p(g);for(var m=function(t){return function(){if(this._isSecond)return this._isSecond=!1,this;if(this._same){this._same=this._is=!1;for(var e=this.toObject(),i=(arguments[0]||new Date).toObject(),n="",r=t.toLowerCase(),o=a.length-1;o>-1;o--){if(n=a[o].toLowerCase(),e[n]!=i[n])return!1;if(r==n)break}return!0}return"s"!=t.substring(t.length-1)&&(t+="s"),this["add"+t](this._orient)}},v=function(t){return function(){return this._dateElement=t,this}},y=0;y<a.length;y++)r=a[y].toLowerCase(),e[r]=e[r+"s"]=m(a[y]),n[r]=n[r+"s"]=v(r);e._ss=m("Second");for(var b=function(t){return function(e){return this._same?this._ss(arguments[0]):e||0===e?this.moveToNthOccurrence(e,t):(this._nth=t,2!==t||void 0!==e&&null!==e?this:(this._isSecond=!0,this.addSeconds(this._orient)))}},w=0;w<c.length;w++)e[c[w]]=b(0===w?-1:w)}(),function(){Date.Parsing={Exception:function(t){this.message="Parse error at '"+t.substring(0,10)+" ...'"}};for(var t=Date.Parsing,e=t.Operators={rtoken:function(e){return function(i){var n=i.match(e);if(n)return[n[0],i.substring(n[0].length)];throw new t.Exception(i)}},token:function(t){return function(t){return e.rtoken(new RegExp("^s*"+t+"s*"))(t)}},stoken:function(t){return e.rtoken(new RegExp("^"+t))},until:function(t){return function(e){for(var i=[],n=null;e.length;){try{n=t.call(this,e)}catch(r){i.push(n[0]),e=n[1];continue}break}return[i,e]}},many:function(t){return function(e){for(var i=[],n=null;e.length;){try{n=t.call(this,e)}catch(r){return[i,e]}i.push(n[0]),e=n[1]}return[i,e]}},optional:function(t){return function(e){var i=null;try{i=t.call(this,e)}catch(n){return[null,e]}return[i[0],i[1]]}},not:function(e){return function(i){try{e.call(this,i)}catch(n){return[null,i]}throw new t.Exception(i)}},ignore:function(t){return t?function(e){var i=null;return i=t.call(this,e),[null,i[1]]}:null},product:function(){for(var t=arguments[0],i=Array.prototype.slice.call(arguments,1),n=[],r=0;r<t.length;r++)n.push(e.each(t[r],i));return n},cache:function(e){var i={},n=null;return function(r){try{n=i[r]=i[r]||e.call(this,r)}catch(o){n=i[r]=o}if(n instanceof t.Exception)throw n;return n}},any:function(){var e=arguments;return function(i){for(var n=null,r=0;r<e.length;r++)if(null!=e[r]){try{n=e[r].call(this,i)}catch(o){n=null}if(n)return n}throw new t.Exception(i)}},each:function(){var e=arguments;return function(i){for(var n=[],r=null,o=0;o<e.length;o++)if(null!=e[o]){try{r=e[o].call(this,i)}catch(s){throw new t.Exception(i)}n.push(r[0]),i=r[1]}return[n,i]}},all:function(){var t=arguments,e=e;return e.each(e.optional(t))},sequence:function(i,n,r){return n=n||e.rtoken(/^\s*/),r=r||null,1==i.length?i[0]:function(e){for(var o=null,s=null,a=[],l=0;l<i.length;l++){try{o=i[l].call(this,e)}catch(c){break}a.push(o[0]);try{s=n.call(this,o[1])}catch(u){s=null;break}e=s[1]}if(!o)throw new t.Exception(e);if(s)throw new t.Exception(s[1]);if(r)try{o=r.call(this,o[1])}catch(h){throw new t.Exception(o[1])}return[a,o?o[1]:e]}},between:function(t,i,n){n=n||t;var o=e.each(e.ignore(t),i,e.ignore(n));return function(t){var e=o.call(this,t);return[[e[0][0],r[0][2]],e[1]]}},list:function(t,i,n){return i=i||e.rtoken(/^\s*/),n=n||null,t instanceof Array?e.each(e.product(t.slice(0,-1),e.ignore(i)),t.slice(-1),e.ignore(n)):e.each(e.many(e.each(t,e.ignore(i))),px,e.ignore(n))},set:function(i,n,r){return n=n||e.rtoken(/^\s*/),r=r||null,function(o){for(var s=null,a=null,l=null,c=null,u=[[],o],h=!1,d=0;d<i.length;d++){l=null,a=null,s=null,h=1==i.length;try{s=i[d].call(this,o)}catch(p){continue}if(c=[[s[0]],s[1]],s[1].length>0&&!h)try{l=n.call(this,s[1])}catch(f){h=!0}else h=!0;if(h||0!==l[1].length||(h=!0),!h){for(var g=[],m=0;m<i.length;m++)d!=m&&g.push(i[m]);a=e.set(g,n).call(this,l[1]),a[0].length>0&&(c[0]=c[0].concat(a[0]),c[1]=a[1])}if(c[1].length<u[1].length&&(u=c),0===u[1].length)break}if(0===u[0].length)return u;if(r){try{l=r.call(this,u[1])}catch(v){throw new t.Exception(u[1])}u[1]=l[1]}return u}},forward:function(t,e){return function(i){return t[e].call(this,i)}},replace:function(t,e){return function(i){var n=t.call(this,i);return[e,n[1]]}},process:function(t,e){return function(i){var n=t.call(this,i);return[e.call(this,n[0]),n[1]]}},min:function(e,i){return function(n){var r=i.call(this,n);if(r[0].length<e)throw new t.Exception(n);return r}}},i=function(t){return function(){var e=null,i=[];if(arguments.length>1?e=Array.prototype.slice.call(arguments):arguments[0]instanceof Array&&(e=arguments[0]),!e)return t.apply(null,arguments);for(var n=0,r=e.shift();n<r.length;n++)return e.unshift(r[n]),i.push(t.apply(null,e)),e.shift(),i}},n="optional not ignore cache".split(/\s/),o=0;o<n.length;o++)e[n[o]]=i(e[n[o]]);for(var s=function(t){return function(){return arguments[0]instanceof Array?t.apply(null,arguments[0]):t.apply(null,arguments)}},a="each any all".split(/\s/),l=0;l<a.length;l++)e[a[l]]=s(e[a[l]])}(),function(){var t=Date,e=(t.prototype,t.CultureInfo),i=function(t){for(var e=[],n=0;n<t.length;n++)t[n]instanceof Array?e=e.concat(i(t[n])):t[n]&&e.push(t[n]);return e};t.Grammar={},t.Translator={hour:function(t){return function(){this.hour=Number(t)}},minute:function(t){return function(){this.minute=Number(t)}},second:function(t){return function(){this.second=Number(t)}},meridian:function(t){return function(){this.meridian=t.slice(0,1).toLowerCase()}},timezone:function(t){return function(){var e=t.replace(/[^\d\+\-]/g,"");e.length?this.timezoneOffset=Number(e):this.timezone=t.toLowerCase()}},day:function(t){var e=t[0];return function(){this.day=Number(e.match(/\d+/)[0])}},month:function(t){return function(){this.month=3==t.length?"jan feb mar apr may jun jul aug sep oct nov dec".indexOf(t)/4:Number(t)-1}},year:function(t){return function(){var i=Number(t);this.year=t.length>2?i:i+(i+2e3<e.twoDigitYearMax?2e3:1900)}},rday:function(t){return function(){switch(t){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0,this.now=!0}}},finishExact:function(e){e=e instanceof Array?e:[e];for(var i=0;i<e.length;i++)e[i]&&e[i].call(this);var n=new Date;if(!this.hour&&!this.minute||this.month||this.year||this.day||(this.day=n.getDate()),this.year||(this.year=n.getFullYear()),this.month||0===this.month||(this.month=n.getMonth()),this.day||(this.day=1),this.hour||(this.hour=0),this.minute||(this.minute=0),this.second||(this.second=0),this.meridian&&this.hour&&("p"==this.meridian&&this.hour<12?this.hour=this.hour+12:"a"==this.meridian&&12==this.hour&&(this.hour=0)),this.day>t.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);return this.timezone?r.set({timezone:this.timezone}):this.timezoneOffset&&r.set({timezoneOffset:this.timezoneOffset}),r},finish:function(e){if(e=e instanceof Array?i(e):[e],0===e.length)return null;for(var n=0;n<e.length;n++)"function"==typeof e[n]&&e[n].call(this);var r=t.today();if(this.now&&!this.unit&&!this.operator)return new Date;this.now&&(r=new Date);var o,s,a,l=!!(this.days&&null!==this.days||this.orient||this.operator);if(a="past"==this.orient||"subtract"==this.operator?-1:1,this.now||"hour minute second".indexOf(this.unit)==-1||r.setTimeToNow(),(this.month||0===this.month)&&"year day hour minute second".indexOf(this.unit)!=-1&&(this.value=this.month+1,this.month=null,l=!0),!l&&this.weekday&&!this.day&&!this.days){var c=Date[this.weekday]();this.day=c.getDate(),this.month||(this.month=c.getMonth()),this.year=c.getFullYear()}if(l&&this.weekday&&"month"!=this.unit&&(this.unit="day",o=t.getDayNumberFromName(this.weekday)-r.getDay(),s=7,this.days=o?(o+a*s)%s:a*s),this.month&&"day"==this.unit&&this.operator&&(this.value=this.month+1,this.month=null),null!=this.value&&null!=this.month&&null!=this.year&&(this.day=1*this.value),this.month&&!this.day&&this.value&&(r.set({day:1*this.value}),l||(this.day=1*this.value)),this.month||!this.value||"month"!=this.unit||this.now||(this.month=this.value,l=!0),l&&(this.month||0===this.month)&&"year"!=this.unit&&(this.unit="month",o=this.month-r.getMonth(),s=12,this.months=o?(o+a*s)%s:a*s,this.month=null),this.unit||(this.unit="day"),!this.value&&this.operator&&null!==this.operator&&this[this.unit+"s"]&&null!==this[this.unit+"s"]?this[this.unit+"s"]=this[this.unit+"s"]+("add"==this.operator?1:-1)+(this.value||0)*a:null!=this[this.unit+"s"]&&null==this.operator||(this.value||(this.value=1),this[this.unit+"s"]=this.value*a),this.meridian&&this.hour&&("p"==this.meridian&&this.hour<12?this.hour=this.hour+12:"a"==this.meridian&&12==this.hour&&(this.hour=0)),this.weekday&&!this.day&&!this.days){var c=Date[this.weekday]();this.day=c.getDate(),c.getMonth()!==r.getMonth()&&(this.month=c.getMonth())}return!this.month&&0!==this.month||this.day||(this.day=1),this.orient||this.operator||"week"!=this.unit||!this.value||this.day||this.month?(l&&this.timezone&&this.day&&this.days&&(this.day=this.days),l?r.add(this):r.set(this)):Date.today().setWeek(this.value)}};var n,r=t.Parsing.Operators,o=t.Grammar,s=t.Translator;o.datePartDelimiter=r.rtoken(/^([\s\-\.\,\/\x27]+)/),o.timePartDelimiter=r.stoken(":"),o.whiteSpace=r.rtoken(/^\s*/),o.generalDelimiter=r.rtoken(/^(([\s\,]|at|@|on)+)/);var a={};o.ctoken=function(t){var i=a[t];if(!i){for(var n=e.regexPatterns,o=t.split(/\s+/),s=[],l=0;l<o.length;l++)s.push(r.replace(r.rtoken(n[o[l]]),o[l]));i=a[t]=r.any.apply(null,s)}return i},o.ctoken2=function(t){return r.rtoken(e.regexPatterns[t])},o.h=r.cache(r.process(r.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),s.hour)),o.hh=r.cache(r.process(r.rtoken(/^(0[0-9]|1[0-2])/),s.hour)),o.H=r.cache(r.process(r.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),s.hour)),o.HH=r.cache(r.process(r.rtoken(/^([0-1][0-9]|2[0-3])/),s.hour)),o.m=r.cache(r.process(r.rtoken(/^([0-5][0-9]|[0-9])/),s.minute)),o.mm=r.cache(r.process(r.rtoken(/^[0-5][0-9]/),s.minute)),o.s=r.cache(r.process(r.rtoken(/^([0-5][0-9]|[0-9])/),s.second)),o.ss=r.cache(r.process(r.rtoken(/^[0-5][0-9]/),s.second)),o.hms=r.cache(r.sequence([o.H,o.m,o.s],o.timePartDelimiter)),o.t=r.cache(r.process(o.ctoken2("shortMeridian"),s.meridian)),o.tt=r.cache(r.process(o.ctoken2("longMeridian"),s.meridian)),o.z=r.cache(r.process(r.rtoken(/^((\+|\-)\s*\d\d\d\d)|((\+|\-)\d\d\:?\d\d)/),s.timezone)),o.zz=r.cache(r.process(r.rtoken(/^((\+|\-)\s*\d\d\d\d)|((\+|\-)\d\d\:?\d\d)/),s.timezone)),o.zzz=r.cache(r.process(o.ctoken2("timezone"),s.timezone)),o.timeSuffix=r.each(r.ignore(o.whiteSpace),r.set([o.tt,o.zzz])),o.time=r.each(r.optional(r.ignore(r.stoken("T"))),o.hms,o.timeSuffix),o.d=r.cache(r.process(r.each(r.rtoken(/^([0-2]\d|3[0-1]|\d)/),r.optional(o.ctoken2("ordinalSuffix"))),s.day)),o.dd=r.cache(r.process(r.each(r.rtoken(/^([0-2]\d|3[0-1])/),r.optional(o.ctoken2("ordinalSuffix"))),s.day)),o.ddd=o.dddd=r.cache(r.process(o.ctoken("sun mon tue wed thu fri sat"),function(t){return function(){this.weekday=t}})),o.M=r.cache(r.process(r.rtoken(/^(1[0-2]|0\d|\d)/),s.month)),o.MM=r.cache(r.process(r.rtoken(/^(1[0-2]|0\d)/),s.month)),o.MMM=o.MMMM=r.cache(r.process(o.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),s.month)),o.y=r.cache(r.process(r.rtoken(/^(\d\d?)/),s.year)),o.yy=r.cache(r.process(r.rtoken(/^(\d\d)/),s.year)),o.yyy=r.cache(r.process(r.rtoken(/^(\d\d?\d?\d?)/),s.year)),o.yyyy=r.cache(r.process(r.rtoken(/^(\d\d\d\d)/),s.year)),n=function(){return r.each(r.any.apply(null,arguments),r.not(o.ctoken2("timeContext")))},o.day=n(o.d,o.dd),o.month=n(o.M,o.MMM),o.year=n(o.yyyy,o.yy),o.orientation=r.process(o.ctoken("past future"),function(t){return function(){this.orient=t}}),o.operator=r.process(o.ctoken("add subtract"),function(t){return function(){this.operator=t}}),o.rday=r.process(o.ctoken("yesterday tomorrow today now"),s.rday),o.unit=r.process(o.ctoken("second minute hour day week month year"),function(t){return function(){this.unit=t}}),o.value=r.process(r.rtoken(/^\d\d?(st|nd|rd|th)?/),function(t){return function(){this.value=t.replace(/\D/g,"")}}),o.expression=r.set([o.rday,o.operator,o.value,o.unit,o.orientation,o.ddd,o.MMM]),n=function(){return r.set(arguments,o.datePartDelimiter)},o.mdy=n(o.ddd,o.month,o.day,o.year),o.ymd=n(o.ddd,o.year,o.month,o.day),o.dmy=n(o.ddd,o.day,o.month,o.year),o.date=function(t){return(o[e.dateElementOrder]||o.mdy).call(this,t)},o.format=r.process(r.many(r.any(r.process(r.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(e){if(o[e])return o[e];throw t.Parsing.Exception(e)}),r.process(r.rtoken(/^[^dMyhHmstz]+/),function(t){return r.ignore(r.stoken(t))}))),function(t){return r.process(r.each.apply(null,t),s.finishExact)});var l={},c=function(t){return l[t]=l[t]||o.format(t)[0]};o.formats=function(t){if(t instanceof Array){for(var e=[],i=0;i<t.length;i++)e.push(c(t[i]));return r.any.apply(null,e)}return c(t)},o._formats=o.formats(['"yyyy-MM-ddTHH:mm:ssZ"',"yyyy-MM-ddTHH:mm:ssZ","yyyy-MM-ddTHH:mm:ssz","yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mmZ","yyyy-MM-ddTHH:mmz","yyyy-MM-ddTHH:mm","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","MMddyyyy","ddMMyyyy","Mddyyyy","ddMyyyy","Mdyyyy","dMyyyy","yyyy","Mdyy","dMyy","d"]),o._start=r.process(r.set([o.date,o.time,o.expression],o.generalDelimiter,o.whiteSpace),s.finish),o.start=function(t){try{var e=o._formats.call({},t);if(0===e[1].length)return e}catch(i){}return o._start.call({},t)},t._parse=t.parse,t.parse=function(e){var i=null;if(!e)return null;if(e instanceof Date)return e;try{i=t.Grammar.start.call({},e.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1"))}catch(n){return null}return 0===i[1].length?i[0]:null},t.getParseFunction=function(e){var i=t.Grammar.formats(e);return function(t){var e=null;try{e=i.call({},t)}catch(n){return null}return 0===e[1].length?e[0]:null}},t.parseExact=function(e,i){return t.getParseFunction(i)(e)}}(),function(t,e){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){"use strict";function i(t,e,i){i=i||lt;var n,r,o=i.createElement("script");if(o.text=t,e)for(n in xt)r=e[n]||e.getAttribute&&e.getAttribute(n),r&&o.setAttribute(n,r);i.head.appendChild(o).parentNode.removeChild(o)}function n(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?ft[gt.call(t)]||"object":typeof t}function r(t){var e=!!t&&"length"in t&&t.length,i=n(t);return!wt(t)&&!_t(t)&&("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t)}function o(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}function s(t,e,i){return wt(e)?Ct.grep(t,function(t,n){return!!e.call(t,n,t)!==i}):e.nodeType?Ct.grep(t,function(t){return t===e!==i}):"string"!=typeof e?Ct.grep(t,function(t){return pt.call(e,t)>-1!==i}):Ct.filter(e,t,i)}function a(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function l(t){var e={};return Ct.each(t.match(Ht)||[],function(t,i){e[i]=!0}),e}function c(t){return t}function u(t){throw t}function h(t,e,i,n){var r;try{t&&wt(r=t.promise)?r.call(t).done(e).fail(i):t&&wt(r=t.then)?r.call(t,e,i):e.apply(void 0,[t].slice(n))}catch(t){i.apply(void 0,[t])}}function d(){lt.removeEventListener("DOMContentLoaded",d),t.removeEventListener("load",d),Ct.ready()}function p(t,e){return e.toUpperCase()}function f(t){return t.replace(Ft,"ms-").replace(jt,p)}function g(){this.expando=Ct.expando+g.uid++}function m(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:Yt.test(t)?JSON.parse(t):t)}function v(t,e,i){var n;if(void 0===i&&1===t.nodeType)if(n="data-"+e.replace(Ut,"-$&").toLowerCase(),i=t.getAttribute(n),"string"==typeof i){try{i=m(i)}catch(r){}qt.set(t,e,i)}else i=void 0;return i}function y(t,e,i,n){var r,o,s=20,a=n?function(){return n.cur()}:function(){return Ct.css(t,e,"")},l=a(),c=i&&i[3]||(Ct.cssNumber[e]?"":"px"),u=t.nodeType&&(Ct.cssNumber[e]||"px"!==c&&+l)&&Kt.exec(Ct.css(t,e));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;s--;)Ct.style(t,e,u+c),(1-o)*(1-(o=a()/l||.5))<=0&&(s=0),u/=o;u=2*u,Ct.style(t,e,u+c),i=i||[]}return i&&(u=+u||+l||0,r=i[1]?u+(i[1]+1)*i[2]:+i[2],n&&(n.unit=c,n.start=u,n.end=r)),r}function b(t){var e,i=t.ownerDocument,n=t.nodeName,r=ee[n];return r?r:(e=i.body.appendChild(i.createElement(n)),r=Ct.css(e,"display"),e.parentNode.removeChild(e),"none"===r&&(r="block"),ee[n]=r,r)}function w(t,e){for(var i,n,r=[],o=0,s=t.length;o<s;o++)n=t[o],n.style&&(i=n.style.display,e?("none"===i&&(r[o]=$t.get(n,"display")||null,r[o]||(n.style.display="")),""===n.style.display&&Jt(n)&&(r[o]=b(n))):"none"!==i&&(r[o]="none",$t.set(n,"display",i)));for(o=0;o<s;o++)null!=r[o]&&(t[o].style.display=r[o]);return t}function _(t,e){var i;return i="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&o(t,e)?Ct.merge([t],i):i}function x(t,e){for(var i=0,n=t.length;i<n;i++)$t.set(t[i],"globalEval",!e||$t.get(e[i],"globalEval"))}function k(t,e,i,r,o){for(var s,a,l,c,u,h,d=e.createDocumentFragment(),p=[],f=0,g=t.length;f<g;f++)if(s=t[f],s||0===s)if("object"===n(s))Ct.merge(p,s.nodeType?[s]:s);else if(se.test(s)){for(a=a||d.appendChild(e.createElement("div")),l=(ne.exec(s)||["",""])[1].toLowerCase(),c=oe[l]||oe._default,a.innerHTML=c[1]+Ct.htmlPrefilter(s)+c[2],h=c[0];h--;)a=a.lastChild;Ct.merge(p,a.childNodes),a=d.firstChild,a.textContent=""}else p.push(e.createTextNode(s));for(d.textContent="",f=0;s=p[f++];)if(r&&Ct.inArray(s,r)>-1)o&&o.push(s);else if(u=Qt(s),a=_(d.appendChild(s),"script"),u&&x(a),i)for(h=0;s=a[h++];)re.test(s.type||"")&&i.push(s);return d}function C(){return!0}function T(){return!1}function S(t,e){return t===D()==("focus"===e)}function D(){try{return lt.activeElement}catch(t){}}function M(t,e,i,n,r,o){var s,a;if("object"==typeof e){"string"!=typeof i&&(n=n||i,i=void 0);for(a in e)M(t,a,i,n,e[a],o);return t}if(null==n&&null==r?(r=i,n=i=void 0):null==r&&("string"==typeof i?(r=n,n=void 0):(r=n,n=i,i=void 0)),r===!1)r=T;else if(!r)return t;return 1===o&&(s=r,r=function(t){return Ct().off(t),s.apply(this,arguments)},r.guid=s.guid||(s.guid=Ct.guid++)),t.each(function(){Ct.event.add(this,e,r,n,i)})}function A(t,e,i){return i?($t.set(t,e,!1),void Ct.event.add(t,e,{namespace:!1,handler:function(t){var n,r,o=$t.get(this,e);if(1&t.isTrigger&&this[e]){if(o.length)(Ct.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=ut.call(arguments),$t.set(this,e,o),n=i(this,e),this[e](),r=$t.get(this,e),o!==r||n?$t.set(this,e,!1):r={},o!==r)return t.stopImmediatePropagation(),t.preventDefault(),r.value}else o.length&&($t.set(this,e,{
value:Ct.event.trigger(Ct.extend(o[0],Ct.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void(void 0===$t.get(t,e)&&Ct.event.add(t,e,C))}function P(t,e){return o(t,"table")&&o(11!==e.nodeType?e:e.firstChild,"tr")?Ct(t).children("tbody")[0]||t:t}function I(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function E(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function L(t,e){var i,n,r,o,s,a,l,c;if(1===e.nodeType){if($t.hasData(t)&&(o=$t.access(t),s=$t.set(e,o),c=o.events)){delete s.handle,s.events={};for(r in c)for(i=0,n=c[r].length;i<n;i++)Ct.event.add(e,r,c[r][i])}qt.hasData(t)&&(a=qt.access(t),l=Ct.extend({},a),qt.set(e,l))}}function N(t,e){var i=e.nodeName.toLowerCase();"input"===i&&ie.test(t.type)?e.checked=t.checked:"input"!==i&&"textarea"!==i||(e.defaultValue=t.defaultValue)}function O(t,e,n,r){e=ht.apply([],e);var o,s,a,l,c,u,h=0,d=t.length,p=d-1,f=e[0],g=wt(f);if(g||d>1&&"string"==typeof f&&!bt.checkClone&&de.test(f))return t.each(function(i){var o=t.eq(i);g&&(e[0]=f.call(this,i,o.html())),O(o,e,n,r)});if(d&&(o=k(e,t[0].ownerDocument,!1,t,r),s=o.firstChild,1===o.childNodes.length&&(o=s),s||r)){for(a=Ct.map(_(o,"script"),I),l=a.length;h<d;h++)c=o,h!==p&&(c=Ct.clone(c,!0,!0),l&&Ct.merge(a,_(c,"script"))),n.call(t[h],c,h);if(l)for(u=a[a.length-1].ownerDocument,Ct.map(a,E),h=0;h<l;h++)c=a[h],re.test(c.type||"")&&!$t.access(c,"globalEval")&&Ct.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?Ct._evalUrl&&!c.noModule&&Ct._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")}):i(c.textContent.replace(pe,""),c,u))}return t}function H(t,e,i){for(var n,r=e?Ct.filter(e,t):t,o=0;null!=(n=r[o]);o++)i||1!==n.nodeType||Ct.cleanData(_(n)),n.parentNode&&(i&&Qt(n)&&x(_(n,"script")),n.parentNode.removeChild(n));return t}function W(t,e,i){var n,r,o,s,a=t.style;return i=i||ge(t),i&&(s=i.getPropertyValue(e)||i[e],""!==s||Qt(t)||(s=Ct.style(t,e)),!bt.pixelBoxStyles()&&fe.test(s)&&me.test(e)&&(n=a.width,r=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=i.width,a.width=n,a.minWidth=r,a.maxWidth=o)),void 0!==s?s+"":s}function z(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}function R(t){for(var e=t[0].toUpperCase()+t.slice(1),i=ve.length;i--;)if(t=ve[i]+e,t in ye)return t}function F(t){var e=Ct.cssProps[t]||be[t];return e?e:t in ye?t:be[t]=R(t)||t}function j(t,e,i){var n=Kt.exec(e);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):e}function B(t,e,i,n,r,o){var s="width"===e?1:0,a=0,l=0;if(i===(n?"border":"content"))return 0;for(;s<4;s+=2)"margin"===i&&(l+=Ct.css(t,i+Vt[s],!0,r)),n?("content"===i&&(l-=Ct.css(t,"padding"+Vt[s],!0,r)),"margin"!==i&&(l-=Ct.css(t,"border"+Vt[s]+"Width",!0,r))):(l+=Ct.css(t,"padding"+Vt[s],!0,r),"padding"!==i?l+=Ct.css(t,"border"+Vt[s]+"Width",!0,r):a+=Ct.css(t,"border"+Vt[s]+"Width",!0,r));return!n&&o>=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-l-a-.5))||0),l}function $(t,e,i){var n=ge(t),r=!bt.boxSizingReliable()||i,o=r&&"border-box"===Ct.css(t,"boxSizing",!1,n),s=o,a=W(t,e,n),l="offset"+e[0].toUpperCase()+e.slice(1);if(fe.test(a)){if(!i)return a;a="auto"}return(!bt.boxSizingReliable()&&o||"auto"===a||!parseFloat(a)&&"inline"===Ct.css(t,"display",!1,n))&&t.getClientRects().length&&(o="border-box"===Ct.css(t,"boxSizing",!1,n),s=l in t,s&&(a=t[l])),a=parseFloat(a)||0,a+B(t,e,i||(o?"border":"content"),s,n,a)+"px"}function q(t,e,i,n,r){return new q.prototype.init(t,e,i,n,r)}function Y(){Te&&(lt.hidden===!1&&t.requestAnimationFrame?t.requestAnimationFrame(Y):t.setTimeout(Y,Ct.fx.interval),Ct.fx.tick())}function U(){return t.setTimeout(function(){Ce=void 0}),Ce=Date.now()}function X(t,e){var i,n=0,r={height:t};for(e=e?1:0;n<4;n+=2-e)i=Vt[n],r["margin"+i]=r["padding"+i]=t;return e&&(r.opacity=r.width=t),r}function K(t,e,i){for(var n,r=(Q.tweeners[e]||[]).concat(Q.tweeners["*"]),o=0,s=r.length;o<s;o++)if(n=r[o].call(i,e,t))return n}function V(t,e,i){var n,r,o,s,a,l,c,u,h="width"in e||"height"in e,d=this,p={},f=t.style,g=t.nodeType&&Jt(t),m=$t.get(t,"fxshow");i.queue||(s=Ct._queueHooks(t,"fx"),null==s.unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,d.always(function(){d.always(function(){s.unqueued--,Ct.queue(t,"fx").length||s.empty.fire()})}));for(n in e)if(r=e[n],Se.test(r)){if(delete e[n],o=o||"toggle"===r,r===(g?"hide":"show")){if("show"!==r||!m||void 0===m[n])continue;g=!0}p[n]=m&&m[n]||Ct.style(t,n)}if(l=!Ct.isEmptyObject(e),l||!Ct.isEmptyObject(p)){h&&1===t.nodeType&&(i.overflow=[f.overflow,f.overflowX,f.overflowY],c=m&&m.display,null==c&&(c=$t.get(t,"display")),u=Ct.css(t,"display"),"none"===u&&(c?u=c:(w([t],!0),c=t.style.display||c,u=Ct.css(t,"display"),w([t]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===Ct.css(t,"float")&&(l||(d.done(function(){f.display=c}),null==c&&(u=f.display,c="none"===u?"":u)),f.display="inline-block")),i.overflow&&(f.overflow="hidden",d.always(function(){f.overflow=i.overflow[0],f.overflowX=i.overflow[1],f.overflowY=i.overflow[2]})),l=!1;for(n in p)l||(m?"hidden"in m&&(g=m.hidden):m=$t.access(t,"fxshow",{display:c}),o&&(m.hidden=!g),g&&w([t],!0),d.done(function(){g||w([t]),$t.remove(t,"fxshow");for(n in p)Ct.style(t,n,p[n])})),l=K(g?m[n]:0,n,d),n in m||(m[n]=l.start,g&&(l.end=l.start,l.start=0))}}function G(t,e){var i,n,r,o,s;for(i in t)if(n=f(i),r=e[n],o=t[i],Array.isArray(o)&&(r=o[1],o=t[i]=o[0]),i!==n&&(t[n]=o,delete t[i]),s=Ct.cssHooks[n],s&&"expand"in s){o=s.expand(o),delete t[n];for(i in o)i in t||(t[i]=o[i],e[i]=r)}else e[n]=r}function Q(t,e,i){var n,r,o=0,s=Q.prefilters.length,a=Ct.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var e=Ce||U(),i=Math.max(0,c.startTime+c.duration-e),n=i/c.duration||0,o=1-n,s=0,l=c.tweens.length;s<l;s++)c.tweens[s].run(o);return a.notifyWith(t,[c,o,i]),o<1&&l?i:(l||a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:Ct.extend({},e),opts:Ct.extend(!0,{specialEasing:{},easing:Ct.easing._default},i),originalProperties:e,originalOptions:i,startTime:Ce||U(),duration:i.duration,tweens:[],createTween:function(e,i){var n=Ct.Tween(t,c.opts,e,i,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(n),n},stop:function(e){var i=0,n=e?c.tweens.length:0;if(r)return this;for(r=!0;i<n;i++)c.tweens[i].run(1);return e?(a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c,e])):a.rejectWith(t,[c,e]),this}}),u=c.props;for(G(u,c.opts.specialEasing);o<s;o++)if(n=Q.prefilters[o].call(c,t,u,c.opts))return wt(n.stop)&&(Ct._queueHooks(c.elem,c.opts.queue).stop=n.stop.bind(n)),n;return Ct.map(u,K,c),wt(c.opts.start)&&c.opts.start.call(t,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),Ct.fx.timer(Ct.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c}function Z(t){var e=t.match(Ht)||[];return e.join(" ")}function J(t){return t.getAttribute&&t.getAttribute("class")||""}function tt(t){return Array.isArray(t)?t:"string"==typeof t?t.match(Ht)||[]:[]}function et(t,e,i,r){var o;if(Array.isArray(e))Ct.each(e,function(e,n){i||ze.test(t)?r(t,n):et(t+"["+("object"==typeof n&&null!=n?e:"")+"]",n,i,r)});else if(i||"object"!==n(e))r(t,e);else for(o in e)et(t+"["+o+"]",e[o],i,r)}function it(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,r=0,o=e.toLowerCase().match(Ht)||[];if(wt(i))for(;n=o[r++];)"+"===n[0]?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function nt(t,e,i,n){function r(a){var l;return o[a]=!0,Ct.each(t[a]||[],function(t,a){var c=a(e,i,n);return"string"!=typeof c||s||o[c]?s?!(l=c):void 0:(e.dataTypes.unshift(c),r(c),!1)}),l}var o={},s=t===Ge;return r(e.dataTypes[0])||!o["*"]&&r("*")}function rt(t,e){var i,n,r=Ct.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((r[i]?t:n||(n={}))[i]=e[i]);return n&&Ct.extend(!0,t,n),t}function ot(t,e,i){for(var n,r,o,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=t.mimeType||e.getResponseHeader("Content-Type"));if(n)for(r in a)if(a[r]&&a[r].test(n)){l.unshift(r);break}if(l[0]in i)o=l[0];else{for(r in i){if(!l[0]||t.converters[r+" "+l[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),i[o]}function st(t,e,i,n){var r,o,s,a,l,c={},u=t.dataTypes.slice();if(u[1])for(s in t.converters)c[s.toLowerCase()]=t.converters[s];for(o=u.shift();o;)if(t.responseFields[o]&&(i[t.responseFields[o]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(s=c[l+" "+o]||c["* "+o],!s)for(r in c)if(a=r.split(" "),a[1]===o&&(s=c[l+" "+a[0]]||c["* "+a[0]])){s===!0?s=c[r]:c[r]!==!0&&(o=a[0],u.unshift(a[1]));break}if(s!==!0)if(s&&t["throws"])e=s(e);else try{e=s(e)}catch(h){return{state:"parsererror",error:s?h:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}var at=[],lt=t.document,ct=Object.getPrototypeOf,ut=at.slice,ht=at.concat,dt=at.push,pt=at.indexOf,ft={},gt=ft.toString,mt=ft.hasOwnProperty,vt=mt.toString,yt=vt.call(Object),bt={},wt=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType},_t=function(t){return null!=t&&t===t.window},xt={type:!0,src:!0,nonce:!0,noModule:!0},kt="3.4.1",Ct=function(t,e){return new Ct.fn.init(t,e)},Tt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;Ct.fn=Ct.prototype={jquery:kt,constructor:Ct,length:0,toArray:function(){return ut.call(this)},get:function(t){return null==t?ut.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=Ct.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return Ct.each(this,t)},map:function(t){return this.pushStack(Ct.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return this.pushStack(ut.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,i=+t+(t<0?e:0);return this.pushStack(i>=0&&i<e?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:dt,sort:at.sort,splice:at.splice},Ct.extend=Ct.fn.extend=function(){var t,e,i,n,r,o,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||wt(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(t=arguments[a]))for(e in t)n=t[e],"__proto__"!==e&&s!==n&&(c&&n&&(Ct.isPlainObject(n)||(r=Array.isArray(n)))?(i=s[e],o=r&&!Array.isArray(i)?[]:r||Ct.isPlainObject(i)?i:{},r=!1,s[e]=Ct.extend(c,o,n)):void 0!==n&&(s[e]=n));return s},Ct.extend({expando:"jQuery"+(kt+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,i;return!(!t||"[object Object]"!==gt.call(t))&&(!(e=ct(t))||(i=mt.call(e,"constructor")&&e.constructor,"function"==typeof i&&vt.call(i)===yt))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e){i(t,{nonce:e&&e.nonce})},each:function(t,e){var i,n=0;if(r(t))for(i=t.length;n<i&&e.call(t[n],n,t[n])!==!1;n++);else for(n in t)if(e.call(t[n],n,t[n])===!1)break;return t},trim:function(t){return null==t?"":(t+"").replace(Tt,"")},makeArray:function(t,e){var i=e||[];return null!=t&&(r(Object(t))?Ct.merge(i,"string"==typeof t?[t]:t):dt.call(i,t)),i},inArray:function(t,e,i){return null==e?-1:pt.call(e,t,i)},merge:function(t,e){for(var i=+e.length,n=0,r=t.length;n<i;n++)t[r++]=e[n];return t.length=r,t},grep:function(t,e,i){for(var n,r=[],o=0,s=t.length,a=!i;o<s;o++)n=!e(t[o],o),n!==a&&r.push(t[o]);return r},map:function(t,e,i){var n,o,s=0,a=[];if(r(t))for(n=t.length;s<n;s++)o=e(t[s],s,i),null!=o&&a.push(o);else for(s in t)o=e(t[s],s,i),null!=o&&a.push(o);return ht.apply([],a)},guid:1,support:bt}),"function"==typeof Symbol&&(Ct.fn[Symbol.iterator]=at[Symbol.iterator]),Ct.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){ft["[object "+e+"]"]=e.toLowerCase()});var St=function(t){function e(t,e,i,n){var r,o,s,a,l,c,u,d=e&&e.ownerDocument,f=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==f&&9!==f&&11!==f)return i;if(!n&&((e?e.ownerDocument||e:j)!==L&&E(e),e=e||L,O)){if(11!==f&&(l=bt.exec(t)))if(r=l[1]){if(9===f){if(!(s=e.getElementById(r)))return i;if(s.id===r)return i.push(s),i}else if(d&&(s=d.getElementById(r))&&R(e,s)&&s.id===r)return i.push(s),i}else{if(l[2])return J.apply(i,e.getElementsByTagName(t)),i;if((r=l[3])&&x.getElementsByClassName&&e.getElementsByClassName)return J.apply(i,e.getElementsByClassName(r)),i}if(x.qsa&&!X[t+" "]&&(!H||!H.test(t))&&(1!==f||"object"!==e.nodeName.toLowerCase())){if(u=t,d=e,1===f&&ht.test(t)){for((a=e.getAttribute("id"))?a=a.replace(kt,Ct):e.setAttribute("id",a=F),c=S(t),o=c.length;o--;)c[o]="#"+a+" "+p(c[o]);u=c.join(","),d=wt.test(t)&&h(e.parentNode)||e}try{return J.apply(i,d.querySelectorAll(u)),i}catch(g){X(t,!0)}finally{a===F&&e.removeAttribute("id")}}}return M(t.replace(lt,"$1"),e,i,n)}function i(){function t(i,n){return e.push(i+" ")>k.cacheLength&&delete t[e.shift()],t[i+" "]=n}var e=[];return t}function n(t){return t[F]=!0,t}function r(t){var e=L.createElement("fieldset");try{return!!t(e)}catch(i){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var i=t.split("|"),n=i.length;n--;)k.attrHandle[i[n]]=e}function s(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function a(t){return function(e){var i=e.nodeName.toLowerCase();return"input"===i&&e.type===t}}function l(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function c(t){return function(e){return"form"in e?e.parentNode&&e.disabled===!1?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&St(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function u(t){return n(function(e){return e=+e,n(function(i,n){for(var r,o=t([],i.length,e),s=o.length;s--;)i[r=o[s]]&&(i[r]=!(n[r]=i[r]))})})}function h(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function d(){}function p(t){for(var e=0,i=t.length,n="";e<i;e++)n+=t[e].value;return n}function f(t,e,i){var n=e.dir,r=e.next,o=r||n,s=i&&"parentNode"===o,a=$++;return e.first?function(e,i,r){for(;e=e[n];)if(1===e.nodeType||s)return t(e,i,r);return!1}:function(e,i,l){var c,u,h,d=[B,a];if(l){for(;e=e[n];)if((1===e.nodeType||s)&&t(e,i,l))return!0}else for(;e=e[n];)if(1===e.nodeType||s)if(h=e[F]||(e[F]={}),u=h[e.uniqueID]||(h[e.uniqueID]={}),r&&r===e.nodeName.toLowerCase())e=e[n]||e;else{if((c=u[o])&&c[0]===B&&c[1]===a)return d[2]=c[2];if(u[o]=d,d[2]=t(e,i,l))return!0}return!1}}function g(t){return t.length>1?function(e,i,n){for(var r=t.length;r--;)if(!t[r](e,i,n))return!1;return!0}:t[0]}function m(t,i,n){for(var r=0,o=i.length;r<o;r++)e(t,i[r],n);return n}function v(t,e,i,n,r){for(var o,s=[],a=0,l=t.length,c=null!=e;a<l;a++)(o=t[a])&&(i&&!i(o,n,r)||(s.push(o),c&&e.push(a)));return s}function y(t,e,i,r,o,s){return r&&!r[F]&&(r=y(r)),o&&!o[F]&&(o=y(o,s)),n(function(n,s,a,l){var c,u,h,d=[],p=[],f=s.length,g=n||m(e||"*",a.nodeType?[a]:a,[]),y=!t||!n&&e?g:v(g,d,t,a,l),b=i?o||(n?t:f||r)?[]:s:y;if(i&&i(y,b,a,l),r)for(c=v(b,p),r(c,[],a,l),u=c.length;u--;)(h=c[u])&&(b[p[u]]=!(y[p[u]]=h));if(n){if(o||t){if(o){for(c=[],u=b.length;u--;)(h=b[u])&&c.push(y[u]=h);o(null,b=[],c,l)}for(u=b.length;u--;)(h=b[u])&&(c=o?et(n,h):d[u])>-1&&(n[c]=!(s[c]=h))}}else b=v(b===s?b.splice(f,b.length):b),o?o(null,s,b,l):J.apply(s,b)})}function b(t){for(var e,i,n,r=t.length,o=k.relative[t[0].type],s=o||k.relative[" "],a=o?1:0,l=f(function(t){return t===e},s,!0),c=f(function(t){return et(e,t)>-1},s,!0),u=[function(t,i,n){var r=!o&&(n||i!==A)||((e=i).nodeType?l(t,i,n):c(t,i,n));return e=null,r}];a<r;a++)if(i=k.relative[t[a].type])u=[f(g(u),i)];else{if(i=k.filter[t[a].type].apply(null,t[a].matches),i[F]){for(n=++a;n<r&&!k.relative[t[n].type];n++);return y(a>1&&g(u),a>1&&p(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(lt,"$1"),i,a<n&&b(t.slice(a,n)),n<r&&b(t=t.slice(n)),n<r&&p(t))}u.push(i)}return g(u)}function w(t,i){var r=i.length>0,o=t.length>0,s=function(n,s,a,l,c){var u,h,d,p=0,f="0",g=n&&[],m=[],y=A,b=n||o&&k.find.TAG("*",c),w=B+=null==y?1:Math.random()||.1,_=b.length;for(c&&(A=s===L||s||c);f!==_&&null!=(u=b[f]);f++){if(o&&u){for(h=0,s||u.ownerDocument===L||(E(u),a=!O);d=t[h++];)if(d(u,s||L,a)){l.push(u);break}c&&(B=w)}r&&((u=!d&&u)&&p--,n&&g.push(u))}if(p+=f,r&&f!==p){for(h=0;d=i[h++];)d(g,m,s,a);if(n){if(p>0)for(;f--;)g[f]||m[f]||(m[f]=Q.call(l));m=v(m)}J.apply(l,m),c&&!n&&m.length>0&&p+i.length>1&&e.uniqueSort(l)}return c&&(B=w,A=y),g};return r?n(s):s}var _,x,k,C,T,S,D,M,A,P,I,E,L,N,O,H,W,z,R,F="sizzle"+1*new Date,j=t.document,B=0,$=0,q=i(),Y=i(),U=i(),X=i(),K=function(t,e){return t===e&&(I=!0),0},V={}.hasOwnProperty,G=[],Q=G.pop,Z=G.push,J=G.push,tt=G.slice,et=function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},it="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",nt="[\\x20\\t\\r\\n\\f]",rt="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ot="\\["+nt+"*("+rt+")(?:"+nt+"*([*^$|!~]?=)"+nt+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+rt+"))|)"+nt+"*\\]",st=":("+rt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ot+")*)|.*)\\)|)",at=new RegExp(nt+"+","g"),lt=new RegExp("^"+nt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+nt+"+$","g"),ct=new RegExp("^"+nt+"*,"+nt+"*"),ut=new RegExp("^"+nt+"*([>+~]|"+nt+")"+nt+"*"),ht=new RegExp(nt+"|>"),dt=new RegExp(st),pt=new RegExp("^"+rt+"$"),ft={ID:new RegExp("^#("+rt+")"),CLASS:new RegExp("^\\.("+rt+")"),TAG:new RegExp("^("+rt+"|[*])"),ATTR:new RegExp("^"+ot),PSEUDO:new RegExp("^"+st),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),bool:new RegExp("^(?:"+it+")$","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},gt=/HTML$/i,mt=/^(?:input|select|textarea|button)$/i,vt=/^h\d$/i,yt=/^[^{]+\{\s*\[native \w/,bt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,wt=/[+~]/,_t=new RegExp("\\\\([\\da-f]{1,6}"+nt+"?|("+nt+")|.)","ig"),xt=function(t,e,i){var n="0x"+e-65536;return n!==n||i?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},kt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Ct=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},Tt=function(){E()},St=f(function(t){return t.disabled===!0&&"fieldset"===t.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{J.apply(G=tt.call(j.childNodes),j.childNodes),G[j.childNodes.length].nodeType}catch(Dt){J={apply:G.length?function(t,e){Z.apply(t,tt.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}x=e.support={},T=e.isXML=function(t){var e=t.namespaceURI,i=(t.ownerDocument||t).documentElement;return!gt.test(e||i&&i.nodeName||"HTML")},E=e.setDocument=function(t){var e,i,n=t?t.ownerDocument||t:j;return n!==L&&9===n.nodeType&&n.documentElement?(L=n,N=L.documentElement,O=!T(L),j!==L&&(i=L.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",Tt,!1):i.attachEvent&&i.attachEvent("onunload",Tt)),x.attributes=r(function(t){return t.className="i",!t.getAttribute("className")}),x.getElementsByTagName=r(function(t){return t.appendChild(L.createComment("")),!t.getElementsByTagName("*").length}),x.getElementsByClassName=yt.test(L.getElementsByClassName),x.getById=r(function(t){return N.appendChild(t).id=F,!L.getElementsByName||!L.getElementsByName(F).length}),x.getById?(k.filter.ID=function(t){var e=t.replace(_t,xt);return function(t){return t.getAttribute("id")===e}},k.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&O){var i=e.getElementById(t);return i?[i]:[]}}):(k.filter.ID=function(t){var e=t.replace(_t,xt);return function(t){var i="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}},k.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&O){var i,n,r,o=e.getElementById(t);if(o){if(i=o.getAttributeNode("id"),i&&i.value===t)return[o];for(r=e.getElementsByName(t),n=0;o=r[n++];)if(i=o.getAttributeNode("id"),i&&i.value===t)return[o]}return[]}}),k.find.TAG=x.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):x.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;i=o[r++];)1===i.nodeType&&n.push(i);return n}return o},k.find.CLASS=x.getElementsByClassName&&function(t,e){if("undefined"!=typeof e.getElementsByClassName&&O)return e.getElementsByClassName(t)},W=[],H=[],(x.qsa=yt.test(L.querySelectorAll))&&(r(function(t){N.appendChild(t).innerHTML="<a id='"+F+"'></a><select id='"+F+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&H.push("[*^$]="+nt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||H.push("\\["+nt+"*(?:value|"+it+")"),t.querySelectorAll("[id~="+F+"-]").length||H.push("~="),t.querySelectorAll(":checked").length||H.push(":checked"),t.querySelectorAll("a#"+F+"+*").length||H.push(".#.+[+~]")}),r(function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=L.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&H.push("name"+nt+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&H.push(":enabled",":disabled"),N.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&H.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),H.push(",.*:")})),(x.matchesSelector=yt.test(z=N.matches||N.webkitMatchesSelector||N.mozMatchesSelector||N.oMatchesSelector||N.msMatchesSelector))&&r(function(t){x.disconnectedMatch=z.call(t,"*"),z.call(t,"[s!='']:x"),W.push("!=",st)}),H=H.length&&new RegExp(H.join("|")),W=W.length&&new RegExp(W.join("|")),e=yt.test(N.compareDocumentPosition),R=e||yt.test(N.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},K=e?function(t,e){if(t===e)return I=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i?i:(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&i||!x.sortDetached&&e.compareDocumentPosition(t)===i?t===L||t.ownerDocument===j&&R(j,t)?-1:e===L||e.ownerDocument===j&&R(j,e)?1:P?et(P,t)-et(P,e):0:4&i?-1:1)}:function(t,e){if(t===e)return I=!0,0;var i,n=0,r=t.parentNode,o=e.parentNode,a=[t],l=[e];if(!r||!o)return t===L?-1:e===L?1:r?-1:o?1:P?et(P,t)-et(P,e):0;if(r===o)return s(t,e);for(i=t;i=i.parentNode;)a.unshift(i);for(i=e;i=i.parentNode;)l.unshift(i);for(;a[n]===l[n];)n++;return n?s(a[n],l[n]):a[n]===j?-1:l[n]===j?1:0},L):L},e.matches=function(t,i){return e(t,null,null,i)},e.matchesSelector=function(t,i){if((t.ownerDocument||t)!==L&&E(t),x.matchesSelector&&O&&!X[i+" "]&&(!W||!W.test(i))&&(!H||!H.test(i)))try{var n=z.call(t,i);if(n||x.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(r){X(i,!0)}return e(i,L,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==L&&E(t),R(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==L&&E(t);var i=k.attrHandle[e.toLowerCase()],n=i&&V.call(k.attrHandle,e.toLowerCase())?i(t,e,!O):void 0;return void 0!==n?n:x.attributes||!O?t.getAttribute(e):(n=t.getAttributeNode(e))&&n.specified?n.value:null},e.escape=function(t){return(t+"").replace(kt,Ct)},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,i=[],n=0,r=0;if(I=!x.detectDuplicates,P=!x.sortStable&&t.slice(0),t.sort(K),I){for(;e=t[r++];)e===t[r]&&(n=i.push(r));for(;n--;)t.splice(i[n],1)}return P=null,t},C=e.getText=function(t){var e,i="",n=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=C(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[n++];)i+=C(e);return i},k=e.selectors={cacheLength:50,createPseudo:n,match:ft,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(_t,xt),t[3]=(t[3]||t[4]||t[5]||"").replace(_t,xt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return ft.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&dt.test(i)&&(e=S(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(_t,xt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=q[t+" "];return e||(e=new RegExp("(^|"+nt+")"+t+"("+nt+"|$)"))&&q(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,i,n){return function(r){var o=e.attr(r,t);return null==o?"!="===i:!i||(o+="","="===i?o===n:"!="===i?o!==n:"^="===i?n&&0===o.indexOf(n):"*="===i?n&&o.indexOf(n)>-1:"$="===i?n&&o.slice(-n.length)===n:"~="===i?(" "+o.replace(at," ")+" ").indexOf(n)>-1:"|="===i&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,i,n,r){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===r?function(t){return!!t.parentNode}:function(e,i,l){var c,u,h,d,p,f,g=o!==s?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(m){if(o){for(;g;){for(d=e;d=d[g];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?m.firstChild:m.lastChild],s&&y){for(d=m,h=d[F]||(d[F]={}),u=h[d.uniqueID]||(h[d.uniqueID]={}),c=u[t]||[],p=c[0]===B&&c[1],b=p&&c[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(b=p=0)||f.pop();)if(1===d.nodeType&&++b&&d===e){u[t]=[B,p,b];break}}else if(y&&(d=e,h=d[F]||(d[F]={}),u=h[d.uniqueID]||(h[d.uniqueID]={}),c=u[t]||[],p=c[0]===B&&c[1],b=p),b===!1)for(;(d=++p&&d&&d[g]||(b=p=0)||f.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++b||(y&&(h=d[F]||(d[F]={}),u=h[d.uniqueID]||(h[d.uniqueID]={}),u[t]=[B,b]),d!==e)););return b-=r,b===n||b%n===0&&b/n>=0}}},PSEUDO:function(t,i){var r,o=k.pseudos[t]||k.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[F]?o(i):o.length>1?(r=[t,t,"",i],k.setFilters.hasOwnProperty(t.toLowerCase())?n(function(t,e){for(var n,r=o(t,i),s=r.length;s--;)n=et(t,r[s]),t[n]=!(e[n]=r[s])}):function(t){return o(t,0,r)}):o}},pseudos:{not:n(function(t){var e=[],i=[],r=D(t.replace(lt,"$1"));return r[F]?n(function(t,e,i,n){for(var o,s=r(t,null,n,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))}):function(t,n,o){return e[0]=t,r(e,null,o,i),e[0]=null,!i.pop()}}),has:n(function(t){return function(i){return e(t,i).length>0}}),contains:n(function(t){return t=t.replace(_t,xt),function(e){return(e.textContent||C(e)).indexOf(t)>-1}}),lang:n(function(t){return pt.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(_t,xt).toLowerCase(),function(e){var i;do if(i=O?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return i=i.toLowerCase(),i===t||0===i.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===N},focus:function(t){return t===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:c(!1),disabled:c(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!k.pseudos.empty(t)},header:function(t){return vt.test(t.nodeName)},input:function(t){return mt.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:u(function(){return[0]}),last:u(function(t,e){return[e-1]}),eq:u(function(t,e,i){return[i<0?i+e:i]}),even:u(function(t,e){for(var i=0;i<e;i+=2)t.push(i);return t}),odd:u(function(t,e){for(var i=1;i<e;i+=2)t.push(i);return t}),lt:u(function(t,e,i){for(var n=i<0?i+e:i>e?e:i;--n>=0;)t.push(n);return t}),gt:u(function(t,e,i){for(var n=i<0?i+e:i;++n<e;)t.push(n);return t})}},k.pseudos.nth=k.pseudos.eq;for(_ in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})k.pseudos[_]=a(_);for(_ in{submit:!0,reset:!0})k.pseudos[_]=l(_);return d.prototype=k.filters=k.pseudos,k.setFilters=new d,S=e.tokenize=function(t,i){var n,r,o,s,a,l,c,u=Y[t+" "];if(u)return i?0:u.slice(0);for(a=t,l=[],c=k.preFilter;a;){n&&!(r=ct.exec(a))||(r&&(a=a.slice(r[0].length)||a),l.push(o=[])),n=!1,(r=ut.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(lt," ")}),a=a.slice(n.length));for(s in k.filter)!(r=ft[s].exec(a))||c[s]&&!(r=c[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return i?a.length:a?e.error(t):Y(t,l).slice(0)},D=e.compile=function(t,e){var i,n=[],r=[],o=U[t+" "];if(!o){for(e||(e=S(t)),i=e.length;i--;)o=b(e[i]),o[F]?n.push(o):r.push(o);o=U(t,w(r,n)),o.selector=t}return o},M=e.select=function(t,e,i,n){var r,o,s,a,l,c="function"==typeof t&&t,u=!n&&S(t=c.selector||t);if(i=i||[],1===u.length){if(o=u[0]=u[0].slice(0),o.length>2&&"ID"===(s=o[0]).type&&9===e.nodeType&&O&&k.relative[o[1].type]){if(e=(k.find.ID(s.matches[0].replace(_t,xt),e)||[])[0],!e)return i;c&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(r=ft.needsContext.test(t)?0:o.length;r--&&(s=o[r],!k.relative[a=s.type]);)if((l=k.find[a])&&(n=l(s.matches[0].replace(_t,xt),wt.test(o[0].type)&&h(e.parentNode)||e))){if(o.splice(r,1),t=n.length&&p(o),!t)return J.apply(i,n),i;break}}return(c||D(t,u))(n,e,!O,i,!e||wt.test(t)&&h(e.parentNode)||e),i},x.sortStable=F.split("").sort(K).join("")===F,x.detectDuplicates=!!I,E(),x.sortDetached=r(function(t){return 1&t.compareDocumentPosition(L.createElement("fieldset"))}),r(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,i){if(!i)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),x.attributes&&r(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,i){if(!i&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),r(function(t){return null==t.getAttribute("disabled")})||o(it,function(t,e,i){var n;if(!i)return t[e]===!0?e.toLowerCase():(n=t.getAttributeNode(e))&&n.specified?n.value:null}),e}(t);Ct.find=St,Ct.expr=St.selectors,Ct.expr[":"]=Ct.expr.pseudos,Ct.uniqueSort=Ct.unique=St.uniqueSort,Ct.text=St.getText,Ct.isXMLDoc=St.isXML,Ct.contains=St.contains,Ct.escapeSelector=St.escape;var Dt=function(t,e,i){for(var n=[],r=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&Ct(t).is(i))break;n.push(t)}return n},Mt=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},At=Ct.expr.match.needsContext,Pt=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;Ct.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),
1===e.length&&1===n.nodeType?Ct.find.matchesSelector(n,t)?[n]:[]:Ct.find.matches(t,Ct.grep(e,function(t){return 1===t.nodeType}))},Ct.fn.extend({find:function(t){var e,i,n=this.length,r=this;if("string"!=typeof t)return this.pushStack(Ct(t).filter(function(){for(e=0;e<n;e++)if(Ct.contains(r[e],this))return!0}));for(i=this.pushStack([]),e=0;e<n;e++)Ct.find(t,r[e],i);return n>1?Ct.uniqueSort(i):i},filter:function(t){return this.pushStack(s(this,t||[],!1))},not:function(t){return this.pushStack(s(this,t||[],!0))},is:function(t){return!!s(this,"string"==typeof t&&At.test(t)?Ct(t):t||[],!1).length}});var It,Et=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Lt=Ct.fn.init=function(t,e,i){var n,r;if(!t)return this;if(i=i||It,"string"==typeof t){if(n="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:Et.exec(t),!n||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof Ct?e[0]:e,Ct.merge(this,Ct.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:lt,!0)),Pt.test(n[1])&&Ct.isPlainObject(e))for(n in e)wt(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return r=lt.getElementById(n[2]),r&&(this[0]=r,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):wt(t)?void 0!==i.ready?i.ready(t):t(Ct):Ct.makeArray(t,this)};Lt.prototype=Ct.fn,It=Ct(lt);var Nt=/^(?:parents|prev(?:Until|All))/,Ot={children:!0,contents:!0,next:!0,prev:!0};Ct.fn.extend({has:function(t){var e=Ct(t,this),i=e.length;return this.filter(function(){for(var t=0;t<i;t++)if(Ct.contains(this,e[t]))return!0})},closest:function(t,e){var i,n=0,r=this.length,o=[],s="string"!=typeof t&&Ct(t);if(!At.test(t))for(;n<r;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(s?s.index(i)>-1:1===i.nodeType&&Ct.find.matchesSelector(i,t))){o.push(i);break}return this.pushStack(o.length>1?Ct.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?pt.call(Ct(t),this[0]):pt.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(Ct.uniqueSort(Ct.merge(this.get(),Ct(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),Ct.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return Dt(t,"parentNode")},parentsUntil:function(t,e,i){return Dt(t,"parentNode",i)},next:function(t){return a(t,"nextSibling")},prev:function(t){return a(t,"previousSibling")},nextAll:function(t){return Dt(t,"nextSibling")},prevAll:function(t){return Dt(t,"previousSibling")},nextUntil:function(t,e,i){return Dt(t,"nextSibling",i)},prevUntil:function(t,e,i){return Dt(t,"previousSibling",i)},siblings:function(t){return Mt((t.parentNode||{}).firstChild,t)},children:function(t){return Mt(t.firstChild)},contents:function(t){return"undefined"!=typeof t.contentDocument?t.contentDocument:(o(t,"template")&&(t=t.content||t),Ct.merge([],t.childNodes))}},function(t,e){Ct.fn[t]=function(i,n){var r=Ct.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(r=Ct.filter(n,r)),this.length>1&&(Ot[t]||Ct.uniqueSort(r),Nt.test(t)&&r.reverse()),this.pushStack(r)}});var Ht=/[^\x20\t\r\n\f]+/g;Ct.Callbacks=function(t){t="string"==typeof t?l(t):Ct.extend({},t);var e,i,r,o,s=[],a=[],c=-1,u=function(){for(o=o||t.once,r=e=!0;a.length;c=-1)for(i=a.shift();++c<s.length;)s[c].apply(i[0],i[1])===!1&&t.stopOnFalse&&(c=s.length,i=!1);t.memory||(i=!1),e=!1,o&&(s=i?[]:"")},h={add:function(){return s&&(i&&!e&&(c=s.length-1,a.push(i)),function r(e){Ct.each(e,function(e,i){wt(i)?t.unique&&h.has(i)||s.push(i):i&&i.length&&"string"!==n(i)&&r(i)})}(arguments),i&&!e&&u()),this},remove:function(){return Ct.each(arguments,function(t,e){for(var i;(i=Ct.inArray(e,s,i))>-1;)s.splice(i,1),i<=c&&c--}),this},has:function(t){return t?Ct.inArray(t,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return o=a=[],s=i="",this},disabled:function(){return!s},lock:function(){return o=a=[],i||e||(s=i=""),this},locked:function(){return!!o},fireWith:function(t,i){return o||(i=i||[],i=[t,i.slice?i.slice():i],a.push(i),e||u()),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!r}};return h},Ct.extend({Deferred:function(e){var i=[["notify","progress",Ct.Callbacks("memory"),Ct.Callbacks("memory"),2],["resolve","done",Ct.Callbacks("once memory"),Ct.Callbacks("once memory"),0,"resolved"],["reject","fail",Ct.Callbacks("once memory"),Ct.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(t){return r.then(null,t)},pipe:function(){var t=arguments;return Ct.Deferred(function(e){Ct.each(i,function(i,n){var r=wt(t[n[4]])&&t[n[4]];o[n[1]](function(){var t=r&&r.apply(this,arguments);t&&wt(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[n[0]+"With"](this,r?[t]:arguments)})}),t=null}).promise()},then:function(e,n,r){function o(e,i,n,r){return function(){var a=this,l=arguments,h=function(){var t,h;if(!(e<s)){if(t=n.apply(a,l),t===i.promise())throw new TypeError("Thenable self-resolution");h=t&&("object"==typeof t||"function"==typeof t)&&t.then,wt(h)?r?h.call(t,o(s,i,c,r),o(s,i,u,r)):(s++,h.call(t,o(s,i,c,r),o(s,i,u,r),o(s,i,c,i.notifyWith))):(n!==c&&(a=void 0,l=[t]),(r||i.resolveWith)(a,l))}},d=r?h:function(){try{h()}catch(t){Ct.Deferred.exceptionHook&&Ct.Deferred.exceptionHook(t,d.stackTrace),e+1>=s&&(n!==u&&(a=void 0,l=[t]),i.rejectWith(a,l))}};e?d():(Ct.Deferred.getStackHook&&(d.stackTrace=Ct.Deferred.getStackHook()),t.setTimeout(d))}}var s=0;return Ct.Deferred(function(t){i[0][3].add(o(0,t,wt(r)?r:c,t.notifyWith)),i[1][3].add(o(0,t,wt(e)?e:c)),i[2][3].add(o(0,t,wt(n)?n:u))}).promise()},promise:function(t){return null!=t?Ct.extend(t,r):r}},o={};return Ct.each(i,function(t,e){var s=e[2],a=e[5];r[e[1]]=s.add,a&&s.add(function(){n=a},i[3-t][2].disable,i[3-t][3].disable,i[0][2].lock,i[0][3].lock),s.add(e[3].fire),o[e[0]]=function(){return o[e[0]+"With"](this===o?void 0:this,arguments),this},o[e[0]+"With"]=s.fireWith}),r.promise(o),e&&e.call(o,o),o},when:function(t){var e=arguments.length,i=e,n=Array(i),r=ut.call(arguments),o=Ct.Deferred(),s=function(t){return function(i){n[t]=this,r[t]=arguments.length>1?ut.call(arguments):i,--e||o.resolveWith(n,r)}};if(e<=1&&(h(t,o.done(s(i)).resolve,o.reject,!e),"pending"===o.state()||wt(r[i]&&r[i].then)))return o.then();for(;i--;)h(r[i],s(i),o.reject);return o.promise()}});var Wt=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;Ct.Deferred.exceptionHook=function(e,i){t.console&&t.console.warn&&e&&Wt.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,i)},Ct.readyException=function(e){t.setTimeout(function(){throw e})};var zt=Ct.Deferred();Ct.fn.ready=function(t){return zt.then(t)["catch"](function(t){Ct.readyException(t)}),this},Ct.extend({isReady:!1,readyWait:1,ready:function(t){(t===!0?--Ct.readyWait:Ct.isReady)||(Ct.isReady=!0,t!==!0&&--Ct.readyWait>0||zt.resolveWith(lt,[Ct]))}}),Ct.ready.then=zt.then,"complete"===lt.readyState||"loading"!==lt.readyState&&!lt.documentElement.doScroll?t.setTimeout(Ct.ready):(lt.addEventListener("DOMContentLoaded",d),t.addEventListener("load",d));var Rt=function(t,e,i,r,o,s,a){var l=0,c=t.length,u=null==i;if("object"===n(i)){o=!0;for(l in i)Rt(t,e,l,i[l],!0,s,a)}else if(void 0!==r&&(o=!0,wt(r)||(a=!0),u&&(a?(e.call(t,r),e=null):(u=e,e=function(t,e,i){return u.call(Ct(t),i)})),e))for(;l<c;l++)e(t[l],i,a?r:r.call(t[l],l,e(t[l],i)));return o?t:u?e.call(t):c?e(t[0],i):s},Ft=/^-ms-/,jt=/-([a-z])/g,Bt=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};g.uid=1,g.prototype={cache:function(t){var e=t[this.expando];return e||(e={},Bt(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,i){var n,r=this.cache(t);if("string"==typeof e)r[f(e)]=i;else for(n in e)r[f(n)]=e[n];return r},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][f(e)]},access:function(t,e,i){return void 0===e||e&&"string"==typeof e&&void 0===i?this.get(t,e):(this.set(t,e,i),void 0!==i?i:e)},remove:function(t,e){var i,n=t[this.expando];if(void 0!==n){if(void 0!==e){Array.isArray(e)?e=e.map(f):(e=f(e),e=e in n?[e]:e.match(Ht)||[]),i=e.length;for(;i--;)delete n[e[i]]}(void 0===e||Ct.isEmptyObject(n))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!Ct.isEmptyObject(e)}};var $t=new g,qt=new g,Yt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ut=/[A-Z]/g;Ct.extend({hasData:function(t){return qt.hasData(t)||$t.hasData(t)},data:function(t,e,i){return qt.access(t,e,i)},removeData:function(t,e){qt.remove(t,e)},_data:function(t,e,i){return $t.access(t,e,i)},_removeData:function(t,e){$t.remove(t,e)}}),Ct.fn.extend({data:function(t,e){var i,n,r,o=this[0],s=o&&o.attributes;if(void 0===t){if(this.length&&(r=qt.get(o),1===o.nodeType&&!$t.get(o,"hasDataAttrs"))){for(i=s.length;i--;)s[i]&&(n=s[i].name,0===n.indexOf("data-")&&(n=f(n.slice(5)),v(o,n,r[n])));$t.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof t?this.each(function(){qt.set(this,t)}):Rt(this,function(e){var i;if(o&&void 0===e){if(i=qt.get(o,t),void 0!==i)return i;if(i=v(o,t),void 0!==i)return i}else this.each(function(){qt.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){qt.remove(this,t)})}}),Ct.extend({queue:function(t,e,i){var n;if(t)return e=(e||"fx")+"queue",n=$t.get(t,e),i&&(!n||Array.isArray(i)?n=$t.access(t,e,Ct.makeArray(i)):n.push(i)),n||[]},dequeue:function(t,e){e=e||"fx";var i=Ct.queue(t,e),n=i.length,r=i.shift(),o=Ct._queueHooks(t,e),s=function(){Ct.dequeue(t,e)};"inprogress"===r&&(r=i.shift(),n--),r&&("fx"===e&&i.unshift("inprogress"),delete o.stop,r.call(t,s,o)),!n&&o&&o.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return $t.get(t,i)||$t.access(t,i,{empty:Ct.Callbacks("once memory").add(function(){$t.remove(t,[e+"queue",i])})})}}),Ct.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length<i?Ct.queue(this[0],t):void 0===e?this:this.each(function(){var i=Ct.queue(this,t,e);Ct._queueHooks(this,t),"fx"===t&&"inprogress"!==i[0]&&Ct.dequeue(this,t)})},dequeue:function(t){return this.each(function(){Ct.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var i,n=1,r=Ct.Deferred(),o=this,s=this.length,a=function(){--n||r.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)i=$t.get(o[s],t+"queueHooks"),i&&i.empty&&(n++,i.empty.add(a));return a(),r.promise(e)}});var Xt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Kt=new RegExp("^(?:([+-])=|)("+Xt+")([a-z%]*)$","i"),Vt=["Top","Right","Bottom","Left"],Gt=lt.documentElement,Qt=function(t){return Ct.contains(t.ownerDocument,t)},Zt={composed:!0};Gt.getRootNode&&(Qt=function(t){return Ct.contains(t.ownerDocument,t)||t.getRootNode(Zt)===t.ownerDocument});var Jt=function(t,e){return t=e||t,"none"===t.style.display||""===t.style.display&&Qt(t)&&"none"===Ct.css(t,"display")},te=function(t,e,i,n){var r,o,s={};for(o in e)s[o]=t.style[o],t.style[o]=e[o];r=i.apply(t,n||[]);for(o in e)t.style[o]=s[o];return r},ee={};Ct.fn.extend({show:function(){return w(this,!0)},hide:function(){return w(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Jt(this)?Ct(this).show():Ct(this).hide()})}});var ie=/^(?:checkbox|radio)$/i,ne=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,re=/^$|^module$|\/(?:java|ecma)script/i,oe={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};oe.optgroup=oe.option,oe.tbody=oe.tfoot=oe.colgroup=oe.caption=oe.thead,oe.th=oe.td;var se=/<|&#?\w+;/;!function(){var t=lt.createDocumentFragment(),e=t.appendChild(lt.createElement("div")),i=lt.createElement("input");i.setAttribute("type","radio"),i.setAttribute("checked","checked"),i.setAttribute("name","t"),e.appendChild(i),bt.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",bt.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var ae=/^key/,le=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ce=/^([^.]*)(?:\.(.+)|)/;Ct.event={global:{},add:function(t,e,i,n,r){var o,s,a,l,c,u,h,d,p,f,g,m=$t.get(t);if(m)for(i.handler&&(o=i,i=o.handler,r=o.selector),r&&Ct.find.matchesSelector(Gt,r),i.guid||(i.guid=Ct.guid++),(l=m.events)||(l=m.events={}),(s=m.handle)||(s=m.handle=function(e){return"undefined"!=typeof Ct&&Ct.event.triggered!==e.type?Ct.event.dispatch.apply(t,arguments):void 0}),e=(e||"").match(Ht)||[""],c=e.length;c--;)a=ce.exec(e[c])||[],p=g=a[1],f=(a[2]||"").split(".").sort(),p&&(h=Ct.event.special[p]||{},p=(r?h.delegateType:h.bindType)||p,h=Ct.event.special[p]||{},u=Ct.extend({type:p,origType:g,data:n,handler:i,guid:i.guid,selector:r,needsContext:r&&Ct.expr.match.needsContext.test(r),namespace:f.join(".")},o),(d=l[p])||(d=l[p]=[],d.delegateCount=0,h.setup&&h.setup.call(t,n,f,s)!==!1||t.addEventListener&&t.addEventListener(p,s)),h.add&&(h.add.call(t,u),u.handler.guid||(u.handler.guid=i.guid)),r?d.splice(d.delegateCount++,0,u):d.push(u),Ct.event.global[p]=!0)},remove:function(t,e,i,n,r){var o,s,a,l,c,u,h,d,p,f,g,m=$t.hasData(t)&&$t.get(t);if(m&&(l=m.events)){for(e=(e||"").match(Ht)||[""],c=e.length;c--;)if(a=ce.exec(e[c])||[],p=g=a[1],f=(a[2]||"").split(".").sort(),p){for(h=Ct.event.special[p]||{},p=(n?h.delegateType:h.bindType)||p,d=l[p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=d.length;o--;)u=d[o],!r&&g!==u.origType||i&&i.guid!==u.guid||a&&!a.test(u.namespace)||n&&n!==u.selector&&("**"!==n||!u.selector)||(d.splice(o,1),u.selector&&d.delegateCount--,h.remove&&h.remove.call(t,u));s&&!d.length&&(h.teardown&&h.teardown.call(t,f,m.handle)!==!1||Ct.removeEvent(t,p,m.handle),delete l[p])}else for(p in l)Ct.event.remove(t,p+e[c],i,n,!0);Ct.isEmptyObject(l)&&$t.remove(t,"handle events")}},dispatch:function(t){var e,i,n,r,o,s,a=Ct.event.fix(t),l=new Array(arguments.length),c=($t.get(this,"events")||{})[a.type]||[],u=Ct.event.special[a.type]||{};for(l[0]=a,e=1;e<arguments.length;e++)l[e]=arguments[e];if(a.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,a)!==!1){for(s=Ct.event.handlers.call(this,a,c),e=0;(r=s[e++])&&!a.isPropagationStopped();)for(a.currentTarget=r.elem,i=0;(o=r.handlers[i++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&o.namespace!==!1&&!a.rnamespace.test(o.namespace)||(a.handleObj=o,a.data=o.data,n=((Ct.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,l),void 0!==n&&(a.result=n)===!1&&(a.preventDefault(),a.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,a),a.result}},handlers:function(t,e){var i,n,r,o,s,a=[],l=e.delegateCount,c=t.target;if(l&&c.nodeType&&!("click"===t.type&&t.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||c.disabled!==!0)){for(o=[],s={},i=0;i<l;i++)n=e[i],r=n.selector+" ",void 0===s[r]&&(s[r]=n.needsContext?Ct(r,this).index(c)>-1:Ct.find(r,this,null,[c]).length),s[r]&&o.push(n);o.length&&a.push({elem:c,handlers:o})}return c=this,l<e.length&&a.push({elem:c,handlers:e.slice(l)}),a},addProp:function(t,e){Object.defineProperty(Ct.Event.prototype,t,{enumerable:!0,configurable:!0,get:wt(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[Ct.expando]?t:new Ct.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return ie.test(e.type)&&e.click&&o(e,"input")&&A(e,"click",C),!1},trigger:function(t){var e=this||t;return ie.test(e.type)&&e.click&&o(e,"input")&&A(e,"click"),!0},_default:function(t){var e=t.target;return ie.test(e.type)&&e.click&&o(e,"input")&&$t.get(e,"click")||o(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},Ct.removeEvent=function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i)},Ct.Event=function(t,e){return this instanceof Ct.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&t.returnValue===!1?C:T,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&Ct.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),void(this[Ct.expando]=!0)):new Ct.Event(t,e)},Ct.Event.prototype={constructor:Ct.Event,isDefaultPrevented:T,isPropagationStopped:T,isImmediatePropagationStopped:T,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=C,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=C,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=C,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},Ct.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(t){var e=t.button;return null==t.which&&ae.test(t.type)?null!=t.charCode?t.charCode:t.keyCode:!t.which&&void 0!==e&&le.test(t.type)?1&e?1:2&e?3:4&e?2:0:t.which}},Ct.event.addProp),Ct.each({focus:"focusin",blur:"focusout"},function(t,e){Ct.event.special[t]={setup:function(){return A(this,t,S),!1},trigger:function(){return A(this,t),!0},delegateType:e}}),Ct.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){Ct.event.special[t]={delegateType:e,bindType:e,handle:function(t){var i,n=this,r=t.relatedTarget,o=t.handleObj;return r&&(r===n||Ct.contains(n,r))||(t.type=o.origType,i=o.handler.apply(this,arguments),t.type=e),i}}}),Ct.fn.extend({on:function(t,e,i,n){return M(this,t,e,i,n)},one:function(t,e,i,n){return M(this,t,e,i,n,1)},off:function(t,e,i){var n,r;if(t&&t.preventDefault&&t.handleObj)return n=t.handleObj,Ct(t.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof t){for(r in t)this.off(r,e,t[r]);return this}return e!==!1&&"function"!=typeof e||(i=e,e=void 0),i===!1&&(i=T),this.each(function(){Ct.event.remove(this,t,i,e)})}});var ue=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,he=/<script|<style|<link/i,de=/checked\s*(?:[^=]|=\s*.checked.)/i,pe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;Ct.extend({htmlPrefilter:function(t){return t.replace(ue,"<$1></$2>")},clone:function(t,e,i){var n,r,o,s,a=t.cloneNode(!0),l=Qt(t);if(!(bt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||Ct.isXMLDoc(t)))for(s=_(a),o=_(t),n=0,r=o.length;n<r;n++)N(o[n],s[n]);if(e)if(i)for(o=o||_(t),s=s||_(a),n=0,r=o.length;n<r;n++)L(o[n],s[n]);else L(t,a);return s=_(a,"script"),s.length>0&&x(s,!l&&_(t,"script")),a},cleanData:function(t){for(var e,i,n,r=Ct.event.special,o=0;void 0!==(i=t[o]);o++)if(Bt(i)){if(e=i[$t.expando]){if(e.events)for(n in e.events)r[n]?Ct.event.remove(i,n):Ct.removeEvent(i,n,e.handle);i[$t.expando]=void 0}i[qt.expando]&&(i[qt.expando]=void 0)}}}),Ct.fn.extend({detach:function(t){return H(this,t,!0)},remove:function(t){return H(this,t)},text:function(t){return Rt(this,function(t){return void 0===t?Ct.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return O(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=P(this,t);e.appendChild(t)}})},prepend:function(){return O(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=P(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return O(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return O(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(Ct.cleanData(_(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return Ct.clone(this,t,e)})},html:function(t){return Rt(this,function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!he.test(t)&&!oe[(ne.exec(t)||["",""])[1].toLowerCase()]){t=Ct.htmlPrefilter(t);try{for(;i<n;i++)e=this[i]||{},1===e.nodeType&&(Ct.cleanData(_(e,!1)),e.innerHTML=t);e=0}catch(r){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return O(this,arguments,function(e){var i=this.parentNode;Ct.inArray(this,t)<0&&(Ct.cleanData(_(this)),i&&i.replaceChild(e,this))},t)}}),Ct.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){Ct.fn[t]=function(t){for(var i,n=[],r=Ct(t),o=r.length-1,s=0;s<=o;s++)i=s===o?this:this.clone(!0),Ct(r[s])[e](i),dt.apply(n,i.get());return this.pushStack(n)}});var fe=new RegExp("^("+Xt+")(?!px)[a-z%]+$","i"),ge=function(e){var i=e.ownerDocument.defaultView;return i&&i.opener||(i=t),i.getComputedStyle(e)},me=new RegExp(Vt.join("|"),"i");!function(){function e(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Gt.appendChild(l).appendChild(c);var e=t.getComputedStyle(c);n="1%"!==e.top,a=12===i(e.marginLeft),c.style.right="60%",s=36===i(e.right),r=36===i(e.width),c.style.position="absolute",o=12===i(c.offsetWidth/3),Gt.removeChild(l),c=null}}function i(t){return Math.round(parseFloat(t))}var n,r,o,s,a,l=lt.createElement("div"),c=lt.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",bt.clearCloneStyle="content-box"===c.style.backgroundClip,Ct.extend(bt,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),s},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),a},scrollboxSize:function(){return e(),o}}))}();var ve=["Webkit","Moz","ms"],ye=lt.createElement("div").style,be={},we=/^(none|table(?!-c[ea]).+)/,_e=/^--/,xe={position:"absolute",visibility:"hidden",display:"block"},ke={letterSpacing:"0",fontWeight:"400"};Ct.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=W(t,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,s,a=f(e),l=_e.test(e),c=t.style;return l||(e=F(a)),s=Ct.cssHooks[e]||Ct.cssHooks[a],void 0===i?s&&"get"in s&&void 0!==(r=s.get(t,!1,n))?r:c[e]:(o=typeof i,"string"===o&&(r=Kt.exec(i))&&r[1]&&(i=y(t,e,r),o="number"),null!=i&&i===i&&("number"!==o||l||(i+=r&&r[3]||(Ct.cssNumber[a]?"":"px")),bt.clearCloneStyle||""!==i||0!==e.indexOf("background")||(c[e]="inherit"),s&&"set"in s&&void 0===(i=s.set(t,i,n))||(l?c.setProperty(e,i):c[e]=i)),void 0)}},css:function(t,e,i,n){var r,o,s,a=f(e),l=_e.test(e);return l||(e=F(a)),s=Ct.cssHooks[e]||Ct.cssHooks[a],s&&"get"in s&&(r=s.get(t,!0,i)),void 0===r&&(r=W(t,e,n)),"normal"===r&&e in ke&&(r=ke[e]),""===i||i?(o=parseFloat(r),i===!0||isFinite(o)?o||0:r):r}}),Ct.each(["height","width"],function(t,e){Ct.cssHooks[e]={get:function(t,i,n){if(i)return!we.test(Ct.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?$(t,e,n):te(t,xe,function(){return $(t,e,n)})},set:function(t,i,n){var r,o=ge(t),s=!bt.scrollboxSize()&&"absolute"===o.position,a=s||n,l=a&&"border-box"===Ct.css(t,"boxSizing",!1,o),c=n?B(t,e,n,l,o):0;return l&&s&&(c-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-B(t,e,"border",!1,o)-.5)),c&&(r=Kt.exec(i))&&"px"!==(r[3]||"px")&&(t.style[e]=i,i=Ct.css(t,e)),j(t,i,c)}}}),Ct.cssHooks.marginLeft=z(bt.reliableMarginLeft,function(t,e){if(e)return(parseFloat(W(t,"marginLeft"))||t.getBoundingClientRect().left-te(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),Ct.each({margin:"",padding:"",border:"Width"},function(t,e){Ct.cssHooks[t+e]={expand:function(i){for(var n=0,r={},o="string"==typeof i?i.split(" "):[i];n<4;n++)r[t+Vt[n]+e]=o[n]||o[n-2]||o[0];return r}},"margin"!==t&&(Ct.cssHooks[t+e].set=j)}),Ct.fn.extend({css:function(t,e){return Rt(this,function(t,e,i){var n,r,o={},s=0;if(Array.isArray(e)){for(n=ge(t),r=e.length;s<r;s++)o[e[s]]=Ct.css(t,e[s],!1,n);return o}return void 0!==i?Ct.style(t,e,i):Ct.css(t,e)},t,e,arguments.length>1)}}),Ct.Tween=q,q.prototype={constructor:q,init:function(t,e,i,n,r,o){this.elem=t,this.prop=i,this.easing=r||Ct.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=o||(Ct.cssNumber[i]?"":"px")},cur:function(){var t=q.propHooks[this.prop];return t&&t.get?t.get(this):q.propHooks._default.get(this)},run:function(t){var e,i=q.propHooks[this.prop];return this.options.duration?this.pos=e=Ct.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):q.propHooks._default.set(this),this}},q.prototype.init.prototype=q.prototype,q.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=Ct.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){Ct.fx.step[t.prop]?Ct.fx.step[t.prop](t):1!==t.elem.nodeType||!Ct.cssHooks[t.prop]&&null==t.elem.style[F(t.prop)]?t.elem[t.prop]=t.now:Ct.style(t.elem,t.prop,t.now+t.unit)}}},q.propHooks.scrollTop=q.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},Ct.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},Ct.fx=q.prototype.init,Ct.fx.step={};var Ce,Te,Se=/^(?:toggle|show|hide)$/,De=/queueHooks$/;Ct.Animation=Ct.extend(Q,{tweeners:{"*":[function(t,e){var i=this.createTween(t,e);return y(i.elem,t,Kt.exec(e),i),i}]},tweener:function(t,e){wt(t)?(e=t,t=["*"]):t=t.match(Ht);for(var i,n=0,r=t.length;n<r;n++)i=t[n],Q.tweeners[i]=Q.tweeners[i]||[],Q.tweeners[i].unshift(e)},prefilters:[V],prefilter:function(t,e){e?Q.prefilters.unshift(t):Q.prefilters.push(t)}}),Ct.speed=function(t,e,i){var n=t&&"object"==typeof t?Ct.extend({},t):{complete:i||!i&&e||wt(t)&&t,duration:t,easing:i&&e||e&&!wt(e)&&e};return Ct.fx.off?n.duration=0:"number"!=typeof n.duration&&(n.duration in Ct.fx.speeds?n.duration=Ct.fx.speeds[n.duration]:n.duration=Ct.fx.speeds._default),null!=n.queue&&n.queue!==!0||(n.queue="fx"),n.old=n.complete,n.complete=function(){wt(n.old)&&n.old.call(this),n.queue&&Ct.dequeue(this,n.queue)},n},Ct.fn.extend({fadeTo:function(t,e,i,n){return this.filter(Jt).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var r=Ct.isEmptyObject(t),o=Ct.speed(e,i,n),s=function(){var e=Q(this,Ct.extend({},t),o);(r||$t.get(this,"finish"))&&e.stop(!0)};return s.finish=s,r||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(t,e,i){var n=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,r=null!=t&&t+"queueHooks",o=Ct.timers,s=$t.get(this);if(r)s[r]&&s[r].stop&&n(s[r]);else for(r in s)s[r]&&s[r].stop&&De.test(r)&&n(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=t&&o[r].queue!==t||(o[r].anim.stop(i),e=!1,o.splice(r,1));!e&&i||Ct.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,i=$t.get(this),n=i[t+"queue"],r=i[t+"queueHooks"],o=Ct.timers,s=n?n.length:0;for(i.finish=!0,Ct.queue(this,t,[]),r&&r.stop&&r.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<s;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish})}}),Ct.each(["toggle","show","hide"],function(t,e){var i=Ct.fn[e];Ct.fn[e]=function(t,n,r){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(X(e,!0),t,n,r)}}),Ct.each({slideDown:X("show"),slideUp:X("hide"),slideToggle:X("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){Ct.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}}),Ct.timers=[],Ct.fx.tick=function(){var t,e=0,i=Ct.timers;for(Ce=Date.now();e<i.length;e++)t=i[e],t()||i[e]!==t||i.splice(e--,1);i.length||Ct.fx.stop(),Ce=void 0},Ct.fx.timer=function(t){Ct.timers.push(t),Ct.fx.start()},Ct.fx.interval=13,Ct.fx.start=function(){Te||(Te=!0,Y())},Ct.fx.stop=function(){Te=null},Ct.fx.speeds={slow:600,fast:200,_default:400},Ct.fn.delay=function(e,i){return e=Ct.fx?Ct.fx.speeds[e]||e:e,i=i||"fx",this.queue(i,function(i,n){var r=t.setTimeout(i,e);n.stop=function(){t.clearTimeout(r)}})},function(){var t=lt.createElement("input"),e=lt.createElement("select"),i=e.appendChild(lt.createElement("option"));t.type="checkbox",bt.checkOn=""!==t.value,bt.optSelected=i.selected,t=lt.createElement("input"),t.value="t",t.type="radio",bt.radioValue="t"===t.value}();var Me,Ae=Ct.expr.attrHandle;Ct.fn.extend({attr:function(t,e){return Rt(this,Ct.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){Ct.removeAttr(this,t)})}}),Ct.extend({attr:function(t,e,i){var n,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof t.getAttribute?Ct.prop(t,e,i):(1===o&&Ct.isXMLDoc(t)||(r=Ct.attrHooks[e.toLowerCase()]||(Ct.expr.match.bool.test(e)?Me:void 0)),void 0!==i?null===i?void Ct.removeAttr(t,e):r&&"set"in r&&void 0!==(n=r.set(t,i,e))?n:(t.setAttribute(e,i+""),i):r&&"get"in r&&null!==(n=r.get(t,e))?n:(n=Ct.find.attr(t,e),null==n?void 0:n))},attrHooks:{type:{set:function(t,e){if(!bt.radioValue&&"radio"===e&&o(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,n=0,r=e&&e.match(Ht);if(r&&1===t.nodeType)for(;i=r[n++];)t.removeAttribute(i)}}),Me={set:function(t,e,i){return e===!1?Ct.removeAttr(t,i):t.setAttribute(i,i),i}},Ct.each(Ct.expr.match.bool.source.match(/\w+/g),function(t,e){var i=Ae[e]||Ct.find.attr;Ae[e]=function(t,e,n){var r,o,s=e.toLowerCase();return n||(o=Ae[s],Ae[s]=r,r=null!=i(t,e,n)?s:null,Ae[s]=o),r}});var Pe=/^(?:input|select|textarea|button)$/i,Ie=/^(?:a|area)$/i;Ct.fn.extend({prop:function(t,e){return Rt(this,Ct.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[Ct.propFix[t]||t]})}}),Ct.extend({prop:function(t,e,i){var n,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&Ct.isXMLDoc(t)||(e=Ct.propFix[e]||e,r=Ct.propHooks[e]),void 0!==i?r&&"set"in r&&void 0!==(n=r.set(t,i,e))?n:t[e]=i:r&&"get"in r&&null!==(n=r.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=Ct.find.attr(t,"tabindex");return e?parseInt(e,10):Pe.test(t.nodeName)||Ie.test(t.nodeName)&&t.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),bt.optSelected||(Ct.propHooks.selected={get:function(t){var e=t.parentNode;
return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),Ct.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Ct.propFix[this.toLowerCase()]=this}),Ct.fn.extend({addClass:function(t){var e,i,n,r,o,s,a,l=0;if(wt(t))return this.each(function(e){Ct(this).addClass(t.call(this,e,J(this)))});if(e=tt(t),e.length)for(;i=this[l++];)if(r=J(i),n=1===i.nodeType&&" "+Z(r)+" "){for(s=0;o=e[s++];)n.indexOf(" "+o+" ")<0&&(n+=o+" ");a=Z(n),r!==a&&i.setAttribute("class",a)}return this},removeClass:function(t){var e,i,n,r,o,s,a,l=0;if(wt(t))return this.each(function(e){Ct(this).removeClass(t.call(this,e,J(this)))});if(!arguments.length)return this.attr("class","");if(e=tt(t),e.length)for(;i=this[l++];)if(r=J(i),n=1===i.nodeType&&" "+Z(r)+" "){for(s=0;o=e[s++];)for(;n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");a=Z(n),r!==a&&i.setAttribute("class",a)}return this},toggleClass:function(t,e){var i=typeof t,n="string"===i||Array.isArray(t);return"boolean"==typeof e&&n?e?this.addClass(t):this.removeClass(t):wt(t)?this.each(function(i){Ct(this).toggleClass(t.call(this,i,J(this),e),e)}):this.each(function(){var e,r,o,s;if(n)for(r=0,o=Ct(this),s=tt(t);e=s[r++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==i||(e=J(this),e&&$t.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||t===!1?"":$t.get(this,"__className__")||""))})},hasClass:function(t){var e,i,n=0;for(e=" "+t+" ";i=this[n++];)if(1===i.nodeType&&(" "+Z(J(i))+" ").indexOf(e)>-1)return!0;return!1}});var Ee=/\r/g;Ct.fn.extend({val:function(t){var e,i,n,r=this[0];{if(arguments.length)return n=wt(t),this.each(function(i){var r;1===this.nodeType&&(r=n?t.call(this,i,Ct(this).val()):t,null==r?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=Ct.map(r,function(t){return null==t?"":t+""})),e=Ct.valHooks[this.type]||Ct.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))});if(r)return e=Ct.valHooks[r.type]||Ct.valHooks[r.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(i=e.get(r,"value"))?i:(i=r.value,"string"==typeof i?i.replace(Ee,""):null==i?"":i)}}}),Ct.extend({valHooks:{option:{get:function(t){var e=Ct.find.attr(t,"value");return null!=e?e:Z(Ct.text(t))}},select:{get:function(t){var e,i,n,r=t.options,s=t.selectedIndex,a="select-one"===t.type,l=a?null:[],c=a?s+1:r.length;for(n=s<0?c:a?s:0;n<c;n++)if(i=r[n],(i.selected||n===s)&&!i.disabled&&(!i.parentNode.disabled||!o(i.parentNode,"optgroup"))){if(e=Ct(i).val(),a)return e;l.push(e)}return l},set:function(t,e){for(var i,n,r=t.options,o=Ct.makeArray(e),s=r.length;s--;)n=r[s],(n.selected=Ct.inArray(Ct.valHooks.option.get(n),o)>-1)&&(i=!0);return i||(t.selectedIndex=-1),o}}}}),Ct.each(["radio","checkbox"],function(){Ct.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=Ct.inArray(Ct(t).val(),e)>-1}},bt.checkOn||(Ct.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),bt.focusin="onfocusin"in t;var Le=/^(?:focusinfocus|focusoutblur)$/,Ne=function(t){t.stopPropagation()};Ct.extend(Ct.event,{trigger:function(e,i,n,r){var o,s,a,l,c,u,h,d,p=[n||lt],f=mt.call(e,"type")?e.type:e,g=mt.call(e,"namespace")?e.namespace.split("."):[];if(s=d=a=n=n||lt,3!==n.nodeType&&8!==n.nodeType&&!Le.test(f+Ct.event.triggered)&&(f.indexOf(".")>-1&&(g=f.split("."),f=g.shift(),g.sort()),c=f.indexOf(":")<0&&"on"+f,e=e[Ct.expando]?e:new Ct.Event(f,"object"==typeof e&&e),e.isTrigger=r?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),i=null==i?[e]:Ct.makeArray(i,[e]),h=Ct.event.special[f]||{},r||!h.trigger||h.trigger.apply(n,i)!==!1)){if(!r&&!h.noBubble&&!_t(n)){for(l=h.delegateType||f,Le.test(l+f)||(s=s.parentNode);s;s=s.parentNode)p.push(s),a=s;a===(n.ownerDocument||lt)&&p.push(a.defaultView||a.parentWindow||t)}for(o=0;(s=p[o++])&&!e.isPropagationStopped();)d=s,e.type=o>1?l:h.bindType||f,u=($t.get(s,"events")||{})[e.type]&&$t.get(s,"handle"),u&&u.apply(s,i),u=c&&s[c],u&&u.apply&&Bt(s)&&(e.result=u.apply(s,i),e.result===!1&&e.preventDefault());return e.type=f,r||e.isDefaultPrevented()||h._default&&h._default.apply(p.pop(),i)!==!1||!Bt(n)||c&&wt(n[f])&&!_t(n)&&(a=n[c],a&&(n[c]=null),Ct.event.triggered=f,e.isPropagationStopped()&&d.addEventListener(f,Ne),n[f](),e.isPropagationStopped()&&d.removeEventListener(f,Ne),Ct.event.triggered=void 0,a&&(n[c]=a)),e.result}},simulate:function(t,e,i){var n=Ct.extend(new Ct.Event,i,{type:t,isSimulated:!0});Ct.event.trigger(n,null,e)}}),Ct.fn.extend({trigger:function(t,e){return this.each(function(){Ct.event.trigger(t,e,this)})},triggerHandler:function(t,e){var i=this[0];if(i)return Ct.event.trigger(t,e,i,!0)}}),bt.focusin||Ct.each({focus:"focusin",blur:"focusout"},function(t,e){var i=function(t){Ct.event.simulate(e,t.target,Ct.event.fix(t))};Ct.event.special[e]={setup:function(){var n=this.ownerDocument||this,r=$t.access(n,e);r||n.addEventListener(t,i,!0),$t.access(n,e,(r||0)+1)},teardown:function(){var n=this.ownerDocument||this,r=$t.access(n,e)-1;r?$t.access(n,e,r):(n.removeEventListener(t,i,!0),$t.remove(n,e))}}});var Oe=t.location,He=Date.now(),We=/\?/;Ct.parseXML=function(e){var i;if(!e||"string"!=typeof e)return null;try{i=(new t.DOMParser).parseFromString(e,"text/xml")}catch(n){i=void 0}return i&&!i.getElementsByTagName("parsererror").length||Ct.error("Invalid XML: "+e),i};var ze=/\[\]$/,Re=/\r?\n/g,Fe=/^(?:submit|button|image|reset|file)$/i,je=/^(?:input|select|textarea|keygen)/i;Ct.param=function(t,e){var i,n=[],r=function(t,e){var i=wt(e)?e():e;n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==i?"":i)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!Ct.isPlainObject(t))Ct.each(t,function(){r(this.name,this.value)});else for(i in t)et(i,t[i],e,r);return n.join("&")},Ct.fn.extend({serialize:function(){return Ct.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=Ct.prop(this,"elements");return t?Ct.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!Ct(this).is(":disabled")&&je.test(this.nodeName)&&!Fe.test(t)&&(this.checked||!ie.test(t))}).map(function(t,e){var i=Ct(this).val();return null==i?null:Array.isArray(i)?Ct.map(i,function(t){return{name:e.name,value:t.replace(Re,"\r\n")}}):{name:e.name,value:i.replace(Re,"\r\n")}}).get()}});var Be=/%20/g,$e=/#.*$/,qe=/([?&])_=[^&]*/,Ye=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ue=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Xe=/^(?:GET|HEAD)$/,Ke=/^\/\//,Ve={},Ge={},Qe="*/".concat("*"),Ze=lt.createElement("a");Ze.href=Oe.href,Ct.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Oe.href,type:"GET",isLocal:Ue.test(Oe.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qe,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":Ct.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?rt(rt(t,Ct.ajaxSettings),e):rt(Ct.ajaxSettings,t)},ajaxPrefilter:it(Ve),ajaxTransport:it(Ge),ajax:function(e,i){function n(e,i,n,a){var c,d,p,w,_,x=i;u||(u=!0,l&&t.clearTimeout(l),r=void 0,s=a||"",k.readyState=e>0?4:0,c=e>=200&&e<300||304===e,n&&(w=ot(f,k,n)),w=st(f,w,k,c),c?(f.ifModified&&(_=k.getResponseHeader("Last-Modified"),_&&(Ct.lastModified[o]=_),_=k.getResponseHeader("etag"),_&&(Ct.etag[o]=_)),204===e||"HEAD"===f.type?x="nocontent":304===e?x="notmodified":(x=w.state,d=w.data,p=w.error,c=!p)):(p=x,!e&&x||(x="error",e<0&&(e=0))),k.status=e,k.statusText=(i||x)+"",c?v.resolveWith(g,[d,x,k]):v.rejectWith(g,[k,x,p]),k.statusCode(b),b=void 0,h&&m.trigger(c?"ajaxSuccess":"ajaxError",[k,f,c?d:p]),y.fireWith(g,[k,x]),h&&(m.trigger("ajaxComplete",[k,f]),--Ct.active||Ct.event.trigger("ajaxStop")))}"object"==typeof e&&(i=e,e=void 0),i=i||{};var r,o,s,a,l,c,u,h,d,p,f=Ct.ajaxSetup({},i),g=f.context||f,m=f.context&&(g.nodeType||g.jquery)?Ct(g):Ct.event,v=Ct.Deferred(),y=Ct.Callbacks("once memory"),b=f.statusCode||{},w={},_={},x="canceled",k={readyState:0,getResponseHeader:function(t){var e;if(u){if(!a)for(a={};e=Ye.exec(s);)a[e[1].toLowerCase()+" "]=(a[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=a[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return u?s:null},setRequestHeader:function(t,e){return null==u&&(t=_[t.toLowerCase()]=_[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==u&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(u)k.always(t[k.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||x;return r&&r.abort(e),n(0,e),this}};if(v.promise(k),f.url=((e||f.url||Oe.href)+"").replace(Ke,Oe.protocol+"//"),f.type=i.method||i.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(Ht)||[""],null==f.crossDomain){c=lt.createElement("a");try{c.href=f.url,c.href=c.href,f.crossDomain=Ze.protocol+"//"+Ze.host!=c.protocol+"//"+c.host}catch(C){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=Ct.param(f.data,f.traditional)),nt(Ve,f,i,k),u)return k;h=Ct.event&&f.global,h&&0===Ct.active++&&Ct.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Xe.test(f.type),o=f.url.replace($e,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Be,"+")):(p=f.url.slice(o.length),f.data&&(f.processData||"string"==typeof f.data)&&(o+=(We.test(o)?"&":"?")+f.data,delete f.data),f.cache===!1&&(o=o.replace(qe,"$1"),p=(We.test(o)?"&":"?")+"_="+He++ +p),f.url=o+p),f.ifModified&&(Ct.lastModified[o]&&k.setRequestHeader("If-Modified-Since",Ct.lastModified[o]),Ct.etag[o]&&k.setRequestHeader("If-None-Match",Ct.etag[o])),(f.data&&f.hasContent&&f.contentType!==!1||i.contentType)&&k.setRequestHeader("Content-Type",f.contentType),k.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Qe+"; q=0.01":""):f.accepts["*"]);for(d in f.headers)k.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(f.beforeSend.call(g,k,f)===!1||u))return k.abort();if(x="abort",y.add(f.complete),k.done(f.success),k.fail(f.error),r=nt(Ge,f,i,k)){if(k.readyState=1,h&&m.trigger("ajaxSend",[k,f]),u)return k;f.async&&f.timeout>0&&(l=t.setTimeout(function(){k.abort("timeout")},f.timeout));try{u=!1,r.send(w,n)}catch(C){if(u)throw C;n(-1,C)}}else n(-1,"No Transport");return k},getJSON:function(t,e,i){return Ct.get(t,e,i,"json")},getScript:function(t,e){return Ct.get(t,void 0,e,"script")}}),Ct.each(["get","post"],function(t,e){Ct[e]=function(t,i,n,r){return wt(i)&&(r=r||n,n=i,i=void 0),Ct.ajax(Ct.extend({url:t,type:e,dataType:r,data:i,success:n},Ct.isPlainObject(t)&&t))}}),Ct._evalUrl=function(t,e){return Ct.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){Ct.globalEval(t,e)}})},Ct.fn.extend({wrapAll:function(t){var e;return this[0]&&(wt(t)&&(t=t.call(this[0])),e=Ct(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return wt(t)?this.each(function(e){Ct(this).wrapInner(t.call(this,e))}):this.each(function(){var e=Ct(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=wt(t);return this.each(function(i){Ct(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){Ct(this).replaceWith(this.childNodes)}),this}}),Ct.expr.pseudos.hidden=function(t){return!Ct.expr.pseudos.visible(t)},Ct.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},Ct.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(e){}};var Je={0:200,1223:204},ti=Ct.ajaxSettings.xhr();bt.cors=!!ti&&"withCredentials"in ti,bt.ajax=ti=!!ti,Ct.ajaxTransport(function(e){var i,n;if(bt.cors||ti&&!e.crossDomain)return{send:function(r,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(s in r)a.setRequestHeader(s,r[s]);i=function(t){return function(){i&&(i=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Je[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=i(),n=a.onerror=a.ontimeout=i("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&t.setTimeout(function(){i&&n()})},i=i("abort");try{a.send(e.hasContent&&e.data||null)}catch(l){if(i)throw l}},abort:function(){i&&i()}}}),Ct.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),Ct.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return Ct.globalEval(t),t}}}),Ct.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),Ct.ajaxTransport("script",function(t){if(t.crossDomain||t.scriptAttrs){var e,i;return{send:function(n,r){e=Ct("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",i=function(t){e.remove(),i=null,t&&r("error"===t.type?404:200,t.type)}),lt.head.appendChild(e[0])},abort:function(){i&&i()}}}});var ei=[],ii=/(=)\?(?=&|$)|\?\?/;Ct.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=ei.pop()||Ct.expando+"_"+He++;return this[t]=!0,t}}),Ct.ajaxPrefilter("json jsonp",function(e,i,n){var r,o,s,a=e.jsonp!==!1&&(ii.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&ii.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=wt(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(ii,"$1"+r):e.jsonp!==!1&&(e.url+=(We.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return s||Ct.error(r+" was not called"),s[0]},e.dataTypes[0]="json",o=t[r],t[r]=function(){s=arguments},n.always(function(){void 0===o?Ct(t).removeProp(r):t[r]=o,e[r]&&(e.jsonpCallback=i.jsonpCallback,ei.push(r)),s&&wt(o)&&o(s[0]),s=o=void 0}),"script"}),bt.createHTMLDocument=function(){var t=lt.implementation.createHTMLDocument("").body;return t.innerHTML="<form></form><form></form>",2===t.childNodes.length}(),Ct.parseHTML=function(t,e,i){if("string"!=typeof t)return[];"boolean"==typeof e&&(i=e,e=!1);var n,r,o;return e||(bt.createHTMLDocument?(e=lt.implementation.createHTMLDocument(""),n=e.createElement("base"),n.href=lt.location.href,e.head.appendChild(n)):e=lt),r=Pt.exec(t),o=!i&&[],r?[e.createElement(r[1])]:(r=k([t],e,o),o&&o.length&&Ct(o).remove(),Ct.merge([],r.childNodes))},Ct.fn.load=function(t,e,i){var n,r,o,s=this,a=t.indexOf(" ");return a>-1&&(n=Z(t.slice(a)),t=t.slice(0,a)),wt(e)?(i=e,e=void 0):e&&"object"==typeof e&&(r="POST"),s.length>0&&Ct.ajax({url:t,type:r||"GET",dataType:"html",data:e}).done(function(t){o=arguments,s.html(n?Ct("<div>").append(Ct.parseHTML(t)).find(n):t)}).always(i&&function(t,e){s.each(function(){i.apply(this,o||[t.responseText,e,t])})}),this},Ct.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){Ct.fn[e]=function(t){return this.on(e,t)}}),Ct.expr.pseudos.animated=function(t){return Ct.grep(Ct.timers,function(e){return t===e.elem}).length},Ct.offset={setOffset:function(t,e,i){var n,r,o,s,a,l,c,u=Ct.css(t,"position"),h=Ct(t),d={};"static"===u&&(t.style.position="relative"),a=h.offset(),o=Ct.css(t,"top"),l=Ct.css(t,"left"),c=("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1,c?(n=h.position(),s=n.top,r=n.left):(s=parseFloat(o)||0,r=parseFloat(l)||0),wt(e)&&(e=e.call(t,i,Ct.extend({},a))),null!=e.top&&(d.top=e.top-a.top+s),null!=e.left&&(d.left=e.left-a.left+r),"using"in e?e.using.call(t,d):h.css(d)}},Ct.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){Ct.offset.setOffset(this,t,e)});var e,i,n=this[0];if(n)return n.getClientRects().length?(e=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:e.top+i.pageYOffset,left:e.left+i.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var t,e,i,n=this[0],r={top:0,left:0};if("fixed"===Ct.css(n,"position"))e=n.getBoundingClientRect();else{for(e=this.offset(),i=n.ownerDocument,t=n.offsetParent||i.documentElement;t&&(t===i.body||t===i.documentElement)&&"static"===Ct.css(t,"position");)t=t.parentNode;t&&t!==n&&1===t.nodeType&&(r=Ct(t).offset(),r.top+=Ct.css(t,"borderTopWidth",!0),r.left+=Ct.css(t,"borderLeftWidth",!0))}return{top:e.top-r.top-Ct.css(n,"marginTop",!0),left:e.left-r.left-Ct.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===Ct.css(t,"position");)t=t.offsetParent;return t||Gt})}}),Ct.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var i="pageYOffset"===e;Ct.fn[t]=function(n){return Rt(this,function(t,n,r){var o;return _t(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===r?o?o[e]:t[n]:void(o?o.scrollTo(i?o.pageXOffset:r,i?r:o.pageYOffset):t[n]=r)},t,n,arguments.length)}}),Ct.each(["top","left"],function(t,e){Ct.cssHooks[e]=z(bt.pixelPosition,function(t,i){if(i)return i=W(t,e),fe.test(i)?Ct(t).position()[e]+"px":i})}),Ct.each({Height:"height",Width:"width"},function(t,e){Ct.each({padding:"inner"+t,content:e,"":"outer"+t},function(i,n){Ct.fn[n]=function(r,o){var s=arguments.length&&(i||"boolean"!=typeof r),a=i||(r===!0||o===!0?"margin":"border");return Rt(this,function(e,i,r){var o;return _t(e)?0===n.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===r?Ct.css(e,i,a):Ct.style(e,i,r,a)},e,s?r:void 0,s)}})}),Ct.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,e){Ct.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}),Ct.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),Ct.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)}}),Ct.proxy=function(t,e){var i,n,r;if("string"==typeof e&&(i=t[e],e=t,t=i),wt(t))return n=ut.call(arguments,2),r=function(){return t.apply(e||this,n.concat(ut.call(arguments)))},r.guid=t.guid=t.guid||Ct.guid++,r},Ct.holdReady=function(t){t?Ct.readyWait++:Ct.ready(!0)},Ct.isArray=Array.isArray,Ct.parseJSON=JSON.parse,Ct.nodeName=o,Ct.isFunction=wt,Ct.isWindow=_t,Ct.camelCase=f,Ct.type=n,Ct.now=Date.now,Ct.isNumeric=function(t){var e=Ct.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return Ct});var ni=t.jQuery,ri=t.$;return Ct.noConflict=function(e){return t.$===Ct&&(t.$=ri),e&&t.jQuery===Ct&&(t.jQuery=ni),Ct},e||(t.jQuery=t.$=Ct),Ct}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}function i(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=r(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function r(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&t(this).removeClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,o)}function o(){t.datepicker._isDisabledDatepicker(m.inline?m.dpDiv.parent()[0]:m.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&t(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&t(this).addClass("ui-datepicker-next-hover"))}function s(e,i){t.extend(e,i);for(var n in i)null==i[n]&&(e[n]=i[n]);return e}function a(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{};var l=(t.ui.version="1.12.1",0),c=Array.prototype.slice;t.cleanData=function(e){return function(i){var n,r,o;for(o=0;null!=(r=i[o]);o++)try{n=t._data(r,"events"),n&&n.remove&&t(r).triggerHandler("remove")}catch(s){}e(i)}}(t.cleanData),t.widget=function(e,i,n){var r,o,s,a={},l=e.split(".")[0];e=e.split(".")[1];var c=l+"-"+e;return n||(n=i,i=t.Widget),t.isArray(n)&&(n=t.extend.apply(null,[{}].concat(n))),t.expr[":"][c.toLowerCase()]=function(e){return!!t.data(e,c)},t[l]=t[l]||{},r=t[l][e],o=t[l][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new o(t,e)},t.extend(o,r,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),s=new i,s.options=t.widget.extend({},s.options),t.each(n,function(e,n){return t.isFunction(n)?void(a[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function r(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=r,e=n.apply(this,arguments),this._super=i,this._superApply=o,e}}()):void(a[e]=n)}),o.prototype=t.widget.extend(s,{widgetEventPrefix:r?s.widgetEventPrefix||e:e},a,{constructor:o,namespace:l,widgetName:e,widgetFullName:c}),r?(t.each(r._childConstructors,function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,o,i._proto)}),delete r._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,n,r=c.call(arguments,1),o=0,s=r.length;o<s;o++)for(i in r[o])n=r[o][i],r[o].hasOwnProperty(i)&&void 0!==n&&(t.isPlainObject(n)?e[i]=t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):e[i]=n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(r){var o="string"==typeof r,s=c.call(arguments,1),a=this;return o?this.length||"instance"!==r?this.each(function(){var i,o=t.data(this,n);return"instance"===r?(a=o,!1):o?t.isFunction(o[r])&&"_"!==r.charAt(0)?(i=o[r].apply(o,s),i!==o&&void 0!==i?(a=i&&i.jquery?a.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+r+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+r+"'")}):a=void 0:(s.length&&(r=t.widget.extend.apply(null,[r].concat(s))),this.each(function(){var e=t.data(this,n);e?(e.option(r||{}),e._init&&e._init()):t.data(this,n,new i(r,this))})),a}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=l++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var n,r,o,s=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(s={},n=e.split("."),e=n.shift(),n.length){for(r=s[e]=t.widget.extend({},this.options[e]),o=0;o<n.length-1;o++)r[n[o]]=r[n[o]]||{},r=r[n[o]];if(e=n.pop(),1===arguments.length)return void 0===r[e]?null:r[e];r[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];s[e]=i}return this._setOptions(s),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,n,r;for(i in e)r=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&r&&r.length&&(n=t(r.get()),this._removeClass(r,i),n.addClass(this._classes({element:n,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var s,a;for(a=0;a<i.length;a++)s=r.classesElementLookup[i[a]]||t(),s=t(e.add?t.unique(s.get().concat(e.element.get())):s.not(e.element).get()),r.classesElementLookup[i[a]]=s,n.push(i[a]),o&&e.classes[i[a]]&&n.push(e.classes[i[a]])}var n=[],r=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(n,r){t.inArray(e.target,r)!==-1&&(i.classesElementLookup[n]=t(r.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){n="boolean"==typeof n?n:i;var r="string"==typeof t||null===t,o={extra:r?e:i,keys:r?t:e,element:r?this.element:t,add:n};return o.element.toggleClass(this._classes(o),n),this},_on:function(e,i,n){var r,o=this;"boolean"!=typeof e&&(n=i,i=e,e=!1),n?(i=r=t(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,r=this.widget()),t.each(n,function(n,s){function a(){if(e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof s?o[s]:s).apply(o,arguments)}"string"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||t.guid++);var l=n.match(/^([\w:-]*)\s*(.*)$/),c=l[1]+o.eventNamespace,u=l[2];u?r.on(c,u,a):i.on(c,a)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?n[t]:t).apply(n,arguments)}var n=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,n){var r,o,s=this.options[e];if(n=n||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(r in o)r in i||(i[r]=o[r]);return this.element.trigger(i,n),!(t.isFunction(s)&&s.apply(this.element[0],[i].concat(n))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(n,r,o){"string"==typeof r&&(r={effect:r});var s,a=r?r===!0||"number"==typeof r?i:r.effect||i:e;r=r||{},"number"==typeof r&&(r={duration:r}),s=!t.isEmptyObject(r),r.complete=o,r.delay&&n.delay(r.delay),s&&t.effects&&t.effects.effect[a]?n[e](r):a!==e&&n[a]?n[a](r.duration,r.easing,o):n.queue(function(i){t(this)[e](),o&&o.call(n[0]),i()})}});t.widget;!function(){function e(t,e,i){return[parseFloat(t[0])*(h.test(t[0])?e/100:1),parseFloat(t[1])*(h.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()
}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var r,o=Math.max,s=Math.abs,a=/left|center|right/,l=/top|center|bottom/,c=/[\+\-]\d+(\.[\d]+)?%?/,u=/^\w+/,h=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==r)return r;var e,i,n=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),e=o.offsetWidth,n.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=n[0].clientWidth),n.remove(),r=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),n=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),r="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===n||"auto"===n&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:r?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),n=t.isWindow(i[0]),r=!!i[0]&&9===i[0].nodeType,o=!n&&!r;return{element:i,isWindow:n,isDocument:r,offset:o?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(r){if(!r||!r.of)return d.apply(this,arguments);r=t.extend({},r);var h,p,f,g,m,v,y=t(r.of),b=t.position.getWithinInfo(r.within),w=t.position.getScrollInfo(b),_=(r.collision||"flip").split(" "),x={};return v=n(y),y[0].preventDefault&&(r.at="left top"),p=v.width,f=v.height,g=v.offset,m=t.extend({},g),t.each(["my","at"],function(){var t,e,i=(r[this]||"").split(" ");1===i.length&&(i=a.test(i[0])?i.concat(["center"]):l.test(i[0])?["center"].concat(i):["center","center"]),i[0]=a.test(i[0])?i[0]:"center",i[1]=l.test(i[1])?i[1]:"center",t=c.exec(i[0]),e=c.exec(i[1]),x[this]=[t?t[0]:0,e?e[0]:0],r[this]=[u.exec(i[0])[0],u.exec(i[1])[0]]}),1===_.length&&(_[1]=_[0]),"right"===r.at[0]?m.left+=p:"center"===r.at[0]&&(m.left+=p/2),"bottom"===r.at[1]?m.top+=f:"center"===r.at[1]&&(m.top+=f/2),h=e(x.at,p,f),m.left+=h[0],m.top+=h[1],this.each(function(){var n,a,l=t(this),c=l.outerWidth(),u=l.outerHeight(),d=i(this,"marginLeft"),v=i(this,"marginTop"),k=c+d+i(this,"marginRight")+w.width,C=u+v+i(this,"marginBottom")+w.height,T=t.extend({},m),S=e(x.my,l.outerWidth(),l.outerHeight());"right"===r.my[0]?T.left-=c:"center"===r.my[0]&&(T.left-=c/2),"bottom"===r.my[1]?T.top-=u:"center"===r.my[1]&&(T.top-=u/2),T.left+=S[0],T.top+=S[1],n={marginLeft:d,marginTop:v},t.each(["left","top"],function(e,i){t.ui.position[_[e]]&&t.ui.position[_[e]][i](T,{targetWidth:p,targetHeight:f,elemWidth:c,elemHeight:u,collisionPosition:n,collisionWidth:k,collisionHeight:C,offset:[h[0]+S[0],h[1]+S[1]],my:r.my,at:r.at,within:b,elem:l})}),r.using&&(a=function(t){var e=g.left-T.left,i=e+p-c,n=g.top-T.top,a=n+f-u,h={target:{element:y,left:g.left,top:g.top,width:p,height:f},element:{element:l,left:T.left,top:T.top,width:c,height:u},horizontal:i<0?"left":e>0?"right":"center",vertical:a<0?"top":n>0?"bottom":"middle"};p<c&&s(e+i)<p&&(h.horizontal="center"),f<u&&s(n+a)<f&&(h.vertical="middle"),o(s(e),s(i))>o(s(n),s(a))?h.important="horizontal":h.important="vertical",r.using.call(this,t,h)}),l.offset(t.extend(T,{using:a}))})},t.ui.position={fit:{left:function(t,e){var i,n=e.within,r=n.isWindow?n.scrollLeft:n.offset.left,s=n.width,a=t.left-e.collisionPosition.marginLeft,l=r-a,c=a+e.collisionWidth-s-r;e.collisionWidth>s?l>0&&c<=0?(i=t.left+l+e.collisionWidth-s-r,t.left+=l-i):c>0&&l<=0?t.left=r:l>c?t.left=r+s-e.collisionWidth:t.left=r:l>0?t.left+=l:c>0?t.left-=c:t.left=o(t.left-a,t.left)},top:function(t,e){var i,n=e.within,r=n.isWindow?n.scrollTop:n.offset.top,s=e.within.height,a=t.top-e.collisionPosition.marginTop,l=r-a,c=a+e.collisionHeight-s-r;e.collisionHeight>s?l>0&&c<=0?(i=t.top+l+e.collisionHeight-s-r,t.top+=l-i):c>0&&l<=0?t.top=r:l>c?t.top=r+s-e.collisionHeight:t.top=r:l>0?t.top+=l:c>0?t.top-=c:t.top=o(t.top-a,t.top)}},flip:{left:function(t,e){var i,n,r=e.within,o=r.offset.left+r.scrollLeft,a=r.width,l=r.isWindow?r.scrollLeft:r.offset.left,c=t.left-e.collisionPosition.marginLeft,u=c-l,h=c+e.collisionWidth-a-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];u<0?(i=t.left+d+p+f+e.collisionWidth-a-o,(i<0||i<s(u))&&(t.left+=d+p+f)):h>0&&(n=t.left-e.collisionPosition.marginLeft+d+p+f-l,(n>0||s(n)<h)&&(t.left+=d+p+f))},top:function(t,e){var i,n,r=e.within,o=r.offset.top+r.scrollTop,a=r.height,l=r.isWindow?r.scrollTop:r.offset.top,c=t.top-e.collisionPosition.marginTop,u=c-l,h=c+e.collisionHeight-a-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];u<0?(n=t.top+p+f+g+e.collisionHeight-a-o,(n<0||n<s(u))&&(t.top+=p+f+g)):h>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,(i>0||s(i)<h)&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}();var u=(t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,n){return!!t.data(e,n[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),"ui-effects-"),h="ui-effects-style",d="ui-effects-animated",p=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var n=h[e.type]||{};return null==t?i||!e.def?null:e.def:(t=n.floor?~~t:parseFloat(t),isNaN(t)?e.def:n.mod?(t+n.mod)%n.mod:0>t?0:n.max<t?n.max:t)}function n(e){var i=c(),n=i._rgba=[];return e=e.toLowerCase(),f(l,function(t,r){var o,s=r.re.exec(e),a=s&&r.parse(s),l=r.space||"rgba";if(a)return o=i[l](a),i[u[l].cache]=o[u[l].cache],n=i._rgba=o._rgba,!1}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),i):o[e]}function r(t,e,i){return i=(i+1)%1,6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}var o,s="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",a=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],c=t.Color=function(e,i,n,r){return new t.Color.fn.parse(e,i,n,r)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},h={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=c.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(u,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),c.fn=t.extend(c.prototype,{parse:function(r,s,a,l){if(r===e)return this._rgba=[null,null,null,null],this;(r.jquery||r.nodeType)&&(r=t(r).css(s),s=e);var h=this,d=t.type(r),p=this._rgba=[];return s!==e&&(r=[r,s,a,l],d="array"),"string"===d?this.parse(n(r)||o._default):"array"===d?(f(u.rgba.props,function(t,e){p[e.idx]=i(r[e.idx],e)}),this):"object"===d?(r instanceof c?f(u,function(t,e){r[e.cache]&&(h[e.cache]=r[e.cache].slice())}):f(u,function(e,n){var o=n.cache;f(n.props,function(t,e){if(!h[o]&&n.to){if("alpha"===t||null==r[t])return;h[o]=n.to(h._rgba)}h[o][e.idx]=i(r[t],e,!0)}),h[o]&&t.inArray(null,h[o].slice(0,3))<0&&(h[o][3]=1,n.from&&(h._rgba=n.from(h[o])))}),this):void 0},is:function(t){var e=c(t),i=!0,n=this;return f(u,function(t,r){var o,s=e[r.cache];return s&&(o=n[r.cache]||r.to&&r.to(n._rgba)||[],f(r.props,function(t,e){if(null!=s[e.idx])return i=s[e.idx]===o[e.idx]})),i}),i},_space:function(){var t=[],e=this;return f(u,function(i,n){e[n.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var n=c(t),r=n._space(),o=u[r],s=0===this.alpha()?c("transparent"):this,a=s[o.cache]||o.to(s._rgba),l=a.slice();return n=n[o.cache],f(o.props,function(t,r){var o=r.idx,s=a[o],c=n[o],u=h[r.type]||{};null!==c&&(null===s?l[o]=c:(u.mod&&(c-s>u.mod/2?s+=u.mod:s-c>u.mod/2&&(s-=u.mod)),l[o]=i((c-s)*e+s,r)))}),this[r](l)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),n=i.pop(),r=c(e)._rgba;return c(t.map(i,function(t,e){return(1-n)*r[e]+n*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),n=i.pop();return e&&i.push(~~(255*n)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),c.fn.parse.prototype=c.fn,u.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,n=t[0]/255,r=t[1]/255,o=t[2]/255,s=t[3],a=Math.max(n,r,o),l=Math.min(n,r,o),c=a-l,u=a+l,h=.5*u;return e=l===a?0:n===a?60*(r-o)/c+360:r===a?60*(o-n)/c+120:60*(n-r)/c+240,i=0===c?0:h<=.5?c/u:c/(2-u),[Math.round(e)%360,i,h,null==s?1:s]},u.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],n=t[2],o=t[3],s=n<=.5?n*(1+i):n+i-n*i,a=2*n-s;return[Math.round(255*r(a,s,e+1/3)),Math.round(255*r(a,s,e)),Math.round(255*r(a,s,e-1/3)),o]},f(u,function(n,r){var o=r.props,s=r.cache,l=r.to,u=r.from;c.fn[n]=function(n){if(l&&!this[s]&&(this[s]=l(this._rgba)),n===e)return this[s].slice();var r,a=t.type(n),h="array"===a||"object"===a?n:arguments,d=this[s].slice();return f(o,function(t,e){var n=h["object"===a?t:e.idx];null==n&&(n=d[e.idx]),d[e.idx]=i(n,e)}),u?(r=c(u(d)),r[s]=d,r):c(d)},f(o,function(e,i){c.fn[e]||(c.fn[e]=function(r){var o,s=t.type(r),l="alpha"===e?this._hsla?"hsla":"rgba":n,c=this[l](),u=c[i.idx];return"undefined"===s?u:("function"===s&&(r=r.call(this,u),s=t.type(r)),null==r&&i.empty?this:("string"===s&&(o=a.exec(r),o&&(r=u+parseFloat(o[2])*("+"===o[1]?1:-1))),c[i.idx]=r,this[l](c)))})})}),c.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,r){var o,s,a="";if("transparent"!==r&&("string"!==t.type(r)||(o=n(r)))){if(r=c(o||r),!d.rgba&&1!==r._rgba[3]){for(s="backgroundColor"===i?e.parentNode:e;(""===a||"transparent"===a)&&s&&s.style;)try{a=t.css(s,"backgroundColor"),s=s.parentNode}catch(l){}r=r.blend(a&&"transparent"!==a?a:"_default")}r=r.toRgbaString()}try{e.style[i]=r}catch(l){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=c(e.elem,i),e.end=c(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},c.hook(s),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,n){e["border"+n+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(p),function(){function e(e){var i,n,r=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(r&&r.length&&r[0]&&r[r[0]])for(n=r.length;n--;)i=r[n],"string"==typeof r[i]&&(o[t.camelCase(i)]=r[i]);else for(i in r)"string"==typeof r[i]&&(o[i]=r[i]);return o}function i(e,i){var n,o,s={};for(n in i)o=i[n],e[n]!==o&&(r[n]||!t.fx.step[n]&&isNaN(parseFloat(o))||(s[n]=o));return s}var n=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(p.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(r,o,s,a){var l=t.speed(o,s,a);return this.queue(function(){var o,s=t(this),a=s.attr("class")||"",c=l.children?s.find("*").addBack():s;c=c.map(function(){var i=t(this);return{el:i,start:e(this)}}),o=function(){t.each(n,function(t,e){r[e]&&s[e+"Class"](r[e])})},o(),c=c.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),s.attr("class",a),c=c.map(function(){var e=this,i=t.Deferred(),n=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,n),i.promise()}),t.when.apply(t,c.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(s[0])})})},t.fn.extend({addClass:function(e){return function(i,n,r,o){return n?t.effects.animateClass.call(this,{add:i},n,r,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,n,r,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},n,r,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,n,r,o,s){return"boolean"==typeof n||void 0===n?r?t.effects.animateClass.call(this,n?{add:i}:{remove:i},r,o,s):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},n,r,o)}}(t.fn.toggleClass),switchClass:function(e,i,n,r,o){return t.effects.animateClass.call(this,{add:i,remove:e},n,r,o)}})}(),function(){function e(e,i,n,r){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(r=i,n=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(r=n,n=i,i={}),t.isFunction(n)&&(r=n,n=null),i&&t.extend(e,i),n=n||i.duration,e.duration=t.fx.off?0:"number"==typeof n?n:n in t.fx.speeds?t.fx.speeds[n]:t.fx.speeds._default,e.complete=r||i.complete,e}function i(e){return!(e&&"number"!=typeof e&&!t.fx.speeds[e])||("string"==typeof e&&!t.effects.effect[e]||(!!t.isFunction(e)||"object"==typeof e&&!e.effect))}function n(t,e){var i=e.outerWidth(),n=e.outerHeight(),r=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,o=r.exec(t)||["",0,i,n,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?n:parseFloat(o[3]),left:parseFloat(o[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(d)||e(i)}}(t.expr.filters.animated)),t.uiBackCompat!==!1&&t.extend(t.effects,{save:function(t,e){for(var i=0,n=e.length;i<n;i++)null!==e[i]&&t.data(u+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,n=0,r=e.length;n<r;n++)null!==e[n]&&(i=t.data(u+e[n]),t.css(e[n],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},n=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),r={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(s){o=document.body}return e.wrap(n),(e[0]===o||t.contains(e[0],o))&&t(o).trigger("focus"),n=e.parent(),"static"===e.css("position")?(n.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,n){i[n]=e.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(r),n.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,n){return n||(n=i,i="effect"),t.effects.effect[e]=n,t.effects.effect[e].mode=i,n},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var n="horizontal"!==i?(e||100)/100:1,r="vertical"!==i?(e||100)/100:1;return{height:t.height()*r,width:t.width()*n,outerHeight:t.outerHeight()*r,outerWidth:t.outerWidth()*n}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var n=t.queue();e>1&&n.splice.apply(n,[1,0].concat(n.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(h,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(h)||"",t.removeData(h)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,n;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=t[1]/e.width}return{x:n,y:i}},createPlaceholder:function(e){var i,n=e.css("position"),r=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),"float":e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(u+"placeholder",i)),e.css({position:n,left:r.left,top:r.top}),i},removePlaceholder:function(t){var e=u+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,n,r){return r=r||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(r[i]=o[0]*n+o[1])}),r}}),t.fn.extend({effect:function(){function i(e){function i(){a.removeData(d),t.effects.cleanUp(a),"hide"===n.mode&&a.hide(),s()}function s(){t.isFunction(l)&&l.call(a[0]),t.isFunction(e)&&e()}var a=t(this);n.mode=u.shift(),t.uiBackCompat===!1||o?"none"===n.mode?(a[c](),s()):r.call(a[0],n,i):(a.is(":hidden")?"hide"===c:"show"===c)?(a[c](),s()):r.call(a[0],n,s)}var n=e.apply(this,arguments),r=t.effects.effect[n.effect],o=r.mode,s=n.queue,a=s||"fx",l=n.complete,c=n.mode,u=[],h=function(e){var i=t(this),n=t.effects.mode(i,c)||o;i.data(d,!0),u.push(n),o&&("show"===n||n===o&&"hide"===n)&&i.show(),o&&"none"===n||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!r?c?this[c](n.duration,l):this.each(function(){l&&l.call(this)}):s===!1?this.each(h).each(i):this.queue(a,h).queue(a,i)},show:function(t){return function(n){if(i(n))return t.apply(this,arguments);var r=e.apply(this,arguments);return r.mode="show",this.effect.call(this,r)}}(t.fn.show),hide:function(t){return function(n){if(i(n))return t.apply(this,arguments);var r=e.apply(this,arguments);return r.mode="hide",this.effect.call(this,r)}}(t.fn.hide),toggle:function(t){return function(n){if(i(n)||"boolean"==typeof n)return t.apply(this,arguments);var r=e.apply(this,arguments);return r.mode="toggle",this.effect.call(this,r)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),n=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(n=[parseFloat(i),e])}),n},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):n(this.css("clip"),this)},transfer:function(e,i){var n=t(this),r=t(e.to),o="fixed"===r.css("position"),s=t("body"),a=o?s.scrollTop():0,l=o?s.scrollLeft():0,c=r.offset(),u={top:c.top-a,left:c.left-l,height:r.innerHeight(),width:r.innerWidth()},h=n.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:h.top-a,left:h.left-l,height:n.innerHeight(),width:n.innerWidth(),position:o?"fixed":"absolute"}).animate(u,e.duration,e.easing,function(){d.remove(),t.isFunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=n(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return t<.5?i(2*t)/2:1-i(t*-2+2)/2}})}();var f,f=t.effects;t.effects.define("blind","hide",function(e,i){var n={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},r=t(this),o=e.direction||"up",s=r.cssClip(),a={clip:t.extend({},s)},l=t.effects.createPlaceholder(r);a.clip[n[o][0]]=a.clip[n[o][1]],"show"===e.mode&&(r.cssClip(a.clip),l&&l.css(t.effects.clipToBox(a)),a.clip=s),l&&l.animate(t.effects.clipToBox(a),e.duration,e.easing),r.animate(a,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var n,r,o,s=t(this),a=e.mode,l="hide"===a,c="show"===a,u=e.direction||"up",h=e.distance,d=e.times||5,p=2*d+(c||l?1:0),f=e.duration/p,g=e.easing,m="up"===u||"down"===u?"top":"left",v="up"===u||"left"===u,y=0,b=s.queue().length;for(t.effects.createPlaceholder(s),o=s.css(m),h||(h=s["top"===m?"outerHeight":"outerWidth"]()/3),c&&(r={opacity:1},r[m]=o,s.css("opacity",0).css(m,v?2*-h:2*h).animate(r,f,g)),l&&(h/=Math.pow(2,d-1)),r={},r[m]=o;y<d;y++)n={},n[m]=(v?"-=":"+=")+h,s.animate(n,f,g).animate(r,f,g),h=l?2*h:h/2;l&&(n={opacity:0},n[m]=(v?"-=":"+=")+h,s.animate(n,f,g)),s.queue(i),t.effects.unshift(s,b,p+1)}),t.effects.define("clip","hide",function(e,i){var n,r={},o=t(this),s=e.direction||"vertical",a="both"===s,l=a||"horizontal"===s,c=a||"vertical"===s;n=o.cssClip(),r.clip={top:c?(n.bottom-n.top)/2:n.top,right:l?(n.right-n.left)/2:n.right,bottom:c?(n.bottom-n.top)/2:n.bottom,left:l?(n.right-n.left)/2:n.left},t.effects.createPlaceholder(o),"show"===e.mode&&(o.cssClip(r.clip),r.clip=n),o.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("drop","hide",function(e,i){var n,r=t(this),o=e.mode,s="show"===o,a=e.direction||"left",l="up"===a||"down"===a?"top":"left",c="up"===a||"left"===a?"-=":"+=",u="+="===c?"-=":"+=",h={opacity:0};t.effects.createPlaceholder(r),n=e.distance||r["top"===l?"outerHeight":"outerWidth"](!0)/2,h[l]=c+n,s&&(r.css(h),h[l]=u+n,h.opacity=1),r.animate(h,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("explode","hide",function(e,i){function n(){b.push(this),b.length===h*d&&r()}function r(){p.css({visibility:"visible"}),t(b).remove(),i()}var o,s,a,l,c,u,h=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=h,p=t(this),f=e.mode,g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),y=Math.ceil(p.outerHeight()/h),b=[];for(o=0;o<h;o++)for(l=m.top+o*y,u=o-(h-1)/2,s=0;s<d;s++)a=m.left+s*v,c=s-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-s*v,top:-o*y}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:y,left:a+(g?c*v:0),top:l+(g?u*y:0),opacity:g?0:1}).animate({left:a+(g?0:c*v),top:l+(g?0:u*y),opacity:g?1:0},e.duration||500,e.easing,n)}),t.effects.define("fade","toggle",function(e,i){var n="show"===e.mode;t(this).css("opacity",n?0:1).animate({opacity:n?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("fold","hide",function(e,i){var n=t(this),r=e.mode,o="show"===r,s="hide"===r,a=e.size||15,l=/([0-9]+)%/.exec(a),c=!!e.horizFirst,u=c?["right","bottom"]:["bottom","right"],h=e.duration/2,d=t.effects.createPlaceholder(n),p=n.cssClip(),f={clip:t.extend({},p)},g={clip:t.extend({},p)},m=[p[u[0]],p[u[1]]],v=n.queue().length;l&&(a=parseInt(l[1],10)/100*m[s?0:1]),f.clip[u[0]]=a,g.clip[u[0]]=a,g.clip[u[1]]=0,o&&(n.cssClip(g.clip),d&&d.css(t.effects.clipToBox(g)),g.clip=p),n.queue(function(i){d&&d.animate(t.effects.clipToBox(f),h,e.easing).animate(t.effects.clipToBox(g),h,e.easing),i()}).animate(f,h,e.easing).animate(g,h,e.easing).queue(i),t.effects.unshift(n,v,4)}),t.effects.define("highlight","show",function(e,i){var n=t(this),r={backgroundColor:n.css("backgroundColor")};"hide"===e.mode&&(r.opacity=0),t.effects.saveStyle(n),n.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var n,r,o,s=t(this),a=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],c=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],u=e.mode,h="effect"!==u,d=e.scale||"both",p=e.origin||["middle","center"],f=s.css("position"),g=s.position(),m=t.effects.scaledDimensions(s),v=e.from||m,y=e.to||t.effects.scaledDimensions(s,0);t.effects.createPlaceholder(s),"show"===u&&(o=v,v=y,y=o),r={from:{y:v.height/m.height,x:v.width/m.width},to:{y:y.height/m.height,x:y.width/m.width}},"box"!==d&&"both"!==d||(r.from.y!==r.to.y&&(v=t.effects.setTransition(s,l,r.from.y,v),y=t.effects.setTransition(s,l,r.to.y,y)),r.from.x!==r.to.x&&(v=t.effects.setTransition(s,c,r.from.x,v),y=t.effects.setTransition(s,c,r.to.x,y))),"content"!==d&&"both"!==d||r.from.y!==r.to.y&&(v=t.effects.setTransition(s,a,r.from.y,v),y=t.effects.setTransition(s,a,r.to.y,y)),p&&(n=t.effects.getBaseline(p,m),v.top=(m.outerHeight-v.outerHeight)*n.y+g.top,v.left=(m.outerWidth-v.outerWidth)*n.x+g.left,y.top=(m.outerHeight-y.outerHeight)*n.y+g.top,y.left=(m.outerWidth-y.outerWidth)*n.x+g.left),s.css(v),"content"!==d&&"both"!==d||(l=l.concat(["marginTop","marginBottom"]).concat(a),c=c.concat(["marginLeft","marginRight"]),s.find("*[width]").each(function(){var i=t(this),n=t.effects.scaledDimensions(i),o={height:n.height*r.from.y,width:n.width*r.from.x,outerHeight:n.outerHeight*r.from.y,outerWidth:n.outerWidth*r.from.x},s={height:n.height*r.to.y,width:n.width*r.to.x,outerHeight:n.height*r.to.y,outerWidth:n.width*r.to.x};r.from.y!==r.to.y&&(o=t.effects.setTransition(i,l,r.from.y,o),s=t.effects.setTransition(i,l,r.to.y,s)),r.from.x!==r.to.x&&(o=t.effects.setTransition(i,c,r.from.x,o),s=t.effects.setTransition(i,c,r.to.x,s)),h&&t.effects.saveStyle(i),i.css(o),i.animate(s,e.duration,e.easing,function(){h&&t.effects.restoreStyle(i)})})),s.animate(y,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=s.offset();0===y.opacity&&s.css("opacity",v.opacity),h||(s.css("position","static"===f?"relative":f).offset(e),t.effects.saveStyle(s)),i()}})}),t.effects.define("scale",function(e,i){var n=t(this),r=e.mode,o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==r?0:100),s=t.extend(!0,{from:t.effects.scaledDimensions(n),to:t.effects.scaledDimensions(n,o,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(s.from.opacity=1,s.to.opacity=0),t.effects.effect.size.call(this,s,i)}),t.effects.define("puff","hide",function(e,i){var n=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,n,i)}),t.effects.define("pulsate","show",function(e,i){var n=t(this),r=e.mode,o="show"===r,s="hide"===r,a=o||s,l=2*(e.times||5)+(a?1:0),c=e.duration/l,u=0,h=1,d=n.queue().length;for(!o&&n.is(":visible")||(n.css("opacity",0).show(),u=1);h<l;h++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(i),t.effects.unshift(n,d,l+1)}),t.effects.define("shake",function(e,i){var n=1,r=t(this),o=e.direction||"left",s=e.distance||20,a=e.times||3,l=2*a+1,c=Math.round(e.duration/l),u="up"===o||"down"===o?"top":"left",h="up"===o||"left"===o,d={},p={},f={},g=r.queue().length;for(t.effects.createPlaceholder(r),d[u]=(h?"-=":"+=")+s,p[u]=(h?"+=":"-=")+2*s,f[u]=(h?"-=":"+=")+2*s,r.animate(d,c,e.easing);n<a;n++)r.animate(p,c,e.easing).animate(f,c,e.easing);r.animate(p,c,e.easing).animate(d,c/2,e.easing).queue(i),t.effects.unshift(r,g,l+1)}),t.effects.define("slide","show",function(e,i){var n,r,o=t(this),s={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},a=e.mode,l=e.direction||"left",c="up"===l||"down"===l?"top":"left",u="up"===l||"left"===l,h=e.distance||o["top"===c?"outerHeight":"outerWidth"](!0),d={};t.effects.createPlaceholder(o),n=o.cssClip(),r=o.position()[c],d[c]=(u?-1:1)*h+r,d.clip=o.cssClip(),d.clip[s[l][1]]=d.clip[s[l][0]],"show"===a&&(o.cssClip(d.clip),o.css(c,d[c]),d.clip=n,d[c]=r),o.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})});t.uiBackCompat!==!1&&(f=t.effects.define("transfer",function(e,i){t(this).transfer(e,i)}));t.ui.focusable=function(i,n){var r,o,s,a,l,c=i.nodeName.toLowerCase();return"area"===c?(r=i.parentNode,o=r.name,!(!i.href||!o||"map"!==r.nodeName.toLowerCase())&&(s=t("img[usemap='#"+o+"']"),s.length>0&&s.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(c)?(a=!i.disabled,a&&(l=t(i).closest("fieldset")[0],l&&(a=!l.disabled))):a="a"===c?i.href||n:n,a&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}});t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}};"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function n(e,i,n,o){return t.each(r,function(){i-=parseFloat(t.css(e,"padding"+this))||0,n&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0);
}),i}var r="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),s={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?s["inner"+i].call(this):this.each(function(){t(this).css(o,n(this,e)+"px")})},t.fn["outer"+i]=function(e,r){return"number"!=typeof e?s["outer"+i].call(this,e):this.each(function(){t(this).css(o,n(this,e,!0,r)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))});t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,n,r,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(r=this.eq(0).parents("label"),n=this.attr("id"),n&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(n)+"']",r=r.add(o.find(i).addBack(i))),this.pushStack(r))},t.fn.scrollParent=function(e){var i=this.css("position"),n="absolute"===i,r=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return(!n||"static"!==e.css("position"))&&r.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),n=null!=i;return(!n||i>=0)&&t.ui.focusable(e,n)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e,i,n=this.options.icons;n&&(e=t("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+n.header),e.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,n.header)._addClass(i,null,n.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?void this._activate(e):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),void("icons"===t&&(this._destroyIcons(),e&&this._createIcons())))},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,n=this.headers.length,r=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(r+1)%n];break;case i.LEFT:case i.UP:o=this.headers[(r-1+n)%n];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[n-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),t(o).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,n=i.heightStyle,r=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=t(this),i=e.uniqueId().attr("id"),n=e.next(),r=n.uniqueId().attr("id");e.attr("aria-controls",r),n.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===n?(e=r.height(),this.element.siblings(":visible").each(function(){var i=t(this),n=i.css("position");"absolute"!==n&&"fixed"!==n&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===n&&(e=0,this.headers.next().each(function(){var i=t(this).is(":visible");i||t(this).show(),e=Math.max(e,t(this).css("height","").height()),i||t(this).hide()}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i,n,r=this.options,o=this.active,s=t(e.currentTarget),a=s[0]===o[0],l=a&&r.collapsible,c=l?t():s.next(),u=o.next(),h={oldHeader:o,oldPanel:u,newHeader:l?t():s,newPanel:c};e.preventDefault(),a&&!r.collapsible||this._trigger("beforeActivate",e,h)===!1||(r.active=!l&&this.headers.index(s),this.active=a?t():s,this._toggle(h),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),r.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,r.icons.activeHeader)._addClass(i,null,r.icons.header)),a||(this._removeClass(s,"ui-accordion-header-collapsed")._addClass(s,"ui-accordion-header-active","ui-state-active"),r.icons&&(n=s.children(".ui-accordion-header-icon"),this._removeClass(n,null,r.icons.header)._addClass(n,null,r.icons.activeHeader)),this._addClass(s.next(),"ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,n=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=n,this.options.animate?this._animate(i,n,e):(n.hide(),i.show(),this._toggleComplete(e)),n.attr({"aria-hidden":"true"}),n.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&n.length?n.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var n,r,o,s=this,a=0,l=t.css("box-sizing"),c=t.length&&(!e.length||t.index()<e.index()),u=this.options.animate||{},h=c&&u.down||u,d=function(){s._toggleComplete(i)};return"number"==typeof h&&(o=h),"string"==typeof h&&(r=h),r=r||h.easing||u.easing,o=o||h.duration||u.duration,e.length?t.length?(n=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:r,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:o,easing:r,complete:d,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===l&&(a+=i.now):"content"!==s.options.heightStyle&&(i.now=Math.round(n-e.outerHeight()-a),a=0)}})):e.animate(this.hideProps,o,r,d):t.animate(this.showProps,o,r,d)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),n=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&n.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),n=t(e.currentTarget);i[0]===n[0]&&(this._removeClass(n.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,n))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,n,r,o,s=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:s=!1,n=this.previousFilter||"",o=!1,r=e.keyCode>=96&&e.keyCode<=105?(e.keyCode-96).toString():String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),r===n?o=!0:r=n+r,i=this._filterMenuItems(r),i=o&&i.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):i,i.length||(r=String.fromCharCode(e.keyCode),i=this._filterMenuItems(r)),i.length?(this.focus(e,i),this.previousFilter=r,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}s&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,n,r,o,s=this,a=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),n=l.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),n=t("<span>").data("ui-menu-submenu-caret",!0);s._addClass(n,"ui-menu-icon","ui-icon "+a),i.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(n,"ui-menu","ui-widget ui-widget-content ui-front"),e=l.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);s._isDivider(e)&&s._addClass(e,"ui-menu-divider","ui-widget-content")}),r=i.not(".ui-menu-item, .ui-menu-divider"),o=r.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(r,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,n,r;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),n=this.active.children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),r=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(r,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,n,r,o,s,a;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,r=e.offset().top-this.activeMenu.offset().top-i-n,o=this.activeMenu.scrollTop(),s=this.activeMenu.height(),a=e.outerHeight(),r<0?this.activeMenu.scrollTop(o+r):r+a>s&&this.activeMenu.scrollTop(o+r-s+a))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var n=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(e),this._removeClass(n.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=n},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var n;this.active&&(n="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.find(this.options.items)[e]()),this.focus(i,n)},nextPage:function(e){var i,n,r;return this.active?void(this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,r=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-n-r<0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(e)},previousPage:function(e){var i,n,r;return this.active?void(this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,r=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-n+r>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first()))):void this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),n=new RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return n.test(t.trim(t(this).children(".ui-menu-item-wrapper").text()))})}});t.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,n,r=this.element[0].nodeName.toLowerCase(),o="textarea"===r,s="input"===r;this.isMultiLine=o||!s&&this._isContentEditable(this.element),this.valueMethod=this.element[o||s?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(r){if(this.element.prop("readOnly"))return e=!0,n=!0,void(i=!0);e=!1,n=!1,i=!1;var o=t.ui.keyCode;switch(r.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",r);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",r);break;case o.UP:e=!0,this._keyEvent("previous",r);break;case o.DOWN:e=!0,this._keyEvent("next",r);break;case o.ENTER:this.menu.active&&(e=!0,r.preventDefault(),this.menu.select(r));break;case o.TAB:this.menu.active&&this.menu.select(r);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(r),r.preventDefault());break;default:i=!0,this._searchTimeout(r)}},keypress:function(n){if(e)return e=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||n.preventDefault());if(!i){var r=t.ui.keyCode;switch(n.keyCode){case r.PAGE_UP:this._move("previousPage",n);break;case r.PAGE_DOWN:this._move("nextPage",n);break;case r.UP:this._keyEvent("previous",n);break;case r.DOWN:this._keyEvent("next",n)}}},input:function(t){return n?(n=!1,void t.preventDefault()):void this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),void this._change(t))}}),this._initSource(),this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var n,r;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)})):(r=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:r})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(r.value),n=i.item.attr("aria-label")||r.value,void(n&&t.trim(n).length&&(this.liveRegion.children().hide(),t("<div>").text(n).appendTo(this.liveRegion))))},menuselect:function(e,i){var n=i.item.data("ui-autocomplete-item"),r=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=r,this._delay(function(){this.previous=r,this.selectedItem=n})),!1!==this._trigger("select",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,n=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,n){n(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,r){n.xhr&&n.xhr.abort(),n.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){r(t)},error:function(){r([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),n=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;e&&(!e||i||n)||(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var n=this;t.each(i,function(t,i){n._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<div>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e):void this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var n=new RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return n.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}});var g=(t.ui.autocomplete,/ui-corner-([a-z]){2,6}/g);t.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,i=[];t.each(this.options.items,function(n,r){var o,s={};if(r)return"controlgroupLabel"===n?(o=e.element.find(r),o.each(function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),e._addClass(o,null,"ui-widget ui-widget-content ui-state-default"),void(i=i.concat(o.get()))):void(t.fn[n]&&(s=e["_"+n+"Options"]?e["_"+n+"Options"]("middle"):{classes:{}},e.element.find(r).each(function(){var r=t(this),o=r[n]("instance"),a=t.widget.extend({},s);if("button"!==n||!r.parent(".ui-spinner").length){o||(o=r[n]()[n]("instance")),o&&(a.classes=e._resolveClassesValues(a.classes,o)),r[n](a);var l=r[n]("widget");t.data(l[0],"ui-controlgroup-data",o?o:r[n]("instance")),i.push(l[0])}})))}),this.childWidgets=t(t.unique(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var i=t(this),n=i.data("ui-controlgroup-data");n&&n[e]&&n[e]()})},_updateCornerClass:function(t,e){var i="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",n=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,i),this._addClass(t,null,n)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,n={classes:{}};return n.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],n},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:!!e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(e,i){var n={};return t.each(e,function(r){var o=i.options.classes[r]||"";o=t.trim(o.replace(g,"")),n[r]=(o+" "+e[r]).replace(/\s+/g," ")}),n},_setOption:function(t,e){return"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?void this._callChildMethod(e?"disable":"enable"):void this.refresh()},refresh:function(){var e,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,n){var r=e[n]().data("ui-controlgroup-data");if(r&&i["_"+r.widgetName+"Options"]){var o=i["_"+r.widgetName+"Options"](1===e.length?"only":n);o.classes=i._resolveClassesValues(o.classes,r),
r.element[r.widgetName](o)}else i._updateCornerClass(e[n](),n)}),this._callChildMethod("refresh"))}});t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i,n=this,r=this._super()||{};return this._readType(),i=this.element.labels(),this.label=t(i[i.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){n.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(r.label=this.originalLabel),e=this.element[0].disabled,null!=e&&(r.disabled=e),r},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e,i=this.element[0].name,n="input[name='"+t.ui.escapeSelector(i)+"']";return i?(e=this.form.length?t(this.form[0].elements).filter(n):t(n).filter(function(){return 0===t(this).form().length}),e.not(this.element)):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){if("label"!==t||e)return this._super(t,e),"disabled"===t?(this._toggleClass(this.label,null,"ui-state-disabled",e),void(this.element[0].disabled=e)):void this.refresh()},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]);t.ui.checkboxradio;t.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),t=this.element[0].disabled,null!=t&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,i){var n="iconPosition"!==e,r=n?this.options.iconPosition:i,o="top"===r||"bottom"===r;this.icon?n&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),n&&this._addClass(this.icon,null,i),this._attachIcon(r),o?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(r))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),t.uiBackCompat!==!1&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){return"text"===t?void this._super("showLabel",e):("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),void this._superApply(arguments))}}),t.fn.button=function(e){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?e.apply(this,arguments):(t.ui.checkboxradio||t.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(t.fn.button),t.fn.buttonset=function(){return t.ui.controlgroup||t.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))});t.ui.button;t.extend(t.ui,{datepicker:{version:"1.12.1"}});var m;t.extend(n.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return s(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var n,r,o;n=e.nodeName.toLowerCase(),r="div"===n||"span"===n,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),r),o.settings=t.extend({},i||{}),"input"===n?this._connectDatepicker(e,o):r&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var n=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?r(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var n=t(e);i.append=t([]),i.trigger=t([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var n,r,o,s=this._get(i,"appendText"),a=this._get(i,"isRTL");i.append&&i.append.remove(),s&&(i.append=t("<span class='"+this._appendClass+"'>"+s+"</span>"),e[a?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),n=this._get(i,"showOn"),"focus"!==n&&"both"!==n||e.on("focus",this._showDatepicker),"button"!==n&&"both"!==n||(r=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:r,title:r}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:r,title:r}):r)),e[a?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,n,r,o=new Date(2009,11,20),s=this._get(t,"dateFormat");s.match(/[DM]/)&&(e=function(t){for(i=0,n=0,r=0;r<t.length;r++)t[r].length>i&&(i=t[r].length,n=r);return n},o.setMonth(e(this._get(t,s.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,s.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var n=t(e);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,n,r,o){var a,l,c,u,h,d=this._dialogInst;return d||(this.uuid+=1,a="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+a+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),s(d.settings,r||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,h=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+u,c/2-150+h]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,n=t(e),r=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(r.append.remove(),r.trigger.remove(),n.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==i&&"span"!==i||n.removeClass(this.markerClassName).empty(),m===r&&(m=null))},_enableDatepicker:function(e){var i,n,r=t(e),o=t.data(e,"datepicker");r.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==i&&"span"!==i||(n=r.children("."+this._inlineClass),n.children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,n,r=t(e),o=t.data(e,"datepicker");r.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==i&&"span"!==i||(n=r.children("."+this._inlineClass),n.children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,n){var r,o,a,l,c=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):c?"all"===i?t.extend({},c.settings):this._get(c,i):null:(r=i||{},"string"==typeof i&&(r={},r[i]=n),void(c&&(this._curInst===c&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),a=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),s(c.settings,r),null!==a&&void 0!==r.dateFormat&&void 0===r.minDate&&(c.settings.minDate=this._formatDate(c,a)),null!==l&&void 0!==r.dateFormat&&void 0===r.maxDate&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in r&&(r.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),c),this._autoSize(c),this._setDate(c,o),this._updateAlternate(c),this._updateDatepicker(c))))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,n,r,o=t.datepicker._getInst(e.target),s=!0,a=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),s=!1;break;case 13:return r=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),r[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,r[0]),i=t.datepicker._get(o,"onSelect"),i?(n=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[n,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),s=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),s=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?1:-1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),s=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?-1:1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),s=e.ctrlKey||e.metaKey;break;default:s=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):s=!1;s&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,n,r=t.datepicker._getInst(e.target);if(t.datepicker._get(r,"constrainInput"))return i=t.datepicker._possibleChars(t.datepicker._get(r,"dateFormat")),n=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||n<" "||!i||i.indexOf(n)>-1},_doKeyUp:function(e){var i,n=t.datepicker._getInst(e.target);if(n.input.val()!==n.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(n,"dateFormat"),n.input?n.input.val():null,t.datepicker._getFormatConfig(n)),i&&(t.datepicker._setDateFromField(n),t.datepicker._updateAlternate(n),t.datepicker._updateDatepicker(n))}catch(r){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var n,r,o,a,l,c,u;n=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==n&&(t.datepicker._curInst.dpDiv.stop(!0,!0),n&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),r=t.datepicker._get(n,"beforeShow"),o=r?r.apply(e,[e,n]):{},o!==!1&&(s(n.settings,o),n.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(n),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),a=!1,t(e).parents().each(function(){return a|="fixed"===t(this).css("position"),!a}),l={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,n.dpDiv.empty(),n.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(n),l=t.datepicker._checkOffset(n,l,a),n.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":a?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),n.inline||(c=t.datepicker._get(n,"showAnim"),u=t.datepicker._get(n,"duration"),n.dpDiv.css("z-index",i(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[c]?n.dpDiv.show(c,t.datepicker._get(n,"showOptions"),u):n.dpDiv[c||"show"](c?u:null),t.datepicker._shouldFocusInput(n)&&n.input.trigger("focus"),t.datepicker._curInst=n))}},_updateDatepicker:function(e){this.maxRows=4,m=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,n=this._getNumberOfMonths(e),r=n[1],s=17,a=e.dpDiv.find("."+this._dayOverClass+" a");a.length>0&&o.apply(a.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),r>1&&e.dpDiv.addClass("ui-datepicker-multi-"+r).css("width",s*r+"em"),e.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,n){var r=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),s=e.input?e.input.outerWidth():0,a=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:t(document).scrollLeft()),c=document.documentElement.clientHeight+(n?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?r-s:0,i.left-=n&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=n&&i.top===e.input.offset().top+a?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+r>l&&l>r?Math.abs(i.left+r-l):0),i.top-=Math.min(i.top,i.top+o>c&&c>o?Math.abs(o+a):0),i},_findPos:function(e){for(var i,n=this._getInst(e),r=this._get(n,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[r?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,n,r,o,s=this._curInst;!s||e&&s!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(s,"showAnim"),n=this._get(s,"duration"),r=function(){t.datepicker._tidyDialog(s)},t.effects&&(t.effects.effect[i]||t.effects[i])?s.dpDiv.hide(i,t.datepicker._get(s,"showOptions"),n,r):s.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,r),i||r(),this._datepickerShowing=!1,o=this._get(s,"onClose"),o&&o.apply(s.input?s.input[0]:null,[s.input?s.input.val():"",s]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),n=t.datepicker._getInst(i[0]);(i[0].id===t.datepicker._mainDivId||0!==i.parents("#"+t.datepicker._mainDivId).length||i.hasClass(t.datepicker.markerClassName)||i.closest("."+t.datepicker._triggerClass).length||!t.datepicker._datepickerShowing||t.datepicker._inDialog&&t.blockUI)&&(!i.hasClass(t.datepicker.markerClassName)||t.datepicker._curInst===n)||t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,n){var r=t(e),o=this._getInst(r[0]);this._isDisabledDatepicker(r[0])||(this._adjustInstDate(o,i+("M"===n?this._get(o,"showCurrentAtPos"):0),n),this._updateDatepicker(o))},_gotoToday:function(e){var i,n=t(e),r=this._getInst(n[0]);this._get(r,"gotoCurrent")&&r.currentDay?(r.selectedDay=r.currentDay,r.drawMonth=r.selectedMonth=r.currentMonth,r.drawYear=r.selectedYear=r.currentYear):(i=new Date,r.selectedDay=i.getDate(),r.drawMonth=r.selectedMonth=i.getMonth(),r.drawYear=r.selectedYear=i.getFullYear()),this._notifyChange(r),this._adjustDate(n)},_selectMonthYear:function(e,i,n){var r=t(e),o=this._getInst(r[0]);o["selected"+("M"===n?"Month":"Year")]=o["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(r)},_selectDay:function(e,i,n,r){var o,s=t(e);t(r).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||(o=this._getInst(s[0]),o.selectedDay=o.currentDay=t("a",r).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=n,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var n,r=t(e),o=this._getInst(r[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),n=this._get(o,"onSelect"),n?n.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,n,r,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),n=this._getDate(e),r=this.formatDate(i,n,this._getFormatConfig(e)),t(o).val(r))},noWeekends:function(t){var e=t.getDay();return[e>0&&e<6,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,n){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?i.toString():i+"",""===i)return null;var r,o,s,a,l=0,c=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),h=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,d=(n?n.dayNames:null)||this._defaults.dayNames,p=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,f=(n?n.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,v=-1,y=-1,b=!1,w=function(t){var i=r+1<e.length&&e.charAt(r+1)===t;return i&&r++,i},_=function(t){var e=w(t),n="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,r="y"===t?n:1,o=new RegExp("^\\d{"+r+","+n+"}"),s=i.substring(l).match(o);if(!s)throw"Missing number at position "+l;return l+=s[0].length,parseInt(s[0],10)},x=function(e,n,r){var o=-1,s=t.map(w(e)?r:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(s,function(t,e){var n=e[1];if(i.substr(l,n.length).toLowerCase()===n.toLowerCase())return o=e[0],l+=n.length,!1}),o!==-1)return o+1;throw"Unknown name at position "+l},k=function(){if(i.charAt(l)!==e.charAt(r))throw"Unexpected literal at position "+l;l++};for(r=0;r<e.length;r++)if(b)"'"!==e.charAt(r)||w("'")?k():b=!1;else switch(e.charAt(r)){case"d":v=_("d");break;case"D":x("D",h,d);break;case"o":y=_("o");break;case"m":m=_("m");break;case"M":m=x("M",p,f);break;case"y":g=_("y");break;case"@":a=new Date(_("@")),g=a.getFullYear(),m=a.getMonth()+1,v=a.getDate();break;case"!":a=new Date((_("!")-this._ticksTo1970)/1e4),g=a.getFullYear(),m=a.getMonth()+1,v=a.getDate();break;case"'":w("'")?k():b=!0;break;default:k()}if(l<i.length&&(s=i.substr(l),!/^\s+/.test(s)))throw"Extra/unparsed characters found in date: "+s;if(g===-1?g=(new Date).getFullYear():g<100&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(g<=u?0:-100)),y>-1)for(m=1,v=y;;){if(o=this._getDaysInMonth(g,m-1),v<=o)break;m++,v-=o}if(a=this._daylightSavingAdjust(new Date(g,m-1,v)),a.getFullYear()!==g||a.getMonth()+1!==m||a.getDate()!==v)throw"Invalid date";return a},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,i){if(!e)return"";var n,r=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,s=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,l=function(e){var i=n+1<t.length&&t.charAt(n+1)===e;return i&&n++,i},c=function(t,e,i){var n=""+e;if(l(t))for(;n.length<i;)n="0"+n;return n},u=function(t,e,i,n){return l(t)?n[e]:i[e]},h="",d=!1;if(e)for(n=0;n<t.length;n++)if(d)"'"!==t.charAt(n)||l("'")?h+=t.charAt(n):d=!1;else switch(t.charAt(n)){case"d":h+=c("d",e.getDate(),2);break;case"D":h+=u("D",e.getDay(),r,o);break;case"o":h+=c("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":h+=c("m",e.getMonth()+1,2);break;case"M":h+=u("M",e.getMonth(),s,a);break;case"y":h+=l("y")?e.getFullYear():(e.getFullYear()%100<10?"0":"")+e.getFullYear()%100;break;case"@":h+=e.getTime();break;case"!":h+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?h+="'":d=!0;break;default:h+=t.charAt(n)}return h},_possibleChars:function(t){var e,i="",n=!1,r=function(i){var n=e+1<t.length&&t.charAt(e+1)===i;return n&&e++,n};for(e=0;e<t.length;e++)if(n)"'"!==t.charAt(e)||r("'")?i+=t.charAt(e):n=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":r("'")?i+="'":n=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),n=t.lastVal=t.input?t.input.val():null,r=this._getDefaultDate(t),o=r,s=this._getFormatConfig(t);try{o=this.parseDate(i,n,s)||r}catch(a){n=e?"":n}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=n?o.getDate():0,t.currentMonth=n?o.getMonth():0,t.currentYear=n?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,n){var r=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(n){}for(var r=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=r.getFullYear(),s=r.getMonth(),a=r.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,c=l.exec(i);c;){switch(c[2]||"d"){case"d":case"D":a+=parseInt(c[1],10);break;case"w":case"W":a+=7*parseInt(c[1],10);break;case"m":case"M":s+=parseInt(c[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(o,s));break;case"y":case"Y":o+=parseInt(c[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(o,s))}c=l.exec(i)}return new Date(o,s,a)},s=null==i||""===i?n:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?n:r(i):new Date(i.getTime());return s=s&&"Invalid Date"===s.toString()?n:s,s&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var n=!e,r=t.selectedMonth,o=t.selectedYear,s=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=s.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=s.getMonth(),t.drawYear=t.selectedYear=t.currentYear=s.getFullYear(),r===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(n?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),n="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){
var e={prev:function(){t.datepicker._adjustDate(n,-i,"M")},next:function(){t.datepicker._adjustDate(n,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(n)},selectDay:function(){return t.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(n,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,n,r,o,s,a,l,c,u,h,d,p,f,g,m,v,y,b,w,_,x,k,C,T,S,D,M,A,P,I,E,L,N,O,H,W,z,R,F=new Date,j=this._daylightSavingAdjust(new Date(F.getFullYear(),F.getMonth(),F.getDate())),B=this._get(t,"isRTL"),$=this._get(t,"showButtonPanel"),q=this._get(t,"hideIfNoPrevNext"),Y=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),X=this._get(t,"showCurrentAtPos"),K=this._get(t,"stepMonths"),V=1!==U[0]||1!==U[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(t,"min"),Z=this._getMinMaxDate(t,"max"),J=t.drawMonth-X,tt=t.drawYear;if(J<0&&(J+=12,tt--),Z)for(e=this._daylightSavingAdjust(new Date(Z.getFullYear(),Z.getMonth()-U[0]*U[1]+1,Z.getDate())),e=Q&&e<Q?Q:e;this._daylightSavingAdjust(new Date(tt,J,1))>e;)J--,J<0&&(J=11,tt--);for(t.drawMonth=J,t.drawYear=tt,i=this._get(t,"prevText"),i=Y?this.formatDate(i,this._daylightSavingAdjust(new Date(tt,J-K,1)),this._getFormatConfig(t)):i,n=this._canAdjustMonth(t,-1,tt,J)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+i+"</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+i+"</span></a>",r=this._get(t,"nextText"),r=Y?this.formatDate(r,this._daylightSavingAdjust(new Date(tt,J+K,1)),this._getFormatConfig(t)):r,o=this._canAdjustMonth(t,1,tt,J)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+r+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+r+"</span></a>",s=this._get(t,"currentText"),a=this._get(t,"gotoCurrent")&&t.currentDay?G:j,s=Y?this.formatDate(s,a,this._getFormatConfig(t)):s,l=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",c=$?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(B?l:"")+(this._isInRange(t,a)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+s+"</button>":"")+(B?"":l)+"</div>":"",u=parseInt(this._get(t,"firstDay"),10),u=isNaN(u)?0:u,h=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),y=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),w="",x=0;x<U[0];x++){for(k="",this.maxRows=4,C=0;C<U[1];C++){if(T=this._daylightSavingAdjust(new Date(tt,J,t.selectedDay)),S=" ui-corner-all",D="",V){if(D+="<div class='ui-datepicker-group",U[1]>1)switch(C){case 0:D+=" ui-datepicker-group-first",S=" ui-corner-"+(B?"right":"left");break;case U[1]-1:D+=" ui-datepicker-group-last",S=" ui-corner-"+(B?"left":"right");break;default:D+=" ui-datepicker-group-middle",S=""}D+="'>"}for(D+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+S+"'>"+(/all|left/.test(S)&&0===x?B?o:n:"")+(/all|right/.test(S)&&0===x?B?n:o:"")+this._generateMonthYearHeader(t,J,tt,Q,Z,x>0||C>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",M=h?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",_=0;_<7;_++)A=(_+u)%7,M+="<th scope='col'"+((_+u+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[A]+"'>"+p[A]+"</span></th>";for(D+=M+"</tr></thead><tbody>",P=this._getDaysInMonth(tt,J),tt===t.selectedYear&&J===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,P)),I=(this._getFirstDayOfMonth(tt,J)-u+7)%7,E=Math.ceil((I+P)/7),L=V&&this.maxRows>E?this.maxRows:E,this.maxRows=L,N=this._daylightSavingAdjust(new Date(tt,J,1-I)),O=0;O<L;O++){for(D+="<tr>",H=h?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(N)+"</td>":"",_=0;_<7;_++)W=m?m.apply(t.input?t.input[0]:null,[N]):[!0,""],z=N.getMonth()!==J,R=z&&!y||!W[0]||Q&&N<Q||Z&&N>Z,H+="<td class='"+((_+u+6)%7>=5?" ui-datepicker-week-end":"")+(z?" ui-datepicker-other-month":"")+(N.getTime()===T.getTime()&&J===t.selectedMonth&&t._keyEvent||b.getTime()===N.getTime()&&b.getTime()===T.getTime()?" "+this._dayOverClass:"")+(R?" "+this._unselectableClass+" ui-state-disabled":"")+(z&&!v?"":" "+W[1]+(N.getTime()===G.getTime()?" "+this._currentClass:"")+(N.getTime()===j.getTime()?" ui-datepicker-today":""))+"'"+(z&&!v||!W[2]?"":" title='"+W[2].replace(/'/g,"&#39;")+"'")+(R?"":" data-handler='selectDay' data-event='click' data-month='"+N.getMonth()+"' data-year='"+N.getFullYear()+"'")+">"+(z&&!v?"&#xa0;":R?"<span class='ui-state-default'>"+N.getDate()+"</span>":"<a class='ui-state-default"+(N.getTime()===j.getTime()?" ui-state-highlight":"")+(N.getTime()===G.getTime()?" ui-state-active":"")+(z?" ui-priority-secondary":"")+"' href='#'>"+N.getDate()+"</a>")+"</td>",N.setDate(N.getDate()+1),N=this._daylightSavingAdjust(N);D+=H+"</tr>"}J++,J>11&&(J=0,tt++),D+="</tbody></table>"+(V?"</div>"+(U[0]>0&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),k+=D}w+=k}return w+=c,t._keyEvent=!1,w},_generateMonthYearHeader:function(t,e,i,n,r,o,s,a){var l,c,u,h,d,p,f,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),y=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",w="";if(o||!m)w+="<span class='ui-datepicker-month'>"+s[e]+"</span>";else{for(l=n&&n.getFullYear()===i,c=r&&r.getFullYear()===i,w+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",u=0;u<12;u++)(!l||u>=n.getMonth())&&(!c||u<=r.getMonth())&&(w+="<option value='"+u+"'"+(u===e?" selected='selected'":"")+">"+a[u]+"</option>");w+="</select>"}if(y||(b+=w+(!o&&m&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(h=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(h[0]),g=Math.max(f,p(h[1]||"")),f=n?Math.max(f,n.getFullYear()):f,g=r?Math.min(g,r.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";f<=g;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),y&&(b+=(!o&&m&&v?"":"&#xa0;")+w),b+="</div>"},_adjustInstDate:function(t,e,i){var n=t.selectedYear+("Y"===i?e:0),r=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(n,r))+("D"===i?e:0),s=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(n,r,o)));t.selectedDay=s.getDate(),t.drawMonth=t.selectedMonth=s.getMonth(),t.drawYear=t.selectedYear=s.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),n=this._getMinMaxDate(t,"max"),r=i&&e<i?i:e;return n&&r>n?n:r},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,n){var r=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,n+(e<0?e:r[0]*r[1]),1));return e<0&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,n,r=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),s=null,a=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),n=(new Date).getFullYear(),s=parseInt(i[0],10),a=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(s+=n),i[1].match(/[+\-].*/)&&(a+=n)),(!r||e.getTime()>=r.getTime())&&(!o||e.getTime()<=o.getTime())&&(!s||e.getFullYear()>=s)&&(!a||e.getFullYear()<=a)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,n){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var r=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(n,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),r,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new n,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1";var v=(t.datepicker,t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),!1);t(document).on("mouseup",function(){v=!1});t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){if(!0===t.data(i.target,e.widgetName+".preventClickEvent"))return t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!v){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,n=1===e.which,r=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&t(e.target).closest(this.options.cancel).length;return!(n&&!r&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),v=!0,!0))}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,v=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,n){var r,o=t.ui[e].prototype;for(r in n)o.plugins[r]=o.plugins[r]||[],o.plugins[r].push([i,n[r]])},call:function(t,e,i,n){var r,o=t.plugins[e];if(o&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(r=0;r<o.length;r++)t.options[o[r][0]]&&o[r][1].apply(t.element,i)}},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")};t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(e){var i=this.options;return!(this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blurActiveElement(e),this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]),n=t(e.target);n.closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var n=this._uiHash();if(this._trigger("drag",e,n)===!1)return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=n.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,n=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(n=t.ui.ddmanager.drop(this,e)),this.dropped&&(n=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper),r=n?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return r.parents("body").length||r.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),n&&r[0]===this.element[0]&&this._setPositionRelative(),r[0]===this.element[0]||/(fixed|absolute)/.test(r.css("position"))||r.css("position","absolute"),r},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,n,r=this.options,o=this.document[0];return this.relativeContainer=null,r.containment?"window"===r.containment?void(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===r.containment?void(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):r.containment.constructor===Array?void(this.containment=r.containment):("parent"===r.containment&&(r.containment=this.helper[0].parentNode),i=t(r.containment),n=i[0],void(n&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i))):void(this.containment=null)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,n=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,n,r,o,s=this.options,a=this._isRootNode(this.scrollParent[0]),l=t.pageX,c=t.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(n=this.relativeContainer.offset(),i=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(c=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(c=i[3]+this.offset.click.top)),s.grid&&(r=s.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,c=i?r-this.offset.click.top>=i[1]||r-this.offset.click.top>i[3]?r:r-this.offset.click.top>=i[1]?r-s.grid[1]:r+s.grid[1]:r,o=s.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,l=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-s.grid[0]:o+s.grid[0]:o),"y"===s.axis&&(l=this.originalPageX),"x"===s.axis&&(c=this.originalPageY)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,n){return n=n||this._uiHash(),t.ui.plugin.call(this,e,[i,n,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,n){var r=t.extend({},i,{item:n.element});n.sortables=[],t(n.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(n.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,r))})},stop:function(e,i,n){var r=t.extend({},i,{item:n.element});n.cancelHelperRemoval=!1,t.each(n.sortables,function(){var t=this;t.isOver?(t.isOver=0,n.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,r))})},drag:function(e,i,n){t.each(n.sortables,function(){var r=!1,o=this;o.positionAbs=n.positionAbs,o.helperProportions=n.helperProportions,o.offset.click=n.offset.click,o._intersectsWith(o.containerCache)&&(r=!0,t.each(n.sortables,function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(r=!1),r})),r?(o.isOver||(o.isOver=1,n._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=n.offset.click.top,o.offset.click.left=n.offset.click.left,o.offset.parent.left-=n.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=n.offset.parent.top-o.offset.parent.top,n._trigger("toSortable",e),n.dropped=o.element,t.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,o.fromOutside=n),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(n._parent),n._refreshOffsets(e),i.position=n._generatePosition(e,!0),n._trigger("fromSortable",e),n.dropped=!1,t.each(n.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,n){var r=t("body"),o=n.options;r.css("cursor")&&(o._cursor=r.css("cursor")),r.css("cursor",o.cursor)},stop:function(e,i,n){var r=n.options;r._cursor&&t("body").css("cursor",r._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,n){var r=t(i.helper),o=n.options;r.css("opacity")&&(o._opacity=r.css("opacity")),r.css("opacity",o.opacity)},stop:function(e,i,n){var r=n.options;r._opacity&&t(i.helper).css("opacity",r._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,n){var r=n.options,o=!1,s=n.scrollParentNotHidden[0],a=n.document[0];s!==a&&"HTML"!==s.tagName?(r.axis&&"x"===r.axis||(n.overflowOffset.top+s.offsetHeight-e.pageY<r.scrollSensitivity?s.scrollTop=o=s.scrollTop+r.scrollSpeed:e.pageY-n.overflowOffset.top<r.scrollSensitivity&&(s.scrollTop=o=s.scrollTop-r.scrollSpeed)),r.axis&&"y"===r.axis||(n.overflowOffset.left+s.offsetWidth-e.pageX<r.scrollSensitivity?s.scrollLeft=o=s.scrollLeft+r.scrollSpeed:e.pageX-n.overflowOffset.left<r.scrollSensitivity&&(s.scrollLeft=o=s.scrollLeft-r.scrollSpeed))):(r.axis&&"x"===r.axis||(e.pageY-t(a).scrollTop()<r.scrollSensitivity?o=t(a).scrollTop(t(a).scrollTop()-r.scrollSpeed):t(window).height()-(e.pageY-t(a).scrollTop())<r.scrollSensitivity&&(o=t(a).scrollTop(t(a).scrollTop()+r.scrollSpeed))),r.axis&&"y"===r.axis||(e.pageX-t(a).scrollLeft()<r.scrollSensitivity?o=t(a).scrollLeft(t(a).scrollLeft()-r.scrollSpeed):t(window).width()-(e.pageX-t(a).scrollLeft())<r.scrollSensitivity&&(o=t(a).scrollLeft(t(a).scrollLeft()+r.scrollSpeed)))),o!==!1&&t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(n,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,n){var r=n.options;n.snapElements=[],t(r.snap.constructor!==String?r.snap.items||":data(ui-draggable)":r.snap).each(function(){var e=t(this),i=e.offset();this!==n.element[0]&&n.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,n){var r,o,s,a,l,c,u,h,d,p,f=n.options,g=f.snapTolerance,m=i.offset.left,v=m+n.helperProportions.width,y=i.offset.top,b=y+n.helperProportions.height;for(d=n.snapElements.length-1;d>=0;d--)l=n.snapElements[d].left-n.margins.left,c=l+n.snapElements[d].width,u=n.snapElements[d].top-n.margins.top,h=u+n.snapElements[d].height,v<l-g||m>c+g||b<u-g||y>h+g||!t.contains(n.snapElements[d].item.ownerDocument,n.snapElements[d].item)?(n.snapElements[d].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,e,t.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(r=Math.abs(u-b)<=g,o=Math.abs(h-y)<=g,s=Math.abs(l-v)<=g,a=Math.abs(c-m)<=g,r&&(i.position.top=n._convertPositionTo("relative",{top:u-n.helperProportions.height,left:0}).top),o&&(i.position.top=n._convertPositionTo("relative",{top:h,left:0}).top),s&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l-n.helperProportions.width}).left),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:c}).left)),p=r||o||s||a,"outer"!==f.snapMode&&(r=Math.abs(u-y)<=g,o=Math.abs(h-b)<=g,s=Math.abs(l-m)<=g,a=Math.abs(c-v)<=g,r&&(i.position.top=n._convertPositionTo("relative",{top:u,left:0}).top),o&&(i.position.top=n._convertPositionTo("relative",{top:h-n.helperProportions.height,left:0}).top),s&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l}).left),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:c-n.helperProportions.width}).left)),!n.snapElements[d].snapping&&(r||o||s||a||p)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,e,t.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=r||o||s||a||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,n){var r,o=n.options,s=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(r=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(e){t(this).css("zIndex",r+e)}),this.css("zIndex",r+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,n){var r=t(i.helper),o=n.options;r.css("zIndex")&&(o._zIndex=r.css("zIndex")),
r.css("zIndex",o.zIndex)},stop:function(e,i,n){var r=n.options;r._zIndex&&t(i.helper).css("zIndex",r._zIndex)}});t.ui.draggable;t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",r=!1;return e[n]>0||(e[n]=1,r=e[n]>0,e[n]=0,r)},_create:function(){var e,i=this.options,n=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(n._removeClass("ui-resizable-autohide"),n._handles.show())}).on("mouseleave",function(){i.disabled||n.resizing||(n._addClass("ui-resizable-autohide"),n._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var e,i,n,r,o,s=this.options,a=this;if(this.handles=s.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),n=this.handles.split(","),this.handles={},i=0;i<n.length;i++)e=t.trim(n[i]),r="ui-resizable-"+e,o=t("<div>"),this._addClass(o,"ui-resizable-handle "+r),o.css({zIndex:s.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,n,r,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(n=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?n.outerHeight():n.outerWidth(),r=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(r,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){a.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=o&&o[1]?o[1]:"se")}),s.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,n,r=!1;for(i in this.handles)n=t(this.handles[i])[0],(n===e.target||t.contains(n,e.target))&&(r=!0);return!this.options.disabled&&r},_mouseStart:function(e){var i,n,r,o=this.options,s=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),n=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,n+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:s.width(),height:s.height()},this.originalSize=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.sizeDiff={width:s.outerWidth()-s.width(),height:s.outerHeight()-s.height()},this.originalPosition={left:i,top:n},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,r=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===r?this.axis+"-resize":r),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,n,r=this.originalMousePosition,o=this.axis,s=e.pageX-r.left||0,a=e.pageY-r.top||0,l=this._change[o];return this._updatePrevProperties(),!!l&&(i=l.apply(this,[e,s,a]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),n=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1)},_mouseStop:function(e){this.resizing=!1;var i,n,r,o,s,a,l,c=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,n=i.length&&/textarea/i.test(i[0].nodeName),r=n&&this._hasScroll(i[0],"left")?0:u.sizeDiff.height,o=n?0:u.sizeDiff.width,s={width:u.helper.width()-o,height:u.helper.height()-r},a=parseFloat(u.element.css("left"))+(u.position.left-u.originalPosition.left)||null,l=parseFloat(u.element.css("top"))+(u.position.top-u.originalPosition.top)||null,c.animate||this.element.css(t.extend(s,{top:l,left:a})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!c.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,n,r,o,s=this.options;o={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,r=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),n>o.minHeight&&(o.minHeight=n),i<o.maxWidth&&(o.maxWidth=i),r<o.maxHeight&&(o.maxHeight=r)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,n=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,n=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,r=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,s=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,c=/sw|nw|w/.test(i),u=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),s&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),r&&(t.height=e.maxHeight),o&&c&&(t.left=a-e.minWidth),n&&c&&(t.left=a-e.maxWidth),s&&u&&(t.top=l-e.minHeight),r&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],n=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],r=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(n[e])||0,i[e]+=parseFloat(r[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,n=this.originalPosition;return{left:n.left+e,width:i.width-e}},n:function(t,e,i){var n=this.originalSize,r=this.originalPosition;return{top:r.top+i,height:n.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},sw:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,n]))},ne:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},nw:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,n]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),n=i.options,r=i._proportionallyResizeElements,o=r.length&&/textarea/i.test(r[0].nodeName),s=o&&i._hasScroll(r[0],"left")?0:i.sizeDiff.height,a=o?0:i.sizeDiff.width,l={width:i.size.width-a,height:i.size.height-s},c=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,u=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(l,u&&c?{top:u,left:c}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var n={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};r&&r.length&&t(r[0]).css({width:n.width,height:n.height}),i._updateCache(n),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,n,r,o,s,a,l=t(this).resizable("instance"),c=l.options,u=l.element,h=c.containment,d=h instanceof t?h.get(0):/parent/.test(h)?u.parent().get(0):h;d&&(l.containerElement=t(d),/document/.test(h)||h===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){i[t]=l._num(e.css("padding"+n))}),l.containerOffset=e.offset(),l.containerPosition=e.position(),l.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},n=l.containerOffset,r=l.containerSize.height,o=l.containerSize.width,s=l._hasScroll(d,"left")?d.scrollWidth:o,a=l._hasScroll(d)?d.scrollHeight:r,l.parentData={element:d,left:n.left,top:n.top,width:s,height:a}))},resize:function(e){var i,n,r,o,s=t(this).resizable("instance"),a=s.options,l=s.containerOffset,c=s.position,u=s._aspectRatio||e.shiftKey,h={top:0,left:0},d=s.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(h=l),c.left<(s._helper?l.left:0)&&(s.size.width=s.size.width+(s._helper?s.position.left-l.left:s.position.left-h.left),u&&(s.size.height=s.size.width/s.aspectRatio,p=!1),s.position.left=a.helper?l.left:0),c.top<(s._helper?l.top:0)&&(s.size.height=s.size.height+(s._helper?s.position.top-l.top:s.position.top),u&&(s.size.width=s.size.height*s.aspectRatio,p=!1),s.position.top=s._helper?l.top:0),r=s.containerElement.get(0)===s.element.parent().get(0),o=/relative|absolute/.test(s.containerElement.css("position")),r&&o?(s.offset.left=s.parentData.left+s.position.left,s.offset.top=s.parentData.top+s.position.top):(s.offset.left=s.element.offset().left,s.offset.top=s.element.offset().top),i=Math.abs(s.sizeDiff.width+(s._helper?s.offset.left-h.left:s.offset.left-l.left)),n=Math.abs(s.sizeDiff.height+(s._helper?s.offset.top-h.top:s.offset.top-l.top)),i+s.size.width>=s.parentData.width&&(s.size.width=s.parentData.width-i,u&&(s.size.height=s.size.width/s.aspectRatio,p=!1)),n+s.size.height>=s.parentData.height&&(s.size.height=s.parentData.height-n,u&&(s.size.width=s.size.height*s.aspectRatio,p=!1)),p||(s.position.left=s.prevPosition.left,s.position.top=s.prevPosition.top,s.size.width=s.prevSize.width,s.size.height=s.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,n=e.containerOffset,r=e.containerPosition,o=e.containerElement,s=t(e.helper),a=s.offset(),l=s.outerWidth()-e.sizeDiff.width,c=s.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:a.left-r.left-n.left,width:l,height:c}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:a.left-r.left-n.left,width:l,height:c})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var n=t(this).resizable("instance"),r=n.options,o=n.originalSize,s=n.originalPosition,a={height:n.size.height-o.height||0,width:n.size.width-o.width||0,top:n.position.top-s.top||0,left:n.position.left-s.left||0};t(r.alsoResize).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),r={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(n[e]||0)+(a[e]||0);i&&i>=0&&(r[e]=i||null)}),e.css(r)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),n=i.options,r=i.size,o=i.originalSize,s=i.originalPosition,a=i.axis,l="number"==typeof n.grid?[n.grid,n.grid]:n.grid,c=l[0]||1,u=l[1]||1,h=Math.round((r.width-o.width)/c)*c,d=Math.round((r.height-o.height)/u)*u,p=o.width+h,f=o.height+d,g=n.maxWidth&&n.maxWidth<p,m=n.maxHeight&&n.maxHeight<f,v=n.minWidth&&n.minWidth>p,y=n.minHeight&&n.minHeight>f;n.grid=l,v&&(p+=c),y&&(f+=u),g&&(p-=c),m&&(f-=u),/^(se|s|e)$/.test(a)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(a)?(i.size.width=p,i.size.height=f,i.position.top=s.top-d):/^(sw)$/.test(a)?(i.size.width=p,i.size.height=f,i.position.left=s.left-h):((f-u<=0||p-c<=0)&&(e=i._getPaddingPlusBorderDimensions(this)),f-u>0?(i.size.height=f,i.position.top=s.top-d):(f=u-e.height,i.size.height=f,i.position.top=s.top+o.height-f),p-c>0?(i.size.width=p,i.position.left=s.left-h):(p=c-e.width,i.size.width=p,i.position.left=s.left+o.width-p))}});t.ui.resizable;t.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;i<0&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||t.ui.safeBlur(t.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var n=!1,r=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,r);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),n=!0),n&&!i&&this._trigger("focus",e),n},open:function(){var e=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=t(t.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),void this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(e){function i(){var e=t.ui.safeActiveElement(this.document[0]),i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),void this.close(e);if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),n=i.filter(":first"),r=i.filter(":last");e.target!==r[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==n[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){r.trigger("focus")}),e.preventDefault()):(this._delay(function(){n.trigger("focus")}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:t("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?void this._removeClass(this.uiDialog,"ui-dialog-buttons"):(t.each(i,function(i,n){var r,o;n=t.isFunction(n)?{click:n,text:i}:n,n=t.extend({type:"button"},n),r=n.click,o={icon:n.icon,iconPosition:n.iconPosition,showLabel:n.showLabel,icons:n.icons,text:n.text},delete n.click,delete n.icon,delete n.iconPosition,delete n.showLabel,delete n.icons,"boolean"==typeof n.text&&delete n.text,t("<button></button>",n).button(o).appendTo(e.uiButtonSet).on("click",function(){r.apply(e.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,n=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,r){i._addClass(t(this),"ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",n,e(r))},drag:function(t,n){i._trigger("drag",t,e(n))},stop:function(r,o){var s=o.offset.left-i.document.scrollLeft(),a=o.offset.top-i.document.scrollTop();n.position={my:"left top",at:"left"+(s>=0?"+":"")+s+" top"+(a>=0?"+":"")+a,of:i.window},i._removeClass(t(this),"ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",r,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,n=this.options,r=n.resizable,o=this.uiDialog.css("position"),s="string"==typeof r?r:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:this._minHeight(),handles:s,start:function(n,r){i._addClass(t(this),"ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",n,e(r))},resize:function(t,n){i._trigger("resize",t,e(n))},stop:function(r,o){var s=i.uiDialog.offset(),a=s.left-i.document.scrollLeft(),l=s.top-i.document.scrollTop();n.height=i.uiDialog.height(),n.width=i.uiDialog.width(),n.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" top"+(l>=0?"+":"")+l,of:i.window},i._removeClass(t(this),"ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",r,e(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);i!==-1&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,n=!1,r={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(n=!0),t in i.resizableRelatedOptions&&(r[t]=e)}),n&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",r)},_setOption:function(e,i){var n,r,o=this.uiDialog;"disabled"!==e&&(this._super(e,i),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:t("<a>").text(""+this.options.closeText).html()}),"draggable"===e&&(n=o.is(":data(ui-draggable)"),n&&!i&&o.draggable("destroy"),!n&&i&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(r=o.is(":data(ui-resizable)"),r&&!i&&o.resizable("destroy"),r&&"string"==typeof i&&o.resizable("option","handles",i),r||i===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),n.minWidth>n.width&&(n.width=n.minWidth),t=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),e=Math.max(0,n.minHeight-t),i="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-t):"none","auto"===n.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,n.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return!!t(e.target).closest(".ui-dialog").length||!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}});t.ui.dialog;t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,n=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(n)?n:function(t){return t.is(n)},this.proportions=function(){return arguments.length?void(e=arguments[0]):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var n=t.ui.ddmanager.droppables[this.options.scope];this._splice(n),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),
i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var n=i||t.ui.ddmanager.current,r=!1;return!(!n||(n.currentItem||n.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=t(this).droppable("instance");if(i.options.greedy&&!i.options.disabled&&i.options.scope===n.options.scope&&i.accept.call(i.element[0],n.currentItem||n.element)&&y(n,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e))return r=!0,!1}),!r&&(!!this.accept.call(this.element[0],n.currentItem||n.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(n)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var y=t.ui.intersect=function(){function t(t,e,i){return t>=e&&t<e+i}return function(e,i,n,r){if(!i.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,s=(e.positionAbs||e.position.absolute).top+e.margins.top,a=o+e.helperProportions.width,l=s+e.helperProportions.height,c=i.offset.left,u=i.offset.top,h=c+i.proportions().width,d=u+i.proportions().height;switch(n){case"fit":return c<=o&&a<=h&&u<=s&&l<=d;case"intersect":return c<o+e.helperProportions.width/2&&a-e.helperProportions.width/2<h&&u<s+e.helperProportions.height/2&&l-e.helperProportions.height/2<d;case"pointer":return t(r.pageY,u,i.proportions().height)&&t(r.pageX,c,i.proportions().width);case"touch":return(s>=u&&s<=d||l>=u&&l<=d||s<u&&l>d)&&(o>=c&&o<=h||a>=c&&a<=h||o<c&&a>h);default:return!1}}}();t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var n,r,o=t.ui.ddmanager.droppables[e.options.scope]||[],s=i?i.type:null,a=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(n=0;n<o.length;n++)if(!(o[n].options.disabled||e&&!o[n].accept.call(o[n].element[0],e.currentItem||e.element))){for(r=0;r<a.length;r++)if(a[r]===o[n].element[0]){o[n].proportions().height=0;continue t}o[n].visible="none"!==o[n].element.css("display"),o[n].visible&&("mousedown"===s&&o[n]._activate.call(o[n],i),o[n].offset=o[n].element.offset(),o[n].proportions({width:o[n].element[0].offsetWidth,height:o[n].element[0].offsetHeight}))}},drop:function(e,i){var n=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&y(e,this,this.options.tolerance,i)&&(n=this._drop.call(this,i)||n),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),n},dragStart:function(e,i){e.element.parentsUntil("body").on("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var n,r,o,s=y(e,this,this.options.tolerance,i),a=!s&&this.isover?"isout":s&&!this.isover?"isover":null;a&&(this.options.greedy&&(r=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===r}),o.length&&(n=t(o[0]).droppable("instance"),n.greedyChild="isover"===a)),n&&"isover"===a&&(n.isover=!1,n.isout=!0,n._out.call(n,i)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,i),n&&"isout"===a&&(n.isout=!1,n.isover=!0,n._over.call(n,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},t.uiBackCompat!==!1&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});t.ui.droppable,t.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){return void 0===t?this.options.value:(this.options.value=this._constrainedValue(t),void this._refreshValue())},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each(function(){var i=t(this),n=i.offset(),r={left:n.left-e.elementPos.left,top:n.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:r.left,top:r.top,right:r.left+i.outerWidth(),bottom:r.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,n=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(n.filter,this.element[0]),this._trigger("start",e),t(n.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),n.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var n=t.data(this,"selectable-item");n.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(n.$element,"ui-selected"),n.selected=!1,i._addClass(n.$element,"ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",e,{unselecting:n.element}))}),t(e.target).parents().addBack().each(function(){var n,r=t.data(this,"selectable-item");if(r)return n=!e.metaKey&&!e.ctrlKey||!r.$element.hasClass("ui-selected"),i._removeClass(r.$element,n?"ui-unselecting":"ui-selected")._addClass(r.$element,n?"ui-selecting":"ui-unselecting"),r.unselecting=!n,r.selecting=n,r.selected=n,n?i._trigger("selecting",e,{selecting:r.element}):i._trigger("unselecting",e,{unselecting:r.element}),!1}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,n=this,r=this.options,o=this.opos[0],s=this.opos[1],a=e.pageX,l=e.pageY;return o>a&&(i=a,a=o,o=i),s>l&&(i=l,l=s,s=i),this.helper.css({left:o,top:s,width:a-o,height:l-s}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),c=!1,u={};i&&i.element!==n.element[0]&&(u.left=i.left+n.elementPos.left,u.right=i.right+n.elementPos.left,u.top=i.top+n.elementPos.top,u.bottom=i.bottom+n.elementPos.top,"touch"===r.tolerance?c=!(u.left>a||u.right<o||u.top>l||u.bottom<s):"fit"===r.tolerance&&(c=u.left>o&&u.right<a&&u.top>s&&u.bottom<l),c?(i.selected&&(n._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(n._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(n._addClass(i.$element,"ui-selecting"),i.selecting=!0,n._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(n._removeClass(i.$element,"ui-selecting"),i.selecting=!1,n._addClass(i.$element,"ui-selected"),i.selected=!0):(n._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(n._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),n._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(n._removeClass(i.$element,"ui-selected"),i.selected=!1,n._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var n=t.data(this,"selectable-item");i._removeClass(n.$element,"ui-unselecting"),n.unselecting=!1,n.startselected=!1,i._trigger("unselected",e,{unselected:n.element})}),t(".ui-selecting",this.element[0]).each(function(){var n=t.data(this,"selectable-item");i._removeClass(n.$element,"ui-selecting")._addClass(n.$element,"ui-selected"),n.selecting=!1,n.selected=!0,n.startselected=!0,i._trigger("selected",e,{selected:n.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=t()},_drawButton:function(){var e,i=this,n=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=t("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(n).appendTo(this.button),this.options.width!==!1&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){i._rendered||i._refreshMenu()})},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,i){t.preventDefault(),e._setSelection(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var n=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&n.index!==e.focusIndex&&(e._trigger("focus",t,{item:n}),e.isOpen||e._select(n,t)),e.focusIndex=n.index,e.button.attr("aria-activedescendant",e.menuItems.eq(n.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var i=t("<span>");return this._setText(i,e.label),this._addClass(i,"ui-selectmenu-text"),i},_renderMenu:function(e,i){var n=this,r="";t.each(i,function(i,o){var s;o.optgroup!==r&&(s=t("<li>",{text:o.optgroup}),n._addClass(s,"ui-selectmenu-optgroup","ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),s.appendTo(e),r=o.optgroup),n._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var n=t("<li>"),r=t("<div>",{title:i.element.attr("title")});return i.disabled&&this._addClass(n,null,"ui-state-disabled"),this._setText(r,i.label),n.append(r).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,n,r=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),r+=":not(.ui-state-disabled)"),n="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](r).eq(-1):i[t+"All"](r).eq(0),n.length&&this.menuInstance.focus(e,n)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+t.ui.escapeSelector(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var i=this.button.find("span.ui-icon");this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;return t===!1?void this.button.css("width",""):(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),void this.button.outerWidth(t))},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(e){var i=this,n=[];e.each(function(e,r){n.push(i._parseOption(t(r),e))}),this.items=n},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,n=this.options,r=this.element.find(".ui-slider-handle"),o="<span tabindex='0'></span>",s=[];for(i=n.values&&n.values.length||1,r.length>i&&(r.slice(i).remove(),r=r.slice(0,i)),e=r.length;e<i;e++)s.push(o);this.handles=r.add(t(s.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==e.range&&"max"!==e.range||this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,n,r,o,s,a,l,c,u=this,h=this.options;return!h.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(i),r=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(n-u.values(e));(r>i||r===i&&(e===u._lastChangedValue||u.values(e)===h.min))&&(r=i,o=t(this),s=e)}),a=this._start(e,s),a!==!1&&(this._mouseSliding=!0,this._handleIndex=s,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),l=o.offset(),c=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=c?{left:0,top:0}:{left:e.pageX-l.left-o.width()/2,top:e.pageY-l.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,s,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,n,r,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),n=i/e,n>1&&(n=1),n<0&&(n=0),"vertical"===this.orientation&&(n=1-n),r=this._valueMax()-this._valueMin(),o=this._valueMin()+n*r,this._trimAlignValue(o)},_uiHash:function(t,e,i){var n={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(n.value=void 0!==e?e:this.values(t),n.values=i||this.values()),n},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var n,r,o=this.value(),s=this.values();this._hasMultipleValues()&&(r=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&this.options.range===!0&&(i=0===e?Math.min(r,i):Math.max(r,i)),s[e]=i),i!==o&&(n=this._trigger("slide",t,this._uiHash(e,i,s)),n!==!1&&(this._hasMultipleValues()?this.values(e,i):this.value(i)))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,i){var n,r,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(n=this.options.values,r=arguments[0],o=0;o<n.length;o+=1)n[o]=this._trimAlignValue(r[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var n,r=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(r=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=r-1;n>=0;n--)this._change(null,n);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,n;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(i[n]);return i}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,n=t-i;return 2*Math.abs(i)>=e&&(n+=i>0?e:-e),parseFloat(n.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step,n=Math.round((t-e)/i)*i;t=n+e,t>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return i===-1?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,n,r,o,s=this.options.range,a=this.options,l=this,c=!this._animateOff&&a.animate,u={};this._hasMultipleValues()?this.handles.each(function(n){i=(l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())*100,u["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[c?"animate":"css"](u,a.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===n&&l.range.stop(1,1)[c?"animate":"css"]({left:i+"%"},a.animate),1===n&&l.range[c?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===n&&l.range.stop(1,1)[c?"animate":"css"]({bottom:i+"%"},a.animate),1===n&&l.range[c?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(n=this.value(),r=this._valueMin(),o=this._valueMax(),i=o!==r?(n-r)/(o-r)*100:0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[c?"animate":"css"](u,a.animate),"min"===s&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:i+"%"},a.animate),"max"===s&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:100-i+"%"},a.animate),"min"===s&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:i+"%"},a.animate),"max"===s&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:100-i+"%"},a.animate))},_handleEvents:{keydown:function(e){var i,n,r,o,s=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),i=this._start(e,s),i===!1))return}switch(o=this.options.step,n=r=this._hasMultipleValues()?this.values(s):this.value(),e.keyCode){case t.ui.keyCode.HOME:r=this._valueMin();break;case t.ui.keyCode.END:r=this._valueMax();break;case t.ui.keyCode.PAGE_UP:r=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:r=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;r=this._trimAlignValue(n+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;r=this._trimAlignValue(n-o)}this._slide(e,s,r)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){
var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var n=null,r=!1,o=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),t(e.target).parents().each(function(){if(t.data(this,o.widgetName+"-item")===o)return n=t(this),!1}),t.data(e.target,o.widgetName+"-item")===o&&(n=t(e.target)),!!n&&(!(this.options.handle&&!i&&(t(this.options.handle,n).find("*").addBack().each(function(){this===e.target&&(r=!0)}),!r))&&(this.currentItem=n,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(e,i,n){var r,o,s=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),s.containment&&this._setContainment(),s.cursor&&"auto"!==s.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",s.cursor),this.storedStylesheet=t("<style>*{ cursor: "+s.cursor+" !important; }</style>").appendTo(o)),s.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",s.opacity)),s.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",s.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(r=this.containers.length-1;r>=0;r--)this.containers[r]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,n,r,o,s=this.options,a=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-s.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-s.scrollSpeed)):(e.pageY-this.document.scrollTop()<s.scrollSensitivity?a=this.document.scrollTop(this.document.scrollTop()-s.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<s.scrollSensitivity&&(a=this.document.scrollTop(this.document.scrollTop()+s.scrollSpeed)),e.pageX-this.document.scrollLeft()<s.scrollSensitivity?a=this.document.scrollLeft(this.document.scrollLeft()-s.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<s.scrollSensitivity&&(a=this.document.scrollLeft(this.document.scrollLeft()+s.scrollSpeed))),a!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(n=this.items[i],r=n.item[0],o=this._intersectsWithPointer(n),o&&n.instance===this.currentContainer&&!(r===this.currentItem[0]||this.placeholder[1===o?"next":"prev"]()[0]===r||t.contains(this.placeholder[0],r)||"semi-dynamic"===this.options.type&&t.contains(this.element[0],r))){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(e,n),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var n=this,r=this.placeholder.offset(),o=this.options.axis,s={};o&&"x"!==o||(s.left=r.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(s.top=r.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(s,parseInt(this.options.revert,10)||500,function(){n._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&n.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!n.length&&e.key&&n.push(e.key+"="),n.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},i.each(function(){n.push(t(e.item||this).attr(e.attribute||"id")||"")}),n},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,n=this.positionAbs.top,r=n+this.helperProportions.height,o=t.left,s=o+t.width,a=t.top,l=a+t.height,c=this.offset.click.top,u=this.offset.click.left,h="x"===this.options.axis||n+c>a&&n+c<l,d="y"===this.options.axis||e+u>o&&e+u<s,p=h&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:o<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<s&&a<n+this.helperProportions.height/2&&r-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e,i,n="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),r="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),o=n&&r;return!!o&&(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return this.floating&&r?"right"===r&&i||"left"===r&&!i:n&&("down"===n&&e||"up"===n&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){a.push(this)}var n,r,o,s,a=[],l=[],c=this._connectWith();if(c&&e)for(n=c.length-1;n>=0;n--)for(o=t(c[n],this.document[0]),r=o.length-1;r>=0;r--)s=t.data(o[r],this.widgetFullName),s&&s!==this&&!s.options.disabled&&l.push([t.isFunction(s.options.items)?s.options.items.call(s.element):t(s.options.items,s.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),s]);for(l.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),n=l.length-1;n>=0;n--)l[n][0].each(i);return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;i<e.length;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,n,r,o,s,a,l,c,u=this.items,h=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(r=t(d[i],this.document[0]),n=r.length-1;n>=0;n--)o=t.data(r[n],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(h.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=h.length-1;i>=0;i--)for(s=h[i][1],a=h[i][0],n=0,c=a.length;n<c;n++)l=t(a[n]),l.data(this.widgetName+"-item",s),u.push({item:l,instance:s,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,n,r,o;for(i=this.items.length-1;i>=0;i--)n=this.items[i],n.instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(r=this.options.toleranceElement?t(this.options.toleranceElement,n.item):n.item,e||(n.width=r.outerWidth(),n.height=r.outerHeight()),o=r.offset(),n.left=o.left,n.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,n=e.options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=e.currentItem[0].nodeName.toLowerCase(),r=t("<"+n+">",e.document[0]);return e._addClass(r,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(r,"ui-sortable-helper"),"tbody"===n?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(r)):"tr"===n?e._createTrPlaceholder(e.currentItem,r):"img"===n&&r.attr("src",e.currentItem.attr("src")),i||r.css("visibility","hidden"),r},update:function(t,r){i&&!n.forcePlaceholderSize||(r.height()||r.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),r.width()||r.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(n.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),n.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var n=this;e.children().each(function(){t("<td>&#160;</td>",n.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,n,r,o,s,a,l,c,u,h,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(r=1e4,o=null,u=d.floating||this._isFloating(this.currentItem),s=u?"left":"top",a=u?"width":"height",h=u?"pageX":"pageY",n=this.items.length-1;n>=0;n--)t.contains(this.containers[p].element[0],this.items[n].item[0])&&this.items[n].item[0]!==this.currentItem[0]&&(l=this.items[n].item.offset()[s],c=!1,e[h]-l>this.items[n][a]/2&&(c=!0),Math.abs(e[h]-l)<r&&(r=Math.abs(e[h]-l),o=this.items[n],this.direction=c?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return void(this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),n[0].style.width&&!i.forceHelperSize||n.width(this.currentItem.width()),n[0].style.height&&!i.forceHelperSize||n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,n,r=this.options;"parent"===r.containment&&(r.containment=this.helper[0].parentNode),"document"!==r.containment&&"window"!==r.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===r.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===r.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(r.containment)||(e=t(r.containment)[0],i=t(r.containment).offset(),n="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(n?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(n?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var n="absolute"===e?1:-1,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(r[0].tagName);return{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:r.scrollTop())*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:r.scrollLeft())*n}},_generatePosition:function(e){var i,n,r=this.options,o=e.pageX,s=e.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),r.grid&&(i=this.originalPageY+Math.round((s-this.originalPageY)/r.grid[1])*r.grid[1],s=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-r.grid[1]:i+r.grid[1]:i,n=this.originalPageX+Math.round((o-this.originalPageX)/r.grid[0])*r.grid[0],o=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-r.grid[0]:n+r.grid[0]:n)),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(t,e,i,n){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var r=this.counter;this._delay(function(){r===this.counter&&this.refreshPositions(!n)})},_clear:function(t,e){function i(t,e,i){return function(n){i._trigger(t,n,e._uiHash(e))}}this.reverting=!1;var n,r=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)"auto"!==this._storedCSS[n]&&"static"!==this._storedCSS[n]||(this._storedCSS[n]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&r.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||r.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(r.push(function(t){this._trigger("remove",t,this._uiHash())}),r.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),r.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)e||r.push(i("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(r.push(i("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(n=0;n<r.length;n++)r[n].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}});t.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),i=this.element;return t.each(["min","max","step"],function(t,n){var r=i.attr(n);null!=r&&r.length&&(e[n]=r)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",t)))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var e=this.element[0]===t.ui.safeActiveElement(this.document[0]);e||(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n}))}var n;n=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){if(t(e.currentTarget).hasClass("ui-state-active"))return this._start(e)!==!1&&void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var i=this.options,n=t.ui.keyCode;switch(e.keyCode){case n.UP:return this._repeat(null,1,e),!0;case n.DOWN:return this._repeat(null,-1,e),!0;case n.PAGE_UP:return this._repeat(null,i.page,e),!0;case n.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_start:function(t){return!(!this.spinning&&this._trigger("start",t)===!1)&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return i===-1?0:e.length-i-1},_adjustValue:function(t){var e,i,n=this.options;return e=null!==n.min?n.min:0,i=t-e,i=Math.round(i/n.step)*n.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==n.max&&t>n.max?n.max:null!==n.min&&t<n.min?n.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i,n,r;return"culture"===t||"numberFormat"===t?(i=this._parse(this.element.val()),this.options[t]=e,void this.element.val(this._format(i))):("max"!==t&&"min"!==t&&"step"!==t||"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(n=this.buttons.first().find(".ui-icon"),this._removeClass(n,null,this.options.icons.up),this._addClass(n,null,e.up),r=this.buttons.last().find(".ui-icon"),this._removeClass(r,null,this.options.icons.down),this._addClass(r,null,e.down)),void this._super(t,e))},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:a(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null!==t&&t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:a(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:a(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:a(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:a(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?void a(this._value).call(this,t):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),t.uiBackCompat!==!1&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}});t.ui.spinner;t.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var i,n;i=e.href.replace(t,""),n=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(r){}try{n=decodeURIComponent(n)}catch(r){}return e.hash.length>1&&i===n}}(),_create:function(){var e=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.options.active!==!1&&this.anchors.length?this.active=this._findActive(i.active):this.active=t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,n=location.hash.substring(1);return null===e&&(n&&this.tabs.each(function(i,r){if(t(r).attr("aria-controls")===n)return e=i,!1}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),
null!==e&&e!==-1||(e=!!this.tabs.length&&0)),e!==!1&&(e=this.tabs.index(this.tabs.eq(e)),e===-1&&(e=!i&&0)),!i&&e===!1&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(t.ui.safeActiveElement(this.document[0])).closest("li"),n=this.tabs.index(i),r=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:r=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n);case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n!==this.options.active&&n);default:return}e.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,r),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){function n(){return e>r&&(e=0),e<0&&(e=r),e}for(var r=this.tabs.length-1;t.inArray(n(),this.options.disabled)!==-1;)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){return"active"===t?void this._activate(e):(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(e),void("heightStyle"===t&&this._setupHeightStyle(e)))},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,n=this.anchors,r=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=t(),this.anchors.each(function(i,n){var r,o,s,a=t(n).uniqueId().attr("id"),l=t(n).closest("li"),c=l.attr("aria-controls");e._isLocal(n)?(r=n.hash,s=r.substring(1),o=e.element.find(e._sanitizeSelector(r))):(s=l.attr("aria-controls")||t({}).uniqueId()[0].id,r="#"+s,o=e.element.find(r),o.length||(o=e._createPanel(s),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":s,"aria-labelledby":a}),o.attr("aria-labelledby",a)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)),this._off(n.not(this.anchors)),this._off(r.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var i,n,r;for(t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),r=0;n=this.tabs[r];r++)i=t(n),e===!0||t.inArray(r,e)!==-1?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,e===!0)},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,n=this.element.parent();"fill"===e?(i=n.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),n=e.css("position");"absolute"!==n&&"fixed"!==n&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,n=this.active,r=t(e.currentTarget),o=r.closest("li"),s=o[0]===n[0],a=s&&i.collapsible,l=a?t():this._getPanelForTab(o),c=n.length?this._getPanelForTab(n):t(),u={oldTab:n,oldPanel:c,newTab:a?t():o,newPanel:l};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||s&&!i.collapsible||this._trigger("beforeActivate",e,u)===!1||(i.active=!a&&this.tabs.index(o),this.active=s?t():o,this.xhr&&this.xhr.abort(),c.length||l.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(o),e),this._toggle(e,u))},_toggle:function(e,i){function n(){o.running=!1,o._trigger("activate",e,i)}function r(){o._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),s.length&&o.options.show?o._show(s,o.options.show,n):(s.show(),n())}var o=this,s=i.newPanel,a=i.oldPanel;this.running=!0,a.length&&this.options.hide?this._hide(a,this.options.hide,function(){o._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),a.hide(),r()),a.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),s.length&&a.length?i.oldTab.attr("tabIndex",-1):s.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),s.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,n=this._findActive(e);n[0]!==this.active[0]&&(n.length||(n=this.active),i=n.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+t.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;i!==!1&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setOptionDisabled(i))},disable:function(e){var i=this.options.disabled;if(i!==!0){if(void 0===e)i=!0;else{if(e=this._getIndex(e),t.inArray(e,i)!==-1)return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setOptionDisabled(i)}},load:function(e,i){e=this._getIndex(e);var n=this,r=this.tabs.eq(e),o=r.find(".ui-tabs-anchor"),s=this._getPanelForTab(r),a={tab:r,panel:s},l=function(t,e){"abort"===e&&n.panels.stop(!1,!0),n._removeClass(r,"ui-tabs-loading"),s.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,a)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(r,"ui-tabs-loading"),s.attr("aria-busy","true"),this.xhr.done(function(t,e,r){setTimeout(function(){s.html(t),n._trigger("load",i,a),l(r,e)},1)}).fail(function(t,e){setTimeout(function(){l(t,e)},1)})))},_ajaxSettings:function(e,i,n){var r=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,o){return r._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},n))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),t.uiBackCompat!==!1&&t.widget("ui.tabs",t.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}});t.ui.tabs;t.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,i){var n=(e.attr("aria-describedby")||"").split(/\s+/);n.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(n.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),n=(e.attr("aria-describedby")||"").split(/\s+/),r=t.inArray(i,n);r!==-1&&n.splice(r,1),e.removeData("ui-tooltip-id"),n=t.trim(n.join(" ")),n?e.attr("aria-describedby",n):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var n=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){n._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,function(i,n){var r=t.Event("blur");r.target=r.currentTarget=n.element[0],e.close(r,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=t(this);if(e.is("[title]"))return e.data("ui-tooltip-title",e.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},open:function(e){var i=this,n=t(e?e.target:this.element).closest(this.options.items);n.length&&!n.data("ui-tooltip-id")&&(n.attr("title")&&n.data("ui-tooltip-title",n.attr("title")),n.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&n.parents().each(function(){var e,n=t(this);n.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),n.attr("title")&&(n.uniqueId(),i.parents[this.id]={element:this,title:n.attr("title")},n.attr("title",""))}),this._registerCloseHandlers(e,n),this._updateContent(n,e))},_updateContent:function(t,e){var i,n=this.options.content,r=this,o=e?e.type:null;return"string"==typeof n||n.nodeType||n.jquery?this._open(e,t,n):(i=n.call(t[0],function(i){r._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}),void(i&&this._open(e,t,i)))},_open:function(e,i,n){function r(t){c.of=t,s.is(":hidden")||s.position(c)}var o,s,a,l,c=t.extend({},this.options.position);if(n){if(o=this._find(i))return void o.tooltip.find(".ui-tooltip-content").html(n);i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),o=this._tooltip(i),s=o.tooltip,this._addDescribedBy(i,s.attr("id")),s.find(".ui-tooltip-content").html(n),this.liveRegion.children().hide(),l=t("<div>").html(s.find(".ui-tooltip-content").html()),l.removeAttr("name").find("[name]").removeAttr("name"),l.removeAttr("id").find("[id]").removeAttr("id"),l.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:r}),r(e)):s.position(t.extend({of:i},this.options.position)),s.hide(),this._show(s,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(a=this.delayedShow=setInterval(function(){s.is(":visible")&&(r(c.of),clearInterval(a))},t.fx.interval)),this._trigger("open",e,{tooltip:s})}},_registerCloseHandlers:function(e,i){var n={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var n=t.Event(e);n.currentTarget=i[0],this.close(n,!0)}}};i[0]!==this.element[0]&&(n.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(n.mouseleave="close"),e&&"focusin"!==e.type||(n.focusout="close"),this._on(!0,i,n)},close:function(e){var i,n=this,r=t(e?e.currentTarget:this.element),o=this._find(r);return o?(i=o.tooltip,void(o.closing||(clearInterval(this.delayedShow),r.data("ui-tooltip-title")&&!r.attr("title")&&r.attr("title",r.data("ui-tooltip-title")),this._removeDescribedBy(r),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){n._removeTooltip(t(this))}),r.removeData("ui-tooltip-open"),this._off(r,"mouseleave focusout keyup"),r[0]!==this.element[0]&&this._off(r,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete n.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1)))):void r.removeData("ui-tooltip-open")},_tooltip:function(e){var i=t("<div>").attr("role","tooltip"),n=t("<div>").appendTo(i),r=i.uniqueId().attr("id");return this._addClass(n,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[r]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,n){var r=t.Event("blur"),o=n.element;r.target=r.currentTarget=o[0],e.close(r,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),t.uiBackCompat!==!1&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}});t.ui.tooltip}),function(t,e){"object"==typeof exports&&exports&&"string"!=typeof exports.nodeName?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):(t.Mustache={},e(t.Mustache))}(this,function(t){function e(t){return"function"==typeof t}function i(t){return g(t)?"array":typeof t}function n(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function r(t,e){return null!=t&&"object"==typeof t&&e in t}function o(t,e){return m.call(t,e)}function s(t){return!o(v,t)}function a(t){return String(t).replace(/[&<>"'`=\/]/g,function(t){return y[t]})}function l(e,i){function r(){if(v&&!y)for(;m.length;)delete f[m.pop()];else m=[];v=!1,y=!1}function o(t){if("string"==typeof t&&(t=t.split(w,2)),!g(t)||2!==t.length)throw new Error("Invalid tags: "+t);a=new RegExp(n(t[0])+"\\s*"),l=new RegExp("\\s*"+n(t[1])),d=new RegExp("\\s*"+n("}"+t[1]))}if(!e)return[];var a,l,d,p=[],f=[],m=[],v=!1,y=!1;o(i||t.tags);for(var C,T,S,D,M,A,P=new h(e);!P.eos();){if(C=P.pos,S=P.scanUntil(a))for(var I=0,E=S.length;I<E;++I)D=S.charAt(I),s(D)?m.push(f.length):y=!0,f.push(["text",D,C,C+1]),C+=1,"\n"===D&&r();if(!P.scan(a))break;if(v=!0,T=P.scan(k)||"name",P.scan(b),"="===T?(S=P.scanUntil(_),P.scan(_),P.scanUntil(l)):"{"===T?(S=P.scanUntil(d),P.scan(x),P.scanUntil(l),T="&"):S=P.scanUntil(l),!P.scan(l))throw new Error("Unclosed tag at "+P.pos);if(M=[T,S,C,P.pos],f.push(M),"#"===T||"^"===T)p.push(M);else if("/"===T){if(A=p.pop(),!A)throw new Error('Unopened section "'+S+'" at '+C);if(A[1]!==S)throw new Error('Unclosed section "'+A[1]+'" at '+C)}else"name"===T||"{"===T||"&"===T?y=!0:"="===T&&o(S)}if(A=p.pop())throw new Error('Unclosed section "'+A[1]+'" at '+P.pos);return u(c(f))}function c(t){for(var e,i,n=[],r=0,o=t.length;r<o;++r)e=t[r],e&&("text"===e[0]&&i&&"text"===i[0]?(i[1]+=e[1],i[3]=e[3]):(n.push(e),i=e));return n}function u(t){for(var e,i,n=[],r=n,o=[],s=0,a=t.length;s<a;++s)switch(e=t[s],e[0]){case"#":case"^":r.push(e),o.push(e),r=e[4]=[];break;case"/":i=o.pop(),i[5]=e[2],r=o.length>0?o[o.length-1][4]:n;break;default:r.push(e)}return n}function h(t){this.string=t,this.tail=t,this.pos=0}function d(t,e){this.view=t,this.cache={".":this.view},this.parent=e}function p(){this.cache={}}var f=Object.prototype.toString,g=Array.isArray||function(t){return"[object Array]"===f.call(t)},m=RegExp.prototype.test,v=/\S/,y={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"},b=/\s*/,w=/\s+/,_=/\s*=/,x=/\s*\}/,k=/#|\^|\/|>|\{|&|=|!/;h.prototype.eos=function(){return""===this.tail},h.prototype.scan=function(t){var e=this.tail.match(t);if(!e||0!==e.index)return"";var i=e[0];return this.tail=this.tail.substring(i.length),this.pos+=i.length,i},h.prototype.scanUntil=function(t){var e,i=this.tail.search(t);switch(i){case-1:e=this.tail,this.tail="";break;case 0:e="";break;default:e=this.tail.substring(0,i),this.tail=this.tail.substring(i)}return this.pos+=e.length,e},d.prototype.push=function(t){return new d(t,this)},d.prototype.lookup=function(t){var i,n=this.cache;if(n.hasOwnProperty(t))i=n[t];else{for(var o,s,a=this,l=!1;a;){if(t.indexOf(".")>0)for(i=a.view,o=t.split("."),s=0;null!=i&&s<o.length;)s===o.length-1&&(l=r(i,o[s])),i=i[o[s++]];else i=a.view[t],l=r(a.view,t);if(l)break;a=a.parent}n[t]=i}return e(i)&&(i=i.call(this.view)),i},p.prototype.clearCache=function(){this.cache={}},p.prototype.parse=function(t,e){var i=this.cache,n=i[t];return null==n&&(n=i[t]=l(t,e)),n},p.prototype.render=function(t,e,i){var n=this.parse(t),r=e instanceof d?e:new d(e);return this.renderTokens(n,r,i,t)},p.prototype.renderTokens=function(t,e,i,n){for(var r,o,s,a="",l=0,c=t.length;l<c;++l)s=void 0,r=t[l],o=r[0],"#"===o?s=this.renderSection(r,e,i,n):"^"===o?s=this.renderInverted(r,e,i,n):">"===o?s=this.renderPartial(r,e,i,n):"&"===o?s=this.unescapedValue(r,e):"name"===o?s=this.escapedValue(r,e):"text"===o&&(s=this.rawValue(r)),void 0!==s&&(a+=s);return a},p.prototype.renderSection=function(t,i,n,r){function o(t){return s.render(t,i,n)}var s=this,a="",l=i.lookup(t[1]);if(l){if(g(l))for(var c=0,u=l.length;c<u;++c)a+=this.renderTokens(t[4],i.push(l[c]),n,r);else if("object"==typeof l||"string"==typeof l||"number"==typeof l)a+=this.renderTokens(t[4],i.push(l),n,r);else if(e(l)){if("string"!=typeof r)throw new Error("Cannot use higher-order sections without the original template");l=l.call(i.view,r.slice(t[3],t[5]),o),null!=l&&(a+=l)}else a+=this.renderTokens(t[4],i,n,r);return a}},p.prototype.renderInverted=function(t,e,i,n){var r=e.lookup(t[1]);if(!r||g(r)&&0===r.length)return this.renderTokens(t[4],e,i,n)},p.prototype.renderPartial=function(t,i,n){if(n){var r=e(n)?n(t[1]):n[t[1]];return null!=r?this.renderTokens(this.parse(r),i,n,r):void 0}},p.prototype.unescapedValue=function(t,e){var i=e.lookup(t[1]);if(null!=i)return i},p.prototype.escapedValue=function(e,i){var n=i.lookup(e[1]);if(null!=n)return t.escape(n)},p.prototype.rawValue=function(t){return t[1]},t.name="mustache.js",t.version="2.3.2",t.tags=["{{","}}"];var C=new p;return t.clearCache=function(){return C.clearCache()},t.parse=function(t,e){return C.parse(t,e)},t.render=function(t,e,n){if("string"!=typeof t)throw new TypeError('Invalid template! Template should be a "string" but "'+i(t)+'" was given as the first argument for mustache#render(template, view, partials)');return C.render(t,e,n)},t.to_html=function(i,n,r,o){var s=t.render(i,n,r);return e(o)?void o(s):s},t.escape=a,t.Scanner=h,t.Context=d,t.Writer=p,t}),function(t){function e(t){return"undefined"==typeof t.which||"number"==typeof t.which&&t.which>0&&(!t.ctrlKey&&!t.metaKey&&!t.altKey&&8!=t.which&&9!=t.which)}function i(e){t(e).closest(".form-group").addClass("is-focused")}function n(e){t(e).closest(".form-group").removeClass("is-focused")}t.expr[":"].notmdproc=function(e){return!t(e).data("mdproc")},t.material={options:{input:!0,ripples:!0,checkbox:!0,togglebutton:!0,radio:!0,arrive:!0,autofill:!1,withRipples:[".btn:not(.btn-link)",".card-image",".navbar a:not(.withoutripple)",".dropdown-menu a",".nav-tabs a:not(.withoutripple)",".withripple",".pagination li:not(.active):not(.disabled) a:not(.withoutripple)"].join(","),inputElements:"input.form-control, textarea.form-control, select.form-control",checkboxElements:".checkbox > label > input[type=checkbox]",togglebuttonElements:".togglebutton > label > input[type=checkbox]",radioElements:".radio > label > input[type=radio]"},checkbox:function(e){t(e?e:this.options.checkboxElements).filter(":notmdproc").data("mdproc",!0).after("<span class='checkbox-material'><span class='check'></span></span>")},togglebutton:function(e){t(e?e:this.options.togglebuttonElements).filter(":notmdproc").data("mdproc",!0).after("<span class='toggle'></span>")},radio:function(e){t(e?e:this.options.radioElements).filter(":notmdproc").data("mdproc",!0).after("<span class='circle'></span><span class='check'></span>")},input:function(e){t(e?e:this.options.inputElements).filter(":notmdproc").data("mdproc",!0).each(function(){var e=t(this),i=e.closest(".form-group");0===i.length&&(e.wrap("<div class='form-group'></div>"),i=e.closest(".form-group")),e.attr("data-hint")&&(e.after("<p class='help-block'>"+e.attr("data-hint")+"</p>"),e.removeAttr("data-hint"));var n={"input-lg":"form-group-lg","input-sm":"form-group-sm"};if(t.each(n,function(t,n){e.hasClass(t)&&(e.removeClass(t),i.addClass(n))}),e.hasClass("floating-label")){var r=e.attr("placeholder");e.attr("placeholder",null).removeClass("floating-label");var o=e.attr("id"),s="";o&&(s="for='"+o+"'"),i.addClass("label-floating"),e.after("<label "+s+"class='control-label'>"+r+"</label>")}null!==e.val()&&"undefined"!=e.val()&&""!==e.val()||i.addClass("is-empty"),i.append("<span class='material-input'></span>"),i.find("input[type=file]").length>0&&i.addClass("is-fileinput")})},attachInputEventHandlers:function(){t(".form-group .checkbox label").hover(function(){i(this)},function(){n(this)}),t(document).on("change",".checkbox input[type=checkbox]",function(){t(this).blur()}).on("keydown paste",".form-control",function(i){e(i)&&t(this).closest(".form-group").removeClass("is-empty")}).on("keyup change",".form-control",function(){var e=t(this),i=e.closest(".form-group"),n="undefined"==typeof e[0].checkValidity||e[0].checkValidity();""===e.val()&&n?i.addClass("is-empty"):i.removeClass("is-empty"),n?i.removeClass("has-error"):i.addClass("has-error")}).on("focus",".form-control, .form-group.is-fileinput",function(){i(this)}).on("blur",".form-control, .form-group.is-fileinput",function(){n(this)}).on("change",".form-group input",function(){var e=t(this);if("file"!=e.attr("type")){var i=e.closest(".form-group"),n=e.val();n?i.removeClass("is-empty"):i.addClass("is-empty")}}).on("change",".form-group.is-fileinput input[type='file']",function(){var e=t(this),i=e.closest(".form-group"),n="";t.each(this.files,function(t,e){n+=e.name+", "}),n=n.substring(0,n.length-2),n?i.removeClass("is-empty"):i.addClass("is-empty"),i.find("input.form-control[readonly]").val(n)})},ripples:function(e){t(e?e:this.options.withRipples).ripples()},autofill:function(){var e=setInterval(function(){t("input[type!=checkbox]").each(function(){var e=t(this);e.val()&&e.val()!==e.attr("value")&&e.trigger("change")})},100);setTimeout(function(){clearInterval(e)},1e4)},attachAutofillEventHandlers:function(){var e;t(document).on("focus","input",function(){var i=t(this).parents("form").find("input").not("[type=file]");e=setInterval(function(){i.each(function(){var e=t(this);e.val()!==e.attr("value")&&e.trigger("change")})},100)}).on("blur",".form-group input",function(){clearInterval(e)})},init:function(){var e=t(document);t.fn.ripples&&this.options.ripples&&this.ripples(),this.options.input&&(this.input(),this.attachInputEventHandlers()),this.options.checkbox&&this.checkbox(),this.options.togglebutton&&this.togglebutton(),this.options.radio&&this.radio(),this.options.autofill&&(this.autofill(),this.attachAutofillEventHandlers()),document.arrive&&this.options.arrive&&(t.fn.ripples&&this.options.ripples&&e.arrive(this.options.withRipples,function(){t.material.ripples(t(this))}),this.options.input&&e.arrive(this.options.inputElements,function(){t.material.input(t(this))}),this.options.checkbox&&e.arrive(this.options.checkboxElements,function(){t.material.checkbox(t(this))}),this.options.radio&&e.arrive(this.options.radioElements,function(){t.material.radio(t(this))}),this.options.togglebutton&&e.arrive(this.options.togglebuttonElements,function(){t.material.togglebutton(t(this))}))}}}(jQuery),function(t,e,i,n){"use strict";function r(e,i){s=this,this.element=t(e),this.options=t.extend({},a,i),this._defaults=a,this._name=o,this.init()}var o="ripples",s=null,a={};r.prototype.init=function(){var i=this.element;i.on("mousedown touchstart",function(n){if(!s.isTouch()||"mousedown"!==n.type){i.find(".ripple-container").length||i.append('<div class="ripple-container"></div>');var r=i.children(".ripple-container"),o=s.getRelY(r,n),a=s.getRelX(r,n);if(o||a){var l=s.getRipplesColor(i),c=t("<div></div>");c.addClass("ripple").css({left:a,top:o,"background-color":l}),r.append(c),function(){return e.getComputedStyle(c[0]).opacity}(),s.rippleOn(i,c),setTimeout(function(){s.rippleEnd(c)},500),i.on("mouseup mouseleave touchend",function(){c.data("mousedown","off"),"off"===c.data("animating")&&s.rippleOut(c)})}}})},r.prototype.getNewSize=function(t,e){return Math.max(t.outerWidth(),t.outerHeight())/e.outerWidth()*2.5},r.prototype.getRelX=function(t,e){var i=t.offset();return s.isTouch()?(e=e.originalEvent,1===e.touches.length&&e.touches[0].pageX-i.left):e.pageX-i.left},r.prototype.getRelY=function(t,e){var i=t.offset();return s.isTouch()?(e=e.originalEvent,1===e.touches.length&&e.touches[0].pageY-i.top):e.pageY-i.top},r.prototype.getRipplesColor=function(t){var i=t.data("ripple-color")?t.data("ripple-color"):e.getComputedStyle(t[0]).color;return i},r.prototype.hasTransitionSupport=function(){var t=i.body||i.documentElement,e=t.style,r=e.transition!==n||e.WebkitTransition!==n||e.MozTransition!==n||e.MsTransition!==n||e.OTransition!==n;return r},r.prototype.isTouch=function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},r.prototype.rippleEnd=function(t){t.data("animating","off"),"off"===t.data("mousedown")&&s.rippleOut(t)},r.prototype.rippleOut=function(t){t.off(),s.hasTransitionSupport()?t.addClass("ripple-out"):t.animate({opacity:0},100,function(){t.trigger("transitionend")}),t.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){t.remove()})},r.prototype.rippleOn=function(t,e){var i=s.getNewSize(t,e);s.hasTransitionSupport()?e.css({"-ms-transform":"scale("+i+")","-moz-transform":"scale("+i+")","-webkit-transform":"scale("+i+")",transform:"scale("+i+")"}).addClass("ripple-on").data("animating","on").data("mousedown","on"):e.animate({width:2*Math.max(t.outerWidth(),t.outerHeight()),height:2*Math.max(t.outerWidth(),t.outerHeight()),"margin-left":Math.max(t.outerWidth(),t.outerHeight())*-1,"margin-top":Math.max(t.outerWidth(),t.outerHeight())*-1,opacity:.2},500,function(){e.trigger("transitionend")})},t.fn.ripples=function(e){return this.each(function(){t.data(this,"plugin_"+o)||t.data(this,"plugin_"+o,new r(this,e))})}}(jQuery,window,document),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,n=this;t(this).one("bsTransitionEnd",function(){i=!0});var r=function(){i||t(n).trigger(t.support.transition.end)};return setTimeout(r,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.alert");r||i.data("bs.alert",r=new n(this)),"string"==typeof e&&r[e].call(i)})}var i='[data-dismiss="alert"]',n=function(e){t(e).on("click",i,this.close)};n.VERSION="3.4.1",n.TRANSITION_DURATION=150,n.prototype.close=function(e){function i(){s.detach().trigger("closed.bs.alert").remove()}var r=t(this),o=r.attr("data-target");o||(o=r.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),o="#"===o?[]:o;var s=t(document).find(o);e&&e.preventDefault(),s.length||(s=r.closest(".alert")),s.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i())};var r=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=r,this},t(document).on("click.bs.alert.data-api",i,n.prototype.close)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),r=n.data("bs.button"),o="object"==typeof e&&e;r||n.data("bs.button",r=new i(this,o)),"toggle"==e?r.toggle():e&&r.setState(e)})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.isLoading=!1};i.VERSION="3.4.1",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var i="disabled",n=this.$element,r=n.is("input")?"val":"html",o=n.data();e+="Text",null==o.resetText&&n.data("resetText",n[r]()),
setTimeout(t.proxy(function(){n[r](null==o[e]?this.options[e]:o[e]),"loadingText"==e?(this.isLoading=!0,n.addClass(i).attr(i,i).prop(i,!0)):this.isLoading&&(this.isLoading=!1,n.removeClass(i).removeAttr(i).prop(i,!1))},this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(i){var n=t(i.target).closest(".btn");e.call(n,"toggle"),t(i.target).is('input[type="radio"], input[type="checkbox"]')||(i.preventDefault(),n.is("input,button")?n.trigger("focus"):n.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),r=n.data("bs.carousel"),o=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e),s="string"==typeof e?e:o.slide;r||n.data("bs.carousel",r=new i(this,o)),"number"==typeof e?r.to(e):s?r[s]():o.interval&&r.pause().cycle()})}var i=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};i.VERSION="3.4.1",i.TRANSITION_DURATION=600,i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},i.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},i.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e),n="prev"==t&&0===i||"next"==t&&i==this.$items.length-1;if(n&&!this.options.wrap)return e;var r="prev"==t?-1:1,o=(i+r)%this.$items.length;return this.$items.eq(o)},i.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",this.$items.eq(t))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){if(!this.sliding)return this.slide("next")},i.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},i.prototype.slide=function(e,n){var r=this.$element.find(".item.active"),o=n||this.getItemForDirection(e,r),s=this.interval,a="next"==e?"left":"right",l=this;if(o.hasClass("active"))return this.sliding=!1;var c=o[0],u=t.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(u),!u.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var h=t(this.$indicators.children()[this.getItemIndex(o)]);h&&h.addClass("active")}var d=t.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(o.addClass(e),"object"==typeof o&&o.length&&o[0].offsetWidth,r.addClass(a),o.addClass(a),r.one("bsTransitionEnd",function(){o.removeClass([e,a].join(" ")).addClass("active"),r.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(d)},0)}).emulateTransitionEnd(i.TRANSITION_DURATION)):(r.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(d)),s&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this};var r=function(i){var n=t(this),r=n.attr("href");r&&(r=r.replace(/.*(?=#[^\s]+$)/,""));var o=n.attr("data-target")||r,s=t(document).find(o);if(s.hasClass("carousel")){var a=t.extend({},s.data(),n.data()),l=n.attr("data-slide-to");l&&(a.interval=!1),e.call(s,a),l&&s.data("bs.carousel").to(l),i.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var i=t(this);e.call(i,i.data())})})}(jQuery),+function(t){"use strict";function e(e){var i,n=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(document).find(n)}function i(e){return this.each(function(){var i=t(this),r=i.data("bs.collapse"),o=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e);!r&&o.toggle&&/show|hide/.test(e)&&(o.toggle=!1),r||i.data("bs.collapse",r=new n(this,o)),"string"==typeof e&&r[e]()})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};n.VERSION="3.4.1",n.TRANSITION_DURATION=350,n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(r&&r.length&&(e=r.data("bs.collapse"),e&&e.transitioning))){var o=t.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){r&&r.length&&(i.call(r,"hide"),e||r.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(n.TRANSITION_DURATION)[s](this.$element[0][l])}}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(n.TRANSITION_DURATION):r.call(this)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},n.prototype.getParent=function(){return t(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(i,n){var r=t(n);this.addAriaAndCollapsedClass(e(r),r)},this)).end()},n.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var r=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=n,t.fn.collapse.noConflict=function(){return t.fn.collapse=r,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(n){var r=t(this);r.attr("data-target")||n.preventDefault();var o=e(r),s=o.data("bs.collapse"),a=s?"toggle":r.data();i.call(o,a)})}(jQuery),+function(t){"use strict";function e(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n="#"!==i?t(document).find(i):null;return n&&n.length?n:e.parent()}function i(i){i&&3===i.which||(t(r).remove(),t(o).each(function(){var n=t(this),r=e(n),o={relatedTarget:this};r.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&t.contains(r[0],i.target)||(r.trigger(i=t.Event("hide.bs.dropdown",o)),i.isDefaultPrevented()||(n.attr("aria-expanded","false"),r.removeClass("open").trigger(t.Event("hidden.bs.dropdown",o)))))}))}function n(e){return this.each(function(){var i=t(this),n=i.data("bs.dropdown");n||i.data("bs.dropdown",n=new s(this)),"string"==typeof e&&n[e].call(i)})}var r=".dropdown-backdrop",o='[data-toggle="dropdown"]',s=function(e){t(e).on("click.bs.dropdown",this.toggle)};s.VERSION="3.4.1",s.prototype.toggle=function(n){var r=t(this);if(!r.is(".disabled, :disabled")){var o=e(r),s=o.hasClass("open");if(i(),!s){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);var a={relatedTarget:this};if(o.trigger(n=t.Event("show.bs.dropdown",a)),n.isDefaultPrevented())return;r.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},s.prototype.keydown=function(i){if(/(38|40|27|32)/.test(i.which)&&!/input|textarea/i.test(i.target.tagName)){var n=t(this);if(i.preventDefault(),i.stopPropagation(),!n.is(".disabled, :disabled")){var r=e(n),s=r.hasClass("open");if(!s&&27!=i.which||s&&27==i.which)return 27==i.which&&r.find(o).trigger("focus"),n.trigger("click");var a=" li:not(.disabled):visible a",l=r.find(".dropdown-menu"+a);if(l.length){var c=l.index(i.target);38==i.which&&c>0&&c--,40==i.which&&c<l.length-1&&c++,~c||(c=0),l.eq(c).trigger("focus")}}}};var a=t.fn.dropdown;t.fn.dropdown=n,t.fn.dropdown.Constructor=s,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=a,this},t(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",o,s.prototype.toggle).on("keydown.bs.dropdown.data-api",o,s.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",s.prototype.keydown)}(jQuery),+function(t){"use strict";function e(e,n){return this.each(function(){var r=t(this),o=r.data("bs.modal"),s=t.extend({},i.DEFAULTS,r.data(),"object"==typeof e&&e);o||r.data("bs.modal",o=new i(this,s)),"string"==typeof e?o[e](n):s.show&&o.show(n)})}var i=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom",this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};i.VERSION="3.4.1",i.TRANSITION_DURATION=300,i.BACKDROP_TRANSITION_DURATION=150,i.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},i.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},i.prototype.show=function(e){var n=this,r=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(r),this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){n.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(n.$element)&&(n.ignoreBackdropClick=!0)})}),this.backdrop(function(){var r=t.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(n.$body),n.$element.show().scrollTop(0),n.adjustDialog(),r&&n.$element[0].offsetWidth,n.$element.addClass("in"),n.enforceFocus();var o=t.Event("shown.bs.modal",{relatedTarget:e});r?n.$dialog.one("bsTransitionEnd",function(){n.$element.trigger("focus").trigger(o)}).emulateTransitionEnd(i.TRANSITION_DURATION):n.$element.trigger("focus").trigger(o)}))},i.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(i.TRANSITION_DURATION):this.hideModal())},i.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},i.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},i.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},i.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},i.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},i.prototype.backdrop=function(e){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=t.support.transition&&r;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+r).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;o?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){n.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):s()}else e&&e()},i.prototype.handleUpdate=function(){this.adjustDialog()},i.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},i.prototype.setScrollbar=function(){var e=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var i=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",e+i),t(this.fixedContent).each(function(e,n){var r=n.style.paddingRight,o=t(n).css("padding-right");t(n).data("padding-right",r).css("padding-right",parseFloat(o)+i+"px")}))},i.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),t(this.fixedContent).each(function(e,i){var n=t(i).data("padding-right");t(i).removeData("padding-right"),i.style.paddingRight=n?n:""})},i.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var n=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=i,t.fn.modal.noConflict=function(){return t.fn.modal=n,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(i){var n=t(this),r=n.attr("href"),o=n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,""),s=t(document).find(o),a=s.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(r)&&r},s.data(),n.data());n.is("a")&&i.preventDefault(),s.one("show.bs.modal",function(t){t.isDefaultPrevented()||s.one("hidden.bs.modal",function(){n.is(":visible")&&n.trigger("focus")})}),e.call(s,a,this)})}(jQuery),+function(t){"use strict";function e(e,i){var n=e.nodeName.toLowerCase();if(t.inArray(n,i)!==-1)return t.inArray(n,o)===-1||Boolean(e.nodeValue.match(l)||e.nodeValue.match(c));for(var r=t(i).filter(function(t,e){return e instanceof RegExp}),s=0,a=r.length;s<a;s++)if(n.match(r[s]))return!0;return!1}function i(i,n,r){if(0===i.length)return i;if(r&&"function"==typeof r)return r(i);if(!document.implementation||!document.implementation.createHTMLDocument)return i;var o=document.implementation.createHTMLDocument("sanitization");o.body.innerHTML=i;for(var s=t.map(n,function(t,e){return e}),a=t(o.body).find("*"),l=0,c=a.length;l<c;l++){var u=a[l],h=u.nodeName.toLowerCase();if(t.inArray(h,s)!==-1)for(var d=t.map(u.attributes,function(t){return t}),p=[].concat(n["*"]||[],n[h]||[]),f=0,g=d.length;f<g;f++)e(d[f],p)||u.removeAttribute(d[f].nodeName);else u.parentNode.removeChild(u)}return o.body.innerHTML}function n(e){return this.each(function(){var i=t(this),n=i.data("bs.tooltip"),r="object"==typeof e&&e;!n&&/destroy|hide/.test(e)||(n||i.data("bs.tooltip",n=new u(this,r)),"string"==typeof e&&n[e]())})}var r=["sanitize","whiteList","sanitizeFn"],o=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],s=/^aria-[\w-]*$/i,a={"*":["class","dir","id","lang","role",s],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},l=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:\/?#]*(?:[\/?#]|$))/gi,c=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i,u=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};u.VERSION="3.4.1",u.TRANSITION_DURATION=150,u.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:a},u.prototype.init=function(e,i,n){if(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(document).find(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),o=r.length;o--;){var s=r[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",l="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},u.prototype.getDefaults=function(){return u.DEFAULTS},u.prototype.getOptions=function(e){var n=this.$element.data();for(var o in n)n.hasOwnProperty(o)&&t.inArray(o,r)!==-1&&delete n[o];return e=t.extend({},this.getDefaults(),n,e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e.sanitize&&(e.template=i(e.template,e.whiteList,e.sanitizeFn)),e},u.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,n){i[t]!=n&&(e[t]=n)}),e},u.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusin"==e.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())},u.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},u.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusout"==e.type?"focus":"hover"]=!1),!i.isInStateTrue())return clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()},u.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var i=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!i)return;var n=this,r=this.tip(),o=this.getUID(this.type);this.setContent(),r.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&r.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,l=a.test(s);l&&(s=s.replace(a,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?r.appendTo(t(document).find(this.options.container)):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),h=r[0].offsetWidth,d=r[0].offsetHeight;if(l){var p=s,f=this.getPosition(this.$viewport);s="bottom"==s&&c.bottom+d>f.bottom?"top":"top"==s&&c.top-d<f.top?"bottom":"right"==s&&c.right+h>f.width?"left":"left"==s&&c.left-h<f.left?"right":s,r.removeClass(p).addClass(s)}var g=this.getCalculatedOffset(s,c,h,d);this.applyPlacement(g,s);var m=function(){var t=n.hoverState;n.$element.trigger("shown.bs."+n.type),n.hoverState=null,"out"==t&&n.leave(n)};t.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",m).emulateTransitionEnd(u.TRANSITION_DURATION):m()}},u.prototype.applyPlacement=function(e,i){var n=this.tip(),r=n[0].offsetWidth,o=n[0].offsetHeight,s=parseInt(n.css("margin-top"),10),a=parseInt(n.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),e.top+=s,e.left+=a,t.offset.setOffset(n[0],t.extend({using:function(t){n.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),n.addClass("in");var l=n[0].offsetWidth,c=n[0].offsetHeight;"top"==i&&c!=o&&(e.top=e.top+o-c);var u=this.getViewportAdjustedDelta(i,e,l,c);u.left?e.left+=u.left:e.top+=u.top;var h=/top|bottom/.test(i),d=h?2*u.left-r+l:2*u.top-o+c,p=h?"offsetWidth":"offsetHeight";n.offset(e),this.replaceArrow(d,n[0][p],h)},u.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},u.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();this.options.html?(this.options.sanitize&&(e=i(e,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(e)):t.find(".tooltip-inner").text(e),t.removeClass("fade in top bottom left right")},u.prototype.hide=function(e){function i(){"in"!=n.hoverState&&r.detach(),n.$element&&n.$element.removeAttr("aria-describedby").trigger("hidden.bs."+n.type),e&&e()}var n=this,r=t(this.$tip),o=t.Event("hide.bs."+this.type);if(this.$element.trigger(o),!o.isDefaultPrevented())return r.removeClass("in"),t.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",i).emulateTransitionEnd(u.TRANSITION_DURATION):i(),this.hoverState=null,this},u.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},u.prototype.hasContent=function(){return this.getTitle()},u.prototype.getPosition=function(e){e=e||this.$element;var i=e[0],n="BODY"==i.tagName,r=i.getBoundingClientRect();null==r.width&&(r=t.extend({},r,{width:r.right-r.left,height:r.bottom-r.top}));var o=window.SVGElement&&i instanceof window.SVGElement,s=n?{top:0,left:0}:o?null:e.offset(),a={scroll:n?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},l=n?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},r,a,l,s)},u.prototype.getCalculatedOffset=function(t,e,i,n){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-n,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-n/2,left:e.left-i}:{top:e.top+e.height/2-n/2,left:e.left+e.width}},u.prototype.getViewportAdjustedDelta=function(t,e,i,n){var r={top:0,left:0};if(!this.$viewport)return r;var o=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-o-s.scroll,l=e.top+o-s.scroll+n;a<s.top?r.top=s.top-a:l>s.top+s.height&&(r.top=s.top+s.height-l)}else{var c=e.left-o,u=e.left+o+i;c<s.left?r.left=s.left-c:u>s.right&&(r.left=s.left+s.width-u)}return r},u.prototype.getTitle=function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},u.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},u.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},u.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},u.prototype.enable=function(){this.enabled=!0},u.prototype.disable=function(){this.enabled=!1},u.prototype.toggleEnabled=function(){this.enabled=!this.enabled},u.prototype.toggle=function(e){var i=this;e&&(i=t(e.currentTarget).data("bs."+this.type),i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),e?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)},u.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})},u.prototype.sanitizeHtml=function(t){return i(t,this.options.whiteList,this.options.sanitizeFn)};var h=t.fn.tooltip;t.fn.tooltip=n,t.fn.tooltip.Constructor=u,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=h,this}}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),r=n.data("bs.popover"),o="object"==typeof e&&e;!r&&/destroy|hide/.test(e)||(r||n.data("bs.popover",r=new i(this,o)),"string"==typeof e&&r[e]())})}var i=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");i.VERSION="3.4.1",i.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),i.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),i.prototype.constructor=i,i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();if(this.options.html){var n=typeof i;this.options.sanitize&&(e=this.sanitizeHtml(e),"string"===n&&(i=this.sanitizeHtml(i))),t.find(".popover-title").html(e),t.find(".popover-content").children().detach().end()["string"===n?"html":"append"](i)}else t.find(".popover-title").text(e),t.find(".popover-content").children().detach().end().text(i);t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},i.prototype.hasContent=function(){return this.getTitle()||this.getContent()},i.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=i,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(jQuery),+function(t){"use strict";function e(i,n){this.$body=t(document.body),this.$scrollElement=t(t(i).is(document.body)?window:i),this.options=t.extend({},e.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function i(i){return this.each(function(){var n=t(this),r=n.data("bs.scrollspy"),o="object"==typeof i&&i;r||n.data("bs.scrollspy",r=new e(this,o)),"string"==typeof i&&r[i]()})}e.VERSION="3.4.1",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,i="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(i="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),r=e.data("target")||e.attr("href"),o=/^#./.test(r)&&t(r);return o&&o.length&&o.is(":visible")&&[[o[i]().top+n,r]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),n=this.options.offset+i-this.$scrollElement.height(),r=this.offsets,o=this.targets,s=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),e>=n)return s!=(t=o[o.length-1])&&this.activate(t);if(s&&e<r[0])return this.activeTarget=null,this.clear();for(t=r.length;t--;)s!=o[t]&&e>=r[t]&&(void 0===r[t+1]||e<r[t+1])&&this.activate(o[t]);
},e.prototype.activate=function(e){this.activeTarget=e,this.clear();var i=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',n=t(i).parents("li").addClass("active");n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate.bs.scrollspy")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var n=t.fn.scrollspy;t.fn.scrollspy=i,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=n,this},t(window).on("load.bs.scrollspy.data-api",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);i.call(e,e.data())})})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),r=n.data("bs.tab");r||n.data("bs.tab",r=new i(this)),"string"==typeof e&&r[e]()})}var i=function(e){this.element=t(e)};i.VERSION="3.4.1",i.TRANSITION_DURATION=150,i.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),n=e.data("target");if(n||(n=e.attr("href"),n=n&&n.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var r=i.find(".active:last a"),o=t.Event("hide.bs.tab",{relatedTarget:e[0]}),s=t.Event("show.bs.tab",{relatedTarget:r[0]});if(r.trigger(o),e.trigger(s),!s.isDefaultPrevented()&&!o.isDefaultPrevented()){var a=t(document).find(n);this.activate(e.closest("li"),i),this.activate(a,a.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:r[0]})})}}},i.prototype.activate=function(e,n,r){function o(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),r&&r()}var s=n.find("> .active"),a=r&&t.support.transition&&(s.length&&s.hasClass("fade")||!!n.find("> .fade").length);s.length&&a?s.one("bsTransitionEnd",o).emulateTransitionEnd(i.TRANSITION_DURATION):o(),s.removeClass("in")};var n=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=n,this};var r=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',r).on("click.bs.tab.data-api",'[data-toggle="pill"]',r)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),r=n.data("bs.affix"),o="object"==typeof e&&e;r||n.data("bs.affix",r=new i(this,o)),"string"==typeof e&&r[e]()})}var i=function(e,n){this.options=t.extend({},i.DEFAULTS,n);var r=this.options.target===i.DEFAULTS.target?t(this.options.target):t(document).find(this.options.target);this.$target=r.on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.4.1",i.RESET="affix affix-top affix-bottom",i.DEFAULTS={offset:0,target:window},i.prototype.getState=function(t,e,i,n){var r=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=i&&"top"==this.affixed)return r<i&&"top";if("bottom"==this.affixed)return null!=i?!(r+this.unpin<=o.top)&&"bottom":!(r+s<=t-n)&&"bottom";var a=null==this.affixed,l=a?r:o.top,c=a?s:e;return null!=i&&r<=i?"top":null!=n&&l+c>=t-n&&"bottom"},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),n=this.options.offset,r=n.top,o=n.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof n&&(o=r=n),"function"==typeof r&&(r=n.top(this.$element)),"function"==typeof o&&(o=n.bottom(this.$element));var a=this.getState(s,e,r,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),c=t.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-e-o})}};var n=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=i,t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var i=t(this),n=i.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),e.call(i,n)})})}(jQuery),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):window.jQuery)}(function(t){"use strict";var e=0,i=t,n="parseJSON";"JSON"in window&&"parse"in JSON&&(i=JSON,n="parse"),t.ajaxTransport("iframe",function(i){if(i.async){var n,r,o,s=i.initialIframeSrc||"javascript:false;";return{send:function(a,l){n=t('<form style="display:none;"></form>'),n.attr("accept-charset",i.formAcceptCharset),o=/\?/.test(i.url)?"&":"?","DELETE"===i.type?(i.url=i.url+o+"_method=DELETE",i.type="POST"):"PUT"===i.type?(i.url=i.url+o+"_method=PUT",i.type="POST"):"PATCH"===i.type&&(i.url=i.url+o+"_method=PATCH",i.type="POST"),e+=1,r=t('<iframe src="'+s+'" name="iframe-transport-'+e+'"></iframe>').bind("load",function(){var e,o=t.isArray(i.paramName)?i.paramName:[i.paramName];r.unbind("load").bind("load",function(){var e;try{if(e=r.contents(),!e.length||!e[0].firstChild)throw new Error}catch(i){e=void 0}l(200,"success",{iframe:e}),t('<iframe src="'+s+'"></iframe>').appendTo(n),window.setTimeout(function(){n.remove()},0)}),n.prop("target",r.prop("name")).prop("action",i.url).prop("method",i.type),i.formData&&t.each(i.formData,function(e,i){t('<input type="hidden"/>').prop("name",i.name).val(i.value).appendTo(n)}),i.fileInput&&i.fileInput.length&&"POST"===i.type&&(e=i.fileInput.clone(),i.fileInput.after(function(t){return e[t]}),i.paramName&&i.fileInput.each(function(e){t(this).prop("name",o[e]||i.paramName)}),n.append(i.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data"),i.fileInput.removeAttr("form")),n.submit(),e&&e.length&&i.fileInput.each(function(i,n){var r=t(e[i]);t(n).prop("name",r.prop("name")).attr("form",r.attr("form")),r.replaceWith(n)})}),n.append(r).appendTo(document.body)},abort:function(){r&&r.unbind("load").prop("src",s),n&&n.remove()}}}}),t.ajaxSetup({converters:{"iframe text":function(e){return e&&t(e[0].body).text()},"iframe json":function(e){return e&&i[n](t(e[0].body).text())},"iframe html":function(e){return e&&t(e[0].body).html()},"iframe xml":function(e){var i=e&&e[0];return i&&t.isXMLDoc(i)?i:t.parseXML(i.XMLDocument&&i.XMLDocument.xml||t(i.body).html())},"iframe script":function(e){return e&&t.globalEval(t(e[0].body).text())}}})}),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","jquery-ui/ui/widget"],t):"object"==typeof exports?t(require("jquery"),require("./vendor/jquery.ui.widget")):t(window.jQuery)}(function(t){"use strict";function e(e){var i="dragover"===e;return function(n){n.dataTransfer=n.originalEvent&&n.originalEvent.dataTransfer;var r=n.dataTransfer;r&&t.inArray("Files",r.types)!==-1&&this._trigger(e,t.Event(e,{delegatedEvent:n}))!==!1&&(n.preventDefault(),i&&(r.dropEffect="copy"))}}t.support.fileInput=!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))").test(window.navigator.userAgent)||t('<input type="file"/>').prop("disabled")),t.support.xhrFileUpload=!(!window.ProgressEvent||!window.FileReader),t.support.xhrFormDataFileUpload=!!window.FormData,t.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),t.widget("blueimp.fileupload",{options:{dropZone:t(document),pasteZone:void 0,fileInput:void 0,replaceFileInput:!0,paramName:void 0,singleFileUploads:!0,limitMultiFileUploads:void 0,limitMultiFileUploadSize:void 0,limitMultiFileUploadSizeOverhead:512,sequentialUploads:!1,limitConcurrentUploads:void 0,forceIframeTransport:!1,redirect:void 0,redirectParamName:void 0,postMessage:void 0,multipart:!0,maxChunkSize:void 0,uploadedBytes:void 0,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,autoUpload:!0,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(e,i){return e=this.messages[e]||e.toString(),i&&t.each(i,function(t,i){e=e.replace("{"+t+"}",i)}),e},formData:function(t){return t.serializeArray()},add:function(e,i){return!e.isDefaultPrevented()&&void((i.autoUpload||i.autoUpload!==!1&&t(this).fileupload("option","autoUpload"))&&i.process().done(function(){i.submit()}))},processData:!1,contentType:!1,cache:!1,timeout:0},_specialOptions:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_blobSlice:t.support.blobSlice&&function(){var t=this.slice||this.webkitSlice||this.mozSlice;return t.apply(this,arguments)},_BitrateTimer:function(){this.timestamp=Date.now?Date.now():(new Date).getTime(),this.loaded=0,this.bitrate=0,this.getBitrate=function(t,e,i){var n=t-this.timestamp;return(!this.bitrate||!i||n>i)&&(this.bitrate=(e-this.loaded)*(1e3/n)*8,this.loaded=e,this.timestamp=t),this.bitrate}},_isXHRUpload:function(e){return!e.forceIframeTransport&&(!e.multipart&&t.support.xhrFileUpload||t.support.xhrFormDataFileUpload)},_getFormData:function(e){var i;return"function"===t.type(e.formData)?e.formData(e.form):t.isArray(e.formData)?e.formData:"object"===t.type(e.formData)?(i=[],t.each(e.formData,function(t,e){i.push({name:t,value:e})}),i):[]},_getTotal:function(e){var i=0;return t.each(e,function(t,e){i+=e.size||1}),i},_initProgressObject:function(e){var i={loaded:0,total:0,bitrate:0};e._progress?t.extend(e._progress,i):e._progress=i},_initResponseObject:function(t){var e;if(t._response)for(e in t._response)t._response.hasOwnProperty(e)&&delete t._response[e];else t._response={}},_onProgress:function(e,i){if(e.lengthComputable){var n,r=Date.now?Date.now():(new Date).getTime();if(i._time&&i.progressInterval&&r-i._time<i.progressInterval&&e.loaded!==e.total)return;i._time=r,n=Math.floor(e.loaded/e.total*(i.chunkSize||i._progress.total))+(i.uploadedBytes||0),this._progress.loaded+=n-i._progress.loaded,this._progress.bitrate=this._bitrateTimer.getBitrate(r,this._progress.loaded,i.bitrateInterval),i._progress.loaded=i.loaded=n,i._progress.bitrate=i.bitrate=i._bitrateTimer.getBitrate(r,n,i.bitrateInterval),this._trigger("progress",t.Event("progress",{delegatedEvent:e}),i),this._trigger("progressall",t.Event("progressall",{delegatedEvent:e}),this._progress)}},_initProgressListener:function(e){var i=this,n=e.xhr?e.xhr():t.ajaxSettings.xhr();n.upload&&(t(n.upload).bind("progress",function(t){var n=t.originalEvent;t.lengthComputable=n.lengthComputable,t.loaded=n.loaded,t.total=n.total,i._onProgress(t,e)}),e.xhr=function(){return n})},_deinitProgressListener:function(e){var i=e.xhr?e.xhr():t.ajaxSettings.xhr();i.upload&&t(i.upload).unbind("progress")},_isInstanceOf:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"},_initXHRData:function(e){var i,n=this,r=e.files[0],o=e.multipart||!t.support.xhrFileUpload,s="array"===t.type(e.paramName)?e.paramName[0]:e.paramName;e.headers=t.extend({},e.headers),e.contentRange&&(e.headers["Content-Range"]=e.contentRange),o&&!e.blob&&this._isInstanceOf("File",r)||(e.headers["Content-Disposition"]='attachment; filename="'+encodeURI(r.uploadName||r.name)+'"'),o?t.support.xhrFormDataFileUpload&&(e.postMessage?(i=this._getFormData(e),e.blob?i.push({name:s,value:e.blob}):t.each(e.files,function(n,r){i.push({name:"array"===t.type(e.paramName)&&e.paramName[n]||s,value:r})})):(n._isInstanceOf("FormData",e.formData)?i=e.formData:(i=new FormData,t.each(this._getFormData(e),function(t,e){i.append(e.name,e.value)})),e.blob?i.append(s,e.blob,r.uploadName||r.name):t.each(e.files,function(r,o){(n._isInstanceOf("File",o)||n._isInstanceOf("Blob",o))&&i.append("array"===t.type(e.paramName)&&e.paramName[r]||s,o,o.uploadName||o.name)})),e.data=i):(e.contentType=r.type||"application/octet-stream",e.data=e.blob||r),e.blob=null},_initIframeSettings:function(e){var i=t("<a></a>").prop("href",e.url).prop("host");e.dataType="iframe "+(e.dataType||""),e.formData=this._getFormData(e),e.redirect&&i&&i!==location.host&&e.formData.push({name:e.redirectParamName||"redirect",value:e.redirect})},_initDataSettings:function(t){this._isXHRUpload(t)?(this._chunkedUpload(t,!0)||(t.data||this._initXHRData(t),this._initProgressListener(t)),t.postMessage&&(t.dataType="postmessage "+(t.dataType||""))):this._initIframeSettings(t)},_getParamName:function(e){var i=t(e.fileInput),n=e.paramName;return n?t.isArray(n)||(n=[n]):(n=[],i.each(function(){for(var e=t(this),i=e.prop("name")||"files[]",r=(e.prop("files")||[1]).length;r;)n.push(i),r-=1}),n.length||(n=[i.prop("name")||"files[]"])),n},_initFormSettings:function(e){e.form&&e.form.length||(e.form=t(e.fileInput.prop("form")),e.form.length||(e.form=t(this.options.fileInput.prop("form")))),e.paramName=this._getParamName(e),e.url||(e.url=e.form.prop("action")||location.href),e.type=(e.type||"string"===t.type(e.form.prop("method"))&&e.form.prop("method")||"").toUpperCase(),"POST"!==e.type&&"PUT"!==e.type&&"PATCH"!==e.type&&(e.type="POST"),e.formAcceptCharset||(e.formAcceptCharset=e.form.attr("accept-charset"))},_getAJAXSettings:function(e){var i=t.extend({},this.options,e);return this._initFormSettings(i),this._initDataSettings(i),i},_getDeferredState:function(t){return t.state?t.state():t.isResolved()?"resolved":t.isRejected()?"rejected":"pending"},_enhancePromise:function(t){return t.success=t.done,t.error=t.fail,t.complete=t.always,t},_getXHRPromise:function(e,i,n){var r=t.Deferred(),o=r.promise();return i=i||this.options.context||o,e===!0?r.resolveWith(i,n):e===!1&&r.rejectWith(i,n),o.abort=r.promise,this._enhancePromise(o)},_addConvenienceMethods:function(e,i){var n=this,r=function(e){return t.Deferred().resolveWith(n,e).promise()};i.process=function(e,o){return(e||o)&&(i._processQueue=this._processQueue=(this._processQueue||r([this])).then(function(){return i.errorThrown?t.Deferred().rejectWith(n,[i]).promise():r(arguments)}).then(e,o)),this._processQueue||r([this])},i.submit=function(){return"pending"!==this.state()&&(i.jqXHR=this.jqXHR=n._trigger("submit",t.Event("submit",{delegatedEvent:e}),this)!==!1&&n._onSend(e,this)),this.jqXHR||n._getXHRPromise()},i.abort=function(){return this.jqXHR?this.jqXHR.abort():(this.errorThrown="abort",n._trigger("fail",null,this),n._getXHRPromise(!1))},i.state=function(){return this.jqXHR?n._getDeferredState(this.jqXHR):this._processQueue?n._getDeferredState(this._processQueue):void 0},i.processing=function(){return!this.jqXHR&&this._processQueue&&"pending"===n._getDeferredState(this._processQueue)},i.progress=function(){return this._progress},i.response=function(){return this._response}},_getUploadedBytes:function(t){var e=t.getResponseHeader("Range"),i=e&&e.split("-"),n=i&&i.length>1&&parseInt(i[1],10);return n&&n+1},_chunkedUpload:function(e,i){e.uploadedBytes=e.uploadedBytes||0;var n,r,o=this,s=e.files[0],a=s.size,l=e.uploadedBytes,c=e.maxChunkSize||a,u=this._blobSlice,h=t.Deferred(),d=h.promise();return!(!(this._isXHRUpload(e)&&u&&(l||("function"===t.type(c)?c(e):c)<a))||e.data)&&(!!i||(l>=a?(s.error=e.i18n("uploadedBytes"),this._getXHRPromise(!1,e.context,[null,"error",s.error])):(r=function(){var i=t.extend({},e),d=i._progress.loaded;i.blob=u.call(s,l,l+("function"===t.type(c)?c(i):c),s.type),i.chunkSize=i.blob.size,i.contentRange="bytes "+l+"-"+(l+i.chunkSize-1)+"/"+a,o._trigger("chunkbeforesend",null,i),o._initXHRData(i),o._initProgressListener(i),n=(o._trigger("chunksend",null,i)!==!1&&t.ajax(i)||o._getXHRPromise(!1,i.context)).done(function(n,s,c){l=o._getUploadedBytes(c)||l+i.chunkSize,d+i.chunkSize-i._progress.loaded&&o._onProgress(t.Event("progress",{lengthComputable:!0,loaded:l-i.uploadedBytes,total:l-i.uploadedBytes}),i),e.uploadedBytes=i.uploadedBytes=l,i.result=n,i.textStatus=s,i.jqXHR=c,o._trigger("chunkdone",null,i),o._trigger("chunkalways",null,i),l<a?r():h.resolveWith(i.context,[n,s,c])}).fail(function(t,e,n){i.jqXHR=t,i.textStatus=e,i.errorThrown=n,o._trigger("chunkfail",null,i),o._trigger("chunkalways",null,i),h.rejectWith(i.context,[t,e,n])}).always(function(){o._deinitProgressListener(i)})},this._enhancePromise(d),d.abort=function(){return n.abort()},r(),d)))},_beforeSend:function(t,e){0===this._active&&(this._trigger("start"),this._bitrateTimer=new this._BitrateTimer,this._progress.loaded=this._progress.total=0,this._progress.bitrate=0),this._initResponseObject(e),this._initProgressObject(e),e._progress.loaded=e.loaded=e.uploadedBytes||0,e._progress.total=e.total=this._getTotal(e.files)||1,e._progress.bitrate=e.bitrate=0,this._active+=1,this._progress.loaded+=e.loaded,this._progress.total+=e.total},_onDone:function(e,i,n,r){var o=r._progress.total,s=r._response;r._progress.loaded<o&&this._onProgress(t.Event("progress",{lengthComputable:!0,loaded:o,total:o}),r),s.result=r.result=e,s.textStatus=r.textStatus=i,s.jqXHR=r.jqXHR=n,this._trigger("done",null,r)},_onFail:function(t,e,i,n){var r=n._response;n.recalculateProgress&&(this._progress.loaded-=n._progress.loaded,this._progress.total-=n._progress.total),r.jqXHR=n.jqXHR=t,r.textStatus=n.textStatus=e,r.errorThrown=n.errorThrown=i,this._trigger("fail",null,n)},_onAlways:function(t,e,i,n){this._trigger("always",null,n)},_onSend:function(e,i){i.submit||this._addConvenienceMethods(e,i);var n,r,o,s,a=this,l=a._getAJAXSettings(i),c=function(){return a._sending+=1,l._bitrateTimer=new a._BitrateTimer,n=n||((r||a._trigger("send",t.Event("send",{delegatedEvent:e}),l)===!1)&&a._getXHRPromise(!1,l.context,r)||a._chunkedUpload(l)||t.ajax(l)).done(function(t,e,i){a._onDone(t,e,i,l)}).fail(function(t,e,i){a._onFail(t,e,i,l)}).always(function(t,e,i){if(a._deinitProgressListener(l),a._onAlways(t,e,i,l),a._sending-=1,a._active-=1,l.limitConcurrentUploads&&l.limitConcurrentUploads>a._sending)for(var n=a._slots.shift();n;){if("pending"===a._getDeferredState(n)){n.resolve();break}n=a._slots.shift()}0===a._active&&a._trigger("stop")})};return this._beforeSend(e,l),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?(this.options.limitConcurrentUploads>1?(o=t.Deferred(),this._slots.push(o),s=o.then(c)):(this._sequence=this._sequence.then(c,c),s=this._sequence),s.abort=function(){return r=[void 0,"abort","abort"],n?n.abort():(o&&o.rejectWith(l.context,r),c())},this._enhancePromise(s)):c()},_onAdd:function(e,i){var n,r,o,s,a=this,l=!0,c=t.extend({},this.options,i),u=i.files,h=u.length,d=c.limitMultiFileUploads,p=c.limitMultiFileUploadSize,f=c.limitMultiFileUploadSizeOverhead,g=0,m=this._getParamName(c),v=0;if(!h)return!1;if(p&&void 0===u[0].size&&(p=void 0),(c.singleFileUploads||d||p)&&this._isXHRUpload(c))if(c.singleFileUploads||p||!d)if(!c.singleFileUploads&&p)for(o=[],n=[],s=0;s<h;s+=1)g+=u[s].size+f,(s+1===h||g+u[s+1].size+f>p||d&&s+1-v>=d)&&(o.push(u.slice(v,s+1)),r=m.slice(v,s+1),r.length||(r=m),n.push(r),v=s+1,g=0);else n=m;else for(o=[],n=[],s=0;s<h;s+=d)o.push(u.slice(s,s+d)),r=m.slice(s,s+d),r.length||(r=m),n.push(r);else o=[u],n=[m];return i.originalFiles=u,t.each(o||u,function(r,s){var c=t.extend({},i);return c.files=o?s:[s],c.paramName=n[r],a._initResponseObject(c),a._initProgressObject(c),a._addConvenienceMethods(e,c),l=a._trigger("add",t.Event("add",{delegatedEvent:e}),c)}),l},_replaceFileInput:function(e){var i=e.fileInput,n=i.clone(!0),r=i.is(document.activeElement);e.fileInputClone=n,t("<form></form>").append(n)[0].reset(),i.after(n).detach(),r&&n.focus(),t.cleanData(i.unbind("remove")),this.options.fileInput=this.options.fileInput.map(function(t,e){return e===i[0]?n[0]:e}),i[0]===this.element[0]&&(this.element=n)},_handleFileTreeEntry:function(e,i){var n,r=this,o=t.Deferred(),s=[],a=function(t){t&&!t.entry&&(t.entry=e),o.resolve([t])},l=function(t){r._handleFileTreeEntries(t,i+e.name+"/").done(function(t){o.resolve(t)}).fail(a)},c=function(){n.readEntries(function(t){t.length?(s=s.concat(t),c()):l(s)},a)};return i=i||"",e.isFile?e._file?(e._file.relativePath=i,o.resolve(e._file)):e.file(function(t){t.relativePath=i,o.resolve(t)},a):e.isDirectory?(n=e.createReader(),c()):o.resolve([]),o.promise()},_handleFileTreeEntries:function(e,i){var n=this;return t.when.apply(t,t.map(e,function(t){return n._handleFileTreeEntry(t,i)})).then(function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(e){e=e||{};var i=e.items;return i&&i.length&&(i[0].webkitGetAsEntry||i[0].getAsEntry)?this._handleFileTreeEntries(t.map(i,function(t){var e;return t.webkitGetAsEntry?(e=t.webkitGetAsEntry(),e&&(e._file=t.getAsFile()),e):t.getAsEntry()})):t.Deferred().resolve(t.makeArray(e.files)).promise()},_getSingleFileInputFiles:function(e){e=t(e);var i,n,r=e.prop("webkitEntries")||e.prop("entries");if(r&&r.length)return this._handleFileTreeEntries(r);if(i=t.makeArray(e.prop("files")),i.length)void 0===i[0].name&&i[0].fileName&&t.each(i,function(t,e){e.name=e.fileName,e.size=e.fileSize});else{if(n=e.prop("value"),!n)return t.Deferred().resolve([]).promise();i=[{name:n.replace(/^.*\\/,"")}]}return t.Deferred().resolve(i).promise()},_getFileInputFiles:function(e){return e instanceof t&&1!==e.length?t.when.apply(t,t.map(e,this._getSingleFileInputFiles)).then(function(){return Array.prototype.concat.apply([],arguments)}):this._getSingleFileInputFiles(e)},_onChange:function(e){var i=this,n={fileInput:t(e.target),form:t(e.target.form)};this._getFileInputFiles(n.fileInput).always(function(r){n.files=r,i.options.replaceFileInput&&i._replaceFileInput(n),i._trigger("change",t.Event("change",{delegatedEvent:e}),n)!==!1&&i._onAdd(e,n)})},_onPaste:function(e){var i=e.originalEvent&&e.originalEvent.clipboardData&&e.originalEvent.clipboardData.items,n={files:[]};i&&i.length&&(t.each(i,function(t,e){var i=e.getAsFile&&e.getAsFile();i&&n.files.push(i)}),this._trigger("paste",t.Event("paste",{delegatedEvent:e}),n)!==!1&&this._onAdd(e,n))},_onDrop:function(e){e.dataTransfer=e.originalEvent&&e.originalEvent.dataTransfer;var i=this,n=e.dataTransfer,r={};n&&n.files&&n.files.length&&(e.preventDefault(),this._getDroppedFiles(n).always(function(n){r.files=n,i._trigger("drop",t.Event("drop",{delegatedEvent:e}),r)!==!1&&i._onAdd(e,r)}))},_onDragOver:e("dragover"),_onDragEnter:e("dragenter"),_onDragLeave:e("dragleave"),_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop,dragenter:this._onDragEnter,dragleave:this._onDragLeave}),this._on(this.options.pasteZone,{paste:this._onPaste})),t.support.fileInput&&this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragenter dragleave dragover drop"),this._off(this.options.pasteZone,"paste"),this._off(this.options.fileInput,"change")},_destroy:function(){this._destroyEventHandlers()},_setOption:function(e,i){var n=t.inArray(e,this._specialOptions)!==-1;n&&this._destroyEventHandlers(),this._super(e,i),n&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var e=this.options;void 0===e.fileInput?e.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):e.fileInput instanceof t||(e.fileInput=t(e.fileInput)),e.dropZone instanceof t||(e.dropZone=t(e.dropZone)),e.pasteZone instanceof t||(e.pasteZone=t(e.pasteZone))},_getRegExp:function(t){var e=t.split("/"),i=e.pop();return e.shift(),new RegExp(e.join("/"),i)},_isRegExpOption:function(e,i){return"url"!==e&&"string"===t.type(i)&&/^\/.*\/[igm]{0,3}$/.test(i)},_initDataAttributes:function(){var e=this,i=this.options,n=this.element.data();t.each(this.element[0].attributes,function(t,r){var o,s=r.name.toLowerCase();/^data-/.test(s)&&(s=s.slice(5).replace(/-[a-z]/g,function(t){return t.charAt(1).toUpperCase()}),o=n[s],e._isRegExpOption(s,o)&&(o=e._getRegExp(o)),i[s]=o)})},_create:function(){this._initDataAttributes(),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=0,this._initProgressObject(this),this._initEventHandlers()},active:function(){return this._active},progress:function(){return this._progress},add:function(e){var i=this;e&&!this.options.disabled&&(e.fileInput&&!e.files?this._getFileInputFiles(e.fileInput).always(function(t){e.files=t,i._onAdd(null,e)}):(e.files=t.makeArray(e.files),this._onAdd(null,e)))},send:function(e){if(e&&!this.options.disabled){if(e.fileInput&&!e.files){var i,n,r=this,o=t.Deferred(),s=o.promise();return s.abort=function(){return n=!0,i?i.abort():(o.reject(null,"abort","abort"),s)},this._getFileInputFiles(e.fileInput).always(function(t){if(!n){if(!t.length)return void o.reject();e.files=t,i=r._onSend(null,e),i.then(function(t,e,i){o.resolve(t,e,i)},function(t,e,i){o.reject(t,e,i)})}}),this._enhancePromise(s)}if(e.files=t.makeArray(e.files),e.files.length)return this._onSend(null,e)}return this._getXHRPromise(!1,e&&e.context)}})}),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports&&"object"==typeof module?module.exports=t(require("jquery")):t(jQuery)}(function(t,e){"use strict";function i(e,i,n,r){for(var o=[],s=0;s<e.length;s++){var a=e[s];if(a){var l=tinycolor(a),c=l.toHsl().l<.5?"sp-thumb-el sp-thumb-dark":"sp-thumb-el sp-thumb-light";c+=tinycolor.equals(i,a)?" sp-thumb-active":"";var u=l.toString(r.preferredFormat||"rgb"),h=m?"background-color:"+l.toRgbString():"filter:"+l.toFilter();o.push('<span title="'+u+'" data-color="'+l.toRgbString()+'" class="'+c+'"><span class="sp-thumb-inner" style="'+h+';" /></span>')}else{var d="sp-clear-display";o.push(t("<div />").append(t('<span data-color="" style="background-color:transparent;" class="'+d+'"></span>').attr("title",r.noColorSelectedText)).html())}}return"<div class='sp-cf "+n+"'>"+o.join("")+"</div>"}function n(){for(var t=0;t<f.length;t++)f[t]&&f[t].hide()}function r(e,i){var n=t.extend({},p,e);return n.callbacks={move:c(n.move,i),change:c(n.change,i),show:c(n.show,i),hide:c(n.hide,i),beforeShow:c(n.beforeShow,i)},n}function o(o,a){function c(){if(U.showPaletteOnly&&(U.showPalette=!0),zt.text(U.showPaletteOnly?U.togglePaletteMoreText:U.togglePaletteLessText),U.palette){pt=U.palette.slice(0),ft=t.isArray(pt[0])?pt:[pt],gt={};for(var e=0;e<ft.length;e++)for(var i=0;i<ft[e].length;i++){var n=tinycolor(ft[e][i]).toRgbString();gt[n]=!0}}kt.toggleClass("sp-flat",X),kt.toggleClass("sp-input-disabled",!U.showInput),kt.toggleClass("sp-alpha-enabled",U.showAlpha),kt.toggleClass("sp-clear-enabled",Gt),kt.toggleClass("sp-buttons-disabled",!U.showButtons),kt.toggleClass("sp-palette-buttons-disabled",!U.togglePaletteOnly),kt.toggleClass("sp-palette-disabled",!U.showPalette),kt.toggleClass("sp-palette-only",U.showPaletteOnly),kt.toggleClass("sp-initial-disabled",!U.showInitial),kt.addClass(U.className).addClass(U.containerClassName),F()}function p(){function e(e){return e.data&&e.data.ignore?(L(t(e.target).closest(".sp-thumb-el").data("color")),H()):(L(t(e.target).closest(".sp-thumb-el").data("color")),H(),R(!0),U.hideAfterPaletteSelect&&I()),!1}if(g&&kt.find("*:not(input)").attr("unselectable","on"),c(),jt&&_t.after(Bt).hide(),Gt||Ht.hide(),X)_t.after(kt).hide();else{var i="parent"===U.appendTo?_t.parent():t(U.appendTo);1!==i.length&&(i=t("body")),i.append(kt)}b(),$t.bind("click.spectrum touchstart.spectrum",function(e){xt||D(),e.stopPropagation(),t(e.target).is("input")||e.preventDefault()}),(_t.is(":disabled")||U.disabled===!0)&&q(),kt.click(l),Et.change(S),Et.bind("paste",function(){setTimeout(S,1)}),Et.keydown(function(t){13==t.keyCode&&S()}),Ot.text(U.cancelText),Ot.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),E(),I()}),Ht.attr("title",U.clearText),Ht.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),Vt=!0,H(),X&&R(!0)}),Wt.text(U.chooseText),Wt.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),g&&Et.is(":focus")&&Et.trigger("change"),O()&&(R(!0),I())}),zt.text(U.showPaletteOnly?U.togglePaletteMoreText:U.togglePaletteLessText),zt.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),U.showPaletteOnly=!U.showPaletteOnly,U.showPaletteOnly||X||kt.css("left","-="+(Ct.outerWidth(!0)+5)),c()}),u(Pt,function(t,e,i){dt=t/st,Vt=!1,i.shiftKey&&(dt=Math.round(10*dt)/10),H()},C,T),u(Dt,function(t,e){ct=parseFloat(e/rt),Vt=!1,U.showAlpha||(dt=1),H()},C,T),u(Tt,function(t,e,i){if(i.shiftKey){if(!bt){var n=ut*et,r=it-ht*it,o=Math.abs(t-n)>Math.abs(e-r);bt=o?"x":"y"}}else bt=null;var s=!bt||"x"===bt,a=!bt||"y"===bt;s&&(ut=parseFloat(t/et)),a&&(ht=parseFloat((it-e)/it)),Vt=!1,U.showAlpha||(dt=1),H()},C,T),Yt?(L(Yt),W(),Xt=U.preferredFormat||tinycolor(Yt).format,w(Yt)):W(),X&&M();var n=g?"mousedown.spectrum":"click.spectrum touchstart.spectrum";Lt.delegate(".sp-thumb-el",n,e),Nt.delegate(".sp-thumb-el:nth-child(1)",n,{ignore:!0},e)}function b(){if(V&&window.localStorage){try{var e=window.localStorage[V].split(",#");e.length>1&&(delete window.localStorage[V],t.each(e,function(t,e){w(e)}))}catch(i){}try{mt=window.localStorage[V].split(";")}catch(i){}}}function w(e){if(K){var i=tinycolor(e).toRgbString();if(!gt[i]&&t.inArray(i,mt)===-1)for(mt.push(i);mt.length>vt;)mt.shift();if(V&&window.localStorage)try{window.localStorage[V]=mt.join(";")}catch(n){}}}function _(){var t=[];if(U.showPalette)for(var e=0;e<mt.length;e++){var i=tinycolor(mt[e]).toRgbString();gt[i]||t.push(mt[e])}return t.reverse().slice(0,U.maxSelectionSize)}function x(){var e=N(),n=t.map(ft,function(t,n){return i(t,e,"sp-palette-row sp-palette-row-"+n,U)});b(),mt&&n.push(i(_(),e,"sp-palette-row sp-palette-row-selection",U)),Lt.html(n.join(""))}function k(){if(U.showInitial){var t=Ut,e=N();Nt.html(i([t,e],e,"sp-palette-row-initial",U))}}function C(){(it<=0||et<=0||rt<=0)&&F(),tt=!0,kt.addClass(yt),bt=null,_t.trigger("dragstart.spectrum",[N()])}function T(){tt=!1,kt.removeClass(yt),_t.trigger("dragstop.spectrum",[N()])}function S(){var t=Et.val();if(null!==t&&""!==t||!Gt){var e=tinycolor(t);e.isValid()?(L(e),R(!0)):Et.addClass("sp-validation-error")}else L(null),R(!0)}function D(){J?I():M()}function M(){var e=t.Event("beforeShow.spectrum");return J?void F():(_t.trigger(e,[N()]),void(Q.beforeShow(N())===!1||e.isDefaultPrevented()||(n(),J=!0,t(wt).bind("keydown.spectrum",A),t(wt).bind("click.spectrum",P),t(window).bind("resize.spectrum",Z),Bt.addClass("sp-active"),kt.removeClass("sp-hidden"),F(),W(),Ut=N(),k(),Q.show(Ut),_t.trigger("show.spectrum",[Ut]))))}function A(t){27===t.keyCode&&I()}function P(t){2!=t.button&&(tt||(Kt?R(!0):E(),I()))}function I(){J&&!X&&(J=!1,t(wt).unbind("keydown.spectrum",A),t(wt).unbind("click.spectrum",P),t(window).unbind("resize.spectrum",Z),Bt.removeClass("sp-active"),kt.addClass("sp-hidden"),Q.hide(N()),_t.trigger("hide.spectrum",[N()]))}function E(){L(Ut,!0)}function L(t,e){if(tinycolor.equals(t,N()))return void W();var i,n;!t&&Gt?Vt=!0:(Vt=!1,i=tinycolor(t),n=i.toHsv(),ct=n.h%360/360,ut=n.s,ht=n.v,dt=n.a),W(),i&&i.isValid()&&!e&&(Xt=U.preferredFormat||i.getFormat())}function N(t){return t=t||{},Gt&&Vt?null:tinycolor.fromRatio({h:ct,s:ut,v:ht,a:Math.round(100*dt)/100},{format:t.format||Xt})}function O(){return!Et.hasClass("sp-validation-error")}function H(){
W(),Q.move(N()),_t.trigger("move.spectrum",[N()])}function W(){Et.removeClass("sp-validation-error"),z();var t=tinycolor.fromRatio({h:ct,s:1,v:1});Tt.css("background-color",t.toHexString());var e=Xt;dt<1&&(0!==dt||"name"!==e)&&("hex"!==e&&"hex3"!==e&&"hex6"!==e&&"name"!==e||(e="rgb"));var i=N({format:e}),n="";if(qt.removeClass("sp-clear-display"),qt.css("background-color","transparent"),!i&&Gt)qt.addClass("sp-clear-display");else{var r=i.toHexString(),o=i.toRgbString();if(m||1===i.alpha?qt.css("background-color",o):(qt.css("background-color","transparent"),qt.css("filter",i.toFilter())),U.showAlpha){var s=i.toRgb();s.a=0;var a=tinycolor(s).toRgbString(),l="linear-gradient(left, "+a+", "+r+")";g?At.css("filter",tinycolor(a).toFilter({gradientType:1},r)):(At.css("background","-webkit-"+l),At.css("background","-moz-"+l),At.css("background","-ms-"+l),At.css("background","linear-gradient(to right, "+a+", "+r+")"))}n=i.toString(e)}U.showInput&&Et.val(n),U.showPalette&&x(),k()}function z(){var t=ut,e=ht;if(Gt&&Vt)It.hide(),Mt.hide(),St.hide();else{It.show(),Mt.show(),St.show();var i=t*et,n=it-e*it;i=Math.max(-nt,Math.min(et-nt,i-nt)),n=Math.max(-nt,Math.min(it-nt,n-nt)),St.css({top:n+"px",left:i+"px"});var r=dt*st;It.css({left:r-at/2+"px"});var o=ct*rt;Mt.css({top:o-lt+"px"})}}function R(t){var e=N(),i="",n=!tinycolor.equals(e,Ut);e&&(i=e.toString(Xt),w(e)),Rt&&_t.val(i),t&&n&&(Q.change(e),_t.trigger("change",[e]))}function F(){J&&(et=Tt.width(),it=Tt.height(),nt=St.height(),ot=Dt.width(),rt=Dt.height(),lt=Mt.height(),st=Pt.width(),at=It.width(),X||(kt.css("position","absolute"),U.offset?kt.offset(U.offset):kt.offset(s(kt,$t))),z(),U.showPalette&&x(),_t.trigger("reflow.spectrum"))}function j(){_t.show(),$t.unbind("click.spectrum touchstart.spectrum"),kt.remove(),Bt.remove(),f[Qt.id]=null}function B(i,n){return i===e?t.extend({},U):n===e?U[i]:(U[i]=n,"preferredFormat"===i&&(Xt=U.preferredFormat),void c())}function $(){xt=!1,_t.attr("disabled",!1),$t.removeClass("sp-disabled")}function q(){I(),xt=!0,_t.attr("disabled",!0),$t.addClass("sp-disabled")}function Y(t){U.offset=t,F()}var U=r(a,o),X=U.flat,K=U.showSelectionPalette,V=U.localStorageKey,G=U.theme,Q=U.callbacks,Z=h(F,10),J=!1,tt=!1,et=0,it=0,nt=0,rt=0,ot=0,st=0,at=0,lt=0,ct=0,ut=0,ht=0,dt=1,pt=[],ft=[],gt={},mt=U.selectionPalette.slice(0),vt=U.maxSelectionSize,yt="sp-dragging",bt=null,wt=o.ownerDocument,_t=(wt.body,t(o)),xt=!1,kt=t(y,wt).addClass(G),Ct=kt.find(".sp-picker-container"),Tt=kt.find(".sp-color"),St=kt.find(".sp-dragger"),Dt=kt.find(".sp-hue"),Mt=kt.find(".sp-slider"),At=kt.find(".sp-alpha-inner"),Pt=kt.find(".sp-alpha"),It=kt.find(".sp-alpha-handle"),Et=kt.find(".sp-input"),Lt=kt.find(".sp-palette"),Nt=kt.find(".sp-initial"),Ot=kt.find(".sp-cancel"),Ht=kt.find(".sp-clear"),Wt=kt.find(".sp-choose"),zt=kt.find(".sp-palette-toggle"),Rt=_t.is("input"),Ft=Rt&&"color"===_t.attr("type")&&d(),jt=Rt&&!X,Bt=jt?t(v).addClass(G).addClass(U.className).addClass(U.replacerClassName):t([]),$t=jt?Bt:_t,qt=Bt.find(".sp-preview-inner"),Yt=U.color||Rt&&_t.val(),Ut=!1,Xt=U.preferredFormat,Kt=!U.showButtons||U.clickoutFiresChange,Vt=!Yt,Gt=U.allowEmpty&&!Ft;p();var Qt={show:M,hide:I,toggle:D,reflow:F,option:B,enable:$,disable:q,offset:Y,set:function(t){L(t),R()},get:N,destroy:j,container:kt};return Qt.id=f.push(Qt)-1,Qt}function s(e,i){var n=0,r=e.outerWidth(),o=e.outerHeight(),s=i.outerHeight(),a=e[0].ownerDocument,l=a.documentElement,c=l.clientWidth+t(a).scrollLeft(),u=l.clientHeight+t(a).scrollTop(),h=i.offset();return h.top+=s,h.left-=Math.min(h.left,h.left+r>c&&c>r?Math.abs(h.left+r-c):0),h.top-=Math.min(h.top,h.top+o>u&&u>o?Math.abs(o+s-n):n),h}function a(){}function l(t){t.stopPropagation()}function c(t,e){var i=Array.prototype.slice,n=i.call(arguments,2);return function(){return t.apply(e,n.concat(i.call(arguments)))}}function u(e,i,n,r){function o(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function s(t){if(u){if(g&&c.documentMode<9&&!t.button)return l();var n=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],r=n&&n.pageX||t.pageX,s=n&&n.pageY||t.pageY,a=Math.max(0,Math.min(r-h.left,p)),m=Math.max(0,Math.min(s-h.top,d));f&&o(t),i.apply(e,[a,m,t])}}function a(i){var r=i.which?3==i.which:2==i.button;r||u||n.apply(e,arguments)!==!1&&(u=!0,d=t(e).height(),p=t(e).width(),h=t(e).offset(),t(c).bind(m),t(c.body).addClass("sp-dragging"),s(i),o(i))}function l(){u&&(t(c).unbind(m),t(c.body).removeClass("sp-dragging"),setTimeout(function(){r.apply(e,arguments)},0)),u=!1}i=i||function(){},n=n||function(){},r=r||function(){};var c=document,u=!1,h={},d=0,p=0,f="ontouchstart"in window,m={};m.selectstart=o,m.dragstart=o,m["touchmove mousemove"]=s,m["touchend mouseup"]=l,t(e).bind("touchstart mousedown",a)}function h(t,e,i){var n;return function(){var r=this,o=arguments,s=function(){n=null,t.apply(r,o)};i&&clearTimeout(n),!i&&n||(n=setTimeout(s,e))}}function d(){return t.fn.spectrum.inputTypeColorSupport()}var p={beforeShow:a,move:a,change:a,show:a,hide:a,color:!1,flat:!1,showInput:!1,allowEmpty:!1,showButtons:!0,clickoutFiresChange:!0,showInitial:!1,showPalette:!1,showPaletteOnly:!1,hideAfterPaletteSelect:!1,togglePaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,appendTo:"body",maxSelectionSize:7,cancelText:"cancel",chooseText:"choose",togglePaletteMoreText:"more",togglePaletteLessText:"less",clearText:"Clear Color Selection",noColorSelectedText:"No Color Selected",preferredFormat:!1,className:"",containerClassName:"",replacerClassName:"",showAlpha:!1,theme:"sp-light",palette:[["#ffffff","#000000","#ff0000","#ff8000","#ffff00","#008000","#0000ff","#4b0082","#9400d3"]],selectionPalette:[],disabled:!1,offset:null},f=[],g=!!/msie/i.exec(window.navigator.userAgent),m=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div"),i=e.style;return i.cssText="background-color:rgba(0,0,0,.5)",t(i.backgroundColor,"rgba")||t(i.backgroundColor,"hsla")}(),v=["<div class='sp-replacer'>","<div class='sp-preview'><div class='sp-preview-inner'></div></div>","<div class='sp-dd'>&#9660;</div>","</div>"].join(""),y=function(){var t="";if(g)for(var e=1;e<=6;e++)t+="<div class='sp-"+e+"'></div>";return["<div class='sp-container sp-hidden'>","<div class='sp-palette-container'>","<div class='sp-palette sp-thumb sp-cf'></div>","<div class='sp-palette-button-container sp-cf'>","<button type='button' class='sp-palette-toggle'></button>","</div>","</div>","<div class='sp-picker-container'>","<div class='sp-top sp-cf'>","<div class='sp-fill'></div>","<div class='sp-top-inner'>","<div class='sp-color'>","<div class='sp-sat'>","<div class='sp-val'>","<div class='sp-dragger'></div>","</div>","</div>","</div>","<div class='sp-clear sp-clear-display'>","</div>","<div class='sp-hue'>","<div class='sp-slider'></div>",t,"</div>","</div>","<div class='sp-alpha'><div class='sp-alpha-inner'><div class='sp-alpha-handle'></div></div></div>","</div>","<div class='sp-input-container sp-cf'>","<input class='sp-input' type='text' spellcheck='false'  />","</div>","<div class='sp-initial sp-thumb sp-cf'></div>","<div class='sp-button-container sp-cf'>","<a class='sp-cancel' href='#'></a>","<button type='button' class='sp-choose'></button>","</div>","</div>","</div>"].join("")}(),b="spectrum.id";t.fn.spectrum=function(e,i){if("string"==typeof e){var n=this,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var i=f[t(this).data(b)];if(i){var o=i[e];if(!o)throw new Error("Spectrum: no such method: '"+e+"'");"get"==e?n=i.get():"container"==e?n=i.container:"option"==e?n=i.option.apply(i,r):"destroy"==e?(i.destroy(),t(this).removeData(b)):o.apply(i,r)}}),n}return this.spectrum("destroy").each(function(){var i=t.extend({},e,t(this).data()),n=o(this,i);t(this).data(b,n.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=u,t.fn.spectrum.defaults=p,t.fn.spectrum.inputTypeColorSupport=function w(){if("undefined"==typeof w._cachedResult){var e=t("<input type='color'/>")[0];w._cachedResult="color"===e.type&&""!==e.value}return w._cachedResult},t.spectrum={},t.spectrum.localization={},t.spectrum.palettes={},t.fn.spectrum.processNativeColorInputs=function(){var e=t("input[type=color]");e.length&&!d()&&e.spectrum({preferredFormat:"hex6"})},function(){function t(t){var i={r:0,g:0,b:0},r=1,s=!1,a=!1;return"string"==typeof t&&(t=E(t)),"object"==typeof t&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(i=e(t.r,t.g,t.b),s=!0,a="%"===String(t.r).substr(-1)?"prgb":"rgb"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")?(t.s=A(t.s),t.v=A(t.v),i=o(t.h,t.s,t.v),s=!0,a="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=A(t.s),t.l=A(t.l),i=n(t.h,t.s,t.l),s=!0,a="hsl"),t.hasOwnProperty("a")&&(r=t.a)),r=x(r),{ok:s,format:t.format||a,r:z(255,R(i.r,0)),g:z(255,R(i.g,0)),b:z(255,R(i.b,0)),a:r}}function e(t,e,i){return{r:255*k(t,255),g:255*k(e,255),b:255*k(i,255)}}function i(t,e,i){t=k(t,255),e=k(e,255),i=k(i,255);var n,r,o=R(t,e,i),s=z(t,e,i),a=(o+s)/2;if(o==s)n=r=0;else{var l=o-s;switch(r=a>.5?l/(2-o-s):l/(o+s),o){case t:n=(e-i)/l+(e<i?6:0);break;case e:n=(i-t)/l+2;break;case i:n=(t-e)/l+4}n/=6}return{h:n,s:r,l:a}}function n(t,e,i){function n(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}var r,o,s;if(t=k(t,360),e=k(e,100),i=k(i,100),0===e)r=o=s=i;else{var a=i<.5?i*(1+e):i+e-i*e,l=2*i-a;r=n(l,a,t+1/3),o=n(l,a,t),s=n(l,a,t-1/3)}return{r:255*r,g:255*o,b:255*s}}function r(t,e,i){t=k(t,255),e=k(e,255),i=k(i,255);var n,r,o=R(t,e,i),s=z(t,e,i),a=o,l=o-s;if(r=0===o?0:l/o,o==s)n=0;else{switch(o){case t:n=(e-i)/l+(e<i?6:0);break;case e:n=(i-t)/l+2;break;case i:n=(t-e)/l+4}n/=6}return{h:n,s:r,v:a}}function o(t,e,i){t=6*k(t,360),e=k(e,100),i=k(i,100);var n=H.floor(t),r=t-n,o=i*(1-e),s=i*(1-r*e),a=i*(1-(1-r)*e),l=n%6,c=[i,s,o,o,a,i][l],u=[a,i,i,s,o,o][l],h=[o,o,a,i,i,s][l];return{r:255*c,g:255*u,b:255*h}}function s(t,e,i,n){var r=[M(W(t).toString(16)),M(W(e).toString(16)),M(W(i).toString(16))];return n&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function a(t,e,i,n){var r=[M(P(n)),M(W(t).toString(16)),M(W(e).toString(16)),M(W(i).toString(16))];return r.join("")}function l(t,e){e=0===e?0:e||10;var i=j(t).toHsl();return i.s-=e/100,i.s=C(i.s),j(i)}function c(t,e){e=0===e?0:e||10;var i=j(t).toHsl();return i.s+=e/100,i.s=C(i.s),j(i)}function u(t){return j(t).desaturate(100)}function h(t,e){e=0===e?0:e||10;var i=j(t).toHsl();return i.l+=e/100,i.l=C(i.l),j(i)}function d(t,e){e=0===e?0:e||10;var i=j(t).toRgb();return i.r=R(0,z(255,i.r-W(255*-(e/100)))),i.g=R(0,z(255,i.g-W(255*-(e/100)))),i.b=R(0,z(255,i.b-W(255*-(e/100)))),j(i)}function p(t,e){e=0===e?0:e||10;var i=j(t).toHsl();return i.l-=e/100,i.l=C(i.l),j(i)}function f(t,e){var i=j(t).toHsl(),n=(W(i.h)+e)%360;return i.h=n<0?360+n:n,j(i)}function g(t){var e=j(t).toHsl();return e.h=(e.h+180)%360,j(e)}function m(t){var e=j(t).toHsl(),i=e.h;return[j(t),j({h:(i+120)%360,s:e.s,l:e.l}),j({h:(i+240)%360,s:e.s,l:e.l})]}function v(t){var e=j(t).toHsl(),i=e.h;return[j(t),j({h:(i+90)%360,s:e.s,l:e.l}),j({h:(i+180)%360,s:e.s,l:e.l}),j({h:(i+270)%360,s:e.s,l:e.l})]}function y(t){var e=j(t).toHsl(),i=e.h;return[j(t),j({h:(i+72)%360,s:e.s,l:e.l}),j({h:(i+216)%360,s:e.s,l:e.l})]}function b(t,e,i){e=e||6,i=i||30;var n=j(t).toHsl(),r=360/i,o=[j(t)];for(n.h=(n.h-(r*e>>1)+720)%360;--e;)n.h=(n.h+r)%360,o.push(j(n));return o}function w(t,e){e=e||6;for(var i=j(t).toHsv(),n=i.h,r=i.s,o=i.v,s=[],a=1/e;e--;)s.push(j({h:n,s:r,v:o})),o=(o+a)%1;return s}function _(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[t[i]]=i);return e}function x(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function k(t,e){S(t)&&(t="100%");var i=D(t);return t=z(e,R(0,parseFloat(t))),i&&(t=parseInt(t*e,10)/100),H.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function C(t){return z(1,R(0,t))}function T(t){return parseInt(t,16)}function S(t){return"string"==typeof t&&t.indexOf(".")!=-1&&1===parseFloat(t)}function D(t){return"string"==typeof t&&t.indexOf("%")!=-1}function M(t){return 1==t.length?"0"+t:""+t}function A(t){return t<=1&&(t=100*t+"%"),t}function P(t){return Math.round(255*parseFloat(t)).toString(16)}function I(t){return T(t)/255}function E(t){t=t.replace(L,"").replace(N,"").toLowerCase();var e=!1;if(B[t])t=B[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var i;return(i=q.rgb.exec(t))?{r:i[1],g:i[2],b:i[3]}:(i=q.rgba.exec(t))?{r:i[1],g:i[2],b:i[3],a:i[4]}:(i=q.hsl.exec(t))?{h:i[1],s:i[2],l:i[3]}:(i=q.hsla.exec(t))?{h:i[1],s:i[2],l:i[3],a:i[4]}:(i=q.hsv.exec(t))?{h:i[1],s:i[2],v:i[3]}:(i=q.hsva.exec(t))?{h:i[1],s:i[2],v:i[3],a:i[4]}:(i=q.hex8.exec(t))?{a:I(i[1]),r:T(i[2]),g:T(i[3]),b:T(i[4]),format:e?"name":"hex8"}:(i=q.hex6.exec(t))?{r:T(i[1]),g:T(i[2]),b:T(i[3]),format:e?"name":"hex"}:!!(i=q.hex3.exec(t))&&{r:T(i[1]+""+i[1]),g:T(i[2]+""+i[2]),b:T(i[3]+""+i[3]),format:e?"name":"hex"}}var L=/^[\s,#]+/,N=/\s+$/,O=0,H=Math,W=H.round,z=H.min,R=H.max,F=H.random,j=function(e,i){if(e=e?e:"",i=i||{},e instanceof j)return e;if(!(this instanceof j))return new j(e,i);var n=t(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=W(100*this._a)/100,this._format=i.format||n.format,this._gradientType=i.gradientType,this._r<1&&(this._r=W(this._r)),this._g<1&&(this._g=W(this._g)),this._b<1&&(this._b=W(this._b)),this._ok=n.ok,this._tc_id=O++};j.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},setAlpha:function(t){return this._a=x(t),this._roundA=W(100*this._a)/100,this},toHsv:function(){var t=r(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=r(this._r,this._g,this._b),e=W(360*t.h),i=W(100*t.s),n=W(100*t.v);return 1==this._a?"hsv("+e+", "+i+"%, "+n+"%)":"hsva("+e+", "+i+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=i(this._r,this._g,this._b),e=W(360*t.h),n=W(100*t.s),r=W(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+r+"%)":"hsla("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return s(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return a(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:W(this._r),g:W(this._g),b:W(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+W(this._r)+", "+W(this._g)+", "+W(this._b)+")":"rgba("+W(this._r)+", "+W(this._g)+", "+W(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:W(100*k(this._r,255))+"%",g:W(100*k(this._g,255))+"%",b:W(100*k(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+W(100*k(this._r,255))+"%, "+W(100*k(this._g,255))+"%, "+W(100*k(this._b,255))+"%)":"rgba("+W(100*k(this._r,255))+"%, "+W(100*k(this._g,255))+"%, "+W(100*k(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&($[s(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+a(this._r,this._g,this._b,this._a),i=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var r=j(t);i=r.toHex8String()}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+i+")"},toString:function(t){var e=!!t;t=t||this._format;var i=!1,n=this._a<1&&this._a>=0,r=!e&&n&&("hex"===t||"hex6"===t||"hex3"===t||"name"===t);return r?"name"===t&&0===this._a?this.toName():this.toRgbString():("rgb"===t&&(i=this.toRgbString()),"prgb"===t&&(i=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(i=this.toHexString()),"hex3"===t&&(i=this.toHexString(!0)),"hex8"===t&&(i=this.toHex8String()),"name"===t&&(i=this.toName()),"hsl"===t&&(i=this.toHslString()),"hsv"===t&&(i=this.toHsvString()),i||this.toHexString())},_applyModification:function(t,e){var i=t.apply(null,[this].concat([].slice.call(e)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(h,arguments)},brighten:function(){return this._applyModification(d,arguments)},darken:function(){return this._applyModification(p,arguments)},desaturate:function(){return this._applyModification(l,arguments)},saturate:function(){return this._applyModification(c,arguments)},greyscale:function(){return this._applyModification(u,arguments)},spin:function(){return this._applyModification(f,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(b,arguments)},complement:function(){return this._applyCombination(g,arguments)},monochromatic:function(){return this._applyCombination(w,arguments)},splitcomplement:function(){return this._applyCombination(y,arguments)},triad:function(){return this._applyCombination(m,arguments)},tetrad:function(){return this._applyCombination(v,arguments)}},j.fromRatio=function(t,e){if("object"==typeof t){var i={};for(var n in t)t.hasOwnProperty(n)&&("a"===n?i[n]=t[n]:i[n]=A(t[n]));t=i}return j(t,e)},j.equals=function(t,e){return!(!t||!e)&&j(t).toRgbString()==j(e).toRgbString()},j.random=function(){return j.fromRatio({r:F(),g:F(),b:F()})},j.mix=function(t,e,i){i=0===i?0:i||50;var n,r=j(t).toRgb(),o=j(e).toRgb(),s=i/100,a=2*s-1,l=o.a-r.a;n=a*l==-1?a:(a+l)/(1+a*l),n=(n+1)/2;var c=1-n,u={r:o.r*n+r.r*c,g:o.g*n+r.g*c,b:o.b*n+r.b*c,a:o.a*s+r.a*(1-s)};return j(u)},j.readability=function(t,e){var i=j(t),n=j(e),r=i.toRgb(),o=n.toRgb(),s=i.getBrightness(),a=n.getBrightness(),l=Math.max(r.r,o.r)-Math.min(r.r,o.r)+Math.max(r.g,o.g)-Math.min(r.g,o.g)+Math.max(r.b,o.b)-Math.min(r.b,o.b);return{brightness:Math.abs(s-a),color:l}},j.isReadable=function(t,e){var i=j.readability(t,e);return i.brightness>125&&i.color>500},j.mostReadable=function(t,e){for(var i=null,n=0,r=!1,o=0;o<e.length;o++){var s=j.readability(t,e[o]),a=s.brightness>125&&s.color>500,l=3*(s.brightness/125)+s.color/500;(a&&!r||a&&r&&l>n||!a&&!r&&l>n)&&(r=a,n=l,i=j(e[o]))}return i};var B=j.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},$=j.hexNames=_(B),q=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",i="(?:"+e+")|(?:"+t+")",n="[\\s|\\(]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")\\s*\\)?",r="[\\s|\\(]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")\\s*\\)?";return{rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+r),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();window.tinycolor=j}(),t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}),function t(e,i,n){function r(s,a){if(!i[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=i[s]={exports:{}};e[s][0].call(u.exports,function(t){var i=e[s][1][t];return r(i?i:t)},u,u.exports,t,e,i,n)}return i[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)r(n[s]);return r}({1:[function(t,e,i){"use strict";function n(t){t.fn.perfectScrollbar=function(t){return this.each(function(){if("object"==typeof t||"undefined"==typeof t){var e=t;o.get(this)||r.initialize(this,e)}else{var i=t;"update"===i?r.update(this):"destroy"===i&&r.destroy(this)}})}}var r=t("../main"),o=t("../plugin/instances");if("function"==typeof define&&define.amd)define(["jquery"],n);else{var s=window.jQuery?window.jQuery:window.$;"undefined"!=typeof s&&n(s)}e.exports=n},{"../main":7,"../plugin/instances":18}],2:[function(t,e,i){"use strict";function n(t,e){var i=t.className.split(" ");i.indexOf(e)<0&&i.push(e),t.className=i.join(" ")}function r(t,e){var i=t.className.split(" "),n=i.indexOf(e);n>=0&&i.splice(n,1),t.className=i.join(" ")}i.add=function(t,e){t.classList?t.classList.add(e):n(t,e)},i.remove=function(t,e){t.classList?t.classList.remove(e):r(t,e)},i.list=function(t){return t.classList?Array.prototype.slice.apply(t.classList):t.className.split(" ")}},{}],3:[function(t,e,i){"use strict";function n(t,e){return window.getComputedStyle(t)[e]}function r(t,e,i){return"number"==typeof i&&(i=i.toString()+"px"),t.style[e]=i,t}function o(t,e){for(var i in e){var n=e[i];"number"==typeof n&&(n=n.toString()+"px"),t.style[i]=n}return t}var s={};s.e=function(t,e){var i=document.createElement(t);return i.className=e,i},s.appendTo=function(t,e){return e.appendChild(t),t},s.css=function(t,e,i){return"object"==typeof e?o(t,e):"undefined"==typeof i?n(t,e):r(t,e,i)},s.matches=function(t,e){return"undefined"!=typeof t.matches?t.matches(e):"undefined"!=typeof t.matchesSelector?t.matchesSelector(e):"undefined"!=typeof t.webkitMatchesSelector?t.webkitMatchesSelector(e):"undefined"!=typeof t.mozMatchesSelector?t.mozMatchesSelector(e):"undefined"!=typeof t.msMatchesSelector?t.msMatchesSelector(e):void 0},s.remove=function(t){"undefined"!=typeof t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)},s.queryChildren=function(t,e){return Array.prototype.filter.call(t.childNodes,function(t){return s.matches(t,e)})},e.exports=s},{}],4:[function(t,e,i){"use strict";var n=function(t){this.element=t,this.events={}};n.prototype.bind=function(t,e){"undefined"==typeof this.events[t]&&(this.events[t]=[]),this.events[t].push(e),this.element.addEventListener(t,e,!1)},n.prototype.unbind=function(t,e){var i="undefined"!=typeof e;this.events[t]=this.events[t].filter(function(n){return!(!i||n===e)||(this.element.removeEventListener(t,n,!1),!1)},this)},n.prototype.unbindAll=function(){for(var t in this.events)this.unbind(t)};var r=function(){this.eventElements=[]};r.prototype.eventElement=function(t){var e=this.eventElements.filter(function(e){return e.element===t})[0];return"undefined"==typeof e&&(e=new n(t),this.eventElements.push(e)),e},r.prototype.bind=function(t,e,i){this.eventElement(t).bind(e,i)},r.prototype.unbind=function(t,e,i){this.eventElement(t).unbind(e,i)},r.prototype.unbindAll=function(){for(var t=0;t<this.eventElements.length;t++)this.eventElements[t].unbindAll()},r.prototype.once=function(t,e,i){var n=this.eventElement(t),r=function(t){n.unbind(e,r),i(t)};n.bind(e,r)},e.exports=r},{}],5:[function(t,e,i){"use strict";e.exports=function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}}()},{}],6:[function(t,e,i){"use strict";function n(t){return function(e,i){t(e,"ps--in-scrolling"),"undefined"!=typeof i?t(e,"ps--"+i):(t(e,"ps--x"),t(e,"ps--y"))}}var r=t("./class"),o=t("./dom"),s=i.toInt=function(t){return parseInt(t,10)||0},a=i.clone=function(t){if(t){if(Array.isArray(t))return t.map(a);if("object"==typeof t){var e={};for(var i in t)e[i]=a(t[i]);return e}return t}return null};i.extend=function(t,e){var i=a(t);for(var n in e)i[n]=a(e[n]);return i},i.isEditable=function(t){return o.matches(t,"input,[contenteditable]")||o.matches(t,"select,[contenteditable]")||o.matches(t,"textarea,[contenteditable]")||o.matches(t,"button,[contenteditable]")},i.removePsClasses=function(t){for(var e=r.list(t),i=0;i<e.length;i++){var n=e[i];0===n.indexOf("ps-")&&r.remove(t,n)}},i.outerWidth=function(t){return s(o.css(t,"width"))+s(o.css(t,"paddingLeft"))+s(o.css(t,"paddingRight"))+s(o.css(t,"borderLeftWidth"))+s(o.css(t,"borderRightWidth"))},i.startScrolling=n(r.add),i.stopScrolling=n(r.remove),i.env={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof window&&null!==window.navigator.msMaxTouchPoints}},{"./class":2,"./dom":3}],7:[function(t,e,i){"use strict";var n=t("./plugin/destroy"),r=t("./plugin/initialize"),o=t("./plugin/update");e.exports={initialize:r,update:o,destroy:n}},{"./plugin/destroy":9,"./plugin/initialize":17,"./plugin/update":21}],8:[function(t,e,i){"use strict";e.exports={handlers:["click-rail","drag-scrollbar","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipePropagation:!0,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!1,wheelSpeed:1,theme:"default"}},{}],9:[function(t,e,i){"use strict";var n=t("../lib/helper"),r=t("../lib/dom"),o=t("./instances");e.exports=function(t){var e=o.get(t);e&&(e.event.unbindAll(),r.remove(e.scrollbarX),r.remove(e.scrollbarY),r.remove(e.scrollbarXRail),r.remove(e.scrollbarYRail),n.removePsClasses(t),o.remove(t))}},{"../lib/dom":3,"../lib/helper":6,"./instances":18}],10:[function(t,e,i){"use strict";function n(t,e){function i(t){return t.getBoundingClientRect()}var n=function(t){t.stopPropagation()};e.event.bind(e.scrollbarY,"click",n),e.event.bind(e.scrollbarYRail,"click",function(n){var r=n.pageY-window.pageYOffset-i(e.scrollbarYRail).top,a=r>e.scrollbarYTop?1:-1;s(t,"top",t.scrollTop+a*e.containerHeight),o(t),n.stopPropagation()}),e.event.bind(e.scrollbarX,"click",n),e.event.bind(e.scrollbarXRail,"click",function(n){var r=n.pageX-window.pageXOffset-i(e.scrollbarXRail).left,a=r>e.scrollbarXLeft?1:-1;s(t,"left",t.scrollLeft+a*e.containerWidth),o(t),n.stopPropagation()})}var r=t("../instances"),o=t("../update-geometry"),s=t("../update-scroll");e.exports=function(t){var e=r.get(t);n(t,e)}},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],11:[function(t,e,i){"use strict";function n(t,e){function i(i){var r=n+i*e.railXRatio,s=Math.max(0,e.scrollbarXRail.getBoundingClientRect().left)+e.railXRatio*(e.railXWidth-e.scrollbarXWidth);r<0?e.scrollbarXLeft=0:r>s?e.scrollbarXLeft=s:e.scrollbarXLeft=r;var a=o.toInt(e.scrollbarXLeft*(e.contentWidth-e.containerWidth)/(e.containerWidth-e.railXRatio*e.scrollbarXWidth))-e.negativeScrollAdjustment;c(t,"left",a)}var n=null,r=null,a=function(e){i(e.pageX-r),l(t),e.stopPropagation(),e.preventDefault()},u=function(){o.stopScrolling(t,"x"),e.event.unbind(e.ownerDocument,"mousemove",a)};e.event.bind(e.scrollbarX,"mousedown",function(i){r=i.pageX,n=o.toInt(s.css(e.scrollbarX,"left"))*e.railXRatio,o.startScrolling(t,"x"),e.event.bind(e.ownerDocument,"mousemove",a),e.event.once(e.ownerDocument,"mouseup",u),i.stopPropagation(),i.preventDefault()})}function r(t,e){function i(i){var r=n+i*e.railYRatio,s=Math.max(0,e.scrollbarYRail.getBoundingClientRect().top)+e.railYRatio*(e.railYHeight-e.scrollbarYHeight);r<0?e.scrollbarYTop=0:r>s?e.scrollbarYTop=s:e.scrollbarYTop=r;var a=o.toInt(e.scrollbarYTop*(e.contentHeight-e.containerHeight)/(e.containerHeight-e.railYRatio*e.scrollbarYHeight));c(t,"top",a)}var n=null,r=null,a=function(e){i(e.pageY-r),l(t),e.stopPropagation(),e.preventDefault()},u=function(){o.stopScrolling(t,"y"),e.event.unbind(e.ownerDocument,"mousemove",a)};e.event.bind(e.scrollbarY,"mousedown",function(i){r=i.pageY,n=o.toInt(s.css(e.scrollbarY,"top"))*e.railYRatio,o.startScrolling(t,"y"),e.event.bind(e.ownerDocument,"mousemove",a),e.event.once(e.ownerDocument,"mouseup",u),i.stopPropagation(),i.preventDefault()})}var o=t("../../lib/helper"),s=t("../../lib/dom"),a=t("../instances"),l=t("../update-geometry"),c=t("../update-scroll");e.exports=function(t){var e=a.get(t);n(t,e),r(t,e)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],12:[function(t,e,i){"use strict";function n(t,e){function i(i,n){var r=t.scrollTop;if(0===i){if(!e.scrollbarYActive)return!1;if(0===r&&n>0||r>=e.contentHeight-e.containerHeight&&n<0)return!e.settings.wheelPropagation}var o=t.scrollLeft;if(0===n){if(!e.scrollbarXActive)return!1;if(0===o&&i<0||o>=e.contentWidth-e.containerWidth&&i>0)return!e.settings.wheelPropagation}return!0}var n=!1;e.event.bind(t,"mouseenter",function(){n=!0}),e.event.bind(t,"mouseleave",function(){n=!1});var s=!1;e.event.bind(e.ownerDocument,"keydown",function(c){if(!(c.isDefaultPrevented&&c.isDefaultPrevented()||c.defaultPrevented)){var u=o.matches(e.scrollbarX,":focus")||o.matches(e.scrollbarY,":focus");if(n||u){var h=document.activeElement?document.activeElement:e.ownerDocument.activeElement;if(h){if("IFRAME"===h.tagName)h=h.contentDocument.activeElement;else for(;h.shadowRoot;)h=h.shadowRoot.activeElement;if(r.isEditable(h))return}var d=0,p=0;switch(c.which){case 37:d=c.metaKey?-e.contentWidth:c.altKey?-e.containerWidth:-30;break;case 38:p=c.metaKey?e.contentHeight:c.altKey?e.containerHeight:30;break;case 39:d=c.metaKey?e.contentWidth:c.altKey?e.containerWidth:30;break;case 40:p=c.metaKey?-e.contentHeight:c.altKey?-e.containerHeight:-30;break;case 33:p=90;break;case 32:p=c.shiftKey?90:-90;break;case 34:p=-90;break;
case 35:p=c.ctrlKey?-e.contentHeight:-e.containerHeight;break;case 36:p=c.ctrlKey?t.scrollTop:e.containerHeight;break;default:return}l(t,"top",t.scrollTop-p),l(t,"left",t.scrollLeft+d),a(t),s=i(d,p),s&&c.preventDefault()}}})}var r=t("../../lib/helper"),o=t("../../lib/dom"),s=t("../instances"),a=t("../update-geometry"),l=t("../update-scroll");e.exports=function(t){var e=s.get(t);n(t,e)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],13:[function(t,e,i){"use strict";function n(t,e){function i(i,n){var r=t.scrollTop;if(0===i){if(!e.scrollbarYActive)return!1;if(0===r&&n>0||r>=e.contentHeight-e.containerHeight&&n<0)return!e.settings.wheelPropagation}var o=t.scrollLeft;if(0===n){if(!e.scrollbarXActive)return!1;if(0===o&&i<0||o>=e.contentWidth-e.containerWidth&&i>0)return!e.settings.wheelPropagation}return!0}function n(t){var e=t.deltaX,i=-1*t.deltaY;return"undefined"!=typeof e&&"undefined"!=typeof i||(e=-1*t.wheelDeltaX/6,i=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,i*=10),e!==e&&i!==i&&(e=0,i=t.wheelDelta),t.shiftKey?[-i,-e]:[e,i]}function r(e,i){var n=t.querySelector("textarea:hover, select[multiple]:hover, .ps-child:hover");if(n){var r=window.getComputedStyle(n),o=[r.overflow,r.overflowX,r.overflowY].join("");if(!o.match(/(scroll|auto)/))return!1;var s=n.scrollHeight-n.clientHeight;if(s>0&&!(0===n.scrollTop&&i>0||n.scrollTop===s&&i<0))return!0;var a=n.scrollLeft-n.clientWidth;if(a>0&&!(0===n.scrollLeft&&e<0||n.scrollLeft===a&&e>0))return!0}return!1}function a(a){var c=n(a),u=c[0],h=c[1];r(u,h)||(l=!1,e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(h?s(t,"top",t.scrollTop-h*e.settings.wheelSpeed):s(t,"top",t.scrollTop+u*e.settings.wheelSpeed),l=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(u?s(t,"left",t.scrollLeft+u*e.settings.wheelSpeed):s(t,"left",t.scrollLeft-h*e.settings.wheelSpeed),l=!0):(s(t,"top",t.scrollTop-h*e.settings.wheelSpeed),s(t,"left",t.scrollLeft+u*e.settings.wheelSpeed)),o(t),l=l||i(u,h),l&&(a.stopPropagation(),a.preventDefault()))}var l=!1;"undefined"!=typeof window.onwheel?e.event.bind(t,"wheel",a):"undefined"!=typeof window.onmousewheel&&e.event.bind(t,"mousewheel",a)}var r=t("../instances"),o=t("../update-geometry"),s=t("../update-scroll");e.exports=function(t){var e=r.get(t);n(t,e)}},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],14:[function(t,e,i){"use strict";function n(t,e){e.event.bind(t,"scroll",function(){o(t)})}var r=t("../instances"),o=t("../update-geometry");e.exports=function(t){var e=r.get(t);n(t,e)}},{"../instances":18,"../update-geometry":19}],15:[function(t,e,i){"use strict";function n(t,e){function i(){var t=window.getSelection?window.getSelection():document.getSelection?document.getSelection():"";return 0===t.toString().length?null:t.getRangeAt(0).commonAncestorContainer}function n(){c||(c=setInterval(function(){return o.get(t)?(a(t,"top",t.scrollTop+u.top),a(t,"left",t.scrollLeft+u.left),void s(t)):void clearInterval(c)},50))}function l(){c&&(clearInterval(c),c=null),r.stopScrolling(t)}var c=null,u={top:0,left:0},h=!1;e.event.bind(e.ownerDocument,"selectionchange",function(){t.contains(i())?h=!0:(h=!1,l())}),e.event.bind(window,"mouseup",function(){h&&(h=!1,l())}),e.event.bind(window,"keyup",function(){h&&(h=!1,l())}),e.event.bind(window,"mousemove",function(e){if(h){var i={x:e.pageX,y:e.pageY},o={left:t.offsetLeft,right:t.offsetLeft+t.offsetWidth,top:t.offsetTop,bottom:t.offsetTop+t.offsetHeight};i.x<o.left+3?(u.left=-5,r.startScrolling(t,"x")):i.x>o.right-3?(u.left=5,r.startScrolling(t,"x")):u.left=0,i.y<o.top+3?(o.top+3-i.y<5?u.top=-5:u.top=-20,r.startScrolling(t,"y")):i.y>o.bottom-3?(i.y-o.bottom+3<5?u.top=5:u.top=20,r.startScrolling(t,"y")):u.top=0,0===u.top&&0===u.left?l():n()}})}var r=t("../../lib/helper"),o=t("../instances"),s=t("../update-geometry"),a=t("../update-scroll");e.exports=function(t){var e=o.get(t);n(t,e)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],16:[function(t,e,i){"use strict";function n(t,e,i,n){function r(i,n){var r=t.scrollTop,o=t.scrollLeft,s=Math.abs(i),a=Math.abs(n);if(a>s){if(n<0&&r===e.contentHeight-e.containerHeight||n>0&&0===r)return!e.settings.swipePropagation}else if(s>a&&(i<0&&o===e.contentWidth-e.containerWidth||i>0&&0===o))return!e.settings.swipePropagation;return!0}function l(e,i){a(t,"top",t.scrollTop-i),a(t,"left",t.scrollLeft-e),s(t)}function c(){w=!0}function u(){w=!1}function h(t){return t.targetTouches?t.targetTouches[0]:t}function d(t){return!(!t.targetTouches||1!==t.targetTouches.length)||!(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE)}function p(t){if(d(t)){_=!0;var e=h(t);m.pageX=e.pageX,m.pageY=e.pageY,v=(new Date).getTime(),null!==b&&clearInterval(b),t.stopPropagation()}}function f(t){if(!_&&e.settings.swipePropagation&&p(t),!w&&_&&d(t)){var i=h(t),n={pageX:i.pageX,pageY:i.pageY},o=n.pageX-m.pageX,s=n.pageY-m.pageY;l(o,s),m=n;var a=(new Date).getTime(),c=a-v;c>0&&(y.x=o/c,y.y=s/c,v=a),r(o,s)&&(t.stopPropagation(),t.preventDefault())}}function g(){!w&&_&&(_=!1,e.settings.swipeEasing&&(clearInterval(b),b=setInterval(function(){return o.get(t)&&(y.x||y.y)?Math.abs(y.x)<.01&&Math.abs(y.y)<.01?void clearInterval(b):(l(30*y.x,30*y.y),y.x*=.8,void(y.y*=.8)):void clearInterval(b)},10)))}var m={},v=0,y={},b=null,w=!1,_=!1;i?(e.event.bind(window,"touchstart",c),e.event.bind(window,"touchend",u),e.event.bind(t,"touchstart",p),e.event.bind(t,"touchmove",f),e.event.bind(t,"touchend",g)):n&&(window.PointerEvent?(e.event.bind(window,"pointerdown",c),e.event.bind(window,"pointerup",u),e.event.bind(t,"pointerdown",p),e.event.bind(t,"pointermove",f),e.event.bind(t,"pointerup",g)):window.MSPointerEvent&&(e.event.bind(window,"MSPointerDown",c),e.event.bind(window,"MSPointerUp",u),e.event.bind(t,"MSPointerDown",p),e.event.bind(t,"MSPointerMove",f),e.event.bind(t,"MSPointerUp",g)))}var r=t("../../lib/helper"),o=t("../instances"),s=t("../update-geometry"),a=t("../update-scroll");e.exports=function(t){if(r.env.supportsTouch||r.env.supportsIePointer){var e=o.get(t);n(t,e,r.env.supportsTouch,r.env.supportsIePointer)}}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],17:[function(t,e,i){"use strict";var n=t("../lib/helper"),r=t("../lib/class"),o=t("./instances"),s=t("./update-geometry"),a={"click-rail":t("./handler/click-rail"),"drag-scrollbar":t("./handler/drag-scrollbar"),keyboard:t("./handler/keyboard"),wheel:t("./handler/mouse-wheel"),touch:t("./handler/touch"),selection:t("./handler/selection")},l=t("./handler/native-scroll");e.exports=function(t,e){e="object"==typeof e?e:{},r.add(t,"ps");var i=o.add(t);i.settings=n.extend(i.settings,e),r.add(t,"ps--theme_"+i.settings.theme),i.settings.handlers.forEach(function(e){a[e](t)}),l(t),s(t)}},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(t,e,i){"use strict";function n(t){function e(){l.add(t,"ps--focus")}function i(){l.remove(t,"ps--focus")}var n=this;n.settings=a.clone(c),n.containerWidth=null,n.containerHeight=null,n.contentWidth=null,n.contentHeight=null,n.isRtl="rtl"===u.css(t,"direction"),n.isNegativeScroll=function(){var e=t.scrollLeft,i=null;return t.scrollLeft=-1,i=t.scrollLeft<0,t.scrollLeft=e,i}(),n.negativeScrollAdjustment=n.isNegativeScroll?t.scrollWidth-t.clientWidth:0,n.event=new h,n.ownerDocument=t.ownerDocument||document,n.scrollbarXRail=u.appendTo(u.e("div","ps__scrollbar-x-rail"),t),n.scrollbarX=u.appendTo(u.e("div","ps__scrollbar-x"),n.scrollbarXRail),n.scrollbarX.setAttribute("tabindex",0),n.event.bind(n.scrollbarX,"focus",e),n.event.bind(n.scrollbarX,"blur",i),n.scrollbarXActive=null,n.scrollbarXWidth=null,n.scrollbarXLeft=null,n.scrollbarXBottom=a.toInt(u.css(n.scrollbarXRail,"bottom")),n.isScrollbarXUsingBottom=n.scrollbarXBottom===n.scrollbarXBottom,n.scrollbarXTop=n.isScrollbarXUsingBottom?null:a.toInt(u.css(n.scrollbarXRail,"top")),n.railBorderXWidth=a.toInt(u.css(n.scrollbarXRail,"borderLeftWidth"))+a.toInt(u.css(n.scrollbarXRail,"borderRightWidth")),u.css(n.scrollbarXRail,"display","block"),n.railXMarginWidth=a.toInt(u.css(n.scrollbarXRail,"marginLeft"))+a.toInt(u.css(n.scrollbarXRail,"marginRight")),u.css(n.scrollbarXRail,"display",""),n.railXWidth=null,n.railXRatio=null,n.scrollbarYRail=u.appendTo(u.e("div","ps__scrollbar-y-rail"),t),n.scrollbarY=u.appendTo(u.e("div","ps__scrollbar-y"),n.scrollbarYRail),n.scrollbarY.setAttribute("tabindex",0),n.event.bind(n.scrollbarY,"focus",e),n.event.bind(n.scrollbarY,"blur",i),n.scrollbarYActive=null,n.scrollbarYHeight=null,n.scrollbarYTop=null,n.scrollbarYRight=a.toInt(u.css(n.scrollbarYRail,"right")),n.isScrollbarYUsingRight=n.scrollbarYRight===n.scrollbarYRight,n.scrollbarYLeft=n.isScrollbarYUsingRight?null:a.toInt(u.css(n.scrollbarYRail,"left")),n.scrollbarYOuterWidth=n.isRtl?a.outerWidth(n.scrollbarY):null,n.railBorderYWidth=a.toInt(u.css(n.scrollbarYRail,"borderTopWidth"))+a.toInt(u.css(n.scrollbarYRail,"borderBottomWidth")),u.css(n.scrollbarYRail,"display","block"),n.railYMarginHeight=a.toInt(u.css(n.scrollbarYRail,"marginTop"))+a.toInt(u.css(n.scrollbarYRail,"marginBottom")),u.css(n.scrollbarYRail,"display",""),n.railYHeight=null,n.railYRatio=null}function r(t){return t.getAttribute("data-ps-id")}function o(t,e){t.setAttribute("data-ps-id",e)}function s(t){t.removeAttribute("data-ps-id")}var a=t("../lib/helper"),l=t("../lib/class"),c=t("./default-setting"),u=t("../lib/dom"),h=t("../lib/event-manager"),d=t("../lib/guid"),p={};i.add=function(t){var e=d();return o(t,e),p[e]=new n(t),p[e]},i.remove=function(t){delete p[r(t)],s(t)},i.get=function(t){return p[r(t)]}},{"../lib/class":2,"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(t,e,i){"use strict";function n(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}function r(t,e){var i={width:e.railXWidth};e.isRtl?i.left=e.negativeScrollAdjustment+t.scrollLeft+e.containerWidth-e.contentWidth:i.left=t.scrollLeft,e.isScrollbarXUsingBottom?i.bottom=e.scrollbarXBottom-t.scrollTop:i.top=e.scrollbarXTop+t.scrollTop,a.css(e.scrollbarXRail,i);var n={top:t.scrollTop,height:e.railYHeight};e.isScrollbarYUsingRight?e.isRtl?n.right=e.contentWidth-(e.negativeScrollAdjustment+t.scrollLeft)-e.scrollbarYRight-e.scrollbarYOuterWidth:n.right=e.scrollbarYRight-t.scrollLeft:e.isRtl?n.left=e.negativeScrollAdjustment+t.scrollLeft+2*e.containerWidth-e.contentWidth-e.scrollbarYLeft-e.scrollbarYOuterWidth:n.left=e.scrollbarYLeft+t.scrollLeft,a.css(e.scrollbarYRail,n),a.css(e.scrollbarX,{left:e.scrollbarXLeft,width:e.scrollbarXWidth-e.railBorderXWidth}),a.css(e.scrollbarY,{top:e.scrollbarYTop,height:e.scrollbarYHeight-e.railBorderYWidth})}var o=t("../lib/helper"),s=t("../lib/class"),a=t("../lib/dom"),l=t("./instances"),c=t("./update-scroll");e.exports=function(t){var e=l.get(t);e.containerWidth=t.clientWidth,e.containerHeight=t.clientHeight,e.contentWidth=t.scrollWidth,e.contentHeight=t.scrollHeight;var i;t.contains(e.scrollbarXRail)||(i=a.queryChildren(t,".ps__scrollbar-x-rail"),i.length>0&&i.forEach(function(t){a.remove(t)}),a.appendTo(e.scrollbarXRail,t)),t.contains(e.scrollbarYRail)||(i=a.queryChildren(t,".ps__scrollbar-y-rail"),i.length>0&&i.forEach(function(t){a.remove(t)}),a.appendTo(e.scrollbarYRail,t)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=n(e,o.toInt(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=o.toInt((e.negativeScrollAdjustment+t.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):e.scrollbarXActive=!1,!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=n(e,o.toInt(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=o.toInt(t.scrollTop*(e.railYHeight-e.scrollbarYHeight)/(e.contentHeight-e.containerHeight))):e.scrollbarYActive=!1,e.scrollbarXLeft>=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),r(t,e),e.scrollbarXActive?s.add(t,"ps--active-x"):(s.remove(t,"ps--active-x"),e.scrollbarXWidth=0,e.scrollbarXLeft=0,c(t,"left",0)),e.scrollbarYActive?s.add(t,"ps--active-y"):(s.remove(t,"ps--active-y"),e.scrollbarYHeight=0,e.scrollbarYTop=0,c(t,"top",0))}},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-scroll":20}],20:[function(t,e,i){"use strict";var n=t("./instances"),r=function(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!0),e};e.exports=function(t,e,i){if("undefined"==typeof t)throw"You must provide an element to the update-scroll function";if("undefined"==typeof e)throw"You must provide an axis to the update-scroll function";if("undefined"==typeof i)throw"You must provide a value to the update-scroll function";"top"===e&&i<=0&&(t.scrollTop=i=0,t.dispatchEvent(r("ps-y-reach-start"))),"left"===e&&i<=0&&(t.scrollLeft=i=0,t.dispatchEvent(r("ps-x-reach-start")));var o=n.get(t);"top"===e&&i>=o.contentHeight-o.containerHeight&&(i=o.contentHeight-o.containerHeight,i-t.scrollTop<=1?i=t.scrollTop:t.scrollTop=i,t.dispatchEvent(r("ps-y-reach-end"))),"left"===e&&i>=o.contentWidth-o.containerWidth&&(i=o.contentWidth-o.containerWidth,i-t.scrollLeft<=1?i=t.scrollLeft:t.scrollLeft=i,t.dispatchEvent(r("ps-x-reach-end"))),void 0===o.lastTop&&(o.lastTop=t.scrollTop),void 0===o.lastLeft&&(o.lastLeft=t.scrollLeft),"top"===e&&i<o.lastTop&&t.dispatchEvent(r("ps-scroll-up")),"top"===e&&i>o.lastTop&&t.dispatchEvent(r("ps-scroll-down")),"left"===e&&i<o.lastLeft&&t.dispatchEvent(r("ps-scroll-left")),"left"===e&&i>o.lastLeft&&t.dispatchEvent(r("ps-scroll-right")),"top"===e&&i!==o.lastTop&&(t.scrollTop=o.lastTop=i,t.dispatchEvent(r("ps-scroll-y"))),"left"===e&&i!==o.lastLeft&&(t.scrollLeft=o.lastLeft=i,t.dispatchEvent(r("ps-scroll-x")))}},{"./instances":18}],21:[function(t,e,i){"use strict";var n=t("../lib/helper"),r=t("../lib/dom"),o=t("./instances"),s=t("./update-geometry"),a=t("./update-scroll");e.exports=function(t){var e=o.get(t);e&&(e.negativeScrollAdjustment=e.isNegativeScroll?t.scrollWidth-t.clientWidth:0,r.css(e.scrollbarXRail,"display","block"),r.css(e.scrollbarYRail,"display","block"),e.railXMarginWidth=n.toInt(r.css(e.scrollbarXRail,"marginLeft"))+n.toInt(r.css(e.scrollbarXRail,"marginRight")),e.railYMarginHeight=n.toInt(r.css(e.scrollbarYRail,"marginTop"))+n.toInt(r.css(e.scrollbarYRail,"marginBottom")),r.css(e.scrollbarXRail,"display","none"),r.css(e.scrollbarYRail,"display","none"),s(t),a(t,"top",t.scrollTop),a(t,"left",t.scrollLeft),r.css(e.scrollbarXRail,"display",""),r.css(e.scrollbarYRail,"display",""))}},{"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-geometry":19,"./update-scroll":20}]},{},[1]),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.CodeMirror=e()}(this,function(){"use strict";function t(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function e(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function i(t,i){return e(t).appendChild(i)}function n(t,e,i,n){var r=document.createElement(t);if(i&&(r.className=i),n&&(r.style.cssText=n),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var o=0;o<e.length;++o)r.appendChild(e[o]);return r}function r(t,e,i,r){var o=n(t,e,i,r);return o.setAttribute("role","presentation"),o}function o(t,e){if(3==e.nodeType&&(e=e.parentNode),t.contains)return t.contains(e);do if(11==e.nodeType&&(e=e.host),e==t)return!0;while(e=e.parentNode)}function s(){var t;try{t=document.activeElement}catch(e){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function a(e,i){var n=e.className;t(i).test(n)||(e.className+=(n?" ":"")+i)}function l(e,i){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!t(n[r]).test(i)&&(i+=" "+n[r]);return i}function c(t){var e=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,e)}}function u(t,e,i){e||(e={});for(var n in t)!t.hasOwnProperty(n)||i===!1&&e.hasOwnProperty(n)||(e[n]=t[n]);return e}function h(t,e,i,n,r){null==e&&(e=t.search(/[^\s\u00a0]/),e==-1&&(e=t.length));for(var o=n||0,s=r||0;;){var a=t.indexOf("\t",o);if(a<0||a>=e)return s+(e-o);s+=a-o,s+=i-s%i,o=a+1}}function d(t,e){for(var i=0;i<t.length;++i)if(t[i]==e)return i;return-1}function p(t,e,i){for(var n=0,r=0;;){var o=t.indexOf("\t",n);o==-1&&(o=t.length);var s=o-n;if(o==t.length||r+s>=e)return n+Math.min(s,e-r);if(r+=o-n,r+=i-r%i,n=o+1,r>=e)return n}}function f(t){for(;Qs.length<=t;)Qs.push(g(Qs)+" ");return Qs[t]}function g(t){return t[t.length-1]}function m(t,e){for(var i=[],n=0;n<t.length;n++)i[n]=e(t[n],n);return i}function v(t,e,i){for(var n=0,r=i(e);n<t.length&&i(t[n])<=r;)n++;t.splice(n,0,e)}function y(){}function b(t,e){var i;return Object.create?i=Object.create(t):(y.prototype=t,i=new y),e&&u(e,i),i}function w(t){return/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||Zs.test(t))}function _(t,e){return e?!!(e.source.indexOf("\\w")>-1&&w(t))||e.test(t):w(t)}function x(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function k(t){return t.charCodeAt(0)>=768&&Js.test(t)}function C(t,e,i){for(;(i<0?e>0:e<t.length)&&k(t.charAt(e));)e+=i;return e}function T(t,e,i){for(var n=e>i?-1:1;;){if(e==i)return e;var r=(e+i)/2,o=n<0?Math.ceil(r):Math.floor(r);if(o==e)return t(o)?e:i;t(o)?i=o:e=o+n}}function S(t,e,i){var o=this;this.input=i,o.scrollbarFiller=n("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=n("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=r("div",null,"CodeMirror-code"),o.selectionDiv=n("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=n("div",null,"CodeMirror-cursors"),o.measure=n("div",null,"CodeMirror-measure"),o.lineMeasure=n("div",null,"CodeMirror-measure"),o.lineSpace=r("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var s=r("div",[o.lineSpace],"CodeMirror-lines");o.mover=n("div",[s],null,"position: relative"),o.sizer=n("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=n("div",null,null,"position: absolute; height: "+Us+"px; width: 1px;"),o.gutters=n("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=n("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=n("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),xs&&ks<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),Cs||ys&&Ls||(o.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(o.wrapper):t(o.wrapper)),o.viewFrom=o.viewTo=e.first,o.reportedViewFrom=o.reportedViewTo=e.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,i.init(o)}function D(t,e){if(e-=t.first,e<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var i=t;!i.lines;)for(var n=0;;++n){var r=i.children[n],o=r.chunkSize();if(e<o){i=r;break}e-=o}return i.lines[e]}function M(t,e,i){var n=[],r=e.line;return t.iter(e.line,i.line+1,function(t){var o=t.text;r==i.line&&(o=o.slice(0,i.ch)),r==e.line&&(o=o.slice(e.ch)),n.push(o),++r}),n}function A(t,e,i){var n=[];return t.iter(e,i,function(t){n.push(t.text)}),n}function P(t,e){var i=e-t.height;if(i)for(var n=t;n;n=n.parent)n.height+=i}function I(t){if(null==t.parent)return null;for(var e=t.parent,i=d(e.lines,t),n=e.parent;n;e=n,n=n.parent)for(var r=0;n.children[r]!=e;++r)i+=n.children[r].chunkSize();return i+e.first}function E(t,e){var i=t.first;t:do{for(var n=0;n<t.children.length;++n){var r=t.children[n],o=r.height;if(e<o){t=r;continue t}e-=o,i+=r.chunkSize()}return i}while(!t.lines);for(var s=0;s<t.lines.length;++s){var a=t.lines[s],l=a.height;if(e<l)break;e-=l}return i+s}function L(t,e){return e>=t.first&&e<t.first+t.size}function N(t,e){return String(t.lineNumberFormatter(e+t.firstLineNumber))}function O(t,e,i){return void 0===i&&(i=null),this instanceof O?(this.line=t,this.ch=e,void(this.sticky=i)):new O(t,e,i)}function H(t,e){return t.line-e.line||t.ch-e.ch}function W(t,e){return t.sticky==e.sticky&&0==H(t,e)}function z(t){return O(t.line,t.ch)}function R(t,e){return H(t,e)<0?e:t}function F(t,e){return H(t,e)<0?t:e}function j(t,e){return Math.max(t.first,Math.min(e,t.first+t.size-1))}function B(t,e){if(e.line<t.first)return O(t.first,0);var i=t.first+t.size-1;return e.line>i?O(i,D(t,i).text.length):$(e,D(t,e.line).text.length)}function $(t,e){var i=t.ch;return null==i||i>e?O(t.line,e):i<0?O(t.line,0):t}function q(t,e){for(var i=[],n=0;n<e.length;n++)i[n]=B(t,e[n]);return i}function Y(){ta=!0}function U(){ea=!0}function X(t,e,i){this.marker=t,this.from=e,this.to=i}function K(t,e){if(t)for(var i=0;i<t.length;++i){var n=t[i];if(n.marker==e)return n}}function V(t,e){for(var i,n=0;n<t.length;++n)t[n]!=e&&(i||(i=[])).push(t[n]);return i}function G(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}function Q(t,e,i){var n;if(t)for(var r=0;r<t.length;++r){var o=t[r],s=o.marker,a=null==o.from||(s.inclusiveLeft?o.from<=e:o.from<e);if(a||o.from==e&&"bookmark"==s.type&&(!i||!o.marker.insertLeft)){var l=null==o.to||(s.inclusiveRight?o.to>=e:o.to>e);(n||(n=[])).push(new X(s,o.from,l?null:o.to))}}return n}function Z(t,e,i){var n;if(t)for(var r=0;r<t.length;++r){var o=t[r],s=o.marker,a=null==o.to||(s.inclusiveRight?o.to>=e:o.to>e);if(a||o.from==e&&"bookmark"==s.type&&(!i||o.marker.insertLeft)){var l=null==o.from||(s.inclusiveLeft?o.from<=e:o.from<e);(n||(n=[])).push(new X(s,l?null:o.from-e,null==o.to?null:o.to-e))}}return n}function J(t,e){if(e.full)return null;var i=L(t,e.from.line)&&D(t,e.from.line).markedSpans,n=L(t,e.to.line)&&D(t,e.to.line).markedSpans;if(!i&&!n)return null;var r=e.from.ch,o=e.to.ch,s=0==H(e.from,e.to),a=Q(i,r,s),l=Z(n,o,s),c=1==e.text.length,u=g(e.text).length+(c?r:0);if(a)for(var h=0;h<a.length;++h){var d=a[h];if(null==d.to){var p=K(l,d.marker);p?c&&(d.to=null==p.to?null:p.to+u):d.to=r}}if(l)for(var f=0;f<l.length;++f){var m=l[f];if(null!=m.to&&(m.to+=u),null==m.from){var v=K(a,m.marker);v||(m.from=u,c&&(a||(a=[])).push(m))}else m.from+=u,c&&(a||(a=[])).push(m)}a&&(a=tt(a)),l&&l!=a&&(l=tt(l));var y=[a];if(!c){var b,w=e.text.length-2;if(w>0&&a)for(var _=0;_<a.length;++_)null==a[_].to&&(b||(b=[])).push(new X(a[_].marker,null,null));for(var x=0;x<w;++x)y.push(b);y.push(l)}return y}function tt(t){for(var e=0;e<t.length;++e){var i=t[e];null!=i.from&&i.from==i.to&&i.marker.clearWhenEmpty!==!1&&t.splice(e--,1)}return t.length?t:null}function et(t,e,i){var n=null;if(t.iter(e.line,i.line+1,function(t){if(t.markedSpans)for(var e=0;e<t.markedSpans.length;++e){var i=t.markedSpans[e].marker;!i.readOnly||n&&d(n,i)!=-1||(n||(n=[])).push(i)}}),!n)return null;for(var r=[{from:e,to:i}],o=0;o<n.length;++o)for(var s=n[o],a=s.find(0),l=0;l<r.length;++l){var c=r[l];if(!(H(c.to,a.from)<0||H(c.from,a.to)>0)){var u=[l,1],h=H(c.from,a.from),p=H(c.to,a.to);(h<0||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(p>0||!s.inclusiveRight&&!p)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function it(t){var e=t.markedSpans;if(e){for(var i=0;i<e.length;++i)e[i].marker.detachLine(t);t.markedSpans=null}}function nt(t,e){if(e){for(var i=0;i<e.length;++i)e[i].marker.attachLine(t);t.markedSpans=e}}function rt(t){return t.inclusiveLeft?-1:0}function ot(t){return t.inclusiveRight?1:0}function st(t,e){var i=t.lines.length-e.lines.length;if(0!=i)return i;var n=t.find(),r=e.find(),o=H(n.from,r.from)||rt(t)-rt(e);if(o)return-o;var s=H(n.to,r.to)||ot(t)-ot(e);return s?s:e.id-t.id}function at(t,e){var i,n=ea&&t.markedSpans;if(n)for(var r=void 0,o=0;o<n.length;++o)r=n[o],r.marker.collapsed&&null==(e?r.from:r.to)&&(!i||st(i,r.marker)<0)&&(i=r.marker);return i}function lt(t){return at(t,!0)}function ct(t){return at(t,!1)}function ut(t,e){var i,n=ea&&t.markedSpans;if(n)for(var r=0;r<n.length;++r){var o=n[r];o.marker.collapsed&&(null==o.from||o.from<e)&&(null==o.to||o.to>e)&&(!i||st(i,o.marker)<0)&&(i=o.marker)}return i}function ht(t,e,i,n,r){var o=D(t,e),s=ea&&o.markedSpans;if(s)for(var a=0;a<s.length;++a){var l=s[a];if(l.marker.collapsed){var c=l.marker.find(0),u=H(c.from,i)||rt(l.marker)-rt(r),h=H(c.to,n)||ot(l.marker)-ot(r);if(!(u>=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?H(c.to,i)>=0:H(c.to,i)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?H(c.from,n)<=0:H(c.from,n)<0)))return!0}}}function dt(t){for(var e;e=lt(t);)t=e.find(-1,!0).line;return t}function pt(t){for(var e;e=ct(t);)t=e.find(1,!0).line;return t}function ft(t){for(var e,i;e=ct(t);)t=e.find(1,!0).line,(i||(i=[])).push(t);return i}function gt(t,e){var i=D(t,e),n=dt(i);return i==n?e:I(n)}function mt(t,e){if(e>t.lastLine())return e;var i,n=D(t,e);if(!vt(t,n))return e;for(;i=ct(n);)n=i.find(1,!0).line;return I(n)+1}function vt(t,e){var i=ea&&e.markedSpans;if(i)for(var n=void 0,r=0;r<i.length;++r)if(n=i[r],n.marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&yt(t,e,n))return!0}}function yt(t,e,i){if(null==i.to){var n=i.marker.find(1,!0);return yt(t,n.line,K(n.line.markedSpans,i.marker))}if(i.marker.inclusiveRight&&i.to==e.text.length)return!0;for(var r=void 0,o=0;o<e.markedSpans.length;++o)if(r=e.markedSpans[o],r.marker.collapsed&&!r.marker.widgetNode&&r.from==i.to&&(null==r.to||r.to!=i.from)&&(r.marker.inclusiveLeft||i.marker.inclusiveRight)&&yt(t,e,r))return!0}function bt(t){t=dt(t);for(var e=0,i=t.parent,n=0;n<i.lines.length;++n){var r=i.lines[n];if(r==t)break;e+=r.height}for(var o=i.parent;o;i=o,o=i.parent)for(var s=0;s<o.children.length;++s){var a=o.children[s];if(a==i)break;e+=a.height}return e}function wt(t){if(0==t.height)return 0;for(var e,i=t.text.length,n=t;e=lt(n);){var r=e.find(0,!0);n=r.from.line,i+=r.from.ch-r.to.ch}for(n=t;e=ct(n);){var o=e.find(0,!0);i-=n.text.length-o.from.ch,n=o.to.line,i+=n.text.length-o.to.ch}return i}function _t(t){var e=t.display,i=t.doc;e.maxLine=D(i,i.first),e.maxLineLength=wt(e.maxLine),e.maxLineChanged=!0,i.iter(function(t){var i=wt(t);i>e.maxLineLength&&(e.maxLineLength=i,e.maxLine=t)})}function xt(t,e,i,n){if(!t)return n(e,i,"ltr",0);for(var r=!1,o=0;o<t.length;++o){var s=t[o];(s.from<i&&s.to>e||e==i&&s.to==e)&&(n(Math.max(s.from,e),Math.min(s.to,i),1==s.level?"rtl":"ltr",o),r=!0)}r||n(e,i,"ltr")}function kt(t,e,i){var n;ia=null;for(var r=0;r<t.length;++r){var o=t[r];if(o.from<e&&o.to>e)return r;o.to==e&&(o.from!=o.to&&"before"==i?n=r:ia=r),o.from==e&&(o.from!=o.to&&"before"!=i?n=r:ia=r)}return null!=n?n:ia}function Ct(t,e){var i=t.order;return null==i&&(i=t.order=na(t.text,e)),i}function Tt(t,e){return t._handlers&&t._handlers[e]||ra}function St(t,e,i){if(t.removeEventListener)t.removeEventListener(e,i,!1);else if(t.detachEvent)t.detachEvent("on"+e,i);else{var n=t._handlers,r=n&&n[e];if(r){var o=d(r,i);o>-1&&(n[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function Dt(t,e){var i=Tt(t,e);if(i.length)for(var n=Array.prototype.slice.call(arguments,2),r=0;r<i.length;++r)i[r].apply(null,n)}function Mt(t,e,i){return"string"==typeof e&&(e={type:e,preventDefault:function(){this.defaultPrevented=!0}}),Dt(t,i||e.type,t,e),Nt(e)||e.codemirrorIgnore}function At(t){var e=t._handlers&&t._handlers.cursorActivity;if(e)for(var i=t.curOp.cursorActivityHandlers||(t.curOp.cursorActivityHandlers=[]),n=0;n<e.length;++n)d(i,e[n])==-1&&i.push(e[n])}function Pt(t,e){return Tt(t,e).length>0}function It(t){t.prototype.on=function(t,e){oa(this,t,e)},t.prototype.off=function(t,e){St(this,t,e)}}function Et(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function Lt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Nt(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Ot(t){Et(t),Lt(t)}function Ht(t){return t.target||t.srcElement}function Wt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),Ns&&t.ctrlKey&&1==e&&(e=3),e}function zt(t){if(null==qs){var e=n("span","​");i(t,n("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(qs=e.offsetWidth<=1&&e.offsetHeight>2&&!(xs&&ks<8))}var r=qs?n("span","​"):n("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Rt(t){if(null!=Ys)return Ys;var n=i(t,document.createTextNode("AخA")),r=zs(n,0,1).getBoundingClientRect(),o=zs(n,1,2).getBoundingClientRect();return e(t),!(!r||r.left==r.right)&&(Ys=o.right-r.right<3)}function Ft(t){if(null!=ua)return ua;var e=i(t,n("span","x")),r=e.getBoundingClientRect(),o=zs(e,0,1).getBoundingClientRect();return ua=Math.abs(r.left-o.left)>1}function jt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),ha[t]=e}function Bt(t,e){da[t]=e}function $t(t){if("string"==typeof t&&da.hasOwnProperty(t))t=da[t];else if(t&&"string"==typeof t.name&&da.hasOwnProperty(t.name)){var e=da[t.name];"string"==typeof e&&(e={name:e}),t=b(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return $t("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return $t("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function qt(t,e){e=$t(e);var i=ha[e.name];if(!i)return qt(t,"text/plain");var n=i(t,e);if(pa.hasOwnProperty(e.name)){var r=pa[e.name];for(var o in r)r.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=r[o])}if(n.name=e.name,e.helperType&&(n.helperType=e.helperType),e.modeProps)for(var s in e.modeProps)n[s]=e.modeProps[s];return n}function Yt(t,e){var i=pa.hasOwnProperty(t)?pa[t]:pa[t]={};u(e,i)}function Ut(t,e){if(e===!0)return e;if(t.copyState)return t.copyState(e);var i={};for(var n in e){var r=e[n];r instanceof Array&&(r=r.concat([])),i[n]=r}return i}function Xt(t,e){for(var i;t.innerMode&&(i=t.innerMode(e),i&&i.mode!=t);)e=i.state,t=i.mode;return i||{mode:t,state:e}}function Kt(t,e,i){return!t.startState||t.startState(e,i)}function Vt(t,e,i,n){var r=[t.state.modeGen],o={};ne(t,e.text,t.doc.mode,i,function(t,e){return r.push(t,e)},o,n);for(var s=i.state,a=function(n){i.baseTokens=r;var a=t.state.overlays[n],l=1,c=0;i.state=!0,ne(t,e.text,a.mode,i,function(t,e){for(var i=l;c<t;){var n=r[l];n>t&&r.splice(l,1,t,r[l+1],n),l+=2,c=Math.min(t,n)}if(e)if(a.opaque)r.splice(i,l-i,t,"overlay "+e),l=i+2;else for(;i<l;i+=2){var o=r[i+1];r[i+1]=(o?o+" ":"")+"overlay "+e}},o),i.state=s,i.baseTokens=null,i.baseTokenPos=1},l=0;l<t.state.overlays.length;++l)a(l);return{styles:r,classes:o.bgClass||o.textClass?o:null}}function Gt(t,e,i){if(!e.styles||e.styles[0]!=t.state.modeGen){var n=Qt(t,I(e)),r=e.text.length>t.options.maxHighlightLength&&Ut(t.doc.mode,n.state),o=Vt(t,e,n);r&&(n.state=r),e.stateAfter=n.save(!r),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),
i===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function Qt(t,e,i){var n=t.doc,r=t.display;if(!n.mode.startState)return new ma(n,(!0),e);var o=re(t,e,i),s=o>n.first&&D(n,o-1).stateAfter,a=s?ma.fromSaved(n,s,o):new ma(n,Kt(n.mode),o);return n.iter(o,e,function(i){Zt(t,i.text,a);var n=a.line;i.stateAfter=n==e-1||n%5==0||n>=r.viewFrom&&n<r.viewTo?a.save():null,a.nextLine()}),i&&(n.modeFrontier=a.line),a}function Zt(t,e,i,n){var r=t.doc.mode,o=new fa(e,t.options.tabSize,i);for(o.start=o.pos=n||0,""==e&&Jt(r,i.state);!o.eol();)te(r,o,i.state),o.start=o.pos}function Jt(t,e){if(t.blankLine)return t.blankLine(e);if(t.innerMode){var i=Xt(t,e);return i.mode.blankLine?i.mode.blankLine(i.state):void 0}}function te(t,e,i,n){for(var r=0;r<10;r++){n&&(n[0]=Xt(t,i).mode);var o=t.token(e,i);if(e.pos>e.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}function ee(t,e,i,n){var r,o=t.doc,s=o.mode;e=B(o,e);var a,l=D(o,e.line),c=Qt(t,e.line,i),u=new fa(l.text,t.options.tabSize,c);for(n&&(a=[]);(n||u.pos<e.ch)&&!u.eol();)u.start=u.pos,r=te(s,u,c.state),n&&a.push(new va(u,r,Ut(o.mode,c.state)));return n?a:new va(u,r,c.state)}function ie(t,e){if(t)for(;;){var i=t.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i)break;t=t.slice(0,i.index)+t.slice(i.index+i[0].length);var n=i[1]?"bgClass":"textClass";null==e[n]?e[n]=i[2]:new RegExp("(?:^|s)"+i[2]+"(?:$|s)").test(e[n])||(e[n]+=" "+i[2])}return t}function ne(t,e,i,n,r,o,s){var a=i.flattenSpans;null==a&&(a=t.options.flattenSpans);var l,c=0,u=null,h=new fa(e,t.options.tabSize,n),d=t.options.addModeClass&&[null];for(""==e&&ie(Jt(i,n.state),o);!h.eol();){if(h.pos>t.options.maxHighlightLength?(a=!1,s&&Zt(t,e,n,h.pos),h.pos=e.length,l=null):l=ie(te(i,h,n.state,d),o),d){var p=d[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!a||u!=l){for(;c<h.start;)c=Math.min(h.start,c+5e3),r(c,u);u=l}h.start=h.pos}for(;c<h.pos;){var f=Math.min(h.pos,c+5e3);r(f,u),c=f}}function re(t,e,i){for(var n,r,o=t.doc,s=i?-1:e-(t.doc.mode.innerMode?1e3:100),a=e;a>s;--a){if(a<=o.first)return o.first;var l=D(o,a-1),c=l.stateAfter;if(c&&(!i||a+(c instanceof ga?c.lookAhead:0)<=o.modeFrontier))return a;var u=h(l.text,null,t.options.tabSize);(null==r||n>u)&&(r=a-1,n=u)}return r}function oe(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontier<e-10)){for(var i=t.first,n=e-1;n>i;n--){var r=D(t,n).stateAfter;if(r&&(!(r instanceof ga)||n+r.lookAhead<e)){i=n+1;break}}t.highlightFrontier=Math.min(t.highlightFrontier,i)}}function se(t,e,i,n){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),it(t),nt(t,i);var r=n?n(t):1;r!=t.height&&P(t,r)}function ae(t){t.parent=null,it(t)}function le(t,e){if(!t||/^\s*$/.test(t))return null;var i=e.addModeClass?_a:wa;return i[t]||(i[t]=t.replace(/\S+/g,"cm-$&"))}function ce(t,e){var i=r("span",null,null,Cs?"padding-right: .1px":null),n={pre:r("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var o=0;o<=(e.rest?e.rest.length:0);o++){var s=o?e.rest[o-1]:e.line,a=void 0;n.pos=0,n.addToken=he,Rt(t.display.measure)&&(a=Ct(s,t.doc.direction))&&(n.addToken=pe(n.addToken,a)),n.map=[];var c=e!=t.display.externalMeasured&&I(s);ge(s,n,Gt(t,s,c)),s.styleClasses&&(s.styleClasses.bgClass&&(n.bgClass=l(s.styleClasses.bgClass,n.bgClass||"")),s.styleClasses.textClass&&(n.textClass=l(s.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(zt(t.display.measure))),0==o?(e.measure.map=n.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(n.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(Cs){var u=n.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Dt(t,"renderLine",t,e.line,n.pre),n.pre.className&&(n.textClass=l(n.pre.className,n.textClass||"")),n}function ue(t){var e=n("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function he(t,e,i,r,o,s,a){if(e){var l,c=t.splitSpaces?de(e,t.trailingSpace):e,u=t.cm.state.specialChars,h=!1;if(u.test(e)){l=document.createDocumentFragment();for(var d=0;;){u.lastIndex=d;var p=u.exec(e),g=p?p.index-d:e.length-d;if(g){var m=document.createTextNode(c.slice(d,d+g));xs&&ks<9?l.appendChild(n("span",[m])):l.appendChild(m),t.map.push(t.pos,t.pos+g,m),t.col+=g,t.pos+=g}if(!p)break;d+=g+1;var v=void 0;if("\t"==p[0]){var y=t.cm.options.tabSize,b=y-t.col%y;v=l.appendChild(n("span",f(b),"cm-tab")),v.setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),t.col+=b}else"\r"==p[0]||"\n"==p[0]?(v=l.appendChild(n("span","\r"==p[0]?"␍":"␤","cm-invalidchar")),v.setAttribute("cm-text",p[0]),t.col+=1):(v=t.cm.options.specialCharPlaceholder(p[0]),v.setAttribute("cm-text",p[0]),xs&&ks<9?l.appendChild(n("span",[v])):l.appendChild(v),t.col+=1);t.map.push(t.pos,t.pos+1,v),t.pos++}}else t.col+=e.length,l=document.createTextNode(c),t.map.push(t.pos,t.pos+e.length,l),xs&&ks<9&&(h=!0),t.pos+=e.length;if(t.trailingSpace=32==c.charCodeAt(e.length-1),i||r||o||h||s){var w=i||"";r&&(w+=r),o&&(w+=o);var _=n("span",[l],w,s);if(a)for(var x in a)a.hasOwnProperty(x)&&"style"!=x&&"class"!=x&&_.setAttribute(x,a[x]);return t.content.appendChild(_)}t.content.appendChild(l)}}function de(t,e){if(t.length>1&&!/  /.test(t))return t;for(var i=e,n="",r=0;r<t.length;r++){var o=t.charAt(r);" "!=o||!i||r!=t.length-1&&32!=t.charCodeAt(r+1)||(o=" "),n+=o,i=" "==o}return n}function pe(t,e){return function(i,n,r,o,s,a,l){r=r?r+" cm-force-border":"cm-force-border";for(var c=i.pos,u=c+n.length;;){for(var h=void 0,d=0;d<e.length&&(h=e[d],!(h.to>c&&h.from<=c));d++);if(h.to>=u)return t(i,n,r,o,s,a,l);t(i,n.slice(0,h.to-c),r,o,null,a,l),o=null,n=n.slice(h.to-c),c=h.to}}}function fe(t,e,i,n){var r=!n&&i.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!n&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",i.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function ge(t,e,i){var n=t.markedSpans,r=t.text,o=0;if(n)for(var s,a,l,c,u,h,d,p=r.length,f=0,g=1,m="",v=0;;){if(v==f){l=c=u=a="",d=null,h=null,v=1/0;for(var y=[],b=void 0,w=0;w<n.length;++w){var _=n[w],x=_.marker;if("bookmark"==x.type&&_.from==f&&x.widgetNode)y.push(x);else if(_.from<=f&&(null==_.to||_.to>f||x.collapsed&&_.to==f&&_.from==f)){if(null!=_.to&&_.to!=f&&v>_.to&&(v=_.to,c=""),x.className&&(l+=" "+x.className),x.css&&(a=(a?a+";":"")+x.css),x.startStyle&&_.from==f&&(u+=" "+x.startStyle),x.endStyle&&_.to==v&&(b||(b=[])).push(x.endStyle,_.to),x.title&&((d||(d={})).title=x.title),x.attributes)for(var k in x.attributes)(d||(d={}))[k]=x.attributes[k];x.collapsed&&(!h||st(h.marker,x)<0)&&(h=_)}else _.from>f&&v>_.from&&(v=_.from)}if(b)for(var C=0;C<b.length;C+=2)b[C+1]==v&&(c+=" "+b[C]);if(!h||h.from==f)for(var T=0;T<y.length;++T)fe(e,0,y[T]);if(h&&(h.from||0)==f){if(fe(e,(null==h.to?p+1:h.to)-f,h.marker,null==h.from),null==h.to)return;h.to==f&&(h=!1)}}if(f>=p)break;for(var S=Math.min(p,v);;){if(m){var D=f+m.length;if(!h){var M=D>S?m.slice(0,S-f):m;e.addToken(e,M,s?s+l:l,u,f+M.length==v?c:"",a,d)}if(D>=S){m=m.slice(S-f),f=S;break}f=D,u=""}m=r.slice(o,o=i[g++]),s=le(i[g++],e.cm.options)}}else for(var A=1;A<i.length;A+=2)e.addToken(e,r.slice(o,o=i[A]),le(i[A+1],e.cm.options))}function me(t,e,i){this.line=e,this.rest=ft(e),this.size=this.rest?I(g(this.rest))-i+1:1,this.node=this.text=null,this.hidden=vt(t,e)}function ve(t,e,i){for(var n,r=[],o=e;o<i;o=n){var s=new me(t.doc,D(t.doc,o),o);n=o+s.size,r.push(s)}return r}function ye(t){xa?xa.ops.push(t):t.ownsGroup=xa={ops:[t],delayedCallbacks:[]}}function be(t){var e=t.delayedCallbacks,i=0;do{for(;i<e.length;i++)e[i].call(null);for(var n=0;n<t.ops.length;n++){var r=t.ops[n];if(r.cursorActivityHandlers)for(;r.cursorActivityCalled<r.cursorActivityHandlers.length;)r.cursorActivityHandlers[r.cursorActivityCalled++].call(null,r.cm)}}while(i<e.length)}function we(t,e){var i=t.ownsGroup;if(i)try{be(i)}finally{xa=null,e(i)}}function _e(t,e){var i=Tt(t,e);if(i.length){var n,r=Array.prototype.slice.call(arguments,2);xa?n=xa.delayedCallbacks:ka?n=ka:(n=ka=[],setTimeout(xe,0));for(var o=function(t){n.push(function(){return i[t].apply(null,r)})},s=0;s<i.length;++s)o(s)}}function xe(){var t=ka;ka=null;for(var e=0;e<t.length;++e)t[e]()}function ke(t,e,i,n){for(var r=0;r<e.changes.length;r++){var o=e.changes[r];"text"==o?De(t,e):"gutter"==o?Ae(t,e,i,n):"class"==o?Me(t,e):"widget"==o&&Pe(t,e,n)}e.changes=null}function Ce(t){return t.node==t.text&&(t.node=n("div",null,null,"position: relative"),t.text.parentNode&&t.text.parentNode.replaceChild(t.node,t.text),t.node.appendChild(t.text),xs&&ks<8&&(t.node.style.zIndex=2)),t.node}function Te(t,e){var i=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(i&&(i+=" CodeMirror-linebackground"),e.background)i?e.background.className=i:(e.background.parentNode.removeChild(e.background),e.background=null);else if(i){var r=Ce(e);e.background=r.insertBefore(n("div",null,i),r.firstChild),t.display.input.setUneditable(e.background)}}function Se(t,e){var i=t.display.externalMeasured;return i&&i.line==e.line?(t.display.externalMeasured=null,e.measure=i.measure,i.built):ce(t,e)}function De(t,e){var i=e.text.className,n=Se(t,e);e.text==e.node&&(e.node=n.pre),e.text.parentNode.replaceChild(n.pre,e.text),e.text=n.pre,n.bgClass!=e.bgClass||n.textClass!=e.textClass?(e.bgClass=n.bgClass,e.textClass=n.textClass,Me(t,e)):i&&(e.text.className=i)}function Me(t,e){Te(t,e),e.line.wrapClass?Ce(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var i=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=i||""}function Ae(t,e,i,r){if(e.gutter&&(e.node.removeChild(e.gutter),e.gutter=null),e.gutterBackground&&(e.node.removeChild(e.gutterBackground),e.gutterBackground=null),e.line.gutterClass){var o=Ce(e);e.gutterBackground=n("div",null,"CodeMirror-gutter-background "+e.line.gutterClass,"left: "+(t.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),t.display.input.setUneditable(e.gutterBackground),o.insertBefore(e.gutterBackground,e.text)}var s=e.line.gutterMarkers;if(t.options.lineNumbers||s){var a=Ce(e),l=e.gutter=n("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(t.display.input.setUneditable(l),a.insertBefore(l,e.text),e.line.gutterClass&&(l.className+=" "+e.line.gutterClass),!t.options.lineNumbers||s&&s["CodeMirror-linenumbers"]||(e.lineNumber=l.appendChild(n("div",N(t.options,i),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),s)for(var c=0;c<t.options.gutters.length;++c){var u=t.options.gutters[c],h=s.hasOwnProperty(u)&&s[u];h&&l.appendChild(n("div",[h],"CodeMirror-gutter-elt","left: "+r.gutterLeft[u]+"px; width: "+r.gutterWidth[u]+"px"))}}}function Pe(t,e,i){e.alignable&&(e.alignable=null);for(var n=e.node.firstChild,r=void 0;n;n=r)r=n.nextSibling,"CodeMirror-linewidget"==n.className&&e.node.removeChild(n);Ee(t,e,i)}function Ie(t,e,i,n){var r=Se(t,e);return e.text=e.node=r.pre,r.bgClass&&(e.bgClass=r.bgClass),r.textClass&&(e.textClass=r.textClass),Me(t,e),Ae(t,e,i,n),Ee(t,e,n),e.node}function Ee(t,e,i){if(Le(t,e.line,e,i,!0),e.rest)for(var n=0;n<e.rest.length;n++)Le(t,e.rest[n],e,i,!1)}function Le(t,e,i,r,o){if(e.widgets)for(var s=Ce(i),a=0,l=e.widgets;a<l.length;++a){var c=l[a],u=n("div",[c.node],"CodeMirror-linewidget");c.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Ne(c,u,i,r),t.display.input.setUneditable(u),o&&c.above?s.insertBefore(u,i.gutter||i.text):s.appendChild(u),_e(c,"redraw")}}function Ne(t,e,i,n){if(t.noHScroll){(i.alignable||(i.alignable=[])).push(e);var r=n.wrapperWidth;e.style.left=n.fixedPos+"px",t.coverGutter||(r-=n.gutterTotalWidth,e.style.paddingLeft=n.gutterTotalWidth+"px"),e.style.width=r+"px"}t.coverGutter&&(e.style.zIndex=5,e.style.position="relative",t.noHScroll||(e.style.marginLeft=-n.gutterTotalWidth+"px"))}function Oe(t){if(null!=t.height)return t.height;var e=t.doc.cm;if(!e)return 0;if(!o(document.body,t.node)){var r="position: relative;";t.coverGutter&&(r+="margin-left: -"+e.display.gutters.offsetWidth+"px;"),t.noHScroll&&(r+="width: "+e.display.wrapper.clientWidth+"px;"),i(e.display.measure,n("div",[t.node],null,r))}return t.height=t.node.parentNode.offsetHeight}function He(t,e){for(var i=Ht(e);i!=t.wrapper;i=i.parentNode)if(!i||1==i.nodeType&&"true"==i.getAttribute("cm-ignore-events")||i.parentNode==t.sizer&&i!=t.mover)return!0}function We(t){return t.lineSpace.offsetTop}function ze(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function Re(t){if(t.cachedPaddingH)return t.cachedPaddingH;var e=i(t.measure,n("pre","x")),r=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,o={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(o.left)||isNaN(o.right)||(t.cachedPaddingH=o),o}function Fe(t){return Us-t.display.nativeBarWidth}function je(t){return t.display.scroller.clientWidth-Fe(t)-t.display.barWidth}function Be(t){return t.display.scroller.clientHeight-Fe(t)-t.display.barHeight}function $e(t,e,i){var n=t.options.lineWrapping,r=n&&je(t);if(!e.measure.heights||n&&e.measure.width!=r){var o=e.measure.heights=[];if(n){e.measure.width=r;for(var s=e.text.firstChild.getClientRects(),a=0;a<s.length-1;a++){var l=s[a],c=s[a+1];Math.abs(l.bottom-c.bottom)>2&&o.push((l.bottom+c.top)/2-i.top)}}o.push(i.bottom-i.top)}}function qe(t,e,i){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var n=0;n<t.rest.length;n++)if(t.rest[n]==e)return{map:t.measure.maps[n],cache:t.measure.caches[n]};for(var r=0;r<t.rest.length;r++)if(I(t.rest[r])>i)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function Ye(t,e){e=dt(e);var n=I(e),r=t.display.externalMeasured=new me(t.doc,e,n);r.lineN=n;var o=r.built=ce(t,r);return r.text=o.pre,i(t.display.lineMeasure,o.pre),r}function Ue(t,e,i,n){return Ve(t,Ke(t,e),i,n)}function Xe(t,e){if(e>=t.display.viewFrom&&e<t.display.viewTo)return t.display.view[Si(t,e)];var i=t.display.externalMeasured;return i&&e>=i.lineN&&e<i.lineN+i.size?i:void 0}function Ke(t,e){var i=I(e),n=Xe(t,i);n&&!n.text?n=null:n&&n.changes&&(ke(t,n,i,_i(t)),t.curOp.forceUpdate=!0),n||(n=Ye(t,e));var r=qe(n,e,i);return{line:e,view:n,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:!1}}function Ve(t,e,i,n,r){e.before&&(i=-1);var o,s=i+(n||"");return e.cache.hasOwnProperty(s)?o=e.cache[s]:(e.rect||(e.rect=e.view.text.getBoundingClientRect()),e.hasHeights||($e(t,e.view,e.rect),e.hasHeights=!0),o=Ze(t,e,i,n),o.bogus||(e.cache[s]=o)),{left:o.left,right:o.right,top:r?o.rtop:o.top,bottom:r?o.rbottom:o.bottom}}function Ge(t,e,i){for(var n,r,o,s,a,l,c=0;c<t.length;c+=3)if(a=t[c],l=t[c+1],e<a?(r=0,o=1,s="left"):e<l?(r=e-a,o=r+1):(c==t.length-3||e==l&&t[c+3]>e)&&(o=l-a,r=o-1,e>=l&&(s="right")),null!=r){if(n=t[c+2],a==l&&i==(n.insertLeft?"left":"right")&&(s=i),"left"==i&&0==r)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)n=t[(c-=3)+2],s="left";if("right"==i&&r==l-a)for(;c<t.length-3&&t[c+3]==t[c+4]&&!t[c+5].insertLeft;)n=t[(c+=3)+2],s="right";break}return{node:n,start:r,end:o,collapse:s,coverStart:a,coverEnd:l}}function Qe(t,e){var i=Ca;if("left"==e)for(var n=0;n<t.length&&(i=t[n]).left==i.right;n++);else for(var r=t.length-1;r>=0&&(i=t[r]).left==i.right;r--);return i}function Ze(t,e,i,n){var r,o=Ge(e.map,i,n),s=o.node,a=o.start,l=o.end,c=o.collapse;if(3==s.nodeType){for(var u=0;u<4;u++){for(;a&&k(e.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l<o.coverEnd&&k(e.line.text.charAt(o.coverStart+l));)++l;if(r=xs&&ks<9&&0==a&&l==o.coverEnd-o.coverStart?s.parentNode.getBoundingClientRect():Qe(zs(s,a,l).getClientRects(),n),r.left||r.right||0==a)break;l=a,a-=1,c="right"}xs&&ks<11&&(r=Je(t.display.measure,r))}else{a>0&&(c=n="right");var h;r=t.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==n?h.length-1:0]:s.getBoundingClientRect()}if(xs&&ks<9&&!a&&(!r||!r.left&&!r.right)){var d=s.parentNode.getClientRects()[0];r=d?{left:d.left,right:d.left+wi(t.display),top:d.top,bottom:d.bottom}:Ca}for(var p=r.top-e.rect.top,f=r.bottom-e.rect.top,g=(p+f)/2,m=e.view.measure.heights,v=0;v<m.length-1&&!(g<m[v]);v++);var y=v?m[v-1]:0,b=m[v],w={left:("right"==c?r.right:r.left)-e.rect.left,right:("left"==c?r.left:r.right)-e.rect.left,top:y,bottom:b};return r.left||r.right||(w.bogus=!0),t.options.singleCursorHeightPerLine||(w.rtop=p,w.rbottom=f),w}function Je(t,e){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Ft(t))return e;var i=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*i,right:e.right*i,top:e.top*n,bottom:e.bottom*n}}function ti(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e<t.rest.length;e++)t.measure.caches[e]={}}function ei(t){t.display.externalMeasure=null,e(t.display.lineMeasure);for(var i=0;i<t.display.view.length;i++)ti(t.display.view[i])}function ii(t){ei(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function ni(){return Ss&&Es?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ri(){return Ss&&Es?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function oi(t){var e=0;if(t.widgets)for(var i=0;i<t.widgets.length;++i)t.widgets[i].above&&(e+=Oe(t.widgets[i]));return e}function si(t,e,i,n,r){if(!r){var o=oi(e);i.top+=o,i.bottom+=o}if("line"==n)return i;n||(n="local");var s=bt(e);if("local"==n?s+=We(t.display):s-=t.display.viewOffset,"page"==n||"window"==n){var a=t.display.lineSpace.getBoundingClientRect();s+=a.top+("window"==n?0:ri());var l=a.left+("window"==n?0:ni());i.left+=l,i.right+=l}return i.top+=s,i.bottom+=s,i}function ai(t,e,i){if("div"==i)return e;var n=e.left,r=e.top;if("page"==i)n-=ni(),r-=ri();else if("local"==i||!i){var o=t.display.sizer.getBoundingClientRect();n+=o.left,r+=o.top}var s=t.display.lineSpace.getBoundingClientRect();return{left:n-s.left,top:r-s.top}}function li(t,e,i,n,r){return n||(n=D(t.doc,e.line)),si(t,n,Ue(t,n,e.ch,r),i)}function ci(t,e,i,n,r,o){function s(e,s){var a=Ve(t,r,e,s?"right":"left",o);return s?a.left=a.right:a.right=a.left,si(t,n,a,i)}function a(t,e,i){var n=l[e],r=1==n.level;return s(i?t-1:t,r!=i)}n=n||D(t.doc,e.line),r||(r=Ke(t,n));var l=Ct(n,t.doc.direction),c=e.ch,u=e.sticky;if(c>=n.text.length?(c=n.text.length,u="before"):c<=0&&(c=0,u="after"),!l)return s("before"==u?c-1:c,"before"==u);var h=kt(l,c,u),d=ia,p=a(c,h,"before"==u);return null!=d&&(p.other=a(c,d,"before"!=u)),p}function ui(t,e){var i=0;e=B(t.doc,e),t.options.lineWrapping||(i=wi(t.display)*e.ch);var n=D(t.doc,e.line),r=bt(n)+We(t.display);return{left:i,right:i,top:r,bottom:r+n.height}}function hi(t,e,i,n,r){var o=O(t,e,i);return o.xRel=r,n&&(o.outside=!0),o}function di(t,e,i){var n=t.doc;if(i+=t.display.viewOffset,i<0)return hi(n.first,0,null,!0,-1);var r=E(n,i),o=n.first+n.size-1;if(r>o)return hi(n.first+n.size-1,D(n,o).text.length,null,!0,1);e<0&&(e=0);for(var s=D(n,r);;){var a=mi(t,s,r,e,i),l=ut(s,a.ch+(a.xRel>0?1:0));if(!l)return a;var c=l.find(1);if(c.line==r)return c;s=D(n,r=c.line)}}function pi(t,e,i,n){n-=oi(e);var r=e.text.length,o=T(function(e){return Ve(t,i,e-1).bottom<=n},r,0);return r=T(function(e){return Ve(t,i,e).top>n},o,r),{begin:o,end:r}}function fi(t,e,i,n){i||(i=Ke(t,e));var r=si(t,e,Ve(t,i,n),"line").top;return pi(t,e,i,r)}function gi(t,e,i,n){return!(t.bottom<=i)&&(t.top>i||(n?t.left:t.right)>e)}function mi(t,e,i,n,r){r-=bt(e);var o=Ke(t,e),s=oi(e),a=0,l=e.text.length,c=!0,u=Ct(e,t.doc.direction);if(u){var h=(t.options.lineWrapping?yi:vi)(t,e,i,o,u,n,r);c=1!=h.level,a=c?h.from:h.to-1,l=c?h.to:h.from-1}var d,p,f=null,g=null,m=T(function(e){var i=Ve(t,o,e);return i.top+=s,i.bottom+=s,!!gi(i,n,r,!1)&&(i.top<=r&&i.left<=n&&(f=e,g=i),!0)},a,l),v=!1;if(g){var y=n-g.left<g.right-n,b=y==c;m=f+(b?0:1),p=b?"after":"before",d=y?g.left:g.right}else{c||m!=l&&m!=a||m++,p=0==m?"after":m==e.text.length?"before":Ve(t,o,m-(c?1:0)).bottom+s<=r==c?"after":"before";var w=ci(t,O(i,m,p),"line",e,o);d=w.left,v=r<w.top||r>=w.bottom}return m=C(e.text,m,1),hi(i,m,p,v,n-d)}function vi(t,e,i,n,r,o,s){var a=T(function(a){var l=r[a],c=1!=l.level;return gi(ci(t,O(i,c?l.to:l.from,c?"before":"after"),"line",e,n),o,s,!0)},0,r.length-1),l=r[a];if(a>0){var c=1!=l.level,u=ci(t,O(i,c?l.from:l.to,c?"after":"before"),"line",e,n);gi(u,o,s,!0)&&u.top>s&&(l=r[a-1])}return l}function yi(t,e,i,n,r,o,s){var a=pi(t,e,n,s),l=a.begin,c=a.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d<r.length;d++){var p=r[d];if(!(p.from>=c||p.to<=l)){var f=1!=p.level,g=Ve(t,n,f?Math.min(c,p.to)-1:Math.max(l,p.from)).right,m=g<o?o-g+1e9:g-o;(!u||h>m)&&(u=p,h=m)}}return u||(u=r[r.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function bi(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==ba){ba=n("pre");for(var r=0;r<49;++r)ba.appendChild(document.createTextNode("x")),ba.appendChild(n("br"));ba.appendChild(document.createTextNode("x"))}i(t.measure,ba);var o=ba.offsetHeight/50;return o>3&&(t.cachedTextHeight=o),e(t.measure),o||1}function wi(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=n("span","xxxxxxxxxx"),r=n("pre",[e]);i(t.measure,r);var o=e.getBoundingClientRect(),s=(o.right-o.left)/10;return s>2&&(t.cachedCharWidth=s),s||10}function _i(t){for(var e=t.display,i={},n={},r=e.gutters.clientLeft,o=e.gutters.firstChild,s=0;o;o=o.nextSibling,++s)i[t.options.gutters[s]]=o.offsetLeft+o.clientLeft+r,n[t.options.gutters[s]]=o.clientWidth;return{fixedPos:xi(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:e.wrapper.clientWidth}}function xi(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function ki(t){var e=bi(t.display),i=t.options.lineWrapping,n=i&&Math.max(5,t.display.scroller.clientWidth/wi(t.display)-3);return function(r){if(vt(t.doc,r))return 0;var o=0;if(r.widgets)for(var s=0;s<r.widgets.length;s++)r.widgets[s].height&&(o+=r.widgets[s].height);return i?o+(Math.ceil(r.text.length/n)||1)*e:o+e}}function Ci(t){var e=t.doc,i=ki(t);e.iter(function(t){var e=i(t);e!=t.height&&P(t,e)})}function Ti(t,e,i,n){var r=t.display;if(!i&&"true"==Ht(e).getAttribute("cm-not-content"))return null;var o,s,a=r.lineSpace.getBoundingClientRect();try{o=e.clientX-a.left,s=e.clientY-a.top}catch(e){return null}var l,c=di(t,o,s);if(n&&1==c.xRel&&(l=D(t.doc,c.line).text).length==c.ch){var u=h(l,l.length,t.options.tabSize)-l.length;c=O(c.line,Math.max(0,Math.round((o-Re(t.display).left)/wi(t.display))-u))}return c}function Si(t,e){if(e>=t.display.viewTo)return null;if(e-=t.display.viewFrom,e<0)return null;for(var i=t.display.view,n=0;n<i.length;n++)if(e-=i[n].size,e<0)return n}function Di(t){t.display.input.showSelection(t.display.input.prepareSelection())}function Mi(t,e){void 0===e&&(e=!0);for(var i=t.doc,n={},r=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),s=0;s<i.sel.ranges.length;s++)if(e||s!=i.sel.primIndex){var a=i.sel.ranges[s];if(!(a.from().line>=t.display.viewTo||a.to().line<t.display.viewFrom)){var l=a.empty();(l||t.options.showCursorWhenSelecting)&&Ai(t,a.head,r),l||Ii(t,a,o)}}return n}function Ai(t,e,i){var r=ci(t,e,"div",null,null,!t.options.singleCursorHeightPerLine),o=i.appendChild(n("div"," ","CodeMirror-cursor"));if(o.style.left=r.left+"px",o.style.top=r.top+"px",o.style.height=Math.max(0,r.bottom-r.top)*t.options.cursorHeight+"px",r.other){var s=i.appendChild(n("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=r.other.left+"px",s.style.top=r.other.top+"px",s.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Pi(t,e){return t.top-e.top||t.left-e.left}function Ii(t,e,i){function r(t,e,i,r){e<0&&(e=0),e=Math.round(e),r=Math.round(r),l.appendChild(n("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n                             top: "+e+"px; width: "+(null==i?h-t:i)+"px;\n                             height: "+(r-e)+"px"))}function o(e,i,n){function o(i,n){return li(t,O(e,i),"div",p,n)}function s(e,i,n){var r=fi(t,p,null,e),s="ltr"==i==("after"==n)?"left":"right",a="after"==n?r.begin:r.end-(/\s/.test(p.text.charAt(r.end-1))?2:1);return o(a,s)[s]}var l,c,p=D(a,e),f=p.text.length,g=Ct(p,a.direction);return xt(g,i||0,null==n?f:n,function(t,e,a,p){var m="ltr"==a,v=o(t,m?"left":"right"),y=o(e-1,m?"right":"left"),b=null==i&&0==t,w=null==n&&e==f,_=0==p,x=!g||p==g.length-1;if(y.top-v.top<=3){var k=(d?b:w)&&_,C=(d?w:b)&&x,T=k?u:(m?v:y).left,S=C?h:(m?y:v).right;r(T,v.top,S-T,v.bottom)}else{var D,M,A,P;m?(D=d&&b&&_?u:v.left,M=d?h:s(t,a,"before"),A=d?u:s(e,a,"after"),P=d&&w&&x?h:y.right):(D=d?s(t,a,"before"):u,M=!d&&b&&_?h:v.right,A=!d&&w&&x?u:y.left,P=d?s(e,a,"after"):h),r(D,v.top,M-D,v.bottom),v.bottom<y.top&&r(u,v.bottom,null,y.top),r(A,y.top,P-A,y.bottom)}(!l||Pi(v,l)<0)&&(l=v),Pi(y,l)<0&&(l=y),(!c||Pi(v,c)<0)&&(c=v),Pi(y,c)<0&&(c=y)}),{start:l,end:c}}var s=t.display,a=t.doc,l=document.createDocumentFragment(),c=Re(t.display),u=c.left,h=Math.max(s.sizerWidth,je(t)-s.sizer.offsetLeft)-c.right,d="ltr"==a.direction,p=e.from(),f=e.to();if(p.line==f.line)o(p.line,p.ch,f.ch);else{var g=D(a,p.line),m=D(a,f.line),v=dt(g)==dt(m),y=o(p.line,p.ch,v?g.text.length+1:null).end,b=o(f.line,v?0:null,f.ch).start;v&&(y.top<b.top-2?(r(y.right,y.top,null,y.bottom),r(u,b.top,b.left,b.bottom)):r(y.right,y.top,b.left-y.right,y.bottom)),y.bottom<b.top&&r(u,y.bottom,null,b.top)}i.appendChild(l)}function Ei(t){if(t.state.focused){var e=t.display;clearInterval(e.blinker);var i=!0;e.cursorDiv.style.visibility="",t.options.cursorBlinkRate>0?e.blinker=setInterval(function(){return e.cursorDiv.style.visibility=(i=!i)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Li(t){t.state.focused||(t.display.input.focus(),Oi(t))}function Ni(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,Hi(t))},100)}function Oi(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Dt(t,"focus",t,e),t.state.focused=!0,a(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),Cs&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Ei(t))}function Hi(t,e){t.state.delayingBlurEvent||(t.state.focused&&(Dt(t,"blur",t,e),t.state.focused=!1,js(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function Wi(t){for(var e=t.display,i=e.lineDiv.offsetTop,n=0;n<e.view.length;n++){var r=e.view[n],o=t.options.lineWrapping,s=void 0,a=0;if(!r.hidden){if(xs&&ks<8){var l=r.node.offsetTop+r.node.offsetHeight;s=l-i,i=l}else{var c=r.node.getBoundingClientRect();s=c.bottom-c.top,!o&&r.text.firstChild&&(a=r.text.firstChild.getBoundingClientRect().right-c.left-1)}var u=r.line.height-s;if(s<2&&(s=bi(e)),(u>.005||u<-.005)&&(P(r.line,s),zi(r.line),r.rest))for(var h=0;h<r.rest.length;h++)zi(r.rest[h]);if(a>t.display.sizerWidth){var d=Math.ceil(a/wi(t.display));d>t.display.maxLineLength&&(t.display.maxLineLength=d,t.display.maxLine=r.line,t.display.maxLineChanged=!0)}}}}function zi(t){if(t.widgets)for(var e=0;e<t.widgets.length;++e){var i=t.widgets[e],n=i.node.parentNode;n&&(i.height=n.offsetHeight)}}function Ri(t,e,i){var n=i&&null!=i.top?Math.max(0,i.top):t.scroller.scrollTop;n=Math.floor(n-We(t));var r=i&&null!=i.bottom?i.bottom:n+t.wrapper.clientHeight,o=E(e,n),s=E(e,r);if(i&&i.ensure){var a=i.ensure.from.line,l=i.ensure.to.line;a<o?(o=a,s=E(e,bt(D(e,a))+t.wrapper.clientHeight)):Math.min(l,e.lastLine())>=s&&(o=E(e,bt(D(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Fi(t){var e=t.display,i=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var n=xi(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=n+"px",s=0;s<i.length;s++)if(!i[s].hidden){t.options.fixedGutter&&(i[s].gutter&&(i[s].gutter.style.left=o),i[s].gutterBackground&&(i[s].gutterBackground.style.left=o));var a=i[s].alignable;if(a)for(var l=0;l<a.length;l++)a[l].style.left=o}t.options.fixedGutter&&(e.gutters.style.left=n+r+"px")}}function ji(t){if(!t.options.lineNumbers)return!1;var e=t.doc,i=N(t.options,e.first+e.size-1),r=t.display;if(i.length!=r.lineNumChars){var o=r.measure.appendChild(n("div",[n("div",i)],"CodeMirror-linenumber CodeMirror-gutter-elt")),s=o.firstChild.offsetWidth,a=o.offsetWidth-s;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(s,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?i.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",Ln(t),!0}return!1}function Bi(t,e){if(!Mt(t,"scrollCursorIntoView")){var i=t.display,r=i.sizer.getBoundingClientRect(),o=null;if(e.top+r.top<0?o=!0:e.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!Ps){var s=n("div","​",null,"position: absolute;\n                         top: "+(e.top-i.viewOffset-We(t.display))+"px;\n                         height: "+(e.bottom-e.top+Fe(t)+i.barHeight)+"px;\n                         left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(o),t.display.lineSpace.removeChild(s)}}}function $i(t,e,i,n){null==n&&(n=0);var r;t.options.lineWrapping||e!=i||(e=e.ch?O(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e,i="before"==e.sticky?O(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var s=!1,a=ci(t,e),l=i&&i!=e?ci(t,i):a;r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-n,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+n};var c=Yi(t,r),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Zi(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(tn(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return r}function qi(t,e){var i=Yi(t,e);null!=i.scrollTop&&Zi(t,i.scrollTop),null!=i.scrollLeft&&tn(t,i.scrollLeft)}function Yi(t,e){var i=t.display,n=bi(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:i.scroller.scrollTop,o=Be(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+ze(i),l=e.top<n,c=e.bottom>a-n;if(e.top<r)s.scrollTop=l?0:e.top;else if(e.bottom>r+o){var u=Math.min(e.top,(c?a:e.bottom)-o);u!=r&&(s.scrollTop=u)}var h=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:i.scroller.scrollLeft,d=je(t)-(t.options.fixedGutter?i.gutters.offsetWidth:0),p=e.right-e.left>d;return p&&(e.right=e.left+d),e.left<10?s.scrollLeft=0:e.left<h?s.scrollLeft=Math.max(0,e.left-(p?0:10)):e.right>d+h-3&&(s.scrollLeft=e.right+(p?0:10)-d),s}function Ui(t,e){null!=e&&(Gi(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Xi(t){Gi(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Ki(t,e,i){null==e&&null==i||Gi(t),null!=e&&(t.curOp.scrollLeft=e),null!=i&&(t.curOp.scrollTop=i)}function Vi(t,e){Gi(t),t.curOp.scrollToPos=e}function Gi(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;var i=ui(t,e.from),n=ui(t,e.to);
Qi(t,i,n,e.margin)}}function Qi(t,e,i,n){var r=Yi(t,{left:Math.min(e.left,i.left),top:Math.min(e.top,i.top)-n,right:Math.max(e.right,i.right),bottom:Math.max(e.bottom,i.bottom)+n});Ki(t,r.scrollLeft,r.scrollTop)}function Zi(t,e){Math.abs(t.doc.scrollTop-e)<2||(ys||In(t,{top:e}),Ji(t,e,!0),ys&&In(t),Cn(t,100))}function Ji(t,e,i){e=Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e),(t.display.scroller.scrollTop!=e||i)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function tn(t,e,i,n){e=Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth),(i?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!n||(t.doc.scrollLeft=e,Fi(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function en(t){var e=t.display,i=e.gutters.offsetWidth,n=Math.round(t.doc.height+ze(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?i:0,docHeight:n,scrollHeight:n+Fe(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:i}}function nn(t,e){e||(e=en(t));var i=t.display.barWidth,n=t.display.barHeight;rn(t,e);for(var r=0;r<4&&i!=t.display.barWidth||n!=t.display.barHeight;r++)i!=t.display.barWidth&&t.options.lineWrapping&&Wi(t),rn(t,en(t)),i=t.display.barWidth,n=t.display.barHeight}function rn(t,e){var i=t.display,n=i.scrollbars.update(e);i.sizer.style.paddingRight=(i.barWidth=n.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=n.bottom)+"px",i.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=n.bottom+"px",i.scrollbarFiller.style.width=n.right+"px"):i.scrollbarFiller.style.display="",n.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=n.bottom+"px",i.gutterFiller.style.width=e.gutterWidth+"px"):i.gutterFiller.style.display=""}function on(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&js(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Da[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),oa(e,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,i){"horizontal"==i?tn(t,e):Zi(t,e)},t),t.display.scrollbars.addClass&&a(t.display.wrapper,t.display.scrollbars.addClass)}function sn(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ma},ye(t.curOp)}function an(t){var e=t.curOp;e&&we(e,function(t){for(var e=0;e<t.ops.length;e++)t.ops[e].cm.curOp=null;ln(t)})}function ln(t){for(var e=t.ops,i=0;i<e.length;i++)cn(e[i]);for(var n=0;n<e.length;n++)un(e[n]);for(var r=0;r<e.length;r++)hn(e[r]);for(var o=0;o<e.length;o++)dn(e[o]);for(var s=0;s<e.length;s++)pn(e[s])}function cn(t){var e=t.cm,i=e.display;Sn(e),t.updateMaxLine&&_t(e),t.mustUpdate=t.viewChanged||t.forceUpdate||null!=t.scrollTop||t.scrollToPos&&(t.scrollToPos.from.line<i.viewFrom||t.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new Aa(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function un(t){t.updatedDisplay=t.mustUpdate&&An(t.cm,t.update)}function hn(t){var e=t.cm,i=e.display;t.updatedDisplay&&Wi(e),t.barMeasure=en(e),i.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ue(e,i.maxLine,i.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+t.adjustWidthTo+Fe(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+t.adjustWidthTo-je(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=i.input.prepareSelection())}function dn(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<e.doc.scrollLeft&&tn(e,Math.min(e.display.scroller.scrollLeft,t.maxScrollLeft),!0),e.display.maxLineChanged=!1);var i=t.focus&&t.focus==s();t.preparedSelection&&e.display.input.showSelection(t.preparedSelection,i),(t.updatedDisplay||t.startHeight!=e.doc.height)&&nn(e,t.barMeasure),t.updatedDisplay&&Nn(e,t.barMeasure),t.selectionChanged&&Ei(e),e.state.focused&&t.updateInput&&e.display.input.reset(t.typing),i&&Li(t.cm)}function pn(t){var e=t.cm,i=e.display,n=e.doc;if(t.updatedDisplay&&Pn(e,t.update),null==i.wheelStartX||null==t.scrollTop&&null==t.scrollLeft&&!t.scrollToPos||(i.wheelStartX=i.wheelStartY=null),null!=t.scrollTop&&Ji(e,t.scrollTop,t.forceScroll),null!=t.scrollLeft&&tn(e,t.scrollLeft,!0,!0),t.scrollToPos){var r=$i(e,B(n,t.scrollToPos.from),B(n,t.scrollToPos.to),t.scrollToPos.margin);Bi(e,r)}var o=t.maybeHiddenMarkers,s=t.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||Dt(o[a],"hide");if(s)for(var l=0;l<s.length;++l)s[l].lines.length&&Dt(s[l],"unhide");i.wrapper.offsetHeight&&(n.scrollTop=e.display.scroller.scrollTop),t.changeObjs&&Dt(e,"changes",e,t.changeObjs),t.update&&t.update.finish()}function fn(t,e){if(t.curOp)return e();sn(t);try{return e()}finally{an(t)}}function gn(t,e){return function(){if(t.curOp)return e.apply(t,arguments);sn(t);try{return e.apply(t,arguments)}finally{an(t)}}}function mn(t){return function(){if(this.curOp)return t.apply(this,arguments);sn(this);try{return t.apply(this,arguments)}finally{an(this)}}}function vn(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);sn(e);try{return t.apply(this,arguments)}finally{an(e)}}}function yn(t,e,i,n){null==e&&(e=t.doc.first),null==i&&(i=t.doc.first+t.doc.size),n||(n=0);var r=t.display;if(n&&i<r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>e)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)ea&&gt(t.doc,e)<r.viewTo&&wn(t);else if(i<=r.viewFrom)ea&&mt(t.doc,i+n)>r.viewFrom?wn(t):(r.viewFrom+=n,r.viewTo+=n);else if(e<=r.viewFrom&&i>=r.viewTo)wn(t);else if(e<=r.viewFrom){var o=_n(t,i,i+n,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=n):wn(t)}else if(i>=r.viewTo){var s=_n(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):wn(t)}else{var a=_n(t,e,e,-1),l=_n(t,i,i+n,1);a&&l?(r.view=r.view.slice(0,a.index).concat(ve(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=n):wn(t)}var c=r.externalMeasured;c&&(i<c.lineN?c.lineN+=n:e<c.lineN+c.size&&(r.externalMeasured=null))}function bn(t,e,i){t.curOp.viewChanged=!0;var n=t.display,r=t.display.externalMeasured;if(r&&e>=r.lineN&&e<r.lineN+r.size&&(n.externalMeasured=null),!(e<n.viewFrom||e>=n.viewTo)){var o=n.view[Si(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);d(s,i)==-1&&s.push(i)}}}function wn(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function _n(t,e,i,n){var r,o=Si(t,e),s=t.display.view;if(!ea||i==t.doc.first+t.doc.size)return{index:o,lineN:i};for(var a=t.display.viewFrom,l=0;l<o;l++)a+=s[l].size;if(a!=e){if(n>0){if(o==s.length-1)return null;r=a+s[o].size-e,o++}else r=a-e;e+=r,i+=r}for(;gt(t.doc,i)!=i;){if(o==(n<0?0:s.length-1))return null;i+=n*s[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:i}}function xn(t,e,i){var n=t.display,r=n.view;0==r.length||e>=n.viewTo||i<=n.viewFrom?(n.view=ve(t,e,i),n.viewFrom=e):(n.viewFrom>e?n.view=ve(t,e,n.viewFrom).concat(n.view):n.viewFrom<e&&(n.view=n.view.slice(Si(t,e))),n.viewFrom=e,n.viewTo<i?n.view=n.view.concat(ve(t,n.viewTo,i)):n.viewTo>i&&(n.view=n.view.slice(0,Si(t,i)))),n.viewTo=i}function kn(t){for(var e=t.display.view,i=0,n=0;n<e.length;n++){var r=e[n];r.hidden||r.node&&!r.changes||++i}return i}function Cn(t,e){t.doc.highlightFrontier<t.display.viewTo&&t.state.highlight.set(e,c(Tn,t))}function Tn(t){var e=t.doc;if(!(e.highlightFrontier>=t.display.viewTo)){var i=+new Date+t.options.workTime,n=Qt(t,e.highlightFrontier),r=[];e.iter(n.line,Math.min(e.first+e.size,t.display.viewTo+500),function(o){if(n.line>=t.display.viewFrom){var s=o.styles,a=o.text.length>t.options.maxHighlightLength?Ut(e.mode,n.state):null,l=Vt(t,o,n,!0);a&&(n.state=a),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var h=!s||s.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!h&&d<s.length;++d)h=s[d]!=o.styles[d];h&&r.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=t.options.maxHighlightLength&&Zt(t,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>i)return Cn(t,t.options.workDelay),!0}),e.highlightFrontier=n.line,e.modeFrontier=Math.max(e.modeFrontier,n.line),r.length&&fn(t,function(){for(var e=0;e<r.length;e++)bn(t,r[e],"text")})}}function Sn(t){var e=t.display;!e.scrollbarsClipped&&e.scroller.offsetWidth&&(e.nativeBarWidth=e.scroller.offsetWidth-e.scroller.clientWidth,e.heightForcer.style.height=Fe(t)+"px",e.sizer.style.marginBottom=-e.nativeBarWidth+"px",e.sizer.style.borderRightWidth=Fe(t)+"px",e.scrollbarsClipped=!0)}function Dn(t){if(t.hasFocus())return null;var e=s();if(!e||!o(t.display.lineDiv,e))return null;var i={activeElt:e};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&o(t.display.lineDiv,n.anchorNode)&&(i.anchorNode=n.anchorNode,i.anchorOffset=n.anchorOffset,i.focusNode=n.focusNode,i.focusOffset=n.focusOffset)}return i}function Mn(t){if(t&&t.activeElt&&t.activeElt!=s()&&(t.activeElt.focus(),t.anchorNode&&o(document.body,t.anchorNode)&&o(document.body,t.focusNode))){var e=window.getSelection(),i=document.createRange();i.setEnd(t.anchorNode,t.anchorOffset),i.collapse(!1),e.removeAllRanges(),e.addRange(i),e.extend(t.focusNode,t.focusOffset)}}function An(t,i){var n=t.display,r=t.doc;if(i.editorIsHidden)return wn(t),!1;if(!i.force&&i.visible.from>=n.viewFrom&&i.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==kn(t))return!1;ji(t)&&(wn(t),i.dims=_i(t));var o=r.first+r.size,s=Math.max(i.visible.from-t.options.viewportMargin,r.first),a=Math.min(o,i.visible.to+t.options.viewportMargin);n.viewFrom<s&&s-n.viewFrom<20&&(s=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(o,n.viewTo)),ea&&(s=gt(t.doc,s),a=mt(t.doc,a));var l=s!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=i.wrapperHeight||n.lastWrapWidth!=i.wrapperWidth;xn(t,s,a),n.viewOffset=bt(D(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var c=kn(t);if(!l&&0==c&&!i.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Dn(t);return c>4&&(n.lineDiv.style.display="none"),En(t,n.updateLineNumbers,i.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Mn(u),e(n.cursorDiv),e(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=i.wrapperHeight,n.lastWrapWidth=i.wrapperWidth,Cn(t,400)),n.updateLineNumbers=null,!0}function Pn(t,e){for(var i=e.viewport,n=!0;(n&&t.options.lineWrapping&&e.oldDisplayWidth!=je(t)||(i&&null!=i.top&&(i={top:Math.min(t.doc.height+ze(t.display)-Be(t),i.top)}),e.visible=Ri(t.display,t.doc,i),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&An(t,e);n=!1){Wi(t);var r=en(t);Di(t),nn(t,r),Nn(t,r),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function In(t,e){var i=new Aa(t,e);if(An(t,i)){Wi(t),Pn(t,i);var n=en(t);Di(t),nn(t,n),Nn(t,n),i.finish()}}function En(t,i,n){function r(e){var i=e.nextSibling;return Cs&&Ns&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),i}for(var o=t.display,s=t.options.lineNumbers,a=o.lineDiv,l=a.firstChild,c=o.view,u=o.viewFrom,h=0;h<c.length;h++){var p=c[h];if(p.hidden);else if(p.node&&p.node.parentNode==a){for(;l!=p.node;)l=r(l);var f=s&&null!=i&&i<=u&&p.lineNumber;p.changes&&(d(p.changes,"gutter")>-1&&(f=!1),ke(t,p,u,n)),f&&(e(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(N(t.options,u)))),l=p.node.nextSibling}else{var g=Ie(t,p,u,n);a.insertBefore(g,l)}u+=p.size}for(;l;)l=r(l)}function Ln(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function Nn(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Fe(t)+"px"}function On(t){var i=t.display.gutters,r=t.options.gutters;e(i);for(var o=0;o<r.length;++o){var s=r[o],a=i.appendChild(n("div",null,"CodeMirror-gutter "+s));"CodeMirror-linenumbers"==s&&(t.display.lineGutter=a,a.style.width=(t.display.lineNumWidth||1)+"px")}i.style.display=o?"":"none",Ln(t)}function Hn(t){var e=d(t.gutters,"CodeMirror-linenumbers");e==-1&&t.lineNumbers?t.gutters=t.gutters.concat(["CodeMirror-linenumbers"]):e>-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function Wn(t){var e=t.wheelDeltaX,i=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==i&&t.detail&&t.axis==t.VERTICAL_AXIS?i=t.detail:null==i&&(i=t.wheelDelta),{x:e,y:i}}function zn(t){var e=Wn(t);return e.x*=Ia,e.y*=Ia,e}function Rn(t,e){var i=Wn(e),n=i.x,r=i.y,o=t.display,s=o.scroller,a=s.scrollWidth>s.clientWidth,l=s.scrollHeight>s.clientHeight;if(n&&a||r&&l){if(r&&Ns&&Cs)t:for(var c=e.target,u=o.view;c!=s;c=c.parentNode)for(var h=0;h<u.length;h++)if(u[h].node==c){t.display.currentWheelTarget=c;break t}if(n&&!ys&&!Ds&&null!=Ia)return r&&l&&Zi(t,Math.max(0,s.scrollTop+r*Ia)),tn(t,Math.max(0,s.scrollLeft+n*Ia)),(!r||r&&l)&&Et(e),void(o.wheelStartX=null);if(r&&null!=Ia){var d=r*Ia,p=t.doc.scrollTop,f=p+o.wrapper.clientHeight;d<0?p=Math.max(0,p+d-50):f=Math.min(t.doc.height,f+d+50),In(t,{top:p,bottom:f})}Pa<20&&(null==o.wheelStartX?(o.wheelStartX=s.scrollLeft,o.wheelStartY=s.scrollTop,o.wheelDX=n,o.wheelDY=r,setTimeout(function(){if(null!=o.wheelStartX){var t=s.scrollLeft-o.wheelStartX,e=s.scrollTop-o.wheelStartY,i=e&&o.wheelDY&&e/o.wheelDY||t&&o.wheelDX&&t/o.wheelDX;o.wheelStartX=o.wheelStartY=null,i&&(Ia=(Ia*Pa+i)/(Pa+1),++Pa)}},200)):(o.wheelDX+=n,o.wheelDY+=r))}}function Fn(t,e,i){var n=t&&t.options.selectionsMayTouch,r=e[i];e.sort(function(t,e){return H(t.from(),e.from())}),i=d(e,r);for(var o=1;o<e.length;o++){var s=e[o],a=e[o-1],l=H(a.to(),s.from());if(n&&!s.empty()?l>0:l>=0){var c=F(a.from(),s.from()),u=R(a.to(),s.to()),h=a.empty()?s.from()==s.head:a.from()==a.head;o<=i&&--i,e.splice(--o,2,new La(h?u:c,h?c:u))}}return new Ea(e,i)}function jn(t,e){return new Ea([new La(t,e||t)],0)}function Bn(t){return t.text?O(t.from.line+t.text.length-1,g(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function $n(t,e){if(H(t,e.from)<0)return t;if(H(t,e.to)<=0)return Bn(e);var i=t.line+e.text.length-(e.to.line-e.from.line)-1,n=t.ch;return t.line==e.to.line&&(n+=Bn(e).ch-e.to.ch),O(i,n)}function qn(t,e){for(var i=[],n=0;n<t.sel.ranges.length;n++){var r=t.sel.ranges[n];i.push(new La($n(r.anchor,e),$n(r.head,e)))}return Fn(t.cm,i,t.sel.primIndex)}function Yn(t,e,i){return t.line==e.line?O(i.line,t.ch-e.ch+i.ch):O(i.line+(t.line-e.line),t.ch)}function Un(t,e,i){for(var n=[],r=O(t.first,0),o=r,s=0;s<e.length;s++){var a=e[s],l=Yn(a.from,r,o),c=Yn(Bn(a),r,o);if(r=a.to,o=c,"around"==i){var u=t.sel.ranges[s],h=H(u.head,u.anchor)<0;n[s]=new La(h?c:l,h?l:c)}else n[s]=new La(l,l)}return new Ea(n,t.sel.primIndex)}function Xn(t){t.doc.mode=qt(t.options,t.doc.modeOption),Kn(t)}function Kn(t){t.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),t.doc.modeFrontier=t.doc.highlightFrontier=t.doc.first,Cn(t,100),t.state.modeGen++,t.curOp&&yn(t)}function Vn(t,e){return 0==e.from.ch&&0==e.to.ch&&""==g(e.text)&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function Gn(t,e,i,n){function r(t){return i?i[t]:null}function o(t,i,r){se(t,i,r,n),_e(t,"change",t,e)}function s(t,e){for(var i=[],o=t;o<e;++o)i.push(new ya(c[o],r(o),n));return i}var a=e.from,l=e.to,c=e.text,u=D(t,a.line),h=D(t,l.line),d=g(c),p=r(c.length-1),f=l.line-a.line;if(e.full)t.insert(0,s(0,c.length)),t.remove(c.length,t.size-c.length);else if(Vn(t,e)){var m=s(0,c.length-1);o(h,h.text,p),f&&t.remove(a.line,f),m.length&&t.insert(a.line,m)}else if(u==h)if(1==c.length)o(u,u.text.slice(0,a.ch)+d+u.text.slice(l.ch),p);else{var v=s(1,c.length-1);v.push(new ya(d+u.text.slice(l.ch),p,n)),o(u,u.text.slice(0,a.ch)+c[0],r(0)),t.insert(a.line+1,v)}else if(1==c.length)o(u,u.text.slice(0,a.ch)+c[0]+h.text.slice(l.ch),r(0)),t.remove(a.line+1,f);else{o(u,u.text.slice(0,a.ch)+c[0],r(0)),o(h,d+h.text.slice(l.ch),p);var y=s(1,c.length-1);f>1&&t.remove(a.line+1,f-1),t.insert(a.line+1,y)}_e(t,"change",t,e)}function Qn(t,e,i){function n(t,r,o){if(t.linked)for(var s=0;s<t.linked.length;++s){var a=t.linked[s];if(a.doc!=r){var l=o&&a.sharedHist;i&&!l||(e(a.doc,l),n(a.doc,t,l))}}}n(t,null,!0)}function Zn(t,e){if(e.cm)throw new Error("This document is already in use.");t.doc=e,e.cm=t,Ci(t),Xn(t),Jn(t),t.options.lineWrapping||_t(t),t.options.mode=e.modeOption,yn(t)}function Jn(t){("rtl"==t.doc.direction?a:js)(t.display.lineDiv,"CodeMirror-rtl")}function tr(t){fn(t,function(){Jn(t),yn(t)})}function er(t){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=t||1}function ir(t,e){var i={from:z(e.from),to:Bn(e),text:M(t,e.from,e.to)};return cr(t,i,e.from.line,e.to.line+1),Qn(t,function(t){return cr(t,i,e.from.line,e.to.line+1)},!0),i}function nr(t){for(;t.length;){var e=g(t);if(!e.ranges)break;t.pop()}}function rr(t,e){return e?(nr(t.done),g(t.done)):t.done.length&&!g(t.done).ranges?g(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),g(t.done)):void 0}function or(t,e,i,n){var r=t.history;r.undone.length=0;var o,s,a=+new Date;if((r.lastOp==n||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&r.lastModTime>a-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=rr(r,r.lastOp==n)))s=g(o.changes),0==H(e.from,e.to)&&0==H(e.from,s.to)?s.to=Bn(e):o.changes.push(ir(t,e));else{var l=g(r.done);for(l&&l.ranges||lr(t.sel,r.done),o={changes:[ir(t,e)],generation:r.generation},r.done.push(o);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(i),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=a,r.lastOp=r.lastSelOp=n,r.lastOrigin=r.lastSelOrigin=e.origin,s||Dt(t,"historyAdded")}function sr(t,e,i,n){var r=e.charAt(0);return"*"==r||"+"==r&&i.ranges.length==n.ranges.length&&i.somethingSelected()==n.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function ar(t,e,i,n){var r=t.history,o=n&&n.origin;i==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||sr(t,o,g(r.done),e))?r.done[r.done.length-1]=e:lr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=i,n&&n.clearRedo!==!1&&nr(r.undone)}function lr(t,e){var i=g(e);i&&i.ranges&&i.equals(t)||e.push(t)}function cr(t,e,i,n){var r=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,i),Math.min(t.first+t.size,n),function(i){i.markedSpans&&((r||(r=e["spans_"+t.id]={}))[o]=i.markedSpans),++o})}function ur(t){if(!t)return null;for(var e,i=0;i<t.length;++i)t[i].marker.explicitlyCleared?e||(e=t.slice(0,i)):e&&e.push(t[i]);return e?e.length?e:null:t}function hr(t,e){var i=e["spans_"+t.id];if(!i)return null;for(var n=[],r=0;r<e.text.length;++r)n.push(ur(i[r]));return n}function dr(t,e){var i=hr(t,e),n=J(t,e);if(!i)return n;if(!n)return i;for(var r=0;r<i.length;++r){var o=i[r],s=n[r];if(o&&s)t:for(var a=0;a<s.length;++a){for(var l=s[a],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue t;o.push(l)}else s&&(i[r]=s)}return i}function pr(t,e,i){for(var n=[],r=0;r<t.length;++r){var o=t[r];if(o.ranges)n.push(i?Ea.prototype.deepCopy.call(o):o);else{var s=o.changes,a=[];n.push({changes:a});for(var l=0;l<s.length;++l){var c=s[l],u=void 0;if(a.push({from:c.from,to:c.to,text:c.text}),e)for(var h in c)(u=h.match(/^spans_(\d+)$/))&&d(e,Number(u[1]))>-1&&(g(a)[h]=c[h],delete c[h])}}}return n}function fr(t,e,i,n){if(n){var r=t.anchor;if(i){var o=H(e,r)<0;o!=H(i,r)<0?(r=e,e=i):o!=H(e,i)<0&&(e=i)}return new La(r,e)}return new La(i||e,e)}function gr(t,e,i,n,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),_r(t,new Ea([fr(t.sel.primary(),e,i,r)],0),n)}function mr(t,e,i){for(var n=[],r=t.cm&&(t.cm.display.shift||t.extend),o=0;o<t.sel.ranges.length;o++)n[o]=fr(t.sel.ranges[o],e[o],null,r);var s=Fn(t.cm,n,t.sel.primIndex);_r(t,s,i)}function vr(t,e,i,n){var r=t.sel.ranges.slice(0);r[e]=i,_r(t,Fn(t.cm,r,t.sel.primIndex),n)}function yr(t,e,i,n){_r(t,jn(e,i),n)}function br(t,e,i){var n={ranges:e.ranges,update:function(e){var i=this;this.ranges=[];for(var n=0;n<e.length;n++)i.ranges[n]=new La(B(t,e[n].anchor),B(t,e[n].head))},origin:i&&i.origin};return Dt(t,"beforeSelectionChange",t,n),t.cm&&Dt(t.cm,"beforeSelectionChange",t.cm,n),n.ranges!=e.ranges?Fn(t.cm,n.ranges,n.ranges.length-1):e}function wr(t,e,i){var n=t.history.done,r=g(n);r&&r.ranges?(n[n.length-1]=e,xr(t,e,i)):_r(t,e,i)}function _r(t,e,i){xr(t,e,i),ar(t,t.sel,t.cm?t.cm.curOp.id:NaN,i)}function xr(t,e,i){(Pt(t,"beforeSelectionChange")||t.cm&&Pt(t.cm,"beforeSelectionChange"))&&(e=br(t,e,i));var n=i&&i.bias||(H(e.primary().head,t.sel.primary().head)<0?-1:1);kr(t,Tr(t,e,n,!0)),i&&i.scroll===!1||!t.cm||Xi(t.cm)}function kr(t,e){e.equals(t.sel)||(t.sel=e,t.cm&&(t.cm.curOp.updateInput=1,t.cm.curOp.selectionChanged=!0,At(t.cm)),_e(t,"cursorActivity",t))}function Cr(t){kr(t,Tr(t,t.sel,null,!1))}function Tr(t,e,i,n){for(var r,o=0;o<e.ranges.length;o++){var s=e.ranges[o],a=e.ranges.length==t.sel.ranges.length&&t.sel.ranges[o],l=Dr(t,s.anchor,a&&a.anchor,i,n),c=Dr(t,s.head,a&&a.head,i,n);(r||l!=s.anchor||c!=s.head)&&(r||(r=e.ranges.slice(0,o)),r[o]=new La(l,c))}return r?Fn(t.cm,r,e.primIndex):e}function Sr(t,e,i,n,r){var o=D(t,e.line);if(o.markedSpans)for(var s=0;s<o.markedSpans.length;++s){var a=o.markedSpans[s],l=a.marker;if((null==a.from||(l.inclusiveLeft?a.from<=e.ch:a.from<e.ch))&&(null==a.to||(l.inclusiveRight?a.to>=e.ch:a.to>e.ch))){if(r&&(Dt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(i){var c=l.find(n<0?1:-1),u=void 0;if((n<0?l.inclusiveRight:l.inclusiveLeft)&&(c=Mr(t,c,-n,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=H(c,i))&&(n<0?u<0:u>0))return Sr(t,c,e,n,r)}var h=l.find(n<0?-1:1);return(n<0?l.inclusiveLeft:l.inclusiveRight)&&(h=Mr(t,h,n,h.line==e.line?o:null)),h?Sr(t,h,e,n,r):null}}return e}function Dr(t,e,i,n,r){var o=n||1,s=Sr(t,e,i,o,r)||!r&&Sr(t,e,i,o,!0)||Sr(t,e,i,-o,r)||!r&&Sr(t,e,i,-o,!0);return s?s:(t.cantEdit=!0,O(t.first,0))}function Mr(t,e,i,n){return i<0&&0==e.ch?e.line>t.first?B(t,O(e.line-1)):null:i>0&&e.ch==(n||D(t,e.line)).text.length?e.line<t.first+t.size-1?O(e.line+1,0):null:new O(e.line,e.ch+i)}function Ar(t){t.setSelection(O(t.firstLine(),0),O(t.lastLine()),Ks)}function Pr(t,e,i){var n={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){return n.canceled=!0}};return i&&(n.update=function(e,i,r,o){e&&(n.from=B(t,e)),i&&(n.to=B(t,i)),r&&(n.text=r),void 0!==o&&(n.origin=o)}),Dt(t,"beforeChange",t,n),t.cm&&Dt(t.cm,"beforeChange",t.cm,n),n.canceled?(t.cm&&(t.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Ir(t,e,i){if(t.cm){if(!t.cm.curOp)return gn(t.cm,Ir)(t,e,i);if(t.cm.state.suppressEdits)return}if(!(Pt(t,"beforeChange")||t.cm&&Pt(t.cm,"beforeChange"))||(e=Pr(t,e,!0))){var n=ta&&!i&&et(t,e.from,e.to);if(n)for(var r=n.length-1;r>=0;--r)Er(t,{from:n[r].from,to:n[r].to,text:r?[""]:e.text,origin:e.origin});else Er(t,e)}}function Er(t,e){if(1!=e.text.length||""!=e.text[0]||0!=H(e.from,e.to)){var i=qn(t,e);or(t,e,i,t.cm?t.cm.curOp.id:NaN),Or(t,e,i,J(t,e));var n=[];Qn(t,function(t,i){i||d(n,t.history)!=-1||(Fr(t.history,e),n.push(t.history)),Or(t,e,null,J(t,e))})}}function Lr(t,e,i){var n=t.cm&&t.cm.state.suppressEdits;if(!n||i){for(var r,o=t.history,s=t.sel,a="undo"==e?o.done:o.undone,l="undo"==e?o.undone:o.done,c=0;c<a.length&&(r=a[c],i?!r.ranges||r.equals(t.sel):r.ranges);c++);if(c!=a.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(r=a.pop(),!r.ranges){if(n)return void a.push(r);break}if(lr(r,l),i&&!r.equals(t.sel))return void _r(t,r,{clearRedo:!1});s=r}var u=[];lr(s,l),l.push({changes:u,generation:o.generation}),o.generation=r.generation||++o.maxGeneration;for(var h=Pt(t,"beforeChange")||t.cm&&Pt(t.cm,"beforeChange"),p=function(i){var n=r.changes[i];if(n.origin=e,h&&!Pr(t,n,!1))return a.length=0,{};u.push(ir(t,n));var o=i?qn(t,n):g(a);Or(t,n,o,dr(t,n)),!i&&t.cm&&t.cm.scrollIntoView({from:n.from,to:Bn(n)});var s=[];Qn(t,function(t,e){e||d(s,t.history)!=-1||(Fr(t.history,n),s.push(t.history)),Or(t,n,null,dr(t,n))})},f=r.changes.length-1;f>=0;--f){var m=p(f);if(m)return m.v}}}}function Nr(t,e){if(0!=e&&(t.first+=e,t.sel=new Ea(m(t.sel.ranges,function(t){return new La(O(t.anchor.line+e,t.anchor.ch),O(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){yn(t.cm,t.first,t.first-e,e);for(var i=t.cm.display,n=i.viewFrom;n<i.viewTo;n++)bn(t.cm,n,"gutter")}}function Or(t,e,i,n){if(t.cm&&!t.cm.curOp)return gn(t.cm,Or)(t,e,i,n);if(e.to.line<t.first)return void Nr(t,e.text.length-1-(e.to.line-e.from.line));if(!(e.from.line>t.lastLine())){if(e.from.line<t.first){var r=e.text.length-1-(t.first-e.from.line);Nr(t,r),e={from:O(t.first,0),to:O(e.to.line+r,e.to.ch),text:[g(e.text)],origin:e.origin}}var o=t.lastLine();e.to.line>o&&(e={from:e.from,to:O(o,D(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=M(t,e.from,e.to),i||(i=qn(t,e)),t.cm?Hr(t.cm,e,n):Gn(t,e,n),xr(t,i,Ks)}}function Hr(t,e,i){var n=t.doc,r=t.display,o=e.from,s=e.to,a=!1,l=o.line;t.options.lineWrapping||(l=I(dt(D(n,o.line))),n.iter(l,s.line+1,function(t){if(t==r.maxLine)return a=!0,!0})),n.sel.contains(e.from,e.to)>-1&&At(t),Gn(n,e,i,ki(t)),t.options.lineWrapping||(n.iter(l,o.line+e.text.length,function(t){var e=wt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),oe(n,o.line),Cn(t,400);var c=e.text.length-(s.line-o.line)-1;e.full?yn(t):o.line!=s.line||1!=e.text.length||Vn(t.doc,e)?yn(t,o.line,s.line+1,c):bn(t,o.line,"text");var u=Pt(t,"changes"),h=Pt(t,"change");if(h||u){var d={from:o,to:s,text:e.text,removed:e.removed,origin:e.origin};h&&_e(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function Wr(t,e,i,n,r){var o;n||(n=i),H(n,i)<0&&(o=[n,i],i=o[0],n=o[1]),"string"==typeof e&&(e=t.splitLines(e)),Ir(t,{from:i,to:n,text:e,origin:r})}function zr(t,e,i,n){i<t.line?t.line+=n:e<t.line&&(t.line=e,t.ch=0)}function Rr(t,e,i,n){for(var r=0;r<t.length;++r){var o=t[r],s=!0;if(o.ranges){o.copied||(o=t[r]=o.deepCopy(),o.copied=!0);for(var a=0;a<o.ranges.length;a++)zr(o.ranges[a].anchor,e,i,n),zr(o.ranges[a].head,e,i,n)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(i<c.from.line)c.from=O(c.from.line+n,c.from.ch),c.to=O(c.to.line+n,c.to.ch);else if(e<=c.to.line){s=!1;break}}s||(t.splice(0,r+1),r=0)}}}function Fr(t,e){var i=e.from.line,n=e.to.line,r=e.text.length-(n-i)-1;Rr(t.done,i,n,r),Rr(t.undone,i,n,r)}function jr(t,e,i,n){var r=e,o=e;return"number"==typeof e?o=D(t,j(t,e)):r=I(e),null==r?null:(n(o,r)&&t.cm&&bn(t.cm,r,i),o)}function Br(t){var e=this;this.lines=t,this.parent=null;for(var i=0,n=0;n<t.length;++n)t[n].parent=e,i+=t[n].height;this.height=i}function $r(t){var e=this;this.children=t;for(var i=0,n=0,r=0;r<t.length;++r){var o=t[r];i+=o.chunkSize(),n+=o.height,o.parent=e}this.size=i,this.height=n,this.parent=null}function qr(t,e,i){bt(e)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&Ui(t,i)}function Yr(t,e,i,n){var r=new Na(t,i,n),o=t.cm;return o&&r.noHScroll&&(o.display.alignWidgets=!0),jr(t,e,"widget",function(e){var i=e.widgets||(e.widgets=[]);if(null==r.insertAt?i.push(r):i.splice(Math.min(i.length-1,Math.max(0,r.insertAt)),0,r),r.line=e,o&&!vt(t,e)){var n=bt(e)<t.scrollTop;P(e,e.height+Oe(r)),n&&Ui(o,r.height),o.curOp.forceUpdate=!0}return!0}),o&&_e(o,"lineWidgetAdded",o,r,"number"==typeof e?e:I(e)),r}function Ur(t,e,i,n,o){if(n&&n.shared)return Xr(t,e,i,n,o);if(t.cm&&!t.cm.curOp)return gn(t.cm,Ur)(t,e,i,n,o);var s=new Ha(t,o),a=H(e,i);if(n&&u(n,s,!1),a>0||0==a&&s.clearWhenEmpty!==!1)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=r("span",[s.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(ht(t,e.line,e,i,s)||e.line!=i.line&&ht(t,i.line,e,i,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");U()}s.addToHistory&&or(t,{from:e,to:i,origin:"markText"},t.sel,NaN);var l,c=e.line,h=t.cm;if(t.iter(c,i.line+1,function(t){h&&s.collapsed&&!h.options.lineWrapping&&dt(t)==h.display.maxLine&&(l=!0),s.collapsed&&c!=e.line&&P(t,0),G(t,new X(s,c==e.line?e.ch:null,c==i.line?i.ch:null)),++c}),s.collapsed&&t.iter(e.line,i.line+1,function(e){vt(t,e)&&P(e,0)}),s.clearOnEnter&&oa(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(Y(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++Oa,s.atomic=!0),h){if(l&&(h.curOp.updateMaxLine=!0),s.collapsed)yn(h,e.line,i.line+1);else if(s.className||s.startStyle||s.endStyle||s.css||s.attributes||s.title)for(var d=e.line;d<=i.line;d++)bn(h,d,"text");s.atomic&&Cr(h.doc),_e(h,"markerAdded",h,s)}return s}function Xr(t,e,i,n,r){n=u(n),n.shared=!1;var o=[Ur(t,e,i,n,r)],s=o[0],a=n.widgetNode;return Qn(t,function(t){a&&(n.widgetNode=a.cloneNode(!0)),o.push(Ur(t,B(t,e),B(t,i),n,r));for(var l=0;l<t.linked.length;++l)if(t.linked[l].isParent)return;s=g(o)}),new Wa(o,s)}function Kr(t){return t.findMarks(O(t.first,0),t.clipPos(O(t.lastLine())),function(t){return t.parent})}function Vr(t,e){for(var i=0;i<e.length;i++){var n=e[i],r=n.find(),o=t.clipPos(r.from),s=t.clipPos(r.to);if(H(o,s)){var a=Ur(t,o,s,n.primary,n.primary.type);n.markers.push(a),a.parent=n}}}function Gr(t){for(var e=function(e){var i=t[e],n=[i.primary.doc];Qn(i.primary.doc,function(t){return n.push(t)});for(var r=0;r<i.markers.length;r++){var o=i.markers[r];d(n,o.doc)==-1&&(o.parent=null,i.markers.splice(r--,1))}},i=0;i<t.length;i++)e(i)}function Qr(t){var e=this;if(to(e),!Mt(e,t)&&!He(e.display,t)){Et(t),xs&&(Fa=+new Date);var i=Ti(e,t,!0),n=t.dataTransfer.files;if(i&&!e.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var r=n.length,o=Array(r),s=0,a=function(t,n){if(!e.options.allowDropFileTypes||d(e.options.allowDropFileTypes,t.type)!=-1){var a=new FileReader;a.onload=gn(e,function(){var t=a.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(t)&&(t=""),o[n]=t,++s==r){i=B(e.doc,i);var l={from:i,to:i,text:e.doc.splitLines(o.join(e.doc.lineSeparator())),origin:"paste"};Ir(e.doc,l),wr(e.doc,jn(i,Bn(l)))}}),a.readAsText(t)}},l=0;l<r;++l)a(n[l],l);else{if(e.state.draggingText&&e.doc.sel.contains(i)>-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var c=t.dataTransfer.getData("Text");if(c){var u;if(e.state.draggingText&&!e.state.draggingText.copy&&(u=e.listSelections()),xr(e.doc,jn(i,i)),u)for(var h=0;h<u.length;++h)Wr(e.doc,"",u[h].anchor,u[h].head,"drag");e.replaceSelection(c,"around","paste"),e.display.input.focus()}}catch(t){}}}}function Zr(t,e){if(xs&&(!t.state.draggingText||+new Date-Fa<100))return void Ot(e);
if(!Mt(t,e)&&!He(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!Ms)){var i=n("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Ds&&(i.width=i.height=1,t.display.wrapper.appendChild(i),i._top=i.offsetTop),e.dataTransfer.setDragImage(i,0,0),Ds&&i.parentNode.removeChild(i)}}function Jr(t,e){var r=Ti(t,e);if(r){var o=document.createDocumentFragment();Ai(t,r,o),t.display.dragCursor||(t.display.dragCursor=n("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),i(t.display.dragCursor,o)}}function to(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function eo(t){if(document.getElementsByClassName){for(var e=document.getElementsByClassName("CodeMirror"),i=[],n=0;n<e.length;n++){var r=e[n].CodeMirror;r&&i.push(r)}i.length&&i[0].operation(function(){for(var e=0;e<i.length;e++)t(i[e])})}}function io(){ja||(no(),ja=!0)}function no(){var t;oa(window,"resize",function(){null==t&&(t=setTimeout(function(){t=null,eo(ro)},100))}),oa(window,"blur",function(){return eo(Hi)})}function ro(t){var e=t.display;e.cachedCharWidth=e.cachedTextHeight=e.cachedPaddingH=null,e.scrollbarsClipped=!1,t.setSize()}function oo(t){var e=t.split(/-(?!$)/);t=e[e.length-1];for(var i,n,r,o,s=0;s<e.length-1;s++){var a=e[s];if(/^(cmd|meta|m)$/i.test(a))o=!0;else if(/^a(lt)?$/i.test(a))i=!0;else if(/^(c|ctrl|control)$/i.test(a))n=!0;else{if(!/^s(hift)?$/i.test(a))throw new Error("Unrecognized modifier name: "+a);r=!0}}return i&&(t="Alt-"+t),n&&(t="Ctrl-"+t),o&&(t="Cmd-"+t),r&&(t="Shift-"+t),t}function so(t){var e={};for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];if(/^(name|fallthrough|(de|at)tach)$/.test(i))continue;if("..."==n){delete t[i];continue}for(var r=m(i.split(" "),oo),o=0;o<r.length;o++){var s=void 0,a=void 0;o==r.length-1?(a=r.join(" "),s=n):(a=r.slice(0,o+1).join(" "),s="...");var l=e[a];if(l){if(l!=s)throw new Error("Inconsistent bindings for "+a)}else e[a]=s}delete t[i]}for(var c in e)t[c]=e[c];return t}function ao(t,e,i,n){e=ho(e);var r=e.call?e.call(t,n):e[t];if(r===!1)return"nothing";if("..."===r)return"multi";if(null!=r&&i(r))return"handled";if(e.fallthrough){if("[object Array]"!=Object.prototype.toString.call(e.fallthrough))return ao(t,e.fallthrough,i,n);for(var o=0;o<e.fallthrough.length;o++){var s=ao(t,e.fallthrough[o],i,n);if(s)return s}}}function lo(t){var e="string"==typeof t?t:Ba[t.keyCode];return"Ctrl"==e||"Alt"==e||"Shift"==e||"Mod"==e}function co(t,e,i){var n=t;return e.altKey&&"Alt"!=n&&(t="Alt-"+t),(Rs?e.metaKey:e.ctrlKey)&&"Ctrl"!=n&&(t="Ctrl-"+t),(Rs?e.ctrlKey:e.metaKey)&&"Cmd"!=n&&(t="Cmd-"+t),!i&&e.shiftKey&&"Shift"!=n&&(t="Shift-"+t),t}function uo(t,e){if(Ds&&34==t.keyCode&&t["char"])return!1;var i=Ba[t.keyCode];return null!=i&&!t.altGraphKey&&(3==t.keyCode&&t.code&&(i=t.code),co(i,t,e))}function ho(t){return"string"==typeof t?Ua[t]:t}function po(t,e){for(var i=t.doc.sel.ranges,n=[],r=0;r<i.length;r++){for(var o=e(i[r]);n.length&&H(o.from,g(n).to)<=0;){var s=n.pop();if(H(s.from,o.from)<0){o.from=s.from;break}}n.push(o)}fn(t,function(){for(var e=n.length-1;e>=0;e--)Wr(t.doc,"",n[e].from,n[e].to,"+delete");Xi(t)})}function fo(t,e,i){var n=C(t.text,e+i,i);return n<0||n>t.text.length?null:n}function go(t,e,i){var n=fo(t,e.ch,i);return null==n?null:new O(e.line,n,i<0?"after":"before")}function mo(t,e,i,n,r){if(t){var o=Ct(i,e.doc.direction);if(o){var s,a=r<0?g(o):o[0],l=r<0==(1==a.level),c=l?"after":"before";if(a.level>0||"rtl"==e.doc.direction){var u=Ke(e,i);s=r<0?i.text.length-1:0;var h=Ve(e,u,s).top;s=T(function(t){return Ve(e,u,t).top==h},r<0==(1==a.level)?a.from:a.to-1,s),"before"==c&&(s=fo(i,s,1))}else s=r<0?a.to:a.from;return new O(n,s,c)}}return new O(n,r<0?i.text.length:0,r<0?"before":"after")}function vo(t,e,i,n){var r=Ct(e,t.doc.direction);if(!r)return go(e,i,n);i.ch>=e.text.length?(i.ch=e.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var o=kt(r,i.ch,i.sticky),s=r[o];if("ltr"==t.doc.direction&&s.level%2==0&&(n>0?s.to>i.ch:s.from<i.ch))return go(e,i,n);var a,l=function(t,i){return fo(e,t instanceof O?t.ch:t,i)},c=function(i){return t.options.lineWrapping?(a=a||Ke(t,e),fi(t,e,a,i)):{begin:0,end:e.text.length}},u=c("before"==i.sticky?l(i,-1):i.ch);if("rtl"==t.doc.direction||1==s.level){var h=1==s.level==n<0,d=l(i,h?1:-1);if(null!=d&&(h?d<=s.to&&d<=u.end:d>=s.from&&d>=u.begin)){var p=h?"before":"after";return new O(i.line,d,p)}}var f=function(t,e,n){for(var o=function(t,e){return e?new O(i.line,l(t,1),"before"):new O(i.line,t,"after")};t>=0&&t<r.length;t+=e){var s=r[t],a=e>0==(1!=s.level),c=a?n.begin:l(n.end,-1);if(s.from<=c&&c<s.to)return o(c,a);if(c=a?s.from:l(s.to,-1),n.begin<=c&&c<n.end)return o(c,a)}},g=f(o+n,n,u);if(g)return g;var m=n>0?u.end:l(u.begin,-1);return null==m||n>0&&m==e.text.length||!(g=f(n>0?0:r.length-1,n,c(m)))?null:g}function yo(t,e){var i=D(t.doc,e),n=dt(i);return n!=i&&(e=I(n)),mo(!0,t,n,e,1)}function bo(t,e){var i=D(t.doc,e),n=pt(i);return n!=i&&(e=I(n)),mo(!0,t,i,e,-1)}function wo(t,e){var i=yo(t,e.line),n=D(t.doc,i.line),r=Ct(n,t.doc.direction);if(!r||0==r[0].level){var o=Math.max(0,n.text.search(/\S/)),s=e.line==i.line&&e.ch<=o&&e.ch;return O(i.line,s?0:o,i.sticky)}return i}function _o(t,e,i){if("string"==typeof e&&(e=Xa[e],!e))return!1;t.display.input.ensurePolled();var n=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),i&&(t.display.shift=!1),r=e(t)!=Xs}finally{t.display.shift=n,t.state.suppressEdits=!1}return r}function xo(t,e,i){for(var n=0;n<t.state.keyMaps.length;n++){var r=ao(e,t.state.keyMaps[n],i,t);if(r)return r}return t.options.extraKeys&&ao(e,t.options.extraKeys,i,t)||ao(e,t.options.keyMap,i,t)}function ko(t,e,i,n){var r=t.state.keySeq;if(r){if(lo(e))return"handled";if(/\'$/.test(e)?t.state.keySeq=null:Ka.set(50,function(){t.state.keySeq==r&&(t.state.keySeq=null,t.display.input.reset())}),Co(t,r+" "+e,i,n))return!0}return Co(t,e,i,n)}function Co(t,e,i,n){var r=xo(t,e,n);return"multi"==r&&(t.state.keySeq=e),"handled"==r&&_e(t,"keyHandled",t,e,i),"handled"!=r&&"multi"!=r||(Et(i),Ei(t)),!!r}function To(t,e){var i=uo(e,!0);return!!i&&(e.shiftKey&&!t.state.keySeq?ko(t,"Shift-"+i,e,function(e){return _o(t,e,!0)})||ko(t,i,e,function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return _o(t,e)}):ko(t,i,e,function(e){return _o(t,e)}))}function So(t,e,i){return ko(t,"'"+i+"'",e,function(e){return _o(t,e,!0)})}function Do(t){var e=this;if(e.curOp.focus=s(),!Mt(e,t)){xs&&ks<11&&27==t.keyCode&&(t.returnValue=!1);var i=t.keyCode;e.display.shift=16==i||t.shiftKey;var n=To(e,t);Ds&&(Va=n?i:null,!n&&88==i&&!ca&&(Ns?t.metaKey:t.ctrlKey)&&e.replaceSelection("",null,"cut")),18!=i||/\bCodeMirror-crosshair\b/.test(e.display.lineDiv.className)||Mo(e)}}function Mo(t){function e(t){18!=t.keyCode&&t.altKey||(js(i,"CodeMirror-crosshair"),St(document,"keyup",e),St(document,"mouseover",e))}var i=t.display.lineDiv;a(i,"CodeMirror-crosshair"),oa(document,"keyup",e),oa(document,"mouseover",e)}function Ao(t){16==t.keyCode&&(this.doc.sel.shift=!1),Mt(this,t)}function Po(t){var e=this;if(!(He(e.display,t)||Mt(e,t)||t.ctrlKey&&!t.altKey||Ns&&t.metaKey)){var i=t.keyCode,n=t.charCode;if(Ds&&i==Va)return Va=null,void Et(t);if(!Ds||t.which&&!(t.which<10)||!To(e,t)){var r=String.fromCharCode(null==n?i:n);"\b"!=r&&(So(e,t,r)||e.display.input.onKeyPress(t))}}}function Io(t,e){var i=+new Date;return Ja&&Ja.compare(i,t,e)?(Za=Ja=null,"triple"):Za&&Za.compare(i,t,e)?(Ja=new Qa(i,t,e),Za=null,"double"):(Za=new Qa(i,t,e),Ja=null,"single")}function Eo(t){var e=this,i=e.display;if(!(Mt(e,t)||i.activeTouch&&i.input.supportsTouch())){if(i.input.ensurePolled(),i.shift=t.shiftKey,He(i,t))return void(Cs||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100)));if(!jo(e,t)){var n=Ti(e,t),r=Wt(t),o=n?Io(n,r):"single";window.focus(),1==r&&e.state.selectingText&&e.state.selectingText(t),n&&Lo(e,r,n,o,t)||(1==r?n?Oo(e,n,o,t):Ht(t)==i.scroller&&Et(t):2==r?(n&&gr(e.doc,n),setTimeout(function(){return i.input.focus()},20)):3==r&&(Fs?e.display.input.onContextMenu(t):Ni(e)))}}}function Lo(t,e,i,n,r){var o="Click";return"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o),o=(1==e?"Left":2==e?"Middle":"Right")+o,ko(t,co(o,r),r,function(e){if("string"==typeof e&&(e=Xa[e]),!e)return!1;var n=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n=e(t,i)!=Xs}finally{t.state.suppressEdits=!1}return n})}function No(t,e,i){var n=t.getOption("configureMouse"),r=n?n(t,e,i):{};if(null==r.unit){var o=Os?i.shiftKey&&i.metaKey:i.altKey;r.unit=o?"rectangle":"single"==e?"char":"double"==e?"word":"line"}return(null==r.extend||t.doc.extend)&&(r.extend=t.doc.extend||i.shiftKey),null==r.addNew&&(r.addNew=Ns?i.metaKey:i.ctrlKey),null==r.moveOnDrag&&(r.moveOnDrag=!(Ns?i.altKey:i.ctrlKey)),r}function Oo(t,e,i,n){xs?setTimeout(c(Li,t),0):t.curOp.focus=s();var r,o=No(t,i,n),a=t.doc.sel;t.options.dragDrop&&sa&&!t.isReadOnly()&&"single"==i&&(r=a.contains(e))>-1&&(H((r=a.ranges[r]).from(),e)<0||e.xRel>0)&&(H(r.to(),e)>0||e.xRel<0)?Ho(t,n,e,o):zo(t,n,e,o)}function Ho(t,e,i,n){var r=t.display,o=!1,s=gn(t,function(e){Cs&&(r.scroller.draggable=!1),t.state.draggingText=!1,St(r.wrapper.ownerDocument,"mouseup",s),St(r.wrapper.ownerDocument,"mousemove",a),St(r.scroller,"dragstart",l),St(r.scroller,"drop",s),o||(Et(e),n.addNew||gr(t.doc,i,null,null,n.extend),Cs||xs&&9==ks?setTimeout(function(){r.wrapper.ownerDocument.body.focus(),r.input.focus()},20):r.input.focus())}),a=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},l=function(){return o=!0};Cs&&(r.scroller.draggable=!0),t.state.draggingText=s,s.copy=!n.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),oa(r.wrapper.ownerDocument,"mouseup",s),oa(r.wrapper.ownerDocument,"mousemove",a),oa(r.scroller,"dragstart",l),oa(r.scroller,"drop",s),Ni(t),setTimeout(function(){return r.input.focus()},20)}function Wo(t,e,i){if("char"==i)return new La(e,e);if("word"==i)return t.findWordAt(e);if("line"==i)return new La(O(e.line,0),B(t.doc,O(e.line+1,0)));var n=i(t,e);return new La(n.from,n.to)}function zo(t,e,i,n){function r(e){if(0!=H(v,e))if(v=e,"rectangle"==n.unit){for(var r=[],o=t.options.tabSize,s=h(D(c,i.line).text,i.ch,o),a=h(D(c,e.line).text,e.ch,o),l=Math.min(s,a),g=Math.max(s,a),m=Math.min(i.line,e.line),y=Math.min(t.lastLine(),Math.max(i.line,e.line));m<=y;m++){var b=D(c,m).text,w=p(b,l,o);l==g?r.push(new La(O(m,w),O(m,w))):b.length>w&&r.push(new La(O(m,w),O(m,p(b,g,o))))}r.length||r.push(new La(i,i)),_r(c,Fn(t,f.ranges.slice(0,d).concat(r),d),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var _,x=u,k=Wo(t,e,n.unit),C=x.anchor;H(k.anchor,C)>0?(_=k.head,C=F(x.from(),k.anchor)):(_=k.anchor,C=R(x.to(),k.head));var T=f.ranges.slice(0);T[d]=Ro(t,new La(B(c,C),_)),_r(c,Fn(t,T,d),Vs)}}function o(e){var i=++b,a=Ti(t,e,!0,"rectangle"==n.unit);if(a)if(0!=H(a,v)){t.curOp.focus=s(),r(a);var u=Ri(l,c);(a.line>=u.to||a.line<u.from)&&setTimeout(gn(t,function(){b==i&&o(e)}),150)}else{var h=e.clientY<y.top?-20:e.clientY>y.bottom?20:0;h&&setTimeout(gn(t,function(){b==i&&(l.scroller.scrollTop+=h,o(e))}),50)}}function a(e){t.state.selectingText=!1,b=1/0,Et(e),l.input.focus(),St(l.wrapper.ownerDocument,"mousemove",w),St(l.wrapper.ownerDocument,"mouseup",_),c.history.lastSelOrigin=null}var l=t.display,c=t.doc;Et(e);var u,d,f=c.sel,g=f.ranges;if(n.addNew&&!n.extend?(d=c.sel.contains(i),u=d>-1?g[d]:new La(i,i)):(u=c.sel.primary(),d=c.sel.primIndex),"rectangle"==n.unit)n.addNew||(u=new La(i,i)),i=Ti(t,e,!0,!0),d=-1;else{var m=Wo(t,i,n.unit);u=n.extend?fr(u,m.anchor,m.head,n.extend):m}n.addNew?d==-1?(d=g.length,_r(c,Fn(t,g.concat([u]),d),{scroll:!1,origin:"*mouse"})):g.length>1&&g[d].empty()&&"char"==n.unit&&!n.extend?(_r(c,Fn(t,g.slice(0,d).concat(g.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),f=c.sel):vr(c,d,u,Vs):(d=0,_r(c,new Ea([u],0),Vs),f=c.sel);var v=i,y=l.wrapper.getBoundingClientRect(),b=0,w=gn(t,function(t){0!==t.buttons&&Wt(t)?o(t):a(t)}),_=gn(t,a);t.state.selectingText=_,oa(l.wrapper.ownerDocument,"mousemove",w),oa(l.wrapper.ownerDocument,"mouseup",_)}function Ro(t,e){var i=e.anchor,n=e.head,r=D(t.doc,i.line);if(0==H(i,n)&&i.sticky==n.sticky)return e;var o=Ct(r);if(!o)return e;var s=kt(o,i.ch,i.sticky),a=o[s];if(a.from!=i.ch&&a.to!=i.ch)return e;var l=s+(a.from==i.ch==(1!=a.level)?0:1);if(0==l||l==o.length)return e;var c;if(n.line!=i.line)c=(n.line-i.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=kt(o,n.ch,n.sticky),h=u-s||(n.ch-i.ch)*(1==a.level?-1:1);c=u==l-1||u==l?h<0:h>0}var d=o[l+(c?-1:0)],p=c==(1==d.level),f=p?d.from:d.to,g=p?"after":"before";return i.ch==f&&i.sticky==g?e:new La(new O(i.line,f,g),n)}function Fo(t,e,i,n){var r,o;if(e.touches)r=e.touches[0].clientX,o=e.touches[0].clientY;else try{r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;n&&Et(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!Pt(t,i))return Nt(e);o-=a.top-s.viewOffset;for(var l=0;l<t.options.gutters.length;++l){var c=s.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=r){var u=E(t.doc,o),h=t.options.gutters[l];return Dt(t,i,t,u,h,e),Nt(e)}}}function jo(t,e){return Fo(t,e,"gutterClick",!0)}function Bo(t,e){He(t.display,e)||$o(t,e)||Mt(t,e,"contextmenu")||Fs||t.display.input.onContextMenu(e)}function $o(t,e){return!!Pt(t,"gutterContextMenu")&&Fo(t,e,"gutterContextMenu",!1)}function qo(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ii(t)}function Yo(t){function e(e,n,r,o){t.defaults[e]=n,r&&(i[e]=o?function(t,e,i){i!=tl&&r(t,e,i)}:r)}var i=t.optionHandlers;t.defineOption=e,t.Init=tl,e("value","",function(t,e){return t.setValue(e)},!0),e("mode",null,function(t,e){t.doc.modeOption=e,Xn(t)},!0),e("indentUnit",2,Xn,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(t){Kn(t),ii(t),yn(t)},!0),e("lineSeparator",null,function(t,e){if(t.doc.lineSep=e,e){var i=[],n=t.doc.first;t.doc.iter(function(t){for(var r=0;;){var o=t.text.indexOf(e,r);if(o==-1)break;r=o+e.length,i.push(O(n,o))}n++});for(var r=i.length-1;r>=0;r--)Wr(t.doc,e,i[r],O(i[r].line,i[r].ch+e.length))}}),e("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,e,i){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),i!=tl&&t.refresh()}),e("specialCharPlaceholder",ue,function(t){return t.refresh()},!0),e("electricChars",!0),e("inputStyle",Ls?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),e("rtlMoveVisually",!Hs),e("wholeLineUpdateBefore",!0),e("theme","default",function(t){qo(t),Uo(t)},!0),e("keyMap","default",function(t,e,i){var n=ho(e),r=i!=tl&&ho(i);r&&r.detach&&r.detach(t,n),n.attach&&n.attach(t,r||null)}),e("extraKeys",null),e("configureMouse",null),e("lineWrapping",!1,Ko,!0),e("gutters",[],function(t){Hn(t.options),Uo(t)},!0),e("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?xi(t.display)+"px":"0",t.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(t){return nn(t)},!0),e("scrollbarStyle","native",function(t){on(t),nn(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),e("lineNumbers",!1,function(t){Hn(t.options),Uo(t)},!0),e("firstLineNumber",1,Uo,!0),e("lineNumberFormatter",function(t){return t},Uo,!0),e("showCursorWhenSelecting",!1,Di,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("pasteLinesPerSelection",!0),e("selectionsMayTouch",!1),e("readOnly",!1,function(t,e){"nocursor"==e&&(Hi(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),e("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),e("dragDrop",!0,Xo),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,Di,!0),e("singleCursorHeightPerLine",!0,Di,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,Kn,!0),e("addModeClass",!1,Kn,!0),e("pollInterval",100),e("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),e("historyEventDelay",1250),e("viewportMargin",10,function(t){return t.refresh()},!0),e("maxHighlightLength",1e4,Kn,!0),e("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),e("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),e("autofocus",null),e("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0),e("phrases",null)}function Uo(t){On(t),yn(t),Fi(t)}function Xo(t,e,i){var n=i&&i!=tl;if(!e!=!n){var r=t.display.dragFunctions,o=e?oa:St;o(t.display.scroller,"dragstart",r.start),o(t.display.scroller,"dragenter",r.enter),o(t.display.scroller,"dragover",r.over),o(t.display.scroller,"dragleave",r.leave),o(t.display.scroller,"drop",r.drop)}}function Ko(t){t.options.lineWrapping?(a(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(js(t.display.wrapper,"CodeMirror-wrap"),_t(t)),Ci(t),yn(t),ii(t),setTimeout(function(){return nn(t)},100)}function Vo(t,e){var i=this;if(!(this instanceof Vo))return new Vo(t,e);this.options=e=e?u(e):{},u(el,e,!1),Hn(e);var n=e.value;"string"==typeof n?n=new Ra(n,e.mode,null,e.lineSeparator,e.direction):e.mode&&(n.modeOption=e.mode),this.doc=n;var r=new Vo.inputStyles[e.inputStyle](this),o=this.display=new S(t,n,r);o.wrapper.CodeMirror=this,On(this),qo(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),on(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new $s,keySeq:null,specialChars:null},e.autofocus&&!Ls&&o.input.focus(),xs&&ks<11&&setTimeout(function(){return i.display.input.reset(!0)},20),Go(this),io(),sn(this),this.curOp.forceUpdate=!0,Zn(this,n),e.autofocus&&!Ls||this.hasFocus()?setTimeout(c(Oi,this),20):Hi(this);for(var s in il)il.hasOwnProperty(s)&&il[s](i,e[s],tl);ji(this),e.finishInit&&e.finishInit(this);for(var a=0;a<nl.length;++a)nl[a](i);an(this),Cs&&e.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Go(t){function e(){r.activeTouch&&(o=setTimeout(function(){return r.activeTouch=null},1e3),s=r.activeTouch,s.end=+new Date)}function i(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}function n(t,e){if(null==e.left)return!0;var i=e.left-t.left,n=e.top-t.top;return i*i+n*n>400}var r=t.display;oa(r.scroller,"mousedown",gn(t,Eo)),xs&&ks<11?oa(r.scroller,"dblclick",gn(t,function(e){if(!Mt(t,e)){var i=Ti(t,e);if(i&&!jo(t,e)&&!He(t.display,e)){Et(e);var n=t.findWordAt(i);gr(t.doc,n.anchor,n.head)}}})):oa(r.scroller,"dblclick",function(e){return Mt(t,e)||Et(e)}),oa(r.scroller,"contextmenu",function(e){return Bo(t,e)});var o,s={end:0};oa(r.scroller,"touchstart",function(e){if(!Mt(t,e)&&!i(e)&&!jo(t,e)){r.input.ensurePolled(),clearTimeout(o);var n=+new Date;r.activeTouch={start:n,moved:!1,prev:n-s.end<=300?s:null},1==e.touches.length&&(r.activeTouch.left=e.touches[0].pageX,r.activeTouch.top=e.touches[0].pageY)}}),oa(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),oa(r.scroller,"touchend",function(i){var o=r.activeTouch;if(o&&!He(r,i)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=t.coordsChar(r.activeTouch,"page");s=!o.prev||n(o,o.prev)?new La(a,a):!o.prev.prev||n(o,o.prev.prev)?t.findWordAt(a):new La(O(a.line,0),B(t.doc,O(a.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),Et(i)}e()}),oa(r.scroller,"touchcancel",e),oa(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Zi(t,r.scroller.scrollTop),tn(t,r.scroller.scrollLeft,!0),Dt(t,"scroll",t))}),oa(r.scroller,"mousewheel",function(e){return Rn(t,e)}),oa(r.scroller,"DOMMouseScroll",function(e){return Rn(t,e)}),oa(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(e){Mt(t,e)||Ot(e)},over:function(e){Mt(t,e)||(Jr(t,e),Ot(e))},start:function(e){return Zr(t,e)},drop:gn(t,Qr),leave:function(e){Mt(t,e)||to(t)}};var a=r.input.getField();oa(a,"keyup",function(e){return Ao.call(t,e)}),oa(a,"keydown",gn(t,Do)),oa(a,"keypress",gn(t,Po)),oa(a,"focus",function(e){return Oi(t,e)}),oa(a,"blur",function(e){return Hi(t,e)})}function Qo(t,e,i,n){var r,o=t.doc;null==i&&(i="add"),"smart"==i&&(o.mode.indent?r=Qt(t,e).state:i="prev");var s=t.options.tabSize,a=D(o,e),l=h(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(n||/\S/.test(a.text)){if("smart"==i&&(c=o.mode.indent(r,a.text.slice(u.length),a.text),c==Xs||c>150)){if(!n)return;i="prev"}}else c=0,i="not";"prev"==i?c=e>o.first?h(D(o,e-1).text,null,s):0:"add"==i?c=l+t.options.indentUnit:"subtract"==i?c=l-t.options.indentUnit:"number"==typeof i&&(c=l+i),c=Math.max(0,c);var d="",p=0;if(t.options.indentWithTabs)for(var g=Math.floor(c/s);g;--g)p+=s,d+="\t";if(p<c&&(d+=f(c-p)),d!=u)return Wr(o,d,O(e,0),O(e,u.length),"+input"),a.stateAfter=null,!0;for(var m=0;m<o.sel.ranges.length;m++){var v=o.sel.ranges[m];if(v.head.line==e&&v.head.ch<u.length){var y=O(e,u.length);vr(o,m,new La(y,y));break}}}function Zo(t){rl=t}function Jo(t,e,i,n,r){var o=t.doc;t.display.shift=!1,n||(n=o.sel);var s=t.state.pasteIncoming||"paste"==r,a=aa(e),l=null;if(s&&n.ranges.length>1)if(rl&&rl.text.join("\n")==e){if(n.ranges.length%rl.text.length==0){l=[];for(var c=0;c<rl.text.length;c++)l.push(o.splitLines(rl.text[c]))}}else a.length==n.ranges.length&&t.options.pasteLinesPerSelection&&(l=m(a,function(t){return[t]}));for(var u=t.curOp.updateInput,h=n.ranges.length-1;h>=0;h--){var d=n.ranges[h],p=d.from(),f=d.to();d.empty()&&(i&&i>0?p=O(p.line,p.ch-i):t.state.overwrite&&!s?f=O(f.line,Math.min(D(o,f.line).text.length,f.ch+g(a).length)):s&&rl&&rl.lineWise&&rl.text.join("\n")==e&&(p=f=O(p.line,0)));var v={from:p,to:f,text:l?l[h%l.length]:a,origin:r||(s?"paste":t.state.cutIncoming?"cut":"+input")};Ir(t.doc,v),_e(t,"inputRead",t,v)}e&&!s&&es(t,e),Xi(t),t.curOp.updateInput<2&&(t.curOp.updateInput=u),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function ts(t,e){var i=t.clipboardData&&t.clipboardData.getData("Text");if(i)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||fn(e,function(){return Jo(e,i,0,null,"paste")}),!0}function es(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var i=t.doc.sel,n=i.ranges.length-1;n>=0;n--){var r=i.ranges[n];if(!(r.head.ch>100||n&&i.ranges[n-1].head.line==r.head.line)){var o=t.getModeAt(r.head),s=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(e.indexOf(o.electricChars.charAt(a))>-1){s=Qo(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(D(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Qo(t,r.head.line,"smart"));s&&_e(t,"electricInput",t,r.head.line)}}}function is(t){for(var e=[],i=[],n=0;n<t.doc.sel.ranges.length;n++){var r=t.doc.sel.ranges[n].head.line,o={anchor:O(r,0),head:O(r+1,0)};i.push(o),e.push(t.getRange(o.anchor,o.head))}return{text:e,ranges:i}}function ns(t,e){t.setAttribute("autocorrect","off"),t.setAttribute("autocapitalize","off"),t.setAttribute("spellcheck",!!e)}function rs(){var t=n("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),e=n("div",[t],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Cs?t.style.width="1000px":t.setAttribute("wrap","off"),Is&&(t.style.border="1px solid black"),ns(t),e}function os(t){var e=t.optionHandlers,i=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,i){var n=this.options,r=n[t];n[t]==i&&"mode"!=t||(n[t]=i,e.hasOwnProperty(t)&&gn(this,e[t])(this,i,r),Dt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](ho(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,i=0;i<e.length;++i)if(e[i]==t||e[i].name==t)return e.splice(i,1),!0},addOverlay:mn(function(e,i){var n=e.token?e:t.getMode(this.options,e);if(n.startState)throw new Error("Overlays may not be stateful.");v(this.state.overlays,{mode:n,modeSpec:e,opaque:i&&i.opaque,priority:i&&i.priority||0},function(t){return t.priority}),this.state.modeGen++,yn(this)}),removeOverlay:mn(function(t){for(var e=this,i=this.state.overlays,n=0;n<i.length;++n){var r=i[n].modeSpec;if(r==t||"string"==typeof t&&r.name==t)return i.splice(n,1),e.state.modeGen++,void yn(e)}}),indentLine:mn(function(t,e,i){"string"!=typeof e&&"number"!=typeof e&&(e=null==e?this.options.smartIndent?"smart":"prev":e?"add":"subtract"),L(this.doc,t)&&Qo(this,t,e,i)}),indentSelection:mn(function(t){for(var e=this,i=this.doc.sel.ranges,n=-1,r=0;r<i.length;r++){var o=i[r];if(o.empty())o.head.line>n&&(Qo(e,o.head.line,t,!0),n=o.head.line,r==e.doc.sel.primIndex&&Xi(e));else{var s=o.from(),a=o.to(),l=Math.max(n,s.line);n=Math.min(e.lastLine(),a.line-(a.ch?0:1))+1;for(var c=l;c<n;++c)Qo(e,c,t);var u=e.doc.sel.ranges;0==s.ch&&i.length==u.length&&u[r].from().ch>0&&vr(e.doc,r,new La(s,u[r].to()),Ks)}}}),getTokenAt:function(t,e){return ee(this,t,e)},getLineTokens:function(t,e){return ee(this,O(t),e,!0)},getTokenTypeAt:function(t){t=B(this.doc,t);var e,i=Gt(this,D(this.doc,t.line)),n=0,r=(i.length-1)/2,o=t.ch;if(0==o)e=i[2];else for(;;){var s=n+r>>1;if((s?i[2*s-1]:0)>=o)r=s;else{if(!(i[2*s+1]<o)){e=i[2*s+2];break}n=s+1}}var a=e?e.indexOf("overlay "):-1;return a<0?e:0==a?null:e.slice(0,a-1)},getModeAt:function(e){var i=this.doc.mode;return i.innerMode?t.innerMode(i,this.getTokenAt(e).state).mode:i},getHelper:function(t,e){return this.getHelpers(t,e)[0]},getHelpers:function(t,e){var n=this,r=[];if(!i.hasOwnProperty(e))return r;var o=i[e],s=this.getModeAt(t);if("string"==typeof s[e])o[s[e]]&&r.push(o[s[e]]);else if(s[e])for(var a=0;a<s[e].length;a++){var l=o[s[e][a]];l&&r.push(l)}else s.helperType&&o[s.helperType]?r.push(o[s.helperType]):o[s.name]&&r.push(o[s.name]);for(var c=0;c<o._global.length;c++){var u=o._global[c];u.pred(s,n)&&d(r,u.val)==-1&&r.push(u.val)}return r},getStateAfter:function(t,e){var i=this.doc;return t=j(i,null==t?i.first+i.size-1:t),Qt(this,t+1,e).state},cursorCoords:function(t,e){var i,n=this.doc.sel.primary();return i=null==t?n.head:"object"==typeof t?B(this.doc,t):t?n.from():n.to(),ci(this,i,e||"page")},charCoords:function(t,e){return li(this,B(this.doc,t),e||"page")},coordsChar:function(t,e){return t=ai(this,t,e||"page"),di(this,t.left,t.top)},lineAtHeight:function(t,e){return t=ai(this,{top:t,left:0},e||"page").top,E(this.doc,t+this.display.viewOffset)},heightAtLine:function(t,e,i){var n,r=!1;if("number"==typeof t){var o=this.doc.first+this.doc.size-1;t<this.doc.first?t=this.doc.first:t>o&&(t=o,r=!0),n=D(this.doc,t)}else n=t;return si(this,n,{top:0,left:0},e||"page",i||r).top+(r?this.doc.height-bt(n):0)},defaultTextHeight:function(){return bi(this.display)},defaultCharWidth:function(){return wi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,i,n,r){var o=this.display;t=ci(this,B(this.doc,t));var s=t.bottom,a=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),o.sizer.appendChild(e),"over"==n)s=t.top;else if("above"==n||"near"==n){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?s=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(s=t.bottom),a+e.offsetWidth>c&&(a=c-e.offsetWidth)}e.style.top=s+"px",e.style.left=e.style.right="","right"==r?(a=o.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?a=0:"middle"==r&&(a=(o.sizer.clientWidth-e.offsetWidth)/2),e.style.left=a+"px"),i&&qi(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:mn(Do),triggerOnKeyPress:mn(Po),triggerOnKeyUp:Ao,triggerOnMouseDown:mn(Eo),execCommand:function(t){if(Xa.hasOwnProperty(t))return Xa[t].call(null,this)},triggerElectric:mn(function(t){es(this,t)}),findPosH:function(t,e,i,n){var r=this,o=1;e<0&&(o=-1,e=-e);for(var s=B(this.doc,t),a=0;a<e&&(s=ss(r.doc,s,o,i,n),!s.hitSide);++a);return s},moveH:mn(function(t,e){var i=this;this.extendSelectionsBy(function(n){return i.display.shift||i.doc.extend||n.empty()?ss(i.doc,n.head,t,e,i.options.rtlMoveVisually):t<0?n.from():n.to()},Gs)}),deleteH:mn(function(t,e){var i=this.doc.sel,n=this.doc;i.somethingSelected()?n.replaceSelection("",null,"+delete"):po(this,function(i){var r=ss(n,i.head,t,e,!1);return t<0?{from:r,to:i.head}:{from:i.head,to:r}})}),findPosV:function(t,e,i,n){var r=this,o=1,s=n;e<0&&(o=-1,e=-e);for(var a=B(this.doc,t),l=0;l<e;++l){var c=ci(r,a,"div");if(null==s?s=c.left:c.left=s,a=as(r,c,o,i),a.hitSide)break}return a},moveV:mn(function(t,e){var i=this,n=this.doc,r=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(s){if(o)return t<0?s.from():s.to();var a=ci(i,s.head,"div");null!=s.goalColumn&&(a.left=s.goalColumn),r.push(a.left);var l=as(i,a,t,e);return"page"==e&&s==n.sel.primary()&&Ui(i,li(i,l,"div").top-a.top),l},Gs),r.length)for(var s=0;s<n.sel.ranges.length;s++)n.sel.ranges[s].goalColumn=r[s]}),findWordAt:function(t){var e=this.doc,i=D(e,t.line).text,n=t.ch,r=t.ch;if(i){var o=this.getHelper(t,"wordChars");"before"!=t.sticky&&r!=i.length||!n?++r:--n;for(var s=i.charAt(n),a=_(s,o)?function(t){return _(t,o)}:/\s/.test(s)?function(t){return/\s/.test(t)}:function(t){return!/\s/.test(t)&&!_(t)};n>0&&a(i.charAt(n-1));)--n;for(;r<i.length&&a(i.charAt(r));)++r}return new La(O(t.line,n),O(t.line,r))},toggleOverwrite:function(t){null!=t&&t==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?a(this.display.cursorDiv,"CodeMirror-overwrite"):js(this.display.cursorDiv,"CodeMirror-overwrite"),Dt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==s()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:mn(function(t,e){Ki(this,t,e)}),getScrollInfo:function(){var t=this.display.scroller;return{left:t.scrollLeft,top:t.scrollTop,height:t.scrollHeight-Fe(this)-this.display.barHeight,width:t.scrollWidth-Fe(this)-this.display.barWidth,clientHeight:Be(this),clientWidth:je(this)}},scrollIntoView:mn(function(t,e){null==t?(t={from:this.doc.sel.primary().head,to:null},null==e&&(e=this.options.cursorScrollMargin)):"number"==typeof t?t={from:O(t,0),to:null}:null==t.from&&(t={from:t,to:null}),t.to||(t.to=t.from),t.margin=e||0,null!=t.from.line?Vi(this,t):Qi(this,t.from,t.to,t.margin)}),setSize:mn(function(t,e){var i=this,n=function(t){return"number"==typeof t||/^\d+$/.test(String(t))?t+"px":t};null!=t&&(this.display.wrapper.style.width=n(t)),null!=e&&(this.display.wrapper.style.height=n(e)),this.options.lineWrapping&&ei(this);var r=this.display.viewFrom;this.doc.iter(r,this.display.viewTo,function(t){if(t.widgets)for(var e=0;e<t.widgets.length;e++)if(t.widgets[e].noHScroll){bn(i,r,"widget");break}++r}),this.curOp.forceUpdate=!0,Dt(this,"refresh",this)}),operation:function(t){return fn(this,t)},startOperation:function(){return sn(this)},endOperation:function(){return an(this)},refresh:mn(function(){var t=this.display.cachedTextHeight;yn(this),this.curOp.forceUpdate=!0,ii(this),Ki(this,this.doc.scrollLeft,this.doc.scrollTop),Ln(this),(null==t||Math.abs(t-bi(this.display))>.5)&&Ci(this),Dt(this,"refresh",this)}),swapDoc:mn(function(t){var e=this.doc;return e.cm=null,Zn(this,t),ii(this),this.display.input.reset(),Ki(this,t.scrollLeft,t.scrollTop),
this.curOp.forceScroll=!0,_e(this,"swapDoc",this,e),e}),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},It(t),t.registerHelper=function(e,n,r){i.hasOwnProperty(e)||(i[e]=t[e]={_global:[]}),i[e][n]=r},t.registerGlobalHelper=function(e,n,r,o){t.registerHelper(e,n,o),i[e]._global.push({pred:r,val:o})}}function ss(t,e,i,n,r){function o(){var n=e.line+i;return!(n<t.first||n>=t.first+t.size)&&(e=new O(n,e.ch,e.sticky),c=D(t,n))}function s(n){var s;if(s=r?vo(t.cm,c,e,i):go(c,e,i),null==s){if(n||!o())return!1;e=mo(r,t.cm,c,e.line,i)}else e=s;return!0}var a=e,l=i,c=D(t,e.line);if("char"==n)s();else if("column"==n)s(!0);else if("word"==n||"group"==n)for(var u=null,h="group"==n,d=t.cm&&t.cm.getHelper(e,"wordChars"),p=!0;!(i<0)||s(!p);p=!1){var f=c.text.charAt(e.ch)||"\n",g=_(f,d)?"w":h&&"\n"==f?"n":!h||/\s/.test(f)?null:"p";if(!h||p||g||(g="s"),u&&u!=g){i<0&&(i=1,s(),e.sticky="after");break}if(g&&(u=g),i>0&&!s(!p))break}var m=Dr(t,e,a,l,!0);return W(a,m)&&(m.hitSide=!0),m}function as(t,e,i,n){var r,o=t.doc,s=e.left;if("page"==n){var a=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(a-.5*bi(t.display),3);r=(i>0?e.bottom:e.top)+i*l}else"line"==n&&(r=i>0?e.bottom+3:e.top-3);for(var c;c=di(t,s,r),c.outside;){if(i<0?r<=0:r>=o.height){c.hitSide=!0;break}r+=5*i}return c}function ls(t,e){var i=Xe(t,e.line);if(!i||i.hidden)return null;var n=D(t.doc,e.line),r=qe(i,n,e.line),o=Ct(n,t.doc.direction),s="left";if(o){var a=kt(o,e.ch);s=a%2?"right":"left"}var l=Ge(r.map,e.ch,s);return l.offset="right"==l.collapse?l.end:l.start,l}function cs(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function us(t,e){return e&&(t.bad=!0),t}function hs(t,e,i,n,r){function o(t){return function(e){return e.id==t}}function s(){u&&(c+=h,d&&(c+=h),u=d=!1)}function a(t){t&&(s(),c+=t)}function l(e){if(1==e.nodeType){var i=e.getAttribute("cm-text");if(i)return void a(i);var c,p=e.getAttribute("cm-marker");if(p){var f=t.findMarks(O(n,0),O(r+1,0),o(+p));return void(f.length&&(c=f[0].find(0))&&a(M(t.doc,c.from,c.to).join(h)))}if("false"==e.getAttribute("contenteditable"))return;var g=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;g&&s();for(var m=0;m<e.childNodes.length;m++)l(e.childNodes[m]);/^(pre|p)$/i.test(e.nodeName)&&(d=!0),g&&(u=!0)}else 3==e.nodeType&&a(e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(var c="",u=!1,h=t.doc.lineSeparator(),d=!1;l(e),e!=i;)e=e.nextSibling,d=!1;return c}function ds(t,e,i){var n;if(e==t.display.lineDiv){if(n=t.display.lineDiv.childNodes[i],!n)return us(t.clipPos(O(t.display.viewTo-1)),!0);e=null,i=0}else for(n=e;;n=n.parentNode){if(!n||n==t.display.lineDiv)return null;if(n.parentNode&&n.parentNode==t.display.lineDiv)break}for(var r=0;r<t.display.view.length;r++){var o=t.display.view[r];if(o.node==n)return ps(o,e,i)}}function ps(t,e,i){function n(e,i,n){for(var r=-1;r<(h?h.length:0);r++)for(var o=r<0?u.map:h[r],s=0;s<o.length;s+=3){var a=o[s+2];if(a==e||a==i){var l=I(r<0?t.line:t.rest[r]),c=o[s]+n;return(n<0||a!=e)&&(c=o[s+(n?1:0)]),O(l,c)}}}var r=t.text.firstChild,s=!1;if(!e||!o(r,e))return us(O(I(t.line),0),!0);if(e==r&&(s=!0,e=r.childNodes[i],i=0,!e)){var a=t.rest?g(t.rest):t.line;return us(O(I(a),a.text.length),s)}var l=3==e.nodeType?e:null,c=e;for(l||1!=e.childNodes.length||3!=e.firstChild.nodeType||(l=e.firstChild,i&&(i=l.nodeValue.length));c.parentNode!=r;)c=c.parentNode;var u=t.measure,h=u.maps,d=n(l,c,i);if(d)return us(d,s);for(var p=c.nextSibling,f=l?l.nodeValue.length-i:0;p;p=p.nextSibling){if(d=n(p,p.firstChild,0))return us(O(d.line,d.ch-f),s);f+=p.textContent.length}for(var m=c.previousSibling,v=i;m;m=m.previousSibling){if(d=n(m,m.firstChild,-1))return us(O(d.line,d.ch+v),s);v+=m.textContent.length}}function fs(t,e){function i(){t.value=c.getValue()}if(e=e?u(e):{},e.value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=s();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}var r;if(t.form&&(oa(t.form,"submit",i),!e.leaveSubmitMethodAlone)){var o=t.form;r=o.submit;try{var a=o.submit=function(){i(),o.submit=r,o.submit(),o.submit=a}}catch(l){}}e.finishInit=function(e){e.save=i,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,i(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(St(t.form,"submit",i),"function"==typeof t.form.submit&&(t.form.submit=r))}},t.style.display="none";var c=Vo(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return c}function gs(t){t.off=St,t.on=oa,t.wheelEventPixels=zn,t.Doc=Ra,t.splitLines=aa,t.countColumn=h,t.findColumn=p,t.isWordChar=w,t.Pass=Xs,t.signal=Dt,t.Line=ya,t.changeEnd=Bn,t.scrollbarModel=Da,t.Pos=O,t.cmpPos=H,t.modes=ha,t.mimeModes=da,t.resolveMode=$t,t.getMode=qt,t.modeExtensions=pa,t.extendMode=Yt,t.copyState=Ut,t.startState=Kt,t.innerMode=Xt,t.commands=Xa,t.keyMap=Ua,t.keyName=uo,t.isModifierKey=lo,t.lookupKey=ao,t.normalizeKeyMap=so,t.StringStream=fa,t.SharedTextMarker=Wa,t.TextMarker=Ha,t.LineWidget=Na,t.e_preventDefault=Et,t.e_stopPropagation=Lt,t.e_stop=Ot,t.addClass=a,t.contains=o,t.rmClass=js,t.keyNames=Ba}var ms=navigator.userAgent,vs=navigator.platform,ys=/gecko\/\d/i.test(ms),bs=/MSIE \d/.test(ms),ws=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ms),_s=/Edge\/(\d+)/.exec(ms),xs=bs||ws||_s,ks=xs&&(bs?document.documentMode||6:+(_s||ws)[1]),Cs=!_s&&/WebKit\//.test(ms),Ts=Cs&&/Qt\/\d+\.\d+/.test(ms),Ss=!_s&&/Chrome\//.test(ms),Ds=/Opera\//.test(ms),Ms=/Apple Computer/.test(navigator.vendor),As=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ms),Ps=/PhantomJS/.test(ms),Is=!_s&&/AppleWebKit/.test(ms)&&/Mobile\/\w+/.test(ms),Es=/Android/.test(ms),Ls=Is||Es||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ms),Ns=Is||/Mac/.test(vs),Os=/\bCrOS\b/.test(ms),Hs=/win/i.test(vs),Ws=Ds&&ms.match(/Version\/(\d*\.\d*)/);Ws&&(Ws=Number(Ws[1])),Ws&&Ws>=15&&(Ds=!1,Cs=!0);var zs,Rs=Ns&&(Ts||Ds&&(null==Ws||Ws<12.11)),Fs=ys||xs&&ks>=9,js=function(e,i){var n=e.className,r=t(i).exec(n);if(r){var o=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(o?r[1]+o:"")}};zs=document.createRange?function(t,e,i,n){var r=document.createRange();return r.setEnd(n||t,i),r.setStart(t,e),r}:function(t,e,i){var n=document.body.createTextRange();try{n.moveToElementText(t.parentNode)}catch(r){return n}return n.collapse(!0),n.moveEnd("character",i),n.moveStart("character",e),n};var Bs=function(t){t.select()};Is?Bs=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:xs&&(Bs=function(t){try{t.select()}catch(e){}});var $s=function(){this.id=null};$s.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var qs,Ys,Us=30,Xs={toString:function(){return"CodeMirror.Pass"}},Ks={scroll:!1},Vs={origin:"*mouse"},Gs={origin:"+move"},Qs=[""],Zs=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Js=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,ta=!1,ea=!1,ia=null,na=function(){function t(t){return t<=247?i.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1785?n.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function e(t,e,i){this.level=t,this.from=e,this.to=i}var i="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;return function(i,n){var c="ltr"==n?"L":"R";if(0==i.length||"ltr"==n&&!r.test(i))return!1;for(var u=i.length,h=[],d=0;d<u;++d)h.push(t(i.charCodeAt(d)));for(var p=0,f=c;p<u;++p){var m=h[p];"m"==m?h[p]=f:f=m}for(var v=0,y=c;v<u;++v){var b=h[v];"1"==b&&"r"==y?h[v]="n":s.test(b)&&(y=b,"r"==b&&(h[v]="R"))}for(var w=1,_=h[0];w<u-1;++w){var x=h[w];"+"==x&&"1"==_&&"1"==h[w+1]?h[w]="1":","!=x||_!=h[w+1]||"1"!=_&&"n"!=_||(h[w]=_),_=x}for(var k=0;k<u;++k){var C=h[k];if(","==C)h[k]="N";else if("%"==C){var T=void 0;for(T=k+1;T<u&&"%"==h[T];++T);for(var S=k&&"!"==h[k-1]||T<u&&"1"==h[T]?"1":"N",D=k;D<T;++D)h[D]=S;k=T-1}}for(var M=0,A=c;M<u;++M){var P=h[M];"L"==A&&"1"==P?h[M]="L":s.test(P)&&(A=P)}for(var I=0;I<u;++I)if(o.test(h[I])){var E=void 0;for(E=I+1;E<u&&o.test(h[E]);++E);for(var L="L"==(I?h[I-1]:c),N="L"==(E<u?h[E]:c),O=L==N?L?"L":"R":c,H=I;H<E;++H)h[H]=O;I=E-1}for(var W,z=[],R=0;R<u;)if(a.test(h[R])){var F=R;for(++R;R<u&&a.test(h[R]);++R);z.push(new e(0,F,R))}else{var j=R,B=z.length;for(++R;R<u&&"L"!=h[R];++R);for(var $=j;$<R;)if(l.test(h[$])){j<$&&z.splice(B,0,new e(1,j,$));var q=$;for(++$;$<R&&l.test(h[$]);++$);z.splice(B,0,new e(2,q,$)),j=$}else++$;j<R&&z.splice(B,0,new e(1,j,R))}return"ltr"==n&&(1==z[0].level&&(W=i.match(/^\s+/))&&(z[0].from=W[0].length,z.unshift(new e(0,0,W[0].length))),1==g(z).level&&(W=i.match(/\s+$/))&&(g(z).to-=W[0].length,z.push(new e(0,u-W[0].length,u)))),"rtl"==n?z.reverse():z}}(),ra=[],oa=function(t,e,i){if(t.addEventListener)t.addEventListener(e,i,!1);else if(t.attachEvent)t.attachEvent("on"+e,i);else{var n=t._handlers||(t._handlers={});n[e]=(n[e]||ra).concat(i)}},sa=function(){if(xs&&ks<9)return!1;var t=n("div");return"draggable"in t||"dragDrop"in t}(),aa=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,i=[],n=t.length;e<=n;){var r=t.indexOf("\n",e);r==-1&&(r=t.length);var o=t.slice(e,"\r"==t.charAt(r-1)?r-1:r),s=o.indexOf("\r");s!=-1?(i.push(o.slice(0,s)),e+=s+1):(i.push(o),e=r+1)}return i}:function(t){return t.split(/\r\n?|\n/)},la=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(e){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(i){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},ca=function(){var t=n("div");return"oncopy"in t||(t.setAttribute("oncopy","return;"),"function"==typeof t.oncopy)}(),ua=null,ha={},da={},pa={},fa=function(t,e,i){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};fa.prototype.eol=function(){return this.pos>=this.string.length},fa.prototype.sol=function(){return this.pos==this.lineStart},fa.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},fa.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},fa.prototype.eat=function(t){var e,i=this.string.charAt(this.pos);if(e="string"==typeof t?i==t:i&&(t.test?t.test(i):t(i)))return++this.pos,i},fa.prototype.eatWhile=function(t){for(var e=this.pos;this.eat(t););return this.pos>e},fa.prototype.eatSpace=function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},fa.prototype.skipToEnd=function(){this.pos=this.string.length},fa.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},fa.prototype.backUp=function(t){this.pos-=t},fa.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=h(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?h(this.string,this.lineStart,this.tabSize):0)},fa.prototype.indentation=function(){return h(this.string,null,this.tabSize)-(this.lineStart?h(this.string,this.lineStart,this.tabSize):0)},fa.prototype.match=function(t,e,i){if("string"!=typeof t){var n=this.string.slice(this.pos).match(t);return n&&n.index>0?null:(n&&e!==!1&&(this.pos+=n[0].length),n)}var r=function(t){return i?t.toLowerCase():t},o=this.string.substr(this.pos,t.length);if(r(o)==r(t))return e!==!1&&(this.pos+=t.length),!0},fa.prototype.current=function(){return this.string.slice(this.start,this.pos)},fa.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},fa.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},fa.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ga=function(t,e){this.state=t,this.lookAhead=e},ma=function(t,e,i,n){this.state=e,this.doc=t,this.line=i,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};ma.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},ma.prototype.baseToken=function(t){var e=this;if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)e.baseTokenPos+=2;var i=this.baseTokens[this.baseTokenPos+1];return{type:i&&i.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},ma.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ma.fromSaved=function(t,e,i){return e instanceof ga?new ma(t,Ut(t.mode,e.state),i,e.lookAhead):new ma(t,Ut(t.mode,e),i)},ma.prototype.save=function(t){var e=t!==!1?Ut(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ga(e,this.maxLookAhead):e};var va=function(t,e,i){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=i},ya=function(t,e,i){this.text=t,nt(this,e),this.height=i?i(this):1};ya.prototype.lineNo=function(){return I(this)},It(ya);var ba,wa={},_a={},xa=null,ka=null,Ca={left:0,right:0,top:0,bottom:0},Ta=function(t,e,i){this.cm=i;var r=this.vert=n("div",[n("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=n("div",[n("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=o.tabIndex=-1,t(r),t(o),oa(r,"scroll",function(){r.clientHeight&&e(r.scrollTop,"vertical")}),oa(o,"scroll",function(){o.clientWidth&&e(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,xs&&ks<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ta.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,i=t.scrollHeight>t.clientHeight+1,n=t.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=e?n+"px":"0";var r=t.viewHeight-(e?n:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=i?n+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(i?n:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?n:0,bottom:e?n:0}},Ta.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ta.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ta.prototype.zeroWidthHack=function(){var t=Ns&&!As?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new $s,this.disableVert=new $s},Ta.prototype.enableZeroWidthBar=function(t,e,i){function n(){var r=t.getBoundingClientRect(),o="vert"==i?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1);o!=t?t.style.pointerEvents="none":e.set(1e3,n)}t.style.pointerEvents="auto",e.set(1e3,n)},Ta.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Sa=function(){};Sa.prototype.update=function(){return{bottom:0,right:0}},Sa.prototype.setScrollLeft=function(){},Sa.prototype.setScrollTop=function(){},Sa.prototype.clear=function(){};var Da={"native":Ta,"null":Sa},Ma=0,Aa=function(t,e,i){var n=t.display;this.viewport=e,this.visible=Ri(n,t.doc,e),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=je(t),this.force=i,this.dims=_i(t),this.events=[]};Aa.prototype.signal=function(t,e){Pt(t,e)&&this.events.push(arguments)},Aa.prototype.finish=function(){for(var t=this,e=0;e<this.events.length;e++)Dt.apply(null,t.events[e])};var Pa=0,Ia=null;xs?Ia=-.53:ys?Ia=15:Ss?Ia=-.7:Ms&&(Ia=-1/3);var Ea=function(t,e){this.ranges=t,this.primIndex=e};Ea.prototype.primary=function(){return this.ranges[this.primIndex]},Ea.prototype.equals=function(t){var e=this;if(t==this)return!0;if(t.primIndex!=this.primIndex||t.ranges.length!=this.ranges.length)return!1;for(var i=0;i<this.ranges.length;i++){var n=e.ranges[i],r=t.ranges[i];if(!W(n.anchor,r.anchor)||!W(n.head,r.head))return!1}return!0},Ea.prototype.deepCopy=function(){for(var t=this,e=[],i=0;i<this.ranges.length;i++)e[i]=new La(z(t.ranges[i].anchor),z(t.ranges[i].head));return new Ea(e,this.primIndex)},Ea.prototype.somethingSelected=function(){for(var t=this,e=0;e<this.ranges.length;e++)if(!t.ranges[e].empty())return!0;return!1},Ea.prototype.contains=function(t,e){var i=this;e||(e=t);for(var n=0;n<this.ranges.length;n++){var r=i.ranges[n];if(H(e,r.from())>=0&&H(t,r.to())<=0)return n}return-1};var La=function(t,e){this.anchor=t,this.head=e};La.prototype.from=function(){return F(this.anchor,this.head)},La.prototype.to=function(){return R(this.anchor,this.head)},La.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Br.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var i=this,n=t,r=t+e;n<r;++n){var o=i.lines[n];i.height-=o.height,ae(o),_e(o,"delete")}this.lines.splice(t,e)},collapse:function(t){t.push.apply(t,this.lines)},insertInner:function(t,e,i){var n=this;this.height+=i,this.lines=this.lines.slice(0,t).concat(e).concat(this.lines.slice(t));for(var r=0;r<e.length;++r)e[r].parent=n},iterN:function(t,e,i){for(var n=this,r=t+e;t<r;++t)if(i(n.lines[t]))return!0}},$r.prototype={chunkSize:function(){return this.size},removeInner:function(t,e){var i=this;this.size-=e;for(var n=0;n<this.children.length;++n){var r=i.children[n],o=r.chunkSize();if(t<o){var s=Math.min(e,o-t),a=r.height;if(r.removeInner(t,s),i.height-=a-r.height,o==s&&(i.children.splice(n--,1),r.parent=null),0==(e-=s))break;t=0}else t-=o}if(this.size-e<25&&(this.children.length>1||!(this.children[0]instanceof Br))){var l=[];this.collapse(l),this.children=[new Br(l)],this.children[0].parent=this}},collapse:function(t){for(var e=this,i=0;i<this.children.length;++i)e.children[i].collapse(t)},insertInner:function(t,e,i){var n=this;this.size+=e.length,this.height+=i;for(var r=0;r<this.children.length;++r){var o=n.children[r],s=o.chunkSize();if(t<=s){if(o.insertInner(t,e,i),o.lines&&o.lines.length>50){for(var a=o.lines.length%25+25,l=a;l<o.lines.length;){var c=new Br(o.lines.slice(l,l+=25));o.height-=c.height,n.children.splice(++r,0,c),c.parent=n}o.lines=o.lines.slice(0,a),n.maybeSpill()}break}t-=s}},maybeSpill:function(){if(!(this.children.length<=10)){var t=this;do{var e=t.children.splice(t.children.length-5,5),i=new $r(e);if(t.parent){t.size-=i.size,t.height-=i.height;var n=d(t.parent.children,t);t.parent.children.splice(n+1,0,i)}else{var r=new $r(t.children);r.parent=t,t.children=[r,i],t=r}i.parent=t.parent}while(t.children.length>10);t.parent.maybeSpill()}},iterN:function(t,e,i){for(var n=this,r=0;r<this.children.length;++r){var o=n.children[r],s=o.chunkSize();if(t<s){var a=Math.min(e,s-t);if(o.iterN(t,a,i))return!0;if(0==(e-=a))break;t=0}else t-=s}}};var Na=function(t,e,i){var n=this;if(i)for(var r in i)i.hasOwnProperty(r)&&(n[r]=i[r]);this.doc=t,this.node=e};Na.prototype.clear=function(){var t=this,e=this.doc.cm,i=this.line.widgets,n=this.line,r=I(n);if(null!=r&&i){for(var o=0;o<i.length;++o)i[o]==t&&i.splice(o--,1);i.length||(n.widgets=null);var s=Oe(this);P(n,Math.max(0,n.height-s)),e&&(fn(e,function(){qr(e,n,-s),bn(e,r,"widget")}),_e(e,"lineWidgetCleared",e,this,r))}},Na.prototype.changed=function(){var t=this,e=this.height,i=this.doc.cm,n=this.line;this.height=null;var r=Oe(this)-e;r&&(vt(this.doc,n)||P(n,n.height+r),i&&fn(i,function(){i.curOp.forceUpdate=!0,qr(i,n,r),_e(i,"lineWidgetChanged",i,t,I(n))}))},It(Na);var Oa=0,Ha=function(t,e){this.lines=[],this.type=e,this.doc=t,this.id=++Oa};Ha.prototype.clear=function(){var t=this;if(!this.explicitlyCleared){var e=this.doc.cm,i=e&&!e.curOp;if(i&&sn(e),Pt(this,"clear")){var n=this.find();n&&_e(this,"clear",n.from,n.to)}for(var r=null,o=null,s=0;s<this.lines.length;++s){var a=t.lines[s],l=K(a.markedSpans,t);e&&!t.collapsed?bn(e,I(a),"text"):e&&(null!=l.to&&(o=I(a)),null!=l.from&&(r=I(a))),a.markedSpans=V(a.markedSpans,l),null==l.from&&t.collapsed&&!vt(t.doc,a)&&e&&P(a,bi(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var c=0;c<this.lines.length;++c){var u=dt(t.lines[c]),h=wt(u);h>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&yn(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Cr(e.doc)),e&&_e(e,"markerCleared",e,this,r,o),i&&an(e),this.parent&&this.parent.clear()}},Ha.prototype.find=function(t,e){var i=this;null==t&&"bookmark"==this.type&&(t=1);for(var n,r,o=0;o<this.lines.length;++o){var s=i.lines[o],a=K(s.markedSpans,i);if(null!=a.from&&(n=O(e?s:I(s),a.from),t==-1))return n;if(null!=a.to&&(r=O(e?s:I(s),a.to),1==t))return r}return n&&{from:n,to:r}},Ha.prototype.changed=function(){var t=this,e=this.find(-1,!0),i=this,n=this.doc.cm;e&&n&&fn(n,function(){var r=e.line,o=I(e.line),s=Xe(n,o);if(s&&(ti(s),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!vt(i.doc,r)&&null!=i.height){var a=i.height;i.height=null;var l=Oe(i)-a;l&&P(r,r.height+l)}_e(n,"markerChanged",n,t)})},Ha.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;e.maybeHiddenMarkers&&d(e.maybeHiddenMarkers,this)!=-1||(e.maybeUnhiddenMarkers||(e.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},Ha.prototype.detachLine=function(t){if(this.lines.splice(d(this.lines,t),1),!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;(e.maybeHiddenMarkers||(e.maybeHiddenMarkers=[])).push(this)}},It(Ha);var Wa=function(t,e){var i=this;this.markers=t,this.primary=e;for(var n=0;n<t.length;++n)t[n].parent=i};Wa.prototype.clear=function(){var t=this;if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)t.markers[e].clear();_e(this,"clear")}},Wa.prototype.find=function(t,e){return this.primary.find(t,e)},It(Wa);var za=0,Ra=function(t,e,i,n,r){if(!(this instanceof Ra))return new Ra(t,e,i,n,r);null==i&&(i=0),$r.call(this,[new Br([new ya("",null)])]),this.first=i,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=i;var o=O(i,0);this.sel=jn(o),this.history=new er(null),this.id=++za,this.modeOption=e,this.lineSep=n,this.direction="rtl"==r?"rtl":"ltr",this.extend=!1,"string"==typeof t&&(t=this.splitLines(t)),Gn(this,{from:o,to:o,text:t}),_r(this,jn(o),Ks)};Ra.prototype=b($r.prototype,{constructor:Ra,iter:function(t,e,i){i?this.iterN(t-this.first,e-t,i):this.iterN(this.first,this.first+this.size,t)},insert:function(t,e){for(var i=0,n=0;n<e.length;++n)i+=e[n].height;this.insertInner(t-this.first,e,i)},remove:function(t,e){this.removeInner(t-this.first,e)},getValue:function(t){var e=A(this,this.first,this.first+this.size);return t===!1?e:e.join(t||this.lineSeparator())},setValue:vn(function(t){var e=O(this.first,0),i=this.first+this.size-1;Ir(this,{from:e,to:O(i,D(this,i).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&Ki(this.cm,0,0),_r(this,jn(e),Ks)}),replaceRange:function(t,e,i,n){e=B(this,e),i=i?B(this,i):e,Wr(this,t,e,i,n)},getRange:function(t,e,i){var n=M(this,B(this,t),B(this,e));return i===!1?n:n.join(i||this.lineSeparator())},getLine:function(t){var e=this.getLineHandle(t);return e&&e.text},getLineHandle:function(t){if(L(this,t))return D(this,t)},getLineNumber:function(t){return I(t)},getLineHandleVisualStart:function(t){return"number"==typeof t&&(t=D(this,t)),dt(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return B(this,t)},getCursor:function(t){var e,i=this.sel.primary();return e=null==t||"head"==t?i.head:"anchor"==t?i.anchor:"end"==t||"to"==t||t===!1?i.to():i.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:vn(function(t,e,i){yr(this,B(this,"number"==typeof t?O(t,e||0):t),null,i)}),setSelection:vn(function(t,e,i){yr(this,B(this,t),B(this,e||t),i)}),extendSelection:vn(function(t,e,i){gr(this,B(this,t),e&&B(this,e),i)}),extendSelections:vn(function(t,e){mr(this,q(this,t),e)}),extendSelectionsBy:vn(function(t,e){var i=m(this.sel.ranges,t);mr(this,q(this,i),e)}),setSelections:vn(function(t,e,i){var n=this;if(t.length){for(var r=[],o=0;o<t.length;o++)r[o]=new La(B(n,t[o].anchor),B(n,t[o].head));null==e&&(e=Math.min(t.length-1,this.sel.primIndex)),_r(this,Fn(this.cm,r,e),i)}}),addSelection:vn(function(t,e,i){var n=this.sel.ranges.slice(0);n.push(new La(B(this,t),B(this,e||t))),_r(this,Fn(this.cm,n,n.length-1),i)}),getSelection:function(t){for(var e,i=this,n=this.sel.ranges,r=0;r<n.length;r++){var o=M(i,n[r].from(),n[r].to());e=e?e.concat(o):o}return t===!1?e:e.join(t||this.lineSeparator())},getSelections:function(t){for(var e=this,i=[],n=this.sel.ranges,r=0;r<n.length;r++){var o=M(e,n[r].from(),n[r].to());t!==!1&&(o=o.join(t||e.lineSeparator())),i[r]=o}return i},replaceSelection:function(t,e,i){for(var n=[],r=0;r<this.sel.ranges.length;r++)n[r]=t;this.replaceSelections(n,e,i||"+input")},replaceSelections:vn(function(t,e,i){for(var n=this,r=[],o=this.sel,s=0;s<o.ranges.length;s++){var a=o.ranges[s];r[s]={from:a.from(),to:a.to(),text:n.splitLines(t[s]),origin:i}}for(var l=e&&"end"!=e&&Un(this,r,e),c=r.length-1;c>=0;c--)Ir(n,r[c]);l?wr(this,l):this.cm&&Xi(this.cm)}),undo:vn(function(){Lr(this,"undo")}),redo:vn(function(){Lr(this,"redo")}),undoSelection:vn(function(){Lr(this,"undo",!0)}),redoSelection:vn(function(){Lr(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,i=0,n=0;n<t.done.length;n++)t.done[n].ranges||++e;for(var r=0;r<t.undone.length;r++)t.undone[r].ranges||++i;return{undo:e,redo:i}},clearHistory:function(){this.history=new er(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(t){return t&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(t){return this.history.generation==(t||this.cleanGeneration)},getHistory:function(){return{done:pr(this.history.done),undone:pr(this.history.undone)}},setHistory:function(t){var e=this.history=new er(this.history.maxGeneration);e.done=pr(t.done.slice(0),null,!0),e.undone=pr(t.undone.slice(0),null,!0)},setGutterMarker:vn(function(t,e,i){return jr(this,t,"gutter",function(t){var n=t.gutterMarkers||(t.gutterMarkers={});return n[e]=i,!i&&x(n)&&(t.gutterMarkers=null),!0})}),clearGutter:vn(function(t){var e=this;this.iter(function(i){i.gutterMarkers&&i.gutterMarkers[t]&&jr(e,i,"gutter",function(){return i.gutterMarkers[t]=null,x(i.gutterMarkers)&&(i.gutterMarkers=null),!0})})}),lineInfo:function(t){var e;if("number"==typeof t){if(!L(this,t))return null;if(e=t,t=D(this,t),!t)return null}else if(e=I(t),null==e)return null;return{line:e,handle:t,text:t.text,gutterMarkers:t.gutterMarkers,textClass:t.textClass,bgClass:t.bgClass,wrapClass:t.wrapClass,widgets:t.widgets}},addLineClass:vn(function(e,i,n){return jr(this,e,"gutter"==i?"gutter":"class",function(e){var r="text"==i?"textClass":"background"==i?"bgClass":"gutter"==i?"gutterClass":"wrapClass";if(e[r]){if(t(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0})}),removeLineClass:vn(function(e,i,n){return jr(this,e,"gutter"==i?"gutter":"class",function(e){var r="text"==i?"textClass":"background"==i?"bgClass":"gutter"==i?"gutterClass":"wrapClass",o=e[r];if(!o)return!1;if(null==n)e[r]=null;else{var s=o.match(t(n));if(!s)return!1;var a=s.index+s[0].length;e[r]=o.slice(0,s.index)+(s.index&&a!=o.length?" ":"")+o.slice(a)||null}return!0})}),addLineWidget:vn(function(t,e,i){return Yr(this,t,e,i)}),removeLineWidget:function(t){t.clear()},markText:function(t,e,i){return Ur(this,B(this,t),B(this,e),i,i&&i.type||"range")},setBookmark:function(t,e){var i={replacedWith:e&&(null==e.nodeType?e.widget:e),insertLeft:e&&e.insertLeft,clearWhenEmpty:!1,shared:e&&e.shared,handleMouseEvents:e&&e.handleMouseEvents};return t=B(this,t),Ur(this,t,t,i,"bookmark")},findMarksAt:function(t){t=B(this,t);var e=[],i=D(this,t.line).markedSpans;if(i)for(var n=0;n<i.length;++n){var r=i[n];(null==r.from||r.from<=t.ch)&&(null==r.to||r.to>=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,i){t=B(this,t),e=B(this,e);var n=[],r=t.line;return this.iter(t.line,e.line+1,function(o){var s=o.markedSpans;if(s)for(var a=0;a<s.length;a++){var l=s[a];null!=l.to&&r==t.line&&t.ch>=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch||i&&!i(l.marker)||n.push(l.marker.parent||l.marker)}++r}),n},getAllMarks:function(){var t=[];
return this.iter(function(e){var i=e.markedSpans;if(i)for(var n=0;n<i.length;++n)null!=i[n].from&&t.push(i[n].marker)}),t},posFromIndex:function(t){var e,i=this.first,n=this.lineSeparator().length;return this.iter(function(r){var o=r.text.length+n;return o>t?(e=t,!0):(t-=o,void++i)}),B(this,O(i,e))},indexFromPos:function(t){t=B(this,t);var e=t.ch;if(t.line<this.first||t.ch<0)return 0;var i=this.lineSeparator().length;return this.iter(this.first,t.line,function(t){e+=t.text.length+i}),e},copy:function(t){var e=new Ra(A(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return e.scrollTop=this.scrollTop,e.scrollLeft=this.scrollLeft,e.sel=this.sel,e.extend=!1,t&&(e.history.undoDepth=this.history.undoDepth,e.setHistory(this.getHistory())),e},linkedDoc:function(t){t||(t={});var e=this.first,i=this.first+this.size;null!=t.from&&t.from>e&&(e=t.from),null!=t.to&&t.to<i&&(i=t.to);var n=new Ra(A(this,e,i),t.mode||this.modeOption,e,this.lineSep,this.direction);return t.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:t.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:t.sharedHist}],Vr(n,Kr(this)),n},unlinkDoc:function(t){var e=this;if(t instanceof Vo&&(t=t.doc),this.linked)for(var i=0;i<this.linked.length;++i){var n=e.linked[i];if(n.doc==t){e.linked.splice(i,1),t.unlinkDoc(e),Gr(Kr(e));break}}if(t.history==this.history){var r=[t.id];Qn(t,function(t){return r.push(t.id)},!0),t.history=new er(null),t.history.done=pr(this.history.done,r),t.history.undone=pr(this.history.undone,r)}},iterLinkedDocs:function(t){Qn(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):aa(t)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:vn(function(t){"rtl"!=t&&(t="ltr"),t!=this.direction&&(this.direction=t,this.iter(function(t){return t.order=null}),this.cm&&tr(this.cm))})}),Ra.prototype.eachLine=Ra.prototype.iter;for(var Fa=0,ja=!1,Ba={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},$a=0;$a<10;$a++)Ba[$a+48]=Ba[$a+96]=String($a);for(var qa=65;qa<=90;qa++)Ba[qa]=String.fromCharCode(qa);for(var Ya=1;Ya<=12;Ya++)Ba[Ya+111]=Ba[Ya+63235]="F"+Ya;var Ua={};Ua.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ua.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ua.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ua.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ua["default"]=Ns?Ua.macDefault:Ua.pcDefault;var Xa={selectAll:Ar,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),Ks)},killLine:function(t){return po(t,function(e){if(e.empty()){var i=D(t.doc,e.head.line).text.length;return e.head.ch==i&&e.head.line<t.lastLine()?{from:e.head,to:O(e.head.line+1,0)}:{from:e.head,to:O(e.head.line,i)}}return{from:e.from(),to:e.to()}})},deleteLine:function(t){return po(t,function(e){return{from:O(e.from().line,0),to:B(t.doc,O(e.to().line+1,0))}})},delLineLeft:function(t){return po(t,function(t){return{from:O(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(t){return po(t,function(e){var i=t.charCoords(e.head,"div").top+5,n=t.coordsChar({left:0,top:i},"div");return{from:n,to:e.from()}})},delWrappedLineRight:function(t){return po(t,function(e){var i=t.charCoords(e.head,"div").top+5,n=t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:i},"div");return{from:e.from(),to:n}})},undo:function(t){return t.undo()},redo:function(t){return t.redo()},undoSelection:function(t){return t.undoSelection()},redoSelection:function(t){return t.redoSelection()},goDocStart:function(t){return t.extendSelection(O(t.firstLine(),0))},goDocEnd:function(t){return t.extendSelection(O(t.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy(function(e){return yo(t,e.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy(function(e){return wo(t,e.head)},{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy(function(e){return bo(t,e.head.line)},{origin:"+move",bias:-1})},goLineRight:function(t){return t.extendSelectionsBy(function(e){var i=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:i},"div")},Gs)},goLineLeft:function(t){return t.extendSelectionsBy(function(e){var i=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:0,top:i},"div")},Gs)},goLineLeftSmart:function(t){return t.extendSelectionsBy(function(e){var i=t.cursorCoords(e.head,"div").top+5,n=t.coordsChar({left:0,top:i},"div");return n.ch<t.getLine(n.line).search(/\S/)?wo(t,e.head):n},Gs)},goLineUp:function(t){return t.moveV(-1,"line")},goLineDown:function(t){return t.moveV(1,"line")},goPageUp:function(t){return t.moveV(-1,"page")},goPageDown:function(t){return t.moveV(1,"page")},goCharLeft:function(t){return t.moveH(-1,"char")},goCharRight:function(t){return t.moveH(1,"char")},goColumnLeft:function(t){return t.moveH(-1,"column")},goColumnRight:function(t){return t.moveH(1,"column")},goWordLeft:function(t){return t.moveH(-1,"word")},goGroupRight:function(t){return t.moveH(1,"group")},goGroupLeft:function(t){return t.moveH(-1,"group")},goWordRight:function(t){return t.moveH(1,"word")},delCharBefore:function(t){return t.deleteH(-1,"char")},delCharAfter:function(t){return t.deleteH(1,"char")},delWordBefore:function(t){return t.deleteH(-1,"word")},delWordAfter:function(t){return t.deleteH(1,"word")},delGroupBefore:function(t){return t.deleteH(-1,"group")},delGroupAfter:function(t){return t.deleteH(1,"group")},indentAuto:function(t){return t.indentSelection("smart")},indentMore:function(t){return t.indentSelection("add")},indentLess:function(t){return t.indentSelection("subtract")},insertTab:function(t){return t.replaceSelection("\t")},insertSoftTab:function(t){for(var e=[],i=t.listSelections(),n=t.options.tabSize,r=0;r<i.length;r++){var o=i[r].from(),s=h(t.getLine(o.line),o.ch,n);e.push(f(n-s%n))}t.replaceSelections(e)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){return fn(t,function(){for(var e=t.listSelections(),i=[],n=0;n<e.length;n++)if(e[n].empty()){var r=e[n].head,o=D(t.doc,r.line).text;if(o)if(r.ch==o.length&&(r=new O(r.line,r.ch-1)),r.ch>0)r=new O(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),O(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=D(t.doc,r.line-1).text;s&&(r=new O(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),O(r.line-1,s.length-1),r,"+transpose"))}i.push(new La(r,r))}t.setSelections(i)})},newlineAndIndent:function(t){return fn(t,function(){for(var e=t.listSelections(),i=e.length-1;i>=0;i--)t.replaceRange(t.doc.lineSeparator(),e[i].anchor,e[i].head,"+input");e=t.listSelections();for(var n=0;n<e.length;n++)t.indentLine(e[n].from().line,null,!0);Xi(t)})},openLine:function(t){return t.replaceSelection("\n","start")},toggleOverwrite:function(t){return t.toggleOverwrite()}},Ka=new $s,Va=null,Ga=400,Qa=function(t,e,i){this.time=t,this.pos=e,this.button=i};Qa.prototype.compare=function(t,e,i){return this.time+Ga>t&&0==H(e,this.pos)&&i==this.button};var Za,Ja,tl={toString:function(){return"CodeMirror.Init"}},el={},il={};Vo.defaults=el,Vo.optionHandlers=il;var nl=[];Vo.defineInitHook=function(t){return nl.push(t)};var rl=null,ol=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new $s,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ol.prototype.init=function(t){function e(t){if(!Mt(r,t)){if(r.somethingSelected())Zo({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=is(r);Zo({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation(function(){r.setSelections(e.ranges,0,Ks),r.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var i=rl.text.join("\n");if(t.clipboardData.setData("Text",i),t.clipboardData.getData("Text")==i)return void t.preventDefault()}var s=rs(),a=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),a.value=rl.text.join("\n");var l=document.activeElement;Bs(a),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==o&&n.showPrimarySelection()},50)}}var i=this,n=this,r=n.cm,o=n.div=t.lineDiv;ns(o,r.options.spellcheck),oa(o,"paste",function(t){Mt(r,t)||ts(t,r)||ks<=11&&setTimeout(gn(r,function(){return i.updateFromDOM()}),20)}),oa(o,"compositionstart",function(t){i.composing={data:t.data,done:!1}}),oa(o,"compositionupdate",function(t){i.composing||(i.composing={data:t.data,done:!1})}),oa(o,"compositionend",function(t){i.composing&&(t.data!=i.composing.data&&i.readFromDOMSoon(),i.composing.done=!0)}),oa(o,"touchstart",function(){return n.forceCompositionEnd()}),oa(o,"input",function(){i.composing||i.readFromDOMSoon()}),oa(o,"copy",e),oa(o,"cut",e)},ol.prototype.prepareSelection=function(){var t=Mi(this.cm,!1);return t.focus=this.cm.state.focused,t},ol.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},ol.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ol.prototype.showPrimarySelection=function(){var t=this.getSelection(),e=this.cm,i=e.doc.sel.primary(),n=i.from(),r=i.to();if(e.display.viewTo==e.display.viewFrom||n.line>=e.display.viewTo||r.line<e.display.viewFrom)return void t.removeAllRanges();var o=ds(e,t.anchorNode,t.anchorOffset),s=ds(e,t.focusNode,t.focusOffset);if(!o||o.bad||!s||s.bad||0!=H(F(o,s),n)||0!=H(R(o,s),r)){var a=e.display.view,l=n.line>=e.display.viewFrom&&ls(e,n)||{node:a[0].measure.map[2],offset:0},c=r.line<e.display.viewTo&&ls(e,r);if(!c){var u=a[a.length-1].measure,h=u.maps?u.maps[u.maps.length-1]:u.map;c={node:h[h.length-1],offset:h[h.length-2]-h[h.length-3]}}if(!l||!c)return void t.removeAllRanges();var d,p=t.rangeCount&&t.getRangeAt(0);try{d=zs(l.node,l.offset,c.offset,c.node)}catch(f){}d&&(!ys&&e.state.focused?(t.collapse(l.node,l.offset),d.collapsed||(t.removeAllRanges(),t.addRange(d))):(t.removeAllRanges(),t.addRange(d)),p&&null==t.anchorNode?t.addRange(p):ys&&this.startGracePeriod()),this.rememberSelection()}},ol.prototype.startGracePeriod=function(){var t=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){t.gracePeriod=!1,t.selectionChanged()&&t.cm.operation(function(){return t.cm.curOp.selectionChanged=!0})},20)},ol.prototype.showMultipleSelections=function(t){i(this.cm.display.cursorDiv,t.cursors),i(this.cm.display.selectionDiv,t.selection)},ol.prototype.rememberSelection=function(){var t=this.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},ol.prototype.selectionInEditor=function(){var t=this.getSelection();if(!t.rangeCount)return!1;var e=t.getRangeAt(0).commonAncestorContainer;return o(this.div,e)},ol.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},ol.prototype.blur=function(){this.div.blur()},ol.prototype.getField=function(){return this.div},ol.prototype.supportsTouch=function(){return!0},ol.prototype.receivedFocus=function(){function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}var e=this;this.selectionInEditor()?this.pollSelection():fn(this.cm,function(){return e.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,t)},ol.prototype.selectionChanged=function(){var t=this.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},ol.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var t=this.getSelection(),e=this.cm;if(Es&&Ss&&this.cm.options.gutters.length&&cs(t.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var i=ds(e,t.anchorNode,t.anchorOffset),n=ds(e,t.focusNode,t.focusOffset);i&&n&&fn(e,function(){_r(e.doc,jn(i,n),Ks),(i.bad||n.bad)&&(e.curOp.selectionChanged=!0)})}}},ol.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var t=this.cm,e=t.display,i=t.doc.sel.primary(),n=i.from(),r=i.to();if(0==n.ch&&n.line>t.firstLine()&&(n=O(n.line-1,D(t.doc,n.line-1).length)),r.ch==D(t.doc,r.line).text.length&&r.line<t.lastLine()&&(r=O(r.line+1,0)),n.line<e.viewFrom||r.line>e.viewTo-1)return!1;var o,s,a;n.line==e.viewFrom||0==(o=Si(t,n.line))?(s=I(e.view[0].line),a=e.view[0].node):(s=I(e.view[o].line),a=e.view[o-1].node.nextSibling);var l,c,u=Si(t,r.line);if(u==e.view.length-1?(l=e.viewTo-1,c=e.lineDiv.lastChild):(l=I(e.view[u+1].line)-1,c=e.view[u+1].node.previousSibling),!a)return!1;for(var h=t.doc.splitLines(hs(t,a,c,s,l)),d=M(t.doc,O(s,0),O(l,D(t.doc,l).text.length));h.length>1&&d.length>1;)if(g(h)==g(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),s++}for(var p=0,f=0,m=h[0],v=d[0],y=Math.min(m.length,v.length);p<y&&m.charCodeAt(p)==v.charCodeAt(p);)++p;for(var b=g(h),w=g(d),_=Math.min(b.length-(1==h.length?p:0),w.length-(1==d.length?p:0));f<_&&b.charCodeAt(b.length-f-1)==w.charCodeAt(w.length-f-1);)++f;if(1==h.length&&1==d.length&&s==n.line)for(;p&&p>n.ch&&b.charCodeAt(b.length-f-1)==w.charCodeAt(w.length-f-1);)p--,f++;h[h.length-1]=b.slice(0,b.length-f).replace(/^\u200b+/,""),h[0]=h[0].slice(p).replace(/\u200b+$/,"");var x=O(s,p),k=O(l,d.length?g(d).length-f:0);return h.length>1||h[0]||H(x,k)?(Wr(t.doc,h,x,k,"+input"),!0):void 0},ol.prototype.ensurePolled=function(){this.forceCompositionEnd()},ol.prototype.reset=function(){this.forceCompositionEnd()},ol.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ol.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()},80))},ol.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||fn(this.cm,function(){return yn(t.cm)})},ol.prototype.setUneditable=function(t){t.contentEditable="false"},ol.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||gn(this.cm,Jo)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},ol.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},ol.prototype.onContextMenu=function(){},ol.prototype.resetPosition=function(){},ol.prototype.needsContentAttribute=!0;var sl=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new $s,this.hasSelection=!1,this.composing=null};sl.prototype.init=function(t){function e(t){if(!Mt(r,t)){if(r.somethingSelected())Zo({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=is(r);Zo({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,Ks):(n.prevInput="",o.value=e.text.join("\n"),Bs(o))}"cut"==t.type&&(r.state.cutIncoming=!0)}}var i=this,n=this,r=this.cm;this.createField(t);var o=this.textarea;t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),Is&&(o.style.width="0px"),oa(o,"input",function(){xs&&ks>=9&&i.hasSelection&&(i.hasSelection=null),n.poll()}),oa(o,"paste",function(t){Mt(r,t)||ts(t,r)||(r.state.pasteIncoming=!0,n.fastPoll())}),oa(o,"cut",e),oa(o,"copy",e),oa(t.scroller,"paste",function(e){He(t,e)||Mt(r,e)||(r.state.pasteIncoming=!0,n.focus())}),oa(t.lineSpace,"selectstart",function(e){He(t,e)||Et(e)}),oa(o,"compositionstart",function(){var t=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),oa(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},sl.prototype.createField=function(t){this.wrapper=rs(),this.textarea=this.wrapper.firstChild},sl.prototype.prepareSelection=function(){var t=this.cm,e=t.display,i=t.doc,n=Mi(t);if(t.options.moveInputWithCursor){var r=ci(t,i.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),s=e.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+s.top-o.top)),n.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+s.left-o.left))}return n},sl.prototype.showSelection=function(t){var e=this.cm,n=e.display;i(n.cursorDiv,t.cursors),i(n.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},sl.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var i=e.getSelection();this.textarea.value=i,e.state.focused&&Bs(this.textarea),xs&&ks>=9&&(this.hasSelection=i)}else t||(this.prevInput=this.textarea.value="",xs&&ks>=9&&(this.hasSelection=null))}},sl.prototype.getField=function(){return this.textarea},sl.prototype.supportsTouch=function(){return!1},sl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Ls||s()!=this.textarea))try{this.textarea.focus()}catch(t){}},sl.prototype.blur=function(){this.textarea.blur()},sl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},sl.prototype.receivedFocus=function(){this.slowPoll()},sl.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},sl.prototype.fastPoll=function(){function t(){var n=i.poll();n||e?(i.pollingFast=!1,i.slowPoll()):(e=!0,i.polling.set(60,t))}var e=!1,i=this;i.pollingFast=!0,i.polling.set(20,t)},sl.prototype.poll=function(){var t=this,e=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||!e.state.focused||la(i)&&!n&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=i.value;if(r==n&&!e.somethingSelected())return!1;if(xs&&ks>=9&&this.hasSelection===r||Ns&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=r.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var s=0,a=Math.min(n.length,r.length);s<a&&n.charCodeAt(s)==r.charCodeAt(s);)++s;return fn(e,function(){Jo(e,r.slice(s),n.length-s,null,t.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?i.value=t.prevInput="":t.prevInput=r,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},sl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},sl.prototype.onKeyPress=function(){xs&&ks>=9&&(this.hasSelection=null),this.fastPoll()},sl.prototype.onContextMenu=function(t){function e(){if(null!=s.selectionStart){var t=r.somethingSelected(),e="​"+(t?s.value:"");s.value="⇚",s.value=e,n.prevInput=t?"":"​",s.selectionStart=1,s.selectionEnd=e.length,o.selForContextMenu=r.doc.sel}}function i(){if(n.contextMenuPending==i&&(n.contextMenuPending=!1,n.wrapper.style.cssText=h,s.style.cssText=u,xs&&ks<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=s.selectionStart)){(!xs||xs&&ks<9)&&e();var t=0,a=function(){o.selForContextMenu==r.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&"​"==n.prevInput?gn(r,Ar)(r):t++<10?o.detectingSelectAll=setTimeout(a,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(a,200)}}var n=this,r=n.cm,o=r.display,s=n.textarea;n.contextMenuPending&&n.contextMenuPending();var a=Ti(r,t),l=o.scroller.scrollTop;if(a&&!Ds){var c=r.options.resetSelectionOnContextMenu;c&&r.doc.sel.contains(a)==-1&&gn(r,_r)(r.doc,jn(a),Ks);var u=s.style.cssText,h=n.wrapper.style.cssText,d=n.wrapper.offsetParent.getBoundingClientRect();n.wrapper.style.cssText="position: static",s.style.cssText="position: absolute; width: 30px; height: 30px;\n      top: "+(t.clientY-d.top-5)+"px; left: "+(t.clientX-d.left-5)+"px;\n      z-index: 1000; background: "+(xs?"rgba(255, 255, 255, .05)":"transparent")+";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var p;if(Cs&&(p=window.scrollY),o.input.focus(),Cs&&window.scrollTo(null,p),o.input.reset(),r.somethingSelected()||(s.value=n.prevInput=" "),n.contextMenuPending=i,o.selForContextMenu=r.doc.sel,clearTimeout(o.detectingSelectAll),xs&&ks>=9&&e(),Fs){Ot(t);var f=function(){St(window,"mouseup",f),setTimeout(i,20)};oa(window,"mouseup",f)}else setTimeout(i,50)}},sl.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},sl.prototype.setUneditable=function(){},sl.prototype.needsContentAttribute=!1,Yo(Vo),os(Vo);var al="iter insert remove copy getEditor constructor".split(" ");for(var ll in Ra.prototype)Ra.prototype.hasOwnProperty(ll)&&d(al,ll)<0&&(Vo.prototype[ll]=function(t){return function(){return t.apply(this.doc,arguments)}}(Ra.prototype[ll]));return It(Ra),Vo.inputStyles={textarea:sl,contenteditable:ol},Vo.defineMode=function(t){Vo.defaults.mode||"null"==t||(Vo.defaults.mode=t),jt.apply(this,arguments)},Vo.defineMIME=Bt,Vo.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Vo.defineMIME("text/plain","null"),Vo.defineExtension=function(t,e){Vo.prototype[t]=e},Vo.defineDocExtension=function(t,e){Ra.prototype[t]=e},Vo.fromTextArea=fs,gs(Vo),Vo.version="5.42.2",Vo}),function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";function e(t){for(var e={},i=0;i<t.length;++i)e[t[i].toLowerCase()]=!0;return e}function i(t,e){for(var i,n=!1;null!=(i=t.next());){if(n&&"/"==i){e.tokenize=null;break}n="*"==i}return["comment","comment"]}t.defineMode("css",function(e,i){function n(t,e){return f=e,t}function r(t,e){var i=t.next();if(v[i]){var r=v[i](t,e);if(r!==!1)return r}return"@"==i?(t.eatWhile(/[\w\\\-]/),n("def",t.current())):"="==i||("~"==i||"|"==i)&&t.eat("=")?n(null,"compare"):'"'==i||"'"==i?(e.tokenize=o(i),e.tokenize(t,e)):"#"==i?(t.eatWhile(/[\w\\\-]/),n("atom","hash")):"!"==i?(t.match(/^\s*\w*/),n("keyword","important")):/\d/.test(i)||"."==i&&t.eat(/\d/)?(t.eatWhile(/[\w.%]/),n("number","unit")):"-"!==i?/[,+>*\/]/.test(i)?n(null,"select-op"):"."==i&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(i)?n(null,i):("u"==i||"U"==i)&&t.match(/rl(-prefix)?\(/i)||("d"==i||"D"==i)&&t.match("omain(",!0,!0)||("r"==i||"R"==i)&&t.match("egexp(",!0,!0)?(t.backUp(1),e.tokenize=s,n("property","word")):/[\w\\\-]/.test(i)?(t.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),n("number","unit")):t.match(/^-[\w\\\-]*/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):t.match(/^\w+-/)?n("meta","meta"):void 0}function o(t){return function(e,i){for(var r,o=!1;null!=(r=e.next());){if(r==t&&!o){")"==t&&e.backUp(1);break}o=!o&&"\\"==r}return(r==t||!o&&")"!=t)&&(i.tokenize=null),n("string","string")}}function s(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=o(")"),n(null,"(")}function a(t,e,i){this.type=t,this.indent=e,this.prev=i}function l(t,e,i,n){return t.context=new a(i,e.indentation()+(n===!1?0:m),t.context),i}function c(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function u(t,e,i){return I[i.context.type](t,e,i)}function h(t,e,i,n){for(var r=n||1;r>0;r--)i.context=i.context.prev;return u(t,e,i)}function d(t){var e=t.current().toLowerCase();g=D.hasOwnProperty(e)?"atom":S.hasOwnProperty(e)?"keyword":"variable"}var p=i.inline;i.propertyKeywords||(i=t.resolveMode("text/css"));var f,g,m=e.indentUnit,v=i.tokenHooks,y=i.documentTypes||{},b=i.mediaTypes||{},w=i.mediaFeatures||{},_=i.mediaValueKeywords||{},x=i.propertyKeywords||{},k=i.nonStandardPropertyKeywords||{},C=i.fontProperties||{},T=i.counterDescriptors||{},S=i.colorKeywords||{},D=i.valueKeywords||{},M=i.allowNested,A=i.lineComment,P=i.supportsAtComponent===!0,I={};return I.top=function(t,e,i){if("{"==t)return l(i,e,"block");if("}"==t&&i.context.prev)return c(i);if(P&&/@component/i.test(t))return l(i,e,"atComponentBlock");if(/^@(-moz-)?document$/i.test(t))return l(i,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(t))return l(i,e,"atBlock");if(/^@(font-face|counter-style)/i.test(t))return i.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return l(i,e,"at");if("hash"==t)g="builtin";else if("word"==t)g="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return l(i,e,"interpolation");if(":"==t)return"pseudo";if(M&&"("==t)return l(i,e,"parens")}return i.context.type},I.block=function(t,e,i){if("word"==t){var n=e.current().toLowerCase();return x.hasOwnProperty(n)?(g="property","maybeprop"):k.hasOwnProperty(n)?(g="string-2","maybeprop"):M?(g=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==t?"block":M||"hash"!=t&&"qualifier"!=t?I.top(t,e,i):(g="error","block")},I.maybeprop=function(t,e,i){return":"==t?l(i,e,"prop"):u(t,e,i)},I.prop=function(t,e,i){if(";"==t)return c(i);if("{"==t&&M)return l(i,e,"propBlock");if("}"==t||"{"==t)return h(t,e,i);if("("==t)return l(i,e,"parens");if("hash"!=t||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(e.current())){if("word"==t)d(e);else if("interpolation"==t)return l(i,e,"interpolation")}else g+=" error";return"prop"},I.propBlock=function(t,e,i){return"}"==t?c(i):"word"==t?(g="property","maybeprop"):i.context.type},I.parens=function(t,e,i){return"{"==t||"}"==t?h(t,e,i):")"==t?c(i):"("==t?l(i,e,"parens"):"interpolation"==t?l(i,e,"interpolation"):("word"==t&&d(e),"parens")},I.pseudo=function(t,e,i){return"meta"==t?"pseudo":"word"==t?(g="variable-3",i.context.type):u(t,e,i)},I.documentTypes=function(t,e,i){return"word"==t&&y.hasOwnProperty(e.current())?(g="tag",i.context.type):I.atBlock(t,e,i)},I.atBlock=function(t,e,i){if("("==t)return l(i,e,"atBlock_parens");if("}"==t||";"==t)return h(t,e,i);if("{"==t)return c(i)&&l(i,e,M?"block":"top");if("interpolation"==t)return l(i,e,"interpolation");if("word"==t){var n=e.current().toLowerCase();g="only"==n||"not"==n||"and"==n||"or"==n?"keyword":b.hasOwnProperty(n)?"attribute":w.hasOwnProperty(n)?"property":_.hasOwnProperty(n)?"keyword":x.hasOwnProperty(n)?"property":k.hasOwnProperty(n)?"string-2":D.hasOwnProperty(n)?"atom":S.hasOwnProperty(n)?"keyword":"error"}return i.context.type},I.atComponentBlock=function(t,e,i){return"}"==t?h(t,e,i):"{"==t?c(i)&&l(i,e,M?"block":"top",!1):("word"==t&&(g="error"),i.context.type)},I.atBlock_parens=function(t,e,i){return")"==t?c(i):"{"==t||"}"==t?h(t,e,i,2):I.atBlock(t,e,i)},I.restricted_atBlock_before=function(t,e,i){return"{"==t?l(i,e,"restricted_atBlock"):"word"==t&&"@counter-style"==i.stateArg?(g="variable","restricted_atBlock_before"):u(t,e,i)},I.restricted_atBlock=function(t,e,i){return"}"==t?(i.stateArg=null,c(i)):"word"==t?(g="@font-face"==i.stateArg&&!C.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==i.stateArg&&!T.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},I.keyframes=function(t,e,i){return"word"==t?(g="variable","keyframes"):"{"==t?l(i,e,"top"):u(t,e,i)},I.at=function(t,e,i){return";"==t?c(i):"{"==t||"}"==t?h(t,e,i):("word"==t?g="tag":"hash"==t&&(g="builtin"),"at")},I.interpolation=function(t,e,i){return"}"==t?c(i):"{"==t||";"==t?h(t,e,i):("word"==t?g="variable":"variable"!=t&&"("!=t&&")"!=t&&(g="error"),"interpolation")},{startState:function(t){return{tokenize:null,state:p?"block":"top",stateArg:null,context:new a(p?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var i=(e.tokenize||r)(t,e);return i&&"object"==typeof i&&(f=i[1],i=i[0]),g=i,"comment"!=f&&(e.state=I[e.state](f,t,e)),g},indent:function(t,e){var i=t.context,n=e&&e.charAt(0),r=i.indent;return"prop"!=i.type||"}"!=n&&")"!=n||(i=i.prev),i.prev&&("}"!=n||"block"!=i.type&&"top"!=i.type&&"interpolation"!=i.type&&"restricted_atBlock"!=i.type?(")"!=n||"parens"!=i.type&&"atBlock_parens"!=i.type)&&("{"!=n||"at"!=i.type&&"atBlock"!=i.type)||(r=Math.max(0,i.indent-m)):(i=i.prev,r=i.indent)),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:A,fold:"brace"}});var n=["domain","regexp","url","url-prefix"],r=e(n),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],s=e(o),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],l=e(a),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=e(c),h=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],d=e(h),p=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],f=e(p),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],m=e(g),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=e(v),b=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],w=e(b),_=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],x=e(_),k=n.concat(o).concat(a).concat(c).concat(h).concat(p).concat(b).concat(_);
t.registerHelper("hintWords","css",k),t.defineMIME("text/css",{documentTypes:r,mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:f,fontProperties:m,counterDescriptors:y,colorKeywords:w,valueKeywords:x,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=i,i(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:f,colorKeywords:w,valueKeywords:x,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=i,i(t,e)):["operator","operator"]},":":function(t){return!!t.match(/\s*\{/,!1)&&[null,null]},$:function(t){return t.match(/^[\w-]+/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(t){return!!t.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),t.defineMIME("text/x-less",{mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:f,colorKeywords:w,valueKeywords:x,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=i,i(t,e)):["operator","operator"]},"@":function(t){return t.eat("{")?[null,"interpolation"]:!t.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),t.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:s,mediaFeatures:l,propertyKeywords:d,nonStandardPropertyKeywords:f,fontProperties:m,counterDescriptors:y,colorKeywords:w,valueKeywords:x,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=i,i(t,e))}},name:"css",helperType:"gss"})}),function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../css/css"],t):t(CodeMirror)}(function(t){"use strict";t.defineMode("sass",function(e){function i(t){return new RegExp("^"+t.join("|"))}function n(t){return!t.peek()||t.match(/\s+$/,!1)}function r(t,e){var i=t.peek();return")"===i?(t.next(),e.tokenizer=u,"operator"):"("===i?(t.next(),t.eatSpace(),"operator"):"'"===i||'"'===i?(e.tokenizer=s(t.next()),"string"):(e.tokenizer=s(")",!1),"string")}function o(t,e){return function(i,n){return i.sol()&&i.indentation()<=t?(n.tokenizer=u,u(i,n)):(e&&i.skipTo("*/")?(i.next(),i.next(),n.tokenizer=u):i.skipToEnd(),"comment")}}function s(t,e){function i(r,o){var s=r.next(),l=r.peek(),c=r.string.charAt(r.pos-2),h="\\"!==s&&l===t||s===t&&"\\"!==c;return h?(s!==t&&e&&r.next(),n(r)&&(o.cursorHalf=0),o.tokenizer=u,"string"):"#"===s&&"{"===l?(o.tokenizer=a(i),r.next(),"operator"):"string"}return null==e&&(e=!0),i}function a(t){return function(e,i){return"}"===e.peek()?(e.next(),i.tokenizer=t,"operator"):u(e,i)}}function l(t){if(0==t.indentCount){t.indentCount++;var i=t.scopes[0].offset,n=i+e.indentUnit;t.scopes.unshift({offset:n})}}function c(t){1!=t.scopes.length&&t.scopes.shift()}function u(t,e){var i=t.peek();if(t.match("/*"))return e.tokenizer=o(t.indentation(),!0),e.tokenizer(t,e);if(t.match("//"))return e.tokenizer=o(t.indentation(),!1),e.tokenizer(t,e);if(t.match("#{"))return e.tokenizer=a(u),"operator";if('"'===i||"'"===i)return t.next(),e.tokenizer=s(i),"string";if(e.cursorHalf){if("#"===i&&(t.next(),t.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)))return n(t)&&(e.cursorHalf=0),"number";if(t.match(/^-?[0-9\.]+/))return n(t)&&(e.cursorHalf=0),"number";if(t.match(/^(px|em|in)\b/))return n(t)&&(e.cursorHalf=0),"unit";if(t.match(b))return n(t)&&(e.cursorHalf=0),"keyword";if(t.match(/^url/)&&"("===t.peek())return e.tokenizer=r,n(t)&&(e.cursorHalf=0),"atom";if("$"===i)return t.next(),t.eatWhile(/[\w-]/),n(t)&&(e.cursorHalf=0),"variable-2";if("!"===i)return t.next(),e.cursorHalf=0,t.match(/^[\w]+/)?"keyword":"operator";if(t.match(_))return n(t)&&(e.cursorHalf=0),"operator";if(t.eatWhile(/[\w-]/))return n(t)&&(e.cursorHalf=0),d=t.current().toLowerCase(),m.hasOwnProperty(d)?"atom":g.hasOwnProperty(d)?"keyword":f.hasOwnProperty(d)?(e.prevProp=t.current().toLowerCase(),"property"):"tag";if(n(t))return e.cursorHalf=0,null}else{if("-"===i&&t.match(/^-\w+-/))return"meta";if("."===i){if(t.next(),t.match(/^[\w-]+/))return l(e),"qualifier";if("#"===t.peek())return l(e),"tag"}if("#"===i){if(t.next(),t.match(/^[\w-]+/))return l(e),"builtin";if("#"===t.peek())return l(e),"tag"}if("$"===i)return t.next(),t.eatWhile(/[\w-]/),"variable-2";if(t.match(/^-?[0-9\.]+/))return"number";if(t.match(/^(px|em|in)\b/))return"unit";if(t.match(b))return"keyword";if(t.match(/^url/)&&"("===t.peek())return e.tokenizer=r,"atom";if("="===i&&t.match(/^=[\w-]+/))return l(e),"meta";if("+"===i&&t.match(/^\+[\w-]+/))return"variable-3";if("@"===i&&t.match(/@extend/)&&(t.match(/\s*[\w]/)||c(e)),t.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return l(e),"def";if("@"===i)return t.next(),t.eatWhile(/[\w-]/),"def";if(t.eatWhile(/[\w-]/)){if(t.match(/ *: *[\w-\+\$#!\("']/,!1)){d=t.current().toLowerCase();var h=e.prevProp+"-"+d;return f.hasOwnProperty(h)?"property":f.hasOwnProperty(d)?(e.prevProp=d,"property"):v.hasOwnProperty(d)?"property":"tag"}return t.match(/ *:/,!1)?(l(e),e.cursorHalf=1,e.prevProp=t.current().toLowerCase(),"property"):t.match(/ *,/,!1)?"tag":(l(e),"tag")}if(":"===i)return t.match(x)?"variable-3":(t.next(),e.cursorHalf=1,"operator")}return t.match(_)?"operator":(t.next(),null)}function h(t,i){t.sol()&&(i.indentCount=0);var n=i.tokenizer(t,i),r=t.current();if("@return"!==r&&"}"!==r||c(i),null!==n){for(var o=t.pos-r.length,s=o+e.indentUnit*i.indentCount,a=[],l=0;l<i.scopes.length;l++){var u=i.scopes[l];u.offset<=s&&a.push(u)}i.scopes=a}return n}var d,p=t.mimeModes["text/css"],f=p.propertyKeywords||{},g=p.colorKeywords||{},m=p.valueKeywords||{},v=p.fontProperties||{},y=["true","false","null","auto"],b=new RegExp("^"+y.join("|")),w=["\\(","\\)","=",">","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"],_=i(w),x=/^::?[a-zA-Z_][\w\-]*/;return{startState:function(){return{tokenizer:u,scopes:[{offset:0,type:"sass"}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(t,e){var i=h(t,e);return e.lastToken={style:i,content:t.current()},i},indent:function(t){return t.scopes[0].offset}}},"css"),t.defineMIME("text/x-sass","sass")});

Youez - 2016 - github.com/yon3zu
LinuXploit