All Downloads are FREE. Search and download functionalities are using the official Maven repository.

fire_public.static.js.main.75735704.chunk.js.map Maven / Gradle / Ivy

{"version":3,"sources":["App.js","serviceWorker.js","index.js"],"names":["App","child","oChild","console","count","setCon","con","location","window","localWs","hostname","port","state","promptText","acceptLine","return","enterLine","handleMessage","message","startsWith","splitStr","split","length","clientLog","wsUrl","fireClient","clientOChild","ws","connected","WebSocket","e","onopen","onmessage","data","log","onclose","trySend","send","createFireClient","text","scrollToBottom","promptLabel","_this","_this2","this","react_default","a","createElement","style","display","justifyContent","alignItems","height","main_default","ref","handler","welcomeMessage","autofocus","Component","Boolean","match","ReactDOM","render","src_App","document","getElementById","navigator","serviceWorker","ready","then","registration","unregister"],"mappings":"yOA+HeA,0NAvHbC,MAAS,WACP,IAAIC,EAAS,CAAEC,QAAS,KAAMC,MAAO,GAyFrC,OAjDAF,EAAOG,OAAS,SAAUC,GACxBJ,EAAOC,QAAUG,EACjB,IAAIC,EAAWC,OAAOD,SAClBE,EAAU,QAAUF,EAASG,UAAYH,EAASI,KAAO,IAAMJ,EAASI,KAAO,IAAM,MACzFT,EAAOC,QAAQS,MAAMC,WAAa,WAAaJ,EAC/CP,EAAOC,QAAQW,aACfZ,EAAOC,QAAQY,UAGjBb,EAAOc,UAAY,WACbd,EAAOC,UACTD,EAAOE,MAAQF,EAAOE,MAAQ,EAC9BF,EAAOC,QAAQY,WAInBb,EAAOe,cAAgB,SAAUC,GAE/B,GAAIA,EAAQC,WAAW,YAAvB,CACE,IAAIC,EAAWF,EAAQG,MAAM,KAC7B,GAAwB,IAApBD,EAASE,OACXpB,EAAOqB,UAAU,4DACZ,CACL,IAAIC,EAAQJ,EAAS,GACrBlB,EAAOuB,WA9DU,SAAUC,EAAcF,GAC7C,IACIG,EADAC,GAAY,EAEhB,IACED,EAAK,IAAIE,UAAUL,GACnB,MAAOM,GACPH,EAAK,GACLD,EAAaH,UAAU,mBA4BzB,OAzBAI,EAAGI,OAAS,WACVH,GAAY,EACZF,EAAaH,UAAU,eAGzBI,EAAGK,UAAY,SAAkBC,GAC/B,IAAIf,EAAUe,EAAKA,KACnBP,EAAaQ,IAAIhB,IAGnBS,EAAGQ,QAAU,WACPP,EACFF,EAAaH,UAAU,sBAEvBG,EAAaH,UAAU,oBAI3BI,EAAGS,QAAU,SAAUlB,GACjBU,EACFD,EAAGU,KAAKnB,GAERQ,EAAaH,UAAU,qBAGpBI,EA2BiBW,CAAiBpC,EAAQsB,GAG/CtB,EAAOc,iBAILd,EAAOuB,WACTvB,EAAOuB,WAAWW,QAAQlB,GAE1BhB,EAAOqB,UAAU,mBAEnBrB,EAAOc,aAGTd,EAAOgC,IAAM,SAAUK,GACjBrC,EAAOC,UACTD,EAAOC,QAAQ+B,IAAIK,GACnBrC,EAAOC,QAAQqC,mBAInBtC,EAAOqB,UAAY,SAAUgB,GAC3BrC,EAAOgC,IAAI,YAAcK,IAEpBrC,EA1FA,KA6FTuC,YAAc,WACZ,OAAOC,EAAKzC,MAAMG,MAAQ,8EAGnB,IAAAuC,EAAAC,KACP,OACEC,EAAAC,EAAAC,cAAA,OACEC,MAAO,CACLC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,OAAQ,UAGVP,EAAAC,EAAAC,cAACM,EAAAP,EAAD,CACEQ,IAAK,SAAAA,GAAG,OAAKX,EAAK1C,MAAMI,OAAOiD,IAC/BC,QAASX,KAAK3C,MAAMgB,cACpBwB,YAAaG,KAAKH,YAClBe,eAAgB,8BAChBC,WAAW,YAlHHC,cCMEC,QACW,cAA7BnD,OAAOD,SAASG,UAEe,UAA7BF,OAAOD,SAASG,UAEhBF,OAAOD,SAASG,SAASkD,MACvB,2DCZNC,IAASC,OAAOjB,EAAAC,EAAAC,cAACgB,EAAD,MAASC,SAASC,eAAe,SD2H3C,kBAAmBC,WACrBA,UAAUC,cAAcC,MAAMC,KAAK,SAAAC,GACjCA,EAAaC","file":"static/js/main.75735704.chunk.js","sourcesContent":["import Console from 'react-console-component';\nimport 'react-console-component/main.css';\nimport './console.scss';\n\nimport React, {Component} from 'react';\n\nclass App extends Component {\n\n  child = (function () {\n    let oChild = { console: null, count: 0 };\n\n    let createFireClient = function (clientOChild, wsUrl) {\n      let connected = false;\n      let ws;\n      try {\n        ws = new WebSocket(wsUrl);\n      } catch (e) {\n        ws = {};\n        clientOChild.clientLog(\"connect failed.\");\n      }\n\n      ws.onopen = function open() {\n        connected = true;\n        clientOChild.clientLog(\"connected.\");\n      };\n\n      ws.onmessage = function incoming(data) {\n        let message = data.data;\n        clientOChild.log(message);\n      };\n\n      ws.onclose = function outline() {\n        if (connected) {\n          clientOChild.clientLog(\"connection closed.\");\n        } else {\n          clientOChild.clientLog(\"connect failed.\");\n        }\n      };\n\n      ws.trySend = function (message) {\n        if (connected) {\n          ws.send(message);\n        } else {\n          clientOChild.clientLog(\"connection lost.\");\n        }\n      };\n      return ws;\n    };\n\n    oChild.setCon = function (con) {\n      oChild.console = con;\n      let location = window.location;\n      let localWs = 'ws://' + location.hostname + (location.port ? ':' + location.port : '') + '/ws';\n      oChild.console.state.promptText = \"connect \" + localWs;\n      oChild.console.acceptLine();\n      oChild.console.return();\n    };\n\n    oChild.enterLine = function () {\n      if (oChild.console) {\n        oChild.count = oChild.count + 1;\n        oChild.console.return();\n      }\n    };\n\n    oChild.handleMessage = function (message) {\n      // system control message.\n      if (message.startsWith(\"connect \")) {\n        let splitStr = message.split(\" \");\n        if (splitStr.length !== 2) {\n          oChild.clientLog(\"connect command not match! Should be 'connect WsUrl'\");\n        } else {\n          let wsUrl = splitStr[1];\n          oChild.fireClient = createFireClient(oChild, wsUrl);\n        }\n        // should always enter line.\n        oChild.enterLine();\n        return;\n      }\n\n      if (oChild.fireClient) {\n        oChild.fireClient.trySend(message);\n      } else {\n        oChild.clientLog(\"connection lost\");\n      }\n      oChild.enterLine();\n    };\n\n    oChild.log = function (text) {\n      if (oChild.console) {\n        oChild.console.log(text);\n        oChild.console.scrollToBottom();\n      }\n    };\n\n    oChild.clientLog = function (text) {\n      oChild.log('[client] ' + text);\n    };\n    return oChild;\n  })();\n\n  promptLabel = () => {\n    return this.child.count + '> ';\n  };\n\n  render() {\n    return (\n      \n         (this.child.setCon(ref))}\n          handler={this.child.handleMessage}\n          promptLabel={this.promptLabel}\n          welcomeMessage={'Welcome jugg, please login.'}\n          autofocus={true}\n        />\n      
\n );\n }\n}\n\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read http://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit http://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nReactDOM.render(, document.getElementById('root'));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: http://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""}



© 2015 - 2024 Weber Informatics LLC | Privacy Policy