iobroker.javascript 10.2.5 → 10.4.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 +26 -23
- package/admin/assets/AiChatPanel-BjRIKaXG.js +27 -0
- package/admin/assets/{AiChatService-BOL3J2Jd.js → AiChatService-DP1EmVk2.js} +3 -3
- package/admin/assets/AiDiffView-DeynDw7L.js +1 -0
- package/admin/assets/{AiInlineProvider-BIlcrTkS.js → AiInlineProvider-jkEIJJJ-.js} +1 -1
- package/admin/assets/BlocklyEditor-DhwThchX.js +301 -0
- package/admin/assets/Compile-B0uHjrBE.css +1 -0
- package/admin/assets/Compile-e8N5zI-J.js +165 -0
- package/admin/assets/Debugger-BDQUKM1K.js +15 -0
- package/admin/assets/Diff--plofAtP.js +1 -0
- package/admin/assets/{Documentation-Bc0RmoEF.js → Documentation-D3E0U4AK.js} +4 -4
- package/admin/assets/ExpandMore-Dio4GeHC.js +1 -0
- package/admin/assets/FbEditor-B8S-mCvc.css +1 -0
- package/admin/assets/FbEditor-BjLPNzpK.js +15 -0
- package/admin/assets/History-Ewi5YEEn.js +1 -0
- package/admin/assets/Import-6Mm2vrM2.js +1 -0
- package/admin/assets/MonacoDiff-BYvG7IqB.js +1 -0
- package/admin/assets/NotificationsActive-CuNfWVJM.js +1 -0
- package/admin/assets/RulesEditor--YX6ETsU.js +1 -0
- package/admin/assets/{ScriptEditor-CEHpEFp7.js → ScriptEditor-BadPC8Mf.js} +2 -2
- package/admin/assets/ScriptEditorVanillaMonaco-BnAmy59d.js +3 -0
- package/admin/assets/Send-Pz1eveU5.js +1 -0
- package/admin/assets/_virtual_mf-localSharedImportMap___mfe_internal__iobroker_javascript__mf_owner__1-Ceh8EDcF.js +1 -0
- package/admin/assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__234968779812303__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-BRdHvuuG.js +1217 -0
- package/admin/assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__234968779812303__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-DLWT3PGo.js +9 -0
- package/admin/assets/aiPromptBuilder-Co6AqZwx.js +1 -0
- package/admin/assets/{blockly-fcfyKYzp.js → blockly-B0t_IRJQ.js} +1 -1
- package/admin/assets/blocklyTheme-iZoge1S9.js +1 -0
- package/admin/assets/blocks_action-Ctn5A1AU.js +1 -0
- package/admin/assets/{blocks_convert-BP2RjhQH.js → blocks_convert-BI0lf0sf.js} +1 -1
- package/admin/assets/blocks_logic-o49klUX_.js +1 -0
- package/admin/assets/blocks_number-DZtyWFyR.js +1 -0
- package/admin/assets/blocks_object-BuzGCxVr.js +1 -0
- package/admin/assets/blocks_procedures-jn9sIYmR.js +3 -0
- package/admin/assets/blocks_sendto-Coui8w1H.js +5 -0
- package/admin/assets/blocks_switch-CeRZizTM.js +2 -0
- package/admin/assets/blocks_system-CaBPIC40.js +1 -0
- package/admin/assets/blocks_text-DeDtPYWf.js +1 -0
- package/admin/assets/blocks_time-CTXQH3Lm.js +1 -0
- package/admin/assets/blocks_timeout-D8IOKOb-.js +1 -0
- package/admin/assets/{blocks_trigger-CnmXLCUE.js → blocks_trigger-zuuXJbhb.js} +2 -2
- package/admin/assets/{cronHoverProvider-CcIFAhVy.js → cronHoverProvider-Curcjz4m.js} +1 -1
- package/admin/assets/dist-CzitsFi7.js +1 -0
- package/admin/assets/field_cron-RgLY53_S.js +1 -0
- package/admin/assets/field_oid-rBhotXJe.js +1 -0
- package/admin/assets/field_script-CU7g3-oB.js +1 -0
- package/admin/assets/helpers-BZgjFQNf.js +1 -0
- package/admin/assets/helpers-BwllSRzJ.js +1 -0
- package/admin/assets/hostInit-CrHjJGJJ.js +1 -0
- package/admin/assets/index-BHhhebRG.css +1 -0
- package/admin/assets/index-Bmmscq2G.js +157 -0
- package/admin/assets/{inlineChatWidget-N8xIkvxX.js → inlineChatWidget-ChchJD9a.js} +2 -2
- package/admin/assets/{inlineDiffController-BuqYsKKq.js → inlineDiffController-ly6qX4jk.js} +2 -2
- package/admin/assets/loadBlocks-BcFtthDb.js +117 -0
- package/admin/assets/loadMonaco-BVOEahNw.js +1 -0
- package/admin/assets/{mf-entry-bootstrap-0-a5a39621.js → mf-entry-bootstrap-0-6db6c4fc.js} +3 -3
- package/admin/assets/pendingShares-mBGPbRwZ.js +2 -0
- package/admin/assets/reactour.esm-Dk3aGxKn.js +137 -0
- package/admin/assets/{stateHoverProvider-BYAbe1Ay.js → stateHoverProvider-wAsP-THx.js} +1 -1
- package/admin/assets/tileFbd-CWAy7R7m.svg +85 -0
- package/admin/assets/utils-DUKzLJUz.js +4 -0
- package/admin/assets/vite-preload-helper-DjNwdemH.js +1 -0
- package/admin/custom/assets/Components-fDcxCyN4.js +1 -0
- package/admin/custom/assets/_virtual_mf-localSharedImportMap___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1-BraOrMSu.js +1 -0
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__loadShare___mf_0_emotion_mf_1_react__loadShare__.js-DbKT6Hsb.js +1 -0
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__loadShare___mf_0_emotion_mf_1_styled__loadShare__.js-CVvbIPAy.js +1 -0
- package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__37453319418803__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DVb0ZZ1Q.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-BhZYie9-.js} +89 -89
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__loadShare___mf_0_mui_mf_1_x_mf_2_date_mf_2_pickers__loadShare__.js-CV50dgj4.js +1 -0
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__loadShare__date_mf_2_fns__loadShare__.js-Djg9OMcQ.js +1 -0
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__loadShare__leaflet__loadShare__.js-D9EyCd42.js +1 -0
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__loadShare__shared-Hb6V6BnJ.js +2 -0
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__prebuild___mf_0_iobroker_mf_1_json_mf_2_config__prebuild__-BrY-nF2a.js +122 -0
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__prebuild__leaflet__prebuild__-CHjWtrkp.js +1 -0
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__prebuild__react_mf_2_dom_mf_1_client__prebuild__-DOkC-g0X.js +9 -0
- package/admin/custom/assets/dist-CzitsFi7.js +1 -0
- package/admin/custom/assets/helpers-BZgjFQNf.js +1 -0
- package/admin/custom/assets/hostInit-akwaQLq8.js +1 -0
- package/admin/custom/assets/index-BkItz-nL.js +1 -0
- package/admin/custom/assets/{lib-BmDlTzq2.js → lib-CADOx2YN.js} +1 -1
- package/admin/custom/assets/{mf-entry-bootstrap-0-ad1cd7d0.js → mf-entry-bootstrap-0-3c4565e0.js} +3 -3
- package/admin/custom/assets/pendingShares-TCMDgBLn.js +2 -0
- package/admin/custom/assets/utils-DUKzLJUz.js +4 -0
- package/admin/custom/assets/vite-preload-helper-DjNwdemH.js +1 -0
- package/admin/custom/customComponents.js +2 -2
- package/admin/custom/i18n/de.json +19 -1
- package/admin/custom/i18n/en.json +19 -1
- package/admin/custom/i18n/es.json +19 -1
- package/admin/custom/i18n/fr.json +19 -1
- package/admin/custom/i18n/it.json +19 -1
- package/admin/custom/i18n/nl.json +19 -1
- package/admin/custom/i18n/pl.json +19 -1
- package/admin/custom/i18n/pt.json +19 -1
- package/admin/custom/i18n/ru.json +19 -1
- package/admin/custom/i18n/uk.json +19 -1
- package/admin/custom/i18n/zh-cn.json +19 -1
- package/admin/i18n/de.json +13 -1
- package/admin/i18n/en.json +13 -1
- package/admin/i18n/es.json +13 -1
- package/admin/i18n/fr.json +13 -1
- package/admin/i18n/it.json +13 -1
- package/admin/i18n/nl.json +13 -1
- package/admin/i18n/pl.json +13 -1
- package/admin/i18n/pt.json +13 -1
- package/admin/i18n/ru.json +13 -1
- package/admin/i18n/uk.json +13 -1
- package/admin/i18n/zh-cn.json +13 -1
- package/admin/jsonConfig.json +274 -86
- package/admin/mf-manifest.json +1 -1
- package/admin/mf-stats.json +1 -1
- package/admin/remoteEntry.js +2 -2
- package/admin/tab.html +3 -7
- package/build/lib/aiProviderResolver.js +145 -25
- package/build/lib/aiProviderResolver.js.map +1 -1
- package/build/lib/anthropicAdapter.js +37 -0
- package/build/lib/anthropicAdapter.js.map +1 -1
- package/build/lib/fb/analyze.js +288 -0
- package/build/lib/fb/analyze.js.map +1 -0
- package/build/lib/fb/blocks.js +605 -0
- package/build/lib/fb/blocks.js.map +1 -0
- package/build/lib/fb/generate.js +326 -0
- package/build/lib/fb/generate.js.map +1 -0
- package/build/lib/fb/graph.js +240 -0
- package/build/lib/fb/graph.js.map +1 -0
- package/build/lib/fb/index.js +57 -0
- package/build/lib/fb/index.js.map +1 -0
- package/build/lib/fb/js.js +33 -0
- package/build/lib/fb/js.js.map +1 -0
- package/build/lib/fb/layout.js +205 -0
- package/build/lib/fb/layout.js.map +1 -0
- package/build/lib/fb/library.js +657 -0
- package/build/lib/fb/library.js.map +1 -0
- package/build/lib/fb/runtime.js +793 -0
- package/build/lib/fb/runtime.js.map +1 -0
- package/build/lib/fb/time.js +76 -0
- package/build/lib/fb/time.js.map +1 -0
- package/build/lib/fb/types.js +19 -0
- package/build/lib/fb/types.js.map +1 -0
- package/build/lib/fb/user.js +78 -0
- package/build/lib/fb/user.js.map +1 -0
- package/build/lib/inspect.js +66 -10
- package/build/lib/inspect.js.map +1 -1
- package/build/lib/javascript.d.ts +1 -1
- package/build/lib/mirror.js +28 -23
- package/build/lib/mirror.js.map +1 -1
- package/build/lib/sandbox.js +44 -0
- package/build/lib/sandbox.js.map +1 -1
- package/build/lib/scriptHistory.js +245 -0
- package/build/lib/scriptHistory.js.map +1 -0
- package/build/main.js +641 -32
- package/build/main.js.map +1 -1
- package/build/types.d.ts +20 -1
- package/docs/de/fbd.md +274 -0
- package/docs/en/fbd.md +260 -0
- package/io-package.json +55 -29
- package/package.json +7 -7
- package/admin/assets/AiChatPanel-oBeXbUFv.js +0 -27
- package/admin/assets/AiDiffView-C-KKjnJD.js +0 -1
- package/admin/assets/Debugger-DwHHsh9O.js +0 -15
- package/admin/assets/Error-DZ4vCykD.js +0 -1
- package/admin/assets/Import-Cu02ceLW.js +0 -1
- package/admin/assets/RulesEditor-QCbi1lV_.js +0 -1
- package/admin/assets/ScriptEditorVanillaMonaco-ChQmnk0p.js +0 -3
- package/admin/assets/_virtual_mf-localSharedImportMap___mfe_internal__iobroker_javascript__mf_owner__1-CM95r358.js +0 -1
- package/admin/assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__180366418666083__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-BEpNZh4U.js +0 -1217
- package/admin/assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__180366418666083__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-FeM77flT.js +0 -9
- package/admin/assets/aiPromptBuilder-DKler0UK.js +0 -1
- package/admin/assets/blocks_action-DywZVfRY.js +0 -1
- package/admin/assets/blocks_logic-CdTl5YZw.js +0 -1
- package/admin/assets/blocks_number-DXFd9Rva.js +0 -1
- package/admin/assets/blocks_object-by1uBDHi.js +0 -1
- package/admin/assets/blocks_procedures-BcJ7N70D.js +0 -3
- package/admin/assets/blocks_sendto-qIKzOAcV.js +0 -5
- package/admin/assets/blocks_switch-dLF6hSJl.js +0 -2
- package/admin/assets/blocks_system-DmX-SBy8.js +0 -1
- package/admin/assets/blocks_text-BI4zNU3o.js +0 -1
- package/admin/assets/blocks_time-BgYA4Y_4.js +0 -1
- package/admin/assets/blocks_timeout-DUzgMyAu.js +0 -1
- package/admin/assets/dist-D4uJqRBO.js +0 -4
- package/admin/assets/field_cron-Ba46q8Qc.js +0 -1
- package/admin/assets/field_oid-lWCjOzuq.js +0 -1
- package/admin/assets/field_script-BCWZHhnW.js +0 -1
- package/admin/assets/helpers-CnEjYAup.js +0 -1
- package/admin/assets/hostInit-CVybS7BB.js +0 -1
- package/admin/assets/index-B3s0zmWC.js +0 -871
- package/admin/assets/index-CXaeqPRy.css +0 -1
- package/admin/assets/pendingShares-DOAkyFMS.js +0 -1
- package/admin/assets/vite-preload-helper-CaC3yEL3.js +0 -1
- package/admin/custom/assets/Components-FkGDIlId.js +0 -1
- package/admin/custom/assets/_virtual_mf-localSharedImportMap___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1-Cs88NUCd.js +0 -1
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__37453319418803__loadShare___mf_0_emotion_mf_1_react__loadShare__.js-P-8ffWXw.js +0 -1
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__37453319418803__loadShare___mf_0_emotion_mf_1_styled__loadShare__.js-ZVuRAEo5.js +0 -1
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__37453319418803__loadShare___mf_0_iobroker_mf_1_json_mf_2_config__loadShare__.js-Dna3WF04.js +0 -1
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__37453319418803__loadShare___mf_0_mui_mf_1_x_mf_2_date_mf_2_pickers__loadShare__.js-DcjdCGAx.js +0 -1
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__37453319418803__loadShare__date_mf_2_fns__loadShare__.js-CnhNjamd.js +0 -1
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__37453319418803__loadShare__leaflet__loadShare__.js-Dz7BFJqH.js +0 -1
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__37453319418803__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-B0olko2J.js +0 -1
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__37453319418803__prebuild___mf_0_iobroker_mf_1_json_mf_2_config__prebuild__-CzN4reh_.js +0 -122
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__37453319418803__prebuild__leaflet__prebuild__-xPcBaiTQ.js +0 -1
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__37453319418803__prebuild__react_mf_2_dom_mf_1_client__prebuild__-DuFBE5fh.js +0 -9
- package/admin/custom/assets/dist-D4uJqRBO.js +0 -4
- package/admin/custom/assets/hostInit-6oh4UY2k.js +0 -1
- package/admin/custom/assets/index-BrlyEy6J.js +0 -1
- package/admin/custom/assets/pendingShares-kV2kwejX.js +0 -1
- package/admin/custom/assets/vite-preload-helper-CaC3yEL3.js +0 -1
- /package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__37453319418803__prebuild__react_mf_1_jsx_mf_2_runtime__prebuild__-CXpyx8Vy.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__prebuild__react_mf_1_jsx_mf_2_runtime__prebuild__-CXpyx8Vy.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@keyframes _fadeIn_1ji9r_1{0%{opacity:0}1%{opacity:0}to{opacity:1}}._nameCard_1ji9r_15{color:var(--colorBlock);margin-top:0;font-size:15px;font-weight:600;line-height:1.35}._nameCardSummary_1ji9r_24{text-overflow:ellipsis;white-space:nowrap;display:block;overflow:hidden}._headerRow_1ji9r_32{align-items:center;gap:6px;min-width:0;display:flex}._headerRowClickable_1ji9r_39{cursor:pointer}._headerText_1ji9r_43{flex:1;min-width:0}._summaryObjectIcon_1ji9r_48{object-fit:contain;flex:none;width:20px;height:20px}._kicker_1ji9r_56{letter-spacing:.06em;text-transform:uppercase;color:var(--colorBlockHover);white-space:nowrap;text-overflow:ellipsis;font-size:10px;line-height:1.4;overflow:hidden}._summarySub_1ji9r_68{color:var(--colorBlockHover);white-space:nowrap;text-overflow:ellipsis;font-size:11px;line-height:1.4;overflow:hidden}._chevron_1ji9r_77{text-align:center;width:12px;color:var(--colorBlockHover);flex:none;font-size:13px;line-height:1;transition:transform .2s}._chevronCollapsed_1ji9r_89{transform:rotate(-90deg)}._chevronPlaceholder_1ji9r_94{visibility:hidden}._iconThemCard_1ji9r_98{flex:none;margin-left:2px;transition:width .15s,height .15s;width:32px!important;height:32px!important}._iconThemCard_1ji9r_98 *{color:var(--colorBlock)!important}._iconThemCardCollapsed_1ji9r_109{width:22px!important;height:22px!important}._iconThemCardSelectable_1ji9r_114{cursor:pointer}._iconHelp_1ji9r_118{flex:none;color:var(--colorBlock)!important;padding:2px!important}._blockName_1ji9r_124{flex-direction:column;width:100%;min-width:0;margin-left:10px;display:flex;position:relative}._debugInfo_1ji9r_130{color:var(--debugColor);opacity:0;font-size:12px;font-style:italic;animation:.3s ease-out _fadeIn_1ji9r_1;display:flex;position:absolute}._tagCard_1ji9r_146{text-align:center;white-space:nowrap;text-overflow:ellipsis;max-width:45%;color:var(--lineColorActive);background:var(--backgroundColorHumburger);border:1px solid var(--lineColor);cursor:pointer;border-radius:999px;flex:none;padding:1px 9px;font-size:11px;line-height:16px;overflow:hidden}._displayFlex_1ji9r_163{align-items:center;display:flex}._blockMarginTop_1ji9r_168,._nameBlock_1ji9r_169{margin-top:7px}._frontText_1ji9r_173{min-width:80px;margin-right:7px;display:inline-table}._backText_1ji9r_179{margin-left:7px}._iconTag_1ji9r_183{color:var(--colorBlock);flex:none;align-items:center;min-width:30px;margin-left:4px;font-size:30px;display:flex}._displayItalic_1ji9r_193{margin-top:0;font-size:11px;font-style:italic}._root_1dr6a_1{color:var(--colorBlock)!important;border-color:var(--colorBlock)!important}._root_1dr6a_1:hover{border-color:var(--colorBlockHover)!important;color:var(--colorBlockHover)!important;background-color:inherit!important}._square_1dr6a_11{min-width:auto!important;padding:6px 16px!important}._icon_1dr6a_16{width:24px;height:24px}._root_1ucda_1 *{color:var(--colorBlock)!important}._root_19roy_1{background:var(--backgroundColorHumburger);border-radius:5px;margin-top:0!important;margin-bottom:0!important}._root_19roy_1 *{color:var(--colorInput)!important}._root_19roy_1 [class*=MuiInputLabel-shrink]{color:var(--colorBlock)!important}._root_19roy_1 [class*=MuiInput-underline] :after{border-bottom-color:var(--lineColor)!important}._root_19roy_1:hover [class*=MuiOutlinedInput-notchedOutline],._root_19roy_1 [class*=MuiOutlinedInput-notchedOutline],._root_19roy_1 [class*=MuiOutlinedInput-notchedOutline]:hover,._root_19roy_1 [class*=MuiOutlinedInput-notchedOutline] [class*=Mui-focused],._root_19roy_1 [class*=MuiOutlinedInput-notchedOutline] [class*=Mui-disabled]{border-color:var(--lineColor)!important}._modalContentWrapper_587ci_1{min-width:320px;margin:20px 0;padding:0 35px;overflow-x:hidden}._modalButtonBlock_587ci_8{border-top:1px solid var(--lineColorActive);border-color:var(--lineColorActive);background:var(--backgroundColorHumburger);border-radius:3px;flex-flow:wrap;justify-content:flex-end;margin-top:20px;display:flex}._modalButtonBlock_587ci_8 button{flex:1;color:var(--lineColorActive)!important}._modalButtonBlockTwo_587ci_23{flex-flow:wrap-reverse;justify-content:space-around;position:sticky;bottom:0}._modalButtonBlockTwo_587ci_23 button{margin:5px}._modalWrapper_587ci_33 [class*="MuiPaper-root MuiDialog-paper MuiPaper-elevation24 MuiDialog-paperScrollPaper MuiDialog-paperWidthXl MuiPaper-elevation24 MuiPaper-rounded"]{background-color:#f6f6f6}._modalDialog_587ci_40{min-width:400px}._close_587ci_44{opacity:.9;cursor:pointer;width:32px;height:32px;transition:all .6s;position:absolute;top:-16px;right:-14px}._close_587ci_44:hover{transform:rotate(90deg)}._close_587ci_44:before{content:"";background-color:#ff4f4f;width:4px;height:33px;position:absolute;left:15px;transform:rotate(45deg)}._close_587ci_44:after{content:"";background-color:#ff4f4f;width:4px;height:33px;position:absolute;left:15px;transform:rotate(-45deg)}@media screen and (max-width:460px){._modalContentWrapper_587ci_1{min-width:auto}}._root_15mo1_1{max-width:440px;margin-top:0!important;margin-bottom:0!important}._root_15mo1_1 *,._root_15mo1_1 [class*=MuiInputLabel-shrink]{color:var(--colorBlock)!important}._root_15mo1_1 [class*=MuiInput-underline]:after,._root_15mo1_1 [class*=MuiInput-underline]:before,._root_15mo1_1 [class*=MuiInput-underline]:hover:before{border-bottom-color:var(--lineColor)!important}._root_167v0_1{color:var(--lineColorActive)!important;height:8px!important}._root_167v0_1 [class*=MuiSlider-rail],._root_167v0_1 [class*=MuiSlider-track]{border-radius:4px;height:8px!important}._root_167v0_1 [class*=MuiSlider-thumb]{background-color:currentColor;width:20px;height:20px}._root_167v0_1 [class*=MuiSlider-thumb]:focus,._root_167v0_1 [class*=MuiSlider-thumb]:hover,._root_167v0_1 [class*=MuiSlider-thumb][class*=Mui-active]{box-shadow:inherit!important}._root_167v0_1 [class*=MuiSlider-markLabel]{color:var(--colorBlock)}._root_167v0_1 ._mark_167v0_24{background-color:#0000!important}._root_rzul6_1 *{color:var(--colorBlock)!important}._root_rzul6_1 [class*=Mui-checked]{color:var(--lineColor)!important}._root_rzul6_1 [class*=Mui-checked]+[class*=MuiSwitch-track]{background-color:var(--lineColor)!important}._root_135pm_1 *,._root_135pm_1 [class*=MuiInputLabel-shrink]{color:var(--colorBlock)!important}._root_135pm_1 [class*=MuiInput-underline]:after,._root_135pm_1 [class*=MuiInput-underline]:before,._root_135pm_1 [class*=MuiInput-underline]:hover:before{border-bottom-color:var(--lineColor)!important}._root_135pm_1{margin-top:0!important;margin-bottom:0!important}._root_135pm_1 *,._root_135pm_1 [class*=MuiInputLabel-shrink]{color:var(--colorBlock)!important}._root_135pm_1 [class*=MuiInput-underline]:after,._root_135pm_1 [class*=MuiInput-underline]:before,._root_135pm_1 [class*=MuiInput-underline]:hover:before{border-bottom-color:var(--lineColor)!important}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import{Cn as e,Fn as t,Fr as n,Hn as r,Pn as i,Pt as a,Sn as o,Tr as s,Wt as c,Xt as l,Yn as u,_n as d,br as f,bt as p,cn as m,cr as h,d as g,f as _,gn as v,jr as y,l as b,ln as x,lr as S,m as C,nn as w,o as ee,or as T,s as te,sn as E,sr as ne,v as D,vn as O,wr as k,xn as re,xr as A,xt as ie,yt as ae,zn as j}from"./_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__234968779812303__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-BRdHvuuG.js";import{n as oe,r as se,t as ce}from"./NotificationsActive-CuNfWVJM.js";import{t as le}from"./Send-Pz1eveU5.js";import{l as M,v as ue,y as de}from"./index-Bmmscq2G.js";var fe=u(h(`path`,{d:`M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z`}),`AddBox`),pe=u(h(`path`,{d:`M4 8h4V4H4zm6 12h4v-4h-4zm-6 0h4v-4H4zm0-6h4v-4H4zm6 0h4v-4h-4zm6-10v4h4V4zm-6 4h4V4h-4zm6 6h4v-4h-4zm0 6h4v-4h-4z`}),`Apps`),me=u(h(`path`,{d:`M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-5 14H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z`}),`Article`),he=u(h(`path`,{d:`M9 2c-1.05 0-2.05.16-3 .46 4.06 1.27 7 5.06 7 9.54s-2.94 8.27-7 9.54c.95.3 1.95.46 3 .46 5.52 0 10-4.48 10-10S14.52 2 9 2`}),`Brightness3`),ge=u(h(`path`,{d:`M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V10h14zM9 14H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2zm-8 4H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2z`}),`CalendarMonth`),_e=u([h(`path`,{d:`m12 2-5.5 9h11z`},`0`),h(`circle`,{cx:`17.5`,cy:`17.5`,r:`4.5`},`1`),h(`path`,{d:`M3 13.5h8v8H3z`},`2`)],`Category`),ve=u(h(`path`,{d:`M7 2v11h3v9l7-12h-4l4-8z`}),`FlashOn`),N=u(h(`path`,{d:`M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1m-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1`}),`Forum`),P=u(h(`path`,{d:`M18 4H6v2l6.5 6L6 18v2h12v-3h-7l5-5-5-5h7z`}),`Functions`),F=u(h(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25`}),`HelpOutlined`),ye=u(h(`path`,{d:`M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-2 12H6v-2h12zm0-3H6V9h12zm0-3H6V6h12z`}),`Message`),be=u(h(`path`,{d:`M11 5v5.59H7.5l4.5 4.5 4.5-4.5H13V5zm-5 9c0 3.31 2.69 6 6 6s6-2.69 6-6h-2c0 2.21-1.79 4-4 4s-4-1.79-4-4z`}),`PlayForWork`),xe=u(h(`path`,{d:`m17.66 9.53-7.07 7.07-4.24-4.24 1.41-1.41 2.83 2.83 5.66-5.66zM4 12c0-2.33 1.02-4.42 2.62-5.88L9 8.5v-6H3l2.2 2.2C3.24 6.52 2 9.11 2 12c0 5.19 3.95 9.45 9 9.95v-2.02c-3.94-.49-7-3.86-7-7.93m18 0c0-5.19-3.95-9.45-9-9.95v2.02c3.94.49 7 3.86 7 7.93 0 2.33-1.02 4.42-2.62 5.88L15 15.5v6h6l-2.2-2.2c1.96-1.82 3.2-4.41 3.2-7.3`}),`PublishedWithChanges`),Se=u(h(`path`,{d:`M10.59 9.17 5.41 4 4 5.41l5.17 5.17zM14.5 4l2.04 2.04L4 18.59 5.41 20 17.96 7.46 20 9.5V4zm.33 9.41-1.41 1.41 3.13 3.13L14.5 20H20v-5.5l-2.04 2.04z`}),`Shuffle`),Ce=u(h(`path`,{d:`M6 6h12v12H6z`}),`Stop`),we=u(h(`path`,{d:`M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z`}),`Storage`),Te=u(h(`path`,{d:`M14 17H4v2h10zm6-8H4v2h16zM4 15h16v-2H4zM4 5v2h16V5z`}),`Subject`),Ee=u(h(`path`,{d:`M6.99 11 3 15l3.99 4v-3H14v-2H6.99zM21 9l-3.99-4v3H10v2h7.01v3z`}),`SwapHoriz`);n();var I={nameCard:`_nameCard_1ji9r_15`,nameCardSummary:`_nameCardSummary_1ji9r_24`,headerRow:`_headerRow_1ji9r_32`,headerRowClickable:`_headerRowClickable_1ji9r_39`,headerText:`_headerText_1ji9r_43`,summaryObjectIcon:`_summaryObjectIcon_1ji9r_48`,kicker:`_kicker_1ji9r_56`,summarySub:`_summarySub_1ji9r_68`,chevron:`_chevron_1ji9r_77`,chevronCollapsed:`_chevronCollapsed_1ji9r_89`,chevronPlaceholder:`_chevronPlaceholder_1ji9r_94`,iconThemCard:`_iconThemCard_1ji9r_98`,iconThemCardCollapsed:`_iconThemCardCollapsed_1ji9r_109`,iconThemCardSelectable:`_iconThemCardSelectable_1ji9r_114`,iconHelp:`_iconHelp_1ji9r_118`,blockName:`_blockName_1ji9r_124`,debugInfo:`_debugInfo_1ji9r_130`,fadeIn:`_fadeIn_1ji9r_1`,tagCard:`_tagCard_1ji9r_146`,displayFlex:`_displayFlex_1ji9r_163`,blockMarginTop:`_blockMarginTop_1ji9r_168`,nameBlock:`_nameBlock_1ji9r_169`,frontText:`_frontText_1ji9r_173`,backText:`_backText_1ji9r_179`,iconTag:`_iconTag_1ji9r_183`,displayItalic:`_displayItalic_1ji9r_193`},L={root:`_root_1dr6a_1`,square:`_square_1dr6a_11`,icon:`_icon_1dr6a_16`},R=({fullWidth:e,size:t,onClick:n,style:r,className:i,value:a,square:o,icon:s})=>h(l,{variant:`outlined`,color:`primary`,onClick:n,fullWidth:e,style:r,className:D.clsx(L.root,i,o?L.square:``),size:t||`medium`,children:s?h(_,{className:L.icon,src:s}):a}),De={root:`_root_1ucda_1`};n();var z=A(({size:e,value:t,title:n,onChange:r,className:i,customValue:a,disabled:o})=>{let[s,c]=y(!1);return S(ne,{children:[h(w,{disabled:o,checked:!!(a?t:s),className:D.clsx(De.root,i),onChange:e=>{a&&c(e.target.checked),r&&r(e.target.checked)},size:e||`medium`}),n||null]})}),B={root:`_root_19roy_1`};n();var V=t=>{let[n,r]=y(``),{value:i,type:a,error:o,className:s,icon:l,label:u,style:d,onChange:f,fullWidth:p,autoComplete:m,customValue:g,autoFocus:v,rows:b,size:x,variant:S,multiline:C,disabled:w}=Object.assign({value:``,type:`text`,error:``,className:null,table:!1,native:{},variant:`standard`,size:`medium`,component:null,styleComponentBlock:null,fullWidth:!1,autoComplete:``,customValue:!1,autoFocus:!1,rows:1},t);return h(c,{error:!!o,autoFocus:v,fullWidth:p,label:u,disabled:w,variant:S,multiline:C,rows:b,value:g?i:n,type:a,helperText:o,style:d,className:D.clsx(B.root,s),autoComplete:m,onChange:e=>{!g&&r(e.target.value),f&&f(e.target.value)},slotProps:{input:{endAdornment:l?h(e,{position:`end`,children:h(_,{className:B.icon,src:l})}):null}},margin:`normal`,size:x})};n();var Oe={formControl:{m:`10px 0`,"& .MuiFormControl-marginNormal":{mt:0,mb:0},"& > *":{color:`#2d0440 !important`},"& .MuiSelect-icon":{color:`#81688c`},"& label.Mui-focused":{color:`#81688c`},"& .MuiInput-underline:after":{borderBottomColor:`#510573`},"& .MuiInput-underline:before":{borderBottomColor:`#81688c`},"& .MuiInput-underline:hover:before":{borderBottomColor:`#81688c`}}},ke=({multiple:e,value:n,customValue:r,socket:i,title:a,attr:c,adapter:l,style:u,onChange:d,onInstanceHide:f})=>{let[p,m]=y(n||`test1`),[g,_]=y([]);return s(()=>{i==null||i.getAdapterInstances(l).then(e=>{let t=e.map(e=>({value:e._id.replace(`system.adapter.`,``),title:e._id.replace(`system.adapter.`,``)}));t.length===1?f(t[0].value):t.unshift({value:l,title:C.t(`All`)}),_(t)})},[i,l,f]),S(v,{sx:Oe.formControl,fullWidth:!0,style:u,children:[h(j,{variant:`standard`,value:(r?n:p)||`_`,fullWidth:!0,multiple:e,renderValue:t=>e&&Array.isArray(t)?t.join(`, `):t,onChange:e=>{!r&&m(e.target.value),d(e.target.value)},input:c?h(o,{name:c,id:`${c}-helper`}):h(o,{name:c}),children:g.map(e=>h(t,{style:{placeContent:`space-between`},value:e.value||`_`,children:C.t(e.title)},`key-${e.value}`))}),a?h(O,{children:C.t(a)}):null]})},H={modalContentWrapper:`_modalContentWrapper_587ci_1`,modalButtonBlock:`_modalButtonBlock_587ci_8`,modalButtonBlockTwo:`_modalButtonBlockTwo_587ci_23`,modalWrapper:`_modalWrapper_587ci_33`,modalDialog:`_modalDialog_587ci_40`,close:`_close_587ci_44`};n();var U=({onClose:e,children:t,titleButtonApply:n,titleButtonClose:r,onApply:i,className:a,textInput:o,defaultValue:s,disabled:c})=>{let[u,d]=y(s||``),[f]=y(s||``);return S(E,{open:!0,maxWidth:`md`,onClose:e,classes:{paper:H.modalDialog},className:H.modalWrapper,children:[S(x,{children:[o&&h(V,{className:a,autoComplete:`off`,fullWidth:!0,variant:`outlined`,size:`medium`,rows:10,multiline:!0,value:u,onChange:d,customValue:!0}),!o&&t]}),S(m,{children:[h(l,{disabled:c===void 0?f===u:c,onClick:()=>i(o?u:null),variant:`contained`,color:`primary`,children:C.t(n||`Ok`)}),h(l,{color:`grey`,onClick:e,variant:`contained`,children:C.t(r||`Cancel`)})]})]})},Ae={root:`_root_15mo1_1`};n();var je=({multiple:e,value:n,customValue:r,title:i,attr:a,options:s,style:c,onChange:l,className:u,doNotTranslate:d,doNotTranslate2:f})=>{let[p,m]=y(n===void 0?s[0].value:n),g=r?n:p,_=g===``||g==null?`_`:g;return S(v,{variant:`standard`,className:D.clsx(Ae.root,u),fullWidth:!0,style:c,children:[S(j,{variant:`standard`,value:_,fullWidth:!0,multiple:e,renderValue:t=>{if(e&&Array.isArray(t)){t.sort();let e=t.indexOf(`0`);e!==-1&&(t.splice(e,1),t.push(`0`)),e=t.indexOf(`_`),e!==-1&&(t.splice(e,1),t.unshift(`_`));let n=s.find(e=>e.only);return n&&t.includes(n.value)?n.titleShort?d?n.titleShort:C.t(n.titleShort):d?n.title:C.t(n.title):t.map(e=>s.find(t=>t.value===e||e===`_`&&t.value===``)||e).map(e=>typeof e==`object`?e.titleShort?d?e.titleShort:C.t(e.titleShort):d?e.title:C.t(e.title):d?e:C.t(e)).join(`, `)}let n=s?s.find(e=>e.value===t||t===`_`&&e.value===``):null;return n!=null&&n.title?d?n==null?void 0:n.title:C.t(n==null?void 0:n.title):t},onChange:t=>{if(r||m(t.target.value),e){let e=t.target.value,n=s.find(e=>e.only);if(n){let t=n.value;if(e.length===s.length-1&&e.includes(t))return l(e.filter(e=>e!==t),a);if(e.includes(t))return l(s.map(e=>e.value),a)}}l(t.target.value,a)},input:a?h(o,{name:a,id:`${a}-helper`}):h(o,{name:a}),children:[!e&&(s==null?void 0:s.map(e=>S(t,{style:{placeContent:`space-between`},value:e.value===``||e.value===null||e.value===void 0?`_`:e.value,children:[d?e.title:C.t(e.title),e.title2&&h(`div`,{children:f?e.title2:C.t(e.title2)})]},`key-${e.value}`))),e&&(s==null?void 0:s.map(e=>S(t,{style:{placeContent:`space-between`},value:e.value||`_`,children:[d?e.title:C.t(e.title),` `,h(z,{customValue:!0,value:n==null?void 0:n.includes(e.value)})]},`key-${e.value}`)))]}),i?h(O,{children:C.t(i)}):null]})},W={root:`_root_167v0_1`,mark:`_mark_167v0_24`};n();var Me=({size:e,value:t,style:n,onChange:i,className:a,customValue:o,min:s,max:c,step:l,unit:u})=>{let[d,f]=y(0);s=s===void 0?0:s,c=c===void 0?0:c,l=l!==void 0&&l>0?l:(c-s)/100||1;let p=(()=>{let e=typeof t==`number`?t:parseFloat(t);return isFinite(e)?e<s?s:e>c?c:e:s})(),m=[{value:s,label:s+(u||``)},{value:c,label:c+(u||``)}];return h(r,{defaultValue:o?p:d,"aria-labelledby":`discrete-slider`,valueLabelDisplay:`auto`,classes:{mark:W.mark},marks:m,step:l,min:s,max:c,value:o?p:d,style:n,className:D.clsx(W.root,a),onChange:(e,t)=>{Array.isArray(t)?(!o&&f(t[0]),i(t[0])):(!o&&f(t),i(t))},size:e||`medium`})},Ne={root:`_root_rzul6_1`};n();var Pe=A(({label:e,size:t,value:n,style:r,onChange:i,className:o,customValue:s})=>{let[c,l]=y(!1);return h(d,{className:Ne.root,control:h(a,{checked:s?n:c,style:r,className:o,onChange:e=>{s||l(e.target.checked),i(e.target.checked)},size:t||`medium`}),label:e??`all`})}),Fe={root:`_root_135pm_1`};n();var Ie=({value:e,style:t,onChange:n,className:r})=>h(c,{variant:`standard`,id:`time`,type:`time`,onChange:e=>n(e.currentTarget.value),value:e,className:D.clsx(Fe.root,r),fullWidth:!0,style:t,slotProps:{htmlInput:{step:300},inputLabel:{shrink:!0}}}),G={root:`_root_135pm_1`};n();var K=[31,29,31,30,31,30,31,31,30,31,30,31],Le=({value:e,onChange:n,className:r,style:i})=>{let[a,o]=(e||`01.01`).toString().split(`.`),s=parseInt(o,10)||0,c=parseInt(a,10)||0;c>12?c=12:c<0&&(c=0),s>K[c]?s=K[c]:s<0&&(s=0);let l=[];for(let e=0;e<K[c];e++)l.push(e+1);return S(`div`,{children:[h(v,{variant:`standard`,className:D.clsx(G.root,r),style:i,children:S(j,{variant:`standard`,className:D.clsx(G.root,r),margin:`dense`,label:C.t(`Month`),onChange:e=>n(`${e.target.value.toString().padStart(2,`0`)}.${s.toString().padStart(2,`0`)}`),value:c,children:[h(t,{style:{placeContent:`space-between`},value:0,children:C.t(`Any month`)},0),h(t,{style:{placeContent:`space-between`},value:1,children:C.t(`January`)},1),h(t,{style:{placeContent:`space-between`},value:2,children:C.t(`February`)},2),h(t,{style:{placeContent:`space-between`},value:3,children:C.t(`March`)},3),h(t,{style:{placeContent:`space-between`},value:4,children:C.t(`April`)},4),h(t,{style:{placeContent:`space-between`},value:5,children:C.t(`May`)},5),h(t,{style:{placeContent:`space-between`},value:6,children:C.t(`June`)},6),h(t,{style:{placeContent:`space-between`},value:7,children:C.t(`July`)},7),h(t,{style:{placeContent:`space-between`},value:8,children:C.t(`August`)},8),h(t,{style:{placeContent:`space-between`},value:9,children:C.t(`September`)},9),h(t,{style:{placeContent:`space-between`},value:10,children:C.t(`October`)},10),h(t,{style:{placeContent:`space-between`},value:11,children:C.t(`November`)},11),h(t,{style:{placeContent:`space-between`},value:12,children:C.t(`December`)},12)]})}),h(v,{variant:`standard`,className:D.clsx(G.root,r),style:i,children:S(j,{variant:`standard`,className:D.clsx(G.root,r),margin:`dense`,label:C.t(`Date`),onChange:e=>n(`${c.toString().padStart(2,`0`)}.${e.target.value.toString().padStart(2,`0`)}`),value:s,children:[h(t,{style:{placeContent:`space-between`},value:0,children:C.t(`Any`)},`A`),l.map(e=>h(t,{style:{placeContent:`space-between`},value:e,children:e},e))]})})]})};n();var q={},Re={Shuffle:Se,Apps:pe,Functions:P,Language:ae,AddBox:fe,Pause:de,Subject:Te,PlayForWork:be,Brightness3:he,HelpOutline:F,Storage:we,AccessTime:se,PlayArrow:ue,FlashOn:ve,CalendarMonth:ge,Send:le,Message:ye,NotificationsActive:ce,SwapHoriz:Ee,InsertDriveFile:p,AccountTree:oe,Article:me,Stop:Ce,Category:_e,Forum:N,PublishedWithChanges:xe};function J({iconName:e,className:t,adapter:n,socket:r,onClick:i,style:a}){let[o,c]=y(``);if(s(()=>{n&&r&&(q[n]instanceof Promise||(q[n]=r.getObject(`system.adapter.${n}`)),q[n].then(e=>{var t;return(e==null||(t=e.common)==null?void 0:t.icon)&&c(`../../adapter/${n}/${e.common.icon}`)}))},[n,r]),n)return h(`img`,{onClick:e=>i&&i(e),src:o||``,className:t,style:a,alt:``});let l=e&&Re[e]||ie;return h(l,{className:t,style:a,onClick:e=>i&&i(e)})}var Y;function ze(e){return Y||=C.getLanguage(),e&&typeof e==`object`?e[Y]||e.en:e||``}function Be(e){return e===null?`null`:e===void 0?`undefined`:Array.isArray(e)?e.join(`, `):typeof e==`object`?JSON.stringify(e):e.toString()}n();var Ve=class e extends f{static getStaticData(){return{acceptedBy:`actions`,name:`Not found`,id:`ActionEmpty`,icon:`Shuffle`}}static compile(e,t){return``}constructor(e,t){super(e),T(this,`debugHideTimeout`,null),T(this,`initiallyCollapsed`,!1),T(this,`collapseDecided`,!1),T(this,`lastObjectIdChange`,0),T(this,`enableSimulationProcessing`,!1),T(this,`mounted`,!1),T(this,`tagCardTimeout`,null),T(this,`enableSimulationTimeout`,null),T(this,`lastDebugMessage`,0),T(this,`debugMessageTimeout`,null),t||={};let n=e.settings||{tagCard:t.tagCardArray?typeof t.tagCardArray[0]==`string`?t.tagCardArray[0]:t.tagCardArray[0].title:``};!n.tagCard&&t.tagCardArray&&(n.tagCard=typeof t.tagCardArray[0]==`string`?t.tagCardArray[0]:t.tagCardArray[0].title),this.state={inputs:t.inputs||e.inputs||[],name:t.name||e.name||``,icon:t.icon||e.icon||``,adapter:t.adapter||e.adapter||``,helpDialog:t.helpDialog||e.helpDialog||``,tagCardArray:t.tagCardArray||[],openTagMenu:!1,openModal:!1,iconTag:!1,error:``,helpText:``,instanceSelectionOptions:[],instanceSelectionDef:``,hideAttributes:[],settings:n,debugMessage:null,enableSimulation:this.props.enableSimulation}}componentWillUnmount(){this.mounted=!1,this.debugMessageTimeout&&=(clearTimeout(this.debugMessageTimeout),null),this.debugHideTimeout&&=(clearTimeout(this.debugHideTimeout),null),this.tagCardTimeout&&=(clearTimeout(this.tagCardTimeout),null),this.enableSimulationTimeout&&=(clearTimeout(this.enableSimulationTimeout),null)}onTagChange(e,t,n,r,i){let a=!1,o=JSON.parse(JSON.stringify(this.state.settings));this.state.inputs.forEach(e=>{let t=e.attr,n=e.defaultValue;t&&n!==void 0&&o[t]===void 0&&(a=!0,o[t]=n)}),a?(this.setState({settings:o},()=>t==null?void 0:t()),this.props.onChange(o)):t&&t()}onUpdate(){}onValueChanged(e,t){}getSummary(){return null}objectName(e){if(!e)return;let t=this.state[e];if(t===void 0){setTimeout(async()=>{let t=await this.props.socket.getObject(e);this.mounted&&this.setState({[e]:t||!1})},0);return}return t&&D.getObjectNameFromObj(t,C.getLanguage())||void 0}summaryObjectIcon(e){if(!e)return;let t=`${e}___icon`,n=this.state[t];if(n===void 0){setTimeout(async()=>{let n=await this.props.socket.getObject(e),r=await this.findIcon(n);this.mounted&&this.setState({[t]:r})},0);return}return n||void 0}summaryObjectId(){let e=this.state.inputs.find(e=>e.nameRender===`renderObjectID`&&typeof this.state.settings[e.attr||``]==`string`);return e!=null&&e.attr&&this.state.settings[e.attr]||void 0}optionTitle(e,t,n=`title`){var r,i;if(t==null||t===``)return;let a=(r=this.state.inputs)==null?void 0:r.find(t=>t.attr===e),o=a==null||(i=a.options)==null?void 0:i.find(e=>String(e.value)===String(t));if(o)return n===`title2`?o.title2:a!=null&&a.doNotTranslate?o.title:C.t(o.title)}isCollapsed(e){this.collapseDecided||(this.collapseDecided=!0,this.initiallyCollapsed=e);let t=this.state.userCollapsed;return e&&(t===void 0?this.initiallyCollapsed:t)}toggleCollapsed(e){this.setState({userCollapsed:e})}renderText(e,t,n){let{className:r}=this.props,{attr:i,frontText:a,backText:o,nameBlock:s,name:c,doNotTranslate:l,doNotTranslateBack:u}=e;return S(k,{children:[S(`div`,{className:D.clsx(I.displayFlex,I.blockMarginTop),children:[a&&h(`div`,{className:I.frontText,children:l?a:C.t(a)}),h(V,{className:r,autoComplete:`off`,label:ze(c),variant:`outlined`,size:`small`,fullWidth:!0,value:t,onChange:n,customValue:!0}),o&&h(`div`,{className:I.backText,children:u?o:C.t(o)})]}),s&&h(`div`,{className:I.nameBlock,children:C.t(s)})]},i)}renderSwitch(e,t,n){let{className:r}=this.props,{attr:i,frontText:a,backText:o,nameBlock:s,doNotTranslate:c,doNotTranslateBack:l}=e;return S(`div`,{children:[S(`div`,{className:D.clsx(I.displayFlex,I.blockMarginTop),children:[a&&h(`div`,{className:I.frontText,children:c?a:C.t(a)}),h(Pe,{className:r,label:``,customValue:!0,value:t,onChange:n}),o&&h(`div`,{className:I.backText,children:l?o:C.t(o)})]}),s&&h(`div`,{className:I.nameBlock,children:C.t(s)})]},i)}renderNameText({attr:e,signature:t,doNotTranslate:n,defaultValue:r},i){return h(`div`,{className:D.clsx(t?I.displayItalic:I.displayFlex,I.blockMarginTop),children:i?n?i:C.t(i):n?r:C.t(r)},e)}renderNumber(e,t,n){let{className:r}=this.props,{settings:i}=this.state,{attr:a,backText:o,frontText:s,openCheckbox:c,doNotTranslate:l,doNotTranslateBack:u}=e,d=!0;return c&&(d=typeof i.offset!=`boolean`||i.offset),d?S(`div`,{className:D.clsx(I.displayFlex,I.blockMarginTop),children:[s&&h(`div`,{className:I.frontText,children:l?s:C.t(s)}),h(V,{className:D.clsx(r,e.className),fullWidth:!0,autoComplete:`off`,label:e.noHelperText?``:`number`,variant:`outlined`,size:`small`,type:`number`,value:t,onChange:n,customValue:!0}),o&&h(`div`,{className:I.backText,children:u?o:C.t(o)})]},a):null}renderColor(e,t,n){let{className:r}=this.props,{attr:i,backText:a,frontText:o,doNotTranslate:s,doNotTranslateBack:c}=e;return S(`div`,{className:D.clsx(I.displayFlex,I.blockMarginTop),children:[o&&h(`div`,{className:I.frontText,children:s?o:C.t(o)}),h(V,{className:r,autoComplete:`off`,fullWidth:!0,variant:`outlined`,size:`small`,type:`color`,value:t,onChange:n}),a&&h(`div`,{className:I.backText,children:c?a:C.t(a)})]},i)}renderCheckbox(e,t,n){let{className:r}=this.props,{settings:i}=this.state,{attr:a,backText:o,frontText:s,defaultValue:c,doNotTranslate:l,doNotTranslateBack:u}=e;return S(`div`,{className:I.displayFlex,children:[s&&h(`div`,{className:I.frontText,children:l?s:C.t(s)}),h(z,{className:r,size:`small`,value:typeof i[a]==`boolean`?!!i[a]:!!c,customValue:!0,onChange:n}),o&&h(`div`,{onClick:()=>n(typeof i[a]==`boolean`?!i[a]:!c),className:I.backText,children:u?o:C.t(o)})]},a)}renderSlider(e,t,n){let{className:r}=this.props,{attr:i,frontText:a,backText:o,nameBlock:s,min:c,max:l,step:u,unit:d,doNotTranslate:f,doNotTranslateBack:p}=e;return S(`div`,{children:[S(`div`,{className:I.displayFlex,style:{marginRight:20},children:[a&&h(`div`,{className:I.frontText,children:f?a:C.t(a)}),h(Me,{customValue:!0,min:c,max:l,step:u,unit:d,className:r,autoComplete:`off`,label:`number`,variant:`outlined`,size:`small`,value:t,onChange:e=>n(e)}),o&&h(`div`,{style:{marginLeft:20},className:I.backText,children:p?o:C.t(o)})]}),s&&h(`div`,{className:I.nameBlock,children:C.t(s)})]},i)}renderButton(e,t,n){let{className:r}=this.props,{attr:i,frontText:a,backText:o,doNotTranslate:s,doNotTranslateBack:c}=e;return S(`div`,{className:D.clsx(I.displayFlex,I.blockMarginTop),children:[a&&h(`div`,{className:I.frontText,children:s?a:C.t(a)}),h(R,{fullWidth:!0,value:t.toString(),className:r,onClick:()=>n(t)}),o&&h(`div`,{className:I.backText,children:c?o:C.t(o)})]},i)}async findIcon(e){var t;if(!e)return null;if((t=e.common)!=null&&t.icon&&(e.type===`state`||e.type===`channel`||e.type===`device`))return g(e,`../..`);if(e.type===`state`||e.type===`channel`){let t=e._id.split(`.`);t.pop();let n=t.join(`.`);try{let e=await this.props.socket.getObject(n);return await this.findIcon(e)}catch{return null}}return null}renderObjectID(e,t,n){let{attr:r,openCheckbox:i,checkReadOnly:a}=e,{settings:o}=this.state,s=this.state[`showSelectId${r}`],{className:c,socket:l,style:u}=this.props,d=!0;i&&(d=typeof o.offset!=`boolean`||o.offset);let f=o[r],p=f?this.state[f]:void 0;return f&&!p&&p!==!1&&setTimeout(async e=>{var n;let r=await l.getObject(t),i=await this.findIcon(r);if(!this.mounted)return;let s={[e]:r||!1,[`${e}___icon`]:i,error:a&&this.lastObjectIdChange&&Date.now()-this.lastObjectIdChange<1e3&&(r==null||(n=r.common)==null?void 0:n.write)===!1?C.t(`Read only ID selected: %s`,o[e]):``};this.setState(s)},0,f),d?S(`div`,{className:I.blockMarginTop,children:[S(`div`,{className:I.displayFlex,children:[e.title?h(`div`,{children:C.t(e.title)}):null,h(V,{className:c,style:u,autoComplete:`off`,fullWidth:!0,disabled:!0,variant:`outlined`,size:`small`,value:t,customValue:!0}),h(R,{icon:this.state[`${f}___icon`],square:!0,style:{...u||void 0,marginLeft:7},value:`...`,className:c,onClick:()=>{let e={};e[`showSelectId${r}`]=!0,this.setState(e)}})]}),p?h(`div`,{className:D.clsx(I.nameBlock,I.displayItalic),children:D.getObjectNameFromObj(p,C.getLanguage())}):null,s?h(b,{theme:this.props.theme,imagePrefix:`../..`,dialogName:`javascript`,themeType:D.getThemeType(),socket:l,selected:t,onClose:()=>{let e={};e[`showSelectId${r}`]=!1,this.setState(e)},onOk:(e,t)=>{let i={};i[`showSelectId${r}`]=!1;let a=Array.isArray(e)?e[0]:e;this.setState(i,async()=>{var t,i,o,s,c,u,d,f,p,m;let h=a?await l.getObject(a):void 0;this.lastObjectIdChange=Date.now(),n({[r]:e,[`${r}Role`]:h==null||(t=h.common)==null?void 0:t.role,[`${r}Type`]:h==null||(i=h.common)==null?void 0:i.type,[`${r}Unit`]:h==null||(o=h.common)==null?void 0:o.unit,[`${r}States`]:h==null||(s=h.common)==null?void 0:s.states,[`${r}Min`]:h==null||(c=h.common)==null?void 0:c.min,[`${r}Max`]:h==null||(u=h.common)==null?void 0:u.max,[`${r}Step`]:h==null||(d=h.common)==null?void 0:d.step,[`${r}Def`]:h==null||(f=h.common)==null?void 0:f.def,[`${r}Write`]:h==null||(p=h.common)==null?void 0:p.write,[`${r}Read`]:h==null||(m=h.common)==null?void 0:m.read},()=>this.props.setOnUpdate&&this.props.setOnUpdate(!0))})}}):null]},r):null}renderIconTag(){return h(`div`,{className:I.iconTag,onClick:e=>{this.state.settings.tagCard&&(this.state.tagCardArray.length<3?this.onChangeTag():this.setState({openTagMenu:e.currentTarget}))},children:this.state.settings.tagCard})}renderTime(e,t,n){let{attr:r,backText:i,frontText:a,doNotTranslate:o,doNotTranslateBack:s}=e;return S(`div`,{className:I.displayFlex,style:{whiteSpace:`nowrap`},children:[a&&h(`div`,{className:I.frontText,children:o?a:C.t(a)}),h(Ie,{value:t,onChange:n}),i&&h(`div`,{className:I.backText,children:s?i:C.t(i)})]},r)}renderSelect(e,t,n){let{className:r,style:i}=this.props,{name:a,options:o,frontText:s,backText:c,attr:l,multiple:u,doNotTranslate:d,doNotTranslate2:f,doNotTranslateBack:p}=e;return S(`div`,{className:D.clsx(I.displayFlex,I.blockMarginTop),style:{whiteSpace:`nowrap`},children:[s&&h(`div`,{className:I.frontText,children:C.t(s)}),h(je,{attr:l,doNotTranslate:d,doNotTranslate2:f,title:a,className:r,style:i,options:o,value:t,onChange:n,multiple:u,customValue:!0}),c&&h(`div`,{className:I.backText,children:p?c:C.t(c)})]},l)}renderInstance(e,t,n){let{socket:r}=this.props,{name:i,frontText:a,backText:o,attr:s,adapter:c,doNotTranslate:l,doNotTranslateBack:u}=e;return this.state.hideAttributes.includes(s)?null:S(`div`,{className:D.clsx(I.displayFlex,I.blockMarginTop),style:{whiteSpace:`nowrap`},children:[a&&h(`div`,{className:I.frontText,children:l?a:C.t(a)}),h(ke,{attr:s,socket:r,adapter:c,title:i,value:t,onChange:e=>{n(Array.isArray(e)?e[0]:e)},customValue:!0,onInstanceHide:e=>this.setState({hideAttributes:[...this.state.hideAttributes,s]},()=>n(e))}),o&&h(`div`,{className:I.backText,children:u?o:C.t(o)})]},s)}renderDialog(e){let{onShowDialog:t,frontText:n,backText:r,attr:i,icon:a,doNotTranslate:o,doNotTranslateBack:s}=e;return S(`div`,{className:D.clsx(I.displayFlex,I.blockMarginTop),style:{whiteSpace:`nowrap`},children:[n&&h(`div`,{className:I.frontText,children:o?n:C.t(n)}),h(J,{iconName:a,className:D.clsx(I.iconDialog),onClick:()=>t&&t()}),r&&h(`div`,{className:I.backText,children:s?r:C.t(r)})]},i)}renderModalInput(e,t,n){let{openModal:r}=this.state,{className:i}=this.props,{attr:a,nameBlock:o,frontText:s,backText:c,noTextEdit:l,doNotTranslate:u,doNotTranslateBack:d}=e;return S(`div`,{children:[S(`div`,{className:D.clsx(I.displayFlex,I.blockMarginTop),children:[s&&h(`div`,{className:I.frontText,children:u?s:C.t(s)}),h(V,{disabled:!!l,className:i,autoComplete:`off`,fullWidth:!0,variant:`outlined`,size:`small`,value:t,onChange:n,customValue:!0}),h(R,{square:!0,style:{marginLeft:5},value:`...`,className:i,onClick:()=>this.setState({openModal:!0})}),c&&h(`div`,{className:I.backText,children:d?c:C.t(c)})]}),r?h(U,{onApply:e=>this.setState({openModal:!1},()=>e!=null&&n(e)),onClose:()=>this.setState({openModal:!1}),defaultValue:t,textInput:!0}):null,o&&h(`div`,{className:I.nameBlock,children:C.t(o)})]},a)}renderDate(e,t,n){let{attr:r,backText:i,frontText:a,doNotTranslate:o,doNotTranslateBack:s}=e;return S(`div`,{className:I.displayFlex,style:{whiteSpace:`nowrap`},children:[a&&h(`div`,{className:I.frontText,children:o?a:C.t(a)}),h(Le,{value:t,onChange:n}),i&&h(`div`,{className:I.backText,children:s?i:C.t(i)})]},r)}static getValueReplace(e,t){return`.replace(/%(?:\\.(\\d+))?${e}/g, (_m, d) => { const v = ${t}; return d !== undefined && (typeof v === "number" || (typeof v === "string" && v.trim() !== "")) && isFinite(v) ? formatValue(v, parseInt(d, 10)) : v; })`}static getReplacesInText(t){var n,r,i,a,o,s;let c=``;return(n=t.trigger)!=null&&n.oidType||((r=t.trigger)==null?void 0:r.id)===`TriggerEnumMembers`?c=`${e.getValueReplace(`s`,`obj.state.val`)}.replace(/%id/g, obj.id).replace(/%name/g, obj.common && obj.common.name)${e.getValueReplace(`old`,`obj.oldState.val`)}`:((i=t.trigger)==null?void 0:i.id)===`TriggerMessage`?c=e.getValueReplace(`s`,`typeof data === "object" ? JSON.stringify(data) : data`):((a=t.trigger)==null?void 0:a.id)===`TriggerFile`?c=`.replace(/%(?:\\.\\d+)?s/g, fileName).replace(/%id/g, fileId)`:((o=t.trigger)==null?void 0:o.id)===`TriggerObject`?c=`.replace(/%(?:\\.\\d+)?s/g, id).replace(/%id/g, id)`:((s=t.trigger)==null?void 0:s.id)===`TriggerLog`?c=`.replace(/%(?:\\.\\d+)?s/g, info.message).replace(/%id/g, info.from)`:t.conditionsStates.length&&(c=`${e.getValueReplace(`s`,t.conditionsStates[0].name)}.replace(/%id/g, "${t.conditionsStates[0].id}")`),c}renderTags(){let{tagCardArray:e,openTagMenu:n}=this.state,{tagCard:r}=this.state.settings,a=r!==`=`&&r!==`<>`&&r!==`>=`&&r!==`()`&&r!==`.`&&r!==`<=`&&r!==`<`&&r!==`>`&&r?C.t(r):r;return e.length>=3&&(a=S(`div`,{children:[h(`div`,{"aria-controls":`simple-menu`,"aria-haspopup":`true`,onClick:e=>{this.setState({openTagMenu:e.currentTarget},()=>{this.props.isTourOpen&&this.props.tourStep===M.openTagsMenu&&setTimeout(()=>this.props.setTourStep&&this.props.setTourStep(M.selectIntervalTag),300)})},children:a}),h(i,{id:`simple-menu`,anchorEl:n,keepMounted:!0,open:!!n,onClose:()=>this.setState({openTagMenu:null}),children:e.map((e,n)=>{let i;return i=typeof e==`string`?e:e.title,S(t,{selected:i===r,className:`tag-card-${i}`,style:{placeContent:`space-between`},onClick:e=>{e.stopPropagation(),this.props.isTourOpen&&(this.props.tourStep===M.openTagsMenu||this.props.tourStep===M.selectIntervalTag)&&i===`interval`&&setTimeout(()=>{var e,t;return(e=(t=this.props).setTourStep)==null?void 0:e.call(t,M.selectActions)},500);let t=JSON.parse(JSON.stringify(this.state.settings));t.tagCard=i,this.setState({openTagMenu:null,settings:t},()=>{this.props.onChange(this.state.settings),this.onTagChange(this.state.settings.tagCard)})},children:[i.search(/>|<|<>|<=|>=|=/)===-1?C.t(i):i,typeof e!=`string`&&e.title2&&h(`div`,{style:{marginLeft:4},children:C.t(e.title2)})]},`${i}_${n}`)})})]})),a}getData(){return{acceptedBy:`triggers`,name:``,id:``}}onChangeTag(){let{tagCardArray:e,settings:t,settings:{tagCard:n}}=this.state,r;if(r=typeof e[0]==`string`?[...e]:e.map(e=>e.title),n&&r.length<3){let e={...t},i=r[(r.indexOf(n)+1)%r.length];e.tagCard=i,this.setState({settings:e},()=>{this.props.onChange(e),this.onTagChange(i)})}}componentDidMount(){this.mounted=!0,this.onTagChange()}componentDidUpdate(){this.props.acceptedBy!==`triggers`&&this.props.onUpdate&&setTimeout(()=>this.onUpdate(),0)}onChangeInput(e){return(t,n,r)=>{let i=JSON.parse(JSON.stringify(this.state.settings));typeof t==`object`&&(!n||typeof n==`function`)?(Object.keys(t).forEach(e=>i[e]=t[e]),typeof n==`function`&&(r=n,n=void 0)):i[n||e]=t,i.id=this.getData().id,i._id=this.props._id,this.setState({settings:i},()=>{this.onValueChanged(t,n||e),this.props.onChange(i),r==null||r()})}}renderSpecific(){return null}renderDebug(e){return``}renderDebugInfo(){return this.state.debugMessage?h(`div`,{className:I.debugInfo,style:{opacity:1,height:22,bottom:-22},children:this.renderDebug?this.renderDebug(this.state.debugMessage):C.t(`executed`)},this.state.debugMessage.ts):null}renderCron(e,t,n){return null}renderWizard(e,t,n){return null}renderWriteState(){return null}renderInputElement(e,t){let{nameRender:n,defaultValue:r,attr:i}=e,{settings:a}=this.state,o=i?a[i]:void 0;switch(o===void 0&&(o=r),n){case`renderTime`:return i?this.renderTime(e,o,this.onChangeInput(i)):h(`div`,{children:C.t(`Invalid renderTime`)},`invalid_${t}`);case`renderNameText`:return this.renderNameText(e,r);case`renderSelect`:return i?this.renderSelect(e,o,this.onChangeInput(i)):h(`div`,{children:C.t(`Invalid renderSelect`)},`invalid_${t}`);case`renderModalInput`:return i?this.renderModalInput(e,o,this.onChangeInput(i)):h(`div`,{children:C.t(`Invalid renderModalInput`)},`invalid_${t}`);case`renderObjectID`:return i?this.renderObjectID(e,o,this.onChangeInput(i)):h(`div`,{children:C.t(`Invalid renderObjectID`)},`invalid_${t}`);case`renderDialog`:return i?this.renderDialog(e):h(`div`,{children:C.t(`Invalid renderDialog`)},`invalid_${t}`);case`renderInstance`:return i?this.renderInstance(e,o,this.onChangeInput(i)):h(`div`,{children:C.t(`Invalid renderInstance`)},`invalid_${t}`);case`renderText`:return i?this.renderText(e,o,this.onChangeInput(i)):h(`div`,{children:C.t(`Invalid renderText`)},`invalid_${t}`);case`renderSlider`:return i?this.renderSlider(e,o,this.onChangeInput(i)):h(`div`,{children:C.t(`Invalid renderSlider`)},`invalid_${t}`);case`renderCheckbox`:return i?this.renderCheckbox(e,o,this.onChangeInput(i)):h(`div`,{children:C.t(`Invalid renderCheckbox`)},`invalid_${t}`);case`renderButton`:return i?this.renderButton(e,o,this.onChangeInput(i)):h(`div`,{children:C.t(`Invalid renderButton`)},`invalid_${t}`);case`renderColor`:return i?this.renderColor(e,o,this.onChangeInput(i)):h(`div`,{children:C.t(`Invalid renderColor`)},`invalid_${t}`);case`renderSwitch`:return i?this.renderSwitch(e,o,this.onChangeInput(i)):h(`div`,{children:C.t(`Invalid renderSwitch`)},`invalid_${t}`);case`renderDate`:return i?this.renderDate(e,o,this.onChangeInput(i)):h(`div`,{children:C.t(`Invalid renderDate`)},`invalid_${t}`);case`renderCron`:return i?this.renderCron(e,o,this.onChangeInput(i)):h(`div`,{children:C.t(`Invalid renderCron`)},`invalid_${t}`);case`renderWizard`:return i?this.renderWizard(e,o,this.onChangeInput(i)):h(`div`,{children:C.t(`Invalid renderWizard`)},`invalid_${t}`);case`renderWriteState`:return this.renderWriteState();case`renderNumber`:return i?this.renderNumber(e,o,this.onChangeInput(i)):h(`div`,{children:C.t(`Invalid renderNumber`)},`invalid_${t}`);default:return this[n]?this[n](e,o,i?this.onChangeInput(i):null):h(`div`,{children:C.t(`Invalid input type: %s`,n)},`invalid_${t}`)}}render(){var e;let{inputs:t,name:n,icon:r,iconTag:i,settings:a,adapter:o,settings:{tagCard:s},helpDialog:c}=this.state,{socket:l,notFound:u}=this.props;this.state.settings&&!this.state.settings.tagCard&&(e=this.state.tagCardArray)!=null&&e.length&&!this.tagCardTimeout&&(this.tagCardTimeout=setTimeout(()=>{if(this.tagCardTimeout=null,!this.mounted)return;let e=JSON.parse(JSON.stringify(this.state.settings));e.tagCard=typeof this.state.tagCardArray[0]==`string`?this.state.tagCardArray[0]:this.state.tagCardArray[0].title,this.setState({settings:e})},50)),this.state.enableSimulation!==this.props.enableSimulation&&!this.enableSimulationProcessing&&(this.enableSimulationProcessing=!0,this.enableSimulationTimeout=setTimeout(()=>{if(this.enableSimulationTimeout=null,!this.mounted){this.enableSimulationProcessing=!1;return}this.setState({enableSimulation:this.props.enableSimulation},()=>{this.enableSimulationProcessing=!1})},50));let d;if(this.props.onDebugMessage)for(let e=this.props.onDebugMessage.length-1;e>=0;e--){let t=this.props.onDebugMessage[e];if(t.blockId===this.props._id&&t.ts>this.lastDebugMessage&&t.ts>Date.now()-1e3){d=t;break}}d&&(this.lastDebugMessage=d.ts,this.debugMessageTimeout&&clearTimeout(this.debugMessageTimeout),this.debugHideTimeout&&=(clearTimeout(this.debugHideTimeout),null),this.debugMessageTimeout=setTimeout(e=>{let t=JSON.parse(e),n=t.hideTimeout||5e3;this.debugMessageTimeout=null,this.setState({debugMessage:t},()=>{this.debugHideTimeout&&clearTimeout(this.debugHideTimeout),this.debugHideTimeout=setTimeout(()=>{this.debugHideTimeout=null,this.setState({debugMessage:null})},n)})},50,JSON.stringify(d)));let f=this.getSummary(),p=this.isCollapsed(!!f),m=p?this.summaryObjectIcon(this.summaryObjectId()):void 0;return S(k,{children:[i?this.renderIconTag():h(J,{iconName:r,className:D.clsx(I.iconThemCard,p&&I.iconThemCardCollapsed,s&&this.state.tagCardArray.length&&I.iconThemCardSelectable),adapter:o,socket:l,onClick:e=>{s&&(e.stopPropagation(),this.state.tagCardArray.length<3?this.onChangeTag():this.setState({openTagMenu:e.currentTarget}))}}),S(`div`,{className:I.blockName,"data-rules-expanded":!p,children:[S(`div`,{className:D.clsx(I.headerRow,f&&I.headerRowClickable),onClick:f?()=>this.toggleCollapsed(!p):void 0,children:[m?h(`img`,{className:I.summaryObjectIcon,src:m,alt:``}):null,h(`span`,{className:D.clsx(I.chevron,p&&I.chevronCollapsed,!f&&I.chevronPlaceholder),children:`▾`}),S(`div`,{className:I.headerText,children:[f!=null&&f.kicker?h(`div`,{className:I.kicker,children:f.kicker}):null,S(`span`,{className:D.clsx(I.nameCard,f&&I.nameCardSummary),children:[f?f.title:C.t(n),u?C.t(`%s not found`,a.id):``]}),p&&f!=null&&f.subtitle?h(`div`,{className:I.summarySub,title:f.subtitle,children:f.subtitle}):null]}),s?h(`div`,{onClick:e=>{e.stopPropagation(),this.onChangeTag()},className:D.clsx(I.tagCard,`tag-card`),children:this.renderTags()}):null,c?h(re,{className:I.iconHelp,size:`small`,onClick:e=>{e.stopPropagation(),this.setState({helpText:C.t(c)})},children:h(F,{})}):null]}),p?null:t.map((e,t)=>this.renderInputElement(e,t))]}),this.renderDebugInfo(),this.state.error?h(ee,{title:C.t(`Warning`),text:this.state.error,onClose:()=>this.setState({error:``})}):null,this.state.helpText?h(te,{title:C.t(`Instructions`),text:this.state.helpText,onClose:()=>this.setState({helpText:``})}):null,this.renderSpecific()]})}},He=`async function (obj) {
|
|
2
|
+
"__%%DEBUG_TRIGGER%%__";
|
|
3
|
+
__%%CONDITIONS_VARS%%__
|
|
4
|
+
const _cond = __%%CONDITION%%__;
|
|
5
|
+
|
|
6
|
+
"__%%DEBUG_CONDITIONS%%__";
|
|
7
|
+
|
|
8
|
+
if (_cond) {
|
|
9
|
+
__%%THEN%%__
|
|
10
|
+
} else {
|
|
11
|
+
__%%ELSE%%__
|
|
12
|
+
}
|
|
13
|
+
}`,Ue=`async function (obj) {
|
|
14
|
+
"__%%DEBUG_TRIGGER%%__";
|
|
15
|
+
__%%CONDITIONS_VARS%%__
|
|
16
|
+
const _cond = __%%CONDITION%%__;
|
|
17
|
+
|
|
18
|
+
"__%%DEBUG_CONDITIONS%%__";
|
|
19
|
+
|
|
20
|
+
if (__%%STATE%%__ === false && _cond) {
|
|
21
|
+
__%%STATE%%__ = true;
|
|
22
|
+
__%%THEN%%__
|
|
23
|
+
} else if (__%%STATE%%__ === true && !_cond) {
|
|
24
|
+
__%%STATE%%__ = false;
|
|
25
|
+
__%%ELSE%%__
|
|
26
|
+
}
|
|
27
|
+
}`,We=`async function (data, _callback) {
|
|
28
|
+
"__%%DEBUG_TRIGGER%%__";
|
|
29
|
+
__%%CONDITIONS_VARS%%__
|
|
30
|
+
const _cond = __%%CONDITION%%__;
|
|
31
|
+
|
|
32
|
+
"__%%DEBUG_CONDITIONS%%__";
|
|
33
|
+
|
|
34
|
+
if (_cond) {
|
|
35
|
+
__%%THEN%%__
|
|
36
|
+
} else {
|
|
37
|
+
__%%ELSE%%__
|
|
38
|
+
}
|
|
39
|
+
}`,Ge=`async function (data, _callback) {
|
|
40
|
+
"__%%DEBUG_TRIGGER%%__";
|
|
41
|
+
__%%CONDITIONS_VARS%%__
|
|
42
|
+
const _cond = __%%CONDITION%%__;
|
|
43
|
+
|
|
44
|
+
"__%%DEBUG_CONDITIONS%%__";
|
|
45
|
+
|
|
46
|
+
if (__%%STATE%%__ === false && _cond) {
|
|
47
|
+
__%%STATE%%__ = true;
|
|
48
|
+
__%%THEN%%__
|
|
49
|
+
} else if (__%%STATE%%__ === true && !_cond) {
|
|
50
|
+
__%%STATE%%__ = false;
|
|
51
|
+
__%%ELSE%%__
|
|
52
|
+
}
|
|
53
|
+
}`,Ke=`async function (fileId, fileName, size) {
|
|
54
|
+
"__%%DEBUG_TRIGGER%%__";
|
|
55
|
+
__%%CONDITIONS_VARS%%__
|
|
56
|
+
const _cond = __%%CONDITION%%__;
|
|
57
|
+
|
|
58
|
+
"__%%DEBUG_CONDITIONS%%__";
|
|
59
|
+
|
|
60
|
+
if (_cond) {
|
|
61
|
+
__%%THEN%%__
|
|
62
|
+
} else {
|
|
63
|
+
__%%ELSE%%__
|
|
64
|
+
}
|
|
65
|
+
}`,qe=`async function (fileId, fileName, size) {
|
|
66
|
+
"__%%DEBUG_TRIGGER%%__";
|
|
67
|
+
__%%CONDITIONS_VARS%%__
|
|
68
|
+
const _cond = __%%CONDITION%%__;
|
|
69
|
+
|
|
70
|
+
"__%%DEBUG_CONDITIONS%%__";
|
|
71
|
+
|
|
72
|
+
if (__%%STATE%%__ === false && _cond) {
|
|
73
|
+
__%%STATE%%__ = true;
|
|
74
|
+
__%%THEN%%__
|
|
75
|
+
} else if (__%%STATE%%__ === true && !_cond) {
|
|
76
|
+
__%%STATE%%__ = false;
|
|
77
|
+
__%%ELSE%%__
|
|
78
|
+
}
|
|
79
|
+
}`,Je=`async function (id, obj) {
|
|
80
|
+
"__%%DEBUG_TRIGGER%%__";
|
|
81
|
+
__%%CONDITIONS_VARS%%__
|
|
82
|
+
const _cond = __%%CONDITION%%__;
|
|
83
|
+
|
|
84
|
+
"__%%DEBUG_CONDITIONS%%__";
|
|
85
|
+
|
|
86
|
+
if (_cond) {
|
|
87
|
+
__%%THEN%%__
|
|
88
|
+
} else {
|
|
89
|
+
__%%ELSE%%__
|
|
90
|
+
}
|
|
91
|
+
}`,Ye=`async function (id, obj) {
|
|
92
|
+
"__%%DEBUG_TRIGGER%%__";
|
|
93
|
+
__%%CONDITIONS_VARS%%__
|
|
94
|
+
const _cond = __%%CONDITION%%__;
|
|
95
|
+
|
|
96
|
+
"__%%DEBUG_CONDITIONS%%__";
|
|
97
|
+
|
|
98
|
+
if (__%%STATE%%__ === false && _cond) {
|
|
99
|
+
__%%STATE%%__ = true;
|
|
100
|
+
__%%THEN%%__
|
|
101
|
+
} else if (__%%STATE%%__ === true && !_cond) {
|
|
102
|
+
__%%STATE%%__ = false;
|
|
103
|
+
__%%ELSE%%__
|
|
104
|
+
}
|
|
105
|
+
}`,Xe=`async function (info) {
|
|
106
|
+
"__%%DEBUG_TRIGGER%%__";
|
|
107
|
+
__%%CONDITIONS_VARS%%__
|
|
108
|
+
const _cond = __%%CONDITION%%__;
|
|
109
|
+
|
|
110
|
+
"__%%DEBUG_CONDITIONS%%__";
|
|
111
|
+
|
|
112
|
+
if (_cond) {
|
|
113
|
+
__%%THEN%%__
|
|
114
|
+
} else {
|
|
115
|
+
__%%ELSE%%__
|
|
116
|
+
}
|
|
117
|
+
}`,Ze=`async function (info) {
|
|
118
|
+
"__%%DEBUG_TRIGGER%%__";
|
|
119
|
+
__%%CONDITIONS_VARS%%__
|
|
120
|
+
const _cond = __%%CONDITION%%__;
|
|
121
|
+
|
|
122
|
+
"__%%DEBUG_CONDITIONS%%__";
|
|
123
|
+
|
|
124
|
+
if (__%%STATE%%__ === false && _cond) {
|
|
125
|
+
__%%STATE%%__ = true;
|
|
126
|
+
__%%THEN%%__
|
|
127
|
+
} else if (__%%STATE%%__ === true && !_cond) {
|
|
128
|
+
__%%STATE%%__ = false;
|
|
129
|
+
__%%ELSE%%__
|
|
130
|
+
}
|
|
131
|
+
}`,X=`function (_done) {
|
|
132
|
+
void (async () => {
|
|
133
|
+
"__%%DEBUG_TRIGGER%%__";
|
|
134
|
+
__%%CONDITIONS_VARS%%__
|
|
135
|
+
const _cond = __%%CONDITION%%__;
|
|
136
|
+
|
|
137
|
+
"__%%DEBUG_CONDITIONS%%__";
|
|
138
|
+
|
|
139
|
+
if (_cond) {
|
|
140
|
+
__%%THEN%%__
|
|
141
|
+
} else {
|
|
142
|
+
__%%ELSE%%__
|
|
143
|
+
}
|
|
144
|
+
})().catch(e => console.error(e)).finally(_done);
|
|
145
|
+
}`,Qe=`"__%%DEBUG_TRIGGER%%__";
|
|
146
|
+
__%%CONDITIONS_VARS%%__
|
|
147
|
+
const _cond = __%%CONDITION%%__;
|
|
148
|
+
|
|
149
|
+
"__%%DEBUG_CONDITIONS%%__";
|
|
150
|
+
|
|
151
|
+
if (_cond) {
|
|
152
|
+
__%%THEN%%__
|
|
153
|
+
} else {
|
|
154
|
+
__%%ELSE%%__
|
|
155
|
+
}`,Z={triggers:[],conditions:[[]],justCheck:!1,actions:{then:[],else:[]}};function $e(e,t,n){let r=[],i=e.triggers;i.length||(i=[{id:`TriggerScriptSave`}]);let a=[],o=[],s=e.conditions.find(e=>e.find(e=>e.tagCard===`()`));i.forEach((t,i)=>{let c=Q(t.id,n);if(c){var l;let u={trigger:t,condition:{index:0},justCheck:s?!1:e.justCheck||!e.conditions.length||!e.conditions[0].length,conditionsDebug:[],conditionsVars:[],conditionsStates:[]},d=c.compile(t,u),f=et(e.conditions,u,n),p=$(e.actions.then,u,n),m=$(e.actions.else,u,n);a.push(`cond${i}`),(l=u.prelines)!=null&&l.length&&u.prelines.forEach(e=>o.push(e)),d.includes(` __%%CONDITIONS_VARS%%__`)&&(u.conditionsVars=u.conditionsVars.map((e,t)=>t?` ${e}`:e),u.conditionsDebug=u.conditionsDebug.map((e,t)=>t?` ${e}`:e)),r.push(d.replace(`__%%CONDITIONS_VARS%%__`,u.conditionsVars.join(`
|
|
156
|
+
`)).replace(`"__%%DEBUG_CONDITIONS%%__";`,u.conditionsDebug.join(`
|
|
157
|
+
`)).replace(`__%%CONDITION%%__`,f).replace(`__%%THEN%%__`,p||`// ignore`).replace(`__%%ELSE%%__`,m||`// ignore`).replace(/__%%STATE%%__/g,`cond${i}`))}});let c=r.join(`
|
|
158
|
+
|
|
159
|
+
`);return(!e.justCheck||s)&&(c=`${a.map(e=>`let ${e} = false;`).join(`
|
|
160
|
+
`)}\n\n${c}`),o&&(c=`${o.join(`
|
|
161
|
+
`)}\n\n${c}`),c}function Q(e,t){return t.find(t=>t.getStaticData&&t.getStaticData().id===e)}function $(e,t,n){let r=[];return e==null||e.forEach(e=>{let i=Q(e.id,n);i&&r.push(i.compile(e,t))}),`\t\t${r.join(`
|
|
162
|
+
|
|
163
|
+
`)}`}function et(e,t,n){let r=[],i=0;return e==null||e.forEach(e=>{let a=[];e!=null&&e.length&&(e.forEach(e=>{let r=Q(e.id,n);r&&(t.condition.index=i++,a.push(r.compile(e,t)))}),r.push(`(${a.join(`) &&
|
|
164
|
+
(`)})`))}),r.length?r.length===1?r[0]||`true`:`(${r.join(`) || (`)})`:`true`}function tt(e,t){return $e(e,null,t)}function nt(e){if(!e)return Z;let t=e.split(`
|
|
165
|
+
`);try{let e=(t.pop()||``).replace(/^\/\//,``),n=JSON.parse(e);return n.triggers||(n=Z),n}catch{return Z}}function rt(e,t){let n=``,r=tt(e,t);return n+=r,n+=`\n/*\nconst demo = ${JSON.stringify(e,null,2).replace(/\*\//g,`* /`)};\n*/\n`,`${n}\n//${JSON.stringify(e)}`}export{J as _,Ze as a,R as b,Je as c,Ue as d,X as f,Be as g,Ve as h,Xe as i,Ye as l,rt as m,Ke as n,We as o,nt as p,qe as r,Ge as s,Qe as t,He as u,U as v,F as x,V as y};
|