iobroker.sql 4.5.0 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -19
- package/admin/custom/assets/Components-z0NoiyPz.js +1 -0
- package/admin/custom/assets/DataBrowser-v06sXLcj.js +7 -0
- package/admin/custom/assets/{_virtual_mf-localSharedImportMap___mfe_internal__SqlComponentsSet__mf_owner__1-DAGgRMdx.js → _virtual_mf-localSharedImportMap___mfe_internal__SqlComponentsSet__mf_owner__1-BCL0evdo.js} +1 -1
- package/admin/custom/assets/_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DGB4BINK.js +1526 -0
- package/admin/custom/assets/{_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__264649249385412__loadShare__shared-DmziGsfK.js → _virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__loadShare__shared-CP0GHP0n.js} +2 -2
- package/admin/custom/assets/_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__prebuild___mf_0_iobroker_mf_1_json_mf_2_config__prebuild__-BpKJQFYf.js +122 -0
- package/admin/custom/assets/{_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__264649249385412__prebuild__react_mf_2_dom_mf_1_client__prebuild__-SIym-UC8.js → _virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__prebuild__react_mf_2_dom_mf_1_client__prebuild__-1dRDhFNI.js} +1 -1
- package/admin/custom/assets/{dist-ChhOvPa4.js → dist-DKNMF4jN.js} +1 -1
- package/admin/custom/assets/helpers-Cms4pf5K.js +1 -0
- package/admin/custom/assets/{hostInit-Bp3K06oA.js → hostInit-DCD-lOxc.js} +1 -1
- package/admin/custom/assets/{index-BACEccc0.js → index-BLORWz5n.js} +1 -1
- package/admin/custom/assets/{lib-BlyWjmi5.js → lib-XBZsNy3C.js} +2 -2
- package/admin/custom/assets/{mf-entry-bootstrap-0-03451604.js → mf-entry-bootstrap-0-3836594a.js} +3 -3
- package/admin/custom/assets/{pendingShares-BhtJBPS2.js → pendingShares-Bo3TLAs9.js} +2 -2
- package/admin/custom/assets/prod-Czs48qVn.js +502 -0
- package/admin/custom/assets/{utils-Cqsn1la4.js → utils-BYsz0Nk6.js} +1 -1
- package/admin/custom/assets/{vite-preload-helper-BbbETgeG.js → vite-preload-helper-D97eqSzU.js} +1 -1
- package/admin/custom/customComponents.js +2 -2
- package/admin/custom/mf-manifest.json +1 -1
- package/admin/i18n/de.json +1 -1
- package/build/lib/help.js +121 -0
- package/build/lib/help.js.map +1 -0
- package/build/lib/mysql.js +34 -4
- package/build/lib/mysql.js.map +1 -1
- package/build/lib/names.js +5 -3
- package/build/lib/names.js.map +1 -1
- package/build/lib/statistics.js +27 -4
- package/build/lib/statistics.js.map +1 -1
- package/build/main.js +44 -15
- package/build/main.js.map +1 -1
- package/io-package.json +33 -27
- package/package.json +3 -3
- package/admin/custom/assets/Components-Biqn0PcX.js +0 -1
- package/admin/custom/assets/DataBrowser-DTTVoTBj.js +0 -7
- package/admin/custom/assets/_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__264649249385412__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DiZBpJW2.js +0 -1439
- package/admin/custom/assets/_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__264649249385412__prebuild___mf_0_iobroker_mf_1_json_mf_2_config__prebuild__-CY-VVm-e.js +0 -122
- package/admin/custom/assets/helpers-CwABI1ut.js +0 -1
- package/admin/custom/assets/prod-m5pRY8Jx.js +0 -15
- /package/admin/custom/assets/{_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__264649249385412__prebuild__react_mf_1_jsx_mf_2_runtime__prebuild__--SURtz9t.js → _virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__prebuild__react_mf_1_jsx_mf_2_runtime__prebuild__--SURtz9t.js} +0 -0
package/README.md
CHANGED
|
@@ -94,6 +94,20 @@ Pay attention to the authentication method. The new encryption algorithm in MySQ
|
|
|
94
94
|
|
|
95
95
|

