(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{140:function(e,t,n){e.exports=n(193)},176:function(e,t,n){},193:function(e,t,n){"use strict";n.r(t);n(141),n(166);var a=n(0),r=n.n(a),o=n(43),i=n.n(o),c=n(22),l=n(96),s=n(17),u=n(9),p=n(6),h=n(35),d=n(24),m=n.n(d),f=function(e){return{type:"SET_ACCESS_TOKEN",payload:e}},v=function(e,t){return t.access_token=fe.getState().vkui.accessToken,t.v=void 0===t.v?"5.92":t.v,m.a.send("VKWebAppCallAPIMethod",{method:e,params:t}).then(function(e){return e.response}).catch(function(e){return e})},y=function(e){var t=fe.getState().router.activePanel,n=fe.getState().router.panelsHistory;return"undefined"!==typeof n[e]&&(t=n[e][n[e].length-1]),t},b={activeStory:null,activeView:null,activePanel:null,storiesHistory:[],viewsHistory:[],panelsHistory:[],activeModals:[],modalHistory:[],popouts:[],scrollPosition:[]},O={accessToken:void 0,colorScheme:"client_light",activeTab:[],componentScroll:[]},g={forms:[]},E=Object(c.combineReducers)({vkui:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_COLOR_SCHEME":return Object(p.a)({},e,{colorScheme:t.payload});case"SET_ACCESS_TOKEN":return Object(p.a)({},e,{accessToken:t.payload});case"SET_ACTIVE_TAB":return Object(p.a)({},e,{activeTab:Object(p.a)({},e.activeTab,Object(u.a)({},t.payload.component,t.payload.tab))});case"SET_SCROLL_POSITION":return Object(p.a)({},e,{componentScroll:Object(p.a)({},e.componentScroll,Object(u.a)({},t.payload.component,{x:t.payload.x,y:t.payload.y}))});case"SET_SCROLL_POSITION_BY_ID":var n=document.getElementById(t.payload.component).getElementsByClassName("HorizontalScroll__in")[0],a=n.scrollLeft,r=n.scrollTop;return Object(p.a)({},e,{componentScroll:Object(p.a)({},e.componentScroll,Object(u.a)({},t.payload.component,{x:a,y:r}))});default:return e}},router:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_PAGE":var n=t.payload.view,a=t.payload.panel;window.history.pushState(null,null);var r=e.panelsHistory[n]||[],o=e.viewsHistory[e.activeStory]||[],i=o.indexOf(n);return-1!==i&&o.splice(i,1),-1===r.indexOf(a)&&(r=[].concat(Object(h.a)(r),[a])),r.length>1&&m.a.send("VKWebAppEnableSwipeBack",{}).then(function(e){return e}).catch(function(e){return e}),Object(p.a)({},e,{activeView:n,activePanel:a,panelsHistory:Object(p.a)({},e.panelsHistory,Object(u.a)({},n,r)),viewsHistory:Object(p.a)({},e.viewsHistory,Object(u.a)({},e.activeStory,[].concat(Object(h.a)(o),[n]))),scrollPosition:Object(p.a)({},e.scrollPosition,Object(u.a)({},e.activeStory+"_"+e.activeView+"_"+e.activePanel,window.pageYOffset))});case"SET_STORY":window.history.pushState(null,null);var c=e.viewsHistory[t.payload.story]||[t.payload.story],l=e.storiesHistory,s=c[c.length-1],d=e.panelsHistory[s]||[t.payload.initial_panel],f=d[d.length-1];if(t.payload.story===e.activeStory)if(d.length>1){var v=d.shift();f=(d=[v])[d.length-1]}else if(c.length>1){var y=c.shift();s=(c=[y])[c.length-1],f=(d=e.panelsHistory[s])[d.length-1]}return t.payload.story===e.activeStory&&1===d.length&&window.pageYOffset>0&&(window.scrollTo(0,30),function e(){var t=document.documentElement.scrollTop||document.body.scrollTop;t>30||t>0&&(window.requestAnimationFrame(e),window.scrollTo(0,t-t/8))}()),(-1===l.indexOf(t.payload.story)||l[0]===t.payload.story&&l[l.length-1]!==t.payload.story)&&(l=[].concat(Object(h.a)(l),[t.payload.story])),Object(p.a)({},e,{activeStory:t.payload.story,activeView:s,activePanel:f,storiesHistory:l,viewsHistory:Object(p.a)({},e.viewsHistory,Object(u.a)({},s,c)),panelsHistory:Object(p.a)({},e.panelsHistory,Object(u.a)({},s,d)),scrollPosition:Object(p.a)({},e.scrollPosition,Object(u.a)({},e.activeStory+"_"+e.activeView+"_"+e.activePanel,window.pageYOffset))});case"GO_BACK":var O=e.activeView,g=e.activePanel,E=e.activeStory,w=e.popouts;if(w[O])return w[O]=null,Object(p.a)({},e,{popouts:Object(p.a)({},e.popouts,{popoutsData:w})});var j=e.modalHistory[O];if(void 0!==j&&0!==j.length){var S=j[j.length-2]||null;return null===S?j=[]:-1!==j.indexOf(S)?j=j.splice(0,j.indexOf(S)+1):j.push(S),Object(p.a)({},e,{activeModals:Object(p.a)({},e.activeModals,Object(u.a)({},O,S)),modalHistory:Object(p.a)({},e.modalHistory,Object(u.a)({},O,j))})}var k=e.panelsHistory[O]||[],T=e.viewsHistory[e.activeStory]||[],_=e.storiesHistory;if(k.length>1)k.pop(),g=k[k.length-1];else if(T.length>1){T.pop(),O=T[T.length-1];var P=e.panelsHistory[O];g=P[P.length-1]}else if(_.length>1){_.pop(),E=_[_.length-1],O=e.viewsHistory[E][e.viewsHistory[E].length-1];var A=e.panelsHistory[O];g=A.length>1?A[A.length-1]:A[0]}else m.a.send("VKWebAppClose",{status:"success"}).then(function(e){return e}).catch(function(e){return e});return 1===k.length&&m.a.send("VKWebAppDisableSwipeBack",{}).then(function(e){return e}).catch(function(e){return e}),Object(p.a)({},e,{activeView:O,activePanel:g,activeStory:E,viewsHistory:Object(p.a)({},e.viewsHistory,Object(u.a)({},e.activeView,T)),panelsHistory:Object(p.a)({},e.panelsHistory,Object(u.a)({},e.activeView,k))});case"OPEN_POPOUT":return window.history.pushState(null,null),Object(p.a)({},e,{popouts:Object(p.a)({},e.popouts,Object(u.a)({},e.activeView,t.payload.popout))});case"CLOSE_POPOUT":return Object(p.a)({},e,{popouts:Object(p.a)({},e.popouts,Object(u.a)({},e.activeView,null))});case"OPEN_MODAL":window.history.pushState(null,null);var C=t.payload.id||null,L=e.modalHistory[e.activeView]?Object(h.a)(e.modalHistory[e.activeView]):[];return null===C?L=[]:-1!==L.indexOf(C)?L=L.splice(0,L.indexOf(C)+1):L.push(C),Object(p.a)({},e,{activeModals:Object(p.a)({},e.activeModals,Object(u.a)({},e.activeView,C)),modalHistory:Object(p.a)({},e.modalHistory,Object(u.a)({},e.activeView,L))});case"CLOSE_MODAL":var x=e.modalHistory[e.activeView][e.modalHistory[e.activeView].length-2]||null,H=e.modalHistory[e.activeView]?Object(h.a)(e.modalHistory[e.activeView]):[];return null===x?H=[]:-1!==H.indexOf(x)?H=H.splice(0,H.indexOf(x)+1):H.push(x),Object(p.a)({},e,{activeModals:Object(p.a)({},e.activeModals,Object(u.a)({},e.activeView,x)),modalHistory:Object(p.a)({},e.modalHistory,Object(u.a)({},e.activeView,H))});default:return e}},formData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SAVE_FORM_DATA":return Object(p.a)({},e,{forms:Object(p.a)({},e.forms,Object(u.a)({},t.payload.form,t.payload.data))});default:return e}}}),w=n(83),j=function(e,t){return{type:"SET_STORY",payload:{story:e,initial_panel:t}}},S=function(e,t){return{type:"SET_PAGE",payload:{view:e,panel:t}}},k=function(){return{type:"GO_BACK"}},T=function(e){return{type:"OPEN_POPOUT",payload:{popout:e}}},_=function(){return{type:"CLOSE_POPOUT"}},P=function(e){return{type:"OPEN_MODAL",payload:{id:e}}},A=function(){return{type:"CLOSE_MODAL"}},C=(n(175),n(176),n(14)),L=n(15),x=n(18),H=n(16),V=n(19),I=n(2),D=n(94),M=n.n(D),B=n(95),G=n.n(B),N=n(45);var F=function(e){function t(){var e,n;Object(C.a)(this,t);for(var a=arguments.length,r=new Array(a),o=0;o0?t:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442";return r.a.createElement(I.d,{description:o,before:r.a.createElement(I.b,{size:40,src:n})},a)}}]),t}(a.PureComponent),U=function(e){var t=null;return void 0!==e&&null!==e&&0!==e.length&&(t=e.map(function(e){return r.a.createElement(K,{key:e.id,description:e.description,photo:e.photo_100,name:e.name})})),t};function W(){W=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",c=r.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(P){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new k(r||[]);return a(i,"_invoke",{value:E(e,n,c)}),i}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(P){return{type:"throw",arg:P}}}e.wrap=s;var p={};function h(){}function d(){}function m(){}var f={};l(f,o,function(){return this});var v=Object.getPrototypeOf,y=v&&v(v(T([])));y&&y!==t&&n.call(y,o)&&(f=y);var b=m.prototype=h.prototype=Object.create(f);function O(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function g(e,t){var r;a(this,"_invoke",{value:function(a,o){function i(){return new t(function(r,i){!function a(r,o,i,c){var l=u(e[r],e,o);if("throw"!==l.type){var s=l.arg,p=s.value;return p&&"object"==typeof p&&n.call(p,"__await")?t.resolve(p.__await).then(function(e){a("next",e,i,c)},function(e){a("throw",e,i,c)}):t.resolve(p).then(function(e){s.value=e,i(s)},function(e){return a("throw",e,i,c)})}c(l.arg)}(a,o,r,i)})}return r=r?r.then(i,i):i()}})}function E(e,t,n){var a="suspendedStart";return function(r,o){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===r)throw o;return _()}for(n.method=r,n.arg=o;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===p)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===a)throw a="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a="executing";var l=u(e,t,n);if("normal"===l.type){if(a=n.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(a="completed",n.method="throw",n.arg=l.arg)}}}function w(e,t){var n=t.method,a=e.iterator[n];if(void 0===a)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var r=u(a,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,p;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,r=function t(){for(;++a=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var a=n.completion;if("throw"===a.type){var r=a.arg;S(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}var Y=function(e){function t(){var e,n;Object(C.a)(this,t);for(var a=arguments.length,r=new Array(a),o=0;o500?(e.lastAndroidBackAction=t,n()):window.history.pushState(null,null)}}},{key:"componentDidUpdate",value:function(e,t,n){var a=this.props,r=a.activeView,o=a.activeStory,i=a.activePanel,c=a.scrollPosition;if(e.activeView!==r||e.activePanel!==i||e.activeStory!==o){var l=c[o+"_"+r+"_"+i]||0;window.scroll(0,l)}}},{key:"render",value:function(){var e=this.props,t=e.goBack,n=e.setStory,a=e.closeModal,o=e.popouts,i=e.activeView,c=e.activeStory,l=e.activeModals,s=e.panelsHistory,u=e.colorScheme,p=void 0===s[i]?[i]:s[i],h=void 0===o[i]?null:o[i],d=void 0===l[i]?null:l[i],m=r.a.createElement(I.v,{activeModal:d},r.a.createElement(ue,{id:"MODAL_PAGE_BOTS_LIST",onClose:function(){return a()}}),r.a.createElement(he,{id:"MODAL_PAGE_BOT_INFO",onClose:function(){return a()}}));return r.a.createElement(I.g,{isWebView:!0,scheme:u},r.a.createElement(I.i,{activeStory:c,tabbar:r.a.createElement(I.C,null,r.a.createElement(I.D,{onClick:function(){return n("home","base")},selected:"home"===c},r.a.createElement(M.a,null)),r.a.createElement(I.D,{onClick:function(){return n("more","callmodal")},selected:"more"===c},r.a.createElement(G.a,null)))},r.a.createElement(I.B,{id:"home",activeView:i,popout:h},r.a.createElement(I.G,{id:"home",modal:m,activePanel:y("home"),history:p,onSwipeBack:function(){return t()}},r.a.createElement(R,{id:"base",withoutEpic:!1}),r.a.createElement(J,{id:"groups"}))),r.a.createElement(I.B,{id:"more",activeView:i,popout:h},r.a.createElement(I.G,{id:"more",modal:m,activePanel:y("more"),history:p,onSwipeBack:function(){return t()}},r.a.createElement(Q,{id:"callmodal"})),r.a.createElement(I.G,{id:"modal",modal:m,activePanel:y("modal"),history:p,onSwipeBack:function(){return t()}},r.a.createElement(ee,{id:"filters"})))))}}]),t}(r.a.Component);var me=Object(s.b)(function(e){return{activeView:e.router.activeView,activeStory:e.router.activeStory,panelsHistory:e.router.panelsHistory,activeModals:e.router.activeModals,popouts:e.router.popouts,scrollPosition:e.router.scrollPosition,colorScheme:e.vkui.colorScheme}},function(e){return Object(p.a)({dispatch:e},Object(c.bindActionCreators)({setStory:j,goBack:k,closeModal:A},e))})(de);n.d(t,"store",function(){return fe});var fe=Object(c.createStore)(E,Object(w.composeWithDevTools)(Object(c.applyMiddleware)(l.a)));fe.dispatch(j("home","base")),i.a.render(r.a.createElement(s.a,{store:fe},r.a.createElement(me,null)),document.getElementById("root"))}},[[140,1,2]]]); //# sourceMappingURL=main.0d10aada.chunk.js.map