@colyseus/monitor 0.15.3-preview.3 → 0.15.3-preview.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -260,7 +260,7 @@ function r(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,o=e[n];if(!(
260
260
  *
261
261
  * This source code is licensed under the MIT license found in the
262
262
  * LICENSE file in the root directory of this source tree.
263
- */var n,o=Symbol.for("react.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.server_context"),p=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case i:case s:case l:case f:case b:return e;default:switch(e=e&&e.$$typeof){case d:case u:case p:case h:case m:case c:return e;default:return t}}case a:return t}}}n=Symbol.for("react.module.reference"),t.ContextConsumer=u,t.ContextProvider=c,t.Element=o,t.ForwardRef=p,t.Fragment=i,t.Lazy=h,t.Memo=m,t.Portal=a,t.Profiler=s,t.StrictMode=l,t.Suspense=f,t.SuspenseList=b,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return v(e)===u},t.isContextProvider=function(e){return v(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return v(e)===p},t.isFragment=function(e){return v(e)===i},t.isLazy=function(e){return v(e)===h},t.isMemo=function(e){return v(e)===m},t.isPortal=function(e){return v(e)===a},t.isProfiler=function(e){return v(e)===s},t.isStrictMode=function(e){return v(e)===l},t.isSuspense=function(e){return v(e)===f},t.isSuspenseList=function(e){return v(e)===b},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===s||e===l||e===f||e===b||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===c||e.$$typeof===u||e.$$typeof===p||e.$$typeof===n||void 0!==e.getModuleId)},t.typeOf=v},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CAppBar=void 0;const i=a(r(0)),l=r(183);class s extends i.Component{constructor(){super(...arguments),this.state={open:!0},this.handleToggle=()=>{this.setState({open:!this.state.open})}}render(){return i.createElement("div",null,i.createElement(l.AppBar,{position:"static"},i.createElement(l.Toolbar,null,i.createElement(l.Typography,{variant:"h6",noWrap:!0,component:"div",sx:{flexGrow:1}},"Colyseus Monitor v","0.15.3-preview.3"))))}}t.CAppBar=s},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function l(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RoomList=void 0;const s=a(r(0)),c=r(344),u=r(183),d=r(353),p=l(r(445)),f=l(r(346)),b=r(183);class m extends s.Component{constructor(){super(...arguments),this.state={selected:[1],rooms:[],connections:0,cpu:0,memory:{totalMemMb:0,usedMemMb:0},columns:[]},this.isSelected=e=>-1!==this.state.selected.indexOf(e),this.handleRowSelection=e=>{this.setState({selected:e})}}componentWillMount(){this.fetchRoomList()}fetchRoomList(){return i(this,void 0,void 0,(function*(){try{this.setState((yield(0,c.fetchRoomList)()).body)}catch(e){console.error(e)}clearInterval(this.updateRoomListInterval),this.updateRoomListInterval=window.setInterval(()=>this.fetchRoomList(),5e3)}))}inspectRoom(e){this.props.history.push("/room/"+e)}disposeRoom(e){return i(this,void 0,void 0,(function*(){yield(0,c.remoteRoomCall)(e,"disconnect"),this.fetchRoomList()}))}getColumnHeader(e){return"string"==typeof e?e:e.metadata}getRoomColumn(e,t){let r,n,o=t,a=e;return"elapsedTime"===o?n=this.millisecondsToStr:t.metadata&&e.metadata&&(o=t.metadata,a=e.metadata),r=a[o],void 0===r&&(r=""),n?n(r):""+r}millisecondsToStr(e){let t=Math.floor(e/1e3);const r=Math.floor(t/31536e3);if(r)return r+"y";const n=Math.floor((t%=31536e3)/86400);if(n)return n+"d";const o=Math.floor((t%=86400)/3600);if(o)return o+"h";const a=Math.floor((t%=3600)/60);if(a)return a+"min";const i=t%60;return i?i+"s":"less than a second"}bytesToStr(e){const t=Math.floor(Math.log(e)/Math.log(1024));return 1*(e/Math.pow(1024,t)).toFixed(2)+" "+["B","kB","MB","GB","TB"][t]}getColumnsNames(e){const t=e.map(e=>{const t=this.getColumnHeader(e);return{id:t,field:t,headerName:t,flex:1}});return t.push({id:"Inspect",field:"Inspect",headerName:"",flex:1,renderCell:e=>s.createElement("div",{style:{cursor:"pointer"},onClick:()=>{this.inspectRoom(e.value)}},s.createElement(u.Button,{variant:"contained",startIcon:s.createElement(p.default,null)},"Inspect"))}),t.push({id:"Dispose",field:"Dispose",headerName:"",flex:1,renderCell:e=>s.createElement("div",{style:{cursor:"pointer"},onClick:()=>{this.disposeRoom(e.value)}},s.createElement(u.Button,{variant:"contained",color:"error",startIcon:s.createElement(f.default,null)},"Dispose"))}),t}getRowsData(e){return e.map(e=>{const t={id:e.roomId};for(const r of this.state.columns){const n=this.getRoomColumn(e,r);t[r]=n}return t.Inspect=e.roomId,t.Dispose=e.roomId,t})}generateRoomListDataGrid(){const e=this.getColumnsNames(this.state.columns),t=this.getRowsData(this.state.rooms);return s.createElement(d.DataGrid,{columns:e,rows:t,autoHeight:!0,sx:{overflow:"hidden"},slots:{noRowsOverlay:()=>s.createElement(s.Fragment,null)},disableRowSelectionOnClick:!0,hideFooter:!0,hideFooterPagination:!0,hideFooterSelectedRowCount:!0})}render(){return s.createElement("div",null,s.createElement(u.Card,null,s.createElement(b.TableContainer,{component:b.Paper},s.createElement(b.Table,{"aria-label":"simple table"},s.createElement(b.TableHead,null,s.createElement(b.TableRow,null,s.createElement(b.TableCell,{align:"center"},"Connections",s.createElement(b.Chip,{sx:{marginLeft:"6px"},size:"small",color:"primary",label:this.state.connections})),s.createElement(b.TableCell,{align:"center"},"Rooms",s.createElement(b.Chip,{sx:{marginLeft:"6px"},size:"small",color:"primary",label:this.state.rooms.length})),s.createElement(b.TableCell,{align:"center"},"CPU Usage",s.createElement(b.Chip,{sx:{marginLeft:"6px"},size:"small",color:"primary",label:this.state.cpu+" %"})),s.createElement(b.TableCell,{align:"center"},"Memory",s.createElement(b.Chip,{sx:{marginLeft:"6px"},size:"small",color:"primary",label:this.state.memory.usedMemMb+" MB"}))))))),s.createElement(u.Card,{style:{marginTop:"2px"}},this.generateRoomListDataGrid()))}}t.RoomList=m},function(e,t,r){var n;"undefined"!=typeof window?n=window:"undefined"!=typeof self?n=self:(console.warn("Using browser-only version of superagent in non-browser environment"),n=this);var o=r(440),a=r(441),i=r(345),l=r(442),s=r(444);function c(){}var u=t=e.exports=function(e,r){return"function"==typeof r?new t.Request("GET",e).end(r):1==arguments.length?new t.Request("GET",e):new t.Request(e,r)};t.Request=g,u.getXHR=function(){if(!(!n.XMLHttpRequest||n.location&&"file:"==n.location.protocol&&n.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("Browser-only version of superagent could not find XHR")};var d="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function p(e){if(!i(e))return e;var t=[];for(var r in e)f(t,r,e[r]);return t.join("&")}function f(e,t,r){if(null!=r)if(Array.isArray(r))r.forEach((function(r){f(e,t,r)}));else if(i(r))for(var n in r)f(e,t+"["+n+"]",r[n]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(r));else null===r&&e.push(encodeURIComponent(t))}function b(e){for(var t,r,n={},o=e.split("&"),a=0,i=o.length;a<i;++a)-1==(r=(t=o[a]).indexOf("="))?n[decodeURIComponent(t)]="":n[decodeURIComponent(t.slice(0,r))]=decodeURIComponent(t.slice(r+1));return n}function m(e){return/[\/+]json($|[^-\w])/.test(e)}function h(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.header=this.headers=function(e){for(var t,r,n,o,a=e.split(/\r?\n/),i={},l=0,s=a.length;l<s;++l)-1!==(t=(r=a[l]).indexOf(":"))&&(n=r.slice(0,t).toLowerCase(),o=d(r.slice(t+1)),i[n]=o);return i}(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"!=this.req.method?this._parseBody(this.text?this.text:this.xhr.response):null}function g(e,t){var r=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",(function(){var e,t=null,n=null;try{n=new h(r)}catch(e){return(t=new Error("Parser is unable to parse the response")).parse=!0,t.original=e,r.xhr?(t.rawResponse=void 0===r.xhr.responseType?r.xhr.responseText:r.xhr.response,t.status=r.xhr.status?r.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),r.callback(t)}r.emit("response",n);try{r._isResponseOK(n)||(e=new Error(n.statusText||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=n,e.status=n.status,r.callback(e,n)):r.callback(null,n)}))}function v(e,t,r){var n=u("DELETE",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n}u.serializeObject=p,u.parseString=b,u.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},u.serialize={"application/x-www-form-urlencoded":p,"application/json":JSON.stringify},u.parse={"application/x-www-form-urlencoded":b,"application/json":JSON.parse},l(h.prototype),h.prototype._parseBody=function(e){var t=u.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&m(this.type)&&(t=u.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null)},h.prototype.toError=function(){var e=this.req,t=e.method,r=e.url,n="cannot "+t+" "+r+" ("+this.status+")",o=new Error(n);return o.status=this.status,o.method=t,o.url=r,o},u.Response=h,o(g.prototype),a(g.prototype),g.prototype.type=function(e){return this.set("Content-Type",u.types[e]||e),this},g.prototype.accept=function(e){return this.set("Accept",u.types[e]||e),this},g.prototype.auth=function(e,t,r){1===arguments.length&&(t=""),"object"==typeof t&&null!==t&&(r=t,t=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});var n=function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,r,n)},g.prototype.query=function(e){return"string"!=typeof e&&(e=p(e)),e&&this._query.push(e),this},g.prototype.attach=function(e,t,r){if(t){if(this._data)throw Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,r||t.name)}return this},g.prototype._getFormData=function(){return this._formData||(this._formData=new n.FormData),this._formData},g.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var r=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),r(e,t)},g.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},g.prototype.buffer=g.prototype.ca=g.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},g.prototype.pipe=g.prototype.write=function(){throw Error("Streaming is not supported in browser version of superagent")},g.prototype._isHost=function(e){return e&&"object"==typeof e&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},g.prototype.end=function(e){return this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||c,this._finalizeQueryString(),this._end()},g.prototype._end=function(){var e=this,t=this.xhr=u.getXHR(),r=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var r=t.readyState;if(r>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4==r){var n;try{n=t.status}catch(e){n=0}if(!n){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var n=function(t,r){r.total>0&&(r.percent=r.loaded/r.total*100),r.direction=t,e.emit("progress",r)};if(this.hasListeners("progress"))try{t.onprogress=n.bind(null,"download"),t.upload&&(t.upload.onprogress=n.bind(null,"upload"))}catch(e){}try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof r&&!this._isHost(r)){var o=this._header["content-type"],a=this._serializer||u.serialize[o?o.split(";")[0]:""];!a&&m(o)&&(a=u.serialize["application/json"]),a&&(r=a(r))}for(var i in this.header)null!=this.header[i]&&this.header.hasOwnProperty(i)&&t.setRequestHeader(i,this.header[i]);return this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0!==r?r:null),this},u.agent=function(){return new s},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(e){s.prototype[e.toLowerCase()]=function(t,r){var n=new u.Request(e,t);return this._setDefaults(n),r&&n.end(r),n}})),s.prototype.del=s.prototype.delete,u.get=function(e,t,r){var n=u("GET",e);return"function"==typeof t&&(r=t,t=null),t&&n.query(t),r&&n.end(r),n},u.head=function(e,t,r){var n=u("HEAD",e);return"function"==typeof t&&(r=t,t=null),t&&n.query(t),r&&n.end(r),n},u.options=function(e,t,r){var n=u("OPTIONS",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},u.del=v,u.delete=v,u.patch=function(e,t,r){var n=u("PATCH",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},u.post=function(e,t,r){var n=u("POST",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},u.put=function(e,t,r){var n=u("PUT",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n}},function(e,t,r){function n(e){if(e)return function(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}(e)}e.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},n.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<n.length;o++)if((r=n[o])===t||r.fn===t){n.splice(o,1);break}return 0===n.length&&delete this._callbacks["$"+e],this},n.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(r){n=0;for(var o=(r=r.slice(0)).length;n<o;++n)r[n].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,r){"use strict";var n=r(345);function o(e){if(e)return function(e){for(var t in o.prototype)e[t]=o.prototype[t];return e}(e)}e.exports=o,o.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},o.prototype.parse=function(e){return this._parser=e,this},o.prototype.responseType=function(e){return this._responseType=e,this},o.prototype.serialize=function(e){return this._serializer=e,this},o.prototype.timeout=function(e){if(!e||"object"!=typeof e)return this._timeout=e,this._responseTimeout=0,this;for(var t in e)switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;default:console.warn("Unknown timeout option",t)}return this},o.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var a=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];o.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var r=this._retryCallback(e,t);if(!0===r)return!0;if(!1===r)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!=t.status)return!0;if(e){if(e.code&&~a.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"==e.code)return!0;if(e.crossDomain)return!0}return!1},o.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},o.prototype.then=function(e,t){if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(e,t){r.end((function(r,n){r?t(r):e(n)}))}))}return this._fullfilledPromise.then(e,t)},o.prototype.catch=function(e){return this.then(void 0,e)},o.prototype.use=function(e){return e(this),this},o.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},o.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},o.prototype.get=function(e){return this._header[e.toLowerCase()]},o.prototype.getHeader=o.prototype.get,o.prototype.set=function(e,t){if(n(e)){for(var r in e)this.set(r,e[r]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},o.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},o.prototype.field=function(e,t){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),n(e)){for(var r in e)this.field(r,e[r]);return this}if(Array.isArray(t)){for(var o in t)this.field(e,t[o]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=""+t),this._getFormData().append(e,t),this},o.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},o.prototype._auth=function(e,t,r,n){switch(r.type){case"basic":this.set("Authorization","Basic "+n(e+":"+t));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer "+e)}return this},o.prototype.withCredentials=function(e){return null==e&&(e=!0),this._withCredentials=e,this},o.prototype.redirects=function(e){return this._maxRedirects=e,this},o.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw TypeError("Invalid argument");return this._maxResponseSize=e,this},o.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},o.prototype.send=function(e){var t=n(e),r=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(t&&n(this._data))for(var o in e)this._data[o]=e[o];else"string"==typeof e?(r||this.type("form"),r=this._header["content-type"],this._data="application/x-www-form-urlencoded"==r?this._data?this._data+"&"+e:e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)||r||this.type("json"),this},o.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},o.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var r=this.url.substring(t+1).split("&");"function"==typeof this._sort?r.sort(this._sort):r.sort(),this.url=this.url.substring(0,t)+"?"+r.join("&")}}},o.prototype._appendQueryString=function(){console.trace("Unsupported")},o.prototype._timeoutError=function(e,t,r){if(!this._aborted){var n=new Error(e+t+"ms exceeded");n.timeout=t,n.code="ECONNABORTED",n.errno=r,this.timedout=!0,this.abort(),this.callback(n)}},o.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},function(e,t,r){"use strict";var n=r(443);function o(e){if(e)return function(e){for(var t in o.prototype)e[t]=o.prototype[t];return e}(e)}e.exports=o,o.prototype.get=function(e){return this.header[e.toLowerCase()]},o.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=n.type(t);var r=n.params(t);for(var o in r)this[o]=r[o];this.links={};try{e.link&&(this.links=n.parseLinks(e.link))}catch(e){}},o.prototype._setStatusProperties=function(e){var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.redirect=3==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.created=201==e,this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.forbidden=403==e,this.notFound=404==e,this.unprocessableEntity=422==e}},function(e,t,r){"use strict";t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){return e.split(/ *; */).reduce((function(e,t){var r=t.split(/ *= */),n=r.shift(),o=r.shift();return n&&o&&(e[n]=o),e}),{})},t.parseLinks=function(e){return e.split(/ *, */).reduce((function(e,t){var r=t.split(/ *; */),n=r[0].slice(1,-1);return e[r[1].split(/ *= */)[1].slice(1,-1)]=n,e}),{})},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},function(e,t){function r(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach((function(e){r.prototype[e]=function(){return this._defaults.push({fn:e,arguments:arguments}),this}})),r.prototype._setDefaults=function(e){this._defaults.forEach((function(t){e[t.fn].apply(e,t.arguments)}))},e.exports=r},function(e,t,r){"use strict";var n=r(113);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(114)),a=r(2),i=(0,o.default)((0,a.jsx)("path",{d:"M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h4v-2H5V8h14v10h-4v2h4c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm-7 6-4 4h3v6h2v-6h3l-4-4z"}),"OpenInBrowser");t.default=i},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RoomInspect=void 0;const l=a(r(0)),s=r(447),c=i(r(469));r(783);const u=r(344),d=r(183),p=r(353),f=r(475),b=i(r(470)),m=i(r(471)),h=i(r(472)),g=i(r(473)),v=i(r(346)),O=i(r(474));class y extends l.Component{constructor(){super(...arguments),this.state={roomId:void 0,state:{},clients:[],maxClients:0,stateSize:0,locked:!1,currentTab:"1",sendDialogTitle:"",sendDialogOpen:!1,sendToClient:void 0,sendType:localStorage.getItem("$$colyseus$type")||"message_type",sendData:JSON.parse(localStorage.getItem("$$colyseus$data")||"{}")},this.updateSendType=e=>{const t=e.target.value;localStorage.setItem("$$colyseus$type",t),this.setState({sendType:t})},this.updateSendData=e=>{localStorage.setItem("$$colyseus$data",JSON.stringify(e)),this.state.sendData=e},this.handleCloseSend=()=>{this.setState({sendDialogOpen:!1})},this.handleSend=()=>{(this.state.sendToClient?this.roomCall("_sendMessageToClient",this.state.sendToClient,this.state.sendType,this.state.sendData):this.roomCall("broadcast",this.state.sendType,this.state.sendData)).then(()=>this.handleCloseSend())},this.handleTabChange=(e,t)=>{this.setState({currentTab:t})}}componentDidMount(){this.fetchRoomData()}fetchRoomData(){const e=this.props.match.params.roomId;(0,u.fetchRoomData)(e).then(e=>this.setState(e.body)).catch(e=>console.error(e)),clearInterval(this.updateDataInterval),this.updateDataInterval=window.setInterval(()=>this.fetchRoomData(),5e3)}roomCall(e,...t){const r=this.props.match.params.roomId;return(0,u.remoteRoomCall)(r,e,...t).then(e=>console.log(e.body)).catch(e=>console.error(e))}componentWillUnmount(){clearInterval(this.updateDataInterval)}sendMessage(e){const t=e||void 0;let r=e?`Send message to client (${e})`:"Broadcast message to all clients";this.setState({sendToClient:t,sendDialogTitle:r,sendDialogOpen:!0})}disconnectClient(e){this.roomCall("_forceClientDisconnect",e).then(()=>this.fetchRoomData())}disposeRoom(){this.roomCall("disconnect").then(()=>{this.props.history.push("/")})}goBack(){window.history.back()}render(){const e=[{id:"sessionId",field:"sessionId",headerName:"sessionId",flex:1},{id:"actions",field:"actions",headerName:"actions",flex:1,renderCell:e=>l.createElement(l.Fragment,null,l.createElement(d.Button,{variant:"text",startIcon:l.createElement(g.default,null),onClick:this.sendMessage.bind(this,e.id)},"Send"),l.createElement(d.Button,{variant:"text",color:"error",startIcon:l.createElement(O.default,null),onClick:this.disconnectClient.bind(this,e.id)},"Disconnect"))}],t=this.state.clients.map(e=>({id:e.sessionId,sessionId:e.sessionId,actions:e.sessionId}));return l.createElement("div",null,l.createElement(d.AppBar,{position:"static"},l.createElement(d.Toolbar,null,l.createElement(d.IconButton,{"aria-label":"delete",onClick:this.goBack.bind(this)},l.createElement(b.default,null)),l.createElement(d.Typography,{variant:"h6",noWrap:!0,component:"div",sx:{flexGrow:1}},"Room "+this.state.roomId))),l.createElement(d.TableContainer,{component:d.Paper},l.createElement(d.Table,{"aria-label":"simple table"},l.createElement(d.TableHead,null,l.createElement(d.TableRow,null,l.createElement(d.TableCell,{align:"center"},this.state.locked?l.createElement(m.default,null):l.createElement(h.default,null),this.state.locked?"Locked":"Unlocked"),l.createElement(d.TableCell,{align:"center"},"Clients",l.createElement(d.Chip,{sx:{marginLeft:"6px"},size:"small",color:"primary",label:`${this.state.clients.length}${this.state.maxClients?" / "+this.state.maxClients:""}`})),l.createElement(d.TableCell,{align:"center"},"State Size",l.createElement(d.Chip,{sx:{marginLeft:"6px"},size:"small",color:"primary",label:this.state.stateSize+" bytes"})),l.createElement(d.TableCell,{align:"center"},l.createElement(d.Button,{variant:"text",startIcon:l.createElement(g.default,null),onClick:this.sendMessage.bind(this,void 0)},"Broadcast")),l.createElement(d.TableCell,{align:"center"},l.createElement(d.Button,{variant:"text",color:"error",startIcon:l.createElement(v.default,null),onClick:this.disposeRoom.bind(this)},"Dispose room")))))),l.createElement(f.TabContext,{value:this.state.currentTab},l.createElement(d.Box,{sx:{borderBottom:1,borderColor:"divider"}},l.createElement(f.TabList,{onChange:this.handleTabChange,"aria-label":"lab API tabs example",variant:"fullWidth"},l.createElement(d.Tab,{label:"Clients",value:"1"}),l.createElement(d.Tab,{label:"State",value:"2"}))),l.createElement(f.TabPanel,{value:"1"},l.createElement(p.DataGrid,{columns:e,rows:t,sx:{overflow:"hidden"},disableRowSelectionOnClick:!0,hideFooter:!0,hideFooterPagination:!0,hideFooterSelectedRowCount:!0})),l.createElement(f.TabPanel,{value:"2"},l.createElement(c.default,{src:this.state.state,theme:"default"}))),l.createElement(d.Dialog,{open:this.state.sendDialogOpen,onClose:this.handleCloseSend,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},l.createElement(d.DialogTitle,{id:"alert-dialog-title"},this.state.sendDialogTitle),l.createElement(d.DialogContent,null,l.createElement("h2",null,"Message type:"),l.createElement("input",{type:"text",value:this.state.sendType,onChange:this.updateSendType}),l.createElement("h2",null,"Message payload"),l.createElement(s.JsonEditor,{value:this.state.sendData,propagateChanges:this.updateSendData})),l.createElement(d.DialogActions,null,l.createElement(d.Button,{variant:"text",color:"error",onClick:this.handleCloseSend},"Cancel"),l.createElement(d.Button,{variant:"text",onClick:this.handleSend},"Send"))))}}t.RoomInspect=y},function(e,t,r){var n;n=function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}return r.m=e,r.c=t,r.p="",r(0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9);Object.defineProperty(t,"JsonEditor",{enumerable:!0,get:function(){return(e=n,e&&e.__esModule?e:{default:e}).default;var e}});var o=r(3);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return o.parse}})},function(t,r){t.exports=e},function(e,t,r){e.exports=r(12)()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.render_item=function(e,t,r,l,s,c){return r instanceof Array?n.default.createElement(o.default,{key:e,jkey:t,doc:r,level:c+1,propagateChanges:l}):r instanceof Object?n.default.createElement(a.default,{key:e,jkey:t,doc:r,level:c+1,propagateChanges:l}):n.default.createElement(i.default,{key:e,index:t,value:r,isLast:s,propagateChanges:l})},t.get_options=function(e,t){return void 0===e.levels||t<e.levels?["string","number","boolean","object","array","whitespace","null"]:["string","number","boolean","whitespace","null"]},t.is_container=function(e){switch(e){case"array":case"object":case"null":case"whitespace":return!0;default:return!1}},t.text2value=function(e,t){switch(e){case"boolean":var r=["true","1","yes","on"].indexOf(t.toLowerCase());return Boolean(0<=r);case"number":return Number(t);case"array":return[];case"object":return{};case"null":return null;case"whitespace":return" ";case"string":default:return t}},t.capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t.add2text=s,t.parse=function(e){try{return{json:JSON.parse(e)}}catch(r){var t=r.toString();return{json:void 0,errorText:"Pasted text is not valid json. Error: "+t+" - "+function(e,t){if(void 0!==t)for(var r=e.indexOf(" at line "),n=e.indexOf(" column "),o=e.indexOf(" of the JSON data"),a=parseInt(e.substr(r+9,n))-1,i=parseInt(e.substr(n+8,o))-1,l=t.split("\n"),c=0;c<l.length;c++)if(a===c)return s(l[c],i,"˰")}(t,e)}}};var n=l(r(1)),o=l(r(8)),a=l(r(11)),i=l(r(6));function l(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r){return e.substr(0,t)+r+e.substr(t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=r(1),i=c(a),l=c(r(2)),s=c(r(5));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.add=function(){r.setState({adding:!0})},r.next=function(e){},r.onDone=function(e,t){r.onChange(e,t),e<r.props.setup.length-1?r.next(e+1):r.save()},r.onChange=function(e,t){var n=r.state.values;n[e]=t,r.setState({values:n})},r.cancel=function(){r.setState({adding:!1})},r.save=function(){r.setState({adding:!1}),r.props.onDone(r.state.values)},r.state={adding:!1,values:[]},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"getStyle",value:function(){return this.context.styling["add-group"]}},{key:"getButtonStyle",value:function(e){return this.context.styling[e]}},{key:"input",value:function(){var e=this.props.setup.map((function(e,t){return i.default.createElement(s.default,n({key:"ab"+t,index:t,onChange:this.onChange,onDone:this.onDone},e))}),this);return i.default.createElement("div",{className:"AddButton",style:this.getStyle()},e,i.default.createElement("button",{className:"save-button",style:this.getButtonStyle("save-button"),onClick:this.save},"Save"),i.default.createElement("button",{className:"cancel-button",style:this.getButtonStyle("cancel-button"),onClick:this.cancel},"Cancel"))}},{key:"render",value:function(){return this.state.adding?this.input():i.default.createElement("button",{className:"add-button",style:this.getButtonStyle("add-button"),onClick:this.add},"+")}}]),t}(a.Component);u.propTypes={onDone:l.default.func.isRequired,setup:l.default.array.isRequired},u.contextTypes={styling:l.default.object},t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(1),a=s(o),i=s(r(2)),l=r(3);function s(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));u.call(r);var n=e.type||"string";return r.state={type:n,value:e.value,show:!(0,l.is_container)(n)},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"select",value:function(e){if(e.length>0){var t=e.map((function(e){return a.default.createElement("option",{key:e,value:e},e)}),this);return a.default.createElement("select",{onChange:this.handleSelectChange,defaultValue:this.state.type},t)}return null}},{key:"input",value:function(){var e=this.props,t=e.defaultValue,r=e.placeholder;return a.default.createElement("input",{className:"add-input",style:this.getStyle(),type:"text",autoFocus:!1,defaultValue:t,placeholder:r,onBlur:this.finishEdit,onChange:this.handleInputChange,onKeyPress:this.checkEnter})}},{key:"doneButton",value:function(){return a.default.createElement("button",{className:"add-button",style:this.getButtonStyle(),onClick:this.onDone},"√")}},{key:"getStyle",value:function(){return this.context.styling["add-input"]}},{key:"getButtonStyle",value:function(){return this.context.styling["add-button"]}},{key:"render",value:function(){var e=this.props.multiple;return a.default.createElement("div",{className:"AddInput"},this.select(e),this.state.show?this.input():this.doneButton())}}]),t}(o.Component);c.propTypes={type:i.default.string,multiple:i.default.bool.isRequired,defaultValue:i.default.oneOfType([i.default.string,i.default.number,i.default.bool]),placeholder:i.default.string,onChange:i.default.func.isRequired,onDone:i.default.func.isRequired},c.contextTypes={styling:i.default.object};var u=function(){var e=this;this.handleInputChange=function(t){var r=(0,l.text2value)(e.state.type,t.target.value);e.props.onChange(e.props.index,r),e.setState({value:r})},this.handleSelectChange=function(t){for(var r=t.target.options,n=[],o=0;o<r.length;o++)if(r[o].selected){n=r[o].value;break}var a=(0,l.is_container)(n),i=a?(0,l.text2value)(n,e.state.value):e.state.value;e.setState({type:n,show:!a}),e.props.onChange(e.props.index,i)},this.checkEnter=function(t){"Enter"===t.key&&e.finishEdit(t)},this.finishEdit=function(t){var r=(0,l.text2value)(e.state.type,t.target.value);e.props.onDone(e.props.index,r)},this.onDone=function(){var t=(0,l.text2value)(e.state.type,e.state.value);e.props.onDone(e.props.index,t)}};t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),l=p(i),s=p(r(2)),c=p(r(7)),u=r(3),d=p(r(5));function p(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.mouseOver=function(){r.setState({hover:!0})},r.mouseOut=function(){r.setState({hover:!1})},r.onChange=function(e,t){},r.onDone=function(e,t){r.propagateChanges(t)},r.onDelete=function(e){e.stopPropagation(),r.propagateDelete()},r.activateEdit=function(e){r.setState({editing:!0})},r.state={editing:!1,hover:!1},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"propagateChanges",value:function(e){this.setState({editing:!1}),this.props.propagateChanges&&this.props.value!=e&&this.props.propagateChanges("update",this.props.index,e)}},{key:"propagateDelete",value:function(){this.props.propagateChanges&&this.props.propagateChanges("delete",this.props.index)}},{key:"value",value:function(){return String(this.props.value)}},{key:"getClass",value:function(){return null===this.props.value?"null":o(this.props.value)}},{key:"getClassName",value:function(){return(0,u.capitalize)(this.getClass())+"Item"}},{key:"getStyle",value:function(){if(this.context.styling.hasOwnProperty(this.getClass())){var e=this.context.styling[this.getClass()];return(0,c.default)(!0,this.context.styling.value,e)}return this.context.styling.value}},{key:"getSuffix",value:function(){return this.props.isLast?null:","}},{key:"editSettings",value:function(){return{type:this.getClass(),defaultValue:this.props.value,multiple:!0}}},{key:"renderEdit",value:function(){var e=this.editSettings();return l.default.createElement(d.default,n({index:0,autoFocus:!1,onChange:this.onChange,onDone:this.onDone},e))}},{key:"renderInnerValue",value:function(){return l.default.createElement("span",null,this.value(),this.context.setup.tableLike?null:this.getSuffix())}},{key:"renderValue",value:function(){return l.default.createElement("div",{className:this.getClassName(),style:this.getStyle(),onClick:this.activateEdit,onMouseOver:this.mouseOver,onMouseOut:this.mouseOut},this.renderInnerValue(),this.renderDelete())}},{key:"renderDelete",value:function(){var e={visibility:this.state.hover?"visible":"hidden"},t=(0,c.default)(!0,this.context.styling["delete-button"],e);return l.default.createElement("button",{className:"delete-button",onClick:this.onDelete,style:t},"⌫")}},{key:"render",value:function(){return this.state.editing?this.renderEdit():this.renderValue()}}]),t}(i.Component);f.propTypes={index:s.default.oneOfType([s.default.string,s.default.number]).isRequired,value:s.default.oneOfType([s.default.string,s.default.number,s.default.bool]),isLast:s.default.bool,propagateChanges:s.default.func.isRequired},f.contextTypes={styling:s.default.object,setup:s.default.object},t.default=f},function(e,t,r){(function(e){!function(t){var r=function(e){return o(!0===e,!1,arguments)};function n(e,t){if("object"!==a(e))return t;for(var r in t)"object"===a(e[r])&&"object"===a(t[r])?e[r]=n(e[r],t[r]):e[r]=t[r];return e}function o(e,t,o){var i=o[0],l=o.length;(e||"object"!==a(i))&&(i={});for(var s=0;s<l;++s){var c=o[s];if("object"===a(c))for(var u in c){var d=e?r.clone(c[u]):c[u];i[u]=t?n(i[u],d):d}}return i}function a(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}r.recursive=function(e){return o(!0===e,!0,arguments)},r.clone=function(e){var t,n,o=e,i=a(e);if("array"===i)for(o=[],n=e.length,t=0;t<n;++t)o[t]=r.clone(e[t]);else if("object"===i)for(t in o={},e)o[t]=r.clone(e[t]);return o},t?e.exports=r:window.merge=r}("object"==typeof e&&e&&"object"==typeof e.exports&&e.exports)}).call(t,r(16)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(1),a=c(o),i=c(r(2)),l=r(3),s=c(r(4));function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=function(e){function t(){var e,r,n;u(this,t);for(var o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=n=d(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),n.addItem=function(e){var t=n.props.doc;t.push(e[0]),n.props.propagateChanges("add",n.props.jkey,t)},n.propagateChanges=function(e,t,r){var o=n.props.doc;switch(e){case"delete":o.splice(t,1);break;case"add":case"update":default:o[t]=r}n.props.propagateChanges("update",n.props.jkey,o)},d(n,r)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"addButtonSetup",value:function(){return[{type:"String",placeholder:"value",multiple:(0,l.get_options)(this.context.setup.structure,this.props.level)}]}},{key:"getStyle",value:function(){return this.context.styling.array}},{key:"getRowStyle",value:function(){return this.context.styling["array-row"]}},{key:"render",value:function(){var e=this.props.doc.length-1,t=this.props.doc.map((function(t,r){var n=this.props.jkey+r,o=r==e;return a.default.createElement("div",{className:"ArrayRow",style:this.getRowStyle()},(0,l.render_item)(n,r,t,this.propagateChanges,o,this.props.level))}),this);return a.default.createElement("div",{className:"ArrayItem",style:this.getStyle()},this.context.setup.tableLike?null:"[",t,a.default.createElement("div",{className:"ArrayRow",style:this.getRowStyle()},a.default.createElement(s.default,{onDone:this.addItem,setup:this.addButtonSetup()})),this.context.setup.tableLike?null:"]")}}]),t}(o.Component);p.contextTypes={styling:i.default.object,setup:i.default.object},p.propTypes={jkey:i.default.string.isRequired,doc:i.default.array.isRequired,level:i.default.number.isRequired,propagateChanges:i.default.func.isRequired},t.default=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(1),a=c(o),i=c(r(2)),l=c(r(7)),s=r(3);function c(e){return e&&e.__esModule?e:{default:e}}c(r(4));var u={root:{clear:"left"},array:{display:"inline-table"},object:{display:"inline-table"},"object-row":{display:"block",marginLeft:1},"array-row":{display:"block",marginLeft:1},value:{display:"inline-block",minWidth:10,marginLeft:.1},key:{fontWeight:"bold"},string:{color:"green"},number:{color:"blue"},undefined:{color:"violet"},boolean:{color:"red"},null:{color:"firebrick"},"add-button":{display:"inline-block"},"save-button":{display:"inline-block"},"cancel-button":{display:"inline-block"},"delete-button":{float:"right",marginLeft:.5,display:"inline-block"},"add-group":{display:"inline-flex"},"add-input":{display:"inline-block"}};function d(e){var t=e.border||"1px solid #414141",r=e.tableLike?{root:{display:"table",border:t,borderCollapse:"collapse"},array:{display:"table-cell",border:t},object:{display:"table-cell",border:t},"array-row":{display:"table-cell",border:t,marginLeft:0},"object-row":{display:"table-row",border:t,marginLeft:0},key:{display:"table-cell",border:t},value:{display:"table-cell",marginLeft:0},"add-button":{display:"table-cell"}}:{};return(0,l.default)((0,l.default)(u,r),e.styling)}var p=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.propagateChanges=function(e,t,n){r.setState({value:n}),r.props.propagateChanges&&r.props.propagateChanges(n)},r.state={defaultKey:e.defaultKey||"json.",defaultJsonKey:e.defaultJsonKey||"root",styling:d(e)},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"getChildContext",value:function(){return{styling:this.state.styling,setup:{tableLike:this.props.tableLike,structure:this.props.structure||{}}}}},{key:"getStyle",value:function(){return this.state.styling.root}},{key:"render",value:function(){var e=this.props.value||this.props.defaultValue||{},t=(0,s.render_item)(this.state.defaultKey,this.state.defaultJsonKey,e,this.propagateChanges,!1,0);return a.default.createElement("div",{className:"JsonEditor",style:this.getStyle()},t)}}]),t}(o.Component);p.propTypes={defaultValue:i.default.oneOfType([i.default.array,i.default.object]),value:i.default.oneOfType([i.default.array,i.default.object]),structure:i.default.object,defaultKey:i.default.string,defaultJsonKey:i.default.string,propagateChanges:i.default.func.isRequired},p.childContextTypes={styling:i.default.object,setup:i.default.object},t.default=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=(a(r(1)),a(r(2)));function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var s=function(e){function t(){return i(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"value",value:function(){return this.props.jkey}},{key:"getClass",value:function(){return"key"}},{key:"getSuffix",value:function(){return":"}},{key:"editSettings",value:function(){return{type:"string",defaultValue:this.props.jkey,multiple:!1}}},{key:"propagateChanges",value:function(e){this.setState({editing:!1}),this.props.propagateKeyChange&&this.props.jkey!=e&&this.props.propagateKeyChange("update",this.props.jkey,e)}},{key:"propagateDelete",value:function(){this.props.propagateKeyChange&&this.props.propagateKeyChange("delete",this.props.jkey)}}]),t}(a(r(6)).default);s.propTypes={jkey:o.default.oneOfType([o.default.string,o.default.number]).isRequired,propagateKeyChange:o.default.func.isRequired},t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(1),a=u(o),i=u(r(2)),l=u(r(4)),s=r(3),c=u(r(10));function u(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var f=function(e){function t(){var e,r,n;d(this,t);for(var o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=n=p(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),n.addItem=function(e){var t=n.props.doc;t[e[0]]=e[1],n.props.propagateChanges("add",n.props.jkey,t)},n.propagateChanges=function(e,t,r){var o=n.props.doc;switch(e){case"delete":delete o[t];break;case"add":case"update":default:o[t]=r}n.props.propagateChanges("update",n.props.jkey,o)},n.propagateKeyChange=function(e,t,r){var o=n.props.doc[t],a=n.props.doc;switch(e){case"delete":break;case"add":case"update":default:a[r]=o}delete a[t],n.props.propagateChanges("update",n.props.jkey,a)},p(n,r)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"addButtonSetup",value:function(){return[{type:"text",placeholder:"key",multiple:[]},{type:"text",placeholder:"value",multiple:(0,s.get_options)(this.context.setup.structure,this.props.level)}]}},{key:"getStyle",value:function(){return this.context.styling.object}},{key:"getRowStyle",value:function(){return this.context.styling["object-row"]}},{key:"render",value:function(){var e=Object.keys(this.props.doc),t=e.map((function(t,r){var n=this.props.jkey+"."+t+r,o=r==e.length-1;return a.default.createElement("div",{key:this.props.jkey+".r"+r,className:"ObjectRow",style:this.getRowStyle()},a.default.createElement(c.default,{key:this.props.jkey+".k"+r,jkey:t,propagateKeyChange:this.propagateKeyChange}),(0,s.render_item)(n,t,this.props.doc[t],this.propagateChanges,o,this.props.level))}),this);return a.default.createElement("div",{className:"ObjectItem",style:this.getStyle()},this.context.setup.tableLike?null:"{",t,a.default.createElement(l.default,{onDone:this.addItem,setup:this.addButtonSetup()}),this.context.setup.tableLike?null:"}")}}]),t}(o.Component);f.contextTypes={styling:i.default.object,setup:i.default.object},f.propTypes={jkey:i.default.string.isRequired,doc:i.default.object.isRequired,level:i.default.number.isRequired,propagateChanges:i.default.func.isRequired},t.default=f},function(e,t,r){"use strict";var n=r(14),o=r(15),a=r(13);e.exports=function(){function e(e,t,r,n,i,l){l!==a&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return r.checkPropTypes=n,r.PropTypes=r,r}},function(e,t){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){"use strict";function r(e){return function(){return e}}var n=function(){};n.thatReturns=r,n.thatReturnsFalse=r(!1),n.thatReturnsTrue=r(!0),n.thatReturnsNull=r(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(e){return e},e.exports=n},function(e,t,r){"use strict";e.exports=function(e,t,r,n,o,a,i,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,o,a,i,l],u=0;(s=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}}])},e.exports=n(r(448))},function(e,t,r){"use strict";e.exports=r(449)},function(e,t,r){"use strict";var n=r(182),o=r(347),a=r(452),i=r(457),l=r(132),s=r(458),c=r(465),u=r(466),d=r(468),p=l.createElement,f=l.createFactory,b=l.cloneElement,m=n,h={Children:{map:a.map,forEach:a.forEach,count:a.count,toArray:a.toArray,only:d},Component:o.Component,PureComponent:o.PureComponent,createElement:p,cloneElement:b,isValidElement:l.isValidElement,PropTypes:s,createClass:u,createFactory:f,createMixin:function(e){return e},DOM:i,version:c,__spread:m};e.exports=h},function(e,t,r){"use strict";e.exports={}},function(e,t,r){"use strict";e.exports=function(){}},function(e,t,r){"use strict";var n=r(453),o=r(132),a=r(349),i=r(454),l=n.twoArgumentPooler,s=n.fourArgumentPooler,c=/\/+/g;function u(e){return(""+e).replace(c,"$&/")}function d(e,t){this.func=e,this.context=t,this.count=0}function p(e,t,r){var n=e.func,o=e.context;n.call(o,t,e.count++)}function f(e,t,r,n){this.result=e,this.keyPrefix=t,this.func=r,this.context=n,this.count=0}function b(e,t,r){var n=e.result,i=e.keyPrefix,l=e.func,s=e.context,c=l.call(s,t,e.count++);Array.isArray(c)?m(c,n,r,a.thatReturnsArgument):null!=c&&(o.isValidElement(c)&&(c=o.cloneAndReplaceKey(c,i+(!c.key||t&&t.key===c.key?"":u(c.key)+"/")+r)),n.push(c))}function m(e,t,r,n,o){var a="";null!=r&&(a=u(r)+"/");var l=f.getPooled(t,a,n,o);i(e,b,l),f.release(l)}function h(e,t,r){return null}d.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},n.addPoolingTo(d,l),f.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},n.addPoolingTo(f,s);var g={forEach:function(e,t,r){if(null==e)return e;var n=d.getPooled(t,r);i(e,p,n),d.release(n)},map:function(e,t,r){if(null==e)return e;var n=[];return m(e,n,null,t,r),n},mapIntoWithKeyPrefixInternal:m,count:function(e,t){return i(e,h,null)},toArray:function(e){var t=[];return m(e,t,null,a.thatReturnsArgument),t}};e.exports=g},function(e,t,r){"use strict";var n=r(226),o=(r(227),function(e){if(this.instancePool.length){var t=this.instancePool.pop();return this.call(t,e),t}return new this(e)}),a=function(e){e instanceof this||n("25"),e.destructor(),this.instancePool.length<this.poolSize&&this.instancePool.push(e)},i=o,l={addPoolingTo:function(e,t){var r=e;return r.instancePool=[],r.getPooled=t||i,r.poolSize||(r.poolSize=10),r.release=a,r},oneArgumentPooler:o,twoArgumentPooler:function(e,t){if(this.instancePool.length){var r=this.instancePool.pop();return this.call(r,e,t),r}return new this(e,t)},threeArgumentPooler:function(e,t,r){if(this.instancePool.length){var n=this.instancePool.pop();return this.call(n,e,t,r),n}return new this(e,t,r)},fourArgumentPooler:function(e,t,r,n){if(this.instancePool.length){var o=this.instancePool.pop();return this.call(o,e,t,r,n),o}return new this(e,t,r,n)}};e.exports=l},function(e,t,r){"use strict";var n=r(226),o=(r(351),r(352)),a=r(455),i=(r(227),r(456));r(254);function l(e,t){return e&&"object"==typeof e&&null!=e.key?i.escape(e.key):t.toString(36)}e.exports=function(e,t,r){return null==e?0:function e(t,r,s,c){var u,d=typeof t;if("undefined"!==d&&"boolean"!==d||(t=null),null===t||"string"===d||"number"===d||"object"===d&&t.$$typeof===o)return s(c,t,""===r?"."+l(t,0):r),1;var p=0,f=""===r?".":r+":";if(Array.isArray(t))for(var b=0;b<t.length;b++)p+=e(u=t[b],f+l(u,b),s,c);else{var m=a(t);if(m){var h,g=m.call(t);if(m!==t.entries)for(var v=0;!(h=g.next()).done;)p+=e(u=h.value,f+l(u,v++),s,c);else for(;!(h=g.next()).done;){var O=h.value;O&&(p+=e(u=O[1],f+i.escape(O[0])+":"+l(u,0),s,c))}}else if("object"===d){var y=String(t);n("31","[object Object]"===y?"object with keys {"+Object.keys(t).join(", ")+"}":y,"")}}return p}(e,"",t,r)}},function(e,t,r){"use strict";var n="function"==typeof Symbol&&Symbol.iterator;e.exports=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}},function(e,t,r){"use strict";var n={escape:function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))},unescape:function(e){var t={"=0":"=","=2":":"};return(""+("."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1))).replace(/(=0|=2)/g,(function(e){return t[e]}))}};e.exports=n},function(e,t,r){"use strict";var n=r(132).createFactory,o={a:n("a"),abbr:n("abbr"),address:n("address"),area:n("area"),article:n("article"),aside:n("aside"),audio:n("audio"),b:n("b"),base:n("base"),bdi:n("bdi"),bdo:n("bdo"),big:n("big"),blockquote:n("blockquote"),body:n("body"),br:n("br"),button:n("button"),canvas:n("canvas"),caption:n("caption"),cite:n("cite"),code:n("code"),col:n("col"),colgroup:n("colgroup"),data:n("data"),datalist:n("datalist"),dd:n("dd"),del:n("del"),details:n("details"),dfn:n("dfn"),dialog:n("dialog"),div:n("div"),dl:n("dl"),dt:n("dt"),em:n("em"),embed:n("embed"),fieldset:n("fieldset"),figcaption:n("figcaption"),figure:n("figure"),footer:n("footer"),form:n("form"),h1:n("h1"),h2:n("h2"),h3:n("h3"),h4:n("h4"),h5:n("h5"),h6:n("h6"),head:n("head"),header:n("header"),hgroup:n("hgroup"),hr:n("hr"),html:n("html"),i:n("i"),iframe:n("iframe"),img:n("img"),input:n("input"),ins:n("ins"),kbd:n("kbd"),keygen:n("keygen"),label:n("label"),legend:n("legend"),li:n("li"),link:n("link"),main:n("main"),map:n("map"),mark:n("mark"),menu:n("menu"),menuitem:n("menuitem"),meta:n("meta"),meter:n("meter"),nav:n("nav"),noscript:n("noscript"),object:n("object"),ol:n("ol"),optgroup:n("optgroup"),option:n("option"),output:n("output"),p:n("p"),param:n("param"),picture:n("picture"),pre:n("pre"),progress:n("progress"),q:n("q"),rp:n("rp"),rt:n("rt"),ruby:n("ruby"),s:n("s"),samp:n("samp"),script:n("script"),section:n("section"),select:n("select"),small:n("small"),source:n("source"),span:n("span"),strong:n("strong"),style:n("style"),sub:n("sub"),summary:n("summary"),sup:n("sup"),table:n("table"),tbody:n("tbody"),td:n("td"),textarea:n("textarea"),tfoot:n("tfoot"),th:n("th"),thead:n("thead"),time:n("time"),title:n("title"),tr:n("tr"),track:n("track"),u:n("u"),ul:n("ul"),var:n("var"),video:n("video"),wbr:n("wbr"),circle:n("circle"),clipPath:n("clipPath"),defs:n("defs"),ellipse:n("ellipse"),g:n("g"),image:n("image"),line:n("line"),linearGradient:n("linearGradient"),mask:n("mask"),path:n("path"),pattern:n("pattern"),polygon:n("polygon"),polyline:n("polyline"),radialGradient:n("radialGradient"),rect:n("rect"),stop:n("stop"),svg:n("svg"),text:n("text"),tspan:n("tspan")};e.exports=o},function(e,t,r){"use strict";var n=r(132).isValidElement,o=r(459);e.exports=o(n)},function(e,t,r){"use strict";var n=r(460);e.exports=function(e){return n(e,!1)}},function(e,t,r){"use strict";var n=r(461),o=r(182),a=r(319),i=r(463),l=r(464);function s(){return null}e.exports=function(e,t){var r="function"==typeof Symbol&&Symbol.iterator;var c={array:f("array"),bigint:f("bigint"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:p(s),arrayOf:function(e){return p((function(t,r,n,o,i){if("function"!=typeof e)return new d("Property `"+i+"` of component `"+n+"` has invalid PropType notation inside arrayOf.");var l=t[r];if(!Array.isArray(l))return new d("Invalid "+o+" `"+i+"` of type `"+h(l)+"` supplied to `"+n+"`, expected an array.");for(var s=0;s<l.length;s++){var c=e(l,s,n,o,i+"["+s+"]",a);if(c instanceof Error)return c}return null}))},element:p((function(t,r,n,o,a){var i=t[r];return e(i)?null:new d("Invalid "+o+" `"+a+"` of type `"+h(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:p((function(e,t,r,o,a){var i=e[t];return n.isValidElementType(i)?null:new d("Invalid "+o+" `"+a+"` of type `"+h(i)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return p((function(t,r,n,o,a){if(!(t[r]instanceof e)){var i=e.name||"<<anonymous>>";return new d("Invalid "+o+" `"+a+"` of type `"+function(e){if(!e.constructor||!e.constructor.name)return"<<anonymous>>";return e.constructor.name}(t[r])+"` supplied to `"+n+"`, expected instance of `"+i+"`.")}return null}))},node:p((function(e,t,r,n,o){return m(e[t])?null:new d("Invalid "+n+" `"+o+"` supplied to `"+r+"`, expected a ReactNode.")})),objectOf:function(e){return p((function(t,r,n,o,l){if("function"!=typeof e)return new d("Property `"+l+"` of component `"+n+"` has invalid PropType notation inside objectOf.");var s=t[r],c=h(s);if("object"!==c)return new d("Invalid "+o+" `"+l+"` of type `"+c+"` supplied to `"+n+"`, expected an object.");for(var u in s)if(i(s,u)){var p=e(s,u,n,o,l+"."+u,a);if(p instanceof Error)return p}return null}))},oneOf:function(e){if(!Array.isArray(e))return s;return p((function(t,r,n,o,a){for(var i=t[r],l=0;l<e.length;l++)if(u(i,e[l]))return null;var s=JSON.stringify(e,(function(e,t){return"symbol"===g(t)?String(t):t}));return new d("Invalid "+o+" `"+a+"` of value `"+String(i)+"` supplied to `"+n+"`, expected one of "+s+".")}))},oneOfType:function(e){if(!Array.isArray(e))return s;for(var t=0;t<e.length;t++){var r=e[t];if("function"!=typeof r)return v(r),s}return p((function(t,r,n,o,l){for(var s=[],c=0;c<e.length;c++){var u=(0,e[c])(t,r,n,o,l,a);if(null==u)return null;u.data&&i(u.data,"expectedType")&&s.push(u.data.expectedType)}return new d("Invalid "+o+" `"+l+"` supplied to `"+n+"`"+(s.length>0?", expected one of type ["+s.join(", ")+"]":"")+".")}))},shape:function(e){return p((function(t,r,n,o,i){var l=t[r],s=h(l);if("object"!==s)return new d("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+n+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return b(n,o,i,c,g(u));var p=u(l,c,n,o,i+"."+c,a);if(p)return p}return null}))},exact:function(e){return p((function(t,r,n,l,s){var c=t[r],u=h(c);if("object"!==u)return new d("Invalid "+l+" `"+s+"` of type `"+u+"` supplied to `"+n+"`, expected `object`.");var p=o({},t[r],e);for(var f in p){var m=e[f];if(i(e,f)&&"function"!=typeof m)return b(n,l,s,f,g(m));if(!m)return new d("Invalid "+l+" `"+s+"` key `"+f+"` supplied to `"+n+"`.\nBad object: "+JSON.stringify(t[r],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var v=m(c,f,n,l,s+"."+f,a);if(v)return v}return null}))}};function u(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function d(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function p(e){function r(r,n,o,i,l,s,c){if((i=i||"<<anonymous>>",s=s||o,c!==a)&&t){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}return null==n[o]?r?null===n[o]?new d("The "+l+" `"+s+"` is marked as required in `"+i+"`, but its value is `null`."):new d("The "+l+" `"+s+"` is marked as required in `"+i+"`, but its value is `undefined`."):null:e(n,o,i,l,s)}var n=r.bind(null,!1);return n.isRequired=r.bind(null,!0),n}function f(e){return p((function(t,r,n,o,a,i){var l=t[r];return h(l)!==e?new d("Invalid "+o+" `"+a+"` of type `"+g(l)+"` supplied to `"+n+"`, expected `"+e+"`.",{expectedType:e}):null}))}function b(e,t,r,n,o){return new d((e||"React class")+": "+t+" type `"+r+"."+n+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function m(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(m);if(null===t||e(t))return!0;var n=function(e){var t=e&&(r&&e[r]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!n)return!1;var o,a=n.call(t);if(n!==t.entries){for(;!(o=a.next()).done;)if(!m(o.value))return!1}else for(;!(o=a.next()).done;){var i=o.value;if(i&&!m(i[1]))return!1}return!0;default:return!1}}function h(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function g(e){if(null==e)return""+e;var t=h(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function v(e){var t=g(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return d.prototype=Error.prototype,c.checkPropTypes=l,c.resetWarningCache=l.resetWarningCache,c.PropTypes=c,c}},function(e,t,r){"use strict";e.exports=r(462)},function(e,t,r){"use strict";
263
+ */var n,o=Symbol.for("react.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.server_context"),p=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case i:case s:case l:case f:case b:return e;default:switch(e=e&&e.$$typeof){case d:case u:case p:case h:case m:case c:return e;default:return t}}case a:return t}}}n=Symbol.for("react.module.reference"),t.ContextConsumer=u,t.ContextProvider=c,t.Element=o,t.ForwardRef=p,t.Fragment=i,t.Lazy=h,t.Memo=m,t.Portal=a,t.Profiler=s,t.StrictMode=l,t.Suspense=f,t.SuspenseList=b,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return v(e)===u},t.isContextProvider=function(e){return v(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return v(e)===p},t.isFragment=function(e){return v(e)===i},t.isLazy=function(e){return v(e)===h},t.isMemo=function(e){return v(e)===m},t.isPortal=function(e){return v(e)===a},t.isProfiler=function(e){return v(e)===s},t.isStrictMode=function(e){return v(e)===l},t.isSuspense=function(e){return v(e)===f},t.isSuspenseList=function(e){return v(e)===b},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===s||e===l||e===f||e===b||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===c||e.$$typeof===u||e.$$typeof===p||e.$$typeof===n||void 0!==e.getModuleId)},t.typeOf=v},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CAppBar=void 0;const i=a(r(0)),l=r(183);class s extends i.Component{constructor(){super(...arguments),this.state={open:!0},this.handleToggle=()=>{this.setState({open:!this.state.open})}}render(){return i.createElement("div",null,i.createElement(l.AppBar,{position:"static"},i.createElement(l.Toolbar,null,i.createElement(l.Typography,{variant:"h6",noWrap:!0,component:"div",sx:{flexGrow:1}},"Colyseus Monitor v","0.15.3-preview.4"))))}}t.CAppBar=s},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function l(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RoomList=void 0;const s=a(r(0)),c=r(344),u=r(183),d=r(353),p=l(r(445)),f=l(r(346)),b=r(183);class m extends s.Component{constructor(){super(...arguments),this.state={selected:[1],rooms:[],connections:0,cpu:0,memory:{totalMemMb:0,usedMemMb:0},columns:[]},this.isSelected=e=>-1!==this.state.selected.indexOf(e),this.handleRowSelection=e=>{this.setState({selected:e})}}componentWillMount(){this.fetchRoomList()}fetchRoomList(){return i(this,void 0,void 0,(function*(){try{this.setState((yield(0,c.fetchRoomList)()).body)}catch(e){console.error(e)}clearInterval(this.updateRoomListInterval),this.updateRoomListInterval=window.setInterval(()=>this.fetchRoomList(),5e3)}))}inspectRoom(e){this.props.history.push("/room/"+e)}disposeRoom(e){return i(this,void 0,void 0,(function*(){yield(0,c.remoteRoomCall)(e,"disconnect"),this.fetchRoomList()}))}getColumnHeader(e){return"string"==typeof e?e:e.metadata}getRoomColumn(e,t){let r,n,o=t,a=e;return"elapsedTime"===o?n=this.millisecondsToStr:t.metadata&&e.metadata&&(o=t.metadata,a=e.metadata),r=a[o],void 0===r&&(r=""),n?n(r):""+r}millisecondsToStr(e){let t=Math.floor(e/1e3);const r=Math.floor(t/31536e3);if(r)return r+"y";const n=Math.floor((t%=31536e3)/86400);if(n)return n+"d";const o=Math.floor((t%=86400)/3600);if(o)return o+"h";const a=Math.floor((t%=3600)/60);if(a)return a+"min";const i=t%60;return i?i+"s":"less than a second"}bytesToStr(e){const t=Math.floor(Math.log(e)/Math.log(1024));return 1*(e/Math.pow(1024,t)).toFixed(2)+" "+["B","kB","MB","GB","TB"][t]}getColumnsNames(e){const t=e.map(e=>{const t=this.getColumnHeader(e);return{id:t,field:t,headerName:t,flex:1}});return t.push({id:"Inspect",field:"Inspect",headerName:"",flex:1,renderCell:e=>s.createElement("div",{style:{cursor:"pointer"},onClick:()=>{this.inspectRoom(e.value)}},s.createElement(u.Button,{variant:"contained",disableElevation:!0,endIcon:s.createElement(p.default,null)},s.createElement(b.Typography,{noWrap:!0,component:"span",sx:{flexGrow:1,display:{xs:"none",sm:"none",md:"block"}}},"Inspect")))}),t.push({id:"Dispose",field:"Dispose",headerName:"",flex:1,renderCell:e=>s.createElement("div",{style:{cursor:"pointer"},onClick:()=>{this.disposeRoom(e.value)}},s.createElement(u.Button,{variant:"contained",disableElevation:!0,color:"error",startIcon:s.createElement(f.default,null)},s.createElement(b.Typography,{noWrap:!0,component:"span",sx:{flexGrow:1,display:{xs:"none",sm:"none",md:"block"}}},"Dispose")))}),t}getRowsData(e){return e.map(e=>{const t={id:e.roomId};for(const r of this.state.columns){const n=this.getRoomColumn(e,r);t[r]=n}return t.Inspect=e.roomId,t.Dispose=e.roomId,t})}generateRoomListDataGrid(){const e=this.getColumnsNames(this.state.columns),t=this.getRowsData(this.state.rooms);return s.createElement(d.DataGrid,{columns:e,rows:t,autoHeight:!0,sx:{overflow:"hidden"},slots:{noRowsOverlay:()=>s.createElement(s.Fragment,null)},disableRowSelectionOnClick:!0,hideFooter:!0,hideFooterPagination:!0,hideFooterSelectedRowCount:!0})}render(){return s.createElement("div",null,s.createElement(u.Card,null,s.createElement(b.TableContainer,{component:b.Paper},s.createElement(b.Table,{"aria-label":"simple table"},s.createElement(b.TableHead,null,s.createElement(b.TableRow,null,s.createElement(b.TableCell,{align:"center"},"Connections",s.createElement(b.Chip,{sx:{marginLeft:"6px"},size:"small",color:"primary",label:this.state.connections})),s.createElement(b.TableCell,{align:"center"},"Rooms",s.createElement(b.Chip,{sx:{marginLeft:"6px"},size:"small",color:"primary",label:this.state.rooms.length})),s.createElement(b.TableCell,{align:"center"},"CPU Usage",s.createElement(b.Chip,{sx:{marginLeft:"6px"},size:"small",color:"primary",label:this.state.cpu+" %"})),s.createElement(b.TableCell,{align:"center"},"Memory",s.createElement(b.Chip,{sx:{marginLeft:"6px"},size:"small",color:"primary",label:this.state.memory.usedMemMb+" MB"}))))))),s.createElement(u.Card,{style:{marginTop:"2px"}},this.generateRoomListDataGrid()))}}t.RoomList=m},function(e,t,r){var n;"undefined"!=typeof window?n=window:"undefined"!=typeof self?n=self:(console.warn("Using browser-only version of superagent in non-browser environment"),n=this);var o=r(440),a=r(441),i=r(345),l=r(442),s=r(444);function c(){}var u=t=e.exports=function(e,r){return"function"==typeof r?new t.Request("GET",e).end(r):1==arguments.length?new t.Request("GET",e):new t.Request(e,r)};t.Request=g,u.getXHR=function(){if(!(!n.XMLHttpRequest||n.location&&"file:"==n.location.protocol&&n.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("Browser-only version of superagent could not find XHR")};var d="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function p(e){if(!i(e))return e;var t=[];for(var r in e)f(t,r,e[r]);return t.join("&")}function f(e,t,r){if(null!=r)if(Array.isArray(r))r.forEach((function(r){f(e,t,r)}));else if(i(r))for(var n in r)f(e,t+"["+n+"]",r[n]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(r));else null===r&&e.push(encodeURIComponent(t))}function b(e){for(var t,r,n={},o=e.split("&"),a=0,i=o.length;a<i;++a)-1==(r=(t=o[a]).indexOf("="))?n[decodeURIComponent(t)]="":n[decodeURIComponent(t.slice(0,r))]=decodeURIComponent(t.slice(r+1));return n}function m(e){return/[\/+]json($|[^-\w])/.test(e)}function h(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.header=this.headers=function(e){for(var t,r,n,o,a=e.split(/\r?\n/),i={},l=0,s=a.length;l<s;++l)-1!==(t=(r=a[l]).indexOf(":"))&&(n=r.slice(0,t).toLowerCase(),o=d(r.slice(t+1)),i[n]=o);return i}(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"!=this.req.method?this._parseBody(this.text?this.text:this.xhr.response):null}function g(e,t){var r=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",(function(){var e,t=null,n=null;try{n=new h(r)}catch(e){return(t=new Error("Parser is unable to parse the response")).parse=!0,t.original=e,r.xhr?(t.rawResponse=void 0===r.xhr.responseType?r.xhr.responseText:r.xhr.response,t.status=r.xhr.status?r.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),r.callback(t)}r.emit("response",n);try{r._isResponseOK(n)||(e=new Error(n.statusText||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=n,e.status=n.status,r.callback(e,n)):r.callback(null,n)}))}function v(e,t,r){var n=u("DELETE",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n}u.serializeObject=p,u.parseString=b,u.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},u.serialize={"application/x-www-form-urlencoded":p,"application/json":JSON.stringify},u.parse={"application/x-www-form-urlencoded":b,"application/json":JSON.parse},l(h.prototype),h.prototype._parseBody=function(e){var t=u.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&m(this.type)&&(t=u.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null)},h.prototype.toError=function(){var e=this.req,t=e.method,r=e.url,n="cannot "+t+" "+r+" ("+this.status+")",o=new Error(n);return o.status=this.status,o.method=t,o.url=r,o},u.Response=h,o(g.prototype),a(g.prototype),g.prototype.type=function(e){return this.set("Content-Type",u.types[e]||e),this},g.prototype.accept=function(e){return this.set("Accept",u.types[e]||e),this},g.prototype.auth=function(e,t,r){1===arguments.length&&(t=""),"object"==typeof t&&null!==t&&(r=t,t=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});var n=function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,r,n)},g.prototype.query=function(e){return"string"!=typeof e&&(e=p(e)),e&&this._query.push(e),this},g.prototype.attach=function(e,t,r){if(t){if(this._data)throw Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,r||t.name)}return this},g.prototype._getFormData=function(){return this._formData||(this._formData=new n.FormData),this._formData},g.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var r=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),r(e,t)},g.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},g.prototype.buffer=g.prototype.ca=g.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},g.prototype.pipe=g.prototype.write=function(){throw Error("Streaming is not supported in browser version of superagent")},g.prototype._isHost=function(e){return e&&"object"==typeof e&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},g.prototype.end=function(e){return this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||c,this._finalizeQueryString(),this._end()},g.prototype._end=function(){var e=this,t=this.xhr=u.getXHR(),r=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var r=t.readyState;if(r>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4==r){var n;try{n=t.status}catch(e){n=0}if(!n){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var n=function(t,r){r.total>0&&(r.percent=r.loaded/r.total*100),r.direction=t,e.emit("progress",r)};if(this.hasListeners("progress"))try{t.onprogress=n.bind(null,"download"),t.upload&&(t.upload.onprogress=n.bind(null,"upload"))}catch(e){}try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof r&&!this._isHost(r)){var o=this._header["content-type"],a=this._serializer||u.serialize[o?o.split(";")[0]:""];!a&&m(o)&&(a=u.serialize["application/json"]),a&&(r=a(r))}for(var i in this.header)null!=this.header[i]&&this.header.hasOwnProperty(i)&&t.setRequestHeader(i,this.header[i]);return this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0!==r?r:null),this},u.agent=function(){return new s},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(e){s.prototype[e.toLowerCase()]=function(t,r){var n=new u.Request(e,t);return this._setDefaults(n),r&&n.end(r),n}})),s.prototype.del=s.prototype.delete,u.get=function(e,t,r){var n=u("GET",e);return"function"==typeof t&&(r=t,t=null),t&&n.query(t),r&&n.end(r),n},u.head=function(e,t,r){var n=u("HEAD",e);return"function"==typeof t&&(r=t,t=null),t&&n.query(t),r&&n.end(r),n},u.options=function(e,t,r){var n=u("OPTIONS",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},u.del=v,u.delete=v,u.patch=function(e,t,r){var n=u("PATCH",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},u.post=function(e,t,r){var n=u("POST",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},u.put=function(e,t,r){var n=u("PUT",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n}},function(e,t,r){function n(e){if(e)return function(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}(e)}e.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},n.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<n.length;o++)if((r=n[o])===t||r.fn===t){n.splice(o,1);break}return 0===n.length&&delete this._callbacks["$"+e],this},n.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(r){n=0;for(var o=(r=r.slice(0)).length;n<o;++n)r[n].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,r){"use strict";var n=r(345);function o(e){if(e)return function(e){for(var t in o.prototype)e[t]=o.prototype[t];return e}(e)}e.exports=o,o.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},o.prototype.parse=function(e){return this._parser=e,this},o.prototype.responseType=function(e){return this._responseType=e,this},o.prototype.serialize=function(e){return this._serializer=e,this},o.prototype.timeout=function(e){if(!e||"object"!=typeof e)return this._timeout=e,this._responseTimeout=0,this;for(var t in e)switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;default:console.warn("Unknown timeout option",t)}return this},o.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var a=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];o.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var r=this._retryCallback(e,t);if(!0===r)return!0;if(!1===r)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!=t.status)return!0;if(e){if(e.code&&~a.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"==e.code)return!0;if(e.crossDomain)return!0}return!1},o.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},o.prototype.then=function(e,t){if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(e,t){r.end((function(r,n){r?t(r):e(n)}))}))}return this._fullfilledPromise.then(e,t)},o.prototype.catch=function(e){return this.then(void 0,e)},o.prototype.use=function(e){return e(this),this},o.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},o.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},o.prototype.get=function(e){return this._header[e.toLowerCase()]},o.prototype.getHeader=o.prototype.get,o.prototype.set=function(e,t){if(n(e)){for(var r in e)this.set(r,e[r]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},o.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},o.prototype.field=function(e,t){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),n(e)){for(var r in e)this.field(r,e[r]);return this}if(Array.isArray(t)){for(var o in t)this.field(e,t[o]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=""+t),this._getFormData().append(e,t),this},o.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},o.prototype._auth=function(e,t,r,n){switch(r.type){case"basic":this.set("Authorization","Basic "+n(e+":"+t));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer "+e)}return this},o.prototype.withCredentials=function(e){return null==e&&(e=!0),this._withCredentials=e,this},o.prototype.redirects=function(e){return this._maxRedirects=e,this},o.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw TypeError("Invalid argument");return this._maxResponseSize=e,this},o.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},o.prototype.send=function(e){var t=n(e),r=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(t&&n(this._data))for(var o in e)this._data[o]=e[o];else"string"==typeof e?(r||this.type("form"),r=this._header["content-type"],this._data="application/x-www-form-urlencoded"==r?this._data?this._data+"&"+e:e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)||r||this.type("json"),this},o.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},o.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var r=this.url.substring(t+1).split("&");"function"==typeof this._sort?r.sort(this._sort):r.sort(),this.url=this.url.substring(0,t)+"?"+r.join("&")}}},o.prototype._appendQueryString=function(){console.trace("Unsupported")},o.prototype._timeoutError=function(e,t,r){if(!this._aborted){var n=new Error(e+t+"ms exceeded");n.timeout=t,n.code="ECONNABORTED",n.errno=r,this.timedout=!0,this.abort(),this.callback(n)}},o.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},function(e,t,r){"use strict";var n=r(443);function o(e){if(e)return function(e){for(var t in o.prototype)e[t]=o.prototype[t];return e}(e)}e.exports=o,o.prototype.get=function(e){return this.header[e.toLowerCase()]},o.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=n.type(t);var r=n.params(t);for(var o in r)this[o]=r[o];this.links={};try{e.link&&(this.links=n.parseLinks(e.link))}catch(e){}},o.prototype._setStatusProperties=function(e){var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.redirect=3==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.created=201==e,this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.forbidden=403==e,this.notFound=404==e,this.unprocessableEntity=422==e}},function(e,t,r){"use strict";t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){return e.split(/ *; */).reduce((function(e,t){var r=t.split(/ *= */),n=r.shift(),o=r.shift();return n&&o&&(e[n]=o),e}),{})},t.parseLinks=function(e){return e.split(/ *, */).reduce((function(e,t){var r=t.split(/ *; */),n=r[0].slice(1,-1);return e[r[1].split(/ *= */)[1].slice(1,-1)]=n,e}),{})},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},function(e,t){function r(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach((function(e){r.prototype[e]=function(){return this._defaults.push({fn:e,arguments:arguments}),this}})),r.prototype._setDefaults=function(e){this._defaults.forEach((function(t){e[t.fn].apply(e,t.arguments)}))},e.exports=r},function(e,t,r){"use strict";var n=r(113);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(114)),a=r(2),i=(0,o.default)((0,a.jsx)("path",{d:"M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h4v-2H5V8h14v10h-4v2h4c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm-7 6-4 4h3v6h2v-6h3l-4-4z"}),"OpenInBrowser");t.default=i},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RoomInspect=void 0;const l=a(r(0)),s=r(447),c=i(r(469));r(783);const u=r(344),d=r(183),p=r(353),f=r(475),b=i(r(470)),m=i(r(471)),h=i(r(472)),g=i(r(473)),v=i(r(346)),O=i(r(474));class y extends l.Component{constructor(){super(...arguments),this.state={roomId:void 0,state:{},clients:[],maxClients:0,stateSize:0,locked:!1,currentTab:"1",sendDialogTitle:"",sendDialogOpen:!1,sendToClient:void 0,sendType:localStorage.getItem("$$colyseus$type")||"message_type",sendData:JSON.parse(localStorage.getItem("$$colyseus$data")||"{}")},this.updateSendType=e=>{const t=e.target.value;localStorage.setItem("$$colyseus$type",t),this.setState({sendType:t})},this.updateSendData=e=>{localStorage.setItem("$$colyseus$data",JSON.stringify(e)),this.state.sendData=e},this.handleCloseSend=()=>{this.setState({sendDialogOpen:!1})},this.handleSend=()=>{(this.state.sendToClient?this.roomCall("_sendMessageToClient",this.state.sendToClient,this.state.sendType,this.state.sendData):this.roomCall("broadcast",this.state.sendType,this.state.sendData)).then(()=>this.handleCloseSend())},this.handleTabChange=(e,t)=>{this.setState({currentTab:t})}}componentDidMount(){this.fetchRoomData()}fetchRoomData(){const e=this.props.match.params.roomId;(0,u.fetchRoomData)(e).then(e=>this.setState(e.body)).catch(e=>console.error(e)),clearInterval(this.updateDataInterval),this.updateDataInterval=window.setInterval(()=>this.fetchRoomData(),5e3)}roomCall(e,...t){const r=this.props.match.params.roomId;return(0,u.remoteRoomCall)(r,e,...t).then(e=>console.log(e.body)).catch(e=>console.error(e))}componentWillUnmount(){clearInterval(this.updateDataInterval)}sendMessage(e){const t=e||void 0;let r=e?`Send message to client (${e})`:"Broadcast message to all clients";this.setState({sendToClient:t,sendDialogTitle:r,sendDialogOpen:!0})}disconnectClient(e){this.roomCall("_forceClientDisconnect",e).then(()=>this.fetchRoomData())}disposeRoom(){this.roomCall("disconnect").then(()=>{this.props.history.push("/")})}goBack(){window.history.back()}render(){const e=[{id:"sessionId",field:"sessionId",headerName:"sessionId",flex:1},{id:"actions",field:"actions",headerName:"actions",flex:1,renderCell:e=>l.createElement(l.Fragment,null,l.createElement(d.Button,{variant:"text",startIcon:l.createElement(g.default,null),onClick:this.sendMessage.bind(this,e.id)},"Send"),l.createElement(d.Button,{variant:"text",color:"error",startIcon:l.createElement(O.default,null),onClick:this.disconnectClient.bind(this,e.id)},"Disconnect"))}],t=this.state.clients.map(e=>({id:e.sessionId,sessionId:e.sessionId,actions:e.sessionId}));return l.createElement("div",null,l.createElement(d.AppBar,{position:"static"},l.createElement(d.Toolbar,null,l.createElement(d.IconButton,{"aria-label":"delete",onClick:this.goBack.bind(this)},l.createElement(b.default,null)),l.createElement(d.Typography,{variant:"h6",noWrap:!0,component:"div",sx:{flexGrow:1}},"Room "+this.state.roomId))),l.createElement(d.TableContainer,{component:d.Paper},l.createElement(d.Table,{"aria-label":"simple table"},l.createElement(d.TableHead,null,l.createElement(d.TableRow,null,l.createElement(d.TableCell,{align:"center"},this.state.locked?l.createElement(m.default,null):l.createElement(h.default,null),this.state.locked?"Locked":"Unlocked"),l.createElement(d.TableCell,{align:"center"},"Clients",l.createElement(d.Chip,{sx:{marginLeft:"6px"},size:"small",color:"primary",label:`${this.state.clients.length}${this.state.maxClients?" / "+this.state.maxClients:""}`})),l.createElement(d.TableCell,{align:"center"},"State Size",l.createElement(d.Chip,{sx:{marginLeft:"6px"},size:"small",color:"primary",label:this.state.stateSize+" bytes"})),l.createElement(d.TableCell,{align:"center"},l.createElement(d.Button,{variant:"text",startIcon:l.createElement(g.default,null),onClick:this.sendMessage.bind(this,void 0)},"Broadcast")),l.createElement(d.TableCell,{align:"center"},l.createElement(d.Button,{variant:"text",color:"error",startIcon:l.createElement(v.default,null),onClick:this.disposeRoom.bind(this)},"Dispose room")))))),l.createElement(f.TabContext,{value:this.state.currentTab},l.createElement(d.Box,{sx:{borderBottom:1,borderColor:"divider"}},l.createElement(f.TabList,{onChange:this.handleTabChange,"aria-label":"lab API tabs example",variant:"fullWidth"},l.createElement(d.Tab,{label:"Clients",value:"1"}),l.createElement(d.Tab,{label:"State",value:"2"}))),l.createElement(f.TabPanel,{value:"1"},l.createElement(p.DataGrid,{columns:e,rows:t,sx:{overflow:"hidden"},disableRowSelectionOnClick:!0,hideFooter:!0,hideFooterPagination:!0,hideFooterSelectedRowCount:!0})),l.createElement(f.TabPanel,{value:"2"},l.createElement(c.default,{src:this.state.state,theme:"default"}))),l.createElement(d.Dialog,{open:this.state.sendDialogOpen,onClose:this.handleCloseSend,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},l.createElement(d.DialogTitle,{id:"alert-dialog-title"},this.state.sendDialogTitle),l.createElement(d.DialogContent,null,l.createElement("h2",null,"Message type:"),l.createElement("input",{type:"text",value:this.state.sendType,onChange:this.updateSendType}),l.createElement("h2",null,"Message payload"),l.createElement(s.JsonEditor,{value:this.state.sendData,propagateChanges:this.updateSendData})),l.createElement(d.DialogActions,null,l.createElement(d.Button,{variant:"text",color:"error",onClick:this.handleCloseSend},"Cancel"),l.createElement(d.Button,{variant:"text",onClick:this.handleSend},"Send"))))}}t.RoomInspect=y},function(e,t,r){var n;n=function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}return r.m=e,r.c=t,r.p="",r(0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9);Object.defineProperty(t,"JsonEditor",{enumerable:!0,get:function(){return(e=n,e&&e.__esModule?e:{default:e}).default;var e}});var o=r(3);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return o.parse}})},function(t,r){t.exports=e},function(e,t,r){e.exports=r(12)()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.render_item=function(e,t,r,l,s,c){return r instanceof Array?n.default.createElement(o.default,{key:e,jkey:t,doc:r,level:c+1,propagateChanges:l}):r instanceof Object?n.default.createElement(a.default,{key:e,jkey:t,doc:r,level:c+1,propagateChanges:l}):n.default.createElement(i.default,{key:e,index:t,value:r,isLast:s,propagateChanges:l})},t.get_options=function(e,t){return void 0===e.levels||t<e.levels?["string","number","boolean","object","array","whitespace","null"]:["string","number","boolean","whitespace","null"]},t.is_container=function(e){switch(e){case"array":case"object":case"null":case"whitespace":return!0;default:return!1}},t.text2value=function(e,t){switch(e){case"boolean":var r=["true","1","yes","on"].indexOf(t.toLowerCase());return Boolean(0<=r);case"number":return Number(t);case"array":return[];case"object":return{};case"null":return null;case"whitespace":return" ";case"string":default:return t}},t.capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t.add2text=s,t.parse=function(e){try{return{json:JSON.parse(e)}}catch(r){var t=r.toString();return{json:void 0,errorText:"Pasted text is not valid json. Error: "+t+" - "+function(e,t){if(void 0!==t)for(var r=e.indexOf(" at line "),n=e.indexOf(" column "),o=e.indexOf(" of the JSON data"),a=parseInt(e.substr(r+9,n))-1,i=parseInt(e.substr(n+8,o))-1,l=t.split("\n"),c=0;c<l.length;c++)if(a===c)return s(l[c],i,"˰")}(t,e)}}};var n=l(r(1)),o=l(r(8)),a=l(r(11)),i=l(r(6));function l(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r){return e.substr(0,t)+r+e.substr(t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=r(1),i=c(a),l=c(r(2)),s=c(r(5));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.add=function(){r.setState({adding:!0})},r.next=function(e){},r.onDone=function(e,t){r.onChange(e,t),e<r.props.setup.length-1?r.next(e+1):r.save()},r.onChange=function(e,t){var n=r.state.values;n[e]=t,r.setState({values:n})},r.cancel=function(){r.setState({adding:!1})},r.save=function(){r.setState({adding:!1}),r.props.onDone(r.state.values)},r.state={adding:!1,values:[]},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"getStyle",value:function(){return this.context.styling["add-group"]}},{key:"getButtonStyle",value:function(e){return this.context.styling[e]}},{key:"input",value:function(){var e=this.props.setup.map((function(e,t){return i.default.createElement(s.default,n({key:"ab"+t,index:t,onChange:this.onChange,onDone:this.onDone},e))}),this);return i.default.createElement("div",{className:"AddButton",style:this.getStyle()},e,i.default.createElement("button",{className:"save-button",style:this.getButtonStyle("save-button"),onClick:this.save},"Save"),i.default.createElement("button",{className:"cancel-button",style:this.getButtonStyle("cancel-button"),onClick:this.cancel},"Cancel"))}},{key:"render",value:function(){return this.state.adding?this.input():i.default.createElement("button",{className:"add-button",style:this.getButtonStyle("add-button"),onClick:this.add},"+")}}]),t}(a.Component);u.propTypes={onDone:l.default.func.isRequired,setup:l.default.array.isRequired},u.contextTypes={styling:l.default.object},t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(1),a=s(o),i=s(r(2)),l=r(3);function s(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));u.call(r);var n=e.type||"string";return r.state={type:n,value:e.value,show:!(0,l.is_container)(n)},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"select",value:function(e){if(e.length>0){var t=e.map((function(e){return a.default.createElement("option",{key:e,value:e},e)}),this);return a.default.createElement("select",{onChange:this.handleSelectChange,defaultValue:this.state.type},t)}return null}},{key:"input",value:function(){var e=this.props,t=e.defaultValue,r=e.placeholder;return a.default.createElement("input",{className:"add-input",style:this.getStyle(),type:"text",autoFocus:!1,defaultValue:t,placeholder:r,onBlur:this.finishEdit,onChange:this.handleInputChange,onKeyPress:this.checkEnter})}},{key:"doneButton",value:function(){return a.default.createElement("button",{className:"add-button",style:this.getButtonStyle(),onClick:this.onDone},"√")}},{key:"getStyle",value:function(){return this.context.styling["add-input"]}},{key:"getButtonStyle",value:function(){return this.context.styling["add-button"]}},{key:"render",value:function(){var e=this.props.multiple;return a.default.createElement("div",{className:"AddInput"},this.select(e),this.state.show?this.input():this.doneButton())}}]),t}(o.Component);c.propTypes={type:i.default.string,multiple:i.default.bool.isRequired,defaultValue:i.default.oneOfType([i.default.string,i.default.number,i.default.bool]),placeholder:i.default.string,onChange:i.default.func.isRequired,onDone:i.default.func.isRequired},c.contextTypes={styling:i.default.object};var u=function(){var e=this;this.handleInputChange=function(t){var r=(0,l.text2value)(e.state.type,t.target.value);e.props.onChange(e.props.index,r),e.setState({value:r})},this.handleSelectChange=function(t){for(var r=t.target.options,n=[],o=0;o<r.length;o++)if(r[o].selected){n=r[o].value;break}var a=(0,l.is_container)(n),i=a?(0,l.text2value)(n,e.state.value):e.state.value;e.setState({type:n,show:!a}),e.props.onChange(e.props.index,i)},this.checkEnter=function(t){"Enter"===t.key&&e.finishEdit(t)},this.finishEdit=function(t){var r=(0,l.text2value)(e.state.type,t.target.value);e.props.onDone(e.props.index,r)},this.onDone=function(){var t=(0,l.text2value)(e.state.type,e.state.value);e.props.onDone(e.props.index,t)}};t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),l=p(i),s=p(r(2)),c=p(r(7)),u=r(3),d=p(r(5));function p(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.mouseOver=function(){r.setState({hover:!0})},r.mouseOut=function(){r.setState({hover:!1})},r.onChange=function(e,t){},r.onDone=function(e,t){r.propagateChanges(t)},r.onDelete=function(e){e.stopPropagation(),r.propagateDelete()},r.activateEdit=function(e){r.setState({editing:!0})},r.state={editing:!1,hover:!1},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"propagateChanges",value:function(e){this.setState({editing:!1}),this.props.propagateChanges&&this.props.value!=e&&this.props.propagateChanges("update",this.props.index,e)}},{key:"propagateDelete",value:function(){this.props.propagateChanges&&this.props.propagateChanges("delete",this.props.index)}},{key:"value",value:function(){return String(this.props.value)}},{key:"getClass",value:function(){return null===this.props.value?"null":o(this.props.value)}},{key:"getClassName",value:function(){return(0,u.capitalize)(this.getClass())+"Item"}},{key:"getStyle",value:function(){if(this.context.styling.hasOwnProperty(this.getClass())){var e=this.context.styling[this.getClass()];return(0,c.default)(!0,this.context.styling.value,e)}return this.context.styling.value}},{key:"getSuffix",value:function(){return this.props.isLast?null:","}},{key:"editSettings",value:function(){return{type:this.getClass(),defaultValue:this.props.value,multiple:!0}}},{key:"renderEdit",value:function(){var e=this.editSettings();return l.default.createElement(d.default,n({index:0,autoFocus:!1,onChange:this.onChange,onDone:this.onDone},e))}},{key:"renderInnerValue",value:function(){return l.default.createElement("span",null,this.value(),this.context.setup.tableLike?null:this.getSuffix())}},{key:"renderValue",value:function(){return l.default.createElement("div",{className:this.getClassName(),style:this.getStyle(),onClick:this.activateEdit,onMouseOver:this.mouseOver,onMouseOut:this.mouseOut},this.renderInnerValue(),this.renderDelete())}},{key:"renderDelete",value:function(){var e={visibility:this.state.hover?"visible":"hidden"},t=(0,c.default)(!0,this.context.styling["delete-button"],e);return l.default.createElement("button",{className:"delete-button",onClick:this.onDelete,style:t},"⌫")}},{key:"render",value:function(){return this.state.editing?this.renderEdit():this.renderValue()}}]),t}(i.Component);f.propTypes={index:s.default.oneOfType([s.default.string,s.default.number]).isRequired,value:s.default.oneOfType([s.default.string,s.default.number,s.default.bool]),isLast:s.default.bool,propagateChanges:s.default.func.isRequired},f.contextTypes={styling:s.default.object,setup:s.default.object},t.default=f},function(e,t,r){(function(e){!function(t){var r=function(e){return o(!0===e,!1,arguments)};function n(e,t){if("object"!==a(e))return t;for(var r in t)"object"===a(e[r])&&"object"===a(t[r])?e[r]=n(e[r],t[r]):e[r]=t[r];return e}function o(e,t,o){var i=o[0],l=o.length;(e||"object"!==a(i))&&(i={});for(var s=0;s<l;++s){var c=o[s];if("object"===a(c))for(var u in c){var d=e?r.clone(c[u]):c[u];i[u]=t?n(i[u],d):d}}return i}function a(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}r.recursive=function(e){return o(!0===e,!0,arguments)},r.clone=function(e){var t,n,o=e,i=a(e);if("array"===i)for(o=[],n=e.length,t=0;t<n;++t)o[t]=r.clone(e[t]);else if("object"===i)for(t in o={},e)o[t]=r.clone(e[t]);return o},t?e.exports=r:window.merge=r}("object"==typeof e&&e&&"object"==typeof e.exports&&e.exports)}).call(t,r(16)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(1),a=c(o),i=c(r(2)),l=r(3),s=c(r(4));function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=function(e){function t(){var e,r,n;u(this,t);for(var o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=n=d(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),n.addItem=function(e){var t=n.props.doc;t.push(e[0]),n.props.propagateChanges("add",n.props.jkey,t)},n.propagateChanges=function(e,t,r){var o=n.props.doc;switch(e){case"delete":o.splice(t,1);break;case"add":case"update":default:o[t]=r}n.props.propagateChanges("update",n.props.jkey,o)},d(n,r)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"addButtonSetup",value:function(){return[{type:"String",placeholder:"value",multiple:(0,l.get_options)(this.context.setup.structure,this.props.level)}]}},{key:"getStyle",value:function(){return this.context.styling.array}},{key:"getRowStyle",value:function(){return this.context.styling["array-row"]}},{key:"render",value:function(){var e=this.props.doc.length-1,t=this.props.doc.map((function(t,r){var n=this.props.jkey+r,o=r==e;return a.default.createElement("div",{className:"ArrayRow",style:this.getRowStyle()},(0,l.render_item)(n,r,t,this.propagateChanges,o,this.props.level))}),this);return a.default.createElement("div",{className:"ArrayItem",style:this.getStyle()},this.context.setup.tableLike?null:"[",t,a.default.createElement("div",{className:"ArrayRow",style:this.getRowStyle()},a.default.createElement(s.default,{onDone:this.addItem,setup:this.addButtonSetup()})),this.context.setup.tableLike?null:"]")}}]),t}(o.Component);p.contextTypes={styling:i.default.object,setup:i.default.object},p.propTypes={jkey:i.default.string.isRequired,doc:i.default.array.isRequired,level:i.default.number.isRequired,propagateChanges:i.default.func.isRequired},t.default=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(1),a=c(o),i=c(r(2)),l=c(r(7)),s=r(3);function c(e){return e&&e.__esModule?e:{default:e}}c(r(4));var u={root:{clear:"left"},array:{display:"inline-table"},object:{display:"inline-table"},"object-row":{display:"block",marginLeft:1},"array-row":{display:"block",marginLeft:1},value:{display:"inline-block",minWidth:10,marginLeft:.1},key:{fontWeight:"bold"},string:{color:"green"},number:{color:"blue"},undefined:{color:"violet"},boolean:{color:"red"},null:{color:"firebrick"},"add-button":{display:"inline-block"},"save-button":{display:"inline-block"},"cancel-button":{display:"inline-block"},"delete-button":{float:"right",marginLeft:.5,display:"inline-block"},"add-group":{display:"inline-flex"},"add-input":{display:"inline-block"}};function d(e){var t=e.border||"1px solid #414141",r=e.tableLike?{root:{display:"table",border:t,borderCollapse:"collapse"},array:{display:"table-cell",border:t},object:{display:"table-cell",border:t},"array-row":{display:"table-cell",border:t,marginLeft:0},"object-row":{display:"table-row",border:t,marginLeft:0},key:{display:"table-cell",border:t},value:{display:"table-cell",marginLeft:0},"add-button":{display:"table-cell"}}:{};return(0,l.default)((0,l.default)(u,r),e.styling)}var p=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.propagateChanges=function(e,t,n){r.setState({value:n}),r.props.propagateChanges&&r.props.propagateChanges(n)},r.state={defaultKey:e.defaultKey||"json.",defaultJsonKey:e.defaultJsonKey||"root",styling:d(e)},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"getChildContext",value:function(){return{styling:this.state.styling,setup:{tableLike:this.props.tableLike,structure:this.props.structure||{}}}}},{key:"getStyle",value:function(){return this.state.styling.root}},{key:"render",value:function(){var e=this.props.value||this.props.defaultValue||{},t=(0,s.render_item)(this.state.defaultKey,this.state.defaultJsonKey,e,this.propagateChanges,!1,0);return a.default.createElement("div",{className:"JsonEditor",style:this.getStyle()},t)}}]),t}(o.Component);p.propTypes={defaultValue:i.default.oneOfType([i.default.array,i.default.object]),value:i.default.oneOfType([i.default.array,i.default.object]),structure:i.default.object,defaultKey:i.default.string,defaultJsonKey:i.default.string,propagateChanges:i.default.func.isRequired},p.childContextTypes={styling:i.default.object,setup:i.default.object},t.default=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=(a(r(1)),a(r(2)));function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var s=function(e){function t(){return i(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"value",value:function(){return this.props.jkey}},{key:"getClass",value:function(){return"key"}},{key:"getSuffix",value:function(){return":"}},{key:"editSettings",value:function(){return{type:"string",defaultValue:this.props.jkey,multiple:!1}}},{key:"propagateChanges",value:function(e){this.setState({editing:!1}),this.props.propagateKeyChange&&this.props.jkey!=e&&this.props.propagateKeyChange("update",this.props.jkey,e)}},{key:"propagateDelete",value:function(){this.props.propagateKeyChange&&this.props.propagateKeyChange("delete",this.props.jkey)}}]),t}(a(r(6)).default);s.propTypes={jkey:o.default.oneOfType([o.default.string,o.default.number]).isRequired,propagateKeyChange:o.default.func.isRequired},t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(1),a=u(o),i=u(r(2)),l=u(r(4)),s=r(3),c=u(r(10));function u(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var f=function(e){function t(){var e,r,n;d(this,t);for(var o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=n=p(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),n.addItem=function(e){var t=n.props.doc;t[e[0]]=e[1],n.props.propagateChanges("add",n.props.jkey,t)},n.propagateChanges=function(e,t,r){var o=n.props.doc;switch(e){case"delete":delete o[t];break;case"add":case"update":default:o[t]=r}n.props.propagateChanges("update",n.props.jkey,o)},n.propagateKeyChange=function(e,t,r){var o=n.props.doc[t],a=n.props.doc;switch(e){case"delete":break;case"add":case"update":default:a[r]=o}delete a[t],n.props.propagateChanges("update",n.props.jkey,a)},p(n,r)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"addButtonSetup",value:function(){return[{type:"text",placeholder:"key",multiple:[]},{type:"text",placeholder:"value",multiple:(0,s.get_options)(this.context.setup.structure,this.props.level)}]}},{key:"getStyle",value:function(){return this.context.styling.object}},{key:"getRowStyle",value:function(){return this.context.styling["object-row"]}},{key:"render",value:function(){var e=Object.keys(this.props.doc),t=e.map((function(t,r){var n=this.props.jkey+"."+t+r,o=r==e.length-1;return a.default.createElement("div",{key:this.props.jkey+".r"+r,className:"ObjectRow",style:this.getRowStyle()},a.default.createElement(c.default,{key:this.props.jkey+".k"+r,jkey:t,propagateKeyChange:this.propagateKeyChange}),(0,s.render_item)(n,t,this.props.doc[t],this.propagateChanges,o,this.props.level))}),this);return a.default.createElement("div",{className:"ObjectItem",style:this.getStyle()},this.context.setup.tableLike?null:"{",t,a.default.createElement(l.default,{onDone:this.addItem,setup:this.addButtonSetup()}),this.context.setup.tableLike?null:"}")}}]),t}(o.Component);f.contextTypes={styling:i.default.object,setup:i.default.object},f.propTypes={jkey:i.default.string.isRequired,doc:i.default.object.isRequired,level:i.default.number.isRequired,propagateChanges:i.default.func.isRequired},t.default=f},function(e,t,r){"use strict";var n=r(14),o=r(15),a=r(13);e.exports=function(){function e(e,t,r,n,i,l){l!==a&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return r.checkPropTypes=n,r.PropTypes=r,r}},function(e,t){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){"use strict";function r(e){return function(){return e}}var n=function(){};n.thatReturns=r,n.thatReturnsFalse=r(!1),n.thatReturnsTrue=r(!0),n.thatReturnsNull=r(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(e){return e},e.exports=n},function(e,t,r){"use strict";e.exports=function(e,t,r,n,o,a,i,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,o,a,i,l],u=0;(s=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}}])},e.exports=n(r(448))},function(e,t,r){"use strict";e.exports=r(449)},function(e,t,r){"use strict";var n=r(182),o=r(347),a=r(452),i=r(457),l=r(132),s=r(458),c=r(465),u=r(466),d=r(468),p=l.createElement,f=l.createFactory,b=l.cloneElement,m=n,h={Children:{map:a.map,forEach:a.forEach,count:a.count,toArray:a.toArray,only:d},Component:o.Component,PureComponent:o.PureComponent,createElement:p,cloneElement:b,isValidElement:l.isValidElement,PropTypes:s,createClass:u,createFactory:f,createMixin:function(e){return e},DOM:i,version:c,__spread:m};e.exports=h},function(e,t,r){"use strict";e.exports={}},function(e,t,r){"use strict";e.exports=function(){}},function(e,t,r){"use strict";var n=r(453),o=r(132),a=r(349),i=r(454),l=n.twoArgumentPooler,s=n.fourArgumentPooler,c=/\/+/g;function u(e){return(""+e).replace(c,"$&/")}function d(e,t){this.func=e,this.context=t,this.count=0}function p(e,t,r){var n=e.func,o=e.context;n.call(o,t,e.count++)}function f(e,t,r,n){this.result=e,this.keyPrefix=t,this.func=r,this.context=n,this.count=0}function b(e,t,r){var n=e.result,i=e.keyPrefix,l=e.func,s=e.context,c=l.call(s,t,e.count++);Array.isArray(c)?m(c,n,r,a.thatReturnsArgument):null!=c&&(o.isValidElement(c)&&(c=o.cloneAndReplaceKey(c,i+(!c.key||t&&t.key===c.key?"":u(c.key)+"/")+r)),n.push(c))}function m(e,t,r,n,o){var a="";null!=r&&(a=u(r)+"/");var l=f.getPooled(t,a,n,o);i(e,b,l),f.release(l)}function h(e,t,r){return null}d.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},n.addPoolingTo(d,l),f.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},n.addPoolingTo(f,s);var g={forEach:function(e,t,r){if(null==e)return e;var n=d.getPooled(t,r);i(e,p,n),d.release(n)},map:function(e,t,r){if(null==e)return e;var n=[];return m(e,n,null,t,r),n},mapIntoWithKeyPrefixInternal:m,count:function(e,t){return i(e,h,null)},toArray:function(e){var t=[];return m(e,t,null,a.thatReturnsArgument),t}};e.exports=g},function(e,t,r){"use strict";var n=r(226),o=(r(227),function(e){if(this.instancePool.length){var t=this.instancePool.pop();return this.call(t,e),t}return new this(e)}),a=function(e){e instanceof this||n("25"),e.destructor(),this.instancePool.length<this.poolSize&&this.instancePool.push(e)},i=o,l={addPoolingTo:function(e,t){var r=e;return r.instancePool=[],r.getPooled=t||i,r.poolSize||(r.poolSize=10),r.release=a,r},oneArgumentPooler:o,twoArgumentPooler:function(e,t){if(this.instancePool.length){var r=this.instancePool.pop();return this.call(r,e,t),r}return new this(e,t)},threeArgumentPooler:function(e,t,r){if(this.instancePool.length){var n=this.instancePool.pop();return this.call(n,e,t,r),n}return new this(e,t,r)},fourArgumentPooler:function(e,t,r,n){if(this.instancePool.length){var o=this.instancePool.pop();return this.call(o,e,t,r,n),o}return new this(e,t,r,n)}};e.exports=l},function(e,t,r){"use strict";var n=r(226),o=(r(351),r(352)),a=r(455),i=(r(227),r(456));r(254);function l(e,t){return e&&"object"==typeof e&&null!=e.key?i.escape(e.key):t.toString(36)}e.exports=function(e,t,r){return null==e?0:function e(t,r,s,c){var u,d=typeof t;if("undefined"!==d&&"boolean"!==d||(t=null),null===t||"string"===d||"number"===d||"object"===d&&t.$$typeof===o)return s(c,t,""===r?"."+l(t,0):r),1;var p=0,f=""===r?".":r+":";if(Array.isArray(t))for(var b=0;b<t.length;b++)p+=e(u=t[b],f+l(u,b),s,c);else{var m=a(t);if(m){var h,g=m.call(t);if(m!==t.entries)for(var v=0;!(h=g.next()).done;)p+=e(u=h.value,f+l(u,v++),s,c);else for(;!(h=g.next()).done;){var O=h.value;O&&(p+=e(u=O[1],f+i.escape(O[0])+":"+l(u,0),s,c))}}else if("object"===d){var y=String(t);n("31","[object Object]"===y?"object with keys {"+Object.keys(t).join(", ")+"}":y,"")}}return p}(e,"",t,r)}},function(e,t,r){"use strict";var n="function"==typeof Symbol&&Symbol.iterator;e.exports=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}},function(e,t,r){"use strict";var n={escape:function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))},unescape:function(e){var t={"=0":"=","=2":":"};return(""+("."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1))).replace(/(=0|=2)/g,(function(e){return t[e]}))}};e.exports=n},function(e,t,r){"use strict";var n=r(132).createFactory,o={a:n("a"),abbr:n("abbr"),address:n("address"),area:n("area"),article:n("article"),aside:n("aside"),audio:n("audio"),b:n("b"),base:n("base"),bdi:n("bdi"),bdo:n("bdo"),big:n("big"),blockquote:n("blockquote"),body:n("body"),br:n("br"),button:n("button"),canvas:n("canvas"),caption:n("caption"),cite:n("cite"),code:n("code"),col:n("col"),colgroup:n("colgroup"),data:n("data"),datalist:n("datalist"),dd:n("dd"),del:n("del"),details:n("details"),dfn:n("dfn"),dialog:n("dialog"),div:n("div"),dl:n("dl"),dt:n("dt"),em:n("em"),embed:n("embed"),fieldset:n("fieldset"),figcaption:n("figcaption"),figure:n("figure"),footer:n("footer"),form:n("form"),h1:n("h1"),h2:n("h2"),h3:n("h3"),h4:n("h4"),h5:n("h5"),h6:n("h6"),head:n("head"),header:n("header"),hgroup:n("hgroup"),hr:n("hr"),html:n("html"),i:n("i"),iframe:n("iframe"),img:n("img"),input:n("input"),ins:n("ins"),kbd:n("kbd"),keygen:n("keygen"),label:n("label"),legend:n("legend"),li:n("li"),link:n("link"),main:n("main"),map:n("map"),mark:n("mark"),menu:n("menu"),menuitem:n("menuitem"),meta:n("meta"),meter:n("meter"),nav:n("nav"),noscript:n("noscript"),object:n("object"),ol:n("ol"),optgroup:n("optgroup"),option:n("option"),output:n("output"),p:n("p"),param:n("param"),picture:n("picture"),pre:n("pre"),progress:n("progress"),q:n("q"),rp:n("rp"),rt:n("rt"),ruby:n("ruby"),s:n("s"),samp:n("samp"),script:n("script"),section:n("section"),select:n("select"),small:n("small"),source:n("source"),span:n("span"),strong:n("strong"),style:n("style"),sub:n("sub"),summary:n("summary"),sup:n("sup"),table:n("table"),tbody:n("tbody"),td:n("td"),textarea:n("textarea"),tfoot:n("tfoot"),th:n("th"),thead:n("thead"),time:n("time"),title:n("title"),tr:n("tr"),track:n("track"),u:n("u"),ul:n("ul"),var:n("var"),video:n("video"),wbr:n("wbr"),circle:n("circle"),clipPath:n("clipPath"),defs:n("defs"),ellipse:n("ellipse"),g:n("g"),image:n("image"),line:n("line"),linearGradient:n("linearGradient"),mask:n("mask"),path:n("path"),pattern:n("pattern"),polygon:n("polygon"),polyline:n("polyline"),radialGradient:n("radialGradient"),rect:n("rect"),stop:n("stop"),svg:n("svg"),text:n("text"),tspan:n("tspan")};e.exports=o},function(e,t,r){"use strict";var n=r(132).isValidElement,o=r(459);e.exports=o(n)},function(e,t,r){"use strict";var n=r(460);e.exports=function(e){return n(e,!1)}},function(e,t,r){"use strict";var n=r(461),o=r(182),a=r(319),i=r(463),l=r(464);function s(){return null}e.exports=function(e,t){var r="function"==typeof Symbol&&Symbol.iterator;var c={array:f("array"),bigint:f("bigint"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:p(s),arrayOf:function(e){return p((function(t,r,n,o,i){if("function"!=typeof e)return new d("Property `"+i+"` of component `"+n+"` has invalid PropType notation inside arrayOf.");var l=t[r];if(!Array.isArray(l))return new d("Invalid "+o+" `"+i+"` of type `"+h(l)+"` supplied to `"+n+"`, expected an array.");for(var s=0;s<l.length;s++){var c=e(l,s,n,o,i+"["+s+"]",a);if(c instanceof Error)return c}return null}))},element:p((function(t,r,n,o,a){var i=t[r];return e(i)?null:new d("Invalid "+o+" `"+a+"` of type `"+h(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:p((function(e,t,r,o,a){var i=e[t];return n.isValidElementType(i)?null:new d("Invalid "+o+" `"+a+"` of type `"+h(i)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return p((function(t,r,n,o,a){if(!(t[r]instanceof e)){var i=e.name||"<<anonymous>>";return new d("Invalid "+o+" `"+a+"` of type `"+function(e){if(!e.constructor||!e.constructor.name)return"<<anonymous>>";return e.constructor.name}(t[r])+"` supplied to `"+n+"`, expected instance of `"+i+"`.")}return null}))},node:p((function(e,t,r,n,o){return m(e[t])?null:new d("Invalid "+n+" `"+o+"` supplied to `"+r+"`, expected a ReactNode.")})),objectOf:function(e){return p((function(t,r,n,o,l){if("function"!=typeof e)return new d("Property `"+l+"` of component `"+n+"` has invalid PropType notation inside objectOf.");var s=t[r],c=h(s);if("object"!==c)return new d("Invalid "+o+" `"+l+"` of type `"+c+"` supplied to `"+n+"`, expected an object.");for(var u in s)if(i(s,u)){var p=e(s,u,n,o,l+"."+u,a);if(p instanceof Error)return p}return null}))},oneOf:function(e){if(!Array.isArray(e))return s;return p((function(t,r,n,o,a){for(var i=t[r],l=0;l<e.length;l++)if(u(i,e[l]))return null;var s=JSON.stringify(e,(function(e,t){return"symbol"===g(t)?String(t):t}));return new d("Invalid "+o+" `"+a+"` of value `"+String(i)+"` supplied to `"+n+"`, expected one of "+s+".")}))},oneOfType:function(e){if(!Array.isArray(e))return s;for(var t=0;t<e.length;t++){var r=e[t];if("function"!=typeof r)return v(r),s}return p((function(t,r,n,o,l){for(var s=[],c=0;c<e.length;c++){var u=(0,e[c])(t,r,n,o,l,a);if(null==u)return null;u.data&&i(u.data,"expectedType")&&s.push(u.data.expectedType)}return new d("Invalid "+o+" `"+l+"` supplied to `"+n+"`"+(s.length>0?", expected one of type ["+s.join(", ")+"]":"")+".")}))},shape:function(e){return p((function(t,r,n,o,i){var l=t[r],s=h(l);if("object"!==s)return new d("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+n+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return b(n,o,i,c,g(u));var p=u(l,c,n,o,i+"."+c,a);if(p)return p}return null}))},exact:function(e){return p((function(t,r,n,l,s){var c=t[r],u=h(c);if("object"!==u)return new d("Invalid "+l+" `"+s+"` of type `"+u+"` supplied to `"+n+"`, expected `object`.");var p=o({},t[r],e);for(var f in p){var m=e[f];if(i(e,f)&&"function"!=typeof m)return b(n,l,s,f,g(m));if(!m)return new d("Invalid "+l+" `"+s+"` key `"+f+"` supplied to `"+n+"`.\nBad object: "+JSON.stringify(t[r],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var v=m(c,f,n,l,s+"."+f,a);if(v)return v}return null}))}};function u(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function d(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function p(e){function r(r,n,o,i,l,s,c){if((i=i||"<<anonymous>>",s=s||o,c!==a)&&t){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}return null==n[o]?r?null===n[o]?new d("The "+l+" `"+s+"` is marked as required in `"+i+"`, but its value is `null`."):new d("The "+l+" `"+s+"` is marked as required in `"+i+"`, but its value is `undefined`."):null:e(n,o,i,l,s)}var n=r.bind(null,!1);return n.isRequired=r.bind(null,!0),n}function f(e){return p((function(t,r,n,o,a,i){var l=t[r];return h(l)!==e?new d("Invalid "+o+" `"+a+"` of type `"+g(l)+"` supplied to `"+n+"`, expected `"+e+"`.",{expectedType:e}):null}))}function b(e,t,r,n,o){return new d((e||"React class")+": "+t+" type `"+r+"."+n+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function m(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(m);if(null===t||e(t))return!0;var n=function(e){var t=e&&(r&&e[r]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!n)return!1;var o,a=n.call(t);if(n!==t.entries){for(;!(o=a.next()).done;)if(!m(o.value))return!1}else for(;!(o=a.next()).done;){var i=o.value;if(i&&!m(i[1]))return!1}return!0;default:return!1}}function h(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function g(e){if(null==e)return""+e;var t=h(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function v(e){var t=g(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return d.prototype=Error.prototype,c.checkPropTypes=l,c.resetWarningCache=l.resetWarningCache,c.PropTypes=c,c}},function(e,t,r){"use strict";e.exports=r(462)},function(e,t,r){"use strict";
264
264
  /** @license React v16.13.1
265
265
  * react-is.production.min.js
266
266
  *