-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwidget.js
1 lines (1 loc) · 62.9 KB
/
widget.js
1
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.widget=e():t.widget=e()}(window,function(){return function(t){var e={};function i(a){if(e[a])return e[a].exports;var o=e[a]={i:a,l:!1,exports:{}};return t[a].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,a){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(i.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(a,o,function(e){return t[e]}.bind(null,o));return a},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/build/",i(i.s=358)}({0:function(t,e,i){"use strict";i.d(e,"a",function(){return o}),i.d(e,"b",function(){return n});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function o(t){return function(e,i){var n=o.prefix+t;"string"==typeof e&&(n+="__"+e);var r=[n],s={};return"object"===(void 0===e?"undefined":a(e))?s=e:"object"===(void 0===i?"undefined":a(i))&&(s=i),function(t){return Object.keys(t).filter(function(e){var i=t[e];return i||0===i}).map(function(e){var i=e.trim(),a=t[e];return!0===a?"_"+i:"_"+i+"_"+a})}(s).forEach(function(t){r.push(n+t)}),r.join(" ")}}function n(t,e,i){return o(t)(e,i).split(" ").pop()||""}o.prefix="ya-chat-"},11:function(t,e,i){"use strict";i.d(e,"b",function(){return o}),i.d(e,"a",function(){return n});var a=!1;try{document.createEvent("TouchEvent"),a=!0}catch(t){}var o=Math.max(window.screen.width,window.screen.height)<900&&a,n=/iPad|iPhone|iPod/.test(window.navigator.userAgent)},12:function(t,e,i){"use strict";var a=i(3),o=i(34),n=i(21);function r(t){try{t&&t.parentNode&&t.parentNode.removeChild(t)}catch(t){}}var s=i(4),p=i(0),l=function(){function t(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,i,a){return i&&t(e.prototype,i),a&&t(e,a),e}}();var c=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.delayedMessages=[],this.isReady=!1,this.params=e,this.iframeOpenData=Object.assign({},this.params.iframeOpenData)}return l(t,[{key:"create",value:function(){this.reset(),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("scrolling","no"),this.iframe.src=this.params.url,this.iframe.className=Object(p.b)("messenger-iframe"),this.iframe.onerror=this.params.onError,this.params.container.appendChild(this.iframe)}},{key:"sendMessage",value:function(t,e,i){if(this.isReady)this.sendMessageToIframe(t,e);else{i&&this.removeDelayedMessages(t);var a=e;"iframe-open"===t&&(e?(a=e,this.iframeOpenData=e):a=this.iframeOpenData),this.delayedMessages.push({type:t,payload:a})}}},{key:"sendMessageToIframe",value:function(t,e){var i=this.params.url.split("/").slice(0,3).join("/");i&&0===i.indexOf("http")||(i=Object(s.a)()),this.iframe.contentWindow&&this.iframe.contentWindow.postMessage({namespace:"messenger",type:t,payload:e},i)}},{key:"sendDelayedMessages",value:function(){var t=this;this.delayedMessages.forEach(function(e){t.sendMessage(e.type,e.payload)}),this.delayedMessages=[]}},{key:"removeDelayedMessages",value:function(t){this.delayedMessages=this.delayedMessages.filter(function(e){return e.type!==t})}},{key:"setVisible",value:function(){this.iframe.classList.add(Object(p.b)("messenger-iframe",{visible:!0}))}},{key:"setReady",value:function(){this.isReady=!0,this.sendDelayedMessages(),this.setVisible()}},{key:"reset",value:function(){this.isReady=!1,this.delayedMessages=[],r(this.iframe),delete this.iframe}},{key:"destroy",value:function(){this.reset(),delete this.params}}]),t}();i.d(e,"c",function(){return m}),i.d(e,"b",function(){return h}),i.d(e,"a",function(){return u});var m,h,d=function(){function t(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,i,a){return i&&t(e.prototype,i),a&&t(e,a),e}}();!function(t){t.AUTH_CHANGE="authChange",t.AUTH_REQUEST="authRequest",t.CHAT_SHOW="chatShow",t.CHAT_HIDE="chatHide",t.CHAT_ENTER="chatEnter",t.CHAT_LEAVE="chatLeave",t.ERROR="error",t.MEMBERS_CHANGE="membersChange",t.MESSAGE_SENT="messageSent",t.READY="ready",t.UNREAD_COUNTER_CHANGE="unreadCounterChange"}(m||(m={})),function(t){t.AUTH="auth",t.AUTH_REQUEST="authRequest",t.CHAT_CHANGE="chatChange",t.CHAT_LEAVE="chatLeave",t.CLOSE="close",t.COUNTER="counter",t.ERROR="error",t.FULLSCREEN_ON="fullscreenOn",t.FULLSCREEN_OFF="fullscreenOff",t.MEMBERS="members",t.READY="ready",t.SEND_MESSAGE="send-message",t.SHOW_CHAT="showChat"}(h||(h={}));var u=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.isChatVisible=!1,t.domElems={},t.isChatLoadFailed=!1,t.isChatCreated=!1,t.lastUnreadData={},t.ERROR_TIMEOUT=3e4,window.addEventListener("message",t.handleMessage),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o["EventEmitter"]),d(e,[{key:"initMessengerIframe",value:function(){this.messengerIframe=new c({container:this.domElems.mount,iframeOpenData:{guid:this.options.guid,chatId:this.options.chatId,inviteHash:this.options.inviteHash},onError:this.handleIframeError,url:Object(s.c)(this.options.iframeUrl)})}},{key:"destroy",value:function(){var t=this;window.removeEventListener("message",this.handleMessage),this.messengerIframe.destroy(),this.clearErrorTimeout(),this.removeAllListeners(),Object.keys(this.domElems).forEach(function(e){r(t.domElems[e])}),this.domElems={},this.destroyed=!0}},{key:"sendServiceMeta",value:function(t){this.messengerIframe.sendMessage("serviceMeta",t,!0)}},{key:"getIframeUrl",value:function(t){var e=Object.assign({parentOrigin:Object(s.a)(),parentUrl:window.location.href,serviceId:t.serviceId},t.iframeUrlParams),i=Object(s.b)(Object(s.c)(t.iframeUrl||this.config.iframeUrl),e);return t.chatId&&(i+="#/chats/"+encodeURIComponent(t.chatId)),i}},{key:"getDomElem",value:function(t){return this.domElems.widget.querySelector("."+t)}},{key:"attachStyles",value:function(){var t=document.createElement("style");t.appendChild(document.createTextNode(this.options.styles)),this.domElems.styles=t,document.body.appendChild(t)}},{key:"createMessengerIframe",value:function(){this.messengerIframe.create(),this.hideError(),this.errorTimeout=window.setTimeout(this.showErrorOnTimeout,this.ERROR_TIMEOUT),this.showLoader()}},{key:"handleIframeError",value:function(){this.showErrorOnTimeout()}},{key:"showErrorOnTimeout",value:function(){this.messengerIframe.reset(),this.hideLoader(),this.showError(),this.isChatLoadFailed=!0}},{key:"handleOnErrorRetryClick",value:function(){this.createMessengerIframe()}},{key:"handleMessage",value:function(t){var e=t.data;if(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){}if(e&&e.type&&"messenger"===e.namespace){if("ready"===e.type){if(this.isChatCreated)return;this.isChatCreated=!0,this.messengerIframe.setReady()}this.handleMessengerMessage(e.type,e.payload)}}}},{key:"handleMessengerMessage",value:function(t,e){switch(t){case h.READY:this.handleReadyMessage();break;case h.COUNTER:this.handleUnreadCounter(e);break;case h.CHAT_CHANGE:this.emit(m.CHAT_ENTER,e);break;case h.CHAT_LEAVE:this.emit(m.CHAT_LEAVE,e);break;case h.MEMBERS:this.emit(m.MEMBERS_CHANGE,e);break;case h.ERROR:this.handleErrorMessage(e);break;case h.AUTH:this.emit(m.AUTH_CHANGE,e);break;case h.FULLSCREEN_OFF:this.cancelFullscreen();break;case h.FULLSCREEN_ON:this.setFullscreen();break;case h.SEND_MESSAGE:this.emit(m.MESSAGE_SENT,e);break;case h.AUTH_REQUEST:this.emit(m.AUTH_REQUEST,e)}}},{key:"handleReadyMessage",value:function(){this.emit(m.READY),this.hideLoader(),this.hideError(),this.isChatLoadFailed=!1,this.isChatCreated=!0}},{key:"handleErrorMessage",value:function(t){this.emit(m.ERROR,t),t&&"NEED_COOKIE"===t.code&&(this.hideLoader(),this.hideError(),this.messengerIframe.setVisible())}},{key:"handleUnreadCounter",value:function(t){var e=t.value,i=void 0===e?0:e,a=t.lastTimestamp;if(i!==this.lastUnreadData.value||a!==this.lastUnreadData.lastTimestamp)return this.emit(m.UNREAD_COUNTER_CHANGE,{value:i,lastTimestamp:a}),this.lastUnreadData={value:i,lastTimestamp:a},this.lastUnreadData}},{key:"showLoader",value:function(){this.domElems.loader.classList.add(Object(p.b)("loader",{visible:!0}))}},{key:"hideLoader",value:function(){this.domElems.loader.classList.remove(Object(p.b)("loader",{visible:!0}))}},{key:"showError",value:function(){this.clearErrorTimeout(),this.domElems.error.classList.add(Object(p.b)("error",{visible:!0}))}},{key:"hideError",value:function(){this.clearErrorTimeout(),this.domElems.error.classList.remove(Object(p.b)("error",{visible:!0}))}},{key:"clearErrorTimeout",value:function(){window.clearTimeout(this.errorTimeout),this.errorTimeout=void 0}},{key:"cancelFullscreen",value:function(){document.body.style.overflowX=this.bodyOverflowX,document.body.style.overflowY=this.bodyOverflowY}},{key:"setFullscreen",value:function(){this.bodyOverflowX=document.body.style.overflowX,this.bodyOverflowY=document.body.style.overflowY,document.body.style.overflowX="hidden",document.body.style.overflowY="hidden"}}]),e}();a.a([n.a],u.prototype,"handleIframeError",null),a.a([n.a],u.prototype,"showErrorOnTimeout",null),a.a([n.a],u.prototype,"handleOnErrorRetryClick",null),a.a([n.a],u.prototype,"handleMessage",null)},14:function(t,e,i){"use strict";i.d(e,"a",function(){return r});var a=i(35),o=i(36),n={ru:a,en:o};function r(t,e){return(n[e]||{})[t]||""}},149:function(t,e){t.exports=".ya-chat-paranja,.ya-chat-paranja *,.ya-chat-popup,.ya-chat-popup *,.ya-chat-widget,.ya-chat-widget *{font-family:YS Text Chat Widget,Helvetica Neue,Helvetica,Arial,sans-serif!important;font-weight:400!important;font-style:normal!important;line-height:normal!important;position:static!important;z-index:auto!important;top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;display:block!important;overflow:visible!important;clip:auto!important;zoom:normal!important;-webkit-box-sizing:border-box!important;box-sizing:border-box!important;width:auto!important;min-width:0!important;max-width:none!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;resize:none!important;cursor:auto!important;-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important;-webkit-animation:0s none;animation:0s none;text-align:left!important;text-decoration:none!important;text-indent:0!important;letter-spacing:normal!important;word-spacing:normal!important;text-transform:none!important;-o-text-overflow:clip!important;text-overflow:clip!important;word-wrap:normal!important;word-break:normal!important;opacity:1!important;color:inherit!important;border:0!important;outline:0 none!important;background:none!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important;direction:ltr!important;-webkit-flex:none!important;-ms-flex:none!important;flex:none!important;-webkit-justify-content:flex-start!important;-ms-flex-pack:start!important;justify-content:flex-start!important;-o-object-fit:fill!important;object-fit:fill!important;-webkit-order:1!important;-ms-flex-order:1!important;order:1!important;-webkit-perspective:none!important;perspective:none!important;unicode-bidi:normal!important}@font-face{font-family:YS Text Chat Widget;src:url(//yastatic.net/s3/home/fonts/ys/1/text-medium.woff2) format(\"woff2\"),url(//yastatic.net/s3/home/fonts/ys/1/text-medium.woff) format(\"woff\");font-weight:500;font-style:normal;font-stretch:normal}.ya-chat-disable-page-scroll{overscroll-behavior:none!important;overflow:hidden!important}.ya-chat-disable-page-scroll_ios{position:fixed!important;left:0!important;top:0!important;right:0!important}.ya-chat-widget__mount{position:relative!important;-webkit-flex:1 1!important;-ms-flex:1 1!important;flex:1 1!important;width:50%!important;visibility:hidden!important;-webkit-transition:visibility .4s ease!important;-o-transition:visibility ease .4s!important;transition:visibility .4s ease!important}.ya-chat-widget__mount_visible{visibility:visible!important;-webkit-transition-delay:0s!important;-o-transition-delay:0s!important;transition-delay:0s!important}.ya-chat-widget_theme_legacy{width:35px!important;height:35px!important}.ya-chat-widget_theme_dark,.ya-chat-widget_theme_light{position:fixed!important;top:auto!important;right:20px!important;bottom:20px!important;z-index:10000!important}.ya-chat-widget_theme_dark.ya-chat-widget_desktop,.ya-chat-widget_theme_light.ya-chat-widget_desktop{display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;-webkit-flex-direction:column!important;-ms-flex-direction:column!important;flex-direction:column!important;-webkit-align-items:flex-end!important;-ms-flex-align:end!important;align-items:flex-end!important;-webkit-justify-content:flex-end!important;-ms-flex-pack:end!important;justify-content:flex-end!important;min-width:40px!important;height:40px!important;-webkit-box-shadow:0 6px 20px -5px rgba(0,0,0,.4),0 0 0 1px rgba(0,0,0,.06)!important;box-shadow:0 6px 20px -5px rgba(0,0,0,.4),0 0 0 1px rgba(0,0,0,.06)!important;border-radius:24px!important;-webkit-transition:min-width .4s ease,height .4s ease,max-height .4s ease,border-radius .4s ease,-webkit-box-shadow .4s ease!important;transition:min-width .4s ease,height .4s ease,max-height .4s ease,border-radius .4s ease,-webkit-box-shadow .4s ease!important;-o-transition:min-width .4s ease,height .4s ease,max-height .4s ease,box-shadow .4s ease,border-radius .4s ease!important;transition:min-width .4s ease,height .4s ease,max-height .4s ease,box-shadow .4s ease,border-radius .4s ease!important;transition:min-width .4s ease,height .4s ease,max-height .4s ease,box-shadow .4s ease,border-radius .4s ease,-webkit-box-shadow .4s ease!important}@media screen and (max-height:560px){.ya-chat-widget_theme_dark.ya-chat-widget_desktop,.ya-chat-widget_theme_light.ya-chat-widget_desktop{max-height:calc(100vh - 40px)!important}}.ya-chat-widget_theme_dark.ya-chat-widget_desktop.ya-chat-widget_visible,.ya-chat-widget_theme_light.ya-chat-widget_desktop.ya-chat-widget_visible{min-width:360px!important;height:520px!important;max-height:calc(100vh - 40px)!important;-webkit-box-shadow:0 10px 20px -5px rgba(0,0,0,.4),0 0 0 1px rgba(0,0,0,.06)!important;box-shadow:0 10px 20px -5px rgba(0,0,0,.4),0 0 0 1px rgba(0,0,0,.06)!important;border-radius:8px!important}.ya-chat-widget_theme_dark.ya-chat-widget_desktop.ya-chat-widget_theme_light,.ya-chat-widget_theme_light.ya-chat-widget_desktop.ya-chat-widget_theme_light{background-color:#fff!important}.ya-chat-widget_theme_dark.ya-chat-widget_desktop.ya-chat-widget_theme_dark,.ya-chat-widget_theme_light.ya-chat-widget_desktop.ya-chat-widget_theme_dark{background-color:#292c33!important}.ya-chat-widget_theme_dark.ya-chat-widget_size_large,.ya-chat-widget_theme_light.ya-chat-widget_size_large{min-width:60px!important;height:60px!important;border-radius:36px!important}.ya-chat-widget_theme_hidden{position:fixed!important;top:auto!important;right:20px!important;bottom:20px!important;z-index:10000!important}.ya-chat-paranja{position:fixed!important;top:0!important;right:0!important;bottom:0!important;left:0!important;z-index:10005!important;display:none!important;visibility:hidden!important;-webkit-transition:opacity .32s ease .08s,visibility 0s ease .4s!important;-o-transition:opacity .32s ease .08s,visibility 0s ease .4s!important;transition:opacity .32s ease .08s,visibility 0s ease .4s!important;opacity:0!important;background-color:rgba(0,0,0,.56)!important;-webkit-tap-highlight-color:rgba(0,0,0,0)!important}.ya-chat-paranja_visible{visibility:visible!important;-webkit-transition-delay:0s!important;-o-transition-delay:0s!important;transition-delay:0s!important;opacity:1!important}.ya-chat-paranja_mobile{display:block!important}.ya-chat-popup{z-index:10010!important;-webkit-tap-highlight-color:rgba(0,0,0,0)!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;visibility:hidden!important;-webkit-flex-direction:column!important;-ms-flex-direction:column!important;flex-direction:column!important;-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important;opacity:0!important;-webkit-flex:1 1 auto!important;-ms-flex:1 1 auto!important;flex:1 1 auto!important;-webkit-align-items:center!important;-ms-flex-align:center!important;align-items:center!important;-webkit-justify-content:center!important;-ms-flex-pack:center!important;justify-content:center!important;-webkit-transition:opacity .32s ease .08s,visibility 0s ease .4s!important;-o-transition:opacity .32s ease .08s,visibility 0s ease .4s!important;transition:opacity .32s ease .08s,visibility 0s ease .4s!important}.ya-chat-popup:before{position:absolute!important;top:0!important;right:0!important;bottom:0!important;left:0!important;content:\"\"!important;background:#fff!important}.ya-chat-popup_mobile.ya-chat-popup:before{top:8px!important}.ya-chat-popup_position_static{position:absolute!important;bottom:0!important;right:0!important}.ya-chat-popup_position_target{position:fixed!important;left:-9999px!important;top:-9999px!important}.ya-chat-popup_position_absolute{position:absolute!important;left:-9999px!important;top:-9999px!important}.ya-chat-popup_fullscreen,.ya-chat-popup_position_fixed{position:fixed!important;left:0!important;top:40px!important;bottom:0!important;right:0!important;border-radius:0!important;-webkit-transform:translateY(50%)!important;transform:translateY(50%)!important;overflow:visible!important}.ya-chat-popup_visible{visibility:visible!important;opacity:1!important;-webkit-transition-delay:0s!important;-o-transition-delay:0s!important;transition-delay:0s!important;-webkit-transform:translateY(0)!important;transform:translateY(0)!important}.ya-chat-popup.ya-chat-popup_visible.ya-chat-popup_fullscreen{width:50%!important;height:50%!important;max-height:50%!important;top:0!important;border-radius:0!important}.ya-chat-popup_mobile{-webkit-transition-duration:.4s,.32s,0s!important;-o-transition-duration:.4s,.32s,0s!important;transition-duration:.4s,.32s,0s!important}.ya-chat-popup_mobile.ya-chat-popup_visible{-webkit-transition-delay:0s,.08s,0s!important;-o-transition-delay:0s,.08s,0s!important;transition-delay:0s,.08s,0s!important}.ya-chat-popup_theme_hidden.ya-chat-popup_desktop,.ya-chat-popup_theme_legacy.ya-chat-popup_desktop{overflow:visible!important;border:none!important;border-radius:4px!important;-webkit-box-shadow:0 1.5ex 2ex -1ex rgba(0,0,0,.3)!important;box-shadow:0 1.5ex 2ex -1ex rgba(0,0,0,.3)!important;width:420px!important;height:600px!important}.ya-chat-popup_theme_hidden.ya-chat-popup_desktop:before,.ya-chat-popup_theme_legacy.ya-chat-popup_desktop:before{border-radius:4px!important;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.05)!important;box-shadow:0 0 0 1px rgba(0,0,0,.05)!important}.ya-chat-popup_theme_hidden.ya-chat-popup_desktop{max-height:calc(100vh - 40px)!important}.ya-chat-popup_theme_legacy.ya-chat-popup_desktop{max-height:calc(100vh - 80px)!important}.ya-chat-popup_theme_dark,.ya-chat-popup_theme_hidden.ya-chat-popup_mobile,.ya-chat-popup_theme_legacy.ya-chat-popup_mobile,.ya-chat-popup_theme_light{-webkit-transition-timing-function:ease,ease-in,ease!important;-o-transition-timing-function:ease,ease-in,ease!important;transition-timing-function:ease,ease-in,ease!important;-webkit-transition-property:opacity,visibility,-webkit-transform!important;transition-property:opacity,visibility,-webkit-transform!important;-o-transition-property:transform,opacity,visibility!important;transition-property:transform,opacity,visibility!important;transition-property:transform,opacity,visibility,-webkit-transform!important;-webkit-transition-delay:0s,0s,.4s!important;-o-transition-delay:0s,0s,.4s!important;transition-delay:0s,0s,.4s!important}.ya-chat-popup_theme_dark.ya-chat-popup_desktop,.ya-chat-popup_theme_light.ya-chat-popup_desktop{overflow:hidden!important;width:50%!important;height:50%!important;border-radius:inherit!important;-webkit-transition-duration:.4s,.16s,0s!important;-o-transition-duration:.4s,.16s,0s!important;transition-duration:.4s,.16s,0s!important}.ya-chat-popup_theme_dark.ya-chat-popup_desktop.ya-chat-popup_visible,.ya-chat-popup_theme_light.ya-chat-popup_desktop.ya-chat-popup_visible{-webkit-transition-delay:0s,.24s,0s!important;-o-transition-delay:0s,.24s,0s!important;transition-delay:0s,.24s,0s!important}.ya-chat-badge{position:absolute!important;-webkit-transition:-webkit-transform .08s ease-out!important;transition:-webkit-transform .08s ease-out!important;-o-transition:transform .08s ease-out!important;transition:transform .08s ease-out!important;transition:transform .08s ease-out,-webkit-transform .08s ease-out!important;-webkit-transform:scale(0)!important;transform:scale(0)!important}.ya-chat-badge_has-count{-webkit-transform:scale(1)!important;transform:scale(1)!important}.ya-chat-badge_type_dot{bottom:auto!important;left:auto!important;width:8px!important;height:8px!important;-webkit-box-sizing:content-box!important;box-sizing:content-box!important;border:2px solid #fff!important;border-radius:50%!important;background-clip:padding-box!important;background-color:red!important}.ya-chat-badge_type_dot .ya-chat-badge__count{display:none!important}.ya-chat-badge__count{font-size:13px!important;font-weight:700!important;line-height:15px!important;color:#fff!important;vertical-align:middle!important;text-align:center!important;border-radius:15px!important;cursor:pointer!important;padding:0 4px!important;-webkit-box-sizing:border-box!important;box-sizing:border-box!important;background-color:red!important}.ya-chat-badge_theme_legacy{top:3px!important;right:3px!important}.ya-chat-badge_theme_dark,.ya-chat-badge_theme_light{top:-3px!important;right:-3px!important}.ya-chat-button{visibility:visible!important;cursor:pointer!important;-webkit-tap-highlight-color:rgba(0,0,0,0)!important;-webkit-user-select:none!important}.ya-chat-button_mobile{top:12px!important;left:12px!important}.ya-chat-button__container{display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;-webkit-align-items:center!important;-ms-flex-align:center!important;align-items:center!important}.ya-chat-button__container,.ya-chat-button__text{overflow:hidden!important;cursor:pointer!important}.ya-chat-button__text{-webkit-flex:1 1 auto!important;-ms-flex:1 1 auto!important;flex:1 1 auto!important}.ya-chat-button__text-container{overflow:hidden!important;padding-left:8px!important;font-size:14px!important;font-weight:500!important;line-height:40px!important;vertical-align:middle!important;white-space:nowrap!important;-o-text-overflow:ellipsis!important;text-overflow:ellipsis!important;cursor:pointer!important}.ya-chat-button_theme_legacy{width:50%!important;height:50%!important}.ya-chat-button_theme_legacy .ya-chat-button__container{padding:0 7px!important;height:50%!important}.ya-chat-button_theme_legacy .ya-chat-button__text{display:none!important}.ya-chat-button_theme_legacy .ya-chat-icon{width:21px!important;height:21px!important}.ya-chat-button_theme_legacy:active .ya-chat-icon{-webkit-transform:scale(.9)!important;transform:scale(.9)!important}.ya-chat-button_theme_dark,.ya-chat-button_theme_light{position:relative!important;-webkit-transition:opacity .32s ease .08s!important;-o-transition:opacity .32s ease .08s!important;transition:opacity .32s ease .08s!important}.ya-chat-button_theme_dark.ya-chat-button_hidden,.ya-chat-button_theme_light.ya-chat-button_hidden{opacity:0!important;-webkit-transition-delay:0s!important;-o-transition-delay:0s!important;transition-delay:0s!important}.ya-chat-button_theme_dark .ya-chat-button__container,.ya-chat-button_theme_light .ya-chat-button__container{vertical-align:top!important;white-space:nowrap!important;padding-left:12px!important;padding-right:16px!important;height:40px!important;max-width:280px!important;-webkit-transition:padding .4s ease,max-width .4s ease!important;-o-transition:padding .4s ease,max-width .4s ease!important;transition:padding .4s ease,max-width .4s ease!important;-webkit-transform-origin:50% 25%!important;transform-origin:50% 25%!important;border-radius:24px!important}.ya-chat-button_theme_dark .ya-chat-button__container_size_large,.ya-chat-button_theme_light .ya-chat-button__container_size_large{height:60px!important;max-width:420px!important;border-radius:36px!important}.ya-chat-button_theme_dark.ya-chat-button_desktop .ya-chat-button__container:after,.ya-chat-button_theme_light.ya-chat-button_desktop .ya-chat-button__container:after{content:\"\"!important;position:absolute!important;top:0!important;left:0!important;width:calc(50% + 20px)!important;height:calc(50% + 20px)!important}.ya-chat-button_theme_dark.ya-chat-button_mobile .ya-chat-button__container,.ya-chat-button_theme_light.ya-chat-button_mobile .ya-chat-button__container{-webkit-box-shadow:0 6px 20px -5px rgba(0,0,0,.4),0 0 0 1px rgba(0,0,0,.06)!important;box-shadow:0 6px 20px -5px rgba(0,0,0,.4),0 0 0 1px rgba(0,0,0,.06)!important}.ya-chat-button_theme_dark.ya-chat-button_mobile .ya-chat-button__container:after,.ya-chat-button_theme_light.ya-chat-button_mobile .ya-chat-button__container:after{content:\"\"!important;position:absolute!important;left:-12px!important;top:-12px!important;width:calc(50% + 24px)!important;height:calc(50% + 24px)!important}.ya-chat-button_theme_dark.ya-chat-button_collapsed_always .ya-chat-button__container,.ya-chat-button_theme_light.ya-chat-button_collapsed_always .ya-chat-button__container{padding-left:8px!important;padding-right:8px!important}.ya-chat-button_theme_dark.ya-chat-button_collapsed_always .ya-chat-button__container_size_large,.ya-chat-button_theme_light.ya-chat-button_collapsed_always .ya-chat-button__container_size_large{padding-left:12px!important;padding-right:12px!important}.ya-chat-button_theme_dark.ya-chat-button_collapsed_always .ya-chat-button__text,.ya-chat-button_theme_light.ya-chat-button_collapsed_always .ya-chat-button__text{display:none!important}.ya-chat-button_theme_dark.ya-chat-button_collapsed_hover .ya-chat-button__text,.ya-chat-button_theme_light.ya-chat-button_collapsed_hover .ya-chat-button__text{-webkit-transition:opacity .4s ease!important;-o-transition:opacity .4s ease!important;transition:opacity .4s ease!important}.ya-chat-button_theme_dark.ya-chat-button_collapsed_hover:not(:hover) .ya-chat-button__container,.ya-chat-button_theme_light.ya-chat-button_collapsed_hover:not(:hover) .ya-chat-button__container{max-width:40px!important;padding-left:8px!important;padding-right:8px!important}.ya-chat-button_theme_dark.ya-chat-button_collapsed_hover:not(:hover) .ya-chat-button__container_size_large,.ya-chat-button_theme_light.ya-chat-button_collapsed_hover:not(:hover) .ya-chat-button__container_size_large{max-width:60px!important;padding-left:12px!important;padding-right:12px!important}.ya-chat-button_theme_dark.ya-chat-button_collapsed_hover:not(:hover) .ya-chat-button__text,.ya-chat-button_theme_light.ya-chat-button_collapsed_hover:not(:hover) .ya-chat-button__text{opacity:0!important}.ya-chat-button_theme_light .ya-chat-button__container{background-color:#fff!important}.ya-chat-button_theme_light .ya-chat-button__text{color:#292c33!important}.ya-chat-button_theme_dark .ya-chat-button__container{background-color:#292c33!important}.ya-chat-button_theme_dark .ya-chat-button__text{color:#fff!important}.ya-chat-button.ya-chat-button_theme_hidden{display:none!important}.ya-chat-icon{position:relative!important;width:24px!important;height:24px!important;cursor:pointer!important;background-repeat:no-repeat!important;background-position:50%!important;background-size:50%!important}.ya-chat-icon_type_black{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cpath fill-rule='evenodd' d='M9 18a9 9 0 1 1 8.317-5.555c-.306.738-.372 1.468.49 4.82a.444.444 0 0 1-.542.543l-2.583-.676a3.555 3.555 0 0 0-.26-.057v-.001c-.642-.118-1.302-.037-1.977.243A8.973 8.973 0 0 1 9 18zm0-5.063a3.938 3.938 0 1 0 0-7.875 3.938 3.938 0 0 0 0 7.875z'/%3E%3C/svg%3E\")!important}.ya-chat-icon_type_white{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg height='24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 24C5.373 24 0 18.627 0 12S5.373 0 12 0s12 5.373 12 12c0 1.627-.324 3.178-.91 4.593-.409.984-.496 1.958-.263 2.922l.036.145.705 2.687a1 1 0 0 1-1.22 1.22l-2.537-.663a7.99 7.99 0 0 0-.583-.129l.002-.01c-.857-.157-1.736-.049-2.637.325-1.415.586-2.966.91-4.593.91zm0-6.667a5.333 5.333 0 1 0 0-10.666 5.333 5.333 0 0 0 0 10.666z' fill='%23fff' fill-rule='evenodd'/%3E%3C/svg%3E\")!important}.ya-chat-icon_type_colored{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg height='24' width='24' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cdefs%3E%3Cpattern id='a' height='50%25' width='50%25'%3E%3Cpath fill='%234b38ff' d='M0 0h24v24H0z'/%3E%3Cimage height='24' width='24' xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGOfPtRkwAABTlJREFUaAWtmM2S4zYMhMfOVE55h2Tz8yo57fuf8rObfYScUqnYQZP4pBZM0dLssIpqoNEAQZOya+by8df7/UXj0p798cwmXlFlxFX+ma9Vq8a5apt/ld1G38bcTukLWhAe3OOJV6R5551zWxrzr0szCmhhFgfhHWX7MK2ZrlhtW3wl0yIGiq528fsJ7K3qPDbI6tWHP4o0BJ7MW6/Q0UR0tfHqo9vDIw27xm2ruV4hNUATM1vJrrNiU3PUQOXkwzliawHXhPt4hWhOYrflv9fwhlTzmc+6A934Co0ahwMpKh8ubVwkh7A29ywp9a9tcTm+avVVDA5kAfmjoXqjGJwQ2/PhKqKBT//xCiGsyAbBvXjl3S+LLyH4iosgDeLGr1fIG5OND1pSM+HBGj/rD5obnhB1pY/Zr5BIETRDMfnOS8eAP4LU81xxI14a592usfDfdgLaGJvdQWit2QaNgPBCcSPeNegK97rxWZVi8mXDS0xMNgMd/jP0Gm4rDx+k1o6/XiEXesPPeOIgC402pRhxbPdrDWKVxw9cf4khR80rBu+I7bniKk8crI05Twz0GLZhv0Ja0BNoQFy14UArtqlReek1Ge67rXjVkeOYmvEPmQurXTc7ioujCRBOfp3EhBqe05kN5+H1BAbC9umjrieBviIbRE+cOkKfihOrdvFdRs72W0gJvrAyzvjkswn5Gt4wdo+szXt3Zpu5askNfM2/iNmQhQamN+Y2TflqstEQ16+OJjpQS4W9uIuhwHwsJ6C16rhUUoXh3CaRmPyI37/JpqSlcdmaGokN4Hpk/1l0j78DlnovYjVfqSZX4wRks5HYQOOF2KlrQE6EH8YsZuLpBpZGrBi9LTEr1szQXm5h/ZeB78L/Nm2rk8xXw3KFppWWricqNIHN1OPvmIGX7zu2QAtO6pwMzU+gFhst7pxsZpzA/d+YX3qR6w9ZTKfD8Fy4EU504xOYJPSP11ZBK2RyheTHtbn91fXXD93v3uBJrRqaXL1jJzAqDCd0W83DCfXtE9ztc2CMtgkZ0tEY+fiKw8mejPUE9hIqjw+quGymb4CF2cSnTrTrJI4cb1wS8ZUTr6GYjf0TKMKWAzdCcT5tkWaqoZjtJEJ3/akIqClaWvdd6hsLzXoCiGqi+yNbHJMaSZnbTU7ic7psQvm1aRr1NWvB0IxPoCbhgyqELWTCuy/Om5Eds51E4PJiK8d1ytOA6966bvr6TNZRF1ZEXB1we1j17tNQ4O1TzD8jKA5e2uqLY5TYeoVoBqH7IxuuYuRDUWpBLU4wG9YmNNo7wRdAp/pG0MOBmb+9QlXsPvYInZONz2LC2rw0dRMfio48ocag7nqFPCi7+qMCrlE8xoDqgfrM5rkum+u0drXNIsfY/kf9bNVR7ChnC01NNRazbeKPVM42YRs59w5449hCt6ed9kYXvRohN5tqL3XQ1x/1iKn3YjRS3/dJEYTuu13jZ2N8ciD1QPExH05iTx/y8/8XYrH3wtqcPlI28XsuIk3VZeh9rpCKxWmMDiTXeQQ1RILbUmaz7Ss2rtD155VbcqSL8bYr1HOPP3c+vWkB5cS8fYn5WyqT87zt74AifCquqjaailX3tX5uXJvQuP4Sj+To89wVUpWdpqEledNQY7WIccsfRX6dIqVfobqiF9qza458tOBIwyeomNsjH066mMt1Uv3MHb8DSjwxZv2eKNOldVNicwPLJuzbafsO1E7cP2Kf7jab89p7NbSJ1C1/nsbfE8fegb2izh9pAr01A3UY84T0Ttz/eXn5H20cphxm9yD4AAAAAElFTkSuQmCC'/%3E%3C/pattern%3E%3C/defs%3E%3Cpath fill='url(%23a)' d='M12 24C5.373 24 0 18.627 0 12S5.373 0 12 0s12 5.373 12 12c0 1.627-.324 3.178-.91 4.593-.409.984-.496 1.958-.263 2.922l.036.145.705 2.687a1 1 0 0 1-1.22 1.22l-2.537-.663a7.99 7.99 0 0 0-.583-.129l.002-.01c-.857-.157-1.736-.049-2.637.325-1.415.586-2.966.91-4.593.91zm0-6.667a5.333 5.333 0 1 0 0-10.666 5.333 5.333 0 0 0 0 10.666z'/%3E%3C/svg%3E\")!important}.ya-chat-icon_size_large{height:36px!important;width:36px!important}.ya-chat-header{display:none!important;-webkit-tap-highlight-color:rgba(0,0,0,0)!important;position:relative!important;width:50%!important;height:49px!important;border-bottom:1px solid #e6ebf1!important;background-color:#f3f5f8!important;visibility:hidden!important;display:block!important;-webkit-transition:visibility .4s ease!important;-o-transition:visibility ease .4s!important;transition:visibility .4s ease!important}.ya-chat-header__text{font-size:16px!important;font-weight:500!important;line-height:48px!important;overflow:hidden!important;-webkit-box-sizing:border-box!important;box-sizing:border-box!important;width:50%!important;max-width:50%!important;padding:0 48px 0 16px!important;white-space:nowrap!important;-o-text-overflow:ellipsis!important;text-overflow:ellipsis!important;color:#333!important;-webkit-user-select:none!important}.ya-chat-header__close{position:absolute!important;top:0!important;right:0!important;width:48px!important;height:50%!important;cursor:pointer!important;opacity:.8!important;background:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M17.566 17.566a.8.8 0 0 0 0-1.132L13.13 12l4.435-4.434a.8.8 0 1 0-1.132-1.132L12 10.87 7.566 6.434a.8.8 0 1 0-1.132 1.132L10.87 12l-4.435 4.434a.8.8 0 0 0 1.132 1.132L12 13.13l4.434 4.435a.8.8 0 0 0 1.132 0z' fill='%23919CB5'/%3E%3C/svg%3E\") no-repeat 50%!important;background-size:50%!important}.ya-chat-header__close:hover{opacity:1!important}.ya-chat-header_visible{visibility:visible!important;-webkit-transition-delay:0s!important;-o-transition-delay:0s!important;transition-delay:0s!important}.ya-chat-header_hidden,.ya-chat-header_mobile .ya-chat-header__close{display:none!important}.ya-chat-header_mobile{border-radius:8px 8px 0 0!important}.ya-chat-header_theme_hidden.ya-chat-header_empty,.ya-chat-header_theme_legacy.ya-chat-header_empty{display:none!important}.ya-chat-messenger-iframe{position:absolute!important;left:0!important;top:0!important;width:50%!important;height:50%!important;border:0!important;display:none!important}.ya-chat-messenger-iframe_visible{display:block!important}.ya-chat-error{position:absolute!important;z-index:10020!important;top:50%!important;left:50%!important;color:#292c33!important;display:none!important;max-width:95%!important;padding:10px!important;-webkit-transform:translate(-50%,-50%)!important;transform:translate(-50%,-50%)!important;text-align:center!important}.ya-chat-error_visible{display:block!important}.ya-chat-error__title{font-size:22.5px!important;font-weight:700!important;line-height:1.467!important;margin-bottom:12px!important;text-align:center!important}.ya-chat-error__button{font-size:14px!important;font-weight:500!important;line-height:36px!important;padding:0 16px!important;cursor:pointer!important;text-align:center!important;white-space:nowrap!important;letter-spacing:.5px!important;text-transform:uppercase!important;color:#1c70c4!important;-webkit-tap-highlight-color:rgba(0,0,0,0)!important}.ya-chat-error_mobile{background-color:rgba(0,0,0,.05)!important}.ya-chat-error_theme_dark{color:#fff!important}.ya-chat-mobile-header{left:0!important;display:none!important;height:40px!important;-webkit-transform:translateY(-50%)!important;transform:translateY(-50%)!important;visibility:hidden!important}.ya-chat-mobile-header,.ya-chat-mobile-header__close{position:absolute!important;right:0!important;top:0!important}.ya-chat-mobile-header__close{font-size:14px!important;line-height:40px!important;height:50%!important;padding:0 12px!important;vertical-align:middle!important;color:#fff!important;cursor:pointer!important;-webkit-user-select:none!important;-webkit-tap-highlight-color:rgba(0,0,0,0)!important}.ya-chat-mobile-header__slider{display:none!important;position:absolute!important;bottom:4px!important;left:50%!important;width:32px!important;height:4px!important;-webkit-transform:translateX(-50%)!important;transform:translateX(-50%)!important;border-radius:2px!important;background-color:#fff!important}.ya-chat-mobile-header_mobile{display:block!important}.ya-chat-mobile-header_visible{visibility:visible!important}.ya-chat-loader{position:absolute!important;z-index:10030!important;top:0!important;right:0!important;bottom:0!important;left:0!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;visibility:hidden!important;-webkit-transition:visibility 0s ease-in-out .2s,opacity .2s ease-in-out!important;-o-transition:visibility 0s ease-in-out .2s,opacity .2s ease-in-out!important;transition:visibility 0s ease-in-out .2s,opacity .2s ease-in-out!important;opacity:0!important;-webkit-align-items:center!important;-ms-flex-align:center!important;align-items:center!important;-webkit-justify-content:center!important;-ms-flex-pack:center!important;justify-content:center!important}.ya-chat-loader_visible{visibility:visible!important;-webkit-transition-delay:0s!important;-o-transition-delay:0s!important;transition-delay:0s!important;opacity:1!important}.ya-chat-spinner{width:38px!important;height:38px!important;-webkit-animation:ya-chat-spinner-rotate 1s linear infinite;animation:ya-chat-spinner-rotate 1s linear infinite;border-color:#1c70c4 transparent transparent #1c70c4!important;border-style:solid!important;border-width:2px!important;border-radius:50%!important}@-webkit-keyframes ya-chat-spinner-rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes ya-chat-spinner-rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}"},21:function(t,e,i){"use strict";i.d(e,"a",function(){return a});var a=function(t,e,i){if("function"==typeof t){var a=""+t;throw a.length>111&&(a=a.substr(0,111)+"...<omitted>... }"),new TypeError("Cannot bind static method "+e+" of "+a)}var o=i.value,n=!1;return{configurable:!0,get:function(){if(n)return o;var t=o.bind(this);return n=!0,Object.defineProperty(this,e,{configurable:!0,get:function(){return t}}),n=!1,t}}}},28:function(t,e,i){"use strict";var a=function(t){function e(i,a,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t.call(this,i),this.listener=a,this.context=o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(i(57));t.exports=a},29:function(t,e,i){"use strict";var a=function(t){};t.exports=function(t,e,i,o,n,r,s,p){if(a(e),!t){var l;if(void 0===e)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[i,o,n,r,s,p],m=0;(l=new Error(e.replace(/%s/g,function(){return c[m++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}},3:function(t,e,i){"use strict";i.d(e,"a",function(){return a});function a(t,e,i,a){var o,n=arguments.length,r=n<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,a);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r}},33:function(t,e){function i(t){return(t.match(/\./g)||[]).length}const a=["ua","ru","kz","by","com.tr","com","net","uz","fr","com.ge","az","com.am","co.il","kg","lv","lt","md","tj","tm","ee"].sort(function(t,e){return i(e)-i(t)}),o="yandex\\.("+a.map(function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}).join("|")+")";t.exports={YANDEX_TLD:a,URL_REGEX_YANDEX_TLD:o}},34:function(t,e,i){var a={EventEmitter:i(56),EmitterSubscription:i(28)};t.exports=a},35:function(t){t.exports={close:"Закрыть","error-title":"Не удалось загрузить чат","error-try-again":"Попробовать ещё раз"}},358:function(t,e,i){"use strict";i.r(e);i(55);var a={name:"external",badgeType:"num",badgeMaxCount:99,buttonIcon:"colored",buttonIconByTheme:{light:"colored",dark:"white"},collapsedDesktop:"hover",collapsedTouch:"always",iframeUrl:"https://yandex.ru/chat?build=widget&serviceId=11",lang:"ru",theme:"light",unreadUrl:""},o=i(53),n=i(38),r=i(149);var s=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,a,Object.assign({},t,{styles:r})))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o["a"]),e}();e.default=s;Object(n.a)(s)},36:function(t){t.exports={close:"Close","error-title":"Failed to load chat","error-try-again":"Try again"}},37:function(t,e,i){"use strict";var a=i(0),o=i(14);e.a=function(t){var e=Object(a.a)("error");return'\n <div class="'+e({mobile:t.isMobile,theme:t.theme})+'">\n <div class="'+e("title")+'">'+Object(o.a)("error-title",t.lang)+'</div>\n <div class="'+e("button")+'">'+Object(o.a)("error-try-again",t.lang)+"</div>\n </div>"}},38:function(t,e,i){"use strict";function a(t){window.Ya=window.Ya||{},window.Ya.ChatWidget=t,"function"==typeof window.yandexChatWidgetCallback&&(window.yandexChatWidgetCallback(),delete window.yandexChatWidgetCallback)}i.d(e,"a",function(){return a})},39:function(t,e,i){"use strict";var a=i(0);e.a=function(t){return'\n <div class="'+Object(a.a)("loader")({theme:t})+'">\n '+function(t){return'<div class="'+Object(a.a)("spinner")({theme:t})+'"></div>'}(t)+"\n </div>"}},4:function(t,e,i){"use strict";i.d(e,"b",function(){return o}),i.d(e,"a",function(){return n}),i.d(e,"c",function(){return m});var a=i(33);function o(t,e){var i=-1===t.search(/\?/)?"?":"&",a=function(t){return t.map(function(t){var e=t.name,i=t.value;return Array.isArray(i)?i.map(function(t){return r(e,t)}).filter(Boolean).join("&"):r(e,i)}).filter(Boolean).join("&")}(Object.keys(e).map(function(t){return{name:t,value:e[t]}}));return t+(a?i+a:"")}function n(){return window.location.origin||window.location.protocol+"//"+window.location.host}function r(t,e){return null==e||""===e?"":encodeURIComponent(t)+"="+encodeURIComponent(String(e))}var s,p,l="undefined"!=typeof location?location.hostname:"",c=(s=l,(p=new RegExp(a.URL_REGEX_YANDEX_TLD+"$").exec(s))&&p[1]||"ru");function m(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;return t.replace(/\{tld\}/,e)}},53:function(t,e,i){"use strict";var a,o=i(3),n=i(21),r=52122583,s="yaCounter"+r;function p(t){window[s]&&window[s].reachGoal(t)}function l(){try{window[s]=new window.Ya.Metrika({id:r,trackLinks:!0,accurateTrackBounce:!0})}catch(t){}}if(function(t){t.SHOW_CHAT="show-chat",t.HIDE_CHAT="hide-chat"}(a||(a={})),window.Ya&&window.Ya.Metrika)l();else{(window.yandex_metrika_callbacks=window.yandex_metrika_callbacks||[]).push(function(){l()});var c=document.getElementsByTagName("script")[0],m=document.createElement("script");m.async=!0,m.src="https://mc.yandex.ru/metrika/watch.js",(c&&c.parentNode||document.body).insertBefore(m,c)}var h=i(4),d=function(){function t(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,i,a){return i&&t(e.prototype,i),a&&t(e,a),e}}();var u=1e4,b=3e5,f=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.isStarted=!1,this.timeoutId=-1,this.timeout=u,this.reqNum=0,this.params=e}return d(t,[{key:"start",value:function(){!this.params.disabled&&this.params.url&&window.navigator.cookieEnabled&&(this.isStarted=!0,this.fetch(!0))}},{key:"stop",value:function(){this.isStarted=!1,this.clearTimeout()}},{key:"fetch",value:function(t){var e=this;if(t||!document.hidden&&window.navigator.onLine){this.reqNum++;var i=new XMLHttpRequest;i.open("GET",Object(h.b)(this.params.url,{parentOrigin:this.params.parentOrigin,reqNum:this.reqNum,serviceId:this.params.serviceId}),!0),i.withCredentials=!0,i.onload=function(){if(e.isStarted)if(200===i.status){var t=void 0;try{t=JSON.parse(i.responseText)}catch(t){}e.timeout=t&&t.Ttl&&t.Ttl>=10?1e3*t.Ttl:u,t?e.handleResponse(t):e.retryFetch()}else e.handleError(i.status)},i.onerror=i.onabort=i.ontimeout=function(){return e.handleError(i.status)},i.setRequestHeader("Content-Type","application/json"),i.overrideMimeType("text/plain"),i.send(null)}else this.retryFetch()}},{key:"clearTimeout",value:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(){clearTimeout(this.timeoutId)})},{key:"retryFetch",value:function(){this.clearTimeout(),this.isStarted&&(this.timeoutId=setTimeout(this.fetch.bind(this),this.timeout))}},{key:"handleResponse",value:function(t){var e;(e=t)&&e.Status?this.handleError(t.Status):(t&&this.params.callback({value:t.UnreadCount,lastTimestamp:t.LastUnreadTsMcs}),this.retryFetch())}},{key:"handleError",value:function(t){var e;this.timeout=function(t){return 401===t||403===t}(t)?b:(e=this.timeout,Math.min(2*e,b)),this.isStarted&&this.retryFetch()}},{key:"destroy",value:function(){this.stop()}}]),t}();var y=i(11),g=i(0),v="disable-page-scroll",_=void 0,w="",x="",k=0,E=0,C=300;function O(){window.clearTimeout(_)}var j=function(t){var e=Object(g.a)("button"),i=t.text?'\n <div class="'+e("text")+'">\n <div class="'+e("text-container")+'">'+t.text+"</div>\n </div>":"";return'\n <div class="'+e({theme:t.theme,mobile:t.isMobile,collapsed:t.collapsed,size:t.size,desktop:!t.isMobile})+'">\n <div class="'+e("container",{size:t.size})+'">\n '+function(t){return'<div class="'+Object(g.a)("icon")({type:t.type,size:t.size})+'"></div>'}({type:t.icon,size:t.size})+"\n "+i+"\n </div>\n "+function(t){var e=Object(g.a)("badge"),i=t.maxCount<(t.count||0)?t.maxCount+"+":t.count;return'\n <div class="'+e({theme:t.theme,type:t.type,"has-count":Boolean(t.count),size:t.size})+'">\n <div class="'+e("count")+'">'+(i||"")+"</div>\n </div>"}({count:t.badgeCount,maxCount:t.badgeMaxCount,theme:t.theme,type:t.badgeType,size:t.size})+"\n </div>"},T=i(37),M=i(39),L=function(){function t(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,i,a){return i&&t(e.prototype,i),a&&t(e,a),e}}();var A=10;var R=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.params=e}return L(t,[{key:"bindEvents",value:function(){window.addEventListener("resize",this.handleUpdatePosition),window.addEventListener("scroll",this.handleUpdatePosition),window.addEventListener("orientationchange",this.handleUpdatePosition)}},{key:"unbindEvents",value:function(){window.removeEventListener("resize",this.handleUpdatePosition),window.removeEventListener("scroll",this.handleUpdatePosition),window.removeEventListener("orientationchange",this.handleUpdatePosition)}},{key:"handleUpdatePosition",value:function(){var t=this.params.targetElem.getBoundingClientRect();this.setPosition(function(t,e){var i=e.left,a=e.right,o=e.top,n=e.bottom,r=i,s=n,p=t.offsetWidth,l=t.offsetHeight,c=function(){var t=window.innerWidth,e=window.innerHeight;return{left:0+A,top:0+A,right:0+t-A,bottom:0+e-A}}(),m={left:c.left+(c.right-c.left)/2,top:c.top+(c.bottom-c.top)/2};i+p>c.right&&(r=a>m.left?Math.max(a-p,A):Math.min(i,c.right-p));n+l>c.bottom&&o>m.top&&(s=o-l);return{left:Math.floor(r),top:Math.floor(s)}}(this.params.popupElem,t))}},{key:"setPosition",value:function(t){this.params.popupElem.setAttribute("style","left: "+t.left+"px !important;top: "+t.top+"px !important;")}},{key:"setFullscreen",value:function(){this.params.popupElem.classList.add(Object(g.b)("popup",{fullscreen:!0})),"target"===this.params.position&&(this.setPosition({left:0,top:0}),this.unbindEvents())}},{key:"cancelFullscreen",value:function(){this.params.popupElem.classList.remove(Object(g.b)("popup",{fullscreen:!0})),"target"===this.params.position&&(this.handleUpdatePosition(),this.bindEvents())}},{key:"show",value:function(){this.params.popupElem.classList.add(Object(g.b)("popup",{visible:!0})),"target"===this.params.position&&(this.handleUpdatePosition(),this.bindEvents())}},{key:"hide",value:function(){this.params.popupElem.classList.remove(Object(g.b)("popup",{visible:!0})),"target"===this.params.position&&this.unbindEvents()}},{key:"destroy",value:function(){this.unbindEvents(),delete this.params}}]),t}();o.a([n.a],R.prototype,"handleUpdatePosition",null);var S=i(14),z=function(t){var e,i=Object(g.a)("widget"),a=Boolean(t.isMobile),o="always"===t.buttonCollapsed?"large":"normal",n="\n "+function(t){var e=Object(g.a)("mobile-header");return'\n <div class="'+e({mobile:t.isMobile})+'">\n <div class="'+e("close")+'">'+Object(S.a)("close",t.lang)+'</div>\n <div class="'+e("slider")+'"></div>\n </div>'}({isMobile:a,lang:t.lang})+"\n "+function(t){var e=Object(g.a)("header");return'\n <div class="'+e({empty:!t.text,theme:t.theme,mobile:t.isMobile})+'">\n <div class="'+e("text")+'">\n '+(t.text||"")+'\n </div>\n <div class="'+e("close")+'"></div>\n </div>'}({isMobile:a,lang:t.lang,text:t.title,theme:t.theme})+"\n "+Object(T.a)({isMobile:a,lang:t.lang,theme:t.theme})+'\n <div class="'+i("mount")+'">\n '+Object(M.a)(t.theme)+"\n </div>";return'\n <div class="'+i({desktop:!a,theme:t.theme,mobile:a,size:o})+'">\n '+j({badgeType:t.badgeType,badgeCount:t.badgeCount,badgeMaxCount:t.badgeMaxCount,collapsed:t.buttonCollapsed,icon:t.buttonIcon,isMobile:a,text:t.buttonText,theme:t.theme,size:o})+"\n "+(e={isMobile:a},'<div class="'+Object(g.a)("paranja")({mobile:e.isMobile})+'"></div>')+"\n "+function(t,e){return'\n <div class="'+Object(g.a)("popup")({position:t.position,desktop:!t.isMobile,theme:t.theme,mobile:t.isMobile})+'">\n '+e+"\n </div>"}({isMobile:a,position:t.chatPosition,theme:t.theme},n)+"\n </div>"},P=i(12),U=function(){function t(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,i,a){return i&&t(e.prototype,i),a&&t(e,a),e}}(),D=function t(e,i,a){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,i);if(void 0===o){var n=Object.getPrototypeOf(e);return null===n?void 0:t(n,i,a)}if("value"in o)return o.value;var r=o.get;return void 0!==r?r.call(a):void 0};var H=function(t){function e(t,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return a.isChatVisible=!1,a.config=t,a.options=a.prepareOptions(i),a.attachStyles(),a.buildTemplate(),a.findDomElems(),a.moveDomElemsToBody(),a.bindEvents(),a.initMessengerIframe(),a.popup=new R({position:a.options.chatPosition,popupElem:a.domElems.popup,targetElem:a.domElems.button}),a.unreadCounter=new f({callback:a.handleUnreadCounter.bind(a),disabled:a.options.unreadDisabled,parentOrigin:Object(h.a)(),serviceId:a.options.serviceId,url:Object(h.c)(a.options.unreadUrl)}),a.unreadCounter.start(),a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,P["a"]),U(e,[{key:"hideChat",value:function(){this.isChatVisible&&(this.isChatVisible=!1,this.options.autocloseable&&document.removeEventListener("click",this.handleDocumentClick,!0),this.options.isMobile&&function(){O();var t=document.body;t.classList.remove(Object(g.b)(v)),y.a&&(t.classList.remove(Object(g.b)(v,{ios:!0})),t.style.marginLeft=w,t.style.marginTop=x,window.scrollTo(k,E))}(),this.domElems.widget.classList.remove(Object(g.b)("widget",{visible:!0})),this.domElems.button.classList.remove(Object(g.b)("button",{hidden:!0})),this.domElems.header.classList.remove(Object(g.b)("header",{visible:!0})),this.domElems.paranja.classList.remove(Object(g.b)("paranja",{visible:!0})),this.domElems.mobileHeader.classList.remove(Object(g.b)("mobile-header",{visible:!0})),this.domElems.mount.classList.remove(Object(g.b)("widget","mount",{visible:!0})),this.popup.hide(),this.hideLoader(),this.hideError(),this.isChatCreated||this.messengerIframe.reset(),this.emit(P.c.CHAT_HIDE),p(a.HIDE_CHAT))}},{key:"showChat",value:function(t){this.isChatCreated||this.createMessengerIframe(),this.messengerIframe.sendMessage("iframe-open",t),this.isChatVisible||(this.isChatVisible=!0,this.options.autocloseable&&document.addEventListener("click",this.handleDocumentClick,!0),this.options.isMobile&&(O(),_=window.setTimeout(function(){var t=document.body;y.a&&(k=window.scrollX,E=window.scrollY,w=t.style.marginLeft,x=t.style.marginTop,t.style.marginLeft="-"+k+"px",t.style.marginTop="-"+E+"px",t.classList.add(Object(g.b)(v,{ios:!0}))),t.classList.add(Object(g.b)(v))},C)),this.domElems.widget.classList.add(Object(g.b)("widget",{visible:!0})),this.domElems.button.classList.add(Object(g.b)("button",{hidden:!0})),this.domElems.header.classList.add(Object(g.b)("header",{visible:!0})),this.domElems.paranja.classList.add(Object(g.b)("paranja",{visible:!0})),this.domElems.mobileHeader.classList.add(Object(g.b)("mobile-header",{visible:!0})),this.domElems.mount.classList.add(Object(g.b)("widget","mount",{visible:!0})),this.popup.show(),this.emit(P.c.CHAT_SHOW),p(a.SHOW_CHAT))}},{key:"destroy",value:function(){this.destroyed||(this.removeAllListeners(),this.hideChat(),this.unbindEvents(),this.unreadCounter&&this.unreadCounter.destroy(),this.popup.destroy(),D(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this))}},{key:"prepareOptions",value:function(t){var e=this.config,i=t.collapsedDesktop||e.collapsedDesktop;-1===["always","never","hover"].indexOf(i)&&(i="hover");var a=t.collapsedTouch||e.collapsedTouch;-1===["always","never"].indexOf(a)&&(a="always"),t.buttonText||(i="always",a="always");var o=Object.assign({},t,{autocloseable:"autocloseable"in t?t.autocloseable:e.autocloseable,badgeType:t.badgeType||e.badgeType,badgeCount:Number(t.badgeCount||0),badgeMaxCount:Number(t.badgeMaxCount||e.badgeMaxCount),collapsedDesktop:i,collapsedTouch:a,iframeUrl:this.getIframeUrl(t),isMobile:void 0===t.isMobile?y.b:t.isMobile,lang:t.lang||e.lang,mountNode:t.mountNode||document.body,theme:t.theme||e.theme,unreadUrl:Object(h.c)(t.unreadUrl||e.unreadUrl)});o.buttonIcon=t.buttonIcon||e.buttonIconByTheme[o.theme]||e.buttonIcon,o.buttonCollapsed=o.isMobile?a:i;var n=t.chatPosition;return n||(n=o.isMobile?"fixed":o.mountNode===document.body?"static":"target"),o.chatPosition=n,o}},{key:"buildTemplate",value:function(){var t=document.createElement("div");t.innerHTML=z(this.options),this.domElems.widget=t.querySelector("."+Object(g.b)("widget")),this.options.mountNode.appendChild(this.domElems.widget)}},{key:"findDomElems",value:function(){this.domElems.badge=this.getDomElem(Object(g.b)("badge")),this.domElems.badgeCount=this.getDomElem(Object(g.b)("badge","count")),this.domElems.button=this.getDomElem(Object(g.b)("button")),this.domElems.container=this.getDomElem(Object(g.b)("widget","container")),this.domElems.error=this.getDomElem(Object(g.b)("error")),this.domElems.header=this.getDomElem(Object(g.b)("header")),this.domElems.headerClose=this.getDomElem(Object(g.b)("header","close")),this.domElems.loader=this.getDomElem(Object(g.b)("loader")),this.domElems.mount=this.getDomElem(Object(g.b)("widget","mount")),this.domElems.overlay=this.getDomElem(Object(g.b)("widget","overlay")),this.domElems.paranja=this.getDomElem(Object(g.b)("paranja")),this.domElems.popup=this.getDomElem(Object(g.b)("popup")),this.domElems.mobileHeader=this.getDomElem(Object(g.b)("mobile-header")),this.domElems.mobileHeaderClose=this.getDomElem(Object(g.b)("mobile-header","close"))}},{key:"moveDomElemsToBody",value:function(){"target"===this.options.chatPosition&&(document.body.appendChild(this.domElems.paranja),document.body.appendChild(this.domElems.popup))}},{key:"bindEvents",value:function(){this.domElems.button.addEventListener("click",this.handleButtonClick),this.domElems.error.addEventListener("click",this.handleOnErrorRetryClick),this.domElems.header.addEventListener("click",this.handleHeaderClick),this.domElems.headerClose.addEventListener("click",this.handleCloseClick),this.domElems.mobileHeaderClose.addEventListener("click",this.handleCloseClick)}},{key:"unbindEvents",value:function(){this.domElems.button.removeEventListener("click",this.handleButtonClick),this.domElems.error.removeEventListener("click",this.handleOnErrorRetryClick),this.domElems.header.removeEventListener("click",this.handleHeaderClick),this.domElems.headerClose.removeEventListener("click",this.handleCloseClick),this.domElems.mobileHeaderClose.removeEventListener("click",this.handleCloseClick)}},{key:"handleReadyMessage",value:function(){D(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"handleReadyMessage",this).call(this),this.unreadCounter.stop()}},{key:"handleUnreadCounter",value:function(t){var i=D(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"handleUnreadCounter",this).call(this,t);return i&&this.updateBadge(i.value||0),i}},{key:"handleMessengerMessage",value:function(t,i){switch(D(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"handleMessengerMessage",this).call(this,t,i),t){case P.b.CLOSE:this.hideChat();break;case P.b.SHOW_CHAT:this.showChat(i)}}},{key:"handleDocumentClick",value:function(t){var e=t.target;!e||this.domElems.widget.contains(e)||this.domElems.popup.contains(e)||this.hideChat()}},{key:"handleHeaderClick",value:function(t){t.stopPropagation()}},{key:"handleCloseClick",value:function(){this.isChatLoadFailed&&(this.isChatLoadFailed=!1,this.isChatCreated=!1,this.hideError(),this.messengerIframe.reset()),this.hideChat()}},{key:"handleButtonClick",value:function(){this.isChatVisible?this.hideChat():this.showChat()}},{key:"updateBadge",value:function(t){var e=t>0,i=Object(g.b)("badge",{"has-count":!0}),a=this.domElems.badge,o=this.domElems.badgeCount,n=this.options.badgeMaxCount;e?(a.classList.add(i),o.innerText=String(n<t?n+"+":t)):(a.classList.remove(i),o.innerText="")}},{key:"cancelFullscreen",value:function(){this.popup.cancelFullscreen(),this.domElems.header.classList.remove(Object(g.b)("header",{hidden:!0})),D(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"cancelFullscreen",this).call(this)}},{key:"setFullscreen",value:function(){this.popup.setFullscreen(),this.domElems.header.classList.add(Object(g.b)("header",{hidden:!0})),D(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setFullscreen",this).call(this)}}]),e}();e.a=H;H.version="1.9.0",o.a([n.a],H.prototype,"handleDocumentClick",null),o.a([n.a],H.prototype,"handleCloseClick",null),o.a([n.a],H.prototype,"handleButtonClick",null)},55:function(t,e){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(t){"use strict";if(null==t)throw new TypeError("Cannot convert first argument to object");for(var e=Object(t),i=1;i<arguments.length;i++){var a=arguments[i];if(null!=a)for(var o=Object.keys(Object(a)),n=0,r=o.length;n<r;n++){var s=o[n],p=Object.getOwnPropertyDescriptor(a,s);void 0!==p&&p.enumerable&&(e[s]=a[s])}}return e}})},56:function(t,e,i){"use strict";var a=i(28),o=i(58),n=i(59),r=i(29),s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._subscriber=new o,this._currentSubscription=null}return t.prototype.addListener=function(t,e,i){return this._subscriber.addSubscription(t,new a(this._subscriber,e,i))},t.prototype.once=function(t,e,i){var a=this;return this.addListener(t,function(){a.removeCurrentListener(),e.apply(i,arguments)})},t.prototype.removeAllListeners=function(t){this._subscriber.removeAllSubscriptions(t)},t.prototype.removeCurrentListener=function(){this._currentSubscription||r(!1),this._subscriber.removeSubscription(this._currentSubscription)},t.prototype.listeners=function(t){var e=this._subscriber.getSubscriptionsForType(t);return e?e.filter(n.thatReturnsTrue).map(function(t){return t.listener}):[]},t.prototype.emit=function(t){var e=this._subscriber.getSubscriptionsForType(t);if(e){for(var i=Object.keys(e),a=0;a<i.length;a++){var o=e[i[a]];o&&(this._currentSubscription=o,this.__emitToSubscription.apply(this,[o].concat(Array.prototype.slice.call(arguments))))}this._currentSubscription=null}},t.prototype.__emitToSubscription=function(t,e){var i=Array.prototype.slice.call(arguments,2);t.listener.apply(t.context,i)},t}();t.exports=s},57:function(t,e,i){"use strict";var a=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.subscriber=e}return t.prototype.remove=function(){this.subscriber&&(this.subscriber.removeSubscription(this),this.subscriber=null)},t}();t.exports=a},58:function(t,e,i){"use strict";var a=i(29),o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._subscriptionsForType={},this._currentSubscription=null}return t.prototype.addSubscription=function(t,e){e.subscriber!==this&&a(!1),this._subscriptionsForType[t]||(this._subscriptionsForType[t]=[]);var i=this._subscriptionsForType[t].length;return this._subscriptionsForType[t].push(e),e.eventType=t,e.key=i,e},t.prototype.removeAllSubscriptions=function(t){void 0===t?this._subscriptionsForType={}:delete this._subscriptionsForType[t]},t.prototype.removeSubscription=function(t){var e=t.eventType,i=t.key,a=this._subscriptionsForType[e];a&&delete a[i]},t.prototype.getSubscriptionsForType=function(t){return this._subscriptionsForType[t]},t}();t.exports=o},59:function(t,e,i){"use strict";function a(t){return function(){return t}}var o=function(){};o.thatReturns=a,o.thatReturnsFalse=a(!1),o.thatReturnsTrue=a(!0),o.thatReturnsNull=a(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(t){return t},t.exports=o}})});