|
|
96
96
|
|
|
97
|
+
#### Emojis and upper/lower case in an existing database
|
|
98
|
+
|
|
99
|
+
Tables that the adapter creates now store every character (also emojis) and keep IDs apart that differ only in upper/lower case (`alias.0.Licht` and `alias.0.licht`). Tables that already exist are not changed automatically, because converting a large table takes a while and blocks it.
|
|
100
|
+
|
|
101
|
+
If you want this for an existing database: stop the SQL instance, make a backup of the database, and run these three commands, e.g. in phpMyAdmin (replace `iobroker` with the name of your database):
|
|
102
|
+
|
|
103
|
+
```sql
|
|
104
|
+
ALTER TABLE `iobroker`.datapoints MODIFY name TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
|
|
105
|
+
ALTER TABLE `iobroker`.sources MODIFY name TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
|
|
106
|
+
ALTER TABLE `iobroker`.ts_string MODIFY val TEXT CHARACTER SET utf8mb4;
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Then start the instance again. Without this, everything keeps working as before; only values with emojis cannot be stored.
|
|
110
|
+
|
|
97
111
|
## Structure of the DBs
|
|
98
112
|
The default Database name is `iobroker`, but it can be changed in the configuration.
|
|
99
113
|
### Sources
|
|
@@ -223,6 +237,9 @@ Structure:
|
|
|
223
237
|
|
|
224
238
|
*Note:* MS-SQL uses BIT, and others use BOOLEAN. SQLite uses for ts INTEGER and all others BIGINT.
|
|
225
239
|
|
|
240
|
+
## Messages for scripts and AI agents
|
|
241
|
+
`sendTo('sql.0', 'help', {})` answers `{help, commands}`: a description of all messages and of the tables for AI agents (e.g. ioBroker.pi-agent) and script authors, and the list of all commands with `write: true` for the ones that change something.
|
|
242
|
+
|
|
226
243
|
## Access values from Javascript adapter
|
|
227
244
|
The sorted values can be accessed from JavaScript adapter.
|
|
228
245
|
|
|
@@ -650,6 +667,13 @@ sendTo('sql.0', 'getEnabledDPs', {}, function (result) {
|
|
|
650
667
|
-->
|
|
651
668
|
|
|
652
669
|
## Changelog
|
|
670
|
+
### 4.6.0 (2026-11-19)
|
|
671
|
+
* (@GermanBluefox) Added the message "help": a description of all messages for AI agents (e.g. pi-agent), and `common.supportedMessages.help`
|
|
672
|
+
|
|
673
|
+
### 4.5.1 (2026-11-17)
|
|
674
|
+
* (@Schimi1983) "Clean up" no longer deletes the history of datapoints that are logged under an alias name, and stops with an error instead of deleting everything when the object database cannot be read (#587)
|
|
675
|
+
* (@Schimi1983) MySQL/MariaDB: new tables use `utf8mb4`, so values, IDs and sources with emojis are stored instead of failing, and the names compare case-sensitively (`utf8mb4_bin`), also in a database created by a hoster. Existing tables are not changed; the README explains how to convert them (#588)
|
|
676
|
+
|
|
653
677
|
### 4.5.0 (2026-11-10)
|
|
654
678
|
* (@Schimi1983) The database password is stored encrypted (`encryptedNative`). A password saved with an older version is encrypted once on the first start, the instance then restarts by itself. Note: after going back to 4.4.1 or older, enter the password in the instance settings again (#587)
|
|
655
679
|
* (@DutchmanNL) PostgreSQL: new opt-in setting "Relax PostgreSQL commit durability" runs the adapter's connections with `synchronous_commit=off`, so commits no longer wait for the disk flush. This strongly reduces disk I/O and wear. A crash of the PostgreSQL server can lose the values of the last few hundred milliseconds; the database cannot be corrupted (#516)
|
|
@@ -675,25 +699,6 @@ sendTo('sql.0', 'getEnabledDPs', {}, function (result) {
|
|
|
675
699
|
* (@GermanBluefox) MySQL/MariaDB and MS SQL: datapoints whose IDs differ only in case (e.g. `alias.0.Licht` and `alias.0.licht`) or by trailing spaces no longer write into one series with the type of the first one. The second one gets its own row from now on; values that were already mixed stay where they are (#588)
|
|
676
700
|
* (@GermanBluefox) MS SQL: `@azure/msal-node`, a dependency of the driver, was updated to 7.2.0 because of CVE-2026-109461 (GHSA-xcx6-jx8p-x3h5). It concerns the Azure authorization code flow, which the adapter does not use
|
|
677
701
|
|
|
678
|
-
### 4.3.0 (2026-10-29)
|
|
679
|
-
* (@GermanBluefox) `getHistory` accepts `intervalBorders`: the client can send the borders of the intervals itself, e.g. the local days of a chart. With `count` or `step` every interval after a switch of the daylight saving time ended an hour away from the midnight, so a value written at 23:59:59 was shown on the next day (ioBroker/ioBroker.echarts#1311)
|
|
680
|
-
* (@Schimi1983) Fixed every write failing with "Can't add new command when connection is in closed state" until a restart: a connection the server closed while a statement was running was handed out again, because mysql2 reports that only to the statement and not as a connection error. Such a connection is also no longer handed to a write that waits for a free connection, and the reconnect is logged as a warning in this case too (#587)
|
|
681
|
-
* (@Schimi1983) Fixed "Record changes only" storing every string value again: the reference value was overwritten with the SQL literal, or with the converted value when a storage type is set (#587)
|
|
682
|
-
* (@Schimi1983) "Reset DB" no longer drops the whole database when "Do not create database" is set, only the adapter's tables. MSSQL: `DBCC FREEPROCCACHE` is then skipped too, as it needs server rights (#587)
|
|
683
|
-
* (@Schimi1983) "Ignore values below/above" now also works with the limit 0 (users who set 0 now get the filter they configured) and accepts a decimal comma (#587)
|
|
684
|
-
* (@Schimi1983) PostgreSQL: the password is no longer printed in the connection log (#587)
|
|
685
|
-
* (@Schimi1983) Fixed a crash when a datapoint is disabled while its database ID is being looked up (#587)
|
|
686
|
-
* (@Schimi1983) Disabling the logging of a datapoint with an alias ID works again (#587)
|
|
687
|
-
* (@Schimi1983) Admin: every input has size attributes for all screen widths, "Do not create database" no longer grows wider on large screens (#583)
|
|
688
|
-
* (@Schimi1983) Added the Ukrainian title and description, admin >= 7.6.20 is required (#583)
|
|
689
|
-
* (@Schimi1983) `password` and `dockerMysql.rootPassword` are no longer readable by other adapters (`protectedNative`, #583). Note: a script that reads `system.adapter.sql.0` with `getObject` and writes it back with `setObject` now deletes both passwords; use `extendObject` instead
|
|
690
|
-
* (@Schimi1983) README: the reinstall hint for SQLite uses `iobroker rebuild sqlite3` instead of `npm install` (#583)
|
|
691
|
-
* (@Schimi1983) CI: the job with the unit and SQLite tests is named `adapter-tests`, as the repository checker expects, and also runs on Node.js 26 (#583)
|
|
692
|
-
* (@GermanBluefox) Updated packages, `@iobroker/aggregate` 1.1.0
|
|
693
|
-
|
|
694
|
-
### 4.2.1 (2026-10-13)
|
|
695
|
-
* (@GermanBluefox) The error of a failed save or delete in the data browser is no longer hidden by the reload of the table
|
|
696
|
-
|
|
697
702
|
[Older changelogs can be found there](CHANGELOG_OLD.md)
|
|
698
703
|
|
|
699
704
|
## License
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./DataBrowser-v06sXLcj.js";import{An as t,Gn as n,Jt as r,Kt as i,L as a,Mn as o,Pn as s,Qt as c,Tn as l,W as u,X as d,Xt as f,Yt as p,Zt as m,_n as h,bn as g,dn as _,ei as v,en as y,fn as b,gn as x,in as S,jt as C,kn as w,ln as T,ni as E,on as D,qt as O,rn as k,ti as A,v as j,vn as M,yn as N}from"./_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DGB4BINK.js";import{t as P}from"./_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__loadShare__shared-CP0GHP0n.js";function F(e){if(e==null)return`—`;let t=[`B`,`KiB`,`MiB`,`GiB`,`TiB`],n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r++;return`${r===0?n:n.toFixed(1)} ${t[r]}`}function I(e){return e?new Date(e).toLocaleString():`—`}var L={active:`success`,loggingDisabled:`warning`,objectMissing:`error`},R={active:`sql_status_active`,loggingDisabled:`sql_status_disabled`,objectMissing:`sql_status_missing`},z={DataBrowser:e,Statistics:class extends P{constructor(e){super(e),Object.assign(this.state,{stats:null,summary:null,loading:!1,errorText:``,filter:``,sortField:`count`,sortAsc:!1,preview:null,includeDisabled:!1,deleting:!1,doneText:``})}async componentDidMount(){await super.componentDidMount(),this.props.alive&&await this.load()}async componentDidUpdate(e){this.props.alive&&!e.alive&&!this.state.stats&&await this.load()}get instance(){return`${this.props.oContext.adapterName}.${this.props.oContext.instance}`}async sendToInstance(e,t){let n=await this.props.oContext.socket.sendTo(this.instance,e,t);if(n!=null&&n.error)throw Error(n.error);return n}async load(){this.setState({loading:!0,errorText:``,doneText:``});try{let e=await this.sendToInstance(`getDpStatistics`,{});this.setState({stats:(e==null?void 0:e.result)||[],summary:(e==null?void 0:e.summary)||null,loading:!1})}catch(e){this.setState({loading:!1,stats:[],summary:null,errorText:e.message})}}async requestPreview(e){this.setState({loading:!0,errorText:``});try{let t=await this.sendToInstance(`cleanupOrphaned`,{scope:{objectMissing:!0,loggingDisabled:e}});this.setState({loading:!1,includeDisabled:e,preview:{datapoints:t.datapoints,rows:t.rows,estimatedBytes:t.estimatedBytes,items:t.items||[]}})}catch(e){this.setState({loading:!1,errorText:e.message})}}async confirmCleanup(){this.setState({deleting:!0,errorText:``});try{let e=await this.sendToInstance(`cleanupOrphaned`,{scope:{objectMissing:!0,loggingDisabled:this.state.includeDisabled},confirm:!0});this.setState({deleting:!1,preview:null,doneText:j.t(`sql_cleanup_done`,e.deleted.rows,e.deleted.datapoints)},()=>void this.load())}catch(e){this.setState({deleting:!1,errorText:e.message})}}sortedStats(){let{stats:e,filter:t,sortField:n,sortAsc:r}=this.state,i=t.trim().toLowerCase(),a=(e||[]).filter(e=>!i||e.id.toLowerCase().includes(i)),o=r?1:-1;return a.sort((e,t)=>{let r=e[n],i=t[n];return r===i?e.id>t.id?1:e.id<t.id?-1:0:r==null?1:i==null?-1:(r>i?1:-1)*o})}renderSortLabel(e,t){return A(c,{active:this.state.sortField===e,direction:this.state.sortField===e&&this.state.sortAsc?`asc`:`desc`,onClick:()=>this.setState({sortField:e,sortAsc:this.state.sortField!==e||!this.state.sortAsc}),children:j.t(t)})}renderSummary(){let{summary:e}=this.state;if(!e)return null;let t=e.byStatus.objectMissing,n=e.byStatus.loggingDisabled;return E(D,{sx:{display:`flex`,gap:2,flexWrap:`wrap`,alignItems:`center`,mb:1},children:[A(S,{variant:`body2`,children:j.t(`sql_summary_total`,e.datapoints,e.rows,F(e.estimatedBytes))}),!!t.datapoints&&A(b,{color:`error`,size:`small`,label:j.t(`sql_summary_missing`,t.datapoints,t.rows)}),!!n.datapoints&&A(b,{color:`warning`,size:`small`,label:j.t(`sql_summary_disabled`,n.datapoints,n.rows)})]})}renderConfirmDialog(){let{preview:e,includeDisabled:t,deleting:o}=this.state;return e?E(x,{open:!0,onClose:()=>!o&&this.setState({preview:null}),maxWidth:`md`,fullWidth:!0,children:[A(g,{children:j.t(`sql_cleanup_confirm_title`)}),A(M,{children:e.datapoints?E(v,{children:[A(N,{sx:{mb:1},children:j.t(`sql_cleanup_confirm_text`,e.datapoints,e.rows,F(e.estimatedBytes))}),A(p,{component:n,sx:{maxHeight:320},children:E(i,{size:`small`,stickyHeader:!0,children:[A(f,{children:E(m,{children:[A(r,{children:j.t(`sql_col_id`)}),A(r,{children:j.t(`sql_col_status`)}),A(r,{align:`right`,children:j.t(`sql_col_count`)}),A(r,{align:`right`,children:j.t(`sql_col_size`)})]})}),A(O,{children:e.items.map(e=>E(m,{children:[A(r,{sx:{wordBreak:`break-all`},children:e.id}),A(r,{children:A(b,{size:`small`,color:L[e.status],label:j.t(R[e.status])})}),A(r,{align:`right`,children:e.count.toLocaleString()}),A(r,{align:`right`,children:F(e.estimatedBytes)})]},e.index))})]})}),t&&A(w,{severity:`warning`,icon:A(a,{}),sx:{mt:1},children:j.t(`sql_cleanup_disabled_warning`)})]}):A(N,{children:j.t(`sql_cleanup_nothing`)})}),E(h,{children:[A(T,{onClick:()=>this.setState({preview:null}),disabled:o,startIcon:A(u,{}),children:j.t(`sql_cancel`)}),A(T,{variant:`contained`,color:`error`,disabled:o||!e.datapoints,startIcon:A(d,{}),onClick:()=>void this.confirmCleanup(),children:j.t(`sql_cleanup_delete`)})]})]}):null}renderItem(){if(!this.props.alive)return A(w,{severity:`info`,children:j.t(`sql_instance_not_running`)});let e=this.sortedStats();return E(D,{sx:{width:`100%`},children:[E(D,{sx:{display:`flex`,gap:1,alignItems:`center`,flexWrap:`wrap`,mb:1},children:[A(y,{variant:`standard`,size:`small`,value:this.state.filter,placeholder:j.t(`sql_filter`),onChange:e=>this.setState({filter:e.target.value}),slotProps:{input:{endAdornment:this.state.filter?A(o,{position:`end`,children:A(t,{size:`small`,onClick:()=>this.setState({filter:``}),children:A(u,{})})}):null}}}),A(k,{title:j.t(`sql_reload`),children:A(t,{onClick:()=>void this.load(),disabled:this.state.loading,children:A(C,{})})}),A(D,{sx:{flexGrow:1}}),A(l,{control:A(_,{checked:this.state.includeDisabled,onChange:e=>this.setState({includeDisabled:e.target.checked})}),label:j.t(`sql_include_disabled`)}),A(T,{variant:`contained`,color:`error`,startIcon:A(d,{}),disabled:this.state.loading,onClick:()=>void this.requestPreview(this.state.includeDisabled),children:j.t(`sql_cleanup`)})]}),this.state.loading&&A(s,{}),!!this.state.errorText&&A(w,{severity:`error`,sx:{mb:1},onClose:()=>this.setState({errorText:``}),children:this.state.errorText}),!!this.state.doneText&&A(w,{severity:`success`,sx:{mb:1},onClose:()=>this.setState({doneText:``}),children:this.state.doneText}),this.renderSummary(),A(p,{component:n,children:E(i,{size:`small`,stickyHeader:!0,children:[A(f,{children:E(m,{children:[A(r,{children:this.renderSortLabel(`id`,`sql_col_id`)}),A(r,{children:j.t(`sql_col_type`)}),A(r,{children:this.renderSortLabel(`status`,`sql_col_status`)}),A(r,{align:`right`,children:this.renderSortLabel(`count`,`sql_col_count`)}),A(r,{align:`right`,children:this.renderSortLabel(`estimatedBytes`,`sql_col_size`)}),A(r,{children:j.t(`sql_col_first`)}),A(r,{children:this.renderSortLabel(`lastTs`,`sql_col_last`)})]})}),E(O,{children:[e.map(e=>E(m,{hover:!0,children:[A(r,{sx:{wordBreak:`break-all`},children:e.id}),A(r,{children:e.type||`—`}),A(r,{children:A(b,{size:`small`,color:L[e.status],label:j.t(R[e.status])})}),A(r,{align:`right`,children:e.count.toLocaleString()}),A(r,{align:`right`,children:F(e.estimatedBytes)}),A(r,{children:I(e.firstTs)}),A(r,{children:I(e.lastTs)})]},e.index)),!e.length&&!this.state.loading&&A(m,{children:A(r,{colSpan:7,children:A(S,{variant:`body2`,sx:{opacity:.7},children:j.t(this.state.filter?`sql_no_data`:`sql_no_datapoints`)})})})]})]})}),A(S,{variant:`caption`,sx:{display:`block`,mt:1,opacity:.7},children:j.t(`sql_size_is_estimate`)}),this.renderConfirmDialog()]})}}};export{z as default};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{An as e,E as t,Gn as n,H as r,Hn as i,In as a,Jn as o,Jt as s,Kt as c,Ln as l,Lt as u,Mn as d,Or as f,Pn as p,Pt as m,St as h,U as g,W as _,Xt as v,Y as y,Z as b,Zt as x,_n as S,bn as C,dn as w,ei as T,en as E,gn as D,in as O,jt as k,kn as A,ln as j,ni as M,nt as N,on as P,qt as F,rn as I,ti as L,v as R,vn as z,vt as B,zn as V}from"./_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DGB4BINK.js";import{t as H}from"./_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__loadShare__shared-CP0GHP0n.js";var U=5e3,W=U*.75,G={root:{display:`flex`,width:`100%`,height:`calc(100vh - 220px)`,minHeight:400,gap:8},list:{width:320,minWidth:220,display:`flex`,flexDirection:`column`,overflow:`hidden`},filterField:{padding:8,flexShrink:0},listItems:{overflowY:`auto`,flexGrow:1,minHeight:0},data:{flexGrow:1,display:`flex`,flexDirection:`column`,overflow:`hidden`},toolbar:{display:`flex`,alignItems:`center`,flexWrap:`nowrap`,gap:8,padding:8,overflow:`hidden`,flexShrink:0},title:{display:`flex`,flexDirection:`column`,flexGrow:1,minWidth:60,overflow:`hidden`},titleId:{fontWeight:`bold`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},titleName:{fontSize:`smaller`,opacity:.7,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},dateField:{width:200,flexShrink:0},table:{overflowY:`auto`,flexGrow:1,minHeight:0},nowrap:{whiteSpace:`nowrap`},pageInfo:{whiteSpace:`nowrap`,flexShrink:0},grow:{flexGrow:1}},K=e=>({"& input::-webkit-calendar-picker-indicator":{filter:e.palette.mode===`dark`?`invert(1)`:`none`,cursor:`pointer`}});function q(e){let t=new Date(e);if(isNaN(t.getTime()))return String(e);let n=(e,t)=>e.toString().padStart(t||2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}.${n(t.getMilliseconds(),3)}`}function J(e){let t=e=>e.toString().padStart(2,`0`);return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}`}function Y(e){let t=e=>e.toString().padStart(2,`0`);return`${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`}function X(e){if(!e)return;let t=new Date(e).getTime();return isNaN(t)?void 0:t}function Z(){let e=R.getLanguage();return e===`en`||e===`zh-cn`?{separator:`,`,decimal:`.`}:{separator:`;`,decimal:`,`}}function Q(e,t){return e.includes(t)||e.includes(`"`)||e.includes(`
|
|
2
|
+
`)||e.includes(`\r`)?`"${e.replace(/"/g,`""`)}"`:e}var $=[`ts`,`time`,`val`,`ack`,`q`,`from`],ee=``;function te(e,t){return{ts:e.ts,val:t===`Boolean`&&typeof e.val==`number`?!!e.val:e.val,ack:e.ack===void 0||e.ack===null?e.ack:!!e.ack,q:e.q,from:e.from}}function ne(e,t,n){let r=``;return e.val!==null&&e.val!==void 0&&(r=typeof e.val==`number`&&n===`,`?e.val.toString().replace(`.`,`,`):e.val.toString()),[e.ts.toString(),q(e.ts),r,e.ack===void 0||e.ack===null?``:(!!e.ack).toString(),e.q===void 0||e.q===null?``:e.q.toString(),e.from||``].map(e=>Q(e,t)).join(t)}function re(e,t,n,r){let i=[e.replace(/[^\w.-]+/g,`_`)];return t!==void 0&&i.push(J(new Date(t))),n!==void 0&&i.push(J(new Date(n))),`${i.join(`_`)}.${r}`}function ie(e,t,n){let r=URL.createObjectURL(new Blob(e,{type:n})),i=document.createElement(`a`);i.href=r,i.download=t,document.body.appendChild(i),i.click(),i.remove(),setTimeout(()=>URL.revokeObjectURL(r),6e4)}var ae=class extends H{constructor(e){super(e),f(this,`exportCancelled`,!1),this.state={...this.state,points:null,names:{},filter:``,selected:null,rows:[],total:0,page:0,rowsPerPage:100,sort:`desc`,start:``,end:``,checked:[],loadingPoints:!1,loadingRows:!1,errorText:``,entryDialog:null,exportDialog:null,confirmText:``,confirmAction:null}}componentWillUnmount(){this.exportCancelled=!0,super.componentWillUnmount()}async componentDidMount(){await super.componentDidMount(),this.props.alive&&await this.loadDatapoints()}async componentDidUpdate(e){this.props.alive&&!e.alive&&!this.state.points&&await this.loadDatapoints()}get instance(){return`${this.props.oContext.adapterName}.${this.props.oContext.instance}`}async sendToInstance(e,t){let n=await this.props.oContext.socket.sendTo(this.instance,e,t);if(n!=null&&n.error)throw Error(n.error);return n}async loadDatapoints(){this.setState({loadingPoints:!0,errorText:``});try{let e=await this.sendToInstance(`getDatapoints`,{}),t=(e==null?void 0:e.result)||[];this.setState({points:t,loadingPoints:!1},()=>void this.loadNames(t))}catch(e){this.setState({loadingPoints:!1,points:[],errorText:e.message})}}async loadNames(e){if(e.length)try{let n=await this.props.oContext.socket.getObjectsById(e.map(e=>e.id)),r={};for(let i of e){let e=n==null?void 0:n[i.id],a=e?t.getObjectNameFromObj(e,null,{language:R.getLanguage()}):``;a&&a!==i.id&&(r[i.id]=a)}this.setState({names:r})}catch(e){console.warn(`Cannot read the names of the objects: ${e.message}`)}}async loadRows(e){let t=this.state.selected;if(t){this.setState(t=>({loadingRows:!0,errorText:e?t.errorText:``}));try{let e=await this.sendToInstance(`getRawEntries`,{id:t.id,start:X(this.state.start),end:X(this.state.end),limit:this.state.rowsPerPage,offset:this.state.page*this.state.rowsPerPage,sort:this.state.sort});this.setState({rows:(e==null?void 0:e.result)||[],total:(e==null?void 0:e.total)||0,checked:[],loadingRows:!1})}catch(e){this.setState({rows:[],total:0,loadingRows:!1,errorText:e.message})}}}selectDatapoint(e){this.setState({selected:e,page:0,rows:[],total:0,checked:[]},()=>void this.loadRows())}parseValue(e){var t,n;if(e===``)return null;if(((t=this.state.selected)==null?void 0:t.type)===`Number`){let t=parseFloat(e.replace(`,`,`.`));return isNaN(t)?0:t}return((n=this.state.selected)==null?void 0:n.type)===`Boolean`?e===`true`||e===`1`:e}async saveEntry(){let e=this.state.entryDialog,t=this.state.selected;if(!e||!t)return;let n=parseInt(e.ts,10);if(!n){this.setState({errorText:`Invalid timestamp`});return}let r={ts:n,val:this.parseValue(e.val),ack:e.ack,q:parseInt(e.q,10)||0};this.setState({entryDialog:null,loadingRows:!0});try{e.original?await this.sendToInstance(`update`,{id:t.id,state:r}):await this.sendToInstance(`storeState`,{id:t.id,state:r})}catch(e){this.setState({errorText:e.message})}await this.loadRows(!0)}async deleteEntries(e){let t=this.state.selected;if(t&&e.length){this.setState({loadingRows:!0});try{e.length===1?await this.sendToInstance(`delete`,{id:t.id,ts:e[0]}):await this.sendToInstance(`delete`,e.map(e=>({id:t.id,ts:e})))}catch(e){this.setState({errorText:e.message})}await this.loadRows(!0)}}async readExportPage(e,t,n,r){let i=await this.sendToInstance(`getRawEntries`,{id:e,start:t,end:n,sort:`asc`,limit:U,offset:r,noTotal:!0}),a=(i==null?void 0:i.result)||[];return{entries:a,full:!!a.length&&a.length>=((i==null?void 0:i.limit)||U)}}async exportWindowByOffset(e,t,n,r){let i=0;for(;!this.exportCancelled;){let{entries:a,full:o}=await this.readExportPage(e,t,n,i);if(r(a),i+=a.length,!o)return}}async exportEntries(){let e=this.state.selected,t=this.state.exportDialog;if(!e||!t)return;let n=X(this.state.start),r=X(this.state.end),{format:i,separator:a,decimal:o}=t;this.exportCancelled=!1;let s={...t,running:!0,exported:0,total:0,info:``,error:``};this.setState({exportDialog:s});let c=i===`csv`?[`${ee}${$.join(a)}\r\n`]:[`[`],l=0,u=t=>{if(this.exportCancelled||!t.length)return;let n=t.map(t=>te(t,e.type));i===`csv`?c.push(`${n.map(e=>ne(e,a,o)).join(`\r
|
|
3
|
+
`)}\r\n`):c.push(`${l?`,`:``}\n${n.map(e=>JSON.stringify(e)).join(`,
|
|
4
|
+
`)}`),l+=n.length,s={...s,exported:l},this.setState({exportDialog:s})};try{var d;let t=await this.sendToInstance(`getRawEntries`,{id:e.id,start:n,end:r,sort:`asc`,limit:1,offset:0}),a=t==null||(d=t.result)==null?void 0:d[0];if(this.exportCancelled)return;if(!a){this.setState({exportDialog:{...s,running:!1,info:R.t(`sql_export_nothing`)}});return}let o=t.total||0;s={...s,total:o},this.setState({exportDialog:s});let f=r??Date.now(),p=a.ts,m=Math.max(1,Math.round((f-a.ts+1)*W/Math.max(o,1)));for(;p<=f&&!this.exportCancelled;){let t=Math.min(f,p+m-1),{entries:n,full:r}=await this.readExportPage(e.id,p,t,0);if(!r){u(n),p=t+1;let e=n.length?W/n.length:8;m=Math.max(1,Math.round(m*Math.min(8,Math.max(.125,e))));continue}let i=n[n.length-1].ts;n[0].ts===i?(await this.exportWindowByOffset(e.id,i,i,u),p=i+1):(u(n.filter(e=>e.ts<i)),m=Math.max(1,Math.round((i-p)*W/n.length)),p=i)}if(r===void 0&&!this.exportCancelled&&await this.exportWindowByOffset(e.id,p,void 0,u),this.exportCancelled)return;i===`json`&&c.push(l?`
|
|
5
|
+
]
|
|
6
|
+
`:`]
|
|
7
|
+
`),ie(c,re(e.id,n,r,i),i===`csv`?`text/csv;charset=utf-8`:`application/json`),this.setState({exportDialog:null})}catch(e){this.exportCancelled||this.setState({exportDialog:{...s,running:!1,error:e.message}})}}renderDatapoints(){let t=this.state.filter.toLowerCase(),r=(this.state.points||[]).filter(e=>{var n;return!t||e.id.toLowerCase().includes(t)||((n=this.state.names[e.id])==null?void 0:n.toLowerCase().includes(t))});return M(n,{style:G.list,children:[L(E,{variant:`standard`,style:G.filterField,value:this.state.filter,onChange:e=>this.setState({filter:e.target.value}),placeholder:R.t(`sql_filter`),slotProps:{input:{startAdornment:L(d,{position:`start`,children:L(m,{})}),endAdornment:this.state.filter?L(d,{position:`end`,children:L(e,{size:`small`,onClick:()=>this.setState({filter:``}),children:L(_,{})})}):null}}}),this.state.loadingPoints?L(p,{}):null,M(a,{dense:!0,style:G.listItems,children:[r.map(e=>{var t;return L(l,{selected:((t=this.state.selected)==null?void 0:t.id)===e.id,onClick:()=>this.selectDatapoint(e),sx:e=>({"&.Mui-selected":{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText,"& .MuiListItemText-secondary":{color:e.palette.primary.contrastText,opacity:.8},"&:hover":{backgroundColor:e.palette.primary.dark}}}),children:L(V,{primary:e.id,secondary:M(T,{children:[this.state.names[e.id]?L(`b`,{children:this.state.names[e.id]}):null,this.state.names[e.id]?` `:``,`[${e.type||`?`}]`]}),slotProps:{primary:{style:{wordBreak:`break-all`}},secondary:{style:{wordBreak:`break-word`}}}})},e.id)}),!r.length&&!this.state.loadingPoints?L(O,{style:{padding:16,opacity:.7},children:R.t(this.state.filter?`sql_no_data`:`sql_no_datapoints`)}):null]})]})}renderToolbar(){var t,n;let{page:a,rowsPerPage:s,total:c}=this.state,l=c?a*s+1:0,d=Math.min((a+1)*s,c);return M(`div`,{style:G.toolbar,children:[M(`div`,{style:G.title,children:[L(I,{title:((t=this.state.selected)==null?void 0:t.id)||``,children:L(`span`,{style:G.titleId,children:(n=this.state.selected)==null?void 0:n.id})}),this.state.selected&&this.state.names[this.state.selected.id]?L(`span`,{style:G.titleName,children:this.state.names[this.state.selected.id]}):null]}),L(I,{title:R.t(`sql_range_start`),children:L(E,{variant:`outlined`,size:`small`,style:G.dateField,sx:K,type:`datetime-local`,value:this.state.start,onChange:e=>this.setState({start:e.target.value,page:0},()=>void this.loadRows())})}),L(I,{title:R.t(`sql_range_end`),children:L(E,{variant:`outlined`,size:`small`,style:G.dateField,sx:K,type:`datetime-local`,value:this.state.end,onChange:e=>this.setState({end:e.target.value,page:0},()=>void this.loadRows())})}),L(o,{variant:`outlined`,size:`small`,value:s,onChange:e=>this.setState({rowsPerPage:Number(e.target.value),page:0},()=>void this.loadRows()),children:[50,100,500,1e3].map(e=>L(i,{value:e,children:e},e))}),L(I,{title:R.t(this.state.sort===`desc`?`sql_sort_desc`:`sql_sort_asc`),children:L(e,{size:`small`,onClick:()=>this.setState({sort:this.state.sort===`desc`?`asc`:`desc`,page:0},()=>void this.loadRows()),children:this.state.sort===`desc`?L(B,{}):L(h,{})})}),L(O,{style:G.pageInfo,children:R.t(`sql_page`,l.toString(),d.toString(),c.toString())}),L(e,{size:`small`,disabled:!a,onClick:()=>this.setState({page:a-1},()=>void this.loadRows()),children:L(r,{})}),L(e,{size:`small`,disabled:d>=c,onClick:()=>this.setState({page:a+1},()=>void this.loadRows()),children:L(g,{})}),L(I,{title:R.t(`sql_refresh`),children:L(e,{size:`small`,onClick:()=>void this.loadRows(),children:L(k,{})})}),L(I,{title:R.t(`sql_export`),children:L(`span`,{children:L(e,{size:`small`,disabled:!c,onClick:()=>this.setState({exportDialog:{format:`csv`,...Z(),running:!1,exported:0,total:0,info:``,error:``}}),children:L(N,{})})})}),L(I,{title:R.t(`sql_add`),children:L(e,{size:`small`,color:`primary`,onClick:()=>this.setState({entryDialog:{original:null,ts:Date.now().toString(),val:``,ack:!0,q:`0`}}),children:L(u,{})})}),L(I,{title:R.t(`sql_delete_selected`),children:L(`span`,{children:L(e,{size:`small`,disabled:!this.state.checked.length,onClick:()=>this.setState({confirmText:R.t(`sql_confirm_delete`,this.state.checked.length.toString()),confirmAction:()=>void this.deleteEntries(this.state.checked)}),children:L(y,{})})})})]})}renderTable(){return M(`div`,{style:G.table,children:[M(c,{size:`small`,stickyHeader:!0,children:[L(v,{children:M(x,{children:[L(s,{padding:`checkbox`,children:L(w,{indeterminate:!!this.state.checked.length&&this.state.checked.length<this.state.rows.length,checked:!!this.state.rows.length&&this.state.checked.length===this.state.rows.length,onChange:e=>this.setState({checked:e.target.checked?this.state.rows.map(e=>e.ts):[]})})}),L(s,{children:R.t(`sql_time`)}),L(s,{children:R.t(`sql_value`)}),L(s,{children:R.t(`sql_ack`)}),L(s,{children:R.t(`sql_quality`)}),L(s,{children:R.t(`sql_from`)}),L(s,{})]})}),L(F,{children:this.state.rows.map(t=>M(x,{hover:!0,children:[L(s,{padding:`checkbox`,children:L(w,{checked:this.state.checked.includes(t.ts),onChange:e=>this.setState({checked:e.target.checked?[...this.state.checked,t.ts]:this.state.checked.filter(e=>e!==t.ts)})})}),L(s,{style:G.nowrap,children:L(I,{title:t.ts.toString(),children:L(`span`,{children:q(t.ts)})})}),L(s,{style:{wordBreak:`break-all`},children:t.val===null||t.val===void 0?L(`span`,{style:{opacity:.5},children:`null`}):t.val.toString()}),L(s,{children:t.ack?`✓`:``}),L(s,{children:t.q??``}),L(s,{style:{opacity:.7},children:t.from||``}),M(s,{padding:`none`,children:[L(e,{size:`small`,onClick:()=>this.setState({entryDialog:{original:t,ts:t.ts.toString(),val:t.val===null||t.val===void 0?``:t.val.toString(),ack:!!t.ack,q:(t.q??0).toString()}}),children:L(b,{fontSize:`small`})}),L(e,{size:`small`,onClick:()=>this.setState({confirmText:R.t(`sql_confirm_delete_one`,q(t.ts)),confirmAction:()=>void this.deleteEntries([t.ts])}),children:L(y,{fontSize:`small`})})]})]},t.ts))})]}),!this.state.rows.length&&!this.state.loadingRows?L(O,{style:{padding:16,opacity:.7},children:R.t(`sql_no_data`)}):null]})}renderTimeSelector(e){let t=parseInt(e.ts,10),n=!isNaN(t),r=!!e.original,i=(r,i)=>{let a=new Date(n?t:Date.now()),o=J(a),s=Y(a),c=a.getMilliseconds();if(r===`date`){if(!i)return;o=i}else if(r===`time`){if(!i)return;s=i.length===5?`${i}:00`:i}else c=Math.min(999,Math.max(0,parseInt(i,10)||0));let l=new Date(`${o}T${s}.${c.toString().padStart(3,`0`)}`).getTime();isNaN(l)||this.setState({entryDialog:{...e,ts:l.toString()}})};return M(`div`,{children:[M(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[L(E,{label:R.t(`sql_date`),type:`date`,value:n?J(new Date(t)):``,disabled:r,style:{flexGrow:1},sx:K,slotProps:{inputLabel:{shrink:!0}},onChange:e=>i(`date`,e.target.value)}),L(E,{label:R.t(`sql_time`),type:`time`,value:n?Y(new Date(t)):``,disabled:r,style:{flexGrow:1},sx:K,slotProps:{inputLabel:{shrink:!0},htmlInput:{step:1}},onChange:e=>i(`time`,e.target.value)}),L(E,{label:R.t(`sql_ms`),type:`number`,value:n?new Date(t).getMilliseconds():``,disabled:r,style:{width:100},slotProps:{inputLabel:{shrink:!0},htmlInput:{min:0,max:999}},onChange:e=>i(`ms`,e.target.value)})]}),L(O,{variant:`caption`,style:{opacity:.7},children:n?`${q(t)} · ${t}`:``})]})}renderEntryDialog(){var e;let t=this.state.entryDialog;return t?M(D,{open:!0,maxWidth:`sm`,fullWidth:!0,onClose:()=>this.setState({entryDialog:null}),children:[L(C,{children:R.t(t.original?`sql_save`:`sql_add`)}),M(z,{style:{display:`flex`,flexDirection:`column`,gap:16,paddingTop:8},children:[this.renderTimeSelector(t),((e=this.state.selected)==null?void 0:e.type)===`Boolean`?M(o,{value:t.val===`true`||t.val===`1`?`true`:`false`,onChange:e=>this.setState({entryDialog:{...t,val:e.target.value}}),children:[L(i,{value:`true`,children:`true`}),L(i,{value:`false`,children:`false`})]}):L(E,{label:R.t(`sql_value`),value:t.val,autoFocus:!0,onChange:e=>this.setState({entryDialog:{...t,val:e.target.value}})}),M(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[L(w,{checked:t.ack,onChange:e=>this.setState({entryDialog:{...t,ack:e.target.checked}})}),L(O,{children:R.t(`sql_ack`)}),L(E,{label:R.t(`sql_quality`),value:t.q,type:`number`,onChange:e=>this.setState({entryDialog:{...t,q:e.target.value}})})]})]}),M(S,{children:[L(j,{variant:`contained`,color:`primary`,onClick:()=>void this.saveEntry(),children:R.t(`sql_save`)}),L(j,{variant:`outlined`,onClick:()=>this.setState({entryDialog:null}),children:R.t(`sql_cancel`)})]})]}):null}renderExportDialog(){var e;let t=this.state.exportDialog;if(!t)return null;let n=X(this.state.start),r=X(this.state.end),a=n===void 0&&r===void 0?R.t(`sql_range_all`):`${n===void 0?`…`:q(n)} – ${r===void 0?`…`:q(r)}`,o=t.total?Math.min(100,t.exported/t.total*100):0,s=()=>{this.exportCancelled=!0,this.setState({exportDialog:null})};return M(D,{open:!0,maxWidth:`sm`,fullWidth:!0,onClose:()=>!t.running&&s(),children:[L(C,{children:R.t(`sql_export`)}),M(z,{style:{display:`flex`,flexDirection:`column`,gap:16,paddingTop:8},children:[M(`div`,{children:[L(O,{style:{fontWeight:`bold`,wordBreak:`break-all`},children:(e=this.state.selected)==null?void 0:e.id}),L(O,{variant:`body2`,children:`${R.t(`sql_export_range`)}: ${a}`})]}),M(E,{select:!0,label:R.t(`sql_export_format`),value:t.format,disabled:t.running,onChange:e=>this.setState({exportDialog:{...t,format:e.target.value}}),children:[L(i,{value:`csv`,children:`CSV`}),L(i,{value:`json`,children:`JSON`})]}),t.format===`csv`?M(`div`,{style:{display:`flex`,gap:16},children:[M(E,{select:!0,label:R.t(`sql_export_separator`),value:t.separator,disabled:t.running,style:{flexGrow:1},onChange:e=>this.setState({exportDialog:{...t,separator:e.target.value}}),children:[L(i,{value:`;`,children:R.t(`sql_export_semicolon`)}),L(i,{value:`,`,children:R.t(`sql_export_comma`)}),L(i,{value:` `,children:R.t(`sql_export_tab`)})]}),M(E,{select:!0,label:R.t(`sql_export_decimal`),value:t.decimal,disabled:t.running,style:{flexGrow:1},onChange:e=>this.setState({exportDialog:{...t,decimal:e.target.value}}),children:[L(i,{value:`.`,children:R.t(`sql_export_point`)}),L(i,{value:`,`,children:R.t(`sql_export_comma`)})]})]}):null,L(O,{variant:`body2`,style:{opacity:.7},children:R.t(t.format===`csv`?`sql_export_csv_info`:`sql_export_json_info`)}),t.running?M(`div`,{children:[L(p,{variant:t.total?`determinate`:`indeterminate`,value:o}),L(O,{variant:`caption`,children:R.t(`sql_export_progress`,t.exported.toString(),t.total.toString())})]}):null,t.info?L(A,{severity:`info`,children:t.info}):null,t.error?L(A,{severity:`error`,children:t.error}):null]}),M(S,{children:[L(j,{variant:`contained`,color:`primary`,startIcon:L(N,{}),disabled:t.running,onClick:()=>void this.exportEntries(),children:R.t(`sql_export_start`)}),L(j,{variant:`outlined`,onClick:s,children:R.t(`sql_cancel`)})]})]})}renderConfirmDialog(){return this.state.confirmAction?M(D,{open:!0,onClose:()=>this.setState({confirmText:``,confirmAction:null}),children:[L(C,{children:R.t(`sql_delete`)}),L(z,{children:this.state.confirmText}),M(S,{children:[L(j,{variant:`contained`,color:`error`,startIcon:L(y,{}),onClick:()=>{let e=this.state.confirmAction;this.setState({confirmText:``,confirmAction:null},()=>e==null?void 0:e())},children:R.t(`sql_delete`)}),L(j,{variant:`outlined`,onClick:()=>this.setState({confirmText:``,confirmAction:null}),children:R.t(`sql_cancel`)})]})]}):null}renderItem(){return this.props.alive?M(P,{style:G.root,children:[this.renderDatapoints(),M(n,{style:G.data,children:[this.state.errorText?L(A,{severity:`error`,style:{flexShrink:0},onClose:()=>this.setState({errorText:``}),children:this.state.errorText}):null,this.state.selected?M(T,{children:[this.renderToolbar(),this.state.loadingRows?L(p,{}):null,this.renderTable()]}):L(O,{style:{padding:16,opacity:.7},children:R.t(`sql_select_datapoint`)})]}),this.renderEntryDialog(),this.renderExportDialog(),this.renderConfirmDialog()]}):L(A,{severity:`info`,children:R.t(`sql_instance_not_alive`)})}};export{ae as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./vite-preload-helper-
|
|
1
|
+
import"./dist-DKNMF4jN.js";import{t as e}from"./vite-preload-helper-D97eqSzU.js";var t=e=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t},n=(e,t,n,r)=>{var i,a;let o=(i=globalThis.__mf_module_cache__)==null?void 0:i.share,s=t.map(e=>o==null?void 0:o[e]).find(e=>e!==void 0),c=e=>{let t=String(e||``).split(/[^0-9]+/).map(Number),r=String(n||``).split(/[^0-9]+/).map(Number);for(let e=0;e<Math.max(t.length,r.length);e++){if((t[e]||0)<(r[e]||0))return!0;if((t[e]||0)>(r[e]||0))return!1}return!1};if(!c((s==null?void 0:s.version)??(s==null||(a=s.default)==null?void 0:a.version)))for(let t of e){var l,u;let e=o==null?void 0:o[t];if(e===void 0)continue;let n=(e==null?void 0:e.version)??(e==null||(l=e.default)==null?void 0:l.version);if(!(n!==void 0&&c(n))&&(!r||typeof(e==null?void 0:e[r])==`function`||typeof(e==null||(u=e.default)==null?void 0:u[r])==`function`)){let n=typeof(e==null?void 0:e[r])==`function`?e:e==null?void 0:e.default,i=n==null?void 0:n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;if(!r||t.endsWith(`/client`)||!i)return e;let a={};for(let e of[`createRoot`,`hydrateRoot`])a[e]=(...t)=>{i.usingClientEntryPoint=!0;try{return n[e](...t)}finally{i.usingClientEntryPoint=!1}};return{...a,default:a}}}},r={react:async()=>await e(()=>import(`./_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DGB4BINK.js`).then(e=>e.Oi),[],import.meta.url),"react/jsx-runtime":async()=>await e(()=>import(`./_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__prebuild__react_mf_1_jsx_mf_2_runtime__prebuild__--SURtz9t.js`),[],import.meta.url),"react-dom":async()=>await e(()=>import(`./_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DGB4BINK.js`).then(e=>e.xr),[],import.meta.url),"react-dom/client":async()=>await e(()=>import(`./_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__prebuild__react_mf_2_dom_mf_1_client__prebuild__-1dRDhFNI.js`),[],import.meta.url),"@mui/material":async()=>await e(()=>import(`./_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DGB4BINK.js`).then(e=>e.Zn),[],import.meta.url),"@mui/icons-material":async()=>await e(()=>import(`./_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DGB4BINK.js`).then(e=>e.Ht),[],import.meta.url),"@iobroker/gui-components":async()=>await e(()=>import(`./_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DGB4BINK.js`).then(e=>e.M),[],import.meta.url),"@iobroker/json-config":async()=>await e(()=>import(`./_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__prebuild___mf_0_iobroker_mf_1_json_mf_2_config__prebuild__-BpKJQFYf.js`),[],import.meta.url)},i={react:{name:`react`,version:`19.3.1`,scope:[`default`],loaded:!1,materialize:!0,eager:!1,from:`SqlComponentsSet`,canLiveRebind:!0,get(){let e=i.react;return e.lib?e.lib:(e.loading||=(async()=>{try{let{react:n}=r,i=t({...await n()});return i.__esModule!==!0&&Object.defineProperty(i,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return i},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!1}},"react/jsx-runtime":{name:`react/jsx-runtime`,version:`19.3.1`,scope:[`default`],loaded:!1,materialize:!0,eager:!1,from:`SqlComponentsSet`,canLiveRebind:!0,get(){let e=i[`react/jsx-runtime`];if(e.lib)return e.lib;if(e.loading)return e.loading;let a=n([`default:react/jsx-runtime`,`react/jsx-runtime`],[`default:react`,`react`],`19.3.1`,void 0);return a===void 0?(e.loading=(async()=>{try{let{"react/jsx-runtime":n}=r,i=t({...await n()});return i.__esModule!==!0&&Object.defineProperty(i,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return i},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading):(e.lib=function(){return a},e.loaded=!0,e.lib)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!1}},"react-dom":{name:`react-dom`,version:`19.3.1`,scope:[`default`],loaded:!1,materialize:!0,eager:!1,from:`SqlComponentsSet`,canLiveRebind:!0,get(){let e=i[`react-dom`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"react-dom":n}=r,i=t({...await n()});return i.__esModule!==!0&&Object.defineProperty(i,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return i},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!1}},"react-dom/client":{name:`react-dom/client`,version:`19.3.1`,scope:[`default`],loaded:!1,materialize:!0,eager:!1,from:`SqlComponentsSet`,canLiveRebind:!0,get(){let e=i[`react-dom/client`];if(e.lib)return e.lib;if(e.loading)return e.loading;let a=n([`default:react-dom/client`,`react-dom/client`,`default:react-dom`,`react-dom`],[`default:react`,`react`],`19.3.1`,`createRoot`);return a===void 0?(e.loading=(async()=>{try{let{"react-dom/client":n}=r,i=t({...await n()});return i.__esModule!==!0&&Object.defineProperty(i,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return i},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading):(e.lib=function(){return a},e.loaded=!0,e.lib)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!1}},"@mui/material":{name:`@mui/material`,version:`9.5.0`,scope:[`default`],loaded:!1,materialize:!0,eager:!1,from:`SqlComponentsSet`,canLiveRebind:!0,get(){let e=i[`@mui/material`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"@mui/material":n}=r,i=t({...await n()});return i.__esModule!==!0&&Object.defineProperty(i,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return i},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!1}},"@mui/icons-material":{name:`@mui/icons-material`,version:`9.5.0`,scope:[`default`],loaded:!1,materialize:!0,eager:!1,from:`SqlComponentsSet`,canLiveRebind:!0,get(){let e=i[`@mui/icons-material`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"@mui/icons-material":n}=r,i=t({...await n()});return i.__esModule!==!0&&Object.defineProperty(i,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return i},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!1}},"@iobroker/gui-components":{name:`@iobroker/gui-components`,version:`10.4.6`,scope:[`default`],loaded:!1,materialize:!0,eager:!1,from:`SqlComponentsSet`,canLiveRebind:!0,get(){let e=i[`@iobroker/gui-components`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"@iobroker/gui-components":n}=r,i=t({...await n()});return i.__esModule!==!0&&Object.defineProperty(i,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return i},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!1}},"@iobroker/json-config":{name:`@iobroker/json-config`,version:`10.1.20`,scope:[`default`],loaded:!1,materialize:!0,eager:!1,from:`SqlComponentsSet`,canLiveRebind:!0,get(){let e=i[`@iobroker/json-config`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"@iobroker/json-config":n}=r,i=t({...await n()});return i.__esModule!==!0&&Object.defineProperty(i,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return i},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!1}}},a=[];export{a as usedRemotes,i as usedShared};
|