diff --git a/src/command/KeyBindingManager.js b/src/command/KeyBindingManager.js index c22096e932b..769173bb899 100644 --- a/src/command/KeyBindingManager.js +++ b/src/command/KeyBindingManager.js @@ -406,13 +406,13 @@ define(function (require, exports, module) { // Ensure that the first letter of the key name is in upper case and the rest are // in lower case. i.e. 'a' => 'A' and 'up' => 'Up' if (/^[a-z]/i.test(key)) { - key = key.charAt(0).toUpperCase() + key.substr(1).toLowerCase(); + key = _.capitalize(key.toLowerCase()); } // Also make sure that the second word of PageUp/PageDown has the first letter in upper case. if (/^Page/.test(key)) { key = key.replace(/(up|down)$/, function (match, p1) { - return p1.charAt(0).toUpperCase() + p1.substr(1); + return _.capitalize(p1); }); } diff --git a/src/command/Menus.js b/src/command/Menus.js index a1803a5c706..d648f230725 100644 --- a/src/command/Menus.js +++ b/src/command/Menus.js @@ -957,7 +957,7 @@ define(function (require, exports, module) { menu = getMenu(id); _.forEach(menuItemMap, function (value, key) { - if (key.substring(0, id.length) === id) { + if (_.startsWith(key, id)) { if (value.isDivider) { menu.removeMenuDivider(key); } else { diff --git a/src/extensions/default/JavaScriptCodeHints/main.js b/src/extensions/default/JavaScriptCodeHints/main.js index 808d5fb5260..75dce2aaf3e 100644 --- a/src/extensions/default/JavaScriptCodeHints/main.js +++ b/src/extensions/default/JavaScriptCodeHints/main.js @@ -219,16 +219,7 @@ define(function (require, exports, module) { } // trim leading and trailing string literal delimiters from the query - if (query.indexOf(HintUtils.SINGLE_QUOTE) === 0 || - query.indexOf(HintUtils.DOUBLE_QUOTE) === 0) { - trimmedQuery = query.substring(1); - if (trimmedQuery.lastIndexOf(HintUtils.DOUBLE_QUOTE) === trimmedQuery.length - 1 || - trimmedQuery.lastIndexOf(HintUtils.SINGLE_QUOTE) === trimmedQuery.length - 1) { - trimmedQuery = trimmedQuery.substring(0, trimmedQuery.length - 1); - } - } else { - trimmedQuery = query; - } + trimmedQuery = _.trim(query, HintUtils.SINGLE_QUOTE + HintUtils.DOUBLE_QUOTE); if (hints) { formattedHints = formatHints(hints, trimmedQuery); diff --git a/src/language/CodeInspection.js b/src/language/CodeInspection.js index 8651c55ce22..372bf64b83e 100644 --- a/src/language/CodeInspection.js +++ b/src/language/CodeInspection.js @@ -422,7 +422,7 @@ define(function (require, exports, module) { (error.pos.line + 1) > 0 && (error.codeSnippet = currentDoc.getLine(error.pos.line)) !== undefined) { error.friendlyLine = error.pos.line + 1; - error.codeSnippet = error.codeSnippet.substr(0, Math.min(175, error.codeSnippet.length)); // limit snippet width + error.codeSnippet = error.codeSnippet.substr(0, 175); // limit snippet width } if (error.type !== Type.META) { diff --git a/src/preferences/PreferencesBase.js b/src/preferences/PreferencesBase.js index dab041642ab..045a08128b0 100644 --- a/src/preferences/PreferencesBase.js +++ b/src/preferences/PreferencesBase.js @@ -1140,7 +1140,7 @@ define(function (require, exports, module) { prefix = this.prefix; var onlyWithPrefix = function (id) { - if (id.substr(0, prefix.length) === prefix) { + if (_.startsWith(id, prefix)) { return true; } return false; diff --git a/src/preferences/PreferencesManager.js b/src/preferences/PreferencesManager.js index c866e636280..71dfe370d51 100644 --- a/src/preferences/PreferencesManager.js +++ b/src/preferences/PreferencesManager.js @@ -407,9 +407,9 @@ define(function (require, exports, module) { if (before === -1) { before = scopeOrder.length - 2; } - newScopeOrder = _.first(scopeOrder, before); + newScopeOrder = _.take(scopeOrder, before); newScopeOrder.push("project"); - newScopeOrder.push.apply(newScopeOrder, _.rest(scopeOrder, before)); + newScopeOrder.push.apply(newScopeOrder, _.drop(scopeOrder, before)); } else { newScopeOrder = _.without(scopeOrder, "project"); } diff --git a/src/project/FileTreeView.js b/src/project/FileTreeView.js index ac25bf04c1e..b111606e655 100644 --- a/src/project/FileTreeView.js +++ b/src/project/FileTreeView.js @@ -469,7 +469,7 @@ define(function (require, exports, module) { var aArgs = _.flatten([{ href: "#", className: fileClasses - }, this.getIcons(), name, extension], true); + }, this.getIcons(), name, extension]); nameDisplay = DOM.a.apply(DOM.a, aArgs); } @@ -702,7 +702,7 @@ define(function (require, exports, module) { var aArgs = _.flatten([{ href: "#", className: directoryClasses - }, this.getIcons()], true); + }, this.getIcons()]); if (!entry.get("rename")) { aArgs.push(this.props.name); } diff --git a/src/search/FindInFiles.js b/src/search/FindInFiles.js index 4f99f34d67c..8ca8894ca9d 100644 --- a/src/search/FindInFiles.js +++ b/src/search/FindInFiles.js @@ -135,7 +135,7 @@ define(function (require, exports, module) { if (highlightEndCh <= MAX_DISPLAY_LENGTH) { // Don't store more than 200 chars per line - line = line.substr(0, Math.min(MAX_DISPLAY_LENGTH, line.length)); + line = line.substr(0, MAX_DISPLAY_LENGTH); } else if (totalMatchLength > MAX_DISPLAY_LENGTH) { // impossible to display the whole match line = line.substr(ch, ch + MAX_DISPLAY_LENGTH); diff --git a/src/thirdparty/lodash.js b/src/thirdparty/lodash.js index 169d0cb7efb..9d8012402c1 100644 --- a/src/thirdparty/lodash.js +++ b/src/thirdparty/lodash.js @@ -1,56 +1,98 @@ /** * @license - * Lo-Dash 2.4.1 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE + * lodash 3.10.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE * Build: `lodash modern exports="amd"` */ -;(function(){function n(n,t,r){r=(r||0)-1;for(var e=n?n.length:0;++ra||typeof i=="undefined")return 1;if(ir?0:r);++e=b&&i===n,l=[];if(f){var p=o(e);p?(i=t,e=p):f=false}for(;++ui(e,p)&&l.push(p);return f&&c(e),l}function ut(n,t,r,e){e=(e||0)-1;for(var u=n?n.length:0,o=[];++e=b&&f===n,h=u||v?a():s; -for(v&&(h=o(h),f=t);++if(h,y))&&((u||v)&&h.push(y),s.push(g))}return v?(l(h.k),c(h)):u&&l(h),s}function lt(n){return function(t,r,e){var u={};r=Q.createCallback(r,e,3),e=-1;var o=t?t.length:0;if(typeof o=="number")for(;++er?Ir(0,o+r):r)||0,Fr(n)?i=-1o&&(o=a)}}else t=null==t&&kt(n)?e:Q.createCallback(t,r,3),St(n,function(n,r,e){r=t(n,r,e),r>u&&(u=r,o=n)});return o}function Dt(n,t,r,e){if(!n)return r;var u=3>arguments.length;t=Q.createCallback(t,e,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(r=n[++o]);++oarguments.length;return t=Q.createCallback(t,e,4),Et(n,function(n,e,o){r=u?(u=false,n):t(r,n,e,o)}),r}function Ft(n){var t=-1,r=n?n.length:0,e=Xt(typeof r=="number"?r:0);return St(n,function(n){var r=at(0,++t);e[t]=e[r],e[r]=n}),e}function Bt(n,t,r){var e;t=Q.createCallback(t,r,3),r=-1;var u=n?n.length:0;if(typeof u=="number")for(;++re?Ir(0,u+e):e||0}else if(e)return e=zt(t,r),t[e]===r?e:-1;return n(t,r,e)}function qt(n,t,r){if(typeof t!="number"&&null!=t){var e=0,u=-1,o=n?n.length:0;for(t=Q.createCallback(t,r,3);++u>>1,r(n[e])r?0:r);++t=v; -m?(i&&(i=vr(i)),s=f,a=n.apply(l,o)):i||(i=_r(e,v))}return m&&c?c=vr(c):c||t===h||(c=_r(u,t)),r&&(m=true,a=n.apply(l,o)),!m||c||i||(o=l=null),a}}function Ut(n){return n}function Gt(n,t,r){var e=true,u=t&&bt(t);t&&(r||u.length)||(null==r&&(r=t),o=X,t=n,n=Q,u=bt(t)),false===r?e=false:wt(r)&&"chain"in r&&(e=r.chain);var o=n,i=dt(o);St(u,function(r){var u=n[r]=t[r];i&&(o.prototype[r]=function(){var t=this.__chain__,r=this.__wrapped__,i=[r];if(br.apply(i,arguments),i=u.apply(n,i),e||t){if(r===i&&wt(i))return this; -i=new o(i),i.__chain__=t}return i})})}function Ht(){}function Jt(n){return function(t){return t[n]}}function Qt(){return this.__wrapped__}r=r?J.defaults(G.Object(),r,J.pick(G,A)):G;var Xt=r.Array,Yt=r.Boolean,Zt=r.Date,nr=r.Function,tr=r.Math,rr=r.Number,er=r.Object,ur=r.RegExp,or=r.String,ir=r.TypeError,ar=[],fr=er.prototype,lr=r._,cr=fr.toString,pr=ur("^"+or(cr).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),sr=tr.ceil,vr=r.clearTimeout,hr=tr.floor,gr=nr.prototype.toString,yr=vt(yr=er.getPrototypeOf)&&yr,mr=fr.hasOwnProperty,br=ar.push,_r=r.setTimeout,dr=ar.splice,wr=ar.unshift,jr=function(){try{var n={},t=vt(t=er.defineProperty)&&t,r=t(n,n,n)&&t -}catch(e){}return r}(),kr=vt(kr=er.create)&&kr,Cr=vt(Cr=Xt.isArray)&&Cr,xr=r.isFinite,Or=r.isNaN,Nr=vt(Nr=er.keys)&&Nr,Ir=tr.max,Sr=tr.min,Er=r.parseInt,Rr=tr.random,Ar={};Ar[$]=Xt,Ar[F]=Yt,Ar[B]=Zt,Ar[T]=nr,Ar[q]=er,Ar[W]=rr,Ar[z]=ur,Ar[P]=or,X.prototype=Q.prototype;var Dr=Q.support={};Dr.funcDecomp=!vt(r.a)&&E.test(s),Dr.funcNames=typeof nr.name=="string",Q.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:N,variable:"",imports:{_:Q}},kr||(nt=function(){function n(){}return function(t){if(wt(t)){n.prototype=t; -var e=new n;n.prototype=null}return e||r.Object()}}());var $r=jr?function(n,t){M.value=t,jr(n,"__bindData__",M)}:Ht,Fr=Cr||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&cr.call(n)==$||false},Br=Nr?function(n){return wt(n)?Nr(n):[]}:H,Tr={"&":"&","<":"<",">":">",'"':""","'":"'"},Wr=_t(Tr),qr=ur("("+Br(Wr).join("|")+")","g"),zr=ur("["+Br(Tr).join("")+"]","g"),Pr=yr?function(n){if(!n||cr.call(n)!=q)return false;var t=n.valueOf,r=vt(t)&&(r=yr(t))&&yr(r);return r?n==r||yr(n)==r:ht(n) -}:ht,Kr=lt(function(n,t,r){mr.call(n,r)?n[r]++:n[r]=1}),Lr=lt(function(n,t,r){(mr.call(n,r)?n[r]:n[r]=[]).push(t)}),Mr=lt(function(n,t,r){n[r]=t}),Vr=Rt,Ur=vt(Ur=Zt.now)&&Ur||function(){return(new Zt).getTime()},Gr=8==Er(d+"08")?Er:function(n,t){return Er(kt(n)?n.replace(I,""):n,t||0)};return Q.after=function(n,t){if(!dt(t))throw new ir;return function(){return 1>--n?t.apply(this,arguments):void 0}},Q.assign=U,Q.at=function(n){for(var t=arguments,r=-1,e=ut(t,true,false,1),t=t[2]&&t[2][t[1]]===n?1:e.length,u=Xt(t);++r=b&&o(e?r[e]:s)))}var p=r[0],h=-1,g=p?p.length:0,y=[];n:for(;++h(m?t(m,v):f(s,v))){for(e=u,(m||s).push(v);--e;)if(m=i[e],0>(m?t(m,v):f(r[e],v)))continue n;y.push(v)}}for(;u--;)(m=i[u])&&c(m);return l(i),l(s),y},Q.invert=_t,Q.invoke=function(n,t){var r=p(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=Xt(typeof o=="number"?o:0);return St(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},Q.keys=Br,Q.map=Rt,Q.mapValues=function(n,t,r){var e={}; -return t=Q.createCallback(t,r,3),h(n,function(n,r,u){e[r]=t(n,r,u)}),e},Q.max=At,Q.memoize=function(n,t){function r(){var e=r.cache,u=t?t.apply(this,arguments):m+arguments[0];return mr.call(e,u)?e[u]:e[u]=n.apply(this,arguments)}if(!dt(n))throw new ir;return r.cache={},r},Q.merge=function(n){var t=arguments,r=2;if(!wt(n))return n;if("number"!=typeof t[2]&&(r=t.length),3r?Ir(0,e+r):Sr(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},Q.mixin=Gt,Q.noConflict=function(){return r._=lr,this},Q.noop=Ht,Q.now=Ur,Q.parseInt=Gr,Q.random=function(n,t,r){var e=null==n,u=null==t;return null==r&&(typeof n=="boolean"&&u?(r=n,n=1):u||typeof t!="boolean"||(r=t,u=true)),e&&u&&(t=1),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=Rr(),Sr(n+r*(t-n+parseFloat("1e-"+((r+"").length-1))),t)):at(n,t) -},Q.reduce=Dt,Q.reduceRight=$t,Q.result=function(n,t){if(n){var r=n[t];return dt(r)?n[t]():r}},Q.runInContext=s,Q.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Br(n).length},Q.some=Bt,Q.sortedIndex=zt,Q.template=function(n,t,r){var e=Q.templateSettings;n=or(n||""),r=_({},r,e);var u,o=_({},r.imports,e.imports),e=Br(o),o=Ct(o),a=0,f=r.interpolate||S,l="__p+='",f=ur((r.escape||S).source+"|"+f.source+"|"+(f===N?C:S).source+"|"+(r.evaluate||S).source+"|$","g");n.replace(f,function(t,r,e,o,f,c){return e||(e=o),l+=n.slice(a,c).replace(R,i),r&&(l+="'+__e("+r+")+'"),f&&(u=true,l+="';"+f+";\n__p+='"),e&&(l+="'+((__t=("+e+"))==null?'':__t)+'"),a=c+t.length,t -}),l+="';",f=r=r.variable,f||(r="obj",l="with("+r+"){"+l+"}"),l=(u?l.replace(w,""):l).replace(j,"$1").replace(k,"$1;"),l="function("+r+"){"+(f?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";try{var c=nr(e,"return "+l).apply(v,o)}catch(p){throw p.source=l,p}return t?c(t):(c.source=l,c)},Q.unescape=function(n){return null==n?"":or(n).replace(qr,gt)},Q.uniqueId=function(n){var t=++y;return or(null==n?"":n)+t -},Q.all=Ot,Q.any=Bt,Q.detect=It,Q.findWhere=It,Q.foldl=Dt,Q.foldr=$t,Q.include=xt,Q.inject=Dt,Gt(function(){var n={};return h(Q,function(t,r){Q.prototype[r]||(n[r]=t)}),n}(),false),Q.first=Tt,Q.last=function(n,t,r){var e=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;for(t=Q.createCallback(t,r,3);o--&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n?n[u-1]:v;return p(n,Ir(0,u-e))},Q.sample=function(n,t,r){return n&&typeof n.length!="number"&&(n=Ct(n)),null==t||r?n?n[at(0,n.length-1)]:v:(n=Ft(n),n.length=Sr(Ir(0,t),n.length),n) -},Q.take=Tt,Q.head=Tt,h(Q,function(n,t){var r="sample"!==t;Q.prototype[t]||(Q.prototype[t]=function(t,e){var u=this.__chain__,o=n(this.__wrapped__,t,e);return u||null!=t&&(!e||r&&typeof t=="function")?new X(o,u):o})}),Q.VERSION="2.4.1",Q.prototype.chain=function(){return this.__chain__=true,this},Q.prototype.toString=function(){return or(this.__wrapped__)},Q.prototype.value=Qt,Q.prototype.valueOf=Qt,St(["join","pop","shift"],function(n){var t=ar[n];Q.prototype[n]=function(){var n=this.__chain__,r=t.apply(this.__wrapped__,arguments); -return n?new X(r,n):r}}),St(["push","reverse","sort","unshift"],function(n){var t=ar[n];Q.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),St(["concat","slice","splice"],function(n){var t=ar[n];Q.prototype[n]=function(){return new X(t.apply(this.__wrapped__,arguments),this.__chain__)}}),Q}var v,h=[],g=[],y=0,m=+new Date+"",b=75,_=40,d=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",w=/\b__p\+='';/g,j=/\b(__p\+=)''\+/g,k=/(__e\(.*?\)|\b__t\))\+'';/g,C=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,x=/\w*$/,O=/^\s*function[ \n\r\t]+\w/,N=/<%=([\s\S]+?)%>/g,I=RegExp("^["+d+"]*0+(?=.$)"),S=/($^)/,E=/\bthis\b/,R=/['\n\r\t\u2028\u2029\\]/g,A="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setTimeout".split(" "),D="[object Arguments]",$="[object Array]",F="[object Boolean]",B="[object Date]",T="[object Function]",W="[object Number]",q="[object Object]",z="[object RegExp]",P="[object String]",K={}; -K[T]=false,K[D]=K[$]=K[F]=K[B]=K[W]=K[q]=K[z]=K[P]=true;var L={leading:false,maxWait:0,trailing:false},M={configurable:false,enumerable:false,value:null,writable:false},V={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},U={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},G=V[typeof window]&&window||this,H=V[typeof global]&&global;!H||H.global!==H&&H.window!==H||(G=H);var J=s();typeof define=="function"&&typeof define.amd=="object"&&define.amd&& define(function(){return J -})}).call(this); \ No newline at end of file +;(function(){function n(n,t){if(n!==t){var r=null===n,e=n===w,u=n===n,o=null===t,i=t===w,f=t===t;if(n>t&&!o||!u||r&&!i&&f||e&&f)return 1;if(n=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n); +}function v(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r=F&&gu&&lu?new Dn(t):null,c=t.length;a&&(i=Mn,f=false,t=a);n:for(;++oi(t,a,0)&&u.push(a);return u}function at(n,t){var r=true;return Su(n,function(n,e,u){return r=!!t(n,e,u)}),r}function ct(n,t,r,e){var u=e,o=u;return Su(n,function(n,i,f){i=+t(n,i,f),(r(i,u)||i===e&&i===o)&&(u=i, +o=n)}),o}function lt(n,t){var r=[];return Su(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function st(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,false):void 0}),u}function pt(n,t,r,e){e||(e=[]);for(var u=-1,o=n.length;++ut&&(t=-t>u?0:u+t),r=r===w||r>u?u:+r||0,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Be(u);++e=c)break n;o=e[o],u*="asc"===o||true===o?1:-1;break n}u=t.b-r.b}return u})}function $t(n,t){ +var r=0;return Su(n,function(n,e,u){r+=+t(n,e,u)||0}),r}function St(n,t){var e=-1,u=xr(),o=n.length,i=u==r,f=i&&o>=F,a=f&&gu&&lu?new Dn(void 0):null,c=[];a?(u=Mn,i=false):(f=false,a=t?[]:c);n:for(;++eu(a,s,0)&&((t||f)&&a.push(s),c.push(l))}return c}function Ft(n,t){for(var r=-1,e=t.length,u=Be(e);++r>>1,i=n[o];(r?i<=t:iu?w:o,u=1);++e=F)return t.plant(e).value();for(var u=0,n=r?o[u].apply(this,n):e;++uarguments.length;return typeof e=="function"&&o===w&&Oo(r)?n(r,e,u,i):Ot(r,wr(e,o,4),u,i,t)}}function sr(n,t,r,e,u,o,i,f,a,c){function l(){for(var m=arguments.length,b=m,j=Be(m);b--;)j[b]=arguments[b];if(e&&(j=Mt(j,e,u)),o&&(j=qt(j,o,i)),_||y){var b=l.placeholder,k=v(j,b),m=m-k.length;if(mt?0:t)):[]}function Pr(n,t,r){var e=n?n.length:0;return e?((r?Ur(n,t,r):null==t)&&(t=1),t=e-(+t||0),Et(n,0,0>t?0:t)):[]}function Kr(n){return n?n[0]:w}function Vr(n,t,e){var u=n?n.length:0;if(!u)return-1;if(typeof e=="number")e=0>e?bu(u+e,0):e;else if(e)return e=Lt(n,t), +er?bu(u+r,0):r||0,typeof n=="string"||!Oo(n)&&be(n)?r<=u&&-1t?0:+t||0,e);++r=n&&(t=w),r}}function ae(n,t,r){function e(t,r){r&&iu(r),a=p=h=w,t&&(_=ho(),c=n.apply(s,f),p||a||(f=s=w))}function u(){var n=t-(ho()-l);0>=n||n>t?e(h,a):p=su(u,n)}function o(){e(g,p); +}function i(){if(f=arguments,l=ho(),s=this,h=g&&(p||!y),false===v)var r=y&&!p;else{a||y||(_=l);var e=v-(l-_),i=0>=e||e>v;i?(a&&(a=iu(a)),_=l,c=n.apply(s,f)):a||(a=su(o,e))}return i&&p?p=iu(p):p||t===v||(p=su(u,t)),r&&(i=true,c=n.apply(s,f)),!i||p||a||(f=s=w),c}var f,a,c,l,s,p,h,_=0,v=false,g=true;if(typeof n!="function")throw new Ge(L);if(t=0>t?0:+t||0,true===r)var y=true,g=false;else ge(r)&&(y=!!r.leading,v="maxWait"in r&&bu(+r.maxWait||0,t),g="trailing"in r?!!r.trailing:g);return i.cancel=function(){p&&iu(p),a&&iu(a), +_=0,a=p=h=w},i}function ce(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=n.apply(this,e),r.cache=o.set(u,e),e)}if(typeof n!="function"||t&&typeof t!="function")throw new Ge(L);return r.cache=new ce.Cache,r}function le(n,t){if(typeof n!="function")throw new Ge(L);return t=bu(t===w?n.length-1:+t||0,0),function(){for(var r=arguments,e=-1,u=bu(r.length-t,0),o=Be(u);++et}function pe(n){return h(n)&&Er(n)&&nu.call(n,"callee")&&!cu.call(n,"callee")}function he(n,t,r,e){return e=(r=typeof r=="function"?Bt(r,e,3):w)?r(n,t):w,e===w?dt(n,t,r):!!e}function _e(n){return h(n)&&typeof n.message=="string"&&ru.call(n)==P}function ve(n){return ge(n)&&ru.call(n)==K}function ge(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function ye(n){ +return null==n?false:ve(n)?uu.test(Qe.call(n)):h(n)&&Rn.test(n)}function de(n){return typeof n=="number"||h(n)&&ru.call(n)==V}function me(n){var t;if(!h(n)||ru.call(n)!=Z||pe(n)||!(nu.call(n,"constructor")||(t=n.constructor,typeof t!="function"||t instanceof t)))return false;var r;return ht(n,function(n,t){r=t}),r===w||nu.call(n,r)}function we(n){return ge(n)&&ru.call(n)==Y}function be(n){return typeof n=="string"||h(n)&&ru.call(n)==G}function xe(n){return h(n)&&Sr(n.length)&&!!Sn[ru.call(n)]}function Ae(n,t){ +return nt||!n||!mu(t))return r;do t%2&&(r+=n),t=yu(t/2),n+=n;while(t);return r}function We(n,t,r){var e=n;return(n=u(n))?(r?Ur(e,t,r):null==t)?n.slice(g(n),y(n)+1):(t+="",n.slice(o(n,t),i(n,t)+1)):n}function $e(n,t,r){return r&&Ur(n,t,r)&&(t=w),n=u(n),n.match(t||Wn)||[]}function Se(n,t,r){return r&&Ur(n,t,r)&&(t=w),h(n)?Ne(n):ut(n,t)}function Fe(n){ +return n}function Ne(n){return bt(ot(n,true))}function Te(n,t,r){if(null==r){var e=ge(t),u=e?zo(t):w;((u=u&&u.length?gt(t,u):w)?u.length:e)||(u=false,r=t,t=n,n=this)}u||(u=gt(t,zo(t)));var o=true,e=-1,i=ve(n),f=u.length;false===r?o=false:ge(r)&&"chain"in r&&(o=r.chain);for(;++e=$)return r}else n=0;return Lu(r,e)}}(),Mu=le(function(n,t){ +return h(n)&&Er(n)?ft(n,pt(t,false,true)):[]}),qu=tr(),Pu=tr(true),Ku=le(function(n){for(var t=n.length,e=t,u=Be(l),o=xr(),i=o==r,f=[];e--;){var a=n[e]=Er(a=n[e])?a:[];u[e]=i&&120<=a.length&&gu&&lu?new Dn(e&&a):null}var i=n[0],c=-1,l=i?i.length:0,s=u[0];n:for(;++c(s?Mn(s,a):o(f,a,0))){for(e=t;--e;){var p=u[e];if(0>(p?Mn(p,a):o(n[e],a,0)))continue n}s&&s.push(a),f.push(a)}return f}),Vu=le(function(t,r){r=pt(r);var e=rt(t,r);return It(t,r.sort(n)),e}),Zu=vr(),Yu=vr(true),Gu=le(function(n){return St(pt(n,false,true)); +}),Ju=le(function(n,t){return Er(n)?ft(n,t):[]}),Xu=le(Jr),Hu=le(function(n){var t=n.length,r=2--n?t.apply(this,arguments):void 0}},Nn.ary=function(n,t,r){return r&&Ur(n,t,r)&&(t=w),t=n&&null==t?n.length:bu(+t||0,0),gr(n,E,w,w,w,w,t)},Nn.assign=Co,Nn.at=no,Nn.before=fe,Nn.bind=_o,Nn.bindAll=vo,Nn.bindKey=go,Nn.callback=Se,Nn.chain=Qr,Nn.chunk=function(n,t,r){t=(r?Ur(n,t,r):null==t)?1:bu(yu(t)||1,1),r=0;for(var e=n?n.length:0,u=-1,o=Be(vu(e/t));rr&&(r=-r>u?0:u+r),e=e===w||e>u?u:+e||0,0>e&&(e+=u),u=r>e?0:e>>>0,r>>>=0;rt?0:t)):[]},Nn.takeRight=function(n,t,r){var e=n?n.length:0;return e?((r?Ur(n,t,r):null==t)&&(t=1),t=e-(+t||0),Et(n,0>t?0:t)):[]},Nn.takeRightWhile=function(n,t,r){ +return n&&n.length?Nt(n,wr(t,r,3),false,true):[]},Nn.takeWhile=function(n,t,r){return n&&n.length?Nt(n,wr(t,r,3)):[]},Nn.tap=function(n,t,r){return t.call(r,n),n},Nn.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new Ge(L);return false===r?e=false:ge(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),ae(n,t,{leading:e,maxWait:+t,trailing:u})},Nn.thru=ne,Nn.times=function(n,t,r){if(n=yu(n),1>n||!mu(n))return[];var e=-1,u=Be(xu(n,4294967295));for(t=Bt(t,r,1);++ee?u[e]=t(e):t(e); +return u},Nn.toArray=je,Nn.toPlainObject=ke,Nn.transform=function(n,t,r,e){var u=Oo(n)||xe(n);return t=wr(t,e,4),null==r&&(u||ge(n)?(e=n.constructor,r=u?Oo(n)?new e:[]:$u(ve(e)?e.prototype:w)):r={}),(u?Pn:_t)(n,function(n,e,u){return t(r,n,e,u)}),r},Nn.union=Gu,Nn.uniq=Gr,Nn.unzip=Jr,Nn.unzipWith=Xr,Nn.values=Ee,Nn.valuesIn=function(n){return Ft(n,Re(n))},Nn.where=function(n,t){return re(n,bt(t))},Nn.without=Ju,Nn.wrap=function(n,t){return t=null==t?Fe:t,gr(t,R,w,[n],[])},Nn.xor=function(){for(var n=-1,t=arguments.length;++nr?0:+r||0,e),r-=t.length,0<=r&&n.indexOf(t,r)==r},Nn.escape=function(n){return(n=u(n))&&hn.test(n)?n.replace(sn,c):n},Nn.escapeRegExp=function(n){return(n=u(n))&&bn.test(n)?n.replace(wn,l):n||"(?:)"},Nn.every=te,Nn.find=ro,Nn.findIndex=qu,Nn.findKey=$o,Nn.findLast=eo, +Nn.findLastIndex=Pu,Nn.findLastKey=So,Nn.findWhere=function(n,t){return ro(n,bt(t))},Nn.first=Kr,Nn.floor=ni,Nn.get=function(n,t,r){return n=null==n?w:yt(n,Dr(t),t+""),n===w?r:n},Nn.gt=se,Nn.gte=function(n,t){return n>=t},Nn.has=function(n,t){if(null==n)return false;var r=nu.call(n,t);if(!r&&!Wr(t)){if(t=Dr(t),n=1==t.length?n:yt(n,Et(t,0,-1)),null==n)return false;t=Zr(t),r=nu.call(n,t)}return r||Sr(n.length)&&Cr(t,n.length)&&(Oo(n)||pe(n))},Nn.identity=Fe,Nn.includes=ee,Nn.indexOf=Vr,Nn.inRange=function(n,t,r){ +return t=+t||0,r===w?(r=t,t=0):r=+r||0,n>=xu(t,r)&&nr?bu(e+r,0):xu(r||0,e-1))+1;else if(r)return u=Lt(n,t,true)-1,n=n[u],(t===t?t===n:n!==n)?u:-1; +if(t!==t)return p(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},Nn.lt=Ae,Nn.lte=function(n,t){return n<=t},Nn.max=ti,Nn.min=ri,Nn.noConflict=function(){return Kn._=eu,this},Nn.noop=Le,Nn.now=ho,Nn.pad=function(n,t,r){n=u(n),t=+t;var e=n.length;return er?0:+r||0,n.length),n.lastIndexOf(t,r)==r},Nn.sum=function(n,t,r){if(r&&Ur(n,t,r)&&(t=w),t=wr(t,r,3),1==t.length){n=Oo(n)?n:zr(n),r=n.length;for(var e=0;r--;)e+=+t(n[r])||0;n=e}else n=$t(n,t);return n},Nn.template=function(n,t,r){var e=Nn.templateSettings;r&&Ur(n,t,r)&&(t=r=w),n=u(n),t=nt(tt({},r||t),e,Qn),r=nt(tt({},t.imports),e.imports,Qn); +var o,i,f=zo(r),a=Ft(r,f),c=0;r=t.interpolate||Cn;var l="__p+='";r=Ze((t.escape||Cn).source+"|"+r.source+"|"+(r===gn?jn:Cn).source+"|"+(t.evaluate||Cn).source+"|$","g");var p="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,u,f,a){return e||(e=u),l+=n.slice(c,a).replace(Un,s),r&&(o=true,l+="'+__e("+r+")+'"),f&&(i=true,l+="';"+f+";\n__p+='"),e&&(l+="'+((__t=("+e+"))==null?'':__t)+'"),c=a+t.length,t}),l+="';",(t=t.variable)||(l="with(obj){"+l+"}"),l=(i?l.replace(fn,""):l).replace(an,"$1").replace(cn,"$1;"), +l="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}",t=Jo(function(){return qe(f,p+"return "+l).apply(w,a)}),t.source=l,_e(t))throw t;return t},Nn.trim=We,Nn.trimLeft=function(n,t,r){var e=n;return(n=u(n))?n.slice((r?Ur(e,t,r):null==t)?g(n):o(n,t+"")):n},Nn.trimRight=function(n,t,r){var e=n;return(n=u(n))?(r?Ur(e,t,r):null==t)?n.slice(0,y(n)+1):n.slice(0,i(n,t+"")+1):n; +},Nn.trunc=function(n,t,r){r&&Ur(n,t,r)&&(t=w);var e=U;if(r=W,null!=t)if(ge(t)){var o="separator"in t?t.separator:o,e="length"in t?+t.length||0:e;r="omission"in t?u(t.omission):r}else e=+t||0;if(n=u(n),e>=n.length)return n;if(e-=r.length,1>e)return r;if(t=n.slice(0,e),null==o)return t+r;if(we(o)){if(n.slice(e).search(o)){var i,f=n.slice(0,e);for(o.global||(o=Ze(o.source,(kn.exec(o)||"")+"g")),o.lastIndex=0;n=o.exec(f);)i=n.index;t=t.slice(0,null==i?e:i)}}else n.indexOf(o,e)!=e&&(o=t.lastIndexOf(o), +-1u.__dir__?"Right":"")}),u},zn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),Pn(["filter","map","takeWhile"],function(n,t){ +var r=t+1,e=r!=T;zn.prototype[n]=function(n,t){var u=this.clone();return u.__iteratees__.push({iteratee:wr(n,t,1),type:r}),u.__filtered__=u.__filtered__||e,u}}),Pn(["first","last"],function(n,t){var r="take"+(t?"Right":"");zn.prototype[n]=function(){return this[r](1).value()[0]}}),Pn(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");zn.prototype[n]=function(){return this.__filtered__?new zn(this):this[r](1)}}),Pn(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?bt:ze;zn.prototype[n]=function(n){ +return this[r](e(n))}}),zn.prototype.compact=function(){return this.filter(Fe)},zn.prototype.reject=function(n,t){return n=wr(n,t,1),this.filter(function(t){return!n(t)})},zn.prototype.slice=function(n,t){n=null==n?0:+n||0;var r=this;return r.__filtered__&&(0t)?new zn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==w&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r)},zn.prototype.takeRightWhile=function(n,t){return this.reverse().takeWhile(n,t).reverse()},zn.prototype.toArray=function(){return this.take(Ru); +},_t(zn.prototype,function(n,t){var r=/^(?:filter|map|reject)|While$/.test(t),e=/^(?:first|last)$/.test(t),u=Nn[e?"take"+("last"==t?"Right":""):t];u&&(Nn.prototype[t]=function(){function t(n){return e&&i?u(n,1)[0]:u.apply(w,Jn([n],o))}var o=e?[1]:arguments,i=this.__chain__,f=this.__wrapped__,a=!!this.__actions__.length,c=f instanceof zn,l=o[0],s=c||Oo(f);return s&&r&&typeof l=="function"&&1!=l.length&&(c=s=false),l={func:ne,args:[t],thisArg:w},a=c&&!a,e&&!i?a?(f=f.clone(),f.__actions__.push(l),n.call(f)):u.call(w,this.value())[0]:!e&&s?(f=a?f:new zn(this), +f=n.apply(f,o),f.__actions__.push(l),new Ln(f,i)):this.thru(t)})}),Pn("join pop push replace shift sort splice split unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?He:Je)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:join|pop|replace|shift)$/.test(n);Nn.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),_t(zn.prototype,function(n,t){var r=Nn[t];if(r){var e=r.name;(Wu[e]||(Wu[e]=[])).push({ +name:t,func:r})}}),Wu[sr(w,A).name]=[{name:"wrapper",func:w}],zn.prototype.clone=function(){var n=new zn(this.__wrapped__);return n.__actions__=qn(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=qn(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=qn(this.__views__),n},zn.prototype.reverse=function(){if(this.__filtered__){var n=new zn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},zn.prototype.value=function(){ +var n,t=this.__wrapped__.value(),r=this.__dir__,e=Oo(t),u=0>r,o=e?t.length:0;n=o;for(var i=this.__views__,f=0,a=-1,c=i.length;++ar.__dir__?n:n.reverse()}var t=this.__wrapped__; +if(t instanceof zn){var r=t;return this.__actions__.length&&(r=new zn(this)),r=r.reverse(),r.__actions__.push({func:ne,args:[n],thisArg:w}),new Ln(r,this.__chain__)}return this.thru(n)},Nn.prototype.toString=function(){return this.value()+""},Nn.prototype.run=Nn.prototype.toJSON=Nn.prototype.valueOf=Nn.prototype.value=function(){return Tt(this.__wrapped__,this.__actions__)},Nn.prototype.collect=Nn.prototype.map,Nn.prototype.head=Nn.prototype.first,Nn.prototype.select=Nn.prototype.filter,Nn.prototype.tail=Nn.prototype.rest, +Nn}var w,b="3.10.0",x=1,A=2,j=4,k=8,I=16,R=32,O=64,E=128,C=256,U=30,W="...",$=150,S=16,F=200,N=1,T=2,L="Expected a function",z="__lodash_placeholder__",B="[object Arguments]",D="[object Array]",M="[object Boolean]",q="[object Date]",P="[object Error]",K="[object Function]",V="[object Number]",Z="[object Object]",Y="[object RegExp]",G="[object String]",J="[object ArrayBuffer]",X="[object Float32Array]",H="[object Float64Array]",Q="[object Int8Array]",nn="[object Int16Array]",tn="[object Int32Array]",rn="[object Uint8Array]",en="[object Uint8ClampedArray]",un="[object Uint16Array]",on="[object Uint32Array]",fn=/\b__p\+='';/g,an=/\b(__p\+=)''\+/g,cn=/(__e\(.*?\)|\b__t\))\+'';/g,ln=/&(?:amp|lt|gt|quot|#39|#96);/g,sn=/[&<>"'`]/g,pn=RegExp(ln.source),hn=RegExp(sn.source),_n=/<%-([\s\S]+?)%>/g,vn=/<%([\s\S]+?)%>/g,gn=/<%=([\s\S]+?)%>/g,yn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,dn=/^\w*$/,mn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,wn=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,bn=RegExp(wn.source),xn=/[\u0300-\u036f\ufe20-\ufe23]/g,An=/\\(\\)?/g,jn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,kn=/\w*$/,In=/^0[xX]/,Rn=/^\[object .+?Constructor\]$/,On=/^\d+$/,En=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Cn=/($^)/,Un=/['\n\r\u2028\u2029\\]/g,Wn=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),$n="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout isFinite parseFloat parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap".split(" "),Sn={}; +Sn[X]=Sn[H]=Sn[Q]=Sn[nn]=Sn[tn]=Sn[rn]=Sn[en]=Sn[un]=Sn[on]=true,Sn[B]=Sn[D]=Sn[J]=Sn[M]=Sn[q]=Sn[P]=Sn[K]=Sn["[object Map]"]=Sn[V]=Sn[Z]=Sn[Y]=Sn["[object Set]"]=Sn[G]=Sn["[object WeakMap]"]=false;var Fn={};Fn[B]=Fn[D]=Fn[J]=Fn[M]=Fn[q]=Fn[X]=Fn[H]=Fn[Q]=Fn[nn]=Fn[tn]=Fn[V]=Fn[Z]=Fn[Y]=Fn[G]=Fn[rn]=Fn[en]=Fn[un]=Fn[on]=true,Fn[P]=Fn[K]=Fn["[object Map]"]=Fn["[object Set]"]=Fn["[object WeakMap]"]=false;var Nn={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a", +"\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y", +"\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Tn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Ln={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},zn={"function":true,object:true},Bn={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Dn={"\\":"\\", +"'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Mn=zn[typeof module]&&module&&!module.nodeType&&module,qn=zn[typeof self]&&self&&self.Object&&self,Pn=zn[typeof window]&&window&&window.Object&&window,Kn=zn[typeof exports]&&exports&&!exports.nodeType&&exports&&Mn&&typeof global=="object"&&global&&global.Object&&global||Pn!==(this&&this.window)&&Pn||qn||this,Vn=m();typeof define=="function"&&typeof define.amd=="object"&&define.amd&& define(function(){return Vn})}).call(this); \ No newline at end of file