From d0137a862b7a7d5ff835ea659ca7e906203d35ec Mon Sep 17 00:00:00 2001 From: GermanBluefox Date: Sun, 13 Feb 2022 12:47:35 +0100 Subject: [PATCH] chore: release v1.3.11 * (bluefox) Updated releaser --- README.md | 2 +- admin/asset-manifest.json | 6 ++--- admin/index_m.html | 2 +- ...8e32e0.chunk.js => main.3ab35ae4.chunk.js} | 4 +-- ...hunk.js.map => main.3ab35ae4.chunk.js.map} | 2 +- io-package.json | 26 +++++++++---------- package.json | 2 +- src/build/asset-manifest.json | 6 ++--- src/build/index.html | 2 +- ...8e32e0.chunk.js => main.3ab35ae4.chunk.js} | 4 +-- ...hunk.js.map => main.3ab35ae4.chunk.js.map} | 2 +- src/package.json | 2 +- 12 files changed, 30 insertions(+), 30 deletions(-) rename admin/static/js/{main.ef8e32e0.chunk.js => main.3ab35ae4.chunk.js} (99%) rename admin/static/js/{main.ef8e32e0.chunk.js.map => main.3ab35ae4.chunk.js.map} (99%) rename src/build/static/js/{main.ef8e32e0.chunk.js => main.3ab35ae4.chunk.js} (99%) rename src/build/static/js/{main.ef8e32e0.chunk.js.map => main.3ab35ae4.chunk.js.map} (99%) diff --git a/README.md b/README.md index 7f95604..2b73738 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ More description could be found [here](https://github.com/ioBroker/ioBroker.s7/b --> ## Changelog -### __WORK IN PROGRESS__ +### 1.3.11 (2022-02-13) * (bluefox) Updated releaser ### 1.3.10 (2021-11-13) diff --git a/admin/asset-manifest.json b/admin/asset-manifest.json index 6d9d425..8afe08c 100644 --- a/admin/asset-manifest.json +++ b/admin/asset-manifest.json @@ -1,8 +1,8 @@ { "files": { "main.css": "./static/css/main.c9480e85.chunk.css", - "main.js": "./static/js/main.ef8e32e0.chunk.js", - "main.js.map": "./static/js/main.ef8e32e0.chunk.js.map", + "main.js": "./static/js/main.3ab35ae4.chunk.js", + "main.js.map": "./static/js/main.3ab35ae4.chunk.js.map", "runtime-main.js": "./static/js/runtime-main.1532eaf1.js", "runtime-main.js.map": "./static/js/runtime-main.1532eaf1.js.map", "static/css/2.faf2f676.chunk.css": "./static/css/2.faf2f676.chunk.css", @@ -18,6 +18,6 @@ "static/css/2.faf2f676.chunk.css", "static/js/2.f425d7e3.chunk.js", "static/css/main.c9480e85.chunk.css", - "static/js/main.ef8e32e0.chunk.js" + "static/js/main.3ab35ae4.chunk.js" ] } \ No newline at end of file diff --git a/admin/index_m.html b/admin/index_m.html index 80bcd37..04f7e9c 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -1 +1 @@ -s7
\ No newline at end of file +s7
\ No newline at end of file diff --git a/admin/static/js/main.ef8e32e0.chunk.js b/admin/static/js/main.3ab35ae4.chunk.js similarity index 99% rename from admin/static/js/main.ef8e32e0.chunk.js rename to admin/static/js/main.3ab35ae4.chunk.js index 1544722..e219fd8 100644 --- a/admin/static/js/main.ef8e32e0.chunk.js +++ b/admin/static/js/main.3ab35ae4.chunk.js @@ -1,2 +1,2 @@ -(this["webpackJsonpmodebus-admin"]=this["webpackJsonpmodebus-admin"]||[]).push([[0],{316:function(e){e.exports=JSON.parse('[{"name":"ip","type":"text","title":"PLC IP Address"},{"name":"s7logo","type":"checkbox","title":"S7 LOGO!"},{"name":"rack","type":"text","title":"PLC Rack"},{"name":"slot","type":"text","title":"PLC Slot"},{"name":"localTSAP","type":"hex","title":"Local TSAP"},{"name":"remoteTSAP","type":"hex","title":"Remote TSAP"}]')},317:function(e){e.exports=JSON.parse('[{"name":"round","type":"number","title":"Round Real to"},{"name":"poll","type":"number","title":"Poll delay","dimension":"ms"},{"name":"recon","type":"number","title":"Reconnect time","dimension":"ms"},{"name":"pulsetime","type":"number","title":"Pulse time","dimension":"ms"},{"name":"timeFormat","type":"select","title":"S7 Time mode","options":[{"value":"","title":"Local time"},{"value":"utc","title":"UTC"},{"value":"summer","title":"Time offset (with day saving time)"},{"value":"offset","title":"Time offset (no day saving time)"}]},{"name":"timeOffset","type":"number","title":"Time offset","dimension":"minutes"}]')},321:function(e){e.exports=JSON.parse('[{"value":"","title":""},{"value":"value","title":"value"},{"value":"level","title":"level"},{"value":"state","title":"state"},{"value":"switch","title":"switch"},{"value":"value.temperature","title":"value.temperature"},{"value":"value.humidity","title":"value.humidity"},{"value":"value.brightness","title":"value.brightness"},{"value":"value.uv","title":"value.uv"},{"value":"value.pressure","title":"value.pressure"},{"value":"value.battery","title":"value.battery"},{"value":"value.valve","title":"value.valve"},{"value":"value.time","title":"value.time"},{"value":"value.interval","title":"value.interval"},{"value":"value.window","title":"value.window"},{"value":"button","title":"button"},{"value":"indicator","title":"indicator"},{"value":"level.dimmer","title":"level.dimmer"},{"value":"level.valve","title":"level.valve"},{"value":"level.blind","title":"level.blind"},{"value":"level.temperature","title":"level.temperature"},{"value":"level.interval","title":"level.interval"}]')},322:function(e){e.exports=JSON.parse('[{"value":"","title":""},{"value":"BOOL","title":"BOOL"},{"value":"BYTE","title":"BYTE"},{"value":"WORD","title":"WORD"},{"value":"DWORD","title":"DWORD"},{"value":"INT","title":"INT"},{"value":"DINT","title":"DINT"},{"value":"REAL","title":"REAL"},{"value":"S7STRING","title":"S7STRING"},{"value":"STRING","title":"STRING"},{"value":"ARRAY","title":"ARRAY"},{"value":"S5TIME","title":"S5TIME"},{"value":"S7TIME","title":"S7TIME"}]')},333:function(e){e.exports=JSON.parse('{"a":"1.3.10"}')},348:function(e,t,a){},415:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Local time","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Time offset (no day saving time)","Offset (with day saving time)":"Time offset (with day saving time)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Polling","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 Time mode","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Time offset","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Write access","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutes","poll":"poll","sec":"sec.","write as Pulse":"write as Pulse","Drag \'n\' drop file here, or click to select file":"Drag \'n\' drop file here, or click to select file","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Change all","Delete all":"Delete all","Edit as TSV (Tab separated values)":"Edit as TSV (Tab separated values)","Add line":"Add line","Delete":"Delete","Are you sure to delete item with address \\"%s\\"?":"Are you sure to delete item with address \\"%s\\"?","Don\'t show this message in 5 minutes":"Don\'t show this message in 5 minutes","Cancel":"Cancel","Delete all items":"Delete all items","Are you sure to delete all items?":"Are you sure to delete all items?","Edit mode":"Edit mode","Toggle extended mode":"Toggle extended mode","Edit data as TSV":"Edit data as TSV","You can copy, paste and edit data as TSV.":"You can copy, paste and edit data as TSV.","Copy to clipboard":"Copy to clipboard","Nothing":"Nothing","Delete item":"Delete item","Load symbols":"Load symbols","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack and slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV was copied to clipboard"}')},416:function(e){e.exports=JSON.parse('{"Add DB":"DB hinzuf\xfcgen","Address":"Adresse","All entries will be deleted. Are you sure?":"Alle Eintr\xe4ge werden gel\xf6scht. Sind sie sicher?","Close":"Zumachen","Delete all entries":"Alle Eintr\xe4ge l\xf6schen","Description":"Beschreibung","Enable polling of data point":"Zyklische Abfrage vom Datenpunkt","Export":"Export","Export to CSV":"Export in CSV","General":"Allgemein","Import":"Import","Import DB file":"DB-Datei importieren","Import from CSV":"Import aus CSV","Import symbols file":"Symboldatei Importieren","Inputs":"Eing\xe4nge","Length":"L\xe4nge","Load Symbols":"Lade Symbole","Local TSAP":"Local TSAP","Local time":"Ortszeit","Marker":"Merker","Name":"Name","Offset (no day saving time)":"Zeit-Offset (ohne Sommerzeit)","Offset (with day saving time)":"Zeit-Offset (mit Sommerzeit)","Outputs":"Ausg\xe4nge","PLC Connection":"SPS Verbindung","PLC IP Address":"SPS IP Adresse","PLC Rack":"SPS Rack","PLC Slot":"SPS Slot","Poll delay":"Poll delay","Polling":"Abfrage","Pulse time":"Pulsetime","RW":"RW","Reconnect time":"Reconnectzeit","Remote TSAP":"Remote TSAP","Role":"Rolle","Room":"Raum","Round Real to":"Aufrunden Real auf","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7-Zeitmodus","Text copied to clipboard. Click to close the window":"Text wurde in der Zwischenablage kopiert. Klick um Fenster zu zumachen.","Time offset":"Zeitverschiebung","Toggle RW":"RW umschalten","Toggle WP":"WP umschalten","Toggle poll":"Poll umschalten","Type":"Typ","UTC":"UTC","Unit":"Einheit","WP":"WP","Write access":"Schreibzugriff","Write access allowed":"Schreiben erlaubt","Write pulses (true=>false edge)":"Schreibe Pulse (Ja=>Nein Kante)","minutes":"Minuten","poll":"poll","sec":"Sek.","write as Pulse":"schreibe als Impuls","Drag \'n\' drop file here, or click to select file":"Die Datei hierher ziehen , oder klicken, um die Datei auszuw\xe4hlen","DBs":"DBs","ms":"ms","Poll":"Abfrage","Change all":"\xc4ndere Alles","Delete all":"Alles l\xf6schen","Edit as TSV (Tab separated values)":"Als TSV bearbeiten (Tabulatorgetrennte Werte)","Add line":"Zeile hinzuf\xfcgen","Delete":"L\xf6schen","Are you sure to delete item with address \\"%s\\"?":"M\xf6chten Sie den Artikel mit der Adresse \\"%s\\" wirklich l\xf6schen?","Don\'t show this message in 5 minutes":"Diese Nachricht nicht in 5\xa0Minuten anzeigen","Cancel":"Abbrechen","Delete all items":"Alle Elemente l\xf6schen","Are you sure to delete all items?":"M\xf6chten Sie wirklich alle Elemente l\xf6schen?","Edit mode":"Bearbeitungsmodus","Toggle extended mode":"Erweiterten Modus umschalten","Edit data as TSV":"Daten als TSV bearbeiten","You can copy, paste and edit data as TSV.":"Sie k\xf6nnen Daten als TSV kopieren, einf\xfcgen und bearbeiten.","Copy to clipboard":"In die Zwischenablage kopieren","Nothing":"Keins","Delete item":"Item l\xf6schen","Load symbols":"Symbole laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Verbindungstyp: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack und Steckplatz: [Rack * 0x20 + Steckplatz]","TSV was copied to clipboard":"TSV wurde in die Zwischenablage kopiert"}')},417:function(e){e.exports=JSON.parse('{"Add DB":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c DB","Address":"\u0410\u0434\u0440\u0435\u0441","All entries will be deleted. Are you sure?":"\u0412\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u044b. \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b?","Close":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c","Delete all entries":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Description":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","Enable polling of data point":"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u043e\u043f\u0440\u043e\u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0446\u0438\u043a\u043b\u0435","Export":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442","Export to CSV":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432 CSV","General":"\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435","Import":"\u0418\u043f\u043c\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c","Import DB file":"\u0418\u043f\u043c\u043e\u0440\u0442 DB \u0444\u0430\u0439\u043b\u043e\u0432","Import from CSV":"\u0418\u043c\u043f\u043e\u0440\u0442 \u0438\u0437 CSV","Import symbols file":"\u0418\u043f\u043c\u043e\u0440\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432","Inputs":"\u0412\u0445\u043e\u0434\u044b","Length":"Length","Load Symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Local TSAP":"Local TSAP","Local time":"\u041c\u0435\u0441\u0442\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f","Marker":"\u041c\u0430\u0440\u043a\u0435\u0440\u044b","Name":"\u0418\u043c\u044f","Offset (no day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0431\u0435\u0437 \u043b\u0435\u0442\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438)","Offset (with day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0441 \u043b\u0435\u0442\u043d\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c)","Outputs":"\u0412\u044b\u0445\u043e\u0434\u044b","PLC Connection":"PLC \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435","PLC IP Address":"PLC IP \u0430\u0434\u0440\u0435\u0441","PLC Rack":"PLC Rack","PLC Slot":"PLC \u0441\u043b\u043e\u0442","Poll delay":"\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043e\u043f\u0440\u043e\u0441\u0430","Polling":"\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"\u0420\u043e\u043b\u044c","Room":"\u041a\u043e\u043c\u043d\u0430\u0442\u0430","Round Real to":"\u041e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c real \u0434\u043e","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 \u0420\u0435\u0436\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Text copied to clipboard. Click to close the window":"\u0422\u0435\u043a\u0441\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430. \u0429\u0435\u043b\u043a\u043d\u0438\u0442\u0435 \u043c\u044b\u0448\u043a\u043e\u0439 \u0437\u0434\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e","Time offset":"\u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Toggle RW":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c RW","Toggle WP":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c WP","Toggle poll":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c poll","Type":"\u0422\u0438\u043f","UTC":"UTC","Unit":"\u0415\u0434\u0438\u043d\u0438\u0446\u044b","WP":"WP","Write access":"\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0437\u0430\u043f\u0438\u0441\u0438","Write access allowed":"\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e","Write pulses (true=>false edge)":"\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u044b (1 => 0)","minutes":"\u043c\u0438\u043d\u0443\u0442\u044b","poll":"poll","sec":"\u0441\u0435\u043a.","write as Pulse":"\u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u0430\u043a Pulse","Drag \'n\' drop file here, or click to select file":"\u041f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0441\u044e\u0434\u0430 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0444\u0430\u0439\u043b","DBs":"DBs","ms":"ms","Poll":"\u041e\u043f\u0440\u043e\u0441","Change all":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435","Delete all":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435","Edit as TSV (Tab separated values)":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a TSV (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0435\u0439)","Add line":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443","Delete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","Are you sure to delete item with address \\"%s\\"?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u0440 \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c \\"%s\\"?","Don\'t show this message in 5 minutes":"\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 5 \u043c\u0438\u043d\u0443\u0442","Cancel":"\u041e\u0442\u043c\u0435\u043d\u0430","Delete all items":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Are you sure to delete all items?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b?","Edit mode":"\u0420\u0435\u0436\u0438\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f","Toggle extended mode":"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c","Edit data as TSV":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV","You can copy, paste and edit data as TSV.":"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV.","Copy to clipboard":"\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430","Nothing":"\u041d\u0438\u0447\u0435\u0433\u043e","Delete item":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0443\u043d\u043a\u0442","Load symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u0422\u0438\u043f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u0421\u0442\u043e\u0439\u043a\u0430 \u0438 \u0441\u043b\u043e\u0442: [\u0421\u0442\u043e\u0439\u043a\u0430 * 0x20 + \u0441\u043b\u043e\u0442]","TSV was copied to clipboard":"TSV \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430"}')},418:function(e){e.exports=JSON.parse('{"Add DB":"Adicionar DB","Address":"Endere\xe7o","All entries will be deleted. Are you sure?":"Todas as entradas ser\xe3o exclu\xeddas. Voc\xea tem certeza?","Close":"Fechar","Delete all entries":"Eliminar todas as entradas","Description":"Descri\xe7\xe3o","Enable polling of data point":"Habilitar a vota\xe7\xe3o do ponto de dados","Export":"Exportar","Export to CSV":"Exportar para CSV","General":"Geral","Import":"Importar","Import DB file":"Importar arquivo DB","Import from CSV":"Importa\xe7\xe3o de CSV","Import symbols file":"Arquivo de s\xedmbolos de importa\xe7\xe3o","Inputs":"Entradas","Length":"comprimento","Load Symbols":"Carregar s\xedmbolos","Local TSAP":"TSAP local","Local time":"Hor\xe1rio local","Marker":"Marcador","Name":"Nome","Offset (no day saving time)":"Deslocamento (sem hor\xe1rio)","Offset (with day saving time)":"Offset (com tempo de economia de hora)","Outputs":"Sa\xeddas","PLC Connection":"Conex\xe3o do PLC","PLC IP Address":"Endere\xe7o IP do PLC","PLC Rack":"PLC Rack","PLC Slot":"Slot PLC","Poll delay":"Retardo de enquete","Polling":"Polling","Pulse time":"Tempo de pulso","RW":"RW","Reconnect time":"Reconectar o tempo","Remote TSAP":"TSAP remoto","Role":"Fun\xe7\xe3o","Room":"Quarto","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO !","S7 Time mode":"Modo de tempo S7","Text copied to clipboard. Click to close the window":"Texto copiado para a \xe1rea de transfer\xeancia. Clique para fechar a janela","Time offset":"Deslocamento de tempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Alternar pesquisa","Type":"Tipo","UTC":"UTC","Unit":"Unidade","WP":"WP","Write access":"Acesso de grava\xe7\xe3o","Write access allowed":"Acesso de acesso permitido","Write pulses (true=>false edge)":"Escrever pulsos (true => false edge)","minutes":"minutos","poll":"vota\xe7\xe3o","sec":"seg.","write as Pulse":"escreva como pulso","Drag \'n\' drop file here, or click to select file":"Arraste e solte o arquivo aqui ou clique para selecionar o arquivo","DBs":"DBs","ms":"ms","Poll":"Enquete","Change all":"Mude tudo","Delete all":"Apagar tudo","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabula\xe7\xe3o)","Add line":"Adicionar linha","Delete":"Excluir","Are you sure to delete item with address \\"%s\\"?":"Tem certeza de que deseja excluir o item com o endere\xe7o \\"%s\\"?","Don\'t show this message in 5 minutes":"N\xe3o mostre esta mensagem em 5 minutos","Cancel":"Cancelar","Delete all items":"Apagar todos os itens","Are you sure to delete all items?":"Tem certeza de que deseja excluir todos os itens?","Edit mode":"Modo de edi\xe7\xe3o","Toggle extended mode":"Alternar modo estendido","Edit data as TSV":"Editar dados como TSV","You can copy, paste and edit data as TSV.":"Voc\xea pode copiar, colar e editar dados como TSV.","Copy to clipboard":"Copiar para \xe1rea de transfer\xeancia","Nothing":"Nada","Delete item":"Apagar item","Load symbols":"S\xedmbolos de carga","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conex\xe3o: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 B\xe1sico","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV foi copiado para a \xe1rea de transfer\xeancia"}')},419:function(e){e.exports=JSON.parse('{"Add DB":"Voeg DB toe","Address":"Adres","All entries will be deleted. Are you sure?":"Alle inzendingen worden verwijderd. Weet je het zeker?","Close":"Dichtbij","Delete all entries":"Verwijder alle vermeldingen","Description":"Beschrijving","Enable polling of data point":"Polling van gegevenspunt inschakelen","Export":"Exporteren","Export to CSV":"Exporteren naar CSV","General":"Algemeen","Import":"Importeren","Import DB file":"DB-bestand importeren","Import from CSV":"Importeren vanuit CSV","Import symbols file":"Symboolbestand importeren","Inputs":"ingangen","Length":"Lengte","Load Symbols":"Laad symbolen","Local TSAP":"Lokale TSAP","Local time":"Lokale tijd","Marker":"Markeerstift","Name":"Naam","Offset (no day saving time)":"Offset (geen dagbesparende tijd)","Offset (with day saving time)":"Offset (met dagbesparende tijd)","Outputs":"uitgangen","PLC Connection":"PLC-verbinding","PLC IP Address":"PLC IP-adres","PLC Rack":"PLC Rack","PLC Slot":"PLC-slot","Poll delay":"Poll vertraging","Polling":"stemming","Pulse time":"Pulstijd","RW":"RW","Reconnect time":"Reconnect tijd","Remote TSAP":"TSAP op afstand","Role":"Rol","Room":"Kamer","Round Real to":"Rond echt naar","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tijdmodus","Text copied to clipboard. Click to close the window":"Tekst gekopieerd naar klembord. Klik om het venster te sluiten","Time offset":"Tijd offset","Toggle RW":"RW omschakelen","Toggle WP":"Wissel WP","Toggle poll":"Poll wisselen","Type":"Type","UTC":"UTC","Unit":"Eenheid","WP":"WP","Write access":"Schrijf toegang","Write access allowed":"Schrijftoegang toegestaan","Write pulses (true=>false edge)":"Schrijf pulsen (true => false edge)","minutes":"minuut","poll":"poll","sec":"seconde","write as Pulse":"schrijf als Pulse","Drag \'n\' drop file here, or click to select file":"Sleep het bestand hierheen, of klik om het bestand te selecteren","DBs":"DBs","ms":"ms","Poll":"Opiniepeiling","Change all":"Verander alles","Delete all":"Verwijder alles","Edit as TSV (Tab separated values)":"Bewerken als TSV (door tabs gescheiden waarden)","Add line":"Lijn toevoegen","Delete":"Verwijderen","Are you sure to delete item with address \\"%s\\"?":"Weet u zeker dat u het item met adres \\"%s\\" wilt verwijderen?","Don\'t show this message in 5 minutes":"Dit bericht niet binnen 5 minuten weergeven","Cancel":"annuleren","Delete all items":"Alle items verwijderen","Are you sure to delete all items?":"Weet je zeker dat je alle items wilt verwijderen?","Edit mode":"Bewerkingsmodus","Toggle extended mode":"Schakel uitgebreide modus in","Edit data as TSV":"Gegevens bewerken als TSV","You can copy, paste and edit data as TSV.":"U kunt gegevens kopi\xebren, plakken en bewerken als TSV.","Copy to clipboard":"Kopieer naar klembord","Nothing":"Niets","Delete item":"Verwijder item","Load symbols":"Symbolen laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Aansluittype: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rek en sleuf: [Rack * 0x20 + sleuf]","TSV was copied to clipboard":"TSV is gekopieerd naar het klembord"}')},420:function(e){e.exports=JSON.parse('{"Add DB":"Ajouter une DB","Address":"Adresse","All entries will be deleted. Are you sure?":"Toutes les entr\xe9es seront supprim\xe9es. \xcates-vous s\xfbr?","Close":"Fermer","Delete all entries":"Supprimer toutes les entr\xe9es","Description":"La description","Enable polling of data point":"Activer l\'interrogation du point de donn\xe9es","Export":"Exportation","Export to CSV":"Exporter au format CSV","General":"G\xe9n\xe9ral","Import":"Importer","Import DB file":"Importer un fichier DB","Import from CSV":"Importer \xe0 partir du fichier CSV","Import symbols file":"Importer un fichier de symboles","Inputs":"Contributions","Length":"Longueur","Load Symbols":"Charger des symboles","Local TSAP":"TSAP local","Local time":"Heure locale","Marker":"Marqueur","Name":"pr\xe9nom","Offset (no day saving time)":"D\xe9calage (pas de temps pour gagner du temps)","Offset (with day saving time)":"D\xe9calage (avec un gain de temps de jour)","Outputs":"Les sorties","PLC Connection":"Connexion PLC","PLC IP Address":"Adresse IP de l\'API","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"D\xe9lai d\'interrogation","Polling":"Vote","Pulse time":"Temps d\'impulsion","RW":"RW","Reconnect time":"Reconnectez le temps","Remote TSAP":"TSAP distant","Role":"R\xf4le","Room":"Chambre","Round Real to":"Rond r\xe9el \xe0","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Mode heure","Text copied to clipboard. Click to close the window":"Texte copi\xe9 dans le presse-papier Cliquez pour fermer la fen\xeatre","Time offset":"D\xe9calage temporel","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Basculer le sondage","Type":"Type","UTC":"UTC","Unit":"Unit\xe9","WP":"WP","Write access":"Acc\xe8s en \xe9criture","Write access allowed":"Acc\xe8s en \xe9criture autoris\xe9","Write pulses (true=>false edge)":"\xc9crire des impulsions (true => false edge)","minutes":"minutes","poll":"sondage","sec":"seconde.","write as Pulse":"\xe9crire comme Pulse","Drag \'n\' drop file here, or click to select file":"Glissez-d\xe9posez le fichier ici, ou cliquez pour s\xe9lectionner le fichier","DBs":"DBs","ms":"ms","Poll":"Sondage","Change all":"Change tout","Delete all":"Tout supprimer","Edit as TSV (Tab separated values)":"Modifier en tant que TSV (valeurs s\xe9par\xe9es par des tabulations)","Add line":"Ajouter une ligne","Delete":"Effacer","Are you sure to delete item with address \\"%s\\"?":"\xcates-vous s\xfbr de supprimer l\'\xe9l\xe9ment avec l\'adresse \xab\xa0%s\xa0\xbb\xa0?","Don\'t show this message in 5 minutes":"Ne pas afficher ce message dans 5 minutes","Cancel":"Annuler","Delete all items":"Supprimer tous les \xe9l\xe9ments","Are you sure to delete all items?":"\xcates-vous s\xfbr de supprimer tous les \xe9l\xe9ments\xa0?","Edit mode":"Mode \xe9dition","Toggle extended mode":"Basculer en mode \xe9tendu","Edit data as TSV":"Modifier les donn\xe9es en tant que TSV","You can copy, paste and edit data as TSV.":"Vous pouvez copier, coller et modifier des donn\xe9es au format TSV.","Copy to clipboard":"Copier dans le presse-papier","Nothing":"Rien","Delete item":"Effacer l\'article","Load symbols":"Charger des symboles","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Type de connexion : 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack et slot : [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV a \xe9t\xe9 copi\xe9 dans le presse-papiers"}')},421:function(e){e.exports=JSON.parse('{"Add DB":"Aggiungi DB","Address":"Indirizzo","All entries will be deleted. Are you sure?":"Tutte le voci saranno cancellate. Sei sicuro?","Close":"Vicino","Delete all entries":"Elimina tutte le voci","Description":"Descrizione","Enable polling of data point":"Abilita il polling del punto dati","Export":"Esportare","Export to CSV":"Esporta in CSV","General":"Generale","Import":"Importare","Import DB file":"Importa file DB","Import from CSV":"Importa da CSV","Import symbols file":"Importa file simboli","Inputs":"ingressi","Length":"Lunghezza","Load Symbols":"Carica simboli","Local TSAP":"TSAP locale","Local time":"Ora locale","Marker":"marcatore","Name":"Nome","Offset (no day saving time)":"Offset (nessun giorno risparmiando tempo)","Offset (with day saving time)":"Offset (con ora del giorno)","Outputs":"Uscite","PLC Connection":"Connessione PLC","PLC IP Address":"Indirizzo IP del PLC","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"Ritardo del sondaggio","Polling":"votazione","Pulse time":"Tempo di impulso","RW":"RW","Reconnect time":"Tempo di riconnessione","Remote TSAP":"TSAP remoto","Role":"Ruolo","Room":"Camera","Round Real to":"Round reale a","S7 LOGO!":"LOGO S7 !","S7 Time mode":"Modalit\xe0 ora S7","Text copied to clipboard. Click to close the window":"Testo copiato negli appunti. Clicca per chiudere la finestra","Time offset":"Differenza di fuso orario","Toggle RW":"Attiva / disattiva RW","Toggle WP":"Attiva / disattiva WP","Toggle poll":"Attiva / disattiva sondaggio","Type":"genere","UTC":"UTC","Unit":"Unit\xe0","WP":"WP","Write access":"Accesso in scrittura","Write access allowed":"Accesso in scrittura consentito","Write pulses (true=>false edge)":"Scrivi impulsi (true => falso bordo)","minutes":"minuti","poll":"sondaggio","sec":"sec.","write as Pulse":"scrivi come Pulse","Drag \'n\' drop file here, or click to select file":"Trascina e rilascia il file qui o fai clic per selezionare il file","DBs":"DBs","ms":"ms","Poll":"Sondaggio","Change all":"Cambia tutto","Delete all":"Cancella tutto","Edit as TSV (Tab separated values)":"Modifica come TSV (valori separati da tabulazioni)","Add line":"Aggiungi riga","Delete":"Elimina","Are you sure to delete item with address \\"%s\\"?":"Sei sicuro di eliminare l\'elemento con l\'indirizzo \\"%s\\"?","Don\'t show this message in 5 minutes":"Non mostrare questo messaggio in 5 minuti","Cancel":"Annulla","Delete all items":"Elimina tutti gli elementi","Are you sure to delete all items?":"Sei sicuro di eliminare tutti gli elementi?","Edit mode":"Modalit\xe0 Modifica","Toggle extended mode":"Attiva/disattiva modalit\xe0 estesa","Edit data as TSV":"Modifica dati come TSV","You can copy, paste and edit data as TSV.":"Puoi copiare, incollare e modificare i dati come TSV.","Copy to clipboard":"Copia negli appunti","Nothing":"Niente","Delete item":"Cancellare l\'oggetto","Load symbols":"Simboli di carico","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo di collegamento: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV \xe8 stato copiato negli appunti"}')},422:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Hora local","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Desplazamiento (sin horario de guardado)","Offset (with day saving time)":"Desplazamiento (con horario de ahorro de d\xeda)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Votaci\xf3n","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"Modo de tiempo S7","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Desplazamiento de tiempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Acceso de escritura","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutos","poll":"poll","sec":"sec.","write as Pulse":"escribe como Pulso","Drag \'n\' drop file here, or click to select file":"Arrastre y suelte el archivo aqu\xed o haga clic para seleccionar el archivo","DBs":"DBs","ms":"ms","Poll":"Encuesta","Change all":"Cambia todo","Delete all":"Eliminar todos","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabulaciones)","Add line":"A\xf1adir l\xednea","Delete":"Borrar","Are you sure to delete item with address \\"%s\\"?":"\xbfEst\xe1 seguro de eliminar el elemento con la direcci\xf3n \\"%s\\"?","Don\'t show this message in 5 minutes":"No muestre este mensaje en 5 minutos","Cancel":"Cancelar","Delete all items":"Eliminar todos los elementos","Are you sure to delete all items?":"\xbfEst\xe1 seguro de eliminar todos los elementos?","Edit mode":"Modo de edici\xf3n","Toggle extended mode":"Alternar modo extendido","Edit data as TSV":"Editar datos como TSV","You can copy, paste and edit data as TSV.":"Puede copiar, pegar y editar datos como TSV.","Copy to clipboard":"Copiar al portapapeles","Nothing":"Nada","Delete item":"Eliminar elemento","Load symbols":"Cargar s\xedmbolos","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conexi\xf3n: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack y ranura: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV se copi\xf3 al portapapeles"}')},423:function(e){e.exports=JSON.parse('{"Add DB":"Dodaj DB","Address":"Adres","All entries will be deleted. Are you sure?":"Wszystkie wpisy zostan\u0105 usuni\u0119te. Jeste\u015b pewny?","Close":"Blisko","Delete all entries":"Usu\u0144 wszystkie wpisy","Description":"Opis","Enable polling of data point":"W\u0142\u0105cz odpytywanie punktu danych","Export":"Eksport","Export to CSV":"Eksportuj do pliku CSV","General":"Genera\u0142","Import":"Import","Import DB file":"Importuj plik DB","Import from CSV":"Importuj z CSV","Import symbols file":"Importuj plik symboli","Inputs":"Wej\u015bcia","Length":"D\u0142ugo\u015b\u0107","Load Symbols":"Za\u0142aduj symbole","Local TSAP":"Lokalny TSAP","Local time":"Czas lokalny","Marker":"Znacznik","Name":"Nazwa","Offset (no day saving time)":"Przesuni\u0119cie (brak czasu na dzie\u0144)","Offset (with day saving time)":"Przesuni\u0119cie (z czasem oszcz\u0119dzania dziennego)","Outputs":"Wyj\u015bcia","PLC Connection":"Po\u0142\u0105czenie PLC","PLC IP Address":"Adres IP sterownika PLC","PLC Rack":"Rack PLC","PLC Slot":"Gniazdo PLC","Poll delay":"Op\xf3\u017anienie ankiety","Polling":"Ankieta","Pulse time":"Czas impulsu","RW":"RW","Reconnect time":"Czas ponownego po\u0142\u0105czenia","Remote TSAP":"Zdalny TSAP","Role":"Rola","Room":"Pok\xf3j","Round Real to":"Runda prawdziwa do","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tryb czasu","Text copied to clipboard. Click to close the window":"Tekst skopiowany do schowka. Kliknij, aby zamkn\u0105\u0107 okno","Time offset":"Przesuni\u0119cie czasu","Toggle RW":"Prze\u0142\u0105cz RW","Toggle WP":"Prze\u0142\u0105cz WP","Toggle poll":"Prze\u0142\u0105cz ankiet\u0119","Type":"Rodzaj","UTC":"UTC","Unit":"Jednostka","WP":"WP","Write access":"Dost\u0119p do zapisu","Write access allowed":"Dost\u0119p do zapisu dozwolony","Write pulses (true=>false edge)":"Pisz impulsy (true => false edge)","minutes":"minuty","poll":"g\u0142osowanie","sec":"sec.","write as Pulse":"napisz jako Pulse","Drag \'n\' drop file here, or click to select file":"Przeci\u0105gnij i upu\u015b\u0107 plik tutaj lub kliknij, aby wybra\u0107 plik","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Zmieni\u0107 wszystko","Delete all":"Usu\u0144 wszystko","Edit as TSV (Tab separated values)":"Edytuj jako TSV (warto\u015bci rozdzielone tabulatorami)","Add line":"Dodaj lini\u0119","Delete":"Kasowa\u0107","Are you sure to delete item with address \\"%s\\"?":"Czy na pewno chcesz usun\u0105\u0107 element o adresie \u201e%s\u201d?","Don\'t show this message in 5 minutes":"Nie pokazuj tej wiadomo\u015bci za 5 minut","Cancel":"Anuluj","Delete all items":"Usu\u0144 wszystkie elementy","Are you sure to delete all items?":"Czy na pewno chcesz usun\u0105\u0107 wszystkie elementy?","Edit mode":"Tryb edycji","Toggle extended mode":"Prze\u0142\u0105cz tryb rozszerzony","Edit data as TSV":"Edytuj dane jako TSV","You can copy, paste and edit data as TSV.":"Mo\u017cesz kopiowa\u0107, wkleja\u0107 i edytowa\u0107 dane jako TSV.","Copy to clipboard":"Skopiuj do schowka","Nothing":"Nic","Delete item":"Usu\u0144 przedmiot","Load symbols":"Za\u0142aduj symbole","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Typ po\u0142\u0105czenia: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Szafa i gniazdo: [Stela\u017c * 0x20 + Slot]","TSV was copied to clipboard":"TSV zosta\u0142 skopiowany do schowka"}')},424:function(e){e.exports=JSON.parse('{"Add DB":"\u6dfb\u52a0\u6570\u636e\u5e93","Address":"\u5730\u5740","All entries will be deleted. Are you sure?":"\u6240\u6709\u6761\u76ee\u5c06\u88ab\u5220\u9664\u3002","Close":"\u5173\u95ed","Delete all entries":"\u5220\u9664\u6240\u6709\u6761\u76ee","Description":"\u63cf\u8ff0","Enable polling of data point":"\u542f\u7528\u6570\u636e\u70b9\u8f6e\u8be2","Export":"\u51fa\u53e3","Export to CSV":"\u5bfc\u51fa\u4e3aCSV","General":"\u4e00\u822c\u7684","Import":"\u8fdb\u53e3","Import DB file":"\u5bfc\u5165\u6570\u636e\u5e93\u6587\u4ef6\uff1a","Import from CSV":"\u4eceCSV\u5bfc\u5165","Import symbols file":"\u5bfc\u5165\u7b26\u53f7\u6587\u4ef6\uff1a","Inputs":"\u8f93\u5165\u9879","Length":"\u957f\u5ea6","Load Symbols":"\u52a0\u8f7d\u7b26\u53f7","Local TSAP":"\u672c\u5730TSAP\uff1a","Local time":"\u5f53\u5730\u65f6\u95f4","Marker":"\u8bb0\u53f7\u7b14","Name":"\u540d\u79f0","Offset (no day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u65e0\u590f\u4ee4\u65f6\uff09","Offset (with day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u5e26\u590f\u65f6\u5236\uff09","Outputs":"\u4ea7\u51fa","PLC Connection":"PLC\u8fde\u63a5\uff1a","PLC IP Address":"PLC IP\u5730\u5740\uff1a","PLC Rack":"PLC\u673a\u67b6\uff1a","PLC Slot":"PLC\u63d2\u69fd\uff1a","Poll delay":"\u8f6e\u8be2\u5ef6\u8fdf\uff1a","Polling":"\u8f6e\u8be2","Pulse time":"\u8109\u51b2\u65f6\u95f4\uff1a","RW":"\u8bfb\u5199\u5668","Reconnect time":"\u91cd\u65b0\u8fde\u63a5\u65f6\u95f4\uff1a","Remote TSAP":"\u8fdc\u7a0bTSAP\uff1a","Role":"\u89d2\u8272","Room":"\u623f\u95f4","Round Real to":"\u820d\u5165\u4e3a\uff1a","S7 LOGO!":"S7 LOGO !\uff1a","S7 Time mode":"S7\u65f6\u95f4\u6a21\u5f0f","Text copied to clipboard. Click to close the window":"\u6587\u672c\u5df2\u590d\u5236\u5230\u526a\u8d34\u677f\u3002","Time offset":"\u65f6\u95f4\u504f\u79fb\uff1a","Toggle RW":"\u5207\u6362RW","Toggle WP":"\u5207\u6362WP","Toggle poll":"\u5207\u6362\u6c11\u610f\u8c03\u67e5","Type":"\u7c7b\u578b","UTC":"\u4e16\u754c\u6807\u51c6\u65f6\u95f4","Unit":"\u5355\u5143","WP":"\u53ef\u6e7f\u6027\u7c89\u5242","Write access":"\u5199\u8bbf\u95ee","Write access allowed":"\u5141\u8bb8\u5199\u8bbf\u95ee","Write pulses (true=>false edge)":"\u5199\u8109\u51b2\uff08\u771f=>\u5047\u8fb9\uff09","minutes":"\u5206\u949f","poll":"\u8f6e\u8be2","sec":"\u79d2","write as Pulse":"\u5199\u4e3a\u8109\u51b2","Drag \'n\' drop file here, or click to select file":"\u5c06\u201cn\u201d\u6587\u4ef6\u62d6\u5230\u6b64\u5904\uff0c\u6216\u5355\u51fb\u4ee5\u9009\u62e9\u6587\u4ef6","DBs":"DBs","ms":"ms","Poll":"\u8f6e\u8be2","Change all":"\u5168\u90e8\u66f4\u6539","Delete all":"\u5220\u9664\u6240\u6709","Edit as TSV (Tab separated values)":"\u7f16\u8f91\u4e3a TSV\uff08\u5236\u8868\u7b26\u5206\u9694\u503c\uff09","Add line":"\u6dfb\u52a0\u884c","Delete":"\u5220\u9664","Are you sure to delete item with address \\"%s\\"?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u5730\u5740\u4e3a\u201c%s\u201d\u7684\u9879\u76ee\u5417\uff1f","Don\'t show this message in 5 minutes":"5 \u5206\u949f\u5185\u4e0d\u8981\u663e\u793a\u6b64\u6d88\u606f","Cancel":"\u53d6\u6d88","Delete all items":"\u5220\u9664\u6240\u6709\u9879\u76ee","Are you sure to delete all items?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u6240\u6709\u9879\u76ee\u5417\uff1f","Edit mode":"\u7f16\u8f91\u6a21\u5f0f","Toggle extended mode":"\u5207\u6362\u6269\u5c55\u6a21\u5f0f","Edit data as TSV":"\u5c06\u6570\u636e\u7f16\u8f91\u4e3a TSV","You can copy, paste and edit data as TSV.":"\u60a8\u53ef\u4ee5\u5c06\u6570\u636e\u590d\u5236\u3001\u7c98\u8d34\u548c\u7f16\u8f91\u4e3a TSV\u3002","Copy to clipboard":"\u590d\u5236\u5230\u526a\u8d34\u677f","Nothing":"\u6ca1\u6709\u4ec0\u4e48","Delete item":"\u5220\u9664\u9879\u76ee","Load symbols":"\u52a0\u8f7d\u7b26\u53f7","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u8fde\u63a5\u7c7b\u578b\uff1a0x1 - PG\u30010x2 - OP\u30010x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u673a\u67b6\u548c\u63d2\u69fd\uff1a[\u673a\u67b6 * 0x20 + \u63d2\u69fd]","TSV was copied to clipboard":"TSV \u88ab\u590d\u5236\u5230\u526a\u8d34\u677f"}')},426:function(e,t,a){"use strict";a.r(t);var o=a(0),s=a(16),i=a.n(s),n=a(456),l=(a(348),a(68)),r=a(28),c=a(25),d=a(335),p=a(58),u=a(38),m=a(46),h=a(5),g=a(91),b=a(463),f=a(472),S=a(464),v=a(313),j=a.n(v),x=a(218),T=a.n(x),y=a(13),O=a.n(y),P=a(334),C=a(173),A=a(461),k=a(473),R=a(447),D=a(460),w=a(459),L=a(220),I=a(339),E=a(437),W=a(462),V=a(458),B=a(172),N=a(211),z=a(316),G=a(317),M=a(7),U=function(e){var t=Object(g.b)().enqueueSnackbar,a=Object(o.useCallback)((function(a){e.onChange(a),t(O.a.t("Data updated"))}),[]),s=Object(P.a)({onDrop:a,accept:e.accept}),i=s.getRootProps,n=s.getInputProps,r=s.isDragActive;return Object(M.jsxs)(L.a,{style:{padding:3,paddingRight:40},children:[Object(M.jsx)(C.a,{variant:"h6",gutterBottom:!0,children:O.a.t(e.label)}),Object(M.jsxs)("div",Object(l.a)(Object(l.a)({},i()),{},{className:e.classes.fileInput,style:r?{backgroundColor:"rgba(0, 255, 0, 0.1)"}:{cursor:"pointer"},children:[Object(M.jsx)("input",Object(l.a)({},n())),r?Object(M.jsx)("p",{children:O.a.t("Drop the file here ...")}):Object(M.jsx)("p",{children:O.a.t("Drag 'n' drop file here, or click to select file")})]}))]})},F=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).inputDisabled=function(e){return!1},o.inputDisplay=function(e){if(null===o.props.native.params.slot){if(["rack","slot"].includes(e.name))return!1}else if(["localTSAP","remoteTSAP"].includes(e.name))return!1;return"timeOffset"!==e.name||["summer","offset"].includes(o.props.native.params.timeFormat)},o.changeParam=function(e,t){var a=JSON.parse(JSON.stringify(o.props.native));"s7logo"===e?t?(a.params.localTSAP="",a.params.remoteTSAP="",a.params.rack=null,a.params.slot=null):(a.params.localTSAP=null,a.params.remoteTSAP=null,a.params.rack="",a.params.slot=""):a.params[e]=t,o.props.changeNative(a)},o.loadSymbols=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){var s={inputs:[],outputs:[],markers:[]},i=a.result;(i=i.split("126,")).forEach((function(e){var t=e.slice(23,29).replace(/( )/g,""),a={Name:e.slice(0,23).replace(/( ){2,}/g,""),Address:e.slice(29,36).replace(/( )/g,""),Type:e.slice(36,41).replace(/( )/g,""),Description:e.slice(46,126).replace(/( ){2,}/,""),Unit:"",poll:!0,RW:!1,WP:!1};"E"!==t&&"EB"!==t&&"EW"!==t&&"ED"!==t||s.inputs.push(a),"A"!==t&&"AB"!==t&&"AW"!==t&&"AD"!==t||s.outputs.push(a),"M"!==t&&"MB"!==t&&"MW"!==t&&"MD"!==t||s.markers.push(a)})),["inputs","outputs","markers"].forEach((function(e){t[e]=s[e]})),o.props.changeNative(t)},a.readAsText(e[0],"ISO-8859-1")},o.addDb=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){setTimeout((function(){var e=a.result,o={inputs:!1,outputs:!1,markers:!1,dbs:!1},s={inputs:t.inputs||[],outputs:t.outputs||[],markers:t.markers||[],dbs:t.dbs||[]};if(-1!==e.indexOf("Leseanforderung")){for(var i=e.replace(/\r\n/g,"\n").split("\n"),n={Name:{attr:"Name"},Typ:{attr:""},Operand:{attr:"Address",process:function(e){var t=(e=e.trim()).match(/^DB (\d+)/);if(!t){var a=e.match(/^MB? (\d+)\.?(\d+)?$/);return a?"M "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^AB? (\d+)\.?(\d+)?$/))?"OUT "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^EB? (\d+)\.?(\d+)?$/))?"IN "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):e}var o=e.match(/(\d+).?(\d+)?$/);return t&&o?"DB".concat(t[1]," ").concat(o[1]).concat(void 0!==o[2]?"."+o[2]:""):e}},"SPS-Format":{attr:"Type",process:function(e){return e}},Byteanzahl:{attr:"Length",process:function(e){return parseInt(e,10)}},Zugriff:{attr:"RW",process:function(e){return"read"!==e}},Leseanforderung:{attr:"poll",process:function(e){return"zyklisch"===e}},"AktZeit (ms)":{attr:""},Kommentar:{attr:"Description"},"Clients (Anzahl)":{attr:""}},l=i[0].split(","),r=[],c=0;c10){var t=e.split(/\s+/g);t.shift();for(var a={Address:b+" "+t.shift(),Name:t.shift(),Type:t.shift(),dec:t.shift(),Description:t.join(" "),Unit:"",Role:"",Room:"",poll:!0,RW:!1,WP:!1},i=0;iparseInt(o[1],10))return 1;if(parseInt(a[1],10)parseInt(i[1],10)?1:parseInt(s[1],10)parseInt(i[2],10)?1:parseInt(s[2],10)>8&255,s=255&t;return Object(M.jsxs)(V.a,{item:!0,className:a.props.classes.optionContainer,children:[Object(M.jsx)(E.a,{className:a.props.classes.optionsLabel,children:O.a.t(e.title)}),Object(M.jsx)(I.a,{title:O.a.t("Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic"),style:{width:"6ch"},value:o.toString(16)?o.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,parseInt(t.target.value,16)<<8|s)}}),Object(M.jsx)(I.a,{title:O.a.t("Rack and slot: [Rack * 0x20 + Slot]"),style:{marginLeft:5,width:"6ch"},value:s.toString(16)?s.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,o<<8|parseInt(t.target.value,16))}})]},e.name)}return Object(M.jsx)(V.a,{item:!0,className:a.props.classes.optionContainer,children:Object(M.jsx)(A.a,{type:e.type,label:O.a.t(e.title),className:a.props.classes.optionsTextField,disabled:a.inputDisabled(e),value:a.getValue(e.name),InputProps:{endAdornment:e.dimension?Object(M.jsx)(W.a,{position:"end",children:O.a.t(e.dimension)}):null},onChange:function(t){return a.changeParam(e.name,t.target.value)}})},e.name)}))})]})}},{key:"getImportsBlock",value:function(){return Object(M.jsx)(M.Fragment,{children:Object(M.jsxs)(B.a,{className:this.props.classes.optionsContainer,children:[Object(M.jsx)(C.a,{variant:"h4",gutterBottom:!0,className:this.props.classes.header,children:O.a.t("Import")}),Object(M.jsxs)(N.a,{className:this.props.classes.optionContainer,children:[Object(M.jsx)(U,{classes:this.props.classes,onChange:this.loadSymbols,label:"Load symbols",accept:".asc"}),Object(M.jsx)(U,{classes:this.props.classes,onChange:this.addDb,label:"Add DB",accept:".csv,.prn"})]})]})})}},{key:"render",value:function(){return Object(M.jsx)("form",{className:this.props.classes.tab,children:Object(M.jsxs)(V.a,{container:!0,spacing:2,children:[Object(M.jsxs)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:[this.getInputsBlock(z,"PLC Connection"),this.getImportsBlock()]}),Object(M.jsx)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:this.getInputsBlock(G,"General")})]})})}}]),a}(o.Component),q=Object(h.a)((function(e){return{optionsSelect:{width:280},optionsTextField:{width:280},optionContainer:{},optionsContainer:{width:"calc(100% - ".concat(e.spacing(4),"px)"),padding:e.spacing(2),marginBottom:20,display:"inline-block",textAlign:"left"},optionsGrid:{textAlign:"center",padding:e.spacing(2)},optionsLabel:{fontSize:12},header:{fontSize:24},fileInput:{textAlign:"center",display:"inline-block",height:80,width:200,border:"2px dashed #777",borderRadius:10,marginTop:12,padding:4}}}))(F),J=a(4),Y=a.n(J),$=a(321),Z=a(322),H=a(18),K=a(465),_=a(468),Q=a(466),X=a(469),ee=a(467),te=a(216),ae=a(475),oe=a(471),se=a(80),ie=a.n(se),ne=a(331),le=a.n(ne),re=a(332),ce=a.n(re),de=a(61),pe=a.n(de),ue=a(323),me=a.n(ue),he=a(324),ge=a.n(he),be=a(326),fe=a.n(be),Se=a(223),ve=a(328),je=a.n(ve),xe=a(329),Te=a.n(xe),ye=a(293),Oe=a(294),Pe=a(295),Ce=a(296),Ae=a(297),ke=a(292),Re=a(101),De=a.n(Re),we=a(219),Le=a.n(we),Ie=a(330),Ee=a.n(Ie),We=Object(h.a)((function(e){return{tsvEditor:{width:"100%",height:400},tsvEditorTextarea:{fontFamily:"monospace"}}}))((function(e){var t=Object(o.useState)(""),a=Object(H.a)(t,2),s=a[0],i=a[1];Object(o.useEffect)((function(){var t=[];t.push(e.fields.map((function(e){return e.name}))),e.data.forEach((function(a){return t.push(e.fields.map((function(e){return void 0!==a[e.name]&&null!==a[e.name]?a[e.name].toString():""})))})),i(Object(Se.json2tsv)(t))}),[e.open]);var n=Object(g.b)().enqueueSnackbar;if(!e.open)return null;return Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,maxWidth:"lg",fullWidth:!0,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Edit data as TSV")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("You can copy, paste and edit data as TSV.")}),Object(M.jsx)("div",{children:Object(M.jsx)(je.a,{onChange:function(e){return i(e)},height:"400px",showPrintMargin:!1,value:s,className:e.classes.tsvEditor,width:"100%",setOptions:{firstLineNumber:0},mode:null})})]}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"outlined",color:"primary",onClick:function(){Te()(s),n(O.a.t("TSV was copied to clipboard"))},startIcon:Object(M.jsx)(Ee.a,{}),children:O.a.t("Copy to clipboard")}),Object(M.jsx)(ke.a,{variant:"contained",color:"primary",onClick:function(){var t=Object(Se.tsv2json)(s.endsWith("\n")?s:s+"\n"),a=t.shift(),o=!0,i=[];for(var l in e.fields)e.fields[l].name!==a[l]&&(i.push(Object(M.jsxs)(M.Fragment,{children:["No field ",Object(M.jsx)("i",{children:e.fields[l].name})," in position ",Object(M.jsx)("i",{children:parseInt(l)+1}),"!"]})),o=!1);t=t.map((function(t,a){var s={};for(var n in e.fields)"select"!==e.fields[n].type||e.fields[n].options.map((function(e){return e.value})).includes(t[n])||(i.push(Object(M.jsxs)(M.Fragment,{children:["Value ",Object(M.jsx)("i",{children:t[n]})," is wrong for field ",Object(M.jsx)("i",{children:e.fields[n].name})," in position ",Object(M.jsx)("i",{children:parseInt(a)+1}),"!"]})),o=!1),"checkbox"===e.fields[n].type&&(t[n]="true"===t[n]),s[e.fields[n].name]=t[n];return s})),o?(e.save(t),e.onClose()):n(Object(M.jsx)("div",{children:i.map((function(e,t){return Object(M.jsx)("div",{children:e},t)}))}),{variant:"error"})},startIcon:Object(M.jsx)(Le.a,{}),children:O.a.t("Import")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Close")})]})]})})),Ve=function(e){return e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete all items")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("Are you sure to delete all items?")}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(),e.onClose()},children:O.a.t("Delete all items")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Be=function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1];return Object(o.useEffect)((function(){i(!1)}),[e.open]),e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete item")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t('Are you sure to delete item with address "%s"?',e.item._address)}),Object(M.jsx)(Ce.a,{children:Object(M.jsx)(w.a,{label:O.a.t("Don't show this message in 5 minutes"),control:Object(M.jsx)(k.a,{checked:s,onChange:function(e){return i(e.target.checked)}})})}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(s),e.onClose()},children:O.a.t("Delete")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Ne=function(e){var t,a=e.sortedItem,s=e.field,i=e.editMode,n=e.setEditMode,l=Object(o.useRef)(),r=a.item;if("checkbox"===s.type)t=Object(M.jsx)(oe.a,{title:O.a.t(s.title),children:Object(M.jsx)(k.a,{inputRef:l,className:e.classes.tableCheckbox,checked:!!r[s.name],disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.checked)}})});else if("rooms"===s.type)t=i?Object(M.jsx)(fe.a,{list:e.rooms,allowNone:!0,value:r[s.name],dense:!0,themeType:e.themeType,inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t)},className:e.classes.tableSelectContainer}):Object(M.jsx)(ge.a,{list:e.rooms,value:r[s.name],themeType:e.themeType});else if("select"===s.type)if(i)t=Object(M.jsx)(R.a,{value:r[s.name],inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},className:e.classes.tableSelectContainer,children:s.options.map((function(e){return Object(M.jsx)(D.a,{value:e.value,children:e.title?e.title:Object(M.jsx)("i",{children:O.a.t("Nothing")})},e.value)}))});else{var c=s.options.find((function(e){return e.value===r[s.name]}));t=c?c.title:""}else t=i?Object(M.jsx)(A.a,{value:r[s.name],className:e.classes.tableTextFieldContainer,inputProps:{ref:l,className:e.classes.tableTextField},type:s.type,onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},disabled:e.getDisable(a.$index,s.name)}):r[s.name]?r[s.name]:null;return Object(M.jsx)(ee.a,{className:pe.a.clsx(e.classes.tableCell,!i&&e.classes.nonEditMode),onClick:function(e){n(!0),window.localStorage.setItem("Modbus.editMode","true"),window.setTimeout((function(){return l.current&&l.current.focus()}),100)},children:t})},ze=Object(h.a)((function(e){return{tableHeader:{whiteSpace:"nowrap",fontWeight:"bold",fontSize:"80%",padding:"0px 8px"},tableHeaderExtended:{color:"dark"===e.palette.type?e.palette.primary.light:e.palette.primary.dark},tableCell:{whiteSpace:"nowrap",fontSize:"80%",padding:"0px 8px"},tableContainer:{overflow:"auto",maxHeight:"calc(100vh - 180px)"},tableTextField:{fontSize:"80%"},tableSelect:{fontSize:"80%"},tableTextFieldContainer:{width:"100%"},tableSelectContainer:{width:"100%"},nonEditMode:{cursor:"pointer"}}}))((function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1],n=Object(o.useState)(parseInt(window.localStorage.getItem("Modbus.editMode"),10)||0),r=Object(H.a)(n,2),c=r[0],d=r[1],p=Object(o.useState)("true"===window.localStorage.getItem("Modbus.extendedMode")),u=Object(H.a)(p,2),m=u[0],h=u[1],g=Object(o.useState)({open:!1,action:null}),b=Object(H.a)(g,2),f=b[0],S=b[1],v=Object(o.useState)({open:!1,item:null,action:null}),j=Object(H.a)(v,2),x=j[0],T=j[1],y=e.getSortedData(e.data,e.orderBy,e.order);return Object(M.jsxs)("div",{children:[Object(M.jsxs)("div",{children:[Object(M.jsx)(oe.a,{title:O.a.t("Add line"),children:Object(M.jsx)(te.a,{onClick:function(t){return e.addItem()},children:Object(M.jsx)(le.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Edit as TSV (Tab separated values)"),children:Object(M.jsx)(te.a,{onClick:function(){return i(!0)},children:Object(M.jsx)(ce.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Toggle extended mode"),children:Object(M.jsx)(te.a,{color:m?"primary":"inherit",onClick:function(){window.localStorage.setItem("Modbus.extendedMode",m?"false":"true"),h(!m)},children:Object(M.jsx)(me.a,{})})})]}),Object(M.jsx)("div",{className:e.classes.tableContainer,children:Object(M.jsxs)(K.a,{size:"small",stickyHeader:!0,padding:"none",children:[Object(M.jsx)(_.a,{children:Object(M.jsxs)(X.a,{children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(t){var a=!1,o=!1,s=!1,i=!1;for(var n in e.data)if(e.data[n][t.name]?(a=!0,s=!0):(a=!1,i=!0),s&&i){o=!0,a=!1;break}return Object(M.jsxs)(ee.a,{style:{width:"checkbox"===t.type?20:t.width},className:pe.a.clsx(e.classes.tableHeader,t.expert&&e.classes.tableHeaderExtended),title:t.tooltip?O.a.t(t.tooltip):null,children:["checkbox"===t.type?Object(M.jsx)(oe.a,{title:O.a.t("Change all"),children:Object(M.jsx)(k.a,{indeterminate:o,checked:a,onChange:function(a){var o=JSON.parse(JSON.stringify(e.data));o.forEach((function(e){return e[t.name]=a.target.checked})),e.changeData(o)}})}):null,t.sorted?Object(M.jsx)(ae.a,{active:t.name===e.orderBy,direction:e.order,onClick:function(a){var o=e.orderBy===t.name&&"asc"===e.order;e.onChangeOrder(t.name,o?"desc":"asc")},children:O.a.t(t.title)}):O.a.t(t.title)]},t.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete all"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(t){return S({open:!0,action:function(){return e.changeData([])}})},disabled:!e.data.length,children:Object(M.jsx)(ie.a,{})})})})})]})}),Object(M.jsx)(Q.a,{children:y.map((function(t){return Object(M.jsxs)(X.a,{hover:!0,children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(a){return Object(M.jsx)(Ne,Object(l.a)({themeType:e.themeType,sortedItem:t,field:a,editMode:c===t.$index,rooms:e.rooms,setEditMode:function(){return d(t.$index)}},e),a.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(a){var o=window.sessionStorage.getItem("disableDeleteDialogs");o&&new Date-new Date(o)<3e5?e.deleteItem(t.$index):T({open:!0,action:function(a){a&&window.sessionStorage.setItem("disableDeleteDialogs",(new Date).toISOString()),e.deleteItem(t.$index)},item:t.item})},children:Object(M.jsx)(ie.a,{})})})})})]},t.$index)}))})]})}),s?Object(M.jsx)(We,{open:!0,save:function(t){e.prefix&&t.forEach((function(t){t.Address=(t.Address||"").toUpperCase(),t.Address&&!t.Address.startsWith(e.prefix)&&(t.Address=e.prefix+t.Address)})),e.changeData(t)},onClose:function(){return i(!1)},data:e.data,fields:e.fields}):null,Object(M.jsx)(Ve,{open:f.open,action:f.action,onClose:function(){return S({open:!1,action:null})}}),Object(M.jsx)(Be,{open:x.open,action:x.action,onClose:function(){return T({open:!1,action:null,item:null})},item:x.item})]})})),Ge=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).changeParam=function(e,t,a){var s=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));if(s[e][t]=a,"Type"===t)if(["BOOL"].includes(a)?s[e].Length=.1:["","BYTE"].includes(a)?s[e].Length=1:["WORD","INT","STRING","S5TIME"].includes(a)?s[e].Length=2:["DWORD","DINT","REAL"].includes(a)?s[e].Length=4:["S7TIME"].includes(a)?s[e].Length=8:["S7STRING","ARRAY"].includes(a)&&(s[e].Length=32),"BOOL"===a){var i=o.address2struct(s[e].Address);void 0===i.bit&&(i.bit=0,s[e].Address=o.struct2address(i))}else{var n=o.address2struct(s[e].Address);void 0!==n.bit&&(n.bit>0&&n.byte++,delete n.bit,s[e].Address=o.struct2address(n))}o.props.onChange(o.nativeField,s)},o.addItem=function(){var e=JSON.parse(JSON.stringify(o.props.native[o.nativeField])),t={};if(o.getFields().forEach((function(e){return t[e.name]=""})),e.length){var a=JSON.parse(JSON.stringify(e));a.sort((function(e,t){return e.Address>t.Address?1:-1}));var s=a[a.length-1],i=o.address2struct(s.Address);"BOOL"===s.Type?(i.bit=i.bit||0,i.bit++,i.bit>=8&&(i.bit=i.bit%8,i.byte++)):(delete i.bit,i.byte+=s.Length),void 0!==i.db&&i.byte+s.Length>65535&&(i.db++,i.byte=0,"BOOL"===s.Type&&(i.bit=0)),t.Address=o.struct2address(i),t.Type=s.Type,t.Length=s.Length,t.Unit=s.Unit,t.Role=s.Role,t.Room=s.Room,t.poll=s.poll,t.RW=s.RW,t.WP=s.WP}else t.role="level",t.Type="BOOL",t.Length="0.1",t.poll=!0,"dbs"===o.nativeField?t.Address="DB1 0.0":t.Address="0.0";e.push(t),o.props.onChange(o.nativeField,e)},o.deleteItem=function(e){var t=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));t.splice(e,1),o.props.onChange(o.nativeField,t)},o.changeData=function(e){o.props.onChange(o.nativeField,e)},o.getDisable=function(e,t){return"Length"===t&&!["STRING","S7STRING","ARRAY"].includes(o.props.native[o.nativeField][e].type)},o.getSortedData=function(e,t,a){o.fields=o.fields||o.getFields(),e=e||o.props.native[o.nativeField],t=t||o.state.orderBy,a=a||o.state.order;var s=[];e.forEach((function(e,t){s[t]={item:e,$index:t}}));var i=o.fields.find((function(e){return e.name===t}));return s.sort((function(e,s){var n,l;if("Address"===t){var r=o.address2struct(e.item.Address),c=o.address2struct(s.item.Address);n=0,void 0!==r.db&&(n=r.db<<24),void 0!==c.db&&(l=c.db<<24),n|=r.byte<<8,l|=c.byte<<8,n|=r.bit||0,l|=c.bit||0}else"$index"===t?(n=e[t],l=s[t]):i&&"number"===i.type?(n=parseInt(e.item[t],10),l=parseInt(s.item[t],10)):(n=e.item[t],l=s.item[t]);return("asc"===a?n>l:nfalse edge)":"Write pulses (true=>false edge)","minutes":"minutes","poll":"poll","sec":"sec.","write as Pulse":"write as Pulse","Drag \'n\' drop file here, or click to select file":"Drag \'n\' drop file here, or click to select file","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Change all","Delete all":"Delete all","Edit as TSV (Tab separated values)":"Edit as TSV (Tab separated values)","Add line":"Add line","Delete":"Delete","Are you sure to delete item with address \\"%s\\"?":"Are you sure to delete item with address \\"%s\\"?","Don\'t show this message in 5 minutes":"Don\'t show this message in 5 minutes","Cancel":"Cancel","Delete all items":"Delete all items","Are you sure to delete all items?":"Are you sure to delete all items?","Edit mode":"Edit mode","Toggle extended mode":"Toggle extended mode","Edit data as TSV":"Edit data as TSV","You can copy, paste and edit data as TSV.":"You can copy, paste and edit data as TSV.","Copy to clipboard":"Copy to clipboard","Nothing":"Nothing","Delete item":"Delete item","Load symbols":"Load symbols","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack and slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV was copied to clipboard"}')},416:function(e){e.exports=JSON.parse('{"Add DB":"DB hinzuf\xfcgen","Address":"Adresse","All entries will be deleted. Are you sure?":"Alle Eintr\xe4ge werden gel\xf6scht. Sind sie sicher?","Close":"Zumachen","Delete all entries":"Alle Eintr\xe4ge l\xf6schen","Description":"Beschreibung","Enable polling of data point":"Zyklische Abfrage vom Datenpunkt","Export":"Export","Export to CSV":"Export in CSV","General":"Allgemein","Import":"Import","Import DB file":"DB-Datei importieren","Import from CSV":"Import aus CSV","Import symbols file":"Symboldatei Importieren","Inputs":"Eing\xe4nge","Length":"L\xe4nge","Load Symbols":"Lade Symbole","Local TSAP":"Local TSAP","Local time":"Ortszeit","Marker":"Merker","Name":"Name","Offset (no day saving time)":"Zeit-Offset (ohne Sommerzeit)","Offset (with day saving time)":"Zeit-Offset (mit Sommerzeit)","Outputs":"Ausg\xe4nge","PLC Connection":"SPS Verbindung","PLC IP Address":"SPS IP Adresse","PLC Rack":"SPS Rack","PLC Slot":"SPS Slot","Poll delay":"Poll delay","Polling":"Abfrage","Pulse time":"Pulsetime","RW":"RW","Reconnect time":"Reconnectzeit","Remote TSAP":"Remote TSAP","Role":"Rolle","Room":"Raum","Round Real to":"Aufrunden Real auf","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7-Zeitmodus","Text copied to clipboard. Click to close the window":"Text wurde in der Zwischenablage kopiert. Klick um Fenster zu zumachen.","Time offset":"Zeitverschiebung","Toggle RW":"RW umschalten","Toggle WP":"WP umschalten","Toggle poll":"Poll umschalten","Type":"Typ","UTC":"UTC","Unit":"Einheit","WP":"WP","Write access":"Schreibzugriff","Write access allowed":"Schreiben erlaubt","Write pulses (true=>false edge)":"Schreibe Pulse (Ja=>Nein Kante)","minutes":"Minuten","poll":"poll","sec":"Sek.","write as Pulse":"schreibe als Impuls","Drag \'n\' drop file here, or click to select file":"Die Datei hierher ziehen , oder klicken, um die Datei auszuw\xe4hlen","DBs":"DBs","ms":"ms","Poll":"Abfrage","Change all":"\xc4ndere Alles","Delete all":"Alles l\xf6schen","Edit as TSV (Tab separated values)":"Als TSV bearbeiten (Tabulatorgetrennte Werte)","Add line":"Zeile hinzuf\xfcgen","Delete":"L\xf6schen","Are you sure to delete item with address \\"%s\\"?":"M\xf6chten Sie den Artikel mit der Adresse \\"%s\\" wirklich l\xf6schen?","Don\'t show this message in 5 minutes":"Diese Nachricht nicht in 5\xa0Minuten anzeigen","Cancel":"Abbrechen","Delete all items":"Alle Elemente l\xf6schen","Are you sure to delete all items?":"M\xf6chten Sie wirklich alle Elemente l\xf6schen?","Edit mode":"Bearbeitungsmodus","Toggle extended mode":"Erweiterten Modus umschalten","Edit data as TSV":"Daten als TSV bearbeiten","You can copy, paste and edit data as TSV.":"Sie k\xf6nnen Daten als TSV kopieren, einf\xfcgen und bearbeiten.","Copy to clipboard":"In die Zwischenablage kopieren","Nothing":"Keins","Delete item":"Item l\xf6schen","Load symbols":"Symbole laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Verbindungstyp: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack und Steckplatz: [Rack * 0x20 + Steckplatz]","TSV was copied to clipboard":"TSV wurde in die Zwischenablage kopiert"}')},417:function(e){e.exports=JSON.parse('{"Add DB":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c DB","Address":"\u0410\u0434\u0440\u0435\u0441","All entries will be deleted. Are you sure?":"\u0412\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u044b. \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b?","Close":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c","Delete all entries":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Description":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","Enable polling of data point":"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u043e\u043f\u0440\u043e\u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0446\u0438\u043a\u043b\u0435","Export":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442","Export to CSV":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432 CSV","General":"\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435","Import":"\u0418\u043f\u043c\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c","Import DB file":"\u0418\u043f\u043c\u043e\u0440\u0442 DB \u0444\u0430\u0439\u043b\u043e\u0432","Import from CSV":"\u0418\u043c\u043f\u043e\u0440\u0442 \u0438\u0437 CSV","Import symbols file":"\u0418\u043f\u043c\u043e\u0440\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432","Inputs":"\u0412\u0445\u043e\u0434\u044b","Length":"Length","Load Symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Local TSAP":"Local TSAP","Local time":"\u041c\u0435\u0441\u0442\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f","Marker":"\u041c\u0430\u0440\u043a\u0435\u0440\u044b","Name":"\u0418\u043c\u044f","Offset (no day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0431\u0435\u0437 \u043b\u0435\u0442\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438)","Offset (with day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0441 \u043b\u0435\u0442\u043d\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c)","Outputs":"\u0412\u044b\u0445\u043e\u0434\u044b","PLC Connection":"PLC \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435","PLC IP Address":"PLC IP \u0430\u0434\u0440\u0435\u0441","PLC Rack":"PLC Rack","PLC Slot":"PLC \u0441\u043b\u043e\u0442","Poll delay":"\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043e\u043f\u0440\u043e\u0441\u0430","Polling":"\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"\u0420\u043e\u043b\u044c","Room":"\u041a\u043e\u043c\u043d\u0430\u0442\u0430","Round Real to":"\u041e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c real \u0434\u043e","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 \u0420\u0435\u0436\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Text copied to clipboard. Click to close the window":"\u0422\u0435\u043a\u0441\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430. \u0429\u0435\u043b\u043a\u043d\u0438\u0442\u0435 \u043c\u044b\u0448\u043a\u043e\u0439 \u0437\u0434\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e","Time offset":"\u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Toggle RW":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c RW","Toggle WP":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c WP","Toggle poll":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c poll","Type":"\u0422\u0438\u043f","UTC":"UTC","Unit":"\u0415\u0434\u0438\u043d\u0438\u0446\u044b","WP":"WP","Write access":"\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0437\u0430\u043f\u0438\u0441\u0438","Write access allowed":"\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e","Write pulses (true=>false edge)":"\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u044b (1 => 0)","minutes":"\u043c\u0438\u043d\u0443\u0442\u044b","poll":"poll","sec":"\u0441\u0435\u043a.","write as Pulse":"\u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u0430\u043a Pulse","Drag \'n\' drop file here, or click to select file":"\u041f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0441\u044e\u0434\u0430 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0444\u0430\u0439\u043b","DBs":"DBs","ms":"ms","Poll":"\u041e\u043f\u0440\u043e\u0441","Change all":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435","Delete all":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435","Edit as TSV (Tab separated values)":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a TSV (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0435\u0439)","Add line":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443","Delete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","Are you sure to delete item with address \\"%s\\"?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u0440 \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c \\"%s\\"?","Don\'t show this message in 5 minutes":"\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 5 \u043c\u0438\u043d\u0443\u0442","Cancel":"\u041e\u0442\u043c\u0435\u043d\u0430","Delete all items":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Are you sure to delete all items?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b?","Edit mode":"\u0420\u0435\u0436\u0438\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f","Toggle extended mode":"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c","Edit data as TSV":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV","You can copy, paste and edit data as TSV.":"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV.","Copy to clipboard":"\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430","Nothing":"\u041d\u0438\u0447\u0435\u0433\u043e","Delete item":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0443\u043d\u043a\u0442","Load symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u0422\u0438\u043f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u0421\u0442\u043e\u0439\u043a\u0430 \u0438 \u0441\u043b\u043e\u0442: [\u0421\u0442\u043e\u0439\u043a\u0430 * 0x20 + \u0441\u043b\u043e\u0442]","TSV was copied to clipboard":"TSV \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430"}')},418:function(e){e.exports=JSON.parse('{"Add DB":"Adicionar DB","Address":"Endere\xe7o","All entries will be deleted. Are you sure?":"Todas as entradas ser\xe3o exclu\xeddas. Voc\xea tem certeza?","Close":"Fechar","Delete all entries":"Eliminar todas as entradas","Description":"Descri\xe7\xe3o","Enable polling of data point":"Habilitar a vota\xe7\xe3o do ponto de dados","Export":"Exportar","Export to CSV":"Exportar para CSV","General":"Geral","Import":"Importar","Import DB file":"Importar arquivo DB","Import from CSV":"Importa\xe7\xe3o de CSV","Import symbols file":"Arquivo de s\xedmbolos de importa\xe7\xe3o","Inputs":"Entradas","Length":"comprimento","Load Symbols":"Carregar s\xedmbolos","Local TSAP":"TSAP local","Local time":"Hor\xe1rio local","Marker":"Marcador","Name":"Nome","Offset (no day saving time)":"Deslocamento (sem hor\xe1rio)","Offset (with day saving time)":"Offset (com tempo de economia de hora)","Outputs":"Sa\xeddas","PLC Connection":"Conex\xe3o do PLC","PLC IP Address":"Endere\xe7o IP do PLC","PLC Rack":"PLC Rack","PLC Slot":"Slot PLC","Poll delay":"Retardo de enquete","Polling":"Polling","Pulse time":"Tempo de pulso","RW":"RW","Reconnect time":"Reconectar o tempo","Remote TSAP":"TSAP remoto","Role":"Fun\xe7\xe3o","Room":"Quarto","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO !","S7 Time mode":"Modo de tempo S7","Text copied to clipboard. Click to close the window":"Texto copiado para a \xe1rea de transfer\xeancia. Clique para fechar a janela","Time offset":"Deslocamento de tempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Alternar pesquisa","Type":"Tipo","UTC":"UTC","Unit":"Unidade","WP":"WP","Write access":"Acesso de grava\xe7\xe3o","Write access allowed":"Acesso de acesso permitido","Write pulses (true=>false edge)":"Escrever pulsos (true => false edge)","minutes":"minutos","poll":"vota\xe7\xe3o","sec":"seg.","write as Pulse":"escreva como pulso","Drag \'n\' drop file here, or click to select file":"Arraste e solte o arquivo aqui ou clique para selecionar o arquivo","DBs":"DBs","ms":"ms","Poll":"Enquete","Change all":"Mude tudo","Delete all":"Apagar tudo","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabula\xe7\xe3o)","Add line":"Adicionar linha","Delete":"Excluir","Are you sure to delete item with address \\"%s\\"?":"Tem certeza de que deseja excluir o item com o endere\xe7o \\"%s\\"?","Don\'t show this message in 5 minutes":"N\xe3o mostre esta mensagem em 5 minutos","Cancel":"Cancelar","Delete all items":"Apagar todos os itens","Are you sure to delete all items?":"Tem certeza de que deseja excluir todos os itens?","Edit mode":"Modo de edi\xe7\xe3o","Toggle extended mode":"Alternar modo estendido","Edit data as TSV":"Editar dados como TSV","You can copy, paste and edit data as TSV.":"Voc\xea pode copiar, colar e editar dados como TSV.","Copy to clipboard":"Copiar para \xe1rea de transfer\xeancia","Nothing":"Nada","Delete item":"Apagar item","Load symbols":"S\xedmbolos de carga","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conex\xe3o: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 B\xe1sico","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV foi copiado para a \xe1rea de transfer\xeancia"}')},419:function(e){e.exports=JSON.parse('{"Add DB":"Voeg DB toe","Address":"Adres","All entries will be deleted. Are you sure?":"Alle inzendingen worden verwijderd. Weet je het zeker?","Close":"Dichtbij","Delete all entries":"Verwijder alle vermeldingen","Description":"Beschrijving","Enable polling of data point":"Polling van gegevenspunt inschakelen","Export":"Exporteren","Export to CSV":"Exporteren naar CSV","General":"Algemeen","Import":"Importeren","Import DB file":"DB-bestand importeren","Import from CSV":"Importeren vanuit CSV","Import symbols file":"Symboolbestand importeren","Inputs":"ingangen","Length":"Lengte","Load Symbols":"Laad symbolen","Local TSAP":"Lokale TSAP","Local time":"Lokale tijd","Marker":"Markeerstift","Name":"Naam","Offset (no day saving time)":"Offset (geen dagbesparende tijd)","Offset (with day saving time)":"Offset (met dagbesparende tijd)","Outputs":"uitgangen","PLC Connection":"PLC-verbinding","PLC IP Address":"PLC IP-adres","PLC Rack":"PLC Rack","PLC Slot":"PLC-slot","Poll delay":"Poll vertraging","Polling":"stemming","Pulse time":"Pulstijd","RW":"RW","Reconnect time":"Reconnect tijd","Remote TSAP":"TSAP op afstand","Role":"Rol","Room":"Kamer","Round Real to":"Rond echt naar","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tijdmodus","Text copied to clipboard. Click to close the window":"Tekst gekopieerd naar klembord. Klik om het venster te sluiten","Time offset":"Tijd offset","Toggle RW":"RW omschakelen","Toggle WP":"Wissel WP","Toggle poll":"Poll wisselen","Type":"Type","UTC":"UTC","Unit":"Eenheid","WP":"WP","Write access":"Schrijf toegang","Write access allowed":"Schrijftoegang toegestaan","Write pulses (true=>false edge)":"Schrijf pulsen (true => false edge)","minutes":"minuut","poll":"poll","sec":"seconde","write as Pulse":"schrijf als Pulse","Drag \'n\' drop file here, or click to select file":"Sleep het bestand hierheen, of klik om het bestand te selecteren","DBs":"DBs","ms":"ms","Poll":"Opiniepeiling","Change all":"Verander alles","Delete all":"Verwijder alles","Edit as TSV (Tab separated values)":"Bewerken als TSV (door tabs gescheiden waarden)","Add line":"Lijn toevoegen","Delete":"Verwijderen","Are you sure to delete item with address \\"%s\\"?":"Weet u zeker dat u het item met adres \\"%s\\" wilt verwijderen?","Don\'t show this message in 5 minutes":"Dit bericht niet binnen 5 minuten weergeven","Cancel":"annuleren","Delete all items":"Alle items verwijderen","Are you sure to delete all items?":"Weet je zeker dat je alle items wilt verwijderen?","Edit mode":"Bewerkingsmodus","Toggle extended mode":"Schakel uitgebreide modus in","Edit data as TSV":"Gegevens bewerken als TSV","You can copy, paste and edit data as TSV.":"U kunt gegevens kopi\xebren, plakken en bewerken als TSV.","Copy to clipboard":"Kopieer naar klembord","Nothing":"Niets","Delete item":"Verwijder item","Load symbols":"Symbolen laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Aansluittype: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rek en sleuf: [Rack * 0x20 + sleuf]","TSV was copied to clipboard":"TSV is gekopieerd naar het klembord"}')},420:function(e){e.exports=JSON.parse('{"Add DB":"Ajouter une DB","Address":"Adresse","All entries will be deleted. Are you sure?":"Toutes les entr\xe9es seront supprim\xe9es. \xcates-vous s\xfbr?","Close":"Fermer","Delete all entries":"Supprimer toutes les entr\xe9es","Description":"La description","Enable polling of data point":"Activer l\'interrogation du point de donn\xe9es","Export":"Exportation","Export to CSV":"Exporter au format CSV","General":"G\xe9n\xe9ral","Import":"Importer","Import DB file":"Importer un fichier DB","Import from CSV":"Importer \xe0 partir du fichier CSV","Import symbols file":"Importer un fichier de symboles","Inputs":"Contributions","Length":"Longueur","Load Symbols":"Charger des symboles","Local TSAP":"TSAP local","Local time":"Heure locale","Marker":"Marqueur","Name":"pr\xe9nom","Offset (no day saving time)":"D\xe9calage (pas de temps pour gagner du temps)","Offset (with day saving time)":"D\xe9calage (avec un gain de temps de jour)","Outputs":"Les sorties","PLC Connection":"Connexion PLC","PLC IP Address":"Adresse IP de l\'API","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"D\xe9lai d\'interrogation","Polling":"Vote","Pulse time":"Temps d\'impulsion","RW":"RW","Reconnect time":"Reconnectez le temps","Remote TSAP":"TSAP distant","Role":"R\xf4le","Room":"Chambre","Round Real to":"Rond r\xe9el \xe0","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Mode heure","Text copied to clipboard. Click to close the window":"Texte copi\xe9 dans le presse-papier Cliquez pour fermer la fen\xeatre","Time offset":"D\xe9calage temporel","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Basculer le sondage","Type":"Type","UTC":"UTC","Unit":"Unit\xe9","WP":"WP","Write access":"Acc\xe8s en \xe9criture","Write access allowed":"Acc\xe8s en \xe9criture autoris\xe9","Write pulses (true=>false edge)":"\xc9crire des impulsions (true => false edge)","minutes":"minutes","poll":"sondage","sec":"seconde.","write as Pulse":"\xe9crire comme Pulse","Drag \'n\' drop file here, or click to select file":"Glissez-d\xe9posez le fichier ici, ou cliquez pour s\xe9lectionner le fichier","DBs":"DBs","ms":"ms","Poll":"Sondage","Change all":"Change tout","Delete all":"Tout supprimer","Edit as TSV (Tab separated values)":"Modifier en tant que TSV (valeurs s\xe9par\xe9es par des tabulations)","Add line":"Ajouter une ligne","Delete":"Effacer","Are you sure to delete item with address \\"%s\\"?":"\xcates-vous s\xfbr de supprimer l\'\xe9l\xe9ment avec l\'adresse \xab\xa0%s\xa0\xbb\xa0?","Don\'t show this message in 5 minutes":"Ne pas afficher ce message dans 5 minutes","Cancel":"Annuler","Delete all items":"Supprimer tous les \xe9l\xe9ments","Are you sure to delete all items?":"\xcates-vous s\xfbr de supprimer tous les \xe9l\xe9ments\xa0?","Edit mode":"Mode \xe9dition","Toggle extended mode":"Basculer en mode \xe9tendu","Edit data as TSV":"Modifier les donn\xe9es en tant que TSV","You can copy, paste and edit data as TSV.":"Vous pouvez copier, coller et modifier des donn\xe9es au format TSV.","Copy to clipboard":"Copier dans le presse-papier","Nothing":"Rien","Delete item":"Effacer l\'article","Load symbols":"Charger des symboles","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Type de connexion : 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack et slot : [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV a \xe9t\xe9 copi\xe9 dans le presse-papiers"}')},421:function(e){e.exports=JSON.parse('{"Add DB":"Aggiungi DB","Address":"Indirizzo","All entries will be deleted. Are you sure?":"Tutte le voci saranno cancellate. Sei sicuro?","Close":"Vicino","Delete all entries":"Elimina tutte le voci","Description":"Descrizione","Enable polling of data point":"Abilita il polling del punto dati","Export":"Esportare","Export to CSV":"Esporta in CSV","General":"Generale","Import":"Importare","Import DB file":"Importa file DB","Import from CSV":"Importa da CSV","Import symbols file":"Importa file simboli","Inputs":"ingressi","Length":"Lunghezza","Load Symbols":"Carica simboli","Local TSAP":"TSAP locale","Local time":"Ora locale","Marker":"marcatore","Name":"Nome","Offset (no day saving time)":"Offset (nessun giorno risparmiando tempo)","Offset (with day saving time)":"Offset (con ora del giorno)","Outputs":"Uscite","PLC Connection":"Connessione PLC","PLC IP Address":"Indirizzo IP del PLC","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"Ritardo del sondaggio","Polling":"votazione","Pulse time":"Tempo di impulso","RW":"RW","Reconnect time":"Tempo di riconnessione","Remote TSAP":"TSAP remoto","Role":"Ruolo","Room":"Camera","Round Real to":"Round reale a","S7 LOGO!":"LOGO S7 !","S7 Time mode":"Modalit\xe0 ora S7","Text copied to clipboard. Click to close the window":"Testo copiato negli appunti. Clicca per chiudere la finestra","Time offset":"Differenza di fuso orario","Toggle RW":"Attiva / disattiva RW","Toggle WP":"Attiva / disattiva WP","Toggle poll":"Attiva / disattiva sondaggio","Type":"genere","UTC":"UTC","Unit":"Unit\xe0","WP":"WP","Write access":"Accesso in scrittura","Write access allowed":"Accesso in scrittura consentito","Write pulses (true=>false edge)":"Scrivi impulsi (true => falso bordo)","minutes":"minuti","poll":"sondaggio","sec":"sec.","write as Pulse":"scrivi come Pulse","Drag \'n\' drop file here, or click to select file":"Trascina e rilascia il file qui o fai clic per selezionare il file","DBs":"DBs","ms":"ms","Poll":"Sondaggio","Change all":"Cambia tutto","Delete all":"Cancella tutto","Edit as TSV (Tab separated values)":"Modifica come TSV (valori separati da tabulazioni)","Add line":"Aggiungi riga","Delete":"Elimina","Are you sure to delete item with address \\"%s\\"?":"Sei sicuro di eliminare l\'elemento con l\'indirizzo \\"%s\\"?","Don\'t show this message in 5 minutes":"Non mostrare questo messaggio in 5 minuti","Cancel":"Annulla","Delete all items":"Elimina tutti gli elementi","Are you sure to delete all items?":"Sei sicuro di eliminare tutti gli elementi?","Edit mode":"Modalit\xe0 Modifica","Toggle extended mode":"Attiva/disattiva modalit\xe0 estesa","Edit data as TSV":"Modifica dati come TSV","You can copy, paste and edit data as TSV.":"Puoi copiare, incollare e modificare i dati come TSV.","Copy to clipboard":"Copia negli appunti","Nothing":"Niente","Delete item":"Cancellare l\'oggetto","Load symbols":"Simboli di carico","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo di collegamento: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV \xe8 stato copiato negli appunti"}')},422:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Hora local","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Desplazamiento (sin horario de guardado)","Offset (with day saving time)":"Desplazamiento (con horario de ahorro de d\xeda)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Votaci\xf3n","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"Modo de tiempo S7","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Desplazamiento de tiempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Acceso de escritura","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutos","poll":"poll","sec":"sec.","write as Pulse":"escribe como Pulso","Drag \'n\' drop file here, or click to select file":"Arrastre y suelte el archivo aqu\xed o haga clic para seleccionar el archivo","DBs":"DBs","ms":"ms","Poll":"Encuesta","Change all":"Cambia todo","Delete all":"Eliminar todos","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabulaciones)","Add line":"A\xf1adir l\xednea","Delete":"Borrar","Are you sure to delete item with address \\"%s\\"?":"\xbfEst\xe1 seguro de eliminar el elemento con la direcci\xf3n \\"%s\\"?","Don\'t show this message in 5 minutes":"No muestre este mensaje en 5 minutos","Cancel":"Cancelar","Delete all items":"Eliminar todos los elementos","Are you sure to delete all items?":"\xbfEst\xe1 seguro de eliminar todos los elementos?","Edit mode":"Modo de edici\xf3n","Toggle extended mode":"Alternar modo extendido","Edit data as TSV":"Editar datos como TSV","You can copy, paste and edit data as TSV.":"Puede copiar, pegar y editar datos como TSV.","Copy to clipboard":"Copiar al portapapeles","Nothing":"Nada","Delete item":"Eliminar elemento","Load symbols":"Cargar s\xedmbolos","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conexi\xf3n: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack y ranura: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV se copi\xf3 al portapapeles"}')},423:function(e){e.exports=JSON.parse('{"Add DB":"Dodaj DB","Address":"Adres","All entries will be deleted. Are you sure?":"Wszystkie wpisy zostan\u0105 usuni\u0119te. Jeste\u015b pewny?","Close":"Blisko","Delete all entries":"Usu\u0144 wszystkie wpisy","Description":"Opis","Enable polling of data point":"W\u0142\u0105cz odpytywanie punktu danych","Export":"Eksport","Export to CSV":"Eksportuj do pliku CSV","General":"Genera\u0142","Import":"Import","Import DB file":"Importuj plik DB","Import from CSV":"Importuj z CSV","Import symbols file":"Importuj plik symboli","Inputs":"Wej\u015bcia","Length":"D\u0142ugo\u015b\u0107","Load Symbols":"Za\u0142aduj symbole","Local TSAP":"Lokalny TSAP","Local time":"Czas lokalny","Marker":"Znacznik","Name":"Nazwa","Offset (no day saving time)":"Przesuni\u0119cie (brak czasu na dzie\u0144)","Offset (with day saving time)":"Przesuni\u0119cie (z czasem oszcz\u0119dzania dziennego)","Outputs":"Wyj\u015bcia","PLC Connection":"Po\u0142\u0105czenie PLC","PLC IP Address":"Adres IP sterownika PLC","PLC Rack":"Rack PLC","PLC Slot":"Gniazdo PLC","Poll delay":"Op\xf3\u017anienie ankiety","Polling":"Ankieta","Pulse time":"Czas impulsu","RW":"RW","Reconnect time":"Czas ponownego po\u0142\u0105czenia","Remote TSAP":"Zdalny TSAP","Role":"Rola","Room":"Pok\xf3j","Round Real to":"Runda prawdziwa do","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tryb czasu","Text copied to clipboard. Click to close the window":"Tekst skopiowany do schowka. Kliknij, aby zamkn\u0105\u0107 okno","Time offset":"Przesuni\u0119cie czasu","Toggle RW":"Prze\u0142\u0105cz RW","Toggle WP":"Prze\u0142\u0105cz WP","Toggle poll":"Prze\u0142\u0105cz ankiet\u0119","Type":"Rodzaj","UTC":"UTC","Unit":"Jednostka","WP":"WP","Write access":"Dost\u0119p do zapisu","Write access allowed":"Dost\u0119p do zapisu dozwolony","Write pulses (true=>false edge)":"Pisz impulsy (true => false edge)","minutes":"minuty","poll":"g\u0142osowanie","sec":"sec.","write as Pulse":"napisz jako Pulse","Drag \'n\' drop file here, or click to select file":"Przeci\u0105gnij i upu\u015b\u0107 plik tutaj lub kliknij, aby wybra\u0107 plik","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Zmieni\u0107 wszystko","Delete all":"Usu\u0144 wszystko","Edit as TSV (Tab separated values)":"Edytuj jako TSV (warto\u015bci rozdzielone tabulatorami)","Add line":"Dodaj lini\u0119","Delete":"Kasowa\u0107","Are you sure to delete item with address \\"%s\\"?":"Czy na pewno chcesz usun\u0105\u0107 element o adresie \u201e%s\u201d?","Don\'t show this message in 5 minutes":"Nie pokazuj tej wiadomo\u015bci za 5 minut","Cancel":"Anuluj","Delete all items":"Usu\u0144 wszystkie elementy","Are you sure to delete all items?":"Czy na pewno chcesz usun\u0105\u0107 wszystkie elementy?","Edit mode":"Tryb edycji","Toggle extended mode":"Prze\u0142\u0105cz tryb rozszerzony","Edit data as TSV":"Edytuj dane jako TSV","You can copy, paste and edit data as TSV.":"Mo\u017cesz kopiowa\u0107, wkleja\u0107 i edytowa\u0107 dane jako TSV.","Copy to clipboard":"Skopiuj do schowka","Nothing":"Nic","Delete item":"Usu\u0144 przedmiot","Load symbols":"Za\u0142aduj symbole","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Typ po\u0142\u0105czenia: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Szafa i gniazdo: [Stela\u017c * 0x20 + Slot]","TSV was copied to clipboard":"TSV zosta\u0142 skopiowany do schowka"}')},424:function(e){e.exports=JSON.parse('{"Add DB":"\u6dfb\u52a0\u6570\u636e\u5e93","Address":"\u5730\u5740","All entries will be deleted. Are you sure?":"\u6240\u6709\u6761\u76ee\u5c06\u88ab\u5220\u9664\u3002","Close":"\u5173\u95ed","Delete all entries":"\u5220\u9664\u6240\u6709\u6761\u76ee","Description":"\u63cf\u8ff0","Enable polling of data point":"\u542f\u7528\u6570\u636e\u70b9\u8f6e\u8be2","Export":"\u51fa\u53e3","Export to CSV":"\u5bfc\u51fa\u4e3aCSV","General":"\u4e00\u822c\u7684","Import":"\u8fdb\u53e3","Import DB file":"\u5bfc\u5165\u6570\u636e\u5e93\u6587\u4ef6\uff1a","Import from CSV":"\u4eceCSV\u5bfc\u5165","Import symbols file":"\u5bfc\u5165\u7b26\u53f7\u6587\u4ef6\uff1a","Inputs":"\u8f93\u5165\u9879","Length":"\u957f\u5ea6","Load Symbols":"\u52a0\u8f7d\u7b26\u53f7","Local TSAP":"\u672c\u5730TSAP\uff1a","Local time":"\u5f53\u5730\u65f6\u95f4","Marker":"\u8bb0\u53f7\u7b14","Name":"\u540d\u79f0","Offset (no day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u65e0\u590f\u4ee4\u65f6\uff09","Offset (with day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u5e26\u590f\u65f6\u5236\uff09","Outputs":"\u4ea7\u51fa","PLC Connection":"PLC\u8fde\u63a5\uff1a","PLC IP Address":"PLC IP\u5730\u5740\uff1a","PLC Rack":"PLC\u673a\u67b6\uff1a","PLC Slot":"PLC\u63d2\u69fd\uff1a","Poll delay":"\u8f6e\u8be2\u5ef6\u8fdf\uff1a","Polling":"\u8f6e\u8be2","Pulse time":"\u8109\u51b2\u65f6\u95f4\uff1a","RW":"\u8bfb\u5199\u5668","Reconnect time":"\u91cd\u65b0\u8fde\u63a5\u65f6\u95f4\uff1a","Remote TSAP":"\u8fdc\u7a0bTSAP\uff1a","Role":"\u89d2\u8272","Room":"\u623f\u95f4","Round Real to":"\u820d\u5165\u4e3a\uff1a","S7 LOGO!":"S7 LOGO !\uff1a","S7 Time mode":"S7\u65f6\u95f4\u6a21\u5f0f","Text copied to clipboard. Click to close the window":"\u6587\u672c\u5df2\u590d\u5236\u5230\u526a\u8d34\u677f\u3002","Time offset":"\u65f6\u95f4\u504f\u79fb\uff1a","Toggle RW":"\u5207\u6362RW","Toggle WP":"\u5207\u6362WP","Toggle poll":"\u5207\u6362\u6c11\u610f\u8c03\u67e5","Type":"\u7c7b\u578b","UTC":"\u4e16\u754c\u6807\u51c6\u65f6\u95f4","Unit":"\u5355\u5143","WP":"\u53ef\u6e7f\u6027\u7c89\u5242","Write access":"\u5199\u8bbf\u95ee","Write access allowed":"\u5141\u8bb8\u5199\u8bbf\u95ee","Write pulses (true=>false edge)":"\u5199\u8109\u51b2\uff08\u771f=>\u5047\u8fb9\uff09","minutes":"\u5206\u949f","poll":"\u8f6e\u8be2","sec":"\u79d2","write as Pulse":"\u5199\u4e3a\u8109\u51b2","Drag \'n\' drop file here, or click to select file":"\u5c06\u201cn\u201d\u6587\u4ef6\u62d6\u5230\u6b64\u5904\uff0c\u6216\u5355\u51fb\u4ee5\u9009\u62e9\u6587\u4ef6","DBs":"DBs","ms":"ms","Poll":"\u8f6e\u8be2","Change all":"\u5168\u90e8\u66f4\u6539","Delete all":"\u5220\u9664\u6240\u6709","Edit as TSV (Tab separated values)":"\u7f16\u8f91\u4e3a TSV\uff08\u5236\u8868\u7b26\u5206\u9694\u503c\uff09","Add line":"\u6dfb\u52a0\u884c","Delete":"\u5220\u9664","Are you sure to delete item with address \\"%s\\"?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u5730\u5740\u4e3a\u201c%s\u201d\u7684\u9879\u76ee\u5417\uff1f","Don\'t show this message in 5 minutes":"5 \u5206\u949f\u5185\u4e0d\u8981\u663e\u793a\u6b64\u6d88\u606f","Cancel":"\u53d6\u6d88","Delete all items":"\u5220\u9664\u6240\u6709\u9879\u76ee","Are you sure to delete all items?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u6240\u6709\u9879\u76ee\u5417\uff1f","Edit mode":"\u7f16\u8f91\u6a21\u5f0f","Toggle extended mode":"\u5207\u6362\u6269\u5c55\u6a21\u5f0f","Edit data as TSV":"\u5c06\u6570\u636e\u7f16\u8f91\u4e3a TSV","You can copy, paste and edit data as TSV.":"\u60a8\u53ef\u4ee5\u5c06\u6570\u636e\u590d\u5236\u3001\u7c98\u8d34\u548c\u7f16\u8f91\u4e3a TSV\u3002","Copy to clipboard":"\u590d\u5236\u5230\u526a\u8d34\u677f","Nothing":"\u6ca1\u6709\u4ec0\u4e48","Delete item":"\u5220\u9664\u9879\u76ee","Load symbols":"\u52a0\u8f7d\u7b26\u53f7","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u8fde\u63a5\u7c7b\u578b\uff1a0x1 - PG\u30010x2 - OP\u30010x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u673a\u67b6\u548c\u63d2\u69fd\uff1a[\u673a\u67b6 * 0x20 + \u63d2\u69fd]","TSV was copied to clipboard":"TSV \u88ab\u590d\u5236\u5230\u526a\u8d34\u677f"}')},426:function(e,t,a){"use strict";a.r(t);var o=a(0),s=a(16),i=a.n(s),n=a(456),l=(a(348),a(68)),r=a(28),c=a(25),d=a(335),p=a(58),u=a(38),m=a(46),h=a(5),g=a(91),b=a(463),f=a(472),S=a(464),v=a(313),j=a.n(v),x=a(218),T=a.n(x),y=a(13),O=a.n(y),P=a(334),C=a(173),A=a(461),k=a(473),R=a(447),D=a(460),w=a(459),L=a(220),I=a(339),E=a(437),W=a(462),V=a(458),B=a(172),N=a(211),z=a(316),G=a(317),M=a(7),U=function(e){var t=Object(g.b)().enqueueSnackbar,a=Object(o.useCallback)((function(a){e.onChange(a),t(O.a.t("Data updated"))}),[]),s=Object(P.a)({onDrop:a,accept:e.accept}),i=s.getRootProps,n=s.getInputProps,r=s.isDragActive;return Object(M.jsxs)(L.a,{style:{padding:3,paddingRight:40},children:[Object(M.jsx)(C.a,{variant:"h6",gutterBottom:!0,children:O.a.t(e.label)}),Object(M.jsxs)("div",Object(l.a)(Object(l.a)({},i()),{},{className:e.classes.fileInput,style:r?{backgroundColor:"rgba(0, 255, 0, 0.1)"}:{cursor:"pointer"},children:[Object(M.jsx)("input",Object(l.a)({},n())),r?Object(M.jsx)("p",{children:O.a.t("Drop the file here ...")}):Object(M.jsx)("p",{children:O.a.t("Drag 'n' drop file here, or click to select file")})]}))]})},F=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).inputDisabled=function(e){return!1},o.inputDisplay=function(e){if(null===o.props.native.params.slot){if(["rack","slot"].includes(e.name))return!1}else if(["localTSAP","remoteTSAP"].includes(e.name))return!1;return"timeOffset"!==e.name||["summer","offset"].includes(o.props.native.params.timeFormat)},o.changeParam=function(e,t){var a=JSON.parse(JSON.stringify(o.props.native));"s7logo"===e?t?(a.params.localTSAP="",a.params.remoteTSAP="",a.params.rack=null,a.params.slot=null):(a.params.localTSAP=null,a.params.remoteTSAP=null,a.params.rack="",a.params.slot=""):a.params[e]=t,o.props.changeNative(a)},o.loadSymbols=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){var s={inputs:[],outputs:[],markers:[]},i=a.result;(i=i.split("126,")).forEach((function(e){var t=e.slice(23,29).replace(/( )/g,""),a={Name:e.slice(0,23).replace(/( ){2,}/g,""),Address:e.slice(29,36).replace(/( )/g,""),Type:e.slice(36,41).replace(/( )/g,""),Description:e.slice(46,126).replace(/( ){2,}/,""),Unit:"",poll:!0,RW:!1,WP:!1};"E"!==t&&"EB"!==t&&"EW"!==t&&"ED"!==t||s.inputs.push(a),"A"!==t&&"AB"!==t&&"AW"!==t&&"AD"!==t||s.outputs.push(a),"M"!==t&&"MB"!==t&&"MW"!==t&&"MD"!==t||s.markers.push(a)})),["inputs","outputs","markers"].forEach((function(e){t[e]=s[e]})),o.props.changeNative(t)},a.readAsText(e[0],"ISO-8859-1")},o.addDb=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){setTimeout((function(){var e=a.result,o={inputs:!1,outputs:!1,markers:!1,dbs:!1},s={inputs:t.inputs||[],outputs:t.outputs||[],markers:t.markers||[],dbs:t.dbs||[]};if(-1!==e.indexOf("Leseanforderung")){for(var i=e.replace(/\r\n/g,"\n").split("\n"),n={Name:{attr:"Name"},Typ:{attr:""},Operand:{attr:"Address",process:function(e){var t=(e=e.trim()).match(/^DB (\d+)/);if(!t){var a=e.match(/^MB? (\d+)\.?(\d+)?$/);return a?"M "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^AB? (\d+)\.?(\d+)?$/))?"OUT "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^EB? (\d+)\.?(\d+)?$/))?"IN "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):e}var o=e.match(/(\d+).?(\d+)?$/);return t&&o?"DB".concat(t[1]," ").concat(o[1]).concat(void 0!==o[2]?"."+o[2]:""):e}},"SPS-Format":{attr:"Type",process:function(e){return e}},Byteanzahl:{attr:"Length",process:function(e){return parseInt(e,10)}},Zugriff:{attr:"RW",process:function(e){return"read"!==e}},Leseanforderung:{attr:"poll",process:function(e){return"zyklisch"===e}},"AktZeit (ms)":{attr:""},Kommentar:{attr:"Description"},"Clients (Anzahl)":{attr:""}},l=i[0].split(","),r=[],c=0;c10){var t=e.split(/\s+/g);t.shift();for(var a={Address:b+" "+t.shift(),Name:t.shift(),Type:t.shift(),dec:t.shift(),Description:t.join(" "),Unit:"",Role:"",Room:"",poll:!0,RW:!1,WP:!1},i=0;iparseInt(o[1],10))return 1;if(parseInt(a[1],10)parseInt(i[1],10)?1:parseInt(s[1],10)parseInt(i[2],10)?1:parseInt(s[2],10)>8&255,s=255&t;return Object(M.jsxs)(V.a,{item:!0,className:a.props.classes.optionContainer,children:[Object(M.jsx)(E.a,{className:a.props.classes.optionsLabel,children:O.a.t(e.title)}),Object(M.jsx)(I.a,{title:O.a.t("Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic"),style:{width:"6ch"},value:o.toString(16)?o.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,parseInt(t.target.value,16)<<8|s)}}),Object(M.jsx)(I.a,{title:O.a.t("Rack and slot: [Rack * 0x20 + Slot]"),style:{marginLeft:5,width:"6ch"},value:s.toString(16)?s.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,o<<8|parseInt(t.target.value,16))}})]},e.name)}return Object(M.jsx)(V.a,{item:!0,className:a.props.classes.optionContainer,children:Object(M.jsx)(A.a,{type:e.type,label:O.a.t(e.title),className:a.props.classes.optionsTextField,disabled:a.inputDisabled(e),value:a.getValue(e.name),InputProps:{endAdornment:e.dimension?Object(M.jsx)(W.a,{position:"end",children:O.a.t(e.dimension)}):null},onChange:function(t){return a.changeParam(e.name,t.target.value)}})},e.name)}))})]})}},{key:"getImportsBlock",value:function(){return Object(M.jsx)(M.Fragment,{children:Object(M.jsxs)(B.a,{className:this.props.classes.optionsContainer,children:[Object(M.jsx)(C.a,{variant:"h4",gutterBottom:!0,className:this.props.classes.header,children:O.a.t("Import")}),Object(M.jsxs)(N.a,{className:this.props.classes.optionContainer,children:[Object(M.jsx)(U,{classes:this.props.classes,onChange:this.loadSymbols,label:"Load symbols",accept:".asc"}),Object(M.jsx)(U,{classes:this.props.classes,onChange:this.addDb,label:"Add DB",accept:".csv,.prn"})]})]})})}},{key:"render",value:function(){return Object(M.jsx)("form",{className:this.props.classes.tab,children:Object(M.jsxs)(V.a,{container:!0,spacing:2,children:[Object(M.jsxs)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:[this.getInputsBlock(z,"PLC Connection"),this.getImportsBlock()]}),Object(M.jsx)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:this.getInputsBlock(G,"General")})]})})}}]),a}(o.Component),q=Object(h.a)((function(e){return{optionsSelect:{width:280},optionsTextField:{width:280},optionContainer:{},optionsContainer:{width:"calc(100% - ".concat(e.spacing(4),"px)"),padding:e.spacing(2),marginBottom:20,display:"inline-block",textAlign:"left"},optionsGrid:{textAlign:"center",padding:e.spacing(2)},optionsLabel:{fontSize:12},header:{fontSize:24},fileInput:{textAlign:"center",display:"inline-block",height:80,width:200,border:"2px dashed #777",borderRadius:10,marginTop:12,padding:4}}}))(F),J=a(4),Y=a.n(J),$=a(321),Z=a(322),H=a(18),K=a(465),_=a(468),Q=a(466),X=a(469),ee=a(467),te=a(216),ae=a(475),oe=a(471),se=a(80),ie=a.n(se),ne=a(331),le=a.n(ne),re=a(332),ce=a.n(re),de=a(61),pe=a.n(de),ue=a(323),me=a.n(ue),he=a(324),ge=a.n(he),be=a(326),fe=a.n(be),Se=a(223),ve=a(328),je=a.n(ve),xe=a(329),Te=a.n(xe),ye=a(293),Oe=a(294),Pe=a(295),Ce=a(296),Ae=a(297),ke=a(292),Re=a(101),De=a.n(Re),we=a(219),Le=a.n(we),Ie=a(330),Ee=a.n(Ie),We=Object(h.a)((function(e){return{tsvEditor:{width:"100%",height:400},tsvEditorTextarea:{fontFamily:"monospace"}}}))((function(e){var t=Object(o.useState)(""),a=Object(H.a)(t,2),s=a[0],i=a[1];Object(o.useEffect)((function(){var t=[];t.push(e.fields.map((function(e){return e.name}))),e.data.forEach((function(a){return t.push(e.fields.map((function(e){return void 0!==a[e.name]&&null!==a[e.name]?a[e.name].toString():""})))})),i(Object(Se.json2tsv)(t))}),[e.open]);var n=Object(g.b)().enqueueSnackbar;if(!e.open)return null;return Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,maxWidth:"lg",fullWidth:!0,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Edit data as TSV")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("You can copy, paste and edit data as TSV.")}),Object(M.jsx)("div",{children:Object(M.jsx)(je.a,{onChange:function(e){return i(e)},height:"400px",showPrintMargin:!1,value:s,className:e.classes.tsvEditor,width:"100%",setOptions:{firstLineNumber:0},mode:null})})]}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"outlined",color:"primary",onClick:function(){Te()(s),n(O.a.t("TSV was copied to clipboard"))},startIcon:Object(M.jsx)(Ee.a,{}),children:O.a.t("Copy to clipboard")}),Object(M.jsx)(ke.a,{variant:"contained",color:"primary",onClick:function(){var t=Object(Se.tsv2json)(s.endsWith("\n")?s:s+"\n"),a=t.shift(),o=!0,i=[];for(var l in e.fields)e.fields[l].name!==a[l]&&(i.push(Object(M.jsxs)(M.Fragment,{children:["No field ",Object(M.jsx)("i",{children:e.fields[l].name})," in position ",Object(M.jsx)("i",{children:parseInt(l)+1}),"!"]})),o=!1);t=t.map((function(t,a){var s={};for(var n in e.fields)"select"!==e.fields[n].type||e.fields[n].options.map((function(e){return e.value})).includes(t[n])||(i.push(Object(M.jsxs)(M.Fragment,{children:["Value ",Object(M.jsx)("i",{children:t[n]})," is wrong for field ",Object(M.jsx)("i",{children:e.fields[n].name})," in position ",Object(M.jsx)("i",{children:parseInt(a)+1}),"!"]})),o=!1),"checkbox"===e.fields[n].type&&(t[n]="true"===t[n]),s[e.fields[n].name]=t[n];return s})),o?(e.save(t),e.onClose()):n(Object(M.jsx)("div",{children:i.map((function(e,t){return Object(M.jsx)("div",{children:e},t)}))}),{variant:"error"})},startIcon:Object(M.jsx)(Le.a,{}),children:O.a.t("Import")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Close")})]})]})})),Ve=function(e){return e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete all items")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("Are you sure to delete all items?")}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(),e.onClose()},children:O.a.t("Delete all items")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Be=function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1];return Object(o.useEffect)((function(){i(!1)}),[e.open]),e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete item")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t('Are you sure to delete item with address "%s"?',e.item._address)}),Object(M.jsx)(Ce.a,{children:Object(M.jsx)(w.a,{label:O.a.t("Don't show this message in 5 minutes"),control:Object(M.jsx)(k.a,{checked:s,onChange:function(e){return i(e.target.checked)}})})}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(s),e.onClose()},children:O.a.t("Delete")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Ne=function(e){var t,a=e.sortedItem,s=e.field,i=e.editMode,n=e.setEditMode,l=Object(o.useRef)(),r=a.item;if("checkbox"===s.type)t=Object(M.jsx)(oe.a,{title:O.a.t(s.title),children:Object(M.jsx)(k.a,{inputRef:l,className:e.classes.tableCheckbox,checked:!!r[s.name],disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.checked)}})});else if("rooms"===s.type)t=i?Object(M.jsx)(fe.a,{list:e.rooms,allowNone:!0,value:r[s.name],dense:!0,themeType:e.themeType,inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t)},className:e.classes.tableSelectContainer}):Object(M.jsx)(ge.a,{list:e.rooms,value:r[s.name],themeType:e.themeType});else if("select"===s.type)if(i)t=Object(M.jsx)(R.a,{value:r[s.name],inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},className:e.classes.tableSelectContainer,children:s.options.map((function(e){return Object(M.jsx)(D.a,{value:e.value,children:e.title?e.title:Object(M.jsx)("i",{children:O.a.t("Nothing")})},e.value)}))});else{var c=s.options.find((function(e){return e.value===r[s.name]}));t=c?c.title:""}else t=i?Object(M.jsx)(A.a,{value:r[s.name],className:e.classes.tableTextFieldContainer,inputProps:{ref:l,className:e.classes.tableTextField},type:s.type,onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},disabled:e.getDisable(a.$index,s.name)}):r[s.name]?r[s.name]:null;return Object(M.jsx)(ee.a,{className:pe.a.clsx(e.classes.tableCell,!i&&e.classes.nonEditMode),onClick:function(e){n(!0),window.localStorage.setItem("Modbus.editMode","true"),window.setTimeout((function(){return l.current&&l.current.focus()}),100)},children:t})},ze=Object(h.a)((function(e){return{tableHeader:{whiteSpace:"nowrap",fontWeight:"bold",fontSize:"80%",padding:"0px 8px"},tableHeaderExtended:{color:"dark"===e.palette.type?e.palette.primary.light:e.palette.primary.dark},tableCell:{whiteSpace:"nowrap",fontSize:"80%",padding:"0px 8px"},tableContainer:{overflow:"auto",maxHeight:"calc(100vh - 180px)"},tableTextField:{fontSize:"80%"},tableSelect:{fontSize:"80%"},tableTextFieldContainer:{width:"100%"},tableSelectContainer:{width:"100%"},nonEditMode:{cursor:"pointer"}}}))((function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1],n=Object(o.useState)(parseInt(window.localStorage.getItem("Modbus.editMode"),10)||0),r=Object(H.a)(n,2),c=r[0],d=r[1],p=Object(o.useState)("true"===window.localStorage.getItem("Modbus.extendedMode")),u=Object(H.a)(p,2),m=u[0],h=u[1],g=Object(o.useState)({open:!1,action:null}),b=Object(H.a)(g,2),f=b[0],S=b[1],v=Object(o.useState)({open:!1,item:null,action:null}),j=Object(H.a)(v,2),x=j[0],T=j[1],y=e.getSortedData(e.data,e.orderBy,e.order);return Object(M.jsxs)("div",{children:[Object(M.jsxs)("div",{children:[Object(M.jsx)(oe.a,{title:O.a.t("Add line"),children:Object(M.jsx)(te.a,{onClick:function(t){return e.addItem()},children:Object(M.jsx)(le.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Edit as TSV (Tab separated values)"),children:Object(M.jsx)(te.a,{onClick:function(){return i(!0)},children:Object(M.jsx)(ce.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Toggle extended mode"),children:Object(M.jsx)(te.a,{color:m?"primary":"inherit",onClick:function(){window.localStorage.setItem("Modbus.extendedMode",m?"false":"true"),h(!m)},children:Object(M.jsx)(me.a,{})})})]}),Object(M.jsx)("div",{className:e.classes.tableContainer,children:Object(M.jsxs)(K.a,{size:"small",stickyHeader:!0,padding:"none",children:[Object(M.jsx)(_.a,{children:Object(M.jsxs)(X.a,{children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(t){var a=!1,o=!1,s=!1,i=!1;for(var n in e.data)if(e.data[n][t.name]?(a=!0,s=!0):(a=!1,i=!0),s&&i){o=!0,a=!1;break}return Object(M.jsxs)(ee.a,{style:{width:"checkbox"===t.type?20:t.width},className:pe.a.clsx(e.classes.tableHeader,t.expert&&e.classes.tableHeaderExtended),title:t.tooltip?O.a.t(t.tooltip):null,children:["checkbox"===t.type?Object(M.jsx)(oe.a,{title:O.a.t("Change all"),children:Object(M.jsx)(k.a,{indeterminate:o,checked:a,onChange:function(a){var o=JSON.parse(JSON.stringify(e.data));o.forEach((function(e){return e[t.name]=a.target.checked})),e.changeData(o)}})}):null,t.sorted?Object(M.jsx)(ae.a,{active:t.name===e.orderBy,direction:e.order,onClick:function(a){var o=e.orderBy===t.name&&"asc"===e.order;e.onChangeOrder(t.name,o?"desc":"asc")},children:O.a.t(t.title)}):O.a.t(t.title)]},t.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete all"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(t){return S({open:!0,action:function(){return e.changeData([])}})},disabled:!e.data.length,children:Object(M.jsx)(ie.a,{})})})})})]})}),Object(M.jsx)(Q.a,{children:y.map((function(t){return Object(M.jsxs)(X.a,{hover:!0,children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(a){return Object(M.jsx)(Ne,Object(l.a)({themeType:e.themeType,sortedItem:t,field:a,editMode:c===t.$index,rooms:e.rooms,setEditMode:function(){return d(t.$index)}},e),a.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(a){var o=window.sessionStorage.getItem("disableDeleteDialogs");o&&new Date-new Date(o)<3e5?e.deleteItem(t.$index):T({open:!0,action:function(a){a&&window.sessionStorage.setItem("disableDeleteDialogs",(new Date).toISOString()),e.deleteItem(t.$index)},item:t.item})},children:Object(M.jsx)(ie.a,{})})})})})]},t.$index)}))})]})}),s?Object(M.jsx)(We,{open:!0,save:function(t){e.prefix&&t.forEach((function(t){t.Address=(t.Address||"").toUpperCase(),t.Address&&!t.Address.startsWith(e.prefix)&&(t.Address=e.prefix+t.Address)})),e.changeData(t)},onClose:function(){return i(!1)},data:e.data,fields:e.fields}):null,Object(M.jsx)(Ve,{open:f.open,action:f.action,onClose:function(){return S({open:!1,action:null})}}),Object(M.jsx)(Be,{open:x.open,action:x.action,onClose:function(){return T({open:!1,action:null,item:null})},item:x.item})]})})),Ge=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).changeParam=function(e,t,a){var s=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));if(s[e][t]=a,"Type"===t)if(["BOOL"].includes(a)?s[e].Length=.1:["","BYTE"].includes(a)?s[e].Length=1:["WORD","INT","STRING","S5TIME"].includes(a)?s[e].Length=2:["DWORD","DINT","REAL"].includes(a)?s[e].Length=4:["S7TIME"].includes(a)?s[e].Length=8:["S7STRING","ARRAY"].includes(a)&&(s[e].Length=32),"BOOL"===a){var i=o.address2struct(s[e].Address);void 0===i.bit&&(i.bit=0,s[e].Address=o.struct2address(i))}else{var n=o.address2struct(s[e].Address);void 0!==n.bit&&(n.bit>0&&n.byte++,delete n.bit,s[e].Address=o.struct2address(n))}o.props.onChange(o.nativeField,s)},o.addItem=function(){var e=JSON.parse(JSON.stringify(o.props.native[o.nativeField])),t={};if(o.getFields().forEach((function(e){return t[e.name]=""})),e.length){var a=JSON.parse(JSON.stringify(e));a.sort((function(e,t){return e.Address>t.Address?1:-1}));var s=a[a.length-1],i=o.address2struct(s.Address);"BOOL"===s.Type?(i.bit=i.bit||0,i.bit++,i.bit>=8&&(i.bit=i.bit%8,i.byte++)):(delete i.bit,i.byte+=s.Length),void 0!==i.db&&i.byte+s.Length>65535&&(i.db++,i.byte=0,"BOOL"===s.Type&&(i.bit=0)),t.Address=o.struct2address(i),t.Type=s.Type,t.Length=s.Length,t.Unit=s.Unit,t.Role=s.Role,t.Room=s.Room,t.poll=s.poll,t.RW=s.RW,t.WP=s.WP}else t.role="level",t.Type="BOOL",t.Length="0.1",t.poll=!0,"dbs"===o.nativeField?t.Address="DB1 0.0":t.Address="0.0";e.push(t),o.props.onChange(o.nativeField,e)},o.deleteItem=function(e){var t=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));t.splice(e,1),o.props.onChange(o.nativeField,t)},o.changeData=function(e){o.props.onChange(o.nativeField,e)},o.getDisable=function(e,t){return"Length"===t&&!["STRING","S7STRING","ARRAY"].includes(o.props.native[o.nativeField][e].type)},o.getSortedData=function(e,t,a){o.fields=o.fields||o.getFields(),e=e||o.props.native[o.nativeField],t=t||o.state.orderBy,a=a||o.state.order;var s=[];e.forEach((function(e,t){s[t]={item:e,$index:t}}));var i=o.fields.find((function(e){return e.name===t}));return s.sort((function(e,s){var n,l;if("Address"===t){var r=o.address2struct(e.item.Address),c=o.address2struct(s.item.Address);n=0,void 0!==r.db&&(n=r.db<<24),void 0!==c.db&&(l=c.db<<24),n|=r.byte<<8,l|=c.byte<<8,n|=r.bit||0,l|=c.bit||0}else"$index"===t?(n=e[t],l=s[t]):i&&"number"===i.type?(n=parseInt(e.item[t],10),l=parseInt(s.item[t],10)):(n=e.item[t],l=s.item[t]);return("asc"===a?n>l:n ({\r\n optionsSelect: {\r\n width: 280\r\n },\r\n optionsTextField: {\r\n width: 280\r\n },\r\n optionContainer: {\r\n },\r\n optionsContainer: {\r\n width: `calc(100% - ${theme.spacing(4)}px)`,\r\n padding: theme.spacing(2),\r\n marginBottom: 20,\r\n display: 'inline-block',\r\n textAlign: 'left'\r\n },\r\n optionsGrid: {\r\n textAlign: 'center',\r\n padding: theme.spacing(2),\r\n },\r\n optionsLabel: {\r\n fontSize: 12,\r\n },\r\n header: {\r\n fontSize: 24,\r\n },\r\n fileInput: {\r\n textAlign: 'center',\r\n display: 'inline-block',\r\n height: 80,\r\n width: 200,\r\n border: '2px dashed #777',\r\n borderRadius: 10,\r\n marginTop: 12,\r\n padding: 4\r\n }\r\n});\r\n\r\nlet FileInput = function (props) {\r\n const { enqueueSnackbar } = useSnackbar();\r\n const onDrop = useCallback(acceptedFiles => {\r\n props.onChange(acceptedFiles);\r\n enqueueSnackbar(I18n.t('Data updated'));\r\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\r\n\r\n const {getRootProps, getInputProps, isDragActive} = useDropzone({onDrop, accept: props.accept});\r\n\r\n return \r\n { I18n.t(props.label)}\r\n
\r\n \r\n {\r\n isDragActive ?\r\n

{I18n.t('Drop the file here ...')}

:\r\n

{I18n.t(`Drag 'n' drop file here, or click to select file`)}

\r\n }\r\n
\r\n
;\r\n};\r\n\r\nclass Options extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n };\r\n }\r\n\r\n getValue(name) {\r\n if (name === 's7logo') {\r\n return this.props.native.params.slot === null;\r\n }\r\n return this.props.native.params[name];\r\n }\r\n\r\n inputDisabled = input => {\r\n return false;\r\n }\r\n\r\n inputDisplay = input => {\r\n if (this.props.native.params.slot === null) {\r\n if (['rack', 'slot'].includes(input.name)) {\r\n return false;\r\n }\r\n } else {\r\n if (['localTSAP', 'remoteTSAP'].includes(input.name)) {\r\n return false;\r\n }\r\n }\r\n if (input.name === 'timeOffset') {\r\n return ['summer', 'offset'].includes(this.props.native.params.timeFormat);\r\n }\r\n return true;\r\n }\r\n\r\n getInputsBlock(inputs, title) {\r\n return \r\n {I18n.t(title)}\r\n \r\n {inputs.map(input => {\r\n if (!this.inputDisplay(input)) {\r\n return null;\r\n }\r\n if (input.type === 'checkbox') {\r\n return \r\n this.changeParam(input.name, e.target.checked)}\r\n />}/> {input.dimension ? I18n.t(input.dimension) : null};\r\n } else if (input.type === 'select') {\r\n return \r\n \r\n {I18n.t(input.title)}\r\n this.changeParam(input.name, e.target.value)}\r\n >\r\n {input.options.map(option =>\r\n {option.title}\r\n )}\r\n \r\n {input.dimension ? I18n.t(input.dimension) : null}\r\n ;\r\n } else if (input.type === 'hex') {\r\n let value = parseInt(this.getValue(input.name)) ? parseInt(this.getValue(input.name)) : 0;\r\n let top = (value >> 8) & 0xFF;\r\n let bottom = value & 0xFF;\r\n\r\n return \r\n {I18n.t(input.title)}\r\n {\r\n if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\r\n return;\r\n }\r\n this.changeParam(input.name, (parseInt(e.target.value, 16) << 8) | bottom);\r\n }}\r\n />\r\n {\r\n if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\r\n return;\r\n }\r\n this.changeParam(input.name, (top << 8) | parseInt(e.target.value, 16));\r\n }}\r\n />\r\n ;\r\n } else {\r\n return {I18n.t(input.dimension)} : null\r\n }}\r\n onChange={e => this.changeParam(input.name, e.target.value)}\r\n />;\r\n }\r\n })}\r\n \r\n ;\r\n }\r\n\r\n getImportsBlock() {\r\n return <>\r\n {I18n.t('Import')}\r\n \r\n \r\n \r\n \r\n ;\r\n }\r\n\r\n render() {\r\n return
\r\n \r\n \r\n {this.getInputsBlock(connectionInputs, 'PLC Connection')}\r\n {this.getImportsBlock()}\r\n \r\n {this.getInputsBlock(generalInputs, 'General')}\r\n \r\n
;\r\n }\r\n\r\n changeParam = (name, value) => {\r\n let native = JSON.parse(JSON.stringify(this.props.native));\r\n if (name === 's7logo') {\r\n if (value) {\r\n native.params.localTSAP = '';\r\n native.params.remoteTSAP = '';\r\n native.params.rack = null;\r\n native.params.slot = null;\r\n } else {\r\n native.params.localTSAP = null;\r\n native.params.remoteTSAP = null;\r\n native.params.rack = '';\r\n native.params.slot = '';\r\n }\r\n } else {\r\n native.params[name] = value;\r\n }\r\n this.props.changeNative(native);\r\n }\r\n\r\n loadSymbols = e => {\r\n let native = JSON.parse(JSON.stringify(this.props.native));\r\n const reader = new FileReader();\r\n\r\n reader.onload = e => {\r\n const localData = {\r\n inputs: [],\r\n outputs: [],\r\n markers: []\r\n// counter: [],\r\n// timer: [],\r\n// dbs: []\r\n };\r\n let text = reader.result;\r\n\r\n text = text.split('126,');\r\n text.forEach(line => {\r\n const typ = line.slice(23, 29).replace(/( )/g, '');\r\n\r\n const d = {\r\n Name: line.slice(0, 23).replace(/( ){2,}/g, ''),\r\n Address: line.slice(29, 36).replace(/( )/g, ''),\r\n Type: line.slice(36, 41).replace(/( )/g, ''),\r\n Description: line.slice(46, 126).replace(/( ){2,}/, ''),\r\n Unit: '',\r\n// Role: '',\r\n// Room: '',\r\n poll: true,\r\n RW: false,\r\n WP: false\r\n };\r\n\r\n// if (typ == 'E' || typ == 'EB' ||typ == 'EW' ||typ == 'ED'||typ == 'PEB'||typ == 'PEW'||typ == 'PED')data.inputs.push(d);\r\n// if (typ == 'A' || typ == 'AB' ||typ == 'AW' ||typ == 'AD'||typ == 'PAB'||typ == 'PAW'||typ == 'PAD')data.outputs.push(d);\r\n if (typ === 'E' || typ === 'EB' || typ === 'EW' || typ === 'ED') localData.inputs.push(d);\r\n if (typ === 'A' || typ === 'AB' || typ === 'AW' || typ === 'AD') localData.outputs.push(d);\r\n if (typ === 'M' || typ === 'MB' || typ === 'MW' || typ === 'MD') localData.markers.push(d);\r\n// if (typ == 'C')data.counter.push(d);\r\n// if (typ == 'T')data.timer.push(d);\r\n// if (typ == 'DB')data.dbs.push(d);\r\n });\r\n\r\n ['inputs', 'outputs', 'markers'].forEach(table => {\r\n native[table] = localData[table];\r\n });\r\n this.props.changeNative(native);\r\n };\r\n\r\n reader.readAsText(e[0], 'ISO-8859-1');\r\n }\r\n\r\n addDb = e => {\r\n let native = JSON.parse(JSON.stringify(this.props.native));\r\n const reader = new FileReader();\r\n\r\n reader.onload = e => {\r\n setTimeout(function () {\r\n const text = reader.result;\r\n const changes = {\r\n inputs: false,\r\n outputs: false,\r\n markers: false,\r\n dbs: false\r\n };\r\n const newParts = {\r\n inputs: native.inputs || [],\r\n outputs: native.outputs || [],\r\n markers: native.markers || [],\r\n dbs: native.dbs || []\r\n };\r\n\r\n if (text.indexOf('Leseanforderung') !== -1) {\r\n // Graphpic format\r\n const lines = text.replace(/\\r\\n/g, '\\n').split('\\n');\r\n const mapping = {\r\n 'Name': {attr: 'Name'},\r\n 'Typ': {attr: ''},\r\n 'Operand': {attr: 'Address', process: f => {\r\n // DB 504.DBW 1462 => DB504 1462\r\n f = f.trim();\r\n const db = f.match(/^DB (\\d+)/);\r\n if (!db) {\r\n // M\r\n // MB\r\n let m = f.match(/^MB? (\\d+)\\.?(\\d+)?$/);\r\n if (m) {\r\n return 'M ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n } else {\r\n m = f.match(/^AB? (\\d+)\\.?(\\d+)?$/);\r\n if (m) {\r\n return 'OUT ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n } else {\r\n m = f.match(/^EB? (\\d+)\\.?(\\d+)?$/);\r\n if (m) {\r\n return 'IN ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n } else {\r\n return f;\r\n }\r\n }\r\n }\r\n }\r\n\r\n const offset = f.match(/(\\d+).?(\\d+)?$/);\r\n if (db && offset) {\r\n return `DB${db[1]} ${offset[1]}${offset[2] !== undefined ? '.' + offset[2] : ''}`;\r\n } else {\r\n return f;\r\n }\r\n }},\r\n 'SPS-Format': {attr: 'Type', process: function (f) {return f;} },\r\n 'Byteanzahl': {attr: 'Length', process: function (f) {return parseInt(f, 10);} },\r\n 'Zugriff': {attr: 'RW', process: function (f) {return f !== 'read';} },\r\n 'Leseanforderung': {attr: 'poll', process: function (f) {return f === 'zyklisch';} },\r\n 'AktZeit (ms)': {attr: ''},\r\n 'Kommentar': {attr: 'Description'},\r\n 'Clients (Anzahl)': {attr: ''}\r\n };\r\n // First line\r\n // \"Name\",\"Typ\",\"Operand\",\"SPS-Format\",\"Byteanzahl\",\"Zugriff\",\"Leseanforderung\",\"AktZeit (ms)\",\"Kommentar\",\"Clients (Anzahl)\"\r\n let sFields = lines[0].split(',');\r\n // create mapping\r\n const fields = [];\r\n for (let m = 0; m < sFields.length; m++) {\r\n sFields[m] = sFields[m].replace(/\"/g, '');\r\n fields.push(mapping[sFields[m]]);\r\n }\r\n for (let l = 1; l < lines.length; l++) {\r\n lines[l] = lines[l].trim();\r\n if (!lines[l]) continue;\r\n sFields = lines[l].trim().split(',');\r\n let obj = {\r\n Type: 'ARRAY',\r\n Unit: '',\r\n Role: '',\r\n Room: '',\r\n poll: true,\r\n RW: false,\r\n WP: false\r\n };\r\n for (let f = 0; f < fields.length; f++) {\r\n if (!fields[f].attr) {\r\n continue;\r\n }\r\n if (!sFields[f]) {\r\n console.log('error');\r\n break;\r\n }\r\n sFields[f] = sFields[f].replace(/\"/g, '');\r\n obj[fields[f].attr] = fields[f].process ? fields[f].process(sFields[f]) : sFields[f];\r\n\r\n if (obj.Name.match(/^@/)) {\r\n obj = null;\r\n break;\r\n }\r\n }\r\n if (obj) {\r\n if (obj.Type === 'BYTE' && obj.Length !== 1) {\r\n obj.Type = 'ARRAY';\r\n }\r\n if (obj.Type === 'CHAR') {\r\n obj.Type = 'STRING';\r\n }\r\n if (obj.Type === 'BYTE' || obj.Type === 'BOOL' || obj.Type === 'INT') {\r\n obj.Length = '';\r\n }\r\n let _attr;\r\n if (obj.Address.match(/^DB/)) {\r\n _attr = 'dbs';\r\n } else if (obj.Address.match(/^IN/)) {\r\n obj.Address = obj.Address.replace(/^IN\\s?/, '');\r\n _attr = 'inputs';\r\n } else if (obj.Address.match(/^OUT/)) {\r\n _attr = 'outputs';\r\n obj.Address = obj.Address.replace(/^OUT\\s?/, '');\r\n } else if (obj.Address.match(/^M/)) {\r\n _attr = 'markers';\r\n obj.Address = obj.Address.replace(/^M\\s?/, '');\r\n } else {\r\n console.error('Unknown TYPE: ' + obj.Address);\r\n continue;\r\n }\r\n // try to find same address\r\n for (let aaa = 0; aaa < newParts[_attr].length; aaa++) {\r\n if (newParts[_attr][aaa].Address === obj.Address) {\r\n newParts[_attr][aaa] = obj;\r\n changes[_attr] = true;\r\n obj = null;\r\n break;\r\n }\r\n }\r\n if (obj) {\r\n changes[_attr] = true;\r\n newParts[_attr].push(obj);\r\n }\r\n }\r\n }\r\n } else {\r\n const mm = text.match(/(DB)[0-9]+\\s-\\s/g);\r\n const db = mm ? mm[0].replace(' - ', '') : '';\r\n const vv = text.split('STRUCT');\r\n\r\n const struck = vv[1] ? vv[1].split('=')[0].split('\\n') : [];\r\n\r\n struck.forEach((item) => {\r\n if (item.length > 10) {\r\n const x = item.split(/\\s+/g);\r\n x.shift();\r\n\r\n let obj = {\r\n Address: db + ' ' + x.shift(),\r\n Name: x.shift(),\r\n Type: x.shift(),\r\n dec: x.shift(),\r\n Description: x.join(' '),\r\n Unit: '',\r\n Role: '',\r\n Room: '',\r\n poll: true,\r\n RW: false,\r\n WP: false\r\n };\r\n\r\n // try to find same address\r\n for (let aaa = 0; aaa < newParts.dbs.length; aaa++) {\r\n if (newParts.dbs[aaa].Address === obj.Address) {\r\n newParts.dbs[aaa] = obj;\r\n changes.dbs = true;\r\n obj = null;\r\n break;\r\n }\r\n }\r\n if (obj) {\r\n changes.dbs = true;\r\n newParts.dbs.push(obj);\r\n }\r\n }\r\n });\r\n }\r\n for (const attr in newParts) {\r\n if (!newParts.hasOwnProperty(attr)) {\r\n continue;\r\n }\r\n newParts[attr].sort((a, b) => {\r\n const aDB = a.Address.match(/^D?B?\\s?(\\d+)/);\r\n const bDB = b.Address.match(/^D?B?\\s?(\\d+)/);\r\n if (!aDB) return -1;\r\n if (!bDB) return 1;\r\n if (parseInt(aDB[1], 10) > parseInt(bDB[1], 10)) return 1;\r\n if (parseInt(aDB[1], 10) < parseInt(bDB[1], 10)) return -1;\r\n const aOffset = a.Address.match(/\\s(\\d+).?(\\d+)?$/);\r\n const bOffset = b.Address.match(/\\s(\\d+).?(\\d+)?$/);\r\n if (!aOffset) return -1;\r\n if (!bOffset) return 1;\r\n if (parseInt(aOffset[1], 10) > parseInt(bOffset[1], 10)) return 1;\r\n if (parseInt(aOffset[1], 10) < parseInt(bOffset[1], 10)) return -1;\r\n if (aOffset[2] === undefined && bOffset[2] !== undefined) return 1;\r\n if (bOffset[2] === undefined && aOffset[2] !== undefined) return -1;\r\n if (aOffset[2] === undefined && bOffset[2] === undefined) return 0;\r\n if (parseInt(aOffset[2], 10) > parseInt(bOffset[2], 10)) return 1;\r\n if (parseInt(aOffset[2], 10) < parseInt(bOffset[1], 10)) return -1;\r\n return 0;\r\n });\r\n }\r\n if (changes.dbs) {\r\n native.dbs = newParts.dbs;\r\n }\r\n if (changes.inputs) {\r\n native.inputs = newParts.inputs;\r\n }\r\n if (changes.outputs) {\r\n native.outputs = newParts.outputs;\r\n }\r\n if (changes.markers) {\r\n native.markers = newParts.markers;\r\n }\r\n console.log(native);\r\n //this.props.changeNative(native);\r\n }, 200);\r\n };\r\n\r\n reader.readAsText(e[0], 'ISO-8859-1');\r\n }\r\n}\r\n\r\nOptions.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default withStyles(styles)(Options);\r\n","import { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport { tsv2json, json2tsv } from 'tsv-json';\r\nimport { useSnackbar } from 'notistack';\r\nimport AceEditor from \"react-ace\";\r\nimport copy from 'copy-to-clipboard';\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\n\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\nimport SaveIcon from '@material-ui/icons/Save';\r\nimport FileCopyIcon from '@material-ui/icons/FileCopy';\r\n\r\nconst styles = theme => ({\r\n tsvEditor: {\r\n width: '100%',\r\n height: 400\r\n },\r\n tsvEditorTextarea: {\r\n fontFamily: 'monospace'\r\n }\r\n});\r\n\r\nconst TsvDialog = props => {\r\n const [tsv, setTsv] = useState('');\r\n useEffect(() => {\r\n let tsvResult = [];\r\n tsvResult.push(props.fields.map(field => field.name));\r\n props.data.forEach(item =>\r\n tsvResult.push(props.fields.map(field => item[field.name] !== undefined && item[field.name] !== null ? item[field.name].toString() : ''))\r\n );\r\n setTsv(json2tsv(tsvResult));\r\n }, [props.open]); // eslint-disable-line react-hooks/exhaustive-deps\r\n const { enqueueSnackbar } = useSnackbar();\r\n\r\n if (!props.open) {\r\n return null;\r\n }\r\n\r\n const saveTsv = () => {\r\n let data = tsv2json(tsv.endsWith('\\n') ? tsv : tsv + '\\n');\r\n let fields = data.shift();\r\n let success = true;\r\n let errors = [];\r\n for (let index in props.fields) {\r\n if (props.fields[index].name !== fields[index]) {\r\n errors.push(<>No field {props.fields[index].name} in position {parseInt(index) + 1}!);\r\n success = false;\r\n }\r\n }\r\n\r\n data = data.map((itemValues, itemIndex) => {\r\n let item = {};\r\n for (let index in props.fields) {\r\n if (props.fields[index].type === 'select' && !props.fields[index].options.map(option => option.value).includes(itemValues[index])) {\r\n errors.push(<>Value {itemValues[index]} is wrong for field {props.fields[index].name} in position {parseInt(itemIndex) + 1}!);\r\n success = false;\r\n }\r\n if (props.fields[index].type === 'checkbox') {\r\n itemValues[index] = itemValues[index] === 'true';\r\n }\r\n item[props.fields[index].name] = itemValues[index];\r\n }\r\n return item;\r\n });\r\n\r\n if (!success) {\r\n enqueueSnackbar(
{errors.map((error, index) =>
{error}
)}
, { variant: 'error' });\r\n return;\r\n }\r\n props.save(data);\r\n props.onClose();\r\n };\r\n\r\n return \r\n {I18n.t('Edit data as TSV')}\r\n \r\n {I18n.t('You can copy, paste and edit data as TSV.')}\r\n
\r\n setTsv(e)}\r\n height=\"400px\"\r\n showPrintMargin={false}\r\n value={tsv}\r\n className={props.classes.tsvEditor}\r\n width=\"100%\"\r\n setOptions={{firstLineNumber: 0}}\r\n mode={null}\r\n />\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n};\r\n\r\nTsvDialog.propTypes = {\r\n open: PropTypes.bool,\r\n onClose: PropTypes.func,\r\n classes: PropTypes.object,\r\n save: PropTypes.func,\r\n fields: PropTypes.array,\r\n data: PropTypes.array\r\n};\r\n\r\nexport default withStyles(styles)(TsvDialog);","import PropTypes from 'prop-types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\n\r\nconst DeleteAllDialog = (props) => {\r\n return props.open ? \r\n {I18n.t('Delete all items')}\r\n \r\n {I18n.t('Are you sure to delete all items?')}\r\n \r\n \r\n \r\n \r\n \r\n : null;\r\n}\r\n\r\nDeleteAllDialog.propTypes = {\r\n open: PropTypes.bool,\r\n action: PropTypes.func,\r\n onClose: PropTypes.func,\r\n classes: PropTypes.object,\r\n}\r\n\r\nexport default DeleteAllDialog;","import { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\n\r\nconst DeleteDialog = (props) => {\r\n const [disableWarnings, setDisableWarnings] = useState(false);\r\n useEffect(() => {\r\n setDisableWarnings(false);\r\n }, [props.open]);\r\n\r\n return props.open ? \r\n {I18n.t('Delete item')}\r\n \r\n {I18n.t('Are you sure to delete item with address \"%s\"?', props.item._address)}\r\n setDisableWarnings(e.target.checked)}\r\n />}/>\r\n \r\n \r\n \r\n \r\n \r\n : null;\r\n}\r\n\r\nDeleteDialog.propTypes = {\r\n open: PropTypes.bool,\r\n onClose: PropTypes.func,\r\n classes: PropTypes.object,\r\n action: PropTypes.func,\r\n item: PropTypes.object,\r\n}\r\n\r\nexport default DeleteDialog;","import { useState, useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport Table from '@material-ui/core/Table';\r\nimport TableHead from '@material-ui/core/TableHead';\r\nimport TableBody from '@material-ui/core/TableBody';\r\nimport TableRow from '@material-ui/core/TableRow';\r\nimport TableCell from '@material-ui/core/TableCell';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport Select from '@material-ui/core/Select';\r\nimport MenuItem from '@material-ui/core/MenuItem';\r\nimport TableSortLabel from '@material-ui/core/TableSortLabel';\r\nimport Tooltip from '@material-ui/core/Tooltip';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport AddIcon from '@material-ui/icons/Add';\r\nimport ImportExport from '@material-ui/icons/ImportExport';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\nimport Utils from '@iobroker/adapter-react/Components/Utils';\r\n\r\nimport ExpertIcon from '@iobroker/adapter-react/icons/IconExpert';\r\nimport TextWithIcon from '@iobroker/adapter-react/Components/TextWithIcon';\r\nimport SelectWithIcon from '@iobroker/adapter-react/Components/SelectWithIcon';\r\n\r\nimport TsvDialog from './TsvDialog';\r\nimport DeleteAllDialog from './DeleteAllDialog';\r\nimport DeleteDialog from './DeleteDialog';\r\n\r\nconst styles = theme => ({\r\n tableHeader: {\r\n whiteSpace: 'nowrap',\r\n fontWeight: 'bold',\r\n fontSize: '80%',\r\n padding: '0px 8px'\r\n },\r\n tableHeaderExtended: {\r\n color: theme.palette.type === 'dark' ? theme.palette.primary.light : theme.palette.primary.dark\r\n },\r\n tableCell: {\r\n whiteSpace: 'nowrap',\r\n fontSize: '80%',\r\n padding: '0px 8px'\r\n },\r\n tableContainer: {\r\n overflow: 'auto',\r\n maxHeight: 'calc(100vh - 180px)'\r\n },\r\n tableTextField: {\r\n fontSize: '80%'\r\n },\r\n tableSelect: {\r\n fontSize: '80%'\r\n },\r\n tableTextFieldContainer: {\r\n width: '100%'\r\n },\r\n tableSelectContainer: {\r\n width: '100%'\r\n },\r\n nonEditMode: {\r\n cursor: 'pointer'\r\n }\r\n});\r\n\r\nconst DataCell = props => {\r\n const sortedItem = props.sortedItem;\r\n const field = props.field;\r\n const editMode = props.editMode;\r\n const setEditMode = props.setEditMode;\r\n\r\n const ref = useRef();\r\n /*useEffect(() => {\r\n if (props.editMode) {\r\n // ref.current && ref.current.focus()\r\n //window.setTimeout(() => ref.current && ref.current.focus(), 1000);\r\n }\r\n }, [props.editMode])*/\r\n\r\n let item = sortedItem.item;\r\n let result;\r\n if (field.type === 'checkbox') {\r\n result = \r\n props.changeParam(sortedItem.$index, field.name, e.target.checked)}\r\n />\r\n ;\r\n } else if (field.type === 'rooms') {\r\n if (!editMode) {\r\n result = ;\r\n } else {\r\n result = props.changeParam(sortedItem.$index, field.name, value)}\r\n className={props.classes.tableSelectContainer}\r\n />;\r\n }\r\n } else if (field.type === 'select') {\r\n if (!editMode) {\r\n let option = field.options.find(option => option.value === item[field.name]);\r\n result = option ? option.title : '';\r\n } else {\r\n result = props.changeParam(sortedItem.$index, field.name, e.target.value)}\r\n className={props.classes.tableSelectContainer}\r\n >\r\n {field.options.map(option =>\r\n {option.title ? option.title : {I18n.t('Nothing')}}\r\n )}\r\n ;\r\n }\r\n } else {\r\n if (!editMode) {\r\n result = item[field.name] ? item[field.name] : null;\r\n } else {\r\n result = props.changeParam(sortedItem.$index, field.name, e.target.value)}\r\n disabled={props.getDisable(sortedItem.$index, field.name)}\r\n />;\r\n }\r\n }\r\n\r\n return {\r\n setEditMode(true);\r\n window.localStorage.setItem('Modbus.editMode', 'true');\r\n window.setTimeout(() => ref.current && ref.current.focus(), 100);\r\n }}\r\n >\r\n {result}\r\n ;\r\n}\r\n\r\nconst RegisterTable = props => {\r\n const [tsvDialogOpen, setTsvDialogOpen] = useState(false);\r\n const [editMode, setEditMode] = useState(parseInt(window.localStorage.getItem('Modbus.editMode'), 10) || 0);\r\n const [extendedMode, setExtendedMode] = useState(window.localStorage.getItem('Modbus.extendedMode') === 'true');\r\n const [deleteAllDialog, setDeleteAllDialog] = useState({\r\n open: false,\r\n action: null,\r\n });\r\n const [deleteDialog, setDeleteDialog] = useState({\r\n open: false,\r\n item: null,\r\n action: null,\r\n });\r\n\r\n let sortedData = props.getSortedData(props.data, props.orderBy, props.order);\r\n\r\n return
\r\n
\r\n \r\n props.addItem()}>\r\n \r\n \r\n \r\n \r\n setTsvDialogOpen(true)}>\r\n \r\n \r\n \r\n \r\n {\r\n window.localStorage.setItem('Modbus.extendedMode', extendedMode ? 'false' : 'true');\r\n setExtendedMode(!extendedMode);\r\n }}>\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field => {\r\n let isChecked = false;\r\n let indeterminate = false;\r\n let trueFound = false;\r\n let falseFound = false;\r\n for (let k in props.data) {\r\n if (props.data[k][field.name]) {\r\n isChecked = true;\r\n trueFound = true;\r\n } else {\r\n isChecked = false;\r\n falseFound = true;\r\n }\r\n\r\n if (trueFound && falseFound) {\r\n indeterminate = true;\r\n isChecked = false;\r\n break;\r\n }\r\n }\r\n\r\n return \r\n {field.type === 'checkbox' ?\r\n \r\n {\r\n let newData = JSON.parse(JSON.stringify(props.data));\r\n newData.forEach(item =>\r\n item[field.name] = e.target.checked);\r\n props.changeData(newData);\r\n }}\r\n />\r\n \r\n : null}\r\n {field.sorted ? {\r\n const isAsc = props.orderBy === field.name && props.order === 'asc';\r\n props.onChangeOrder(field.name, isAsc ? 'desc' : 'asc');\r\n }}\r\n >{I18n.t(field.title)} : I18n.t(field.title)}\r\n \r\n })}\r\n \r\n \r\n
\r\n setDeleteAllDialog({\r\n open: true,\r\n action: () => props.changeData([]),\r\n })}\r\n disabled={!props.data.length}\r\n >\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n {\r\n sortedData.map(sortedItem =>\r\n \r\n {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field =>\r\n setEditMode(sortedItem.$index)}\r\n {...props}\r\n />\r\n )}\r\n \r\n \r\n
\r\n {\r\n let lastTime = window.sessionStorage.getItem('disableDeleteDialogs');\r\n if (lastTime && (new Date() - new Date(lastTime)) < 1000 * 60 * 5) {\r\n props.deleteItem(sortedItem.$index);\r\n return;\r\n }\r\n setDeleteDialog({\r\n open: true,\r\n action: disableDialogs => {\r\n if (disableDialogs) {\r\n window.sessionStorage.setItem('disableDeleteDialogs', (new Date()).toISOString());\r\n }\r\n props.deleteItem(sortedItem.$index);\r\n },\r\n item: sortedItem.item\r\n })\r\n }}>\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n )\r\n }\r\n
\r\n
\r\n
\r\n {tsvDialogOpen ?\r\n {\r\n if (props.prefix) {\r\n data.forEach(line => {\r\n line.Address = (line.Address || '').toUpperCase();\r\n if (line.Address && !line.Address.startsWith(props.prefix)) {\r\n line.Address = props.prefix + line.Address;\r\n }\r\n });\r\n }\r\n props.changeData(data);\r\n }}\r\n onClose={() => setTsvDialogOpen(false)}\r\n data={props.data}\r\n fields={props.fields}\r\n /> : null\r\n }\r\n setDeleteAllDialog({\r\n open: false,\r\n action: null,\r\n })}\r\n />\r\n setDeleteDialog({\r\n open: false,\r\n action: null,\r\n item: null\r\n })}\r\n item={deleteDialog.item}\r\n />\r\n
;\r\n}\r\n\r\nRegisterTable.propTypes = {\r\n data: PropTypes.array,\r\n fields: PropTypes.array,\r\n classes: PropTypes.object,\r\n addItem: PropTypes.func,\r\n changeData: PropTypes.func,\r\n deleteItem: PropTypes.func,\r\n rooms: PropTypes.object,\r\n formulaDisabled: PropTypes.bool,\r\n getSortedData: PropTypes.func,\r\n themeType: PropTypes.string,\r\n prefix: PropTypes.string,\r\n};\r\n\r\nexport default withStyles(styles)(RegisterTable);","import {Component} from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport Paper from '@material-ui/core/Paper';\r\n\r\nimport roles from '../data/roles';\r\nimport types from '../data/types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport RegisterTable from '../Components/RegisterTable';\r\n\r\nclass BaseRegisters extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.nativeField = '';\r\n this.state = {\r\n order: window.localStorage.getItem('Modbus.order') || 'asc',\r\n orderBy: window.localStorage.getItem('Modbus.orderBy') || 'Address',\r\n };\r\n }\r\n\r\n getRooms() {\r\n const lang = I18n.getLanguage();\r\n return this.props.rooms ? Object.values(this.props.rooms).map(room => ({\r\n value: room._id,\r\n title: typeof room.common.name === 'object' ? room.common.name[lang] : room.common.name\r\n })) : [];\r\n }\r\n\r\n getFields() {\r\n let rooms = this.getRooms();\r\n rooms.unshift({value: '', title: ''});\r\n\r\n let result = [\r\n {name: 'Address', title: 'Address', type: 'text', sorted: true, width: 20},\r\n {name: 'Name', title: 'Name', type: 'text', sorted: true},\r\n {name: 'Description', title: 'Description', type: 'text', sorted: true},\r\n {name: 'Type', title: 'Type', type: 'select', options: types, sorted: true},\r\n {name: 'Length', title: 'Length', type: 'text', width: 20},\r\n {name: 'Unit', title: 'Unit', type: 'text', width: 30},\r\n {name: 'Role', title: 'Role', type: 'select', options: roles, sorted: true},\r\n {name: 'Room', title: 'Room', type: 'rooms', options: rooms, sorted: true},\r\n {name: 'poll', title: 'Poll', type: 'checkbox'},\r\n {name: 'RW', title: 'RW', type: 'checkbox', expert: true},\r\n {name: 'WP', title: 'WP', type: 'checkbox', expert: true},\r\n ]\r\n\r\n if (this.props.native.params.multiDeviceId) {\r\n result.splice(1, 0,\r\n {name: 'deviceId', title: 'Slave ID', type: 'number', sorted: true, width: 20},\r\n );\r\n }\r\n\r\n return result;\r\n }\r\n\r\n address2struct(address) {\r\n if (this.nativeField === 'dbs') {\r\n const parts = address.split(' ');\r\n const db = parseInt(parts[0].replace('DB', '').replace('db', '').trim(), 10);\r\n if (parts[1] && parts[1].includes('.')) {\r\n const a = parseFloat(parts[1]);\r\n return {db, byte: Math.floor(a), bit: (a * 10) % 10};\r\n } else {\r\n return {db, byte: parseInt(parts[1], 10)};\r\n }\r\n } else {\r\n if (address.includes('.')) {\r\n const a = parseFloat(address);\r\n return {byte: Math.floor(a), bit: (a * 10) % 10};\r\n } else {\r\n return {byte: parseInt(address, 10)};\r\n }\r\n }\r\n }\r\n\r\n struct2address(struct) {\r\n if (struct.db !== undefined) {\r\n if (struct.bit !== undefined) {\r\n return `DB${struct.db} ${struct.byte}.${struct.bit}`;\r\n } else {\r\n return `DB${struct.db} ${struct.byte}`;\r\n }\r\n } else if (struct.bit !== undefined) {\r\n return struct.byte + '.' + struct.bit;\r\n } else {\r\n return struct.byte;\r\n }\r\n }\r\n\r\n changeParam = (index, name, value) => {\r\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n data[index][name] = value;\r\n if (name === 'Type') {\r\n if (['BOOL'].includes(value)) {\r\n data[index].Length = 0.1;\r\n } else\r\n if (['', 'BYTE'].includes(value)) {\r\n data[index].Length = 1;\r\n } else\r\n if (['WORD', 'INT', 'STRING', 'S5TIME'].includes(value)) {\r\n data[index].Length = 2;\r\n } else\r\n if (['DWORD', 'DINT', 'REAL'].includes(value)) {\r\n data[index].Length = 4;\r\n } else\r\n if (['S7TIME'].includes(value)) {\r\n data[index].Length = 8;\r\n } else\r\n if (['S7STRING', 'ARRAY'].includes(value)) {\r\n data[index].Length = 32;\r\n }\r\n\r\n if (value === 'BOOL') {\r\n const struct = this.address2struct(data[index].Address);\r\n if (struct.bit === undefined) {\r\n struct.bit = 0;\r\n data[index].Address = this.struct2address(struct);\r\n }\r\n } else {\r\n const struct = this.address2struct(data[index].Address);\r\n if (struct.bit !== undefined) {\r\n if (struct.bit > 0) {\r\n struct.byte++;\r\n }\r\n delete struct.bit;\r\n\r\n data[index].Address = this.struct2address(struct);\r\n }\r\n }\r\n }\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n addItem = () => {\r\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n let newItem = {}\r\n\r\n this.getFields().forEach(field => newItem[field.name] = '');\r\n\r\n if (data.length) {\r\n let sortedData = JSON.parse(JSON.stringify(data));\r\n sortedData.sort((item1, item2) => item1.Address > item2.Address ? 1 : -1);\r\n let lastItem = sortedData[sortedData.length - 1];\r\n const struct = this.address2struct(lastItem.Address);\r\n if (lastItem.Type === 'BOOL') {\r\n struct.bit = struct.bit || 0;\r\n struct.bit++;\r\n if (struct.bit >= 8) {\r\n struct.bit = struct.bit % 8;\r\n struct.byte++;\r\n }\r\n } else {\r\n delete struct.bit;\r\n struct.byte += lastItem.Length;\r\n }\r\n\r\n if (struct.db !== undefined && struct.byte + lastItem.Length > 0xFFFF) {\r\n struct.db++;\r\n struct.byte = 0;\r\n if (lastItem.Type === 'BOOL') {\r\n struct.bit = 0;\r\n }\r\n }\r\n\r\n newItem.Address = this.struct2address(struct);\r\n newItem.Type = lastItem.Type;\r\n newItem.Length = lastItem.Length;\r\n newItem.Unit = lastItem.Unit;\r\n newItem.Role = lastItem.Role;\r\n newItem.Room = lastItem.Room;\r\n newItem.poll = lastItem.poll;\r\n newItem.RW = lastItem.RW;\r\n newItem.WP = lastItem.WP;\r\n } else {\r\n newItem.role = 'level';\r\n newItem.Type = 'BOOL';\r\n newItem.Length = '0.1';\r\n newItem.poll = true;\r\n if (this.nativeField === 'dbs') {\r\n newItem.Address = 'DB1 0.0';\r\n } else {\r\n newItem.Address = '0.0';\r\n }\r\n }\r\n data.push(newItem);\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n deleteItem = (index) => {\r\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n data.splice(index, 1);\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n changeData = (data) => {\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n getDisable = (index, name) => {\r\n return name === 'Length' &&\r\n !['STRING', 'S7STRING', 'ARRAY'].includes(this.props.native[this.nativeField][index].type);\r\n }\r\n\r\n getSortedData = (data, orderBy, order) => {\r\n this.fields = this.fields || this.getFields();\r\n\r\n data = data || this.props.native[this.nativeField];\r\n orderBy = orderBy || this.state.orderBy;\r\n order = order || this.state.order;\r\n let sortedData = [];\r\n data.forEach((item, index) => {sortedData[index] = {item, $index: index}});\r\n const field = this.fields.find(item => item.name === orderBy);\r\n\r\n sortedData.sort((sortedItem1, sortedItem2) => {\r\n let sort1;\r\n let sort2;\r\n if (orderBy === 'Address') {\r\n const a1 = this.address2struct(sortedItem1.item.Address);\r\n const a2 = this.address2struct(sortedItem2.item.Address);\r\n\r\n sort1 = 0;\r\n if (a1.db !== undefined) {\r\n sort1 = a1.db << 24;\r\n }\r\n if (a2.db !== undefined) {\r\n sort2 = a2.db << 24;\r\n }\r\n sort1 |= a1.byte << 8;\r\n sort2 |= a2.byte << 8;\r\n sort1 |= a1.bit || 0;\r\n sort2 |= a2.bit || 0;\r\n } else if (orderBy === '$index') {\r\n sort1 = sortedItem1[orderBy];\r\n sort2 = sortedItem2[orderBy];\r\n } else if (field && field.type === 'number') {\r\n sort1 = parseInt(sortedItem1.item[orderBy], 10);\r\n sort2 = parseInt(sortedItem2.item[orderBy], 10);\r\n } else {\r\n sort1 = sortedItem1.item[orderBy];\r\n sort2 = sortedItem2.item[orderBy];\r\n }\r\n return (order === 'asc' ? sort1 > sort2 : sort1 < sort2) ? 1 : -1;\r\n });\r\n\r\n return sortedData;\r\n }\r\n\r\n render() {\r\n this.fields = this.fields || this.getFields();\r\n\r\n return \r\n {\r\n this.setState({orderBy, order});\r\n window.localStorage.setItem('Modbus.orderBy', orderBy);\r\n window.localStorage.setItem('Modbus.order', order);\r\n }}\r\n />\r\n \r\n }\r\n}\r\n\r\nBaseRegisters.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n themeType: PropTypes.string,\r\n};\r\n\r\nexport default BaseRegisters;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Inputs extends BaseRegisters {\r\n nativeField = 'inputs'\r\n}\r\n\r\nInputs.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Inputs;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Outputs extends BaseRegisters {\r\n nativeField = 'outputs'\r\n}\r\n\r\nOutputs.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Outputs;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Marker extends BaseRegisters {\r\n nativeField = 'markers'\r\n}\r\n\r\nMarker.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Marker;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Dbs extends BaseRegisters {\r\n nativeField = 'dbs';\r\n}\r\n\r\nDbs.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Dbs;\r\n","import React from 'react';\r\nimport {withStyles} from '@material-ui/core/styles';\r\nimport { MuiThemeProvider } from '@material-ui/core/styles';\r\nimport { SnackbarProvider } from 'notistack';\r\n\r\nimport AppBar from '@material-ui/core/AppBar';\r\nimport Tabs from '@material-ui/core/Tabs';\r\nimport Tab from '@material-ui/core/Tab';\r\n\r\nimport GenericApp from '@iobroker/adapter-react/GenericApp';\r\nimport Loader from '@iobroker/adapter-react/Components/Loader'\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport TabOptions from './Tabs/Options';\r\nimport TabInputs from './Tabs/Inputs';\r\nimport TabOutputs from './Tabs/Outputs';\r\nimport TabMarker from './Tabs/Marker';\r\nimport TabDbs from './Tabs/DBs';\r\n\r\nconst styles = theme => ({\r\n root: {},\r\n tabContent: {\r\n padding: 10,\r\n height: 'calc(100% - 64px - 48px - 20px)',\r\n overflow: 'auto',\r\n },\r\n tabContentIFrame: {\r\n padding: 10,\r\n height: 'calc(100% - 64px - 48px - 20px - 38px)',\r\n overflow: 'auto'\r\n },\r\n tab: {\r\n width: '100%',\r\n minHeight: '100%'\r\n }\r\n});\r\n\r\nconst tabs = [\r\n {\r\n name: 'general',\r\n title: 'General',\r\n component: TabOptions,\r\n },\r\n {\r\n name: 'inputs',\r\n title: 'Inputs',\r\n component: TabInputs,\r\n },\r\n {\r\n name: 'outputs',\r\n title: 'Outputs',\r\n component: TabOutputs,\r\n },\r\n {\r\n name: 'marker',\r\n title: 'Marker',\r\n component: TabMarker,\r\n },\r\n {\r\n name: 'dbs',\r\n title: 'DBs',\r\n component: TabDbs,\r\n },\r\n]\r\n\r\nclass App extends GenericApp {\r\n constructor(props) {\r\n const extendedProps = {...props};\r\n extendedProps.encryptedFields = ['pass'];\r\n\r\n extendedProps.translations = {\r\n 'en': require('./i18n/en'),\r\n 'de': require('./i18n/de'),\r\n 'ru': require('./i18n/ru'),\r\n 'pt': require('./i18n/pt'),\r\n 'nl': require('./i18n/nl'),\r\n 'fr': require('./i18n/fr'),\r\n 'it': require('./i18n/it'),\r\n 'es': require('./i18n/es'),\r\n 'pl': require('./i18n/pl'),\r\n 'zh-cn': require('./i18n/zh-cn'),\r\n };\r\n\r\n super(props, extendedProps);\r\n this.state.moreLoaded = false;\r\n this.state.rooms = null;\r\n }\r\n\r\n onConnectionReady() {\r\n super.onConnectionReady()\r\n this.socket.getForeignObjects('enum.rooms.*', 'enum')\r\n .then(rooms =>\r\n this.setState({moreLoaded: true, rooms}));\r\n }\r\n\r\n getSelectedTab() {\r\n const selectedTab = this.state.selectedTab;\r\n if (!selectedTab) {\r\n return 0;\r\n } else {\r\n return tabs.findIndex(tab => tab.name === selectedTab);\r\n }\r\n }\r\n\r\n render() {\r\n if (!this.state.loaded || !this.state.moreLoaded) {\r\n return \r\n \r\n ;\r\n }\r\n\r\n return \r\n \r\n
\r\n \r\n this.selectTab(tabs[index].name, index)}\r\n variant=\"scrollable\" scrollButtons=\"auto\">\r\n {tabs.map(tab => {tab.icon}{I18n.t(tab.title)} : I18n.t(tab.title)}\r\n data-name={tab.name}\r\n key={tab.name}\r\n title={tab.tooltip ? I18n.t(tab.tooltip) : undefined}\r\n />)}\r\n \r\n \r\n
\r\n {tabs.map((tab, index) => {\r\n const TabComponent = tab.component;\r\n if (this.state.selectedTab) {\r\n if (this.state.selectedTab !== tab.name) {\r\n return null;\r\n }\r\n } else {\r\n if (index !== 0) {\r\n return null;\r\n }\r\n }\r\n return this.setState({errorText: (text || text === 0) && typeof text !== 'string' ? text.toString() : text})}\r\n onLoad={native => this.onLoadConfig(native)}\r\n instance={this.instance}\r\n adapterName={this.adapterName}\r\n changed={this.state.changed}\r\n onChange={(attr, value, cb) => this.updateNativeValue(attr, value, cb)}\r\n changeNative={value => this.setState({native: value, changed: this.getIsChanged(value)})}\r\n rooms={this.state.rooms}\r\n />\r\n })}\r\n {/*
{JSON.stringify(this.state.native, null, 2)}
*/}\r\n
\r\n {this.renderError()}\r\n {this.renderSaveCloseButtons()}\r\n
\r\n
\r\n
;\r\n }\r\n}\r\n\r\nexport default withStyles(styles)(App);\r\n","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read http://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.1/8 is considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport function register(config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit http://bit.ly/CRA-PWA'\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all ' +\r\n 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister();\r\n });\r\n }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport * as Sentry from '@sentry/browser';\r\nimport * as SentryIntegrations from '@sentry/integrations';\r\nimport { MuiThemeProvider} from '@material-ui/core/styles';\r\nimport './index.css';\r\nimport App from './App';\r\nimport * as serviceWorker from './serviceWorker';\r\nimport {version} from '../package.json';\r\nimport theme from '@iobroker/adapter-react/Theme';\r\nimport Utils from '@iobroker/adapter-react/Components/Utils';\r\n\r\nwindow.adapterName = 's7';\r\nlet themeName = Utils.getThemeName();\r\n\r\nconsole.log(`iobroker.${window.adapterName}@${version} using theme \"${themeName}\"`);\r\n\r\nfunction build() {\r\n return ReactDOM.render(\r\n \r\n {\r\n themeName = _theme;\r\n build();\r\n }}\r\n />\r\n ,\r\n document.getElementById('root')\r\n );\r\n}\r\n\r\nif (false && window.location.host !== 'localhost:3000') {\r\n Sentry.init({\r\n dsn: 'https://5ad729dbed504d15aa8bde423cae9a8e@sentry.iobroker.net/57',\r\n release: `iobroker.${window.adapterName}@${version}`,\r\n integrations: [\r\n new SentryIntegrations.Dedupe()\r\n ]\r\n });\r\n}\r\n\r\nbuild();\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: http://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["Tabs/Options.js","Components/TsvDialog.js","Components/DeleteAllDialog.js","Components/DeleteDialog.js","Components/RegisterTable.js","Tabs/BaseRegisters.js","Tabs/Inputs.js","Tabs/Outputs.js","Tabs/Marker.js","Tabs/DBs.js","App.js","serviceWorker.js","index.js"],"names":["FileInput","props","enqueueSnackbar","useSnackbar","onDrop","useCallback","acceptedFiles","onChange","I18n","t","useDropzone","accept","getRootProps","getInputProps","isDragActive","FormControl","style","padding","paddingRight","Typography","variant","gutterBottom","label","className","classes","fileInput","backgroundColor","cursor","Options","inputDisabled","input","inputDisplay","native","params","slot","includes","name","timeFormat","changeParam","value","JSON","parse","stringify","localTSAP","remoteTSAP","rack","changeNative","loadSymbols","e","reader","FileReader","onload","localData","inputs","outputs","markers","text","result","split","forEach","line","typ","slice","replace","d","Name","Address","Type","Description","Unit","poll","RW","WP","push","table","readAsText","addDb","setTimeout","changes","dbs","newParts","indexOf","lines","mapping","attr","process","f","db","trim","match","m","parseInt","undefined","offset","sFields","fields","length","l","obj","Role","Room","console","log","Length","_attr","error","aaa","mm","vv","item","x","shift","dec","join","hasOwnProperty","sort","a","b","aDB","bDB","aOffset","bOffset","state","this","title","Paper","optionsContainer","header","Grid","container","spacing","direction","map","type","optionContainer","FormControlLabel","control","Checkbox","optionsCheckbox","disabled","checked","getValue","target","dimension","InputLabel","shrink","Select","optionsSelect","displayEmpty","options","option","MenuItem","top","bottom","optionsLabel","Input","width","toString","toUpperCase","marginLeft","TextField","optionsTextField","InputProps","endAdornment","InputAdornment","position","Box","tab","xs","md","optionsGrid","getInputsBlock","connectionInputs","getImportsBlock","generalInputs","Component","withStyles","theme","marginBottom","display","textAlign","fontSize","height","border","borderRadius","marginTop","tsvEditor","tsvEditorTextarea","fontFamily","useState","tsv","setTsv","useEffect","tsvResult","field","data","json2tsv","open","Dialog","onClose","maxWidth","fullWidth","DialogTitle","DialogContent","DialogContentText","showPrintMargin","setOptions","firstLineNumber","mode","DialogActions","Button","color","onClick","copy","startIcon","tsv2json","endsWith","success","errors","index","itemValues","itemIndex","save","DeleteAllDialog","action","DeleteDialog","disableWarnings","setDisableWarnings","_address","DataCell","sortedItem","editMode","setEditMode","ref","useRef","Tooltip","inputRef","tableCheckbox","getDisable","$index","list","rooms","allowNone","dense","themeType","inputProps","tableSelect","tableSelectContainer","find","tableTextFieldContainer","tableTextField","TableCell","Utils","clsx","tableCell","nonEditMode","window","localStorage","setItem","current","focus","tableHeader","whiteSpace","fontWeight","tableHeaderExtended","palette","primary","light","dark","tableContainer","overflow","maxHeight","tsvDialogOpen","setTsvDialogOpen","getItem","extendedMode","setExtendedMode","deleteAllDialog","setDeleteAllDialog","deleteDialog","setDeleteDialog","sortedData","getSortedData","orderBy","order","IconButton","addItem","Table","size","stickyHeader","TableHead","TableRow","filter","expert","formulaDisabled","isChecked","indeterminate","trueFound","falseFound","k","tooltip","newData","changeData","sorted","TableSortLabel","active","isAsc","onChangeOrder","TableBody","hover","lastTime","sessionStorage","Date","deleteItem","disableDialogs","toISOString","prefix","startsWith","BaseRegisters","nativeField","struct","address2struct","bit","struct2address","byte","newItem","getFields","item1","item2","lastItem","role","splice","sortedItem1","sortedItem2","sort1","sort2","a1","a2","lang","getLanguage","Object","values","room","_id","common","getRooms","unshift","types","roles","multiDeviceId","address","parts","parseFloat","Math","floor","setState","Inputs","propTypes","PropTypes","object","isRequired","instance","number","adapterName","string","onError","func","onLoad","changed","bool","socket","Outputs","Marker","Dbs","tabs","component","TabOptions","TabInputs","TabOutputs","TabMarker","App","extendedProps","encryptedFields","translations","require","moreLoaded","getForeignObjects","then","selectedTab","findIndex","loaded","background","default","AppBar","Tabs","getSelectedTab","selectTab","scrollButtons","Tab","icon","isIFrame","tabContentIFrame","tabContent","TabComponent","errorText","onLoadConfig","cb","updateNativeValue","getIsChanged","renderError","renderSaveCloseButtons","GenericApp","root","minHeight","Boolean","location","hostname","themeName","getThemeName","version","build","ReactDOM","render","onThemeChange","_theme","document","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"k0wCA+DIA,EAAY,SAAUC,GACtB,IAAQC,EAAoBC,cAApBD,gBACFE,EAASC,uBAAY,SAAAC,GACvBL,EAAMM,SAASD,GACfJ,EAAgBM,IAAKC,EA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,MAChF0M,MAAO,EAAKvH,MAAMuH,OAZb1E,EAAInI,WAiBpBuF,KAAK8R,cACL9R,KAAK+R,gCApDP,cAAC,IAAD,CAAkBzO,MAAOtD,KAAKD,MAAMuD,MAApC,SACH,cAAC,IAAD,CAAQA,MAAOtD,KAAKD,MAAM0H,kB,GA1CxBuK,KAoGH3O,gBAlJA,SAAAC,GAAK,MAAK,CACrB2O,KAAM,GACNV,WAAY,CACRjY,QAAS,GACTqK,OAAQ,kCACRwF,SAAU,QAEdmI,iBAAkB,CACdhY,QAAS,GACTqK,OAAQ,yCACRwF,SAAU,QAEdvG,IAAK,CACDX,MAAO,OACPiQ,UAAW,WAoIJ7O,CAAmB4M,ICzJdkC,QACW,cAA7B9J,OAAO+J,SAASC,UAEe,UAA7BhK,OAAO+J,SAASC,UAEhBhK,OAAO+J,SAASC,SAASvU,MACvB,2D,mCCNNuK,OAAO2G,YAAc,KACrB,IAAIsD,GAAYrK,KAAMsK,eAEtB7T,QAAQC,IAAR,mBAAwB0J,OAAO2G,YAA/B,YAA8CwD,KAA9C,yBAAsEF,GAAtE,MAEA,SAASG,IACL,OAAOC,IAASC,OACZ,cAAC,IAAD,CAAkBrP,MAAOA,KAAMgP,IAA/B,SACI,cAAC,GAAD,CACIM,cAAe,SAAAC,GACXP,GAAYO,EACZJ,SAIZK,SAASC,eAAe,SAchCN,GDwFM,kBAAmBO,WACrBA,UAAUC,cAAcC,MAAM1C,MAAK,SAAA2C,GACjCA,EAAaC,kB","file":"static/js/main.3ab35ae4.chunk.js","sourcesContent":["import {Component, useCallback} from 'react';\r\nimport {useDropzone} from 'react-dropzone';\r\nimport { useSnackbar } from 'notistack';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport Typography from '@material-ui/core/Typography';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport Select from '@material-ui/core/Select';\r\nimport MenuItem from '@material-ui/core/MenuItem';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport FormControl from '@material-ui/core/FormControl';\r\nimport Input from '@material-ui/core/Input';\r\nimport InputLabel from '@material-ui/core/InputLabel';\r\nimport InputAdornment from '@material-ui/core/InputAdornment';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport Paper from '@material-ui/core/Paper';\r\nimport Box from '@material-ui/core/Box';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport connectionInputs from '../data/optionsConnection';\r\nimport generalInputs from '../data/optionsGeneral';\r\n\r\nconst styles = theme => ({\r\n optionsSelect: {\r\n width: 280\r\n },\r\n optionsTextField: {\r\n width: 280\r\n },\r\n optionContainer: {\r\n },\r\n optionsContainer: {\r\n width: `calc(100% - ${theme.spacing(4)}px)`,\r\n padding: theme.spacing(2),\r\n marginBottom: 20,\r\n display: 'inline-block',\r\n textAlign: 'left'\r\n },\r\n optionsGrid: {\r\n textAlign: 'center',\r\n padding: theme.spacing(2),\r\n },\r\n optionsLabel: {\r\n fontSize: 12,\r\n },\r\n header: {\r\n fontSize: 24,\r\n },\r\n fileInput: {\r\n textAlign: 'center',\r\n display: 'inline-block',\r\n height: 80,\r\n width: 200,\r\n border: '2px dashed #777',\r\n borderRadius: 10,\r\n marginTop: 12,\r\n padding: 4\r\n }\r\n});\r\n\r\nlet FileInput = function (props) {\r\n const { enqueueSnackbar } = useSnackbar();\r\n const onDrop = useCallback(acceptedFiles => {\r\n props.onChange(acceptedFiles);\r\n enqueueSnackbar(I18n.t('Data updated'));\r\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\r\n\r\n const {getRootProps, getInputProps, isDragActive} = useDropzone({onDrop, accept: props.accept});\r\n\r\n return \r\n { I18n.t(props.label)}\r\n
\r\n \r\n {\r\n isDragActive ?\r\n

{I18n.t('Drop the file here ...')}

:\r\n

{I18n.t(`Drag 'n' drop file here, or click to select file`)}

\r\n }\r\n
\r\n
;\r\n};\r\n\r\nclass Options extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n };\r\n }\r\n\r\n getValue(name) {\r\n if (name === 's7logo') {\r\n return this.props.native.params.slot === null;\r\n }\r\n return this.props.native.params[name];\r\n }\r\n\r\n inputDisabled = input => {\r\n return false;\r\n }\r\n\r\n inputDisplay = input => {\r\n if (this.props.native.params.slot === null) {\r\n if (['rack', 'slot'].includes(input.name)) {\r\n return false;\r\n }\r\n } else {\r\n if (['localTSAP', 'remoteTSAP'].includes(input.name)) {\r\n return false;\r\n }\r\n }\r\n if (input.name === 'timeOffset') {\r\n return ['summer', 'offset'].includes(this.props.native.params.timeFormat);\r\n }\r\n return true;\r\n }\r\n\r\n getInputsBlock(inputs, title) {\r\n return \r\n {I18n.t(title)}\r\n \r\n {inputs.map(input => {\r\n if (!this.inputDisplay(input)) {\r\n return null;\r\n }\r\n if (input.type === 'checkbox') {\r\n return \r\n this.changeParam(input.name, e.target.checked)}\r\n />}/> {input.dimension ? I18n.t(input.dimension) : null};\r\n } else if (input.type === 'select') {\r\n return \r\n \r\n {I18n.t(input.title)}\r\n this.changeParam(input.name, e.target.value)}\r\n >\r\n {input.options.map(option =>\r\n {option.title}\r\n )}\r\n \r\n {input.dimension ? I18n.t(input.dimension) : null}\r\n ;\r\n } else if (input.type === 'hex') {\r\n let value = parseInt(this.getValue(input.name)) ? parseInt(this.getValue(input.name)) : 0;\r\n let top = (value >> 8) & 0xFF;\r\n let bottom = value & 0xFF;\r\n\r\n return \r\n {I18n.t(input.title)}\r\n {\r\n if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\r\n return;\r\n }\r\n this.changeParam(input.name, (parseInt(e.target.value, 16) << 8) | bottom);\r\n }}\r\n />\r\n {\r\n if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\r\n return;\r\n }\r\n this.changeParam(input.name, (top << 8) | parseInt(e.target.value, 16));\r\n }}\r\n />\r\n ;\r\n } else {\r\n return {I18n.t(input.dimension)} : null\r\n }}\r\n onChange={e => this.changeParam(input.name, e.target.value)}\r\n />;\r\n }\r\n })}\r\n \r\n ;\r\n }\r\n\r\n getImportsBlock() {\r\n return <>\r\n {I18n.t('Import')}\r\n \r\n \r\n \r\n \r\n ;\r\n }\r\n\r\n render() {\r\n return
\r\n \r\n \r\n {this.getInputsBlock(connectionInputs, 'PLC Connection')}\r\n {this.getImportsBlock()}\r\n \r\n {this.getInputsBlock(generalInputs, 'General')}\r\n \r\n
;\r\n }\r\n\r\n changeParam = (name, value) => {\r\n let native = JSON.parse(JSON.stringify(this.props.native));\r\n if (name === 's7logo') {\r\n if (value) {\r\n native.params.localTSAP = '';\r\n native.params.remoteTSAP = '';\r\n native.params.rack = null;\r\n native.params.slot = null;\r\n } else {\r\n native.params.localTSAP = null;\r\n native.params.remoteTSAP = null;\r\n native.params.rack = '';\r\n native.params.slot = '';\r\n }\r\n } else {\r\n native.params[name] = value;\r\n }\r\n this.props.changeNative(native);\r\n }\r\n\r\n loadSymbols = e => {\r\n let native = JSON.parse(JSON.stringify(this.props.native));\r\n const reader = new FileReader();\r\n\r\n reader.onload = e => {\r\n const localData = {\r\n inputs: [],\r\n outputs: [],\r\n markers: []\r\n// counter: [],\r\n// timer: [],\r\n// dbs: []\r\n };\r\n let text = reader.result;\r\n\r\n text = text.split('126,');\r\n text.forEach(line => {\r\n const typ = line.slice(23, 29).replace(/( )/g, '');\r\n\r\n const d = {\r\n Name: line.slice(0, 23).replace(/( ){2,}/g, ''),\r\n Address: line.slice(29, 36).replace(/( )/g, ''),\r\n Type: line.slice(36, 41).replace(/( )/g, ''),\r\n Description: line.slice(46, 126).replace(/( ){2,}/, ''),\r\n Unit: '',\r\n// Role: '',\r\n// Room: '',\r\n poll: true,\r\n RW: false,\r\n WP: false\r\n };\r\n\r\n// if (typ == 'E' || typ == 'EB' ||typ == 'EW' ||typ == 'ED'||typ == 'PEB'||typ == 'PEW'||typ == 'PED')data.inputs.push(d);\r\n// if (typ == 'A' || typ == 'AB' ||typ == 'AW' ||typ == 'AD'||typ == 'PAB'||typ == 'PAW'||typ == 'PAD')data.outputs.push(d);\r\n if (typ === 'E' || typ === 'EB' || typ === 'EW' || typ === 'ED') localData.inputs.push(d);\r\n if (typ === 'A' || typ === 'AB' || typ === 'AW' || typ === 'AD') localData.outputs.push(d);\r\n if (typ === 'M' || typ === 'MB' || typ === 'MW' || typ === 'MD') localData.markers.push(d);\r\n// if (typ == 'C')data.counter.push(d);\r\n// if (typ == 'T')data.timer.push(d);\r\n// if (typ == 'DB')data.dbs.push(d);\r\n });\r\n\r\n ['inputs', 'outputs', 'markers'].forEach(table => {\r\n native[table] = localData[table];\r\n });\r\n this.props.changeNative(native);\r\n };\r\n\r\n reader.readAsText(e[0], 'ISO-8859-1');\r\n }\r\n\r\n addDb = e => {\r\n let native = JSON.parse(JSON.stringify(this.props.native));\r\n const reader = new FileReader();\r\n\r\n reader.onload = e => {\r\n setTimeout(function () {\r\n const text = reader.result;\r\n const changes = {\r\n inputs: false,\r\n outputs: false,\r\n markers: false,\r\n dbs: false\r\n };\r\n const newParts = {\r\n inputs: native.inputs || [],\r\n outputs: native.outputs || [],\r\n markers: native.markers || [],\r\n dbs: native.dbs || []\r\n };\r\n\r\n if (text.indexOf('Leseanforderung') !== -1) {\r\n // Graphpic format\r\n const lines = text.replace(/\\r\\n/g, '\\n').split('\\n');\r\n const mapping = {\r\n 'Name': {attr: 'Name'},\r\n 'Typ': {attr: ''},\r\n 'Operand': {attr: 'Address', process: f => {\r\n // DB 504.DBW 1462 => DB504 1462\r\n f = f.trim();\r\n const db = f.match(/^DB (\\d+)/);\r\n if (!db) {\r\n // M\r\n // MB\r\n let m = f.match(/^MB? (\\d+)\\.?(\\d+)?$/);\r\n if (m) {\r\n return 'M ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n } else {\r\n m = f.match(/^AB? (\\d+)\\.?(\\d+)?$/);\r\n if (m) {\r\n return 'OUT ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n } else {\r\n m = f.match(/^EB? (\\d+)\\.?(\\d+)?$/);\r\n if (m) {\r\n return 'IN ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n } else {\r\n return f;\r\n }\r\n }\r\n }\r\n }\r\n\r\n const offset = f.match(/(\\d+).?(\\d+)?$/);\r\n if (db && offset) {\r\n return `DB${db[1]} ${offset[1]}${offset[2] !== undefined ? '.' + offset[2] : ''}`;\r\n } else {\r\n return f;\r\n }\r\n }},\r\n 'SPS-Format': {attr: 'Type', process: function (f) {return f;} },\r\n 'Byteanzahl': {attr: 'Length', process: function (f) {return parseInt(f, 10);} },\r\n 'Zugriff': {attr: 'RW', process: function (f) {return f !== 'read';} },\r\n 'Leseanforderung': {attr: 'poll', process: function (f) {return f === 'zyklisch';} },\r\n 'AktZeit (ms)': {attr: ''},\r\n 'Kommentar': {attr: 'Description'},\r\n 'Clients (Anzahl)': {attr: ''}\r\n };\r\n // First line\r\n // \"Name\",\"Typ\",\"Operand\",\"SPS-Format\",\"Byteanzahl\",\"Zugriff\",\"Leseanforderung\",\"AktZeit (ms)\",\"Kommentar\",\"Clients (Anzahl)\"\r\n let sFields = lines[0].split(',');\r\n // create mapping\r\n const fields = [];\r\n for (let m = 0; m < sFields.length; m++) {\r\n sFields[m] = sFields[m].replace(/\"/g, '');\r\n fields.push(mapping[sFields[m]]);\r\n }\r\n for (let l = 1; l < lines.length; l++) {\r\n lines[l] = lines[l].trim();\r\n if (!lines[l]) continue;\r\n sFields = lines[l].trim().split(',');\r\n let obj = {\r\n Type: 'ARRAY',\r\n Unit: '',\r\n Role: '',\r\n Room: '',\r\n poll: true,\r\n RW: false,\r\n WP: false\r\n };\r\n for (let f = 0; f < fields.length; f++) {\r\n if (!fields[f].attr) {\r\n continue;\r\n }\r\n if (!sFields[f]) {\r\n console.log('error');\r\n break;\r\n }\r\n sFields[f] = sFields[f].replace(/\"/g, '');\r\n obj[fields[f].attr] = fields[f].process ? fields[f].process(sFields[f]) : sFields[f];\r\n\r\n if (obj.Name.match(/^@/)) {\r\n obj = null;\r\n break;\r\n }\r\n }\r\n if (obj) {\r\n if (obj.Type === 'BYTE' && obj.Length !== 1) {\r\n obj.Type = 'ARRAY';\r\n }\r\n if (obj.Type === 'CHAR') {\r\n obj.Type = 'STRING';\r\n }\r\n if (obj.Type === 'BYTE' || obj.Type === 'BOOL' || obj.Type === 'INT') {\r\n obj.Length = '';\r\n }\r\n let _attr;\r\n if (obj.Address.match(/^DB/)) {\r\n _attr = 'dbs';\r\n } else if (obj.Address.match(/^IN/)) {\r\n obj.Address = obj.Address.replace(/^IN\\s?/, '');\r\n _attr = 'inputs';\r\n } else if (obj.Address.match(/^OUT/)) {\r\n _attr = 'outputs';\r\n obj.Address = obj.Address.replace(/^OUT\\s?/, '');\r\n } else if (obj.Address.match(/^M/)) {\r\n _attr = 'markers';\r\n obj.Address = obj.Address.replace(/^M\\s?/, '');\r\n } else {\r\n console.error('Unknown TYPE: ' + obj.Address);\r\n continue;\r\n }\r\n // try to find same address\r\n for (let aaa = 0; aaa < newParts[_attr].length; aaa++) {\r\n if (newParts[_attr][aaa].Address === obj.Address) {\r\n newParts[_attr][aaa] = obj;\r\n changes[_attr] = true;\r\n obj = null;\r\n break;\r\n }\r\n }\r\n if (obj) {\r\n changes[_attr] = true;\r\n newParts[_attr].push(obj);\r\n }\r\n }\r\n }\r\n } else {\r\n const mm = text.match(/(DB)[0-9]+\\s-\\s/g);\r\n const db = mm ? mm[0].replace(' - ', '') : '';\r\n const vv = text.split('STRUCT');\r\n\r\n const struck = vv[1] ? vv[1].split('=')[0].split('\\n') : [];\r\n\r\n struck.forEach((item) => {\r\n if (item.length > 10) {\r\n const x = item.split(/\\s+/g);\r\n x.shift();\r\n\r\n let obj = {\r\n Address: db + ' ' + x.shift(),\r\n Name: x.shift(),\r\n Type: x.shift(),\r\n dec: x.shift(),\r\n Description: x.join(' '),\r\n Unit: '',\r\n Role: '',\r\n Room: '',\r\n poll: true,\r\n RW: false,\r\n WP: false\r\n };\r\n\r\n // try to find same address\r\n for (let aaa = 0; aaa < newParts.dbs.length; aaa++) {\r\n if (newParts.dbs[aaa].Address === obj.Address) {\r\n newParts.dbs[aaa] = obj;\r\n changes.dbs = true;\r\n obj = null;\r\n break;\r\n }\r\n }\r\n if (obj) {\r\n changes.dbs = true;\r\n newParts.dbs.push(obj);\r\n }\r\n }\r\n });\r\n }\r\n for (const attr in newParts) {\r\n if (!newParts.hasOwnProperty(attr)) {\r\n continue;\r\n }\r\n newParts[attr].sort((a, b) => {\r\n const aDB = a.Address.match(/^D?B?\\s?(\\d+)/);\r\n const bDB = b.Address.match(/^D?B?\\s?(\\d+)/);\r\n if (!aDB) return -1;\r\n if (!bDB) return 1;\r\n if (parseInt(aDB[1], 10) > parseInt(bDB[1], 10)) return 1;\r\n if (parseInt(aDB[1], 10) < parseInt(bDB[1], 10)) return -1;\r\n const aOffset = a.Address.match(/\\s(\\d+).?(\\d+)?$/);\r\n const bOffset = b.Address.match(/\\s(\\d+).?(\\d+)?$/);\r\n if (!aOffset) return -1;\r\n if (!bOffset) return 1;\r\n if (parseInt(aOffset[1], 10) > parseInt(bOffset[1], 10)) return 1;\r\n if (parseInt(aOffset[1], 10) < parseInt(bOffset[1], 10)) return -1;\r\n if (aOffset[2] === undefined && bOffset[2] !== undefined) return 1;\r\n if (bOffset[2] === undefined && aOffset[2] !== undefined) return -1;\r\n if (aOffset[2] === undefined && bOffset[2] === undefined) return 0;\r\n if (parseInt(aOffset[2], 10) > parseInt(bOffset[2], 10)) return 1;\r\n if (parseInt(aOffset[2], 10) < parseInt(bOffset[1], 10)) return -1;\r\n return 0;\r\n });\r\n }\r\n if (changes.dbs) {\r\n native.dbs = newParts.dbs;\r\n }\r\n if (changes.inputs) {\r\n native.inputs = newParts.inputs;\r\n }\r\n if (changes.outputs) {\r\n native.outputs = newParts.outputs;\r\n }\r\n if (changes.markers) {\r\n native.markers = newParts.markers;\r\n }\r\n console.log(native);\r\n //this.props.changeNative(native);\r\n }, 200);\r\n };\r\n\r\n reader.readAsText(e[0], 'ISO-8859-1');\r\n }\r\n}\r\n\r\nOptions.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default withStyles(styles)(Options);\r\n","import { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport { tsv2json, json2tsv } from 'tsv-json';\r\nimport { useSnackbar } from 'notistack';\r\nimport AceEditor from \"react-ace\";\r\nimport copy from 'copy-to-clipboard';\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\n\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\nimport SaveIcon from '@material-ui/icons/Save';\r\nimport FileCopyIcon from '@material-ui/icons/FileCopy';\r\n\r\nconst styles = theme => ({\r\n tsvEditor: {\r\n width: '100%',\r\n height: 400\r\n },\r\n tsvEditorTextarea: {\r\n fontFamily: 'monospace'\r\n }\r\n});\r\n\r\nconst TsvDialog = props => {\r\n const [tsv, setTsv] = useState('');\r\n useEffect(() => {\r\n let tsvResult = [];\r\n tsvResult.push(props.fields.map(field => field.name));\r\n props.data.forEach(item =>\r\n tsvResult.push(props.fields.map(field => item[field.name] !== undefined && item[field.name] !== null ? item[field.name].toString() : ''))\r\n );\r\n setTsv(json2tsv(tsvResult));\r\n }, [props.open]); // eslint-disable-line react-hooks/exhaustive-deps\r\n const { enqueueSnackbar } = useSnackbar();\r\n\r\n if (!props.open) {\r\n return null;\r\n }\r\n\r\n const saveTsv = () => {\r\n let data = tsv2json(tsv.endsWith('\\n') ? tsv : tsv + '\\n');\r\n let fields = data.shift();\r\n let success = true;\r\n let errors = [];\r\n for (let index in props.fields) {\r\n if (props.fields[index].name !== fields[index]) {\r\n errors.push(<>No field {props.fields[index].name} in position {parseInt(index) + 1}!);\r\n success = false;\r\n }\r\n }\r\n\r\n data = data.map((itemValues, itemIndex) => {\r\n let item = {};\r\n for (let index in props.fields) {\r\n if (props.fields[index].type === 'select' && !props.fields[index].options.map(option => option.value).includes(itemValues[index])) {\r\n errors.push(<>Value {itemValues[index]} is wrong for field {props.fields[index].name} in position {parseInt(itemIndex) + 1}!);\r\n success = false;\r\n }\r\n if (props.fields[index].type === 'checkbox') {\r\n itemValues[index] = itemValues[index] === 'true';\r\n }\r\n item[props.fields[index].name] = itemValues[index];\r\n }\r\n return item;\r\n });\r\n\r\n if (!success) {\r\n enqueueSnackbar(
{errors.map((error, index) =>
{error}
)}
, { variant: 'error' });\r\n return;\r\n }\r\n props.save(data);\r\n props.onClose();\r\n };\r\n\r\n return \r\n {I18n.t('Edit data as TSV')}\r\n \r\n {I18n.t('You can copy, paste and edit data as TSV.')}\r\n
\r\n setTsv(e)}\r\n height=\"400px\"\r\n showPrintMargin={false}\r\n value={tsv}\r\n className={props.classes.tsvEditor}\r\n width=\"100%\"\r\n setOptions={{firstLineNumber: 0}}\r\n mode={null}\r\n />\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n};\r\n\r\nTsvDialog.propTypes = {\r\n open: PropTypes.bool,\r\n onClose: PropTypes.func,\r\n classes: PropTypes.object,\r\n save: PropTypes.func,\r\n fields: PropTypes.array,\r\n data: PropTypes.array\r\n};\r\n\r\nexport default withStyles(styles)(TsvDialog);","import PropTypes from 'prop-types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\n\r\nconst DeleteAllDialog = (props) => {\r\n return props.open ? \r\n {I18n.t('Delete all items')}\r\n \r\n {I18n.t('Are you sure to delete all items?')}\r\n \r\n \r\n \r\n \r\n \r\n : null;\r\n}\r\n\r\nDeleteAllDialog.propTypes = {\r\n open: PropTypes.bool,\r\n action: PropTypes.func,\r\n onClose: PropTypes.func,\r\n classes: PropTypes.object,\r\n}\r\n\r\nexport default DeleteAllDialog;","import { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\n\r\nconst DeleteDialog = (props) => {\r\n const [disableWarnings, setDisableWarnings] = useState(false);\r\n useEffect(() => {\r\n setDisableWarnings(false);\r\n }, [props.open]);\r\n\r\n return props.open ? \r\n {I18n.t('Delete item')}\r\n \r\n {I18n.t('Are you sure to delete item with address \"%s\"?', props.item._address)}\r\n setDisableWarnings(e.target.checked)}\r\n />}/>\r\n \r\n \r\n \r\n \r\n \r\n : null;\r\n}\r\n\r\nDeleteDialog.propTypes = {\r\n open: PropTypes.bool,\r\n onClose: PropTypes.func,\r\n classes: PropTypes.object,\r\n action: PropTypes.func,\r\n item: PropTypes.object,\r\n}\r\n\r\nexport default DeleteDialog;","import { useState, useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport Table from '@material-ui/core/Table';\r\nimport TableHead from '@material-ui/core/TableHead';\r\nimport TableBody from '@material-ui/core/TableBody';\r\nimport TableRow from '@material-ui/core/TableRow';\r\nimport TableCell from '@material-ui/core/TableCell';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport Select from '@material-ui/core/Select';\r\nimport MenuItem from '@material-ui/core/MenuItem';\r\nimport TableSortLabel from '@material-ui/core/TableSortLabel';\r\nimport Tooltip from '@material-ui/core/Tooltip';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport AddIcon from '@material-ui/icons/Add';\r\nimport ImportExport from '@material-ui/icons/ImportExport';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\nimport Utils from '@iobroker/adapter-react/Components/Utils';\r\n\r\nimport ExpertIcon from '@iobroker/adapter-react/icons/IconExpert';\r\nimport TextWithIcon from '@iobroker/adapter-react/Components/TextWithIcon';\r\nimport SelectWithIcon from '@iobroker/adapter-react/Components/SelectWithIcon';\r\n\r\nimport TsvDialog from './TsvDialog';\r\nimport DeleteAllDialog from './DeleteAllDialog';\r\nimport DeleteDialog from './DeleteDialog';\r\n\r\nconst styles = theme => ({\r\n tableHeader: {\r\n whiteSpace: 'nowrap',\r\n fontWeight: 'bold',\r\n fontSize: '80%',\r\n padding: '0px 8px'\r\n },\r\n tableHeaderExtended: {\r\n color: theme.palette.type === 'dark' ? theme.palette.primary.light : theme.palette.primary.dark\r\n },\r\n tableCell: {\r\n whiteSpace: 'nowrap',\r\n fontSize: '80%',\r\n padding: '0px 8px'\r\n },\r\n tableContainer: {\r\n overflow: 'auto',\r\n maxHeight: 'calc(100vh - 180px)'\r\n },\r\n tableTextField: {\r\n fontSize: '80%'\r\n },\r\n tableSelect: {\r\n fontSize: '80%'\r\n },\r\n tableTextFieldContainer: {\r\n width: '100%'\r\n },\r\n tableSelectContainer: {\r\n width: '100%'\r\n },\r\n nonEditMode: {\r\n cursor: 'pointer'\r\n }\r\n});\r\n\r\nconst DataCell = props => {\r\n const sortedItem = props.sortedItem;\r\n const field = props.field;\r\n const editMode = props.editMode;\r\n const setEditMode = props.setEditMode;\r\n\r\n const ref = useRef();\r\n /*useEffect(() => {\r\n if (props.editMode) {\r\n // ref.current && ref.current.focus()\r\n //window.setTimeout(() => ref.current && ref.current.focus(), 1000);\r\n }\r\n }, [props.editMode])*/\r\n\r\n let item = sortedItem.item;\r\n let result;\r\n if (field.type === 'checkbox') {\r\n result = \r\n props.changeParam(sortedItem.$index, field.name, e.target.checked)}\r\n />\r\n ;\r\n } else if (field.type === 'rooms') {\r\n if (!editMode) {\r\n result = ;\r\n } else {\r\n result = props.changeParam(sortedItem.$index, field.name, value)}\r\n className={props.classes.tableSelectContainer}\r\n />;\r\n }\r\n } else if (field.type === 'select') {\r\n if (!editMode) {\r\n let option = field.options.find(option => option.value === item[field.name]);\r\n result = option ? option.title : '';\r\n } else {\r\n result = props.changeParam(sortedItem.$index, field.name, e.target.value)}\r\n className={props.classes.tableSelectContainer}\r\n >\r\n {field.options.map(option =>\r\n {option.title ? option.title : {I18n.t('Nothing')}}\r\n )}\r\n ;\r\n }\r\n } else {\r\n if (!editMode) {\r\n result = item[field.name] ? item[field.name] : null;\r\n } else {\r\n result = props.changeParam(sortedItem.$index, field.name, e.target.value)}\r\n disabled={props.getDisable(sortedItem.$index, field.name)}\r\n />;\r\n }\r\n }\r\n\r\n return {\r\n setEditMode(true);\r\n window.localStorage.setItem('Modbus.editMode', 'true');\r\n window.setTimeout(() => ref.current && ref.current.focus(), 100);\r\n }}\r\n >\r\n {result}\r\n ;\r\n}\r\n\r\nconst RegisterTable = props => {\r\n const [tsvDialogOpen, setTsvDialogOpen] = useState(false);\r\n const [editMode, setEditMode] = useState(parseInt(window.localStorage.getItem('Modbus.editMode'), 10) || 0);\r\n const [extendedMode, setExtendedMode] = useState(window.localStorage.getItem('Modbus.extendedMode') === 'true');\r\n const [deleteAllDialog, setDeleteAllDialog] = useState({\r\n open: false,\r\n action: null,\r\n });\r\n const [deleteDialog, setDeleteDialog] = useState({\r\n open: false,\r\n item: null,\r\n action: null,\r\n });\r\n\r\n let sortedData = props.getSortedData(props.data, props.orderBy, props.order);\r\n\r\n return
\r\n
\r\n \r\n props.addItem()}>\r\n \r\n \r\n \r\n \r\n setTsvDialogOpen(true)}>\r\n \r\n \r\n \r\n \r\n {\r\n window.localStorage.setItem('Modbus.extendedMode', extendedMode ? 'false' : 'true');\r\n setExtendedMode(!extendedMode);\r\n }}>\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field => {\r\n let isChecked = false;\r\n let indeterminate = false;\r\n let trueFound = false;\r\n let falseFound = false;\r\n for (let k in props.data) {\r\n if (props.data[k][field.name]) {\r\n isChecked = true;\r\n trueFound = true;\r\n } else {\r\n isChecked = false;\r\n falseFound = true;\r\n }\r\n\r\n if (trueFound && falseFound) {\r\n indeterminate = true;\r\n isChecked = false;\r\n break;\r\n }\r\n }\r\n\r\n return \r\n {field.type === 'checkbox' ?\r\n \r\n {\r\n let newData = JSON.parse(JSON.stringify(props.data));\r\n newData.forEach(item =>\r\n item[field.name] = e.target.checked);\r\n props.changeData(newData);\r\n }}\r\n />\r\n \r\n : null}\r\n {field.sorted ? {\r\n const isAsc = props.orderBy === field.name && props.order === 'asc';\r\n props.onChangeOrder(field.name, isAsc ? 'desc' : 'asc');\r\n }}\r\n >{I18n.t(field.title)} : I18n.t(field.title)}\r\n \r\n })}\r\n \r\n \r\n
\r\n setDeleteAllDialog({\r\n open: true,\r\n action: () => props.changeData([]),\r\n })}\r\n disabled={!props.data.length}\r\n >\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n {\r\n sortedData.map(sortedItem =>\r\n \r\n {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field =>\r\n setEditMode(sortedItem.$index)}\r\n {...props}\r\n />\r\n )}\r\n \r\n \r\n
\r\n {\r\n let lastTime = window.sessionStorage.getItem('disableDeleteDialogs');\r\n if (lastTime && (new Date() - new Date(lastTime)) < 1000 * 60 * 5) {\r\n props.deleteItem(sortedItem.$index);\r\n return;\r\n }\r\n setDeleteDialog({\r\n open: true,\r\n action: disableDialogs => {\r\n if (disableDialogs) {\r\n window.sessionStorage.setItem('disableDeleteDialogs', (new Date()).toISOString());\r\n }\r\n props.deleteItem(sortedItem.$index);\r\n },\r\n item: sortedItem.item\r\n })\r\n }}>\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n )\r\n }\r\n
\r\n
\r\n
\r\n {tsvDialogOpen ?\r\n {\r\n if (props.prefix) {\r\n data.forEach(line => {\r\n line.Address = (line.Address || '').toUpperCase();\r\n if (line.Address && !line.Address.startsWith(props.prefix)) {\r\n line.Address = props.prefix + line.Address;\r\n }\r\n });\r\n }\r\n props.changeData(data);\r\n }}\r\n onClose={() => setTsvDialogOpen(false)}\r\n data={props.data}\r\n fields={props.fields}\r\n /> : null\r\n }\r\n setDeleteAllDialog({\r\n open: false,\r\n action: null,\r\n })}\r\n />\r\n setDeleteDialog({\r\n open: false,\r\n action: null,\r\n item: null\r\n })}\r\n item={deleteDialog.item}\r\n />\r\n
;\r\n}\r\n\r\nRegisterTable.propTypes = {\r\n data: PropTypes.array,\r\n fields: PropTypes.array,\r\n classes: PropTypes.object,\r\n addItem: PropTypes.func,\r\n changeData: PropTypes.func,\r\n deleteItem: PropTypes.func,\r\n rooms: PropTypes.object,\r\n formulaDisabled: PropTypes.bool,\r\n getSortedData: PropTypes.func,\r\n themeType: PropTypes.string,\r\n prefix: PropTypes.string,\r\n};\r\n\r\nexport default withStyles(styles)(RegisterTable);","import {Component} from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport Paper from '@material-ui/core/Paper';\r\n\r\nimport roles from '../data/roles';\r\nimport types from '../data/types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport RegisterTable from '../Components/RegisterTable';\r\n\r\nclass BaseRegisters extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.nativeField = '';\r\n this.state = {\r\n order: window.localStorage.getItem('Modbus.order') || 'asc',\r\n orderBy: window.localStorage.getItem('Modbus.orderBy') || 'Address',\r\n };\r\n }\r\n\r\n getRooms() {\r\n const lang = I18n.getLanguage();\r\n return this.props.rooms ? Object.values(this.props.rooms).map(room => ({\r\n value: room._id,\r\n title: typeof room.common.name === 'object' ? room.common.name[lang] : room.common.name\r\n })) : [];\r\n }\r\n\r\n getFields() {\r\n let rooms = this.getRooms();\r\n rooms.unshift({value: '', title: ''});\r\n\r\n let result = [\r\n {name: 'Address', title: 'Address', type: 'text', sorted: true, width: 20},\r\n {name: 'Name', title: 'Name', type: 'text', sorted: true},\r\n {name: 'Description', title: 'Description', type: 'text', sorted: true},\r\n {name: 'Type', title: 'Type', type: 'select', options: types, sorted: true},\r\n {name: 'Length', title: 'Length', type: 'text', width: 20},\r\n {name: 'Unit', title: 'Unit', type: 'text', width: 30},\r\n {name: 'Role', title: 'Role', type: 'select', options: roles, sorted: true},\r\n {name: 'Room', title: 'Room', type: 'rooms', options: rooms, sorted: true},\r\n {name: 'poll', title: 'Poll', type: 'checkbox'},\r\n {name: 'RW', title: 'RW', type: 'checkbox', expert: true},\r\n {name: 'WP', title: 'WP', type: 'checkbox', expert: true},\r\n ]\r\n\r\n if (this.props.native.params.multiDeviceId) {\r\n result.splice(1, 0,\r\n {name: 'deviceId', title: 'Slave ID', type: 'number', sorted: true, width: 20},\r\n );\r\n }\r\n\r\n return result;\r\n }\r\n\r\n address2struct(address) {\r\n if (this.nativeField === 'dbs') {\r\n const parts = address.split(' ');\r\n const db = parseInt(parts[0].replace('DB', '').replace('db', '').trim(), 10);\r\n if (parts[1] && parts[1].includes('.')) {\r\n const a = parseFloat(parts[1]);\r\n return {db, byte: Math.floor(a), bit: (a * 10) % 10};\r\n } else {\r\n return {db, byte: parseInt(parts[1], 10)};\r\n }\r\n } else {\r\n if (address.includes('.')) {\r\n const a = parseFloat(address);\r\n return {byte: Math.floor(a), bit: (a * 10) % 10};\r\n } else {\r\n return {byte: parseInt(address, 10)};\r\n }\r\n }\r\n }\r\n\r\n struct2address(struct) {\r\n if (struct.db !== undefined) {\r\n if (struct.bit !== undefined) {\r\n return `DB${struct.db} ${struct.byte}.${struct.bit}`;\r\n } else {\r\n return `DB${struct.db} ${struct.byte}`;\r\n }\r\n } else if (struct.bit !== undefined) {\r\n return struct.byte + '.' + struct.bit;\r\n } else {\r\n return struct.byte;\r\n }\r\n }\r\n\r\n changeParam = (index, name, value) => {\r\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n data[index][name] = value;\r\n if (name === 'Type') {\r\n if (['BOOL'].includes(value)) {\r\n data[index].Length = 0.1;\r\n } else\r\n if (['', 'BYTE'].includes(value)) {\r\n data[index].Length = 1;\r\n } else\r\n if (['WORD', 'INT', 'STRING', 'S5TIME'].includes(value)) {\r\n data[index].Length = 2;\r\n } else\r\n if (['DWORD', 'DINT', 'REAL'].includes(value)) {\r\n data[index].Length = 4;\r\n } else\r\n if (['S7TIME'].includes(value)) {\r\n data[index].Length = 8;\r\n } else\r\n if (['S7STRING', 'ARRAY'].includes(value)) {\r\n data[index].Length = 32;\r\n }\r\n\r\n if (value === 'BOOL') {\r\n const struct = this.address2struct(data[index].Address);\r\n if (struct.bit === undefined) {\r\n struct.bit = 0;\r\n data[index].Address = this.struct2address(struct);\r\n }\r\n } else {\r\n const struct = this.address2struct(data[index].Address);\r\n if (struct.bit !== undefined) {\r\n if (struct.bit > 0) {\r\n struct.byte++;\r\n }\r\n delete struct.bit;\r\n\r\n data[index].Address = this.struct2address(struct);\r\n }\r\n }\r\n }\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n addItem = () => {\r\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n let newItem = {}\r\n\r\n this.getFields().forEach(field => newItem[field.name] = '');\r\n\r\n if (data.length) {\r\n let sortedData = JSON.parse(JSON.stringify(data));\r\n sortedData.sort((item1, item2) => item1.Address > item2.Address ? 1 : -1);\r\n let lastItem = sortedData[sortedData.length - 1];\r\n const struct = this.address2struct(lastItem.Address);\r\n if (lastItem.Type === 'BOOL') {\r\n struct.bit = struct.bit || 0;\r\n struct.bit++;\r\n if (struct.bit >= 8) {\r\n struct.bit = struct.bit % 8;\r\n struct.byte++;\r\n }\r\n } else {\r\n delete struct.bit;\r\n struct.byte += lastItem.Length;\r\n }\r\n\r\n if (struct.db !== undefined && struct.byte + lastItem.Length > 0xFFFF) {\r\n struct.db++;\r\n struct.byte = 0;\r\n if (lastItem.Type === 'BOOL') {\r\n struct.bit = 0;\r\n }\r\n }\r\n\r\n newItem.Address = this.struct2address(struct);\r\n newItem.Type = lastItem.Type;\r\n newItem.Length = lastItem.Length;\r\n newItem.Unit = lastItem.Unit;\r\n newItem.Role = lastItem.Role;\r\n newItem.Room = lastItem.Room;\r\n newItem.poll = lastItem.poll;\r\n newItem.RW = lastItem.RW;\r\n newItem.WP = lastItem.WP;\r\n } else {\r\n newItem.role = 'level';\r\n newItem.Type = 'BOOL';\r\n newItem.Length = '0.1';\r\n newItem.poll = true;\r\n if (this.nativeField === 'dbs') {\r\n newItem.Address = 'DB1 0.0';\r\n } else {\r\n newItem.Address = '0.0';\r\n }\r\n }\r\n data.push(newItem);\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n deleteItem = (index) => {\r\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n data.splice(index, 1);\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n changeData = (data) => {\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n getDisable = (index, name) => {\r\n return name === 'Length' &&\r\n !['STRING', 'S7STRING', 'ARRAY'].includes(this.props.native[this.nativeField][index].type);\r\n }\r\n\r\n getSortedData = (data, orderBy, order) => {\r\n this.fields = this.fields || this.getFields();\r\n\r\n data = data || this.props.native[this.nativeField];\r\n orderBy = orderBy || this.state.orderBy;\r\n order = order || this.state.order;\r\n let sortedData = [];\r\n data.forEach((item, index) => {sortedData[index] = {item, $index: index}});\r\n const field = this.fields.find(item => item.name === orderBy);\r\n\r\n sortedData.sort((sortedItem1, sortedItem2) => {\r\n let sort1;\r\n let sort2;\r\n if (orderBy === 'Address') {\r\n const a1 = this.address2struct(sortedItem1.item.Address);\r\n const a2 = this.address2struct(sortedItem2.item.Address);\r\n\r\n sort1 = 0;\r\n if (a1.db !== undefined) {\r\n sort1 = a1.db << 24;\r\n }\r\n if (a2.db !== undefined) {\r\n sort2 = a2.db << 24;\r\n }\r\n sort1 |= a1.byte << 8;\r\n sort2 |= a2.byte << 8;\r\n sort1 |= a1.bit || 0;\r\n sort2 |= a2.bit || 0;\r\n } else if (orderBy === '$index') {\r\n sort1 = sortedItem1[orderBy];\r\n sort2 = sortedItem2[orderBy];\r\n } else if (field && field.type === 'number') {\r\n sort1 = parseInt(sortedItem1.item[orderBy], 10);\r\n sort2 = parseInt(sortedItem2.item[orderBy], 10);\r\n } else {\r\n sort1 = sortedItem1.item[orderBy];\r\n sort2 = sortedItem2.item[orderBy];\r\n }\r\n return (order === 'asc' ? sort1 > sort2 : sort1 < sort2) ? 1 : -1;\r\n });\r\n\r\n return sortedData;\r\n }\r\n\r\n render() {\r\n this.fields = this.fields || this.getFields();\r\n\r\n return \r\n {\r\n this.setState({orderBy, order});\r\n window.localStorage.setItem('Modbus.orderBy', orderBy);\r\n window.localStorage.setItem('Modbus.order', order);\r\n }}\r\n />\r\n \r\n }\r\n}\r\n\r\nBaseRegisters.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n themeType: PropTypes.string,\r\n};\r\n\r\nexport default BaseRegisters;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Inputs extends BaseRegisters {\r\n nativeField = 'inputs'\r\n}\r\n\r\nInputs.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Inputs;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Outputs extends BaseRegisters {\r\n nativeField = 'outputs'\r\n}\r\n\r\nOutputs.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Outputs;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Marker extends BaseRegisters {\r\n nativeField = 'markers'\r\n}\r\n\r\nMarker.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Marker;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Dbs extends BaseRegisters {\r\n nativeField = 'dbs';\r\n}\r\n\r\nDbs.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Dbs;\r\n","import React from 'react';\r\nimport {withStyles} from '@material-ui/core/styles';\r\nimport { MuiThemeProvider } from '@material-ui/core/styles';\r\nimport { SnackbarProvider } from 'notistack';\r\n\r\nimport AppBar from '@material-ui/core/AppBar';\r\nimport Tabs from '@material-ui/core/Tabs';\r\nimport Tab from '@material-ui/core/Tab';\r\n\r\nimport GenericApp from '@iobroker/adapter-react/GenericApp';\r\nimport Loader from '@iobroker/adapter-react/Components/Loader'\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport TabOptions from './Tabs/Options';\r\nimport TabInputs from './Tabs/Inputs';\r\nimport TabOutputs from './Tabs/Outputs';\r\nimport TabMarker from './Tabs/Marker';\r\nimport TabDbs from './Tabs/DBs';\r\n\r\nconst styles = theme => ({\r\n root: {},\r\n tabContent: {\r\n padding: 10,\r\n height: 'calc(100% - 64px - 48px - 20px)',\r\n overflow: 'auto',\r\n },\r\n tabContentIFrame: {\r\n padding: 10,\r\n height: 'calc(100% - 64px - 48px - 20px - 38px)',\r\n overflow: 'auto'\r\n },\r\n tab: {\r\n width: '100%',\r\n minHeight: '100%'\r\n }\r\n});\r\n\r\nconst tabs = [\r\n {\r\n name: 'general',\r\n title: 'General',\r\n component: TabOptions,\r\n },\r\n {\r\n name: 'inputs',\r\n title: 'Inputs',\r\n component: TabInputs,\r\n },\r\n {\r\n name: 'outputs',\r\n title: 'Outputs',\r\n component: TabOutputs,\r\n },\r\n {\r\n name: 'marker',\r\n title: 'Marker',\r\n component: TabMarker,\r\n },\r\n {\r\n name: 'dbs',\r\n title: 'DBs',\r\n component: TabDbs,\r\n },\r\n]\r\n\r\nclass App extends GenericApp {\r\n constructor(props) {\r\n const extendedProps = {...props};\r\n extendedProps.encryptedFields = ['pass'];\r\n\r\n extendedProps.translations = {\r\n 'en': require('./i18n/en'),\r\n 'de': require('./i18n/de'),\r\n 'ru': require('./i18n/ru'),\r\n 'pt': require('./i18n/pt'),\r\n 'nl': require('./i18n/nl'),\r\n 'fr': require('./i18n/fr'),\r\n 'it': require('./i18n/it'),\r\n 'es': require('./i18n/es'),\r\n 'pl': require('./i18n/pl'),\r\n 'zh-cn': require('./i18n/zh-cn'),\r\n };\r\n\r\n super(props, extendedProps);\r\n this.state.moreLoaded = false;\r\n this.state.rooms = null;\r\n }\r\n\r\n onConnectionReady() {\r\n super.onConnectionReady()\r\n this.socket.getForeignObjects('enum.rooms.*', 'enum')\r\n .then(rooms =>\r\n this.setState({moreLoaded: true, rooms}));\r\n }\r\n\r\n getSelectedTab() {\r\n const selectedTab = this.state.selectedTab;\r\n if (!selectedTab) {\r\n return 0;\r\n } else {\r\n return tabs.findIndex(tab => tab.name === selectedTab);\r\n }\r\n }\r\n\r\n render() {\r\n if (!this.state.loaded || !this.state.moreLoaded) {\r\n return \r\n \r\n ;\r\n }\r\n\r\n return \r\n \r\n
\r\n \r\n this.selectTab(tabs[index].name, index)}\r\n variant=\"scrollable\" scrollButtons=\"auto\">\r\n {tabs.map(tab => {tab.icon}{I18n.t(tab.title)} : I18n.t(tab.title)}\r\n data-name={tab.name}\r\n key={tab.name}\r\n title={tab.tooltip ? I18n.t(tab.tooltip) : undefined}\r\n />)}\r\n \r\n \r\n
\r\n {tabs.map((tab, index) => {\r\n const TabComponent = tab.component;\r\n if (this.state.selectedTab) {\r\n if (this.state.selectedTab !== tab.name) {\r\n return null;\r\n }\r\n } else {\r\n if (index !== 0) {\r\n return null;\r\n }\r\n }\r\n return this.setState({errorText: (text || text === 0) && typeof text !== 'string' ? text.toString() : text})}\r\n onLoad={native => this.onLoadConfig(native)}\r\n instance={this.instance}\r\n adapterName={this.adapterName}\r\n changed={this.state.changed}\r\n onChange={(attr, value, cb) => this.updateNativeValue(attr, value, cb)}\r\n changeNative={value => this.setState({native: value, changed: this.getIsChanged(value)})}\r\n rooms={this.state.rooms}\r\n />\r\n })}\r\n {/*
{JSON.stringify(this.state.native, null, 2)}
*/}\r\n
\r\n {this.renderError()}\r\n {this.renderSaveCloseButtons()}\r\n
\r\n
\r\n
;\r\n }\r\n}\r\n\r\nexport default withStyles(styles)(App);\r\n","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read http://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.1/8 is considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport function register(config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit http://bit.ly/CRA-PWA'\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all ' +\r\n 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister();\r\n });\r\n }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport * as Sentry from '@sentry/browser';\r\nimport * as SentryIntegrations from '@sentry/integrations';\r\nimport { MuiThemeProvider} from '@material-ui/core/styles';\r\nimport './index.css';\r\nimport App from './App';\r\nimport * as serviceWorker from './serviceWorker';\r\nimport {version} from '../package.json';\r\nimport theme from '@iobroker/adapter-react/Theme';\r\nimport Utils from '@iobroker/adapter-react/Components/Utils';\r\n\r\nwindow.adapterName = 's7';\r\nlet themeName = Utils.getThemeName();\r\n\r\nconsole.log(`iobroker.${window.adapterName}@${version} using theme \"${themeName}\"`);\r\n\r\nfunction build() {\r\n return ReactDOM.render(\r\n \r\n {\r\n themeName = _theme;\r\n build();\r\n }}\r\n />\r\n ,\r\n document.getElementById('root')\r\n );\r\n}\r\n\r\nif (false && window.location.host !== 'localhost:3000') {\r\n Sentry.init({\r\n dsn: 'https://5ad729dbed504d15aa8bde423cae9a8e@sentry.iobroker.net/57',\r\n release: `iobroker.${window.adapterName}@${version}`,\r\n integrations: [\r\n new SentryIntegrations.Dedupe()\r\n ]\r\n });\r\n}\r\n\r\nbuild();\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: http://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/io-package.json b/io-package.json index 10d4b9a..e334dbd 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,20 @@ { "common": { "name": "s7", - "version": "1.3.10", + "version": "1.3.11", "news": { + "1.3.11": { + "en": "Updated releaser", + "de": "Releaser aktualisiert", + "ru": "Обновленный релиз", + "pt": "Liberador atualizado", + "nl": "Bijgewerkte releaser", + "fr": "Outil de libération mis à jour", + "it": "Rilascio aggiornato", + "es": "Liberador actualizado", + "pl": "Zaktualizowany wydawca", + "zh-cn": "更新的发布者" + }, "1.3.10": { "en": "Better handle invalid entries with empty Address", "de": "Bessere Handhabung ungültiger Einträge mit leerer Adresse", @@ -74,18 +86,6 @@ "es": "Cambiar el comportamiento del modo de edición", "pl": "Zmień zachowanie trybu edycji", "zh-cn": "更改编辑模式行为" - }, - "1.3.4": { - "en": "Change edit mode behaviour", - "de": "Verhalten im Bearbeitungsmodus ändern", - "ru": "Изменить поведение режима редактирования", - "pt": "Alterar o comportamento do modo de edição", - "nl": "Gedrag van bewerkingsmodus wijzigen", - "fr": "Modifier le comportement du mode édition", - "it": "Modifica il comportamento della modalità di modifica", - "es": "Cambiar el comportamiento del modo de edición", - "pl": "Zmień zachowanie trybu edycji", - "zh-cn": "更改编辑模式行为" } }, "title": "Siemens Simatic S7", diff --git a/package.json b/package.json index 7ad214b..eeee2f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iobroker.s7", - "version": "1.3.10", + "version": "1.3.11", "description": "Siemens S7 over Snap7", "author": { "name": "smiling_Jack", diff --git a/src/build/asset-manifest.json b/src/build/asset-manifest.json index 6d9d425..8afe08c 100644 --- a/src/build/asset-manifest.json +++ b/src/build/asset-manifest.json @@ -1,8 +1,8 @@ { "files": { "main.css": "./static/css/main.c9480e85.chunk.css", - "main.js": "./static/js/main.ef8e32e0.chunk.js", - "main.js.map": "./static/js/main.ef8e32e0.chunk.js.map", + "main.js": "./static/js/main.3ab35ae4.chunk.js", + "main.js.map": "./static/js/main.3ab35ae4.chunk.js.map", "runtime-main.js": "./static/js/runtime-main.1532eaf1.js", "runtime-main.js.map": "./static/js/runtime-main.1532eaf1.js.map", "static/css/2.faf2f676.chunk.css": "./static/css/2.faf2f676.chunk.css", @@ -18,6 +18,6 @@ "static/css/2.faf2f676.chunk.css", "static/js/2.f425d7e3.chunk.js", "static/css/main.c9480e85.chunk.css", - "static/js/main.ef8e32e0.chunk.js" + "static/js/main.3ab35ae4.chunk.js" ] } \ No newline at end of file diff --git a/src/build/index.html b/src/build/index.html index 80bcd37..04f7e9c 100644 --- a/src/build/index.html +++ b/src/build/index.html @@ -1 +1 @@ -s7
\ No newline at end of file +s7
\ No newline at end of file diff --git a/src/build/static/js/main.ef8e32e0.chunk.js b/src/build/static/js/main.3ab35ae4.chunk.js similarity index 99% rename from src/build/static/js/main.ef8e32e0.chunk.js rename to src/build/static/js/main.3ab35ae4.chunk.js index 1544722..e219fd8 100644 --- a/src/build/static/js/main.ef8e32e0.chunk.js +++ b/src/build/static/js/main.3ab35ae4.chunk.js @@ -1,2 +1,2 @@ -(this["webpackJsonpmodebus-admin"]=this["webpackJsonpmodebus-admin"]||[]).push([[0],{316:function(e){e.exports=JSON.parse('[{"name":"ip","type":"text","title":"PLC IP Address"},{"name":"s7logo","type":"checkbox","title":"S7 LOGO!"},{"name":"rack","type":"text","title":"PLC Rack"},{"name":"slot","type":"text","title":"PLC Slot"},{"name":"localTSAP","type":"hex","title":"Local TSAP"},{"name":"remoteTSAP","type":"hex","title":"Remote TSAP"}]')},317:function(e){e.exports=JSON.parse('[{"name":"round","type":"number","title":"Round Real to"},{"name":"poll","type":"number","title":"Poll delay","dimension":"ms"},{"name":"recon","type":"number","title":"Reconnect time","dimension":"ms"},{"name":"pulsetime","type":"number","title":"Pulse time","dimension":"ms"},{"name":"timeFormat","type":"select","title":"S7 Time mode","options":[{"value":"","title":"Local time"},{"value":"utc","title":"UTC"},{"value":"summer","title":"Time offset (with day saving time)"},{"value":"offset","title":"Time offset (no day saving time)"}]},{"name":"timeOffset","type":"number","title":"Time offset","dimension":"minutes"}]')},321:function(e){e.exports=JSON.parse('[{"value":"","title":""},{"value":"value","title":"value"},{"value":"level","title":"level"},{"value":"state","title":"state"},{"value":"switch","title":"switch"},{"value":"value.temperature","title":"value.temperature"},{"value":"value.humidity","title":"value.humidity"},{"value":"value.brightness","title":"value.brightness"},{"value":"value.uv","title":"value.uv"},{"value":"value.pressure","title":"value.pressure"},{"value":"value.battery","title":"value.battery"},{"value":"value.valve","title":"value.valve"},{"value":"value.time","title":"value.time"},{"value":"value.interval","title":"value.interval"},{"value":"value.window","title":"value.window"},{"value":"button","title":"button"},{"value":"indicator","title":"indicator"},{"value":"level.dimmer","title":"level.dimmer"},{"value":"level.valve","title":"level.valve"},{"value":"level.blind","title":"level.blind"},{"value":"level.temperature","title":"level.temperature"},{"value":"level.interval","title":"level.interval"}]')},322:function(e){e.exports=JSON.parse('[{"value":"","title":""},{"value":"BOOL","title":"BOOL"},{"value":"BYTE","title":"BYTE"},{"value":"WORD","title":"WORD"},{"value":"DWORD","title":"DWORD"},{"value":"INT","title":"INT"},{"value":"DINT","title":"DINT"},{"value":"REAL","title":"REAL"},{"value":"S7STRING","title":"S7STRING"},{"value":"STRING","title":"STRING"},{"value":"ARRAY","title":"ARRAY"},{"value":"S5TIME","title":"S5TIME"},{"value":"S7TIME","title":"S7TIME"}]')},333:function(e){e.exports=JSON.parse('{"a":"1.3.10"}')},348:function(e,t,a){},415:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Local time","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Time offset (no day saving time)","Offset (with day saving time)":"Time offset (with day saving time)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Polling","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 Time mode","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Time offset","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Write access","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutes","poll":"poll","sec":"sec.","write as Pulse":"write as Pulse","Drag \'n\' drop file here, or click to select file":"Drag \'n\' drop file here, or click to select file","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Change all","Delete all":"Delete all","Edit as TSV (Tab separated values)":"Edit as TSV (Tab separated values)","Add line":"Add line","Delete":"Delete","Are you sure to delete item with address \\"%s\\"?":"Are you sure to delete item with address \\"%s\\"?","Don\'t show this message in 5 minutes":"Don\'t show this message in 5 minutes","Cancel":"Cancel","Delete all items":"Delete all items","Are you sure to delete all items?":"Are you sure to delete all items?","Edit mode":"Edit mode","Toggle extended mode":"Toggle extended mode","Edit data as TSV":"Edit data as TSV","You can copy, paste and edit data as TSV.":"You can copy, paste and edit data as TSV.","Copy to clipboard":"Copy to clipboard","Nothing":"Nothing","Delete item":"Delete item","Load symbols":"Load symbols","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack and slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV was copied to clipboard"}')},416:function(e){e.exports=JSON.parse('{"Add DB":"DB hinzuf\xfcgen","Address":"Adresse","All entries will be deleted. Are you sure?":"Alle Eintr\xe4ge werden gel\xf6scht. Sind sie sicher?","Close":"Zumachen","Delete all entries":"Alle Eintr\xe4ge l\xf6schen","Description":"Beschreibung","Enable polling of data point":"Zyklische Abfrage vom Datenpunkt","Export":"Export","Export to CSV":"Export in CSV","General":"Allgemein","Import":"Import","Import DB file":"DB-Datei importieren","Import from CSV":"Import aus CSV","Import symbols file":"Symboldatei Importieren","Inputs":"Eing\xe4nge","Length":"L\xe4nge","Load Symbols":"Lade Symbole","Local TSAP":"Local TSAP","Local time":"Ortszeit","Marker":"Merker","Name":"Name","Offset (no day saving time)":"Zeit-Offset (ohne Sommerzeit)","Offset (with day saving time)":"Zeit-Offset (mit Sommerzeit)","Outputs":"Ausg\xe4nge","PLC Connection":"SPS Verbindung","PLC IP Address":"SPS IP Adresse","PLC Rack":"SPS Rack","PLC Slot":"SPS Slot","Poll delay":"Poll delay","Polling":"Abfrage","Pulse time":"Pulsetime","RW":"RW","Reconnect time":"Reconnectzeit","Remote TSAP":"Remote TSAP","Role":"Rolle","Room":"Raum","Round Real to":"Aufrunden Real auf","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7-Zeitmodus","Text copied to clipboard. Click to close the window":"Text wurde in der Zwischenablage kopiert. Klick um Fenster zu zumachen.","Time offset":"Zeitverschiebung","Toggle RW":"RW umschalten","Toggle WP":"WP umschalten","Toggle poll":"Poll umschalten","Type":"Typ","UTC":"UTC","Unit":"Einheit","WP":"WP","Write access":"Schreibzugriff","Write access allowed":"Schreiben erlaubt","Write pulses (true=>false edge)":"Schreibe Pulse (Ja=>Nein Kante)","minutes":"Minuten","poll":"poll","sec":"Sek.","write as Pulse":"schreibe als Impuls","Drag \'n\' drop file here, or click to select file":"Die Datei hierher ziehen , oder klicken, um die Datei auszuw\xe4hlen","DBs":"DBs","ms":"ms","Poll":"Abfrage","Change all":"\xc4ndere Alles","Delete all":"Alles l\xf6schen","Edit as TSV (Tab separated values)":"Als TSV bearbeiten (Tabulatorgetrennte Werte)","Add line":"Zeile hinzuf\xfcgen","Delete":"L\xf6schen","Are you sure to delete item with address \\"%s\\"?":"M\xf6chten Sie den Artikel mit der Adresse \\"%s\\" wirklich l\xf6schen?","Don\'t show this message in 5 minutes":"Diese Nachricht nicht in 5\xa0Minuten anzeigen","Cancel":"Abbrechen","Delete all items":"Alle Elemente l\xf6schen","Are you sure to delete all items?":"M\xf6chten Sie wirklich alle Elemente l\xf6schen?","Edit mode":"Bearbeitungsmodus","Toggle extended mode":"Erweiterten Modus umschalten","Edit data as TSV":"Daten als TSV bearbeiten","You can copy, paste and edit data as TSV.":"Sie k\xf6nnen Daten als TSV kopieren, einf\xfcgen und bearbeiten.","Copy to clipboard":"In die Zwischenablage kopieren","Nothing":"Keins","Delete item":"Item l\xf6schen","Load symbols":"Symbole laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Verbindungstyp: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack und Steckplatz: [Rack * 0x20 + Steckplatz]","TSV was copied to clipboard":"TSV wurde in die Zwischenablage kopiert"}')},417:function(e){e.exports=JSON.parse('{"Add DB":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c DB","Address":"\u0410\u0434\u0440\u0435\u0441","All entries will be deleted. Are you sure?":"\u0412\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u044b. \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b?","Close":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c","Delete all entries":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Description":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","Enable polling of data point":"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u043e\u043f\u0440\u043e\u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0446\u0438\u043a\u043b\u0435","Export":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442","Export to CSV":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432 CSV","General":"\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435","Import":"\u0418\u043f\u043c\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c","Import DB file":"\u0418\u043f\u043c\u043e\u0440\u0442 DB \u0444\u0430\u0439\u043b\u043e\u0432","Import from CSV":"\u0418\u043c\u043f\u043e\u0440\u0442 \u0438\u0437 CSV","Import symbols file":"\u0418\u043f\u043c\u043e\u0440\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432","Inputs":"\u0412\u0445\u043e\u0434\u044b","Length":"Length","Load Symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Local TSAP":"Local TSAP","Local time":"\u041c\u0435\u0441\u0442\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f","Marker":"\u041c\u0430\u0440\u043a\u0435\u0440\u044b","Name":"\u0418\u043c\u044f","Offset (no day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0431\u0435\u0437 \u043b\u0435\u0442\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438)","Offset (with day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0441 \u043b\u0435\u0442\u043d\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c)","Outputs":"\u0412\u044b\u0445\u043e\u0434\u044b","PLC Connection":"PLC \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435","PLC IP Address":"PLC IP \u0430\u0434\u0440\u0435\u0441","PLC Rack":"PLC Rack","PLC Slot":"PLC \u0441\u043b\u043e\u0442","Poll delay":"\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043e\u043f\u0440\u043e\u0441\u0430","Polling":"\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"\u0420\u043e\u043b\u044c","Room":"\u041a\u043e\u043c\u043d\u0430\u0442\u0430","Round Real to":"\u041e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c real \u0434\u043e","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 \u0420\u0435\u0436\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Text copied to clipboard. Click to close the window":"\u0422\u0435\u043a\u0441\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430. \u0429\u0435\u043b\u043a\u043d\u0438\u0442\u0435 \u043c\u044b\u0448\u043a\u043e\u0439 \u0437\u0434\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e","Time offset":"\u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Toggle RW":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c RW","Toggle WP":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c WP","Toggle poll":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c poll","Type":"\u0422\u0438\u043f","UTC":"UTC","Unit":"\u0415\u0434\u0438\u043d\u0438\u0446\u044b","WP":"WP","Write access":"\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0437\u0430\u043f\u0438\u0441\u0438","Write access allowed":"\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e","Write pulses (true=>false edge)":"\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u044b (1 => 0)","minutes":"\u043c\u0438\u043d\u0443\u0442\u044b","poll":"poll","sec":"\u0441\u0435\u043a.","write as Pulse":"\u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u0430\u043a Pulse","Drag \'n\' drop file here, or click to select file":"\u041f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0441\u044e\u0434\u0430 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0444\u0430\u0439\u043b","DBs":"DBs","ms":"ms","Poll":"\u041e\u043f\u0440\u043e\u0441","Change all":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435","Delete all":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435","Edit as TSV (Tab separated values)":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a TSV (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0435\u0439)","Add line":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443","Delete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","Are you sure to delete item with address \\"%s\\"?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u0440 \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c \\"%s\\"?","Don\'t show this message in 5 minutes":"\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 5 \u043c\u0438\u043d\u0443\u0442","Cancel":"\u041e\u0442\u043c\u0435\u043d\u0430","Delete all items":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Are you sure to delete all items?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b?","Edit mode":"\u0420\u0435\u0436\u0438\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f","Toggle extended mode":"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c","Edit data as TSV":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV","You can copy, paste and edit data as TSV.":"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV.","Copy to clipboard":"\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430","Nothing":"\u041d\u0438\u0447\u0435\u0433\u043e","Delete item":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0443\u043d\u043a\u0442","Load symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u0422\u0438\u043f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u0421\u0442\u043e\u0439\u043a\u0430 \u0438 \u0441\u043b\u043e\u0442: [\u0421\u0442\u043e\u0439\u043a\u0430 * 0x20 + \u0441\u043b\u043e\u0442]","TSV was copied to clipboard":"TSV \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430"}')},418:function(e){e.exports=JSON.parse('{"Add DB":"Adicionar DB","Address":"Endere\xe7o","All entries will be deleted. Are you sure?":"Todas as entradas ser\xe3o exclu\xeddas. Voc\xea tem certeza?","Close":"Fechar","Delete all entries":"Eliminar todas as entradas","Description":"Descri\xe7\xe3o","Enable polling of data point":"Habilitar a vota\xe7\xe3o do ponto de dados","Export":"Exportar","Export to CSV":"Exportar para CSV","General":"Geral","Import":"Importar","Import DB file":"Importar arquivo DB","Import from CSV":"Importa\xe7\xe3o de CSV","Import symbols file":"Arquivo de s\xedmbolos de importa\xe7\xe3o","Inputs":"Entradas","Length":"comprimento","Load Symbols":"Carregar s\xedmbolos","Local TSAP":"TSAP local","Local time":"Hor\xe1rio local","Marker":"Marcador","Name":"Nome","Offset (no day saving time)":"Deslocamento (sem hor\xe1rio)","Offset (with day saving time)":"Offset (com tempo de economia de hora)","Outputs":"Sa\xeddas","PLC Connection":"Conex\xe3o do PLC","PLC IP Address":"Endere\xe7o IP do PLC","PLC Rack":"PLC Rack","PLC Slot":"Slot PLC","Poll delay":"Retardo de enquete","Polling":"Polling","Pulse time":"Tempo de pulso","RW":"RW","Reconnect time":"Reconectar o tempo","Remote TSAP":"TSAP remoto","Role":"Fun\xe7\xe3o","Room":"Quarto","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO !","S7 Time mode":"Modo de tempo S7","Text copied to clipboard. Click to close the window":"Texto copiado para a \xe1rea de transfer\xeancia. Clique para fechar a janela","Time offset":"Deslocamento de tempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Alternar pesquisa","Type":"Tipo","UTC":"UTC","Unit":"Unidade","WP":"WP","Write access":"Acesso de grava\xe7\xe3o","Write access allowed":"Acesso de acesso permitido","Write pulses (true=>false edge)":"Escrever pulsos (true => false edge)","minutes":"minutos","poll":"vota\xe7\xe3o","sec":"seg.","write as Pulse":"escreva como pulso","Drag \'n\' drop file here, or click to select file":"Arraste e solte o arquivo aqui ou clique para selecionar o arquivo","DBs":"DBs","ms":"ms","Poll":"Enquete","Change all":"Mude tudo","Delete all":"Apagar tudo","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabula\xe7\xe3o)","Add line":"Adicionar linha","Delete":"Excluir","Are you sure to delete item with address \\"%s\\"?":"Tem certeza de que deseja excluir o item com o endere\xe7o \\"%s\\"?","Don\'t show this message in 5 minutes":"N\xe3o mostre esta mensagem em 5 minutos","Cancel":"Cancelar","Delete all items":"Apagar todos os itens","Are you sure to delete all items?":"Tem certeza de que deseja excluir todos os itens?","Edit mode":"Modo de edi\xe7\xe3o","Toggle extended mode":"Alternar modo estendido","Edit data as TSV":"Editar dados como TSV","You can copy, paste and edit data as TSV.":"Voc\xea pode copiar, colar e editar dados como TSV.","Copy to clipboard":"Copiar para \xe1rea de transfer\xeancia","Nothing":"Nada","Delete item":"Apagar item","Load symbols":"S\xedmbolos de carga","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conex\xe3o: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 B\xe1sico","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV foi copiado para a \xe1rea de transfer\xeancia"}')},419:function(e){e.exports=JSON.parse('{"Add DB":"Voeg DB toe","Address":"Adres","All entries will be deleted. Are you sure?":"Alle inzendingen worden verwijderd. Weet je het zeker?","Close":"Dichtbij","Delete all entries":"Verwijder alle vermeldingen","Description":"Beschrijving","Enable polling of data point":"Polling van gegevenspunt inschakelen","Export":"Exporteren","Export to CSV":"Exporteren naar CSV","General":"Algemeen","Import":"Importeren","Import DB file":"DB-bestand importeren","Import from CSV":"Importeren vanuit CSV","Import symbols file":"Symboolbestand importeren","Inputs":"ingangen","Length":"Lengte","Load Symbols":"Laad symbolen","Local TSAP":"Lokale TSAP","Local time":"Lokale tijd","Marker":"Markeerstift","Name":"Naam","Offset (no day saving time)":"Offset (geen dagbesparende tijd)","Offset (with day saving time)":"Offset (met dagbesparende tijd)","Outputs":"uitgangen","PLC Connection":"PLC-verbinding","PLC IP Address":"PLC IP-adres","PLC Rack":"PLC Rack","PLC Slot":"PLC-slot","Poll delay":"Poll vertraging","Polling":"stemming","Pulse time":"Pulstijd","RW":"RW","Reconnect time":"Reconnect tijd","Remote TSAP":"TSAP op afstand","Role":"Rol","Room":"Kamer","Round Real to":"Rond echt naar","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tijdmodus","Text copied to clipboard. Click to close the window":"Tekst gekopieerd naar klembord. Klik om het venster te sluiten","Time offset":"Tijd offset","Toggle RW":"RW omschakelen","Toggle WP":"Wissel WP","Toggle poll":"Poll wisselen","Type":"Type","UTC":"UTC","Unit":"Eenheid","WP":"WP","Write access":"Schrijf toegang","Write access allowed":"Schrijftoegang toegestaan","Write pulses (true=>false edge)":"Schrijf pulsen (true => false edge)","minutes":"minuut","poll":"poll","sec":"seconde","write as Pulse":"schrijf als Pulse","Drag \'n\' drop file here, or click to select file":"Sleep het bestand hierheen, of klik om het bestand te selecteren","DBs":"DBs","ms":"ms","Poll":"Opiniepeiling","Change all":"Verander alles","Delete all":"Verwijder alles","Edit as TSV (Tab separated values)":"Bewerken als TSV (door tabs gescheiden waarden)","Add line":"Lijn toevoegen","Delete":"Verwijderen","Are you sure to delete item with address \\"%s\\"?":"Weet u zeker dat u het item met adres \\"%s\\" wilt verwijderen?","Don\'t show this message in 5 minutes":"Dit bericht niet binnen 5 minuten weergeven","Cancel":"annuleren","Delete all items":"Alle items verwijderen","Are you sure to delete all items?":"Weet je zeker dat je alle items wilt verwijderen?","Edit mode":"Bewerkingsmodus","Toggle extended mode":"Schakel uitgebreide modus in","Edit data as TSV":"Gegevens bewerken als TSV","You can copy, paste and edit data as TSV.":"U kunt gegevens kopi\xebren, plakken en bewerken als TSV.","Copy to clipboard":"Kopieer naar klembord","Nothing":"Niets","Delete item":"Verwijder item","Load symbols":"Symbolen laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Aansluittype: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rek en sleuf: [Rack * 0x20 + sleuf]","TSV was copied to clipboard":"TSV is gekopieerd naar het klembord"}')},420:function(e){e.exports=JSON.parse('{"Add DB":"Ajouter une DB","Address":"Adresse","All entries will be deleted. Are you sure?":"Toutes les entr\xe9es seront supprim\xe9es. \xcates-vous s\xfbr?","Close":"Fermer","Delete all entries":"Supprimer toutes les entr\xe9es","Description":"La description","Enable polling of data point":"Activer l\'interrogation du point de donn\xe9es","Export":"Exportation","Export to CSV":"Exporter au format CSV","General":"G\xe9n\xe9ral","Import":"Importer","Import DB file":"Importer un fichier DB","Import from CSV":"Importer \xe0 partir du fichier CSV","Import symbols file":"Importer un fichier de symboles","Inputs":"Contributions","Length":"Longueur","Load Symbols":"Charger des symboles","Local TSAP":"TSAP local","Local time":"Heure locale","Marker":"Marqueur","Name":"pr\xe9nom","Offset (no day saving time)":"D\xe9calage (pas de temps pour gagner du temps)","Offset (with day saving time)":"D\xe9calage (avec un gain de temps de jour)","Outputs":"Les sorties","PLC Connection":"Connexion PLC","PLC IP Address":"Adresse IP de l\'API","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"D\xe9lai d\'interrogation","Polling":"Vote","Pulse time":"Temps d\'impulsion","RW":"RW","Reconnect time":"Reconnectez le temps","Remote TSAP":"TSAP distant","Role":"R\xf4le","Room":"Chambre","Round Real to":"Rond r\xe9el \xe0","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Mode heure","Text copied to clipboard. Click to close the window":"Texte copi\xe9 dans le presse-papier Cliquez pour fermer la fen\xeatre","Time offset":"D\xe9calage temporel","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Basculer le sondage","Type":"Type","UTC":"UTC","Unit":"Unit\xe9","WP":"WP","Write access":"Acc\xe8s en \xe9criture","Write access allowed":"Acc\xe8s en \xe9criture autoris\xe9","Write pulses (true=>false edge)":"\xc9crire des impulsions (true => false edge)","minutes":"minutes","poll":"sondage","sec":"seconde.","write as Pulse":"\xe9crire comme Pulse","Drag \'n\' drop file here, or click to select file":"Glissez-d\xe9posez le fichier ici, ou cliquez pour s\xe9lectionner le fichier","DBs":"DBs","ms":"ms","Poll":"Sondage","Change all":"Change tout","Delete all":"Tout supprimer","Edit as TSV (Tab separated values)":"Modifier en tant que TSV (valeurs s\xe9par\xe9es par des tabulations)","Add line":"Ajouter une ligne","Delete":"Effacer","Are you sure to delete item with address \\"%s\\"?":"\xcates-vous s\xfbr de supprimer l\'\xe9l\xe9ment avec l\'adresse \xab\xa0%s\xa0\xbb\xa0?","Don\'t show this message in 5 minutes":"Ne pas afficher ce message dans 5 minutes","Cancel":"Annuler","Delete all items":"Supprimer tous les \xe9l\xe9ments","Are you sure to delete all items?":"\xcates-vous s\xfbr de supprimer tous les \xe9l\xe9ments\xa0?","Edit mode":"Mode \xe9dition","Toggle extended mode":"Basculer en mode \xe9tendu","Edit data as TSV":"Modifier les donn\xe9es en tant que TSV","You can copy, paste and edit data as TSV.":"Vous pouvez copier, coller et modifier des donn\xe9es au format TSV.","Copy to clipboard":"Copier dans le presse-papier","Nothing":"Rien","Delete item":"Effacer l\'article","Load symbols":"Charger des symboles","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Type de connexion : 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack et slot : [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV a \xe9t\xe9 copi\xe9 dans le presse-papiers"}')},421:function(e){e.exports=JSON.parse('{"Add DB":"Aggiungi DB","Address":"Indirizzo","All entries will be deleted. Are you sure?":"Tutte le voci saranno cancellate. Sei sicuro?","Close":"Vicino","Delete all entries":"Elimina tutte le voci","Description":"Descrizione","Enable polling of data point":"Abilita il polling del punto dati","Export":"Esportare","Export to CSV":"Esporta in CSV","General":"Generale","Import":"Importare","Import DB file":"Importa file DB","Import from CSV":"Importa da CSV","Import symbols file":"Importa file simboli","Inputs":"ingressi","Length":"Lunghezza","Load Symbols":"Carica simboli","Local TSAP":"TSAP locale","Local time":"Ora locale","Marker":"marcatore","Name":"Nome","Offset (no day saving time)":"Offset (nessun giorno risparmiando tempo)","Offset (with day saving time)":"Offset (con ora del giorno)","Outputs":"Uscite","PLC Connection":"Connessione PLC","PLC IP Address":"Indirizzo IP del PLC","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"Ritardo del sondaggio","Polling":"votazione","Pulse time":"Tempo di impulso","RW":"RW","Reconnect time":"Tempo di riconnessione","Remote TSAP":"TSAP remoto","Role":"Ruolo","Room":"Camera","Round Real to":"Round reale a","S7 LOGO!":"LOGO S7 !","S7 Time mode":"Modalit\xe0 ora S7","Text copied to clipboard. Click to close the window":"Testo copiato negli appunti. Clicca per chiudere la finestra","Time offset":"Differenza di fuso orario","Toggle RW":"Attiva / disattiva RW","Toggle WP":"Attiva / disattiva WP","Toggle poll":"Attiva / disattiva sondaggio","Type":"genere","UTC":"UTC","Unit":"Unit\xe0","WP":"WP","Write access":"Accesso in scrittura","Write access allowed":"Accesso in scrittura consentito","Write pulses (true=>false edge)":"Scrivi impulsi (true => falso bordo)","minutes":"minuti","poll":"sondaggio","sec":"sec.","write as Pulse":"scrivi come Pulse","Drag \'n\' drop file here, or click to select file":"Trascina e rilascia il file qui o fai clic per selezionare il file","DBs":"DBs","ms":"ms","Poll":"Sondaggio","Change all":"Cambia tutto","Delete all":"Cancella tutto","Edit as TSV (Tab separated values)":"Modifica come TSV (valori separati da tabulazioni)","Add line":"Aggiungi riga","Delete":"Elimina","Are you sure to delete item with address \\"%s\\"?":"Sei sicuro di eliminare l\'elemento con l\'indirizzo \\"%s\\"?","Don\'t show this message in 5 minutes":"Non mostrare questo messaggio in 5 minuti","Cancel":"Annulla","Delete all items":"Elimina tutti gli elementi","Are you sure to delete all items?":"Sei sicuro di eliminare tutti gli elementi?","Edit mode":"Modalit\xe0 Modifica","Toggle extended mode":"Attiva/disattiva modalit\xe0 estesa","Edit data as TSV":"Modifica dati come TSV","You can copy, paste and edit data as TSV.":"Puoi copiare, incollare e modificare i dati come TSV.","Copy to clipboard":"Copia negli appunti","Nothing":"Niente","Delete item":"Cancellare l\'oggetto","Load symbols":"Simboli di carico","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo di collegamento: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV \xe8 stato copiato negli appunti"}')},422:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Hora local","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Desplazamiento (sin horario de guardado)","Offset (with day saving time)":"Desplazamiento (con horario de ahorro de d\xeda)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Votaci\xf3n","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"Modo de tiempo S7","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Desplazamiento de tiempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Acceso de escritura","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutos","poll":"poll","sec":"sec.","write as Pulse":"escribe como Pulso","Drag \'n\' drop file here, or click to select file":"Arrastre y suelte el archivo aqu\xed o haga clic para seleccionar el archivo","DBs":"DBs","ms":"ms","Poll":"Encuesta","Change all":"Cambia todo","Delete all":"Eliminar todos","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabulaciones)","Add line":"A\xf1adir l\xednea","Delete":"Borrar","Are you sure to delete item with address \\"%s\\"?":"\xbfEst\xe1 seguro de eliminar el elemento con la direcci\xf3n \\"%s\\"?","Don\'t show this message in 5 minutes":"No muestre este mensaje en 5 minutos","Cancel":"Cancelar","Delete all items":"Eliminar todos los elementos","Are you sure to delete all items?":"\xbfEst\xe1 seguro de eliminar todos los elementos?","Edit mode":"Modo de edici\xf3n","Toggle extended mode":"Alternar modo extendido","Edit data as TSV":"Editar datos como TSV","You can copy, paste and edit data as TSV.":"Puede copiar, pegar y editar datos como TSV.","Copy to clipboard":"Copiar al portapapeles","Nothing":"Nada","Delete item":"Eliminar elemento","Load symbols":"Cargar s\xedmbolos","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conexi\xf3n: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack y ranura: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV se copi\xf3 al portapapeles"}')},423:function(e){e.exports=JSON.parse('{"Add DB":"Dodaj DB","Address":"Adres","All entries will be deleted. Are you sure?":"Wszystkie wpisy zostan\u0105 usuni\u0119te. Jeste\u015b pewny?","Close":"Blisko","Delete all entries":"Usu\u0144 wszystkie wpisy","Description":"Opis","Enable polling of data point":"W\u0142\u0105cz odpytywanie punktu danych","Export":"Eksport","Export to CSV":"Eksportuj do pliku CSV","General":"Genera\u0142","Import":"Import","Import DB file":"Importuj plik DB","Import from CSV":"Importuj z CSV","Import symbols file":"Importuj plik symboli","Inputs":"Wej\u015bcia","Length":"D\u0142ugo\u015b\u0107","Load Symbols":"Za\u0142aduj symbole","Local TSAP":"Lokalny TSAP","Local time":"Czas lokalny","Marker":"Znacznik","Name":"Nazwa","Offset (no day saving time)":"Przesuni\u0119cie (brak czasu na dzie\u0144)","Offset (with day saving time)":"Przesuni\u0119cie (z czasem oszcz\u0119dzania dziennego)","Outputs":"Wyj\u015bcia","PLC Connection":"Po\u0142\u0105czenie PLC","PLC IP Address":"Adres IP sterownika PLC","PLC Rack":"Rack PLC","PLC Slot":"Gniazdo PLC","Poll delay":"Op\xf3\u017anienie ankiety","Polling":"Ankieta","Pulse time":"Czas impulsu","RW":"RW","Reconnect time":"Czas ponownego po\u0142\u0105czenia","Remote TSAP":"Zdalny TSAP","Role":"Rola","Room":"Pok\xf3j","Round Real to":"Runda prawdziwa do","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tryb czasu","Text copied to clipboard. Click to close the window":"Tekst skopiowany do schowka. Kliknij, aby zamkn\u0105\u0107 okno","Time offset":"Przesuni\u0119cie czasu","Toggle RW":"Prze\u0142\u0105cz RW","Toggle WP":"Prze\u0142\u0105cz WP","Toggle poll":"Prze\u0142\u0105cz ankiet\u0119","Type":"Rodzaj","UTC":"UTC","Unit":"Jednostka","WP":"WP","Write access":"Dost\u0119p do zapisu","Write access allowed":"Dost\u0119p do zapisu dozwolony","Write pulses (true=>false edge)":"Pisz impulsy (true => false edge)","minutes":"minuty","poll":"g\u0142osowanie","sec":"sec.","write as Pulse":"napisz jako Pulse","Drag \'n\' drop file here, or click to select file":"Przeci\u0105gnij i upu\u015b\u0107 plik tutaj lub kliknij, aby wybra\u0107 plik","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Zmieni\u0107 wszystko","Delete all":"Usu\u0144 wszystko","Edit as TSV (Tab separated values)":"Edytuj jako TSV (warto\u015bci rozdzielone tabulatorami)","Add line":"Dodaj lini\u0119","Delete":"Kasowa\u0107","Are you sure to delete item with address \\"%s\\"?":"Czy na pewno chcesz usun\u0105\u0107 element o adresie \u201e%s\u201d?","Don\'t show this message in 5 minutes":"Nie pokazuj tej wiadomo\u015bci za 5 minut","Cancel":"Anuluj","Delete all items":"Usu\u0144 wszystkie elementy","Are you sure to delete all items?":"Czy na pewno chcesz usun\u0105\u0107 wszystkie elementy?","Edit mode":"Tryb edycji","Toggle extended mode":"Prze\u0142\u0105cz tryb rozszerzony","Edit data as TSV":"Edytuj dane jako TSV","You can copy, paste and edit data as TSV.":"Mo\u017cesz kopiowa\u0107, wkleja\u0107 i edytowa\u0107 dane jako TSV.","Copy to clipboard":"Skopiuj do schowka","Nothing":"Nic","Delete item":"Usu\u0144 przedmiot","Load symbols":"Za\u0142aduj symbole","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Typ po\u0142\u0105czenia: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Szafa i gniazdo: [Stela\u017c * 0x20 + Slot]","TSV was copied to clipboard":"TSV zosta\u0142 skopiowany do schowka"}')},424:function(e){e.exports=JSON.parse('{"Add DB":"\u6dfb\u52a0\u6570\u636e\u5e93","Address":"\u5730\u5740","All entries will be deleted. Are you sure?":"\u6240\u6709\u6761\u76ee\u5c06\u88ab\u5220\u9664\u3002","Close":"\u5173\u95ed","Delete all entries":"\u5220\u9664\u6240\u6709\u6761\u76ee","Description":"\u63cf\u8ff0","Enable polling of data point":"\u542f\u7528\u6570\u636e\u70b9\u8f6e\u8be2","Export":"\u51fa\u53e3","Export to CSV":"\u5bfc\u51fa\u4e3aCSV","General":"\u4e00\u822c\u7684","Import":"\u8fdb\u53e3","Import DB file":"\u5bfc\u5165\u6570\u636e\u5e93\u6587\u4ef6\uff1a","Import from CSV":"\u4eceCSV\u5bfc\u5165","Import symbols file":"\u5bfc\u5165\u7b26\u53f7\u6587\u4ef6\uff1a","Inputs":"\u8f93\u5165\u9879","Length":"\u957f\u5ea6","Load Symbols":"\u52a0\u8f7d\u7b26\u53f7","Local TSAP":"\u672c\u5730TSAP\uff1a","Local time":"\u5f53\u5730\u65f6\u95f4","Marker":"\u8bb0\u53f7\u7b14","Name":"\u540d\u79f0","Offset (no day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u65e0\u590f\u4ee4\u65f6\uff09","Offset (with day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u5e26\u590f\u65f6\u5236\uff09","Outputs":"\u4ea7\u51fa","PLC Connection":"PLC\u8fde\u63a5\uff1a","PLC IP Address":"PLC IP\u5730\u5740\uff1a","PLC Rack":"PLC\u673a\u67b6\uff1a","PLC Slot":"PLC\u63d2\u69fd\uff1a","Poll delay":"\u8f6e\u8be2\u5ef6\u8fdf\uff1a","Polling":"\u8f6e\u8be2","Pulse time":"\u8109\u51b2\u65f6\u95f4\uff1a","RW":"\u8bfb\u5199\u5668","Reconnect time":"\u91cd\u65b0\u8fde\u63a5\u65f6\u95f4\uff1a","Remote TSAP":"\u8fdc\u7a0bTSAP\uff1a","Role":"\u89d2\u8272","Room":"\u623f\u95f4","Round Real to":"\u820d\u5165\u4e3a\uff1a","S7 LOGO!":"S7 LOGO !\uff1a","S7 Time mode":"S7\u65f6\u95f4\u6a21\u5f0f","Text copied to clipboard. Click to close the window":"\u6587\u672c\u5df2\u590d\u5236\u5230\u526a\u8d34\u677f\u3002","Time offset":"\u65f6\u95f4\u504f\u79fb\uff1a","Toggle RW":"\u5207\u6362RW","Toggle WP":"\u5207\u6362WP","Toggle poll":"\u5207\u6362\u6c11\u610f\u8c03\u67e5","Type":"\u7c7b\u578b","UTC":"\u4e16\u754c\u6807\u51c6\u65f6\u95f4","Unit":"\u5355\u5143","WP":"\u53ef\u6e7f\u6027\u7c89\u5242","Write access":"\u5199\u8bbf\u95ee","Write access allowed":"\u5141\u8bb8\u5199\u8bbf\u95ee","Write pulses (true=>false edge)":"\u5199\u8109\u51b2\uff08\u771f=>\u5047\u8fb9\uff09","minutes":"\u5206\u949f","poll":"\u8f6e\u8be2","sec":"\u79d2","write as Pulse":"\u5199\u4e3a\u8109\u51b2","Drag \'n\' drop file here, or click to select file":"\u5c06\u201cn\u201d\u6587\u4ef6\u62d6\u5230\u6b64\u5904\uff0c\u6216\u5355\u51fb\u4ee5\u9009\u62e9\u6587\u4ef6","DBs":"DBs","ms":"ms","Poll":"\u8f6e\u8be2","Change all":"\u5168\u90e8\u66f4\u6539","Delete all":"\u5220\u9664\u6240\u6709","Edit as TSV (Tab separated values)":"\u7f16\u8f91\u4e3a TSV\uff08\u5236\u8868\u7b26\u5206\u9694\u503c\uff09","Add line":"\u6dfb\u52a0\u884c","Delete":"\u5220\u9664","Are you sure to delete item with address \\"%s\\"?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u5730\u5740\u4e3a\u201c%s\u201d\u7684\u9879\u76ee\u5417\uff1f","Don\'t show this message in 5 minutes":"5 \u5206\u949f\u5185\u4e0d\u8981\u663e\u793a\u6b64\u6d88\u606f","Cancel":"\u53d6\u6d88","Delete all items":"\u5220\u9664\u6240\u6709\u9879\u76ee","Are you sure to delete all items?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u6240\u6709\u9879\u76ee\u5417\uff1f","Edit mode":"\u7f16\u8f91\u6a21\u5f0f","Toggle extended mode":"\u5207\u6362\u6269\u5c55\u6a21\u5f0f","Edit data as TSV":"\u5c06\u6570\u636e\u7f16\u8f91\u4e3a TSV","You can copy, paste and edit data as TSV.":"\u60a8\u53ef\u4ee5\u5c06\u6570\u636e\u590d\u5236\u3001\u7c98\u8d34\u548c\u7f16\u8f91\u4e3a TSV\u3002","Copy to clipboard":"\u590d\u5236\u5230\u526a\u8d34\u677f","Nothing":"\u6ca1\u6709\u4ec0\u4e48","Delete item":"\u5220\u9664\u9879\u76ee","Load symbols":"\u52a0\u8f7d\u7b26\u53f7","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u8fde\u63a5\u7c7b\u578b\uff1a0x1 - PG\u30010x2 - OP\u30010x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u673a\u67b6\u548c\u63d2\u69fd\uff1a[\u673a\u67b6 * 0x20 + \u63d2\u69fd]","TSV was copied to clipboard":"TSV \u88ab\u590d\u5236\u5230\u526a\u8d34\u677f"}')},426:function(e,t,a){"use strict";a.r(t);var o=a(0),s=a(16),i=a.n(s),n=a(456),l=(a(348),a(68)),r=a(28),c=a(25),d=a(335),p=a(58),u=a(38),m=a(46),h=a(5),g=a(91),b=a(463),f=a(472),S=a(464),v=a(313),j=a.n(v),x=a(218),T=a.n(x),y=a(13),O=a.n(y),P=a(334),C=a(173),A=a(461),k=a(473),R=a(447),D=a(460),w=a(459),L=a(220),I=a(339),E=a(437),W=a(462),V=a(458),B=a(172),N=a(211),z=a(316),G=a(317),M=a(7),U=function(e){var t=Object(g.b)().enqueueSnackbar,a=Object(o.useCallback)((function(a){e.onChange(a),t(O.a.t("Data updated"))}),[]),s=Object(P.a)({onDrop:a,accept:e.accept}),i=s.getRootProps,n=s.getInputProps,r=s.isDragActive;return Object(M.jsxs)(L.a,{style:{padding:3,paddingRight:40},children:[Object(M.jsx)(C.a,{variant:"h6",gutterBottom:!0,children:O.a.t(e.label)}),Object(M.jsxs)("div",Object(l.a)(Object(l.a)({},i()),{},{className:e.classes.fileInput,style:r?{backgroundColor:"rgba(0, 255, 0, 0.1)"}:{cursor:"pointer"},children:[Object(M.jsx)("input",Object(l.a)({},n())),r?Object(M.jsx)("p",{children:O.a.t("Drop the file here ...")}):Object(M.jsx)("p",{children:O.a.t("Drag 'n' drop file here, or click to select file")})]}))]})},F=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).inputDisabled=function(e){return!1},o.inputDisplay=function(e){if(null===o.props.native.params.slot){if(["rack","slot"].includes(e.name))return!1}else if(["localTSAP","remoteTSAP"].includes(e.name))return!1;return"timeOffset"!==e.name||["summer","offset"].includes(o.props.native.params.timeFormat)},o.changeParam=function(e,t){var a=JSON.parse(JSON.stringify(o.props.native));"s7logo"===e?t?(a.params.localTSAP="",a.params.remoteTSAP="",a.params.rack=null,a.params.slot=null):(a.params.localTSAP=null,a.params.remoteTSAP=null,a.params.rack="",a.params.slot=""):a.params[e]=t,o.props.changeNative(a)},o.loadSymbols=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){var s={inputs:[],outputs:[],markers:[]},i=a.result;(i=i.split("126,")).forEach((function(e){var t=e.slice(23,29).replace(/( )/g,""),a={Name:e.slice(0,23).replace(/( ){2,}/g,""),Address:e.slice(29,36).replace(/( )/g,""),Type:e.slice(36,41).replace(/( )/g,""),Description:e.slice(46,126).replace(/( ){2,}/,""),Unit:"",poll:!0,RW:!1,WP:!1};"E"!==t&&"EB"!==t&&"EW"!==t&&"ED"!==t||s.inputs.push(a),"A"!==t&&"AB"!==t&&"AW"!==t&&"AD"!==t||s.outputs.push(a),"M"!==t&&"MB"!==t&&"MW"!==t&&"MD"!==t||s.markers.push(a)})),["inputs","outputs","markers"].forEach((function(e){t[e]=s[e]})),o.props.changeNative(t)},a.readAsText(e[0],"ISO-8859-1")},o.addDb=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){setTimeout((function(){var e=a.result,o={inputs:!1,outputs:!1,markers:!1,dbs:!1},s={inputs:t.inputs||[],outputs:t.outputs||[],markers:t.markers||[],dbs:t.dbs||[]};if(-1!==e.indexOf("Leseanforderung")){for(var i=e.replace(/\r\n/g,"\n").split("\n"),n={Name:{attr:"Name"},Typ:{attr:""},Operand:{attr:"Address",process:function(e){var t=(e=e.trim()).match(/^DB (\d+)/);if(!t){var a=e.match(/^MB? (\d+)\.?(\d+)?$/);return a?"M "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^AB? (\d+)\.?(\d+)?$/))?"OUT "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^EB? (\d+)\.?(\d+)?$/))?"IN "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):e}var o=e.match(/(\d+).?(\d+)?$/);return t&&o?"DB".concat(t[1]," ").concat(o[1]).concat(void 0!==o[2]?"."+o[2]:""):e}},"SPS-Format":{attr:"Type",process:function(e){return e}},Byteanzahl:{attr:"Length",process:function(e){return parseInt(e,10)}},Zugriff:{attr:"RW",process:function(e){return"read"!==e}},Leseanforderung:{attr:"poll",process:function(e){return"zyklisch"===e}},"AktZeit (ms)":{attr:""},Kommentar:{attr:"Description"},"Clients (Anzahl)":{attr:""}},l=i[0].split(","),r=[],c=0;c10){var t=e.split(/\s+/g);t.shift();for(var a={Address:b+" "+t.shift(),Name:t.shift(),Type:t.shift(),dec:t.shift(),Description:t.join(" "),Unit:"",Role:"",Room:"",poll:!0,RW:!1,WP:!1},i=0;iparseInt(o[1],10))return 1;if(parseInt(a[1],10)parseInt(i[1],10)?1:parseInt(s[1],10)parseInt(i[2],10)?1:parseInt(s[2],10)>8&255,s=255&t;return Object(M.jsxs)(V.a,{item:!0,className:a.props.classes.optionContainer,children:[Object(M.jsx)(E.a,{className:a.props.classes.optionsLabel,children:O.a.t(e.title)}),Object(M.jsx)(I.a,{title:O.a.t("Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic"),style:{width:"6ch"},value:o.toString(16)?o.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,parseInt(t.target.value,16)<<8|s)}}),Object(M.jsx)(I.a,{title:O.a.t("Rack and slot: [Rack * 0x20 + Slot]"),style:{marginLeft:5,width:"6ch"},value:s.toString(16)?s.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,o<<8|parseInt(t.target.value,16))}})]},e.name)}return Object(M.jsx)(V.a,{item:!0,className:a.props.classes.optionContainer,children:Object(M.jsx)(A.a,{type:e.type,label:O.a.t(e.title),className:a.props.classes.optionsTextField,disabled:a.inputDisabled(e),value:a.getValue(e.name),InputProps:{endAdornment:e.dimension?Object(M.jsx)(W.a,{position:"end",children:O.a.t(e.dimension)}):null},onChange:function(t){return a.changeParam(e.name,t.target.value)}})},e.name)}))})]})}},{key:"getImportsBlock",value:function(){return Object(M.jsx)(M.Fragment,{children:Object(M.jsxs)(B.a,{className:this.props.classes.optionsContainer,children:[Object(M.jsx)(C.a,{variant:"h4",gutterBottom:!0,className:this.props.classes.header,children:O.a.t("Import")}),Object(M.jsxs)(N.a,{className:this.props.classes.optionContainer,children:[Object(M.jsx)(U,{classes:this.props.classes,onChange:this.loadSymbols,label:"Load symbols",accept:".asc"}),Object(M.jsx)(U,{classes:this.props.classes,onChange:this.addDb,label:"Add DB",accept:".csv,.prn"})]})]})})}},{key:"render",value:function(){return Object(M.jsx)("form",{className:this.props.classes.tab,children:Object(M.jsxs)(V.a,{container:!0,spacing:2,children:[Object(M.jsxs)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:[this.getInputsBlock(z,"PLC Connection"),this.getImportsBlock()]}),Object(M.jsx)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:this.getInputsBlock(G,"General")})]})})}}]),a}(o.Component),q=Object(h.a)((function(e){return{optionsSelect:{width:280},optionsTextField:{width:280},optionContainer:{},optionsContainer:{width:"calc(100% - ".concat(e.spacing(4),"px)"),padding:e.spacing(2),marginBottom:20,display:"inline-block",textAlign:"left"},optionsGrid:{textAlign:"center",padding:e.spacing(2)},optionsLabel:{fontSize:12},header:{fontSize:24},fileInput:{textAlign:"center",display:"inline-block",height:80,width:200,border:"2px dashed #777",borderRadius:10,marginTop:12,padding:4}}}))(F),J=a(4),Y=a.n(J),$=a(321),Z=a(322),H=a(18),K=a(465),_=a(468),Q=a(466),X=a(469),ee=a(467),te=a(216),ae=a(475),oe=a(471),se=a(80),ie=a.n(se),ne=a(331),le=a.n(ne),re=a(332),ce=a.n(re),de=a(61),pe=a.n(de),ue=a(323),me=a.n(ue),he=a(324),ge=a.n(he),be=a(326),fe=a.n(be),Se=a(223),ve=a(328),je=a.n(ve),xe=a(329),Te=a.n(xe),ye=a(293),Oe=a(294),Pe=a(295),Ce=a(296),Ae=a(297),ke=a(292),Re=a(101),De=a.n(Re),we=a(219),Le=a.n(we),Ie=a(330),Ee=a.n(Ie),We=Object(h.a)((function(e){return{tsvEditor:{width:"100%",height:400},tsvEditorTextarea:{fontFamily:"monospace"}}}))((function(e){var t=Object(o.useState)(""),a=Object(H.a)(t,2),s=a[0],i=a[1];Object(o.useEffect)((function(){var t=[];t.push(e.fields.map((function(e){return e.name}))),e.data.forEach((function(a){return t.push(e.fields.map((function(e){return void 0!==a[e.name]&&null!==a[e.name]?a[e.name].toString():""})))})),i(Object(Se.json2tsv)(t))}),[e.open]);var n=Object(g.b)().enqueueSnackbar;if(!e.open)return null;return Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,maxWidth:"lg",fullWidth:!0,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Edit data as TSV")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("You can copy, paste and edit data as TSV.")}),Object(M.jsx)("div",{children:Object(M.jsx)(je.a,{onChange:function(e){return i(e)},height:"400px",showPrintMargin:!1,value:s,className:e.classes.tsvEditor,width:"100%",setOptions:{firstLineNumber:0},mode:null})})]}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"outlined",color:"primary",onClick:function(){Te()(s),n(O.a.t("TSV was copied to clipboard"))},startIcon:Object(M.jsx)(Ee.a,{}),children:O.a.t("Copy to clipboard")}),Object(M.jsx)(ke.a,{variant:"contained",color:"primary",onClick:function(){var t=Object(Se.tsv2json)(s.endsWith("\n")?s:s+"\n"),a=t.shift(),o=!0,i=[];for(var l in e.fields)e.fields[l].name!==a[l]&&(i.push(Object(M.jsxs)(M.Fragment,{children:["No field ",Object(M.jsx)("i",{children:e.fields[l].name})," in position ",Object(M.jsx)("i",{children:parseInt(l)+1}),"!"]})),o=!1);t=t.map((function(t,a){var s={};for(var n in e.fields)"select"!==e.fields[n].type||e.fields[n].options.map((function(e){return e.value})).includes(t[n])||(i.push(Object(M.jsxs)(M.Fragment,{children:["Value ",Object(M.jsx)("i",{children:t[n]})," is wrong for field ",Object(M.jsx)("i",{children:e.fields[n].name})," in position ",Object(M.jsx)("i",{children:parseInt(a)+1}),"!"]})),o=!1),"checkbox"===e.fields[n].type&&(t[n]="true"===t[n]),s[e.fields[n].name]=t[n];return s})),o?(e.save(t),e.onClose()):n(Object(M.jsx)("div",{children:i.map((function(e,t){return Object(M.jsx)("div",{children:e},t)}))}),{variant:"error"})},startIcon:Object(M.jsx)(Le.a,{}),children:O.a.t("Import")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Close")})]})]})})),Ve=function(e){return e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete all items")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("Are you sure to delete all items?")}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(),e.onClose()},children:O.a.t("Delete all items")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Be=function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1];return Object(o.useEffect)((function(){i(!1)}),[e.open]),e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete item")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t('Are you sure to delete item with address "%s"?',e.item._address)}),Object(M.jsx)(Ce.a,{children:Object(M.jsx)(w.a,{label:O.a.t("Don't show this message in 5 minutes"),control:Object(M.jsx)(k.a,{checked:s,onChange:function(e){return i(e.target.checked)}})})}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(s),e.onClose()},children:O.a.t("Delete")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Ne=function(e){var t,a=e.sortedItem,s=e.field,i=e.editMode,n=e.setEditMode,l=Object(o.useRef)(),r=a.item;if("checkbox"===s.type)t=Object(M.jsx)(oe.a,{title:O.a.t(s.title),children:Object(M.jsx)(k.a,{inputRef:l,className:e.classes.tableCheckbox,checked:!!r[s.name],disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.checked)}})});else if("rooms"===s.type)t=i?Object(M.jsx)(fe.a,{list:e.rooms,allowNone:!0,value:r[s.name],dense:!0,themeType:e.themeType,inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t)},className:e.classes.tableSelectContainer}):Object(M.jsx)(ge.a,{list:e.rooms,value:r[s.name],themeType:e.themeType});else if("select"===s.type)if(i)t=Object(M.jsx)(R.a,{value:r[s.name],inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},className:e.classes.tableSelectContainer,children:s.options.map((function(e){return Object(M.jsx)(D.a,{value:e.value,children:e.title?e.title:Object(M.jsx)("i",{children:O.a.t("Nothing")})},e.value)}))});else{var c=s.options.find((function(e){return e.value===r[s.name]}));t=c?c.title:""}else t=i?Object(M.jsx)(A.a,{value:r[s.name],className:e.classes.tableTextFieldContainer,inputProps:{ref:l,className:e.classes.tableTextField},type:s.type,onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},disabled:e.getDisable(a.$index,s.name)}):r[s.name]?r[s.name]:null;return Object(M.jsx)(ee.a,{className:pe.a.clsx(e.classes.tableCell,!i&&e.classes.nonEditMode),onClick:function(e){n(!0),window.localStorage.setItem("Modbus.editMode","true"),window.setTimeout((function(){return l.current&&l.current.focus()}),100)},children:t})},ze=Object(h.a)((function(e){return{tableHeader:{whiteSpace:"nowrap",fontWeight:"bold",fontSize:"80%",padding:"0px 8px"},tableHeaderExtended:{color:"dark"===e.palette.type?e.palette.primary.light:e.palette.primary.dark},tableCell:{whiteSpace:"nowrap",fontSize:"80%",padding:"0px 8px"},tableContainer:{overflow:"auto",maxHeight:"calc(100vh - 180px)"},tableTextField:{fontSize:"80%"},tableSelect:{fontSize:"80%"},tableTextFieldContainer:{width:"100%"},tableSelectContainer:{width:"100%"},nonEditMode:{cursor:"pointer"}}}))((function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1],n=Object(o.useState)(parseInt(window.localStorage.getItem("Modbus.editMode"),10)||0),r=Object(H.a)(n,2),c=r[0],d=r[1],p=Object(o.useState)("true"===window.localStorage.getItem("Modbus.extendedMode")),u=Object(H.a)(p,2),m=u[0],h=u[1],g=Object(o.useState)({open:!1,action:null}),b=Object(H.a)(g,2),f=b[0],S=b[1],v=Object(o.useState)({open:!1,item:null,action:null}),j=Object(H.a)(v,2),x=j[0],T=j[1],y=e.getSortedData(e.data,e.orderBy,e.order);return Object(M.jsxs)("div",{children:[Object(M.jsxs)("div",{children:[Object(M.jsx)(oe.a,{title:O.a.t("Add line"),children:Object(M.jsx)(te.a,{onClick:function(t){return e.addItem()},children:Object(M.jsx)(le.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Edit as TSV (Tab separated values)"),children:Object(M.jsx)(te.a,{onClick:function(){return i(!0)},children:Object(M.jsx)(ce.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Toggle extended mode"),children:Object(M.jsx)(te.a,{color:m?"primary":"inherit",onClick:function(){window.localStorage.setItem("Modbus.extendedMode",m?"false":"true"),h(!m)},children:Object(M.jsx)(me.a,{})})})]}),Object(M.jsx)("div",{className:e.classes.tableContainer,children:Object(M.jsxs)(K.a,{size:"small",stickyHeader:!0,padding:"none",children:[Object(M.jsx)(_.a,{children:Object(M.jsxs)(X.a,{children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(t){var a=!1,o=!1,s=!1,i=!1;for(var n in e.data)if(e.data[n][t.name]?(a=!0,s=!0):(a=!1,i=!0),s&&i){o=!0,a=!1;break}return Object(M.jsxs)(ee.a,{style:{width:"checkbox"===t.type?20:t.width},className:pe.a.clsx(e.classes.tableHeader,t.expert&&e.classes.tableHeaderExtended),title:t.tooltip?O.a.t(t.tooltip):null,children:["checkbox"===t.type?Object(M.jsx)(oe.a,{title:O.a.t("Change all"),children:Object(M.jsx)(k.a,{indeterminate:o,checked:a,onChange:function(a){var o=JSON.parse(JSON.stringify(e.data));o.forEach((function(e){return e[t.name]=a.target.checked})),e.changeData(o)}})}):null,t.sorted?Object(M.jsx)(ae.a,{active:t.name===e.orderBy,direction:e.order,onClick:function(a){var o=e.orderBy===t.name&&"asc"===e.order;e.onChangeOrder(t.name,o?"desc":"asc")},children:O.a.t(t.title)}):O.a.t(t.title)]},t.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete all"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(t){return S({open:!0,action:function(){return e.changeData([])}})},disabled:!e.data.length,children:Object(M.jsx)(ie.a,{})})})})})]})}),Object(M.jsx)(Q.a,{children:y.map((function(t){return Object(M.jsxs)(X.a,{hover:!0,children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(a){return Object(M.jsx)(Ne,Object(l.a)({themeType:e.themeType,sortedItem:t,field:a,editMode:c===t.$index,rooms:e.rooms,setEditMode:function(){return d(t.$index)}},e),a.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(a){var o=window.sessionStorage.getItem("disableDeleteDialogs");o&&new Date-new Date(o)<3e5?e.deleteItem(t.$index):T({open:!0,action:function(a){a&&window.sessionStorage.setItem("disableDeleteDialogs",(new Date).toISOString()),e.deleteItem(t.$index)},item:t.item})},children:Object(M.jsx)(ie.a,{})})})})})]},t.$index)}))})]})}),s?Object(M.jsx)(We,{open:!0,save:function(t){e.prefix&&t.forEach((function(t){t.Address=(t.Address||"").toUpperCase(),t.Address&&!t.Address.startsWith(e.prefix)&&(t.Address=e.prefix+t.Address)})),e.changeData(t)},onClose:function(){return i(!1)},data:e.data,fields:e.fields}):null,Object(M.jsx)(Ve,{open:f.open,action:f.action,onClose:function(){return S({open:!1,action:null})}}),Object(M.jsx)(Be,{open:x.open,action:x.action,onClose:function(){return T({open:!1,action:null,item:null})},item:x.item})]})})),Ge=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).changeParam=function(e,t,a){var s=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));if(s[e][t]=a,"Type"===t)if(["BOOL"].includes(a)?s[e].Length=.1:["","BYTE"].includes(a)?s[e].Length=1:["WORD","INT","STRING","S5TIME"].includes(a)?s[e].Length=2:["DWORD","DINT","REAL"].includes(a)?s[e].Length=4:["S7TIME"].includes(a)?s[e].Length=8:["S7STRING","ARRAY"].includes(a)&&(s[e].Length=32),"BOOL"===a){var i=o.address2struct(s[e].Address);void 0===i.bit&&(i.bit=0,s[e].Address=o.struct2address(i))}else{var n=o.address2struct(s[e].Address);void 0!==n.bit&&(n.bit>0&&n.byte++,delete n.bit,s[e].Address=o.struct2address(n))}o.props.onChange(o.nativeField,s)},o.addItem=function(){var e=JSON.parse(JSON.stringify(o.props.native[o.nativeField])),t={};if(o.getFields().forEach((function(e){return t[e.name]=""})),e.length){var a=JSON.parse(JSON.stringify(e));a.sort((function(e,t){return e.Address>t.Address?1:-1}));var s=a[a.length-1],i=o.address2struct(s.Address);"BOOL"===s.Type?(i.bit=i.bit||0,i.bit++,i.bit>=8&&(i.bit=i.bit%8,i.byte++)):(delete i.bit,i.byte+=s.Length),void 0!==i.db&&i.byte+s.Length>65535&&(i.db++,i.byte=0,"BOOL"===s.Type&&(i.bit=0)),t.Address=o.struct2address(i),t.Type=s.Type,t.Length=s.Length,t.Unit=s.Unit,t.Role=s.Role,t.Room=s.Room,t.poll=s.poll,t.RW=s.RW,t.WP=s.WP}else t.role="level",t.Type="BOOL",t.Length="0.1",t.poll=!0,"dbs"===o.nativeField?t.Address="DB1 0.0":t.Address="0.0";e.push(t),o.props.onChange(o.nativeField,e)},o.deleteItem=function(e){var t=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));t.splice(e,1),o.props.onChange(o.nativeField,t)},o.changeData=function(e){o.props.onChange(o.nativeField,e)},o.getDisable=function(e,t){return"Length"===t&&!["STRING","S7STRING","ARRAY"].includes(o.props.native[o.nativeField][e].type)},o.getSortedData=function(e,t,a){o.fields=o.fields||o.getFields(),e=e||o.props.native[o.nativeField],t=t||o.state.orderBy,a=a||o.state.order;var s=[];e.forEach((function(e,t){s[t]={item:e,$index:t}}));var i=o.fields.find((function(e){return e.name===t}));return s.sort((function(e,s){var n,l;if("Address"===t){var r=o.address2struct(e.item.Address),c=o.address2struct(s.item.Address);n=0,void 0!==r.db&&(n=r.db<<24),void 0!==c.db&&(l=c.db<<24),n|=r.byte<<8,l|=c.byte<<8,n|=r.bit||0,l|=c.bit||0}else"$index"===t?(n=e[t],l=s[t]):i&&"number"===i.type?(n=parseInt(e.item[t],10),l=parseInt(s.item[t],10)):(n=e.item[t],l=s.item[t]);return("asc"===a?n>l:nfalse edge)":"Write pulses (true=>false edge)","minutes":"minutes","poll":"poll","sec":"sec.","write as Pulse":"write as Pulse","Drag \'n\' drop file here, or click to select file":"Drag \'n\' drop file here, or click to select file","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Change all","Delete all":"Delete all","Edit as TSV (Tab separated values)":"Edit as TSV (Tab separated values)","Add line":"Add line","Delete":"Delete","Are you sure to delete item with address \\"%s\\"?":"Are you sure to delete item with address \\"%s\\"?","Don\'t show this message in 5 minutes":"Don\'t show this message in 5 minutes","Cancel":"Cancel","Delete all items":"Delete all items","Are you sure to delete all items?":"Are you sure to delete all items?","Edit mode":"Edit mode","Toggle extended mode":"Toggle extended mode","Edit data as TSV":"Edit data as TSV","You can copy, paste and edit data as TSV.":"You can copy, paste and edit data as TSV.","Copy to clipboard":"Copy to clipboard","Nothing":"Nothing","Delete item":"Delete item","Load symbols":"Load symbols","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack and slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV was copied to clipboard"}')},416:function(e){e.exports=JSON.parse('{"Add DB":"DB hinzuf\xfcgen","Address":"Adresse","All entries will be deleted. Are you sure?":"Alle Eintr\xe4ge werden gel\xf6scht. Sind sie sicher?","Close":"Zumachen","Delete all entries":"Alle Eintr\xe4ge l\xf6schen","Description":"Beschreibung","Enable polling of data point":"Zyklische Abfrage vom Datenpunkt","Export":"Export","Export to CSV":"Export in CSV","General":"Allgemein","Import":"Import","Import DB file":"DB-Datei importieren","Import from CSV":"Import aus CSV","Import symbols file":"Symboldatei Importieren","Inputs":"Eing\xe4nge","Length":"L\xe4nge","Load Symbols":"Lade Symbole","Local TSAP":"Local TSAP","Local time":"Ortszeit","Marker":"Merker","Name":"Name","Offset (no day saving time)":"Zeit-Offset (ohne Sommerzeit)","Offset (with day saving time)":"Zeit-Offset (mit Sommerzeit)","Outputs":"Ausg\xe4nge","PLC Connection":"SPS Verbindung","PLC IP Address":"SPS IP Adresse","PLC Rack":"SPS Rack","PLC Slot":"SPS Slot","Poll delay":"Poll delay","Polling":"Abfrage","Pulse time":"Pulsetime","RW":"RW","Reconnect time":"Reconnectzeit","Remote TSAP":"Remote TSAP","Role":"Rolle","Room":"Raum","Round Real to":"Aufrunden Real auf","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7-Zeitmodus","Text copied to clipboard. Click to close the window":"Text wurde in der Zwischenablage kopiert. Klick um Fenster zu zumachen.","Time offset":"Zeitverschiebung","Toggle RW":"RW umschalten","Toggle WP":"WP umschalten","Toggle poll":"Poll umschalten","Type":"Typ","UTC":"UTC","Unit":"Einheit","WP":"WP","Write access":"Schreibzugriff","Write access allowed":"Schreiben erlaubt","Write pulses (true=>false edge)":"Schreibe Pulse (Ja=>Nein Kante)","minutes":"Minuten","poll":"poll","sec":"Sek.","write as Pulse":"schreibe als Impuls","Drag \'n\' drop file here, or click to select file":"Die Datei hierher ziehen , oder klicken, um die Datei auszuw\xe4hlen","DBs":"DBs","ms":"ms","Poll":"Abfrage","Change all":"\xc4ndere Alles","Delete all":"Alles l\xf6schen","Edit as TSV (Tab separated values)":"Als TSV bearbeiten (Tabulatorgetrennte Werte)","Add line":"Zeile hinzuf\xfcgen","Delete":"L\xf6schen","Are you sure to delete item with address \\"%s\\"?":"M\xf6chten Sie den Artikel mit der Adresse \\"%s\\" wirklich l\xf6schen?","Don\'t show this message in 5 minutes":"Diese Nachricht nicht in 5\xa0Minuten anzeigen","Cancel":"Abbrechen","Delete all items":"Alle Elemente l\xf6schen","Are you sure to delete all items?":"M\xf6chten Sie wirklich alle Elemente l\xf6schen?","Edit mode":"Bearbeitungsmodus","Toggle extended mode":"Erweiterten Modus umschalten","Edit data as TSV":"Daten als TSV bearbeiten","You can copy, paste and edit data as TSV.":"Sie k\xf6nnen Daten als TSV kopieren, einf\xfcgen und bearbeiten.","Copy to clipboard":"In die Zwischenablage kopieren","Nothing":"Keins","Delete item":"Item l\xf6schen","Load symbols":"Symbole laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Verbindungstyp: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack und Steckplatz: [Rack * 0x20 + Steckplatz]","TSV was copied to clipboard":"TSV wurde in die Zwischenablage kopiert"}')},417:function(e){e.exports=JSON.parse('{"Add DB":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c DB","Address":"\u0410\u0434\u0440\u0435\u0441","All entries will be deleted. Are you sure?":"\u0412\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u044b. \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b?","Close":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c","Delete all entries":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Description":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","Enable polling of data point":"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u043e\u043f\u0440\u043e\u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0446\u0438\u043a\u043b\u0435","Export":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442","Export to CSV":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432 CSV","General":"\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435","Import":"\u0418\u043f\u043c\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c","Import DB file":"\u0418\u043f\u043c\u043e\u0440\u0442 DB \u0444\u0430\u0439\u043b\u043e\u0432","Import from CSV":"\u0418\u043c\u043f\u043e\u0440\u0442 \u0438\u0437 CSV","Import symbols file":"\u0418\u043f\u043c\u043e\u0440\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432","Inputs":"\u0412\u0445\u043e\u0434\u044b","Length":"Length","Load Symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Local TSAP":"Local TSAP","Local time":"\u041c\u0435\u0441\u0442\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f","Marker":"\u041c\u0430\u0440\u043a\u0435\u0440\u044b","Name":"\u0418\u043c\u044f","Offset (no day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0431\u0435\u0437 \u043b\u0435\u0442\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438)","Offset (with day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0441 \u043b\u0435\u0442\u043d\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c)","Outputs":"\u0412\u044b\u0445\u043e\u0434\u044b","PLC Connection":"PLC \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435","PLC IP Address":"PLC IP \u0430\u0434\u0440\u0435\u0441","PLC Rack":"PLC Rack","PLC Slot":"PLC \u0441\u043b\u043e\u0442","Poll delay":"\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043e\u043f\u0440\u043e\u0441\u0430","Polling":"\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"\u0420\u043e\u043b\u044c","Room":"\u041a\u043e\u043c\u043d\u0430\u0442\u0430","Round Real to":"\u041e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c real \u0434\u043e","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 \u0420\u0435\u0436\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Text copied to clipboard. Click to close the window":"\u0422\u0435\u043a\u0441\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430. \u0429\u0435\u043b\u043a\u043d\u0438\u0442\u0435 \u043c\u044b\u0448\u043a\u043e\u0439 \u0437\u0434\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e","Time offset":"\u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Toggle RW":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c RW","Toggle WP":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c WP","Toggle poll":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c poll","Type":"\u0422\u0438\u043f","UTC":"UTC","Unit":"\u0415\u0434\u0438\u043d\u0438\u0446\u044b","WP":"WP","Write access":"\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0437\u0430\u043f\u0438\u0441\u0438","Write access allowed":"\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e","Write pulses (true=>false edge)":"\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u044b (1 => 0)","minutes":"\u043c\u0438\u043d\u0443\u0442\u044b","poll":"poll","sec":"\u0441\u0435\u043a.","write as Pulse":"\u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u0430\u043a Pulse","Drag \'n\' drop file here, or click to select file":"\u041f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0441\u044e\u0434\u0430 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0444\u0430\u0439\u043b","DBs":"DBs","ms":"ms","Poll":"\u041e\u043f\u0440\u043e\u0441","Change all":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435","Delete all":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435","Edit as TSV (Tab separated values)":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a TSV (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0435\u0439)","Add line":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443","Delete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","Are you sure to delete item with address \\"%s\\"?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u0440 \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c \\"%s\\"?","Don\'t show this message in 5 minutes":"\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 5 \u043c\u0438\u043d\u0443\u0442","Cancel":"\u041e\u0442\u043c\u0435\u043d\u0430","Delete all items":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Are you sure to delete all items?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b?","Edit mode":"\u0420\u0435\u0436\u0438\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f","Toggle extended mode":"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c","Edit data as TSV":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV","You can copy, paste and edit data as TSV.":"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV.","Copy to clipboard":"\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430","Nothing":"\u041d\u0438\u0447\u0435\u0433\u043e","Delete item":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0443\u043d\u043a\u0442","Load symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u0422\u0438\u043f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u0421\u0442\u043e\u0439\u043a\u0430 \u0438 \u0441\u043b\u043e\u0442: [\u0421\u0442\u043e\u0439\u043a\u0430 * 0x20 + \u0441\u043b\u043e\u0442]","TSV was copied to clipboard":"TSV \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430"}')},418:function(e){e.exports=JSON.parse('{"Add DB":"Adicionar DB","Address":"Endere\xe7o","All entries will be deleted. Are you sure?":"Todas as entradas ser\xe3o exclu\xeddas. Voc\xea tem certeza?","Close":"Fechar","Delete all entries":"Eliminar todas as entradas","Description":"Descri\xe7\xe3o","Enable polling of data point":"Habilitar a vota\xe7\xe3o do ponto de dados","Export":"Exportar","Export to CSV":"Exportar para CSV","General":"Geral","Import":"Importar","Import DB file":"Importar arquivo DB","Import from CSV":"Importa\xe7\xe3o de CSV","Import symbols file":"Arquivo de s\xedmbolos de importa\xe7\xe3o","Inputs":"Entradas","Length":"comprimento","Load Symbols":"Carregar s\xedmbolos","Local TSAP":"TSAP local","Local time":"Hor\xe1rio local","Marker":"Marcador","Name":"Nome","Offset (no day saving time)":"Deslocamento (sem hor\xe1rio)","Offset (with day saving time)":"Offset (com tempo de economia de hora)","Outputs":"Sa\xeddas","PLC Connection":"Conex\xe3o do PLC","PLC IP Address":"Endere\xe7o IP do PLC","PLC Rack":"PLC Rack","PLC Slot":"Slot PLC","Poll delay":"Retardo de enquete","Polling":"Polling","Pulse time":"Tempo de pulso","RW":"RW","Reconnect time":"Reconectar o tempo","Remote TSAP":"TSAP remoto","Role":"Fun\xe7\xe3o","Room":"Quarto","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO !","S7 Time mode":"Modo de tempo S7","Text copied to clipboard. Click to close the window":"Texto copiado para a \xe1rea de transfer\xeancia. Clique para fechar a janela","Time offset":"Deslocamento de tempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Alternar pesquisa","Type":"Tipo","UTC":"UTC","Unit":"Unidade","WP":"WP","Write access":"Acesso de grava\xe7\xe3o","Write access allowed":"Acesso de acesso permitido","Write pulses (true=>false edge)":"Escrever pulsos (true => false edge)","minutes":"minutos","poll":"vota\xe7\xe3o","sec":"seg.","write as Pulse":"escreva como pulso","Drag \'n\' drop file here, or click to select file":"Arraste e solte o arquivo aqui ou clique para selecionar o arquivo","DBs":"DBs","ms":"ms","Poll":"Enquete","Change all":"Mude tudo","Delete all":"Apagar tudo","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabula\xe7\xe3o)","Add line":"Adicionar linha","Delete":"Excluir","Are you sure to delete item with address \\"%s\\"?":"Tem certeza de que deseja excluir o item com o endere\xe7o \\"%s\\"?","Don\'t show this message in 5 minutes":"N\xe3o mostre esta mensagem em 5 minutos","Cancel":"Cancelar","Delete all items":"Apagar todos os itens","Are you sure to delete all items?":"Tem certeza de que deseja excluir todos os itens?","Edit mode":"Modo de edi\xe7\xe3o","Toggle extended mode":"Alternar modo estendido","Edit data as TSV":"Editar dados como TSV","You can copy, paste and edit data as TSV.":"Voc\xea pode copiar, colar e editar dados como TSV.","Copy to clipboard":"Copiar para \xe1rea de transfer\xeancia","Nothing":"Nada","Delete item":"Apagar item","Load symbols":"S\xedmbolos de carga","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conex\xe3o: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 B\xe1sico","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV foi copiado para a \xe1rea de transfer\xeancia"}')},419:function(e){e.exports=JSON.parse('{"Add DB":"Voeg DB toe","Address":"Adres","All entries will be deleted. Are you sure?":"Alle inzendingen worden verwijderd. Weet je het zeker?","Close":"Dichtbij","Delete all entries":"Verwijder alle vermeldingen","Description":"Beschrijving","Enable polling of data point":"Polling van gegevenspunt inschakelen","Export":"Exporteren","Export to CSV":"Exporteren naar CSV","General":"Algemeen","Import":"Importeren","Import DB file":"DB-bestand importeren","Import from CSV":"Importeren vanuit CSV","Import symbols file":"Symboolbestand importeren","Inputs":"ingangen","Length":"Lengte","Load Symbols":"Laad symbolen","Local TSAP":"Lokale TSAP","Local time":"Lokale tijd","Marker":"Markeerstift","Name":"Naam","Offset (no day saving time)":"Offset (geen dagbesparende tijd)","Offset (with day saving time)":"Offset (met dagbesparende tijd)","Outputs":"uitgangen","PLC Connection":"PLC-verbinding","PLC IP Address":"PLC IP-adres","PLC Rack":"PLC Rack","PLC Slot":"PLC-slot","Poll delay":"Poll vertraging","Polling":"stemming","Pulse time":"Pulstijd","RW":"RW","Reconnect time":"Reconnect tijd","Remote TSAP":"TSAP op afstand","Role":"Rol","Room":"Kamer","Round Real to":"Rond echt naar","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tijdmodus","Text copied to clipboard. Click to close the window":"Tekst gekopieerd naar klembord. Klik om het venster te sluiten","Time offset":"Tijd offset","Toggle RW":"RW omschakelen","Toggle WP":"Wissel WP","Toggle poll":"Poll wisselen","Type":"Type","UTC":"UTC","Unit":"Eenheid","WP":"WP","Write access":"Schrijf toegang","Write access allowed":"Schrijftoegang toegestaan","Write pulses (true=>false edge)":"Schrijf pulsen (true => false edge)","minutes":"minuut","poll":"poll","sec":"seconde","write as Pulse":"schrijf als Pulse","Drag \'n\' drop file here, or click to select file":"Sleep het bestand hierheen, of klik om het bestand te selecteren","DBs":"DBs","ms":"ms","Poll":"Opiniepeiling","Change all":"Verander alles","Delete all":"Verwijder alles","Edit as TSV (Tab separated values)":"Bewerken als TSV (door tabs gescheiden waarden)","Add line":"Lijn toevoegen","Delete":"Verwijderen","Are you sure to delete item with address \\"%s\\"?":"Weet u zeker dat u het item met adres \\"%s\\" wilt verwijderen?","Don\'t show this message in 5 minutes":"Dit bericht niet binnen 5 minuten weergeven","Cancel":"annuleren","Delete all items":"Alle items verwijderen","Are you sure to delete all items?":"Weet je zeker dat je alle items wilt verwijderen?","Edit mode":"Bewerkingsmodus","Toggle extended mode":"Schakel uitgebreide modus in","Edit data as TSV":"Gegevens bewerken als TSV","You can copy, paste and edit data as TSV.":"U kunt gegevens kopi\xebren, plakken en bewerken als TSV.","Copy to clipboard":"Kopieer naar klembord","Nothing":"Niets","Delete item":"Verwijder item","Load symbols":"Symbolen laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Aansluittype: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rek en sleuf: [Rack * 0x20 + sleuf]","TSV was copied to clipboard":"TSV is gekopieerd naar het klembord"}')},420:function(e){e.exports=JSON.parse('{"Add DB":"Ajouter une DB","Address":"Adresse","All entries will be deleted. Are you sure?":"Toutes les entr\xe9es seront supprim\xe9es. \xcates-vous s\xfbr?","Close":"Fermer","Delete all entries":"Supprimer toutes les entr\xe9es","Description":"La description","Enable polling of data point":"Activer l\'interrogation du point de donn\xe9es","Export":"Exportation","Export to CSV":"Exporter au format CSV","General":"G\xe9n\xe9ral","Import":"Importer","Import DB file":"Importer un fichier DB","Import from CSV":"Importer \xe0 partir du fichier CSV","Import symbols file":"Importer un fichier de symboles","Inputs":"Contributions","Length":"Longueur","Load Symbols":"Charger des symboles","Local TSAP":"TSAP local","Local time":"Heure locale","Marker":"Marqueur","Name":"pr\xe9nom","Offset (no day saving time)":"D\xe9calage (pas de temps pour gagner du temps)","Offset (with day saving time)":"D\xe9calage (avec un gain de temps de jour)","Outputs":"Les sorties","PLC Connection":"Connexion PLC","PLC IP Address":"Adresse IP de l\'API","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"D\xe9lai d\'interrogation","Polling":"Vote","Pulse time":"Temps d\'impulsion","RW":"RW","Reconnect time":"Reconnectez le temps","Remote TSAP":"TSAP distant","Role":"R\xf4le","Room":"Chambre","Round Real to":"Rond r\xe9el \xe0","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Mode heure","Text copied to clipboard. Click to close the window":"Texte copi\xe9 dans le presse-papier Cliquez pour fermer la fen\xeatre","Time offset":"D\xe9calage temporel","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Basculer le sondage","Type":"Type","UTC":"UTC","Unit":"Unit\xe9","WP":"WP","Write access":"Acc\xe8s en \xe9criture","Write access allowed":"Acc\xe8s en \xe9criture autoris\xe9","Write pulses (true=>false edge)":"\xc9crire des impulsions (true => false edge)","minutes":"minutes","poll":"sondage","sec":"seconde.","write as Pulse":"\xe9crire comme Pulse","Drag \'n\' drop file here, or click to select file":"Glissez-d\xe9posez le fichier ici, ou cliquez pour s\xe9lectionner le fichier","DBs":"DBs","ms":"ms","Poll":"Sondage","Change all":"Change tout","Delete all":"Tout supprimer","Edit as TSV (Tab separated values)":"Modifier en tant que TSV (valeurs s\xe9par\xe9es par des tabulations)","Add line":"Ajouter une ligne","Delete":"Effacer","Are you sure to delete item with address \\"%s\\"?":"\xcates-vous s\xfbr de supprimer l\'\xe9l\xe9ment avec l\'adresse \xab\xa0%s\xa0\xbb\xa0?","Don\'t show this message in 5 minutes":"Ne pas afficher ce message dans 5 minutes","Cancel":"Annuler","Delete all items":"Supprimer tous les \xe9l\xe9ments","Are you sure to delete all items?":"\xcates-vous s\xfbr de supprimer tous les \xe9l\xe9ments\xa0?","Edit mode":"Mode \xe9dition","Toggle extended mode":"Basculer en mode \xe9tendu","Edit data as TSV":"Modifier les donn\xe9es en tant que TSV","You can copy, paste and edit data as TSV.":"Vous pouvez copier, coller et modifier des donn\xe9es au format TSV.","Copy to clipboard":"Copier dans le presse-papier","Nothing":"Rien","Delete item":"Effacer l\'article","Load symbols":"Charger des symboles","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Type de connexion : 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack et slot : [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV a \xe9t\xe9 copi\xe9 dans le presse-papiers"}')},421:function(e){e.exports=JSON.parse('{"Add DB":"Aggiungi DB","Address":"Indirizzo","All entries will be deleted. Are you sure?":"Tutte le voci saranno cancellate. Sei sicuro?","Close":"Vicino","Delete all entries":"Elimina tutte le voci","Description":"Descrizione","Enable polling of data point":"Abilita il polling del punto dati","Export":"Esportare","Export to CSV":"Esporta in CSV","General":"Generale","Import":"Importare","Import DB file":"Importa file DB","Import from CSV":"Importa da CSV","Import symbols file":"Importa file simboli","Inputs":"ingressi","Length":"Lunghezza","Load Symbols":"Carica simboli","Local TSAP":"TSAP locale","Local time":"Ora locale","Marker":"marcatore","Name":"Nome","Offset (no day saving time)":"Offset (nessun giorno risparmiando tempo)","Offset (with day saving time)":"Offset (con ora del giorno)","Outputs":"Uscite","PLC Connection":"Connessione PLC","PLC IP Address":"Indirizzo IP del PLC","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"Ritardo del sondaggio","Polling":"votazione","Pulse time":"Tempo di impulso","RW":"RW","Reconnect time":"Tempo di riconnessione","Remote TSAP":"TSAP remoto","Role":"Ruolo","Room":"Camera","Round Real to":"Round reale a","S7 LOGO!":"LOGO S7 !","S7 Time mode":"Modalit\xe0 ora S7","Text copied to clipboard. Click to close the window":"Testo copiato negli appunti. Clicca per chiudere la finestra","Time offset":"Differenza di fuso orario","Toggle RW":"Attiva / disattiva RW","Toggle WP":"Attiva / disattiva WP","Toggle poll":"Attiva / disattiva sondaggio","Type":"genere","UTC":"UTC","Unit":"Unit\xe0","WP":"WP","Write access":"Accesso in scrittura","Write access allowed":"Accesso in scrittura consentito","Write pulses (true=>false edge)":"Scrivi impulsi (true => falso bordo)","minutes":"minuti","poll":"sondaggio","sec":"sec.","write as Pulse":"scrivi come Pulse","Drag \'n\' drop file here, or click to select file":"Trascina e rilascia il file qui o fai clic per selezionare il file","DBs":"DBs","ms":"ms","Poll":"Sondaggio","Change all":"Cambia tutto","Delete all":"Cancella tutto","Edit as TSV (Tab separated values)":"Modifica come TSV (valori separati da tabulazioni)","Add line":"Aggiungi riga","Delete":"Elimina","Are you sure to delete item with address \\"%s\\"?":"Sei sicuro di eliminare l\'elemento con l\'indirizzo \\"%s\\"?","Don\'t show this message in 5 minutes":"Non mostrare questo messaggio in 5 minuti","Cancel":"Annulla","Delete all items":"Elimina tutti gli elementi","Are you sure to delete all items?":"Sei sicuro di eliminare tutti gli elementi?","Edit mode":"Modalit\xe0 Modifica","Toggle extended mode":"Attiva/disattiva modalit\xe0 estesa","Edit data as TSV":"Modifica dati come TSV","You can copy, paste and edit data as TSV.":"Puoi copiare, incollare e modificare i dati come TSV.","Copy to clipboard":"Copia negli appunti","Nothing":"Niente","Delete item":"Cancellare l\'oggetto","Load symbols":"Simboli di carico","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo di collegamento: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV \xe8 stato copiato negli appunti"}')},422:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Hora local","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Desplazamiento (sin horario de guardado)","Offset (with day saving time)":"Desplazamiento (con horario de ahorro de d\xeda)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Votaci\xf3n","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"Modo de tiempo S7","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Desplazamiento de tiempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Acceso de escritura","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutos","poll":"poll","sec":"sec.","write as Pulse":"escribe como Pulso","Drag \'n\' drop file here, or click to select file":"Arrastre y suelte el archivo aqu\xed o haga clic para seleccionar el archivo","DBs":"DBs","ms":"ms","Poll":"Encuesta","Change all":"Cambia todo","Delete all":"Eliminar todos","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabulaciones)","Add line":"A\xf1adir l\xednea","Delete":"Borrar","Are you sure to delete item with address \\"%s\\"?":"\xbfEst\xe1 seguro de eliminar el elemento con la direcci\xf3n \\"%s\\"?","Don\'t show this message in 5 minutes":"No muestre este mensaje en 5 minutos","Cancel":"Cancelar","Delete all items":"Eliminar todos los elementos","Are you sure to delete all items?":"\xbfEst\xe1 seguro de eliminar todos los elementos?","Edit mode":"Modo de edici\xf3n","Toggle extended mode":"Alternar modo extendido","Edit data as TSV":"Editar datos como TSV","You can copy, paste and edit data as TSV.":"Puede copiar, pegar y editar datos como TSV.","Copy to clipboard":"Copiar al portapapeles","Nothing":"Nada","Delete item":"Eliminar elemento","Load symbols":"Cargar s\xedmbolos","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conexi\xf3n: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack y ranura: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV se copi\xf3 al portapapeles"}')},423:function(e){e.exports=JSON.parse('{"Add DB":"Dodaj DB","Address":"Adres","All entries will be deleted. Are you sure?":"Wszystkie wpisy zostan\u0105 usuni\u0119te. Jeste\u015b pewny?","Close":"Blisko","Delete all entries":"Usu\u0144 wszystkie wpisy","Description":"Opis","Enable polling of data point":"W\u0142\u0105cz odpytywanie punktu danych","Export":"Eksport","Export to CSV":"Eksportuj do pliku CSV","General":"Genera\u0142","Import":"Import","Import DB file":"Importuj plik DB","Import from CSV":"Importuj z CSV","Import symbols file":"Importuj plik symboli","Inputs":"Wej\u015bcia","Length":"D\u0142ugo\u015b\u0107","Load Symbols":"Za\u0142aduj symbole","Local TSAP":"Lokalny TSAP","Local time":"Czas lokalny","Marker":"Znacznik","Name":"Nazwa","Offset (no day saving time)":"Przesuni\u0119cie (brak czasu na dzie\u0144)","Offset (with day saving time)":"Przesuni\u0119cie (z czasem oszcz\u0119dzania dziennego)","Outputs":"Wyj\u015bcia","PLC Connection":"Po\u0142\u0105czenie PLC","PLC IP Address":"Adres IP sterownika PLC","PLC Rack":"Rack PLC","PLC Slot":"Gniazdo PLC","Poll delay":"Op\xf3\u017anienie ankiety","Polling":"Ankieta","Pulse time":"Czas impulsu","RW":"RW","Reconnect time":"Czas ponownego po\u0142\u0105czenia","Remote TSAP":"Zdalny TSAP","Role":"Rola","Room":"Pok\xf3j","Round Real to":"Runda prawdziwa do","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tryb czasu","Text copied to clipboard. Click to close the window":"Tekst skopiowany do schowka. Kliknij, aby zamkn\u0105\u0107 okno","Time offset":"Przesuni\u0119cie czasu","Toggle RW":"Prze\u0142\u0105cz RW","Toggle WP":"Prze\u0142\u0105cz WP","Toggle poll":"Prze\u0142\u0105cz ankiet\u0119","Type":"Rodzaj","UTC":"UTC","Unit":"Jednostka","WP":"WP","Write access":"Dost\u0119p do zapisu","Write access allowed":"Dost\u0119p do zapisu dozwolony","Write pulses (true=>false edge)":"Pisz impulsy (true => false edge)","minutes":"minuty","poll":"g\u0142osowanie","sec":"sec.","write as Pulse":"napisz jako Pulse","Drag \'n\' drop file here, or click to select file":"Przeci\u0105gnij i upu\u015b\u0107 plik tutaj lub kliknij, aby wybra\u0107 plik","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Zmieni\u0107 wszystko","Delete all":"Usu\u0144 wszystko","Edit as TSV (Tab separated values)":"Edytuj jako TSV (warto\u015bci rozdzielone tabulatorami)","Add line":"Dodaj lini\u0119","Delete":"Kasowa\u0107","Are you sure to delete item with address \\"%s\\"?":"Czy na pewno chcesz usun\u0105\u0107 element o adresie \u201e%s\u201d?","Don\'t show this message in 5 minutes":"Nie pokazuj tej wiadomo\u015bci za 5 minut","Cancel":"Anuluj","Delete all items":"Usu\u0144 wszystkie elementy","Are you sure to delete all items?":"Czy na pewno chcesz usun\u0105\u0107 wszystkie elementy?","Edit mode":"Tryb edycji","Toggle extended mode":"Prze\u0142\u0105cz tryb rozszerzony","Edit data as TSV":"Edytuj dane jako TSV","You can copy, paste and edit data as TSV.":"Mo\u017cesz kopiowa\u0107, wkleja\u0107 i edytowa\u0107 dane jako TSV.","Copy to clipboard":"Skopiuj do schowka","Nothing":"Nic","Delete item":"Usu\u0144 przedmiot","Load symbols":"Za\u0142aduj symbole","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Typ po\u0142\u0105czenia: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Szafa i gniazdo: [Stela\u017c * 0x20 + Slot]","TSV was copied to clipboard":"TSV zosta\u0142 skopiowany do schowka"}')},424:function(e){e.exports=JSON.parse('{"Add DB":"\u6dfb\u52a0\u6570\u636e\u5e93","Address":"\u5730\u5740","All entries will be deleted. Are you sure?":"\u6240\u6709\u6761\u76ee\u5c06\u88ab\u5220\u9664\u3002","Close":"\u5173\u95ed","Delete all entries":"\u5220\u9664\u6240\u6709\u6761\u76ee","Description":"\u63cf\u8ff0","Enable polling of data point":"\u542f\u7528\u6570\u636e\u70b9\u8f6e\u8be2","Export":"\u51fa\u53e3","Export to CSV":"\u5bfc\u51fa\u4e3aCSV","General":"\u4e00\u822c\u7684","Import":"\u8fdb\u53e3","Import DB file":"\u5bfc\u5165\u6570\u636e\u5e93\u6587\u4ef6\uff1a","Import from CSV":"\u4eceCSV\u5bfc\u5165","Import symbols file":"\u5bfc\u5165\u7b26\u53f7\u6587\u4ef6\uff1a","Inputs":"\u8f93\u5165\u9879","Length":"\u957f\u5ea6","Load Symbols":"\u52a0\u8f7d\u7b26\u53f7","Local TSAP":"\u672c\u5730TSAP\uff1a","Local time":"\u5f53\u5730\u65f6\u95f4","Marker":"\u8bb0\u53f7\u7b14","Name":"\u540d\u79f0","Offset (no day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u65e0\u590f\u4ee4\u65f6\uff09","Offset (with day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u5e26\u590f\u65f6\u5236\uff09","Outputs":"\u4ea7\u51fa","PLC Connection":"PLC\u8fde\u63a5\uff1a","PLC IP Address":"PLC IP\u5730\u5740\uff1a","PLC Rack":"PLC\u673a\u67b6\uff1a","PLC Slot":"PLC\u63d2\u69fd\uff1a","Poll delay":"\u8f6e\u8be2\u5ef6\u8fdf\uff1a","Polling":"\u8f6e\u8be2","Pulse time":"\u8109\u51b2\u65f6\u95f4\uff1a","RW":"\u8bfb\u5199\u5668","Reconnect time":"\u91cd\u65b0\u8fde\u63a5\u65f6\u95f4\uff1a","Remote TSAP":"\u8fdc\u7a0bTSAP\uff1a","Role":"\u89d2\u8272","Room":"\u623f\u95f4","Round Real to":"\u820d\u5165\u4e3a\uff1a","S7 LOGO!":"S7 LOGO !\uff1a","S7 Time mode":"S7\u65f6\u95f4\u6a21\u5f0f","Text copied to clipboard. Click to close the window":"\u6587\u672c\u5df2\u590d\u5236\u5230\u526a\u8d34\u677f\u3002","Time offset":"\u65f6\u95f4\u504f\u79fb\uff1a","Toggle RW":"\u5207\u6362RW","Toggle WP":"\u5207\u6362WP","Toggle poll":"\u5207\u6362\u6c11\u610f\u8c03\u67e5","Type":"\u7c7b\u578b","UTC":"\u4e16\u754c\u6807\u51c6\u65f6\u95f4","Unit":"\u5355\u5143","WP":"\u53ef\u6e7f\u6027\u7c89\u5242","Write access":"\u5199\u8bbf\u95ee","Write access allowed":"\u5141\u8bb8\u5199\u8bbf\u95ee","Write pulses (true=>false edge)":"\u5199\u8109\u51b2\uff08\u771f=>\u5047\u8fb9\uff09","minutes":"\u5206\u949f","poll":"\u8f6e\u8be2","sec":"\u79d2","write as Pulse":"\u5199\u4e3a\u8109\u51b2","Drag \'n\' drop file here, or click to select file":"\u5c06\u201cn\u201d\u6587\u4ef6\u62d6\u5230\u6b64\u5904\uff0c\u6216\u5355\u51fb\u4ee5\u9009\u62e9\u6587\u4ef6","DBs":"DBs","ms":"ms","Poll":"\u8f6e\u8be2","Change all":"\u5168\u90e8\u66f4\u6539","Delete all":"\u5220\u9664\u6240\u6709","Edit as TSV (Tab separated values)":"\u7f16\u8f91\u4e3a TSV\uff08\u5236\u8868\u7b26\u5206\u9694\u503c\uff09","Add line":"\u6dfb\u52a0\u884c","Delete":"\u5220\u9664","Are you sure to delete item with address \\"%s\\"?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u5730\u5740\u4e3a\u201c%s\u201d\u7684\u9879\u76ee\u5417\uff1f","Don\'t show this message in 5 minutes":"5 \u5206\u949f\u5185\u4e0d\u8981\u663e\u793a\u6b64\u6d88\u606f","Cancel":"\u53d6\u6d88","Delete all items":"\u5220\u9664\u6240\u6709\u9879\u76ee","Are you sure to delete all items?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u6240\u6709\u9879\u76ee\u5417\uff1f","Edit mode":"\u7f16\u8f91\u6a21\u5f0f","Toggle extended mode":"\u5207\u6362\u6269\u5c55\u6a21\u5f0f","Edit data as TSV":"\u5c06\u6570\u636e\u7f16\u8f91\u4e3a TSV","You can copy, paste and edit data as TSV.":"\u60a8\u53ef\u4ee5\u5c06\u6570\u636e\u590d\u5236\u3001\u7c98\u8d34\u548c\u7f16\u8f91\u4e3a TSV\u3002","Copy to clipboard":"\u590d\u5236\u5230\u526a\u8d34\u677f","Nothing":"\u6ca1\u6709\u4ec0\u4e48","Delete item":"\u5220\u9664\u9879\u76ee","Load symbols":"\u52a0\u8f7d\u7b26\u53f7","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u8fde\u63a5\u7c7b\u578b\uff1a0x1 - PG\u30010x2 - OP\u30010x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u673a\u67b6\u548c\u63d2\u69fd\uff1a[\u673a\u67b6 * 0x20 + \u63d2\u69fd]","TSV was copied to clipboard":"TSV \u88ab\u590d\u5236\u5230\u526a\u8d34\u677f"}')},426:function(e,t,a){"use strict";a.r(t);var o=a(0),s=a(16),i=a.n(s),n=a(456),l=(a(348),a(68)),r=a(28),c=a(25),d=a(335),p=a(58),u=a(38),m=a(46),h=a(5),g=a(91),b=a(463),f=a(472),S=a(464),v=a(313),j=a.n(v),x=a(218),T=a.n(x),y=a(13),O=a.n(y),P=a(334),C=a(173),A=a(461),k=a(473),R=a(447),D=a(460),w=a(459),L=a(220),I=a(339),E=a(437),W=a(462),V=a(458),B=a(172),N=a(211),z=a(316),G=a(317),M=a(7),U=function(e){var t=Object(g.b)().enqueueSnackbar,a=Object(o.useCallback)((function(a){e.onChange(a),t(O.a.t("Data updated"))}),[]),s=Object(P.a)({onDrop:a,accept:e.accept}),i=s.getRootProps,n=s.getInputProps,r=s.isDragActive;return Object(M.jsxs)(L.a,{style:{padding:3,paddingRight:40},children:[Object(M.jsx)(C.a,{variant:"h6",gutterBottom:!0,children:O.a.t(e.label)}),Object(M.jsxs)("div",Object(l.a)(Object(l.a)({},i()),{},{className:e.classes.fileInput,style:r?{backgroundColor:"rgba(0, 255, 0, 0.1)"}:{cursor:"pointer"},children:[Object(M.jsx)("input",Object(l.a)({},n())),r?Object(M.jsx)("p",{children:O.a.t("Drop the file here ...")}):Object(M.jsx)("p",{children:O.a.t("Drag 'n' drop file here, or click to select file")})]}))]})},F=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).inputDisabled=function(e){return!1},o.inputDisplay=function(e){if(null===o.props.native.params.slot){if(["rack","slot"].includes(e.name))return!1}else if(["localTSAP","remoteTSAP"].includes(e.name))return!1;return"timeOffset"!==e.name||["summer","offset"].includes(o.props.native.params.timeFormat)},o.changeParam=function(e,t){var a=JSON.parse(JSON.stringify(o.props.native));"s7logo"===e?t?(a.params.localTSAP="",a.params.remoteTSAP="",a.params.rack=null,a.params.slot=null):(a.params.localTSAP=null,a.params.remoteTSAP=null,a.params.rack="",a.params.slot=""):a.params[e]=t,o.props.changeNative(a)},o.loadSymbols=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){var s={inputs:[],outputs:[],markers:[]},i=a.result;(i=i.split("126,")).forEach((function(e){var t=e.slice(23,29).replace(/( )/g,""),a={Name:e.slice(0,23).replace(/( ){2,}/g,""),Address:e.slice(29,36).replace(/( )/g,""),Type:e.slice(36,41).replace(/( )/g,""),Description:e.slice(46,126).replace(/( ){2,}/,""),Unit:"",poll:!0,RW:!1,WP:!1};"E"!==t&&"EB"!==t&&"EW"!==t&&"ED"!==t||s.inputs.push(a),"A"!==t&&"AB"!==t&&"AW"!==t&&"AD"!==t||s.outputs.push(a),"M"!==t&&"MB"!==t&&"MW"!==t&&"MD"!==t||s.markers.push(a)})),["inputs","outputs","markers"].forEach((function(e){t[e]=s[e]})),o.props.changeNative(t)},a.readAsText(e[0],"ISO-8859-1")},o.addDb=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){setTimeout((function(){var e=a.result,o={inputs:!1,outputs:!1,markers:!1,dbs:!1},s={inputs:t.inputs||[],outputs:t.outputs||[],markers:t.markers||[],dbs:t.dbs||[]};if(-1!==e.indexOf("Leseanforderung")){for(var i=e.replace(/\r\n/g,"\n").split("\n"),n={Name:{attr:"Name"},Typ:{attr:""},Operand:{attr:"Address",process:function(e){var t=(e=e.trim()).match(/^DB (\d+)/);if(!t){var a=e.match(/^MB? (\d+)\.?(\d+)?$/);return a?"M "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^AB? (\d+)\.?(\d+)?$/))?"OUT "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^EB? (\d+)\.?(\d+)?$/))?"IN "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):e}var o=e.match(/(\d+).?(\d+)?$/);return t&&o?"DB".concat(t[1]," ").concat(o[1]).concat(void 0!==o[2]?"."+o[2]:""):e}},"SPS-Format":{attr:"Type",process:function(e){return e}},Byteanzahl:{attr:"Length",process:function(e){return parseInt(e,10)}},Zugriff:{attr:"RW",process:function(e){return"read"!==e}},Leseanforderung:{attr:"poll",process:function(e){return"zyklisch"===e}},"AktZeit (ms)":{attr:""},Kommentar:{attr:"Description"},"Clients (Anzahl)":{attr:""}},l=i[0].split(","),r=[],c=0;c10){var t=e.split(/\s+/g);t.shift();for(var a={Address:b+" "+t.shift(),Name:t.shift(),Type:t.shift(),dec:t.shift(),Description:t.join(" "),Unit:"",Role:"",Room:"",poll:!0,RW:!1,WP:!1},i=0;iparseInt(o[1],10))return 1;if(parseInt(a[1],10)parseInt(i[1],10)?1:parseInt(s[1],10)parseInt(i[2],10)?1:parseInt(s[2],10)>8&255,s=255&t;return Object(M.jsxs)(V.a,{item:!0,className:a.props.classes.optionContainer,children:[Object(M.jsx)(E.a,{className:a.props.classes.optionsLabel,children:O.a.t(e.title)}),Object(M.jsx)(I.a,{title:O.a.t("Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic"),style:{width:"6ch"},value:o.toString(16)?o.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,parseInt(t.target.value,16)<<8|s)}}),Object(M.jsx)(I.a,{title:O.a.t("Rack and slot: [Rack * 0x20 + Slot]"),style:{marginLeft:5,width:"6ch"},value:s.toString(16)?s.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,o<<8|parseInt(t.target.value,16))}})]},e.name)}return Object(M.jsx)(V.a,{item:!0,className:a.props.classes.optionContainer,children:Object(M.jsx)(A.a,{type:e.type,label:O.a.t(e.title),className:a.props.classes.optionsTextField,disabled:a.inputDisabled(e),value:a.getValue(e.name),InputProps:{endAdornment:e.dimension?Object(M.jsx)(W.a,{position:"end",children:O.a.t(e.dimension)}):null},onChange:function(t){return a.changeParam(e.name,t.target.value)}})},e.name)}))})]})}},{key:"getImportsBlock",value:function(){return Object(M.jsx)(M.Fragment,{children:Object(M.jsxs)(B.a,{className:this.props.classes.optionsContainer,children:[Object(M.jsx)(C.a,{variant:"h4",gutterBottom:!0,className:this.props.classes.header,children:O.a.t("Import")}),Object(M.jsxs)(N.a,{className:this.props.classes.optionContainer,children:[Object(M.jsx)(U,{classes:this.props.classes,onChange:this.loadSymbols,label:"Load symbols",accept:".asc"}),Object(M.jsx)(U,{classes:this.props.classes,onChange:this.addDb,label:"Add DB",accept:".csv,.prn"})]})]})})}},{key:"render",value:function(){return Object(M.jsx)("form",{className:this.props.classes.tab,children:Object(M.jsxs)(V.a,{container:!0,spacing:2,children:[Object(M.jsxs)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:[this.getInputsBlock(z,"PLC Connection"),this.getImportsBlock()]}),Object(M.jsx)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:this.getInputsBlock(G,"General")})]})})}}]),a}(o.Component),q=Object(h.a)((function(e){return{optionsSelect:{width:280},optionsTextField:{width:280},optionContainer:{},optionsContainer:{width:"calc(100% - ".concat(e.spacing(4),"px)"),padding:e.spacing(2),marginBottom:20,display:"inline-block",textAlign:"left"},optionsGrid:{textAlign:"center",padding:e.spacing(2)},optionsLabel:{fontSize:12},header:{fontSize:24},fileInput:{textAlign:"center",display:"inline-block",height:80,width:200,border:"2px dashed #777",borderRadius:10,marginTop:12,padding:4}}}))(F),J=a(4),Y=a.n(J),$=a(321),Z=a(322),H=a(18),K=a(465),_=a(468),Q=a(466),X=a(469),ee=a(467),te=a(216),ae=a(475),oe=a(471),se=a(80),ie=a.n(se),ne=a(331),le=a.n(ne),re=a(332),ce=a.n(re),de=a(61),pe=a.n(de),ue=a(323),me=a.n(ue),he=a(324),ge=a.n(he),be=a(326),fe=a.n(be),Se=a(223),ve=a(328),je=a.n(ve),xe=a(329),Te=a.n(xe),ye=a(293),Oe=a(294),Pe=a(295),Ce=a(296),Ae=a(297),ke=a(292),Re=a(101),De=a.n(Re),we=a(219),Le=a.n(we),Ie=a(330),Ee=a.n(Ie),We=Object(h.a)((function(e){return{tsvEditor:{width:"100%",height:400},tsvEditorTextarea:{fontFamily:"monospace"}}}))((function(e){var t=Object(o.useState)(""),a=Object(H.a)(t,2),s=a[0],i=a[1];Object(o.useEffect)((function(){var t=[];t.push(e.fields.map((function(e){return e.name}))),e.data.forEach((function(a){return t.push(e.fields.map((function(e){return void 0!==a[e.name]&&null!==a[e.name]?a[e.name].toString():""})))})),i(Object(Se.json2tsv)(t))}),[e.open]);var n=Object(g.b)().enqueueSnackbar;if(!e.open)return null;return Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,maxWidth:"lg",fullWidth:!0,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Edit data as TSV")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("You can copy, paste and edit data as TSV.")}),Object(M.jsx)("div",{children:Object(M.jsx)(je.a,{onChange:function(e){return i(e)},height:"400px",showPrintMargin:!1,value:s,className:e.classes.tsvEditor,width:"100%",setOptions:{firstLineNumber:0},mode:null})})]}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"outlined",color:"primary",onClick:function(){Te()(s),n(O.a.t("TSV was copied to clipboard"))},startIcon:Object(M.jsx)(Ee.a,{}),children:O.a.t("Copy to clipboard")}),Object(M.jsx)(ke.a,{variant:"contained",color:"primary",onClick:function(){var t=Object(Se.tsv2json)(s.endsWith("\n")?s:s+"\n"),a=t.shift(),o=!0,i=[];for(var l in e.fields)e.fields[l].name!==a[l]&&(i.push(Object(M.jsxs)(M.Fragment,{children:["No field ",Object(M.jsx)("i",{children:e.fields[l].name})," in position ",Object(M.jsx)("i",{children:parseInt(l)+1}),"!"]})),o=!1);t=t.map((function(t,a){var s={};for(var n in e.fields)"select"!==e.fields[n].type||e.fields[n].options.map((function(e){return e.value})).includes(t[n])||(i.push(Object(M.jsxs)(M.Fragment,{children:["Value ",Object(M.jsx)("i",{children:t[n]})," is wrong for field ",Object(M.jsx)("i",{children:e.fields[n].name})," in position ",Object(M.jsx)("i",{children:parseInt(a)+1}),"!"]})),o=!1),"checkbox"===e.fields[n].type&&(t[n]="true"===t[n]),s[e.fields[n].name]=t[n];return s})),o?(e.save(t),e.onClose()):n(Object(M.jsx)("div",{children:i.map((function(e,t){return Object(M.jsx)("div",{children:e},t)}))}),{variant:"error"})},startIcon:Object(M.jsx)(Le.a,{}),children:O.a.t("Import")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Close")})]})]})})),Ve=function(e){return e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete all items")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("Are you sure to delete all items?")}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(),e.onClose()},children:O.a.t("Delete all items")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Be=function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1];return Object(o.useEffect)((function(){i(!1)}),[e.open]),e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete item")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t('Are you sure to delete item with address "%s"?',e.item._address)}),Object(M.jsx)(Ce.a,{children:Object(M.jsx)(w.a,{label:O.a.t("Don't show this message in 5 minutes"),control:Object(M.jsx)(k.a,{checked:s,onChange:function(e){return i(e.target.checked)}})})}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(s),e.onClose()},children:O.a.t("Delete")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Ne=function(e){var t,a=e.sortedItem,s=e.field,i=e.editMode,n=e.setEditMode,l=Object(o.useRef)(),r=a.item;if("checkbox"===s.type)t=Object(M.jsx)(oe.a,{title:O.a.t(s.title),children:Object(M.jsx)(k.a,{inputRef:l,className:e.classes.tableCheckbox,checked:!!r[s.name],disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.checked)}})});else if("rooms"===s.type)t=i?Object(M.jsx)(fe.a,{list:e.rooms,allowNone:!0,value:r[s.name],dense:!0,themeType:e.themeType,inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t)},className:e.classes.tableSelectContainer}):Object(M.jsx)(ge.a,{list:e.rooms,value:r[s.name],themeType:e.themeType});else if("select"===s.type)if(i)t=Object(M.jsx)(R.a,{value:r[s.name],inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},className:e.classes.tableSelectContainer,children:s.options.map((function(e){return Object(M.jsx)(D.a,{value:e.value,children:e.title?e.title:Object(M.jsx)("i",{children:O.a.t("Nothing")})},e.value)}))});else{var c=s.options.find((function(e){return e.value===r[s.name]}));t=c?c.title:""}else t=i?Object(M.jsx)(A.a,{value:r[s.name],className:e.classes.tableTextFieldContainer,inputProps:{ref:l,className:e.classes.tableTextField},type:s.type,onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},disabled:e.getDisable(a.$index,s.name)}):r[s.name]?r[s.name]:null;return Object(M.jsx)(ee.a,{className:pe.a.clsx(e.classes.tableCell,!i&&e.classes.nonEditMode),onClick:function(e){n(!0),window.localStorage.setItem("Modbus.editMode","true"),window.setTimeout((function(){return l.current&&l.current.focus()}),100)},children:t})},ze=Object(h.a)((function(e){return{tableHeader:{whiteSpace:"nowrap",fontWeight:"bold",fontSize:"80%",padding:"0px 8px"},tableHeaderExtended:{color:"dark"===e.palette.type?e.palette.primary.light:e.palette.primary.dark},tableCell:{whiteSpace:"nowrap",fontSize:"80%",padding:"0px 8px"},tableContainer:{overflow:"auto",maxHeight:"calc(100vh - 180px)"},tableTextField:{fontSize:"80%"},tableSelect:{fontSize:"80%"},tableTextFieldContainer:{width:"100%"},tableSelectContainer:{width:"100%"},nonEditMode:{cursor:"pointer"}}}))((function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1],n=Object(o.useState)(parseInt(window.localStorage.getItem("Modbus.editMode"),10)||0),r=Object(H.a)(n,2),c=r[0],d=r[1],p=Object(o.useState)("true"===window.localStorage.getItem("Modbus.extendedMode")),u=Object(H.a)(p,2),m=u[0],h=u[1],g=Object(o.useState)({open:!1,action:null}),b=Object(H.a)(g,2),f=b[0],S=b[1],v=Object(o.useState)({open:!1,item:null,action:null}),j=Object(H.a)(v,2),x=j[0],T=j[1],y=e.getSortedData(e.data,e.orderBy,e.order);return Object(M.jsxs)("div",{children:[Object(M.jsxs)("div",{children:[Object(M.jsx)(oe.a,{title:O.a.t("Add line"),children:Object(M.jsx)(te.a,{onClick:function(t){return e.addItem()},children:Object(M.jsx)(le.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Edit as TSV (Tab separated values)"),children:Object(M.jsx)(te.a,{onClick:function(){return i(!0)},children:Object(M.jsx)(ce.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Toggle extended mode"),children:Object(M.jsx)(te.a,{color:m?"primary":"inherit",onClick:function(){window.localStorage.setItem("Modbus.extendedMode",m?"false":"true"),h(!m)},children:Object(M.jsx)(me.a,{})})})]}),Object(M.jsx)("div",{className:e.classes.tableContainer,children:Object(M.jsxs)(K.a,{size:"small",stickyHeader:!0,padding:"none",children:[Object(M.jsx)(_.a,{children:Object(M.jsxs)(X.a,{children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(t){var a=!1,o=!1,s=!1,i=!1;for(var n in e.data)if(e.data[n][t.name]?(a=!0,s=!0):(a=!1,i=!0),s&&i){o=!0,a=!1;break}return Object(M.jsxs)(ee.a,{style:{width:"checkbox"===t.type?20:t.width},className:pe.a.clsx(e.classes.tableHeader,t.expert&&e.classes.tableHeaderExtended),title:t.tooltip?O.a.t(t.tooltip):null,children:["checkbox"===t.type?Object(M.jsx)(oe.a,{title:O.a.t("Change all"),children:Object(M.jsx)(k.a,{indeterminate:o,checked:a,onChange:function(a){var o=JSON.parse(JSON.stringify(e.data));o.forEach((function(e){return e[t.name]=a.target.checked})),e.changeData(o)}})}):null,t.sorted?Object(M.jsx)(ae.a,{active:t.name===e.orderBy,direction:e.order,onClick:function(a){var o=e.orderBy===t.name&&"asc"===e.order;e.onChangeOrder(t.name,o?"desc":"asc")},children:O.a.t(t.title)}):O.a.t(t.title)]},t.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete all"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(t){return S({open:!0,action:function(){return e.changeData([])}})},disabled:!e.data.length,children:Object(M.jsx)(ie.a,{})})})})})]})}),Object(M.jsx)(Q.a,{children:y.map((function(t){return Object(M.jsxs)(X.a,{hover:!0,children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(a){return Object(M.jsx)(Ne,Object(l.a)({themeType:e.themeType,sortedItem:t,field:a,editMode:c===t.$index,rooms:e.rooms,setEditMode:function(){return d(t.$index)}},e),a.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(a){var o=window.sessionStorage.getItem("disableDeleteDialogs");o&&new Date-new Date(o)<3e5?e.deleteItem(t.$index):T({open:!0,action:function(a){a&&window.sessionStorage.setItem("disableDeleteDialogs",(new Date).toISOString()),e.deleteItem(t.$index)},item:t.item})},children:Object(M.jsx)(ie.a,{})})})})})]},t.$index)}))})]})}),s?Object(M.jsx)(We,{open:!0,save:function(t){e.prefix&&t.forEach((function(t){t.Address=(t.Address||"").toUpperCase(),t.Address&&!t.Address.startsWith(e.prefix)&&(t.Address=e.prefix+t.Address)})),e.changeData(t)},onClose:function(){return i(!1)},data:e.data,fields:e.fields}):null,Object(M.jsx)(Ve,{open:f.open,action:f.action,onClose:function(){return S({open:!1,action:null})}}),Object(M.jsx)(Be,{open:x.open,action:x.action,onClose:function(){return T({open:!1,action:null,item:null})},item:x.item})]})})),Ge=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).changeParam=function(e,t,a){var s=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));if(s[e][t]=a,"Type"===t)if(["BOOL"].includes(a)?s[e].Length=.1:["","BYTE"].includes(a)?s[e].Length=1:["WORD","INT","STRING","S5TIME"].includes(a)?s[e].Length=2:["DWORD","DINT","REAL"].includes(a)?s[e].Length=4:["S7TIME"].includes(a)?s[e].Length=8:["S7STRING","ARRAY"].includes(a)&&(s[e].Length=32),"BOOL"===a){var i=o.address2struct(s[e].Address);void 0===i.bit&&(i.bit=0,s[e].Address=o.struct2address(i))}else{var n=o.address2struct(s[e].Address);void 0!==n.bit&&(n.bit>0&&n.byte++,delete n.bit,s[e].Address=o.struct2address(n))}o.props.onChange(o.nativeField,s)},o.addItem=function(){var e=JSON.parse(JSON.stringify(o.props.native[o.nativeField])),t={};if(o.getFields().forEach((function(e){return t[e.name]=""})),e.length){var a=JSON.parse(JSON.stringify(e));a.sort((function(e,t){return e.Address>t.Address?1:-1}));var s=a[a.length-1],i=o.address2struct(s.Address);"BOOL"===s.Type?(i.bit=i.bit||0,i.bit++,i.bit>=8&&(i.bit=i.bit%8,i.byte++)):(delete i.bit,i.byte+=s.Length),void 0!==i.db&&i.byte+s.Length>65535&&(i.db++,i.byte=0,"BOOL"===s.Type&&(i.bit=0)),t.Address=o.struct2address(i),t.Type=s.Type,t.Length=s.Length,t.Unit=s.Unit,t.Role=s.Role,t.Room=s.Room,t.poll=s.poll,t.RW=s.RW,t.WP=s.WP}else t.role="level",t.Type="BOOL",t.Length="0.1",t.poll=!0,"dbs"===o.nativeField?t.Address="DB1 0.0":t.Address="0.0";e.push(t),o.props.onChange(o.nativeField,e)},o.deleteItem=function(e){var t=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));t.splice(e,1),o.props.onChange(o.nativeField,t)},o.changeData=function(e){o.props.onChange(o.nativeField,e)},o.getDisable=function(e,t){return"Length"===t&&!["STRING","S7STRING","ARRAY"].includes(o.props.native[o.nativeField][e].type)},o.getSortedData=function(e,t,a){o.fields=o.fields||o.getFields(),e=e||o.props.native[o.nativeField],t=t||o.state.orderBy,a=a||o.state.order;var s=[];e.forEach((function(e,t){s[t]={item:e,$index:t}}));var i=o.fields.find((function(e){return e.name===t}));return s.sort((function(e,s){var n,l;if("Address"===t){var r=o.address2struct(e.item.Address),c=o.address2struct(s.item.Address);n=0,void 0!==r.db&&(n=r.db<<24),void 0!==c.db&&(l=c.db<<24),n|=r.byte<<8,l|=c.byte<<8,n|=r.bit||0,l|=c.bit||0}else"$index"===t?(n=e[t],l=s[t]):i&&"number"===i.type?(n=parseInt(e.item[t],10),l=parseInt(s.item[t],10)):(n=e.item[t],l=s.item[t]);return("asc"===a?n>l:n ({\r\n optionsSelect: {\r\n width: 280\r\n },\r\n optionsTextField: {\r\n width: 280\r\n },\r\n optionContainer: {\r\n },\r\n optionsContainer: {\r\n width: `calc(100% - ${theme.spacing(4)}px)`,\r\n padding: theme.spacing(2),\r\n marginBottom: 20,\r\n display: 'inline-block',\r\n textAlign: 'left'\r\n },\r\n optionsGrid: {\r\n textAlign: 'center',\r\n padding: theme.spacing(2),\r\n },\r\n optionsLabel: {\r\n fontSize: 12,\r\n },\r\n header: {\r\n fontSize: 24,\r\n },\r\n fileInput: {\r\n textAlign: 'center',\r\n display: 'inline-block',\r\n height: 80,\r\n width: 200,\r\n border: '2px dashed #777',\r\n borderRadius: 10,\r\n marginTop: 12,\r\n padding: 4\r\n }\r\n});\r\n\r\nlet FileInput = function (props) {\r\n const { enqueueSnackbar } = useSnackbar();\r\n const onDrop = useCallback(acceptedFiles => {\r\n props.onChange(acceptedFiles);\r\n enqueueSnackbar(I18n.t('Data updated'));\r\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\r\n\r\n const {getRootProps, getInputProps, isDragActive} = useDropzone({onDrop, accept: props.accept});\r\n\r\n return \r\n { I18n.t(props.label)}\r\n
\r\n \r\n {\r\n isDragActive ?\r\n

{I18n.t('Drop the file here ...')}

:\r\n

{I18n.t(`Drag 'n' drop file here, or click to select file`)}

\r\n }\r\n
\r\n
;\r\n};\r\n\r\nclass Options extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n };\r\n }\r\n\r\n getValue(name) {\r\n if (name === 's7logo') {\r\n return this.props.native.params.slot === null;\r\n }\r\n return this.props.native.params[name];\r\n }\r\n\r\n inputDisabled = input => {\r\n return false;\r\n }\r\n\r\n inputDisplay = input => {\r\n if (this.props.native.params.slot === null) {\r\n if (['rack', 'slot'].includes(input.name)) {\r\n return false;\r\n }\r\n } else {\r\n if (['localTSAP', 'remoteTSAP'].includes(input.name)) {\r\n return false;\r\n }\r\n }\r\n if (input.name === 'timeOffset') {\r\n return ['summer', 'offset'].includes(this.props.native.params.timeFormat);\r\n }\r\n return true;\r\n }\r\n\r\n getInputsBlock(inputs, title) {\r\n return \r\n {I18n.t(title)}\r\n \r\n {inputs.map(input => {\r\n if (!this.inputDisplay(input)) {\r\n return null;\r\n }\r\n if (input.type === 'checkbox') {\r\n return \r\n this.changeParam(input.name, e.target.checked)}\r\n />}/> {input.dimension ? I18n.t(input.dimension) : null};\r\n } else if (input.type === 'select') {\r\n return \r\n \r\n {I18n.t(input.title)}\r\n this.changeParam(input.name, e.target.value)}\r\n >\r\n {input.options.map(option =>\r\n {option.title}\r\n )}\r\n \r\n {input.dimension ? I18n.t(input.dimension) : null}\r\n ;\r\n } else if (input.type === 'hex') {\r\n let value = parseInt(this.getValue(input.name)) ? parseInt(this.getValue(input.name)) : 0;\r\n let top = (value >> 8) & 0xFF;\r\n let bottom = value & 0xFF;\r\n\r\n return \r\n {I18n.t(input.title)}\r\n {\r\n if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\r\n return;\r\n }\r\n this.changeParam(input.name, (parseInt(e.target.value, 16) << 8) | bottom);\r\n }}\r\n />\r\n {\r\n if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\r\n return;\r\n }\r\n this.changeParam(input.name, (top << 8) | parseInt(e.target.value, 16));\r\n }}\r\n />\r\n ;\r\n } else {\r\n return {I18n.t(input.dimension)} : null\r\n }}\r\n onChange={e => this.changeParam(input.name, e.target.value)}\r\n />;\r\n }\r\n })}\r\n \r\n ;\r\n }\r\n\r\n getImportsBlock() {\r\n return <>\r\n {I18n.t('Import')}\r\n \r\n \r\n \r\n \r\n ;\r\n }\r\n\r\n render() {\r\n return
\r\n \r\n \r\n {this.getInputsBlock(connectionInputs, 'PLC Connection')}\r\n {this.getImportsBlock()}\r\n \r\n {this.getInputsBlock(generalInputs, 'General')}\r\n \r\n
;\r\n }\r\n\r\n changeParam = (name, value) => {\r\n let native = JSON.parse(JSON.stringify(this.props.native));\r\n if (name === 's7logo') {\r\n if (value) {\r\n native.params.localTSAP = '';\r\n native.params.remoteTSAP = '';\r\n native.params.rack = null;\r\n native.params.slot = null;\r\n } else {\r\n native.params.localTSAP = null;\r\n native.params.remoteTSAP = null;\r\n native.params.rack = '';\r\n native.params.slot = '';\r\n }\r\n } else {\r\n native.params[name] = value;\r\n }\r\n this.props.changeNative(native);\r\n }\r\n\r\n loadSymbols = e => {\r\n let native = JSON.parse(JSON.stringify(this.props.native));\r\n const reader = new FileReader();\r\n\r\n reader.onload = e => {\r\n const localData = {\r\n inputs: [],\r\n outputs: [],\r\n markers: []\r\n// counter: [],\r\n// timer: [],\r\n// dbs: []\r\n };\r\n let text = reader.result;\r\n\r\n text = text.split('126,');\r\n text.forEach(line => {\r\n const typ = line.slice(23, 29).replace(/( )/g, '');\r\n\r\n const d = {\r\n Name: line.slice(0, 23).replace(/( ){2,}/g, ''),\r\n Address: line.slice(29, 36).replace(/( )/g, ''),\r\n Type: line.slice(36, 41).replace(/( )/g, ''),\r\n Description: line.slice(46, 126).replace(/( ){2,}/, ''),\r\n Unit: '',\r\n// Role: '',\r\n// Room: '',\r\n poll: true,\r\n RW: false,\r\n WP: false\r\n };\r\n\r\n// if (typ == 'E' || typ == 'EB' ||typ == 'EW' ||typ == 'ED'||typ == 'PEB'||typ == 'PEW'||typ == 'PED')data.inputs.push(d);\r\n// if (typ == 'A' || typ == 'AB' ||typ == 'AW' ||typ == 'AD'||typ == 'PAB'||typ == 'PAW'||typ == 'PAD')data.outputs.push(d);\r\n if (typ === 'E' || typ === 'EB' || typ === 'EW' || typ === 'ED') localData.inputs.push(d);\r\n if (typ === 'A' || typ === 'AB' || typ === 'AW' || typ === 'AD') localData.outputs.push(d);\r\n if (typ === 'M' || typ === 'MB' || typ === 'MW' || typ === 'MD') localData.markers.push(d);\r\n// if (typ == 'C')data.counter.push(d);\r\n// if (typ == 'T')data.timer.push(d);\r\n// if (typ == 'DB')data.dbs.push(d);\r\n });\r\n\r\n ['inputs', 'outputs', 'markers'].forEach(table => {\r\n native[table] = localData[table];\r\n });\r\n this.props.changeNative(native);\r\n };\r\n\r\n reader.readAsText(e[0], 'ISO-8859-1');\r\n }\r\n\r\n addDb = e => {\r\n let native = JSON.parse(JSON.stringify(this.props.native));\r\n const reader = new FileReader();\r\n\r\n reader.onload = e => {\r\n setTimeout(function () {\r\n const text = reader.result;\r\n const changes = {\r\n inputs: false,\r\n outputs: false,\r\n markers: false,\r\n dbs: false\r\n };\r\n const newParts = {\r\n inputs: native.inputs || [],\r\n outputs: native.outputs || [],\r\n markers: native.markers || [],\r\n dbs: native.dbs || []\r\n };\r\n\r\n if (text.indexOf('Leseanforderung') !== -1) {\r\n // Graphpic format\r\n const lines = text.replace(/\\r\\n/g, '\\n').split('\\n');\r\n const mapping = {\r\n 'Name': {attr: 'Name'},\r\n 'Typ': {attr: ''},\r\n 'Operand': {attr: 'Address', process: f => {\r\n // DB 504.DBW 1462 => DB504 1462\r\n f = f.trim();\r\n const db = f.match(/^DB (\\d+)/);\r\n if (!db) {\r\n // M\r\n // MB\r\n let m = f.match(/^MB? (\\d+)\\.?(\\d+)?$/);\r\n if (m) {\r\n return 'M ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n } else {\r\n m = f.match(/^AB? (\\d+)\\.?(\\d+)?$/);\r\n if (m) {\r\n return 'OUT ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n } else {\r\n m = f.match(/^EB? (\\d+)\\.?(\\d+)?$/);\r\n if (m) {\r\n return 'IN ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n } else {\r\n return f;\r\n }\r\n }\r\n }\r\n }\r\n\r\n const offset = f.match(/(\\d+).?(\\d+)?$/);\r\n if (db && offset) {\r\n return `DB${db[1]} ${offset[1]}${offset[2] !== undefined ? '.' + offset[2] : ''}`;\r\n } else {\r\n return f;\r\n }\r\n }},\r\n 'SPS-Format': {attr: 'Type', process: function (f) {return f;} },\r\n 'Byteanzahl': {attr: 'Length', process: function (f) {return parseInt(f, 10);} },\r\n 'Zugriff': {attr: 'RW', process: function (f) {return f !== 'read';} },\r\n 'Leseanforderung': {attr: 'poll', process: function (f) {return f === 'zyklisch';} },\r\n 'AktZeit (ms)': {attr: ''},\r\n 'Kommentar': {attr: 'Description'},\r\n 'Clients (Anzahl)': {attr: ''}\r\n };\r\n // First line\r\n // \"Name\",\"Typ\",\"Operand\",\"SPS-Format\",\"Byteanzahl\",\"Zugriff\",\"Leseanforderung\",\"AktZeit (ms)\",\"Kommentar\",\"Clients (Anzahl)\"\r\n let sFields = lines[0].split(',');\r\n // create mapping\r\n const fields = [];\r\n for (let m = 0; m < sFields.length; m++) {\r\n sFields[m] = sFields[m].replace(/\"/g, '');\r\n fields.push(mapping[sFields[m]]);\r\n }\r\n for (let l = 1; l < lines.length; l++) {\r\n lines[l] = lines[l].trim();\r\n if (!lines[l]) continue;\r\n sFields = lines[l].trim().split(',');\r\n let obj = {\r\n Type: 'ARRAY',\r\n Unit: '',\r\n Role: '',\r\n Room: '',\r\n poll: true,\r\n RW: false,\r\n WP: false\r\n };\r\n for (let f = 0; f < fields.length; f++) {\r\n if (!fields[f].attr) {\r\n continue;\r\n }\r\n if (!sFields[f]) {\r\n console.log('error');\r\n break;\r\n }\r\n sFields[f] = sFields[f].replace(/\"/g, '');\r\n obj[fields[f].attr] = fields[f].process ? fields[f].process(sFields[f]) : sFields[f];\r\n\r\n if (obj.Name.match(/^@/)) {\r\n obj = null;\r\n break;\r\n }\r\n }\r\n if (obj) {\r\n if (obj.Type === 'BYTE' && obj.Length !== 1) {\r\n obj.Type = 'ARRAY';\r\n }\r\n if (obj.Type === 'CHAR') {\r\n obj.Type = 'STRING';\r\n }\r\n if (obj.Type === 'BYTE' || obj.Type === 'BOOL' || obj.Type === 'INT') {\r\n obj.Length = '';\r\n }\r\n let _attr;\r\n if (obj.Address.match(/^DB/)) {\r\n _attr = 'dbs';\r\n } else if (obj.Address.match(/^IN/)) {\r\n obj.Address = obj.Address.replace(/^IN\\s?/, '');\r\n _attr = 'inputs';\r\n } else if (obj.Address.match(/^OUT/)) {\r\n _attr = 'outputs';\r\n obj.Address = obj.Address.replace(/^OUT\\s?/, '');\r\n } else if (obj.Address.match(/^M/)) {\r\n _attr = 'markers';\r\n obj.Address = obj.Address.replace(/^M\\s?/, '');\r\n } else {\r\n console.error('Unknown TYPE: ' + obj.Address);\r\n continue;\r\n }\r\n // try to find same address\r\n for (let aaa = 0; aaa < newParts[_attr].length; aaa++) {\r\n if (newParts[_attr][aaa].Address === obj.Address) {\r\n newParts[_attr][aaa] = obj;\r\n changes[_attr] = true;\r\n obj = null;\r\n break;\r\n }\r\n }\r\n if (obj) {\r\n changes[_attr] = true;\r\n newParts[_attr].push(obj);\r\n }\r\n }\r\n }\r\n } else {\r\n const mm = text.match(/(DB)[0-9]+\\s-\\s/g);\r\n const db = mm ? mm[0].replace(' - ', '') : '';\r\n const vv = text.split('STRUCT');\r\n\r\n const struck = vv[1] ? vv[1].split('=')[0].split('\\n') : [];\r\n\r\n struck.forEach((item) => {\r\n if (item.length > 10) {\r\n const x = item.split(/\\s+/g);\r\n x.shift();\r\n\r\n let obj = {\r\n Address: db + ' ' + x.shift(),\r\n Name: x.shift(),\r\n Type: x.shift(),\r\n dec: x.shift(),\r\n Description: x.join(' '),\r\n Unit: '',\r\n Role: '',\r\n Room: '',\r\n poll: true,\r\n RW: false,\r\n WP: false\r\n };\r\n\r\n // try to find same address\r\n for (let aaa = 0; aaa < newParts.dbs.length; aaa++) {\r\n if (newParts.dbs[aaa].Address === obj.Address) {\r\n newParts.dbs[aaa] = obj;\r\n changes.dbs = true;\r\n obj = null;\r\n break;\r\n }\r\n }\r\n if (obj) {\r\n changes.dbs = true;\r\n newParts.dbs.push(obj);\r\n }\r\n }\r\n });\r\n }\r\n for (const attr in newParts) {\r\n if (!newParts.hasOwnProperty(attr)) {\r\n continue;\r\n }\r\n newParts[attr].sort((a, b) => {\r\n const aDB = a.Address.match(/^D?B?\\s?(\\d+)/);\r\n const bDB = b.Address.match(/^D?B?\\s?(\\d+)/);\r\n if (!aDB) return -1;\r\n if (!bDB) return 1;\r\n if (parseInt(aDB[1], 10) > parseInt(bDB[1], 10)) return 1;\r\n if (parseInt(aDB[1], 10) < parseInt(bDB[1], 10)) return -1;\r\n const aOffset = a.Address.match(/\\s(\\d+).?(\\d+)?$/);\r\n const bOffset = b.Address.match(/\\s(\\d+).?(\\d+)?$/);\r\n if (!aOffset) return -1;\r\n if (!bOffset) return 1;\r\n if (parseInt(aOffset[1], 10) > parseInt(bOffset[1], 10)) return 1;\r\n if (parseInt(aOffset[1], 10) < parseInt(bOffset[1], 10)) return -1;\r\n if (aOffset[2] === undefined && bOffset[2] !== undefined) return 1;\r\n if (bOffset[2] === undefined && aOffset[2] !== undefined) return -1;\r\n if (aOffset[2] === undefined && bOffset[2] === undefined) return 0;\r\n if (parseInt(aOffset[2], 10) > parseInt(bOffset[2], 10)) return 1;\r\n if (parseInt(aOffset[2], 10) < parseInt(bOffset[1], 10)) return -1;\r\n return 0;\r\n });\r\n }\r\n if (changes.dbs) {\r\n native.dbs = newParts.dbs;\r\n }\r\n if (changes.inputs) {\r\n native.inputs = newParts.inputs;\r\n }\r\n if (changes.outputs) {\r\n native.outputs = newParts.outputs;\r\n }\r\n if (changes.markers) {\r\n native.markers = newParts.markers;\r\n }\r\n console.log(native);\r\n //this.props.changeNative(native);\r\n }, 200);\r\n };\r\n\r\n reader.readAsText(e[0], 'ISO-8859-1');\r\n }\r\n}\r\n\r\nOptions.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default withStyles(styles)(Options);\r\n","import { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport { tsv2json, json2tsv } from 'tsv-json';\r\nimport { useSnackbar } from 'notistack';\r\nimport AceEditor from \"react-ace\";\r\nimport copy from 'copy-to-clipboard';\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\n\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\nimport SaveIcon from '@material-ui/icons/Save';\r\nimport FileCopyIcon from '@material-ui/icons/FileCopy';\r\n\r\nconst styles = theme => ({\r\n tsvEditor: {\r\n width: '100%',\r\n height: 400\r\n },\r\n tsvEditorTextarea: {\r\n fontFamily: 'monospace'\r\n }\r\n});\r\n\r\nconst TsvDialog = props => {\r\n const [tsv, setTsv] = useState('');\r\n useEffect(() => {\r\n let tsvResult = [];\r\n tsvResult.push(props.fields.map(field => field.name));\r\n props.data.forEach(item =>\r\n tsvResult.push(props.fields.map(field => item[field.name] !== undefined && item[field.name] !== null ? item[field.name].toString() : ''))\r\n );\r\n setTsv(json2tsv(tsvResult));\r\n }, [props.open]); // eslint-disable-line react-hooks/exhaustive-deps\r\n const { enqueueSnackbar } = useSnackbar();\r\n\r\n if (!props.open) {\r\n return null;\r\n }\r\n\r\n const saveTsv = () => {\r\n let data = tsv2json(tsv.endsWith('\\n') ? tsv : tsv + '\\n');\r\n let fields = data.shift();\r\n let success = true;\r\n let errors = [];\r\n for (let index in props.fields) {\r\n if (props.fields[index].name !== fields[index]) {\r\n errors.push(<>No field {props.fields[index].name} in position {parseInt(index) + 1}!);\r\n success = false;\r\n }\r\n }\r\n\r\n data = data.map((itemValues, itemIndex) => {\r\n let item = {};\r\n for (let index in props.fields) {\r\n if (props.fields[index].type === 'select' && !props.fields[index].options.map(option => option.value).includes(itemValues[index])) {\r\n errors.push(<>Value {itemValues[index]} is wrong for field {props.fields[index].name} in position {parseInt(itemIndex) + 1}!);\r\n success = false;\r\n }\r\n if (props.fields[index].type === 'checkbox') {\r\n itemValues[index] = itemValues[index] === 'true';\r\n }\r\n item[props.fields[index].name] = itemValues[index];\r\n }\r\n return item;\r\n });\r\n\r\n if (!success) {\r\n enqueueSnackbar(
{errors.map((error, index) =>
{error}
)}
, { variant: 'error' });\r\n return;\r\n }\r\n props.save(data);\r\n props.onClose();\r\n };\r\n\r\n return \r\n {I18n.t('Edit data as TSV')}\r\n \r\n {I18n.t('You can copy, paste and edit data as TSV.')}\r\n
\r\n setTsv(e)}\r\n height=\"400px\"\r\n showPrintMargin={false}\r\n value={tsv}\r\n className={props.classes.tsvEditor}\r\n width=\"100%\"\r\n setOptions={{firstLineNumber: 0}}\r\n mode={null}\r\n />\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n};\r\n\r\nTsvDialog.propTypes = {\r\n open: PropTypes.bool,\r\n onClose: PropTypes.func,\r\n classes: PropTypes.object,\r\n save: PropTypes.func,\r\n fields: PropTypes.array,\r\n data: PropTypes.array\r\n};\r\n\r\nexport default withStyles(styles)(TsvDialog);","import PropTypes from 'prop-types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\n\r\nconst DeleteAllDialog = (props) => {\r\n return props.open ? \r\n {I18n.t('Delete all items')}\r\n \r\n {I18n.t('Are you sure to delete all items?')}\r\n \r\n \r\n \r\n \r\n \r\n : null;\r\n}\r\n\r\nDeleteAllDialog.propTypes = {\r\n open: PropTypes.bool,\r\n action: PropTypes.func,\r\n onClose: PropTypes.func,\r\n classes: PropTypes.object,\r\n}\r\n\r\nexport default DeleteAllDialog;","import { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\n\r\nconst DeleteDialog = (props) => {\r\n const [disableWarnings, setDisableWarnings] = useState(false);\r\n useEffect(() => {\r\n setDisableWarnings(false);\r\n }, [props.open]);\r\n\r\n return props.open ? \r\n {I18n.t('Delete item')}\r\n \r\n {I18n.t('Are you sure to delete item with address \"%s\"?', props.item._address)}\r\n setDisableWarnings(e.target.checked)}\r\n />}/>\r\n \r\n \r\n \r\n \r\n \r\n : null;\r\n}\r\n\r\nDeleteDialog.propTypes = {\r\n open: PropTypes.bool,\r\n onClose: PropTypes.func,\r\n classes: PropTypes.object,\r\n action: PropTypes.func,\r\n item: PropTypes.object,\r\n}\r\n\r\nexport default DeleteDialog;","import { useState, useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport Table from '@material-ui/core/Table';\r\nimport TableHead from '@material-ui/core/TableHead';\r\nimport TableBody from '@material-ui/core/TableBody';\r\nimport TableRow from '@material-ui/core/TableRow';\r\nimport TableCell from '@material-ui/core/TableCell';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport Select from '@material-ui/core/Select';\r\nimport MenuItem from '@material-ui/core/MenuItem';\r\nimport TableSortLabel from '@material-ui/core/TableSortLabel';\r\nimport Tooltip from '@material-ui/core/Tooltip';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport AddIcon from '@material-ui/icons/Add';\r\nimport ImportExport from '@material-ui/icons/ImportExport';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\nimport Utils from '@iobroker/adapter-react/Components/Utils';\r\n\r\nimport ExpertIcon from '@iobroker/adapter-react/icons/IconExpert';\r\nimport TextWithIcon from '@iobroker/adapter-react/Components/TextWithIcon';\r\nimport SelectWithIcon from '@iobroker/adapter-react/Components/SelectWithIcon';\r\n\r\nimport TsvDialog from './TsvDialog';\r\nimport DeleteAllDialog from './DeleteAllDialog';\r\nimport DeleteDialog from './DeleteDialog';\r\n\r\nconst styles = theme => ({\r\n tableHeader: {\r\n whiteSpace: 'nowrap',\r\n fontWeight: 'bold',\r\n fontSize: '80%',\r\n padding: '0px 8px'\r\n },\r\n tableHeaderExtended: {\r\n color: theme.palette.type === 'dark' ? theme.palette.primary.light : theme.palette.primary.dark\r\n },\r\n tableCell: {\r\n whiteSpace: 'nowrap',\r\n fontSize: '80%',\r\n padding: '0px 8px'\r\n },\r\n tableContainer: {\r\n overflow: 'auto',\r\n maxHeight: 'calc(100vh - 180px)'\r\n },\r\n tableTextField: {\r\n fontSize: '80%'\r\n },\r\n tableSelect: {\r\n fontSize: '80%'\r\n },\r\n tableTextFieldContainer: {\r\n width: '100%'\r\n },\r\n tableSelectContainer: {\r\n width: '100%'\r\n },\r\n nonEditMode: {\r\n cursor: 'pointer'\r\n }\r\n});\r\n\r\nconst DataCell = props => {\r\n const sortedItem = props.sortedItem;\r\n const field = props.field;\r\n const editMode = props.editMode;\r\n const setEditMode = props.setEditMode;\r\n\r\n const ref = useRef();\r\n /*useEffect(() => {\r\n if (props.editMode) {\r\n // ref.current && ref.current.focus()\r\n //window.setTimeout(() => ref.current && ref.current.focus(), 1000);\r\n }\r\n }, [props.editMode])*/\r\n\r\n let item = sortedItem.item;\r\n let result;\r\n if (field.type === 'checkbox') {\r\n result = \r\n props.changeParam(sortedItem.$index, field.name, e.target.checked)}\r\n />\r\n ;\r\n } else if (field.type === 'rooms') {\r\n if (!editMode) {\r\n result = ;\r\n } else {\r\n result = props.changeParam(sortedItem.$index, field.name, value)}\r\n className={props.classes.tableSelectContainer}\r\n />;\r\n }\r\n } else if (field.type === 'select') {\r\n if (!editMode) {\r\n let option = field.options.find(option => option.value === item[field.name]);\r\n result = option ? option.title : '';\r\n } else {\r\n result = props.changeParam(sortedItem.$index, field.name, e.target.value)}\r\n className={props.classes.tableSelectContainer}\r\n >\r\n {field.options.map(option =>\r\n {option.title ? option.title : {I18n.t('Nothing')}}\r\n )}\r\n ;\r\n }\r\n } else {\r\n if (!editMode) {\r\n result = item[field.name] ? item[field.name] : null;\r\n } else {\r\n result = props.changeParam(sortedItem.$index, field.name, e.target.value)}\r\n disabled={props.getDisable(sortedItem.$index, field.name)}\r\n />;\r\n }\r\n }\r\n\r\n return {\r\n setEditMode(true);\r\n window.localStorage.setItem('Modbus.editMode', 'true');\r\n window.setTimeout(() => ref.current && ref.current.focus(), 100);\r\n }}\r\n >\r\n {result}\r\n ;\r\n}\r\n\r\nconst RegisterTable = props => {\r\n const [tsvDialogOpen, setTsvDialogOpen] = useState(false);\r\n const [editMode, setEditMode] = useState(parseInt(window.localStorage.getItem('Modbus.editMode'), 10) || 0);\r\n const [extendedMode, setExtendedMode] = useState(window.localStorage.getItem('Modbus.extendedMode') === 'true');\r\n const [deleteAllDialog, setDeleteAllDialog] = useState({\r\n open: false,\r\n action: null,\r\n });\r\n const [deleteDialog, setDeleteDialog] = useState({\r\n open: false,\r\n item: null,\r\n action: null,\r\n });\r\n\r\n let sortedData = props.getSortedData(props.data, props.orderBy, props.order);\r\n\r\n return
\r\n
\r\n \r\n props.addItem()}>\r\n \r\n \r\n \r\n \r\n setTsvDialogOpen(true)}>\r\n \r\n \r\n \r\n \r\n {\r\n window.localStorage.setItem('Modbus.extendedMode', extendedMode ? 'false' : 'true');\r\n setExtendedMode(!extendedMode);\r\n }}>\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field => {\r\n let isChecked = false;\r\n let indeterminate = false;\r\n let trueFound = false;\r\n let falseFound = false;\r\n for (let k in props.data) {\r\n if (props.data[k][field.name]) {\r\n isChecked = true;\r\n trueFound = true;\r\n } else {\r\n isChecked = false;\r\n falseFound = true;\r\n }\r\n\r\n if (trueFound && falseFound) {\r\n indeterminate = true;\r\n isChecked = false;\r\n break;\r\n }\r\n }\r\n\r\n return \r\n {field.type === 'checkbox' ?\r\n \r\n {\r\n let newData = JSON.parse(JSON.stringify(props.data));\r\n newData.forEach(item =>\r\n item[field.name] = e.target.checked);\r\n props.changeData(newData);\r\n }}\r\n />\r\n \r\n : null}\r\n {field.sorted ? {\r\n const isAsc = props.orderBy === field.name && props.order === 'asc';\r\n props.onChangeOrder(field.name, isAsc ? 'desc' : 'asc');\r\n }}\r\n >{I18n.t(field.title)} : I18n.t(field.title)}\r\n \r\n })}\r\n \r\n \r\n
\r\n setDeleteAllDialog({\r\n open: true,\r\n action: () => props.changeData([]),\r\n })}\r\n disabled={!props.data.length}\r\n >\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n {\r\n sortedData.map(sortedItem =>\r\n \r\n {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field =>\r\n setEditMode(sortedItem.$index)}\r\n {...props}\r\n />\r\n )}\r\n \r\n \r\n
\r\n {\r\n let lastTime = window.sessionStorage.getItem('disableDeleteDialogs');\r\n if (lastTime && (new Date() - new Date(lastTime)) < 1000 * 60 * 5) {\r\n props.deleteItem(sortedItem.$index);\r\n return;\r\n }\r\n setDeleteDialog({\r\n open: true,\r\n action: disableDialogs => {\r\n if (disableDialogs) {\r\n window.sessionStorage.setItem('disableDeleteDialogs', (new Date()).toISOString());\r\n }\r\n props.deleteItem(sortedItem.$index);\r\n },\r\n item: sortedItem.item\r\n })\r\n }}>\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n )\r\n }\r\n
\r\n
\r\n
\r\n {tsvDialogOpen ?\r\n {\r\n if (props.prefix) {\r\n data.forEach(line => {\r\n line.Address = (line.Address || '').toUpperCase();\r\n if (line.Address && !line.Address.startsWith(props.prefix)) {\r\n line.Address = props.prefix + line.Address;\r\n }\r\n });\r\n }\r\n props.changeData(data);\r\n }}\r\n onClose={() => setTsvDialogOpen(false)}\r\n data={props.data}\r\n fields={props.fields}\r\n /> : null\r\n }\r\n setDeleteAllDialog({\r\n open: false,\r\n action: null,\r\n })}\r\n />\r\n setDeleteDialog({\r\n open: false,\r\n action: null,\r\n item: null\r\n })}\r\n item={deleteDialog.item}\r\n />\r\n
;\r\n}\r\n\r\nRegisterTable.propTypes = {\r\n data: PropTypes.array,\r\n fields: PropTypes.array,\r\n classes: PropTypes.object,\r\n addItem: PropTypes.func,\r\n changeData: PropTypes.func,\r\n deleteItem: PropTypes.func,\r\n rooms: PropTypes.object,\r\n formulaDisabled: PropTypes.bool,\r\n getSortedData: PropTypes.func,\r\n themeType: PropTypes.string,\r\n prefix: PropTypes.string,\r\n};\r\n\r\nexport default withStyles(styles)(RegisterTable);","import {Component} from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport Paper from '@material-ui/core/Paper';\r\n\r\nimport roles from '../data/roles';\r\nimport types from '../data/types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport RegisterTable from '../Components/RegisterTable';\r\n\r\nclass BaseRegisters extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.nativeField = '';\r\n this.state = {\r\n order: window.localStorage.getItem('Modbus.order') || 'asc',\r\n orderBy: window.localStorage.getItem('Modbus.orderBy') || 'Address',\r\n };\r\n }\r\n\r\n getRooms() {\r\n const lang = I18n.getLanguage();\r\n return this.props.rooms ? Object.values(this.props.rooms).map(room => ({\r\n value: room._id,\r\n title: typeof room.common.name === 'object' ? room.common.name[lang] : room.common.name\r\n })) : [];\r\n }\r\n\r\n getFields() {\r\n let rooms = this.getRooms();\r\n rooms.unshift({value: '', title: ''});\r\n\r\n let result = [\r\n {name: 'Address', title: 'Address', type: 'text', sorted: true, width: 20},\r\n {name: 'Name', title: 'Name', type: 'text', sorted: true},\r\n {name: 'Description', title: 'Description', type: 'text', sorted: true},\r\n {name: 'Type', title: 'Type', type: 'select', options: types, sorted: true},\r\n {name: 'Length', title: 'Length', type: 'text', width: 20},\r\n {name: 'Unit', title: 'Unit', type: 'text', width: 30},\r\n {name: 'Role', title: 'Role', type: 'select', options: roles, sorted: true},\r\n {name: 'Room', title: 'Room', type: 'rooms', options: rooms, sorted: true},\r\n {name: 'poll', title: 'Poll', type: 'checkbox'},\r\n {name: 'RW', title: 'RW', type: 'checkbox', expert: true},\r\n {name: 'WP', title: 'WP', type: 'checkbox', expert: true},\r\n ]\r\n\r\n if (this.props.native.params.multiDeviceId) {\r\n result.splice(1, 0,\r\n {name: 'deviceId', title: 'Slave ID', type: 'number', sorted: true, width: 20},\r\n );\r\n }\r\n\r\n return result;\r\n }\r\n\r\n address2struct(address) {\r\n if (this.nativeField === 'dbs') {\r\n const parts = address.split(' ');\r\n const db = parseInt(parts[0].replace('DB', '').replace('db', '').trim(), 10);\r\n if (parts[1] && parts[1].includes('.')) {\r\n const a = parseFloat(parts[1]);\r\n return {db, byte: Math.floor(a), bit: (a * 10) % 10};\r\n } else {\r\n return {db, byte: parseInt(parts[1], 10)};\r\n }\r\n } else {\r\n if (address.includes('.')) {\r\n const a = parseFloat(address);\r\n return {byte: Math.floor(a), bit: (a * 10) % 10};\r\n } else {\r\n return {byte: parseInt(address, 10)};\r\n }\r\n }\r\n }\r\n\r\n struct2address(struct) {\r\n if (struct.db !== undefined) {\r\n if (struct.bit !== undefined) {\r\n return `DB${struct.db} ${struct.byte}.${struct.bit}`;\r\n } else {\r\n return `DB${struct.db} ${struct.byte}`;\r\n }\r\n } else if (struct.bit !== undefined) {\r\n return struct.byte + '.' + struct.bit;\r\n } else {\r\n return struct.byte;\r\n }\r\n }\r\n\r\n changeParam = (index, name, value) => {\r\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n data[index][name] = value;\r\n if (name === 'Type') {\r\n if (['BOOL'].includes(value)) {\r\n data[index].Length = 0.1;\r\n } else\r\n if (['', 'BYTE'].includes(value)) {\r\n data[index].Length = 1;\r\n } else\r\n if (['WORD', 'INT', 'STRING', 'S5TIME'].includes(value)) {\r\n data[index].Length = 2;\r\n } else\r\n if (['DWORD', 'DINT', 'REAL'].includes(value)) {\r\n data[index].Length = 4;\r\n } else\r\n if (['S7TIME'].includes(value)) {\r\n data[index].Length = 8;\r\n } else\r\n if (['S7STRING', 'ARRAY'].includes(value)) {\r\n data[index].Length = 32;\r\n }\r\n\r\n if (value === 'BOOL') {\r\n const struct = this.address2struct(data[index].Address);\r\n if (struct.bit === undefined) {\r\n struct.bit = 0;\r\n data[index].Address = this.struct2address(struct);\r\n }\r\n } else {\r\n const struct = this.address2struct(data[index].Address);\r\n if (struct.bit !== undefined) {\r\n if (struct.bit > 0) {\r\n struct.byte++;\r\n }\r\n delete struct.bit;\r\n\r\n data[index].Address = this.struct2address(struct);\r\n }\r\n }\r\n }\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n addItem = () => {\r\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n let newItem = {}\r\n\r\n this.getFields().forEach(field => newItem[field.name] = '');\r\n\r\n if (data.length) {\r\n let sortedData = JSON.parse(JSON.stringify(data));\r\n sortedData.sort((item1, item2) => item1.Address > item2.Address ? 1 : -1);\r\n let lastItem = sortedData[sortedData.length - 1];\r\n const struct = this.address2struct(lastItem.Address);\r\n if (lastItem.Type === 'BOOL') {\r\n struct.bit = struct.bit || 0;\r\n struct.bit++;\r\n if (struct.bit >= 8) {\r\n struct.bit = struct.bit % 8;\r\n struct.byte++;\r\n }\r\n } else {\r\n delete struct.bit;\r\n struct.byte += lastItem.Length;\r\n }\r\n\r\n if (struct.db !== undefined && struct.byte + lastItem.Length > 0xFFFF) {\r\n struct.db++;\r\n struct.byte = 0;\r\n if (lastItem.Type === 'BOOL') {\r\n struct.bit = 0;\r\n }\r\n }\r\n\r\n newItem.Address = this.struct2address(struct);\r\n newItem.Type = lastItem.Type;\r\n newItem.Length = lastItem.Length;\r\n newItem.Unit = lastItem.Unit;\r\n newItem.Role = lastItem.Role;\r\n newItem.Room = lastItem.Room;\r\n newItem.poll = lastItem.poll;\r\n newItem.RW = lastItem.RW;\r\n newItem.WP = lastItem.WP;\r\n } else {\r\n newItem.role = 'level';\r\n newItem.Type = 'BOOL';\r\n newItem.Length = '0.1';\r\n newItem.poll = true;\r\n if (this.nativeField === 'dbs') {\r\n newItem.Address = 'DB1 0.0';\r\n } else {\r\n newItem.Address = '0.0';\r\n }\r\n }\r\n data.push(newItem);\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n deleteItem = (index) => {\r\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n data.splice(index, 1);\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n changeData = (data) => {\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n getDisable = (index, name) => {\r\n return name === 'Length' &&\r\n !['STRING', 'S7STRING', 'ARRAY'].includes(this.props.native[this.nativeField][index].type);\r\n }\r\n\r\n getSortedData = (data, orderBy, order) => {\r\n this.fields = this.fields || this.getFields();\r\n\r\n data = data || this.props.native[this.nativeField];\r\n orderBy = orderBy || this.state.orderBy;\r\n order = order || this.state.order;\r\n let sortedData = [];\r\n data.forEach((item, index) => {sortedData[index] = {item, $index: index}});\r\n const field = this.fields.find(item => item.name === orderBy);\r\n\r\n sortedData.sort((sortedItem1, sortedItem2) => {\r\n let sort1;\r\n let sort2;\r\n if (orderBy === 'Address') {\r\n const a1 = this.address2struct(sortedItem1.item.Address);\r\n const a2 = this.address2struct(sortedItem2.item.Address);\r\n\r\n sort1 = 0;\r\n if (a1.db !== undefined) {\r\n sort1 = a1.db << 24;\r\n }\r\n if (a2.db !== undefined) {\r\n sort2 = a2.db << 24;\r\n }\r\n sort1 |= a1.byte << 8;\r\n sort2 |= a2.byte << 8;\r\n sort1 |= a1.bit || 0;\r\n sort2 |= a2.bit || 0;\r\n } else if (orderBy === '$index') {\r\n sort1 = sortedItem1[orderBy];\r\n sort2 = sortedItem2[orderBy];\r\n } else if (field && field.type === 'number') {\r\n sort1 = parseInt(sortedItem1.item[orderBy], 10);\r\n sort2 = parseInt(sortedItem2.item[orderBy], 10);\r\n } else {\r\n sort1 = sortedItem1.item[orderBy];\r\n sort2 = sortedItem2.item[orderBy];\r\n }\r\n return (order === 'asc' ? sort1 > sort2 : sort1 < sort2) ? 1 : -1;\r\n });\r\n\r\n return sortedData;\r\n }\r\n\r\n render() {\r\n this.fields = this.fields || this.getFields();\r\n\r\n return \r\n {\r\n this.setState({orderBy, order});\r\n window.localStorage.setItem('Modbus.orderBy', orderBy);\r\n window.localStorage.setItem('Modbus.order', order);\r\n }}\r\n />\r\n \r\n }\r\n}\r\n\r\nBaseRegisters.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n themeType: PropTypes.string,\r\n};\r\n\r\nexport default BaseRegisters;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Inputs extends BaseRegisters {\r\n nativeField = 'inputs'\r\n}\r\n\r\nInputs.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Inputs;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Outputs extends BaseRegisters {\r\n nativeField = 'outputs'\r\n}\r\n\r\nOutputs.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Outputs;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Marker extends BaseRegisters {\r\n nativeField = 'markers'\r\n}\r\n\r\nMarker.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Marker;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Dbs extends BaseRegisters {\r\n nativeField = 'dbs';\r\n}\r\n\r\nDbs.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Dbs;\r\n","import React from 'react';\r\nimport {withStyles} from '@material-ui/core/styles';\r\nimport { MuiThemeProvider } from '@material-ui/core/styles';\r\nimport { SnackbarProvider } from 'notistack';\r\n\r\nimport AppBar from '@material-ui/core/AppBar';\r\nimport Tabs from '@material-ui/core/Tabs';\r\nimport Tab from '@material-ui/core/Tab';\r\n\r\nimport GenericApp from '@iobroker/adapter-react/GenericApp';\r\nimport Loader from '@iobroker/adapter-react/Components/Loader'\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport TabOptions from './Tabs/Options';\r\nimport TabInputs from './Tabs/Inputs';\r\nimport TabOutputs from './Tabs/Outputs';\r\nimport TabMarker from './Tabs/Marker';\r\nimport TabDbs from './Tabs/DBs';\r\n\r\nconst styles = theme => ({\r\n root: {},\r\n tabContent: {\r\n padding: 10,\r\n height: 'calc(100% - 64px - 48px - 20px)',\r\n overflow: 'auto',\r\n },\r\n tabContentIFrame: {\r\n padding: 10,\r\n height: 'calc(100% - 64px - 48px - 20px - 38px)',\r\n overflow: 'auto'\r\n },\r\n tab: {\r\n width: '100%',\r\n minHeight: '100%'\r\n }\r\n});\r\n\r\nconst tabs = [\r\n {\r\n name: 'general',\r\n title: 'General',\r\n component: TabOptions,\r\n },\r\n {\r\n name: 'inputs',\r\n title: 'Inputs',\r\n component: TabInputs,\r\n },\r\n {\r\n name: 'outputs',\r\n title: 'Outputs',\r\n component: TabOutputs,\r\n },\r\n {\r\n name: 'marker',\r\n title: 'Marker',\r\n component: TabMarker,\r\n },\r\n {\r\n name: 'dbs',\r\n title: 'DBs',\r\n component: TabDbs,\r\n },\r\n]\r\n\r\nclass App extends GenericApp {\r\n constructor(props) {\r\n const extendedProps = {...props};\r\n extendedProps.encryptedFields = ['pass'];\r\n\r\n extendedProps.translations = {\r\n 'en': require('./i18n/en'),\r\n 'de': require('./i18n/de'),\r\n 'ru': require('./i18n/ru'),\r\n 'pt': require('./i18n/pt'),\r\n 'nl': require('./i18n/nl'),\r\n 'fr': require('./i18n/fr'),\r\n 'it': require('./i18n/it'),\r\n 'es': require('./i18n/es'),\r\n 'pl': require('./i18n/pl'),\r\n 'zh-cn': require('./i18n/zh-cn'),\r\n };\r\n\r\n super(props, extendedProps);\r\n this.state.moreLoaded = false;\r\n this.state.rooms = null;\r\n }\r\n\r\n onConnectionReady() {\r\n super.onConnectionReady()\r\n this.socket.getForeignObjects('enum.rooms.*', 'enum')\r\n .then(rooms =>\r\n this.setState({moreLoaded: true, rooms}));\r\n }\r\n\r\n getSelectedTab() {\r\n const selectedTab = this.state.selectedTab;\r\n if (!selectedTab) {\r\n return 0;\r\n } else {\r\n return tabs.findIndex(tab => tab.name === selectedTab);\r\n }\r\n }\r\n\r\n render() {\r\n if (!this.state.loaded || !this.state.moreLoaded) {\r\n return \r\n \r\n ;\r\n }\r\n\r\n return \r\n \r\n
\r\n \r\n this.selectTab(tabs[index].name, index)}\r\n variant=\"scrollable\" scrollButtons=\"auto\">\r\n {tabs.map(tab => {tab.icon}{I18n.t(tab.title)} : I18n.t(tab.title)}\r\n data-name={tab.name}\r\n key={tab.name}\r\n title={tab.tooltip ? I18n.t(tab.tooltip) : undefined}\r\n />)}\r\n \r\n \r\n
\r\n {tabs.map((tab, index) => {\r\n const TabComponent = tab.component;\r\n if (this.state.selectedTab) {\r\n if (this.state.selectedTab !== tab.name) {\r\n return null;\r\n }\r\n } else {\r\n if (index !== 0) {\r\n return null;\r\n }\r\n }\r\n return this.setState({errorText: (text || text === 0) && typeof text !== 'string' ? text.toString() : text})}\r\n onLoad={native => this.onLoadConfig(native)}\r\n instance={this.instance}\r\n adapterName={this.adapterName}\r\n changed={this.state.changed}\r\n onChange={(attr, value, cb) => this.updateNativeValue(attr, value, cb)}\r\n changeNative={value => this.setState({native: value, changed: this.getIsChanged(value)})}\r\n rooms={this.state.rooms}\r\n />\r\n })}\r\n {/*
{JSON.stringify(this.state.native, null, 2)}
*/}\r\n
\r\n {this.renderError()}\r\n {this.renderSaveCloseButtons()}\r\n
\r\n
\r\n
;\r\n }\r\n}\r\n\r\nexport default withStyles(styles)(App);\r\n","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read http://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.1/8 is considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport function register(config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit http://bit.ly/CRA-PWA'\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all ' +\r\n 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister();\r\n });\r\n }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport * as Sentry from '@sentry/browser';\r\nimport * as SentryIntegrations from '@sentry/integrations';\r\nimport { MuiThemeProvider} from '@material-ui/core/styles';\r\nimport './index.css';\r\nimport App from './App';\r\nimport * as serviceWorker from './serviceWorker';\r\nimport {version} from '../package.json';\r\nimport theme from '@iobroker/adapter-react/Theme';\r\nimport Utils from '@iobroker/adapter-react/Components/Utils';\r\n\r\nwindow.adapterName = 's7';\r\nlet themeName = Utils.getThemeName();\r\n\r\nconsole.log(`iobroker.${window.adapterName}@${version} using theme \"${themeName}\"`);\r\n\r\nfunction build() {\r\n return ReactDOM.render(\r\n \r\n {\r\n themeName = _theme;\r\n build();\r\n }}\r\n />\r\n ,\r\n document.getElementById('root')\r\n );\r\n}\r\n\r\nif (false && window.location.host !== 'localhost:3000') {\r\n Sentry.init({\r\n dsn: 'https://5ad729dbed504d15aa8bde423cae9a8e@sentry.iobroker.net/57',\r\n release: `iobroker.${window.adapterName}@${version}`,\r\n integrations: [\r\n new SentryIntegrations.Dedupe()\r\n ]\r\n });\r\n}\r\n\r\nbuild();\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: http://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["Tabs/Options.js","Components/TsvDialog.js","Components/DeleteAllDialog.js","Components/DeleteDialog.js","Components/RegisterTable.js","Tabs/BaseRegisters.js","Tabs/Inputs.js","Tabs/Outputs.js","Tabs/Marker.js","Tabs/DBs.js","App.js","serviceWorker.js","index.js"],"names":["FileInput","props","enqueueSnackbar","useSnackbar","onDrop","useCallback","acceptedFiles","onChange","I18n","t","useDropzone","accept","getRootProps","getInputProps","isDragActive","FormControl","style","padding","paddingRight","Typography","variant","gutterBottom","label","className","classes","fileInput","backgroundColor","cursor","Options","inputDisabled","input","inputDisplay","native","params","slot","includes","name","timeFormat","changeParam","value","JSON","parse","stringify","localTSAP","remoteTSAP","rack","changeNative","loadSymbols","e","reader","FileReader","onload","localData","inputs","outputs","markers","text","result","split","forEach","line","typ","slice","replace","d","Name","Address","Type","Description","Unit","poll","RW","WP","push","table","readAsText","addDb","setTimeout","changes","dbs","newParts","indexOf","lines","mapping","attr","process","f","db","trim","match","m","parseInt","undefined","offset","sFields","fields","length","l","obj","Role","Room","console","log","Length","_attr","error","aaa","mm","vv","item","x","shift","dec","join","hasOwnProperty","sort","a","b","aDB","bDB","aOffset","bOffset","state","this","title","Paper","optionsContainer","header","Grid","container","spacing","direction","map","type","optionContainer","FormControlLabel","control","Checkbox","optionsCheckbox","disabled","checked","getValue","target","dimension","InputLabel","shrink","Select","optionsSelect","displayEmpty","options","option","MenuItem","top","bottom","optionsLabel","Input","width","toString","toUpperCase","marginLeft","TextField","optionsTextField","InputProps","endAdornment","InputAdornment","position","Box","tab","xs","md","optionsGrid","getInputsBlock","connectionInputs","getImportsBlock","generalInputs","Component","withStyles","theme","marginBottom","display","textAlign","fontSize","height","border","borderRadius","marginTop","tsvEditor","tsvEditorTextarea","fontFamily","useState","tsv","setTsv","useEffect","tsvResult","field","data","json2tsv","open","Dialog","onClose","maxWidth","fullWidth","DialogTitle","DialogContent","DialogContentText","showPrintMargin","setOptions","firstLineNumber","mode","DialogActions","Button","color","onClick","copy","startIcon","tsv2json","endsWith","success","errors","index","itemValues","itemIndex","save","DeleteAllDialog","action","DeleteDialog","disableWarnings","setDisableWarnings","_address","DataCell","sortedItem","editMode","setEditMode","ref","useRef","Tooltip","inputRef","tableCheckbox","getDisable","$index","list","rooms","allowNone","dense","themeType","inputProps","tableSelect","tableSelectContainer","find","tableTextFieldContainer","tableTextField","TableCell","Utils","clsx","tableCell","nonEditMode","window","localStorage","setItem","current","focus","tableHeader","whiteSpace","fontWeight","tableHeaderExtended","palette","primary","light","dark","tableContainer","overflow","maxHeight","tsvDialogOpen","setTsvDialogOpen","getItem","extendedMode","setExtendedMode","deleteAllDialog","setDeleteAllDialog","deleteDialog","setDeleteDialog","sortedData","getSortedData","orderBy","order","IconButton","addItem","Table","size","stickyHeader","TableHead","TableRow","filter","expert","formulaDisabled","isChecked","indeterminate","trueFound","falseFound","k","tooltip","newData","changeData","sorted","TableSortLabel","active","isAsc","onChangeOrder","TableBody","hover","lastTime","sessionStorage","Date","deleteItem","disableDialogs","toISOString","prefix","startsWith","BaseRegisters","nativeField","struct","address2struct","bit","struct2address","byte","newItem","getFields","item1","item2","lastItem","role","splice","sortedItem1","sortedItem2","sort1","sort2","a1","a2","lang","getLanguage","Object","values","room","_id","common","getRooms","unshift","types","roles","multiDeviceId","address","parts","parseFloat","Math","floor","setState","Inputs","propTypes","PropTypes","object","isRequired","instance","number","adapterName","string","onError","func","onLoad","changed","bool","socket","Outputs","Marker","Dbs","tabs","component","TabOptions","TabInputs","TabOutputs","TabMarker","App","extendedProps","encryptedFields","translations","require","moreLoaded","getForeignObjects","then","selectedTab","findIndex","loaded","background","default","AppBar","Tabs","getSelectedTab","selectTab","scrollButtons","Tab","icon","isIFrame","tabContentIFrame","tabContent","TabComponent","errorText","onLoadConfig","cb","updateNativeValue","getIsChanged","renderError","renderSaveCloseButtons","GenericApp","root","minHeight","Boolean","location","hostname","themeName","getThemeName","version","build","ReactDOM","render","onThemeChange","_theme","document","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"k0wCA+DIA,EAAY,SAAUC,GACtB,IAAQC,EAAoBC,cAApBD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AAP,GAAK,OAAI,EAAK4T,SAAS,CAACnU,OAAQO,EAAOyU,QAAS,EAAKwC,aAAajX,MAChF0M,MAAO,EAAKvH,MAAMuH,OAZb1E,EAAInI,WAiBpBuF,KAAK8R,cACL9R,KAAK+R,gCApDP,cAAC,IAAD,CAAkBzO,MAAOtD,KAAKD,MAAMuD,MAApC,SACH,cAAC,IAAD,CAAQA,MAAOtD,KAAKD,MAAM0H,kB,GA1CxBuK,KAoGH3O,gBAlJA,SAAAC,GAAK,MAAK,CACrB2O,KAAM,GACNV,WAAY,CACRjY,QAAS,GACTqK,OAAQ,kCACRwF,SAAU,QAEdmI,iBAAkB,CACdhY,QAAS,GACTqK,OAAQ,yCACRwF,SAAU,QAEdvG,IAAK,CACDX,MAAO,OACPiQ,UAAW,WAoIJ7O,CAAmB4M,ICzJdkC,QACW,cAA7B9J,OAAO+J,SAASC,UAEe,UAA7BhK,OAAO+J,SAASC,UAEhBhK,OAAO+J,SAASC,SAASvU,MACvB,2D,mCCNNuK,OAAO2G,YAAc,KACrB,IAAIsD,GAAYrK,KAAMsK,eAEtB7T,QAAQC,IAAR,mBAAwB0J,OAAO2G,YAA/B,YAA8CwD,KAA9C,yBAAsEF,GAAtE,MAEA,SAASG,IACL,OAAOC,IAASC,OACZ,cAAC,IAAD,CAAkBrP,MAAOA,KAAMgP,IAA/B,SACI,cAAC,GAAD,CACIM,cAAe,SAAAC,GACXP,GAAYO,EACZJ,SAIZK,SAASC,eAAe,SAchCN,GDwFM,kBAAmBO,WACrBA,UAAUC,cAAcC,MAAM1C,MAAK,SAAA2C,GACjCA,EAAaC,kB","file":"static/js/main.3ab35ae4.chunk.js","sourcesContent":["import {Component, useCallback} from 'react';\r\nimport {useDropzone} from 'react-dropzone';\r\nimport { useSnackbar } from 'notistack';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport Typography from '@material-ui/core/Typography';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport Select from '@material-ui/core/Select';\r\nimport MenuItem from '@material-ui/core/MenuItem';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport FormControl from '@material-ui/core/FormControl';\r\nimport Input from '@material-ui/core/Input';\r\nimport InputLabel from '@material-ui/core/InputLabel';\r\nimport InputAdornment from '@material-ui/core/InputAdornment';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport Paper from '@material-ui/core/Paper';\r\nimport Box from '@material-ui/core/Box';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport connectionInputs from '../data/optionsConnection';\r\nimport generalInputs from '../data/optionsGeneral';\r\n\r\nconst styles = theme => ({\r\n optionsSelect: {\r\n width: 280\r\n },\r\n optionsTextField: {\r\n width: 280\r\n },\r\n optionContainer: {\r\n },\r\n optionsContainer: {\r\n width: `calc(100% - ${theme.spacing(4)}px)`,\r\n padding: theme.spacing(2),\r\n marginBottom: 20,\r\n display: 'inline-block',\r\n textAlign: 'left'\r\n },\r\n optionsGrid: {\r\n textAlign: 'center',\r\n padding: theme.spacing(2),\r\n },\r\n optionsLabel: {\r\n fontSize: 12,\r\n },\r\n header: {\r\n fontSize: 24,\r\n },\r\n fileInput: {\r\n textAlign: 'center',\r\n display: 'inline-block',\r\n height: 80,\r\n width: 200,\r\n border: '2px dashed #777',\r\n borderRadius: 10,\r\n marginTop: 12,\r\n padding: 4\r\n }\r\n});\r\n\r\nlet FileInput = function (props) {\r\n const { enqueueSnackbar } = useSnackbar();\r\n const onDrop = useCallback(acceptedFiles => {\r\n props.onChange(acceptedFiles);\r\n enqueueSnackbar(I18n.t('Data updated'));\r\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\r\n\r\n const {getRootProps, getInputProps, isDragActive} = useDropzone({onDrop, accept: props.accept});\r\n\r\n return \r\n { I18n.t(props.label)}\r\n
\r\n \r\n {\r\n isDragActive ?\r\n

{I18n.t('Drop the file here ...')}

:\r\n

{I18n.t(`Drag 'n' drop file here, or click to select file`)}

\r\n }\r\n
\r\n
;\r\n};\r\n\r\nclass Options extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n };\r\n }\r\n\r\n getValue(name) {\r\n if (name === 's7logo') {\r\n return this.props.native.params.slot === null;\r\n }\r\n return this.props.native.params[name];\r\n }\r\n\r\n inputDisabled = input => {\r\n return false;\r\n }\r\n\r\n inputDisplay = input => {\r\n if (this.props.native.params.slot === null) {\r\n if (['rack', 'slot'].includes(input.name)) {\r\n return false;\r\n }\r\n } else {\r\n if (['localTSAP', 'remoteTSAP'].includes(input.name)) {\r\n return false;\r\n }\r\n }\r\n if (input.name === 'timeOffset') {\r\n return ['summer', 'offset'].includes(this.props.native.params.timeFormat);\r\n }\r\n return true;\r\n }\r\n\r\n getInputsBlock(inputs, title) {\r\n return \r\n {I18n.t(title)}\r\n \r\n {inputs.map(input => {\r\n if (!this.inputDisplay(input)) {\r\n return null;\r\n }\r\n if (input.type === 'checkbox') {\r\n return \r\n this.changeParam(input.name, e.target.checked)}\r\n />}/> {input.dimension ? I18n.t(input.dimension) : null};\r\n } else if (input.type === 'select') {\r\n return \r\n \r\n {I18n.t(input.title)}\r\n this.changeParam(input.name, e.target.value)}\r\n >\r\n {input.options.map(option =>\r\n {option.title}\r\n )}\r\n \r\n {input.dimension ? I18n.t(input.dimension) : null}\r\n ;\r\n } else if (input.type === 'hex') {\r\n let value = parseInt(this.getValue(input.name)) ? parseInt(this.getValue(input.name)) : 0;\r\n let top = (value >> 8) & 0xFF;\r\n let bottom = value & 0xFF;\r\n\r\n return \r\n {I18n.t(input.title)}\r\n {\r\n if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\r\n return;\r\n }\r\n this.changeParam(input.name, (parseInt(e.target.value, 16) << 8) | bottom);\r\n }}\r\n />\r\n {\r\n if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\r\n return;\r\n }\r\n this.changeParam(input.name, (top << 8) | parseInt(e.target.value, 16));\r\n }}\r\n />\r\n ;\r\n } else {\r\n return {I18n.t(input.dimension)} : null\r\n }}\r\n onChange={e => this.changeParam(input.name, e.target.value)}\r\n />;\r\n }\r\n })}\r\n \r\n ;\r\n }\r\n\r\n getImportsBlock() {\r\n return <>\r\n {I18n.t('Import')}\r\n \r\n \r\n \r\n \r\n ;\r\n }\r\n\r\n render() {\r\n return
\r\n \r\n \r\n {this.getInputsBlock(connectionInputs, 'PLC Connection')}\r\n {this.getImportsBlock()}\r\n \r\n {this.getInputsBlock(generalInputs, 'General')}\r\n \r\n
;\r\n }\r\n\r\n changeParam = (name, value) => {\r\n let native = JSON.parse(JSON.stringify(this.props.native));\r\n if (name === 's7logo') {\r\n if (value) {\r\n native.params.localTSAP = '';\r\n native.params.remoteTSAP = '';\r\n native.params.rack = null;\r\n native.params.slot = null;\r\n } else {\r\n native.params.localTSAP = null;\r\n native.params.remoteTSAP = null;\r\n native.params.rack = '';\r\n native.params.slot = '';\r\n }\r\n } else {\r\n native.params[name] = value;\r\n }\r\n this.props.changeNative(native);\r\n }\r\n\r\n loadSymbols = e => {\r\n let native = JSON.parse(JSON.stringify(this.props.native));\r\n const reader = new FileReader();\r\n\r\n reader.onload = e => {\r\n const localData = {\r\n inputs: [],\r\n outputs: [],\r\n markers: []\r\n// counter: [],\r\n// timer: [],\r\n// dbs: []\r\n };\r\n let text = reader.result;\r\n\r\n text = text.split('126,');\r\n text.forEach(line => {\r\n const typ = line.slice(23, 29).replace(/( )/g, '');\r\n\r\n const d = {\r\n Name: line.slice(0, 23).replace(/( ){2,}/g, ''),\r\n Address: line.slice(29, 36).replace(/( )/g, ''),\r\n Type: line.slice(36, 41).replace(/( )/g, ''),\r\n Description: line.slice(46, 126).replace(/( ){2,}/, ''),\r\n Unit: '',\r\n// Role: '',\r\n// Room: '',\r\n poll: true,\r\n RW: false,\r\n WP: false\r\n };\r\n\r\n// if (typ == 'E' || typ == 'EB' ||typ == 'EW' ||typ == 'ED'||typ == 'PEB'||typ == 'PEW'||typ == 'PED')data.inputs.push(d);\r\n// if (typ == 'A' || typ == 'AB' ||typ == 'AW' ||typ == 'AD'||typ == 'PAB'||typ == 'PAW'||typ == 'PAD')data.outputs.push(d);\r\n if (typ === 'E' || typ === 'EB' || typ === 'EW' || typ === 'ED') localData.inputs.push(d);\r\n if (typ === 'A' || typ === 'AB' || typ === 'AW' || typ === 'AD') localData.outputs.push(d);\r\n if (typ === 'M' || typ === 'MB' || typ === 'MW' || typ === 'MD') localData.markers.push(d);\r\n// if (typ == 'C')data.counter.push(d);\r\n// if (typ == 'T')data.timer.push(d);\r\n// if (typ == 'DB')data.dbs.push(d);\r\n });\r\n\r\n ['inputs', 'outputs', 'markers'].forEach(table => {\r\n native[table] = localData[table];\r\n });\r\n this.props.changeNative(native);\r\n };\r\n\r\n reader.readAsText(e[0], 'ISO-8859-1');\r\n }\r\n\r\n addDb = e => {\r\n let native = JSON.parse(JSON.stringify(this.props.native));\r\n const reader = new FileReader();\r\n\r\n reader.onload = e => {\r\n setTimeout(function () {\r\n const text = reader.result;\r\n const changes = {\r\n inputs: false,\r\n outputs: false,\r\n markers: false,\r\n dbs: false\r\n };\r\n const newParts = {\r\n inputs: native.inputs || [],\r\n outputs: native.outputs || [],\r\n markers: native.markers || [],\r\n dbs: native.dbs || []\r\n };\r\n\r\n if (text.indexOf('Leseanforderung') !== -1) {\r\n // Graphpic format\r\n const lines = text.replace(/\\r\\n/g, '\\n').split('\\n');\r\n const mapping = {\r\n 'Name': {attr: 'Name'},\r\n 'Typ': {attr: ''},\r\n 'Operand': {attr: 'Address', process: f => {\r\n // DB 504.DBW 1462 => DB504 1462\r\n f = f.trim();\r\n const db = f.match(/^DB (\\d+)/);\r\n if (!db) {\r\n // M\r\n // MB\r\n let m = f.match(/^MB? (\\d+)\\.?(\\d+)?$/);\r\n if (m) {\r\n return 'M ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n } else {\r\n m = f.match(/^AB? (\\d+)\\.?(\\d+)?$/);\r\n if (m) {\r\n return 'OUT ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n } else {\r\n m = f.match(/^EB? (\\d+)\\.?(\\d+)?$/);\r\n if (m) {\r\n return 'IN ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n } else {\r\n return f;\r\n }\r\n }\r\n }\r\n }\r\n\r\n const offset = f.match(/(\\d+).?(\\d+)?$/);\r\n if (db && offset) {\r\n return `DB${db[1]} ${offset[1]}${offset[2] !== undefined ? '.' + offset[2] : ''}`;\r\n } else {\r\n return f;\r\n }\r\n }},\r\n 'SPS-Format': {attr: 'Type', process: function (f) {return f;} },\r\n 'Byteanzahl': {attr: 'Length', process: function (f) {return parseInt(f, 10);} },\r\n 'Zugriff': {attr: 'RW', process: function (f) {return f !== 'read';} },\r\n 'Leseanforderung': {attr: 'poll', process: function (f) {return f === 'zyklisch';} },\r\n 'AktZeit (ms)': {attr: ''},\r\n 'Kommentar': {attr: 'Description'},\r\n 'Clients (Anzahl)': {attr: ''}\r\n };\r\n // First line\r\n // \"Name\",\"Typ\",\"Operand\",\"SPS-Format\",\"Byteanzahl\",\"Zugriff\",\"Leseanforderung\",\"AktZeit (ms)\",\"Kommentar\",\"Clients (Anzahl)\"\r\n let sFields = lines[0].split(',');\r\n // create mapping\r\n const fields = [];\r\n for (let m = 0; m < sFields.length; m++) {\r\n sFields[m] = sFields[m].replace(/\"/g, '');\r\n fields.push(mapping[sFields[m]]);\r\n }\r\n for (let l = 1; l < lines.length; l++) {\r\n lines[l] = lines[l].trim();\r\n if (!lines[l]) continue;\r\n sFields = lines[l].trim().split(',');\r\n let obj = {\r\n Type: 'ARRAY',\r\n Unit: '',\r\n Role: '',\r\n Room: '',\r\n poll: true,\r\n RW: false,\r\n WP: false\r\n };\r\n for (let f = 0; f < fields.length; f++) {\r\n if (!fields[f].attr) {\r\n continue;\r\n }\r\n if (!sFields[f]) {\r\n console.log('error');\r\n break;\r\n }\r\n sFields[f] = sFields[f].replace(/\"/g, '');\r\n obj[fields[f].attr] = fields[f].process ? fields[f].process(sFields[f]) : sFields[f];\r\n\r\n if (obj.Name.match(/^@/)) {\r\n obj = null;\r\n break;\r\n }\r\n }\r\n if (obj) {\r\n if (obj.Type === 'BYTE' && obj.Length !== 1) {\r\n obj.Type = 'ARRAY';\r\n }\r\n if (obj.Type === 'CHAR') {\r\n obj.Type = 'STRING';\r\n }\r\n if (obj.Type === 'BYTE' || obj.Type === 'BOOL' || obj.Type === 'INT') {\r\n obj.Length = '';\r\n }\r\n let _attr;\r\n if (obj.Address.match(/^DB/)) {\r\n _attr = 'dbs';\r\n } else if (obj.Address.match(/^IN/)) {\r\n obj.Address = obj.Address.replace(/^IN\\s?/, '');\r\n _attr = 'inputs';\r\n } else if (obj.Address.match(/^OUT/)) {\r\n _attr = 'outputs';\r\n obj.Address = obj.Address.replace(/^OUT\\s?/, '');\r\n } else if (obj.Address.match(/^M/)) {\r\n _attr = 'markers';\r\n obj.Address = obj.Address.replace(/^M\\s?/, '');\r\n } else {\r\n console.error('Unknown TYPE: ' + obj.Address);\r\n continue;\r\n }\r\n // try to find same address\r\n for (let aaa = 0; aaa < newParts[_attr].length; aaa++) {\r\n if (newParts[_attr][aaa].Address === obj.Address) {\r\n newParts[_attr][aaa] = obj;\r\n changes[_attr] = true;\r\n obj = null;\r\n break;\r\n }\r\n }\r\n if (obj) {\r\n changes[_attr] = true;\r\n newParts[_attr].push(obj);\r\n }\r\n }\r\n }\r\n } else {\r\n const mm = text.match(/(DB)[0-9]+\\s-\\s/g);\r\n const db = mm ? mm[0].replace(' - ', '') : '';\r\n const vv = text.split('STRUCT');\r\n\r\n const struck = vv[1] ? vv[1].split('=')[0].split('\\n') : [];\r\n\r\n struck.forEach((item) => {\r\n if (item.length > 10) {\r\n const x = item.split(/\\s+/g);\r\n x.shift();\r\n\r\n let obj = {\r\n Address: db + ' ' + x.shift(),\r\n Name: x.shift(),\r\n Type: x.shift(),\r\n dec: x.shift(),\r\n Description: x.join(' '),\r\n Unit: '',\r\n Role: '',\r\n Room: '',\r\n poll: true,\r\n RW: false,\r\n WP: false\r\n };\r\n\r\n // try to find same address\r\n for (let aaa = 0; aaa < newParts.dbs.length; aaa++) {\r\n if (newParts.dbs[aaa].Address === obj.Address) {\r\n newParts.dbs[aaa] = obj;\r\n changes.dbs = true;\r\n obj = null;\r\n break;\r\n }\r\n }\r\n if (obj) {\r\n changes.dbs = true;\r\n newParts.dbs.push(obj);\r\n }\r\n }\r\n });\r\n }\r\n for (const attr in newParts) {\r\n if (!newParts.hasOwnProperty(attr)) {\r\n continue;\r\n }\r\n newParts[attr].sort((a, b) => {\r\n const aDB = a.Address.match(/^D?B?\\s?(\\d+)/);\r\n const bDB = b.Address.match(/^D?B?\\s?(\\d+)/);\r\n if (!aDB) return -1;\r\n if (!bDB) return 1;\r\n if (parseInt(aDB[1], 10) > parseInt(bDB[1], 10)) return 1;\r\n if (parseInt(aDB[1], 10) < parseInt(bDB[1], 10)) return -1;\r\n const aOffset = a.Address.match(/\\s(\\d+).?(\\d+)?$/);\r\n const bOffset = b.Address.match(/\\s(\\d+).?(\\d+)?$/);\r\n if (!aOffset) return -1;\r\n if (!bOffset) return 1;\r\n if (parseInt(aOffset[1], 10) > parseInt(bOffset[1], 10)) return 1;\r\n if (parseInt(aOffset[1], 10) < parseInt(bOffset[1], 10)) return -1;\r\n if (aOffset[2] === undefined && bOffset[2] !== undefined) return 1;\r\n if (bOffset[2] === undefined && aOffset[2] !== undefined) return -1;\r\n if (aOffset[2] === undefined && bOffset[2] === undefined) return 0;\r\n if (parseInt(aOffset[2], 10) > parseInt(bOffset[2], 10)) return 1;\r\n if (parseInt(aOffset[2], 10) < parseInt(bOffset[1], 10)) return -1;\r\n return 0;\r\n });\r\n }\r\n if (changes.dbs) {\r\n native.dbs = newParts.dbs;\r\n }\r\n if (changes.inputs) {\r\n native.inputs = newParts.inputs;\r\n }\r\n if (changes.outputs) {\r\n native.outputs = newParts.outputs;\r\n }\r\n if (changes.markers) {\r\n native.markers = newParts.markers;\r\n }\r\n console.log(native);\r\n //this.props.changeNative(native);\r\n }, 200);\r\n };\r\n\r\n reader.readAsText(e[0], 'ISO-8859-1');\r\n }\r\n}\r\n\r\nOptions.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default withStyles(styles)(Options);\r\n","import { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport { tsv2json, json2tsv } from 'tsv-json';\r\nimport { useSnackbar } from 'notistack';\r\nimport AceEditor from \"react-ace\";\r\nimport copy from 'copy-to-clipboard';\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\n\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\nimport SaveIcon from '@material-ui/icons/Save';\r\nimport FileCopyIcon from '@material-ui/icons/FileCopy';\r\n\r\nconst styles = theme => ({\r\n tsvEditor: {\r\n width: '100%',\r\n height: 400\r\n },\r\n tsvEditorTextarea: {\r\n fontFamily: 'monospace'\r\n }\r\n});\r\n\r\nconst TsvDialog = props => {\r\n const [tsv, setTsv] = useState('');\r\n useEffect(() => {\r\n let tsvResult = [];\r\n tsvResult.push(props.fields.map(field => field.name));\r\n props.data.forEach(item =>\r\n tsvResult.push(props.fields.map(field => item[field.name] !== undefined && item[field.name] !== null ? item[field.name].toString() : ''))\r\n );\r\n setTsv(json2tsv(tsvResult));\r\n }, [props.open]); // eslint-disable-line react-hooks/exhaustive-deps\r\n const { enqueueSnackbar } = useSnackbar();\r\n\r\n if (!props.open) {\r\n return null;\r\n }\r\n\r\n const saveTsv = () => {\r\n let data = tsv2json(tsv.endsWith('\\n') ? tsv : tsv + '\\n');\r\n let fields = data.shift();\r\n let success = true;\r\n let errors = [];\r\n for (let index in props.fields) {\r\n if (props.fields[index].name !== fields[index]) {\r\n errors.push(<>No field {props.fields[index].name} in position {parseInt(index) + 1}!);\r\n success = false;\r\n }\r\n }\r\n\r\n data = data.map((itemValues, itemIndex) => {\r\n let item = {};\r\n for (let index in props.fields) {\r\n if (props.fields[index].type === 'select' && !props.fields[index].options.map(option => option.value).includes(itemValues[index])) {\r\n errors.push(<>Value {itemValues[index]} is wrong for field {props.fields[index].name} in position {parseInt(itemIndex) + 1}!);\r\n success = false;\r\n }\r\n if (props.fields[index].type === 'checkbox') {\r\n itemValues[index] = itemValues[index] === 'true';\r\n }\r\n item[props.fields[index].name] = itemValues[index];\r\n }\r\n return item;\r\n });\r\n\r\n if (!success) {\r\n enqueueSnackbar(
{errors.map((error, index) =>
{error}
)}
, { variant: 'error' });\r\n return;\r\n }\r\n props.save(data);\r\n props.onClose();\r\n };\r\n\r\n return \r\n {I18n.t('Edit data as TSV')}\r\n \r\n {I18n.t('You can copy, paste and edit data as TSV.')}\r\n
\r\n setTsv(e)}\r\n height=\"400px\"\r\n showPrintMargin={false}\r\n value={tsv}\r\n className={props.classes.tsvEditor}\r\n width=\"100%\"\r\n setOptions={{firstLineNumber: 0}}\r\n mode={null}\r\n />\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n};\r\n\r\nTsvDialog.propTypes = {\r\n open: PropTypes.bool,\r\n onClose: PropTypes.func,\r\n classes: PropTypes.object,\r\n save: PropTypes.func,\r\n fields: PropTypes.array,\r\n data: PropTypes.array\r\n};\r\n\r\nexport default withStyles(styles)(TsvDialog);","import PropTypes from 'prop-types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\n\r\nconst DeleteAllDialog = (props) => {\r\n return props.open ? \r\n {I18n.t('Delete all items')}\r\n \r\n {I18n.t('Are you sure to delete all items?')}\r\n \r\n \r\n \r\n \r\n \r\n : null;\r\n}\r\n\r\nDeleteAllDialog.propTypes = {\r\n open: PropTypes.bool,\r\n action: PropTypes.func,\r\n onClose: PropTypes.func,\r\n classes: PropTypes.object,\r\n}\r\n\r\nexport default DeleteAllDialog;","import { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\n\r\nconst DeleteDialog = (props) => {\r\n const [disableWarnings, setDisableWarnings] = useState(false);\r\n useEffect(() => {\r\n setDisableWarnings(false);\r\n }, [props.open]);\r\n\r\n return props.open ? \r\n {I18n.t('Delete item')}\r\n \r\n {I18n.t('Are you sure to delete item with address \"%s\"?', props.item._address)}\r\n setDisableWarnings(e.target.checked)}\r\n />}/>\r\n \r\n \r\n \r\n \r\n \r\n : null;\r\n}\r\n\r\nDeleteDialog.propTypes = {\r\n open: PropTypes.bool,\r\n onClose: PropTypes.func,\r\n classes: PropTypes.object,\r\n action: PropTypes.func,\r\n item: PropTypes.object,\r\n}\r\n\r\nexport default DeleteDialog;","import { useState, useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport Table from '@material-ui/core/Table';\r\nimport TableHead from '@material-ui/core/TableHead';\r\nimport TableBody from '@material-ui/core/TableBody';\r\nimport TableRow from '@material-ui/core/TableRow';\r\nimport TableCell from '@material-ui/core/TableCell';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport Select from '@material-ui/core/Select';\r\nimport MenuItem from '@material-ui/core/MenuItem';\r\nimport TableSortLabel from '@material-ui/core/TableSortLabel';\r\nimport Tooltip from '@material-ui/core/Tooltip';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport AddIcon from '@material-ui/icons/Add';\r\nimport ImportExport from '@material-ui/icons/ImportExport';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\nimport Utils from '@iobroker/adapter-react/Components/Utils';\r\n\r\nimport ExpertIcon from '@iobroker/adapter-react/icons/IconExpert';\r\nimport TextWithIcon from '@iobroker/adapter-react/Components/TextWithIcon';\r\nimport SelectWithIcon from '@iobroker/adapter-react/Components/SelectWithIcon';\r\n\r\nimport TsvDialog from './TsvDialog';\r\nimport DeleteAllDialog from './DeleteAllDialog';\r\nimport DeleteDialog from './DeleteDialog';\r\n\r\nconst styles = theme => ({\r\n tableHeader: {\r\n whiteSpace: 'nowrap',\r\n fontWeight: 'bold',\r\n fontSize: '80%',\r\n padding: '0px 8px'\r\n },\r\n tableHeaderExtended: {\r\n color: theme.palette.type === 'dark' ? theme.palette.primary.light : theme.palette.primary.dark\r\n },\r\n tableCell: {\r\n whiteSpace: 'nowrap',\r\n fontSize: '80%',\r\n padding: '0px 8px'\r\n },\r\n tableContainer: {\r\n overflow: 'auto',\r\n maxHeight: 'calc(100vh - 180px)'\r\n },\r\n tableTextField: {\r\n fontSize: '80%'\r\n },\r\n tableSelect: {\r\n fontSize: '80%'\r\n },\r\n tableTextFieldContainer: {\r\n width: '100%'\r\n },\r\n tableSelectContainer: {\r\n width: '100%'\r\n },\r\n nonEditMode: {\r\n cursor: 'pointer'\r\n }\r\n});\r\n\r\nconst DataCell = props => {\r\n const sortedItem = props.sortedItem;\r\n const field = props.field;\r\n const editMode = props.editMode;\r\n const setEditMode = props.setEditMode;\r\n\r\n const ref = useRef();\r\n /*useEffect(() => {\r\n if (props.editMode) {\r\n // ref.current && ref.current.focus()\r\n //window.setTimeout(() => ref.current && ref.current.focus(), 1000);\r\n }\r\n }, [props.editMode])*/\r\n\r\n let item = sortedItem.item;\r\n let result;\r\n if (field.type === 'checkbox') {\r\n result = \r\n props.changeParam(sortedItem.$index, field.name, e.target.checked)}\r\n />\r\n ;\r\n } else if (field.type === 'rooms') {\r\n if (!editMode) {\r\n result = ;\r\n } else {\r\n result = props.changeParam(sortedItem.$index, field.name, value)}\r\n className={props.classes.tableSelectContainer}\r\n />;\r\n }\r\n } else if (field.type === 'select') {\r\n if (!editMode) {\r\n let option = field.options.find(option => option.value === item[field.name]);\r\n result = option ? option.title : '';\r\n } else {\r\n result = props.changeParam(sortedItem.$index, field.name, e.target.value)}\r\n className={props.classes.tableSelectContainer}\r\n >\r\n {field.options.map(option =>\r\n {option.title ? option.title : {I18n.t('Nothing')}}\r\n )}\r\n ;\r\n }\r\n } else {\r\n if (!editMode) {\r\n result = item[field.name] ? item[field.name] : null;\r\n } else {\r\n result = props.changeParam(sortedItem.$index, field.name, e.target.value)}\r\n disabled={props.getDisable(sortedItem.$index, field.name)}\r\n />;\r\n }\r\n }\r\n\r\n return {\r\n setEditMode(true);\r\n window.localStorage.setItem('Modbus.editMode', 'true');\r\n window.setTimeout(() => ref.current && ref.current.focus(), 100);\r\n }}\r\n >\r\n {result}\r\n ;\r\n}\r\n\r\nconst RegisterTable = props => {\r\n const [tsvDialogOpen, setTsvDialogOpen] = useState(false);\r\n const [editMode, setEditMode] = useState(parseInt(window.localStorage.getItem('Modbus.editMode'), 10) || 0);\r\n const [extendedMode, setExtendedMode] = useState(window.localStorage.getItem('Modbus.extendedMode') === 'true');\r\n const [deleteAllDialog, setDeleteAllDialog] = useState({\r\n open: false,\r\n action: null,\r\n });\r\n const [deleteDialog, setDeleteDialog] = useState({\r\n open: false,\r\n item: null,\r\n action: null,\r\n });\r\n\r\n let sortedData = props.getSortedData(props.data, props.orderBy, props.order);\r\n\r\n return
\r\n
\r\n \r\n props.addItem()}>\r\n \r\n \r\n \r\n \r\n setTsvDialogOpen(true)}>\r\n \r\n \r\n \r\n \r\n {\r\n window.localStorage.setItem('Modbus.extendedMode', extendedMode ? 'false' : 'true');\r\n setExtendedMode(!extendedMode);\r\n }}>\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field => {\r\n let isChecked = false;\r\n let indeterminate = false;\r\n let trueFound = false;\r\n let falseFound = false;\r\n for (let k in props.data) {\r\n if (props.data[k][field.name]) {\r\n isChecked = true;\r\n trueFound = true;\r\n } else {\r\n isChecked = false;\r\n falseFound = true;\r\n }\r\n\r\n if (trueFound && falseFound) {\r\n indeterminate = true;\r\n isChecked = false;\r\n break;\r\n }\r\n }\r\n\r\n return \r\n {field.type === 'checkbox' ?\r\n \r\n {\r\n let newData = JSON.parse(JSON.stringify(props.data));\r\n newData.forEach(item =>\r\n item[field.name] = e.target.checked);\r\n props.changeData(newData);\r\n }}\r\n />\r\n \r\n : null}\r\n {field.sorted ? {\r\n const isAsc = props.orderBy === field.name && props.order === 'asc';\r\n props.onChangeOrder(field.name, isAsc ? 'desc' : 'asc');\r\n }}\r\n >{I18n.t(field.title)} : I18n.t(field.title)}\r\n \r\n })}\r\n \r\n \r\n
\r\n setDeleteAllDialog({\r\n open: true,\r\n action: () => props.changeData([]),\r\n })}\r\n disabled={!props.data.length}\r\n >\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n {\r\n sortedData.map(sortedItem =>\r\n \r\n {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field =>\r\n setEditMode(sortedItem.$index)}\r\n {...props}\r\n />\r\n )}\r\n \r\n \r\n
\r\n {\r\n let lastTime = window.sessionStorage.getItem('disableDeleteDialogs');\r\n if (lastTime && (new Date() - new Date(lastTime)) < 1000 * 60 * 5) {\r\n props.deleteItem(sortedItem.$index);\r\n return;\r\n }\r\n setDeleteDialog({\r\n open: true,\r\n action: disableDialogs => {\r\n if (disableDialogs) {\r\n window.sessionStorage.setItem('disableDeleteDialogs', (new Date()).toISOString());\r\n }\r\n props.deleteItem(sortedItem.$index);\r\n },\r\n item: sortedItem.item\r\n })\r\n }}>\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n )\r\n }\r\n
\r\n
\r\n
\r\n {tsvDialogOpen ?\r\n {\r\n if (props.prefix) {\r\n data.forEach(line => {\r\n line.Address = (line.Address || '').toUpperCase();\r\n if (line.Address && !line.Address.startsWith(props.prefix)) {\r\n line.Address = props.prefix + line.Address;\r\n }\r\n });\r\n }\r\n props.changeData(data);\r\n }}\r\n onClose={() => setTsvDialogOpen(false)}\r\n data={props.data}\r\n fields={props.fields}\r\n /> : null\r\n }\r\n setDeleteAllDialog({\r\n open: false,\r\n action: null,\r\n })}\r\n />\r\n setDeleteDialog({\r\n open: false,\r\n action: null,\r\n item: null\r\n })}\r\n item={deleteDialog.item}\r\n />\r\n
;\r\n}\r\n\r\nRegisterTable.propTypes = {\r\n data: PropTypes.array,\r\n fields: PropTypes.array,\r\n classes: PropTypes.object,\r\n addItem: PropTypes.func,\r\n changeData: PropTypes.func,\r\n deleteItem: PropTypes.func,\r\n rooms: PropTypes.object,\r\n formulaDisabled: PropTypes.bool,\r\n getSortedData: PropTypes.func,\r\n themeType: PropTypes.string,\r\n prefix: PropTypes.string,\r\n};\r\n\r\nexport default withStyles(styles)(RegisterTable);","import {Component} from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport Paper from '@material-ui/core/Paper';\r\n\r\nimport roles from '../data/roles';\r\nimport types from '../data/types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport RegisterTable from '../Components/RegisterTable';\r\n\r\nclass BaseRegisters extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.nativeField = '';\r\n this.state = {\r\n order: window.localStorage.getItem('Modbus.order') || 'asc',\r\n orderBy: window.localStorage.getItem('Modbus.orderBy') || 'Address',\r\n };\r\n }\r\n\r\n getRooms() {\r\n const lang = I18n.getLanguage();\r\n return this.props.rooms ? Object.values(this.props.rooms).map(room => ({\r\n value: room._id,\r\n title: typeof room.common.name === 'object' ? room.common.name[lang] : room.common.name\r\n })) : [];\r\n }\r\n\r\n getFields() {\r\n let rooms = this.getRooms();\r\n rooms.unshift({value: '', title: ''});\r\n\r\n let result = [\r\n {name: 'Address', title: 'Address', type: 'text', sorted: true, width: 20},\r\n {name: 'Name', title: 'Name', type: 'text', sorted: true},\r\n {name: 'Description', title: 'Description', type: 'text', sorted: true},\r\n {name: 'Type', title: 'Type', type: 'select', options: types, sorted: true},\r\n {name: 'Length', title: 'Length', type: 'text', width: 20},\r\n {name: 'Unit', title: 'Unit', type: 'text', width: 30},\r\n {name: 'Role', title: 'Role', type: 'select', options: roles, sorted: true},\r\n {name: 'Room', title: 'Room', type: 'rooms', options: rooms, sorted: true},\r\n {name: 'poll', title: 'Poll', type: 'checkbox'},\r\n {name: 'RW', title: 'RW', type: 'checkbox', expert: true},\r\n {name: 'WP', title: 'WP', type: 'checkbox', expert: true},\r\n ]\r\n\r\n if (this.props.native.params.multiDeviceId) {\r\n result.splice(1, 0,\r\n {name: 'deviceId', title: 'Slave ID', type: 'number', sorted: true, width: 20},\r\n );\r\n }\r\n\r\n return result;\r\n }\r\n\r\n address2struct(address) {\r\n if (this.nativeField === 'dbs') {\r\n const parts = address.split(' ');\r\n const db = parseInt(parts[0].replace('DB', '').replace('db', '').trim(), 10);\r\n if (parts[1] && parts[1].includes('.')) {\r\n const a = parseFloat(parts[1]);\r\n return {db, byte: Math.floor(a), bit: (a * 10) % 10};\r\n } else {\r\n return {db, byte: parseInt(parts[1], 10)};\r\n }\r\n } else {\r\n if (address.includes('.')) {\r\n const a = parseFloat(address);\r\n return {byte: Math.floor(a), bit: (a * 10) % 10};\r\n } else {\r\n return {byte: parseInt(address, 10)};\r\n }\r\n }\r\n }\r\n\r\n struct2address(struct) {\r\n if (struct.db !== undefined) {\r\n if (struct.bit !== undefined) {\r\n return `DB${struct.db} ${struct.byte}.${struct.bit}`;\r\n } else {\r\n return `DB${struct.db} ${struct.byte}`;\r\n }\r\n } else if (struct.bit !== undefined) {\r\n return struct.byte + '.' + struct.bit;\r\n } else {\r\n return struct.byte;\r\n }\r\n }\r\n\r\n changeParam = (index, name, value) => {\r\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n data[index][name] = value;\r\n if (name === 'Type') {\r\n if (['BOOL'].includes(value)) {\r\n data[index].Length = 0.1;\r\n } else\r\n if (['', 'BYTE'].includes(value)) {\r\n data[index].Length = 1;\r\n } else\r\n if (['WORD', 'INT', 'STRING', 'S5TIME'].includes(value)) {\r\n data[index].Length = 2;\r\n } else\r\n if (['DWORD', 'DINT', 'REAL'].includes(value)) {\r\n data[index].Length = 4;\r\n } else\r\n if (['S7TIME'].includes(value)) {\r\n data[index].Length = 8;\r\n } else\r\n if (['S7STRING', 'ARRAY'].includes(value)) {\r\n data[index].Length = 32;\r\n }\r\n\r\n if (value === 'BOOL') {\r\n const struct = this.address2struct(data[index].Address);\r\n if (struct.bit === undefined) {\r\n struct.bit = 0;\r\n data[index].Address = this.struct2address(struct);\r\n }\r\n } else {\r\n const struct = this.address2struct(data[index].Address);\r\n if (struct.bit !== undefined) {\r\n if (struct.bit > 0) {\r\n struct.byte++;\r\n }\r\n delete struct.bit;\r\n\r\n data[index].Address = this.struct2address(struct);\r\n }\r\n }\r\n }\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n addItem = () => {\r\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n let newItem = {}\r\n\r\n this.getFields().forEach(field => newItem[field.name] = '');\r\n\r\n if (data.length) {\r\n let sortedData = JSON.parse(JSON.stringify(data));\r\n sortedData.sort((item1, item2) => item1.Address > item2.Address ? 1 : -1);\r\n let lastItem = sortedData[sortedData.length - 1];\r\n const struct = this.address2struct(lastItem.Address);\r\n if (lastItem.Type === 'BOOL') {\r\n struct.bit = struct.bit || 0;\r\n struct.bit++;\r\n if (struct.bit >= 8) {\r\n struct.bit = struct.bit % 8;\r\n struct.byte++;\r\n }\r\n } else {\r\n delete struct.bit;\r\n struct.byte += lastItem.Length;\r\n }\r\n\r\n if (struct.db !== undefined && struct.byte + lastItem.Length > 0xFFFF) {\r\n struct.db++;\r\n struct.byte = 0;\r\n if (lastItem.Type === 'BOOL') {\r\n struct.bit = 0;\r\n }\r\n }\r\n\r\n newItem.Address = this.struct2address(struct);\r\n newItem.Type = lastItem.Type;\r\n newItem.Length = lastItem.Length;\r\n newItem.Unit = lastItem.Unit;\r\n newItem.Role = lastItem.Role;\r\n newItem.Room = lastItem.Room;\r\n newItem.poll = lastItem.poll;\r\n newItem.RW = lastItem.RW;\r\n newItem.WP = lastItem.WP;\r\n } else {\r\n newItem.role = 'level';\r\n newItem.Type = 'BOOL';\r\n newItem.Length = '0.1';\r\n newItem.poll = true;\r\n if (this.nativeField === 'dbs') {\r\n newItem.Address = 'DB1 0.0';\r\n } else {\r\n newItem.Address = '0.0';\r\n }\r\n }\r\n data.push(newItem);\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n deleteItem = (index) => {\r\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n data.splice(index, 1);\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n changeData = (data) => {\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n getDisable = (index, name) => {\r\n return name === 'Length' &&\r\n !['STRING', 'S7STRING', 'ARRAY'].includes(this.props.native[this.nativeField][index].type);\r\n }\r\n\r\n getSortedData = (data, orderBy, order) => {\r\n this.fields = this.fields || this.getFields();\r\n\r\n data = data || this.props.native[this.nativeField];\r\n orderBy = orderBy || this.state.orderBy;\r\n order = order || this.state.order;\r\n let sortedData = [];\r\n data.forEach((item, index) => {sortedData[index] = {item, $index: index}});\r\n const field = this.fields.find(item => item.name === orderBy);\r\n\r\n sortedData.sort((sortedItem1, sortedItem2) => {\r\n let sort1;\r\n let sort2;\r\n if (orderBy === 'Address') {\r\n const a1 = this.address2struct(sortedItem1.item.Address);\r\n const a2 = this.address2struct(sortedItem2.item.Address);\r\n\r\n sort1 = 0;\r\n if (a1.db !== undefined) {\r\n sort1 = a1.db << 24;\r\n }\r\n if (a2.db !== undefined) {\r\n sort2 = a2.db << 24;\r\n }\r\n sort1 |= a1.byte << 8;\r\n sort2 |= a2.byte << 8;\r\n sort1 |= a1.bit || 0;\r\n sort2 |= a2.bit || 0;\r\n } else if (orderBy === '$index') {\r\n sort1 = sortedItem1[orderBy];\r\n sort2 = sortedItem2[orderBy];\r\n } else if (field && field.type === 'number') {\r\n sort1 = parseInt(sortedItem1.item[orderBy], 10);\r\n sort2 = parseInt(sortedItem2.item[orderBy], 10);\r\n } else {\r\n sort1 = sortedItem1.item[orderBy];\r\n sort2 = sortedItem2.item[orderBy];\r\n }\r\n return (order === 'asc' ? sort1 > sort2 : sort1 < sort2) ? 1 : -1;\r\n });\r\n\r\n return sortedData;\r\n }\r\n\r\n render() {\r\n this.fields = this.fields || this.getFields();\r\n\r\n return \r\n {\r\n this.setState({orderBy, order});\r\n window.localStorage.setItem('Modbus.orderBy', orderBy);\r\n window.localStorage.setItem('Modbus.order', order);\r\n }}\r\n />\r\n \r\n }\r\n}\r\n\r\nBaseRegisters.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n themeType: PropTypes.string,\r\n};\r\n\r\nexport default BaseRegisters;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Inputs extends BaseRegisters {\r\n nativeField = 'inputs'\r\n}\r\n\r\nInputs.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Inputs;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Outputs extends BaseRegisters {\r\n nativeField = 'outputs'\r\n}\r\n\r\nOutputs.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Outputs;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Marker extends BaseRegisters {\r\n nativeField = 'markers'\r\n}\r\n\r\nMarker.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Marker;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Dbs extends BaseRegisters {\r\n nativeField = 'dbs';\r\n}\r\n\r\nDbs.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Dbs;\r\n","import React from 'react';\r\nimport {withStyles} from '@material-ui/core/styles';\r\nimport { MuiThemeProvider } from '@material-ui/core/styles';\r\nimport { SnackbarProvider } from 'notistack';\r\n\r\nimport AppBar from '@material-ui/core/AppBar';\r\nimport Tabs from '@material-ui/core/Tabs';\r\nimport Tab from '@material-ui/core/Tab';\r\n\r\nimport GenericApp from '@iobroker/adapter-react/GenericApp';\r\nimport Loader from '@iobroker/adapter-react/Components/Loader'\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport TabOptions from './Tabs/Options';\r\nimport TabInputs from './Tabs/Inputs';\r\nimport TabOutputs from './Tabs/Outputs';\r\nimport TabMarker from './Tabs/Marker';\r\nimport TabDbs from './Tabs/DBs';\r\n\r\nconst styles = theme => ({\r\n root: {},\r\n tabContent: {\r\n padding: 10,\r\n height: 'calc(100% - 64px - 48px - 20px)',\r\n overflow: 'auto',\r\n },\r\n tabContentIFrame: {\r\n padding: 10,\r\n height: 'calc(100% - 64px - 48px - 20px - 38px)',\r\n overflow: 'auto'\r\n },\r\n tab: {\r\n width: '100%',\r\n minHeight: '100%'\r\n }\r\n});\r\n\r\nconst tabs = [\r\n {\r\n name: 'general',\r\n title: 'General',\r\n component: TabOptions,\r\n },\r\n {\r\n name: 'inputs',\r\n title: 'Inputs',\r\n component: TabInputs,\r\n },\r\n {\r\n name: 'outputs',\r\n title: 'Outputs',\r\n component: TabOutputs,\r\n },\r\n {\r\n name: 'marker',\r\n title: 'Marker',\r\n component: TabMarker,\r\n },\r\n {\r\n name: 'dbs',\r\n title: 'DBs',\r\n component: TabDbs,\r\n },\r\n]\r\n\r\nclass App extends GenericApp {\r\n constructor(props) {\r\n const extendedProps = {...props};\r\n extendedProps.encryptedFields = ['pass'];\r\n\r\n extendedProps.translations = {\r\n 'en': require('./i18n/en'),\r\n 'de': require('./i18n/de'),\r\n 'ru': require('./i18n/ru'),\r\n 'pt': require('./i18n/pt'),\r\n 'nl': require('./i18n/nl'),\r\n 'fr': require('./i18n/fr'),\r\n 'it': require('./i18n/it'),\r\n 'es': require('./i18n/es'),\r\n 'pl': require('./i18n/pl'),\r\n 'zh-cn': require('./i18n/zh-cn'),\r\n };\r\n\r\n super(props, extendedProps);\r\n this.state.moreLoaded = false;\r\n this.state.rooms = null;\r\n }\r\n\r\n onConnectionReady() {\r\n super.onConnectionReady()\r\n this.socket.getForeignObjects('enum.rooms.*', 'enum')\r\n .then(rooms =>\r\n this.setState({moreLoaded: true, rooms}));\r\n }\r\n\r\n getSelectedTab() {\r\n const selectedTab = this.state.selectedTab;\r\n if (!selectedTab) {\r\n return 0;\r\n } else {\r\n return tabs.findIndex(tab => tab.name === selectedTab);\r\n }\r\n }\r\n\r\n render() {\r\n if (!this.state.loaded || !this.state.moreLoaded) {\r\n return \r\n \r\n ;\r\n }\r\n\r\n return \r\n \r\n
\r\n \r\n this.selectTab(tabs[index].name, index)}\r\n variant=\"scrollable\" scrollButtons=\"auto\">\r\n {tabs.map(tab => {tab.icon}{I18n.t(tab.title)} : I18n.t(tab.title)}\r\n data-name={tab.name}\r\n key={tab.name}\r\n title={tab.tooltip ? I18n.t(tab.tooltip) : undefined}\r\n />)}\r\n \r\n \r\n
\r\n {tabs.map((tab, index) => {\r\n const TabComponent = tab.component;\r\n if (this.state.selectedTab) {\r\n if (this.state.selectedTab !== tab.name) {\r\n return null;\r\n }\r\n } else {\r\n if (index !== 0) {\r\n return null;\r\n }\r\n }\r\n return this.setState({errorText: (text || text === 0) && typeof text !== 'string' ? text.toString() : text})}\r\n onLoad={native => this.onLoadConfig(native)}\r\n instance={this.instance}\r\n adapterName={this.adapterName}\r\n changed={this.state.changed}\r\n onChange={(attr, value, cb) => this.updateNativeValue(attr, value, cb)}\r\n changeNative={value => this.setState({native: value, changed: this.getIsChanged(value)})}\r\n rooms={this.state.rooms}\r\n />\r\n })}\r\n {/*
{JSON.stringify(this.state.native, null, 2)}
*/}\r\n
\r\n {this.renderError()}\r\n {this.renderSaveCloseButtons()}\r\n
\r\n
\r\n
;\r\n }\r\n}\r\n\r\nexport default withStyles(styles)(App);\r\n","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read http://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.1/8 is considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport function register(config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit http://bit.ly/CRA-PWA'\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all ' +\r\n 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister();\r\n });\r\n }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport * as Sentry from '@sentry/browser';\r\nimport * as SentryIntegrations from '@sentry/integrations';\r\nimport { MuiThemeProvider} from '@material-ui/core/styles';\r\nimport './index.css';\r\nimport App from './App';\r\nimport * as serviceWorker from './serviceWorker';\r\nimport {version} from '../package.json';\r\nimport theme from '@iobroker/adapter-react/Theme';\r\nimport Utils from '@iobroker/adapter-react/Components/Utils';\r\n\r\nwindow.adapterName = 's7';\r\nlet themeName = Utils.getThemeName();\r\n\r\nconsole.log(`iobroker.${window.adapterName}@${version} using theme \"${themeName}\"`);\r\n\r\nfunction build() {\r\n return ReactDOM.render(\r\n \r\n {\r\n themeName = _theme;\r\n build();\r\n }}\r\n />\r\n ,\r\n document.getElementById('root')\r\n );\r\n}\r\n\r\nif (false && window.location.host !== 'localhost:3000') {\r\n Sentry.init({\r\n dsn: 'https://5ad729dbed504d15aa8bde423cae9a8e@sentry.iobroker.net/57',\r\n release: `iobroker.${window.adapterName}@${version}`,\r\n integrations: [\r\n new SentryIntegrations.Dedupe()\r\n ]\r\n });\r\n}\r\n\r\nbuild();\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: http://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/src/package.json b/src/package.json index 26ee5da..3f51ed2 100644 --- a/src/package.json +++ b/src/package.json @@ -1,6 +1,6 @@ { "name": "modebus-admin", - "version": "1.3.10", + "version": "1.3.11", "private": true, "dependencies": { "@iobroker/adapter-react": "^2.0.18",