2020-08-15 21:45:05 -04:00
! function ( t ) { var e = { } ; function r ( n ) { if ( e [ n ] ) return e [ n ] . exports ; var i = e [ n ] = { i : n , l : ! 1 , exports : { } } ; return t [ n ] . call ( i . exports , i , i . exports , r ) , i . l = ! 0 , i . exports } r . m = t , r . c = e , r . d = function ( t , e , n ) { r . o ( t , e ) || Object . defineProperty ( t , e , { enumerable : ! 0 , get : n } ) } , r . r = function ( t ) { "undefined" != typeof Symbol && Symbol . toStringTag && Object . defineProperty ( t , Symbol . toStringTag , { value : "Module" } ) , Object . defineProperty ( t , "__esModule" , { value : ! 0 } ) } , r . t = function ( t , e ) { if ( 1 & e && ( t = r ( t ) ) , 8 & e ) return t ; if ( 4 & e && "object" == typeof t && t && t . _ _esModule ) return t ; var n = Object . create ( null ) ; if ( r . r ( n ) , Object . defineProperty ( n , "default" , { enumerable : ! 0 , value : t } ) , 2 & e && "string" != typeof t ) for ( var i in t ) r . d ( n , i , function ( e ) { return t [ e ] } . bind ( null , i ) ) ; return n } , r . n = function ( t ) { var e = t && t . _ _esModule ? function ( ) { return t . default } : function ( ) { return t } ; return r . d ( e , "a" , e ) , e } , r . o = function ( t , e ) { return Object . prototype . hasOwnProperty . call ( t , e ) } , r . p = "/" , r ( r . s = 253 ) } ( [ function ( t , e , r ) { "use strict" ; t . exports = r ( 123 ) } , function ( t , e ) { "function" == typeof Object . create ? t . exports = function ( t , e ) { e && ( t . super _ = e , t . prototype = Object . create ( e . prototype , { constructor : { value : t , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) ) } : t . exports = function ( t , e ) { if ( e ) { t . super _ = e ; var r = function ( ) { } ; r . prototype = e . prototype , t . prototype = new r , t . prototype . constructor = t } } } , function ( t , e , r ) { var n = r ( 4 ) , i = n . Buffer ; function o ( t , e ) { for ( var r in t ) e [ r ] = t [ r ] } function a ( t , e , r ) { return i ( t , e , r ) } i . from && i . alloc && i . allocUnsafe && i . allocUnsafeSlow ? t . exports = n : ( o ( n , e ) , e . Buffer = a ) , o ( i , a ) , a . from = function ( t , e , r ) { if ( "number" == typeof t ) throw new TypeError ( "Argument must not be a number" ) ; return i ( t , e , r ) } , a . alloc = function ( t , e , r ) { if ( "number" != typeof t ) throw new TypeError ( "Argument must be a number" ) ; var n = i ( t ) ; return void 0 !== e ? "string" == typeof r ? n . fill ( e , r ) : n . fill ( e ) : n . fill ( 0 ) , n } , a . allocUnsafe = function ( t ) { if ( "number" != typeof t ) throw new TypeError ( "Argument must be a number" ) ; return i ( t ) } , a . allocUnsafeSlow = function ( t ) { if ( "number" != typeof t ) throw new TypeError ( "Argument must be a number" ) ; return n . SlowBuffer ( t ) } } , function ( t , e ) { var r , n , i = t . exports = { } ; function o ( ) { throw new Error ( "setTimeout has not been defined" ) } function a ( ) { throw new Error ( "clearTimeout has not been defined" ) } function s ( t ) { if ( r === setTimeout ) return setTimeout ( t , 0 ) ; if ( ( r === o || ! r ) && setTimeout ) return r = setTimeout , setTimeout ( t , 0 ) ; try { return r ( t , 0 ) } catch ( e ) { try { return r . call ( null , t , 0 ) } catch ( e ) { return r . call ( this , t , 0 ) } } } ! function ( ) { try { r = "function" == typeof setTimeout ? setTimeout : o } catch ( t ) { r = o } try { n = "function" == typeof clearTimeout ? clearTimeout : a } catch ( t ) { n = a } } ( ) ; var u , h = [ ] , l = ! 1 , f = - 1 ; function c ( ) { l && u && ( l = ! 1 , u . length ? h = u . concat ( h ) : f = - 1 , h . length && d ( ) ) } function d ( ) { if ( ! l ) { var t = s ( c ) ; l = ! 0 ; for ( var e = h . length ; e ; ) { for ( u = h , h = [ ] ; ++ f < e ; ) u && u [ f ] . run ( ) ; f = - 1 , e = h . length } u = null , l = ! 1 , function ( t ) { if ( n === clearTimeout ) return clearTimeout ( t ) ; if ( ( n === a || ! n ) && clearTimeout ) return n = clearTimeout , clearTimeout ( t ) ; try { n ( t ) } catch ( e ) { try { return n . call ( null , t ) } catch ( e ) { return n . call ( this , t ) } } } ( t ) } } function p ( t , e ) { this . fun = t , this . array = e } function m ( ) { } i . nextTick = function ( t ) { var e = new Array ( arguments . length - 1 ) ; if ( arguments . length > 1 ) for ( var r = 1 ; r < arguments . length ; r ++ ) e [ r - 1 ] = arguments [ r ] ; h . push ( new p ( t , e ) ) , 1 !== h . length || l || s ( d ) } , p . prototype . run = function ( ) { this . fun . apply ( null , this . array ) } , i . title = "browser" , i . browser = ! 0 , i . env = { } , i . argv = [ ] , i . version = "" , i . versions = { } , i . on = m , i . addListener = m , i . once = m , i . off = m , i . removeListener = m , i . removeAllListeners = m , i . emit = m , i . prependListener = m , i . prependOnceListener = m , i . listeners = function ( t ) { return [ ] } , i . binding = function ( t ) { throw new Error ( "process.binding is not supported" ) } , i . cwd = function ( ) { return "/" } , i . chdir = function ( t ) { throw new Error ( "process.chdir is not supported" ) } , i . umask = function ( ) { return 0 } } , function ( t , e , r ) { "use strict" ; ( function ( t ) {
WebUI (#100)
* Object-Oriented base changes for web-ui prep
* remove debug raise
* optimize broadcast to serialize once
* Implement WebUI socket, static assets, and classes
- Still need to wrap logging functions and send output to UI
- UI commands are successfully being sent to the server
* GUI operational. Wrap logging functions, implement server address selection on GUI, automatically launch web browser when client websocket is served
* Update MultiServer status when a user disconnects / reconnects
* Implement colored item and hint checks, improve GUI readability
* Fix improper formatting on received items
* Update SNES connection status on disconnect / reconnect. Implement itemFound, prevent accidentally printing JS objects
* Minor text change for itemFound
* Fixed a very wrong comment
* Fixed client commands not working, fixed un-helpful error messages appearing in GUI
* Fix a bug causing a failure to connect to a multiworld server if a previously existing cached address was present and the client was loaded without an address passed in
* Convert WebUI to React /w Redux. WebSocket communications not yet operational.
* WebUI fully converted to React / Redux.
- Websocket communication operational
- Added a button to connect to the multiserver which appears only when a SNES is connected and a server connection is not active
* Restore some features lost in WebUI
- Restore (found) notification on hints if the item has already been obtained
- Restore (x/y) indicator on received items, which indicates the number of items the client is waiting to receive from the client in a queue
* Fix a grammatical UI big causing player names to show only an apostrophe when possessive
* Add support for multiple SNES Devices, and switching between them
* freeze support for client
* make sure flask works when frozen
* UI Improvements
- Hint messages now actually show a found status via ✔ and ❌ emoji
- Active player name is always a different color than other players (orange for now)
- Add a toggle to show only entries relevant to the active player
- Added a WidgetArea
- Added a notes widget
* Received items now marked as relevant
* Include production build for deployment
* Notes now survive a browser close. Minimum width applied to monitor to prevent CSS issues.
* include webUi folder in setup.py
* Bugfixes for Monitor
- Fix a bug causing the monitor window to grow beyond it's intended content limit
- Reduced monitor content limit to 200 items
- Ensured each monitor entry has a unique key
* Prevent eslint from yelling at me about stupid things
* Add button to collapse sidebar, press enter on empty server input to disconnect on purpose
* WebUI is now aware of client disconnect, message log limit increased to 350, fix !missing output
* Update WebUI to v2.2.1
- Added color to WebUI for entrance-span
- Make !missing show total count at bottom of list to match /missing behavior
* Fix a bug causing clients version <= 2.2.0 to crash when anyone asks for a hint
- Also fix a bug in the WebUI causing the entrance location to always show as "somewhere"
* Update WebUI color palette (this cost me $50)
* allow text console input alongside web-ui
* remove Flask
a bit overkill for what we're doing
* remove jinja2
* Update WebUI to work with new hosting mechanism
* with flask gone, we no longer need subprocess shenanigans
* If multiple web ui clients try to run, at least present a working console
* Update MultiClient and WebUI to handle multiple clients simultaneously.
- The port on which the websocket for the WebUI is hosted is not chosen randomly from 5000 - 5999. This port is passed to the browser so it knows which MultiClient to connect to
- Removed failure condition if a web server is already running, as there is no need to run more than one web server on a single system. If an exception is thrown while attempting to launch a web server, a check is made for the port being unavailable. If the port is unavailable, it probably means the user is launching a second MultiClient. A web browser is then opened with a connection to the correct webui_socket_port.
- Add a /web command to the MultiClient to repoen the appropriate browser window and get params in case a user accidentally closes the tab
* Use proper name for WebUI
* move webui into /data with other data files
* make web ui optional
This is mostly for laptop users wanting to preserve some battery, should not be needed outside of that.
* fix direct server start
* re-add connection timer
* fix indentation
Co-authored-by: Chris <chris@legendserver.info>
2020-06-03 21:29:43 +02:00
/ * !
* The buffer module from node . js , for the browser .
*
* @ author Feross Aboukhadijeh < http : //feross.org>
* @ license MIT
2020-08-15 21:45:05 -04:00
* / v a r n = r ( 1 3 7 ) , i = r ( 1 3 8 ) , o = r ( 1 3 9 ) ; f u n c t i o n a ( ) { r e t u r n u . T Y P E D _ A R R A Y _ S U P P O R T ? 2 1 4 7 4 8 3 6 4 7 : 1 0 7 3 7 4 1 8 2 3 } f u n c t i o n s ( t , e ) { i f ( a ( ) < e ) t h r o w n e w R a n g e E r r o r ( " I n v a l i d t y p e d a r r a y l e n g t h " ) ; r e t u r n u . T Y P E D _ A R R A Y _ S U P P O R T ? ( t = n e w U i n t 8 A r r a y ( e ) ) . _ _ p r o t o _ _ = u . p r o t o t y p e : ( n u l l = = = t & & ( t = n e w u ( e ) ) , t . l e n g t h = e ) , t } f u n c t i o n u ( t , e , r ) { i f ( ! ( u . T Y P E D _ A R R A Y _ S U P P O R T | | t h i s i n s t a n c e o f u ) ) r e t u r n n e w u ( t , e , r ) ; i f ( " n u m b e r " = = t y p e o f t ) { i f ( " s t r i n g " = = t y p e o f e ) t h r o w n e w E r r o r ( " I f e n c o d i n g i s s p e c i f i e d t h e n t h e f i r s t a r g u m e n t m u s t b e a s t r i n g " ) ; r e t u r n f ( t h i s , t ) } r e t u r n h ( t h i s , t , e , r ) } f u n c t i o n h ( t , e , r , n ) { i f ( " n u m b e r " = = t y p e o f e ) t h r o w n e w T y p e E r r o r ( ' " v a l u e " a r g u m e n t m u s t n o t b e a n u m b e r ' ) ; r e t u r n " u n d e f i n e d " ! = t y p e o f A r r a y B u f f e r & & e i n s t a n c e o f A r r a y B u f f e r ? f u n c t i o n ( t , e , r , n ) { i f ( e . b y t e L e n g t h , r < 0 | | e . b y t e L e n g t h < r ) t h r o w n e w R a n g e E r r o r ( " ' o f f s e t ' i s o u t o f b o u n d s " ) ; i f ( e . b y t e L e n g t h < r + ( n | | 0 ) ) t h r o w n e w R a n g e E r r o r ( " ' l e n g t h ' i s o u t o f b o u n d s " ) ; e = v o i d 0 = = = r & & v o i d 0 = = = n ? n e w U i n t 8 A r r a y ( e ) : v o i d 0 = = = n ? n e w U i n t 8 A r r a y ( e , r ) : n e w U i n t 8 A r r a y ( e , r , n ) ; u . T Y P E D _ A R R A Y _ S U P P O R T ? ( t = e ) . _ _ p r o t o _ _ = u . p r o t o t y p e : t = c ( t , e ) ; r e t u r n t } ( t , e , r , n ) : " s t r i n g " = = t y p e o f e ? f u n c t i o n ( t , e , r ) { " s t r i n g " = = t y p e o f r & & " " ! = = r | | ( r = " u t f 8 " ) ; i f ( ! u . i s E n c o d i n g ( r ) ) t h r o w n e w T y p e E r r o r ( ' " e n c o d i n g " m u s t b e a v a l i d s t r i n g e n c o d i n g ' ) ; v a r n = 0 | p ( e , r ) , i = ( t = s ( t , n ) ) . w r i t e ( e , r ) ; i ! = = n & & ( t = t . s l i c e ( 0 , i ) ) ; r e t u r n t } ( t , e , r ) : f u n c t i o n ( t , e ) { i f ( u . i s B u f f e r ( e ) ) { v a r r = 0 | d ( e . l e n g t h ) ; r e t u r n 0 = = = ( t = s ( t , r ) ) . l e n g t h | | e . c o p y ( t , 0 , 0 , r ) , t } i f ( e ) { i f ( " u n d e f i n e d " ! = t y p e o f A r r a y B u f f e r & & e . b u f f e r i n s t a n c e o f A r r a y B u f f e r | | " l e n g t h " i n e ) r e t u r n " n u m b e r " ! = t y p e o f e . l e n g t h | | ( n = e . l e n g t h ) ! = n ? s ( t , 0 ) : c ( t , e ) ; i f ( " B u f f e r " = = = e . t y p e & & o ( e . d a t a ) ) r e t u r n c ( t , e . d a t a ) } v a r n ; t h r o w n e w T y p e E r r o r ( " F i r s t a r g u m e n t m u s t b e a s t r i n g , B u f f e r , A r r a y B u f f e r , A r r a y , o r a r r a y - l i k e o b j e c t . " ) } ( t , e ) } f u n c t i o n l ( t ) { i f ( " n u m b e r " ! = t y p e o f t ) t h r o w n e w T y p e E r r o r ( ' " s i z e " a r g u m e n t m u s t b e a n u m b e r ' ) ; i f ( t < 0 ) t h r o w n e w R a n g e E r r o r ( ' " s i z e " a r g u m e n t m u s t n o t b e n e g a t i v e ' ) } f u n c t i o n f ( t , e ) { i f ( l ( e ) , t = s ( t , e < 0 ? 0 : 0 | d ( e ) ) , ! u . T Y P E D _ A R R A Y _ S U P P O R T ) f o r ( v a r r = 0 ; r < e ; + + r ) t [ r ] = 0 ; r e t u r n t } f u n c t i o n c ( t , e ) { v a r r = e . l e n g t h < 0 ? 0 : 0 | d ( e . l e n g t h ) ; t = s ( t , r ) ; f o r ( v a r n = 0 ; n < r ; n + = 1 ) t [ n ] = 2 5 5 & e [ n ] ; r e t u r n t } f u n c t i o n d ( t ) { i f ( t > = a ( ) ) t h r o w n e w R a n g e E r r o r ( " A t t e m p t t o a l l o c a t e B u f f e r l a r g e r t h a n m a x i m u m s i z e : 0 x " + a ( ) . t o S t r i n g ( 1 6 ) + " b y t e s " ) ; r e t u r n 0 | t } f u n c t i o n p ( t , e ) { i f ( u . i s B u f f e r ( t ) ) r e t u r n t . l e n g t h ; i f ( " u n d e f i n e d " ! = t y p e o f A r r a y B u f f e r & & " f u n c t i o n " = = t y p e o f A r r a y B u f f e r . i s V i e w & & ( A r r a y B u f f e r . i s V i e w ( t ) | | t i n s t a n c e o f A r r a y B u f f e r ) ) r e t u r n t . b y t e L e n g t h ; " s t r i n g " ! = t y p e o f t & & ( t = " " + t ) ; v a r r = t . l e n g t h ; i f ( 0 = = = r ) r e t u r n 0 ; f o r ( v a r n = ! 1 ; ; ) s w i t c h ( e ) { c a s e " a s c i i " : c a s e " l a t i n 1 " : c a s e " b i n a r y " : r e t u r n r ; c a s e " u t f 8 " : c a s e " u t f - 8 " : c a s e v o i d 0 : r e t u r n z ( t ) . l e n g t h ; c a s e " u c s 2 " : c a s e " u c s - 2 " : c a s e " u t f 1 6 l e " : c a s e " u t f - 1 6 l e " : r e t u r n 2 * r ; c a s e " h e x " : r e t u r n r > > > 1 ; c a s e " b a s e 6 4 " : r e t u r n U ( t ) . l e n g t h ; d e f a u l t : i f ( n ) r e t u r n z ( t ) . l e n g t h ; e = ( " " + e ) . t o L o w e r C a s e ( ) , n = ! 0 } } f u n c t i o n m ( t , e , r ) { v a r n = ! 1 ; i f ( ( v o i d 0 = = = e | | e < 0 ) & & ( e = 0 ) , e > t h i s . l e n g t h ) r e t u r n " " ; i f ( ( v o i d 0 = = = r | | r > t h i s . l e n g t h ) & & ( r = t h i s . l e n g t h ) , r < = 0 ) r e t u r n " " ; i f ( ( r > > > = 0 ) < = ( e > > > = 0 ) ) r e t u r n " " ; f o r ( t | | ( t = " u t f 8 " ) ; ; ) s w i t c h ( t ) { c a s e " h e x " : r e t u r n R ( t h i s , e , r ) ; c a s e " u t f 8 " : c a s e " u t f - 8 " : r e t u r n x ( t h i s , e , r ) ; c a s e " a s c i i " : r e t u r n A ( t h i s , e , r ) ; c a s e " l a t i n 1 " : c a s e " b i n a r y " : r e t u r n T ( t h i s , e , r ) ; c a s e " b a s e 6 4 " : r e t u r n E ( t h i s , e , r ) ; c a s e " u c s 2 " : c a s e " u c s - 2 " : c a s e " u t f 1 6 l e " : c a s e " u t f - 1 6 l e " : r e t u r n P ( t h i s , e , r ) ; d e f a u l t : i f ( n ) t h r o w n e w T y p e E r r o r ( " U n k n o w n e n c o d i n g : " + t ) ; t = ( t + " " ) . t o L o w e r C a s e ( ) , n = ! 0 } } f u n c t i o n v ( t , e , r ) { v a r n = t [ e ] ; t [ e ] = t [ r ] , t [ r ] = n } f u n c t i o n g ( t , e , r , n , i ) { i f ( 0 = = = t . l e n g t h ) r e t u r n - 1 ; i f ( " s t r i n g " = = t y p e o f r ? ( n = r , r = 0 ) : r > 2 1 4 7 4 8 3 6 4 7 ? r = 2 1 4 7 4 8 3 6 4 7 : r < - 2 1 4 7 4 8 3 6 4 8 & & ( r = - 2 1 4 7 4 8 3 6 4 8 ) , r = + r , i s N a N ( r ) & & ( r = i ? 0 : t . l e n g t h - 1 ) , r < 0 & & ( r = t . l e n g t h + r ) , r > = t . l e n g t h ) { i f ( i ) r e t u r n - 1 ; r = t . l e n g t h - 1 } e l s e i f ( r < 0 ) { i f ( ! i ) r e t u r n - 1 ; r = 0 } i f ( " s t r i n g " = = t y p e o f e & & ( e = u . f r o m ( e , n ) ) , u . i s B u f f e r ( e ) ) r e t u r n 0 = = = e . l e n g t h ? - 1 : b ( t , e , r , n , i ) ; i f ( " n u m b e r " = = t y p e o f e ) r e t u r n e & = 2 5 5 , u . T Y P E D _ A R R A Y _ S U P P O R T & & " f u n c t i o n " = = t y p e o f U i n t 8 A r r a y . p r o t o t y p e . i n d e x O f ? i ? U i n t 8 A r r a y . p r o t o t y p e . i n d e x O f . c a l l ( t , e , r ) : U i n t 8 A r r a y . p r o t o t y p e . l a s t I n d e x O f . c a l l ( t , e , r ) : b ( t , [ e ] , r , n , i ) ; t h r o w n e w T y p e E r r o r ( " v a l m u s t b e s t r i n g , n u m b e r o r B u f f e r " ) } f u n c t i o n b ( t , e , r , n , i ) { v a r o , a = 1 , s = t . l e n g t h , u = e . l e n g t h ; i f ( v o i d 0 ! = = n & & ( " u c s 2 " = = = ( n = S t r i n g ( n ) . t o L o w e r C a s e ( ) )
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ var n = r ( 4 ) , i = n . Buffer ; function o ( t , e ) { for ( var r in t ) e [ r ] = t [ r ] } function a ( t , e , r ) { return i ( t , e , r ) } i . from && i . alloc && i . allocUnsafe && i . allocUnsafeSlow ? t . exports = n : ( o ( n , e ) , e . Buffer = a ) , a . prototype = Object . create ( i . prototype ) , o ( i , a ) , a . from = function ( t , e , r ) { if ( "number" == typeof t ) throw new TypeError ( "Argument must not be a number" ) ; return i ( t , e , r ) } , a . alloc = function ( t , e , r ) { if ( "number" != typeof t ) throw new TypeError ( "Argument must be a number" ) ; var n = i ( t ) ; return void 0 !== e ? "string" == typeof r ? n . fill ( e , r ) : n . fill ( e ) : n . fill ( 0 ) , n } , a . allocUnsafe = function ( t ) { if ( "number" != typeof t ) throw new TypeError ( "Argument must be a number" ) ; return i ( t ) } , a . allocUnsafeSlow = function ( t ) { if ( "number" != typeof t ) throw new TypeError ( "Argument must be a number" ) ; return n . SlowBuffer ( t ) } } , function ( t , e , r ) { "use strict" ; var n = r ( 22 ) . codes . ERR _STREAM _PREMATURE _CLOSE ; function i ( ) { } t . exports = function t ( e , r , o ) { if ( "function" == typeof r ) return t ( e , null , r ) ; r || ( r = { } ) , o = function ( t ) { var e = ! 1 ; return function ( ) { if ( ! e ) { e = ! 0 ; for ( var r = arguments . length , n = new Array ( r ) , i = 0 ; i < r ; i ++ ) n [ i ] = arguments [ i ] ; t . apply ( this , n ) } } } ( o || i ) ; var a = r . readable || ! 1 !== r . readable && e . readable , s = r . writable || ! 1 !== r . writable && e . writable , u = function ( ) { e . writable || l ( ) } , h = e . _writableState && e . _writableState . finished , l = function ( ) { s = ! 1 , h = ! 0 , a || o . call ( e ) } , f = e . _readableState && e . _readableState . endEmitted , c = function ( ) { a = ! 1 , f = ! 0 , s || o . call ( e ) } , d = function ( t ) { o . call ( e , t ) } , p = function ( ) { var t ; return a && ! f ? ( e . _readableState && e . _readableState . ended || ( t = new n ) , o . call ( e , t ) ) : s && ! h ? ( e . _writableState && e . _writableState . ended || ( t = new n ) , o . call ( e , t ) ) : void 0 } , m = function ( ) { e . req . on ( "finish" , l ) } ; return ! function ( t ) { return t . setHeader && "function" == typeof t . abort } ( e ) ? s && ! e . _writableState && ( e . on ( "end" , u ) , e . on ( "close" , u ) ) : ( e . on ( "complete" , l ) , e . on ( "abort" , p ) , e . req ? m ( ) : e . on ( "request" , m ) ) , e . on ( "end" , c ) , e . on ( "finish" , l ) , ! 1 !== r . error && e . on ( "error" , d ) , e . on ( "close" , p ) , function ( ) { e . removeListener ( "complete" , l ) , e . removeListener ( "abort" , p ) , e . removeListener ( "request" , m ) , e . req && e . req . removeListener ( "finish" , l ) , e . removeListener ( "end" , u ) , e . removeListener ( "close" , u ) , e . removeListener ( "finish" , l ) , e . removeListener ( "end" , c ) , e . removeListener ( "error" , d ) , e . removeListener ( "close" , p ) } } } , function ( t , e , r ) { ( function ( e ) { var n = r ( 200 ) , i = r ( 18 ) ; function o ( t , r ) { var i = function ( t ) { var e = a ( t ) ; return { blinder : e . toRed ( n . mont ( t . modulus ) ) . redPow ( new n ( t . publicExponent ) ) . fromRed ( ) , unblinder : e . invm ( t . modulus ) } } ( r ) , o = r . modulus . byteLength ( ) , s = ( n . mont ( r . modulus ) , new n ( t ) . mul ( i . blinder ) . umod ( r . modulus ) ) , u = s . toRed ( n . mont ( r . prime1 ) ) , h = s . toRed ( n . mont ( r . prime2 ) ) , l = r . coefficient , f = r . prime1 , c = r . prime2 , d = u . redPow ( r . exponent1 ) , p = h . redPow ( r . exponent2 ) ; d = d . fromRed ( ) , p = p . fromRed ( ) ; var m = d . isub ( p ) . imul ( l ) . umod ( f ) ; return m . imul ( c ) , p . iadd ( m ) , new e ( p . imul ( i . unblinder ) . umod ( r . modulus ) . toArray ( ! 1 , o ) ) } function a ( t ) { for ( var e = t . modulus . byteLength ( ) , r = new n ( i ( e ) ) ; r . cmp ( t . modulus ) >= 0 || ! r . umod ( t . prime1 ) || ! r . umod ( t . prime2 ) ; ) r = new n ( i ( e ) ) ; return r } t . exports = o , o . getr = a } ) . call ( this , r ( 4 ) . Buffer ) } , function ( t , e , r ) { "use strict" ; var n = e ; n . version = r ( 202 ) . version , n . utils = r ( 7 ) , n . rand = r ( 49 ) , n . curve = r ( 104 ) , n . curves = r ( 54 ) , n . ec = r ( 214 ) , n . eddsa = r ( 218 ) } , function ( t , e , r ) { "use strict" ; var n , i = e , o = r ( 55 ) , a = r ( 104 ) , s = r ( 7 ) . assert ; function u ( t ) { "short" === t . type ? this . curve = new a . short ( t ) : "edwards" === t . type ? this . curve = new a . edwards ( t ) : this . curve = new a . mont ( t ) , this . g = this . curve . g , this . n = this . curve . n , this . hash = t . hash , s ( this . g . validate ( ) , "Invalid curve" ) , s ( this . g . mul ( this . n ) . isInfinity ( ) , "Invalid curve, G*N != O" ) } function h ( t , e ) { Object . defineProperty ( i , t , { configurable : ! 0 , enumerable : ! 0 , get : function ( ) { var r = new u ( e ) ; return Object . defineProperty ( i , t , { configurable : ! 0 , enumerable : ! 0 , value : r } ) , r } } ) } i . PresetCurve = u , h ( "p192" , { type : "short" , prime : "p192" , p : "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff" , a : "ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc" , b : "64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1" , n : "ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831" , hash : o . sha256 , gRed : ! 1 , g : [ "188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012" , " 07192 b95 ffc8da
WebUI (#100)
* Object-Oriented base changes for web-ui prep
* remove debug raise
* optimize broadcast to serialize once
* Implement WebUI socket, static assets, and classes
- Still need to wrap logging functions and send output to UI
- UI commands are successfully being sent to the server
* GUI operational. Wrap logging functions, implement server address selection on GUI, automatically launch web browser when client websocket is served
* Update MultiServer status when a user disconnects / reconnects
* Implement colored item and hint checks, improve GUI readability
* Fix improper formatting on received items
* Update SNES connection status on disconnect / reconnect. Implement itemFound, prevent accidentally printing JS objects
* Minor text change for itemFound
* Fixed a very wrong comment
* Fixed client commands not working, fixed un-helpful error messages appearing in GUI
* Fix a bug causing a failure to connect to a multiworld server if a previously existing cached address was present and the client was loaded without an address passed in
* Convert WebUI to React /w Redux. WebSocket communications not yet operational.
* WebUI fully converted to React / Redux.
- Websocket communication operational
- Added a button to connect to the multiserver which appears only when a SNES is connected and a server connection is not active
* Restore some features lost in WebUI
- Restore (found) notification on hints if the item has already been obtained
- Restore (x/y) indicator on received items, which indicates the number of items the client is waiting to receive from the client in a queue
* Fix a grammatical UI big causing player names to show only an apostrophe when possessive
* Add support for multiple SNES Devices, and switching between them
* freeze support for client
* make sure flask works when frozen
* UI Improvements
- Hint messages now actually show a found status via ✔ and ❌ emoji
- Active player name is always a different color than other players (orange for now)
- Add a toggle to show only entries relevant to the active player
- Added a WidgetArea
- Added a notes widget
* Received items now marked as relevant
* Include production build for deployment
* Notes now survive a browser close. Minimum width applied to monitor to prevent CSS issues.
* include webUi folder in setup.py
* Bugfixes for Monitor
- Fix a bug causing the monitor window to grow beyond it's intended content limit
- Reduced monitor content limit to 200 items
- Ensured each monitor entry has a unique key
* Prevent eslint from yelling at me about stupid things
* Add button to collapse sidebar, press enter on empty server input to disconnect on purpose
* WebUI is now aware of client disconnect, message log limit increased to 350, fix !missing output
* Update WebUI to v2.2.1
- Added color to WebUI for entrance-span
- Make !missing show total count at bottom of list to match /missing behavior
* Fix a bug causing clients version <= 2.2.0 to crash when anyone asks for a hint
- Also fix a bug in the WebUI causing the entrance location to always show as "somewhere"
* Update WebUI color palette (this cost me $50)
* allow text console input alongside web-ui
* remove Flask
a bit overkill for what we're doing
* remove jinja2
* Update WebUI to work with new hosting mechanism
* with flask gone, we no longer need subprocess shenanigans
* If multiple web ui clients try to run, at least present a working console
* Update MultiClient and WebUI to handle multiple clients simultaneously.
- The port on which the websocket for the WebUI is hosted is not chosen randomly from 5000 - 5999. This port is passed to the browser so it knows which MultiClient to connect to
- Removed failure condition if a web server is already running, as there is no need to run more than one web server on a single system. If an exception is thrown while attempting to launch a web server, a check is made for the port being unavailable. If the port is unavailable, it probably means the user is launching a second MultiClient. A web browser is then opened with a connection to the correct webui_socket_port.
- Add a /web command to the MultiClient to repoen the appropriate browser window and get params in case a user accidentally closes the tab
* Use proper name for WebUI
* move webui into /data with other data files
* make web ui optional
This is mostly for laptop users wanting to preserve some battery, should not be needed outside of that.
* fix direct server start
* re-add connection timer
* fix indentation
Co-authored-by: Chris <chris@legendserver.info>
2020-06-03 21:29:43 +02:00
/ *
object - assign
( c ) Sindre Sorhus
@ license MIT
2020-08-15 21:45:05 -04:00
* / v a r n = O b j e c t . g e t O w n P r o p e r t y S y m b o l s , i = O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y , o = O b j e c t . p r o t o t y p e . p r o p e r t y I s E n u m e r a b l e ; f u n c t i o n a ( t ) { i f ( n u l l = = t ) t h r o w n e w T y p e E r r o r ( " O b j e c t . a s s i g n c a n n o t b e c a l l e d w i t h n u l l o r u n d e f i n e d " ) ; r e t u r n O b j e c t ( t ) } t . e x p o r t s = f u n c t i o n ( ) { t r y { i f ( ! O b j e c t . a s s i g n ) r e t u r n ! 1 ; v a r t = n e w S t r i n g ( " a b c " ) ; i f ( t [ 5 ] = " d e " , " 5 " = = = O b j e c t . g e t O w n P r o p e r t y N a m e s ( t ) [ 0 ] ) r e t u r n ! 1 ; f o r ( v a r e = { } , r = 0 ; r < 1 0 ; r + + ) e [ " _ " + S t r i n g . f r o m C h a r C o d e ( r ) ] = r ; i f ( " 0 1 2 3 4 5 6 7 8 9 " ! = = O b j e c t . g e t O w n P r o p e r t y N a m e s ( e ) . m a p ( ( f u n c t i o n ( t ) { r e t u r n e [ t ] } ) ) . j o i n ( " " ) ) r e t u r n ! 1 ; v a r n = { } ; r e t u r n " a b c d e f g h i j k l m n o p q r s t " . s p l i t ( " " ) . f o r E a c h ( ( f u n c t i o n ( t ) { n [ t ] = t } ) ) , " a b c d e f g h i j k l m n o p q r s t " = = = O b j e c t . k e y s ( O b j e c t . a s s i g n ( { } , n ) ) . j o i n ( " " ) } c a t c h ( t ) { r e t u r n ! 1 } } ( ) ? O b j e c t . a s s i g n : f u n c t i o n ( t , e ) { f o r ( v a r r , s , u = a ( t ) , h = 1 ; h < a r g u m e n t s . l e n g t h ; h + + ) { f o r ( v a r l i n r = O b j e c t ( a r g u m e n t s [ h ] ) ) i . c a l l ( r , l ) & & ( u [ l ] = r [ l ] ) ; i f ( n ) { s = n ( r ) ; f o r ( v a r f = 0 ; f < s . l e n g t h ; f + + ) o . c a l l ( r , s [ f ] ) & & ( u [ s [ f ] ] = r [ s [ f ] ] ) } } r e t u r n u } } , f u n c t i o n ( t , e , r ) { " u s e s t r i c t " ; v a r n = r ( 1 4 0 ) . B u f f e r , i = r ( 1 4 1 ) . T r a n s f o r m ; f u n c t i o n o ( t ) { i . c a l l ( t h i s ) , t h i s . _ b l o c k = n . a l l o c U n s a f e ( t ) , t h i s . _ b l o c k S i z e = t , t h i s . _ b l o c k O f f s e t = 0 , t h i s . _ l e n g t h = [ 0 , 0 , 0 , 0 ] , t h i s . _ f i n a l i z e d = ! 1 } r ( 1 ) ( o , i ) , o . p r o t o t y p e . _ t r a n s f o r m = f u n c t i o n ( t , e , r ) { v a r n = n u l l ; t r y { t h i s . u p d a t e ( t , e ) } c a t c h ( t ) { n = t } r ( n ) } , o . p r o t o t y p e . _ f l u s h = f u n c t i o n ( t ) { v a r e = n u l l ; t r y { t h i s . p u s h ( t h i s . d i g e s t ( ) ) } c a t c h ( t ) { e = t } t ( e ) } , o . p r o t o t y p e . u p d a t e = f u n c t i o n ( t , e ) { i f ( f u n c t i o n ( t , e ) { i f ( ! n . i s B u f f e r ( t ) & & " s t r i n g " ! = t y p e o f t ) t h r o w n e w T y p e E r r o r ( e + " m u s t b e a s t r i n g o r a b u f f e r " ) } ( t , " D a t a " ) , t h i s . _ f i n a l i z e d ) t h r o w n e w E r r o r ( " D i g e s t a l r e a d y c a l l e d " ) ; n . i s B u f f e r ( t ) | | ( t = n . f r o m ( t , e ) ) ; f o r ( v a r r = t h i s . _ b l o c k , i = 0 ; t h i s . _ b l o c k O f f s e t + t . l e n g t h - i > = t h i s . _ b l o c k S i z e ; ) { f o r ( v a r o = t h i s . _ b l o c k O f f s e t ; o < t h i s . _ b l o c k S i z e ; ) r [ o + + ] = t [ i + + ] ; t h i s . _ u p d a t e ( ) , t h i s . _ b l o c k O f f s e t = 0 } f o r ( ; i < t . l e n g t h ; ) r [ t h i s . _ b l o c k O f f s e t + + ] = t [ i + + ] ; f o r ( v a r a = 0 , s = 8 * t . l e n g t h ; s > 0 ; + + a ) t h i s . _ l e n g t h [ a ] + = s , ( s = t h i s . _ l e n g t h [ a ] / 4 2 9 4 9 6 7 2 9 6 | 0 ) > 0 & & ( t h i s . _ l e n g t h [ a ] - = 4 2 9 4 9 6 7 2 9 6 * s ) ; r e t u r n t h i s } , o . p r o t o t y p e . _ u p d a t e = f u n c t i o n ( ) { t h r o w n e w E r r o r ( " _ u p d a t e i s n o t i m p l e m e n t e d " ) } , o . p r o t o t y p e . d i g e s t = f u n c t i o n ( t ) { i f ( t h i s . _ f i n a l i z e d ) t h r o w n e w E r r o r ( " D i g e s t a l r e a d y c a l l e d " ) ; t h i s . _ f i n a l i z e d = ! 0 ; v a r e = t h i s . _ d i g e s t ( ) ; v o i d 0 ! = = t & & ( e = e . t o S t r i n g ( t ) ) , t h i s . _ b l o c k . f i l l ( 0 ) , t h i s . _ b l o c k O f f s e t = 0 ; f o r ( v a r r = 0 ; r < 4 ; + + r ) t h i s . _ l e n g t h [ r ] = 0 ; r e t u r n e } , o . p r o t o t y p e . _ d i g e s t = f u n c t i o n ( ) { t h r o w n e w E r r o r ( " _ d i g e s t i s n o t i m p l e m e n t e d " ) } , t . e x p o r t s = o } , f u n c t i o n ( t , e , r ) { " u s e s t r i c t " ; ( f u n c t i o n ( e , n ) { v a r i ; t . e x p o r t s = E , E . R e a d a b l e S t a t e = k ; r ( 1 5 ) . E v e n t E m i t t e r ; v a r o = f u n c t i o n ( t , e ) { r e t u r n t . l i s t e n e r s ( e ) . l e n g t h } , a = r ( 6 8 ) , s = r ( 4 ) . B u f f e r , u = e . U i n t 8 A r r a y | | f u n c t i o n ( ) { } ; v a r h , l = r ( 1 4 2 ) ; h = l & & l . d e b u g l o g ? l . d e b u g l o g ( " s t r e a m " ) : f u n c t i o n ( ) { } ; v a r f , c , d , p = r ( 1 4 3 ) , m = r ( 6 9 ) , v = r ( 7 0 ) . g e t H i g h W a t e r M a r k , g = r ( 1 9 ) . c o d e s , b = g . E R R _ I N V A L I D _ A R G _ T Y P E , y = g . E R R _ S T R E A M _ P U S H _ A F T E R _ E O F , w = g . E R R _ M E T H O D _ N O T _ I M P L E M E N T E D , M = g . E R R _ S T R E A M _ U N S H I F T _ A F T E R _ E N D _ E V E N T ; r ( 1 ) ( E , a ) ; v a r _ = m . e r r o r O r D e s t r o y , S = [ " e r r o r " , " c l o s e " , " d e s t r o y " , " p a u s e " , " r e s u m e " ] ; f u n c t i o n k ( t , e , n ) { i = i | | r ( 2 0 ) , t = t | | { } , " b o o l e a n " ! = t y p e o f n & & ( n = e i n s t a n c e o f i ) , t h i s . o b j e c t M o d e = ! ! t . o b j e c t M o d e , n & & ( t h i s . o b j e c t M o d e = t h i s . o b j e c t M o d e | | ! ! t . r e a d a b l e O b j e c t M o d e ) , t h i s . h i g h W a t e r M a r k = v ( t h i s , t , " r e a d a b l e H i g h W a t e r M a r k " , n ) , t h i s . b u f f e r = n e w p , t h i s . l e n g t h = 0 , t h i s . p i p e s = n u l l , t h i s . p i p e s C o u n t = 0 , t h i s . f l o w i n g = n u l l , t h i s . e n d e d = ! 1 , t h i s . e n d E m i t t e d = ! 1 , t h i s . r e a d i n g = ! 1 , t h i s . s y n c = ! 0 , t h i s . n e e d R e a d a b l e = ! 1 , t h i s . e m i t t e d R e a d a b l e = ! 1 , t h i s . r e a d a b l e L i s t e n i n g = ! 1 , t h i s . r e s u m e S c h e d u l e d = ! 1 , t h i s . p a u s e d = ! 0 , t h i s . e m i t C l o s e = ! 1 ! = = t . e m i t C l o s e , t h i s . a u t o D e s t r o y = ! ! t . a u t o D e s t r o y , t h i s . d e s t r o y e d = ! 1 , t h i s . d e f a u l t E n c o d i n g = t . d e f a u l t E n c o d i n g | | " u t f 8 " , t h i s . a w a i t D r a i n = 0 , t h i s . r e a d i n g M o r e = ! 1 , t h i s . d e c o d e r = n u l l , t h i s . e n c o d i n g = n u l l , t . e n c o d i n g & & ( f | | ( f = r ( 1 6 ) . S t r i n g D e c o d e r ) , t h i s . d e c o d e r = n e w f ( t . e n c o d i n g ) , t h i s . e n c o d i n g = t . e n c o d i n g ) } f u n c t i o n E ( t ) { i f ( i = i | | r ( 2 0 ) , ! ( t h i s i n s t a n c e o f E ) ) r e t u r n n e w E ( t ) ; v a r e = t h i s i n s t a n c e o f i ; t h i s . _ r e a d a b l e S t a t e = n e w k ( t , t h i s , e ) , t h i s . r e a d a b l e = ! 0 , t & & ( " f u n c t i o n " = = t y p e o f t . r e a d & & ( t h i s . _ r e a d = t . r e a d ) , " f u n c t i o n " = = t y p e o f t . d e s t r o y & & ( t h i s . _ d e s t r o y = t . d e s t r o y ) ) , a . c a l l ( t h i s ) } f u n c t i o n x ( t , e , r , n , i ) { h ( " r e a d a b l e A d d C h u n k " , e ) ; v a r o , a = t . _ r e a d a b l e S t a t e ; i f ( n u l l = = = e ) a . r e a d i n g = ! 1 , f u n c t i o n ( t , e ) { i f ( h ( " o n E o f C h u n k " ) , e . e n d e d ) r e t u r n ; i f ( e . d e c o d e r ) { v a r r = e . d e c o d e r . e n d ( ) ; r & & r . l e n g t h & & ( e . b
WebUI (#100)
* Object-Oriented base changes for web-ui prep
* remove debug raise
* optimize broadcast to serialize once
* Implement WebUI socket, static assets, and classes
- Still need to wrap logging functions and send output to UI
- UI commands are successfully being sent to the server
* GUI operational. Wrap logging functions, implement server address selection on GUI, automatically launch web browser when client websocket is served
* Update MultiServer status when a user disconnects / reconnects
* Implement colored item and hint checks, improve GUI readability
* Fix improper formatting on received items
* Update SNES connection status on disconnect / reconnect. Implement itemFound, prevent accidentally printing JS objects
* Minor text change for itemFound
* Fixed a very wrong comment
* Fixed client commands not working, fixed un-helpful error messages appearing in GUI
* Fix a bug causing a failure to connect to a multiworld server if a previously existing cached address was present and the client was loaded without an address passed in
* Convert WebUI to React /w Redux. WebSocket communications not yet operational.
* WebUI fully converted to React / Redux.
- Websocket communication operational
- Added a button to connect to the multiserver which appears only when a SNES is connected and a server connection is not active
* Restore some features lost in WebUI
- Restore (found) notification on hints if the item has already been obtained
- Restore (x/y) indicator on received items, which indicates the number of items the client is waiting to receive from the client in a queue
* Fix a grammatical UI big causing player names to show only an apostrophe when possessive
* Add support for multiple SNES Devices, and switching between them
* freeze support for client
* make sure flask works when frozen
* UI Improvements
- Hint messages now actually show a found status via ✔ and ❌ emoji
- Active player name is always a different color than other players (orange for now)
- Add a toggle to show only entries relevant to the active player
- Added a WidgetArea
- Added a notes widget
* Received items now marked as relevant
* Include production build for deployment
* Notes now survive a browser close. Minimum width applied to monitor to prevent CSS issues.
* include webUi folder in setup.py
* Bugfixes for Monitor
- Fix a bug causing the monitor window to grow beyond it's intended content limit
- Reduced monitor content limit to 200 items
- Ensured each monitor entry has a unique key
* Prevent eslint from yelling at me about stupid things
* Add button to collapse sidebar, press enter on empty server input to disconnect on purpose
* WebUI is now aware of client disconnect, message log limit increased to 350, fix !missing output
* Update WebUI to v2.2.1
- Added color to WebUI for entrance-span
- Make !missing show total count at bottom of list to match /missing behavior
* Fix a bug causing clients version <= 2.2.0 to crash when anyone asks for a hint
- Also fix a bug in the WebUI causing the entrance location to always show as "somewhere"
* Update WebUI color palette (this cost me $50)
* allow text console input alongside web-ui
* remove Flask
a bit overkill for what we're doing
* remove jinja2
* Update WebUI to work with new hosting mechanism
* with flask gone, we no longer need subprocess shenanigans
* If multiple web ui clients try to run, at least present a working console
* Update MultiClient and WebUI to handle multiple clients simultaneously.
- The port on which the websocket for the WebUI is hosted is not chosen randomly from 5000 - 5999. This port is passed to the browser so it knows which MultiClient to connect to
- Removed failure condition if a web server is already running, as there is no need to run more than one web server on a single system. If an exception is thrown while attempting to launch a web server, a check is made for the port being unavailable. If the port is unavailable, it probably means the user is launching a second MultiClient. A web browser is then opened with a connection to the correct webui_socket_port.
- Add a /web command to the MultiClient to repoen the appropriate browser window and get params in case a user accidentally closes the tab
* Use proper name for WebUI
* move webui into /data with other data files
* make web ui optional
This is mostly for laptop users wanting to preserve some battery, should not be needed outside of that.
* fix direct server start
* re-add connection timer
* fix indentation
Co-authored-by: Chris <chris@legendserver.info>
2020-06-03 21:29:43 +02:00
/ * * @ l i c e n s e R e a c t v 1 6 . 1 3 . 1
* react . production . min . js
*
* Copyright ( c ) Facebook , Inc . and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
2020-08-15 21:45:05 -04:00
* /var n=r(65),i="function"==typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,h=i?Symbol.for("react.profiler"):60114,l=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,c=i?Symbol.for("react.forward_ref"):60112,d=i?Symbol.for("react.suspense"):60113,p=i?Symbol.for("react.memo"):60115,m=i?Symbol.for("react.lazy"):60116,v="function"==typeof Symbol&&Symbol.iterator;function g(t){for(var e="https:/ / reactjs . org / docs / error - decoder . html ? invariant = "+t,r=1;r<arguments.length;r++)e+=" & args [ ] = "+encodeURIComponent(arguments[r]);return" Minified React error # "+t+" ; visit "+e+" for the full message or use the non - minified dev environment for full errors and additional helpful warnings . "}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y={};function w(t,e,r){this.props=t,this.context=e,this.refs=y,this.updater=r||b}function M(){}function _(t,e,r){this.props=t,this.context=e,this.refs=y,this.updater=r||b}w.prototype.isReactComponent={},w.prototype.setState=function(t,e){if(" object "!=typeof t&&" function "!=typeof t&&null!=t)throw Error(g(85));this.updater.enqueueSetState(this,t,e," setState ")},w.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t," forceUpdate ")},M.prototype=w.prototype;var S=_.prototype=new M;S.constructor=_,n(S,w.prototype),S.isPureReactComponent=!0;var k={current:null},E=Object.prototype.hasOwnProperty,x={key:!0,ref:!0,__self:!0,__source:!0};function A(t,e,r){var n,i={},a=null,s=null;if(null!=e)for(n in void 0!==e.ref&&(s=e.ref),void 0!==e.key&&(a=" "+e.key),e)E.call(e,n)&&!x.hasOwnProperty(n)&&(i[n]=e[n]);var u=arguments.length-2;if(1===u)i.children=r;else if(1<u){for(var h=Array(u),l=0;l<u;l++)h[l]=arguments[l+2];i.children=h}if(t&&t.defaultProps)for(n in u=t.defaultProps)void 0===i[n]&&(i[n]=u[n]);return{$$typeof:o,type:t,key:a,ref:s,props:i,_owner:k.current}}function T(t){return" object "==typeof t&&null!==t&&t.$$typeof===o}var R=/\/+/g,P=[];function C(t,e,r,n){if(P.length){var i=P.pop();return i.result=t,i.keyPrefix=e,i.func=r,i.context=n,i.count=0,i}return{result:t,keyPrefix:e,func:r,context:n,count:0}}function O(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>P.length&&P.push(t)}function I(t,e,r){return null==t?0:function t(e,r,n,i){var s=typeof e;" undefined "!==s&&" boolean "!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case" string ":case" number ":u=!0;break;case" object ":switch(e.$$typeof){case o:case a:u=!0}}if(u)return n(i,e," "===r?" . "+B(e,0):r),1;if(u=0,r=" "===r?" . ":r+" : ",Array.isArray(e))for(var h=0;h<e.length;h++){var l=r+B(s=e[h],h);u+=t(s,l,n,i)}else if(null===e||" object "!=typeof e?l=null:l=" function "==typeof(l=v&&e[v]||e[" @ @ iterator "])?l:null," function "==typeof l)for(e=l.call(e),h=0;!(s=e.next()).done;)u+=t(s=s.value,l=r+B(s,h++),n,i);else if(" object "===s)throw n=" "+e,Error(g(31," [ object Object ] "===n?" object with keys { "+Object.keys(e).join(" , ")+" } ":n," "));return u}(t," ",e,r)}function B(t,e){return" object "==typeof t&&null!==t&&null!=t.key?function(t){var e={" = ":" = 0 "," : ":" = 2 "};return" $ "+(" "+t).replace(/[=:]/g,(function(t){return e[t]}))}(t.key):e.toString(36)}function j(t,e){t.func.call(t.context,e,t.count++)}function N(t,e,r){var n=t.result,i=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?L(t,n,r,(function(t){return t})):null!=t&&(T(t)&&(t=function(t,e){return{$$typeof:o,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(t,i+(!t.key||e&&e.key===t.key?" ":(" "+t.key).replace(R," $ & /")+"/ ")+r)),n.push(t))}function L(t,e,r,n,i){var o=" ";null!=r&&(o=(" "+r).replace(R," $ & /")+"/ " ) , I ( t , N , e = C ( e , o , n , i ) ) , O ( e ) } var D = { current : null } ; function q ( ) { var t = D . current ; if ( null === t ) throw Error ( g ( 321 ) ) ; return t } var z = { ReactCurrentDispatcher : D , ReactCurrentBatchConfig : { suspense : null } , ReactCurrentOwner : k , IsSomeRendererActing : { current : ! 1 } , assign : n } ; e . Children = { map : function ( t , e , r ) { if ( null == t ) return t ; var n = [ ] ; return L ( t , n ,
WebUI (#100)
* Object-Oriented base changes for web-ui prep
* remove debug raise
* optimize broadcast to serialize once
* Implement WebUI socket, static assets, and classes
- Still need to wrap logging functions and send output to UI
- UI commands are successfully being sent to the server
* GUI operational. Wrap logging functions, implement server address selection on GUI, automatically launch web browser when client websocket is served
* Update MultiServer status when a user disconnects / reconnects
* Implement colored item and hint checks, improve GUI readability
* Fix improper formatting on received items
* Update SNES connection status on disconnect / reconnect. Implement itemFound, prevent accidentally printing JS objects
* Minor text change for itemFound
* Fixed a very wrong comment
* Fixed client commands not working, fixed un-helpful error messages appearing in GUI
* Fix a bug causing a failure to connect to a multiworld server if a previously existing cached address was present and the client was loaded without an address passed in
* Convert WebUI to React /w Redux. WebSocket communications not yet operational.
* WebUI fully converted to React / Redux.
- Websocket communication operational
- Added a button to connect to the multiserver which appears only when a SNES is connected and a server connection is not active
* Restore some features lost in WebUI
- Restore (found) notification on hints if the item has already been obtained
- Restore (x/y) indicator on received items, which indicates the number of items the client is waiting to receive from the client in a queue
* Fix a grammatical UI big causing player names to show only an apostrophe when possessive
* Add support for multiple SNES Devices, and switching between them
* freeze support for client
* make sure flask works when frozen
* UI Improvements
- Hint messages now actually show a found status via ✔ and ❌ emoji
- Active player name is always a different color than other players (orange for now)
- Add a toggle to show only entries relevant to the active player
- Added a WidgetArea
- Added a notes widget
* Received items now marked as relevant
* Include production build for deployment
* Notes now survive a browser close. Minimum width applied to monitor to prevent CSS issues.
* include webUi folder in setup.py
* Bugfixes for Monitor
- Fix a bug causing the monitor window to grow beyond it's intended content limit
- Reduced monitor content limit to 200 items
- Ensured each monitor entry has a unique key
* Prevent eslint from yelling at me about stupid things
* Add button to collapse sidebar, press enter on empty server input to disconnect on purpose
* WebUI is now aware of client disconnect, message log limit increased to 350, fix !missing output
* Update WebUI to v2.2.1
- Added color to WebUI for entrance-span
- Make !missing show total count at bottom of list to match /missing behavior
* Fix a bug causing clients version <= 2.2.0 to crash when anyone asks for a hint
- Also fix a bug in the WebUI causing the entrance location to always show as "somewhere"
* Update WebUI color palette (this cost me $50)
* allow text console input alongside web-ui
* remove Flask
a bit overkill for what we're doing
* remove jinja2
* Update WebUI to work with new hosting mechanism
* with flask gone, we no longer need subprocess shenanigans
* If multiple web ui clients try to run, at least present a working console
* Update MultiClient and WebUI to handle multiple clients simultaneously.
- The port on which the websocket for the WebUI is hosted is not chosen randomly from 5000 - 5999. This port is passed to the browser so it knows which MultiClient to connect to
- Removed failure condition if a web server is already running, as there is no need to run more than one web server on a single system. If an exception is thrown while attempting to launch a web server, a check is made for the port being unavailable. If the port is unavailable, it probably means the user is launching a second MultiClient. A web browser is then opened with a connection to the correct webui_socket_port.
- Add a /web command to the MultiClient to repoen the appropriate browser window and get params in case a user accidentally closes the tab
* Use proper name for WebUI
* move webui into /data with other data files
* make web ui optional
This is mostly for laptop users wanting to preserve some battery, should not be needed outside of that.
* fix direct server start
* re-add connection timer
* fix indentation
Co-authored-by: Chris <chris@legendserver.info>
2020-06-03 21:29:43 +02:00
/ * * @ l i c e n s e R e a c t v 1 6 . 1 3 . 1
* react - dom . production . min . js
*
* Copyright ( c ) Facebook , Inc . and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
2020-08-15 21:45:05 -04:00
* /var n=r(0),i=r(65),o=r(125);function a(t){for(var e="https:/ / reactjs . org / docs / error - decoder . html ? invariant = "+t,r=1;r<arguments.length;r++)e+=" & args [ ] = "+encodeURIComponent(arguments[r]);return" Minified React error # "+t+" ; visit "+e+" for the full message or use the non - minified dev environment for full errors and additional helpful warnings . "}if(!n)throw Error(a(227));function s(t,e,r,n,i,o,a,s,u){var h=Array.prototype.slice.call(arguments,3);try{e.apply(r,h)}catch(t){this.onError(t)}}var u=!1,h=null,l=!1,f=null,c={onError:function(t){u=!0,h=t}};function d(t,e,r,n,i,o,a,l,f){u=!1,h=null,s.apply(c,arguments)}var p=null,m=null,v=null;function g(t,e,r){var n=t.type||" unknown - event ";t.currentTarget=v(r),function(t,e,r,n,i,o,s,c,p){if(d.apply(this,arguments),u){if(!u)throw Error(a(198));var m=h;u=!1,h=null,l||(l=!0,f=m)}}(n,e,void 0,t),t.currentTarget=null}var b=null,y={};function w(){if(b)for(var t in y){var e=y[t],r=b.indexOf(t);if(!(-1<r))throw Error(a(96,t));if(!_[r]){if(!e.extractEvents)throw Error(a(97,t));for(var n in _[r]=e,r=e.eventTypes){var i=void 0,o=r[n],s=e,u=n;if(S.hasOwnProperty(u))throw Error(a(99,u));S[u]=o;var h=o.phasedRegistrationNames;if(h){for(i in h)h.hasOwnProperty(i)&&M(h[i],s,u);i=!0}else o.registrationName?(M(o.registrationName,s,u),i=!0):i=!1;if(!i)throw Error(a(98,n,t))}}}}function M(t,e,r){if(k[t])throw Error(a(100,t));k[t]=e,E[t]=e.eventTypes[r].dependencies}var _=[],S={},k={},E={};function x(t){var e,r=!1;for(e in t)if(t.hasOwnProperty(e)){var n=t[e];if(!y.hasOwnProperty(e)||y[e]!==n){if(y[e])throw Error(a(102,e));y[e]=n,r=!0}}r&&w()}var A=!(" undefined "==typeof window||void 0===window.document||void 0===window.document.createElement),T=null,R=null,P=null;function C(t){if(t=m(t)){if(" function "!=typeof T)throw Error(a(280));var e=t.stateNode;e&&(e=p(e),T(t.stateNode,t.type,e))}}function O(t){R?P?P.push(t):P=[t]:R=t}function I(){if(R){var t=R,e=P;if(P=R=null,C(t),e)for(t=0;t<e.length;t++)C(e[t])}}function B(t,e){return t(e)}function j(t,e,r,n,i){return t(e,r,n,i)}function N(){}var L=B,D=!1,q=!1;function z(){null===R&&null===P||(N(),I())}function U(t,e,r){if(q)return t(e,r);q=!0;try{return L(t,e,r)}finally{q=!1,z()}}var F=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,H=Object.prototype.hasOwnProperty,W={},Z={};function K(t,e,r,n,i,o){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=o}var V={};" children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style ".split(" ").forEach((function(t){V[t]=new K(t,0,!1,t,null,!1)})),[[" acceptCharset "," accept - charset "],[" className "," class "],[" htmlFor "," for "],[" httpEquiv "," http - equiv "]].forEach((function(t){var e=t[0];V[e]=new K(e,1,!1,t[1],null,!1)})),[" contentEditable "," draggable "," spellCheck "," value "].forEach((function(t){V[t]=new K(t,2,!1,t.toLowerCase(),null,!1)})),[" autoReverse "," externalResourcesRequired "," focusable "," preserveAlpha "].forEach((function(t){V[t]=new K(t,2,!1,t,null,!1)}))," allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope ".split(" ").forEach((function(t){V[t]=new K(t,3,!1,t.toLowerCase(),null,!1)})),[" checked "," multiple "," muted "," selected "].forEach((function(t){V[t]=new K(t,3,!0,t,null,!1)})),[" capture "," download "].forEach((function(t){V[t]=new K(t,4,!1,t,null,!1)})),[" cols "," rows "," size "," span "].forEach((function(t){V[t]=new K(t,6,!1,t,null,!1)})),[" rowSpan "," start "].forEach((function(t){V[t]=new K(t,5,!1,t.toLowerCase(),null,!1)}));var Y=/[\-:]([a-z])/g;function $(t){return t[1].toUpperCase()}" accent -
WebUI (#100)
* Object-Oriented base changes for web-ui prep
* remove debug raise
* optimize broadcast to serialize once
* Implement WebUI socket, static assets, and classes
- Still need to wrap logging functions and send output to UI
- UI commands are successfully being sent to the server
* GUI operational. Wrap logging functions, implement server address selection on GUI, automatically launch web browser when client websocket is served
* Update MultiServer status when a user disconnects / reconnects
* Implement colored item and hint checks, improve GUI readability
* Fix improper formatting on received items
* Update SNES connection status on disconnect / reconnect. Implement itemFound, prevent accidentally printing JS objects
* Minor text change for itemFound
* Fixed a very wrong comment
* Fixed client commands not working, fixed un-helpful error messages appearing in GUI
* Fix a bug causing a failure to connect to a multiworld server if a previously existing cached address was present and the client was loaded without an address passed in
* Convert WebUI to React /w Redux. WebSocket communications not yet operational.
* WebUI fully converted to React / Redux.
- Websocket communication operational
- Added a button to connect to the multiserver which appears only when a SNES is connected and a server connection is not active
* Restore some features lost in WebUI
- Restore (found) notification on hints if the item has already been obtained
- Restore (x/y) indicator on received items, which indicates the number of items the client is waiting to receive from the client in a queue
* Fix a grammatical UI big causing player names to show only an apostrophe when possessive
* Add support for multiple SNES Devices, and switching between them
* freeze support for client
* make sure flask works when frozen
* UI Improvements
- Hint messages now actually show a found status via ✔ and ❌ emoji
- Active player name is always a different color than other players (orange for now)
- Add a toggle to show only entries relevant to the active player
- Added a WidgetArea
- Added a notes widget
* Received items now marked as relevant
* Include production build for deployment
* Notes now survive a browser close. Minimum width applied to monitor to prevent CSS issues.
* include webUi folder in setup.py
* Bugfixes for Monitor
- Fix a bug causing the monitor window to grow beyond it's intended content limit
- Reduced monitor content limit to 200 items
- Ensured each monitor entry has a unique key
* Prevent eslint from yelling at me about stupid things
* Add button to collapse sidebar, press enter on empty server input to disconnect on purpose
* WebUI is now aware of client disconnect, message log limit increased to 350, fix !missing output
* Update WebUI to v2.2.1
- Added color to WebUI for entrance-span
- Make !missing show total count at bottom of list to match /missing behavior
* Fix a bug causing clients version <= 2.2.0 to crash when anyone asks for a hint
- Also fix a bug in the WebUI causing the entrance location to always show as "somewhere"
* Update WebUI color palette (this cost me $50)
* allow text console input alongside web-ui
* remove Flask
a bit overkill for what we're doing
* remove jinja2
* Update WebUI to work with new hosting mechanism
* with flask gone, we no longer need subprocess shenanigans
* If multiple web ui clients try to run, at least present a working console
* Update MultiClient and WebUI to handle multiple clients simultaneously.
- The port on which the websocket for the WebUI is hosted is not chosen randomly from 5000 - 5999. This port is passed to the browser so it knows which MultiClient to connect to
- Removed failure condition if a web server is already running, as there is no need to run more than one web server on a single system. If an exception is thrown while attempting to launch a web server, a check is made for the port being unavailable. If the port is unavailable, it probably means the user is launching a second MultiClient. A web browser is then opened with a connection to the correct webui_socket_port.
- Add a /web command to the MultiClient to repoen the appropriate browser window and get params in case a user accidentally closes the tab
* Use proper name for WebUI
* move webui into /data with other data files
* make web ui optional
This is mostly for laptop users wanting to preserve some battery, should not be needed outside of that.
* fix direct server start
* re-add connection timer
* fix indentation
Co-authored-by: Chris <chris@legendserver.info>
2020-06-03 21:29:43 +02:00
/ * * @ l i c e n s e R e a c t v 0 . 1 9 . 1
* scheduler . production . min . js
*
* Copyright ( c ) Facebook , Inc . and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
2020-08-15 21:45:05 -04:00
* /var n,i,o,a,s;if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,h=null,l=function(){if(null!==u)try{var t=e.unstable_now();u(!0,t),u=null}catch(t){throw setTimeout(l,0),t}},f=Date.now();e.unstable_now=function(){return Date.now()-f},n=function(t){null!==u?setTimeout(n,0,t):(u=t,setTimeout(l,0))},i=function(t,e){h=setTimeout(t,e)},o=function(){clearTimeout(h)},a=function(){return!1},s=e.unstable_forceFrameRate=function(){}}else{var c=window.performance,d=window.Date,p=window.setTimeout,m=window.clearTimeout;if("undefined"!=typeof console){var v=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https:/ / fb . me / react - polyfills ")," function "!=typeof v&&console.error(" This browser doesn ' t support cancelAnimationFrame . Make sure that you load a polyfill in older browsers . https : //fb.me/react-polyfills")}if("object"==typeof c&&"function"==typeof c.now)e.unstable_now=function(){return c.now()};else{var g=d.now();e.unstable_now=function(){return d.now()-g}}var b=!1,y=null,w=-1,M=5,_=0;a=function(){return e.unstable_now()>=_},s=function(){},e.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):M=0<t?Math.floor(1e3/t):5};var S=new MessageChannel,k=S.port2;S.port1.onmessage=function(){if(null!==y){var t=e.unstable_now();_=t+M;try{y(!0,t)?k.postMessage(null):(b=!1,y=null)}catch(t){throw k.postMessage(null),t}}else b=!1},n=function(t){y=t,b||(b=!0,k.postMessage(null))},i=function(t,r){w=p((function(){t(e.unstable_now())}),r)},o=function(){m(w),w=-1}}function E(t,e){var r=t.length;t.push(e);t:for(;;){var n=r-1>>>1,i=t[n];if(!(void 0!==i&&0<T(i,e)))break t;t[n]=e,t[r]=i,r=n}}function x(t){return void 0===(t=t[0])?null:t}function A(t){var e=t[0];if(void 0!==e){var r=t.pop();if(r!==e){t[0]=r;t:for(var n=0,i=t.length;n<i;){var o=2*(n+1)-1,a=t[o],s=o+1,u=t[s];if(void 0!==a&&0>T(a,r))void 0!==u&&0>T(u,a)?(t[n]=u,t[s]=r,n=s):(t[n]=a,t[o]=r,n=o);else{if(!(void 0!==u&&0>T(u,r)))break t;t[n]=u,t[s]=r,n=s}}}return e}return null}function T(t,e){var r=t.sortIndex-e.sortIndex;return 0!==r?r:t.id-e.id}var R=[],P=[],C=1,O=null,I=3,B=!1,j=!1,N=!1;function L(t){for(var e=x(P);null!==e;){if(null===e.callback)A(P);else{if(!(e.startTime<=t))break;A(P),e.sortIndex=e.expirationTime,E(R,e)}e=x(P)}}function D(t){if(N=!1,L(t),!j)if(null!==x(R))j=!0,n(q);else{var e=x(P);null!==e&&i(D,e.startTime-t)}}function q(t,r){j=!1,N&&(N=!1,o()),B=!0;var n=I;try{for(L(r),O=x(R);null!==O&&(!(O.expirationTime>r)||t&&!a());){var s=O.callback;if(null!==s){O.callback=null,I=O.priorityLevel;var u=s(O.expirationTime<=r);r=e.unstable_now(),"function"==typeof u?O.callback=u:O===x(R)&&A(R),L(r)}else A(R);O=x(R)}if(null!==O)var h=!0;else{var l=x(P);null!==l&&i(D,l.startTime-r),h=!1}return h}finally{O=null,I=n,B=!1}}function z(t){switch(t){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var U=s;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_continueExecution=function(){j||B||(j=!0,n(q))},e.unstable_getCurrentPriorityLevel=function(){return I},e.unstable_getFirstCallbackNode=function(){return x(R)},e.unstable_next=function(t){switch(I){case 1:case 2:case 3:var e=3;break;default:e=I}var r=I;I=e;try{return t()}finally{I=r}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=U,e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var r=I;I=t;try{return e()}finally{I=r}},e.unstable_scheduleCallback=function(t,r,a){var s=e.unstable_now();if("object"==typeof a&&null!==a){var u=a.delay;u="number"==typeof u&&0<u?s+u:s,a="number"==typeof a.timeout?a.timeout:z(t)}else a=z(t),u=s;return t={id:C++,callback:r,
WebUI (#100)
* Object-Oriented base changes for web-ui prep
* remove debug raise
* optimize broadcast to serialize once
* Implement WebUI socket, static assets, and classes
- Still need to wrap logging functions and send output to UI
- UI commands are successfully being sent to the server
* GUI operational. Wrap logging functions, implement server address selection on GUI, automatically launch web browser when client websocket is served
* Update MultiServer status when a user disconnects / reconnects
* Implement colored item and hint checks, improve GUI readability
* Fix improper formatting on received items
* Update SNES connection status on disconnect / reconnect. Implement itemFound, prevent accidentally printing JS objects
* Minor text change for itemFound
* Fixed a very wrong comment
* Fixed client commands not working, fixed un-helpful error messages appearing in GUI
* Fix a bug causing a failure to connect to a multiworld server if a previously existing cached address was present and the client was loaded without an address passed in
* Convert WebUI to React /w Redux. WebSocket communications not yet operational.
* WebUI fully converted to React / Redux.
- Websocket communication operational
- Added a button to connect to the multiserver which appears only when a SNES is connected and a server connection is not active
* Restore some features lost in WebUI
- Restore (found) notification on hints if the item has already been obtained
- Restore (x/y) indicator on received items, which indicates the number of items the client is waiting to receive from the client in a queue
* Fix a grammatical UI big causing player names to show only an apostrophe when possessive
* Add support for multiple SNES Devices, and switching between them
* freeze support for client
* make sure flask works when frozen
* UI Improvements
- Hint messages now actually show a found status via ✔ and ❌ emoji
- Active player name is always a different color than other players (orange for now)
- Add a toggle to show only entries relevant to the active player
- Added a WidgetArea
- Added a notes widget
* Received items now marked as relevant
* Include production build for deployment
* Notes now survive a browser close. Minimum width applied to monitor to prevent CSS issues.
* include webUi folder in setup.py
* Bugfixes for Monitor
- Fix a bug causing the monitor window to grow beyond it's intended content limit
- Reduced monitor content limit to 200 items
- Ensured each monitor entry has a unique key
* Prevent eslint from yelling at me about stupid things
* Add button to collapse sidebar, press enter on empty server input to disconnect on purpose
* WebUI is now aware of client disconnect, message log limit increased to 350, fix !missing output
* Update WebUI to v2.2.1
- Added color to WebUI for entrance-span
- Make !missing show total count at bottom of list to match /missing behavior
* Fix a bug causing clients version <= 2.2.0 to crash when anyone asks for a hint
- Also fix a bug in the WebUI causing the entrance location to always show as "somewhere"
* Update WebUI color palette (this cost me $50)
* allow text console input alongside web-ui
* remove Flask
a bit overkill for what we're doing
* remove jinja2
* Update WebUI to work with new hosting mechanism
* with flask gone, we no longer need subprocess shenanigans
* If multiple web ui clients try to run, at least present a working console
* Update MultiClient and WebUI to handle multiple clients simultaneously.
- The port on which the websocket for the WebUI is hosted is not chosen randomly from 5000 - 5999. This port is passed to the browser so it knows which MultiClient to connect to
- Removed failure condition if a web server is already running, as there is no need to run more than one web server on a single system. If an exception is thrown while attempting to launch a web server, a check is made for the port being unavailable. If the port is unavailable, it probably means the user is launching a second MultiClient. A web browser is then opened with a connection to the correct webui_socket_port.
- Add a /web command to the MultiClient to repoen the appropriate browser window and get params in case a user accidentally closes the tab
* Use proper name for WebUI
* move webui into /data with other data files
* make web ui optional
This is mostly for laptop users wanting to preserve some battery, should not be needed outside of that.
* fix direct server start
* re-add connection timer
* fix indentation
Co-authored-by: Chris <chris@legendserver.info>
2020-06-03 21:29:43 +02:00
/ * * @ l i c e n s e R e a c t v 1 6 . 1 3 . 1
* react - is . production . min . js
*
* Copyright ( c ) Facebook , Inc . and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
2020-08-15 21:45:05 -04:00
* / v a r n = " f u n c t i o n " = = t y p e o f S y m b o l & & S y m b o l . f o r , i = n ? S y m b o l . f o r ( " r e a c t . e l e m e n t " ) : 6 0 1 0 3 , o = n ? S y m b o l . f o r ( " r e a c t . p o r t a l " ) : 6 0 1 0 6 , a = n ? S y m b o l . f o r ( " r e a c t . f r a g m e n t " ) : 6 0 1 0 7 , s = n ? S y m b o l . f o r ( " r e a c t . s t r i c t _ m o d e " ) : 6 0 1 0 8 , u = n ? S y m b o l . f o r ( " r e a c t . p r o f i l e r " ) : 6 0 1 1 4 , h = n ? S y m b o l . f o r ( " r e a c t . p r o v i d e r " ) : 6 0 1 0 9 , l = n ? S y m b o l . f o r ( " r e a c t . c o n t e x t " ) : 6 0 1 1 0 , f = n ? S y m b o l . f o r ( " r e a c t . a s y n c _ m o d e " ) : 6 0 1 1 1 , c = n ? S y m b o l . f o r ( " r e a c t . c o n c u r r e n t _ m o d e " ) : 6 0 1 1 1 , d = n ? S y m b o l . f o r ( " r e a c t . f o r w a r d _ r e f " ) : 6 0 1 1 2 , p = n ? S y m b o l . f o r ( " r e a c t . s u s p e n s e " ) : 6 0 1 1 3 , m = n ? S y m b o l . f o r ( " r e a c t . s u s p e n s e _ l i s t " ) : 6 0 1 2 0 , v = n ? S y m b o l . f o r ( " r e a c t . m e m o " ) : 6 0 1 1 5 , g = n ? S y m b o l . f o r ( " r e a c t . l a z y " ) : 6 0 1 1 6 , b = n ? S y m b o l . f o r ( " r e a c t . b l o c k " ) : 6 0 1 2 1 , y = n ? S y m b o l . f o r ( " r e a c t . f u n d a m e n t a l " ) : 6 0 1 1 7 , w = n ? S y m b o l . f o r ( " r e a c t . r e s p o n d e r " ) : 6 0 1 1 8 , M = n ? S y m b o l . f o r ( " r e a c t . s c o p e " ) : 6 0 1 1 9 ; f u n c t i o n _ ( t ) { i f ( " o b j e c t " = = t y p e o f t & & n u l l ! = = t ) { v a r e = t . $ $ t y p e o f ; s w i t c h ( e ) { c a s e i : s w i t c h ( t = t . t y p e ) { c a s e f : c a s e c : c a s e a : c a s e u : c a s e s : c a s e p : r e t u r n t ; d e f a u l t : s w i t c h ( t = t & & t . $ $ t y p e o f ) { c a s e l : c a s e d : c a s e g : c a s e v : c a s e h : r e t u r n t ; d e f a u l t : r e t u r n e } } c a s e o : r e t u r n e } } } f u n c t i o n S ( t ) { r e t u r n _ ( t ) = = = c } e . A s y n c M o d e = f , e . C o n c u r r e n t M o d e = c , e . C o n t e x t C o n s u m e r = l , e . C o n t e x t P r o v i d e r = h , e . E l e m e n t = i , e . F o r w a r d R e f = d , e . F r a g m e n t = a , e . L a z y = g , e . M e m o = v , e . P o r t a l = o , e . P r o f i l e r = u , e . S t r i c t M o d e = s , e . S u s p e n s e = p , e . i s A s y n c M o d e = f u n c t i o n ( t ) { r e t u r n S ( t ) | | _ ( t ) = = = f } , e . i s C o n c u r r e n t M o d e = S , e . i s C o n t e x t C o n s u m e r = f u n c t i o n ( t ) { r e t u r n _ ( t ) = = = l } , e . i s C o n t e x t P r o v i d e r = f u n c t i o n ( t ) { r e t u r n _ ( t ) = = = h } , e . i s E l e m e n t = f u n c t i o n ( t ) { r e t u r n " o b j e c t " = = t y p e o f t & & n u l l ! = = t & & t . $ $ t y p e o f = = = i } , e . i s F o r w a r d R e f = f u n c t i o n ( t ) { r e t u r n _ ( t ) = = = d } , e . i s F r a g m e n t = f u n c t i o n ( t ) { r e t u r n _ ( t ) = = = a } , e . i s L a z y = f u n c t i o n ( t ) { r e t u r n _ ( t ) = = = g } , e . i s M e m o = f u n c t i o n ( t ) { r e t u r n _ ( t ) = = = v } , e . i s P o r t a l = f u n c t i o n ( t ) { r e t u r n _ ( t ) = = = o } , e . i s P r o f i l e r = f u n c t i o n ( t ) { r e t u r n _ ( t ) = = = u } , e . i s S t r i c t M o d e = f u n c t i o n ( t ) { r e t u r n _ ( t ) = = = s } , e . i s S u s p e n s e = f u n c t i o n ( t ) { r e t u r n _ ( t ) = = = p } , e . i s V a l i d E l e m e n t T y p e = f u n c t i o n ( t ) { r e t u r n " s t r i n g " = = t y p e o f t | | " f u n c t i o n " = = t y p e o f t | | t = = = a | | t = = = c | | t = = = u | | t = = = s | | t = = = p | | t = = = m | | " o b j e c t " = = t y p e o f t & & n u l l ! = = t & & ( t . $ $ t y p e o f = = = g | | t . $ $ t y p e o f = = = v | | t . $ $ t y p e o f = = = h | | t . $ $ t y p e o f = = = l | | t . $ $ t y p e o f = = = d | | t . $ $ t y p e o f = = = y | | t . $ $ t y p e o f = = = w | | t . $ $ t y p e o f = = = M | | t . $ $ t y p e o f = = = b ) } , e . t y p e O f = _ } , f u n c t i o n ( t , e , r ) { v a r n = r ( 1 3 ) , i = r ( 1 3 2 ) ; " s t r i n g " = = t y p e o f ( i = i . _ _ e s M o d u l e ? i . d e f a u l t : i ) & & ( i = [ [ t . i , i , " " ] ] ) ; v a r o = { i n s e r t : " h e a d " , s i n g l e t o n : ! 1 } ; n ( i , o ) ; t . e x p o r t s = i . l o c a l s | | { } } , f u n c t i o n ( t , e , r ) { ( e = r ( 1 4 ) ( ! 1 ) ) . p u s h ( [ t . i , " # h e a d e r - b a r { f o n t - s i z e : 3 . 4 e m ; m i n - w i d t h : 1 0 3 6 p x } \ n " , " " ] ) , t . e x p o r t s = e } , f u n c t i o n ( t , e , r ) { v a r n = r ( 1 3 ) , i = r ( 1 3 4 ) ; " s t r i n g " = = t y p e o f ( i = i . _ _ e s M o d u l e ? i . d e f a u l t : i ) & & ( i = [ [ t . i , i , " " ] ] ) ; v a r o = { i n s e r t : " h e a d " , s i n g l e t o n : ! 1 } ; n ( i , o ) ; t . e x p o r t s = i . l o c a l s | | { } } , f u n c t i o n ( t , e , r ) { ( e = r ( 1 4 ) ( ! 1 ) ) . p u s h ( [ t . i , " # m o n i t o r { f l e x - g r o w : 1 ; m i n - w i d t h : 8 0 0 p x } \ n " , " " ] ) , t . e x p o r t s = e } , f u n c t i o n ( t , e , r ) { ( f u n c t i o n ( e ) { v a r n ; t . e x p o r t s = ( n = n | | f u n c t i o n ( t , n ) { v a r i ; i f ( " u n d e f i n e d " ! = t y p e o f w i n d o w & & w i n d o w . c r y p t o & & ( i = w i n d o w . c r y p t o ) , ! i & & " u n d e f i n e d " ! = t y p e o f w i n d o w & & w i n d o w . m s C r y p t o & & ( i = w i n d o w . m s C r y p t o ) , ! i & & v o i d 0 ! = = e & & e . c r y p t o & & ( i = e . c r y p t o ) , ! i ) t r y { i = r ( 1 3 6 ) } c a t c h ( t ) { } v a r o = f u n c t i o n ( ) { i f ( i ) { i f ( " f u n c t i o n " = = t y p e o f i . g e t R a n d o m V a l u e s ) t r y { r e t u r n i . g e t R a n d o m V a l u e s ( n e w U i n t 3 2 A r r a y ( 1 ) ) [ 0 ] } c a t c h ( t ) { } i f ( " f u n c t i o n " = = t y p e o f i . r a n d o m B y t e s ) t r y { r e t u r n i . r a n d o m B y t e s ( 4 ) . r e a d I n t 3 2 L E ( ) } c a t c h ( t ) { } } t h r o w n e w E r r o r ( " N a t i v e c r y p t o m o d u l e c o u l d n o t b e u s e d t o g e t s e c u r e r a n d o m n u m b e r . " ) } , a = O b j e c t . c r e a t e | | f u n c t i o n ( ) { f u n c t i o n t ( ) { } r e t u r n f u n c t i o n ( e ) { v a r r ; r e t u r n t . p r o t o t y p e = e , r = n e w t , t . p r o t o t y p e = n u l l , r } } ( ) , s = { } , u = s . l i b = { } , h = u . B a s e = { e x t e n d : f u n c t i o n ( t ) { v a r e = a ( t h i s ) ; r e t u r n t & & e . m i x I n ( t ) , e . h a s O w n P r o p e r t y ( " i n i t " ) & & t h i s . i n i t ! = = e . i n i t | | ( e . i n i t = f u n c t i o n ( ) { e . $ s u p e r . i n i t . a p p l y ( t h i s , a r g u m e n t s ) } ) , e . i n i t . p r o t o t y p e = e , e . $ s u p e r = t h i s , e } , c r e a t e : f u n c t i o n ( ) { v a r t = t h i s . e x t e n d ( ) ; r e t u r n t . i n i t . a p p l y ( t , a r g u m e n t s ) , t } , i n i t : f u n c t i o n ( ) { } , m i x I n : f u n c t i o n ( t ) { f o r ( v a r e i n t ) t . h a s O w n P r o p e r t y ( e ) & & ( t h i s [ e ] = t [ e ] ) ; t . h a s O w n P r o p e r t y ( " t o S t r i n g " ) & & ( t h i s . t o S t r i n g = t . t o S t r i n g ) } , c l o n e : f u n c t i o n ( ) { r e t u r n t h i s . i n i t . p r o t o t y p e . e x t e n d ( t h i s ) } } , l = u . W o r d A r r a y = h . e x t e n d ( { i n i t : f u n c t i o n ( t , e ) { t = t h i s . w o r d s = t | | [ ] , t h i s . s i g B y t e s = n u l l ! = e ? e : 4 * t . l e n g t h } , t o S t r i n g : f u n c t i o n ( t ) { r e t u r n ( t | | c ) . s t r i n g i f y ( t h i s ) } , c o n c a t : f u n c t i o n ( t ) { v a r e = t h i s . w o r d s , r = t . w o r d s , n = t h i s . s i g B y t e s , i = t . s i g B y t e s ; i f ( t h i s . c l a m p ( ) , n % 4 ) f o r ( v a r o =
2020-09-13 00:39:52 -04:00
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ var n = r ( 4 ) , i = n . Buffer ; function o ( t , e ) { for ( var r in t ) e [ r ] = t [ r ] } function a ( t , e , r ) { return i ( t , e , r ) } i . from && i . alloc && i . allocUnsafe && i . allocUnsafeSlow ? t . exports = n : ( o ( n , e ) , e . Buffer = a ) , a . prototype = Object . create ( i . prototype ) , o ( i , a ) , a . from = function ( t , e , r ) { if ( "number" == typeof t ) throw new TypeError ( "Argument must not be a number" ) ; return i ( t , e , r ) } , a . alloc = function ( t , e , r ) { if ( "number" != typeof t ) throw new TypeError ( "Argument must be a number" ) ; var n = i ( t ) ; return void 0 !== e ? "string" == typeof r ? n . fill ( e , r ) : n . fill ( e ) : n . fill ( 0 ) , n } , a . allocUnsafe = function ( t ) { if ( "number" != typeof t ) throw new TypeError ( "Argument must be a number" ) ; return i ( t ) } , a . allocUnsafeSlow = function ( t ) { if ( "number" != typeof t ) throw new TypeError ( "Argument must be a number" ) ; return n . SlowBuffer ( t ) } } , function ( t , e , r ) { ( e = t . exports = r ( 67 ) ) . Stream = e , e . Readable = e , e . Writable = r ( 71 ) , e . Duplex = r ( 20 ) , e . Transform = r ( 72 ) , e . PassThrough = r ( 147 ) , e . finished = r ( 41 ) , e . pipeline = r ( 148 ) } , function ( t , e ) { } , function ( t , e , r ) { "use strict" ; function n ( t , e ) { var r = Object . keys ( t ) ; if ( Object . getOwnPropertySymbols ) { var n = Object . getOwnPropertySymbols ( t ) ; e && ( n = n . filter ( ( function ( e ) { return Object . getOwnPropertyDescriptor ( t , e ) . enumerable } ) ) ) , r . push . apply ( r , n ) } return r } function i ( t , e , r ) { return e in t ? Object . defineProperty ( t , e , { value : r , enumerable : ! 0 , configurable : ! 0 , writable : ! 0 } ) : t [ e ] = r , t } function o ( t , e ) { for ( var r = 0 ; r < e . length ; r ++ ) { var n = e [ r ] ; n . enumerable = n . enumerable || ! 1 , n . configurable = ! 0 , "value" in n && ( n . writable = ! 0 ) , Object . defineProperty ( t , n . key , n ) } } var a = r ( 4 ) . Buffer , s = r ( 144 ) . inspect , u = s && s . custom || "inspect" ; t . exports = function ( ) { function t ( ) { ! function ( t , e ) { if ( ! ( t instanceof e ) ) throw new TypeError ( "Cannot call a class as a function" ) } ( this , t ) , this . head = null , this . tail = null , this . length = 0 } var e , r , h ; return e = t , ( r = [ { key : "push" , value : function ( t ) { var e = { data : t , next : null } ; this . length > 0 ? this . tail . next = e : this . head = e , this . tail = e , ++ this . length } } , { key : "unshift" , value : function ( t ) { var e = { data : t , next : this . head } ; 0 === this . length && ( this . tail = e ) , this . head = e , ++ this . length } } , { key : "shift" , value : function ( ) { if ( 0 !== this . length ) { var t = this . head . data ; return 1 === this . length ? this . head = this . tail = null : this . head = this . head . next , -- this . length , t } } } , { key : "clear" , value : function ( ) { this . head = this . tail = null , this . length = 0 } } , { key : "join" , value : function ( t ) { if ( 0 === this . length ) return "" ; for ( var e = this . head , r = "" + e . data ; e = e . next ; ) r += t + e . data ; return r } } , { key : "concat" , value : function ( t ) { if ( 0 === this . length ) return a . alloc ( 0 ) ; for ( var e , r , n , i = a . allocUnsafe ( t >>> 0 ) , o = this . head , s = 0 ; o ; ) e = o . data , r = i , n = s , a . prototype . copy . call ( e , r , n ) , s += o . data . length , o = o . next ; return i } } , { key : "consume" , value : function ( t , e ) { var r ; return t < this . head . data . length ? ( r = this . head . data . slice ( 0 , t ) , this . head . data = this . head . data . slice ( t ) ) : r = t === this . head . data . length ? this . shift ( ) : e ? this . _getString ( t ) : this . _getBuffer ( t ) , r } } , { key : "first" , value : function ( ) { return this . head . data } } , { key : "_getString" , value : function ( t ) { var e = this . head , r = 1 , n = e . data ; for ( t -= n . length ; e = e . next ; ) { var i = e . data , o = t > i . length ? i . length : t ; if ( o === i . length ? n += i : n += i . slice ( 0 , t ) , 0 == ( t -= o ) ) { o === i . length ? ( ++ r , e . next ? this . head = e . next : this . head = this . tail = null ) : ( this . head = e , e . data = i . slice ( o ) ) ; break } ++ r } return this . length -= r , n } } , { key : "_getBuffer" , value : function ( t ) { var e = a . allocUnsafe ( t ) , r = this . head , n = 1 ; for ( r . data . copy ( e ) , t -= r . data . length ; r = r . next ; ) { var i = r . data , o = t > i . length ? i . length : t ; if ( i . copy ( e , e . length - t , 0 , o ) , 0 == ( t -= o ) ) { o === i . length ? ( ++ n , r . next ? this . head = r . next : this . head = this . tail = null ) : ( this . head = r , r . data = i . slice ( o ) ) ; break } ++ n } return this . length -= n , e } } , { key : u , value : function ( t , e ) { return s ( this , function ( t ) { for ( var e = 1 ; e < arguments . length ; e ++ ) { var r = null != arguments [ e ] ? arguments [ e ] : { } ; e % 2 ? n ( Object ( r ) , ! 0 ) . forEach ( ( function ( e ) { i ( t , e , r [ e ] ) } ) ) : Object . getOwnPropertyDescriptors ? Object . defineProperties ( t , Object . getOwnPropertyDescriptors ( r ) ) : n ( Object ( r ) ) . forEach ( ( function ( e ) { Object . defineProperty ( t , e , Object . getOwnPropertyDescriptor ( r , e ) ) } ) ) } return t } ( { } , e , { depth : 0 , customInspect : ! 1 } ) ) } } ] ) && o ( e . prototype , r ) , h && o ( e , h ) , t } ( ) } , function ( t , e ) { } , function ( t , e , r ) { "use strict" ; ( function ( e ) { var n ; funct