UNPKG

135 kBJavaScriptView Raw
1!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=72)}([function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){(function(r){function o(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=n(70)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var o=0,i=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&"%c"===t&&(i=++o)}),t.splice(i,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=o,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"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+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.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"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(o())}).call(this,n(71))},function(t,e,n){(function(t){var r,o=n(40),i=n(19),s=n(38),c=n(37),a=n(36);t&&t.ArrayBuffer&&(r=n(34));var u="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),h="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),l=u||h;e.protocol=3;var p=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},f=o(p),d={type:"error",data:"parser error"},y=n(33);function m(t,e,n){for(var r=new Array(t.length),o=c(t.length,n),i=function(t,n,o){e(n,function(e,n){r[t]=n,o(e,r)})},s=0;s<t.length;s++)i(s,t[s],o)}e.encodePacket=function(n,r,o,i){"function"==typeof r&&(i=r,r=!1),"function"==typeof o&&(i=o,o=null);var s=void 0===n.data?void 0:n.data.buffer||n.data;if(t.ArrayBuffer&&s instanceof ArrayBuffer)return function(t,n,r){if(!n)return e.encodeBase64Packet(t,r);var o=t.data,i=new Uint8Array(o),s=new Uint8Array(1+o.byteLength);s[0]=p[t.type];for(var c=0;c<i.length;c++)s[c+1]=i[c];return r(s.buffer)}(n,r,i);if(y&&s instanceof t.Blob)return function(t,n,r){if(!n)return e.encodeBase64Packet(t,r);if(l)return function(t,n,r){if(!n)return e.encodeBase64Packet(t,r);var o=new FileReader;return o.onload=function(){t.data=o.result,e.encodePacket(t,n,!0,r)},o.readAsArrayBuffer(t.data)}(t,n,r);var o=new Uint8Array(1);o[0]=p[t.type];var i=new y([o.buffer,t.data]);return r(i)}(n,r,i);if(s&&s.base64)return function(t,n){var r="b"+e.packets[t.type]+t.data.data;return n(r)}(n,i);var c=p[n.type];return void 0!==n.data&&(c+=o?a.encode(String(n.data),{strict:!1}):String(n.data)),i(""+c)},e.encodeBase64Packet=function(n,r){var o,i="b"+e.packets[n.type];if(y&&n.data instanceof t.Blob){var s=new FileReader;return s.onload=function(){var t=s.result.split(",")[1];r(i+t)},s.readAsDataURL(n.data)}try{o=String.fromCharCode.apply(null,new Uint8Array(n.data))}catch(t){for(var c=new Uint8Array(n.data),a=new Array(c.length),u=0;u<c.length;u++)a[u]=c[u];o=String.fromCharCode.apply(null,a)}return i+=t.btoa(o),r(i)},e.decodePacket=function(t,n,r){if(void 0===t)return d;if("string"==typeof t){if("b"===t.charAt(0))return e.decodeBase64Packet(t.substr(1),n);if(r&&!1===(t=function(t){try{t=a.decode(t,{strict:!1})}catch(t){return!1}return t}(t)))return d;var o=t.charAt(0);return Number(o)==o&&f[o]?t.length>1?{type:f[o],data:t.substring(1)}:{type:f[o]}:d}o=new Uint8Array(t)[0];var i=s(t,1);return y&&"blob"===n&&(i=new y([i])),{type:f[o],data:i}},e.decodeBase64Packet=function(t,e){var n=f[t.charAt(0)];if(!r)return{type:n,data:{base64:!0,data:t.substr(1)}};var o=r.decode(t.substr(1));return"blob"===e&&y&&(o=new y([o])),{type:n,data:o}},e.encodePayload=function(t,n,r){"function"==typeof n&&(r=n,n=null);var o=i(t);if(n&&o)return y&&!l?e.encodePayloadAsBlob(t,r):e.encodePayloadAsArrayBuffer(t,r);if(!t.length)return r("0:");m(t,function(t,r){e.encodePacket(t,!!o&&n,!1,function(t){r(null,function(t){return t.length+":"+t}(t))})},function(t,e){return r(e.join(""))})},e.decodePayload=function(t,n,r){if("string"!=typeof t)return e.decodePayloadAsBinary(t,n,r);var o;if("function"==typeof n&&(r=n,n=null),""===t)return r(d,0,1);for(var i,s,c="",a=0,u=t.length;a<u;a++){var h=t.charAt(a);if(":"===h){if(""===c||c!=(i=Number(c)))return r(d,0,1);if(c!=(s=t.substr(a+1,i)).length)return r(d,0,1);if(s.length){if(o=e.decodePacket(s,n,!1),d.type===o.type&&d.data===o.data)return r(d,0,1);if(!1===r(o,a+i,u))return}a+=i,c=""}else c+=h}return""!==c?r(d,0,1):void 0},e.encodePayloadAsArrayBuffer=function(t,n){if(!t.length)return n(new ArrayBuffer(0));m(t,function(t,n){e.encodePacket(t,!0,!0,function(t){return n(null,t)})},function(t,e){var r=e.reduce(function(t,e){var n;return t+(n="string"==typeof e?e.length:e.byteLength).toString().length+n+2},0),o=new Uint8Array(r),i=0;return e.forEach(function(t){var e="string"==typeof t,n=t;if(e){for(var r=new Uint8Array(t.length),s=0;s<t.length;s++)r[s]=t.charCodeAt(s);n=r.buffer}o[i++]=e?0:1;var c=n.byteLength.toString();for(s=0;s<c.length;s++)o[i++]=parseInt(c[s]);o[i++]=255;for(r=new Uint8Array(n),s=0;s<r.length;s++)o[i++]=r[s]}),n(o.buffer)})},e.encodePayloadAsBlob=function(t,n){m(t,function(t,n){e.encodePacket(t,!0,!0,function(t){var e=new Uint8Array(1);if(e[0]=1,"string"==typeof t){for(var r=new Uint8Array(t.length),o=0;o<t.length;o++)r[o]=t.charCodeAt(o);t=r.buffer,e[0]=0}var i=(t instanceof ArrayBuffer?t.byteLength:t.size).toString(),s=new Uint8Array(i.length+1);for(o=0;o<i.length;o++)s[o]=parseInt(i[o]);if(s[i.length]=255,y){var c=new y([e.buffer,s.buffer,t]);n(null,c)}})},function(t,e){return n(new y(e))})},e.decodePayloadAsBinary=function(t,n,r){"function"==typeof n&&(r=n,n=null);for(var o=t,i=[];o.byteLength>0;){for(var c=new Uint8Array(o),a=0===c[0],u="",h=1;255!==c[h];h++){if(u.length>310)return r(d,0,1);u+=c[h]}o=s(o,2+u.length),u=parseInt(u);var l=s(o,0,u);if(a)try{l=String.fromCharCode.apply(null,new Uint8Array(l))}catch(t){var p=new Uint8Array(l);l="";for(h=0;h<p.length;h++)l+=String.fromCharCode(p[h])}i.push(l),o=s(o,u)}var f=i.length;i.forEach(function(t,o){r(e.decodePacket(t,n,!0),o,f)})}}).call(this,n(0))},function(t,e,n){function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<r.length;o++)if((n=r[o])===e||n.fn===e){r.splice(o,1);break}return this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),n=this._callbacks["$"+t];if(n)for(var r=0,o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,e);return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(11),o=n(12);e.default=class extends o.default{constructor(t){super(t)}getRootElement(){return super.getRootElement()}beforeMount(){this.props.tagName&&(this.tagName=this.props.tagName)}afterMount(){const t=this.props.events||{},e=this.props.attributes||{};Object.keys(e).map(t=>{this.bindAttributeToProp(t,e[t])}),Object.keys(t).map(e=>{this.bindEventToProp(e,t[e])}),this.props.innerHTML&&this.addSubscription(this.props.innerHTML,t=>{const e=this.rootElement.cloneNode(!1);e.innerHTML=t,r(this.rootElement,e)})}bindAttributeToProp(t,e){this.addSubscription(e,e=>{this.rootElement.setAttribute(t,e)})}bindInnerHtmlToProp(t){this.addSubscription(t,t=>{this.rootElement.innerHTML=t})}bindEventToProp(t,e){const n="function"==typeof e?e:t=>{e.next(t)};this.document.addEventListener(this.rootElement,t,n,!1)}}},function(t,e){t.exports=function(t,e){var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e){e.encode=function(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e},e.decode=function(t){for(var e={},n=t.split("&"),r=0,o=n.length;r<o;r++){var i=n[r].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isObservable=function(t){return t&&"function"==typeof t.subscribe},e.isComponent=function(t){return t&&!0===t.__neweb_component},e.nodesToMap=function(t){const e=[];for(const n of t)e.push(n);return e},e.getElementAttributes=function(t){const e={};for(let n=0;n<t.attributes.length;n++)e[t.attributes[n].name]=t.attributes[n].value;return e},e.domNodeToJson=function t(e){const n={nodeType:e.nodeType},r=e;if(void 0!==r.tagName?n.tagName=r.tagName.toLowerCase():e.nodeName&&(n.nodeName=e.nodeName),e.nodeValue&&(n.nodeValue=e.nodeValue),r.attributes){n.attributes={};const t=r.attributes;if(t)for(let e=0;e<length;e++){const r=t[e];n.attributes[r.nodeName]=r.nodeValue}}const o=e.childNodes;if(o&&o.length>0){n.childNodes=[];const e=o.length;for(let r=0;r<e;r++)n.childNodes[r]=t(o[r])}return n}},function(t,e,n){var r=n(2),o=n(3);function i(t){this.path=t.path,this.hostname=t.hostname,this.port=t.port,this.secure=t.secure,this.query=t.query,this.timestampParam=t.timestampParam,this.timestampRequests=t.timestampRequests,this.readyState="",this.agent=t.agent||!1,this.socket=t.socket,this.enablesXDR=t.enablesXDR,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.forceNode=t.forceNode,this.extraHeaders=t.extraHeaders,this.localAddress=t.localAddress}t.exports=i,o(i.prototype),i.prototype.onError=function(t,e){var n=new Error(t);return n.type="TransportError",n.description=e,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(t){if("open"!==this.readyState)throw new Error("Transport not open");this.write(t)},i.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},i.prototype.onData=function(t){var e=r.decodePacket(t,this.socket.binaryType);this.onPacket(e)},i.prototype.onPacket=function(t){this.emit("packet",t)},i.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(t,e,n){(function(e){var r=n(42);t.exports=function(t){var n=t.xdomain,o=t.xscheme,i=t.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!n||r))return new XMLHttpRequest}catch(t){}try{if("undefined"!=typeof XDomainRequest&&!o&&i)return new XDomainRequest}catch(t){}if(!n)try{return new(e[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}}).call(this,n(0))},function(t,e,n){var r=n(1)("socket.io-parser"),o=n(3),i=n(45),s=n(24),c=n(23);function a(){}e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=a,e.Decoder=l;var u=e.ERROR+'"encode error"';function h(t){var n=""+t.type;if(e.BINARY_EVENT!==t.type&&e.BINARY_ACK!==t.type||(n+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(n+=t.nsp+","),null!=t.id&&(n+=t.id),null!=t.data){var o=function(t){try{return JSON.stringify(t)}catch(t){return!1}}(t.data);if(!1===o)return u;n+=o}return r("encoded %j as %s",t,n),n}function l(){this.reconstructor=null}function p(t){this.reconPack=t,this.buffers=[]}function f(t){return{type:e.ERROR,data:"parser error: "+t}}a.prototype.encode=function(t,n){(r("encoding packet %j",t),e.BINARY_EVENT===t.type||e.BINARY_ACK===t.type)?function(t,e){i.removeBlobs(t,function(t){var n=i.deconstructPacket(t),r=h(n.packet),o=n.buffers;o.unshift(r),e(o)})}(t,n):n([h(t)])},o(l.prototype),l.prototype.add=function(t){var n;if("string"==typeof t)n=function(t){var n=0,o={type:Number(t.charAt(0))};if(null==e.types[o.type])return f("unknown packet type "+o.type);if(e.BINARY_EVENT===o.type||e.BINARY_ACK===o.type){for(var i="";"-"!==t.charAt(++n)&&(i+=t.charAt(n),n!=t.length););if(i!=Number(i)||"-"!==t.charAt(n))throw new Error("Illegal attachments");o.attachments=Number(i)}if("/"===t.charAt(n+1))for(o.nsp="";++n;){var c=t.charAt(n);if(","===c)break;if(o.nsp+=c,n===t.length)break}else o.nsp="/";var a=t.charAt(n+1);if(""!==a&&Number(a)==a){for(o.id="";++n;){var c=t.charAt(n);if(null==c||Number(c)!=c){--n;break}if(o.id+=t.charAt(n),n===t.length)break}o.id=Number(o.id)}if(t.charAt(++n)){var u=function(t){try{return JSON.parse(t)}catch(t){return!1}}(t.substr(n)),h=!1!==u&&(o.type===e.ERROR||s(u));if(!h)return f("invalid payload");o.data=u}return r("decoded %s as %j",t,o),o}(t),e.BINARY_EVENT===n.type||e.BINARY_ACK===n.type?(this.reconstructor=new p(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!c(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(n=this.reconstructor.takeBinaryData(t))&&(this.reconstructor=null,this.emit("decoded",n))}},l.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},p.prototype.takeBinaryData=function(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var e=i.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null},p.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(t,e,n){"use strict";var r,o="http://www.w3.org/1999/xhtml",i="undefined"==typeof document?void 0:document,s=i?i.body||i.createElement("div"):{},c=s.hasAttributeNS?function(t,e,n){return t.hasAttributeNS(e,n)}:s.hasAttribute?function(t,e,n){return t.hasAttribute(n)}:function(t,e,n){return null!=t.getAttributeNode(e,n)};function a(t,e){var n=t.nodeName,r=e.nodeName;return n===r||!!(e.actualize&&n.charCodeAt(0)<91&&r.charCodeAt(0)>90)&&n===r.toUpperCase()}function u(t,e,n){t[n]!==e[n]&&(t[n]=e[n],t[n]?t.setAttribute(n,""):t.removeAttribute(n,""))}var h={OPTION:function(t,e){u(t,e,"selected")},INPUT:function(t,e){u(t,e,"checked"),u(t,e,"disabled"),t.value!==e.value&&(t.value=e.value),c(e,null,"value")||t.removeAttribute("value")},TEXTAREA:function(t,e){var n=e.value;t.value!==n&&(t.value=n);var r=t.firstChild;if(r){var o=r.nodeValue;if(o==n||!n&&o==t.placeholder)return;r.nodeValue=n}},SELECT:function(t,e){if(!c(e,null,"multiple")){for(var n=0,r=e.firstChild;r;){var o=r.nodeName;if(o&&"OPTION"===o.toUpperCase()){if(c(r,null,"selected")){n;break}n++}r=r.nextSibling}t.selectedIndex=n}}},l=1,p=3,f=8;function d(){}function y(t){return t.id}var m=function(t){return function(e,n,s){if(s||(s={}),"string"==typeof n)if("#document"===e.nodeName||"HTML"===e.nodeName){var c=n;(n=i.createElement("html")).innerHTML=c}else u=n,!r&&i.createRange&&(r=i.createRange()).selectNode(i.body),r&&r.createContextualFragment?m=r.createContextualFragment(u):(m=i.createElement("body")).innerHTML=u,n=m.childNodes[0];var u,m,v,b=s.getNodeKey||y,g=s.onBeforeNodeAdded||d,w=s.onNodeAdded||d,_=s.onBeforeElUpdated||d,x=s.onElUpdated||d,E=s.onBeforeNodeDiscarded||d,C=s.onNodeDiscarded||d,k=s.onBeforeElChildrenUpdated||d,S=!0===s.childrenOnly,A={};function N(t){v?v.push(t):v=[t]}function T(t,e,n){!1!==E(t)&&(e&&e.removeChild(t),C(t),function t(e,n){if(e.nodeType===l)for(var r=e.firstChild;r;){var o=void 0;n&&(o=b(r))?N(o):(C(r),r.firstChild&&t(r,n)),r=r.nextSibling}}(t,n))}function P(t){w(t);for(var e=t.firstChild;e;){var n=e.nextSibling,r=b(e);if(r){var o=A[r];o&&a(e,o)&&(e.parentNode.replaceChild(o,e),O(o,e))}P(e),e=n}}function O(r,o,s){var c,u=b(o);if(u&&delete A[u],!n.isSameNode||!n.isSameNode(e)){if(!s){if(!1===_(r,o))return;if(t(r,o),x(r),!1===k(r,o))return}if("TEXTAREA"!==r.nodeName){var d,y,m,v,w=o.firstChild,E=r.firstChild;t:for(;w;){for(m=w.nextSibling,d=b(w);E;){if(y=E.nextSibling,w.isSameNode&&w.isSameNode(E)){w=m,E=y;continue t}c=b(E);var C=E.nodeType,S=void 0;if(C===w.nodeType&&(C===l?(d?d!==c&&((v=A[d])?E.nextSibling===v?S=!1:(r.insertBefore(v,E),y=E.nextSibling,c?N(c):T(E,r,!0),E=v):S=!1):c&&(S=!1),(S=!1!==S&&a(E,w))&&O(E,w)):C!==p&&C!=f||(S=!0,E.nodeValue!==w.nodeValue&&(E.nodeValue=w.nodeValue))),S){w=m,E=y;continue t}c?N(c):T(E,r,!0),E=y}if(d&&(v=A[d])&&a(v,w))r.appendChild(v),O(v,w);else{var j=g(w);!1!==j&&(j&&(w=j),w.actualize&&(w=w.actualize(r.ownerDocument||i)),r.appendChild(w),P(w))}w=m,E=y}for(;E;)y=E.nextSibling,(c=b(E))?N(c):T(E,r,!0),E=y}var B=h[r.nodeName];B&&B(r,o)}}!function t(e){if(e.nodeType===l)for(var n=e.firstChild;n;){var r=b(n);r&&(A[r]=n),t(n),n=n.nextSibling}}(e);var j,B,I=e,M=I.nodeType,R=n.nodeType;if(!S)if(M===l)R===l?a(e,n)||(C(e),I=function(t,e){for(var n=t.firstChild;n;){var r=n.nextSibling;e.appendChild(n),n=r}return e}(e,(j=n.nodeName,(B=n.namespaceURI)&&B!==o?i.createElementNS(B,j):i.createElement(j)))):I=n;else if(M===p||M===f){if(R===M)return I.nodeValue!==n.nodeValue&&(I.nodeValue=n.nodeValue),I;I=n}if(I===n)C(e);else if(O(I,n,S),v)for(var F=0,D=v.length;F<D;F++){var L=A[v[F]];L&&T(L,L.parentNode,!1)}return!S&&I!==e&&e.parentNode&&(I.actualize&&(I=I.actualize(e.ownerDocument||i)),e.parentNode.replaceChild(I,e)),I}}(function(t,e){var n,r,o,i,s,a=e.attributes;for(n=a.length-1;n>=0;--n)o=(r=a[n]).name,i=r.namespaceURI,s=r.value,i?(o=r.localName||o,t.getAttributeNS(i,o)!==s&&t.setAttributeNS(i,o,s)):t.getAttribute(o)!==s&&t.setAttribute(o,s);for(n=(a=t.attributes).length-1;n>=0;--n)!1!==(r=a[n]).specified&&(o=r.name,(i=r.namespaceURI)?(o=r.localName||o,c(e,i,o)||t.removeAttributeNS(i,o)):c(e,null,o)||t.removeAttribute(o))});t.exports=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(11),o=n(61),i=n(7);class s{constructor(t){this.elements={},this.hasRender=!0,this.isMounted=!1,this.__neweb_component=!0,this.subscriptions=[],this.props=t||{},this.props.document?this.documentValue=this.props.document:s.document&&(this.documentValue=s.document)}static setDocument(t){s.document=t}get document(){if(!this.documentValue)throw new Error("Document should be setted");return this.documentValue}setDocument(t){this.documentValue=t}mount(t){if(this.isMounted)throw new Error("Component already inited");this.isMounted=!0,t&&this.saveMountElement(t),this.beforeMount();const e=this.props.template?this.props.template:this.getTemplate();e?this.setRootElementByTemplate(e):this.rootElement||(this.rootElement=this.render()),this.afterMount(),this.getRootElement().onUpdateElement=(t=>{this.rootElement=t})}dispose(){this.subscriptions.map(t=>t.unsubscribe),Object.keys(this.elements).map(t=>this.elements[t].dispose())}getElements(){return this.elements}getRootElement(){return this.rootElement}saveMountElement(t){this.tagName=t.tagName,this.children=i.nodesToMap(t.childNodes),this.mountAttributes=i.getElementAttributes(t)}getTemplate(){}setRootElementByTemplate(t){this.rootElement=this.createElementfromTemplate(t)}addElement(t,e){if(this.elements[t])throw new Error("Element with name "+t+" already existing");this.elements[t]=e}render(){const t=this.document.createElement(this.tagName?this.tagName:"div");return this.children&&this.children.map(e=>t.appendChild(e)),this.mountAttributes&&Object.keys(this.mountAttributes).map(e=>{t.setAttribute(e,this.mountAttributes[e])}),t}beforeMount(){}afterMount(){}beforeDispose(){}afterDispose(){}createElementfromTemplate(t){return o.fromString(this.document,t,this.getElements())}update(){r(this.rootElement,this.render())}addSubscription(t,e){i.isObservable(t)?this.subscriptions.push(t.subscribe(e)):e(t)}}e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(12);e.Component=r.default;var o=n(60);e.Document=o.default;var i=n(59);e.TextNode=i.default;var s=n(58);e.Link=s.default;var c=n(57);e.List=c.default;var a=n(56);e.DynamicComponent=a.default;var u=n(4);e.ElementComponent=u.default;var h=n(55);e.InputComponent=h.default;var l=n(54);e.BooleanInputComponent=l.default,function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(n(53))},function(t,e){var n=[].slice;t.exports=function(t,e){if("string"==typeof e&&(e=t[e]),"function"!=typeof e)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return e.apply(t,r.concat(n.call(arguments)))}}},function(t,e){t.exports=function(t,e,n){return t.on(e,n),{destroy:function(){t.removeListener(e,n)}}}},function(t,e,n){var r=n(10),o=n(3),i=n(29),s=n(15),c=n(14),a=n(1)("socket.io-client:socket"),u=n(6),h=n(19);t.exports=f;var l={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},p=o.prototype.emit;function f(t,e,n){this.io=t,this.nsp=e,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(f.prototype),f.prototype.subEvents=function(){if(!this.subs){var t=this.io;this.subs=[s(t,"open",c(this,"onopen")),s(t,"packet",c(this,"onpacket")),s(t,"close",c(this,"onclose"))]}},f.prototype.open=f.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting"),this)},f.prototype.send=function(){var t=i(arguments);return t.unshift("message"),this.emit.apply(this,t),this},f.prototype.emit=function(t){if(l.hasOwnProperty(t))return p.apply(this,arguments),this;var e=i(arguments),n={type:(void 0!==this.flags.binary?this.flags.binary:h(e))?r.BINARY_EVENT:r.EVENT,data:e,options:{}};return n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof e[e.length-1]&&(a("emitting packet with ack id %d",this.ids),this.acks[this.ids]=e.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={},this},f.prototype.packet=function(t){t.nsp=this.nsp,this.io.packet(t)},f.prototype.onopen=function(){if(a("transport is open - connecting"),"/"!==this.nsp)if(this.query){var t="object"==typeof this.query?u.encode(this.query):this.query;a("sending connect packet with query %s",t),this.packet({type:r.CONNECT,query:t})}else this.packet({type:r.CONNECT})},f.prototype.onclose=function(t){a("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",t)},f.prototype.onpacket=function(t){if(t.nsp===this.nsp)switch(t.type){case r.CONNECT:this.onconnect();break;case r.EVENT:case r.BINARY_EVENT:this.onevent(t);break;case r.ACK:case r.BINARY_ACK:this.onack(t);break;case r.DISCONNECT:this.ondisconnect();break;case r.ERROR:this.emit("error",t.data)}},f.prototype.onevent=function(t){var e=t.data||[];a("emitting event %j",e),null!=t.id&&(a("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?p.apply(this,e):this.receiveBuffer.push(e)},f.prototype.ack=function(t){var e=this,n=!1;return function(){if(!n){n=!0;var o=i(arguments);a("sending ack %j",o),e.packet({type:h(o)?r.BINARY_ACK:r.ACK,id:t,data:o})}}},f.prototype.onack=function(t){var e=this.acks[t.id];"function"==typeof e?(a("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):a("bad ack %s",t.id)},f.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},f.prototype.emitBuffered=function(){var t;for(t=0;t<this.receiveBuffer.length;t++)p.apply(this,this.receiveBuffer[t]);for(this.receiveBuffer=[],t=0;t<this.sendBuffer.length;t++)this.packet(this.sendBuffer[t]);this.sendBuffer=[]},f.prototype.ondisconnect=function(){a("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},f.prototype.destroy=function(){if(this.subs){for(var t=0;t<this.subs.length;t++)this.subs[t].destroy();this.subs=null}this.io.destroy(this)},f.prototype.close=f.prototype.disconnect=function(){return this.connected&&(a("performing disconnect (%s)",this.nsp),this.packet({type:r.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},f.prototype.compress=function(t){return this.flags.compress=t,this},f.prototype.binary=function(t){return this.flags.binary=t,this}},function(t,e){var n=[].indexOf;t.exports=function(t,e){if(n)return t.indexOf(e);for(var r=0;r<t.length;++r)if(t[r]===e)return r;return-1}},function(t,e,n){"use strict";var r,o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),i=64,s={},c=0,a=0;function u(t){var e="";do{e=o[t%i]+e,t=Math.floor(t/i)}while(t>0);return e}function h(){var t=u(+new Date);return t!==r?(c=0,r=t):t+"."+u(c++)}for(;a<i;a++)s[o[a]]=a;h.encode=u,h.decode=function(t){var e=0;for(a=0;a<t.length;a++)e=e*i+s[t.charAt(a)];return e},t.exports=h},function(t,e,n){(function(e){var r=n(39),o=Object.prototype.toString,i="function"==typeof e.Blob||"[object BlobConstructor]"===o.call(e.Blob),s="function"==typeof e.File||"[object FileConstructor]"===o.call(e.File);t.exports=function t(n){if(!n||"object"!=typeof n)return!1;if(r(n)){for(var o=0,c=n.length;o<c;o++)if(t(n[o]))return!0;return!1}if("function"==typeof e.Buffer&&e.Buffer.isBuffer&&e.Buffer.isBuffer(n)||"function"==typeof e.ArrayBuffer&&n instanceof ArrayBuffer||i&&n instanceof Blob||s&&n instanceof File)return!0;if(n.toJSON&&"function"==typeof n.toJSON&&1===arguments.length)return t(n.toJSON(),!0);for(var a in n)if(Object.prototype.hasOwnProperty.call(n,a)&&t(n[a]))return!0;return!1}}).call(this,n(0))},function(t,e,n){var r=n(8),o=n(6),i=n(2),s=n(5),c=n(18),a=n(1)("engine.io-client:polling");t.exports=h;var u=null!=new(n(9))({xdomain:!1}).responseType;function h(t){var e=t&&t.forceBase64;u&&!e||(this.supportsBinary=!1),r.call(this,t)}s(h,r),h.prototype.name="polling",h.prototype.doOpen=function(){this.poll()},h.prototype.pause=function(t){var e=this;function n(){a("paused"),e.readyState="paused",t()}if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(a("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){a("pre-pause polling complete"),--r||n()})),this.writable||(a("we are currently writing - waiting to pause"),r++,this.once("drain",function(){a("pre-pause writing complete"),--r||n()}))}else n()},h.prototype.poll=function(){a("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},h.prototype.onData=function(t){var e=this;a("polling got data %s",t);i.decodePayload(t,this.socket.binaryType,function(t,n,r){if("opening"===e.readyState&&e.onOpen(),"close"===t.type)return e.onClose(),!1;e.onPacket(t)}),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():a('ignoring poll - transport state "%s"',this.readyState))},h.prototype.doClose=function(){var t=this;function e(){a("writing close packet"),t.write([{type:"close"}])}"open"===this.readyState?(a("transport open - closing"),e()):(a("transport not open - deferring close"),this.once("open",e))},h.prototype.write=function(t){var e=this;this.writable=!1;var n=function(){e.writable=!0,e.emit("drain")};i.encodePayload(t,this.supportsBinary,function(t){e.doWrite(t,n)})},h.prototype.uri=function(){var t=this.query||{},e=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(t[this.timestampParam]=c()),this.supportsBinary||t.sid||(t.b64=1),t=o.encode(t),this.port&&("https"===e&&443!==Number(this.port)||"http"===e&&80!==Number(this.port))&&(n=":"+this.port),t.length&&(t="?"+t),e+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+t}},function(t,e,n){(function(t){var r=n(9),o=n(41),i=n(32),s=n(31);e.polling=function(e){var n=!1,s=!1,c=!1!==e.jsonp;if(t.location){var a="https:"===location.protocol,u=location.port;u||(u=a?443:80),n=e.hostname!==location.hostname||u!==e.port,s=e.secure!==a}if(e.xdomain=n,e.xscheme=s,"open"in new r(e)&&!e.forceJSONP)return new o(e);if(!c)throw new Error("JSONP disabled");return new i(e)},e.websocket=s}).call(this,n(0))},function(t,e,n){var r=n(44),o=n(16),i=n(3),s=n(10),c=n(15),a=n(14),u=n(1)("socket.io-client:manager"),h=n(17),l=n(28),p=Object.prototype.hasOwnProperty;function f(t,e){if(!(this instanceof f))return new f(t,e);t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.nsps={},this.subs=[],this.opts=e,this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(e.randomizationFactor||.5),this.backoff=new l({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this.readyState="closed",this.uri=t,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=e.parser||s;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==e.autoConnect,this.autoConnect&&this.open()}t.exports=f,f.prototype.emitAll=function(){for(var t in this.emit.apply(this,arguments),this.nsps)p.call(this.nsps,t)&&this.nsps[t].emit.apply(this.nsps[t],arguments)},f.prototype.updateSocketIds=function(){for(var t in this.nsps)p.call(this.nsps,t)&&(this.nsps[t].id=this.generateId(t))},f.prototype.generateId=function(t){return("/"===t?"":t+"#")+this.engine.id},i(f.prototype),f.prototype.reconnection=function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection},f.prototype.reconnectionAttempts=function(t){return arguments.length?(this._reconnectionAttempts=t,this):this._reconnectionAttempts},f.prototype.reconnectionDelay=function(t){return arguments.length?(this._reconnectionDelay=t,this.backoff&&this.backoff.setMin(t),this):this._reconnectionDelay},f.prototype.randomizationFactor=function(t){return arguments.length?(this._randomizationFactor=t,this.backoff&&this.backoff.setJitter(t),this):this._randomizationFactor},f.prototype.reconnectionDelayMax=function(t){return arguments.length?(this._reconnectionDelayMax=t,this.backoff&&this.backoff.setMax(t),this):this._reconnectionDelayMax},f.prototype.timeout=function(t){return arguments.length?(this._timeout=t,this):this._timeout},f.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},f.prototype.open=f.prototype.connect=function(t,e){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=c(n,"open",function(){o.onopen(),t&&t()}),s=c(n,"error",function(e){if(u("connect_error"),o.cleanup(),o.readyState="closed",o.emitAll("connect_error",e),t){var n=new Error("Connection error");n.data=e,t(n)}else o.maybeReconnectOnOpen()});if(!1!==this._timeout){var a=this._timeout;u("connect attempt will timeout after %d",a);var h=setTimeout(function(){u("connect attempt timed out after %d",a),i.destroy(),n.close(),n.emit("error","timeout"),o.emitAll("connect_timeout",a)},a);this.subs.push({destroy:function(){clearTimeout(h)}})}return this.subs.push(i),this.subs.push(s),this},f.prototype.onopen=function(){u("open"),this.cleanup(),this.readyState="open",this.emit("open");var t=this.engine;this.subs.push(c(t,"data",a(this,"ondata"))),this.subs.push(c(t,"ping",a(this,"onping"))),this.subs.push(c(t,"pong",a(this,"onpong"))),this.subs.push(c(t,"error",a(this,"onerror"))),this.subs.push(c(t,"close",a(this,"onclose"))),this.subs.push(c(this.decoder,"decoded",a(this,"ondecoded")))},f.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},f.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},f.prototype.ondata=function(t){this.decoder.add(t)},f.prototype.ondecoded=function(t){this.emit("packet",t)},f.prototype.onerror=function(t){u("error",t),this.emitAll("error",t)},f.prototype.socket=function(t,e){var n=this.nsps[t];if(!n){n=new o(this,t,e),this.nsps[t]=n;var r=this;n.on("connecting",i),n.on("connect",function(){n.id=r.generateId(t)}),this.autoConnect&&i()}function i(){~h(r.connecting,n)||r.connecting.push(n)}return n},f.prototype.destroy=function(t){var e=h(this.connecting,t);~e&&this.connecting.splice(e,1),this.connecting.length||this.close()},f.prototype.packet=function(t){u("writing packet %j",t);var e=this;t.query&&0===t.type&&(t.nsp+="?"+t.query),e.encoding?e.packetBuffer.push(t):(e.encoding=!0,this.encoder.encode(t,function(n){for(var r=0;r<n.length;r++)e.engine.write(n[r],t.options);e.encoding=!1,e.processPacketQueue()}))},f.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},f.prototype.cleanup=function(){u("cleanup");for(var t=this.subs.length,e=0;e<t;e++){this.subs.shift().destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},f.prototype.close=f.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()},f.prototype.onclose=function(t){u("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()},f.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var t=this;if(this.backoff.attempts>=this._reconnectionAttempts)u("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();u("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var n=setTimeout(function(){t.skipReconnect||(u("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),t.skipReconnect||t.open(function(e){e?(u("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(u("reconnect success"),t.onreconnect())}))},e);this.subs.push({destroy:function(){clearTimeout(n)}})}},f.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)}},function(t,e,n){(function(e){t.exports=function(t){return n&&e.Buffer.isBuffer(t)||r&&(t instanceof e.ArrayBuffer||o(t))};var n="function"==typeof e.Buffer&&"function"==typeof e.Buffer.isBuffer,r="function"==typeof e.ArrayBuffer,o=r&&"function"==typeof e.ArrayBuffer.isView?e.ArrayBuffer.isView:function(t){return t.buffer instanceof e.ArrayBuffer}}).call(this,n(0))},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){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"];t.exports=function(t){var e=t,o=t.indexOf("["),i=t.indexOf("]");-1!=o&&-1!=i&&(t=t.substring(0,o)+t.substring(o,i).replace(/:/g,";")+t.substring(i,t.length));for(var s=n.exec(t||""),c={},a=14;a--;)c[r[a]]=s[a]||"";return-1!=o&&-1!=i&&(c.source=e,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INITIAL_VAR="__initial",e.REQUIRE_FUNC_NAME="loadModule",function(t){t.FrameControllerData="frame-controller-data",t.NewPage="new-page",t.Initialize="initialize",t.FrameControllerDispatch="frame-controller-dispatch",t.Navigate="navigate",t.Error="error"}(e.RemoteMessageType||(e.RemoteMessageType={}))},function(t,e,n){"use strict";n.r(e);
2/*! *****************************************************************************
3Copyright (c) Microsoft Corporation. All rights reserved.
4Licensed under the Apache License, Version 2.0 (the "License"); you may not use
5this file except in compliance with the License. You may obtain a copy of the
6License at http://www.apache.org/licenses/LICENSE-2.0
7
8THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
9KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
10WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
11MERCHANTABLITY OR NON-INFRINGEMENT.
12
13See the Apache Version 2.0 License for specific language governing permissions
14and limitations under the License.
15***************************************************************************** */
16var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.assign;function i(t){return"function"==typeof t}var s=!1,c={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;s=t},get useDeprecatedSynchronousErrorHandling(){return s}};function a(t){setTimeout(function(){throw t})}var u={closed:!0,next:function(t){},error:function(t){if(c.useDeprecatedSynchronousErrorHandling)throw t;a(t)},complete:function(){}},h=Array.isArray||function(t){return t&&"number"==typeof t.length};function l(t){return null!=t&&"object"==typeof t}var p,f={e:{}};function d(){try{return p.apply(this,arguments)}catch(t){return f.e=t,f}}function y(t){return p=t,d}var m=function(t){function e(n){var r=t.call(this,n?n.length+" errors occurred during unsubscription:\n "+n.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"")||this;return r.errors=n,r.name="UnsubscriptionError",Object.setPrototypeOf(r,e.prototype),r}return o(e,t),e}(Error),v=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var n=this._parent,r=this._parents,o=this._unsubscribe,s=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var c=-1,a=r?r.length:0;n;)n.remove(this),n=++c<a&&r[c]||null;if(i(o))y(o).call(this)===f&&(e=!0,t=t||(f.e instanceof m?b(f.e.errors):[f.e]));if(h(s))for(c=-1,a=s.length;++c<a;){var u=s[c];if(l(u))if(y(u.unsubscribe).call(u)===f){e=!0,t=t||[];var p=f.e;p instanceof m?t=t.concat(b(p.errors)):t.push(p)}}if(e)throw new m(t)}},t.prototype.add=function(e){if(!e||e===t.EMPTY)return t.EMPTY;if(e===this)return this;var n=e;switch(typeof e){case"function":n=new t(e);case"object":if(n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if("function"!=typeof n._addParent){var r=n;(n=new t)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(n),n._addParent(this),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.prototype._addParent=function(t){var e=this._parent,n=this._parents;e&&e!==t?n?-1===n.indexOf(t)&&n.push(t):this._parents=[t]:this._parent=t},t.EMPTY=((e=new t).closed=!0,e),t}();function b(t){return t.reduce(function(t,e){return t.concat(e instanceof m?e.errors:e)},[])}var g="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("rxSubscriber"):"@@rxSubscriber",w=function(t){function e(e,n,r){var o,i=t.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=u;break;case 1:if(!e){i.destination=u;break}if("object"==typeof e){if((o=e)instanceof w||"syncErrorThrowable"in o&&o[g]){var s=e[g]();i.syncErrorThrowable=s.syncErrorThrowable,i.destination=s,s.add(i)}else i.syncErrorThrowable=!0,i.destination=new _(i,e);break}default:i.syncErrorThrowable=!0,i.destination=new _(i,e,n,r)}return i}return o(e,t),e.prototype[g]=function(){return this},e.create=function(t,n,r){var o=new e(t,n,r);return o.syncErrorThrowable=!1,o},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this},e}(v),_=function(t){function e(e,n,r,o){var s,c=t.call(this)||this;c._parentSubscriber=e;var a=c;return i(n)?s=n:n&&(s=n.next,r=n.error,o=n.complete,n!==u&&(i((a=Object.create(n)).unsubscribe)&&c.add(a.unsubscribe.bind(a)),a.unsubscribe=c.unsubscribe.bind(c))),c._context=a,c._next=s,c._error=r,c._complete=o,c}return o(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;c.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=c.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):a(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;a(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};c.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),c.useDeprecatedSynchronousErrorHandling)throw t;a(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!c.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return c.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(a(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(w);var x="function"==typeof Symbol&&Symbol.observable||"@@observable";function E(){}function C(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return k(t)}function k(t){return t?1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}:E}var S=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,o=function(t,e,n){if(t){if(t instanceof w)return t;if(t[g])return t[g]()}return t||e||n?new w(t,e,n):new w(u)}(t,e,n);if(r?r.call(o,this.source):o.add(this.source||!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),c.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){c.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=A(e))(function(e,r){var o;o=n.subscribe(function(e){try{t(e)}catch(t){r(t),o&&o.unsubscribe()}},r,e)})},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[x]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:k(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=A(t))(function(t,n){var r;e.subscribe(function(t){return r=t},function(t){return n(t)},function(){return t(r)})})},t.create=function(e){return new t(e)},t}();function A(t){if(t||(t=c.Promise||Promise),!t)throw new Error("no Promise impl found");return t}var N=function(t){function e(){var n=t.call(this,"object unsubscribed")||this;return n.name="ObjectUnsubscribedError",Object.setPrototypeOf(n,e.prototype),n}return o(e,t),e}(Error),T=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return o(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(v),P=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return o(e,t),e}(w),O=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return o(e,t),e.prototype[g]=function(){return new P(this)},e.prototype.lift=function(t){var e=new j(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new N;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].next(t)},e.prototype.error=function(t){if(this.closed)throw new N;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new N;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;r++)n[r].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new N;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new N;return this.hasError?(t.error(this.thrownError),v.EMPTY):this.isStopped?(t.complete(),v.EMPTY):(this.observers.push(t),new T(this,t))},e.prototype.asObservable=function(){var t=new S;return t.source=this,t},e.create=function(t,e){return new j(t,e)},e}(S),j=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return o(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):v.EMPTY},e}(O);var B=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new I(t,n),o=e.subscribe(r);return r.closed||(r.connection=n.connect()),o},t}(),I=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return o(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(w),M=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return o(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new v).add(this.source.subscribe(new F(this.getSubject(),this))),t.closed?(this._connection=null,t=v.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return(t=this).lift(new B(t));var t},e}(S),R=M.prototype,F=(R._subscribe,R._isComplete,R.getSubject,R.connect,R.refCount,function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return o(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(P));var D=function(t){function e(e,n,r){var o=t.call(this)||this;return o.key=e,o.groupSubject=n,o.refCountSubscription=r,o}return o(e,t),e.prototype._subscribe=function(t){var e=new v,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&e.add(new L(n)),e.add(r.subscribe(t)),e},e}(S),L=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return o(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(v),q=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return o(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new N;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(O),U=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return o(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(t){n=!0,r=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,n){return t.call(this)||this}return o(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(v)),V=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return o(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(U),H=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=Date.now?Date.now:function(){return+new Date},t}(),z=function(t){function e(n,r){void 0===r&&(r=H.now);var o=t.call(this,n,function(){return e.delegate&&e.delegate!==o?e.delegate.now():r()})||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return o(e,t),e.prototype.schedule=function(n,r,o){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,o):t.prototype.schedule.call(this,n,r,o)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(H),Y=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(z))(V),X=new S(function(t){return t.complete()});function W(t){return t?function(t){return new S(function(e){return t.schedule(function(){return e.complete()})})}(t):X}function J(t){return t&&"function"==typeof t.schedule}var K=function(t){return function(e){for(var n=0,r=t.length;n<r&&!e.closed;n++)e.next(t[n]);e.closed||e.complete()}};function $(t,e){return new S(e?function(n){var r=new v,o=0;return r.add(e.schedule(function(){o!==t.length?(n.next(t[o++]),n.closed||r.add(this.schedule())):n.complete()})),r}:K(t))}function G(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r,o=t[t.length-1];switch(J(o)?t.pop():o=void 0,t.length){case 0:return W(o);case 1:return o?$(t,o):(n=t[0],(r=new S(function(t){t.next(n),t.complete()}))._isScalar=!0,r.value=n,r);default:return $(t,o)}}function Q(t,e){return new S(e?function(n){return e.schedule(Z,0,{error:t,subscriber:n})}:function(e){return e.error(t)})}function Z(t){var e=t.error;t.subscriber.error(e)}var tt=function(){function t(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}},t.prototype.accept=function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)},t.prototype.toObservable=function(){switch(this.kind){case"N":return G(this.value);case"E":return Q(this.error);case"C":return W()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}();var et=function(t){function e(e,n,r){void 0===r&&(r=0);var o=t.call(this,e)||this;return o.scheduler=n,o.delay=r,o}return o(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.add(this.scheduler.schedule(e.dispatch,this.delay,new nt(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(tt.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(tt.createError(t))},e.prototype._complete=function(){this.scheduleMessage(tt.createComplete())},e}(w),nt=function(){return function(t,e){this.notification=t,this.destination=e}}(),rt=function(t){function e(e,n,r){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var o=t.call(this)||this;return o.scheduler=r,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=e<1?1:e,o._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return o(e,t),e.prototype.nextInfiniteTimeWindow=function(e){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift(),t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this._events.push(new ot(this._getNow(),e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,i=r.length;if(this.closed)throw new N;if(this.isStopped||this.hasError?e=v.EMPTY:(this.observers.push(t),e=new T(this,t)),o&&t.add(t=new et(t,o)),n)for(var s=0;s<i&&!t.closed;s++)t.next(r[s]);else for(s=0;s<i&&!t.closed;s++)t.next(r[s].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||Y).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,r=this._events,o=r.length,i=0;i<o&&!(t-r[i].time<n);)i++;return o>e&&(i=Math.max(i,o-e)),i>0&&r.splice(0,i),r},e}(O),ot=function(){return function(t,e){this.time=t,this.value=e}}(),it=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=null,e.hasNext=!1,e.hasCompleted=!1,e}return o(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),v.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),v.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(O),st=1,ct={};var at=function(t){var e=st++;return ct[e]=t,Promise.resolve().then(function(){return function(t){var e=ct[t];e&&e()}(e)}),e},ut=function(t){delete ct[t]},ht=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return o(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=at(e.flush.bind(e,null))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(ut(n),e.scheduled=void 0)},e}(U),lt=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,o=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<o&&(t=n.shift()));if(this.active=!1,e){for(;++r<o&&(t=n.shift());)t.unsubscribe();throw e}},e}(z))(ht),pt=new z(U),ft=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return o(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame(function(){return e.flush(null)})))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(cancelAnimationFrame(n),e.scheduled=void 0)},e}(U),dt=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,o=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<o&&(t=n.shift()));if(this.active=!1,e){for(;++r<o&&(t=n.shift());)t.unsubscribe();throw e}},e}(z))(ft),yt=function(t){function e(e,n){void 0===e&&(e=mt),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=t.call(this,e,function(){return r.frame})||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return o(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n.shift())&&(this.frame=e.delay)<=r&&!(t=e.execute(e.state,e.delay)););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10,e}(z),mt=function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var o=t.call(this,e,n)||this;return o.scheduler=e,o.work=n,o.index=r,o.active=!0,o.index=e.index=r,o}return o(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var o=new e(this.scheduler,this.work);return this.add(o),o.schedule(n,r)},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var o=t.actions;return o.push(this),o.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){void 0===n&&(n=0)},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(U);function vt(t){return t}function bt(t){return!!t&&(t instanceof S||"function"==typeof t.lift&&"function"==typeof t.subscribe)}var gt=function(t){function e(){var n=t.call(this,"argument out of range")||this;return n.name="ArgumentOutOfRangeError",Object.setPrototypeOf(n,e.prototype),n}return o(e,t),e}(Error),wt=function(t){function e(){var n=t.call(this,"no elements in sequence")||this;return n.name="EmptyError",Object.setPrototypeOf(n,e.prototype),n}return o(e,t),e}(Error),_t=function(t){function e(){var n=t.call(this,"Timeout has occurred")||this;return n.name="TimeoutError",Object.setPrototypeOf(n,e.prototype),n}return o(e,t),e}(Error);function xt(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new Et(t,e))}}var Et=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new Ct(t,this.project,this.thisArg))},t}(),Ct=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.project=n,o.count=0,o.thisArg=r||o,o}return o(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(w);function kt(t,e,n){if(e){if(!J(e))return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return kt(t,n).apply(void 0,r).pipe(xt(function(t){return h(t)?e.apply(void 0,t):e(t)}))};n=e}return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o,i=this,s={context:i,subject:o,callbackFunc:t,scheduler:n};return new S(function(r){if(n){var c={args:e,subscriber:r,params:s};return n.schedule(St,0,c)}if(!o){o=new it;try{t.apply(i,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];o.next(t.length<=1?t[0]:t),o.complete()}]))}catch(t){o.error(t)}}return o.subscribe(r)})}}function St(t){var e=this,n=t.args,r=t.subscriber,o=t.params,i=o.callbackFunc,s=o.context,c=o.scheduler,a=o.subject;if(!a){a=o.subject=new it;try{i.apply(s,n.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.length<=1?t[0]:t;e.add(c.schedule(At,0,{value:r,subject:a}))}]))}catch(t){a.error(t)}}this.add(a.subscribe(r))}function At(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function Nt(t,e,n){if(e){if(!J(e))return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return Nt(t,n).apply(void 0,r).pipe(xt(function(t){return h(t)?e.apply(void 0,t):e(t)}))};n=e}return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o={subject:void 0,args:e,callbackFunc:t,scheduler:n,context:this};return new S(function(r){var i=o.context,s=o.subject;if(n)return n.schedule(Tt,0,{params:o,subscriber:r,context:i});if(!s){s=o.subject=new it;try{t.apply(i,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.shift();n?s.error(n):(s.next(t.length<=1?t[0]:t),s.complete())}]))}catch(t){s.error(t)}}return s.subscribe(r)})}}function Tt(t){var e=this,n=t.params,r=t.subscriber,o=t.context,i=n.callbackFunc,s=n.args,c=n.scheduler,a=n.subject;if(!a){a=n.subject=new it;try{i.apply(o,s.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.shift();if(r)e.add(c.schedule(Ot,0,{err:r,subject:a}));else{var o=t.length<=1?t[0]:t;e.add(c.schedule(Pt,0,{value:o,subject:a}))}}]))}catch(t){this.add(c.schedule(Ot,0,{err:t,subject:a}))}}this.add(a.subscribe(r))}function Pt(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function Ot(t){var e=t.err;t.subject.error(e)}var jt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.notifyNext=function(t,e,n,r,o){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(w),Bt=function(t){function e(e,n,r){var o=t.call(this)||this;return o.parent=e,o.outerValue=n,o.outerIndex=r,o.index=0,o}return o(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(w),It=function(t){return function(e){return t.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,a),e}};var Mt=function(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}(),Rt=function(t){return function(e){for(var n=t[Mt]();;){var r=n.next();if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof n.return&&e.add(function(){n.return&&n.return()}),e}},Ft=function(t){return function(e){var n=t[x]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(e)}},Dt=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t};function Lt(t){return t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}var qt=function(t){if(t instanceof S)return function(e){return t._isScalar?(e.next(t.value),void e.complete()):t.subscribe(e)};if(Dt(t))return K(t);if(Lt(t))return It(t);if(t&&"function"==typeof t[Mt])return Rt(t);if(t&&"function"==typeof t[x])return Ft(t);var e=l(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+e+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};function Ut(t,e,n,r){var o=new Bt(t,n,r);return qt(e)(o)}var Vt={};function Ht(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=null,r=null;return J(t[t.length-1])&&(r=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&h(t[0])&&(t=t[0]),$(t,r).lift(new zt(n))}var zt=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Yt(t,this.resultSelector))},t}(),Yt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return o(e,t),e.prototype._next=function(t){this.values.push(Vt),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var r=t[n];this.add(Ut(this,r,r,n))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,o){var i=this.values,s=i[n],c=this.toRespond?s===Vt?--this.toRespond:this.toRespond:0;i[n]=e,0===c&&(this.resultSelector?this._tryResultSelector(i):this.destination.next(i.slice()))},e.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(jt);function Xt(t,e){if(!e)return t instanceof S?t:new S(qt(t));if(null!=t){if(function(t){return t&&"function"==typeof t[x]}(t))return function(t,e){return new S(e?function(n){var r=new v;return r.add(e.schedule(function(){var o=t[x]();r.add(o.subscribe({next:function(t){r.add(e.schedule(function(){return n.next(t)}))},error:function(t){r.add(e.schedule(function(){return n.error(t)}))},complete:function(){r.add(e.schedule(function(){return n.complete()}))}}))})),r}:Ft(t))}(t,e);if(Lt(t))return function(t,e){return new S(e?function(n){var r=new v;return r.add(e.schedule(function(){return t.then(function(t){r.add(e.schedule(function(){n.next(t),r.add(e.schedule(function(){return n.complete()}))}))},function(t){r.add(e.schedule(function(){return n.error(t)}))})})),r}:It(t))}(t,e);if(Dt(t))return $(t,e);if(function(t){return t&&"function"==typeof t[Mt]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new S(e?function(n){var r,o=new v;return o.add(function(){r&&"function"==typeof r.return&&r.return()}),o.add(e.schedule(function(){r=t[Mt](),o.add(e.schedule(function(){if(!n.closed){var t,e;try{var o=r.next();t=o.value,e=o.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}}))})),o}:Rt(t))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}var Wt=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new Jt(t,this.project,this.concurrent))},t}(),Jt=function(t){function e(e,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var o=t.call(this,e)||this;return o.project=n,o.concurrent=r,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return o(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){this.add(Ut(this,t,e,n))},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,o){this.destination.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(jt);function Kt(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),function t(e,n,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof n?function(o){return o.pipe(t(function(t,r){return Xt(e(t,r)).pipe(xt(function(e,o){return n(t,e,r,o)}))},r))}:("number"==typeof n&&(r=n),function(t){return t.lift(new Wt(e,r))})}(vt,t)}function $t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length||2===t.length&&J(t[1])?Xt(t[0]):Kt(1)(G.apply(void 0,t))}function Gt(t){return new S(function(e){var n;try{n=t()}catch(t){return void e.error(t)}return(n?Xt(n):W()).subscribe(e)})}function Qt(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return"function"==typeof e[e.length-1]&&(t=e.pop()),1===e.length&&h(e[0])&&(e=e[0]),0===e.length?X:t?Qt(e).pipe(xt(function(e){return t.apply(void 0,e)})):new S(function(t){return new Zt(t,e)})}var Zt=function(t){function e(e,n){var r=t.call(this,e)||this;r.sources=n,r.completed=0,r.haveValues=0;var o=n.length;r.values=new Array(o);for(var i=0;i<o;i++){var s=Ut(r,n[i],null,i);s&&r.add(s)}return r}return o(e,t),e.prototype.notifyNext=function(t,e,n,r,o){this.values[n]=e,o._hasValue||(o._hasValue=!0,this.haveValues++)},e.prototype.notifyComplete=function(t){var e=this.destination,n=this.haveValues,r=this.values,o=r.length;t._hasValue?(this.completed++,this.completed===o&&(n===o&&e.next(r),e.complete())):e.complete()},e}(jt);Object.prototype.toString;function te(t,e,n,r){return i(n)&&(r=n,n=void 0),r?te(t,e,n).pipe(xt(function(t){return h(t)?r.apply(void 0,t):r(t)})):new S(function(r){!function t(e,n,r,o,i){var s;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(e)){var c=e;e.addEventListener(n,r,i),s=function(){return c.removeEventListener(n,r,i)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(e)){var a=e;e.on(n,r),s=function(){return a.off(n,r)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){var u=e;e.addListener(n,r),s=function(){return u.removeListener(n,r)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var h=0,l=e.length;h<l;h++)t(e[h],n,r,o,i)}o.add(s)}(t,e,function(t){arguments.length>1?r.next(Array.prototype.slice.call(arguments)):r.next(t)},r,n)})}function ee(t,e,n){return n?ee(t,e).pipe(xt(function(t){return h(t)?n.apply(void 0,t):n(t)})):new S(function(n){var r,o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n.next(1===t.length?t[0]:t)};try{r=t(o)}catch(t){return void n.error(t)}if(i(e))return function(){return e(o,r)}})}function ne(t,e,n,r,o){var i,s;if(1==arguments.length){var c=t;s=c.initialState,e=c.condition,n=c.iterate,i=c.resultSelector||vt,o=c.scheduler}else void 0===r||J(r)?(s=t,i=vt,o=r):(s=t,i=r);return new S(function(t){var r=s;if(o)return o.schedule(re,0,{subscriber:t,iterate:n,condition:e,resultSelector:i,state:r});for(;;){if(e){var c=void 0;try{c=e(r)}catch(e){return void t.error(e)}if(!c){t.complete();break}}var a=void 0;try{a=i(r)}catch(e){return void t.error(e)}if(t.next(a),t.closed)break;try{r=n(r)}catch(e){return void t.error(e)}}})}function re(t){var e=t.subscriber,n=t.condition;if(!e.closed){if(t.needIterate)try{t.state=t.iterate(t.state)}catch(t){return void e.error(t)}else t.needIterate=!0;if(n){var r=void 0;try{r=n(t.state)}catch(t){return void e.error(t)}if(!r)return void e.complete();if(e.closed)return}var o;try{o=t.resultSelector(t.state)}catch(t){return void e.error(t)}if(!e.closed&&(e.next(o),!e.closed))return this.schedule(t)}}function oe(t,e,n){return void 0===e&&(e=X),void 0===n&&(n=X),Gt(function(){return t()?e:n})}function ie(t){return!h(t)&&t-parseFloat(t)+1>=0}function se(t,e){return void 0===t&&(t=0),void 0===e&&(e=pt),(!ie(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=pt),new S(function(n){return n.add(e.schedule(ce,t,{subscriber:n,counter:0,period:t})),n})}function ce(t){var e=t.subscriber,n=t.counter,r=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:r},r)}function ae(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,r=null,o=t[t.length-1];return J(o)?(r=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof o&&(n=t.pop()),null===r&&1===t.length&&t[0]instanceof S?t[0]:Kt(n)($(t,r))}var ue=new S(E);function he(){return ue}function le(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return X;var n=t[0],r=t.slice(1);return 1===t.length&&h(n)?le.apply(void 0,n):new S(function(t){var e=function(){return t.add(le.apply(void 0,r).subscribe(t))};return Xt(n).subscribe({next:function(e){t.next(e)},error:e,complete:e})})}function pe(t,e){return new S(e?function(n){var r=Object.keys(t),o=new v;return o.add(e.schedule(fe,0,{keys:r,index:0,subscriber:n,subscription:o,obj:t})),o}:function(e){for(var n=Object.keys(t),r=0;r<n.length&&!e.closed;r++){var o=n[r];t.hasOwnProperty(o)&&e.next([o,t[o]])}e.complete()})}function fe(t){var e=t.keys,n=t.index,r=t.subscriber,o=t.subscription,i=t.obj;if(!r.closed)if(n<e.length){var s=e[n];r.next([s,i[s]]),o.add(this.schedule({keys:e,index:n+1,subscriber:r,subscription:o,obj:i}))}else r.complete()}function de(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!h(t[0]))return t[0];t=t[0]}return $(t,void 0).lift(new ye)}var ye=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new me(t))},t}(),me=function(t){function e(e){var n=t.call(this,e)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return o(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var n=0;n<e&&!this.hasFirst;n++){var r=t[n],o=Ut(this,r,r,n);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},e.prototype.notifyNext=function(t,e,n,r,o){if(!this.hasFirst){this.hasFirst=!0;for(var i=0;i<this.subscriptions.length;i++)if(i!==n){var s=this.subscriptions[i];s.unsubscribe(),this.remove(s)}this.subscriptions=null}this.destination.next(e)},e}(jt);function ve(t,e,n){return void 0===t&&(t=0),void 0===e&&(e=0),new S(function(r){var o=0,i=t;if(n)return n.schedule(be,0,{index:o,count:e,start:t,subscriber:r});for(;;){if(o++>=e){r.complete();break}if(r.next(i++),r.closed)break}})}function be(t){var e=t.start,n=t.index,r=t.count,o=t.subscriber;n>=r?o.complete():(o.next(e),o.closed||(t.index=n+1,t.start=e+1,this.schedule(t)))}function ge(t,e,n){void 0===t&&(t=0);var r=-1;return ie(e)?r=Number(e)<1?1:Number(e):J(e)&&(n=e),J(n)||(n=pt),new S(function(e){var o=ie(t)?t:+t-n.now();return n.schedule(we,o,{index:0,period:r,subscriber:e})})}function we(t){var e=t.index,n=t.period,r=t.subscriber;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n)}}function _e(t,e){return new S(function(n){var r,o;try{r=t()}catch(t){return void n.error(t)}try{o=e(r)}catch(t){return void n.error(t)}var i=(o?Xt(o):X).subscribe(n);return function(){i.unsubscribe(),r&&r.unsubscribe()}})}function xe(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return"function"==typeof n&&t.pop(),$(t,void 0).lift(new Ee(n))}var Ee=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Ce(t,this.resultSelector))},t}(),Ce=function(t){function e(e,n,r){void 0===r&&(r=Object.create(null));var o=t.call(this,e)||this;return o.iterators=[],o.active=0,o.resultSelector="function"==typeof n?n:null,o.values=r,o}return o(e,t),e.prototype._next=function(t){var e=this.iterators;h(t)?e.push(new Se(t)):"function"==typeof t[Mt]?e.push(new ke(t[Mt]())):e.push(new Ae(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(0!==e){this.active=e;for(var n=0;n<e;n++){var r=t[n];r.stillUnsubscribed?this.add(r.subscribe(r,n)):this.active--}}else this.destination.complete()},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,n=this.destination,r=0;r<e;r++){if("function"==typeof(s=t[r]).hasValue&&!s.hasValue())return}var o=!1,i=[];for(r=0;r<e;r++){var s,c=(s=t[r]).next();if(s.hasCompleted()&&(o=!0),c.done)return void n.complete();i.push(c.value)}this.resultSelector?this._tryresultSelector(i):n.next(i),o&&n.complete()},e.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(w),ke=function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return t&&t.done},t}(),Se=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[Mt]=function(){return this},t.prototype.next=function(t){var e=this.index++,n=this.array;return e<this.length?{value:n[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),Ae=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.parent=n,o.observable=r,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return o(e,t),e.prototype[Mt]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,o){this.buffer.push(e),this.parent.checkIterators()},e.prototype.subscribe=function(t,e){return Ut(this,this.observable,this,e)},e}(jt);n.d(e,"Observable",function(){return S}),n.d(e,"ConnectableObservable",function(){return M}),n.d(e,"GroupedObservable",function(){return D}),n.d(e,"observable",function(){return x}),n.d(e,"Subject",function(){return O}),n.d(e,"BehaviorSubject",function(){return q}),n.d(e,"ReplaySubject",function(){return rt}),n.d(e,"AsyncSubject",function(){return it}),n.d(e,"asapScheduler",function(){return lt}),n.d(e,"asyncScheduler",function(){return pt}),n.d(e,"queueScheduler",function(){return Y}),n.d(e,"animationFrameScheduler",function(){return dt}),n.d(e,"VirtualTimeScheduler",function(){return yt}),n.d(e,"VirtualAction",function(){return mt}),n.d(e,"Scheduler",function(){return H}),n.d(e,"Subscription",function(){return v}),n.d(e,"Subscriber",function(){return w}),n.d(e,"Notification",function(){return tt}),n.d(e,"pipe",function(){return C}),n.d(e,"noop",function(){return E}),n.d(e,"identity",function(){return vt}),n.d(e,"isObservable",function(){return bt}),n.d(e,"ArgumentOutOfRangeError",function(){return gt}),n.d(e,"EmptyError",function(){return wt}),n.d(e,"ObjectUnsubscribedError",function(){return N}),n.d(e,"UnsubscriptionError",function(){return m}),n.d(e,"TimeoutError",function(){return _t}),n.d(e,"bindCallback",function(){return kt}),n.d(e,"bindNodeCallback",function(){return Nt}),n.d(e,"combineLatest",function(){return Ht}),n.d(e,"concat",function(){return $t}),n.d(e,"defer",function(){return Gt}),n.d(e,"empty",function(){return W}),n.d(e,"forkJoin",function(){return Qt}),n.d(e,"from",function(){return Xt}),n.d(e,"fromEvent",function(){return te}),n.d(e,"fromEventPattern",function(){return ee}),n.d(e,"generate",function(){return ne}),n.d(e,"iif",function(){return oe}),n.d(e,"interval",function(){return se}),n.d(e,"merge",function(){return ae}),n.d(e,"never",function(){return he}),n.d(e,"of",function(){return G}),n.d(e,"onErrorResumeNext",function(){return le}),n.d(e,"pairs",function(){return pe}),n.d(e,"race",function(){return de}),n.d(e,"range",function(){return ve}),n.d(e,"throwError",function(){return Q}),n.d(e,"timer",function(){return ge}),n.d(e,"using",function(){return _e}),n.d(e,"zip",function(){return xe}),n.d(e,"EMPTY",function(){return X}),n.d(e,"NEVER",function(){return ue}),n.d(e,"config",function(){return c})},function(t,e){function n(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}t.exports=n,n.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(t){this.ms=t},n.prototype.setMax=function(t){this.max=t},n.prototype.setJitter=function(t){this.jitter=t}},function(t,e){t.exports=function(t,e){for(var n=[],r=(e=e||0)||0;r<t.length;r++)n[r-e]=t[r];return n}},function(t,e){},function(t,e,n){(function(e){var r,o=n(8),i=n(2),s=n(6),c=n(5),a=n(18),u=n(1)("engine.io-client:websocket"),h=e.WebSocket||e.MozWebSocket;if("undefined"==typeof window)try{r=n(30)}catch(t){}var l=h;function p(t){t&&t.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=t.perMessageDeflate,this.usingBrowserWebSocket=h&&!t.forceNode,this.protocols=t.protocols,this.usingBrowserWebSocket||(l=r),o.call(this,t)}l||"undefined"!=typeof window||(l=r),t.exports=p,c(p,o),p.prototype.name="websocket",p.prototype.supportsBinary=!0,p.prototype.doOpen=function(){if(this.check()){var t=this.uri(),e=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?e?new l(t,e):new l(t):new l(t,e,n)}catch(t){return this.emit("error",t)}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()}},p.prototype.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.onOpen()},this.ws.onclose=function(){t.onClose()},this.ws.onmessage=function(e){t.onData(e.data)},this.ws.onerror=function(e){t.onError("websocket error",e)}},p.prototype.write=function(t){var n=this;this.writable=!1;for(var r=t.length,o=0,s=r;o<s;o++)!function(t){i.encodePacket(t,n.supportsBinary,function(o){if(!n.usingBrowserWebSocket){var i={};if(t.options&&(i.compress=t.options.compress),n.perMessageDeflate)("string"==typeof o?e.Buffer.byteLength(o):o.length)<n.perMessageDeflate.threshold&&(i.compress=!1)}try{n.usingBrowserWebSocket?n.ws.send(o):n.ws.send(o,i)}catch(t){u("websocket closed before onclose event")}--r||c()})}(t[o]);function c(){n.emit("flush"),setTimeout(function(){n.writable=!0,n.emit("drain")},0)}},p.prototype.onClose=function(){o.prototype.onClose.call(this)},p.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},p.prototype.uri=function(){var t=this.query||{},e=this.secure?"wss":"ws",n="";return this.port&&("wss"===e&&443!==Number(this.port)||"ws"===e&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(t[this.timestampParam]=a()),this.supportsBinary||(t.b64=1),(t=s.encode(t)).length&&(t="?"+t),e+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+t},p.prototype.check=function(){return!(!l||"__initialize"in l&&this.name===p.prototype.name)}}).call(this,n(0))},function(t,e,n){(function(e){var r=n(20),o=n(5);t.exports=u;var i,s=/\n/g,c=/\\n/g;function a(){}function u(t){r.call(this,t),this.query=this.query||{},i||(e.___eio||(e.___eio=[]),i=e.___eio),this.index=i.length;var n=this;i.push(function(t){n.onData(t)}),this.query.j=this.index,e.document&&e.addEventListener&&e.addEventListener("beforeunload",function(){n.script&&(n.script.onerror=a)},!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 t=this,e=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),e.async=!0,e.src=this.uri(),e.onerror=function(e){t.onError("jsonp poll error",e)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(e,n):(document.head||document.body).appendChild(e),this.script=e,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout(function(){var t=document.createElement("iframe");document.body.appendChild(t),document.body.removeChild(t)},100)},u.prototype.doWrite=function(t,e){var n=this;if(!this.form){var r,o=document.createElement("form"),i=document.createElement("textarea"),a=this.iframeId="eio_iframe_"+this.index;o.className="socketio",o.style.position="absolute",o.style.top="-1000px",o.style.left="-1000px",o.target=a,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(){h(),e()}function h(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(t){n.onError("jsonp polling iframe removal error",t)}try{var t='<iframe src="javascript:0" name="'+n.iframeId+'">';r=document.createElement(t)}catch(t){(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(),h(),t=t.replace(c,"\\\n"),this.area.value=t.replace(s,"\\n");try{this.form.submit()}catch(t){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===n.iframe.readyState&&u()}:this.iframe.onload=u}}).call(this,n(0))},function(t,e,n){(function(e){var n=e.BlobBuilder||e.WebKitBlobBuilder||e.MSBlobBuilder||e.MozBlobBuilder,r=function(){try{return 2===new Blob(["hi"]).size}catch(t){return!1}}(),o=r&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(t){return!1}}(),i=n&&n.prototype.append&&n.prototype.getBlob;function s(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.buffer instanceof ArrayBuffer){var r=n.buffer;if(n.byteLength!==r.byteLength){var o=new Uint8Array(n.byteLength);o.set(new Uint8Array(r,n.byteOffset,n.byteLength)),r=o.buffer}t[e]=r}}}function c(t,e){e=e||{};var r=new n;s(t);for(var o=0;o<t.length;o++)r.append(t[o]);return e.type?r.getBlob(e.type):r.getBlob()}function a(t,e){return s(t),new Blob(t,e||{})}t.exports=r?o?e.Blob:a:i?c:void 0}).call(this,n(0))},function(t,e){!function(){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),r=0;r<t.length;r++)n[t.charCodeAt(r)]=r;e.encode=function(e){var n,r=new Uint8Array(e),o=r.length,i="";for(n=0;n<o;n+=3)i+=t[r[n]>>2],i+=t[(3&r[n])<<4|r[n+1]>>4],i+=t[(15&r[n+1])<<2|r[n+2]>>6],i+=t[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},e.decode=function(t){var e,r,o,i,s,c=.75*t.length,a=t.length,u=0;"="===t[t.length-1]&&(c--,"="===t[t.length-2]&&c--);var h=new ArrayBuffer(c),l=new Uint8Array(h);for(e=0;e<a;e+=4)r=n[t.charCodeAt(e)],o=n[t.charCodeAt(e+1)],i=n[t.charCodeAt(e+2)],s=n[t.charCodeAt(e+3)],l[u++]=r<<2|o>>4,l[u++]=(15&o)<<4|i>>2,l[u++]=(3&i)<<6|63&s;return h}}()},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){(function(t,r){var o;/*! https://mths.be/utf8js v2.1.2 by @mathias */!function(i){var s="object"==typeof e&&e,c=("object"==typeof t&&t&&t.exports,"object"==typeof r&&r);c.global!==c&&c.window;var a,u,h,l=String.fromCharCode;function p(t){for(var e,n,r=[],o=0,i=t.length;o<i;)(e=t.charCodeAt(o++))>=55296&&e<=56319&&o<i?56320==(64512&(n=t.charCodeAt(o++)))?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),o--):r.push(e);return r}function f(t,e){if(t>=55296&&t<=57343){if(e)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function d(t,e){return l(t>>e&63|128)}function y(t,e){if(0==(4294967168&t))return l(t);var n="";return 0==(4294965248&t)?n=l(t>>6&31|192):0==(4294901760&t)?(f(t,e)||(t=65533),n=l(t>>12&15|224),n+=d(t,6)):0==(4292870144&t)&&(n=l(t>>18&7|240),n+=d(t,12),n+=d(t,6)),n+=l(63&t|128)}function m(){if(h>=u)throw Error("Invalid byte index");var t=255&a[h];if(h++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function v(t){var e,n;if(h>u)throw Error("Invalid byte index");if(h==u)return!1;if(e=255&a[h],h++,0==(128&e))return e;if(192==(224&e)){if((n=(31&e)<<6|m())>=128)return n;throw Error("Invalid continuation byte")}if(224==(240&e)){if((n=(15&e)<<12|m()<<6|m())>=2048)return f(n,t)?n:65533;throw Error("Invalid continuation byte")}if(240==(248&e)&&(n=(7&e)<<18|m()<<12|m()<<6|m())>=65536&&n<=1114111)return n;throw Error("Invalid UTF-8 detected")}var b={version:"2.1.2",encode:function(t,e){for(var n=!1!==(e=e||{}).strict,r=p(t),o=r.length,i=-1,s="";++i<o;)s+=y(r[i],n);return s},decode:function(t,e){var n=!1!==(e=e||{}).strict;a=p(t),u=a.length,h=0;for(var r,o=[];!1!==(r=v(n));)o.push(r);return function(t){for(var e,n=t.length,r=-1,o="";++r<n;)(e=t[r])>65535&&(o+=l((e-=65536)>>>10&1023|55296),e=56320|1023&e),o+=l(e);return o}(o)}};void 0===(o=function(){return b}.call(e,n,e,t))||(t.exports=o)}()}).call(this,n(35)(t),n(0))},function(t,e){function n(){}t.exports=function(t,e,r){var o=!1;return r=r||n,i.count=t,0===t?e():i;function i(t,n){if(i.count<=0)throw new Error("after called too many times");--i.count,t?(o=!0,e(t),e=r):0!==i.count||o||e(null,n)}}},function(t,e){t.exports=function(t,e,n){var r=t.byteLength;if(e=e||0,n=n||r,t.slice)return t.slice(e,n);if(e<0&&(e+=r),n<0&&(n+=r),n>r&&(n=r),e>=r||e>=n||0===r)return new ArrayBuffer(0);for(var o=new Uint8Array(t),i=new Uint8Array(n-e),s=e,c=0;s<n;s++,c++)i[c]=o[s];return i.buffer}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){t.exports=Object.keys||function(t){var e=[],n=Object.prototype.hasOwnProperty;for(var r in t)n.call(t,r)&&e.push(r);return e}},function(t,e,n){(function(e){var r=n(9),o=n(20),i=n(3),s=n(5),c=n(1)("engine.io-client:polling-xhr");function a(){}function u(t){if(o.call(this,t),this.requestTimeout=t.requestTimeout,this.extraHeaders=t.extraHeaders,e.location){var n="https:"===location.protocol,r=location.port;r||(r=n?443:80),this.xd=t.hostname!==e.location.hostname||r!==t.port,this.xs=t.secure!==n}}function h(t){this.method=t.method||"GET",this.uri=t.uri,this.xd=!!t.xd,this.xs=!!t.xs,this.async=!1!==t.async,this.data=void 0!==t.data?t.data:null,this.agent=t.agent,this.isBinary=t.isBinary,this.supportsBinary=t.supportsBinary,this.enablesXDR=t.enablesXDR,this.requestTimeout=t.requestTimeout,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.extraHeaders=t.extraHeaders,this.create()}function l(){for(var t in h.requests)h.requests.hasOwnProperty(t)&&h.requests[t].abort()}t.exports=u,t.exports.Request=h,s(u,o),u.prototype.supportsBinary=!0,u.prototype.request=function(t){return(t=t||{}).uri=this.uri(),t.xd=this.xd,t.xs=this.xs,t.agent=this.agent||!1,t.supportsBinary=this.supportsBinary,t.enablesXDR=this.enablesXDR,t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized,t.requestTimeout=this.requestTimeout,t.extraHeaders=this.extraHeaders,new h(t)},u.prototype.doWrite=function(t,e){var n="string"!=typeof t&&void 0!==t,r=this.request({method:"POST",data:t,isBinary:n}),o=this;r.on("success",e),r.on("error",function(t){o.onError("xhr post error",t)}),this.sendXhr=r},u.prototype.doPoll=function(){c("xhr poll");var t=this.request(),e=this;t.on("data",function(t){e.onData(t)}),t.on("error",function(t){e.onError("xhr poll error",t)}),this.pollXhr=t},i(h.prototype),h.prototype.create=function(){var t={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized;var n=this.xhr=new r(t),o=this;try{c("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(t){}if("POST"===this.method)try{this.isBinary?n.setRequestHeader("Content-type","application/octet-stream"):n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{n.setRequestHeader("Accept","*/*")}catch(t){}"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 t=n.getResponseHeader("Content-Type");o.supportsBinary&&"application/octet-stream"===t&&(n.responseType="arraybuffer")}catch(t){}4===n.readyState&&(200===n.status||1223===n.status?o.onLoad():setTimeout(function(){o.onError(n.status)},0))},c("xhr data %s",this.data),n.send(this.data)}catch(t){return void setTimeout(function(){o.onError(t)},0)}e.document&&(this.index=h.requestsCount++,h.requests[this.index]=this)},h.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},h.prototype.onData=function(t){this.emit("data",t),this.onSuccess()},h.prototype.onError=function(t){this.emit("error",t),this.cleanup(!0)},h.prototype.cleanup=function(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=a:this.xhr.onreadystatechange=a,t)try{this.xhr.abort()}catch(t){}e.document&&delete h.requests[this.index],this.xhr=null}},h.prototype.onLoad=function(){var t;try{var e;try{e=this.xhr.getResponseHeader("Content-Type")}catch(t){}t="application/octet-stream"===e&&this.xhr.response||this.xhr.responseText}catch(t){this.onError(t)}null!=t&&this.onData(t)},h.prototype.hasXDR=function(){return void 0!==e.XDomainRequest&&!this.xs&&this.enablesXDR},h.prototype.abort=function(){this.cleanup()},h.requestsCount=0,h.requests={},e.document&&(e.attachEvent?e.attachEvent("onunload",l):e.addEventListener&&e.addEventListener("beforeunload",l,!1))}).call(this,n(0))},function(t,e){try{t.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){t.exports=!1}},function(t,e,n){(function(e){var r=n(21),o=n(3),i=n(1)("engine.io-client:socket"),s=n(17),c=n(2),a=n(25),u=n(6);function h(t,n){if(!(this instanceof h))return new h(t,n);n=n||{},t&&"object"==typeof t&&(n=t,t=null),t?(t=a(t),n.hostname=t.host,n.secure="https"===t.protocol||"wss"===t.protocol,n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=a(n.host).host),this.secure=null!=n.secure?n.secure:e.location&&"https:"===location.protocol,n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.agent=n.agent||!1,this.hostname=n.hostname||(e.location?location.hostname:"localhost"),this.port=n.port||(e.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 e&&e;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()}t.exports=h,h.priorWebsocketSuccess=!1,o(h.prototype),h.protocol=c.protocol,h.Socket=h,h.Transport=n(8),h.transports=n(21),h.parser=n(2),h.prototype.createTransport=function(t){i('creating transport "%s"',t);var e=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}(this.query);e.EIO=c.protocol,e.transport=t;var n=this.transportOptions[t]||{};return this.id&&(e.sid=this.id),new r[t]({query:e,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})},h.prototype.open=function(){var t;if(this.rememberUpgrade&&h.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length){var e=this;return void setTimeout(function(){e.emit("error","No transports available")},0)}t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)},h.prototype.setTransport=function(t){i("setting transport %s",t.name);var e=this;this.transport&&(i("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",function(){e.onDrain()}).on("packet",function(t){e.onPacket(t)}).on("error",function(t){e.onError(t)}).on("close",function(){e.onClose("transport close")})},h.prototype.probe=function(t){i('probing transport "%s"',t);var e=this.createTransport(t,{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',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",function(o){if(!n)if("pong"===o.type&&"probe"===o.data){if(i('probe transport "%s" pong',t),r.upgrading=!0,r.emit("upgrading",e),!e)return;h.priorWebsocketSuccess="websocket"===e.name,i('pausing current transport "%s"',r.transport.name),r.transport.pause(function(){n||"closed"!==r.readyState&&(i("changing transport and sending upgrade packet"),p(),r.setTransport(e),e.send([{type:"upgrade"}]),r.emit("upgrade",e),e=null,r.upgrading=!1,r.flush())})}else{i('probe transport "%s" failed',t);var s=new Error("probe error");s.transport=e.name,r.emit("upgradeError",s)}}))}function s(){n||(n=!0,p(),e.close(),e=null)}function c(n){var o=new Error("probe error: "+n);o.transport=e.name,s(),i('probe transport "%s" failed because of error: %s',t,n),r.emit("upgradeError",o)}function a(){c("transport closed")}function u(){c("socket closed")}function l(t){e&&t.name!==e.name&&(i('"%s" works - aborting "%s"',t.name,e.name),s())}function p(){e.removeListener("open",o),e.removeListener("error",c),e.removeListener("close",a),r.removeListener("close",u),r.removeListener("upgrading",l)}h.priorWebsocketSuccess=!1,e.once("open",o),e.once("error",c),e.once("close",a),this.once("close",u),this.once("upgrading",l),e.open()},h.prototype.onOpen=function(){if(i("socket open"),this.readyState="open",h.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){i("starting upgrade probes");for(var t=0,e=this.upgrades.length;t<e;t++)this.probe(this.upgrades[t])}},h.prototype.onPacket=function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(i('socket receive: type "%s", data "%s"',t.type,t.data),this.emit("packet",t),this.emit("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emit("data",t.data),this.emit("message",t.data)}else i('packet received with socket readyState "%s"',this.readyState)},h.prototype.onHandshake=function(t){this.emit("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},h.prototype.onHeartbeat=function(t){clearTimeout(this.pingTimeoutTimer);var e=this;e.pingTimeoutTimer=setTimeout(function(){"closed"!==e.readyState&&e.onClose("ping timeout")},t||e.pingInterval+e.pingTimeout)},h.prototype.setPing=function(){var t=this;clearTimeout(t.pingIntervalTimer),t.pingIntervalTimer=setTimeout(function(){i("writing ping packet - expecting pong within %sms",t.pingTimeout),t.ping(),t.onHeartbeat(t.pingTimeout)},t.pingInterval)},h.prototype.ping=function(){var t=this;this.sendPacket("ping",function(){t.emit("ping")})},h.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},h.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"))},h.prototype.write=h.prototype.send=function(t,e,n){return this.sendPacket("message",t,e,n),this},h.prototype.sendPacket=function(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var o={type:t,data:e,options:n};this.emit("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}},h.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var t=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?r():e()}):this.upgrading?r():e()}function e(){t.onClose("forced close"),i("socket closing - telling transport to close"),t.transport.close()}function n(){t.removeListener("upgrade",n),t.removeListener("upgradeError",n),e()}function r(){t.once("upgrade",n),t.once("upgradeError",n)}return this},h.prototype.onError=function(t){i("socket error %j",t),h.priorWebsocketSuccess=!1,this.emit("error",t),this.onClose("transport error",t)},h.prototype.onClose=function(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){i('socket close with reason: "%s"',t);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",t,e),this.writeBuffer=[],this.prevBufferLen=0}},h.prototype.filterUpgrades=function(t){for(var e=[],n=0,r=t.length;n<r;n++)~s(this.transports,t[n])&&e.push(t[n]);return e}}).call(this,n(0))},function(t,e,n){t.exports=n(43),t.exports.parser=n(2)},function(t,e,n){(function(t){var r=n(24),o=n(23),i=Object.prototype.toString,s="function"==typeof t.Blob||"[object BlobConstructor]"===i.call(t.Blob),c="function"==typeof t.File||"[object FileConstructor]"===i.call(t.File);e.deconstructPacket=function(t){var e=[],n=t.data,i=t;return i.data=function t(e,n){if(!e)return e;if(o(e)){var i={_placeholder:!0,num:n.length};return n.push(e),i}if(r(e)){for(var s=new Array(e.length),c=0;c<e.length;c++)s[c]=t(e[c],n);return s}if("object"==typeof e&&!(e instanceof Date)){var s={};for(var a in e)s[a]=t(e[a],n);return s}return e}(n,e),i.attachments=e.length,{packet:i,buffers:e}},e.reconstructPacket=function(t,e){return t.data=function t(e,n){if(!e)return e;if(e&&e._placeholder)return n[e.num];if(r(e))for(var o=0;o<e.length;o++)e[o]=t(e[o],n);else if("object"==typeof e)for(var i in e)e[i]=t(e[i],n);return e}(t.data,e),t.attachments=void 0,t},e.removeBlobs=function(t,e){var n=0,i=t;!function t(a,u,h){if(!a)return a;if(s&&a instanceof Blob||c&&a instanceof File){n++;var l=new FileReader;l.onload=function(){h?h[u]=this.result:i=this.result,--n||e(i)},l.readAsArrayBuffer(a)}else if(r(a))for(var p=0;p<a.length;p++)t(a[p],p,a);else if("object"==typeof a&&!o(a))for(var f in a)t(a[f],f,a)}(i),n||e(i)}}).call(this,n(0))},function(t,e,n){(function(e){var r=n(25),o=n(1)("socket.io-client:url");t.exports=function(t,n){var i=t;n=n||e.location,null==t&&(t=n.protocol+"//"+n.host);"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(o("protocol-less url %s",t),t=void 0!==n?n.protocol+"//"+t:"https://"+t),o("parse %s",t),i=r(t));i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443"));i.path=i.path||"/";var s=-1!==i.host.indexOf(":")?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+s+":"+i.port,i.href=i.protocol+"://"+s+(n&&n.port===i.port?"":":"+i.port),i}}).call(this,n(0))},function(t,e,n){var r=n(46),o=n(10),i=n(22),s=n(1)("socket.io-client");t.exports=e=a;var c=e.managers={};function a(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,o=r(t),a=o.source,u=o.id,h=o.path,l=c[u]&&h in c[u].nsps;return e.forceNew||e["force new connection"]||!1===e.multiplex||l?(s("ignoring socket cache for %s",a),n=i(a,e)):(c[u]||(s("new io instance for %s",a),c[u]=i(a,e)),n=c[u]),o.query&&!e.query&&(e.query=o.query),n.socket(o.path,e)}e.protocol=o.protocol,e.connect=a,e.Manager=n(22),e.Socket=n(16)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(27);e.BehaviorSubject=r.BehaviorSubject},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(n(48))},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function c(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(s,c)}a((r=r.apply(t,e||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0});const o=n(1),i=n(13),s=n(49);e.default=class{constructor(t){this.config=t,this.views={},this.frames={}}setMethods(t){this.navigate=t.navigate,this.dispatch=t.dispatch,this.seansStatusEmitter=t.seansStatusEmitter,this.networkStatusEmitter=t.networkStatusEmitter,this.historyContext=t.historyContext}loadPage(t){return r(this,void 0,void 0,function*(){yield this.loadViews(t),t.frames.map(t=>{this.frames[t.frameId]=this.createFrame(t)}),this.renderFrame(t.rootFrame,t),this.currentPage=t})}newPage(t){return r(this,void 0,void 0,function*(){o("neweb:renderer")("new page",t),yield this.loadViews(t);const e=[];t.frames.map(t=>r(this,void 0,void 0,function*(){if(this.frames[t.frameId]){const e=this.frames[t.frameId];JSON.stringify(e.params.getValue())!==t.params&&e.params.next(t.params)}else this.frames[t.frameId]=this.createFrame(t),e.push(t.frameId)})),this.renderFrame(t.rootFrame,t),this.currentPage.rootFrame!==t.rootFrame&&i.replace(this.frames[t.rootFrame].component,this.config.rootHtmlElement),this.currentPage=t})}initialize(){return r(this,void 0,void 0,function*(){i.hydrate(this.frames[this.currentPage.rootFrame].component,this.config.rootHtmlElement)})}emitFrameControllerData(t){const e=this.frames[t.frameId];e&&e.data[t.fieldName].next(t.value)}loadViews(t){return r(this,void 0,void 0,function*(){console.log("load views",t),yield Promise.all(t.frames.map(t=>r(this,void 0,void 0,function*(){this.views[t.frameName]=yield this.config.app.getFrameViewClass(t)})))})}renderFrame(t,e){const n=this.frames[t],r=e.frames.filter(e=>e.frameId===t)[0];Object.keys(r.frames).map(t=>{const o=r.frames[t];this.renderFrame(o,e);const i=this.frames[o];n.pageFrame.frames[t]===r.frames[t]&&n.children[t].getValue()||n.children[t].next(i.component)})}createFrame(t){const e=this.views[t.frameName],n={};Object.keys(t.data).map(e=>{n[e]=new s.BehaviorSubject(t.data[e])});const r={};Object.keys(t.frames).map(t=>{r[t]=new s.BehaviorSubject(void 0)});const o=new s.BehaviorSubject(t.params),i=new e({data:n,children:r,params:o,navigate:this.navigate,dispatch:(e,...n)=>this.dispatch({frameId:t.frameId,actionName:e,args:n})});return{pageFrame:t,component:i,data:n,children:r,params:o}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(n(13))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INITIAL_VAR="__initial",e.REQUIRE_FUNC_NAME="loadModule",function(t){t.FrameControllerData="frame-controller-data",t.NewPage="new-page",t.Initialize="initialize",t.FrameControllerDispatch="frame-controller-dispatch",t.Navigate="navigate",t.Error="error"}(e.RemoteMessageType||(e.RemoteMessageType={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(11);e.render=function(t,e){t.mount(),e.appendChild(t.getRootElement())},e.replace=function(t,e){e.innerHTML="",t.mount(),e.appendChild(t.getRootElement())},e.hydrate=function(t,e){t.mount();const n=e.childNodes[0];r(n,t.getRootElement(),{onBeforeElUpdated:(t,e)=>(e._events&&e._events.map(e=>{t.addEventListener(e.eventName,e.listener,e.bubbles)}),e.onUpdateElement&&e.onUpdateElement(t),!0)})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(7),o=n(4);e.default=class extends o.default{constructor(t){super(t),this.isCheckBox=!1,this.tagName="input"}getRootElement(){return super.getRootElement()}afterMount(){super.afterMount(),this.isCheckBox=!!this.rootElement.type&&"checkbox"===this.rootElement.type.toLowerCase();const t=()=>{r.isObservable(this.props.value)&&this.props.value.next(this.isCheckBox?this.rootElement.checked:!!this.rootElement.value)};this.document.addEventListener(this.rootElement,"change",t,!1),this.document.addEventListener(this.rootElement,"input",t,!1),this.addSubscription(this.props.value,t=>{this.isCheckBox&&(this.rootElement.checked=t)})}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(7),o=n(4);e.default=class extends o.default{constructor(t){super(t),this.isCheckBox=!1}getRootElement(){return super.getRootElement()}afterMount(){super.afterMount();const t=()=>{r.isObservable(this.props.value)&&this.props.value.next(this.rootElement.value)};this.document.addEventListener(this.rootElement,"change",t,!1),this.document.addEventListener(this.rootElement,"input",t,!1),this.addSubscription(this.props.value,t=>{t!==this.rootElement.value&&(this.rootElement.value=t)})}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(4);e.default=class extends r.default{constructor(t){super(t),this.props=t,this.setComponent=(t=>{const e=this.getRootElement();this.currentComponent&&(e.innerHTML="",this.currentComponent.dispose()),t.setDocument(this.document),t.mount(),e.appendChild(t.getRootElement()),this.currentComponent=t})}afterMount(){this.addSubscription(this.props.component,this.setComponent)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(7),o=n(4);e.default=class extends o.default{constructor(t){super(t),this.props=t,this.tagName="ul"}mount(t){t&&this.saveMountElement(t);const e=this.children?this.children.filter(t=>1===t.nodeType):[];if(this.childNode=1===e.length?e[0]:void 0,this.props.renderItem)this.renderItem=this.props.renderItem;else if(1===e.length){const t=e[0];this.renderItem=(e=>{const n=this.document.createElement(t.tagName);return t.getAttribute("class")&&n.setAttribute("class",t.getAttribute("class")),t.getAttribute("style")&&n.setAttribute("style",t.getAttribute("style")),n.innerHTML=e,n})}r.isObservable(this.props.items)?this.props.items.subscribe(t=>{const e=this.items;this.items=t,e&&this.update()}):this.items=this.props.items,super.mount()}afterMount(){const t=this.getRootElement();this.props.class&&(t.className=this.props.class)}clone(){const t=document.createElement(this.rootElement.tagName);for(let e=0;e<this.rootElement.attributes.length;e++)t.setAttribute(this.rootElement.attributes[e].name,this.rootElement.attributes[e].value);return t}render(){const t=this.rootElement?this.clone():this.document.createElement(this.tagName);return this.items.map((e,n)=>{const o=this.renderItem(e,n);if(r.isComponent(o)){if(o.setDocument(this.document),o.mount(this.childNode),this.childNode){const t=this.childNode.getAttribute("class");t&&o.getRootElement().setAttribute("class",t);const e=this.childNode.getAttribute("style");e&&o.getRootElement().setAttribute("style",e)}t.appendChild(o.getRootElement())}else"string"==typeof o?t.appendChild(this.createElementfromTemplate(o)):t.appendChild(o)}),t}renderItem(t,e){const n=this.document.createElement("li");return n.innerHTML=t,n}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(4);class o extends r.default{constructor(t){super(t),this.props=t,this.tagName="a"}afterMount(){super.afterMount(),this.addSubscription(this.props.url,t=>{this.url=t,"a"===this.rootElement.tagName.toLowerCase()&&this.rootElement.setAttribute("href",this.url)}),this.document.addEventListener(this.rootElement,"click",t=>{t.preventDefault(),this.document.navigate(this.url,!!this.props.replace)},!1)}}e.Link=o,e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(12);e.default=class extends r.default{beforeMount(){this.rootElement=this.document.createTextNode(""),this.addSubscription(this.props.value,t=>this.rootElement.nodeValue=t)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=class{constructor(t){this.config=t,this.document=this.config.window.document}createElement(t,e){return this.document.createElement(t,e)}createTextNode(t){return this.document.createTextNode(t)}addEventListener(t,e,n,r){t._events=t._events||[],t._events.push({eventName:e,listener:n,bubbles:r}),t.addEventListener(e,n,r)}navigate(t,e=!1){e?this.config.window.history.replaceState(t,"",t):this.config.window.history.pushState(t,"",t)}}},function(t,e,n){"use strict";function r(t,e){e.mount(t);const n=e.getRootElement(),r=t.getAttribute("class");r&&n.setAttribute("class",r);const o=t.getAttribute("style");o&&n.setAttribute("style",o);const i=t.parentElement;i.appendChild(n),i.insertBefore(n,t),i.removeChild(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.fromString=function(t,e,n){const o=t.createElement("div");o.innerHTML=e;const i=o.querySelectorAll("[name]");for(const t of i){const e=t.getAttribute("name"),o=n[e];if(!o)throw new Error("Not found property with name "+e);r(t,o)}const s=o.querySelectorAll('[type="neweb-link"]');for(const e of s)e.removeAttribute("type"),t.addEventListener(e,"click",t=>{t.preventDefault();const e=t.target,n=e.getAttribute("href");e&&n&&(t.preventDefault(),history.pushState(n,"",n))},!1);return 1===o.childNodes.length?o.childNodes[0]:o},e.replaceElementToComponent=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=class{constructor(){this.emitters=[]}on(t,e){this.emitters.push({emitter:t,cb:e}),t.on(e)}off(t){let e=-1;const n=this.emitters.filter((n,r)=>(e=r,n.cb===t))[0];if(!n)throw new Error("Not found subscription for this callback");n.emitter.off(t),this.emitters.splice(e,1)}removeAllListeners(){this.emitters.forEach(t=>t.emitter.off(t.cb)),this.emitters=[]}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(62);e.Container=r.default;class o{constructor(t={}){this.isValueExisting=!1,this.listeners=[],this.store=Object.assign({},t)}emit(t){this.store.value=t,this.listeners.map(e=>e(t))}get(){if(!("value"in this.store))throw new Error("Not have value");return this.store.value}has(){return"value"in this.store}on(t){this.listeners.push(t)}onAndGet(t){this.listeners.push(t),"value"in this.store&&t(this.store.value)}off(t){this.listeners=this.listeners.filter(e=>e!==t)}addListener(t){this.on(t)}removeAllListeners(){this.listeners=[]}wait(){return"value"in this.store?Promise.resolve(this.store.value):new Promise(t=>{const e=n=>{t(n),this.off(e)};this.on(e)})}}e.Onemitter=o,e.default=(t=>new o(t))},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function c(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(s,c)}a((r=r.apply(t,e||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0});const o=n(26),i=n(63);e.default=class{constructor(t){this.config=t,this.seansStatusEmitter=i.default(),this.networkStatusEmitter=i.default()}initialize(t){return r(this,void 0,void 0,function*(){this.seansId=t.seanceId,this.seansStatusEmitter.emit("initializing"),this.networkStatusEmitter.emit(this.config.socket.connected?"connected":"disconnected"),this.historyContext={push:t=>{history.pushState(t,"",t),this.navigate(t)},replace:t=>{history.replaceState(t,"",t),this.navigate(t)}},this.config.pageRenderer.setMethods({dispatch:t=>this.dispatch(t),navigate:t=>this.navigate(t),seansStatusEmitter:this.seansStatusEmitter,networkStatusEmitter:this.networkStatusEmitter,historyContext:this.historyContext}),t.page&&(yield this.loadPage(t.page),yield this.config.pageRenderer.loadPage(t.page),yield this.config.pageRenderer.initialize()),this.config.socket.on("connect",()=>this.networkStatusEmitter.emit("connected")),this.config.socket.on("connect_error",()=>this.networkStatusEmitter.emit("disconnected")),this.config.socket.on("connect_timeout",()=>this.networkStatusEmitter.emit("disconnected")),this.config.socket.on("error",()=>this.networkStatusEmitter.emit("disconnected")),this.config.socket.on("reconnect",()=>this.networkStatusEmitter.emit("connected")),this.config.socket.on("reconnect_attempt",()=>this.networkStatusEmitter.emit("connecting")),this.config.socket.on("reconnect_error",()=>this.networkStatusEmitter.emit("disconnected")),this.config.socket.on("reconnect_failed",()=>this.networkStatusEmitter.emit("disconnected")),this.config.socket.on("message",(t,e)=>r(this,void 0,void 0,function*(){switch(t){case o.RemoteMessageType.FrameControllerData:this.config.pageRenderer.emitFrameControllerData(e);break;case o.RemoteMessageType.NewPage:yield this.config.pageRenderer.newPage(e.page),history.replaceState(e.page.url,e.page.title||"",e.page.url),this.config.pageMetaManager.update(e.page),this.seansStatusEmitter.emit("ready")}})),this.config.socket.on("frame-controller-data",t=>{this.config.pageRenderer.emitFrameControllerData(t)}),this.config.socket.on("new-page",t=>r(this,void 0,void 0,function*(){yield this.config.pageRenderer.newPage(t.page),history.replaceState(t.page.url,t.page.title||"",t.page.url),this.config.pageMetaManager.update(t.page),this.seansStatusEmitter.emit("ready")})),yield new Promise(t=>{this.config.socket.emit("initialize",{seanceId:this.config.seanceId},t)}),history.replaceState(window.location.href,"",window.location.href),window.onpopstate=(t=>{this.navigate(t.state)}),this.seansStatusEmitter.emit("ready")})}navigate(t){this.seansStatusEmitter.emit("navigating"),this.config.socket.emit("navigate",{url:t})}dispatch(t){return r(this,void 0,void 0,function*(){yield new Promise(e=>{this.config.socket.emit("frame-controller-dispatch",t,e)})})}loadPage(t){return r(this,void 0,void 0,function*(){yield this.config.app.getPageClass(t)})}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=class{update(t){document.title=t.title||"";const e=document.getElementsByTagName("head")[0];let n,r=!1;for(const t of e.childNodes)if(r){if(8===t.nodeType&&"__page_meta_end__"===t.nodeValue){n=t;break}e.removeChild(t)}else 8===t.nodeType&&"__page_meta_start__"===t.nodeValue&&(r=!0);if(t.meta&&t.meta.length>0&&n)for(const r of t.meta){const t=document.createElement("meta");t.name=r.name,t.content=r.content,e.insertBefore(t,n)}}}},function(module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function c(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(s,c)}a((r=r.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0});const neweb_core_1=__webpack_require__(26);class ClientModulesManager{constructor(t){this.config=t,this.modules=[],t.modules&&t.modules.map(t=>this.modules.push(t))}preloadModules(t){return __awaiter(this,void 0,void 0,function*(){yield Promise.all(t.map(t=>__awaiter(this,void 0,void 0,function*(){if(yield this.hasModule(t.type,t.name,t.version))return;const e=yield fetch(this.config.address+"/"+t.type+"/"+t.name.replace(/\//gi,"~")+"/"+t.version+".js");if(200!==e.status)throw new Error("Invalid response::"+(yield e.text()));const n=yield e.text();yield this.addModule(t.type,t.name,t.version,n)})))})}hasModule(t,e,n){return __awaiter(this,void 0,void 0,function*(){if(this.modules.find(r=>r.type===t&&r.name===e&&(!n||r.version===n)))return!0;const r=localStorage.getItem(this.getModuleStorageName(t,e,n));return!!r&&(this.modules.push({content:r,name:e,type:t,version:n,exports:void 0}),!0)})}addModule(t,e,n,r){return __awaiter(this,void 0,void 0,function*(){(yield this.hasModule(t,e,n))||(this.modules.push({name:e,version:n,type:t,content:r,exports:void 0}),localStorage.setItem(this.getModuleStorageName(t,e,n),r))})}loadModule(t,e,n){if(!this.hasModule(t,e,n))throw new Error("Not found module "+t+"::"+e+"::"+n);const r=this.modules.find(r=>r.type===t&&r.name===e&&(!n||r.version===n));if(!r)throw new Error("Not found module "+t+"::"+e+"::"+n);return void 0===r.exports&&(r.exports=this.evalModule(r.content)),r.exports}evalModule(content){return window[neweb_core_1.REQUIRE_FUNC_NAME]=this.loadModule.bind(this),eval(content)}getModuleStorageName(t,e,n){return"__neweb_module_"+t+"~"+e+"~"+n}}exports.default=ClientModulesManager},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function c(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(s,c)}a((r=r.apply(t,e||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0});e.default=class{constructor(t){this.config=t}getPageClass(t){return r(this,void 0,void 0,function*(){return yield this.loadModules(t.modules),()=>{}})}loadModules(t){return r(this,void 0,void 0,function*(){yield this.config.modulesManager.preloadModules(t)})}getFrameViewClass(t){return r(this,void 0,void 0,function*(){return yield this.config.modulesManager.preloadModules(t.modules),(yield this.config.modulesManager.loadModule("local","frames/"+t.frameName+"/view",t.frameVersion)).default})}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(67);e.Application=r.default;var o=n(66);e.ModulesManager=o.default;var i=n(65);e.PageMetaManager=i.default;var s=n(64);e.Seance=s.default},function(t,e){var n=1e3,r=60*n,o=60*r,i=24*o,s=365.25*i;function c(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}t.exports=function(t,e){e=e||{};var a,u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var c=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*o;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?c(a=t,i,"day")||c(a,o,"hour")||c(a,r,"minute")||c(a,n,"second")||a+" ms":function(t){if(t>=i)return Math.round(t/i)+"d";if(t>=o)return Math.round(t/o)+"h";if(t>=r)return Math.round(t/r)+"m";if(t>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,o=+new Date,i=o-(n||o);t.diff=i,t.prev=n,t.curr=o,n=o;for(var s=new Array(arguments.length),c=0;c<s.length;c++)s[c]=arguments[c];s[0]=e.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var a=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;a++;var o=e.formatters[r];if("function"==typeof o){var i=s[a];n=o.call(t,i),s.splice(a,1),a--}return n}),e.formatArgs.call(t,s),(r.log||e.log||console.log.bind(console)).apply(t,s)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),r.destroy=o,"function"==typeof e.init&&e.init(r),e.instances.push(r),r}function o(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var n;e.save(t),e.names=[],e.skips=[];var r=("string"==typeof t?t:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var i=e.instances[n];i.enabled=e.enabled(i.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(69),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function c(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var a,u=[],h=!1,l=-1;function p(){h&&a&&(h=!1,a.length?u=a.concat(u):l=-1,u.length&&f())}function f(){if(!h){var t=c(p);h=!0;for(var e=u.length;e;){for(a=u,u=[];++l<e;)a&&a[l].run();l=-1,e=u.length}a=null,h=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new d(t,e)),1!==u.length||h||c(f)},d.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=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});n(1);const r=n(68),o=n(13),i=n(52),s=n(51),c=n(50);const a=n(47),u=new o.Document({window:window});o.Component.setDocument(u);const h=window[i.INITIAL_VAR],l=a(window.location.protocol+"//"+window.location.host),p=new r.ModulesManager({address:window.location.protocol+"//"+window.location.host+"/modules",modules:[{name:"neweb",version:void 0,type:"npm",content:"",exports:s}]}),f=new r.Application({modulesManager:p}),d=new c.default({app:f,rootHtmlElement:document.getElementById("root")}),y=new r.PageMetaManager,m=new r.Seance({app:f,seanceId:h.seanceId,socket:l,pageRenderer:d,pageMetaManager:y}),v=history.pushState.bind(history);history.pushState=(t=>{m.navigate(t),v(t,"",t)});const b=console;m.initialize(h).then(()=>{window.dispatchEvent(new Event("neweb-seans-initialized")),b.log("Initialized")}),window.global=window}]);
\No newline at end of file