-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathcodex.bundle.js
More file actions
47 lines (47 loc) · 192 KB
/
Copy pathcodex.bundle.js
File metadata and controls
47 lines (47 loc) · 192 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
var codex=function(e){function t(t){for(var n,o,i=t[0],a=t[1],s=0,u=[];s<i.length;s++)o=i[s],r[o]&&u.push(r[o][0]),r[o]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(c&&c(t);u.length;)u.shift()()}var n={},r={0:0};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.e=function(e){var t=[],n=r[e];if(0!==n)if(n)t.push(n[2]);else{var i=new Promise(function(t,o){n=r[e]=[t,o]});t.push(n[2]=i);var a,s=document.getElementsByTagName("head")[0],c=document.createElement("script");c.charset="utf-8",c.timeout=120,o.nc&&c.setAttribute("nonce",o.nc),c.src=function(e){return o.p+""+({2:"editor"}[e]||e)+".bundle.js?h=e4cad182c2857b63ee9e"}(e),a=function(t){c.onerror=c.onload=null,clearTimeout(u);var n=r[e];if(0!==n){if(n){var o=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src,a=new Error("Loading chunk "+e+" failed.\n("+o+": "+i+")");a.type=o,a.request=i,n[1](a)}r[e]=void 0}};var u=setTimeout(function(){a({type:"timeout",target:c})},12e4);c.onerror=c.onload=a,s.appendChild(c)}return Promise.all(t)},o.m=e,o.c=n,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/public/build/",o.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp_name_=window.webpackJsonp_name_||[],a=i.push.bind(i);i.push=t,i=i.slice();for(var s=0;s<i.length;s++)t(i[s]);var c=a;return o(o.s=2)}([function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return function(e,t,n){t&&o(e.prototype,t),n&&o(e,n)}(e,null,[{key:"make",value:function(e,t,n){var o,i=document.createElement(e);Array.isArray(t)?(o=i.classList).add.apply(o,r(t)):t&&i.classList.add(t);for(var a in n)i[a]=n[a];return i}},{key:"replace",value:function(e,t){return e.parentNode.replaceChild(t,e)}},{key:"get",value:function(e){return document.getElementById(e)}},{key:"loadResource",value:function(e,t,n){return new Promise(function(r,o){var i;e&&["JS","CSS"].includes(e)||o("Unexpected resource type passed. «CSS» or «JS» expected, «".concat(e,"» passed")),n?document.getElementById("".concat("cdx-resourse","-").concat(e.toLowerCase(),"-").concat(n))&&r(t):o("Instance name is missed"),"JS"===e?((i=document.createElement("script")).async=!0,i.defer=!0,i.charset="utf-8"):(i=document.createElement("link")).rel="stylesheet",i.id="".concat("cdx-resourse","-").concat(e.toLowerCase(),"-").concat(n);var a="Resource loading ".concat(e," ").concat(n);console.time(a),i.onload=function(){console.timeEnd(a),r(t)},i.onerror=function(){console.timeEnd(a),o(t)},"JS"===e?i.src=t:i.href=t,document.head.appendChild(i)})}}]),e}();t.default=i},,function(e,t,n){"use strict";var r=s(n(3)),o=s(n(4)),i=s(n(6)),a=s(n(9));function s(e){return e&&e.__esModule?e:{default:e}}n(10);var c=103229636,u=function(e){return e.settings={},e.init=function(e){for(var t in e)this.settings[t]=e[t]||this.settings[t]||null;u.docReady(function(){!function(){new r.default({Library:u}),u.scrollUp.init(),u.deeplinker.init(".deeplinker"),u.codeStyling.init(".article-code__content"),u.vkWidget.init({id:"vk_groups",display:{mode:3,width:"auto"},communityId:c});var e=document.querySelector('[name="js-show-player"]');if(e){var t=n(11).default;new t({sourceURL:"public/app/img/products/ar-tester.mp4",toggler:e,wrapperSelector:".product-card--ar-tester"})}}()})},e}({});u.docReady=function(e){return/in/.test(document.readyState)?window.setTimeout(u.docReady,9,e):e()},u.admin=n(12),u.join=n(13),u.core=n(14),u.dragndrop=n(15),u.scrollUp=n(16),u.sharer=n(17),u.developer=n(18),u.showMoreNews=n(19),u.polyfills=n(20),u.ajax=n(21),u.profile=n(22),u.helpers=n(23),u.quiz=n(24),u.quizForm=n(25),u.transport=n(26),u.vkWidget=n(27),u.codeStyling=n(28),u.deeplinker=n(29),u.pluginsFilter=n(30),u.reactions=n(31),u.editorLanding=new o.default,u.articleCreate=new i.default,u.reactionsCreate=new a.default,e.exports=u},function(e,t,n){
/*!
* CodeX Module Dispatcher — Initialize frontend Modules from the DOM without inline scripts
*
* @copyright CodeX Team <team@ifmo.su>
* @license MIT https://github.com/codex-team/dispatcher/LICENSE
* @author @polinashneider https://github.com/polinashneider
* @version 2.0.0
*/
"undefined"!=typeof self&&self,e.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t){var n=t.name,r=t.element,i=t.settings,a=t.moduleClass;o(this,e),this.name=n,this.element=r,this.settings=i,this.moduleClass=a}return i(e,[{key:"init",value:function(){try{console.assert(this.moduleClass.init instanceof Function,"Module «"+this.name+"» should implement init method"),this.moduleClass.init instanceof Function&&(this.moduleClass.init(this.settings,this.element),console.log("Module «"+this.name+"» initialized"))}catch(e){console.warn("Module «"+this.name+"» was not initialized because of ",e)}}},{key:"destroy",value:function(){this.moduleClass.destroy instanceof Function&&(this.moduleClass.destroy(),console.log("Module «"+this.name+"» destroyed."))}}]),e}(),s=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),this.Library=t.Library||window,this.modules=this.findModules(document),this.initModules()}return i(e,[{key:"findModules",value:function(e){for(var t=[],n=e.querySelectorAll("[data-module]"),o=n.length-1;o>=0;o--)t.push.apply(t,r(this.extractModulesData(n[o])));return t}},{key:"extractModulesData",value:function(e){var t=this,n=[],r=e.dataset.module;return(r=r.replace(/\s+/," ")).split(" ").forEach(function(r,o){var i=new a({name:r,element:e,settings:t.getModuleSettings(e,o,r),moduleClass:t.Library[r]});n.push(i)}),n}},{key:"getModuleSettings",value:function(e,t,n){var r=e.querySelector('textarea[name="module-settings"]'),o=void 0;if(!r)return null;try{o=r.value.trim(),o=JSON.parse(o)}catch(e){return console.warn("Can not parse Module «"+n+"» settings because of: "+e),console.groupCollapsed(n+" settings"),console.log(o),console.groupEnd(),null}return Array.isArray(o)?o[t]?o[t]:null:0===t?o:(console.warn("Wrong settings format. For several Modules use an array instead of object."),null)}},{key:"initModules",value:function(){console.groupCollapsed("ModuleDispatcher"),this.modules.forEach(function(e){e.init()}),console.groupEnd()}}]),e}();t.default=s}]).default},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(5),i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.editor=null,this.nodes={outputWrapper:null}}return function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)}(e,[{key:"init",value:function(e){var t=this;this.nodes.outputWrapper=document.getElementById(e.output_id),this.nodes.outputWrapper||console.warn("Can't find output target with ID: «"+e.output_id+"»"),this.loadEditor({blocks:e.blocks,onChange:function(){t.previewData()},onReady:function(){t.previewData(),t.editor.focus()}}).then(function(e){t.editor=e})}},{key:"loadEditor",value:function(e){return n.e(2).then(n.t.bind(null,1,7)).then(function(t){return new(0,t.default)(e)})}},{key:"previewData",value:function(){var e=this;this.editor.save().then(function(t){o.show(t,e.nodes.outputWrapper)})}}]),e}();t.default=i},function(e,t,n){"use strict";var r=function(){return{show:function(e,t){e=function(e){return e=(e=(e=(e=(e=(e=e.replace(/"(\w+)"\s?:/g,'"<span class=sc_key>$1</span>" :')).replace(/"(paragraph|quote|list|header|linkTool|code|image|delimiter|rawTool|table|embed)"/g,'"<span class=sc_toolname>$1</span>"')).replace(/(<[\/a-z]+(>)?)/gi,"<span class=sc_tag>$1</span>")).replace(/"([^"]+)"/gi,'"<span class=sc_attr>$1</span>"')).replace(/\b(true|false|null)\b/gi,"<span class=sc_bool>$1</span>")).replace(/\b(\d+)\b/gi,"<span class=sc_digit>$1</span>")}(e=function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}(e=JSON.stringify(e,null,4))),t.innerHTML=e}}}();e.exports=r},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),i=n(8),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)}(e,[{key:"init",value:function(e,t){var n=this;this.form=t,this.article=document.getElementById(e.article_textarea),this.button=document.getElementById(e.submit_id),this.formURL=e.form_url;var r={blocks:this.getArticleData()};this.loadEditor(r).then(function(e){n.editor=e}),this.prepareSubmit()}},{key:"prepareSubmit",value:function(){var e=this;this.button.addEventListener("click",function(){e.saveArticle()},!1)}},{key:"saveArticle",value:function(){var e=this,t=this.article;this.editor.save().then(function(n){t.value=JSON.stringify(n),Promise.resolve().then(function(){e.button.classList.add("loading")}).then(function(){return o.post({url:e.formURL,data:e.form})}).then(function(t){t.success?window.location.href=t.redirect:e.showErrorMessage(t.message)}).catch(function(t){e.showErrorMessage(t)})})}},{key:"showErrorMessage",value:function(e){console.error(e),i.show({message:e,style:"error"}),this.button.classList.remove("loading")}},{key:"getArticleData",value:function(){if(this.article.textContent.length){var e;try{e=JSON.parse(this.article.textContent)}catch(e){console.error("Errors occurred while parsing Editor data",e)}return e?e.blocks:[]}}},{key:"loadEditor",value:function(e){return n.e(2).then(n.t.bind(null,1,7)).then(function(t){return new(0,t.default)(e)})}}]),e}();t.default=a},function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";(function(e){var r=n(2),o=setTimeout;function i(){}function a(e){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],f(e,this)}function s(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,a._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(e){return void u(t.promise,e)}c(t.promise,r)}else(1===e._state?c:u)(t.promise,e._value)})):e._deferreds.push(t)}function c(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof a)return e._state=3,e._value=t,void l(e);if("function"==typeof n)return void f(function(e,t){return function(){e.apply(t,arguments)}}(n,t),e)}e._state=1,e._value=t,l(e)}catch(t){u(e,t)}}function u(e,t){e._state=2,e._value=t,l(e)}function l(e){2===e._state&&0===e._deferreds.length&&a._immediateFn(function(){e._handled||a._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)s(e,e._deferreds[t]);e._deferreds=null}function f(e,t){var n=!1;try{e(function(e){n||(n=!0,c(t,e))},function(e){n||(n=!0,u(t,e))})}catch(e){if(n)return;n=!0,u(t,e)}}a.prototype.catch=function(e){return this.then(null,e)},a.prototype.then=function(e,t){var n=new this.constructor(i);return s(this,new function(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}(e,t,n)),n},a.prototype.finally=r.a,a.all=function(e){return new a(function(t,n){if(!e||void 0===e.length)throw new TypeError("Promise.all accepts an array");var r=Array.prototype.slice.call(e);if(0===r.length)return t([]);var o=r.length;function i(e,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(t){i(e,t)},n)}r[e]=a,0==--o&&t(r)}catch(e){n(e)}}for(var a=0;a<r.length;a++)i(a,r[a])})},a.resolve=function(e){return e&&"object"==typeof e&&e.constructor===a?e:new a(function(t){t(e)})},a.reject=function(e){return new a(function(t,n){n(e)})},a.race=function(e){return new a(function(t,n){for(var r=0,o=e.length;r<o;r++)e[r].then(t,n)})},a._immediateFn="function"==typeof e&&function(t){e(t)}||function(e){o(e,0)},a._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},t.a=a}).call(this,n(5).setImmediate)},function(e,t,n){"use strict";t.a=function(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){return t.reject(n)})})}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n(4);var o=n(8),i=function(){var e={URLENCODED:"application/x-www-form-urlencoded; charset=utf-8",FORM:"multipart/form-data",JSON:"application/json; charset=utf-8"},t=function(e){return new Promise(function(t,n){e=a(e),e=s(e);var r=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");r.open(e.method,e.url),r.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(e.headers).forEach(function(t){var n=e.headers[t];r.setRequestHeader(t,n)});var o=e.ratio;r.upload.addEventListener("progress",function(t){var n=Math.round(t.loaded/t.total*100),r=Math.ceil(n*o/100);e.progress(r)},!1),r.addEventListener("progress",function(t){var n=Math.round(t.loaded/t.total*100),r=Math.ceil(n*(100-o)/100)+o;e.progress(r)},!1),r.onreadystatechange=function(){if(4===r.readyState){var e=r.response;try{e=JSON.parse(e)}catch(e){}200===r.status?t(e):n(e)}},r.send(e.data)})},n=function(e){return e.method="POST",t(e)},a=function(t){if(!t.url||"string"!=typeof t.url)throw new Error("Url must be a non-empty string");if(t.method&&"string"!=typeof t.method)throw new Error("`method` must be a string or null");if(t.method=t.method?t.method.toUpperCase():"GET",t.headers&&"object"!==r(t.headers))throw new Error("`headers` must be an object or null");if(t.headers=t.headers||{},t.type&&("string"!=typeof t.type||!Object.values(e).includes(t.type)))throw new Error("`type` must be taken from module's «contentType» library");if(t.progress&&"function"!=typeof t.progress)throw new Error("`progress` must be a function or null");if(t.progress=t.progress||function(e){},t.ratio&&"number"!=typeof t.ratio)throw new Error("`ratio` must be a number");if(t.ratio<0||t.ratio>100)throw new Error("`ratio` must be in a 0-100 interval");if(t.ratio=t.ratio||90,t.accept&&"string"!=typeof t.accept)throw new Error("`accept` must be a string with a list of allowed mime-types");if(t.accept=t.accept||"*/*",t.multiple&&"boolean"!=typeof t.multiple)throw new Error("`multiple` must be a true or false");if(t.multiple=t.multiple||!1,t.fieldName&&"string"!=typeof t.fieldName)throw new Error("`fieldName` must be a string");return t.fieldName=t.fieldName||"files",t},s=function(t){switch(t.method){case"GET":var n=c(t.data,e.URLENCODED);delete t.data,t.url=/\?/.test(t.url)?t.url+"&"+n:t.url+"?"+n;break;case"POST":case"PUT":case"DELETE":case"UPDATE":var r=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).type||e.JSON}(t);(o.isFormData(t.data)||o.isFormElement(t.data))&&(r=e.FORM),t.data=c(t.data,r),r!==i.contentType.FORM&&(t.headers["content-type"]=r)}return t},c=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(arguments.length>1?arguments[1]:void 0){case e.URLENCODED:return o.urlEncode(t);case e.JSON:return o.jsonEncode(t);case e.FORM:return o.formEncode(t);default:return t}};return{contentType:e,request:t,get:function(e){return e.method="GET",t(e)},post:n,transport:function(e){return e=a(e),o.transport(e).then(function(t){return o.isObject(e.data)&&Object.keys(e.data).forEach(function(n){var r=e.data[n];t.append(n,r)}),e.data=t,n(e)})}}}();e.exports=i},function(e,t,n){"use strict";n.r(t);var r=n(1);window.Promise=window.Promise||r.a},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(6),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(0))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o=1,i={},a=!1,s=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){l(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"==typeof n.data&&0===n.data.indexOf(t)&&l(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),r=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){l(e.data)},r=function(t){e.port2.postMessage(t)}}():s&&"onreadystatechange"in s.createElement("script")?function(){var e=s.documentElement;r=function(t){var n=s.createElement("script");n.onreadystatechange=function(){l(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():r=function(e){setTimeout(l,0,e)},c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var a={callback:e,args:t};return i[o]=a,r(o),o++},c.clearImmediate=u}function u(e){delete i[e]}function l(e){if(a)setTimeout(l,0,e);else{var t=i[e];if(t){a=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}(t)}finally{u(e),a=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(0),n(7))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,u=[],l=!1,f=-1;function d(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&p())}function p(){if(!l){var e=s(d);l=!0;for(var t=u.length;t;){for(c=u,u=[];++f<t;)c&&c[f].run();f=-1,t=u.length}c=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new h(e,t)),1!==u.length||l||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(9);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return function(e,t,n){n&&r(e,n)}(e,0,[{key:"urlEncode",value:function(e){return o(e)}},{key:"jsonEncode",value:function(e){return JSON.stringify(e)}},{key:"formEncode",value:function(e){if(this.isFormData(e))return e;if(this.isFormElement(e))return new FormData(e);if(this.isObject(e)){var t=new FormData;return Object.keys(e).forEach(function(n){var r=e[n];t.append(n,r)}),t}throw new Error("`data` must be an instance of Object, FormData or <FORM> HTMLElement")}},{key:"isObject",value:function(e){return"[object Object]"===Object.prototype.toString.call(e)}},{key:"isFormData",value:function(e){return e instanceof FormData}},{key:"isFormElement",value:function(e){return e instanceof HTMLFormElement}},{key:"transport",value:function(e){return new Promise(function(t,n){var r=document.createElement("INPUT");r.type="file",e.multiple&&r.setAttribute("multiple","multiple"),e.accept&&r.setAttribute("accept",e.accept),r.addEventListener("change",function(n){for(var r=n.target.files,o=new FormData,i=0;i<r.length;i++)o.append(e.fieldName,r[i],r[i].name);t(o)},!1),r.click()})}}]),e}()},function(e,t){var n=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,escape).replace(/%20/g,"+")},r=function(e,t,o,i){return t=t||null,o=o||"&",i=i||null,e?function(e){for(var t=new Array,n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}(Object.keys(e).map(function(a){var s,c=a;if(i&&(c=i+"["+c+"]"),"object"==typeof e[a]&&null!==e[a])s=r(e[a],null,o,c);else{t&&(c=function(e){return!isNaN(parseFloat(e))&&isFinite(e)}(c)?t+Number(c):c);var u=e[a];u=(u=0===(u=!1===(u=!0===u?"1":u)?"0":u)?"0":u)||"",s=n(c)+"="+n(u)}return s})).join(o).replace(/[!'()*]/g,""):""};e.exports=r}])},function(e,t){!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}([function(e,t,n){"use strict";e.exports=function(){var e="cdx-notifies",t="cdx-notify",n="cdx-notify__cross",r="cdx-notify__button--confirm",o="cdx-notify__button--cancel",i="cdx-notify__input",a="cdx-notify__button",s="cdx-notify__btns-wrapper",c=function(e){var r=document.createElement("DIV"),o=document.createElement("DIV"),i=e.message,a=e.style;return r.classList.add(t),a&&r.classList.add(t+"--"+a),r.innerHTML=i,o.classList.add(n),o.addEventListener("click",r.remove.bind(r)),r.appendChild(o),r};return{alert:c,confirm:function(e){var t=c(e),i=document.createElement("div"),u=document.createElement("button"),l=document.createElement("button"),f=t.querySelector(n),d=e.cancelHandler,p=e.okHandler;return i.classList.add(s),u.innerHTML=e.okText||"Confirm",l.innerHTML=e.cancelText||"Cancel",u.classList.add(a),l.classList.add(a),u.classList.add(r),l.classList.add(o),d&&"function"==typeof d&&(l.addEventListener("click",d),f.addEventListener("click",d)),p&&"function"==typeof p&&u.addEventListener("click",p),u.addEventListener("click",t.remove.bind(t)),l.addEventListener("click",t.remove.bind(t)),i.appendChild(u),i.appendChild(l),t.appendChild(i),t},prompt:function(e){var t=c(e),o=document.createElement("div"),u=document.createElement("button"),l=document.createElement("input"),f=t.querySelector(n),d=e.cancelHandler,p=e.okHandler;return o.classList.add(s),u.innerHTML=e.okText||"Ok",u.classList.add(a),u.classList.add(r),l.classList.add(i),e.placeholder&&l.setAttribute("placeholder",e.placeholder),e.default&&(l.value=e.default),e.inputType&&(l.type=e.inputType),d&&"function"==typeof d&&f.addEventListener("click",d),p&&"function"==typeof p&&u.addEventListener("click",function(){p(l.value)}),u.addEventListener("click",t.remove.bind(t)),o.appendChild(l),o.appendChild(u),t.appendChild(o),t},wrapper:function(){var t=document.createElement("DIV");return t.classList.add(e),t}}}()},function(e,t){},function(e,t,n){"use strict";
/*!
* Codex JavaScript Notification module
* https://github.com/codex-team/js-notifier
*
* Codex Team - https://ifmo.su
*
* MIT License | (c) Codex 2017
*/e.exports=function(){n(1);var e=n(0),t="cdx-notify--bounce-in",r=null;return{show:function(n){if(n.message){!function(){if(r)return!0;r=e.wrapper(),document.body.appendChild(r)}();var o=null,i=n.time||8e3;switch(n.type){case"confirm":o=e.confirm(n);break;case"prompt":o=e.prompt(n);break;default:o=e.alert(n),window.setTimeout(function(){o.remove()},i)}r.appendChild(o),o.classList.add(t)}}}}()}])},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)}(e,[{key:"init",value:function(e){var t=document.querySelector(e.parent);new codex.reactions({parent:t,title:"",reactions:["👍","❤","👎"]})}}]),e}();t.default=o},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=function(){function e(t){var n=this,r=t.sourceURL,o=t.toggler,i=t.wrapperSelector;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourceURL=r,this.toggler=o,this.wrapper=document.querySelector(i),this.overlay=null,this.CSS={overlay:"video-overlay",overlayShowed:"video-overlay--showed",overlayLoaded:"video-overlay--loaded",closeButton:"video-overlay__close"},this.toggler.addEventListener("click",function(){n.showVideoOverlay()},!1)}return function(e,t,n){t&&o(e.prototype,t),n&&o(e,n)}(e,[{key:"showVideoOverlay",value:function(){var e=this;this.overlay=r.default.make("div",this.CSS.overlay);var t=r.default.make("video",null,{autoplay:!0,loop:!0}),n=r.default.make("source",null,{src:this.sourceURL,type:"video/mp4"}),o=r.default.make("div",this.CSS.closeButton);t.appendChild(n),this.overlay.appendChild(t),t.addEventListener("loadeddata",function(){e.videoLoaded()}),this.overlay.appendChild(o),o.addEventListener("click",function(){e.close()}),this.wrapper.appendChild(this.overlay),window.setTimeout(function(){e.overlay.classList.add(e.CSS.overlayShowed)},50)}},{key:"videoLoaded",value:function(){this.wrapper.classList.add(this.CSS.overlayLoaded)}},{key:"close",value:function(){this.overlay.remove(),this.overlay=null}}]),e}();t.default=i},function(e,t,n){"use strict";e.exports=function(e){return e.init=function(e){if(codex.core.log("Initialized.","Module admin"),"cards"===e.listType)for(var t=document.querySelectorAll(".feed-item"),n=t.length-1;n>-1;n--)t[n].classList.add("draggable"),t[n].classList.add("feed-item--dnd"),t[n].classList.add("list-item");codex.dragndrop({droppableClass:"list-item",findDraggable:function(e){var t=e.target.closest(".draggable");return t?t.closest(".list-item"):null},makeAvatar:function(e){var t={};return t.elem=e.cloneNode(!0),t.elem.classList.add("dnd-avatar"),e.parentNode.insertBefore(t.elem,e.nextSibling),e.classList.add("no-display"),t.rollback=function(){t.elem.parentNode.removeChild(t.elem),e.classList.remove("no-display")},t},targetChanged:function(e,t,n){if(t){var r=t.compareDocumentPosition(n.elem);4&r?t.parentNode.insertBefore(n.elem,t):2&r&&t.parentNode.insertBefore(n.elem,t.nextSibling)}},move:function(){},targetReached:function(e,t,n){e.parentNode.insertBefore(n,e.nextSibling),t.elem.parentNode.removeChild(t.elem),n.classList.remove("no-display");var r=n.dataset.id,o=n.dataset.type,i=null;void 0==n.nextElementSibling&&(i=(void 0).dataset.type+":"+(void 0).dataset.id);var a={success:function(){document.getElementById("saved").classList.remove("top-menu__saved_hidden"),window.setTimeout(function(){document.getElementById("saved").classList.add("top-menu__saved_hidden")},1e3)},type:"POST",url:"/admin/feed",data:JSON.stringify({item_id:r,item_type:o,item_below_value:i})};codex.core.ajax(a)}})},e}({})},function(e,t,n){"use strict";var r=function(){var e=function(e){var t=e.target,n=document.getElementById("js-join-auth"),r=document.getElementById("js-email");n&&!r.value.length&&(n.classList.add("wobble"),window.setTimeout(function(){return n.classList.remove("wobble")},450),t.value="")},t=function(){document.getElementById("blankAdditionalFields").classList.toggle("hide")};return{init:function(){var n=document.getElementById("joinBlank");if(void 0!==n&&null!==n){var r=n.getElementsByTagName("textarea");if(r.length)for(var o=r.length-1;o>=0;o--)r[o].addEventListener("keyup",e,!1)}var i=document.getElementById("blankShowAdditionalFieldsButton");void 0!==i&&null!==i&&i.addEventListener("click",t,!1)}}}();e.exports=r},function(e,t,n){"use strict";e.exports={ajax:function(e){if(e&&e.url){var t=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),n=function(){};e.async=!0,e.type=e.type||"GET",e.data=e.data||"",e["content-type"]=e["content-type"]||"application/json; charset=utf-8",n=e.success||n,"GET"==e.type&&e.data&&(e.url=/\?/.test(e.url)?e.url+"&"+e.data:e.url+"?"+e.data),e.withCredentials&&(t.withCredentials=!0),e.beforeSend&&"function"==typeof e.beforeSend&&e.beforeSend.call(),t.open(e.type,e.url,e.async),t.setRequestHeader("Content-type",e["content-type"]),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.onreadystatechange=function(){4==t.readyState&&200==t.status&&n(t.responseText)},t.send(e.data)}},log:function(e,t,n,r){if(t){for(t=t.length<32?t:t.substr(0,30);t.length<31;)t+=" ";e=(t+=":")+e}n=n||"log";try{"console"in window&&window.console[n]&&(r?console[n](e,r):console[n](e))}catch(e){}}}},function(e,t,n){"use strict";e.exports=function(e){var t={findDraggable:function(e){return e.target.closest("."+n)},findDroppable:function(e){return document.elementFromPoint(e.clientX,e.clientY).closest("."+r)},makeAvatar:function(e){var t={};return(t={elem:e,parentNode:e.parentNode,nextSibling:e.nextElementSibling,rollback:function(){t.elem.classList.remove("dnd-default-avatar"),t.nextSibling?t.parentNode.insertBefore(t.elem,t.nextSibling):t.parentNode.appendChild(t.elem),delete l.avatar}}).elem.classList.add("dnd-default-avatar"),t},targetChanged:function(e,t){e&&e.classList("dnd-default-target-highlight"),t&&t.classList.add("dnd-default-target-highlight")},move:function(e,t,n){t.elem.style.left=e.pageX-n.x+"px",t.elem.style.top=e.pageY-n.y+"px"},targetReached:function(e,t,n){e.classList.remove("dnd-default-target-highlight"),e.parentNode.insertBefore(n,e.nextElementSibling),t.elem.classList.remove("dnd-default-avatar")}},n=e.draggableClass||"draggable",r=e.droppableClass||"droppable",o=e.findDraggable||t.findDraggable,i=e.findDroppable||t.findDroppable,a=e.makeAvatar||t.makeAvatar,s=e.targetChanged||t.targetChanged,c=e.move||t.move,u=e.targetReached||t.targetReached,l={},f=function(e){if(!(e.which>1)&&(e=m(e),l.clickedAt={x:e.pageX,y:e.pageY},l.elem=o(e),l.elem)){g();var t=h(l.elem);l.shift={x:e.pageX-t.x,y:e.pageY-t.y}}},d=function(e){if(l.elem&&(e.preventDefault(),e=m(e),!(Math.abs(e.pageX-l.clickedAt.x)<5&&Math.abs(e.pageY-l.clickedAt.y)<5))){l.avatar||(l.avatar=a(l.elem));var t=i(e);t!=l.target&&(s(l.target,t,l.avatar),l.target=t),c(e,l.avatar,l.shift)}},p=function(e){if(!(e.which>1))if(l.avatar){e=m(e);var t=i(e);t?u(t,l.avatar,l.elem,e):l.avatar.rollback(),l={},g()}else l={}},h=function(e){var t=e.getBoundingClientRect();return{x:t.left+window.pageXOffset,y:t.top+window.pageYOffset}},m=function(e){if(!e.changedTouches)return e;var t=e.changedTouches[0];return e.pageX=t.pageX,e.pageY=t.pageY,e.clientX=t.clientX,e.clientY=t.clientY,e.screenX=t.screenX,e.screenY=t.screenY,e.target=t.target,e},g=function(){document.body.classList.toggle("no-selection")};document.addEventListener("mousedown",f),document.addEventListener("touchstart",f),document.addEventListener("mousemove",d),document.addEventListener("touchmove",d),document.addEventListener("mouseup",p),document.addEventListener("touchend",p),document.ondragstart=function(){return!1}}},function(e,t,n){"use strict";e.exports=function(){var e=null,t=function(){window.scrollTo(0,0)},n=function(){window.pageYOffset>100?e.classList.add("show"):e.classList.remove("show")};return{init:function(){(e=document.createElement("DIV")).classList.add("scroll-up"),document.body.appendChild(e),e.addEventListener("click",t),window.addEventListener("scroll",n)}}}()},function(e,t,n){"use strict";e.exports=function(e){return e.vkontakte=function(t){var n="https://vk.com/share.php?";n+="url="+t.url,n+="&title="+t.title,n+="&description="+t.desc,n+="&image="+t.img,n+="&noparse=true",e.popup(n,"vkontakte")},e.facebook=function(t){var n="https://www.facebook.com/dialog/share?display=popup";n+="&app_id=1740455756240878",n+="&href="+t.url,n+="&redirect_uri="+document.location.href,e.popup(n,"facebook")},e.twitter=function(t){var n="https://twitter.com/share?";n+="text="+t.title,n+="&url="+t.url,n+="&counturl="+t.url,e.popup(n,"twitter")},e.telegram=function(t){var n="https://telegram.me/share/url";n+="?text="+t.title,n+="&url="+t.url,e.popup(n,"telegram")},e.popup=function(e,t){window.open(e,"","toolbar=0,status=0,width=626,height=436"),window.yaCounter32652805&&window.yaCounter32652805.reachGoal("article-share",function(){},this,{type:t,url:e})},e.init=function(t){console.assert(t.buttonsSelector,"Sharer: buttons selector is missed");for(var n=document.querySelectorAll(t.buttonsSelector),r=n.length-1;r>=0;r--)n[r].addEventListener("click",e.click,!0)},e.click=function(t){var n=t.target,r=n.dataset.shareType||n.parentNode.dataset.shareType;if(e[r]){var o={url:n.dataset.url||n.parentNode.dataset.url,title:n.dataset.title||n.parentNode.dataset.title,desc:n.dataset.desc||n.parentNode.dataset.desc,img:n.dataset.img||n.parentNode.dataset.title};e[r](o)}},e}({})},function(e,t,n){"use strict";var r=function(){var e=function(e){var t={data:"id="+e.target.id+"&value="+(e.target.checked?1:0),url:"/admin/developer"};codex.core.ajax(t)};return{init:function(){for(var t=document.querySelectorAll(".developer-checkbox"),n=t.length-1;n>-1;n--)t[n].addEventListener("change",e)}}}();e.exports=r},function(e,t,n){"use strict";var r={init:function(e){for(var t,n=document.querySelectorAll(".news__list_item"),r=[],o=0;t=n[o];o++)t.classList.contains("news__list_item--hidden")&&r.push(t);r.splice(0,5).map(function(e){e.classList.remove("news__list_item--hidden")}),r.length||e.classList.add("news__list_item--hidden")}};e.exports=r},function(e,t,n){"use strict";var r=(String.prototype.includes||(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector),void(Element.prototype.closest||(Element.prototype.closest=function(e){for(var t=this;t;){if(t.matches(e))return t;t=t.parentElement}return null})));e.exports=r},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o={xhr:function(e){var t=function e(t,n,o){var i,a,s,c;if(c=/\[\]$/,n instanceof Array)for(a=0,s=n.length;a<s;a++)c.test(t)?o(t,n[a]):e(t+"["+("object"===r(n[a])?a:"")+"]",n[a],o);else if("object"==r(n))for(i in n)e(t+"["+i+"]",n[i],o);else o(t,n)};e.call=function(e){if(e&&e.url){var n,r=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");e.type=e.type||"GET",e.url=e.url,e.async=e.async||!1,e.data=e.data||"",e.formData=e.formData||!1,e["content-type"]=e.contentType||"text/html",n=e.success||n,"GET"==e.type&&e.data&&(e.url=/\?/.test(e.url)?e.url+"&"+e.data:e.url+"?"+e.data),e.beforeSend&&"function"==typeof e.beforeSend&&e.beforeSend.call(),r.open(e.type,e.url,e.async),r.setRequestHeader("Content-type",e["content-type"]),r.setRequestHeader("Connection","close"),r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r.onreadystatechange=function(){4==r.readyState&&200==r.status&&n&&n.call(r.responseText)},r.send(e.formData||function(e){var n,r,o,i,a;if(r=[],a=/%20/g,o=function(e,t){t="function"==typeof t?t():null===t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)},e instanceof Array)for(i in e)o(i,e[i]);else for(n in e)t(n,e[n],o);return r.join("&").replace(a,"+")}(e.data))}else console.warn("url wasn't passed into ajax method")},e.parseHTML=function(e){var t=document.implementation.createHTMLDocument("");return e.toLowerCase().indexOf("<!doctype")>-1?t.documentElement.innerHTML=e:t.body.innerHTML=e,t},
/**
* Adapted from {@link http://www.bulgaria-web-developers.com/projects/javascript/serialize/}
* Changes:
* Ensures proper URL encoding of name as well as value
* Preserves element order
* XHTML and JSLint-friendly
* Disallows disabled form elements and reset buttons as per HTML4 [successful controls]{@link http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2}
* (as used in jQuery). Note: This does not serialize <object>
* elements (even those without a declare attribute) or
* <input type="file" />, as per jQuery, though it does serialize
* the <button>'s (which are potential HTML4 successful controls) unlike jQuery
* @license MIT/GPL
*/
e.serialize=function(e){var t,n,r,o,i,a=[];function s(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/%20/g,"+")}function c(e,t){a.push(s(e)+"="+s(t))}if(!e||!e.nodeName||"form"!==e.nodeName.toLowerCase())throw"You must supply a form element";for(t=0,r=e.elements.length;t<r;t++)if(""!==(i=e.elements[t]).name&&!i.disabled)switch(i.nodeName.toLowerCase()){case"input":switch(i.type){case"text":case"email":case"hidden":case"password":case"button":case"submit":c(i.name,i.value);break;case"checkbox":case"radio":i.checked&&c(i.name,i.value)}break;case"textarea":c(i.name,i.value);break;case"select":switch(i.type){case"select-one":c(i.name,i.value);break;case"select-multiple":for(n=0,o=i.options.length;n<o;n++)i.options[n].selected&&c(i.name,i.options[n].value)}break;case"button":switch(i.type){case"reset":case"submit":case"button":c(i.name,i.value)}}return a.join("&")}}};e.exports=o},function(e,t,n){"use strict";e.exports={uploadPhotoSuccess:function(e){var t=document.getElementById("profile-photo-updatable"),n=document.getElementById("header-avatar-updatable");t.src=e,n.src=e}}},function(e,t,n){"use strict";e.exports=function(e){return e.setCookie=function(e,t,n,r,o){var i=e+"="+t;n&&(i+="; expires="+n.toGMTString()),r&&(i+="; path="+r),o&&(i+="; domain="+o),document.cookie=i},e.getCookie=function(e){var t=document.cookie,n=e+"=",r=t.indexOf("; "+n);if(-1==r){if(0!==(r=t.indexOf(n)))return null}else r+=2;var o=document.cookie.indexOf(";",r);return-1==o&&(o=t.length),unescape(t.substring(r+n.length,o))},e.getOffset=function(e){for(var t=0,n=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft+e.clientLeft,n+=e.offsetTop+e.clientTop,e=e.offsetParent;return{top:n,left:t}},e}({})},function(e,t,n){"use strict";e.exports=function(){var e=null,t=null,n=null,r=null,o=null,i=function(o){e=o.quizDataInput,t=e.questions.length,n=0,r=0,s.prepare(),a.prepare(o.holder),a.setupQuestionInterface()},a={holder:null,currentQuestionObj:null,questionElems:null,prepare:function(e){a.holder=document.getElementById(e),a.holder.classList.add("quiz"),a.holder.classList.add("clearfix")},setupQuestionInterface:function(){var e,t,n,r;a.clear(),e=a.createElem("div","quiz__question-title"),t=a.createElem("div","quiz__question-options"),n=a.createElem("div","quiz__question-counter"),(r=a.createElem("input",["quiz__question-button","quiz__question-button_next"])).setAttribute("type","button"),r.setAttribute("value","Далее →"),a.questionElems={counter:n,title:e,optionsHolder:t,options:[],nextButton:r},a.append(a.questionElems),a.showQuestion()},showQuestion:function(){a.clear(a.questionElems.optionsHolder),a.questionElems.options=[],a.questionElems.nextButton.removeEventListener("click",a.showQuestion),a.currentQuestionObj=e.questions[n],a.questionElems.nextButton.setAttribute("disabled",!0),a.questionElems.title.textContent=a.currentQuestionObj.title,a.questionElems.counter.textContent=n+1+"/"+t,a.currentQuestionObj.answers.map(a.createOption)},answerSelected:function(e){e.classList.add("quiz__question-answer_selected"),a.questionElems.options.map(function(e){e.removeEventListener("click",s.getUserAnswer)}),a.questionElems.nextButton.disabled=!1,n<t-1?a.questionElems.nextButton.addEventListener("click",a.showQuestion):a.questionElems.nextButton.addEventListener("click",a.showResult),a.showAnswer(e),n++},showAnswer:function(e){var t=e.dataset.score>0?"_right":"_wrong",n=e.dataset.index;e.classList.add("quiz__question-answer"+t);var r=a.createElem("div","quiz__answer-message");r.textContent=a.currentQuestionObj.answers[n].message,a.insertAfter(r,e),0==e.dataset.score&&a.showCorrectAnswers()},showCorrectAnswers:function(){a.questionElems.options.map(function(e){e.dataset.score>0?e.classList.add("quiz__question-answer_right"):e.classList.add("quiz__question-answer_wrong")})},showResult:function(){var t=r+"/"+o;a.questionElems.nextButton.removeEventListener("click",a.showResult),a.clear();var n=a.createElem("div","quiz__result-score");n.textContent=t;var c=a.createElem("div","quiz__result-message");c.textContent=s.getMessage();var u=a.createElem("div","quiz__sharing");a.createSocial(u,t);var l=a.createElem("div","quiz__retry-button");l.textContent="Пройти еще раз",l.addEventListener("click",i.bind(null,e,a.holder.id)),a.append([n,c,u,l]),codex.sharer.init({buttonsSelector:".but.vk, .but.fb, .but.tw, .but.tg"})},createSocial:function(t,n){[{title:"Share on the VK",shareType:"vkontakte",class:"vk",icon:"icon-vkontakte"},{title:"Share on the Facebook",shareType:"facebook",class:"fb",icon:"icon-facebook-squared"},{title:"Tweet",shareType:"twitter",class:"tw",icon:"icon-twitter"},{title:"Forward in Telegramm",shareType:"telegram",class:"tg",icon:"icon-paper-plane"}].map(function(r){var o=a.createElem("span",["but",r.class]),i=a.createElem("i",r.icon),s=null;o.dataset.shareType=r.shareType,o.setAttribute("title",r.title),e.shareMessage&&(s=e.shareMessage.replace("$score",n)),s=s||"Я набрал "+n+" в "+(e.title||"тесте от команды CodeX"),o.dataset.url=window.location.href,o.dataset.title=s,o.dataset.desc=e.description||"",a.append(i,o),a.append(o,t)})},createOption:function(e,t){var n=a.createElem("div","quiz__question-answer");n.dataset.score=e.score,n.dataset.index=t,n.textContent=e.text,n.addEventListener("click",s.getUserAnswer),a.questionElems.options.push(n),a.append(n,a.questionElems.optionsHolder)},createElem:function(e,t){var n=document.createElement(e);if(!t)return n;if(t instanceof Array)for(var r in t)n.classList.add(t[r]);else n.classList.add(t);return n},append:function(e,t){if(t=t||a.holder,e instanceof Element)t.appendChild(e);else for(var n in e)e[n]instanceof Element&&t.appendChild(e[n])},insertAfter:function(e,t){t.nextSibling?a.questionElems.optionsHolder.insertBefore(e,t.nextSibling):a.append(e,t.parentNode)},clear:function(e){for(e=e||a.holder;e.firstChild;)e.removeChild(e.firstChild)}},s={prepare:function(){o=0,e.questions.map(function(e){e.answers.map(function(e){o+=parseFloat(e.score)})})},getUserAnswer:function(e){var t=e.currentTarget;r+=parseFloat(t.dataset.score),a.answerSelected(t)},getMessage:function(){var t,n=e.resultMessages;if(n.sort(function(e,t){return e.score-t.score}),n.length){for(var o in n){if(r<n[o].score)break;t=n[o].message}return t}}};return{init:i}}()},function(e,t,n){"use strict";e.exports=function(e){e.form=null,e.nodes={title:null,description:null,questions:[],resultMessages:[],shareMessage:null},e.questionInsertAnchor=null,e.questionInsertButton=null,e.resultMessageInsertAnchor=null,e.resultMessageInsertButton=null,e.resultMessagesHolder=null;var t=function(e,t,n){n=n||"";var r=document.createElement(e),o=document.createTextNode(n);for(var i in r.appendChild(o),t){var a=document.createAttribute(i);a.value=t[i],r.setAttributeNode(a)}return r},n=function(n,r){var o={},i=e.nodes.questions[n],c=i.answers.length;r=r||{},o.holder=t("tr",{class:"quiz-form__question-answer-holder","data-question-index":n,"data-object-index":c}),o.textColumn=t("td",{class:"quiz-form__question-answer-text-column"}),o.text=t("input",{type:"text",class:"quiz-form__question-answer-text",value:r.text||"",required:"",form:"null"}),o.scoreColumn=t("td",{class:"quiz-form__question-answer-score-column"}),o.score=t("input",{type:"number",min:"0",step:"1",value:r.score||"0",class:"quiz-form__question-answer-score",required:"",form:"null"}),o.messageColumn=t("td",{class:"quiz-form__question-answer-message-column"}),o.message=t("input",{type:"text",class:"quiz-form__question-answer-message",value:r.message||"",required:"",form:"null"}),o.destroyButtonColumn=t("td",{class:"quiz-form__question-answer-destroy-button-column"}),o.destroyButton=t("span",{class:"quiz-form__question-answer-destroy-button"}),o.destroyButtonCross=t("img",{class:"quiz-form__button-cross",src:"/public/app/img/quizzes/cross.svg"}),o.textColumn.appendChild(o.text),o.scoreColumn.appendChild(o.score),o.messageColumn.appendChild(o.message),o.destroyButton.appendChild(o.destroyButtonCross),o.destroyButtonColumn.appendChild(o.destroyButton),o.holder.appendChild(o.textColumn),o.holder.appendChild(o.scoreColumn),o.holder.appendChild(o.messageColumn),o.holder.appendChild(o.destroyButtonColumn),i.answers.push(o),s(o),a(i.answers)},r=function(r){var o={},i=e.nodes.questions.length;r=r||{},o.holder=t("div",{class:"quiz-form__question-holder","data-object-index":i}),o.number=t("label",{class:"quiz-form__question-number"},"Вопрос "+(i+1)),o.destroyButton=t("span",{class:"quiz-form__question-destroy-button"}),o.destroyButtonCross=t("img",{class:"quiz-form__button-cross",src:"/public/app/img/quizzes/cross.svg"}),o.titleLabel=t("label",{class:"quiz-form__label quiz-form__question-title-label"},"Заголовок вопроса"),o.title=t("input",{type:"text",class:"quiz-form__question-title",value:r.title||"",required:"",form:"null"}),o.answers=[],o.answersHolder=t("table",{class:"quiz-form__question-answers-holder"}),o.answersHead=t("thead",{class:"quiz-form__question-answers-head"}),o.answersLabel=t("th",{class:"quiz-form__label quiz-form__question-answers-label"},"Ответы"),o.scoresLabel=t("th",{class:"quiz-form__label quiz-form__question-scores-label"},"Баллы"),o.messagesLabel=t("th",{class:"quiz-form__label quiz-form__question-messages-label"},"Комментарии к ответам"),o.destroyButtonLabel=t("th",{class:"quiz-form__question-destroy-buttons-label"}),o.addAnswerButtonRow=t("tr",{class:"quiz-form__question-add-answer-button-row"}),o.addAnswerButtonColumn=t("td",{class:"quiz-form__question-add-answer-button-column"}),o.addAnswerButton=t("span",{class:"quiz-form__question-add-answer-button"},"Добавить ответ"),o.addAnswerButtonPlus=t("img",{class:"quiz-form__button-plus",src:"/public/app/img/quizzes/plus.svg"}),o.holder.appendChild(o.number),o.destroyButton.appendChild(o.destroyButtonCross),o.holder.appendChild(o.destroyButton),o.holder.appendChild(o.titleLabel),o.holder.appendChild(o.title),o.answersHead.appendChild(o.answersLabel),o.answersHead.appendChild(o.scoresLabel),o.answersHead.appendChild(o.messagesLabel),o.answersHead.appendChild(o.destroyButtonLabel),o.answersHolder.appendChild(o.answersHead),o.addAnswerButton.insertBefore(o.addAnswerButtonPlus,o.addAnswerButton.firstChild),o.addAnswerButtonColumn.appendChild(o.addAnswerButton),o.addAnswerButtonRow.appendChild(o.addAnswerButtonColumn),o.answersHolder.appendChild(o.addAnswerButtonRow),o.holder.appendChild(o.answersHolder),e.nodes.questions.push(o),r.answers?r.answers.map(function(e){n(i,e)}):(n(i),n(i),n(i)),s(o),a(e.nodes.questions)},o=function(n){var r={},o=e.nodes.resultMessages.length;n=n||{},r.holder=t("tr",{class:"quiz-form__message-holder","data-object-index":o}),r.messageColumn=t("td",{class:"quiz-form__message-message-column"}),r.message=t("input",{type:"text",class:"quiz-form__message-message",value:n.message||"",required:"",form:"null"}),r.scoreColumn=t("td",{class:"quiz-form__message-score-column"}),r.score=t("input",{type:"number",min:"0",step:"1",value:n.score||"0",class:"quiz-form__message-score",required:"",form:"null"}),r.destroyButtonColumn=t("td",{class:"quiz-form__message-destroy-button-column"}),r.destroyButton=t("span",{class:"quiz-form__message-destroy-button"}),r.destroyButtonCross=t("img",{class:"quiz-form__button-cross",src:"/public/app/img/quizzes/cross.svg"}),r.messageColumn.appendChild(r.message),r.scoreColumn.appendChild(r.score),r.destroyButton.appendChild(r.destroyButtonCross),r.destroyButtonColumn.appendChild(r.destroyButton),r.holder.appendChild(r.messageColumn),r.holder.appendChild(r.scoreColumn),r.holder.appendChild(r.destroyButtonColumn),e.nodes.resultMessages.push(r),s(r),a(e.nodes.resultMessages)},i=function(e,t){e.holder.dataset.objectIndex=t-1,e.number&&(e.number.textContent="Вопрос "+t)},a=function(e){e.length<=1?(e[0].destroyButton.style.display="none",e[0].firstChild&&(e[0].firstChild.style.display="none")):(e[0].destroyButton.style.display="",e[0].firstChild&&(e[0].firstChild.style.display=""))},s=function(t){var n,r;t.answers?(n=e.questionInsertAnchor,r=e.form):t.text?(n=e.nodes.questions[parseInt(t.holder.dataset.questionIndex)].addAnswerButtonRow,r=e.nodes.questions[parseInt(t.holder.dataset.questionIndex)].answersHolder):(n=e.resultMessageInsertAnchor,r=e.resultMessagesHolder),r.insertBefore(t.holder,n)},c=function(){e.form.onsubmit=function(n){n.preventDefault();var r={title:e.form.querySelector('[name="title"]').value,description:e.form.querySelector('[name="description"]').value,questions:[],resultMessages:[],shareMessage:e.form.querySelector('[name="shareMessage"]').value};for(var o in e.nodes.questions){var i={};for(var a in i.title=e.nodes.questions[o].title.value,i.answers=[],e.nodes.questions[o].answers){var s={};s.text=e.nodes.questions[o].answers[a].text.value,s.score=e.nodes.questions[o].answers[a].score.value,s.message=e.nodes.questions[o].answers[a].message.value,i.answers.push(s)}r.questions.push(i)}for(var o in e.nodes.resultMessages){var c={};c.score=e.nodes.resultMessages[o].score.value,c.message=e.nodes.resultMessages[o].message.value,r.resultMessages.push(c)}e.form.appendChild(t("input",{type:"hidden",name:"quiz_data",value:JSON.stringify(r)})),e.form.submit()},e.questionInsertButton.onclick=function(){r()},e.resultMessageInsertButton.onclick=function(){o()},e.form.onclick=function(t){var r,o;t.target.classList.contains("quiz-form__question-destroy-button")?(r=e.nodes.questions,o=parseInt(t.target.parentNode.dataset.objectIndex)):t.target.parentNode.classList.contains("quiz-form__question-destroy-button")?(r=e.nodes.questions,o=parseInt(t.target.parentNode.parentNode.dataset.objectIndex)):t.target.classList.contains("quiz-form__question-answer-destroy-button")?(r=e.nodes.questions[parseInt(t.target.parentNode.parentNode.dataset.questionIndex)].answers,o=parseInt(t.target.parentNode.parentNode.dataset.objectIndex)):t.target.parentNode.classList.contains("quiz-form__question-answer-destroy-button")?(r=e.nodes.questions[parseInt(t.target.parentNode.parentNode.parentNode.dataset.questionIndex)].answers,o=parseInt(t.target.parentNode.parentNode.parentNode.dataset.objectIndex)):t.target.classList.contains("quiz-form__message-destroy-button")?(r=e.nodes.resultMessages,o=parseInt(t.target.parentNode.parentNode.dataset.objectIndex)):t.target.classList.contains("quiz-form__question-add-answer-button")&&(r=null,o=parseInt(t.target.parentNode.parentNode.parentNode.parentNode.dataset.objectIndex)),null===r?n(o):void 0!==r&&function(e,t){e[t].holder.parentNode.removeChild(e[t].holder),e.splice(t,1);for(var n=t;n<e.length;n++)i(e[n],n+1);a(e)}(r,o)}},u=function(){e.form=document.forms.quizForm,e.questionInsertAnchor=document.getElementById("questionInsertAnchor"),e.questionInsertButton=document.getElementById("questionInsertButton"),e.resultMessageInsertAnchor=document.getElementById("resultMessageInsertAnchor"),e.resultMessageInsertButton=document.getElementById("resultMessageInsertButton"),e.resultMessagesHolder=document.getElementById("resultMessagesHolder")},l=function(){a(e.nodes.questions),a(e.nodes.resultMessages),a(e.nodes.questions[0].answers)};return e.init=function(e){e.quizData?function(e){var t=e.questions,n=e.resultMessages;document.querySelector('[name="title"]').value=e.title,document.querySelector('textarea[name="description"]').textContent=e.description,document.querySelector('[name="shareMessage"]').value=e.shareMessage,u(),n.map(function(e){o(e)}),t.map(function(e){r(e)}),c(),l()}(e.quizData):(u(),r(),o(),c(),l())},e}({})},function(module,exports,__webpack_require__){"use strict";module.exports=function(transport){return transport.currentButtonClicked={},transport.init=function(e){var t=document.querySelectorAll(e.buttonsClass);if(t.length){transport.form=document.getElementById("transportForm"),transport.input=document.getElementById("transportInput");for(var n=t.length-1;n>=0;n--)t[n].addEventListener("click",transport.buttonCallback,!1);transport.input.addEventListener("change",transport.submitCallback,!1)}else console.warn("Can't find element with class: «"+e.buttonsClass+"»")},transport.buttonCallback=function(){var e=this.dataset.action,t=this.dataset.id,n=!!this.dataset.multiple||!1;transport.fillForm({action:e,id:t}),n&&(transport.form.multiple="multiple"),transport.currentButtonClicked=this,transport.input.click()},transport.fillForm=function(e){var t,n;for(var r in e)void 0!==e[r]&&((t=void 0!==(n=transport.form.querySelector("input[name="+r+"]"))&&null!==n?n:document.createElement("input")).type="hidden",t.name=r,t.value=e[r],transport.form.appendChild(t))},transport.submitCallback=function(){for(var e=transport.getFileObject(this),t=e.length-1;t>=0;t--){if(!transport.validateExtension(e[t])||!transport.validateMIME(e[t]))return void(window.console&&console.warn("Wrong file type: %o",+e[t].name));if(!transport.validateSize(e[t],31457280))return void(window.console&&console.warn("File size exceeded limit: %o MB",e[t].size/1048576..toFixed(2)))}transport.currentButtonClicked.className+=" loading",transport.form.submit()},transport.response=function(response){transport.currentButtonClicked.className=transport.currentButtonClicked.className.replace("loading",""),response.callback&&eval(response.callback),response.result&&"error"==response.result&&window.console&&console.warn(response.error_description||"error")},transport.getFileObject=function(e){return!!e&&("function"==typeof ActiveXObject?new ActiveXObject("Scripting.FileSystemObject").getFile(e.value):e.files)},transport.validateMIME=function(e,t){for(var n=(t="array"==typeof t?t:["image/jpeg","image/png"]).length-1;n>=0;n--)if(e.type==t[n])return!0;return!1},transport.validateExtension=function(e,t){var n=e.name.match(/\.(\w+)($|#|\?)/);if(!n)return!1;n=n[1].toLowerCase();for(var r=(t="array"==typeof t?t:["jpg","jpeg","png"]).length-1;r>=0;r--)if(n==t[r])return!0;return!1},transport.validateSize=function(e,t){return e.size<t},transport}({})},function(e,t,n){"use strict";var r=function(){var e,t,n,r=function(){var e=document.createElement("SCRIPT");e.src="https://vk.com/js/api/openapi.js",e.setAttribute("async","true"),e.onload=o,document.body.appendChild(e)},o=function(){window.VK.Widgets.Group(e,t,n)};return{init:function(o){e=o.id||null,t=o.display||{mode:3,width:"auto"},n=o.communityId||0,void 0!=document.getElementById(e)?r():console.log("Cannot find element with id "+e)}}}();e.exports=r},function(e,t,n){"use strict";e.exports=function(){var e=n(0).default,t="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js",r="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github-gist.min.css";return{init:function(n){var o=document.querySelectorAll(n);o&&Promise.all([e.loadResource("JS",t,"highlight"),e.loadResource("CSS",r,"highlight")]).catch(function(e){return console.warn("Cannot load code styling module: ",e)}).then(function(){return console.log("Code Styling is ready")}).then(function(){if(window.hljs)for(var e=o.length-1;e>=0;e--)window.hljs.highlightBlock(o[e]);else console.warn("Code Styling script loaded but not ready")})}}}()},function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";var r,o,i,a,s,c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};
/**
* Helps to set link with custom protocol (to open apps) and usual link (for webpages) to a button
*
* @author Taly Guryn <https://github.com/talyguryn>
* @license MIT
*/e.exports=(r=function(e){"object"!==(void 0===e?"undefined":c(e))&&s("Passed element is not an object");var t=e.dataset.link||e.href,n=e.dataset.appLink;i(n,t)},o=function(e){e||s("Can not open app, because appLink is undefined");var t=document.createElement("iframe");t.style.display="none",document.body.appendChild(t),null!==t&&(t.src=e)},i=function(e,t){var n=!1;window.addEventListener("pagehide",function(){n=!0},!1),window.addEventListener("blur",function(){n=!0},!1),o(e),setTimeout(function(){n||a(t)},100)},a=function(e){e||s("Can not open page because link is undefined"),window.open(e,"_blank")},s=function(e){throw Error("[Deeplinker] "+e)},{click:r,init:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:".deeplinker",t=document.querySelectorAll(e);t.length&&Array.prototype.slice.call(t).forEach(function(e){e.addEventListener("click",function(t){t.preventDefault(),r(e)})})},tryToOpenApp:o})}])},function(e,t,n){"use strict";e.exports=function(){var e,t,n=function(){i(t,e)},r=function(){i(e,t)},o=function(){i(t,e,!1)},i=function(e,t){for(var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=0;r<t.length;r++)t[r].classList.toggle("hide",n);for(var o=0;o<e.length;o++)e[o].classList.toggle("hide",!1)};return{init:function(i){e=document.querySelectorAll(i.blockToolsClass),t=document.querySelectorAll(i.inlineToolsClass);for(var a=[{buttonClass:i.blockFilterButtonClass,buttonAction:r},{buttonClass:i.inlineFilterButtonClass,buttonAction:n},{buttonClass:i.allToolsFilterButtonClass,buttonAction:o}],s=0;s<a.length;s++){var c=document.querySelector(a[s].buttonClass),u=a[s].buttonClass,l=a[s].buttonAction;c?c.addEventListener("click",l):console.warn("Can't find button with class: «"+u+"»")}}}}()},function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=22)}([function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(r){function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(33)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&"%c"===e&&(i=++o)}),e.splice(i,0,r)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())}).call(this,n(32))},function(e,t,n){function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n)for(var r=0,o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t);return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){var r,o=n(40),i=n(16),a=n(46),s=n(47),c=n(48);"undefined"!=typeof ArrayBuffer&&(r=n(49));var u="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),l="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),f=u||l;t.protocol=3;var d=t.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},p=o(d),h={type:"error",data:"parser error"},m=n(50);function g(e,t,n){for(var r=new Array(e.length),o=s(e.length,n),i=function(e,n,o){t(n,function(t,n){r[e]=n,o(t,r)})},a=0;a<e.length;a++)i(a,e[a],o)}t.encodePacket=function(e,n,r,o){"function"==typeof n&&(o=n,n=!1),"function"==typeof r&&(o=r,r=null);var i=void 0===e.data?void 0:e.data.buffer||e.data;if("undefined"!=typeof ArrayBuffer&&i instanceof ArrayBuffer)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var o=e.data,i=new Uint8Array(o),a=new Uint8Array(1+o.byteLength);a[0]=d[e.type];for(var s=0;s<i.length;s++)a[s+1]=i[s];return r(a.buffer)}(e,n,o);if(void 0!==m&&i instanceof m)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);if(f)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var o=new FileReader;return o.onload=function(){t.encodePacket({type:e.type,data:o.result},n,!0,r)},o.readAsArrayBuffer(e.data)}(e,n,r);var o=new Uint8Array(1);o[0]=d[e.type];var i=new m([o.buffer,e.data]);return r(i)}(e,n,o);if(i&&i.base64)return function(e,n){var r="b"+t.packets[e.type]+e.data.data;return n(r)}(e,o);var a=d[e.type];return void 0!==e.data&&(a+=r?c.encode(String(e.data),{strict:!1}):String(e.data)),o(""+a)},t.encodeBase64Packet=function(e,n){var r,o="b"+t.packets[e.type];if(void 0!==m&&e.data instanceof m){var i=new FileReader;return i.onload=function(){var e=i.result.split(",")[1];n(o+e)},i.readAsDataURL(e.data)}try{r=String.fromCharCode.apply(null,new Uint8Array(e.data))}catch(t){for(var a=new Uint8Array(e.data),s=new Array(a.length),c=0;c<a.length;c++)s[c]=a[c];r=String.fromCharCode.apply(null,s)}return o+=btoa(r),n(o)},t.decodePacket=function(e,n,r){if(void 0===e)return h;if("string"==typeof e){if("b"===e.charAt(0))return t.decodeBase64Packet(e.substr(1),n);if(r&&!1===(e=function(e){try{e=c.decode(e,{strict:!1})}catch(e){return!1}return e}(e)))return h;var o=e.charAt(0);return Number(o)==o&&p[o]?e.length>1?{type:p[o],data:e.substring(1)}:{type:p[o]}:h}o=new Uint8Array(e)[0];var i=a(e,1);return m&&"blob"===n&&(i=new m([i])),{type:p[o],data:i}},t.decodeBase64Packet=function(e,t){var n=p[e.charAt(0)];if(!r)return{type:n,data:{base64:!0,data:e.substr(1)}};var o=r.decode(e.substr(1));return"blob"===t&&m&&(o=new m([o])),{type:n,data:o}},t.encodePayload=function(e,n,r){"function"==typeof n&&(r=n,n=null);var o=i(e);return n&&o?m&&!f?t.encodePayloadAsBlob(e,r):t.encodePayloadAsArrayBuffer(e,r):e.length?void g(e,function(e,r){t.encodePacket(e,!!o&&n,!1,function(e){r(null,function(e){return e.length+":"+e}(e))})},function(e,t){return r(t.join(""))}):r("0:")},t.decodePayload=function(e,n,r){if("string"!=typeof e)return t.decodePayloadAsBinary(e,n,r);var o;if("function"==typeof n&&(r=n,n=null),""===e)return r(h,0,1);for(var i,a,s="",c=0,u=e.length;c<u;c++){var l=e.charAt(c);if(":"===l){if(""===s||s!=(i=Number(s)))return r(h,0,1);if(s!=(a=e.substr(c+1,i)).length)return r(h,0,1);if(a.length){if(o=t.decodePacket(a,n,!1),h.type===o.type&&h.data===o.data)return r(h,0,1);if(!1===r(o,c+i,u))return}c+=i,s=""}else s+=l}return""!==s?r(h,0,1):void 0},t.encodePayloadAsArrayBuffer=function(e,n){if(!e.length)return n(new ArrayBuffer(0));g(e,function(e,n){t.encodePacket(e,!0,!0,function(e){return n(null,e)})},function(e,t){var r=t.reduce(function(e,t){var n;return e+(n="string"==typeof t?t.length:t.byteLength).toString().length+n+2},0),o=new Uint8Array(r),i=0;return t.forEach(function(e){var t="string"==typeof e,n=e;if(t){for(var r=new Uint8Array(e.length),a=0;a<e.length;a++)r[a]=e.charCodeAt(a);n=r.buffer}o[i++]=t?0:1;var s=n.byteLength.toString();for(a=0;a<s.length;a++)o[i++]=parseInt(s[a]);for(o[i++]=255,r=new Uint8Array(n),a=0;a<r.length;a++)o[i++]=r[a]}),n(o.buffer)})},t.encodePayloadAsBlob=function(e,n){g(e,function(e,n){t.encodePacket(e,!0,!0,function(e){var t=new Uint8Array(1);if(t[0]=1,"string"==typeof e){for(var r=new Uint8Array(e.length),o=0;o<e.length;o++)r[o]=e.charCodeAt(o);e=r.buffer,t[0]=0}var i=(e instanceof ArrayBuffer?e.byteLength:e.size).toString(),a=new Uint8Array(i.length+1);for(o=0;o<i.length;o++)a[o]=parseInt(i[o]);if(a[i.length]=255,m){var s=new m([t.buffer,a.buffer,e]);n(null,s)}})},function(e,t){return n(new m(t))})},t.decodePayloadAsBinary=function(e,n,r){"function"==typeof n&&(r=n,n=null);for(var o=e,i=[];o.byteLength>0;){for(var s=new Uint8Array(o),c=0===s[0],u="",l=1;255!==s[l];l++){if(u.length>310)return r(h,0,1);u+=s[l]}o=a(o,2+u.length),u=parseInt(u);var f=a(o,0,u);if(c)try{f=String.fromCharCode.apply(null,new Uint8Array(f))}catch(e){var d=new Uint8Array(f);for(f="",l=0;l<d.length;l++)f+=String.fromCharCode(d[l])}i.push(f),o=a(o,u)}var p=i.length;i.forEach(function(e,o){r(t.decodePacket(e,n,!0),o,p)})}},function(e,t){t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),r=0,o=n.length;r<o;r++){var i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}},function(e,t){e.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){var r=n(1)("socket.io-parser"),o=n(2),i=n(35),a=n(11),s=n(12);function c(){}t.protocol=4,t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],t.CONNECT=0,t.DISCONNECT=1,t.EVENT=2,t.ACK=3,t.ERROR=4,t.BINARY_EVENT=5,t.BINARY_ACK=6,t.Encoder=c,t.Decoder=f;var u=t.ERROR+'"encode error"';function l(e){var n=""+e.type;if(t.BINARY_EVENT!==e.type&&t.BINARY_ACK!==e.type||(n+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(n+=e.nsp+","),null!=e.id&&(n+=e.id),null!=e.data){var o=function(e){try{return JSON.stringify(e)}catch(e){return!1}}(e.data);if(!1===o)return u;n+=o}return r("encoded %j as %s",e,n),n}function f(){this.reconstructor=null}function d(e){this.reconPack=e,this.buffers=[]}function p(e){return{type:t.ERROR,data:"parser error: "+e}}c.prototype.encode=function(e,n){r("encoding packet %j",e),t.BINARY_EVENT===e.type||t.BINARY_ACK===e.type?function(e,t){i.removeBlobs(e,function(e){var n=i.deconstructPacket(e),r=l(n.packet),o=n.buffers;o.unshift(r),t(o)})}(e,n):n([l(e)])},o(f.prototype),f.prototype.add=function(e){var n;if("string"==typeof e)n=function(e){var n=0,o={type:Number(e.charAt(0))};if(null==t.types[o.type])return p("unknown packet type "+o.type);if(t.BINARY_EVENT===o.type||t.BINARY_ACK===o.type){for(var i="";"-"!==e.charAt(++n)&&(i+=e.charAt(n),n!=e.length););if(i!=Number(i)||"-"!==e.charAt(n))throw new Error("Illegal attachments");o.attachments=Number(i)}if("/"===e.charAt(n+1))for(o.nsp="";++n;){var s=e.charAt(n);if(","===s)break;if(o.nsp+=s,n===e.length)break}else o.nsp="/";var c=e.charAt(n+1);if(""!==c&&Number(c)==c){for(o.id="";++n;){var s=e.charAt(n);if(null==s||Number(s)!=s){--n;break}if(o.id+=e.charAt(n),n===e.length)break}o.id=Number(o.id)}if(e.charAt(++n)){var u=function(e){try{return JSON.parse(e)}catch(e){return!1}}(e.substr(n)),l=!1!==u&&(o.type===t.ERROR||a(u));if(!l)return p("invalid payload");o.data=u}return r("decoded %s as %j",e,o),o}(e),t.BINARY_EVENT===n.type||t.BINARY_ACK===n.type?(this.reconstructor=new d(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!s(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(n=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,this.emit("decoded",n))}},f.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},d.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=i.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},d.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(e,t,n){(function(t){var r=n(38);e.exports=function(e){var n=e.xdomain,o=e.xscheme,i=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!n||r))return new XMLHttpRequest}catch(e){}try{if("undefined"!=typeof XDomainRequest&&!o&&i)return new XDomainRequest}catch(e){}if(!n)try{return new(t[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}}).call(this,n(0))},function(e,t,n){var r=n(3),o=n(2);function i(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.forceNode=e.forceNode,this.extraHeaders=e.extraHeaders,this.localAddress=e.localAddress}e.exports=i,o(i.prototype),i.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},i.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},i.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},i.prototype.send=function(e){if("open"!==this.readyState)throw new Error("Transport not open");this.write(e)},i.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},i.prototype.onData=function(e){var t=r.decodePacket(e,this.socket.binaryType);this.onPacket(t)},i.prototype.onPacket=function(e){this.emit("packet",e)},i.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(r),i=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(i).concat([o]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<e.length;o++){var a=e[o];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var t=e,o=e.indexOf("["),i=e.indexOf("]");-1!=o&&-1!=i&&(e=e.substring(0,o)+e.substring(o,i).replace(/:/g,";")+e.substring(i,e.length));for(var a=n.exec(e||""),s={},c=14;c--;)s[r[c]]=a[c]||"";return-1!=o&&-1!=i&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){(function(t){e.exports=function(e){return n&&t.Buffer.isBuffer(e)||r&&(e instanceof t.ArrayBuffer||o(e))};var n="function"==typeof t.Buffer&&"function"==typeof t.Buffer.isBuffer,r="function"==typeof t.ArrayBuffer,o=r&&"function"==typeof t.ArrayBuffer.isView?t.ArrayBuffer.isView:function(e){return e.buffer instanceof t.ArrayBuffer}}).call(this,n(0))},function(e,t,n){var r=n(36),o=n(19),i=n(2),a=n(6),s=n(20),c=n(21),u=n(1)("socket.io-client:manager"),l=n(18),f=n(55),d=Object.prototype.hasOwnProperty;function p(e,t){if(!(this instanceof p))return new p(e,t);e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new f({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=t.parser||a;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.open()}e.exports=p,p.prototype.emitAll=function(){for(var e in this.emit.apply(this,arguments),this.nsps)d.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},p.prototype.updateSocketIds=function(){for(var e in this.nsps)d.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},p.prototype.generateId=function(e){return("/"===e?"":e+"#")+this.engine.id},i(p.prototype),p.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},p.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},p.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},p.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},p.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},p.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},p.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},p.prototype.open=p.prototype.connect=function(e,t){if(u("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;u("opening %s",this.uri),this.engine=r(this.uri,this.opts);var n=this.engine,o=this;this.readyState="opening",this.skipReconnect=!1;var i=s(n,"open",function(){o.onopen(),e&&e()}),a=s(n,"error",function(t){if(u("connect_error"),o.cleanup(),o.readyState="closed",o.emitAll("connect_error",t),e){var n=new Error("Connection error");n.data=t,e(n)}else o.maybeReconnectOnOpen()});if(!1!==this._timeout){var c=this._timeout;u("connect attempt will timeout after %d",c);var l=setTimeout(function(){u("connect attempt timed out after %d",c),i.destroy(),n.close(),n.emit("error","timeout"),o.emitAll("connect_timeout",c)},c);this.subs.push({destroy:function(){clearTimeout(l)}})}return this.subs.push(i),this.subs.push(a),this},p.prototype.onopen=function(){u("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(s(e,"data",c(this,"ondata"))),this.subs.push(s(e,"ping",c(this,"onping"))),this.subs.push(s(e,"pong",c(this,"onpong"))),this.subs.push(s(e,"error",c(this,"onerror"))),this.subs.push(s(e,"close",c(this,"onclose"))),this.subs.push(s(this.decoder,"decoded",c(this,"ondecoded")))},p.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},p.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},p.prototype.ondata=function(e){this.decoder.add(e)},p.prototype.ondecoded=function(e){this.emit("packet",e)},p.prototype.onerror=function(e){u("error",e),this.emitAll("error",e)},p.prototype.socket=function(e,t){var n=this.nsps[e];if(!n){n=new o(this,e,t),this.nsps[e]=n;var r=this;n.on("connecting",i),n.on("connect",function(){n.id=r.generateId(e)}),this.autoConnect&&i()}function i(){~l(r.connecting,n)||r.connecting.push(n)}return n},p.prototype.destroy=function(e){var t=l(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},p.prototype.packet=function(e){u("writing packet %j",e);var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,function(n){for(var r=0;r<n.length;r++)t.engine.write(n[r],e.options);t.encoding=!1,t.processPacketQueue()}))},p.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},p.prototype.cleanup=function(){u("cleanup");for(var e=this.subs.length,t=0;t<e;t++)this.subs.shift().destroy();this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},p.prototype.close=p.prototype.disconnect=function(){u("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},p.prototype.onclose=function(e){u("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},p.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)u("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();u("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout(function(){e.skipReconnect||(u("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open(function(t){t?(u("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(u("reconnect success"),e.onreconnect())}))},t);this.subs.push({destroy:function(){clearTimeout(n)}})}},p.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,n){(function(e){var r=n(7),o=n(39),i=n(51),a=n(52);t.polling=function(t){var n=!1,a=!1,s=!1!==t.jsonp;if(e.location){var c="https:"===location.protocol,u=location.port;u||(u=c?443:80),n=t.hostname!==location.hostname||u!==t.port,a=t.secure!==c}if(t.xdomain=n,t.xscheme=a,"open"in new r(t)&&!t.forceJSONP)return new o(t);if(!s)throw new Error("JSONP disabled");return new i(t)},t.websocket=a}).call(this,n(0))},function(e,t,n){var r=n(8),o=n(4),i=n(3),a=n(5),s=n(17),c=n(1)("engine.io-client:polling");e.exports=l;var u=null!=new(n(7))({xdomain:!1}).responseType;function l(e){var t=e&&e.forceBase64;u&&!t||(this.supportsBinary=!1),r.call(this,e)}a(l,r),l.prototype.name="polling",l.prototype.doOpen=function(){this.poll()},l.prototype.pause=function(e){var t=this;function n(){c("paused"),t.readyState="paused",e()}if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(c("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){c("pre-pause polling complete"),--r||n()})),this.writable||(c("we are currently writing - waiting to pause"),r++,this.once("drain",function(){c("pre-pause writing complete"),--r||n()}))}else n()},l.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},l.prototype.onData=function(e){var t=this;c("polling got data %s",e),i.decodePayload(e,this.socket.binaryType,function(e,n,r){if("opening"===t.readyState&&t.onOpen(),"close"===e.type)return t.onClose(),!1;t.onPacket(e)}),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():c('ignoring poll - transport state "%s"',this.readyState))},l.prototype.doClose=function(){var e=this;function t(){c("writing close packet"),e.write([{type:"close"}])}"open"===this.readyState?(c("transport open - closing"),t()):(c("transport not open - deferring close"),this.once("open",t))},l.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")};i.encodePayload(e,this.supportsBinary,function(e){t.doWrite(e,n)})},l.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=s()),this.supportsBinary||e.sid||(e.b64=1),e=o.encode(e),this.port&&("https"===t&&443!==Number(this.port)||"http"===t&&80!==Number(this.port))&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e}},function(e,t,n){(function(t){var r=n(45),o=Object.prototype.toString,i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),a="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);e.exports=function e(n){if(!n||"object"!=typeof n)return!1;if(r(n)){for(var o=0,s=n.length;o<s;o++)if(e(n[o]))return!0;return!1}if("function"==typeof t&&t.isBuffer&&t.isBuffer(n)||"function"==typeof ArrayBuffer&&n instanceof ArrayBuffer||i&&n instanceof Blob||a&&n instanceof File)return!0;if(n.toJSON&&"function"==typeof n.toJSON&&1===arguments.length)return e(n.toJSON(),!0);for(var c in n)if(Object.prototype.hasOwnProperty.call(n,c)&&e(n[c]))return!0;return!1}}).call(this,n(41).Buffer)},function(e,t,n){"use strict";var r,o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),i=64,a={},s=0,c=0;function u(e){var t="";do{t=o[e%i]+t,e=Math.floor(e/i)}while(e>0);return t}function l(){var e=u(+new Date);return e!==r?(s=0,r=e):e+"."+u(s++)}for(;c<i;c++)a[o[c]]=c;l.encode=u,l.decode=function(e){var t=0;for(c=0;c<e.length;c++)t=t*i+a[e.charAt(c)];return t},e.exports=l},function(e,t){var n=[].indexOf;e.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}},function(e,t,n){var r=n(6),o=n(2),i=n(54),a=n(20),s=n(21),c=n(1)("socket.io-client:socket"),u=n(4),l=n(16);e.exports=p;var f={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},d=o.prototype.emit;function p(e,t,n){this.io=e,this.nsp=t,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}o(p.prototype),p.prototype.subEvents=function(){if(!this.subs){var e=this.io;this.subs=[a(e,"open",s(this,"onopen")),a(e,"packet",s(this,"onpacket")),a(e,"close",s(this,"onclose"))]}},p.prototype.open=p.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting"),this)},p.prototype.send=function(){var e=i(arguments);return e.unshift("message"),this.emit.apply(this,e),this},p.prototype.emit=function(e){if(f.hasOwnProperty(e))return d.apply(this,arguments),this;var t=i(arguments),n={type:(void 0!==this.flags.binary?this.flags.binary:l(t))?r.BINARY_EVENT:r.EVENT,data:t,options:{}};return n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof t[t.length-1]&&(c("emitting packet with ack id %d",this.ids),this.acks[this.ids]=t.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={},this},p.prototype.packet=function(e){e.nsp=this.nsp,this.io.packet(e)},p.prototype.onopen=function(){if(c("transport is open - connecting"),"/"!==this.nsp)if(this.query){var e="object"==typeof this.query?u.encode(this.query):this.query;c("sending connect packet with query %s",e),this.packet({type:r.CONNECT,query:e})}else this.packet({type:r.CONNECT})},p.prototype.onclose=function(e){c("close (%s)",e),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",e)},p.prototype.onpacket=function(e){var t=e.nsp===this.nsp,n=e.type===r.ERROR&&"/"===e.nsp;if(t||n)switch(e.type){case r.CONNECT:this.onconnect();break;case r.EVENT:case r.BINARY_EVENT:this.onevent(e);break;case r.ACK:case r.BINARY_ACK:this.onack(e);break;case r.DISCONNECT:this.ondisconnect();break;case r.ERROR:this.emit("error",e.data)}},p.prototype.onevent=function(e){var t=e.data||[];c("emitting event %j",t),null!=e.id&&(c("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?d.apply(this,t):this.receiveBuffer.push(t)},p.prototype.ack=function(e){var t=this,n=!1;return function(){if(!n){n=!0;var o=i(arguments);c("sending ack %j",o),t.packet({type:l(o)?r.BINARY_ACK:r.ACK,id:e,data:o})}}},p.prototype.onack=function(e){var t=this.acks[e.id];"function"==typeof t?(c("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):c("bad ack %s",e.id)},p.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},p.prototype.emitBuffered=function(){var e;for(e=0;e<this.receiveBuffer.length;e++)d.apply(this,this.receiveBuffer[e]);for(this.receiveBuffer=[],e=0;e<this.sendBuffer.length;e++)this.packet(this.sendBuffer[e]);this.sendBuffer=[]},p.prototype.ondisconnect=function(){c("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},p.prototype.destroy=function(){if(this.subs){for(var e=0;e<this.subs.length;e++)this.subs[e].destroy();this.subs=null}this.io.destroy(this)},p.prototype.close=p.prototype.disconnect=function(){return this.connected&&(c("performing disconnect (%s)",this.nsp),this.packet({type:r.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},p.prototype.compress=function(e){return this.flags.compress=e,this},p.prototype.binary=function(e){return this.flags.binary=e,this}},function(e,t){e.exports=function(e,t,n){return e.on(t,n),{destroy:function(){e.removeListener(t,n)}}}},function(e,t){var n=[].slice;e.exports=function(e,t){if("string"==typeof t&&(t=e[t]),"function"!=typeof t)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return t.apply(e,r.concat(n.call(arguments)))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(23);var r=n(28);t.default=r.default},function(e,t,n){var r=n(24);"string"==typeof r&&(r=[[e.i,r,""]]),n(26)(r,{hmr:!0,transform:void 0,insertInto:void 0}),r.locals&&(e.exports=r.locals)},function(e,t,n){(t=e.exports=n(9)(!1)).i(n(25),""),t.push([e.i,".reactions {\n display: flex;\n justify-content: center;\n color: var(--text-color);\n font-family: var(--font-stack);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n@media (max-width: 1000px) {\n\n.reactions {\n flex-direction: column\n}\n }\n\n.reactions__title {\n align-self: center;\n margin-right: 18px;\n font-size: 15px;\n letter-spacing: 0.1px;\n }\n\n@media (max-width: 1000px) {\n\n.reactions__title {\n margin-bottom: 10px\n }\n }\n\n.reactions__container {\n display: flex;\n }\n\n@media (max-width: 1000px) {\n\n.reactions__container {\n flex-wrap: wrap;\n justify-content: center\n }\n }\n\n.reactions__counter {\n margin: 10px 20px 10px 0;\n }\n\n.reactions__counter-emoji {\n display: inline-block;\n vertical-align: middle;\n width: 40px;\n height: 40px;\n line-height: 40px;\n text-align: center;\n margin-right: 11px;\n border: solid 1px var(--border-color);\n border-radius: 35px;\n box-sizing: border-box;\n font-size: 20px;\n cursor: pointer;\n letter-spacing: -1.5px;\n will-change: transform, filter, box-shadow, background-color, border-color;\n }\n\n.reactions__counter-emoji--picked {\n background-color: var(--background-color);\n border-color: var(--border-color--selected);\n -webkit-animation: cr-select 600ms ease 1;\n animation: cr-select 600ms ease 1;\n }\n\n.reactions__counter-emoji--picked:hover {\n -webkit-animation: cr-select 600ms ease-out 1 !important;\n animation: cr-select 600ms ease-out 1 !important;\n }\n\n.reactions__counter-emoji:hover {\n border-color: var(--border-color--hover);\n -webkit-animation: cr-hover 1000ms ease infinite;\n animation: cr-hover 1000ms ease infinite;\n }\n\n.reactions__counter-votes {\n display: inline-block;\n min-width: 15px;\n vertical-align: middle;\n }\n\n.reactions__counter-votes--picked{\n font-weight: 600;\n }\n\n@-webkit-keyframes cr-hover {\n 0% {\n box-shadow: 0 0 0 10px #FFFACC;\n }\n\n 40% {\n box-shadow: 0 0 0 25px rgba(255, 250, 204, 0.4), 0 0 0 10px #FFFACC;\n }\n\n 40.05% {\n box-shadow: 0 0 0 5px rgba(255, 250, 204, 0.4), 0 0 0 10px #FFFACC;\n }\n}\n\n@keyframes cr-hover {\n 0% {\n box-shadow: 0 0 0 10px #FFFACC;\n }\n\n 40% {\n box-shadow: 0 0 0 25px rgba(255, 250, 204, 0.4), 0 0 0 10px #FFFACC;\n }\n\n 40.05% {\n box-shadow: 0 0 0 5px rgba(255, 250, 204, 0.4), 0 0 0 10px #FFFACC;\n }\n}\n\n@-webkit-keyframes cr-select {\n 20% {\n -webkit-transform: scale(1.7);\n transform: scale(1.7);\n -webkit-filter: blur(1px);\n filter: blur(1px);\n }\n\n}\n\n@keyframes cr-select {\n 20% {\n -webkit-transform: scale(1.7);\n transform: scale(1.7);\n -webkit-filter: blur(1px);\n filter: blur(1px);\n }\n\n}",""])},function(e,t,n){(e.exports=n(9)(!1)).push([e.i,':root {\n --text-color: #8b8b8b;\n --border-color: #d7d7d4;\n --border-color--hover: #F4E964;\n --border-color--selected: #ebe8bf;\n --background-color: #fffacc;\n --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n}',""])},function(e,t,n){var r={},o=function(e){var t;return function(){return void 0===t&&(t=function(){return window&&document&&document.all&&!window.atob}.apply(this,arguments)),t}}(),i=function(e){var t={};return function(e,n){if("function"==typeof e)return e();if(void 0===t[e]){var r=function(e,t){return t?t.querySelector(e):document.querySelector(e)}.call(this,e,n);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}}(),a=null,s=0,c=[],u=n(27);function l(e,t){for(var n=0;n<e.length;n++){var o=e[n],i=r[o.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](o.parts[a]);for(;a<o.parts.length;a++)i.parts.push(g(o.parts[a],t))}else{var s=[];for(a=0;a<o.parts.length;a++)s.push(g(o.parts[a],t));r[o.id]={id:o.id,refs:1,parts:s}}}}function f(e,t){for(var n=[],r={},o=0;o<e.length;o++){var i=e[o],a=t.base?i[0]+t.base:i[0],s={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(s):n.push(r[a]={id:a,parts:[s]})}return n}function d(e,t){var n=i(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=c[c.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),c.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=i(e.insertAt.before,n);n.insertBefore(t,o)}}function p(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=c.indexOf(e);t>=0&&c.splice(t,1)}function h(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=n.nc;r&&(e.attrs.nonce=r)}return m(t,e.attrs),d(e,t),t}function m(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function g(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var c=s++;n=a||(a=h(t)),r=v.bind(null,n,c,!1),o=v.bind(null,n,c,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),d(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=u(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),o=function(){p(n),n.href&&URL.revokeObjectURL(n.href)}):(n=h(t),r=function(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){p(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=f(e,t);return l(n,t),function(e){for(var o=[],i=0;i<n.length;i++){var a=n[i];(s=r[a.id]).refs--,o.push(s)}for(e&&l(f(e,t),t),i=0;i<o.length;i++){var s;if(0===(s=o[i]).refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete r[s.id]}}}};var y=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function v(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=y(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var o,i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(29),o=n(57),i=n(58),a=n(59),s=n(60),c=n(61),u=function(){function e(t){var n,r=this;if(this.reactions={},this.nodes={wrap:null,container:null},i.default.make("span",e.CSS.title,{textContent:t.title}),this.id=new o.default(t.id),this.nodes.wrap=i.default.make("div",e.CSS.wrapper),n=t.parent instanceof HTMLElement?t.parent:document.querySelector(t.parent),t.title){var u=this.createTitle(t.title);this.nodes.wrap.append(u)}this.nodes.container=i.default.make("div",e.CSS.container),t.reactions.forEach(function(e){var t=r.getEmojiHash(e);t in r.reactions||(r.reactions[t]=r.addReaction(e,t))}),this.nodes.wrap.append(this.nodes.container);var l=s.default.getInt(this.getStorageKey());if(!n)throw new Error("Parent element is not found");n.append(this.nodes.wrap),setTimeout(function(){c.default.getFingerprint().then(function(n){e.setUserId(n);var o=a.default.debounce(function(){r.listenForToken(o)},200);window.addEventListener("scroll",o),r.listenForToken(o),l&&l in r.reactions&&r.update({reaction:l,userId:e.userId}),e.socket.send({type:"initialization",title:t.title,options:t.reactions.reduce(function(e,t){return e[r.getEmojiHash(t)]=0,e},{}),id:r.id,userId:e.userId}),e.socket.socket.on("update",function(e){console.log("msg",e),e&&e.id===r.id.toString()&&r.update(e)})})},2e3)}return Object.defineProperty(e,"CSS",{get:function(){return{emoji:"reactions__counter-emoji",picked:"reactions__counter-emoji--picked",reactionContainer:"reactions__counter",title:"reactions__title",votes:"reactions__counter-votes",votesPicked:"reactions__counter-votes--picked",container:"reactions__container",wrapper:"reactions"}},enumerable:!0,configurable:!0}),e.init=function(){var e=this;Array.from(document.querySelectorAll("reactions")).forEach(function(t){return e.insertModule(t)})},e.insertModule=function(t){var n=[];Array.from(t.querySelectorAll("reaction")).forEach(function(e){return n.push(e.textContent)}),t.innerHTML="",new e({parent:t,title:t.dataset.title,reactions:n,id:t.dataset.id||void 0})},e.setUserId=function(t){e.userId=t},e.setToken=function(t){e.token=t},e.prototype.addReaction=function(t,n){var r=this,o=i.default.make("div",e.CSS.reactionContainer),a=i.default.make("div",e.CSS.emoji,{textContent:t});a.addEventListener("click",function(){return r.reactionClicked(n)});var s=i.default.make("span",e.CSS.votes,{textContent:0});return o.append(a),o.append(s),this.nodes.container.append(o),{emoji:a,counter:s}},e.prototype.reactionClicked=function(t){this.update({userId:e.userId,reaction:t}),this.saveValue(t,void 0!==this.picked)},e.prototype.vote=function(e){var t=+this.reactions[e].counter.textContent+1;this.reactions[e].counter.textContent=t.toString()},e.prototype.unvote=function(e){var t=+this.reactions[e].counter.textContent-1;this.reactions[e].counter.textContent=t.toString()},e.prototype.listenForToken=function(t){i.default.isElementVisible(this.nodes.container)&&(window.removeEventListener("scroll",t),e.socket.send({type:"getToken",id:this.id,userId:e.userId}),e.socket.socket.on("receiveToken",function(t){e.setToken(t)}))},e.prototype.createTitle=function(t){return i.default.make("span",e.CSS.title,{textContent:t})},e.prototype.saveValue=function(t,n){var r={type:n?"vote":"unvote",reaction:t.toString(),id:this.id,userId:e.userId,token:e.token};e.socket.send(r)},e.prototype.update=function(t){if(t.options&&this.setOptions(t.options),t.userId===e.userId){if(!t.reaction)return this.applyVotedStyles(),void s.default.removeItem(this.getStorageKey());if(void 0===this.picked)return this.picked=+t.reaction,this.applyVotedStyles(this.picked),void(t.options||this.vote(+t.reaction));if(this.picked!==t.reaction){var n=this.picked;return this.picked=+t.reaction,t.options||(this.unvote(n),this.vote(this.picked)),void this.applyVotedStyles(this.picked)}t.options||(this.applyVotedStyles(),this.unvote(+t.reaction),this.picked=void 0)}},e.prototype.applyVotedStyles=function(t){Object.values(this.reactions).forEach(function(t){var n=t.emoji,r=t.counter;n.classList.remove(e.CSS.picked),r.classList.remove(e.CSS.votesPicked)}),t&&(this.reactions[t].emoji.classList.add(e.CSS.picked),this.reactions[t].counter.classList.add(e.CSS.votesPicked))},e.prototype.setOptions=function(e){for(var t in this.reactions){var n=+e[t];void 0!==n&&(this.reactions[t].counter.textContent=n.toString())}},Object.defineProperty(e.prototype,"picked",{get:function(){return this._picked},set:function(e){s.default.setItem(this.getStorageKey(),e),this._picked=e},enumerable:!0,configurable:!0}),e.prototype.getStorageKey=function(){return"User:"+e.userId+":PickedOn:"+this.id.toString()},e.prototype.getEmojiHash=function(e){for(var t=1,n=0;n<e.length;n++)t+=3*t+e.codePointAt(n);return t},e.socket=new r.default("https://reactions.ifmo.su/"),e}();t.default=u},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(30),i=function(e){function t(t){var n=e.call(this)||this;return n.socket=o(t),n.socket.on("message",function(e){return n.message(e)}),n}return r(t,e),t.prototype.send=function(e){e.origin=location.origin,this.socket.send(e)},t.prototype.message=function(e){this.emit("message",e)},t}(n(56));t.default=i},function(e,t,n){var r=n(31),o=n(6),i=n(13),a=n(1)("socket.io-client");e.exports=t=c;var s=t.managers={};function c(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,o=r(e),c=o.source,u=o.id,l=o.path,f=s[u]&&l in s[u].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||f?(a("ignoring socket cache for %s",c),n=i(c,t)):(s[u]||(a("new io instance for %s",c),s[u]=i(c,t)),n=s[u]),o.query&&!t.query&&(t.query=o.query),n.socket(o.path,t)}t.protocol=o.protocol,t.connect=c,t.Manager=n(13),t.Socket=n(19)},function(e,t,n){(function(t){var r=n(10),o=n(1)("socket.io-client:url");e.exports=function(e,n){var i=e;n=n||t.location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(o("protocol-less url %s",e),e=void 0!==n?n.protocol+"//"+e:"https://"+e),o("parse %s",e),i=r(e)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";var a=-1!==i.host.indexOf(":")?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+a+":"+i.port,i.href=i.protocol+"://"+a+(n&&n.port===i.port?"":":"+i.port),i}}).call(this,n(0))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,u=[],l=!1,f=-1;function d(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&p())}function p(){if(!l){var e=s(d);l=!0;for(var t=u.length;t;){for(c=u,u=[];++f<t;)c&&c[f].run();f=-1,t=u.length}c=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new h(e,t)),1!==u.length||l||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,o=+new Date,i=o-(n||o);e.diff=i,e.prev=n,e.curr=o,n=o;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=t.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;c++;var o=t.formatters[r];if("function"==typeof o){var i=a[c];n=o.call(e,i),a.splice(c,1),c--}return n}),t.formatArgs.call(e,a),(r.log||t.log||console.log.bind(console)).apply(e,a)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),r.destroy=o,"function"==typeof t.init&&t.init(r),t.instances.push(r),r}function o(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var i=t.instances[n];i.enabled=t.enabled(i.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(34),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t){var n=1e3,r=6e4,o=36e5,i=24*o;function a(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var s=typeof e;if("string"===s&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var a=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*o;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(e);if("number"===s&&!1===isNaN(e))return t.long?function(e){return a(e,i,"day")||a(e,o,"hour")||a(e,r,"minute")||a(e,n,"second")||e+" ms"}(e):function(e){return e>=i?Math.round(e/i)+"d":e>=o?Math.round(e/o)+"h":e>=r?Math.round(e/r)+"m":e>=n?Math.round(e/n)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){(function(e){var r=n(11),o=n(12),i=Object.prototype.toString,a="function"==typeof e.Blob||"[object BlobConstructor]"===i.call(e.Blob),s="function"==typeof e.File||"[object FileConstructor]"===i.call(e.File);t.deconstructPacket=function(e){var t=[],n=e.data,i=e;return i.data=function e(t,n){if(!t)return t;if(o(t)){var i={_placeholder:!0,num:n.length};return n.push(t),i}if(r(t)){for(var a=new Array(t.length),s=0;s<t.length;s++)a[s]=e(t[s],n);return a}if("object"==typeof t&&!(t instanceof Date)){var a={};for(var c in t)a[c]=e(t[c],n);return a}return t}(n,t),i.attachments=t.length,{packet:i,buffers:t}},t.reconstructPacket=function(e,t){return e.data=function e(t,n){if(!t)return t;if(t&&t._placeholder)return n[t.num];if(r(t))for(var o=0;o<t.length;o++)t[o]=e(t[o],n);else if("object"==typeof t)for(var i in t)t[i]=e(t[i],n);return t}(e.data,t),e.attachments=void 0,e},t.removeBlobs=function(e,t){var n=0,i=e;!function e(c,u,l){if(!c)return c;if(a&&c instanceof Blob||s&&c instanceof File){n++;var f=new FileReader;f.onload=function(){l?l[u]=this.result:i=this.result,--n||t(i)},f.readAsArrayBuffer(c)}else if(r(c))for(var d=0;d<c.length;d++)e(c[d],d,c);else if("object"==typeof c&&!o(c))for(var p in c)e(c[p],p,c)}(i),n||t(i)}}).call(this,n(0))},function(e,t,n){e.exports=n(37),e.exports.parser=n(3)},function(e,t,n){(function(t){var r=n(14),o=n(2),i=n(1)("engine.io-client:socket"),a=n(18),s=n(3),c=n(10),u=n(4);function l(e,n){if(!(this instanceof l))return new l(e,n);n=n||{},e&&"object"==typeof e&&(n=e,e=null),e?(e=c(e),n.hostname=e.host,n.secure="https"===e.protocol||"wss"===e.protocol,n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=c(n.host).host),this.secure=null!=n.secure?n.secure:t.location&&"https:"===location.protocol,n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.agent=n.agent||!1,this.hostname=n.hostname||(t.location?location.hostname:"localhost"),this.port=n.port||(t.location&&location.port?location.port:this.secure?443:80),this.query=n.query||{},"string"==typeof this.query&&(this.query=u.decode(this.query)),this.upgrade=!1!==n.upgrade,this.path=(n.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!n.forceJSONP,this.jsonp=!1!==n.jsonp,this.forceBase64=!!n.forceBase64,this.enablesXDR=!!n.enablesXDR,this.timestampParam=n.timestampParam||"t",this.timestampRequests=n.timestampRequests,this.transports=n.transports||["polling","websocket"],this.transportOptions=n.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=n.policyPort||843,this.rememberUpgrade=n.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=n.onlyBinaryUpgrades,this.perMessageDeflate=!1!==n.perMessageDeflate&&(n.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=n.pfx||null,this.key=n.key||null,this.passphrase=n.passphrase||null,this.cert=n.cert||null,this.ca=n.ca||null,this.ciphers=n.ciphers||null,this.rejectUnauthorized=void 0===n.rejectUnauthorized||n.rejectUnauthorized,this.forceNode=!!n.forceNode;var r="object"==typeof t&&t;r.global===r&&(n.extraHeaders&&Object.keys(n.extraHeaders).length>0&&(this.extraHeaders=n.extraHeaders),n.localAddress&&(this.localAddress=n.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}e.exports=l,l.priorWebsocketSuccess=!1,o(l.prototype),l.protocol=s.protocol,l.Socket=l,l.Transport=n(8),l.transports=n(14),l.parser=n(3),l.prototype.createTransport=function(e){i('creating transport "%s"',e);var t=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(this.query);t.EIO=s.protocol,t.transport=e;var n=this.transportOptions[e]||{};return this.id&&(t.sid=this.id),new r[e]({query:t,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0})},l.prototype.open=function(){var e;if(this.rememberUpgrade&&l.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout(function(){t.emit("error","No transports available")},0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},l.prototype.setTransport=function(e){i("setting transport %s",e.name);var t=this;this.transport&&(i("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(e){t.onPacket(e)}).on("error",function(e){t.onError(e)}).on("close",function(){t.onClose("transport close")})},l.prototype.probe=function(e){i('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),n=!1,r=this;function o(){if(r.onlyBinaryUpgrades){var o=!this.supportsBinary&&r.transport.supportsBinary;n=n||o}n||(i('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",function(o){if(!n)if("pong"===o.type&&"probe"===o.data){if(i('probe transport "%s" pong',e),r.upgrading=!0,r.emit("upgrading",t),!t)return;l.priorWebsocketSuccess="websocket"===t.name,i('pausing current transport "%s"',r.transport.name),r.transport.pause(function(){n||"closed"!==r.readyState&&(i("changing transport and sending upgrade packet"),d(),r.setTransport(t),t.send([{type:"upgrade"}]),r.emit("upgrade",t),t=null,r.upgrading=!1,r.flush())})}else{i('probe transport "%s" failed',e);var a=new Error("probe error");a.transport=t.name,r.emit("upgradeError",a)}}))}function a(){n||(n=!0,d(),t.close(),t=null)}function s(n){var o=new Error("probe error: "+n);o.transport=t.name,a(),i('probe transport "%s" failed because of error: %s',e,n),r.emit("upgradeError",o)}function c(){s("transport closed")}function u(){s("socket closed")}function f(e){t&&e.name!==t.name&&(i('"%s" works - aborting "%s"',e.name,t.name),a())}function d(){t.removeListener("open",o),t.removeListener("error",s),t.removeListener("close",c),r.removeListener("close",u),r.removeListener("upgrading",f)}l.priorWebsocketSuccess=!1,t.once("open",o),t.once("error",s),t.once("close",c),this.once("close",u),this.once("upgrading",f),t.open()},l.prototype.onOpen=function(){if(i("socket open"),this.readyState="open",l.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){i("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},l.prototype.onPacket=function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(i('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else i('packet received with socket readyState "%s"',this.readyState)},l.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},l.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){"closed"!==t.readyState&&t.onClose("ping timeout")},e||t.pingInterval+t.pingTimeout)},l.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout(function(){i("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)},e.pingInterval)},l.prototype.ping=function(){var e=this;this.sendPacket("ping",function(){e.emit("ping")})},l.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},l.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(i("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},l.prototype.write=l.prototype.send=function(e,t,n){return this.sendPacket("message",e,t,n),this},l.prototype.sendPacket=function(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var o={type:e,data:t,options:n};this.emit("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}},l.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var e=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?r():t()}):this.upgrading?r():t()}function t(){e.onClose("forced close"),i("socket closing - telling transport to close"),e.transport.close()}function n(){e.removeListener("upgrade",n),e.removeListener("upgradeError",n),t()}function r(){e.once("upgrade",n),e.once("upgradeError",n)}return this},l.prototype.onError=function(e){i("socket error %j",e),l.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},l.prototype.onClose=function(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(i('socket close with reason: "%s"',e),clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)},l.prototype.filterUpgrades=function(e){for(var t=[],n=0,r=e.length;n<r;n++)~a(this.transports,e[n])&&t.push(e[n]);return t}}).call(this,n(0))},function(e,t){try{e.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){e.exports=!1}},function(e,t,n){(function(t){var r=n(7),o=n(15),i=n(2),a=n(5),s=n(1)("engine.io-client:polling-xhr");function c(){}function u(e){if(o.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,t.location){var n="https:"===location.protocol,r=location.port;r||(r=n?443:80),this.xd=e.hostname!==t.location.hostname||r!==e.port,this.xs=e.secure!==n}}function l(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}function f(){for(var e in l.requests)l.requests.hasOwnProperty(e)&&l.requests[e].abort()}e.exports=u,e.exports.Request=l,a(u,o),u.prototype.supportsBinary=!0,u.prototype.request=function(e){return(e=e||{}).uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new l(e)},u.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,r=this.request({method:"POST",data:e,isBinary:n}),o=this;r.on("success",t),r.on("error",function(e){o.onError("xhr post error",e)}),this.sendXhr=r},u.prototype.doPoll=function(){s("xhr poll");var e=this.request(),t=this;e.on("data",function(e){t.onData(e)}),e.on("error",function(e){t.onError("xhr poll error",e)}),this.pollXhr=e},i(l.prototype),l.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var n=this.xhr=new r(e),o=this;try{s("xhr open %s: %s",this.method,this.uri),n.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var i in n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this.extraHeaders[i])}catch(e){}if("POST"===this.method)try{this.isBinary?n.setRequestHeader("Content-type","application/octet-stream"):n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{n.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in n&&(n.withCredentials=!0),this.requestTimeout&&(n.timeout=this.requestTimeout),this.hasXDR()?(n.onload=function(){o.onLoad()},n.onerror=function(){o.onError(n.responseText)}):n.onreadystatechange=function(){if(2===n.readyState)try{var e=n.getResponseHeader("Content-Type");o.supportsBinary&&"application/octet-stream"===e&&(n.responseType="arraybuffer")}catch(e){}4===n.readyState&&(200===n.status||1223===n.status?o.onLoad():setTimeout(function(){o.onError(n.status)},0))},s("xhr data %s",this.data),n.send(this.data)}catch(e){return void setTimeout(function(){o.onError(e)},0)}t.document&&(this.index=l.requestsCount++,l.requests[this.index]=this)},l.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},l.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},l.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},l.prototype.cleanup=function(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=c:this.xhr.onreadystatechange=c,e)try{this.xhr.abort()}catch(e){}t.document&&delete l.requests[this.index],this.xhr=null}},l.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch(e){}e="application/octet-stream"===t&&this.xhr.response||this.xhr.responseText}catch(e){this.onError(e)}null!=e&&this.onData(e)},l.prototype.hasXDR=function(){return void 0!==t.XDomainRequest&&!this.xs&&this.enablesXDR},l.prototype.abort=function(){this.cleanup()},l.requestsCount=0,l.requests={},t.document&&(t.attachEvent?t.attachEvent("onunload",f):t.addEventListener&&t.addEventListener("beforeunload",f,!1))}).call(this,n(0))},function(e,t){e.exports=Object.keys||function(e){var t=[],n=Object.prototype.hasOwnProperty;for(var r in e)n.call(e,r)&&t.push(r);return t}},function(e,t,n){"use strict";(function(e){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
var r=n(42),o=n(43),i=n(44);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return u(this,e,t,n)}function u(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=d(e,t),e}(e,t,n,r):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n),o=(e=s(e,r)).write(t,n);return o!==r&&(e=e.slice(0,o)),e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|p(t.length);return 0===(e=s(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||function(e){return e!=e}(t.length)?s(e,0):d(e,t);if("Buffer"===t.type&&i(t.data))return d(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=s(e,t<0?0:0|p(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|p(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,o){var i,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;i<s;i++)if(u(e,i)===u(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===c)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(n+c>s&&(n=s-c),i=n;i>=0;i--){for(var f=!0,d=0;d<c;d++)if(u(e,i+d)!==u(t,d)){f=!1;break}if(f)return i}return-1}function v(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function b(e,t,n,r){return H(F(t,e.length-n),e,n,r)}function w(e,t,n,r){return H(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function C(e,t,n,r){return w(e,t,n,r)}function E(e,t,n,r){return H(U(t),e,n,r)}function k(e,t,n,r){return H(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function T(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,s,c,u=e[o],l=null,f=u>239?4:u>223?3:u>191?2:1;if(o+f<=n)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(c=(15&u)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=x));return n}(r)}t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return u(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return f(null,e)},c.allocUnsafeSlow=function(e){return f(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=c.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},c.byteLength=h,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?T(this,0,e):function(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return _(this,t,n);case"latin1":case"binary":return S(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,r,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,o>>>=0,this===e)return 0;for(var i=o-r,a=n-t,s=Math.min(i,a),u=this.slice(r,o),l=e.slice(t,n),f=0;f<s;++f)if(u[f]!==l[f]){i=u[f],a=l[f];break}return i<a?-1:a<i?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return g(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return g(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return C(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function _(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function S(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function B(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=j(e[i]);return o}function L(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function O(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function P(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function I(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,r,i){return i||I(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function q(e,t,n,r,i){return i||I(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if(e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=c.prototype;else{var o=t-e;n=new c(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||M(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||M(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):P(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):P(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);M(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);M(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):P(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):P(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return q(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return q(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var a=c.isBuffer(e)?e:F(new c(e,r).toString()),s=a.length;for(i=0;i<n-t;++i)this[i+t]=a[i%s]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function j(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function U(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(0))},function(e,t,n){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){for(var t,n=u(e),r=n[0],a=n[1],s=new i(NaN),c=0,l=a>0?r-4:r,f=0;f<l;f+=4)t=o[e.charCodeAt(f)]<<18|o[e.charCodeAt(f+1)]<<12|o[e.charCodeAt(f+2)]<<6|o[e.charCodeAt(f+3)],s[c++]=t>>16&255,s[c++]=t>>8&255,s[c++]=255&t;return 2===a&&(t=o[e.charCodeAt(f)]<<2|o[e.charCodeAt(f+1)]>>4,s[c++]=255&t),1===a&&(t=o[e.charCodeAt(f)]<<10|o[e.charCodeAt(f+1)]<<4|o[e.charCodeAt(f+2)]>>2,s[c++]=t>>8&255,s[c++]=255&t),s},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;a<s;a+=16383)i.push(f(e,a,a+16383>s?s:a+16383));return 1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=a.length;s<c;++s)r[s]=a[s],o[a.charCodeAt(s)]=s;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function f(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(l(r));return o.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<<s)-1,u=c>>1,l=-7,f=n?o-1:0,d=n?-1:1,p=e[t+f];for(f+=d,i=p&(1<<-l)-1,p>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=d,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=u}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1<<u)-1,f=l>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?d/c:d*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&s,p+=h,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;e[n+p]=255&a,p+=h,a/=256,u-=8);e[n+p-h]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){e.exports=function(e,t,n){var r=e.byteLength;if(t=t||0,n=n||r,e.slice)return e.slice(t,n);if(t<0&&(t+=r),n<0&&(n+=r),n>r&&(n=r),t>=r||t>=n||0===r)return new ArrayBuffer(0);for(var o=new Uint8Array(e),i=new Uint8Array(n-t),a=t,s=0;a<n;a++,s++)i[s]=o[a];return i.buffer}},function(e,t){function n(){}e.exports=function(e,t,r){var o=!1;return r=r||n,i.count=e,0===e?t():i;function i(e,n){if(i.count<=0)throw new Error("after called too many times");--i.count,e?(o=!0,t(e),t=r):0!==i.count||o||t(null,n)}}},function(e,t){
/*! https://mths.be/utf8js v2.1.2 by @mathias */
var n,r,o,i=String.fromCharCode;function a(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function s(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function c(e,t){return i(e>>t&63|128)}function u(e,t){if(0==(4294967168&e))return i(e);var n="";return 0==(4294965248&e)?n=i(e>>6&31|192):0==(4294901760&e)?(s(e,t)||(e=65533),n=i(e>>12&15|224),n+=c(e,6)):0==(4292870144&e)&&(n=i(e>>18&7|240),n+=c(e,12),n+=c(e,6)),n+=i(63&e|128)}function l(){if(o>=r)throw Error("Invalid byte index");var e=255&n[o];if(o++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function f(e){var t,i;if(o>r)throw Error("Invalid byte index");if(o==r)return!1;if(t=255&n[o],o++,0==(128&t))return t;if(192==(224&t)){if((i=(31&t)<<6|l())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&t)){if((i=(15&t)<<12|l()<<6|l())>=2048)return s(i,e)?i:65533;throw Error("Invalid continuation byte")}if(240==(248&t)&&(i=(7&t)<<18|l()<<12|l()<<6|l())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.exports={version:"2.1.2",encode:function(e,t){for(var n=!1!==(t=t||{}).strict,r=a(e),o=r.length,i=-1,s="";++i<o;)s+=u(r[i],n);return s},decode:function(e,t){var s=!1!==(t=t||{}).strict;n=a(e),r=n.length,o=0;for(var c,u=[];!1!==(c=f(s));)u.push(c);return function(e){for(var t,n=e.length,r=-1,o="";++r<n;)(t=e[r])>65535&&(o+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=i(t);return o}(u)}}},function(e,t){!function(){"use strict";for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),r=0;r<e.length;r++)n[e.charCodeAt(r)]=r;t.encode=function(t){var n,r=new Uint8Array(t),o=r.length,i="";for(n=0;n<o;n+=3)i+=e[r[n]>>2],i+=e[(3&r[n])<<4|r[n+1]>>4],i+=e[(15&r[n+1])<<2|r[n+2]>>6],i+=e[63&r[n+2]];return o%3==2?i=i.substring(0,i.length-1)+"=":o%3==1&&(i=i.substring(0,i.length-2)+"=="),i},t.decode=function(e){var t,r,o,i,a,s=.75*e.length,c=e.length,u=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var l=new ArrayBuffer(s),f=new Uint8Array(l);for(t=0;t<c;t+=4)r=n[e.charCodeAt(t)],o=n[e.charCodeAt(t+1)],i=n[e.charCodeAt(t+2)],a=n[e.charCodeAt(t+3)],f[u++]=r<<2|o>>4,f[u++]=(15&o)<<4|i>>2,f[u++]=(3&i)<<6|63&a;return l}}()},function(e,t){var n=void 0!==n?n:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,r=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),o=r&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),i=n&&n.prototype.append&&n.prototype.getBlob;function a(e){return e.map(function(e){if(e.buffer instanceof ArrayBuffer){var t=e.buffer;if(e.byteLength!==t.byteLength){var n=new Uint8Array(e.byteLength);n.set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=n.buffer}return t}return e})}function s(e,t){t=t||{};var r=new n;return a(e).forEach(function(e){r.append(e)}),t.type?r.getBlob(t.type):r.getBlob()}function c(e,t){return new Blob(a(e),t||{})}"undefined"!=typeof Blob&&(s.prototype=Blob.prototype,c.prototype=Blob.prototype),e.exports=r?o?Blob:c:i?s:void 0},function(e,t,n){(function(t){var r=n(15),o=n(5);e.exports=u;var i,a=/\n/g,s=/\\n/g;function c(){}function u(e){r.call(this,e),this.query=this.query||{},i||(t.___eio||(t.___eio=[]),i=t.___eio),this.index=i.length;var n=this;i.push(function(e){n.onData(e)}),this.query.j=this.index,t.document&&t.addEventListener&&t.addEventListener("beforeunload",function(){n.script&&(n.script.onerror=c)},!1)}o(u,r),u.prototype.supportsBinary=!1,u.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),r.prototype.doClose.call(this)},u.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(t,n):(document.head||document.body).appendChild(t),this.script=t,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout(function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)},100)},u.prototype.doWrite=function(e,t){var n=this;if(!this.form){var r,o=document.createElement("form"),i=document.createElement("textarea"),c=this.iframeId="eio_iframe_"+this.index;o.className="socketio",o.style.position="absolute",o.style.top="-1000px",o.style.left="-1000px",o.target=c,o.method="POST",o.setAttribute("accept-charset","utf-8"),i.name="d",o.appendChild(i),document.body.appendChild(o),this.form=o,this.area=i}function u(){l(),t()}function l(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(e){n.onError("jsonp polling iframe removal error",e)}try{var e='<iframe src="javascript:0" name="'+n.iframeId+'">';r=document.createElement(e)}catch(e){(r=document.createElement("iframe")).name=n.iframeId,r.src="javascript:0"}r.id=n.iframeId,n.form.appendChild(r),n.iframe=r}this.form.action=this.uri(),l(),e=e.replace(s,"\\\n"),this.area.value=e.replace(a,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===n.iframe.readyState&&u()}:this.iframe.onload=u}}).call(this,n(0))},function(e,t,n){(function(t){var r,o=n(8),i=n(3),a=n(4),s=n(5),c=n(17),u=n(1)("engine.io-client:websocket"),l=t.WebSocket||t.MozWebSocket;if("undefined"==typeof window)try{r=n(53)}catch(e){}var f=l;function d(e){e&&e.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=l&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(f=r),o.call(this,e)}f||"undefined"!=typeof window||(f=r),e.exports=d,s(d,o),d.prototype.name="websocket",d.prototype.supportsBinary=!0,d.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,n={agent:this.agent,perMessageDeflate:this.perMessageDeflate};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket?t?new f(e,t):new f(e):new f(e,t,n)}catch(e){return this.emit("error",e)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},d.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},d.prototype.write=function(e){var n=this;this.writable=!1;for(var r=e.length,o=0,a=r;o<a;o++)!function(e){i.encodePacket(e,n.supportsBinary,function(o){if(!n.usingBrowserWebSocket){var i={};e.options&&(i.compress=e.options.compress),n.perMessageDeflate&&("string"==typeof o?t.Buffer.byteLength(o):o.length)<n.perMessageDeflate.threshold&&(i.compress=!1)}try{n.usingBrowserWebSocket?n.ws.send(o):n.ws.send(o,i)}catch(e){u("websocket closed before onclose event")}--r||(n.emit("flush"),setTimeout(function(){n.writable=!0,n.emit("drain")},0))})}(e[o])},d.prototype.onClose=function(){o.prototype.onClose.call(this)},d.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},d.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",n="";return this.port&&("wss"===t&&443!==Number(this.port)||"ws"===t&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=c()),this.supportsBinary||(e.b64=1),(e=a.encode(e)).length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e},d.prototype.check=function(){return!(!f||"__initialize"in f&&this.name===d.prototype.name)}}).call(this,n(0))},function(e,t){},function(e,t){e.exports=function(e,t){for(var n=[],r=(t=t||0)||0;r<e.length;r++)n[r-t]=e[r];return n}},function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o={emitDelay:10,strictMode:!1},i=function(){function e(){var t=arguments.length<=0||void 0===arguments[0]?o:arguments[0];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=void 0,r=void 0;n=t.hasOwnProperty("emitDelay")?t.emitDelay:o.emitDelay,this._emitDelay=n,r=t.hasOwnProperty("strictMode")?t.strictMode:o.strictMode,this._strictMode=r,this._listeners={},this.events=[]}return r(e,[{key:"_addListenner",value:function(e,t,n){if("function"!=typeof t)throw TypeError("listener must be a function");-1===this.events.indexOf(e)?(this._listeners[e]=[{once:n,fn:t}],this.events.push(e)):this._listeners[e].push({once:n,fn:t})}},{key:"on",value:function(e,t){this._addListenner(e,t,!1)}},{key:"once",value:function(e,t){this._addListenner(e,t,!0)}},{key:"off",value:function(e,t){var n=this,r=this.events.indexOf(e);e&&-1!==r&&(t?function(){var o=[],i=n._listeners[e];i.forEach(function(e,n){e.fn===t&&o.unshift(n)}),o.forEach(function(e){i.splice(e,1)}),i.length||(n.events.splice(r,1),delete n._listeners[e])}():(delete this._listeners[e],this.events.splice(r,1)))}},{key:"_applyEvents",value:function(e,t){var n=this._listeners[e];if(n&&n.length){var r=[];n.forEach(function(e,n){e.fn.apply(null,t),e.once&&r.unshift(n)}),r.forEach(function(e){n.splice(e,1)})}else if(this._strictMode)throw"No listeners specified for event: "+e}},{key:"emit",value:function(e){for(var t=this,n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this._emitDelay?setTimeout(function(){t._applyEvents.call(t,e,r)},this._emitDelay):this._applyEvents(e,r)}},{key:"emitSync",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this._applyEvents(e,n)}},{key:"destroy",value:function(){this._listeners={},this.events=[]}}]),e}();e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.id=e||this.getURL()}return e.prototype.getURL=function(){return document.location.host+document.location.pathname},e.prototype.toJSON=function(){return String(this.id)},e.prototype.toString=function(){return String(this.id)},e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.make=function(e,t,n){var r,o=document.createElement(e);for(var i in t&&(Array.isArray(t)?(r=o.classList).add.apply(r,t):o.classList.add(t)),n)n.hasOwnProperty(i)&&(o[i]=n[i]);return o},e.isElementVisible=function(e){var t=e.getBoundingClientRect();return t.top<window.innerHeight&&t.bottom>=0},e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.getRandomValue=function(){return window.crypto.getRandomValues(new Uint32Array(1))[0]},e.debounce=function(e,t,n){var r;return void 0===n&&(n=!1),function(){var o=this,i=arguments;n&&!r&&e.apply(o,i),clearTimeout(r),r=setTimeout(function(){r=null,n||e.apply(o,i)},t)}},e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.getInt=function(t){var n=parseInt(e.getItem(t),10);return isNaN(n)?void 0:n},e.getItem=function(e){return localStorage.getItem(e.toString())||void 0},e.setItem=function(e,t){localStorage.setItem(e.toString(),String(t))},e.removeItem=function(e){localStorage.removeItem(e.toString())},e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(62),o=function(){function e(){}return e.getFingerprint=function(){return new Promise(function(e,t){r.get(function(t){var n=t.map(function(e){return e.value}),o=r.x64hash128(n.join(""),31);e(o)})})},e}();t.default=o},function(e,t,n){var r,o;!function(i,a,s){"use strict";"undefined"!=typeof window&&n(63)?void 0===(o="function"==typeof(r=s)?r.call(t,n,t,e):r)||(e.exports=o):e.exports?e.exports=s():a.exports?a.exports=s():a.Fingerprint2=s()}(0,this,function(){"use strict";var e=function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]+t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]+t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]+t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]+t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]},t=function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]*t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]*t[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=e[3]*t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]*t[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[2]*t[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[3]*t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]},n=function(e,t){return 32==(t%=64)?[e[1],e[0]]:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t|e[0]>>>32-t]:(t-=32,[e[1]<<t|e[0]>>>32-t,e[0]<<t|e[1]>>>32-t])},r=function(e,t){return 0==(t%=64)?e:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t]:[e[1]<<t-32,0]},o=function(e,t){return[e[0]^t[0],e[1]^t[1]]},i=function(e){return e=o(e,[0,e[0]>>>1]),e=t(e,[4283543511,3981806797]),e=o(e,[0,e[0]>>>1]),e=t(e,[3301882366,444984403]),e=o(e,[0,e[0]>>>1])},a=function(a,s){a=a||"",s=s||0;for(var c=a.length%16,u=a.length-c,l=[0,s],f=[0,s],d=[0,0],p=[0,0],h=[2277735313,289559509],m=[1291169091,658871167],g=0;g<u;g+=16)d=[255&a.charCodeAt(g+4)|(255&a.charCodeAt(g+5))<<8|(255&a.charCodeAt(g+6))<<16|(255&a.charCodeAt(g+7))<<24,255&a.charCodeAt(g)|(255&a.charCodeAt(g+1))<<8|(255&a.charCodeAt(g+2))<<16|(255&a.charCodeAt(g+3))<<24],p=[255&a.charCodeAt(g+12)|(255&a.charCodeAt(g+13))<<8|(255&a.charCodeAt(g+14))<<16|(255&a.charCodeAt(g+15))<<24,255&a.charCodeAt(g+8)|(255&a.charCodeAt(g+9))<<8|(255&a.charCodeAt(g+10))<<16|(255&a.charCodeAt(g+11))<<24],d=t(d,h),d=n(d,31),d=t(d,m),l=o(l,d),l=n(l,27),l=e(l,f),l=e(t(l,[0,5]),[0,1390208809]),p=t(p,m),p=n(p,33),p=t(p,h),f=o(f,p),f=n(f,31),f=e(f,l),f=e(t(f,[0,5]),[0,944331445]);switch(d=[0,0],p=[0,0],c){case 15:p=o(p,r([0,a.charCodeAt(g+14)],48));case 14:p=o(p,r([0,a.charCodeAt(g+13)],40));case 13:p=o(p,r([0,a.charCodeAt(g+12)],32));case 12:p=o(p,r([0,a.charCodeAt(g+11)],24));case 11:p=o(p,r([0,a.charCodeAt(g+10)],16));case 10:p=o(p,r([0,a.charCodeAt(g+9)],8));case 9:p=o(p,[0,a.charCodeAt(g+8)]),p=t(p,m),p=n(p,33),p=t(p,h),f=o(f,p);case 8:d=o(d,r([0,a.charCodeAt(g+7)],56));case 7:d=o(d,r([0,a.charCodeAt(g+6)],48));case 6:d=o(d,r([0,a.charCodeAt(g+5)],40));case 5:d=o(d,r([0,a.charCodeAt(g+4)],32));case 4:d=o(d,r([0,a.charCodeAt(g+3)],24));case 3:d=o(d,r([0,a.charCodeAt(g+2)],16));case 2:d=o(d,r([0,a.charCodeAt(g+1)],8));case 1:d=o(d,[0,a.charCodeAt(g)]),d=t(d,h),d=n(d,31),d=t(d,m),l=o(l,d)}return l=o(l,[0,a.length]),f=o(f,[0,a.length]),l=e(l,f),f=e(f,l),l=i(l),f=i(f),l=e(l,f),f=e(f,l),("00000000"+(l[0]>>>0).toString(16)).slice(-8)+("00000000"+(l[1]>>>0).toString(16)).slice(-8)+("00000000"+(f[0]>>>0).toString(16)).slice(-8)+("00000000"+(f[1]>>>0).toString(16)).slice(-8)},s={preprocessor:null,audio:{timeout:1e3,excludeIOS11:!0},fonts:{swfContainerId:"fingerprintjs2",swfPath:"flash/compiled/FontList.swf",userDefinedFonts:[],extendedJsFonts:!1},screen:{detectScreenOrientation:!0},plugins:{sortPluginsFor:[/palemoon/i],excludeIE:!1},extraComponents:[],excludes:{enumerateDevices:!0,pixelRatio:!0,doNotTrack:!0,fontsFlash:!0},NOT_AVAILABLE:"not available",ERROR:"error",EXCLUDED:"excluded"},c=function(e,t){if(Array.prototype.forEach&&e.forEach===Array.prototype.forEach)e.forEach(t);else if(e.length===+e.length)for(var n=0,r=e.length;n<r;n++)t(e[n],n,e);else for(var o in e)e.hasOwnProperty(o)&&t(e[o],o,e)},u=function(e,t){var n=[];return null==e?n:Array.prototype.map&&e.map===Array.prototype.map?e.map(t):(c(e,function(e,r,o){n.push(t(e,r,o))}),n)},l=function(e){if(null==navigator.plugins)return e.NOT_AVAILABLE;for(var t=[],n=0,r=navigator.plugins.length;n<r;n++)navigator.plugins[n]&&t.push(navigator.plugins[n]);return f(e)&&(t=t.sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0})),u(t,function(e){var t=u(e,function(e){return[e.type,e.suffixes]});return[e.name,e.description,t]})},f=function(e){for(var t=!1,n=0,r=e.plugins.sortPluginsFor.length;n<r;n++){var o=e.plugins.sortPluginsFor[n];if(navigator.userAgent.match(o)){t=!0;break}}return t},d=function(){var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))},p=function(){if(!d())return!1;var e=h();return!!window.WebGLRenderingContext&&!!e},h=function(){var e=document.createElement("canvas"),t=null;try{t=e.getContext("webgl")||e.getContext("experimental-webgl")}catch(e){}return t||(t=null),t},m=[{key:"userAgent",getData:function(e){e(navigator.userAgent)}},{key:"language",getData:function(e,t){e(navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||t.NOT_AVAILABLE)}},{key:"colorDepth",getData:function(e,t){e(window.screen.colorDepth||t.NOT_AVAILABLE)}},{key:"deviceMemory",getData:function(e,t){e(navigator.deviceMemory||t.NOT_AVAILABLE)}},{key:"pixelRatio",getData:function(e,t){e(window.devicePixelRatio||t.NOT_AVAILABLE)}},{key:"hardwareConcurrency",getData:function(e,t){e(function(e){return navigator.hardwareConcurrency?navigator.hardwareConcurrency:e.NOT_AVAILABLE}(t))}},{key:"screenResolution",getData:function(e,t){e(function(e){var t=[window.screen.width,window.screen.height];return e.screen.detectScreenOrientation&&t.sort().reverse(),t}(t))}},{key:"availableScreenResolution",getData:function(e,t){e(function(e){if(window.screen.availWidth&&window.screen.availHeight){var t=[window.screen.availHeight,window.screen.availWidth];return e.screen.detectScreenOrientation&&t.sort().reverse(),t}return e.NOT_AVAILABLE}(t))}},{key:"timezoneOffset",getData:function(e){e((new Date).getTimezoneOffset())}},{key:"timezone",getData:function(e,t){window.Intl&&window.Intl.DateTimeFormat?e((new window.Intl.DateTimeFormat).resolvedOptions().timeZone):e(t.NOT_AVAILABLE)}},{key:"sessionStorage",getData:function(e,t){e(function(e){try{return!!window.sessionStorage}catch(t){return e.ERROR}}(t))}},{key:"localStorage",getData:function(e,t){e(function(e){try{return!!window.localStorage}catch(t){return e.ERROR}}(t))}},{key:"indexedDb",getData:function(e,t){e(function(e){try{return!!window.indexedDB}catch(t){return e.ERROR}}(t))}},{key:"addBehavior",getData:function(e){e(!(!document.body||!document.body.addBehavior))}},{key:"openDatabase",getData:function(e){e(!!window.openDatabase)}},{key:"cpuClass",getData:function(e,t){e(function(e){return navigator.cpuClass||e.NOT_AVAILABLE}(t))}},{key:"platform",getData:function(e,t){e(function(e){return navigator.platform?navigator.platform:e.NOT_AVAILABLE}(t))}},{key:"doNotTrack",getData:function(e,t){e(function(e){return navigator.doNotTrack?navigator.doNotTrack:navigator.msDoNotTrack?navigator.msDoNotTrack:window.doNotTrack?window.doNotTrack:e.NOT_AVAILABLE}(t))}},{key:"plugins",getData:function(e,t){"Microsoft Internet Explorer"===navigator.appName||"Netscape"===navigator.appName&&/Trident/.test(navigator.userAgent)?t.plugins.excludeIE?e(t.EXCLUDED):e(function(e){var t=[];return Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(window,"ActiveXObject")||"ActiveXObject"in window?t=u(["AcroPDF.PDF","Adodb.Stream","AgControl.AgControl","DevalVRXCtrl.DevalVRXCtrl.1","MacromediaFlashPaper.MacromediaFlashPaper","Msxml2.DOMDocument","Msxml2.XMLHTTP","PDF.PdfCtrl","QuickTime.QuickTime","QuickTimeCheckObject.QuickTimeCheck.1","RealPlayer","RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)","RealVideo.RealVideo(tm) ActiveX Control (32-bit)","Scripting.Dictionary","SWCtl.SWCtl","Shell.UIHelper","ShockwaveFlash.ShockwaveFlash","Skype.Detection","TDCCtl.TDCCtl","WMPlayer.OCX","rmocx.RealPlayer G2 Control","rmocx.RealPlayer G2 Control.1"],function(t){try{return new window.ActiveXObject(t),t}catch(t){return e.ERROR}}):t.push(e.NOT_AVAILABLE),navigator.plugins&&(t=t.concat(l(e))),t}(t)):e(l(t))}},{key:"canvas",getData:function(e,t){d()?e(function(e){var t=[],n=document.createElement("canvas");n.width=2e3,n.height=200,n.style.display="inline";var r=n.getContext("2d");return r.rect(0,0,10,10),r.rect(2,2,6,6),t.push("canvas winding:"+(!1===r.isPointInPath(5,5,"evenodd")?"yes":"no")),r.textBaseline="alphabetic",r.fillStyle="#f60",r.fillRect(125,1,62,20),r.fillStyle="#069",e.dontUseFakeFontInCanvas?r.font="11pt Arial":r.font="11pt no-real-font-123",r.fillText("Cwm fjordbank glyphs vext quiz, 😃",2,15),r.fillStyle="rgba(102, 204, 0, 0.2)",r.font="18pt Arial",r.fillText("Cwm fjordbank glyphs vext quiz, 😃",4,45),r.globalCompositeOperation="multiply",r.fillStyle="rgb(255,0,255)",r.beginPath(),r.arc(50,50,50,0,2*Math.PI,!0),r.closePath(),r.fill(),r.fillStyle="rgb(0,255,255)",r.beginPath(),r.arc(100,50,50,0,2*Math.PI,!0),r.closePath(),r.fill(),r.fillStyle="rgb(255,255,0)",r.beginPath(),r.arc(75,100,50,0,2*Math.PI,!0),r.closePath(),r.fill(),r.fillStyle="rgb(255,0,255)",r.arc(75,75,75,0,2*Math.PI,!0),r.arc(75,75,25,0,2*Math.PI,!0),r.fill("evenodd"),n.toDataURL&&t.push("canvas fp:"+n.toDataURL()),t}(t)):e(t.NOT_AVAILABLE)}},{key:"webgl",getData:function(e,t){p()?e(function(){var e,t=function(t){return e.clearColor(0,0,0,1),e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),"["+t[0]+", "+t[1]+"]"};if(!(e=h()))return null;var n=[],r=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,r);var o=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.732134444,0]);e.bufferData(e.ARRAY_BUFFER,o,e.STATIC_DRAW),r.itemSize=3,r.numItems=3;var i=e.createProgram(),a=e.createShader(e.VERTEX_SHADER);e.shaderSource(a,"attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}"),e.compileShader(a);var s=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(s,"precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}"),e.compileShader(s),e.attachShader(i,a),e.attachShader(i,s),e.linkProgram(i),e.useProgram(i),i.vertexPosAttrib=e.getAttribLocation(i,"attrVertex"),i.offsetUniform=e.getUniformLocation(i,"uniformOffset"),e.enableVertexAttribArray(i.vertexPosArray),e.vertexAttribPointer(i.vertexPosAttrib,r.itemSize,e.FLOAT,!1,0,0),e.uniform2f(i.offsetUniform,1,1),e.drawArrays(e.TRIANGLE_STRIP,0,r.numItems);try{n.push(e.canvas.toDataURL())}catch(e){}n.push("extensions:"+(e.getSupportedExtensions()||[]).join(";")),n.push("webgl aliased line width range:"+t(e.getParameter(e.ALIASED_LINE_WIDTH_RANGE))),n.push("webgl aliased point size range:"+t(e.getParameter(e.ALIASED_POINT_SIZE_RANGE))),n.push("webgl alpha bits:"+e.getParameter(e.ALPHA_BITS)),n.push("webgl antialiasing:"+(e.getContextAttributes().antialias?"yes":"no")),n.push("webgl blue bits:"+e.getParameter(e.BLUE_BITS)),n.push("webgl depth bits:"+e.getParameter(e.DEPTH_BITS)),n.push("webgl green bits:"+e.getParameter(e.GREEN_BITS)),n.push("webgl max anisotropy:"+function(e){var t=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic");if(t){var n=e.getParameter(t.MAX_TEXTURE_MAX_ANISOTROPY_EXT);return 0===n&&(n=2),n}return null}(e)),n.push("webgl max combined texture image units:"+e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),n.push("webgl max cube map texture size:"+e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE)),n.push("webgl max fragment uniform vectors:"+e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS)),n.push("webgl max render buffer size:"+e.getParameter(e.MAX_RENDERBUFFER_SIZE)),n.push("webgl max texture image units:"+e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),n.push("webgl max texture size:"+e.getParameter(e.MAX_TEXTURE_SIZE)),n.push("webgl max varying vectors:"+e.getParameter(e.MAX_VARYING_VECTORS)),n.push("webgl max vertex attribs:"+e.getParameter(e.MAX_VERTEX_ATTRIBS)),n.push("webgl max vertex texture image units:"+e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS)),n.push("webgl max vertex uniform vectors:"+e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS)),n.push("webgl max viewport dims:"+t(e.getParameter(e.MAX_VIEWPORT_DIMS))),n.push("webgl red bits:"+e.getParameter(e.RED_BITS)),n.push("webgl renderer:"+e.getParameter(e.RENDERER)),n.push("webgl shading language version:"+e.getParameter(e.SHADING_LANGUAGE_VERSION)),n.push("webgl stencil bits:"+e.getParameter(e.STENCIL_BITS)),n.push("webgl vendor:"+e.getParameter(e.VENDOR)),n.push("webgl version:"+e.getParameter(e.VERSION));try{var u=e.getExtension("WEBGL_debug_renderer_info");u&&(n.push("webgl unmasked vendor:"+e.getParameter(u.UNMASKED_VENDOR_WEBGL)),n.push("webgl unmasked renderer:"+e.getParameter(u.UNMASKED_RENDERER_WEBGL)))}catch(e){}return e.getShaderPrecisionFormat?(c(["FLOAT","INT"],function(t){c(["VERTEX","FRAGMENT"],function(r){c(["HIGH","MEDIUM","LOW"],function(o){c(["precision","rangeMin","rangeMax"],function(i){var a=e.getShaderPrecisionFormat(e[r+"_SHADER"],e[o+"_"+t])[i];"precision"!==i&&(i="precision "+i);var s=["webgl ",r.toLowerCase()," shader ",o.toLowerCase()," ",t.toLowerCase()," ",i,":",a].join("");n.push(s)})})})}),n):n}()):e(t.NOT_AVAILABLE)}},{key:"webglVendorAndRenderer",getData:function(e){p()?e(function(){try{var e=h(),t=e.getExtension("WEBGL_debug_renderer_info");return e.getParameter(t.UNMASKED_VENDOR_WEBGL)+"~"+e.getParameter(t.UNMASKED_RENDERER_WEBGL)}catch(e){return null}}()):e()}},{key:"adBlock",getData:function(e){e(function(){var e=document.createElement("div");e.innerHTML=" ",e.className="adsbox";var t=!1;try{document.body.appendChild(e),t=0===document.getElementsByClassName("adsbox")[0].offsetHeight,document.body.removeChild(e)}catch(e){t=!1}return t}())}},{key:"hasLiedLanguages",getData:function(e){e(function(){if(void 0!==navigator.languages)try{if(navigator.languages[0].substr(0,2)!==navigator.language.substr(0,2))return!0}catch(e){return!0}return!1}())}},{key:"hasLiedResolution",getData:function(e){e(window.screen.width<window.screen.availWidth||window.screen.height<window.screen.availHeight)}},{key:"hasLiedOs",getData:function(e){e(function(){var e,t=navigator.userAgent.toLowerCase(),n=navigator.oscpu,r=navigator.platform.toLowerCase();if(e=t.indexOf("windows phone")>=0?"Windows Phone":t.indexOf("win")>=0?"Windows":t.indexOf("android")>=0?"Android":t.indexOf("linux")>=0?"Linux":t.indexOf("iphone")>=0||t.indexOf("ipad")>=0?"iOS":t.indexOf("mac")>=0?"Mac":"Other",("ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)&&"Windows Phone"!==e&&"Android"!==e&&"iOS"!==e&&"Other"!==e)return!0;if(void 0!==n){if((n=n.toLowerCase()).indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e)return!0;if(n.indexOf("linux")>=0&&"Linux"!==e&&"Android"!==e)return!0;if(n.indexOf("mac")>=0&&"Mac"!==e&&"iOS"!==e)return!0;if((-1===n.indexOf("win")&&-1===n.indexOf("linux")&&-1===n.indexOf("mac"))!=("Other"===e))return!0}return r.indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e||(r.indexOf("linux")>=0||r.indexOf("android")>=0||r.indexOf("pike")>=0)&&"Linux"!==e&&"Android"!==e||(r.indexOf("mac")>=0||r.indexOf("ipad")>=0||r.indexOf("ipod")>=0||r.indexOf("iphone")>=0)&&"Mac"!==e&&"iOS"!==e||(-1===r.indexOf("win")&&-1===r.indexOf("linux")&&-1===r.indexOf("mac"))!=("Other"===e)||void 0===navigator.plugins&&"Windows"!==e&&"Windows Phone"!==e}())}},{key:"hasLiedBrowser",getData:function(e){e(function(){var e,t=navigator.userAgent.toLowerCase(),n=navigator.productSub;if(("Chrome"==(e=t.indexOf("firefox")>=0?"Firefox":t.indexOf("opera")>=0||t.indexOf("opr")>=0?"Opera":t.indexOf("chrome")>=0?"Chrome":t.indexOf("safari")>=0?"Safari":t.indexOf("trident")>=0?"Internet Explorer":"Other")||"Safari"===e||"Opera"===e)&&"20030107"!==n)return!0;var r,o=eval.toString().length;if(37===o&&"Safari"!==e&&"Firefox"!==e&&"Other"!==e)return!0;if(39===o&&"Internet Explorer"!==e&&"Other"!==e)return!0;if(33===o&&"Chrome"!==e&&"Opera"!==e&&"Other"!==e)return!0;try{throw"a"}catch(e){try{e.toSource(),r=!0}catch(e){r=!1}}return r&&"Firefox"!==e&&"Other"!==e}())}},{key:"touchSupport",getData:function(e){e(function(){var e,t=0;void 0!==navigator.maxTouchPoints?t=navigator.maxTouchPoints:void 0!==navigator.msMaxTouchPoints&&(t=navigator.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch(t){e=!1}return[t,e,"ontouchstart"in window]}())}},{key:"fonts",getData:function(e,t){var n=["monospace","sans-serif","serif"],r=["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial MT","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Bitstream Vera Sans Mono","Book Antiqua","Bookman Old Style","Calibri","Cambria","Cambria Math","Century","Century Gothic","Century Schoolbook","Comic Sans","Comic Sans MS","Consolas","Courier","Courier New","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","Lucida Bright","Lucida Calligraphy","Lucida Console","Lucida Fax","LUCIDA GRANDE","Lucida Handwriting","Lucida Sans","Lucida Sans Typewriter","Lucida Sans Unicode","Microsoft Sans Serif","Monaco","Monotype Corsiva","MS Gothic","MS Outlook","MS PGothic","MS Reference Sans Serif","MS Sans Serif","MS Serif","MYRIAD","MYRIAD PRO","Palatino","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times","Times New Roman","Times New Roman PS","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3"];t.fonts.extendedJsFonts&&(r=r.concat(["Abadi MT Condensed Light","Academy Engraved LET","ADOBE CASLON PRO","Adobe Garamond","ADOBE GARAMOND PRO","Agency FB","Aharoni","Albertus Extra Bold","Albertus Medium","Algerian","Amazone BT","American Typewriter","American Typewriter Condensed","AmerType Md BT","Andalus","Angsana New","AngsanaUPC","Antique Olive","Aparajita","Apple Chancery","Apple Color Emoji","Apple SD Gothic Neo","Arabic Typesetting","ARCHER","ARNO PRO","Arrus BT","Aurora Cn BT","AvantGarde Bk BT","AvantGarde Md BT","AVENIR","Ayuthaya","Bandy","Bangla Sangam MN","Bank Gothic","BankGothic Md BT","Baskerville","Baskerville Old Face","Batang","BatangChe","Bauer Bodoni","Bauhaus 93","Bazooka","Bell MT","Bembo","Benguiat Bk BT","Berlin Sans FB","Berlin Sans FB Demi","Bernard MT Condensed","BernhardFashion BT","BernhardMod BT","Big Caslon","BinnerD","Blackadder ITC","BlairMdITC TT","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bodoni MT","Bodoni MT Black","Bodoni MT Condensed","Bodoni MT Poster Compressed","Bookshelf Symbol 7","Boulder","Bradley Hand","Bradley Hand ITC","Bremen Bd BT","Britannic Bold","Broadway","Browallia New","BrowalliaUPC","Brush Script MT","Californian FB","Calisto MT","Calligrapher","Candara","CaslonOpnface BT","Castellar","Centaur","Cezanne","CG Omega","CG Times","Chalkboard","Chalkboard SE","Chalkduster","Charlesworth","Charter Bd BT","Charter BT","Chaucer","ChelthmITC Bk BT","Chiller","Clarendon","Clarendon Condensed","CloisterBlack BT","Cochin","Colonna MT","Constantia","Cooper Black","Copperplate","Copperplate Gothic","Copperplate Gothic Bold","Copperplate Gothic Light","CopperplGoth Bd BT","Corbel","Cordia New","CordiaUPC","Cornerstone","Coronet","Cuckoo","Curlz MT","DaunPenh","Dauphin","David","DB LCD Temp","DELICIOUS","Denmark","DFKai-SB","Didot","DilleniaUPC","DIN","DokChampa","Dotum","DotumChe","Ebrima","Edwardian Script ITC","Elephant","English 111 Vivace BT","Engravers MT","EngraversGothic BT","Eras Bold ITC","Eras Demi ITC","Eras Light ITC","Eras Medium ITC","EucrosiaUPC","Euphemia","Euphemia UCAS","EUROSTILE","Exotc350 Bd BT","FangSong","Felix Titling","Fixedsys","FONTIN","Footlight MT Light","Forte","FrankRuehl","Fransiscan","Freefrm721 Blk BT","FreesiaUPC","Freestyle Script","French Script MT","FrnkGothITC Bk BT","Fruitger","FRUTIGER","Futura","Futura Bk BT","Futura Lt BT","Futura Md BT","Futura ZBlk BT","FuturaBlack BT","Gabriola","Galliard BT","Gautami","Geeza Pro","Geometr231 BT","Geometr231 Hv BT","Geometr231 Lt BT","GeoSlab 703 Lt BT","GeoSlab 703 XBd BT","Gigi","Gill Sans","Gill Sans MT","Gill Sans MT Condensed","Gill Sans MT Ext Condensed Bold","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gisha","Gloucester MT Extra Condensed","GOTHAM","GOTHAM BOLD","Goudy Old Style","Goudy Stout","GoudyHandtooled BT","GoudyOLSt BT","Gujarati Sangam MN","Gulim","GulimChe","Gungsuh","GungsuhChe","Gurmukhi MN","Haettenschweiler","Harlow Solid Italic","Harrington","Heather","Heiti SC","Heiti TC","HELV","Herald","High Tower Text","Hiragino Kaku Gothic ProN","Hiragino Mincho ProN","Hoefler Text","Humanst 521 Cn BT","Humanst521 BT","Humanst521 Lt BT","Imprint MT Shadow","Incised901 Bd BT","Incised901 BT","Incised901 Lt BT","INCONSOLATA","Informal Roman","Informal011 BT","INTERSTATE","IrisUPC","Iskoola Pota","JasmineUPC","Jazz LET","Jenson","Jester","Jokerman","Juice ITC","Kabel Bk BT","Kabel Ult BT","Kailasa","KaiTi","Kalinga","Kannada Sangam MN","Kartika","Kaufmann Bd BT","Kaufmann BT","Khmer UI","KodchiangUPC","Kokila","Korinna BT","Kristen ITC","Krungthep","Kunstler Script","Lao UI","Latha","Leelawadee","Letter Gothic","Levenim MT","LilyUPC","Lithograph","Lithograph Light","Long Island","Lydian BT","Magneto","Maiandra GD","Malayalam Sangam MN","Malgun Gothic","Mangal","Marigold","Marion","Marker Felt","Market","Marlett","Matisse ITC","Matura MT Script Capitals","Meiryo","Meiryo UI","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft Uighur","Microsoft YaHei","Microsoft Yi Baiti","MingLiU","MingLiU_HKSCS","MingLiU_HKSCS-ExtB","MingLiU-ExtB","Minion","Minion Pro","Miriam","Miriam Fixed","Mistral","Modern","Modern No. 20","Mona Lisa Solid ITC TT","Mongolian Baiti","MONO","MoolBoran","Mrs Eaves","MS LineDraw","MS Mincho","MS PMincho","MS Reference Specialty","MS UI Gothic","MT Extra","MUSEO","MV Boli","Nadeem","Narkisim","NEVIS","News Gothic","News GothicMT","NewsGoth BT","Niagara Engraved","Niagara Solid","Noteworthy","NSimSun","Nyala","OCR A Extended","Old Century","Old English Text MT","Onyx","Onyx BT","OPTIMA","Oriya Sangam MN","OSAKA","OzHandicraft BT","Palace Script MT","Papyrus","Parchment","Party LET","Pegasus","Perpetua","Perpetua Titling MT","PetitaBold","Pickwick","Plantagenet Cherokee","Playbill","PMingLiU","PMingLiU-ExtB","Poor Richard","Poster","PosterBodoni BT","PRINCETOWN LET","Pristina","PTBarnum BT","Pythagoras","Raavi","Rage Italic","Ravie","Ribbon131 Bd BT","Rockwell","Rockwell Condensed","Rockwell Extra Bold","Rod","Roman","Sakkal Majalla","Santa Fe LET","Savoye LET","Sceptre","Script","Script MT Bold","SCRIPTINA","Serifa","Serifa BT","Serifa Th BT","ShelleyVolante BT","Sherwood","Shonar Bangla","Showcard Gothic","Shruti","Signboard","SILKSCREEN","SimHei","Simplified Arabic","Simplified Arabic Fixed","SimSun","SimSun-ExtB","Sinhala Sangam MN","Sketch Rockwell","Skia","Small Fonts","Snap ITC","Snell Roundhand","Socket","Souvenir Lt BT","Staccato222 BT","Steamer","Stencil","Storybook","Styllo","Subway","Swis721 BlkEx BT","Swiss911 XCm BT","Sylfaen","Synchro LET","System","Tamil Sangam MN","Technical","Teletype","Telugu Sangam MN","Tempus Sans ITC","Terminal","Thonburi","Traditional Arabic","Trajan","TRAJAN PRO","Tristan","Tubular","Tunga","Tw Cen MT","Tw Cen MT Condensed","Tw Cen MT Condensed Extra Bold","TypoUpright BT","Unicorn","Univers","Univers CE 55 Medium","Univers Condensed","Utsaah","Vagabond","Vani","Vijaya","Viner Hand ITC","VisualUI","Vivaldi","Vladimir Script","Vrinda","Westminster","WHITNEY","Wide Latin","ZapfEllipt BT","ZapfHumnst BT","ZapfHumnst Dm BT","Zapfino","Zurich BlkEx BT","Zurich Ex BT","ZWAdobeF"])),r=(r=r.concat(t.fonts.userDefinedFonts)).filter(function(e,t){return r.indexOf(e)===t});var o=document.getElementsByTagName("body")[0],i=document.createElement("div"),a=document.createElement("div"),s={},c={},u=function(){var e=document.createElement("span");return e.style.position="absolute",e.style.left="-9999px",e.style.fontSize="72px",e.style.fontStyle="normal",e.style.fontWeight="normal",e.style.letterSpacing="normal",e.style.lineBreak="auto",e.style.lineHeight="normal",e.style.textTransform="none",e.style.textAlign="left",e.style.textDecoration="none",e.style.textShadow="none",e.style.whiteSpace="normal",e.style.wordBreak="normal",e.style.wordSpacing="normal",e.innerHTML="mmmmmmmmmmlli",e},l=function(e,t){var n=u();return n.style.fontFamily="'"+e+"',"+t,n},f=function(e){for(var t=!1,r=0;r<n.length;r++)if(t=e[r].offsetWidth!==s[n[r]]||e[r].offsetHeight!==c[n[r]])return t;return t},d=function(){for(var e=[],t=0,r=n.length;t<r;t++){var o=u();o.style.fontFamily=n[t],i.appendChild(o),e.push(o)}return e}();o.appendChild(i);for(var p=0,h=n.length;p<h;p++)s[n[p]]=d[p].offsetWidth,c[n[p]]=d[p].offsetHeight;var m=function(){for(var e={},t=0,o=r.length;t<o;t++){for(var i=[],s=0,c=n.length;s<c;s++){var u=l(r[t],n[s]);a.appendChild(u),i.push(u)}e[r[t]]=i}return e}();o.appendChild(a);for(var g=[],y=0,v=r.length;y<v;y++)f(m[r[y]])&&g.push(r[y]);o.removeChild(a),o.removeChild(i),e(g)},pauseBefore:!0},{key:"fontsFlash",getData:function(e,t){return void 0!==window.swfobject?window.swfobject.hasFlashPlayerVersion("9.0.0")?t.fonts.swfPath?void function(e,t){window.___fp_swf_loaded=function(t){e(t)};var n=t.fonts.swfContainerId;!function(e){var t=document.createElement("div");t.setAttribute("id",(void 0).fonts.swfContainerId),document.body.appendChild(t)}(),window.swfobject.embedSWF(t.fonts.swfPath,n,"1","1","9.0.0",!1,{onReady:"___fp_swf_loaded"},{allowScriptAccess:"always",menu:"false"},{})}(function(t){e(t)},t):e("missing options.fonts.swfPath"):e("flash not installed"):e("swf object not loaded")},pauseBefore:!0},{key:"audio",getData:function(e,t){var n=t.audio;if(n.excludeIOS11&&navigator.userAgent.match(/OS 11.+Version\/11.+Safari/))return e(t.EXCLUDED);var r=window.OfflineAudioContext||window.webkitOfflineAudioContext;if(null==r)return e(t.NOT_AVAILABLE);var o=new r(1,44100,44100),i=o.createOscillator();i.type="triangle",i.frequency.setValueAtTime(1e4,o.currentTime);var a=o.createDynamicsCompressor();c([["threshold",-50],["knee",40],["ratio",12],["reduction",-20],["attack",0],["release",.25]],function(e){void 0!==a[e[0]]&&"function"==typeof a[e[0]].setValueAtTime&&a[e[0]].setValueAtTime(e[1],o.currentTime)}),i.connect(a),a.connect(o.destination),i.start(0),o.startRendering();var s=setTimeout(function(){return console.warn('Audio fingerprint timed out. Please report bug at https://github.com/Valve/fingerprintjs2 with your user agent: "'+navigator.userAgent+'".'),o.oncomplete=function(){},o=null,e("audioTimeout")},n.timeout);o.oncomplete=function(t){var n;try{clearTimeout(s),n=t.renderedBuffer.getChannelData(0).slice(4500,5e3).reduce(function(e,t){return e+Math.abs(t)},0).toString(),i.disconnect(),a.disconnect()}catch(t){return void e(t)}e(n)}}},{key:"enumerateDevices",getData:function(e,t){if(!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices)return e(t.NOT_AVAILABLE);navigator.mediaDevices.enumerateDevices().then(function(t){e(t.map(function(e){return"id="+e.deviceId+";gid="+e.groupId+";"+e.kind+";"+e.label}))}).catch(function(t){e(t)})}}],g=function(e){throw new Error("'new Fingerprint()' is deprecated, see https://github.com/Valve/fingerprintjs2#upgrade-guide-from-182-to-200")};return g.get=function(e,t){t?e||(e={}):(t=e,e={}),function(e,t){if(null==t)return e;var n,r;for(r in t)null==(n=t[r])||Object.prototype.hasOwnProperty.call(e,r)||(e[r]=n)}(e,s),e.components=e.extraComponents.concat(m);var n={data:[],addPreprocessedComponent:function(t,r){"function"==typeof e.preprocessor&&(r=e.preprocessor(t,r)),n.data.push({key:t,value:r})}},r=-1,o=function(i){if((r+=1)>=e.components.length)t(n.data);else{var a=e.components[r];if(e.excludes[a.key])o(!1);else{if(!i&&a.pauseBefore)return r-=1,void setTimeout(function(){o(!0)},1);try{a.getData(function(e){n.addPreprocessedComponent(a.key,e),o(!1)},e)}catch(e){n.addPreprocessedComponent(a.key,String(e)),o(!1)}}}};o(!1)},g.getPromise=function(e){return new Promise(function(t,n){g.get(e,t)})},g.getV18=function(e,t){return null==t&&(t=e,e={}),g.get(e,function(n){for(var r=[],o=0;o<n.length;o++){var i=n[o];if(i.value===(e.NOT_AVAILABLE||"not available"))r.push({key:i.key,value:"unknown"});else if("plugins"===i.key)r.push({key:"plugins",value:u(i.value,function(e){var t=u(e[2],function(e){return e.join?e.join("~"):e}).join(",");return[e[0],e[1],t].join("::")})});else if(-1!==["canvas","webgl"].indexOf(i.key))r.push({key:i.key,value:i.value.join("~")});else if(-1!==["sessionStorage","localStorage","indexedDb","addBehavior","openDatabase"].indexOf(i.key)){if(!i.value)continue;r.push({key:i.key,value:1})}else i.value?r.push(i.value.join?{key:i.key,value:i.value.join(";")}:i):r.push({key:i.key,value:i.value})}var s=a(u(r,function(e){return e.value}).join("~~~"),31);t(s,r)})},g.x64hash128=a,g.VERSION="2.0.0",g})},function(e,t){(function(t){e.exports=t}).call(this,{})}]).default}]);