siesta-lite
Version:
Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers
2 lines • 202 kB
JavaScript
!function e(t,n,r){function o(a,u){if(!n[a]){if(!t[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return o(n?n:e)},l,l.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e){var t=e("react"),n=e("./components/search.form.jsx"),r=e("./components/result.jsx"),o=document.getElementById("app"),i=t.createClass({displayName:"App",render:function(){return t.createElement("div",{className:"row"},t.createElement("div",{className:"column"},t.createElement(n,null),t.createElement(r,null)))}});t.render(t.createElement(i,null),o)},{"./components/result.jsx":6,"./components/search.form.jsx":7,react:165}],2:[function(e,t){var n=e("../dispatchers/app.dispatcher"),r=e("../constants/artwork.constants"),o={search:function(e){n.handleViewAction({actionType:r.SEARCH_ART,query:e})},clearResult:function(){n.handleViewAction({actionType:r.CLEAR_RESULT})}};t.exports=o},{"../constants/artwork.constants":8,"../dispatchers/app.dispatcher":10}],3:[function(e,t){var n=e("react"),r=n.createClass({displayName:"ErrorSumary",render:function(){var e=this.props.errors.map(function(e){return n.createElement("p",{key:e.id},e.msg)});return n.createElement("div",{className:"ui error form segment"},n.createElement("div",{className:"ui error message"},n.createElement("div",{className:"header"},"Errors: "),e))}});t.exports=r},{react:165}],4:[function(e,t){var n=e("react"),r=n.createClass({displayName:"ItemForArtWork",render:function(){function e(e,t){var n=".300x300-75";return"feature-movie"===t&&(n=".500x500-75"),e.replace(".100x100-75",n)}function t(e,t){var n,r;if("string"!=typeof e)return"";if(n=e.split(""),n.length>t){for(r=n.length-1;r>-1;--r)if(r>t)n.length=r;else if(" "===n[r]){n.length=r;break}n.push("...")}return n.join("")}return n.createElement("div",{className:"column",key:this.props.art.trackId},n.createElement("div",{className:"ui fluid card"},n.createElement("div",{className:"image"},n.createElement("img",{src:e(this.props.art.artworkUrl100,this.props.art.kind)})),n.createElement("div",{className:"content"},n.createElement("div",{className:"header"},this.props.art.trackName||this.props.art.artistName),n.createElement("div",{className:"meta"},n.createElement("a",null,this.props.art.releaseDate.split("-")[0]," | ",this.props.art.primaryGenreName)),n.createElement("div",{className:"description"},this.props.art.shortDescription||t(this.props.art.longDescription,100))),n.createElement("div",{className:"extra content"},n.createElement("div",{className:"ui bottom attached button",onClick:this.download},n.createElement("i",{className:"download icon"})," Download"))))},download:function(){var e=this.props.art.artworkUrl100.split("/"),t=e[e.length-1];e.pop();var n=e.join("/"),r=/\.\d*[x]\d*[-]?\d*/,o=t.replace(r,""),i=n+"/"+o,a=document.createElement("a");a.download=t,a.href=i,a.click()}});t.exports=r},{react:165}],5:[function(e,t){var n=e("react"),r=n.createClass({displayName:"ItemForSelect",render:function(){return n.createElement("div",{className:"item","data-value":this.props.val},n.createElement("i",{className:this.props.icon+" "+this.props.itemType}),this.props.label)}});t.exports=r},{react:165}],6:[function(e,t){var n=e("react"),r=e("../stores/artwork.store"),o=e("./item-for-artwork.jsx"),i=e("lodash"),a=n.createClass({displayName:"Result",getInitialState:function(){return{data:[],showEmpty:!1}},componentDidMount:function(){r.addChangeListener(this._onChange)},componentWillUnmount:function(){r.removeChangeListener(this._onChange)},_onChange:function(){this.setState({data:r.getResult(),showEmpty:!0})},render:function(){var e;return this.state.data.length>0?e=this.state.data.map(function(e){return n.createElement(o,{art:e,key:i.uniqueId()})}):this.state.showEmpty&&(e=n.createElement("div",{className:"ui text-center centered internally column"},n.createElement("p",{className:"ui orange label"},"No results found"))),n.createElement("div",{className:"ui three column grid"},e)}});t.exports=a},{"../stores/artwork.store":11,"./item-for-artwork.jsx":4,lodash:18,react:165}],7:[function(e,t){var n,r=e("react"),o=e("../actions/artwork.actions"),i=e("./item-for-select.jsx"),a=e("../stores/country.store"),u=e("../stores/entity.store"),s=e("./error-sumary.jsx"),c=e("../stores/artwork.store"),l=e("lodash"),p=r.createClass({displayName:"SearchForm",getInitialState:function(){return{errors:[]}},handlerSubmit:function(e){e.preventDefault();var t=this.refs.entity.getDOMNode().value.trim(),r=this.refs.term.getDOMNode().value.trim(),i=this.refs.country.getDOMNode().value.trim(),a={entity:t,country:i,term:r},u=this._validateForm(a);u.isValid?(n.removeClass("hide"),this.setState({errors:[]}),o.search(a)):this.setState({errors:u.errors})},componentDidMount:function(){$(this.refs.entityDropDown.getDOMNode()).dropdown(),$(this.refs.countryDropDown.getDOMNode()).dropdown(),n=$(this.refs.spinner.getDOMNode()),c.addChangeListener(this._onChange)},componentWillUnmount:function(){c.removeChangeListener(this._onChange)},_onChange:function(){n.addClass("hide")},render:function(){var e,t=l.map(a.getCountries(),function(e,t){return r.createElement(i,{val:t,label:e,key:t,icon:t,itemType:"flag"})}),n=l.map(u.getEntities(),function(e){return r.createElement(i,{val:e.id,label:e.label,icon:e.icon,key:e.id,itemType:"icon"})});return e=l.isEmpty(this.state.errors)?"":r.createElement(s,{errors:this.state.errors}),r.createElement("div",{className:"ui form segment"},r.createElement("div",null,r.createElement("form",{onSubmit:this.handlerSubmit},r.createElement("div",{className:"four fields"},r.createElement("div",{className:"field"},r.createElement("div",{className:"ui fluid search selection dropdown",ref:"entityDropDown"},r.createElement("input",{type:"hidden",ref:"entity"}),r.createElement("i",{className:"dropdown icon"}),r.createElement("div",{className:"default text"},"Select an Entity"),r.createElement("div",{className:"menu"},n))),r.createElement("div",{className:"field"},r.createElement("div",{className:"ui fluid search selection dropdown",ref:"countryDropDown"},r.createElement("input",{type:"hidden",ref:"country"}),r.createElement("i",{className:"dropdown icon"}),r.createElement("div",{className:"default text"},"Select a Country"),r.createElement("div",{className:"menu"},t))),r.createElement("div",{className:"field input"},r.createElement("input",{type:"text",ref:"term",placeholder:"Term"})),r.createElement("div",{className:"field"},r.createElement("button",{className:"fluid ui teal button"},"Search"))))),r.createElement("div",{className:"hide",ref:"spinner"},r.createElement("div",{className:"spinner"},r.createElement("div",{className:"rect1"}),r.createElement("div",{className:"rect2"}),r.createElement("div",{className:"rect3"}),r.createElement("div",{className:"rect4"}),r.createElement("div",{className:"rect5"}))),e)},_validateForm:function(e){var t={isValid:!0,errors:[]};return l.isEmpty(e.entity)&&t.errors.push({id:"entity",msg:"Please, select an entity."}),l.isEmpty(e.country)&&t.errors.push({id:"country",msg:"Please, select a country."}),l.isEmpty(e.term)&&t.errors.push({id:"term",msg:"Please, fill with a term."}),t.errors.length>0&&(t.isValid=!1),t}});t.exports=p},{"../actions/artwork.actions":2,"../stores/artwork.store":11,"../stores/country.store":12,"../stores/entity.store":13,"./error-sumary.jsx":3,"./item-for-select.jsx":5,lodash:18,react:165}],8:[function(e,t){var n=e("react/lib/keyMirror");t.exports=n({SEARCH_ART:null,CLEAR_RESULT:null})},{"react/lib/keyMirror":151}],9:[function(e,t){t.exports={api:"https://itunes.apple.com/search"}},{}],10:[function(e,t){var n=e("flux").Dispatcher,r=e("object-assign"),o=r(new n,{handleViewAction:function(e){this.dispatch({source:"VIEW_ACTION",action:e})}});t.exports=o},{flux:15,"object-assign":19}],11:[function(e,t){function n(e){var t=u.api+"?term="+e.term+"&country="+e.country+"&entity="+e.entity+"&callback=?",n=$.getJSON(t,function(){});n.done(function(e){c=e.results,l.emitChange()})}function r(){c=[],l.emitChange()}var o=e("../dispatchers/app.dispatcher"),i=e("events").EventEmitter,a=e("../constants/artwork.constants"),u=e("../constants/urls.constants"),s=e("object-assign"),c=[],l=s({},i.prototype,{getResult:function(){return c},emitChange:function(){this.emit("change")},addChangeListener:function(e){this.on("change",e)},removeChangeListener:function(e){this.removeListener("change",e)}});o.register(function(e){var t=e.action;switch(t.actionType){case a.SEARCH_ART:n(t.query);break;case a.CLEAR_RESULT:r();break;default:return!0}return!0}),t.exports=l},{"../constants/artwork.constants":8,"../constants/urls.constants":9,"../dispatchers/app.dispatcher":10,events:14,"object-assign":19}],12:[function(e,t){var n={us:"United States of America",gb:"United Kingdom",ca:"Canada",br:"Brazil",ae:"United Arab Emirates",ag:"Antigua and Barbuda",ai:"Anguilla",al:"Albania",am:"Armenia",ao:"Angola",ar:"Argentina",at:"Austria",au:"Australia",az:"Azerbaijan",bb:"Barbados",be:"Belgium",bf:"Burkina-Faso",bg:"Bulgaria",bh:"Bahrain",bj:"Benin",bm:"Bermuda",bn:"Brunei Darussalam",bo:"Bolivia",bs:"Bahamas",bt:"Bhutan",bw:"Botswana",by:"Belarus",bz:"Belize",cg:"Democratic Republic of the Congo",ch:"Switzerland",cl:"Chile",cn:"China",co:"Colombia",cr:"Costa Rica",cv:"Cape Verde",cy:"Cyprus",cz:"Czech Republic",de:"Germany",dk:"Denmark",dm:"Dominica","do":"Dominican Republic",dz:"Algeria",ec:"Ecuador",ee:"Estonia",eg:"Egypt",es:"Spain",fi:"Finland",fj:"Fiji",fm:"Federated States of Micronesia",fr:"France",gd:"Grenada",gh:"Ghana",gm:"Gambia",gr:"Greece",gt:"Guatemala",gw:"Guinea Bissau",gy:"Guyana",hk:"Hong Kong",hn:"Honduras",hr:"Croatia",hu:"Hungaria",id:"Indonesia",ie:"Ireland",il:"Israel","in":"India",is:"Iceland",it:"Italy",jm:"Jamaica",jo:"Jordan",jp:"Japan",ke:"Kenya",kg:"Krygyzstan",kh:"Cambodia",kn:"Saint Kitts and Nevis",kr:"South Korea",kw:"Kuwait",ky:"Cayman Islands",kz:"Kazakhstan",la:"Laos",lb:"Lebanon",lc:"Saint Lucia",lk:"Sri Lanka",lr:"Liberia",lt:"Lithuania",lu:"Luxembourg",lv:"Latvia",md:"Moldova",mg:"Madagascar",mk:"Macedonia",ml:"Mali",mn:"Mongolia",mo:"Macau",mr:"Mauritania",ms:"Montserrat",mt:"Malta",mu:"Mauritius",mw:"Malawi",mx:"Mexico",my:"Malaysia",mz:"Mozambique",na:"Namibia",ne:"Niger",ng:"Nigeria",ni:"Nicaragua",nl:"Netherlands",np:"Nepal",no:"Norway",nz:"New Zealand",om:"Oman",pa:"Panama",pe:"Peru",pg:"Papua New Guinea",ph:"Philippines",pk:"Pakistan",pl:"Poland",pt:"Portugal",pw:"Palau",py:"Paraguay",qa:"Qatar",ro:"Romania",ru:"Russia",sa:"Saudi Arabia",sb:"Soloman Islands",sc:"Seychelles",se:"Sweden",sg:"Singapore",si:"Slovenia",sk:"Slovakia",sl:"Sierra Leone",sn:"Senegal",sr:"Suriname",st:"Sao Tome e Principe",sv:"El Salvador",sz:"Swaziland",tc:"Turks and Caicos Islands",td:"Chad",th:"Thailand",tj:"Tajikistan",tm:"Turkmenistan",tn:"Tunisia",tr:"Turkey",tt:"Republic of Trinidad and Tobago",tw:"Taiwan",tz:"Tanzania",ua:"Ukraine",ug:"Uganda",uy:"Uruguay",uz:"Uzbekistan",vc:"Saint Vincent and the Grenadines",ve:"Venezuela",vg:"British Virgin Islands",vn:"Vietnam",ye:"Yemen",za:"South Africa",zw:"Zimbabwe"},r={getCountries:function(){return n}};t.exports=r},{}],13:[function(e,t){var n=[{id:"movie",label:"Movie",icon:"film"},{id:"album",label:"Album",icon:"music"},{id:"tvSeason",label:"TV Show",icon:"record"},{id:"ebook",label:"iBook",icon:"book"},{id:"id",label:"Apple ID (Movies)",icon:"apple"}],r={getEntities:function(){return n}};t.exports=r},{}],14:[function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function o(e){return"number"==typeof e}function i(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!o(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,o,u,s,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[e],a(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(o=arguments.length,u=new Array(o-1),s=1;o>s;s++)u[s-1]=arguments[s];n.apply(this,u)}else if(i(n)){for(o=arguments.length,u=new Array(o-1),s=1;o>s;s++)u[s-1]=arguments[s];for(c=n.slice(),o=c.length,s=0;o>s;s++)c[s].apply(this,u)}return!0},n.prototype.addListener=function(e,t){var o;if(!r(t))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?i(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,i(this._events[e])&&!this._events[e].warned){var o;o=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,o&&o>0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())}return this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),o||(o=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var o=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,o,a,u;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,o=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(n)){for(u=a;u-->0;)if(n[u]===t||n[u].listener&&n[u].listener===t){o=u;break}if(0>o)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.listenerCount=function(e,t){var n;return n=e._events&&e._events[t]?r(e._events[t])?1:e._events[t].length:0}},{}],15:[function(e,t){t.exports.Dispatcher=e("./lib/Dispatcher")},{"./lib/Dispatcher":16}],16:[function(e,t){"use strict";function n(){this.$Dispatcher_callbacks={},this.$Dispatcher_isPending={},this.$Dispatcher_isHandled={},this.$Dispatcher_isDispatching=!1,this.$Dispatcher_pendingPayload=null}var r=e("./invariant"),o=1,i="ID_";n.prototype.register=function(e){var t=i+o++;return this.$Dispatcher_callbacks[t]=e,t},n.prototype.unregister=function(e){r(this.$Dispatcher_callbacks[e],"Dispatcher.unregister(...): `%s` does not map to a registered callback.",e),delete this.$Dispatcher_callbacks[e]},n.prototype.waitFor=function(e){r(this.$Dispatcher_isDispatching,"Dispatcher.waitFor(...): Must be invoked while dispatching.");for(var t=0;t<e.length;t++){var n=e[t];this.$Dispatcher_isPending[n]?r(this.$Dispatcher_isHandled[n],"Dispatcher.waitFor(...): Circular dependency detected while waiting for `%s`.",n):(r(this.$Dispatcher_callbacks[n],"Dispatcher.waitFor(...): `%s` does not map to a registered callback.",n),this.$Dispatcher_invokeCallback(n))}},n.prototype.dispatch=function(e){r(!this.$Dispatcher_isDispatching,"Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch."),this.$Dispatcher_startDispatching(e);try{for(var t in this.$Dispatcher_callbacks)this.$Dispatcher_isPending[t]||this.$Dispatcher_invokeCallback(t)}finally{this.$Dispatcher_stopDispatching()}},n.prototype.isDispatching=function(){return this.$Dispatcher_isDispatching},n.prototype.$Dispatcher_invokeCallback=function(e){this.$Dispatcher_isPending[e]=!0,this.$Dispatcher_callbacks[e](this.$Dispatcher_pendingPayload),this.$Dispatcher_isHandled[e]=!0},n.prototype.$Dispatcher_startDispatching=function(e){for(var t in this.$Dispatcher_callbacks)this.$Dispatcher_isPending[t]=!1,this.$Dispatcher_isHandled[t]=!1;this.$Dispatcher_pendingPayload=e,this.$Dispatcher_isDispatching=!0},n.prototype.$Dispatcher_stopDispatching=function(){this.$Dispatcher_pendingPayload=null,this.$Dispatcher_isDispatching=!1},t.exports=n},{"./invariant":17}],17:[function(e,t){"use strict";var n=function(e,t,n,r,o,i,a,u){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,a,u],l=0;s=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return c[l++]}))}throw s.framesToPop=1,s}};t.exports=n},{}],18:[function(e,t,n){(function(e){(function(){function r(e,t){if(e!==t){var n=e===e,r=t===t;if(e>t||!n||"undefined"==typeof e&&r)return 1;if(t>e||!r||"undefined"==typeof t&&n)return-1}return 0}function o(e,t,n){if(t!==t)return v(e,n);for(var r=(n||0)-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}function i(e){return"function"==typeof e||!1}function a(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function u(e){return"string"==typeof e?e:null==e?"":e+""}function s(e){return e.charCodeAt(0)}function c(e,t){for(var n=-1,r=e.length;++n<r&&t.indexOf(e.charAt(n))>-1;);return n}function l(e,t){for(var n=e.length;n--&&t.indexOf(e.charAt(n))>-1;);return n}function p(e,t){return r(e.criteria,t.criteria)||e.index-t.index}function f(e,t){for(var n=-1,o=e.criteria,i=t.criteria,a=o.length;++n<a;){var u=r(o[n],i[n]);if(u)return u}return e.index-t.index}function d(e){return Ht[e]}function h(e){return Wt[e]}function m(e){return"\\"+Gt[e]}function v(e,t,n){for(var r=e.length,o=n?t||r:(t||0)-1;n?o--:++o<r;){var i=e[o];if(i!==i)return o}return-1}function g(e){return e&&"object"==typeof e||!1}function y(e){return 160>=e&&e>=9&&13>=e||32==e||160==e||5760==e||6158==e||e>=8192&&(8202>=e||8232==e||8233==e||8239==e||8287==e||12288==e||65279==e)}function E(e,t){for(var n=-1,r=e.length,o=-1,i=[];++n<r;)e[n]===t&&(e[n]=K,i[++o]=n);return i}function _(e,t){for(var n,r=-1,o=e.length,i=-1,a=[];++r<o;){var u=e[r],s=t?t(u,r,e):u;r&&n===s||(n=s,a[++i]=u)}return a}function C(e){for(var t=-1,n=e.length;++t<n&&y(e.charCodeAt(t)););return t}function R(e){for(var t=e.length;t--&&y(e.charCodeAt(t)););return t}function b(e){return Kt[e]}function M(e){function t(e){if(g(e)&&!Ju(e)&&!(e instanceof X)){if(e instanceof y)return e;if(nu.call(e,"__chain__")&&nu.call(e,"__wrapped__"))return Ur(e)}return new y(e)}function n(){}function y(e,t,n){this.__wrapped__=e,this.__actions__=n||[],this.__chain__=!!t}function X(e){this.__wrapped__=e,this.__actions__=null,this.__dir__=1,this.__dropCount__=0,this.__filtered__=!1,this.__iteratees__=null,this.__takeCount__=Iu,this.__views__=null}function tt(){var e=this.__actions__,t=this.__iteratees__,n=this.__views__,r=new X(this.__wrapped__);return r.__actions__=e?Zt(e):null,r.__dir__=this.__dir__,r.__dropCount__=this.__dropCount__,r.__filtered__=this.__filtered__,r.__iteratees__=t?Zt(t):null,r.__takeCount__=this.__takeCount__,r.__views__=n?Zt(n):null,r}function rt(){if(this.__filtered__){var e=new X(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Ht(){var e=this.__wrapped__.value();if(!Ju(e))return Xn(e,this.__actions__);var t=this.__dir__,n=0>t,r=_r(0,e.length,this.__views__),o=r.start,i=r.end,a=i-o,u=this.__dropCount__,s=xu(a,this.__takeCount__),c=n?i:o-1,l=this.__iteratees__,p=l?l.length:0,f=0,d=[];e:for(;a--&&s>f;){c+=t;for(var h=-1,m=e[c];++h<p;){var v=l[h],g=v.iteratee,y=g(m,c,e),E=v.type;if(E==V)m=y;else if(!y){if(E==B)continue e;break e}}u?u--:d[f++]=m}return d}function Wt(){this.__data__={}}function Kt(e){return this.has(e)&&delete this.__data__[e]}function zt(e){return"__proto__"==e?w:this.__data__[e]}function Gt(e){return"__proto__"!=e&&nu.call(this.__data__,e)}function qt(e,t){return"__proto__"!=e&&(this.__data__[e]=t),this}function Yt(e){var t=e?e.length:0;for(this.data={hash:Ru(null),set:new mu};t--;)this.push(e[t])}function Qt(e,t){var n=e.data,r="string"==typeof t||Ni(t)?n.set.has(t):n.hash[t];return r?0:-1}function Xt(e){var t=this.data;"string"==typeof e||Ni(e)?t.set.add(e):t.hash[e]=!0}function Zt(e,t){var n=-1,r=e.length;for(t||(t=Va(r));++n<r;)t[n]=e[n];return t}function en(e,t){for(var n=-1,r=e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function tn(e,t){for(var n=e.length;n--&&t(e[n],n,e)!==!1;);return e}function nn(e,t){for(var n=-1,r=e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function rn(e,t){for(var n=-1,r=e.length,o=-1,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[++o]=a)}return i}function on(e,t){for(var n=-1,r=e.length,o=Va(r);++n<r;)o[n]=t(e[n],n,e);return o}function an(e){for(var t=-1,n=e.length,r=Pu;++t<n;){var o=e[t];o>r&&(r=o)}return r}function un(e){for(var t=-1,n=e.length,r=Iu;++t<n;){var o=e[t];r>o&&(r=o)}return r}function sn(e,t,n,r){var o=-1,i=e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function cn(e,t,n,r){var o=e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function ln(e,t){for(var n=-1,r=e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function pn(e,t){return"undefined"==typeof e?t:e}function fn(e,t,n,r){return"undefined"!=typeof e&&nu.call(r,n)?e:t}function dn(e,t,n){var r=rs(t);if(!n)return mn(t,e,r);for(var o=-1,i=r.length;++o<i;){var a=r[o],u=e[a],s=n(u,t[a],a,e,t);(s===s?s===u:u!==u)&&("undefined"!=typeof u||a in e)||(e[a]=s)}return e}function hn(e,t){for(var n=-1,r=e.length,o=Dr(r),i=t.length,a=Va(i);++n<i;){var u=t[n];o?(u=parseFloat(u),a[n]=wr(u,r)?e[u]:w):a[n]=e[u]}return a}function mn(e,t,n){n||(n=t,t={});for(var r=-1,o=n.length;++r<o;){var i=n[r];t[i]=e[i]}return t}function vn(e,t){for(var n=-1,r=t.length;++n<r;){var o=t[n];e[o]=dr(e[o],D,e)}return e}function gn(e,t,n){var r=typeof e;return"function"==r?"undefined"!=typeof t&&Mr(e)?er(e,t,n):e:null==e?Ta:"object"==r?Fn(e):"undefined"==typeof t?Wn(e+""):Bn(e+"",t)}function yn(e,t,n,r,o,i,a){var u;if(n&&(u=o?n(e,r,o):n(e)),"undefined"!=typeof u)return u;if(!Ni(e))return e;var s=Ju(e);if(s){if(u=Cr(e),!t)return Zt(e,u)}else{var c=ou.call(e),l=c==Q;if(c!=Z&&c!=z&&(!l||o))return Bt[c]?br(e,c,t):o?e:{};if(u=Rr(l?{}:e),!t)return mn(e,u,rs(e))}i||(i=[]),a||(a=[]);for(var p=i.length;p--;)if(i[p]==e)return a[p];return i.push(e),a.push(u),(s?en:Pn)(e,function(r,o){u[o]=yn(r,t,n,o,e,i,a)}),u}function En(e,t,n,r){if("function"!=typeof e)throw new Qa(W);return vu(function(){e.apply(w,$n(n,r))},t)}function _n(e,t){var n=e?e.length:0,r=[];if(!n)return r;var i=-1,a=Er(),u=a==o,s=u&&t.length>=200?Hu(t):null,c=t.length;s&&(a=Qt,u=!1,t=s);e:for(;++i<n;){var l=e[i];if(u&&l===l){for(var p=c;p--;)if(t[p]===l)continue e;r.push(l)}else a(t,l)<0&&r.push(l)}return r}function Cn(e,t){var n=e?e.length:0;if(!Dr(n))return Pn(e,t);for(var r=-1,o=Lr(e);++r<n&&t(o[r],r,o)!==!1;);return e}function Rn(e,t){var n=e?e.length:0;if(!Dr(n))return In(e,t);for(var r=Lr(e);n--&&t(r[n],n,r)!==!1;);return e}function bn(e,t){var n=!0;return Cn(e,function(e,r,o){return n=!!t(e,r,o)}),n}function Mn(e,t,n,r){var o=e.length;for(n=null==n?0:+n||0,0>n&&(n=-n>o?0:o+n),r="undefined"==typeof r||r>o?o:+r||0,0>r&&(r+=o),o=n>r?0:r>>>0,n>>>=0;o>n;)e[n++]=t;return e}function wn(e,t){var n=[];return Cn(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}function xn(e,t,n,r){var o;return n(e,function(e,n,i){return t(e,n,i)?(o=r?n:e,!1):void 0}),o}function Dn(e,t,n,r){for(var o=(r||0)-1,i=e.length,a=-1,u=[];++o<i;){var s=e[o];if(g(s)&&Dr(s.length)&&(Ju(s)||Ri(s))){t&&(s=Dn(s,t,n));var c=-1,l=s.length;for(u.length+=l;++c<l;)u[++a]=s[c]}else n||(u[++a]=s)}return u}function On(e,t,n){for(var r=-1,o=Lr(e),i=n(e),a=i.length;++r<a;){var u=i[r];if(t(o[u],u,o)===!1)break}return e}function Nn(e,t,n){for(var r=Lr(e),o=n(e),i=o.length;i--;){var a=o[i];if(t(r[a],a,r)===!1)break}return e}function Tn(e,t){return On(e,t,Ji)}function Pn(e,t){return On(e,t,rs)}function In(e,t){return Nn(e,t,rs)}function Sn(e,t){for(var n=-1,r=t.length,o=-1,i=[];++n<r;){var a=t[n];es(e[a])&&(i[++o]=a)}return i}function kn(e,t,n){var r=-1,o="function"==typeof t,i=e?e.length:0,a=Dr(i)?Va(i):[];return Cn(e,function(e){var i=o?t:null!=e&&e[t];a[++r]=i?i.apply(e,n):w}),a}function An(e,t,n,r,o,i){if(e===t)return 0!==e||1/e==1/t;var a=typeof e,u=typeof t;return"function"!=a&&"object"!=a&&"function"!=u&&"object"!=u||null==e||null==t?e!==e&&t!==t:Ln(e,t,An,n,r,o,i)}function Ln(e,t,n,r,o,i,a){var u=Ju(e),s=Ju(t),c=G,l=G;u||(c=ou.call(e),c==z?c=Z:c!=Z&&(u=Ui(e))),s||(l=ou.call(t),l==z?l=Z:l!=Z&&(s=Ui(t)));var p=c==Z,f=l==Z,d=c==l;if(d&&!u&&!p)return mr(e,t,c);var h=p&&nu.call(e,"__wrapped__"),m=f&&nu.call(t,"__wrapped__");if(h||m)return n(h?e.value():e,m?t.value():t,r,o,i,a);if(!d)return!1;i||(i=[]),a||(a=[]);for(var v=i.length;v--;)if(i[v]==e)return a[v]==t;i.push(e),a.push(t);var g=(u?hr:vr)(e,t,n,r,o,i,a);return i.pop(),a.pop(),g}function Un(e,t,n,r,o){var i=t.length;if(null==e)return!i;for(var a=-1,u=!o;++a<i;)if(u&&r[a]?n[a]!==e[t[a]]:!nu.call(e,t[a]))return!1;for(a=-1;++a<i;){var s=t[a];if(u&&r[a])var c=nu.call(e,s);else{var l=e[s],p=n[a];c=o?o(l,p,s):w,"undefined"==typeof c&&(c=An(p,l,o,!0))}if(!c)return!1}return!0}function jn(e,t){var n=[];return Cn(e,function(e,r,o){n.push(t(e,r,o))}),n}function Fn(e){var t=rs(e),n=t.length;if(1==n){var r=t[0],o=e[r];if(Or(o))return function(e){return null!=e&&e[r]===o&&nu.call(e,r)}}for(var i=Va(n),a=Va(n);n--;)o=e[t[n]],i[n]=o,a[n]=Or(o);return function(e){return Un(e,t,i,a)}}function Bn(e,t){return Or(t)?function(n){return null!=n&&n[e]===t}:function(n){return null!=n&&An(t,n[e],null,!0)}}function Vn(e,t,n,r,o){if(!Ni(e))return e;var i=Dr(t.length)&&(Ju(t)||Ui(t));return(i?en:Pn)(t,function(t,a,u){if(g(t))return r||(r=[]),o||(o=[]),Hn(e,u,a,Vn,n,r,o);var s=e[a],c=n?n(s,t,a,e,u):w,l="undefined"==typeof c;l&&(c=t),!i&&"undefined"==typeof c||!l&&(c===c?c===s:s!==s)||(e[a]=c)}),e}function Hn(e,t,n,r,o,i,a){for(var u=i.length,s=t[n];u--;)if(i[u]==s)return void(e[n]=a[u]);var c=e[n],l=o?o(c,s,n,e,t):w,p="undefined"==typeof l;p&&(l=s,Dr(s.length)&&(Ju(s)||Ui(s))?l=Ju(c)?c:c?Zt(c):[]:ts(s)||Ri(s)?l=Ri(c)?Bi(c):ts(c)?c:{}:p=!1),i.push(s),a.push(l),p?e[n]=r(l,s,o,i,a):(l===l?l!==c:c===c)&&(e[n]=l)}function Wn(e){return function(t){return null==t?w:t[e]}}function Kn(e,t){var n=t.length,o=hn(e,t);for(t.sort(r);n--;){var i=parseFloat(t[n]);if(i!=a&&wr(i)){var a=i;gu.call(e,i,1)}}return o}function zn(e,t){return e+pu(Tu()*(t-e+1))}function Gn(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}function $n(e,t,n){var r=-1,o=e.length;t=null==t?0:+t||0,0>t&&(t=-t>o?0:o+t),n="undefined"==typeof n||n>o?o:+n||0,0>n&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Va(o);++r<o;)i[r]=e[r+t];return i}function qn(e,t){var n;return Cn(e,function(e,r,o){return n=t(e,r,o),!n}),!!n}function Yn(e,t){var n=-1,r=Er(),i=e.length,a=r==o,u=a&&i>=200,s=u?Hu():null,c=[];s?(r=Qt,a=!1):(u=!1,s=t?[]:c);e:for(;++n<i;){var l=e[n],p=t?t(l,n,e):l;if(a&&l===l){for(var f=s.length;f--;)if(s[f]===p)continue e;t&&s.push(p),c.push(l)}else r(s,p)<0&&((t||u)&&s.push(p),c.push(l))}return c}function Qn(e,t){for(var n=-1,r=t.length,o=Va(r);++n<r;)o[n]=e[t[n]];return o}function Xn(e,t){var n=e;n instanceof X&&(n=n.value());for(var r=-1,o=t.length;++r<o;){var i=[n],a=t[r];du.apply(i,a.args),n=a.func.apply(a.thisArg,i)}return n}function Jn(e,t,n){var r=0,o=e?e.length:r;if("number"==typeof t&&t===t&&Au>=o){for(;o>r;){var i=r+o>>>1,a=e[i];(n?t>=a:t>a)?r=i+1:o=i}return o}return Zn(e,t,Ta,n)}function Zn(e,t,n,r){t=n(t);for(var o=0,i=e?e.length:0,a=t!==t,u="undefined"==typeof t;i>o;){var s=pu((o+i)/2),c=n(e[s]),l=c===c;if(a)var p=l||r;else p=u?l&&(r||"undefined"!=typeof c):r?t>=c:t>c;p?o=s+1:i=s}return xu(i,ku)}function er(e,t,n){if("function"!=typeof e)return Ta;if("undefined"==typeof t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,o){return e.call(t,n,r,o)};case 4:return function(n,r,o,i){return e.call(t,n,r,o,i)};case 5:return function(n,r,o,i,a){return e.call(t,n,r,o,i,a)}}return function(){return e.apply(t,arguments)}}function tr(e){return su.call(e,0)}function nr(e,t,n){for(var r=n.length,o=-1,i=wu(e.length-r,0),a=-1,u=t.length,s=Va(i+u);++a<u;)s[a]=t[a];for(;++o<r;)s[n[o]]=e[o];for(;i--;)s[a++]=e[o++];return s}function rr(e,t,n){for(var r=-1,o=n.length,i=-1,a=wu(e.length-o,0),u=-1,s=t.length,c=Va(a+s);++i<a;)c[i]=e[i];for(var l=i;++u<s;)c[l+u]=t[u];for(;++r<o;)c[l+n[r]]=e[i++];return c}function or(e,t){return function(n,r,o){var i=t?t():{};if(r=yr(r,o,3),Ju(n))for(var a=-1,u=n.length;++a<u;){var s=n[a];e(i,s,r(s,a,n),n)}else Cn(n,function(t,n,o){e(i,t,r(t,n,o),o)});return i}}function ir(e){return function(){var t=arguments.length,n=arguments[0];if(2>t||null==n)return n;if(t>3&&xr(arguments[1],arguments[2],arguments[3])&&(t=2),t>3&&"function"==typeof arguments[t-2])var r=er(arguments[--t-1],arguments[t--],5);else t>2&&"function"==typeof arguments[t-1]&&(r=arguments[--t]);for(var o=0;++o<t;){var i=arguments[o];i&&e(n,i,r)}return n}}function ar(e,t){function n(){return(this instanceof n?r:e).apply(t,arguments)}var r=sr(e);return n}function ur(e){return function(t){for(var n=-1,r=xa(la(t)),o=r.length,i="";++n<o;)i=e(i,r[n],n);return i}}function sr(e){return function(){var t=Bu(e.prototype),n=e.apply(t,arguments);return Ni(n)?n:t}}function cr(e,t){return function(n,r,o){o&&xr(n,r,o)&&(r=null);var i=yr(),a=null==r;if(i===gn&&a||(a=!1,r=i(r,o,3)),a){var u=Ju(n);if(u||!Li(n))return e(u?n:Ar(n));r=s}return gr(n,r,t)}}function lr(e,t,n,r,o,i,a,u,s,c){function l(){for(var _=arguments.length,C=_,R=Va(_);C--;)R[C]=arguments[C];if(r&&(R=nr(R,r,o)),i&&(R=rr(R,i,a)),h||v){var b=l.placeholder,M=E(R,b);if(_-=M.length,c>_){var w=u?Zt(u):null,x=wu(c-_,0),N=h?M:null,T=h?null:M,P=h?R:null,k=h?null:R;t|=h?I:S,t&=~(h?S:I),m||(t&=~(D|O));var A=lr(e,t,n,P,N,k,T,w,s,x);return A.placeholder=b,A}}var L=f?n:this;return d&&(e=L[y]),u&&(R=Ir(R,u)),p&&s<R.length&&(R.length=s),(this instanceof l?g||sr(e):e).apply(L,R)}var p=t&A,f=t&D,d=t&O,h=t&T,m=t&N,v=t&P,g=!d&&sr(e),y=e;return l}function pr(e,t,n){var r=e.length;if(t=+t,r>=t||!bu(t))return"";var o=t-r;return n=null==n?" ":n+"",ya(n,cu(o/n.length)).slice(0,o)}function fr(e,t,n,r){function o(){for(var t=-1,u=arguments.length,s=-1,c=r.length,l=Va(u+c);++s<c;)l[s]=r[s];for(;u--;)l[s++]=arguments[++t];return(this instanceof o?a:e).apply(i?n:this,l)}var i=t&D,a=sr(e);return o}function dr(e,t,n,r,o,i,a,u){var s=t&O;if(!s&&"function"!=typeof e)throw new Qa(W);var c=r?r.length:0;if(c||(t&=~(I|S),r=o=null),c-=o?o.length:0,t&S){var l=r,p=o;r=o=null}var f=!s&&Wu(e),d=[e,t,n,r,o,l,p,i,a,u];if(f&&f!==!0&&(Nr(d,f),t=d[1],u=d[9]),d[9]=null==u?s?0:e.length:wu(u-c,0)||0,t==D)var h=ar(d[0],d[2]);else h=t!=I&&t!=(D|I)||d[4].length?lr.apply(w,d):fr.apply(w,d);var m=f?Vu:Ku;return m(h,d)}function hr(e,t,n,r,o,i,a){var u=-1,s=e.length,c=t.length,l=!0;if(s!=c&&!(o&&c>s))return!1;for(;l&&++u<s;){var p=e[u],f=t[u];if(l=w,r&&(l=o?r(f,p,u):r(p,f,u)),"undefined"==typeof l)if(o)for(var d=c;d--&&(f=t[d],!(l=p&&p===f||n(p,f,r,o,i,a))););else l=p&&p===f||n(p,f,r,o,i,a)}return!!l}function mr(e,t,n){switch(n){case $:case q:return+e==+t;case Y:return e.name==t.name&&e.message==t.message;
case J:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case et:case nt:return e==t+""}return!1}function vr(e,t,n,r,o,i,a){var u=rs(e),s=u.length,c=rs(t),l=c.length;if(s!=l&&!o)return!1;for(var p,f=-1;++f<s;){var d=u[f],h=nu.call(t,d);if(h){var m=e[d],v=t[d];h=w,r&&(h=o?r(v,m,d):r(m,v,d)),"undefined"==typeof h&&(h=m&&m===v||n(m,v,r,o,i,a))}if(!h)return!1;p||(p="constructor"==d)}if(!p){var g=e.constructor,y=t.constructor;if(g!=y&&"constructor"in e&&"constructor"in t&&!("function"==typeof g&&g instanceof g&&"function"==typeof y&&y instanceof y))return!1}return!0}function gr(e,t,n){var r=n?Iu:Pu,o=r,i=o;return Cn(e,function(e,a,u){var s=t(e,a,u);((n?o>s:s>o)||s===r&&s===i)&&(o=s,i=e)}),i}function yr(e,n,r){var o=t.callback||Oa;return o=o===Oa?gn:o,r?o(e,n,r):o}function Er(e,n,r){var i=t.indexOf||Xr;return i=i===Xr?o:i,e?i(e,n,r):i}function _r(e,t,n){for(var r=-1,o=n?n.length:0;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=xu(t,e+a);break;case"takeRight":e=wu(e,t-a)}}return{start:e,end:t}}function Cr(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&nu.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Rr(e){var t=e.constructor;return"function"==typeof t&&t instanceof t||(t=$a),new t}function br(e,t,n){var r=e.constructor;switch(t){case ot:return tr(e);case $:case q:return new r(+e);case it:case at:case ut:case st:case ct:case lt:case pt:case ft:case dt:var o=e.buffer;return new r(n?tr(o):o,e.byteOffset,e.length);case J:case nt:return new r(e);case et:var i=new r(e.source,wt.exec(e));i.lastIndex=e.lastIndex}return i}function Mr(e){var n=t.support,r=!(n.funcNames?e.name:n.funcDecomp);if(!r){var o=eu.call(e);n.funcNames||(r=!xt.test(o)),r||(r=St.test(o)||Ii(e),Vu(e,r))}return r}function wr(e,t){return e=+e,t=null==t?Uu:t,e>-1&&e%1==0&&t>e}function xr(e,t,n){if(!Ni(n))return!1;var r=typeof t;if("number"==r)var o=n.length,i=Dr(o)&&wr(t,o);else i="string"==r&&t in n;if(i){var a=n[t];return e===e?e===a:a!==a}return!1}function Dr(e){return"number"==typeof e&&e>-1&&e%1==0&&Uu>=e}function Or(e){return e===e&&(0===e?1/e>0:!Ni(e))}function Nr(e,t){var n=e[1],r=t[1],o=n|r,i=A|k,a=D|O,u=i|a|N|P,s=n&A&&!(r&A),c=n&k&&!(r&k),l=(c?e:t)[7],p=(s?e:t)[8],f=!(n>=k&&r>a||n>a&&r>=k),d=o>=i&&u>=o&&(k>n||(c||s)&&l.length<=p);if(!f&&!d)return e;r&D&&(e[2]=t[2],o|=n&D?0:N);var h=t[3];if(h){var m=e[3];e[3]=m?nr(m,h,t[4]):Zt(h),e[4]=m?E(e[3],K):Zt(t[4])}return h=t[5],h&&(m=e[5],e[5]=m?rr(m,h,t[6]):Zt(h),e[6]=m?E(e[5],K):Zt(t[6])),h=t[7],h&&(e[7]=Zt(h)),r&A&&(e[8]=null==e[8]?t[8]:xu(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o,e}function Tr(e,t){e=Lr(e);for(var n=-1,r=t.length,o={};++n<r;){var i=t[n];i in e&&(o[i]=e[i])}return o}function Pr(e,t){var n={};return Tn(e,function(e,r,o){t(e,r,o)&&(n[r]=e)}),n}function Ir(e,t){for(var n=e.length,r=xu(t.length,n),o=Zt(e);r--;){var i=t[r];e[r]=wr(i,n)?o[i]:w}return e}function Sr(e){{var n;t.support}if(!g(e)||ou.call(e)!=Z||!nu.call(e,"constructor")&&(n=e.constructor,"function"==typeof n&&!(n instanceof n)))return!1;var r;return Tn(e,function(e,t){r=t}),"undefined"==typeof r||nu.call(e,r)}function kr(e){for(var n=Ji(e),r=n.length,o=r&&e.length,i=t.support,a=o&&Dr(o)&&(Ju(e)||i.nonEnumArgs&&Ri(e)),u=-1,s=[];++u<r;){var c=n[u];(a&&wr(c,o)||nu.call(e,c))&&s.push(c)}return s}function Ar(e){return null==e?[]:Dr(e.length)?Ni(e)?e:$a(e):ia(e)}function Lr(e){return Ni(e)?e:$a(e)}function Ur(e){return e instanceof X?e.clone():new y(e.__wrapped__,e.__chain__,Zt(e.__actions__))}function jr(e,t,n){t=(n?xr(e,t,n):null==t)?1:wu(+t||1,1);for(var r=0,o=e?e.length:0,i=-1,a=Va(cu(o/t));o>r;)a[++i]=$n(e,r,r+=t);return a}function Fr(e){for(var t=-1,n=e?e.length:0,r=-1,o=[];++t<n;){var i=e[t];i&&(o[++r]=i)}return o}function Br(){for(var e=-1,t=arguments.length;++e<t;){var n=arguments[e];if(Ju(n)||Ri(n))break}return _n(n,Dn(arguments,!1,!0,++e))}function Vr(e,t,n){var r=e?e.length:0;return r?((n?xr(e,t,n):null==t)&&(t=1),$n(e,0>t?0:t)):[]}function Hr(e,t,n){var r=e?e.length:0;return r?((n?xr(e,t,n):null==t)&&(t=1),t=r-(+t||0),$n(e,0,0>t?0:t)):[]}function Wr(e,t,n){var r=e?e.length:0;if(!r)return[];for(t=yr(t,n,3);r--&&t(e[r],r,e););return $n(e,0,r+1)}function Kr(e,t,n){var r=e?e.length:0;if(!r)return[];var o=-1;for(t=yr(t,n,3);++o<r&&t(e[o],o,e););return $n(e,o)}function zr(e,t,n,r){var o=e?e.length:0;return o?(n&&"number"!=typeof n&&xr(e,t,n)&&(n=0,r=o),Mn(e,t,n,r)):[]}function Gr(e,t,n){var r=-1,o=e?e.length:0;for(t=yr(t,n,3);++r<o;)if(t(e[r],r,e))return r;return-1}function $r(e,t,n){var r=e?e.length:0;for(t=yr(t,n,3);r--;)if(t(e[r],r,e))return r;return-1}function qr(e){return e?e[0]:w}function Yr(e,t,n){var r=e?e.length:0;return n&&xr(e,t,n)&&(t=!1),r?Dn(e,t):[]}function Qr(e){var t=e?e.length:0;return t?Dn(e,!0):[]}function Xr(e,t,n){var r=e?e.length:0;if(!r)return-1;if("number"==typeof n)n=0>n?wu(r+n,0):n||0;else if(n){var i=Jn(e,t),a=e[i];return(t===t?t===a:a!==a)?i:-1}return o(e,t,n)}function Jr(e){return Hr(e,1)}function Zr(){for(var e=[],t=-1,n=arguments.length,r=[],i=Er(),a=i==o;++t<n;){var u=arguments[t];(Ju(u)||Ri(u))&&(e.push(u),r.push(a&&u.length>=120?Hu(t&&u):null))}n=e.length;var s=e[0],c=-1,l=s?s.length:0,p=[],f=r[0];e:for(;++c<l;)if(u=s[c],(f?Qt(f,u):i(p,u))<0){for(t=n;--t;){var d=r[t];if((d?Qt(d,u):i(e[t],u))<0)continue e}f&&f.push(u),p.push(u)}return p}function eo(e){var t=e?e.length:0;return t?e[t-1]:w}function to(e,t,n){var r=e?e.length:0;if(!r)return-1;var o=r;if("number"==typeof n)o=(0>n?wu(r+n,0):xu(n||0,r-1))+1;else if(n){o=Jn(e,t,!0)-1;var i=e[o];return(t===t?t===i:i!==i)?o:-1}if(t!==t)return v(e,o,!0);for(;o--;)if(e[o]===t)return o;return-1}function no(){var e=arguments[0];if(!e||!e.length)return e;for(var t=0,n=Er(),r=arguments.length;++t<r;)for(var o=0,i=arguments[t];(o=n(e,i,o))>-1;)gu.call(e,o,1);return e}function ro(e){return Kn(e||[],Dn(arguments,!1,!1,1))}function oo(e,t,n){var r=-1,o=e?e.length:0,i=[];for(t=yr(t,n,3);++r<o;){var a=e[r];t(a,r,e)&&(i.push(a),gu.call(e,r--,1),o--)}return i}function io(e){return Vr(e,1)}function ao(e,t,n){var r=e?e.length:0;return r?(n&&"number"!=typeof n&&xr(e,t,n)&&(t=0,n=r),$n(e,t,n)):[]}function uo(e,t,n,r){var o=yr(n);return o===gn&&null==n?Jn(e,t):Zn(e,t,o(n,r,1))}function so(e,t,n,r){var o=yr(n);return o===gn&&null==n?Jn(e,t,!0):Zn(e,t,o(n,r,1),!0)}function co(e,t,n){var r=e?e.length:0;return r?((n?xr(e,t,n):null==t)&&(t=1),$n(e,0,0>t?0:t)):[]}function lo(e,t,n){var r=e?e.length:0;return r?((n?xr(e,t,n):null==t)&&(t=1),t=r-(+t||0),$n(e,0>t?0:t)):[]}function po(e,t,n){var r=e?e.length:0;if(!r)return[];for(t=yr(t,n,3);r--&&t(e[r],r,e););return $n(e,r+1)}function fo(e,t,n){var r=e?e.length:0;if(!r)return[];var o=-1;for(t=yr(t,n,3);++o<r&&t(e[o],o,e););return $n(e,0,o)}function ho(){return Yn(Dn(arguments,!1,!0))}function mo(e,t,n,r){var i=e?e.length:0;if(!i)return[];null!=t&&"boolean"!=typeof t&&(r=n,n=xr(e,t,r)?null:t,t=!1);var a=yr();return(a!==gn||null!=n)&&(n=a(n,r,3)),t&&Er()==o?_(e,n):Yn(e,n)}function vo(e){for(var t=-1,n=(e&&e.length&&an(on(e,tu)))>>>0,r=Va(n);++t<n;)r[t]=on(e,Wn(t));return r}function go(e){return _n(e,$n(arguments,1))}function yo(){for(var e=-1,t=arguments.length;++e<t;){var n=arguments[e];if(Ju(n)||Ri(n))var r=r?_n(r,n).concat(_n(n,r)):n}return r?Yn(r):[]}function Eo(){for(var e=arguments.length,t=Va(e);e--;)t[e]=arguments[e];return vo(t)}function _o(e,t){var n=-1,r=e?e.length:0,o={};for(!r||t||Ju(e[0])||(t=[]);++n<r;){var i=e[n];t?o[i]=t[n]:i&&(o[i[0]]=i[1])}return o}function Co(e){var n=t(e);return n.__chain__=!0,n}function Ro(e,t,n){return t.call(n,e),e}function bo(e,t,n){return t.call(n,e)}function Mo(){return Co(this)}function wo(){return new y(this.value(),this.__chain__)}function xo(e){for(var t,r=this;r instanceof n;){var o=Ur(r);t?i.__wrapped__=o:t=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,t}function Do(){var e=this.__wrapped__;return e instanceof X?(this.__actions__.length&&(e=new X(this)),new y(e.reverse(),this.__chain__)):this.thru(function(e){return e.reverse()})}function Oo(){return this.value()+""}function No(){return Xn(this.__wrapped__,this.__actions__)}function To(e){var t=e?e.length:0;return Dr(t)&&(e=Ar(e)),hn(e,Dn(arguments,!1,!1,1))}function Po(e,t,n){var r=Ju(e)?nn:bn;return("function"!=typeof t||"undefined"!=typeof n)&&(t=yr(t,n,3)),r(e,t)}function Io(e,t,n){var r=Ju(e)?rn:wn;return t=yr(t,n,3),r(e,t)}function So(e,t,n){if(Ju(e)){var r=Gr(e,t,n);return r>-1?e[r]:w}return t=yr(t,n,3),xn(e,t,Cn)}function ko(e,t,n){return t=yr(t,n,3),xn(e,t,Rn)}function Ao(e,t){return So(e,Fn(t))}function Lo(e,t,n){return"function"==typeof t&&"undefined"==typeof n&&Ju(e)?en(e,t):Cn(e,er(t,n,3))}function Uo(e,t,n){return"function"==typeof t&&"undefined"==typeof n&&Ju(e)?tn(e,t):Rn(e,er(t,n,3))}function jo(e,t,n){var r=e?e.length:0;return Dr(r)||(e=ia(e),r=e.length),r?(n="number"==typeof n?0>n?wu(r+n,0):n||0:0,"string"==typeof e||!Ju(e)&&Li(e)?r>n&&e.indexOf(t,n)>-1:Er(e,t,n)>-1):!1}function Fo(e,t){return kn(e,t,$n(arguments,2))}function Bo(e,t,n){var r=Ju(e)?on:jn;return t=yr(t,n,3),r(e,t)}function Vo(e,t){return Bo(e,Wn(t))}function Ho(e,t,n,r){var o=Ju(e)?sn:Gn;return o(e,yr(t,r,4),n,arguments.length<3,Cn)}function Wo(e,t,n,r){var o=Ju(e)?cn:Gn;return o(e,yr(t,r,4),n,arguments.length<3,Rn)}function Ko(e,t,n){var r=Ju(e)?rn:wn;return t=yr(t,n,3),r(e,function(e,n,r){return!t(e,n,r)})}function zo(e,t,n){if(n?xr(e,t,n):null==t){e=Ar(e);var r=e.length;return r>0?e[zn(0,r-1)]:w}var o=Go(e);return o.length=xu(0>t?0:+t||0,o.length),o}function Go(e){e=Ar(e);for(var t=-1,n=e.length,r=Va(n);++t<n;){var o=zn(0,t);t!=o&&(r[t]=r[o]),r[o]=e[t]}return r}function $o(e){var t=e?e.length:0;return Dr(t)?t:rs(e).length}function qo(e,t,n){var r=Ju(e)?ln:qn;return("function"!=typeof t||"undefined"!=typeof n)&&(t=yr(t,n,3)),r(e,t)}function Yo(e,t,n){var r=-1,o=e?e.length:0,i=Dr(o)?Va(o):[];return n&&xr(e,t,n)&&(t=null),t=yr(t,n,3),Cn(e,function(e,n,o){i[++r]={criteria:t(e,n,o),index:r,value:e}}),a(i,p)}function Qo(e){var t=arguments;t.length>3&&xr(t[1],t[2],t[3])&&(t=[e,t[1]]);var n=-1,r=e?e.length:0,o=Dn(t,!1,!1,1),i=Dr(r)?Va(r):[];return Cn(e,function(e){for(var t=o.length,r=Va(t);t--;)r[t]=null==e?w:e[o[t]];i[++n]={criteria:r,index:n,value:e}}),a(i,f)}function Xo(e,t){return Io(e,Fn(t))}function Jo(e,t){if("function"!=typeof t){if("function"!=typeof e)throw new Qa(W);var n=e;e=t,t=n}return e=bu(e=+e)?e:0,function(){return--e<1?t.apply(this,arguments):void 0}}function Zo(e,t,n){return n&&xr(e,t,n)&&(t=null),t=e&&null==t?e.length:wu(+t||0,0),dr(e,A,null,null,null,null,t)}function ei(e,t){var n;if("function"!=typeof t){if("function"!=typeof e)throw new Qa(W);var r=e;e=t,t=r}return function(){return--e>0?n=t.apply(this,arguments):t=null,n}}function ti(e,t){var n=D;if(arguments.length>2){var r=$n(arguments,2),o=E(r,ti.placeholder);n|=I}return dr(e,n,t,r,o)}function ni(e){return vn(e,arguments.length>1?Dn(arguments,!1,!1,1):Yi(e))}function ri(e,t){var n=D|O;if(arguments.length>2){var r=$n(arguments,2),o=E(r,ri.placeholder);n|=I}return dr(t,n,e,r,o)}function oi(e,t,n){n&&xr(e,t,n)&&(t=null);var r=dr(e,T,null,null,null,null,null,t);return r.placeholder=oi.placeholder,r}function ii(e,t,n){n&&xr(e,t,n)&&(t=null);var r=dr(e,P,null,null,null,null,null,t);return r.placeholder=ii.placeholder,r}function ai(e,t,n){function r(){f&&lu(f),s&&lu(s),s=f=d=w}function o(){var n=t-(Xu()-l);if(0>=n||n>t){s&&lu(s);var r=d;s=f=d=w,r&&(h=Xu(),c=e.apply(p,u),f||s||(u=p=null))}else f=vu(o,n)}function i(){f&&lu(f),s=f=d=w,(v||m!==t)&&(h=Xu(),c=e.apply(p,u),f||s||(u=p=null))}function a(){if(u=arguments,l=Xu(),p=this,d=v&&(f||!g),m===!1)var n=g&&!f;else{s||g||(h=l);var r=m-(l-h),a=0>=r||r>m;a?(s&&(s=lu(s)),h=l,c=e.apply(p,u)):s||(s=vu(i,r))}return a&&f?f=lu(f):f||t===m||(f=vu(o,t)),n&&(a=!0,c=e.apply(p,u)),!a||f||s||(u=p=null),c}var u,s,c,l,p,f,d,h=0,m=!1,v=!0;if("function"!=typeof e)throw new Qa(W);if(t=0>t?0:+t||0,n===!0){var g=!0;v=!1}else Ni(n)&&(g=n.leading,m="maxWait"in n&&wu(+n.maxWait||0,t),v="trailing"in n?n.trailing:v);return a.cancel=r,a}function ui(e){return En(e,1,arguments,1)}function si(e,t){return En(e,t,arguments,2)}function ci(){var e=arguments,t=e.length;if(!t)return function(){return arguments[0]};if(!nn(e,i))throw new Qa(W);return function(){for(var n=0,r=e[n].apply(this,arguments);++n<t;)r=e[n].call(this,r);return r}}function li(){var e=arguments,t=e.length-1;if(0>t)return function(){return arguments[0]};if(!nn(e,i))throw new Qa(W);return function(){for(var n=t,r=e[n].apply(this,arguments);n--;)r=e[n].call(this,r);return r}}function pi(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new Qa(W);var n=function(){var r=n.cache,o=t?t.apply(this,arguments):arguments[0];if(r.has(o))return r.get(o);var i=e.apply(this,arguments);return r.set(o,i),i};return n.cache=new pi.Cache,n}function fi(e){if("function"!=typeof e)throw new Qa(W);return function(){return!e.apply(this,arguments)}}function di(e){return ei(e,2)}function hi(e){var t=$n(arguments,1),n=E(t,hi.placeholder);return dr(e,I,null,t,n)}function mi(e){var t=$n(arguments,1),n=E(t,mi.placeholder);return dr(e,S,null,t,n)}function vi(e){var t=Dn(arguments,!1,!1,1);return dr(e,k,null,null,null,t)}function gi(e){if("function"!=typeof e)throw new Qa(W);return function(t){return e.apply(this,t)}}function yi(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Qa(W);return n===!1?r=!1:Ni(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Vt.leading=r,Vt.maxWait=+t,Vt.trailing=o,ai(e,t,Vt)}function Ei(e,t){return t=null==t?Ta:t,dr(t,I,null,[e],[])}function _i(e,t,n,r){return t&&"boolean"!=typeof t&&xr(e,t,n)?t=!1:"function"==typeof t&&(r=n,n=t,t=!1),n="function"==typeof n&&er(n,r,1),yn(e,t,n)}function Ci(e,t,n){return t="function"==typeof t&&er(t,n,1),yn(e,!0,t)}function Ri(e){var t=g(e)?e.length:w;return Dr(t)&&ou.call(e)==z||!1}function bi(e){return e===!0||e===!1||g(e)&&ou.call(e)==$||!1}function Mi(e){return g(e)&&ou.call(e)==q||!1}function wi(e){return e&&1===e.nodeType&&g(e)&&ou.call(e).indexOf("Element")>-1||!1}function xi(e){if(null==e)return!0;var t=e.length;return Dr(t)&&(Ju(e)||Li(e)||Ri(e)||g(e)&&es(e.splice))?!t:!rs(e).length}function Di(e,t,n,r){if(n="function"==typeof n&&er(n,r,3),!n&&Or(e)&&Or(t))return e===t;var o=n?n(e,t):w;return"undefined"==typeof o?An(e,t,n):!!o}function Oi(e){return g(e)&&"string"==typeof e.message&&ou.call(e)==Y||!1}function Ni(e){var t=typeof e;return"function"==t||e&&"object"==t||!1}function Ti(e,t,n,r){var o=rs(t),i=o.length;if(n="function"==typeof n&&er(n,r,3),!n&&1==i){var a=o[0],u=t[a];if(Or(u))return null!=e&&u===e[a]&&nu.call(e,a)}for(var s=Va(i),c=Va(i);i--;)u=s[i]=t[o[i]],c[i]=Or(u);return Un(e,o,s,c,n)}function Pi(e){return ki(e)&&e!=+e}function Ii(e){return null==e?!1:ou.call(e)==Q?au.test(eu.call(e)):g(e)&&Ot.test(e)||!1}function Si(e){return null===e}function ki(e){return"number"==typeof e||g(e)&&ou.call(e)==J||!1}function Ai(e){return g(e)&&ou.call(e)==et||!1}function Li(e){return"string"==typeof e||g(e)&&ou.call(e)==nt||!1}function Ui(e){return g(e)&&Dr(e.length)&&Ft[ou.call(e)]||!1}function ji(e){return"undefined"==typeof e}function Fi(e){var t=e?e.length:0;return Dr(t)?t?Zt(e):[]:ia(e)}function Bi(e){return mn(e,Ji(e))}function Vi(e,t,n){var r=Bu(e);return n&&xr(e,t,n)&&(t=null),t?mn(t,r,rs(t)):r}function Hi(e){if(null==e)return e;var t=Zt(arguments);return t.push(pn),ns.apply(w,t)}function Wi(e,t,n){return t=yr(t,n,3),xn(e,t,Pn,!0)}function Ki(e,t,n){return t=yr(t,n,3),xn(e,t,In,!0)}function zi(e,t,n){return("function"!=typeof t||"undefined"!=typeof n)&&(t=er(t,n,3)),On(e,t,Ji)}function Gi(e,t,n){return t=er(t,n,3),Nn(e,t,Ji)}function $i(e,t,n){return("function"!=typeof t||"undefined"!=typeof n)&&(t=er(t,n,3)),Pn(e,t)}function qi(e,t,n){return t=er(t,n,3),Nn(e,t,rs)}function Yi(e){return Sn(e,Ji(e))}function Qi(e,t){return e?nu.call(e,t):!1}function Xi(e,t,n){n&&xr(e,t,n)&&(t=null);for(var r=-1,o=rs(e),i=o.length,a={};++r<i;){var u=o[r],s=e[u];t?nu.call(a,s)?a[s].push(u):a[s]=[u]:a[s]=u}return a}function Ji(e){if(null==e)return[];Ni(e)||(e=$a(e));var t=e.length;t=t&&Dr(t)&&(Ju(e)||Fu.nonEnumArgs&&Ri(e))&&t||0;for(var n=e.constructor,r=-1,o="function"==typeof n&&n.prototype===e,i=Va(t),a=t>0;++r<t;)i[r]=r+"";for(var u in e)a&&wr(u,t)||"constructor"==u&&(o||!nu.call(e,u))||i.push(u);return i}function Zi(e,t,n){var r={};return t=yr(t,n,3),Pn(e,function(e,n,o){r[n]=t(e,n,o)}),r}function ea(e,t,n){if(null==e)return{};if("function"!=typeof t){var r=on(Dn(arguments,!1,!1,1),Ya);return Tr(e,_n(Ji(e),r))}return t=er(t,n,3),Pr(e,function(e,n,r){return!t(e,n,r)})}function ta(e){for(var t=-1,n=rs(e),r=n.length,o=Va(r);++t<r;){var i=n[t];o[t]=[i,e[i]]}return o}function na(e,t,n){return null==e?{}:"function"==typeof t?Pr(e,er(t,n,3)):Tr(e,Dn(arguments,!1,!1,1))}function ra(e,t,n){var r=null==e?w:e[t];return"undefined"==typeof r&&(r=n),es(r)?r.call(e):r}function oa(e,t,n,r){var o=Ju(e)||Ui(e);if(t=yr(t,r,4),null==n)if(o||Ni(e)){var i=e.constructor;n=o?Ju(e)?new i:[]:Bu(es(i)&&i.prototype)}else n={};return(o?en:Pn)(e,function(e,r,o){return t(n,e,r,o)}),n}function ia(e){return Qn(e,rs(e))}function aa(e){return Qn(e,Ji(e))}function ua(e,t,n){return t=+t||0,"undefined"==typeof n?(n=t,t=0):n=+n||0,e>=t&&n>e}function sa(e,t,n){n&&xr(e,t,n)&&(t=n=null);var r=null==e,o=null==t;if(null==n&&(o&&"boolean"==typeof e?(n=e,e=1):"boolean"==typeof t&&(n=t,o=!0)),r&&o&&(t=1,o=!1),e=+e||0,o?(t=e,e=0):t=+t||0,n||e%1||t%1){var i=Tu();return xu(e+i*(t-e+parseFloat("1e-"+((i+"").length-1))),t)}return zn(e,t)}function ca(e){return e=u(e),e&&e.charAt(0).toUpperCase()+e.slice(1)}function la(e){return e=u(e),e&&e.replace(Nt,d)}function pa(e,t,n){e=u(e),t+="";var r=e.length;return n=("undefined"==typeof n?r:xu(0>n?0:+n||0,r))-t.length,n>=0&&e.indexOf(t,n)==n}function fa(e){return e=u(e),e&&_t.test(e)?e.replace(yt,h):e}function da(e){return e=u(e),e&&It.test(e)?e.replace(Pt,"\\$&"):e}function ha(e,t,n){e=u(e),t=+t;var r=e.length;if(r>=t||!bu(t))return e;var o=(t-r)/2,i=pu(o),a=cu(o);return n