From 2dcd7ac18745082bc5820d2d4018ea0c96db1735 Mon Sep 17 00:00:00 2001 From: Sebastian Helzle Date: Tue, 17 Sep 2024 10:55:47 +0200 Subject: [PATCH] TASK: Update compiled assets --- Resources/Public/Module.css | 2 +- Resources/Public/Module.css.map | 2 +- Resources/Public/Module.js | 2 +- Resources/Public/Module.js.map | 2 +- Resources/Public/Plugin.css | 4 ---- Resources/Public/Plugin.css.map | 2 +- Resources/Public/Plugin.js | 2 +- Resources/Public/Plugin.js.map | 2 +- 8 files changed, 7 insertions(+), 11 deletions(-) diff --git a/Resources/Public/Module.css b/Resources/Public/Module.css index 583b225..6770209 100644 --- a/Resources/Public/Module.css +++ b/Resources/Public/Module.css @@ -1,2 +1,2 @@ -.xzQyjW_iconWrap{width:var(--icon-size);max-height:var(--icon-size);text-align:center;display:inline-block}.xzQyjW_iconWrap svg{max-width:100%;max-height:inherit;display:inline-block}._345BVa_madeWithLove{gap:.5rem;text-decoration:none;display:flex}._345BVa_madeWithLove small{transition:color .1s ease-in-out}._345BVa_madeWithLove:hover small{color:var(--color-light-text-hover)}._345BVa_madeWithLove svg{width:var(--icon-size);height:auto;display:inline-block}.UnIlTW_commandBarFooter{border-top:1px solid var(--color-border);background-color:var(--footer-background);-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;gap:1rem;padding:.8rem 1rem;display:flex}.UnIlTW_breadcrumb,.UnIlTW_activity{--icon-size:.875em;gap:1rem;display:flex}.UnIlTW_activity svg{transform-origin:50%;animation-name:UnIlTW_spinner;animation-duration:2s;animation-iteration-count:infinite;display:inline-block}@keyframes UnIlTW_spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.jZLCTa_searchBox{appearance:none;color:currentColor;background:0 0;border:none;outline:none;flex:1;padding:.5rem;font-weight:300;font-size:1.1em!important}.jZLCTa_searchBox:disabled{color:var(--color-light-text);cursor:not-allowed}.jZLCTa_expandButton{height:100%;cursor:pointer;background:0 0;border:none;padding:0 1rem;display:block;position:absolute;right:0}.jZLCTa_expandButton svg{color:var(--grayLighter);transition:color .1s ease-in-out}.jZLCTa_expandButton:hover svg{color:var(--primaryBlue)}.jZLCTa_executeButton{height:100%;cursor:pointer;color:var(--grayLighter);background:0 0;border:none;padding:0 1rem;transition:color .1s ease-in-out;display:block;position:absolute;right:0}.jZLCTa_executeButton:hover svg{color:var(--primaryBlue)}.jZLCTa_commandQueryDirty{color:var(--warn)}._1JQCkq_commandBarHeader{border-bottom:1px solid var(--color-border);align-items:center;gap:1rem;padding:.3rem .5rem;display:flex;position:relative}._1JQCkq_backButton{background-color:var(--color-icon-bg);appearance:none;color:#fff;cursor:pointer;border:none;border-radius:50%;padding:.3rem;transition:background-color .1s ease-in-out;display:flex}._1JQCkq_backButton:hover{background-color:var(--color-icon-bg-hover)}.bB4DKG_commandListItem{cursor:pointer;border-radius:var(--border-radius-item);-webkit-user-select:none;user-select:none;--icon-size:.875em;background-color:#0000;align-items:baseline;gap:1em;padding:.4rem .6rem;transition:background-color .1s ease-in-out,opacity .1s ease-in-out;display:flex!important}.bB4DKG_commandListItem:hover{background-color:var(--color-item-hover)}.bB4DKG_highlighted{background-color:var(--color-item-highlighted)}.bB4DKG_label{flex-wrap:wrap;flex:1;align-items:baseline;gap:.2em 1em;display:flex}.bB4DKG_description{white-space:pre-wrap;font-size:.9em}.bB4DKG_type{max-width:30%}.bB4DKG_favouriteButton{visibility:hidden;cursor:pointer;color:var(--textSubtleLight);background:0 0;border:none;align-self:baseline;padding:0 .3rem;transition:color .1s ease-in-out}.bB4DKG_favouriteButton:hover{color:var(--primaryBlue)}.bB4DKG_commandListItem:hover .bB4DKG_favouriteButton{visibility:visible}.bB4DKG_isFavourite{color:var(--primaryBlue);visibility:visible;display:block}.z-zZnG_results{min-height:0;max-height:60vh;height:100%;transition:opacity .3s ease-in;overflow-y:auto}.z-zZnG_results h6{color:var(--color-light-text);-webkit-user-select:none;user-select:none;margin:.5rem;font-size:.9em;font-weight:400}.z-zZnG_results ul{flex-direction:column;gap:.5em;margin:0;padding:0;list-style:none;display:flex}.z-zZnG_noResults{padding:.5rem}.z-zZnG_disabled{pointer-events:none;-webkit-user-select:none;user-select:none;opacity:.5!important}.SDjQeG_commandResultsView{max-width:100%;overflow:auto}.SDjQeG_message{margin:0 0 1em;font-size:1em}.SDjQeG_results{min-height:0;max-height:60vh;height:100%;transition:opacity .3s ease-in;overflow-y:auto}.SDjQeG_results h6{color:var(--color-light-text);-webkit-user-select:none;user-select:none;margin:.5rem;font-size:.9em;font-weight:400}.SDjQeG_results ul{flex-direction:column;gap:.5em;margin:0;padding:0;list-style:none;display:flex}.Vkou1G_toggleButton{background-color:var(--grayDark);border:1px solid var(--grayMedium);color:var(--textSubtleLight);-webkit-user-select:none;user-select:none;cursor:pointer;border-radius:6px;align-items:center;gap:.5em;padding:2px .3rem 2px .5rem;line-height:1.4em;transition:all .1s ease-out;display:flex}.Vkou1G_toggleButton:disabled{opacity:.5;cursor:not-allowed}.Vkou1G_toggleButton:not(:disabled):hover{background-color:var(--grayLighter);color:var(--textOnWhite)}.Vkou1G_toggleButtonActive .Vkou1G_buttonIcon{background-color:var(--primaryBlue)}.Vkou1G_buttonIcon{background-color:var(--gray);color:var(--textOnGray);border-radius:3px;padding:1px 4px;font-size:80%;transition:background-color .1s ease-out}.Vkou1G_toggleButton:not(:disabled):hover .Vkou1G_buttonIcon{background-color:var(--primaryBlue)}.eoy0jW_commandBar{-webkit-backdrop-filter:blur(var(--dialog-blur));-webkit-backdrop-filter:blur(var(--dialog-blur));backdrop-filter:blur(var(--dialog-blur));background:var(--bar-background);border-radius:var(--border-radius-bar,5);border:1px solid var(--color-border);color:#fff;max-width:var(--bar-max-width);min-width:var(--bar-min-width);max-height:90vh;width:var(--bar-width);pointer-events:all;flex-direction:column;margin:0;padding:0;transition:width .1s ease-out;display:flex;position:absolute;top:50%;left:50%;overflow:hidden;translate:-50% -50%;box-shadow:0 3px 10px #00000080}.eoy0jW_commandBar.eoy0jW_hasResults{width:var(--bar-width-expanded)}.eoy0jW_commandBar small{color:var(--color-light-text);font-size:90%}.eoy0jW_commandBar ::-webkit-scrollbar{width:4px;height:4px}.eoy0jW_commandBar ::-webkit-scrollbar-track{background-color:#0000}.eoy0jW_commandBar ::-webkit-scrollbar-thumb{background-color:var(--grayLight)}.eoy0jW_commandBar ::-webkit-scrollbar-corner{background-color:var(--grayDark)}.eoy0jW_resultsWrap{transform-origin:top;grid-template-rows:0fr;transition:grid-template-rows .2s ease-in;display:grid;overflow:auto}.eoy0jW_resultsWrap>*{opacity:0}.eoy0jW_resultsWrap.eoy0jW_expanded{grid-template-rows:1fr}.eoy0jW_resultsWrap.eoy0jW_expanded>*{opacity:1;padding:.5rem}.eoy0jW_resultsWrap.eoy0jW_split{grid-template-columns:1fr 1fr}.o4liXq_pluginWrap{height:41px;align-items:center;margin:0 1rem;line-height:20px;display:flex;font-size:14px!important}.o4liXq_fullScreenLayer{width:100vw;height:100vh;pointer-events:none;z-index:9999;display:none;position:absolute;top:0;left:0}.o4liXq_open{display:block}@keyframes o4liXq_spin{0%{transform:rotate(0)}to{transform:rotate(359deg)}}.o4liXq_spin{animation:2s linear infinite o4liXq_spin}.rrAaca_commandBarTheme{--bar-min-width:600px;--bar-max-width:90vw;--bar-width:30vw;--bar-width-expanded:60vw;--bar-background:#000c;--footer-background:#000c;--color-shadow:#ffffffb3;--color-light-text:#fff9;--color-light-text-hover:#fffc;--color-icon-bg:#fff3;--color-icon-bg-hover:#fff6;--color-border:#fff3;--color-item-highlighted:#ffffff26;--color-item-hover:#ffffff0d;--border-radius-bar:.6rem;--border-radius-item:.4rem;--icon-size:1.125em;--dialog-blur:5px;--grayLight:#3f3f3f;--grayLighter:#eee;--grayMedium:#323232;--grayDark:#222;--gray:#555;--textSubtleLight:#adadad;--textOnGray:#fff;--textOnWhite:#252525;--primaryBlue:#00adee;--success:#00a338;--warn:#ff8700} +.xzQyjW_iconWrap{width:var(--icon-size);max-height:var(--icon-size);text-align:center;display:inline-block}.xzQyjW_iconWrap svg{max-width:100%;max-height:inherit;display:inline-block}._345BVa_madeWithLove{gap:.5rem;text-decoration:none;display:flex}._345BVa_madeWithLove small{transition:color .1s ease-in-out}._345BVa_madeWithLove:hover small{color:var(--color-light-text-hover)}._345BVa_madeWithLove svg{width:var(--icon-size);height:auto;display:inline-block}.UnIlTW_commandBarFooter{border-top:1px solid var(--color-border);background-color:var(--footer-background);-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;gap:1rem;padding:.8rem 1rem;display:flex}.UnIlTW_breadcrumb,.UnIlTW_activity{--icon-size:.875em;gap:1rem;display:flex}.UnIlTW_activity svg{transform-origin:50%;animation-name:UnIlTW_spinner;animation-duration:2s;animation-iteration-count:infinite;display:inline-block}@keyframes UnIlTW_spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.jZLCTa_searchBox{appearance:none;color:currentColor;background:0 0;border:none;outline:none;flex:1;padding:.5rem;font-weight:300;font-size:1.1em!important}.jZLCTa_searchBox:disabled{color:var(--color-light-text);cursor:not-allowed}.jZLCTa_expandButton{height:100%;cursor:pointer;background:0 0;border:none;padding:0 1rem;display:block;position:absolute;right:0}.jZLCTa_expandButton svg{color:var(--grayLighter);transition:color .1s ease-in-out}.jZLCTa_expandButton:hover svg{color:var(--primaryBlue)}.jZLCTa_executeButton{height:100%;cursor:pointer;color:var(--grayLighter);background:0 0;border:none;padding:0 1rem;transition:color .1s ease-in-out;display:block;position:absolute;right:0}.jZLCTa_executeButton:hover svg{color:var(--primaryBlue)}.jZLCTa_commandQueryDirty{color:var(--warn)}._1JQCkq_commandBarHeader{border-bottom:1px solid var(--color-border);align-items:center;gap:1rem;padding:.3rem .5rem;display:flex;position:relative}._1JQCkq_backButton{background-color:var(--color-icon-bg);appearance:none;color:#fff;cursor:pointer;border:none;border-radius:50%;padding:.3rem;transition:background-color .1s ease-in-out;display:flex}._1JQCkq_backButton:hover{background-color:var(--color-icon-bg-hover)}.bB4DKG_commandListItem{cursor:pointer;border-radius:var(--border-radius-item);-webkit-user-select:none;user-select:none;--icon-size:.875em;background-color:#0000;align-items:baseline;gap:1em;padding:.4rem .6rem;transition:background-color .1s ease-in-out,opacity .1s ease-in-out;display:flex!important}.bB4DKG_commandListItem:hover{background-color:var(--color-item-hover)}.bB4DKG_highlighted{background-color:var(--color-item-highlighted)}.bB4DKG_label{flex-wrap:wrap;flex:1;align-items:baseline;gap:.2em 1em;display:flex}.bB4DKG_description{white-space:pre-wrap;font-size:.9em}.bB4DKG_type{max-width:30%}.bB4DKG_favouriteButton{visibility:hidden;cursor:pointer;color:var(--textSubtleLight);background:0 0;border:none;align-self:baseline;padding:0 .3rem;transition:color .1s ease-in-out}.bB4DKG_favouriteButton:hover{color:var(--primaryBlue)}.bB4DKG_commandListItem:hover .bB4DKG_favouriteButton{visibility:visible}.bB4DKG_isFavourite{color:var(--primaryBlue);visibility:visible;display:block}.z-zZnG_results{min-height:0;max-height:60vh;height:100%;transition:opacity .3s ease-in;overflow-y:auto}.z-zZnG_results h6{color:var(--color-light-text);-webkit-user-select:none;user-select:none;margin:.5rem;font-size:.9em;font-weight:400}.z-zZnG_results ul{flex-direction:column;gap:.5em;margin:0;padding:0;list-style:none;display:flex}.z-zZnG_noResults{padding:.5rem}.z-zZnG_disabled{pointer-events:none;-webkit-user-select:none;user-select:none;opacity:.5!important}.SDjQeG_commandResultsView{max-width:100%;overflow:auto}.SDjQeG_message{margin:0 0 1em;font-size:1em}.SDjQeG_results{min-height:0;max-height:60vh;height:100%;transition:opacity .3s ease-in;overflow-y:auto}.SDjQeG_results h6{color:var(--color-light-text);-webkit-user-select:none;user-select:none;margin:.5rem;font-size:.9em;font-weight:400}.SDjQeG_results ul{flex-direction:column;gap:.5em;margin:0;padding:0;list-style:none;display:flex}.Vkou1G_toggleButton{background-color:var(--grayDark);border:1px solid var(--grayMedium);color:var(--textSubtleLight);-webkit-user-select:none;user-select:none;cursor:pointer;border-radius:6px;align-items:center;gap:.5em;padding:2px .3rem 2px .5rem;line-height:1.4em;transition:all .1s ease-out;display:flex}.Vkou1G_toggleButton:disabled{opacity:.5;cursor:not-allowed}.Vkou1G_toggleButton:not(:disabled):hover{background-color:var(--grayLighter);color:var(--textOnWhite)}.Vkou1G_toggleButtonActive .Vkou1G_buttonIcon{background-color:var(--primaryBlue)}.Vkou1G_buttonIcon{background-color:var(--gray);color:var(--textOnGray);border-radius:3px;padding:1px 4px;font-size:80%;transition:background-color .1s ease-out}.Vkou1G_toggleButton:not(:disabled):hover .Vkou1G_buttonIcon{background-color:var(--primaryBlue)}.eoy0jW_commandBar{-webkit-backdrop-filter:blur(var(--dialog-blur));-webkit-backdrop-filter:blur(var(--dialog-blur));backdrop-filter:blur(var(--dialog-blur));background:var(--bar-background);border-radius:var(--border-radius-bar,5);border:1px solid var(--color-border);color:#fff;max-width:var(--bar-max-width);min-width:var(--bar-min-width);max-height:90vh;width:var(--bar-width);pointer-events:all;flex-direction:column;margin:0;padding:0;transition:width .1s ease-out;display:flex;position:absolute;top:50%;left:50%;overflow:hidden;translate:-50% -50%;box-shadow:0 3px 10px #00000080}.eoy0jW_commandBar.eoy0jW_hasResults{width:var(--bar-width-expanded)}.eoy0jW_commandBar small{color:var(--color-light-text);font-size:90%}.eoy0jW_commandBar ::-webkit-scrollbar{width:4px;height:4px}.eoy0jW_commandBar ::-webkit-scrollbar-track{background-color:#0000}.eoy0jW_commandBar ::-webkit-scrollbar-thumb{background-color:var(--grayLight)}.eoy0jW_commandBar ::-webkit-scrollbar-corner{background-color:var(--grayDark)}.eoy0jW_resultsWrap{transform-origin:top;grid-template-rows:0fr;transition:grid-template-rows .2s ease-in;display:grid;overflow:auto}.eoy0jW_resultsWrap>*{opacity:0}.eoy0jW_resultsWrap.eoy0jW_expanded{grid-template-rows:1fr}.eoy0jW_resultsWrap.eoy0jW_expanded>*{opacity:1;padding:.5rem}.o4liXq_pluginWrap{height:41px;align-items:center;margin:0 1rem;line-height:20px;display:flex;font-size:14px!important}.o4liXq_fullScreenLayer{width:100vw;height:100vh;pointer-events:none;z-index:9999;display:none;position:absolute;top:0;left:0}.o4liXq_open{display:block}@keyframes o4liXq_spin{0%{transform:rotate(0)}to{transform:rotate(359deg)}}.o4liXq_spin{animation:2s linear infinite o4liXq_spin}.rrAaca_commandBarTheme{--bar-min-width:600px;--bar-max-width:90vw;--bar-width:30vw;--bar-width-expanded:60vw;--bar-background:#000c;--footer-background:#000c;--color-shadow:#ffffffb3;--color-light-text:#fff9;--color-light-text-hover:#fffc;--color-icon-bg:#fff3;--color-icon-bg-hover:#fff6;--color-border:#fff3;--color-item-highlighted:#ffffff26;--color-item-hover:#ffffff0d;--border-radius-bar:.6rem;--border-radius-item:.4rem;--icon-size:1.125em;--dialog-blur:5px;--grayLight:#3f3f3f;--grayLighter:#eee;--grayMedium:#323232;--grayDark:#222;--gray:#555;--textSubtleLight:#adadad;--textOnGray:#fff;--textOnWhite:#252525;--primaryBlue:#00adee;--success:#00a338;--warn:#ff8700} /*# sourceMappingURL=Module.css.map */ diff --git a/Resources/Public/Module.css.map b/Resources/Public/Module.css.map index 4b53198..40875c6 100644 --- a/Resources/Public/Module.css.map +++ b/Resources/Public/Module.css.map @@ -1 +1 @@ -{"mappings":"ACAA,2GAOA,4ECPA,kEAMA,6DAIA,sEAIA,kFCdA,gPAWA,6EAYA,sJAOA,8EC9BA,4JAYA,4EAKA,kIAWA,mFAKA,wDAIA,6LAgBA,yDAIA,4CCzDA,qJASA,yMAYA,sECrBA,+SAaA,uEAIA,mEASA,mFAQA,wDAKA,2BAIA,sLAUA,uDAIA,yEAIA,8EC7DA,wGAQA,uIAQA,kGASA,gCAIA,oGC7BA,wDAKA,6CAKA,wGAQA,uIAQA,kGC1BA,oTAeA,4DAKA,uGAKA,kFAIA,iKASA,iGCtCA,2kBAwBA,qEAIA,qEAKA,4DAKA,oEAIA,+EAIA,+EAIA,qIAQA,gCAIA,2DAIA,8DAIA,+DCtEA,uHASA,8HAWA,2BAIA,2EAKA,sDC7BA","sources":["Module.css","packages/commandbar/src/components/IconWrapper/IconWrapper.module.css","packages/commandbar/src/components/CommandBarFooter/Branding.module.css","packages/commandbar/src/components/CommandBarFooter/CommandBarFooter.module.css","packages/commandbar/src/components/SearchBox/SearchBox.module.css","packages/commandbar/src/components/CommandBarHeader/CommandBarHeader.module.css","packages/commandbar/src/components/CommandListItem/CommandListItem.module.css","packages/commandbar/src/components/CommandList/CommandListing.module.css","packages/commandbar/src/components/CommandResultsView/CommandResultsView.module.css","packages/commandbar/src/components/ToggleButton/ToggleButton.module.css","packages/commandbar/src/components/CommandBarDialog/CommandBarDialog.module.css","packages/module-plugin/src/ModulePlugin.module.css","packages/commandbar/src/Theme.module.css"],"sourcesContent":[".xzQyjW_iconWrap {\n width: var(--icon-size);\n max-height: var(--icon-size);\n text-align: center;\n display: inline-block;\n}\n\n.xzQyjW_iconWrap svg {\n max-width: 100%;\n max-height: inherit;\n display: inline-block;\n}\n\n._345BVa_madeWithLove {\n gap: .5rem;\n text-decoration: none;\n display: flex;\n}\n\n._345BVa_madeWithLove small {\n transition: color .1s ease-in-out;\n}\n\n._345BVa_madeWithLove:hover small {\n color: var(--color-light-text-hover);\n}\n\n._345BVa_madeWithLove svg {\n width: var(--icon-size);\n height: auto;\n display: inline-block;\n}\n\n.UnIlTW_commandBarFooter {\n border-top: 1px solid var(--color-border);\n background-color: var(--footer-background);\n -webkit-user-select: none;\n user-select: none;\n justify-content: space-between;\n align-items: center;\n gap: 1rem;\n padding: .8rem 1rem;\n display: flex;\n}\n\n.UnIlTW_breadcrumb, .UnIlTW_activity {\n --icon-size: .875em;\n gap: 1rem;\n display: flex;\n}\n\n.UnIlTW_activity svg {\n transform-origin: 50%;\n animation-name: UnIlTW_spinner;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n display: inline-block;\n}\n\n@keyframes UnIlTW_spinner {\n 0% {\n transform: rotate(0);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.jZLCTa_searchBox {\n appearance: none;\n color: currentColor;\n background: none;\n border: none;\n outline: none;\n flex: 1;\n padding: .5rem;\n font-weight: 300;\n font-size: 1.1em !important;\n}\n\n.jZLCTa_searchBox:disabled {\n color: var(--color-light-text);\n cursor: not-allowed;\n}\n\n.jZLCTa_expandButton {\n height: 100%;\n cursor: pointer;\n background: none;\n border: none;\n padding: 0 1rem;\n display: block;\n position: absolute;\n right: 0;\n}\n\n.jZLCTa_expandButton svg {\n color: var(--grayLighter);\n transition: color .1s ease-in-out;\n}\n\n.jZLCTa_expandButton:hover svg {\n color: var(--primaryBlue);\n}\n\n.jZLCTa_executeButton {\n height: 100%;\n cursor: pointer;\n color: var(--grayLighter);\n background: none;\n border: none;\n padding: 0 1rem;\n transition: color .1s ease-in-out;\n display: block;\n position: absolute;\n right: 0;\n}\n\n.jZLCTa_executeButton:hover svg {\n color: var(--primaryBlue);\n}\n\n.jZLCTa_commandQueryDirty {\n color: var(--warn);\n}\n\n._1JQCkq_commandBarHeader {\n border-bottom: 1px solid var(--color-border);\n align-items: center;\n gap: 1rem;\n padding: .3rem .5rem;\n display: flex;\n position: relative;\n}\n\n._1JQCkq_backButton {\n background-color: var(--color-icon-bg);\n appearance: none;\n color: #fff;\n cursor: pointer;\n border: none;\n border-radius: 50%;\n padding: .3rem;\n transition: background-color .1s ease-in-out;\n display: flex;\n}\n\n._1JQCkq_backButton:hover {\n background-color: var(--color-icon-bg-hover);\n}\n\n.bB4DKG_commandListItem {\n cursor: pointer;\n border-radius: var(--border-radius-item);\n -webkit-user-select: none;\n user-select: none;\n --icon-size: .875em;\n background-color: #0000;\n align-items: baseline;\n gap: 1em;\n padding: .4rem .6rem;\n transition: background-color .1s ease-in-out, opacity .1s ease-in-out;\n display: flex !important;\n}\n\n.bB4DKG_commandListItem:hover {\n background-color: var(--color-item-hover);\n}\n\n.bB4DKG_highlighted {\n background-color: var(--color-item-highlighted);\n}\n\n.bB4DKG_disabled {\n opacity: .5;\n cursor: not-allowed;\n}\n\n.bB4DKG_label {\n flex-wrap: wrap;\n flex: 1;\n align-items: baseline;\n gap: .2em 1em;\n display: flex;\n}\n\n.bB4DKG_description {\n white-space: pre-wrap;\n font-size: .9em;\n}\n\n.bB4DKG_type {\n max-width: 30%;\n}\n\n.bB4DKG_favouriteButton {\n visibility: hidden;\n cursor: pointer;\n color: var(--textSubtleLight);\n background: none;\n border: none;\n align-self: baseline;\n padding: 0 .3rem;\n transition: color .1s ease-in-out;\n}\n\n.bB4DKG_favouriteButton:hover {\n color: var(--primaryBlue);\n}\n\n.bB4DKG_commandListItem:hover .bB4DKG_favouriteButton {\n visibility: visible;\n}\n\n.bB4DKG_isFavourite {\n color: var(--primaryBlue);\n visibility: visible;\n display: block;\n}\n\n.z-zZnG_results {\n min-height: 0;\n max-height: 60vh;\n height: 100%;\n transition: opacity .3s ease-in;\n overflow-y: auto;\n}\n\n.z-zZnG_results h6 {\n color: var(--color-light-text);\n -webkit-user-select: none;\n user-select: none;\n margin: .5rem;\n font-size: .9em;\n font-weight: normal;\n}\n\n.z-zZnG_results ul {\n flex-direction: column;\n gap: .5em;\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n}\n\n.z-zZnG_noResults {\n padding: .5rem;\n}\n\n.z-zZnG_disabled {\n pointer-events: none;\n -webkit-user-select: none;\n user-select: none;\n opacity: .5 !important;\n}\n\n.SDjQeG_commandResultsView {\n max-width: 100%;\n overflow: auto;\n}\n\n.SDjQeG_message {\n margin: 0 0 1em;\n font-size: 1em;\n}\n\n.SDjQeG_results {\n min-height: 0;\n max-height: 60vh;\n height: 100%;\n transition: opacity .3s ease-in;\n overflow-y: auto;\n}\n\n.SDjQeG_results h6 {\n color: var(--color-light-text);\n -webkit-user-select: none;\n user-select: none;\n margin: .5rem;\n font-size: .9em;\n font-weight: normal;\n}\n\n.SDjQeG_results ul {\n flex-direction: column;\n gap: .5em;\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n}\n\n.SDjQeG_noResults {\n padding: .5rem;\n}\n\n.SDjQeG_disabled {\n pointer-events: none;\n -webkit-user-select: none;\n user-select: none;\n opacity: .5 !important;\n}\n\n.Vkou1G_toggleButton {\n background-color: var(--grayDark);\n border: 1px solid var(--grayMedium);\n color: var(--textSubtleLight);\n -webkit-user-select: none;\n user-select: none;\n cursor: pointer;\n border-radius: 6px;\n align-items: center;\n gap: .5em;\n padding: 2px .3rem 2px .5rem;\n line-height: 1.4em;\n transition: all .1s ease-out;\n display: flex;\n}\n\n.Vkou1G_toggleButton:disabled {\n opacity: .5;\n cursor: not-allowed;\n}\n\n.Vkou1G_toggleButton:not(:disabled):hover {\n background-color: var(--grayLighter);\n color: var(--textOnWhite);\n}\n\n.Vkou1G_toggleButtonActive .Vkou1G_buttonIcon {\n background-color: var(--primaryBlue);\n}\n\n.Vkou1G_buttonIcon {\n background-color: var(--gray);\n color: var(--textOnGray);\n border-radius: 3px;\n padding: 1px 4px;\n font-size: 80%;\n transition: background-color .1s ease-out;\n}\n\n.Vkou1G_toggleButton:not(:disabled):hover .Vkou1G_buttonIcon {\n background-color: var(--primaryBlue);\n}\n\n.eoy0jW_commandBar {\n -webkit-backdrop-filter: blur(var(--dialog-blur));\n backdrop-filter: blur(var(--dialog-blur));\n background: var(--bar-background);\n border-radius: var(--border-radius-bar, 5);\n border: 1px solid var(--color-border);\n color: #fff;\n max-width: var(--bar-max-width);\n min-width: var(--bar-min-width);\n max-height: 90vh;\n width: var(--bar-width);\n pointer-events: all;\n flex-direction: column;\n margin: 0;\n padding: 0;\n transition: width .1s ease-out;\n display: flex;\n position: absolute;\n top: 50%;\n left: 50%;\n overflow: hidden;\n translate: -50% -50%;\n box-shadow: 0 3px 10px #00000080;\n}\n\n.eoy0jW_commandBar.eoy0jW_hasResults {\n width: var(--bar-width-expanded);\n}\n\n.eoy0jW_commandBar small {\n color: var(--color-light-text);\n font-size: 90%;\n}\n\n.eoy0jW_commandBar ::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n}\n\n.eoy0jW_commandBar ::-webkit-scrollbar-track {\n background-color: #0000;\n}\n\n.eoy0jW_commandBar ::-webkit-scrollbar-thumb {\n background-color: var(--grayLight);\n}\n\n.eoy0jW_commandBar ::-webkit-scrollbar-corner {\n background-color: var(--grayDark);\n}\n\n.eoy0jW_resultsWrap {\n transform-origin: top;\n grid-template-rows: 0fr;\n transition: grid-template-rows .2s ease-in;\n display: grid;\n overflow: auto;\n}\n\n.eoy0jW_resultsWrap > * {\n opacity: 0;\n}\n\n.eoy0jW_resultsWrap.eoy0jW_expanded {\n grid-template-rows: 1fr;\n}\n\n.eoy0jW_resultsWrap.eoy0jW_expanded > * {\n opacity: 1;\n padding: .5rem;\n}\n\n.eoy0jW_resultsWrap.eoy0jW_split {\n grid-template-columns: 1fr 1fr;\n}\n\n.o4liXq_pluginWrap {\n height: 41px;\n align-items: center;\n margin: 0 1rem;\n line-height: 20px;\n display: flex;\n font-size: 14px !important;\n}\n\n.o4liXq_fullScreenLayer {\n width: 100vw;\n height: 100vh;\n pointer-events: none;\n z-index: 9999;\n display: none;\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.o4liXq_open {\n display: block;\n}\n\n@keyframes o4liXq_spin {\n 0% {\n transform: rotate(0);\n }\n\n 100% {\n transform: rotate(359deg);\n }\n}\n\n.o4liXq_spin {\n animation: 2s linear infinite o4liXq_spin;\n}\n\n.rrAaca_commandBarTheme {\n --bar-min-width: 600px;\n --bar-max-width: 90vw;\n --bar-width: 30vw;\n --bar-width-expanded: 60vw;\n --bar-background: #000c;\n --footer-background: #000c;\n --color-shadow: #ffffffb3;\n --color-light-text: #fff9;\n --color-light-text-hover: #fffc;\n --color-icon-bg: #fff3;\n --color-icon-bg-hover: #fff6;\n --color-border: #fff3;\n --color-item-highlighted: #ffffff26;\n --color-item-hover: #ffffff0d;\n --border-radius-bar: .6rem;\n --border-radius-item: .4rem;\n --icon-size: 1.125em;\n --dialog-blur: 5px;\n --grayLight: #3f3f3f;\n --grayLighter: #eee;\n --grayMedium: #323232;\n --grayDark: #222;\n --gray: #555;\n --textSubtleLight: #adadad;\n --textOnGray: #fff;\n --textOnWhite: #252525;\n --primaryBlue: #00adee;\n --success: #00a338;\n --warn: #ff8700;\n}\n\n/*# sourceMappingURL=Module.css.map */\n",".iconWrap {\n width: var(--icon-size);\n max-height: var(--icon-size);\n display: inline-block;\n text-align: center;\n}\n\n.iconWrap svg {\n max-width: 100%;\n max-height: inherit;\n display: inline-block;\n}\n",".madeWithLove {\n display: flex;\n text-decoration: none;\n gap: 0.5rem;\n}\n\n.madeWithLove small {\n transition: color 0.1s ease-in-out;\n}\n\n.madeWithLove:hover small {\n color: var(--color-light-text-hover);\n}\n\n.madeWithLove svg {\n display: inline-block;\n width: var(--icon-size);\n height: auto;\n}\n",".commandBarFooter {\n border-top: 1px solid var(--color-border);\n background-color: var(--footer-background);\n padding: 0.8rem 1rem;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 1rem;\n user-select: none;\n}\n\n.breadcrumb {\n display: flex;\n gap: 1rem;\n --icon-size: 0.875em;\n}\n\n.activity {\n display: flex;\n gap: 1rem;\n --icon-size: 0.875em;\n}\n\n.activity svg {\n animation-name: spinner;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n transform-origin: 50% 50%;\n display: inline-block;\n}\n@keyframes spinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n",".searchBox {\n appearance: none;\n background: none;\n border: none;\n color: currentColor;\n font-size: 1.1em !important; /* Fix to prevent Neos.UI css from forcing the font size to 14px */\n font-weight: 300;\n outline: none;\n padding: 0.5rem;\n flex: 1;\n}\n\n.searchBox:disabled {\n color: var(--color-light-text);\n cursor: not-allowed;\n}\n\n.expandButton {\n position: absolute;\n padding: 0 1rem;\n height: 100%;\n right: 0;\n display: block;\n background: none;\n border: none;\n cursor: pointer;\n}\n\n.expandButton svg {\n color: var(--grayLighter);\n transition: color 0.1s ease-in-out;\n}\n\n.expandButton:hover svg {\n color: var(--primaryBlue);\n}\n\n.executeButton {\n position: absolute;\n padding: 0 1rem;\n height: 100%;\n right: 0;\n display: block;\n background: none;\n border: none;\n cursor: pointer;\n}\n\n.executeButton {\n color: var(--grayLighter);\n transition: color 0.1s ease-in-out;\n}\n\n.executeButton:hover svg {\n color: var(--primaryBlue);\n}\n\n.commandQueryDirty {\n color: var(--warn);\n}\n",".commandBarHeader {\n display: flex;\n align-items: center;\n gap: 1rem;\n padding: 0.3rem 0.5rem;\n border-bottom: 1px solid var(--color-border);\n position: relative;\n}\n\n.backButton {\n padding: 0.3rem;\n background-color: var(--color-icon-bg);\n border-radius: 50%;\n appearance: none;\n border: none;\n color: white;\n cursor: pointer;\n transition: background-color 0.1s ease-in-out;\n display: flex;\n}\n\n.backButton:hover {\n background-color: var(--color-icon-bg-hover);\n}\n",".commandListItem {\n cursor: pointer;\n display: flex !important; /* Necessary due to the neos header bar styling */\n gap: 1em;\n padding: 0.4rem 0.6rem;\n align-items: baseline;\n border-radius: var(--border-radius-item);\n transition: background-color 0.1s ease-in-out, opacity 0.1s ease-in-out;\n background-color: transparent;\n user-select: none;\n --icon-size: 0.875em;\n}\n\n.commandListItem:hover {\n background-color: var(--color-item-hover);\n}\n\n.highlighted {\n background-color: var(--color-item-highlighted);\n}\n\n.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.label {\n display: flex;\n flex-wrap: wrap;\n flex: 1;\n gap: 0.2em 1em;\n align-items: baseline;\n}\n\n.description {\n white-space:pre-wrap;\n font-size: 0.9em;\n}\n\n.type {\n max-width: 30%;\n}\n\n.favouriteButton {\n visibility: hidden;\n border: none;\n background: none;\n cursor: pointer;\n transition: color 0.1s ease-in-out;\n color: var(--textSubtleLight);\n align-self: baseline;\n padding: 0 0.3rem;\n}\n.favouriteButton:hover {\n color: var(--primaryBlue);\n}\n\n.commandListItem:hover .favouriteButton {\n visibility: visible;\n}\n\n.isFavourite {\n display: block;\n color: var(--primaryBlue);\n visibility: visible;\n}\n",".results {\n min-height: 0;\n transition: opacity 0.3s ease-in;\n overflow-y: auto;\n max-height: 60vh;\n height: 100%;\n}\n\n.results h6 {\n color: var(--color-light-text);\n margin: 0.5rem;\n font-size: 0.9em;\n font-weight: normal;\n user-select: none;\n}\n\n.results ul {\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: 0.5em;\n margin: 0;\n}\n\n.noResults {\n padding: 0.5rem;\n}\n\n.disabled {\n opacity: 0.5 !important;\n pointer-events: none;\n user-select: none;\n}\n",".commandResultsView {\n max-width: 100%;\n overflow: auto;\n}\n\n.message {\n font-size: 1em;\n margin: 0 0 1em;\n}\n\n.results {\n min-height: 0;\n transition: opacity 0.3s ease-in;\n overflow-y: auto;\n max-height: 60vh;\n height: 100%;\n}\n\n.results h6 {\n color: var(--color-light-text);\n margin: 0.5rem;\n font-size: 0.9em;\n font-weight: normal;\n user-select: none;\n}\n\n.results ul {\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: 0.5em;\n margin: 0;\n}\n\n.noResults {\n padding: 0.5rem;\n}\n\n.disabled {\n opacity: 0.5 !important;\n pointer-events: none;\n user-select: none;\n}\n",".toggleButton {\n background-color: var(--grayDark);\n border: 1px solid var(--grayMedium);\n color: var(--textSubtleLight);\n border-radius: 6px;\n display: flex;\n align-items: center;\n gap: 0.5em;\n transition: 0.1s ease-out;\n user-select: none;\n padding: 2px 0.3rem 2px 0.5rem;\n cursor: pointer;\n line-height: 1.4em;\n}\n\n.toggleButton:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.toggleButton:not(:disabled):hover {\n background-color: var(--grayLighter);\n color: var(--textOnWhite);\n}\n\n.toggleButtonActive .buttonIcon {\n background-color: var(--primaryBlue);\n}\n\n.buttonIcon {\n background-color: var(--gray);\n border-radius: 3px;\n color: var(--textOnGray);\n font-size: 80%;\n padding: 1px 4px;\n transition: background-color 0.1s ease-out;\n}\n\n.toggleButton:not(:disabled):hover .buttonIcon {\n background-color: var(--primaryBlue);\n}\n",".commandBar {\n backdrop-filter: blur(var(--dialog-blur));\n background: var(--bar-background);\n border-radius: var(--border-radius-bar, 5);\n border: 1px solid var(--color-border);\n box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);\n color: white;\n display: flex;\n flex-direction: column;\n left: 50%;\n margin: 0;\n max-width: var(--bar-max-width);\n min-width: var(--bar-min-width);\n max-height: 90vh;\n overflow: hidden;\n position: absolute;\n padding: 0;\n top: 50%;\n translate: -50% -50%;\n width: var(--bar-width);\n pointer-events: all;\n transition: width 0.1s ease-out;\n}\n\n.commandBar.hasResults {\n width: var(--bar-width-expanded);\n}\n\n.commandBar small {\n color: var(--color-light-text);\n font-size: 90%;\n}\n\n.commandBar ::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n}\n\n.commandBar ::-webkit-scrollbar-track {\n background-color: transparent;\n}\n\n.commandBar ::-webkit-scrollbar-thumb {\n background-color: var(--grayLight);\n}\n\n.commandBar ::-webkit-scrollbar-corner {\n background-color: var(--grayDark);\n}\n\n.resultsWrap {\n display: grid;\n grid-template-rows: 0fr;\n transform-origin: top center;\n transition: grid-template-rows 0.2s ease-in;\n overflow: auto;\n}\n\n.resultsWrap > * {\n opacity: 0;\n}\n\n.resultsWrap.expanded {\n grid-template-rows: 1fr;\n}\n\n.resultsWrap.expanded > * {\n opacity: 1;\n padding: 0.5rem;\n}\n.resultsWrap.split {\n grid-template-columns: 1fr 1fr;\n}\n",".pluginWrap {\n display: flex;\n align-items: center;\n height: 41px;\n font-size: 14px !important;\n line-height: 20px;\n margin: 0 1rem;\n}\n\n.fullScreenLayer {\n width: 100vw;\n height: 100vh;\n position: absolute;\n left: 0;\n top: 0;\n pointer-events: none;\n z-index: 9999;\n display: none;\n}\n\n.open {\n display: block;\n}\n\n@keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(359deg); }\n}\n\n.spin {\n animation: spin 2s linear infinite;\n}\n",".commandBarTheme {\n --bar-min-width: 600px;\n --bar-max-width: 90vw;\n --bar-width: 30vw;\n --bar-width-expanded: 60vw;\n --bar-background: rgba(0, 0, 0, 0.8);\n --footer-background: rgba(0, 0, 0, 0.8);\n --color-shadow: rgba(255, 255, 255, 0.7);\n --color-light-text: rgba(255, 255, 255, 0.6);\n --color-light-text-hover: rgba(255, 255, 255, 0.8);\n --color-icon-bg: rgba(255, 255, 255, 0.2);\n --color-icon-bg-hover: rgba(255, 255, 255, 0.4);\n --color-border: rgba(255, 255, 255, 0.2);\n --color-item-highlighted: rgba(255, 255, 255, 0.15);\n --color-item-hover: rgba(255, 255, 255, 0.05);\n --border-radius-bar: 0.6rem;\n --border-radius-item: 0.4rem;\n --icon-size: 1.125em;\n --dialog-blur: 5px;\n\n /* Neos UI colors */\n --grayLight: #3f3f3f;\n --grayLighter: #eee;\n --grayMedium: #323232;\n --grayDark: #222;\n --gray: #555;\n --textSubtleLight: #adadad;\n --textOnGray: #fff;\n --textOnWhite: #252525;\n --primaryBlue: #00adee;\n --success: #00a338;\n --warn: #ff8700;\n}\n"],"names":[],"version":3,"file":"Module.css.map"} \ No newline at end of file +{"mappings":"ACAA,2GAOA,4ECPA,kEAMA,6DAIA,sEAIA,kFCdA,gPAWA,6EAYA,sJAOA,8EC9BA,4JAYA,4EAKA,kIAWA,mFAKA,wDAIA,6LAgBA,yDAIA,4CCzDA,qJASA,yMAYA,sECrBA,+SAaA,uEAIA,mEASA,mFAQA,wDAKA,2BAIA,sLAUA,uDAIA,yEAIA,8EC7DA,wGAQA,uIAQA,kGASA,gCAIA,oGC7BA,wDAKA,6CAKA,wGAQA,uIAQA,kGC1BA,oTAeA,4DAKA,uGAKA,kFAIA,iKASA,iGCtCA,2kBAwBA,qEAIA,qEAKA,4DAKA,oEAIA,+EAIA,+EAIA,qIAQA,gCAIA,2DAIA,8DClEA,uHASA,8HAWA,2BAIA,2EAKA,sDC7BA","sources":["Module.css","packages/commandbar/src/components/IconWrapper/IconWrapper.module.css","packages/commandbar/src/components/CommandBarFooter/Branding.module.css","packages/commandbar/src/components/CommandBarFooter/CommandBarFooter.module.css","packages/commandbar/src/components/SearchBox/SearchBox.module.css","packages/commandbar/src/components/CommandBarHeader/CommandBarHeader.module.css","packages/commandbar/src/components/CommandListItem/CommandListItem.module.css","packages/commandbar/src/components/CommandList/CommandListing.module.css","packages/commandbar/src/components/CommandResultsView/CommandResultsView.module.css","packages/commandbar/src/components/ToggleButton/ToggleButton.module.css","packages/commandbar/src/components/CommandBarDialog/CommandBarDialog.module.css","packages/module-plugin/src/ModulePlugin.module.css","packages/commandbar/src/Theme.module.css"],"sourcesContent":[".xzQyjW_iconWrap {\n width: var(--icon-size);\n max-height: var(--icon-size);\n text-align: center;\n display: inline-block;\n}\n\n.xzQyjW_iconWrap svg {\n max-width: 100%;\n max-height: inherit;\n display: inline-block;\n}\n\n._345BVa_madeWithLove {\n gap: .5rem;\n text-decoration: none;\n display: flex;\n}\n\n._345BVa_madeWithLove small {\n transition: color .1s ease-in-out;\n}\n\n._345BVa_madeWithLove:hover small {\n color: var(--color-light-text-hover);\n}\n\n._345BVa_madeWithLove svg {\n width: var(--icon-size);\n height: auto;\n display: inline-block;\n}\n\n.UnIlTW_commandBarFooter {\n border-top: 1px solid var(--color-border);\n background-color: var(--footer-background);\n -webkit-user-select: none;\n user-select: none;\n justify-content: space-between;\n align-items: center;\n gap: 1rem;\n padding: .8rem 1rem;\n display: flex;\n}\n\n.UnIlTW_breadcrumb, .UnIlTW_activity {\n --icon-size: .875em;\n gap: 1rem;\n display: flex;\n}\n\n.UnIlTW_activity svg {\n transform-origin: 50%;\n animation-name: UnIlTW_spinner;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n display: inline-block;\n}\n\n@keyframes UnIlTW_spinner {\n 0% {\n transform: rotate(0);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.jZLCTa_searchBox {\n appearance: none;\n color: currentColor;\n background: none;\n border: none;\n outline: none;\n flex: 1;\n padding: .5rem;\n font-weight: 300;\n font-size: 1.1em !important;\n}\n\n.jZLCTa_searchBox:disabled {\n color: var(--color-light-text);\n cursor: not-allowed;\n}\n\n.jZLCTa_expandButton {\n height: 100%;\n cursor: pointer;\n background: none;\n border: none;\n padding: 0 1rem;\n display: block;\n position: absolute;\n right: 0;\n}\n\n.jZLCTa_expandButton svg {\n color: var(--grayLighter);\n transition: color .1s ease-in-out;\n}\n\n.jZLCTa_expandButton:hover svg {\n color: var(--primaryBlue);\n}\n\n.jZLCTa_executeButton {\n height: 100%;\n cursor: pointer;\n color: var(--grayLighter);\n background: none;\n border: none;\n padding: 0 1rem;\n transition: color .1s ease-in-out;\n display: block;\n position: absolute;\n right: 0;\n}\n\n.jZLCTa_executeButton:hover svg {\n color: var(--primaryBlue);\n}\n\n.jZLCTa_commandQueryDirty {\n color: var(--warn);\n}\n\n._1JQCkq_commandBarHeader {\n border-bottom: 1px solid var(--color-border);\n align-items: center;\n gap: 1rem;\n padding: .3rem .5rem;\n display: flex;\n position: relative;\n}\n\n._1JQCkq_backButton {\n background-color: var(--color-icon-bg);\n appearance: none;\n color: #fff;\n cursor: pointer;\n border: none;\n border-radius: 50%;\n padding: .3rem;\n transition: background-color .1s ease-in-out;\n display: flex;\n}\n\n._1JQCkq_backButton:hover {\n background-color: var(--color-icon-bg-hover);\n}\n\n.bB4DKG_commandListItem {\n cursor: pointer;\n border-radius: var(--border-radius-item);\n -webkit-user-select: none;\n user-select: none;\n --icon-size: .875em;\n background-color: #0000;\n align-items: baseline;\n gap: 1em;\n padding: .4rem .6rem;\n transition: background-color .1s ease-in-out, opacity .1s ease-in-out;\n display: flex !important;\n}\n\n.bB4DKG_commandListItem:hover {\n background-color: var(--color-item-hover);\n}\n\n.bB4DKG_highlighted {\n background-color: var(--color-item-highlighted);\n}\n\n.bB4DKG_disabled {\n opacity: .5;\n cursor: not-allowed;\n}\n\n.bB4DKG_label {\n flex-wrap: wrap;\n flex: 1;\n align-items: baseline;\n gap: .2em 1em;\n display: flex;\n}\n\n.bB4DKG_description {\n white-space: pre-wrap;\n font-size: .9em;\n}\n\n.bB4DKG_type {\n max-width: 30%;\n}\n\n.bB4DKG_favouriteButton {\n visibility: hidden;\n cursor: pointer;\n color: var(--textSubtleLight);\n background: none;\n border: none;\n align-self: baseline;\n padding: 0 .3rem;\n transition: color .1s ease-in-out;\n}\n\n.bB4DKG_favouriteButton:hover {\n color: var(--primaryBlue);\n}\n\n.bB4DKG_commandListItem:hover .bB4DKG_favouriteButton {\n visibility: visible;\n}\n\n.bB4DKG_isFavourite {\n color: var(--primaryBlue);\n visibility: visible;\n display: block;\n}\n\n.z-zZnG_results {\n min-height: 0;\n max-height: 60vh;\n height: 100%;\n transition: opacity .3s ease-in;\n overflow-y: auto;\n}\n\n.z-zZnG_results h6 {\n color: var(--color-light-text);\n -webkit-user-select: none;\n user-select: none;\n margin: .5rem;\n font-size: .9em;\n font-weight: normal;\n}\n\n.z-zZnG_results ul {\n flex-direction: column;\n gap: .5em;\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n}\n\n.z-zZnG_noResults {\n padding: .5rem;\n}\n\n.z-zZnG_disabled {\n pointer-events: none;\n -webkit-user-select: none;\n user-select: none;\n opacity: .5 !important;\n}\n\n.SDjQeG_commandResultsView {\n max-width: 100%;\n overflow: auto;\n}\n\n.SDjQeG_message {\n margin: 0 0 1em;\n font-size: 1em;\n}\n\n.SDjQeG_results {\n min-height: 0;\n max-height: 60vh;\n height: 100%;\n transition: opacity .3s ease-in;\n overflow-y: auto;\n}\n\n.SDjQeG_results h6 {\n color: var(--color-light-text);\n -webkit-user-select: none;\n user-select: none;\n margin: .5rem;\n font-size: .9em;\n font-weight: normal;\n}\n\n.SDjQeG_results ul {\n flex-direction: column;\n gap: .5em;\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n}\n\n.SDjQeG_noResults {\n padding: .5rem;\n}\n\n.SDjQeG_disabled {\n pointer-events: none;\n -webkit-user-select: none;\n user-select: none;\n opacity: .5 !important;\n}\n\n.Vkou1G_toggleButton {\n background-color: var(--grayDark);\n border: 1px solid var(--grayMedium);\n color: var(--textSubtleLight);\n -webkit-user-select: none;\n user-select: none;\n cursor: pointer;\n border-radius: 6px;\n align-items: center;\n gap: .5em;\n padding: 2px .3rem 2px .5rem;\n line-height: 1.4em;\n transition: all .1s ease-out;\n display: flex;\n}\n\n.Vkou1G_toggleButton:disabled {\n opacity: .5;\n cursor: not-allowed;\n}\n\n.Vkou1G_toggleButton:not(:disabled):hover {\n background-color: var(--grayLighter);\n color: var(--textOnWhite);\n}\n\n.Vkou1G_toggleButtonActive .Vkou1G_buttonIcon {\n background-color: var(--primaryBlue);\n}\n\n.Vkou1G_buttonIcon {\n background-color: var(--gray);\n color: var(--textOnGray);\n border-radius: 3px;\n padding: 1px 4px;\n font-size: 80%;\n transition: background-color .1s ease-out;\n}\n\n.Vkou1G_toggleButton:not(:disabled):hover .Vkou1G_buttonIcon {\n background-color: var(--primaryBlue);\n}\n\n.eoy0jW_commandBar {\n -webkit-backdrop-filter: blur(var(--dialog-blur));\n backdrop-filter: blur(var(--dialog-blur));\n background: var(--bar-background);\n border-radius: var(--border-radius-bar, 5);\n border: 1px solid var(--color-border);\n color: #fff;\n max-width: var(--bar-max-width);\n min-width: var(--bar-min-width);\n max-height: 90vh;\n width: var(--bar-width);\n pointer-events: all;\n flex-direction: column;\n margin: 0;\n padding: 0;\n transition: width .1s ease-out;\n display: flex;\n position: absolute;\n top: 50%;\n left: 50%;\n overflow: hidden;\n translate: -50% -50%;\n box-shadow: 0 3px 10px #00000080;\n}\n\n.eoy0jW_commandBar.eoy0jW_hasResults {\n width: var(--bar-width-expanded);\n}\n\n.eoy0jW_commandBar small {\n color: var(--color-light-text);\n font-size: 90%;\n}\n\n.eoy0jW_commandBar ::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n}\n\n.eoy0jW_commandBar ::-webkit-scrollbar-track {\n background-color: #0000;\n}\n\n.eoy0jW_commandBar ::-webkit-scrollbar-thumb {\n background-color: var(--grayLight);\n}\n\n.eoy0jW_commandBar ::-webkit-scrollbar-corner {\n background-color: var(--grayDark);\n}\n\n.eoy0jW_resultsWrap {\n transform-origin: top;\n grid-template-rows: 0fr;\n transition: grid-template-rows .2s ease-in;\n display: grid;\n overflow: auto;\n}\n\n.eoy0jW_resultsWrap > * {\n opacity: 0;\n}\n\n.eoy0jW_resultsWrap.eoy0jW_expanded {\n grid-template-rows: 1fr;\n}\n\n.eoy0jW_resultsWrap.eoy0jW_expanded > * {\n opacity: 1;\n padding: .5rem;\n}\n\n.o4liXq_pluginWrap {\n height: 41px;\n align-items: center;\n margin: 0 1rem;\n line-height: 20px;\n display: flex;\n font-size: 14px !important;\n}\n\n.o4liXq_fullScreenLayer {\n width: 100vw;\n height: 100vh;\n pointer-events: none;\n z-index: 9999;\n display: none;\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.o4liXq_open {\n display: block;\n}\n\n@keyframes o4liXq_spin {\n 0% {\n transform: rotate(0);\n }\n\n 100% {\n transform: rotate(359deg);\n }\n}\n\n.o4liXq_spin {\n animation: 2s linear infinite o4liXq_spin;\n}\n\n.rrAaca_commandBarTheme {\n --bar-min-width: 600px;\n --bar-max-width: 90vw;\n --bar-width: 30vw;\n --bar-width-expanded: 60vw;\n --bar-background: #000c;\n --footer-background: #000c;\n --color-shadow: #ffffffb3;\n --color-light-text: #fff9;\n --color-light-text-hover: #fffc;\n --color-icon-bg: #fff3;\n --color-icon-bg-hover: #fff6;\n --color-border: #fff3;\n --color-item-highlighted: #ffffff26;\n --color-item-hover: #ffffff0d;\n --border-radius-bar: .6rem;\n --border-radius-item: .4rem;\n --icon-size: 1.125em;\n --dialog-blur: 5px;\n --grayLight: #3f3f3f;\n --grayLighter: #eee;\n --grayMedium: #323232;\n --grayDark: #222;\n --gray: #555;\n --textSubtleLight: #adadad;\n --textOnGray: #fff;\n --textOnWhite: #252525;\n --primaryBlue: #00adee;\n --success: #00a338;\n --warn: #ff8700;\n}\n\n/*# sourceMappingURL=Module.css.map */\n",".iconWrap {\n width: var(--icon-size);\n max-height: var(--icon-size);\n display: inline-block;\n text-align: center;\n}\n\n.iconWrap svg {\n max-width: 100%;\n max-height: inherit;\n display: inline-block;\n}\n",".madeWithLove {\n display: flex;\n text-decoration: none;\n gap: 0.5rem;\n}\n\n.madeWithLove small {\n transition: color 0.1s ease-in-out;\n}\n\n.madeWithLove:hover small {\n color: var(--color-light-text-hover);\n}\n\n.madeWithLove svg {\n display: inline-block;\n width: var(--icon-size);\n height: auto;\n}\n",".commandBarFooter {\n border-top: 1px solid var(--color-border);\n background-color: var(--footer-background);\n padding: 0.8rem 1rem;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 1rem;\n user-select: none;\n}\n\n.breadcrumb {\n display: flex;\n gap: 1rem;\n --icon-size: 0.875em;\n}\n\n.activity {\n display: flex;\n gap: 1rem;\n --icon-size: 0.875em;\n}\n\n.activity svg {\n animation-name: spinner;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n transform-origin: 50% 50%;\n display: inline-block;\n}\n@keyframes spinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n",".searchBox {\n appearance: none;\n background: none;\n border: none;\n color: currentColor;\n font-size: 1.1em !important; /* Fix to prevent Neos.UI css from forcing the font size to 14px */\n font-weight: 300;\n outline: none;\n padding: 0.5rem;\n flex: 1;\n}\n\n.searchBox:disabled {\n color: var(--color-light-text);\n cursor: not-allowed;\n}\n\n.expandButton {\n position: absolute;\n padding: 0 1rem;\n height: 100%;\n right: 0;\n display: block;\n background: none;\n border: none;\n cursor: pointer;\n}\n\n.expandButton svg {\n color: var(--grayLighter);\n transition: color 0.1s ease-in-out;\n}\n\n.expandButton:hover svg {\n color: var(--primaryBlue);\n}\n\n.executeButton {\n position: absolute;\n padding: 0 1rem;\n height: 100%;\n right: 0;\n display: block;\n background: none;\n border: none;\n cursor: pointer;\n}\n\n.executeButton {\n color: var(--grayLighter);\n transition: color 0.1s ease-in-out;\n}\n\n.executeButton:hover svg {\n color: var(--primaryBlue);\n}\n\n.commandQueryDirty {\n color: var(--warn);\n}\n",".commandBarHeader {\n display: flex;\n align-items: center;\n gap: 1rem;\n padding: 0.3rem 0.5rem;\n border-bottom: 1px solid var(--color-border);\n position: relative;\n}\n\n.backButton {\n padding: 0.3rem;\n background-color: var(--color-icon-bg);\n border-radius: 50%;\n appearance: none;\n border: none;\n color: white;\n cursor: pointer;\n transition: background-color 0.1s ease-in-out;\n display: flex;\n}\n\n.backButton:hover {\n background-color: var(--color-icon-bg-hover);\n}\n",".commandListItem {\n cursor: pointer;\n display: flex !important; /* Necessary due to the neos header bar styling */\n gap: 1em;\n padding: 0.4rem 0.6rem;\n align-items: baseline;\n border-radius: var(--border-radius-item);\n transition: background-color 0.1s ease-in-out, opacity 0.1s ease-in-out;\n background-color: transparent;\n user-select: none;\n --icon-size: 0.875em;\n}\n\n.commandListItem:hover {\n background-color: var(--color-item-hover);\n}\n\n.highlighted {\n background-color: var(--color-item-highlighted);\n}\n\n.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.label {\n display: flex;\n flex-wrap: wrap;\n flex: 1;\n gap: 0.2em 1em;\n align-items: baseline;\n}\n\n.description {\n white-space:pre-wrap;\n font-size: 0.9em;\n}\n\n.type {\n max-width: 30%;\n}\n\n.favouriteButton {\n visibility: hidden;\n border: none;\n background: none;\n cursor: pointer;\n transition: color 0.1s ease-in-out;\n color: var(--textSubtleLight);\n align-self: baseline;\n padding: 0 0.3rem;\n}\n.favouriteButton:hover {\n color: var(--primaryBlue);\n}\n\n.commandListItem:hover .favouriteButton {\n visibility: visible;\n}\n\n.isFavourite {\n display: block;\n color: var(--primaryBlue);\n visibility: visible;\n}\n",".results {\n min-height: 0;\n transition: opacity 0.3s ease-in;\n overflow-y: auto;\n max-height: 60vh;\n height: 100%;\n}\n\n.results h6 {\n color: var(--color-light-text);\n margin: 0.5rem;\n font-size: 0.9em;\n font-weight: normal;\n user-select: none;\n}\n\n.results ul {\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: 0.5em;\n margin: 0;\n}\n\n.noResults {\n padding: 0.5rem;\n}\n\n.disabled {\n opacity: 0.5 !important;\n pointer-events: none;\n user-select: none;\n}\n",".commandResultsView {\n max-width: 100%;\n overflow: auto;\n}\n\n.message {\n font-size: 1em;\n margin: 0 0 1em;\n}\n\n.results {\n min-height: 0;\n transition: opacity 0.3s ease-in;\n overflow-y: auto;\n max-height: 60vh;\n height: 100%;\n}\n\n.results h6 {\n color: var(--color-light-text);\n margin: 0.5rem;\n font-size: 0.9em;\n font-weight: normal;\n user-select: none;\n}\n\n.results ul {\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: 0.5em;\n margin: 0;\n}\n\n.noResults {\n padding: 0.5rem;\n}\n\n.disabled {\n opacity: 0.5 !important;\n pointer-events: none;\n user-select: none;\n}\n",".toggleButton {\n background-color: var(--grayDark);\n border: 1px solid var(--grayMedium);\n color: var(--textSubtleLight);\n border-radius: 6px;\n display: flex;\n align-items: center;\n gap: 0.5em;\n transition: 0.1s ease-out;\n user-select: none;\n padding: 2px 0.3rem 2px 0.5rem;\n cursor: pointer;\n line-height: 1.4em;\n}\n\n.toggleButton:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.toggleButton:not(:disabled):hover {\n background-color: var(--grayLighter);\n color: var(--textOnWhite);\n}\n\n.toggleButtonActive .buttonIcon {\n background-color: var(--primaryBlue);\n}\n\n.buttonIcon {\n background-color: var(--gray);\n border-radius: 3px;\n color: var(--textOnGray);\n font-size: 80%;\n padding: 1px 4px;\n transition: background-color 0.1s ease-out;\n}\n\n.toggleButton:not(:disabled):hover .buttonIcon {\n background-color: var(--primaryBlue);\n}\n",".commandBar {\n backdrop-filter: blur(var(--dialog-blur));\n background: var(--bar-background);\n border-radius: var(--border-radius-bar, 5);\n border: 1px solid var(--color-border);\n box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);\n color: white;\n display: flex;\n flex-direction: column;\n left: 50%;\n margin: 0;\n max-width: var(--bar-max-width);\n min-width: var(--bar-min-width);\n max-height: 90vh;\n overflow: hidden;\n position: absolute;\n padding: 0;\n top: 50%;\n translate: -50% -50%;\n width: var(--bar-width);\n pointer-events: all;\n transition: width 0.1s ease-out;\n}\n\n.commandBar.hasResults {\n width: var(--bar-width-expanded);\n}\n\n.commandBar small {\n color: var(--color-light-text);\n font-size: 90%;\n}\n\n.commandBar ::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n}\n\n.commandBar ::-webkit-scrollbar-track {\n background-color: transparent;\n}\n\n.commandBar ::-webkit-scrollbar-thumb {\n background-color: var(--grayLight);\n}\n\n.commandBar ::-webkit-scrollbar-corner {\n background-color: var(--grayDark);\n}\n\n.resultsWrap {\n display: grid;\n grid-template-rows: 0fr;\n transform-origin: top center;\n transition: grid-template-rows 0.2s ease-in;\n overflow: auto;\n}\n\n.resultsWrap > * {\n opacity: 0;\n}\n\n.resultsWrap.expanded {\n grid-template-rows: 1fr;\n}\n\n.resultsWrap.expanded > * {\n opacity: 1;\n padding: 0.5rem;\n}\n",".pluginWrap {\n display: flex;\n align-items: center;\n height: 41px;\n font-size: 14px !important;\n line-height: 20px;\n margin: 0 1rem;\n}\n\n.fullScreenLayer {\n width: 100vw;\n height: 100vh;\n position: absolute;\n left: 0;\n top: 0;\n pointer-events: none;\n z-index: 9999;\n display: none;\n}\n\n.open {\n display: block;\n}\n\n@keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(359deg); }\n}\n\n.spin {\n animation: spin 2s linear infinite;\n}\n",".commandBarTheme {\n --bar-min-width: 600px;\n --bar-max-width: 90vw;\n --bar-width: 30vw;\n --bar-width-expanded: 60vw;\n --bar-background: rgba(0, 0, 0, 0.8);\n --footer-background: rgba(0, 0, 0, 0.8);\n --color-shadow: rgba(255, 255, 255, 0.7);\n --color-light-text: rgba(255, 255, 255, 0.6);\n --color-light-text-hover: rgba(255, 255, 255, 0.8);\n --color-icon-bg: rgba(255, 255, 255, 0.2);\n --color-icon-bg-hover: rgba(255, 255, 255, 0.4);\n --color-border: rgba(255, 255, 255, 0.2);\n --color-item-highlighted: rgba(255, 255, 255, 0.15);\n --color-item-hover: rgba(255, 255, 255, 0.05);\n --border-radius-bar: 0.6rem;\n --border-radius-item: 0.4rem;\n --icon-size: 1.125em;\n --dialog-blur: 5px;\n\n /* Neos UI colors */\n --grayLight: #3f3f3f;\n --grayLighter: #eee;\n --grayMedium: #323232;\n --grayDark: #222;\n --gray: #555;\n --textSubtleLight: #adadad;\n --textOnGray: #fff;\n --textOnWhite: #252525;\n --primaryBlue: #00adee;\n --success: #00a338;\n --warn: #ff8700;\n}\n"],"names":[],"version":3,"file":"Module.css.map"} \ No newline at end of file diff --git a/Resources/Public/Module.js b/Resources/Public/Module.js index 83c8b91..c6e780e 100644 --- a/Resources/Public/Module.js +++ b/Resources/Public/Module.js @@ -1,2 +1,2 @@ -(()=>{function e(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var t,n,r,o,a,i,l,s={},u=[],c=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function _(e,t){for(var n in t)e[n]=t[n];return e}function d(e){var t=e.parentNode;t&&t.removeChild(e)}function f(e,n,r){var o,a,i,l={};for(i in n)"key"==i?o=n[i]:"ref"==i?a=n[i]:l[i]=n[i];if(arguments.length>2&&(l.children=arguments.length>3?t.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===l[i]&&(l[i]=e.defaultProps[i]);return m(e,l,o,a,null)}function m(e,t,o,a,i){var l={type:e,props:t,key:o,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++r:i};return null==i&&null!=n.vnode&&n.vnode(l),l}function h(e){return e.children}function p(e,t){this.props=e,this.context=t}function v(e,t){if(null==t)return e.__?v(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&o.sort((function(e,t){return e.__v.__b-t.__v.__b})));C.__r=0}function y(e,t,n,r,o,a,i,l,c,_){var d,f,p,E,g,C,y,T=r&&r.__k||u,R=T.length;for(n.__k=[],d=0;d0?m(E.type,E.props,E.key,E.ref?E.ref:null,E.__v):E)){if(E.__=n,E.__b=n.__b+1,null===(p=T[d])||p&&E.key==p.key&&E.type===p.type)T[d]=void 0;else for(f=0;f=0;t--)if((n=e.__k[t])&&(r=A(n)))return r;return null}function R(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||c.test(t)?n:n+"px"}function b(e,t,n,r,o){var a;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||R(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||R(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r||e.addEventListener(t,a?N:O,a):e.removeEventListener(t,a?N:O,a);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,n))}}function O(e){return this.l[e.type+!1](n.event?n.event(e):e)}function N(e){return this.l[e.type+!0](n.event?n.event(e):e)}function D(e,r,o,a,i,l,u,c,f){var m,E,g,C,I,T,S,A,R,O,N,D,H,L,U,P=r.type;if(void 0!==r.constructor)return null;null!=o.__h&&(f=o.__h,c=r.__e=o.__e,r.__h=null,l=[c]),(m=n.__b)&&m(r);try{e:if("function"==typeof P){if(A=r.props,R=(m=P.contextType)&&a[m.__c],O=m?R?R.props.value:m.__:a,o.__c?S=(E=r.__c=o.__c).__=E.__E:("prototype"in P&&P.prototype.render?r.__c=E=new P(A,O):(r.__c=E=new p(A,O),E.constructor=P,E.render=M),R&&R.sub(E),E.props=A,E.state||(E.state={}),E.context=O,E.__n=a,g=E.__d=!0,E.__h=[],E._sb=[]),null==E.__s&&(E.__s=E.state),null!=P.getDerivedStateFromProps&&(E.__s==E.state&&(E.__s=_({},E.__s)),_(E.__s,P.getDerivedStateFromProps(A,E.__s))),C=E.props,I=E.state,E.__v=r,g)null==P.getDerivedStateFromProps&&null!=E.componentWillMount&&E.componentWillMount(),null!=E.componentDidMount&&E.__h.push(E.componentDidMount);else{if(null==P.getDerivedStateFromProps&&A!==C&&null!=E.componentWillReceiveProps&&E.componentWillReceiveProps(A,O),!E.__e&&null!=E.shouldComponentUpdate&&!1===E.shouldComponentUpdate(A,E.__s,O)||r.__v===o.__v){for(r.__v!==o.__v&&(E.props=A,E.state=E.__s,E.__d=!1),E.__e=!1,r.__e=o.__e,r.__k=o.__k,r.__k.forEach((function(e){e&&(e.__=r)})),N=0;N2&&(l.children=arguments.length>3?t.call(arguments,2):r),m(e.type,l,o||e.key,a||e.ref,null)}function G(e,t){var n={__c:t="__cC"+l++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,g(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}function x(){return(x=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["context","children"]);return w(t,n)}function F(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=f(V,x({},this._props,{context:e.detail.context}),function e(t,n){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var r=[],o={},a=0,i=t.attributes,l=t.childNodes;for(a=i.length;a--;)"slot"!==i[a].name&&(o[i[a].name]=i[a].value,o[B(i[a].name)]=i[a].value);for(a=l.length;a--;){var s=e(l[a],null),u=l[a].slot;u?o[u]=f(z,{name:u},s):r[a]=s}var c=n?f(z,null,r):r;return f(n||t.nodeName.toLowerCase(),o,c)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?k:P)(this._vdom,this._root)}function B(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function j(e,t,n){if(this._vdom){var r={};r[e]=n=null==n?void 0:n,r[B(e)]=n,this._vdom=w(this._vdom,r),P(this._vdom,this._root)}}function W(){P(this._vdom=null,this._root)}function z(e,t){var n=this;return f("slot",x({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function $(e,t,n,r){function o(){var t=Reflect.construct(HTMLElement,[],o);return t._vdomComponent=e,t._root=r&&r.shadow?t.attachShadow({mode:"open"}):t,t}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=F,o.prototype.attributeChangedCallback=j,o.prototype.disconnectedCallback=W,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach((function(e){Object.defineProperty(o.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})})),customElements.define(t||e.tagName||e.displayName||e.name,o)}t=u.slice,n={__e:function(e,t,n,r){for(var o,a,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&null!=a.getDerivedStateFromError&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(t){e=t}throw e}},r=0,p.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=_({},this.state),"function"==typeof e&&(e=e(_({},n),this.props)),e&&_(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),g(this))},p.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),g(this))},p.prototype.render=h,o=[],i="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,C.__r=0,l=0;var X=0;function Q(e,t,r,o,a,i){var l,s,u={};for(s in t)"ref"==s?l=t[s]:u[s]=t[s];var c={type:e,props:u,key:r,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--X,__source:a,__self:i};if("function"==typeof e&&(l=e.defaultProps))for(s in l)void 0===u[s]&&(u[s]=l[s]);return n.vnode&&n.vnode(c),c}var Y,q,Z,K,J=0,ee=[],te=[],ne=n.__b,re=n.__r,oe=n.diffed,ae=n.__c,ie=n.unmount;function le(e,t){n.__h&&n.__h(q,e,J||t),J=0;var r=q.__H||(q.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:te}),r.__[e]}function se(e){return J=1,ue(Ie,e)}function ue(e,t,n){var r=le(Y++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Ie(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=q,!q.u)){q.u=!0;var o=q.shouldComponentUpdate;q.shouldComponentUpdate=function(e,t,n){if(!r.__c.__H)return!0;var a=r.__c.__H.__.filter((function(e){return e.__c}));if(a.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var i=!1;return a.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}})),!(!i&&r.__c.props===e)&&(!o||o.call(this,e,t,n))}}return r.__N||r.__}function ce(e,t){var r=le(Y++,3);!n.__s&&ye(r.__H,t)&&(r.__=e,r.i=t,q.__H.__h.push(r))}function _e(e,t){var r=le(Y++,4);!n.__s&&ye(r.__H,t)&&(r.__=e,r.i=t,q.__h.push(r))}function de(e){return J=5,fe((function(){return{current:e}}),[])}function fe(e,t){var n=le(Y++,7);return ye(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function me(e,t){return J=8,fe((function(){return e}),t)}function he(e){var t=q.context[e.__c],n=le(Y++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(q)),t.props.value):e.__}function pe(){for(var e;e=ee.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ge),e.__H.__h.forEach(Ce),e.__H.__h=[]}catch(t){e.__H.__h=[],n.__e(t,e.__v)}}n.__b=function(e){q=null,ne&&ne(e)},n.__r=function(e){re&&re(e),Y=0;var t=(q=e.__c).__H;t&&(Z===q?(t.__h=[],q.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=te,e.__N=e.i=void 0}))):(t.__h.forEach(ge),t.__h.forEach(Ce),t.__h=[])),Z=q},n.diffed=function(e){oe&&oe(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ee.push(t)&&K===n.requestAnimationFrame||((K=n.requestAnimationFrame)||Ee)(pe)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==te&&(e.__=e.__V),e.i=void 0,e.__V=te}))),Z=q=null},n.__c=function(e,t){t.some((function(e){try{e.__h.forEach(ge),e.__h=e.__h.filter((function(e){return!e.__||Ce(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],n.__e(r,e.__v)}})),ae&&ae(e,t)},n.unmount=function(e){ie&&ie(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{ge(e)}catch(e){t=e}})),r.__H=void 0,t&&n.__e(t,r.__v))};var ve="function"==typeof requestAnimationFrame;function Ee(e){var t,n=function(){clearTimeout(r),ve&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ve&&(t=requestAnimationFrame(n))}function ge(e){var t=q,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),q=t}function Ce(e){var t=q;e.__c=e.__(),q=t}function ye(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Ie(e,t){return"function"==typeof t?t(e):t}function Te(e,t){for(var n in t)e[n]=t[n];return e}function Se(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function Ae(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function Re(e){this.props=e}(Re.prototype=new p).isPureReactComponent=!0,Re.prototype.shouldComponentUpdate=function(e,t){return Se(this.props,e)||Se(this.state,t)};var be=n.__b;n.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),be&&be(e)};var Oe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var Ne=function(e,t){return null==e?null:T(T(e).map(t))},De={map:Ne,forEach:Ne,count:function(e){return e?T(e).length:0},only:function(e){var t=T(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:T},He=n.__e;n.__e=function(e,t,n,r){if(e.then)for(var o,a=t;a=a.__;)if((o=a.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);He(e,t,n,r)};var Le=n.unmount;function Ue(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=Te({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ue(e,t,n)}))),e}function Me(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Me(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Pe(){this.__u=0,this.t=null,this.__b=null}function ke(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function we(){this.u=null,this.o=null}n.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Le&&Le(e)},(Pe.prototype=new p).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=ke(r.__v),a=!1,i=function(){a||(a=!0,n.__R=null,o?o(l):l())};n.__R=i;var l=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Me(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},s=!0===t.__h;r.__u++||s||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},Pe.prototype.componentWillUnmount=function(){this.t=[]},Pe.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Ue(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&f(h,null,e.fallback);return o&&(o.__h=null),[f(h,null,t.__a?null:e.children),o]};var Ge=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),P(f(xe,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}(we.prototype=new p).__a=function(e){var t=this,n=ke(t.__v),r=t.o.get(e);return r[0]++,function(o){var a=function(){t.props.revealOrder?(r.push(o),Ge(t,e,r)):o()};n?n(a):a()}},we.prototype.render=function(e){this.u=null,this.o=new Map;var t=T(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},we.prototype.componentDidUpdate=we.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Ge(e,n,t)}))};var Fe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Be=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,je="undefined"!=typeof document,We=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};p.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(p.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var ze=n.event;function $e(){}function Xe(){return this.cancelBubble}function Qe(){return this.defaultPrevented}n.event=function(e){return ze&&(e=ze(e)),e.persist=$e,e.isPropagationStopped=Xe,e.isDefaultPrevented=Qe,e.nativeEvent=e};var Ye,qe={configurable:!0,get:function(){return this.class}},Ze=n.vnode;n.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var o=-1===t.indexOf("-");for(var a in r={},n){var i=n[a];je&&"children"===a&&"noscript"===t||"value"===a&&"defaultValue"in n&&null==i||("defaultValue"===a&&"value"in n&&null==n.value?a="value":"download"===a&&!0===i?i="":/ondoubleclick/i.test(a)?a="ondblclick":/^onchange(textarea|input)/i.test(a+t)&&!We(n.type)?a="oninput":/^onfocus$/i.test(a)?a="onfocusin":/^onblur$/i.test(a)?a="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(a)?a=a.toLowerCase():o&&Be.test(a)?a=a.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===i&&(i=void 0),/^oninput$/i.test(a)&&(a=a.toLowerCase(),r[a]&&(a="oninputCapture")),r[a]=i)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=T(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=T(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(qe.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",qe))}e.$$typeof=Fe,Ze&&Ze(e)};var Ke=n.__r;n.__r=function(e){Ke&&Ke(e),Ye=e.__c};var Je=n.diffed;n.diffed=function(e){Je&&Je(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),Ye=null};function et(e){return!!e&&e.$$typeof===Fe}function tt(e){e()}var nt={useState:se,useId:function(){var e=le(Y++,11);if(!e.__){for(var t=q.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__},useReducer:ue,useEffect:ce,useLayoutEffect:_e,useInsertionEffect:_e,useTransition:function(){return[!1,tt]},useDeferredValue:function(e){return e},useSyncExternalStore:function(e,t){var n=t(),r=se({h:{__:n,v:t}}),o=r[0].h,a=r[1];return _e((function(){o.__=n,o.v=t,Ae(o.__,t())||a({h:o})}),[e,n,t]),ce((function(){return Ae(o.__,o.v())||a({h:o}),e((function(){Ae(o.__,o.v())||a({h:o})}))}),[e]),n},startTransition:tt,useRef:de,useImperativeHandle:function(e,t,n){J=6,_e((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))},useMemo:fe,useCallback:me,useContext:he,useDebugValue:function(e,t){n.useDebugValue&&n.useDebugValue(t?t(e):e)},version:"17.0.2",Children:De,render:function(e,t,n){return null==t.__k&&(t.textContent=""),P(e,t),"function"==typeof n&&n(),e?e.__c:null},hydrate:function(e,t,n){return k(e,t),"function"==typeof n&&n(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(P(null,e),!0)},createPortal:function(e,t){var n=f(Ve,{__v:e,i:t});return n.containerInfo=t,n},createElement:f,createContext:G,createFactory:function(e){return f.bind(null,e)},cloneElement:function(e){return et(e)?w.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:h,isValidElement:et,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:p,PureComponent:Re,memo:function(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:Se(this.props,e)}function r(t){return this.shouldComponentUpdate=n,f(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r},forwardRef:function(e){function t(t){var n=Te({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Oe,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},flushSync:function(e,t){return e(t)},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:h,Suspense:Pe,SuspenseList:we,lazy:function(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return f(n,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:{current:{readContext:function(e){return Ye.__n[e.__c].props.value}}}}};function rt(e){const t=de(e);return t.current=e,t}function ot(){throw new Error("Cycle detected")}function at(){if(_t>1)_t--;else{for(var e,t=!1;void 0!==ct;){var n=ct;for(ct=void 0,dt++;void 0!==n;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&vt(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(dt=0,_t--,t)throw e}}function it(e){if(_t>0)return e();_t++;try{return e()}finally{at()}}var lt,st,ut=void 0,ct=void 0,_t=0,dt=0,ft=0;function mt(e){if(void 0!==ut){var t=e.n;if(void 0===t||t.t!==ut)return t={i:0,S:e,p:ut.s,n:void 0,t:ut,e:void 0,x:void 0,r:t},void 0!==ut.s&&(ut.s.n=t),ut.s=t,e.n=t,32&ut.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=ut.s,t.n=void 0,ut.s.n=t,ut.s=t),t}}function ht(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}function pt(e){return new ht(e)}function vt(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Et(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function gt(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function Ct(e){ht.call(this,void 0),this.x=e,this.s=void 0,this.g=ft-1,this.f=4}function yt(e){return new Ct(e)}function It(e){var t=e.u;if(e.u=void 0,"function"==typeof t){_t++;var n=ut;ut=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,Tt(e),t}finally{ut=n,at()}}}function Tt(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,It(e)}function St(e){if(ut!==this)throw new Error("Out-of-order effect");gt(this),ut=e,this.f&=-2,8&this.f&&Tt(this),at()}function At(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}function Rt(e){var t=new At(e);try{t.c()}catch(e){throw t.d(),e}return t.d.bind(t)}function bt(e,t){n[e]=t.bind(null,n[e]||function(){})}function Ot(e){st&&st(),st=e&&e.S()}function Nt(e){var t=this,n=e.data,r=Ht(n);r.value=n;var o=fe((function(){for(var e=t.__v;e=e.__;)if(e.__c){e.__c.__$f|=4;break}return t.__$u.c=function(){t.base.data=o.peek()},yt((function(){var e=r.value.value;return 0===e?0:!0===e?"":e||""}))}),[]);return o.value}function Dt(e,t,n,r){var o=t in e&&void 0===e.ownerSVGElement,a=pt(n);return{o:function(e,t){a.value=e,r=t},d:Rt((function(){var n=a.value.value;r[t]!==n&&(r[t]=n,o?e[t]=n:n?e.setAttribute(t,n):e.removeAttribute(t))}))}}function Ht(e){return fe((function(){return pt(e)}),[])}function Lt(e){var t=de(e);return t.current=e,lt.__$f|=4,fe((function(){return yt((function(){return t.current()}))}),[])}function Ut(e){var t=de(e);t.current=e,ce((function(){return Rt((function(){return t.current()}))}),[])}function Mt(e,t=null){return Object.keys(e).reduce(((n,r)=>{const{icon:o,description:a,name:i,subCommands:l,action:s,canHandleQueries:u,closeOnExecute:c,category:_,executeManually:d}=e[r],f=t?`${t}.${r}`:r,m=l?Object.keys(l).map((e=>`${f}.${e}`)):[];return n[f]={id:f,name:i,icon:o,description:a,action:s,canHandleQueries:u,subCommandIds:m,parentId:t,closeOnExecute:c,category:_,executeManually:d},m.length>0?{...n,...Mt(l,f)}:n}),{})}ht.prototype.h=function(){return!0},ht.prototype.S=function(e){this.t!==e&&void 0===e.e&&(e.x=this.t,void 0!==this.t&&(this.t.e=e),this.t=e)},ht.prototype.U=function(e){if(void 0!==this.t){var t=e.e,n=e.x;void 0!==t&&(t.x=n,e.e=void 0),void 0!==n&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}},ht.prototype.subscribe=function(e){var t=this;return Rt((function(){var n=t.value,r=32&this.f;this.f&=-33;try{e(n)}finally{this.f|=r}}))},ht.prototype.valueOf=function(){return this.value},ht.prototype.toString=function(){return this.value+""},ht.prototype.peek=function(){return this.v},Object.defineProperty(ht.prototype,"value",{get:function(){var e=mt(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){dt>100&&ot(),this.v=e,this.i++,ft++,_t++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{at()}}}}),(Ct.prototype=new ht).h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===ft)return!0;if(this.g=ft,this.f|=1,this.i>0&&!vt(this))return this.f&=-2,!0;var e=ut;try{Et(this),ut=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return ut=e,gt(this),this.f&=-2,!0},Ct.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}ht.prototype.S.call(this,e)},Ct.prototype.U=function(e){if(void 0!==this.t&&(ht.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},Ct.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Ct.prototype.peek=function(){if(this.h()||ot(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ct.prototype,"value",{get:function(){1&this.f&&ot();var e=mt(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),At.prototype.c=function(){var e=this.S();try{8&this.f||void 0===this.x||(this.u=this.x())}finally{e()}},At.prototype.S=function(){1&this.f&&ot(),this.f|=1,this.f&=-9,It(this),Et(this),_t++;var e=ut;return ut=this,St.bind(this,e)},At.prototype.N=function(){2&this.f||(this.f|=2,this.o=ct,ct=this)},At.prototype.d=function(){this.f|=8,1&this.f||Tt(this)},Nt.displayName="_st",Object.defineProperties(ht.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Nt},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),bt("__b",(function(e,t){if("string"==typeof t.type){var n,r=t.props;for(var o in r)if("children"!==o){var a=r[o];a instanceof ht&&(n||(t.__np=n={}),n[o]=a,r[o]=a.peek())}}e(t)})),bt("__r",(function(e,t){Ot();var n,r=t.__c;r&&(r.__$f&=-2,void 0===(n=r.__$u)&&(r.__$u=n=function(e){var t;return Rt((function(){t=this})),t.c=function(){r.__$f|=1,r.setState({})},t}())),lt=r,Ot(n),e(t)})),bt("__e",(function(e,t,n,r){Ot(),lt=void 0,e(t,n,r)})),bt("diffed",(function(e,t){var n;if(Ot(),lt=void 0,"string"==typeof t.type&&(n=t.__e)){var r=t.__np,o=t.props;if(r){var a=n.U;if(a)for(var i in a){var l=a[i];void 0===l||i in r||(l.d(),a[i]=void 0)}else n.U=a={};for(var s in r){var u=a[s],c=r[s];void 0===u?(u=Dt(n,s,c,o),a[s]=u):u.o(c,o)}}}e(t)})),bt("unmount",(function(e,t){if("string"==typeof t.type){var n=t.__e;if(n){var r=n.U;if(r)for(var o in n.U=void 0,r){var a=r[o];a&&a.d()}}}else{var i=t.__c;if(i){var l=i.__$u;l&&(i.__$u=void 0,l.d())}}e(t)})),bt("__h",(function(e,t,n,r){r<3&&(t.__$f|=2),e(t,n,r)})),p.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u;if(!(n&&void 0!==n.s||4&this.__$f))return!0;if(3&this.__$f)return!0;for(var r in t)return!0;for(var o in e)if("__source"!==o&&e[o]!==this.props[o])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};const Pt="%c[COMMANDBAR]";var kt={ok:(e,...t)=>console.log(Pt,"color: green",e,...t),error:(e,...t)=>console.log(Pt,"color: red",e,...t),warn:(e,...t)=>console.warn(Pt,"color: orange",e,...t),debug:()=>null};function wt(e,t,n){return Math.max(t,Math.min(n,e))}const Gt=new Intl.Collator("en").compare,xt=1/0,Vt=/(?:\s+|^)-[a-z\d]+/gi,Ft={interSplit:"[^A-Za-z0-9']+",intraSplit:"[a-z][A-Z]",intraBound:"[A-Za-z][0-9]|[0-9][A-Za-z]|[a-z][A-Z]",interLft:0,interRgt:0,interChars:".",interIns:xt,intraChars:"[a-z\\d']",intraIns:0,intraContr:"'[a-z]{1,2}\\b",intraMode:0,intraSlice:[1,xt],intraSub:0,intraTrn:0,intraDel:0,intraFilt:(e,t,n)=>!0,sort:(e,t,n)=>{let{idx:r,chars:o,terms:a,interLft2:i,interLft1:l,start:s,intraIns:u,interIns:c}=e;return r.map(((e,t)=>t)).sort(((e,n)=>o[n]-o[e]||u[e]-u[n]||a[n]+i[n]+.5*l[n]-(a[e]+i[e]+.5*l[e])||c[e]-c[n]||s[e]-s[n]||Gt(t[r[e]],t[r[n]])))}},Bt=(e,t)=>0==t?"":1==t?e+"??":t==xt?e+"*?":e+`{0,${t}}?`,jt="(?:\\b|_)";function Wt(e){e=Object.assign({},Ft,e);const{interLft:t,interRgt:n,intraMode:r,intraSlice:o,intraIns:a,intraSub:i,intraTrn:l,intraDel:s,intraContr:u,intraSplit:c,interSplit:_,intraBound:d,intraChars:f}=e;let{intraRules:m}=e;null==m&&(m=e=>{let t=Ft.intraSlice,n=0,r=0,u=0,c=0,_=e.length;return _<=4?_>=3&&(u=Math.min(l,1),4==_&&(n=Math.min(a,1))):(t=o,n=a,r=i,u=l,c=s),{intraSlice:t,intraIns:n,intraSub:r,intraTrn:u,intraDel:c}});let h=!!c,p=new RegExp(c,"g"),v=new RegExp(_,"g"),E=new RegExp("^"+_+"|"+_+"$","g"),g=new RegExp(u,"gi");const C=e=>(e=e.replace(E,"").toLowerCase(),h&&(e=e.replace(p,(e=>e[0]+" "+e[1]))),e.split(v).filter((e=>""!=e))),y=(o,i=0,l=!1)=>{let s=C(o);if(0==s.length)throw"Empty needle!";let u,c=Array(s.length).fill("");if(s=s.map(((e,t)=>e.replace(g,(e=>(c[t]=e,""))))),1==r)u=s.map(((e,t)=>{let{intraSlice:n,intraIns:r,intraSub:o,intraTrn:a,intraDel:i}=m(e);if(r+o+a+i==0)return e+c[t];let[l,s]=n,u=e.slice(0,l),_=e.slice(s),d=e.slice(l,s);1==r&&1==u.length&&u!=d[0]&&(u+="(?!"+u+")");let h=d.length,p=[];if(o)for(let e=0;e0&&(e=")("+e+")("),u=s.map(((t,n)=>t.split("").map(((e,t,n)=>(1==a&&0==t&&n.length>1&&e[t]!=e[t+1]&&(e+="(?!"+e+")"),e))).join(e)+c[n]))}let _=2==t?jt:"",d=2==n?jt:"",h=d+Bt(e.interChars,e.interIns)+_;return i>0?l?u=_+"("+u.join(")"+d+"|"+_+"(")+")"+d:(u="("+u.join(")("+h+")(")+")",u="(.?"+_+")"+u+"("+d+".*)"):(u=u.join(h),u=_+u+d),[new RegExp(u,"i"),s,c]},I=(e,t,n)=>{let r=[],[o]=y(t);if(null!=n)for(let t=0;t{let[i,l,s]=y(a,1),[u]=y(a,2),c=l.length,_=r.length,d=Array(_).fill(0),f={idx:Array(_),start:d.slice(),chars:d.slice(),terms:d.slice(),interIns:d.slice(),intraIns:d.slice(),interLft2:d.slice(),interRgt2:d.slice(),interLft1:d.slice(),interRgt1:d.slice(),ranges:Array(_)},m=1==t||1==n,h=0;for(let a=0;a=u){let e=d[o+1].toLowerCase().indexOf(i);e>-1&&(H.push(v,e,u),v+=b(d,o,e,u),a=i,f=u,h=!0,0==r&&(p=v))}if(m||h){let e=v-1,r=v+f,l=!0,s=!0;if(-1==e||S.test(_[e]))h&&g++;else{if(2==t){E=!0;break}if(T&&A.test(_[e]+_[e+1]))h&&C++;else{if(1==t){let e=d[o+1],t=v+f;if(e.length>=u){let n,r=0,l=!1,s=new RegExp(i,"ig");for(;n=s.exec(e);){r=n.index;let e=t+r,o=e-1;if(-1==o||S.test(_[o])){g++,l=!0;break}if(A.test(_[o]+_[e])){C++,l=!0;break}}if(l){H.push(v,r,u),v+=b(d,o,r,u),a=i,f=u,h=!0;break}}E=!0;break}l=!1}}if(r==_.length||S.test(_[r]))h&&y++;else{if(2==n){E=!0;break}if(T&&A.test(_[r-1]+_[r]))h&&I++;else{if(1==n){E=!0;break}s=!1}}h&&(R+=u,l&&s&&O++)}if(f>u&&(D+=f-u),r>0&&(N+=d[o-1].length),!e.intraFilt(i,a,v)){E=!0;break}r0?0:1/0,c=l-3;for(let r=2;r0&&(t.push(o,i),o=i=n)}i>o&&t.push(o,i),h++}}if(h{let o=e[t]+e[t+1].slice(0,n);return e[t-1]+=o,e[t]=e[t+1].slice(n,n+r),e[t+1]=e[t+1].slice(n+r),o.length};return{search:(...t)=>((t,n,r=!1,o=1e3,a)=>{let i,l=null,s=null,u=[];if(n=n.replace(Vt,(e=>(u.push(e.trim().slice(1)),""))),u.length>0&&(i=new RegExp(u.join("|"),"i"),""==n.trim())){let e=[];for(let n=0;n1){let n=e.slice().sort(((e,t)=>t.length-e.length));for(let e=0;ee.join(" "))),s=[];let r=new Set;for(let e=0;e!r.has(e))),o=I(t,l[e],n);for(let e=0;e0?a:I(t,n)]);let c=null,_=null;if(u.length>0&&(s=s.map((e=>e.filter((e=>!i.test(t[e])))))),s.reduce(((e,t)=>e+t.length),0)<=o){c={},_=[];for(let n=0;n0)for(let e=0;e{let e={A:"ÁÀÃÂÄĄ",a:"áàãâäą",E:"ÉÈÊËĖ",e:"éèêëę",I:"ÍÌÎÏĮ",i:"íìîïį",O:"ÓÒÔÕÖ",o:"óòôõö",U:"ÚÙÛÜŪŲ",u:"úùûüūų",C:"ÇČ",c:"çč",N:"Ñ",n:"ñ",S:"Š",s:"š"},t=new Map,n="";for(let r in e)e[r].split("").forEach((e=>{n+=e,t.set(e,r)}));let r=new RegExp(`[${n}]`,"g"),o=e=>t.get(e);return e=>{if("string"==typeof e)return e.replace(r,o);let t=Array(e.length);for(let n=0;nt?`${e}`:e,Qt=(e,t)=>e+t;Wt.latinize=zt,Wt.permute=e=>$t([...Array(e.length).keys()]).sort(((e,t)=>{for(let n=0;nt.map((t=>e[t])))),Wt.highlight=function(e,t,n=Xt,r="",o=Qt){let a=o(r,n(e.substring(0,t[0]),!1));r=null!==a?a:r;for(let i=0;it.parentId===e||!e&&o.includes(t.id))),!t)return a.sort(((t,n)=>function(e,t,n,r){const o=r.includes(e.id),a=r.includes(t.id);if(o&&!a)return-1;if(!o&&a)return 1;if(o&&a)return r.indexOf(e.id)-r.indexOf(t.id);const i=n.includes(e.id),l=n.includes(t.id);return i&&!l?-1:!i&&l?1:e.name.localeCompare(t.name)}(t,n,r,e?[]:o))).map((e=>e.id));const i=a.map((({name:e,description:t})=>e+" "+t)),[l,,s]=Yt.search(i,t.toLowerCase());return s.map((e=>a[l[e]].id))}function Zt(e,t="Assertion failed"){if(!1===e)throw Error(t)}function Kt(...e){return e.filter(Boolean).join(" ")}let Jt;var en;let tn;var nn;let rn;var on;(en=Jt||(Jt={})).COLLAPSED="collapsed",en.IDLE="idle",en.EXECUTING_COMMAND="executingCommand",en.DISPLAYING_RESULT="displayingResult",(nn=tn||(tn={})).RESET_SEARCH="RESET_SEARCH",nn.HIGHLIGHT_NEXT_ITEM="HIGHLIGHT_NEXT_ITEM",nn.HIGHLIGHT_PREVIOUS_ITEM="HIGHLIGHT_PREVIOUS_ITEM",nn.CANCEL="CANCEL",nn.SELECT_GROUP="SELECT_GROUP",nn.GO_TO_PARENT_GROUP="GO_TO_PARENT_GROUP",nn.UPDATE_SEARCH="UPDATE_SEARCH",nn.UPDATE_COMMAND_QUERY="UPDATE_COMMAND_QUERY",nn.EXECUTE_COMMAND="EXECUTE_COMMAND",nn.FINISH_COMMAND="FINISH_COMMAND",nn.UPDATE_RESULT="UPDATE_RESULT",nn.EXPAND="EXPAND",nn.ADD_FAVOURITE="ADD_FAVOURITE",nn.REMOVE_FAVOURITE="REMOVE_FAVOURITE",(on=rn||(rn={})).ADD_FAVOURITE="ADD_FAVOURITE",on.ADD_RECENTLY_USED="ADD_RECENTLY_USED",on.EXPAND="EXPAND",on.HIGHLIGHT_NEXT_COMMAND="HIGHLIGHT_NEXT_COMMAND",on.HIGHLIGHT_NEXT_OPTION="HIGHLIGHT_NEXT_OPTION",on.HIGHLIGHT_PREVIOUS_COMMAND="HIGHLIGHT_PREVIOUS_COMMAND",on.HIGHLIGHT_PREVIOUS_OPTION="HIGHLIGHT_PREVIOUS_OPTION",on.LEAVE_GROUP="LEAVE_GROUP",on.REFRESH_COMMANDS="REFRESH_COMMANDS",on.REMOVE_FAVOURITE="REMOVE_FAVOURITE",on.RESET_HIGHLIGHT="RESET_HIGHLIGHT",on.RESET_OPTION_HIGHLIGHT="RESET_OPTION_HIGHLIGHT",on.RESET_SEARCH="RESET_SEARCH",on.RESET_SEARCH_OR_LEAVE_GROUP="RESET_SEARCH_OR_LEAVE_GROUP",on.SET_ACTIVE_COMMAND="SET_ACTIVE_COMMAND",on.SET_COMMAND_QUERY="SET_COMMAND_QUERY",on.SET_GROUP="SET_GROUP",on.SET_SEARCH_WORD="SET_SEARCH_WORD",on.UNSET_ACTIVE_COMMAND="UNSET_ACTIVE_COMMAND",on.UNSET_RESULT="UNSET_RESULT",on.UPDATE_RESULT="UPDATE_RESULT";Jt.COLLAPSED;const an={collapsed:{on:{UPDATE_SEARCH:{target:Jt.IDLE,actions:[rn.EXPAND,rn.SET_SEARCH_WORD,rn.REFRESH_COMMANDS]},HIGHLIGHT_NEXT_ITEM:{target:Jt.IDLE,actions:[rn.REFRESH_COMMANDS,rn.EXPAND]},EXPAND:{target:Jt.IDLE,actions:[rn.REFRESH_COMMANDS,rn.EXPAND]}}},idle:{on:{UPDATE_SEARCH:{target:Jt.IDLE,actions:[rn.SET_SEARCH_WORD,rn.RESET_HIGHLIGHT,rn.REFRESH_COMMANDS]},HIGHLIGHT_NEXT_ITEM:{target:Jt.IDLE,actions:[rn.HIGHLIGHT_NEXT_COMMAND]},HIGHLIGHT_PREVIOUS_ITEM:{target:Jt.IDLE,actions:[rn.HIGHLIGHT_PREVIOUS_COMMAND]},CANCEL:{target:Jt.IDLE,actions:[rn.RESET_HIGHLIGHT,rn.RESET_SEARCH_OR_LEAVE_GROUP,rn.REFRESH_COMMANDS]},EXECUTE_COMMAND:{target:Jt.EXECUTING_COMMAND,actions:[rn.ADD_RECENTLY_USED,rn.SET_ACTIVE_COMMAND,rn.REFRESH_COMMANDS]},GO_TO_PARENT_GROUP:{target:Jt.IDLE,actions:[rn.RESET_HIGHLIGHT,rn.LEAVE_GROUP,rn.REFRESH_COMMANDS]},SELECT_GROUP:{target:Jt.IDLE,actions:[rn.RESET_SEARCH,rn.RESET_HIGHLIGHT,rn.SET_GROUP,rn.REFRESH_COMMANDS]},ADD_FAVOURITE:{target:Jt.IDLE,actions:[rn.ADD_FAVOURITE,rn.REFRESH_COMMANDS]},REMOVE_FAVOURITE:{target:Jt.IDLE,actions:[rn.REMOVE_FAVOURITE,rn.REFRESH_COMMANDS]}}},executingCommand:{on:{UPDATE_RESULT:{target:Jt.DISPLAYING_RESULT,actions:[rn.UPDATE_RESULT]},FINISH_COMMAND:{target:Jt.IDLE,actions:[rn.UNSET_ACTIVE_COMMAND]}}},displayingResult:{on:{UPDATE_COMMAND_QUERY:{target:Jt.DISPLAYING_RESULT,actions:[rn.SET_COMMAND_QUERY]},UPDATE_RESULT:{target:Jt.DISPLAYING_RESULT,actions:[rn.UPDATE_RESULT,rn.RESET_OPTION_HIGHLIGHT]},HIGHLIGHT_NEXT_ITEM:{target:Jt.DISPLAYING_RESULT,actions:[rn.HIGHLIGHT_NEXT_OPTION]},HIGHLIGHT_PREVIOUS_ITEM:{target:Jt.DISPLAYING_RESULT,actions:[rn.HIGHLIGHT_PREVIOUS_OPTION]},EXECUTE_COMMAND:{target:Jt.DISPLAYING_RESULT,actions:[rn.SET_ACTIVE_COMMAND]},CANCEL:{target:Jt.IDLE,actions:[rn.UNSET_RESULT,rn.UNSET_ACTIVE_COMMAND,rn.RESET_OPTION_HIGHLIGHT]},FINISH_COMMAND:{target:Jt.DISPLAYING_RESULT,actions:[rn.UNSET_ACTIVE_COMMAND]}}}};function ln(e,t,n){let r=an[e.status].on?.[t.type]??null;r||(kt.error(`No transition found for event "${t.type}" in state "${e.status}"`),r={target:e.status});const o={...e,status:"string"==typeof r?r:r.target};return n&&"object"==typeof r&&r.actions?.forEach((e=>n(e,o,t))),kt.debug(`Transitioned from "${e.status}" to "${o.status}" with event "${t.type}"`),o}function sn(e,t,n){switch(e){case rn.RESET_SEARCH:t.searchWord="";break;case rn.RESET_HIGHLIGHT:t.highlightedItem=0;break;case rn.REFRESH_COMMANDS:t.availableCommandIds=qt(t.selectedCommandGroup,t.searchWord,t.commands,t.favouriteCommands,t.recentCommands);break;case rn.HIGHLIGHT_NEXT_COMMAND:t.highlightedItem=wt(t.highlightedItem+1,0,t.availableCommandIds.length-1);break;case rn.HIGHLIGHT_PREVIOUS_COMMAND:t.highlightedItem=wt(t.highlightedItem-1,0,t.availableCommandIds.length-1);break;case rn.HIGHLIGHT_NEXT_OPTION:t.highlightedOption=wt(t.highlightedOption+1,0,Object.keys(t.result.options).length-1);break;case rn.HIGHLIGHT_PREVIOUS_OPTION:t.highlightedOption=wt(t.highlightedOption-1,0,Object.keys(t.result.options).length-1);break;case rn.SET_SEARCH_WORD:Zt(n.type===tn.UPDATE_SEARCH),t.searchWord=n.searchWord;break;case rn.SET_COMMAND_QUERY:Zt(n.type===tn.UPDATE_COMMAND_QUERY),t.commandQuery=n.commandQuery,t.commandQueryDirty=!0;break;case rn.EXPAND:t.expanded=!0;break;case rn.SET_ACTIVE_COMMAND:Zt(n.type===tn.EXECUTE_COMMAND),t.activeCommandId=n.commandId,t.activeCommandMessage=n.message;break;case rn.UNSET_ACTIVE_COMMAND:t.activeCommandId=null,t.activeCommandMessage=null;break;case rn.UPDATE_RESULT:Zt(n.type===tn.UPDATE_RESULT),Zt("boolean"==typeof n.result.success),t.result={options:{},message:"Command executed",view:null,success:!1,...n.result},t.resultCommandId=t.activeCommandId,t.commandQueryDirty=!1;break;case rn.RESET_OPTION_HIGHLIGHT:t.highlightedOption=0;break;case rn.RESET_SEARCH_OR_LEAVE_GROUP:t.commandQuery?t.commandQuery="":t.searchWord?t.searchWord="":t.selectedCommandGroup=t.selectedCommandGroup?t.commands[t.selectedCommandGroup].parentId:null;break;case rn.UNSET_RESULT:t.result=null,t.resultCommandId=null,t.commandQuery="";break;case rn.LEAVE_GROUP:t.selectedCommandGroup=t.selectedCommandGroup?t.commands[t.selectedCommandGroup].parentId:null;break;case rn.SET_GROUP:Zt(n.type===tn.SELECT_GROUP),t.selectedCommandGroup=n.commandId;break;case rn.ADD_FAVOURITE:Zt(n.type===tn.ADD_FAVOURITE),t.favouriteCommands.includes(n.commandId)||(t.favouriteCommands=[...t.favouriteCommands,n.commandId]);break;case rn.REMOVE_FAVOURITE:Zt(n.type===tn.REMOVE_FAVOURITE),t.favouriteCommands=t.favouriteCommands.filter((e=>e!==n.commandId));break;case rn.ADD_RECENTLY_USED:if(Zt(n.type===tn.EXECUTE_COMMAND),!t.commands[n.commandId].action)break;t.recentCommands.includes(n.commandId)&&(t.recentCommands=t.recentCommands.filter((e=>e!==n.commandId))),t.recentCommands.unshift(n.commandId),t.recentCommands.length>5&&t.recentCommands.pop();break;default:throw Error(`Action ${e} not implemented`)}}const un=(e,t)=>ln(e,t,sn);var cn=nt.memo((({children:e})=>nt.createElement("span",{className:"xzQyjW_iconWrap"},e)));var _n=nt.memo((()=>{const{state:{showBranding:e}}=Dn(),{translate:t}=kn();return e?nt.createElement("a",{href:"https://helzle.it/projects?source=commandbar",title:t("CommandBarFooter.branding","Made with love by Sebastian Helzle"),target:"_blank",rel:"noreferrer noopener",className:"_345BVa_madeWithLove"},nt.createElement("small",null,t("CommandBarFooter.brandingSmall","Made with love by")),nt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 180 180"},nt.createElement("defs",null,nt.createElement("linearGradient",{id:"a",gradientUnits:"userSpaceOnUse",x1:"280.25",y1:"377.003",x2:"373.261",y2:"377.003"},nt.createElement("stop",{offset:"0",stopColor:"#297AAC"}),nt.createElement("stop",{offset:"1",stopColor:"#53AADA"}))),nt.createElement("path",{d:"M0 180.017h37.287L71.35 52.898H34.061zM48.717 0l-9.083 33.898h36.675L85.392 0z",fill:"#B9B7B3"}),nt.createElement("path",{d:"M335.972 313.444H288.25l-8 28.306h47.691l-28.03 98.813h39.287l34.063-127.119z",fill:"url(#a)",transform:"translate(-195.462 -260.325)"}))):null}));function dn(){return nt.createElement("svg",{viewBox:"0 0 448 512"},nt.createElement("path",{fill:"currentColor",d:"m257.5 445.1-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}))}function fn(){return nt.createElement("svg",{viewBox:"0 0 512 512"},nt.createElement("path",{fill:"currentColor",d:"M415.44 512h-95.11L212.12 357.46v91.1L125.69 512H28V29.82L68.47 0h108.05l123.74 176.13V63.45L386.69 0h97.69v461.5zM38.77 35.27V496l72-52.88V194l215.5 307.64h84.79l52.35-38.17h-78.27L69 13zm82.54 466.61 80-58.78v-101l-79.76-114.4v220.94L49 501.89h72.34zM80.63 10.77l310.6 442.57h82.37V10.77h-79.75v317.56L170.91 10.77zM311 191.65l72 102.81V15.93l-72 53v122.72z"}))}function mn(){return nt.createElement("svg",{viewBox:"0 0 512 512"},nt.createElement("path",{fill:"currentColor",d:"M288 39.056v16.659c0 10.804 7.281 20.159 17.686 23.066C383.204 100.434 440 171.518 440 256c0 101.689-82.295 184-184 184-101.689 0-184-82.295-184-184 0-84.47 56.786-155.564 134.312-177.219C216.719 75.874 224 66.517 224 55.712V39.064c0-15.709-14.834-27.153-30.046-23.234C86.603 43.482 7.394 141.206 8.003 257.332c.72 137.052 111.477 246.956 248.531 246.667C393.255 503.711 504 392.788 504 256c0-115.633-79.14-212.779-186.211-240.236C302.678 11.889 288 23.456 288 39.056z"}))}function hn(){return nt.createElement("svg",{viewBox:"0 0 576 512"},nt.createElement("path",{fill:"currentColor",d:"M528.1 171.5 382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6zM388.6 312.3l23.7 138.4L288 385.4l-124.3 65.3 23.7-138.4-100.6-98 139-20.2 62.2-126 62.2 126 139 20.2-100.6 98z"}))}function pn(){return nt.createElement("svg",{viewBox:"0 0 512 512"},nt.createElement("path",{fill:"currentColor",d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z"}))}function vn(){return nt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},nt.createElement("path",{fill:"currentColor",d:"M0 224c0 17.7 14.3 32 32 32s32-14.3 32-32c0-53 43-96 96-96H320v32c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-9.2-9.2-22.9-11.9-34.9-6.9S320 19.1 320 32V64H160C71.6 64 0 135.6 0 224zm512 64c0-17.7-14.3-32-32-32s-32 14.3-32 32c0 53-43 96-96 96H192V352c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V448H352c88.4 0 160-71.6 160-160z"}))}var En,gn=nt.memo((()=>{const{state:{activeCommandId:e,activeCommandMessage:t,commands:n,result:r,selectedCommandGroup:o,expanded:a},Icon:i}=Dn(),l=Lt((()=>e.value&&e.value?n.value[e.value]??r.value.options[e.value]:null));return a.value?nt.createElement("footer",{className:"UnIlTW_commandBarFooter"},e.value?nt.createElement("span",{className:"UnIlTW_activity"},nt.createElement(cn,null,nt.createElement(mn,null)),nt.createElement("em",null,l.value.name," ‒ ",t)):o.value?nt.createElement("span",{className:"UnIlTW_breadcrumb"},nt.createElement(i,{icon:n.value[o.value].icon}),nt.createElement("small",null,n.value[o.value].name)):nt.createElement(cn,null,nt.createElement(fn,null)),nt.createElement(_n,null)):null}));En="jZLCTa_executeButton";let Cn=null;var yn=nt.memo((()=>{const{state:e,actions:t}=Dn(),{executeCommand:n}=Un(),{translate:r}=kn(),o=de(),a=e.commands.value[e.activeCommandId.value||e.resultCommandId.value],i=me((r=>{e.status.value===Jt.DISPLAYING_RESULT?(t.UPDATE_COMMAND_QUERY(r.target.value),e.commands.value[e.resultCommandId.value]?.executeManually||(Cn&&clearTimeout(Cn),Cn=setTimeout((()=>n(e.resultCommandId.value)),500))):t.UPDATE_SEARCH(r.target.value)}),[]),l=me((e=>{"Escape"===e.key&&o.current.value&&(e.preventDefault(),e.stopPropagation())}),[o.current]);return Ut((()=>{e.status.value!==Jt.EXECUTING_COMMAND&&o.current?.focus()})),nt.createElement(nt.Fragment,null,nt.createElement("input",{ref:o,className:"jZLCTa_searchBox",type:"search",placeholder:e.status.value===Jt.DISPLAYING_RESULT?r("SearchBox.commandQuery.placeholder","Enter the query for the command"):r("SearchBox.placeholder","What do you want to do today?"),disabled:e.status.value===Jt.DISPLAYING_RESULT&&!a?.canHandleQueries,autoFocus:!0,onChange:i,onKeyUp:l,value:e.status.value===Jt.DISPLAYING_RESULT?e.commandQuery:e.searchWord,"data-testid":"SearchBox"}),!e.expanded.value&&nt.createElement("button",{className:"jZLCTa_expandButton",onClick:t.EXPAND,title:r("SearchBox.expand.title","Expand to show all commands")},nt.createElement(cn,null,nt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},nt.createElement("path",{fill:"currentColor",d:"M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"})))),e.status.value===Jt.DISPLAYING_RESULT&&e.commands.value[e.resultCommandId.value]?.executeManually&&!e.activeCommandId.value&&nt.createElement("button",{className:[En,e.commandQueryDirty.value?"jZLCTa_commandQueryDirty":""].join(" "),onClick:()=>n(e.resultCommandId.value),title:r("SearchBox.execute.title","Execute the command")},nt.createElement(cn,null,e.commandQueryDirty.value?nt.createElement(pn,null):nt.createElement(vn,null))))}));var In=nt.memo((()=>{const{state:e,actions:t}=Dn(),n=Lt((()=>e.status.value==Jt.DISPLAYING_RESULT));return nt.createElement("header",{className:"_1JQCkq_commandBarHeader"},(n.value||e.selectedCommandGroup.value)&&nt.createElement("button",{type:"button",onClick:n.value?t.CANCEL:t.GO_TO_PARENT_GROUP,className:"_1JQCkq_backButton",title:"Back"},nt.createElement(cn,null,nt.createElement(dn,null))),nt.createElement(yn,null))}));function Tn({command:e,onItemSelect:t,highlightedId:n,onToggleFavourite:r}){const{state:{favouriteCommands:o},Icon:a}=Dn(),{translate:i}=kn(),{id:l,name:s,description:u,icon:c,action:_}=e,d=function({subCommandIds:e,category:t,canHandleQueries:n,action:r},o){let a="command";return t||(e?.length>0?a="category":n?a="query":"string"==typeof r&&(a="link"),o(`CommandListItem.type.${a}`,a))}(e,i),f=Lt((()=>n.value===l)),m=Lt((()=>o.value.includes(l)));return nt.createElement("li",{className:Kt("bB4DKG_commandListItem",f.value&&"bB4DKG_highlighted"),onClick:()=>t(l),"data-testid":"CommandListItem"},nt.createElement(a,{icon:c}),nt.createElement("span",{className:"bB4DKG_label"},nt.createElement("span",null,s),u&&nt.createElement("span",{className:"bB4DKG_description"},"string"==typeof u?u:u())),r&&_&&nt.createElement("button",{type:"button",className:Kt("bB4DKG_favouriteButton",m.value&&"bB4DKG_isFavourite"),title:i("CommandListItem.toggleFavourite","Toggle favourite"),onClick:e=>{e.stopPropagation(),r(l)}},nt.createElement(cn,null,nt.createElement(hn,null))),nt.createElement("small",{className:"bB4DKG_type"},d))}var Sn=nt.memo(Tn);const An=()=>{const{state:{commands:e,highlightedItem:t,availableCommandIds:n,status:r,searchWord:o,favouriteCommands:a,recentCommands:i,selectedCommandGroup:l},actions:{ADD_FAVOURITE:s,REMOVE_FAVOURITE:u}}=Dn(),{translate:c}=kn(),{executeCommand:_}=Un(),d=nt.useRef(null);Ut((()=>{d.current?.querySelector(`li:nth-child(${t.value})`)?.scrollIntoView({behavior:"smooth",block:"center"})}));const f=me((e=>{a.value.includes(e)?u(e):s(e)}),[a]),m=Lt((()=>o.value||l.value?[]:n.value.filter((e=>i.value.includes(e))))),h=Lt((()=>o.value||l.value?n.value:n.value.filter((e=>!i.value.includes(e))))),p=Lt((()=>n.value[t.value]));return nt.createElement("nav",{className:Kt("z-zZnG_results",r.value!==Jt.IDLE&&"z-zZnG_disabled"),"data-testid":"CommandList",ref:d},m.value.length>0&&nt.createElement(nt.Fragment,null,nt.createElement("h6",null,c("CommandList.suggestions","Recently used")),nt.createElement("ul",null,m.value.map((t=>nt.createElement(Sn,{key:t,command:e.value[t],onItemSelect:_,highlightedId:p,onToggleFavourite:f}))))),h.value.length>0&&nt.createElement(nt.Fragment,null,nt.createElement("h6",null,c("CommandList.heading","Commands")),nt.createElement("ul",null,h.value.map((t=>nt.createElement(Sn,{key:t,command:e.value[t],onItemSelect:_,highlightedId:p,onToggleFavourite:f}))))),0===n.value.length&&nt.createElement("small",{className:"z-zZnG_noResults"},c("CommandList.noCommandsMessage","No matching commands found")))};var Rn=nt.memo(An);var bn=()=>{const{state:{result:e,highlightedOption:t,activeCommandId:n}}=Dn(),{executeCommand:r}=Un(),{translate:o}=kn(),a=nt.useRef(null),i=Lt((()=>e.value?Object.values(e.value.options)[t.value].id:null)),l=null!==n.value;Ut((()=>{const e=t.value;a.current?.querySelector(`li:nth-child(${e})`)?.scrollIntoView({behavior:"smooth",block:"center"})}));const{options:s,view:u,message:c}=e.value??{};return nt.createElement("div",{className:"SDjQeG_commandResultsView"},c&&nt.createElement("h6",{className:"SDjQeG_message"},c),l?nt.createElement("div",null,o("CommandResultsView.waitingForResults","Waiting for results…")):"",!l&&u?nt.createElement("div",null,u):"",!l&&s&&nt.createElement("nav",{className:"SDjQeG_results",ref:a},nt.createElement("ul",null,Object.keys(s).map((e=>nt.createElement(Sn,{key:e,command:s[e],onItemSelect:r,highlightedId:i}))))))};var On=nt.memo((({handleToggle:e,disabled:t=!1,label:n,title:r,active:o})=>nt.createElement("button",{className:Kt("Vkou1G_toggleButton",o&&"Vkou1G_toggleButtonActive"),onClick:e,disabled:t,title:r},nt.createElement("span",null,n),nt.createElement("span",{className:"Vkou1G_buttonIcon"},"⌘K"))));const Nn=G({}),Dn=()=>he(Nn);const Hn=({commands:e,children:t,IconComponent:n,userPreferences:r})=>{const{state:o,dispatch:a}=fe((()=>function(e){const t=pt(e);return{state:{activeCommandId:yt((()=>t.value.activeCommandId)),activeCommandMessage:yt((()=>t.value.activeCommandMessage)),availableCommandIds:yt((()=>t.value.availableCommandIds)),commandQuery:yt((()=>t.value.commandQuery)),commandQueryDirty:yt((()=>t.value.commandQueryDirty)),commands:yt((()=>t.value.commands)),expanded:yt((()=>t.value.expanded)),favouriteCommands:yt((()=>t.value.favouriteCommands)),highlightedItem:yt((()=>t.value.highlightedItem)),highlightedOption:yt((()=>t.value.highlightedOption)),recentCommands:yt((()=>t.value.recentCommands)),result:yt((()=>t.value.result)),resultCommandId:yt((()=>t.value.resultCommandId)),searchWord:yt((()=>t.value.searchWord)),selectedCommandGroup:yt((()=>t.value.selectedCommandGroup)),showBranding:yt((()=>t.value.showBranding)),status:yt((()=>t.value.status))},dispatch:e=>{t.value=un(t.value,e)}}}({activeCommandId:null,activeCommandMessage:null,availableCommandIds:Object.keys(e),commandQuery:"",commandQueryDirty:!1,commands:Mt(e),expanded:!1,favouriteCommands:r.favouriteCommands,highlightedItem:0,highlightedOption:0,recentCommands:r.recentCommands,result:null,resultCommandId:null,searchWord:"",selectedCommandGroup:null,showBranding:r.showBranding,status:Jt.COLLAPSED})),[]),i=fe((()=>({[tn.RESET_SEARCH]:()=>a({type:tn.RESET_SEARCH}),[tn.HIGHLIGHT_NEXT_ITEM]:()=>a({type:tn.HIGHLIGHT_NEXT_ITEM}),[tn.HIGHLIGHT_PREVIOUS_ITEM]:()=>a({type:tn.HIGHLIGHT_PREVIOUS_ITEM}),[tn.CANCEL]:()=>a({type:tn.CANCEL}),[tn.SELECT_GROUP]:e=>a({type:tn.SELECT_GROUP,commandId:e}),[tn.GO_TO_PARENT_GROUP]:()=>a({type:tn.GO_TO_PARENT_GROUP}),[tn.UPDATE_SEARCH]:e=>a({type:tn.UPDATE_SEARCH,searchWord:e}),[tn.UPDATE_COMMAND_QUERY]:e=>a({type:tn.UPDATE_COMMAND_QUERY,commandQuery:e}),[tn.EXECUTE_COMMAND]:async(e,t)=>(a({type:tn.EXECUTE_COMMAND,commandId:e,message:t}),r.addRecentCommand(e).catch((e=>kt.error("Could not add recent command",e)))),[tn.FINISH_COMMAND]:()=>a({type:tn.FINISH_COMMAND}),[tn.UPDATE_RESULT]:e=>a({type:tn.UPDATE_RESULT,result:e}),[tn.EXPAND]:()=>a({type:tn.EXPAND}),[tn.ADD_FAVOURITE]:e=>(a({type:tn.ADD_FAVOURITE,commandId:e}),r.setFavouriteCommands(o.favouriteCommands.value).catch((e=>kt.error("Could not update favourite commands",e)))),[tn.REMOVE_FAVOURITE]:e=>(a({type:tn.REMOVE_FAVOURITE,commandId:e}),r.setFavouriteCommands(o.favouriteCommands.value).catch((e=>kt.error("Could not update favourite commands",e))))})),[]),l=me((({icon:e,spin:t=!1})=>nt.createElement(cn,null,nt.createElement(n,{icon:e,spin:t}))),[]);return nt.createElement(Nn.Provider,{value:{state:o,actions:i,Icon:l}},t)},Ln=nt.createContext({}),Un=()=>nt.useContext(Ln),Mn=({children:e,toggleOpen:t,dialogRef:n,open:r})=>{const{state:o,actions:a}=Dn(),i=rt((e=>{if(r&&!e.defaultPrevented)if("k"===e.key&&(e.metaKey||e.ctrlKey)&&n?.current.contains(e.target))t(),e.stopPropagation(),e.preventDefault();else if("Escape"===e.key)e.stopPropagation(),e.preventDefault(),o.selectedCommandGroup.value||o.searchWord.value||o.commandQuery.value||o.result.value?a.CANCEL():t();else if("ArrowDown"===e.key)e.stopPropagation(),e.preventDefault(),a.HIGHLIGHT_NEXT_ITEM();else if("ArrowUp"===e.key)e.stopPropagation(),e.preventDefault(),a.HIGHLIGHT_PREVIOUS_ITEM();else if("Enter"===e.key){e.stopPropagation(),e.preventDefault();let t=o.availableCommandIds.value[o.highlightedItem.value];o.status.value===Jt.DISPLAYING_RESULT&&(t=!o.commandQueryDirty.value&&Object.values(o.result.value.options).length?Object.keys(o.result.value.options)[o.highlightedOption.value]:o.resultCommandId.value),t&&l(t)}})),l=me((async e=>{const n=o.result.value?.options[e]??o.commands.value[e],{action:r,canHandleQueries:i,subCommandIds:l,name:s}=n;if(l?.length>0)return void a.SELECT_GROUP(e);if(Zt(r,`Command ${e} has no action`),"string"==typeof r)return await a.EXECUTE_COMMAND(e,"Loading url"),0===r.indexOf("http")&&0!==r.indexOf(document.location.origin)?window.open(r,"_blank","noopener,noreferrer")?.focus():window.location.href=r,a.FINISH_COMMAND();a.EXECUTE_COMMAND(e,"Running command");const u=r(i?o.commandQuery.value:void 0);if(u.then)u.then((e=>{if(e&&!e.success)throw new Error(`The command "${s}" failed`)})).catch((e=>{kt.error("Command error",s,e)})).finally((()=>{a.FINISH_COMMAND()}));else if(u.next){const e=u;for await(const t of e)a.UPDATE_RESULT(t);a.FINISH_COMMAND()}else kt.error("Command result is not a promise or generator",u);n.closeOnExecute&&t()}),[o.searchWord,o.commands,o.result]),s=rt((e=>{l(e)}));return ce((()=>{if(!r)return;const e=e=>i.current(e);return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[r]),nt.createElement(Ln.Provider,{value:{executeCommand:s.current}},e)},Pn=G({}),kn=()=>he(Pn),wn=({translate:e,children:t})=>nt.createElement(Pn.Provider,{value:{translate:e}},t);var Gn=({onDrag:e,open:t,toggleOpen:n})=>{const{state:{expanded:r,result:o}}=Dn(),a=de(null),i=Ht(!1),l=Ht({left:window.innerWidth/2-300,top:window.innerHeight/2-20}),s=Ht({offsetLeft:0,offsetTop:0}),u=Ht(!1),c=Lt((()=>{const{left:e,top:t}=l.value;return u.value?{left:e+"px",top:t+"px",translate:"none",visibility:i.value?"hidden":"visible"}:{}})),_=me(((e,t)=>{const n=a.current.getBoundingClientRect();l.value={left:wt(e,0,window.innerWidth-n.width),top:wt(t,0,window.innerHeight-n.height)}}),[]),d=me((t=>{"INPUT"!==t.target.tagName&&(console.debug("dragstart"),t.dataTransfer.setData("text/plain","CommandBar"),t.dataTransfer.dropEffect="move",t.dataTransfer.effectAllowed="move",it((()=>{s.value={offsetLeft:t.clientX-a.current.offsetLeft,offsetTop:t.clientY-a.current.offsetTop},u.value=!0})),e&&e(!0))}),[a.current]),f=me((t=>{const{clientX:n,clientY:r}=t;console.debug("dragdrop",n,r,s.value),it((()=>{i.value=!1,_(n-s.value.offsetLeft,r-s.value.offsetTop)})),e&&e(!1)}),[a.current]),m=me((()=>_(l.value.left,l.value.top)),[]);return ce((()=>{if(t)return a.current?.parentElement?.addEventListener("drop",f),window.addEventListener("resize",m),()=>{a.current?.parentElement?.removeEventListener("drop",f),window.removeEventListener("resize",m)}}),[t,m,f]),t?nt.createElement("dialog",{ref:a,className:Kt("eoy0jW_commandBar",o.value&&"eoy0jW_hasResults"),open:t,draggable:!0,onDragStart:d,onDrag:()=>i.value=!0,style:c.value,"data-testid":"CommandBarDialog"},nt.createElement(Mn,{toggleOpen:n,dialogRef:a,open:t},nt.createElement(In,null),nt.createElement("div",{className:Kt("eoy0jW_resultsWrap",r.value&&"eoy0jW_expanded",o.value&&"eoy0jW_split")},r.value&&nt.createElement(Rn,null),o.value&&nt.createElement(bn,null)),nt.createElement(gn,null))):null};var xn=({commands:e,open:t,toggleOpen:n,onDrag:r,IconComponent:o,userPreferences:a,translate:i})=>nt.createElement(wn,{translate:i},nt.createElement(Hn,{commands:e,IconComponent:o,userPreferences:a},nt.createElement(Gn,{onDrag:r,open:t,toggleOpen:n}))),Vn={};async function Fn(e,t,n="GET"){return t&&"GET"===n&&(e=Object.keys(t).reduce(((e,n)=>e+"&"+n+"="+encodeURIComponent(t[n])),e+"?")),fetch(e,{method:n,credentials:"include",body:t&&"POST"===n?JSON.stringify(t):void 0,headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((e=>{if(200!==e.status)throw new Error(`The request failed with code ${e.status}: "${e.statusText}"`);return e.headers.get("Content-Type")?.includes("application/json")?e.json():e.text()}))}e(Vn,"getPreferences",(()=>jn)),e(Vn,"setFavouriteCommands",(()=>Wn)),e(Vn,"addRecentCommand",(()=>zn)),e(Vn,"addRecentDocument",(()=>$n));async function Bn(e,t){return Fn(e,t,"POST")}async function jn(){return Fn("/neos/shel-neos-commandbar/preferences/getpreferences")}async function Wn(e){return Bn("/neos/shel-neos-commandbar/preferences/setfavourites",{commandIds:e})}async function zn(e){return Bn("/neos/shel-neos-commandbar/preferences/addrecentcommand",{commandId:e})}async function $n(e){return Bn("/neos/shel-neos-commandbar/preferences/addrecentdocument",{nodeContextPath:e})}var Xn={};e(Xn,"getCommands",(()=>Qn));async function Qn(){return Fn("/neos/service/data-source/shel-neos-commandbar-commands")}var Yn={};e(Yn,"searchNeosDocs",(()=>qn));async function qn(e){return e?Fn("/neos/service/data-source/shel-neos-commandbar-search-neos-docs",{query:e}):{}}var Zn={};e(Zn,"searchNeosPackages",(()=>Kn));async function Kn(e){return e?Fn("/neos/service/data-source/shel-neos-commandbar-search-neos-packages",{query:e}):{}}var Jn,er;Jn="o4liXq_fullScreenLayer",er="o4liXq_spin";var tr=({spin:e=!1})=>Q("svg",{className:e?er:"",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Q("path",{fill:"currentColor",d:"M509.5 184.6 458.9 32.8C452.4 13.2 434.1 0 413.4 0H272v192h238.7c-.4-2.5-.4-5-1.2-7.4zM240 0H98.6c-20.7 0-39 13.2-45.5 32.8L2.5 184.6c-.8 2.4-.8 4.9-1.2 7.4H240V0zM0 224v240c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V224H0z"})});class nr extends p{static tagName="command-bar-container";static options={shadow:!0};constructor(){super(),nr.i18nRegistry=window.NeosCMS.I18n,this.state={initialized:!1,open:!1,dragging:!1,commands:{searchNeosDocs:{name:nr.translate("CommandBarUiPlugin.command.documentation","Documentation"),description:nr.translate("CommandBarUiPlugin.command.documentation.description","Browse or search the Neos documentation"),icon:"book",canHandleQueries:!0,action:this.handleSearchNeosDocs.bind(this)},searchNeosPackages:{name:nr.translate("CommandBarUiPlugin.command.packages","Packages"),description:nr.translate("CommandBarUiPlugin.command.packages.description","Search for Neos packages"),icon:"boxes",canHandleQueries:!0,action:this.handleSearchNeosPackages.bind(this)}},preferences:{favouriteCommands:[],recentCommands:[],recentDocuments:[],showBranding:!0}}}static translate=(e,t,n)=>("string"==typeof t&&(n=t,t={}),nr.i18nRegistry.translate(e,n,"Shel.Neos.CommandBar","Main",t));async componentDidMount(){try{const e=await Vn.getPreferences(),t=await Xn.getCommands();this.setState((n=>({initialized:!0,preferences:e,commands:{...n.commands,...t}}))),document.addEventListener("keydown",(e=>{"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.stopPropagation(),e.preventDefault(),this.handleToggle())}))}catch(e){kt.error(e)}}handleToggle=()=>{this.setState((({open:e})=>({open:!e})))};handleDrag=e=>{this.setState({dragging:e})};handleSearchNeosDocs=async function*(e){let t;yield{success:!0,message:nr.translate("CommandBarUiPlugin.command.documentation.searching",{query:e},`Search for "${e}"`)};const n=await Yn.searchNeosDocs(e).catch((e=>{kt.error("Could not search Neos docs",e),t=e.message}));t||!n?yield{success:!1,message:nr.translate("CommandBarUiPlugin.command.documentation.error","Search failed"),view:t}:yield{success:!0,message:nr.translate("CommandBarUiPlugin.command.documentation.matches",{matches:Object.keys(n).length},`${Object.values(n).length} options match your query`),options:n}};handleSearchNeosPackages=async function*(e){let t;yield{success:!0,message:nr.translate("CommandBarUiPlugin.command.packages.searching",{query:e},`Search for "${e}"`)};const n=await Zn.searchNeosPackages(e).catch((e=>{kt.error("Could not search Neos packages",e),t=e.message}));t||!n?yield{success:!1,message:nr.translate("CommandBarUiPlugin.command.packages.error","Search failed"),view:t}:yield{success:!0,message:nr.translate("CommandBarUiPlugin.command.packages.matches",{matches:Object.values(n).length},`${Object.values(n).length} options match your query`),options:n}};render(){const{initialized:e,open:t,dragging:n,commands:r,preferences:o}=this.state;return Q(h,{children:[Q("style",{children:'@import "'+this.props.styleuri+'";'}),Q("div",{className:Kt("o4liXq_pluginWrap","rrAaca_commandBarTheme"),children:[Q(On,{handleToggle:this.handleToggle,disabled:!e,label:nr.translate("ToggleButton.label","Search…"),title:nr.translate("ToggleButton.title","Search and execute commands"),active:t}),e&&Q("div",{className:[Jn,t&&"o4liXq_open"].join(" "),onDragOver:e=>e.preventDefault(),style:n?{pointerEvents:"all"}:null,children:Q(xn,{commands:r,open:t,toggleOpen:this.handleToggle,onDrag:this.handleDrag,IconComponent:tr,userPreferences:{...o,setFavouriteCommands:Vn.setFavouriteCommands,addRecentCommand:Vn.addRecentCommand,addRecentDocument:Vn.addRecentDocument},translate:nr.translate})})]})]})}}function rr(){if(window.SHEL_NEOS_COMMANDBAR_INITIALIZED)return;window.SHEL_NEOS_COMMANDBAR_INITIALIZED=!0,$(nr,null,null,nr.options);const e=document.querySelector(".neos-top-bar-left"),t=document.createElement("command-bar-container");t.id="shel-neos-commandbar";const n=document.querySelector('link[rel="stylesheet"][href*="Shel.Neos.CommandBar"]');t.setAttribute("styleuri",n.href),e.appendChild(t)}window.NeosCMS?.I18n?.initialized?rr():window.addEventListener("neoscms-i18n-initialized",rr)})(); +(()=>{function e(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var t,n,r,o,a,i,l,s={},u=[],c=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function _(e,t){for(var n in t)e[n]=t[n];return e}function d(e){var t=e.parentNode;t&&t.removeChild(e)}function f(e,n,r){var o,a,i,l={};for(i in n)"key"==i?o=n[i]:"ref"==i?a=n[i]:l[i]=n[i];if(arguments.length>2&&(l.children=arguments.length>3?t.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===l[i]&&(l[i]=e.defaultProps[i]);return m(e,l,o,a,null)}function m(e,t,o,a,i){var l={type:e,props:t,key:o,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++r:i};return null==i&&null!=n.vnode&&n.vnode(l),l}function h(e){return e.children}function p(e,t){this.props=e,this.context=t}function v(e,t){if(null==t)return e.__?v(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&o.sort((function(e,t){return e.__v.__b-t.__v.__b})));C.__r=0}function y(e,t,n,r,o,a,i,l,c,_){var d,f,p,E,g,C,y,T=r&&r.__k||u,R=T.length;for(n.__k=[],d=0;d0?m(E.type,E.props,E.key,E.ref?E.ref:null,E.__v):E)){if(E.__=n,E.__b=n.__b+1,null===(p=T[d])||p&&E.key==p.key&&E.type===p.type)T[d]=void 0;else for(f=0;f=0;t--)if((n=e.__k[t])&&(r=A(n)))return r;return null}function R(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||c.test(t)?n:n+"px"}function b(e,t,n,r,o){var a;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||R(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||R(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r||e.addEventListener(t,a?N:O,a):e.removeEventListener(t,a?N:O,a);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,n))}}function O(e){return this.l[e.type+!1](n.event?n.event(e):e)}function N(e){return this.l[e.type+!0](n.event?n.event(e):e)}function D(e,r,o,a,i,l,u,c,f){var m,E,g,C,I,T,S,A,R,O,N,D,H,L,U,P=r.type;if(void 0!==r.constructor)return null;null!=o.__h&&(f=o.__h,c=r.__e=o.__e,r.__h=null,l=[c]),(m=n.__b)&&m(r);try{e:if("function"==typeof P){if(A=r.props,R=(m=P.contextType)&&a[m.__c],O=m?R?R.props.value:m.__:a,o.__c?S=(E=r.__c=o.__c).__=E.__E:("prototype"in P&&P.prototype.render?r.__c=E=new P(A,O):(r.__c=E=new p(A,O),E.constructor=P,E.render=M),R&&R.sub(E),E.props=A,E.state||(E.state={}),E.context=O,E.__n=a,g=E.__d=!0,E.__h=[],E._sb=[]),null==E.__s&&(E.__s=E.state),null!=P.getDerivedStateFromProps&&(E.__s==E.state&&(E.__s=_({},E.__s)),_(E.__s,P.getDerivedStateFromProps(A,E.__s))),C=E.props,I=E.state,E.__v=r,g)null==P.getDerivedStateFromProps&&null!=E.componentWillMount&&E.componentWillMount(),null!=E.componentDidMount&&E.__h.push(E.componentDidMount);else{if(null==P.getDerivedStateFromProps&&A!==C&&null!=E.componentWillReceiveProps&&E.componentWillReceiveProps(A,O),!E.__e&&null!=E.shouldComponentUpdate&&!1===E.shouldComponentUpdate(A,E.__s,O)||r.__v===o.__v){for(r.__v!==o.__v&&(E.props=A,E.state=E.__s,E.__d=!1),E.__e=!1,r.__e=o.__e,r.__k=o.__k,r.__k.forEach((function(e){e&&(e.__=r)})),N=0;N2&&(l.children=arguments.length>3?t.call(arguments,2):r),m(e.type,l,o||e.key,a||e.ref,null)}function G(e,t){var n={__c:t="__cC"+l++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,g(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}function x(){return(x=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["context","children"]);return w(t,n)}function F(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=f(V,x({},this._props,{context:e.detail.context}),function e(t,n){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var r=[],o={},a=0,i=t.attributes,l=t.childNodes;for(a=i.length;a--;)"slot"!==i[a].name&&(o[i[a].name]=i[a].value,o[B(i[a].name)]=i[a].value);for(a=l.length;a--;){var s=e(l[a],null),u=l[a].slot;u?o[u]=f(z,{name:u},s):r[a]=s}var c=n?f(z,null,r):r;return f(n||t.nodeName.toLowerCase(),o,c)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?k:P)(this._vdom,this._root)}function B(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function j(e,t,n){if(this._vdom){var r={};r[e]=n=null==n?void 0:n,r[B(e)]=n,this._vdom=w(this._vdom,r),P(this._vdom,this._root)}}function W(){P(this._vdom=null,this._root)}function z(e,t){var n=this;return f("slot",x({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function $(e,t,n,r){function o(){var t=Reflect.construct(HTMLElement,[],o);return t._vdomComponent=e,t._root=r&&r.shadow?t.attachShadow({mode:"open"}):t,t}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=F,o.prototype.attributeChangedCallback=j,o.prototype.disconnectedCallback=W,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach((function(e){Object.defineProperty(o.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})})),customElements.define(t||e.tagName||e.displayName||e.name,o)}t=u.slice,n={__e:function(e,t,n,r){for(var o,a,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&null!=a.getDerivedStateFromError&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(t){e=t}throw e}},r=0,p.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=_({},this.state),"function"==typeof e&&(e=e(_({},n),this.props)),e&&_(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),g(this))},p.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),g(this))},p.prototype.render=h,o=[],i="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,C.__r=0,l=0;var X=0;function Q(e,t,r,o,a,i){var l,s,u={};for(s in t)"ref"==s?l=t[s]:u[s]=t[s];var c={type:e,props:u,key:r,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--X,__source:a,__self:i};if("function"==typeof e&&(l=e.defaultProps))for(s in l)void 0===u[s]&&(u[s]=l[s]);return n.vnode&&n.vnode(c),c}var Y,q,Z,K,J=0,ee=[],te=[],ne=n.__b,re=n.__r,oe=n.diffed,ae=n.__c,ie=n.unmount;function le(e,t){n.__h&&n.__h(q,e,J||t),J=0;var r=q.__H||(q.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:te}),r.__[e]}function se(e){return J=1,ue(Ie,e)}function ue(e,t,n){var r=le(Y++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Ie(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=q,!q.u)){q.u=!0;var o=q.shouldComponentUpdate;q.shouldComponentUpdate=function(e,t,n){if(!r.__c.__H)return!0;var a=r.__c.__H.__.filter((function(e){return e.__c}));if(a.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var i=!1;return a.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}})),!(!i&&r.__c.props===e)&&(!o||o.call(this,e,t,n))}}return r.__N||r.__}function ce(e,t){var r=le(Y++,3);!n.__s&&ye(r.__H,t)&&(r.__=e,r.i=t,q.__H.__h.push(r))}function _e(e,t){var r=le(Y++,4);!n.__s&&ye(r.__H,t)&&(r.__=e,r.i=t,q.__h.push(r))}function de(e){return J=5,fe((function(){return{current:e}}),[])}function fe(e,t){var n=le(Y++,7);return ye(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function me(e,t){return J=8,fe((function(){return e}),t)}function he(e){var t=q.context[e.__c],n=le(Y++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(q)),t.props.value):e.__}function pe(){for(var e;e=ee.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ge),e.__H.__h.forEach(Ce),e.__H.__h=[]}catch(t){e.__H.__h=[],n.__e(t,e.__v)}}n.__b=function(e){q=null,ne&&ne(e)},n.__r=function(e){re&&re(e),Y=0;var t=(q=e.__c).__H;t&&(Z===q?(t.__h=[],q.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=te,e.__N=e.i=void 0}))):(t.__h.forEach(ge),t.__h.forEach(Ce),t.__h=[])),Z=q},n.diffed=function(e){oe&&oe(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ee.push(t)&&K===n.requestAnimationFrame||((K=n.requestAnimationFrame)||Ee)(pe)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==te&&(e.__=e.__V),e.i=void 0,e.__V=te}))),Z=q=null},n.__c=function(e,t){t.some((function(e){try{e.__h.forEach(ge),e.__h=e.__h.filter((function(e){return!e.__||Ce(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],n.__e(r,e.__v)}})),ae&&ae(e,t)},n.unmount=function(e){ie&&ie(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{ge(e)}catch(e){t=e}})),r.__H=void 0,t&&n.__e(t,r.__v))};var ve="function"==typeof requestAnimationFrame;function Ee(e){var t,n=function(){clearTimeout(r),ve&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ve&&(t=requestAnimationFrame(n))}function ge(e){var t=q,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),q=t}function Ce(e){var t=q;e.__c=e.__(),q=t}function ye(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Ie(e,t){return"function"==typeof t?t(e):t}function Te(e,t){for(var n in t)e[n]=t[n];return e}function Se(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function Ae(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function Re(e){this.props=e}(Re.prototype=new p).isPureReactComponent=!0,Re.prototype.shouldComponentUpdate=function(e,t){return Se(this.props,e)||Se(this.state,t)};var be=n.__b;n.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),be&&be(e)};var Oe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var Ne=function(e,t){return null==e?null:T(T(e).map(t))},De={map:Ne,forEach:Ne,count:function(e){return e?T(e).length:0},only:function(e){var t=T(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:T},He=n.__e;n.__e=function(e,t,n,r){if(e.then)for(var o,a=t;a=a.__;)if((o=a.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);He(e,t,n,r)};var Le=n.unmount;function Ue(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=Te({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ue(e,t,n)}))),e}function Me(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Me(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Pe(){this.__u=0,this.t=null,this.__b=null}function ke(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function we(){this.u=null,this.o=null}n.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Le&&Le(e)},(Pe.prototype=new p).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=ke(r.__v),a=!1,i=function(){a||(a=!0,n.__R=null,o?o(l):l())};n.__R=i;var l=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Me(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},s=!0===t.__h;r.__u++||s||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},Pe.prototype.componentWillUnmount=function(){this.t=[]},Pe.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Ue(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&f(h,null,e.fallback);return o&&(o.__h=null),[f(h,null,t.__a?null:e.children),o]};var Ge=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),P(f(xe,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}(we.prototype=new p).__a=function(e){var t=this,n=ke(t.__v),r=t.o.get(e);return r[0]++,function(o){var a=function(){t.props.revealOrder?(r.push(o),Ge(t,e,r)):o()};n?n(a):a()}},we.prototype.render=function(e){this.u=null,this.o=new Map;var t=T(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},we.prototype.componentDidUpdate=we.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Ge(e,n,t)}))};var Fe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Be=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,je="undefined"!=typeof document,We=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};p.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(p.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var ze=n.event;function $e(){}function Xe(){return this.cancelBubble}function Qe(){return this.defaultPrevented}n.event=function(e){return ze&&(e=ze(e)),e.persist=$e,e.isPropagationStopped=Xe,e.isDefaultPrevented=Qe,e.nativeEvent=e};var Ye,qe={configurable:!0,get:function(){return this.class}},Ze=n.vnode;n.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var o=-1===t.indexOf("-");for(var a in r={},n){var i=n[a];je&&"children"===a&&"noscript"===t||"value"===a&&"defaultValue"in n&&null==i||("defaultValue"===a&&"value"in n&&null==n.value?a="value":"download"===a&&!0===i?i="":/ondoubleclick/i.test(a)?a="ondblclick":/^onchange(textarea|input)/i.test(a+t)&&!We(n.type)?a="oninput":/^onfocus$/i.test(a)?a="onfocusin":/^onblur$/i.test(a)?a="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(a)?a=a.toLowerCase():o&&Be.test(a)?a=a.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===i&&(i=void 0),/^oninput$/i.test(a)&&(a=a.toLowerCase(),r[a]&&(a="oninputCapture")),r[a]=i)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=T(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=T(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(qe.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",qe))}e.$$typeof=Fe,Ze&&Ze(e)};var Ke=n.__r;n.__r=function(e){Ke&&Ke(e),Ye=e.__c};var Je=n.diffed;n.diffed=function(e){Je&&Je(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),Ye=null};function et(e){return!!e&&e.$$typeof===Fe}function tt(e){e()}var nt={useState:se,useId:function(){var e=le(Y++,11);if(!e.__){for(var t=q.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__},useReducer:ue,useEffect:ce,useLayoutEffect:_e,useInsertionEffect:_e,useTransition:function(){return[!1,tt]},useDeferredValue:function(e){return e},useSyncExternalStore:function(e,t){var n=t(),r=se({h:{__:n,v:t}}),o=r[0].h,a=r[1];return _e((function(){o.__=n,o.v=t,Ae(o.__,t())||a({h:o})}),[e,n,t]),ce((function(){return Ae(o.__,o.v())||a({h:o}),e((function(){Ae(o.__,o.v())||a({h:o})}))}),[e]),n},startTransition:tt,useRef:de,useImperativeHandle:function(e,t,n){J=6,_e((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))},useMemo:fe,useCallback:me,useContext:he,useDebugValue:function(e,t){n.useDebugValue&&n.useDebugValue(t?t(e):e)},version:"17.0.2",Children:De,render:function(e,t,n){return null==t.__k&&(t.textContent=""),P(e,t),"function"==typeof n&&n(),e?e.__c:null},hydrate:function(e,t,n){return k(e,t),"function"==typeof n&&n(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(P(null,e),!0)},createPortal:function(e,t){var n=f(Ve,{__v:e,i:t});return n.containerInfo=t,n},createElement:f,createContext:G,createFactory:function(e){return f.bind(null,e)},cloneElement:function(e){return et(e)?w.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:h,isValidElement:et,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:p,PureComponent:Re,memo:function(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:Se(this.props,e)}function r(t){return this.shouldComponentUpdate=n,f(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r},forwardRef:function(e){function t(t){var n=Te({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Oe,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},flushSync:function(e,t){return e(t)},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:h,Suspense:Pe,SuspenseList:we,lazy:function(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return f(n,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:{current:{readContext:function(e){return Ye.__n[e.__c].props.value}}}}};function rt(e){const t=de(e);return t.current=e,t}function ot(){throw new Error("Cycle detected")}function at(){if(_t>1)_t--;else{for(var e,t=!1;void 0!==ct;){var n=ct;for(ct=void 0,dt++;void 0!==n;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&vt(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(dt=0,_t--,t)throw e}}function it(e){if(_t>0)return e();_t++;try{return e()}finally{at()}}var lt,st,ut=void 0,ct=void 0,_t=0,dt=0,ft=0;function mt(e){if(void 0!==ut){var t=e.n;if(void 0===t||t.t!==ut)return t={i:0,S:e,p:ut.s,n:void 0,t:ut,e:void 0,x:void 0,r:t},void 0!==ut.s&&(ut.s.n=t),ut.s=t,e.n=t,32&ut.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=ut.s,t.n=void 0,ut.s.n=t,ut.s=t),t}}function ht(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}function pt(e){return new ht(e)}function vt(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Et(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function gt(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function Ct(e){ht.call(this,void 0),this.x=e,this.s=void 0,this.g=ft-1,this.f=4}function yt(e){return new Ct(e)}function It(e){var t=e.u;if(e.u=void 0,"function"==typeof t){_t++;var n=ut;ut=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,Tt(e),t}finally{ut=n,at()}}}function Tt(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,It(e)}function St(e){if(ut!==this)throw new Error("Out-of-order effect");gt(this),ut=e,this.f&=-2,8&this.f&&Tt(this),at()}function At(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}function Rt(e){var t=new At(e);try{t.c()}catch(e){throw t.d(),e}return t.d.bind(t)}function bt(e,t){n[e]=t.bind(null,n[e]||function(){})}function Ot(e){st&&st(),st=e&&e.S()}function Nt(e){var t=this,n=e.data,r=Ht(n);r.value=n;var o=fe((function(){for(var e=t.__v;e=e.__;)if(e.__c){e.__c.__$f|=4;break}return t.__$u.c=function(){t.base.data=o.peek()},yt((function(){var e=r.value.value;return 0===e?0:!0===e?"":e||""}))}),[]);return o.value}function Dt(e,t,n,r){var o=t in e&&void 0===e.ownerSVGElement,a=pt(n);return{o:function(e,t){a.value=e,r=t},d:Rt((function(){var n=a.value.value;r[t]!==n&&(r[t]=n,o?e[t]=n:n?e.setAttribute(t,n):e.removeAttribute(t))}))}}function Ht(e){return fe((function(){return pt(e)}),[])}function Lt(e){var t=de(e);return t.current=e,lt.__$f|=4,fe((function(){return yt((function(){return t.current()}))}),[])}function Ut(e){var t=de(e);t.current=e,ce((function(){return Rt((function(){return t.current()}))}),[])}function Mt(e,t=null){return Object.keys(e).reduce(((n,r)=>{const{icon:o,description:a,name:i,subCommands:l,action:s,canHandleQueries:u,closeOnExecute:c,category:_,executeManually:d}=e[r],f=t?`${t}.${r}`:r,m=l?Object.keys(l).map((e=>`${f}.${e}`)):[];return n[f]={id:f,name:i,icon:o,description:a,action:s,canHandleQueries:u,subCommandIds:m,parentId:t,closeOnExecute:c,category:_,executeManually:d},m.length>0?{...n,...Mt(l,f)}:n}),{})}ht.prototype.h=function(){return!0},ht.prototype.S=function(e){this.t!==e&&void 0===e.e&&(e.x=this.t,void 0!==this.t&&(this.t.e=e),this.t=e)},ht.prototype.U=function(e){if(void 0!==this.t){var t=e.e,n=e.x;void 0!==t&&(t.x=n,e.e=void 0),void 0!==n&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}},ht.prototype.subscribe=function(e){var t=this;return Rt((function(){var n=t.value,r=32&this.f;this.f&=-33;try{e(n)}finally{this.f|=r}}))},ht.prototype.valueOf=function(){return this.value},ht.prototype.toString=function(){return this.value+""},ht.prototype.peek=function(){return this.v},Object.defineProperty(ht.prototype,"value",{get:function(){var e=mt(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){dt>100&&ot(),this.v=e,this.i++,ft++,_t++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{at()}}}}),(Ct.prototype=new ht).h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===ft)return!0;if(this.g=ft,this.f|=1,this.i>0&&!vt(this))return this.f&=-2,!0;var e=ut;try{Et(this),ut=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return ut=e,gt(this),this.f&=-2,!0},Ct.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}ht.prototype.S.call(this,e)},Ct.prototype.U=function(e){if(void 0!==this.t&&(ht.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},Ct.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Ct.prototype.peek=function(){if(this.h()||ot(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ct.prototype,"value",{get:function(){1&this.f&&ot();var e=mt(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),At.prototype.c=function(){var e=this.S();try{8&this.f||void 0===this.x||(this.u=this.x())}finally{e()}},At.prototype.S=function(){1&this.f&&ot(),this.f|=1,this.f&=-9,It(this),Et(this),_t++;var e=ut;return ut=this,St.bind(this,e)},At.prototype.N=function(){2&this.f||(this.f|=2,this.o=ct,ct=this)},At.prototype.d=function(){this.f|=8,1&this.f||Tt(this)},Nt.displayName="_st",Object.defineProperties(ht.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Nt},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),bt("__b",(function(e,t){if("string"==typeof t.type){var n,r=t.props;for(var o in r)if("children"!==o){var a=r[o];a instanceof ht&&(n||(t.__np=n={}),n[o]=a,r[o]=a.peek())}}e(t)})),bt("__r",(function(e,t){Ot();var n,r=t.__c;r&&(r.__$f&=-2,void 0===(n=r.__$u)&&(r.__$u=n=function(e){var t;return Rt((function(){t=this})),t.c=function(){r.__$f|=1,r.setState({})},t}())),lt=r,Ot(n),e(t)})),bt("__e",(function(e,t,n,r){Ot(),lt=void 0,e(t,n,r)})),bt("diffed",(function(e,t){var n;if(Ot(),lt=void 0,"string"==typeof t.type&&(n=t.__e)){var r=t.__np,o=t.props;if(r){var a=n.U;if(a)for(var i in a){var l=a[i];void 0===l||i in r||(l.d(),a[i]=void 0)}else n.U=a={};for(var s in r){var u=a[s],c=r[s];void 0===u?(u=Dt(n,s,c,o),a[s]=u):u.o(c,o)}}}e(t)})),bt("unmount",(function(e,t){if("string"==typeof t.type){var n=t.__e;if(n){var r=n.U;if(r)for(var o in n.U=void 0,r){var a=r[o];a&&a.d()}}}else{var i=t.__c;if(i){var l=i.__$u;l&&(i.__$u=void 0,l.d())}}e(t)})),bt("__h",(function(e,t,n,r){r<3&&(t.__$f|=2),e(t,n,r)})),p.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u;if(!(n&&void 0!==n.s||4&this.__$f))return!0;if(3&this.__$f)return!0;for(var r in t)return!0;for(var o in e)if("__source"!==o&&e[o]!==this.props[o])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};const Pt="%c[COMMANDBAR]";var kt={ok:(e,...t)=>console.log(Pt,"color: green",e,...t),error:(e,...t)=>console.log(Pt,"color: red",e,...t),warn:(e,...t)=>console.warn(Pt,"color: orange",e,...t),debug:()=>null};function wt(e,t,n){return Math.max(t,Math.min(n,e))}const Gt=new Intl.Collator("en").compare,xt=1/0,Vt=/(?:\s+|^)-[a-z\d]+/gi,Ft={interSplit:"[^A-Za-z0-9']+",intraSplit:"[a-z][A-Z]",intraBound:"[A-Za-z][0-9]|[0-9][A-Za-z]|[a-z][A-Z]",interLft:0,interRgt:0,interChars:".",interIns:xt,intraChars:"[a-z\\d']",intraIns:0,intraContr:"'[a-z]{1,2}\\b",intraMode:0,intraSlice:[1,xt],intraSub:0,intraTrn:0,intraDel:0,intraFilt:(e,t,n)=>!0,sort:(e,t,n)=>{let{idx:r,chars:o,terms:a,interLft2:i,interLft1:l,start:s,intraIns:u,interIns:c}=e;return r.map(((e,t)=>t)).sort(((e,n)=>o[n]-o[e]||u[e]-u[n]||a[n]+i[n]+.5*l[n]-(a[e]+i[e]+.5*l[e])||c[e]-c[n]||s[e]-s[n]||Gt(t[r[e]],t[r[n]])))}},Bt=(e,t)=>0==t?"":1==t?e+"??":t==xt?e+"*?":e+`{0,${t}}?`,jt="(?:\\b|_)";function Wt(e){e=Object.assign({},Ft,e);const{interLft:t,interRgt:n,intraMode:r,intraSlice:o,intraIns:a,intraSub:i,intraTrn:l,intraDel:s,intraContr:u,intraSplit:c,interSplit:_,intraBound:d,intraChars:f}=e;let{intraRules:m}=e;null==m&&(m=e=>{let t=Ft.intraSlice,n=0,r=0,u=0,c=0,_=e.length;return _<=4?_>=3&&(u=Math.min(l,1),4==_&&(n=Math.min(a,1))):(t=o,n=a,r=i,u=l,c=s),{intraSlice:t,intraIns:n,intraSub:r,intraTrn:u,intraDel:c}});let h=!!c,p=new RegExp(c,"g"),v=new RegExp(_,"g"),E=new RegExp("^"+_+"|"+_+"$","g"),g=new RegExp(u,"gi");const C=e=>(e=e.replace(E,"").toLowerCase(),h&&(e=e.replace(p,(e=>e[0]+" "+e[1]))),e.split(v).filter((e=>""!=e))),y=(o,i=0,l=!1)=>{let s=C(o);if(0==s.length)throw"Empty needle!";let u,c=Array(s.length).fill("");if(s=s.map(((e,t)=>e.replace(g,(e=>(c[t]=e,""))))),1==r)u=s.map(((e,t)=>{let{intraSlice:n,intraIns:r,intraSub:o,intraTrn:a,intraDel:i}=m(e);if(r+o+a+i==0)return e+c[t];let[l,s]=n,u=e.slice(0,l),_=e.slice(s),d=e.slice(l,s);1==r&&1==u.length&&u!=d[0]&&(u+="(?!"+u+")");let h=d.length,p=[];if(o)for(let e=0;e0&&(e=")("+e+")("),u=s.map(((t,n)=>t.split("").map(((e,t,n)=>(1==a&&0==t&&n.length>1&&e[t]!=e[t+1]&&(e+="(?!"+e+")"),e))).join(e)+c[n]))}let _=2==t?jt:"",d=2==n?jt:"",h=d+Bt(e.interChars,e.interIns)+_;return i>0?l?u=_+"("+u.join(")"+d+"|"+_+"(")+")"+d:(u="("+u.join(")("+h+")(")+")",u="(.?"+_+")"+u+"("+d+".*)"):(u=u.join(h),u=_+u+d),[new RegExp(u,"i"),s,c]},I=(e,t,n)=>{let r=[],[o]=y(t);if(null!=n)for(let t=0;t{let[i,l,s]=y(a,1),[u]=y(a,2),c=l.length,_=r.length,d=Array(_).fill(0),f={idx:Array(_),start:d.slice(),chars:d.slice(),terms:d.slice(),interIns:d.slice(),intraIns:d.slice(),interLft2:d.slice(),interRgt2:d.slice(),interLft1:d.slice(),interRgt1:d.slice(),ranges:Array(_)},m=1==t||1==n,h=0;for(let a=0;a=u){let e=d[o+1].toLowerCase().indexOf(i);e>-1&&(H.push(v,e,u),v+=b(d,o,e,u),a=i,f=u,h=!0,0==r&&(p=v))}if(m||h){let e=v-1,r=v+f,l=!0,s=!0;if(-1==e||S.test(_[e]))h&&g++;else{if(2==t){E=!0;break}if(T&&A.test(_[e]+_[e+1]))h&&C++;else{if(1==t){let e=d[o+1],t=v+f;if(e.length>=u){let n,r=0,l=!1,s=new RegExp(i,"ig");for(;n=s.exec(e);){r=n.index;let e=t+r,o=e-1;if(-1==o||S.test(_[o])){g++,l=!0;break}if(A.test(_[o]+_[e])){C++,l=!0;break}}if(l){H.push(v,r,u),v+=b(d,o,r,u),a=i,f=u,h=!0;break}}E=!0;break}l=!1}}if(r==_.length||S.test(_[r]))h&&y++;else{if(2==n){E=!0;break}if(T&&A.test(_[r-1]+_[r]))h&&I++;else{if(1==n){E=!0;break}s=!1}}h&&(R+=u,l&&s&&O++)}if(f>u&&(D+=f-u),r>0&&(N+=d[o-1].length),!e.intraFilt(i,a,v)){E=!0;break}r0?0:1/0,c=l-3;for(let r=2;r0&&(t.push(o,i),o=i=n)}i>o&&t.push(o,i),h++}}if(h{let o=e[t]+e[t+1].slice(0,n);return e[t-1]+=o,e[t]=e[t+1].slice(n,n+r),e[t+1]=e[t+1].slice(n+r),o.length};return{search:(...t)=>((t,n,r=!1,o=1e3,a)=>{let i,l=null,s=null,u=[];if(n=n.replace(Vt,(e=>(u.push(e.trim().slice(1)),""))),u.length>0&&(i=new RegExp(u.join("|"),"i"),""==n.trim())){let e=[];for(let n=0;n1){let n=e.slice().sort(((e,t)=>t.length-e.length));for(let e=0;ee.join(" "))),s=[];let r=new Set;for(let e=0;e!r.has(e))),o=I(t,l[e],n);for(let e=0;e0?a:I(t,n)]);let c=null,_=null;if(u.length>0&&(s=s.map((e=>e.filter((e=>!i.test(t[e])))))),s.reduce(((e,t)=>e+t.length),0)<=o){c={},_=[];for(let n=0;n0)for(let e=0;e{let e={A:"ÁÀÃÂÄĄ",a:"áàãâäą",E:"ÉÈÊËĖ",e:"éèêëę",I:"ÍÌÎÏĮ",i:"íìîïį",O:"ÓÒÔÕÖ",o:"óòôõö",U:"ÚÙÛÜŪŲ",u:"úùûüūų",C:"ÇČ",c:"çč",N:"Ñ",n:"ñ",S:"Š",s:"š"},t=new Map,n="";for(let r in e)e[r].split("").forEach((e=>{n+=e,t.set(e,r)}));let r=new RegExp(`[${n}]`,"g"),o=e=>t.get(e);return e=>{if("string"==typeof e)return e.replace(r,o);let t=Array(e.length);for(let n=0;nt?`${e}`:e,Qt=(e,t)=>e+t;Wt.latinize=zt,Wt.permute=e=>$t([...Array(e.length).keys()]).sort(((e,t)=>{for(let n=0;nt.map((t=>e[t])))),Wt.highlight=function(e,t,n=Xt,r="",o=Qt){let a=o(r,n(e.substring(0,t[0]),!1));r=null!==a?a:r;for(let i=0;it.parentId===e||!e&&o.includes(t.id))),!t)return a.sort(((t,n)=>function(e,t,n,r){const o=r.includes(e.id),a=r.includes(t.id);if(o&&!a)return-1;if(!o&&a)return 1;if(o&&a)return r.indexOf(e.id)-r.indexOf(t.id);const i=n.includes(e.id),l=n.includes(t.id);return i&&!l?-1:!i&&l?1:e.name.localeCompare(t.name)}(t,n,r,e?[]:o))).map((e=>e.id));const i=a.map((({name:e,description:t})=>e+" "+t)),[l,,s]=Yt.search(i,t.toLowerCase());return s.map((e=>a[l[e]].id))}function Zt(e,t="Assertion failed"){if(!1===e)throw Error(t)}function Kt(...e){return e.filter(Boolean).join(" ")}let Jt;var en;let tn;var nn;let rn;var on;(en=Jt||(Jt={})).COLLAPSED="collapsed",en.IDLE="idle",en.EXECUTING_COMMAND="executingCommand",en.DISPLAYING_RESULT="displayingResult",(nn=tn||(tn={})).RESET_SEARCH="RESET_SEARCH",nn.HIGHLIGHT_NEXT_ITEM="HIGHLIGHT_NEXT_ITEM",nn.HIGHLIGHT_PREVIOUS_ITEM="HIGHLIGHT_PREVIOUS_ITEM",nn.CANCEL="CANCEL",nn.SELECT_GROUP="SELECT_GROUP",nn.GO_TO_PARENT_GROUP="GO_TO_PARENT_GROUP",nn.UPDATE_SEARCH="UPDATE_SEARCH",nn.UPDATE_COMMAND_QUERY="UPDATE_COMMAND_QUERY",nn.EXECUTE_COMMAND="EXECUTE_COMMAND",nn.FINISH_COMMAND="FINISH_COMMAND",nn.UPDATE_RESULT="UPDATE_RESULT",nn.EXPAND="EXPAND",nn.ADD_FAVOURITE="ADD_FAVOURITE",nn.REMOVE_FAVOURITE="REMOVE_FAVOURITE",(on=rn||(rn={})).ADD_FAVOURITE="ADD_FAVOURITE",on.ADD_RECENTLY_USED="ADD_RECENTLY_USED",on.EXPAND="EXPAND",on.HIGHLIGHT_NEXT_COMMAND="HIGHLIGHT_NEXT_COMMAND",on.HIGHLIGHT_NEXT_OPTION="HIGHLIGHT_NEXT_OPTION",on.HIGHLIGHT_PREVIOUS_COMMAND="HIGHLIGHT_PREVIOUS_COMMAND",on.HIGHLIGHT_PREVIOUS_OPTION="HIGHLIGHT_PREVIOUS_OPTION",on.LEAVE_GROUP="LEAVE_GROUP",on.REFRESH_COMMANDS="REFRESH_COMMANDS",on.REMOVE_FAVOURITE="REMOVE_FAVOURITE",on.RESET_HIGHLIGHT="RESET_HIGHLIGHT",on.RESET_OPTION_HIGHLIGHT="RESET_OPTION_HIGHLIGHT",on.RESET_SEARCH="RESET_SEARCH",on.RESET_SEARCH_OR_LEAVE_GROUP="RESET_SEARCH_OR_LEAVE_GROUP",on.SET_ACTIVE_COMMAND="SET_ACTIVE_COMMAND",on.SET_COMMAND_QUERY="SET_COMMAND_QUERY",on.SET_GROUP="SET_GROUP",on.SET_SEARCH_WORD="SET_SEARCH_WORD",on.UNSET_ACTIVE_COMMAND="UNSET_ACTIVE_COMMAND",on.UNSET_RESULT="UNSET_RESULT",on.UPDATE_RESULT="UPDATE_RESULT";Jt.COLLAPSED;const an={collapsed:{on:{UPDATE_SEARCH:{target:Jt.IDLE,actions:[rn.EXPAND,rn.SET_SEARCH_WORD,rn.REFRESH_COMMANDS]},HIGHLIGHT_NEXT_ITEM:{target:Jt.IDLE,actions:[rn.REFRESH_COMMANDS,rn.EXPAND]},EXPAND:{target:Jt.IDLE,actions:[rn.REFRESH_COMMANDS,rn.EXPAND]}}},idle:{on:{UPDATE_SEARCH:{target:Jt.IDLE,actions:[rn.SET_SEARCH_WORD,rn.RESET_HIGHLIGHT,rn.REFRESH_COMMANDS]},HIGHLIGHT_NEXT_ITEM:{target:Jt.IDLE,actions:[rn.HIGHLIGHT_NEXT_COMMAND]},HIGHLIGHT_PREVIOUS_ITEM:{target:Jt.IDLE,actions:[rn.HIGHLIGHT_PREVIOUS_COMMAND]},CANCEL:{target:Jt.IDLE,actions:[rn.RESET_HIGHLIGHT,rn.RESET_SEARCH_OR_LEAVE_GROUP,rn.REFRESH_COMMANDS]},EXECUTE_COMMAND:{target:Jt.EXECUTING_COMMAND,actions:[rn.ADD_RECENTLY_USED,rn.SET_ACTIVE_COMMAND,rn.REFRESH_COMMANDS]},GO_TO_PARENT_GROUP:{target:Jt.IDLE,actions:[rn.RESET_HIGHLIGHT,rn.LEAVE_GROUP,rn.REFRESH_COMMANDS]},SELECT_GROUP:{target:Jt.IDLE,actions:[rn.RESET_SEARCH,rn.RESET_HIGHLIGHT,rn.SET_GROUP,rn.REFRESH_COMMANDS]},ADD_FAVOURITE:{target:Jt.IDLE,actions:[rn.ADD_FAVOURITE,rn.REFRESH_COMMANDS]},REMOVE_FAVOURITE:{target:Jt.IDLE,actions:[rn.REMOVE_FAVOURITE,rn.REFRESH_COMMANDS]}}},executingCommand:{on:{UPDATE_RESULT:{target:Jt.DISPLAYING_RESULT,actions:[rn.UPDATE_RESULT]},FINISH_COMMAND:{target:Jt.IDLE,actions:[rn.UNSET_ACTIVE_COMMAND]}}},displayingResult:{on:{UPDATE_COMMAND_QUERY:{target:Jt.DISPLAYING_RESULT,actions:[rn.SET_COMMAND_QUERY]},UPDATE_RESULT:{target:Jt.DISPLAYING_RESULT,actions:[rn.UPDATE_RESULT,rn.RESET_OPTION_HIGHLIGHT]},HIGHLIGHT_NEXT_ITEM:{target:Jt.DISPLAYING_RESULT,actions:[rn.HIGHLIGHT_NEXT_OPTION]},HIGHLIGHT_PREVIOUS_ITEM:{target:Jt.DISPLAYING_RESULT,actions:[rn.HIGHLIGHT_PREVIOUS_OPTION]},EXECUTE_COMMAND:{target:Jt.DISPLAYING_RESULT,actions:[rn.SET_ACTIVE_COMMAND]},CANCEL:{target:Jt.IDLE,actions:[rn.UNSET_RESULT,rn.UNSET_ACTIVE_COMMAND,rn.RESET_OPTION_HIGHLIGHT]},FINISH_COMMAND:{target:Jt.DISPLAYING_RESULT,actions:[rn.UNSET_ACTIVE_COMMAND]}}}};function ln(e,t,n){let r=an[e.status].on?.[t.type]??null;r||(kt.error(`No transition found for event "${t.type}" in state "${e.status}"`),r={target:e.status});const o={...e,status:"string"==typeof r?r:r.target};return n&&"object"==typeof r&&r.actions?.forEach((e=>n(e,o,t))),kt.debug(`Transitioned from "${e.status}" to "${o.status}" with event "${t.type}"`),o}function sn(e,t,n){switch(e){case rn.RESET_SEARCH:t.searchWord="";break;case rn.RESET_HIGHLIGHT:t.highlightedItem=0;break;case rn.REFRESH_COMMANDS:t.availableCommandIds=qt(t.selectedCommandGroup,t.searchWord,t.commands,t.favouriteCommands,t.recentCommands);break;case rn.HIGHLIGHT_NEXT_COMMAND:t.highlightedItem=wt(t.highlightedItem+1,0,t.availableCommandIds.length-1);break;case rn.HIGHLIGHT_PREVIOUS_COMMAND:t.highlightedItem=wt(t.highlightedItem-1,0,t.availableCommandIds.length-1);break;case rn.HIGHLIGHT_NEXT_OPTION:t.highlightedOption=wt(t.highlightedOption+1,0,Object.keys(t.result.options).length-1);break;case rn.HIGHLIGHT_PREVIOUS_OPTION:t.highlightedOption=wt(t.highlightedOption-1,0,Object.keys(t.result.options).length-1);break;case rn.SET_SEARCH_WORD:Zt(n.type===tn.UPDATE_SEARCH),t.searchWord=n.searchWord;break;case rn.SET_COMMAND_QUERY:Zt(n.type===tn.UPDATE_COMMAND_QUERY),t.commandQuery=n.commandQuery,t.commandQueryDirty=!0;break;case rn.EXPAND:t.expanded=!0;break;case rn.SET_ACTIVE_COMMAND:Zt(n.type===tn.EXECUTE_COMMAND),t.activeCommandId=n.commandId,t.activeCommandMessage=n.message;break;case rn.UNSET_ACTIVE_COMMAND:t.activeCommandId=null,t.activeCommandMessage=null;break;case rn.UPDATE_RESULT:Zt(n.type===tn.UPDATE_RESULT),Zt("boolean"==typeof n.result.success),t.result={options:{},message:"Command executed",view:null,success:!1,...n.result},t.resultCommandId=t.activeCommandId,t.commandQueryDirty=!1;break;case rn.RESET_OPTION_HIGHLIGHT:t.highlightedOption=0;break;case rn.RESET_SEARCH_OR_LEAVE_GROUP:t.commandQuery?t.commandQuery="":t.searchWord?t.searchWord="":t.selectedCommandGroup=t.selectedCommandGroup?t.commands[t.selectedCommandGroup].parentId:null;break;case rn.UNSET_RESULT:t.result=null,t.resultCommandId=null,t.commandQuery="";break;case rn.LEAVE_GROUP:t.selectedCommandGroup=t.selectedCommandGroup?t.commands[t.selectedCommandGroup].parentId:null;break;case rn.SET_GROUP:Zt(n.type===tn.SELECT_GROUP),t.selectedCommandGroup=n.commandId;break;case rn.ADD_FAVOURITE:Zt(n.type===tn.ADD_FAVOURITE),t.favouriteCommands.includes(n.commandId)||(t.favouriteCommands=[...t.favouriteCommands,n.commandId]);break;case rn.REMOVE_FAVOURITE:Zt(n.type===tn.REMOVE_FAVOURITE),t.favouriteCommands=t.favouriteCommands.filter((e=>e!==n.commandId));break;case rn.ADD_RECENTLY_USED:if(Zt(n.type===tn.EXECUTE_COMMAND),!t.commands[n.commandId].action)break;t.recentCommands.includes(n.commandId)&&(t.recentCommands=t.recentCommands.filter((e=>e!==n.commandId))),t.recentCommands.unshift(n.commandId),t.recentCommands.length>5&&t.recentCommands.pop();break;default:throw Error(`Action ${e} not implemented`)}}const un=(e,t)=>ln(e,t,sn);var cn=nt.memo((({children:e})=>nt.createElement("span",{className:"xzQyjW_iconWrap"},e)));var _n,dn=nt.memo((()=>{const{state:{showBranding:e}}=Hn(),{translate:t}=wn();return e?nt.createElement("a",{href:"https://helzle.it/projects?source=commandbar",title:t("CommandBarFooter.branding","Made with love by Sebastian Helzle"),target:"_blank",rel:"noreferrer noopener",className:"_345BVa_madeWithLove"},nt.createElement("small",null,t("CommandBarFooter.brandingSmall","Made with love by")),nt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 180 180"},nt.createElement("defs",null,nt.createElement("linearGradient",{id:"a",gradientUnits:"userSpaceOnUse",x1:"280.25",y1:"377.003",x2:"373.261",y2:"377.003"},nt.createElement("stop",{offset:"0",stopColor:"#297AAC"}),nt.createElement("stop",{offset:"1",stopColor:"#53AADA"}))),nt.createElement("path",{d:"M0 180.017h37.287L71.35 52.898H34.061zM48.717 0l-9.083 33.898h36.675L85.392 0z",fill:"#B9B7B3"}),nt.createElement("path",{d:"M335.972 313.444H288.25l-8 28.306h47.691l-28.03 98.813h39.287l34.063-127.119z",fill:"url(#a)",transform:"translate(-195.462 -260.325)"}))):null}));function fn(){return nt.createElement("svg",{viewBox:"0 0 448 512"},nt.createElement("path",{fill:"currentColor",d:"m257.5 445.1-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}))}function mn(){return nt.createElement("svg",{viewBox:"0 0 512 512"},nt.createElement("path",{fill:"currentColor",d:"M415.44 512h-95.11L212.12 357.46v91.1L125.69 512H28V29.82L68.47 0h108.05l123.74 176.13V63.45L386.69 0h97.69v461.5zM38.77 35.27V496l72-52.88V194l215.5 307.64h84.79l52.35-38.17h-78.27L69 13zm82.54 466.61 80-58.78v-101l-79.76-114.4v220.94L49 501.89h72.34zM80.63 10.77l310.6 442.57h82.37V10.77h-79.75v317.56L170.91 10.77zM311 191.65l72 102.81V15.93l-72 53v122.72z"}))}function hn(){return nt.createElement("svg",{viewBox:"0 0 512 512"},nt.createElement("path",{fill:"currentColor",d:"M288 39.056v16.659c0 10.804 7.281 20.159 17.686 23.066C383.204 100.434 440 171.518 440 256c0 101.689-82.295 184-184 184-101.689 0-184-82.295-184-184 0-84.47 56.786-155.564 134.312-177.219C216.719 75.874 224 66.517 224 55.712V39.064c0-15.709-14.834-27.153-30.046-23.234C86.603 43.482 7.394 141.206 8.003 257.332c.72 137.052 111.477 246.956 248.531 246.667C393.255 503.711 504 392.788 504 256c0-115.633-79.14-212.779-186.211-240.236C302.678 11.889 288 23.456 288 39.056z"}))}function pn(){return nt.createElement("svg",{viewBox:"0 0 576 512"},nt.createElement("path",{fill:"currentColor",d:"M528.1 171.5 382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6zM388.6 312.3l23.7 138.4L288 385.4l-124.3 65.3 23.7-138.4-100.6-98 139-20.2 62.2-126 62.2 126 139 20.2-100.6 98z"}))}function vn(){return nt.createElement("svg",{viewBox:"0 0 512 512"},nt.createElement("path",{fill:"currentColor",d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z"}))}function En(){return nt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},nt.createElement("path",{fill:"currentColor",d:"M0 224c0 17.7 14.3 32 32 32s32-14.3 32-32c0-53 43-96 96-96H320v32c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-9.2-9.2-22.9-11.9-34.9-6.9S320 19.1 320 32V64H160C71.6 64 0 135.6 0 224zm512 64c0-17.7-14.3-32-32-32s-32 14.3-32 32c0 53-43 96-96 96H192V352c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V448H352c88.4 0 160-71.6 160-160z"}))}_n="UnIlTW_breadcrumb";var gn,Cn=nt.memo((()=>{const{state:{activeCommandId:e,resultCommandId:t,activeCommandMessage:n,commands:r,result:o,selectedCommandGroup:a,expanded:i},Icon:l}=Hn(),s=Lt((()=>{const n=e.value??t.value;return n&&n?r.value[n]??o.value.options[n]:null})),u=null!==e.value;return i.value?nt.createElement("footer",{className:"UnIlTW_commandBarFooter"},u?nt.createElement("span",{className:"UnIlTW_activity"},nt.createElement(cn,null,nt.createElement(hn,null)),nt.createElement("em",null,s.value.name,n.value?"﹘"+n.value:"")):s.value?nt.createElement("span",{className:_n},nt.createElement(l,{icon:s.value.icon}),nt.createElement("small",null,s.value.name)):a.value?nt.createElement("span",{className:_n},nt.createElement(l,{icon:r.value[a.value].icon}),nt.createElement("small",null,r.value[a.value].name)):nt.createElement(cn,null,nt.createElement(mn,null)),nt.createElement(dn,null)):null}));gn="jZLCTa_executeButton";let yn=null;var In=nt.memo((()=>{const{state:e,actions:t}=Hn(),{executeCommand:n}=Mn(),{translate:r}=wn(),o=de(),a=e.commands.value[e.activeCommandId.value||e.resultCommandId.value],i=me((r=>{e.status.value===Jt.DISPLAYING_RESULT?(t.UPDATE_COMMAND_QUERY(r.target.value),e.commands.value[e.resultCommandId.value]?.executeManually||(yn&&clearTimeout(yn),yn=setTimeout((()=>n(e.resultCommandId.value)),500))):t.UPDATE_SEARCH(r.target.value)}),[]),l=me((e=>{"Escape"===e.key&&o.current.value&&(e.preventDefault(),e.stopPropagation())}),[o.current]);return Ut((()=>{e.status.value!==Jt.EXECUTING_COMMAND&&o.current?.focus()})),nt.createElement(nt.Fragment,null,nt.createElement("input",{ref:o,className:"jZLCTa_searchBox",type:"search",placeholder:e.status.value===Jt.DISPLAYING_RESULT?r("SearchBox.commandQuery.placeholder","Enter the query for the command"):r("SearchBox.placeholder","What do you want to do today?"),disabled:e.status.value===Jt.DISPLAYING_RESULT&&!a?.canHandleQueries,autoFocus:!0,onChange:i,onKeyUp:l,value:e.status.value===Jt.DISPLAYING_RESULT?e.commandQuery:e.searchWord,"data-testid":"SearchBox"}),!e.expanded.value&&nt.createElement("button",{className:"jZLCTa_expandButton",onClick:t.EXPAND,title:r("SearchBox.expand.title","Expand to show all commands")},nt.createElement(cn,null,nt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},nt.createElement("path",{fill:"currentColor",d:"M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"})))),e.status.value===Jt.DISPLAYING_RESULT&&e.commands.value[e.resultCommandId.value]?.executeManually&&!e.activeCommandId.value&&nt.createElement("button",{className:[gn,e.commandQueryDirty.value?"jZLCTa_commandQueryDirty":""].join(" "),onClick:()=>n(e.resultCommandId.value),title:r("SearchBox.execute.title","Execute the command")},nt.createElement(cn,null,e.commandQueryDirty.value?nt.createElement(vn,null):nt.createElement(En,null))))}));var Tn=nt.memo((()=>{const{state:e,actions:t}=Hn(),n=Lt((()=>e.status.value==Jt.DISPLAYING_RESULT));return nt.createElement("header",{className:"_1JQCkq_commandBarHeader"},(n.value||e.selectedCommandGroup.value)&&nt.createElement("button",{type:"button",onClick:n.value?t.CANCEL:t.GO_TO_PARENT_GROUP,className:"_1JQCkq_backButton",title:"Back"},nt.createElement(cn,null,nt.createElement(fn,null))),nt.createElement(In,null))}));function Sn({command:e,onItemSelect:t,highlightedId:n,onToggleFavourite:r}){const{state:{favouriteCommands:o},Icon:a}=Hn(),{translate:i}=wn(),{id:l,name:s,description:u,icon:c,action:_}=e,d=function({subCommandIds:e,category:t,canHandleQueries:n,action:r},o){let a="command";return t||(e?.length>0?a="category":n?a="query":"string"==typeof r&&(a="link"),o(`CommandListItem.type.${a}`,a))}(e,i),f=Lt((()=>n.value===l)),m=Lt((()=>o.value.includes(l)));return nt.createElement("li",{className:Kt("bB4DKG_commandListItem",f.value&&"bB4DKG_highlighted"),onClick:()=>t(l),"data-testid":"CommandListItem"},nt.createElement(a,{icon:c}),nt.createElement("span",{className:"bB4DKG_label"},nt.createElement("span",null,s),u&&nt.createElement("span",{className:"bB4DKG_description"},"string"==typeof u?u:u())),r&&_&&nt.createElement("button",{type:"button",className:Kt("bB4DKG_favouriteButton",m.value&&"bB4DKG_isFavourite"),title:i("CommandListItem.toggleFavourite","Toggle favourite"),onClick:e=>{e.stopPropagation(),r(l)}},nt.createElement(cn,null,nt.createElement(pn,null))),nt.createElement("small",{className:"bB4DKG_type"},d))}var An=nt.memo(Sn);const Rn=()=>{const{state:{commands:e,highlightedItem:t,availableCommandIds:n,status:r,searchWord:o,favouriteCommands:a,recentCommands:i,selectedCommandGroup:l},actions:{ADD_FAVOURITE:s,REMOVE_FAVOURITE:u}}=Hn(),{translate:c}=wn(),{executeCommand:_}=Mn(),d=nt.useRef(null);Ut((()=>{d.current?.querySelector(`li:nth-child(${t.value})`)?.scrollIntoView({behavior:"smooth",block:"center"})}));const f=me((e=>{a.value.includes(e)?u(e):s(e)}),[a]),m=Lt((()=>o.value||l.value?[]:n.value.filter((e=>i.value.includes(e))))),h=Lt((()=>o.value||l.value?n.value:n.value.filter((e=>!i.value.includes(e))))),p=Lt((()=>n.value[t.value]));return nt.createElement("nav",{className:Kt("z-zZnG_results",r.value!==Jt.IDLE&&"z-zZnG_disabled"),"data-testid":"CommandList",ref:d},m.value.length>0&&nt.createElement(nt.Fragment,null,nt.createElement("h6",null,c("CommandList.suggestions","Recently used")),nt.createElement("ul",null,m.value.map((t=>nt.createElement(An,{key:t,command:e.value[t],onItemSelect:_,highlightedId:p,onToggleFavourite:f}))))),h.value.length>0&&nt.createElement(nt.Fragment,null,nt.createElement("h6",null,c("CommandList.heading","Commands")),nt.createElement("ul",null,h.value.map((t=>nt.createElement(An,{key:t,command:e.value[t],onItemSelect:_,highlightedId:p,onToggleFavourite:f}))))),0===n.value.length&&nt.createElement("small",{className:"z-zZnG_noResults"},c("CommandList.noCommandsMessage","No matching commands found")))};var bn=nt.memo(Rn);var On=()=>{const{state:{result:e,highlightedOption:t,activeCommandId:n}}=Hn(),{executeCommand:r}=Mn(),{translate:o}=wn(),a=nt.useRef(null),i=Lt((()=>e.value?Object.values(e.value.options)[t.value].id:null)),l=null!==n.value;Ut((()=>{const e=t.value;a.current?.querySelector(`li:nth-child(${e})`)?.scrollIntoView({behavior:"smooth",block:"center"})}));const{options:s,view:u,message:c}=e.value??{};return nt.createElement("div",{className:"SDjQeG_commandResultsView"},!l&&c&&nt.createElement("h6",{className:"SDjQeG_message"},c),l?nt.createElement("div",null,o("CommandResultsView.waitingForResults","Waiting for results…")):"",!l&&u?nt.createElement("div",null,u):"",!l&&s&&nt.createElement("nav",{className:"SDjQeG_results",ref:a},nt.createElement("ul",null,Object.keys(s).map((e=>nt.createElement(An,{key:e,command:s[e],onItemSelect:r,highlightedId:i}))))))};var Nn=nt.memo((({handleToggle:e,disabled:t=!1,label:n,title:r,active:o})=>nt.createElement("button",{className:Kt("Vkou1G_toggleButton",o&&"Vkou1G_toggleButtonActive"),onClick:e,disabled:t,title:r},nt.createElement("span",null,n),nt.createElement("span",{className:"Vkou1G_buttonIcon"},"⌘K"))));const Dn=G({}),Hn=()=>he(Dn);const Ln=({commands:e,children:t,IconComponent:n,userPreferences:r})=>{const{state:o,dispatch:a}=fe((()=>function(e){const t=pt(e);return{state:{activeCommandId:yt((()=>t.value.activeCommandId)),activeCommandMessage:yt((()=>t.value.activeCommandMessage)),availableCommandIds:yt((()=>t.value.availableCommandIds)),commandQuery:yt((()=>t.value.commandQuery)),commandQueryDirty:yt((()=>t.value.commandQueryDirty)),commands:yt((()=>t.value.commands)),expanded:yt((()=>t.value.expanded)),favouriteCommands:yt((()=>t.value.favouriteCommands)),highlightedItem:yt((()=>t.value.highlightedItem)),highlightedOption:yt((()=>t.value.highlightedOption)),recentCommands:yt((()=>t.value.recentCommands)),result:yt((()=>t.value.result)),resultCommandId:yt((()=>t.value.resultCommandId)),searchWord:yt((()=>t.value.searchWord)),selectedCommandGroup:yt((()=>t.value.selectedCommandGroup)),showBranding:yt((()=>t.value.showBranding)),status:yt((()=>t.value.status))},dispatch:e=>{t.value=un(t.value,e)}}}({activeCommandId:null,activeCommandMessage:null,availableCommandIds:Object.keys(e),commandQuery:"",commandQueryDirty:!1,commands:Mt(e),expanded:!1,favouriteCommands:r.favouriteCommands,highlightedItem:0,highlightedOption:0,recentCommands:r.recentCommands,result:null,resultCommandId:null,searchWord:"",selectedCommandGroup:null,showBranding:r.showBranding,status:Jt.COLLAPSED})),[]),i=fe((()=>({[tn.RESET_SEARCH]:()=>a({type:tn.RESET_SEARCH}),[tn.HIGHLIGHT_NEXT_ITEM]:()=>a({type:tn.HIGHLIGHT_NEXT_ITEM}),[tn.HIGHLIGHT_PREVIOUS_ITEM]:()=>a({type:tn.HIGHLIGHT_PREVIOUS_ITEM}),[tn.CANCEL]:()=>a({type:tn.CANCEL}),[tn.SELECT_GROUP]:e=>a({type:tn.SELECT_GROUP,commandId:e}),[tn.GO_TO_PARENT_GROUP]:()=>a({type:tn.GO_TO_PARENT_GROUP}),[tn.UPDATE_SEARCH]:e=>a({type:tn.UPDATE_SEARCH,searchWord:e}),[tn.UPDATE_COMMAND_QUERY]:e=>a({type:tn.UPDATE_COMMAND_QUERY,commandQuery:e}),[tn.EXECUTE_COMMAND]:async(e,t)=>(a({type:tn.EXECUTE_COMMAND,commandId:e,message:t}),r.addRecentCommand(e).catch((e=>kt.error("Could not add recent command",e)))),[tn.FINISH_COMMAND]:()=>a({type:tn.FINISH_COMMAND}),[tn.UPDATE_RESULT]:e=>a({type:tn.UPDATE_RESULT,result:e}),[tn.EXPAND]:()=>a({type:tn.EXPAND}),[tn.ADD_FAVOURITE]:e=>(a({type:tn.ADD_FAVOURITE,commandId:e}),r.setFavouriteCommands(o.favouriteCommands.value).catch((e=>kt.error("Could not update favourite commands",e)))),[tn.REMOVE_FAVOURITE]:e=>(a({type:tn.REMOVE_FAVOURITE,commandId:e}),r.setFavouriteCommands(o.favouriteCommands.value).catch((e=>kt.error("Could not update favourite commands",e))))})),[]),l=me((({icon:e,spin:t=!1})=>nt.createElement(cn,null,nt.createElement(n,{icon:e,spin:t}))),[]);return nt.createElement(Dn.Provider,{value:{state:o,actions:i,Icon:l}},t)},Un=nt.createContext({}),Mn=()=>nt.useContext(Un),Pn=({children:e,toggleOpen:t,dialogRef:n,open:r})=>{const{state:o,actions:a}=Hn(),i=rt((e=>{if(r&&!e.defaultPrevented)if("k"===e.key&&(e.metaKey||e.ctrlKey)&&n?.current.contains(e.target))t(),e.stopPropagation(),e.preventDefault();else if("Escape"===e.key)e.stopPropagation(),e.preventDefault(),o.selectedCommandGroup.value||o.searchWord.value||o.commandQuery.value||o.result.value?a.CANCEL():t();else if("ArrowDown"===e.key)e.stopPropagation(),e.preventDefault(),a.HIGHLIGHT_NEXT_ITEM();else if("ArrowUp"===e.key)e.stopPropagation(),e.preventDefault(),a.HIGHLIGHT_PREVIOUS_ITEM();else if("Enter"===e.key){e.stopPropagation(),e.preventDefault();let t=o.availableCommandIds.value[o.highlightedItem.value];o.status.value===Jt.DISPLAYING_RESULT&&(t=!o.commandQueryDirty.value&&Object.values(o.result.value.options).length?Object.keys(o.result.value.options)[o.highlightedOption.value]:o.resultCommandId.value),t&&l(t)}})),l=me((async e=>{const n=o.result.value?.options[e]??o.commands.value[e],{action:r,canHandleQueries:i,subCommandIds:l,name:s}=n;if(l?.length>0)return void a.SELECT_GROUP(e);if(Zt(r,`Command ${e} has no action`),"string"==typeof r)return await a.EXECUTE_COMMAND(e,"Loading url"),0===r.indexOf("http")&&0!==r.indexOf(document.location.origin)?window.open(r,"_blank","noopener,noreferrer")?.focus():window.location.href=r,a.FINISH_COMMAND();a.EXECUTE_COMMAND(e,"Running command");const u=r(i?o.commandQuery.value:void 0);if(u.then)u.then((e=>{if(e&&!e.success)throw new Error(`The command "${s}" failed`)})).catch((e=>{kt.error("Command error",s,e)})).finally((()=>{a.FINISH_COMMAND()}));else if(u.next){const e=u;for await(const t of e)a.UPDATE_RESULT(t);a.FINISH_COMMAND()}else kt.error("Command result is not a promise or generator",u);n.closeOnExecute&&t()}),[o.searchWord,o.commands,o.result]),s=rt((e=>{l(e)}));return ce((()=>{if(!r)return;const e=e=>i.current(e);return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[r]),nt.createElement(Un.Provider,{value:{executeCommand:s.current}},e)},kn=G({}),wn=()=>he(kn),Gn=({translate:e,children:t})=>nt.createElement(kn.Provider,{value:{translate:e}},t);var xn=({onDrag:e,open:t,toggleOpen:n})=>{const{state:{expanded:r,result:o}}=Hn(),a=de(null),i=Ht(!1),l=Ht({left:window.innerWidth/2-300,top:window.innerHeight/2-20}),s=Ht({offsetLeft:0,offsetTop:0}),u=Ht(!1),c=Lt((()=>{const{left:e,top:t}=l.value;return u.value?{left:e+"px",top:t+"px",translate:"none",visibility:i.value?"hidden":"visible"}:{}})),_=me(((e,t)=>{const n=a.current.getBoundingClientRect();l.value={left:wt(e,0,window.innerWidth-n.width),top:wt(t,0,window.innerHeight-n.height)}}),[]),d=me((t=>{"INPUT"!==t.target.tagName&&(console.debug("dragstart"),t.dataTransfer.setData("text/plain","CommandBar"),t.dataTransfer.dropEffect="move",t.dataTransfer.effectAllowed="move",it((()=>{s.value={offsetLeft:t.clientX-a.current.offsetLeft,offsetTop:t.clientY-a.current.offsetTop},u.value=!0})),e&&e(!0))}),[a.current]),f=me((t=>{const{clientX:n,clientY:r}=t;console.debug("dragdrop",n,r,s.value),it((()=>{i.value=!1,_(n-s.value.offsetLeft,r-s.value.offsetTop)})),e&&e(!1)}),[a.current]),m=me((()=>_(l.value.left,l.value.top)),[]);return ce((()=>{if(t)return a.current?.parentElement?.addEventListener("drop",f),window.addEventListener("resize",m),()=>{a.current?.parentElement?.removeEventListener("drop",f),window.removeEventListener("resize",m)}}),[t,m,f]),t?nt.createElement("dialog",{ref:a,className:Kt("eoy0jW_commandBar",o.value&&"eoy0jW_hasResults"),open:t,draggable:!0,onDragStart:d,onDrag:()=>i.value=!0,style:c.value,"data-testid":"CommandBarDialog"},nt.createElement(Pn,{toggleOpen:n,dialogRef:a,open:t},nt.createElement(Tn,null),nt.createElement("div",{className:Kt("eoy0jW_resultsWrap",r.value&&"eoy0jW_expanded")},r.value&&!o.value&&nt.createElement(bn,null),o.value&&nt.createElement(On,null)),nt.createElement(Cn,null))):null};var Vn=({commands:e,open:t,toggleOpen:n,onDrag:r,IconComponent:o,userPreferences:a,translate:i})=>nt.createElement(Gn,{translate:i},nt.createElement(Ln,{commands:e,IconComponent:o,userPreferences:a},nt.createElement(xn,{onDrag:r,open:t,toggleOpen:n}))),Fn={};async function Bn(e,t,n="GET"){return t&&"GET"===n&&(e=Object.keys(t).reduce(((e,n)=>e+"&"+n+"="+encodeURIComponent(t[n])),e+"?")),fetch(e,{method:n,credentials:"include",body:t&&"POST"===n?JSON.stringify(t):void 0,headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((e=>{if(200!==e.status)throw new Error(`The request failed with code ${e.status}: "${e.statusText}"`);return e.headers.get("Content-Type")?.includes("application/json")?e.json():e.text()}))}e(Fn,"getPreferences",(()=>Wn)),e(Fn,"setFavouriteCommands",(()=>zn)),e(Fn,"addRecentCommand",(()=>$n)),e(Fn,"addRecentDocument",(()=>Xn));async function jn(e,t){return Bn(e,t,"POST")}async function Wn(){return Bn("/neos/shel-neos-commandbar/preferences/getpreferences")}async function zn(e){return jn("/neos/shel-neos-commandbar/preferences/setfavourites",{commandIds:e})}async function $n(e){return jn("/neos/shel-neos-commandbar/preferences/addrecentcommand",{commandId:e})}async function Xn(e){return jn("/neos/shel-neos-commandbar/preferences/addrecentdocument",{nodeContextPath:e})}var Qn={};e(Qn,"getCommands",(()=>Yn));async function Yn(){return Bn("/neos/service/data-source/shel-neos-commandbar-commands")}var qn={};e(qn,"searchNeosDocs",(()=>Zn));async function Zn(e){return e?Bn("/neos/service/data-source/shel-neos-commandbar-search-neos-docs",{query:e}):{}}var Kn={};e(Kn,"searchNeosPackages",(()=>Jn));async function Jn(e){return e?Bn("/neos/service/data-source/shel-neos-commandbar-search-neos-packages",{query:e}):{}}var er,tr;er="o4liXq_fullScreenLayer",tr="o4liXq_spin";var nr=({spin:e=!1})=>Q("svg",{className:e?tr:"",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Q("path",{fill:"currentColor",d:"M509.5 184.6 458.9 32.8C452.4 13.2 434.1 0 413.4 0H272v192h238.7c-.4-2.5-.4-5-1.2-7.4zM240 0H98.6c-20.7 0-39 13.2-45.5 32.8L2.5 184.6c-.8 2.4-.8 4.9-1.2 7.4H240V0zM0 224v240c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V224H0z"})});class rr extends p{static tagName="command-bar-container";static options={shadow:!0};constructor(){super(),rr.i18nRegistry=window.NeosCMS.I18n,this.state={initialized:!1,open:!1,dragging:!1,commands:{searchNeosDocs:{name:rr.translate("CommandBarUiPlugin.command.documentation","Documentation"),description:rr.translate("CommandBarUiPlugin.command.documentation.description","Browse or search the Neos documentation"),icon:"book",canHandleQueries:!0,action:this.handleSearchNeosDocs.bind(this)},searchNeosPackages:{name:rr.translate("CommandBarUiPlugin.command.packages","Packages"),description:rr.translate("CommandBarUiPlugin.command.packages.description","Search for Neos packages"),icon:"boxes",canHandleQueries:!0,action:this.handleSearchNeosPackages.bind(this)}},preferences:{favouriteCommands:[],recentCommands:[],recentDocuments:[],showBranding:!0}}}static translate=(e,t,n)=>("string"==typeof t&&(n=t,t={}),rr.i18nRegistry.translate(e,n,"Shel.Neos.CommandBar","Main",t));async componentDidMount(){try{const e=await Fn.getPreferences(),t=await Qn.getCommands();this.setState((n=>({initialized:!0,preferences:e,commands:{...n.commands,...t}}))),document.addEventListener("keydown",(e=>{"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.stopPropagation(),e.preventDefault(),this.handleToggle())}))}catch(e){kt.error(e)}}handleToggle=()=>{this.setState((({open:e})=>({open:!e})))};handleDrag=e=>{this.setState({dragging:e})};handleSearchNeosDocs=async function*(e){let t;yield{success:!0,message:rr.translate("CommandBarUiPlugin.command.documentation.searching",{query:e},`Search for "${e}"`)};const n=await qn.searchNeosDocs(e).catch((e=>{kt.error("Could not search Neos docs",e),t=e.message}));t||!n?yield{success:!1,message:rr.translate("CommandBarUiPlugin.command.documentation.error","Search failed"),view:t}:yield{success:!0,message:rr.translate("CommandBarUiPlugin.command.documentation.matches",{matches:Object.keys(n).length},`${Object.values(n).length} options match your query`),options:n}};handleSearchNeosPackages=async function*(e){let t;yield{success:!0,message:rr.translate("CommandBarUiPlugin.command.packages.searching",{query:e},`Search for "${e}"`)};const n=await Kn.searchNeosPackages(e).catch((e=>{kt.error("Could not search Neos packages",e),t=e.message}));t||!n?yield{success:!1,message:rr.translate("CommandBarUiPlugin.command.packages.error","Search failed"),view:t}:yield{success:!0,message:rr.translate("CommandBarUiPlugin.command.packages.matches",{matches:Object.values(n).length},`${Object.values(n).length} options match your query`),options:n}};render(){const{initialized:e,open:t,dragging:n,commands:r,preferences:o}=this.state;return Q(h,{children:[Q("style",{children:'@import "'+this.props.styleuri+'";'}),Q("div",{className:Kt("o4liXq_pluginWrap","rrAaca_commandBarTheme"),children:[Q(Nn,{handleToggle:this.handleToggle,disabled:!e,label:rr.translate("ToggleButton.label","Search…"),title:rr.translate("ToggleButton.title","Search and execute commands"),active:t}),e&&Q("div",{className:[er,t&&"o4liXq_open"].join(" "),onDragOver:e=>e.preventDefault(),style:n?{pointerEvents:"all"}:null,children:Q(Vn,{commands:r,open:t,toggleOpen:this.handleToggle,onDrag:this.handleDrag,IconComponent:nr,userPreferences:{...o,setFavouriteCommands:Fn.setFavouriteCommands,addRecentCommand:Fn.addRecentCommand,addRecentDocument:Fn.addRecentDocument},translate:rr.translate})})]})]})}}function or(){if(window.SHEL_NEOS_COMMANDBAR_INITIALIZED)return;window.SHEL_NEOS_COMMANDBAR_INITIALIZED=!0,$(rr,null,null,rr.options);const e=document.querySelector(".neos-top-bar-left"),t=document.createElement("command-bar-container");t.id="shel-neos-commandbar";const n=document.querySelector('link[rel="stylesheet"][href*="Shel.Neos.CommandBar"]');t.setAttribute("styleuri",n.href),e.appendChild(t)}window.NeosCMS?.I18n?.initialized?or():window.addEventListener("neoscms-i18n-initialized",or)})(); //# sourceMappingURL=Module.js.map diff --git a/Resources/Public/Module.js.map b/Resources/Public/Module.js.map index 998e7df..1cb06e1 100644 --- a/Resources/Public/Module.js.map +++ b/Resources/Public/Module.js.map @@ -1 +1 @@ -{"mappings":"iGA0BaA,MCfPC,ECRFC,ECyKAC,EAWAC,EAEEC,ECvLKC,ECFEC,EAAY,CAAlB,EACMC,EAAY,GACZC,EAAqB,oELOlBC,WAAOC,EAAKC,GAE3B,IAAK,IAAIN,KAAKM,EAAOD,EAAIL,GAAKM,EAAMN,GACpC,OAA6BK,CAC7B,CAQM,SAASE,EAAWC,GAC1B,IAAIC,EAAaD,EAAKC,WAClBA,GAAYA,EAAWC,YAAYF,EACvC,CEXM,SAASG,EAAcC,EAAMN,EAAOO,GAC1C,IACCC,EACAC,EACAf,EAHGgB,EAAkB,GAItB,IAAKhB,KAAKM,EACA,OAALN,EAAYc,EAAMR,EAAMN,GACd,OAALA,EAAYe,EAAMT,EAAMN,GAC5BgB,EAAgBhB,GAAKM,EAAMN,GAUjC,GAPIiB,UAAUC,OAAS,IACtBF,EAAgBH,SACfI,UAAUC,OAAS,EAAIxB,EAAMyB,KAAKF,UAAW,GAAKJ,GAKjC,mBAARD,GAA2C,MAArBA,EAAKQ,aACrC,IAAKpB,KAAKY,EAAKQ,sBACVJ,EAAgBhB,KACnBgB,EAAgBhB,GAAKY,EAAKQ,aAAapB,IAK1C,OAAOqB,EAAYT,EAAMI,EAAiBF,EAAK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AAIvnB,UAAWgY,GFnLD,oBGAK,0B,UDoLhBuP,EAACxG,GAAW,CACRC,aAAc14B,KAAK04B,aACnB9B,UAAW6I,EACX9G,MAAOuG,GAAI/K,UAAU,qBAAsB,WAC3CG,MAAO4K,GAAI/K,UAAU,qBAAsB,+BAC3CyE,OAAQsB,IAEXuF,GACGR,EAAC,OACGvnB,UAAW,CAAConB,GAAwB5E,GF3LvC,eE2L4D1S,KAAK,KAC9DmZ,WAAa77B,GAAMA,EAAE0xB,iBACrB3yB,MAAO67B,EAAW,CAAEkB,cAAe,OAAU,K,SAE7C3B,EAAC/B,GAAS,CACN/c,SAAUA,EACV+Z,KAAMA,EACNF,WAAYh6B,KAAK04B,aACjB0C,OAAQp7B,KAAKsgC,WACbrH,cAAe+F,GACf9F,gBAAiB,IACV6G,EACHnG,qBAAsBsG,GAAetG,qBACrCF,iBAAkBwG,GAAexG,iBACjCmH,kBAAmBX,GAAeW,mBAEtC1M,UAAW+K,GAAI/K,mBAO3C,EE1MJ,SAAS2M,KAEL,GAAIrG,OAAO,iCAAqC,OAChDA,OAAO,kCAAsC,EAG7CsG,EAAS7B,GAAK,KAAM,KAAMA,GAAI3hC,SAG9B,MAAMyjC,EAAaz5B,SAASuwB,cAAc,sBACpCmJ,EAAkB15B,SAAShJ,cAAc,yBAC/C0iC,EAAgB/f,GAAK,uBAGrB,MAAMggB,EAAqB35B,SAASuwB,cAChC,wDAEJmJ,EAAgBj8B,aAAa,WAAYk8B,EAAmB7M,MAE5D2M,EAAWv9B,YAAYw9B,EAC3B,CAGIxG,OAAO8E,SAASC,MAAMC,YACtBqB,KAEArG,OAAO/1B,iBAAiB,2BAA4Bo8B,G","sources":["node_modules/preact/src/util.js","node_modules/preact/src/options.js","node_modules/preact/src/create-element.js","node_modules/preact/src/component.js","node_modules/preact/src/create-context.js","node_modules/preact/src/constants.js","node_modules/preact/src/diff/children.js","node_modules/preact/src/diff/props.js","node_modules/preact/src/diff/index.js","node_modules/preact/src/render.js","node_modules/preact/src/clone-element.js","node_modules/preact-custom-element/src/index.js","node_modules/preact/src/diff/catch-error.js","node_modules/preact/jsx-runtime/src/index.js","node_modules/preact/hooks/src/index.js","node_modules/preact/compat/src/util.js","node_modules/preact/compat/src/PureComponent.js","node_modules/preact/compat/src/forwardRef.js","node_modules/preact/compat/src/Children.js","node_modules/preact/compat/src/suspense.js","node_modules/preact/compat/src/suspense-list.js","node_modules/preact/compat/src/portals.js","node_modules/preact/compat/src/render.js","node_modules/preact/compat/src/index.js","node_modules/preact/compat/src/memo.js","packages/commandbar/src/hooks/useFunctionRef.ts","node_modules/@preact/signals-core/src/index.ts","node_modules/@preact/signals/src/index.ts","packages/commandbar/src/helpers/flattenCommands.ts","packages/commandbar/src/helpers/logger.ts","packages/commandbar/src/helpers/clamp.ts","node_modules/@leeoniya/ufuzzy/dist/uFuzzy.esm.js","packages/commandbar/src/helpers/filterCommands.ts","packages/commandbar/src/helpers/asset.ts","packages/commandbar/src/helpers/classnames.ts","packages/commandbar/src/state/commandBarMachine.ts","packages/commandbar/src/state/commandBarReducer.ts","packages/commandbar/src/components/IconWrapper/IconWrapper.tsx","packages/commandbar/src/components/IconWrapper/IconWrapper.module.css","packages/commandbar/src/components/CommandBarFooter/Branding.tsx","packages/commandbar/src/components/CommandBarFooter/Branding.module.css","packages/commandbar/src/components/Icons/IconBack.tsx","packages/commandbar/src/components/Icons/IconNeos.tsx","packages/commandbar/src/components/Icons/IconSpinner.tsx","packages/commandbar/src/components/Icons/IconStar.tsx","packages/commandbar/src/components/Icons/IconPlay.tsx","packages/commandbar/src/components/Icons/IconRepeat.tsx","packages/commandbar/src/components/SearchBox/SearchBox.module.css","packages/commandbar/src/components/CommandBarFooter/CommandBarFooter.tsx","packages/commandbar/src/components/CommandBarFooter/CommandBarFooter.module.css","packages/commandbar/src/components/SearchBox/SearchBox.tsx","packages/commandbar/src/components/CommandBarHeader/CommandBarHeader.tsx","packages/commandbar/src/components/CommandBarHeader/CommandBarHeader.module.css","packages/commandbar/src/components/CommandListItem/CommandListItem.tsx","packages/commandbar/src/components/CommandListItem/CommandListItem.module.css","packages/commandbar/src/components/CommandList/CommandList.tsx","packages/commandbar/src/components/CommandList/CommandListing.module.css","packages/commandbar/src/components/CommandResultsView/CommandResultsView.tsx","packages/commandbar/src/components/CommandResultsView/CommandResultsView.module.css","packages/commandbar/src/components/ToggleButton/ToggleButton.tsx","packages/commandbar/src/components/ToggleButton/ToggleButton.module.css","packages/commandbar/src/state/CommandBarStateProvider.tsx","packages/commandbar/src/state/CommandBarExecutor.tsx","packages/commandbar/src/state/IntlProvider.tsx","packages/commandbar/src/components/CommandBarDialog/CommandBarDialog.tsx","packages/commandbar/src/components/CommandBarDialog/CommandBarDialog.module.css","packages/commandbar/src/CommandBar.tsx","packages/neos-api/src/fetch.ts","packages/neos-api/src/preferences.ts","packages/neos-api/src/commands.ts","packages/neos-api/src/documentation.ts","packages/neos-api/src/packages.ts","packages/module-plugin/src/ModulePlugin.module.css","packages/module-plugin/src/IconComponent.tsx","packages/module-plugin/src/App.tsx","packages/commandbar/src/Theme.module.css","packages/module-plugin/src/index.tsx"],"sourcesContent":["import { EMPTY_ARR } from \"./constants\";\n\n/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\t// @ts-ignore We change the type of `obj` to be `O & P`\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Remove a child node from its parent if attached. This is a workaround for\n * IE11 which doesn't support `Element.prototype.remove()`. Using this function\n * is smaller than including a dedicated polyfill.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\nexport const slice = EMPTY_ARR.slice;\n","import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n","import { slice } from './util';\nimport options from './options';\n\nlet vnodeId = 0;\n\n/**\n * Create an virtual node (used for JSX)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * constructor for this virtual node\n * @param {object | null | undefined} [props] The properties of the virtual node\n * @param {Array} [children] The children of the virtual node\n * @returns {import('./internal').VNode}\n */\nexport function createElement(type, props, children) {\n\tlet normalizedProps = {},\n\t\tkey,\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse normalizedProps[i] = props[i];\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\t// If a Component VNode, check for and apply defaultProps\n\t// Note: type may be undefined in development, must never error here.\n\tif (typeof type == 'function' && type.defaultProps != null) {\n\t\tfor (i in type.defaultProps) {\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = type.defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn createVNode(type, normalizedProps, key, ref, null);\n}\n\n/**\n * Create a VNode (used internally by Preact)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * Constructor for this virtual node\n * @param {object | string | number | null} props The properties of this virtual node.\n * If this virtual node represents a text node, this is the text of the node (string or number).\n * @param {string | number | null} key The key for this virtual node, used when\n * diffing it against its children\n * @param {import('./internal').VNode[\"ref\"]} ref The ref property that will\n * receive a reference to its created child\n * @returns {import('./internal').VNode}\n */\nexport function createVNode(type, props, key, ref, original) {\n\t// V8 seems to be better at detecting type shapes if the object is allocated from the same call site\n\t// Do not inline into createElement and coerceToVNode!\n\tconst vnode = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t// _nextDom must be initialized to undefined b/c it will eventually\n\t\t// be set to dom.nextSibling which can return `null` and it is important\n\t\t// to be able to distinguish between an uninitialized _nextDom and\n\t\t// a _nextDom that has been set to `null`\n\t\t_nextDom: undefined,\n\t\t_component: null,\n\t\t_hydrating: null,\n\t\tconstructor: undefined,\n\t\t_original: original == null ? ++vnodeId : original\n\t};\n\n\t// Only invoke the vnode hook if this was *not* a direct copy:\n\tif (original == null && options.vnode != null) options.vnode(vnode);\n\n\treturn vnode;\n}\n\nexport function createRef() {\n\treturn { current: null };\n}\n\nexport function Fragment(props) {\n\treturn props.children;\n}\n\n/**\n * Check if a the argument is a valid Preact VNode.\n * @param {*} vnode\n * @returns {vnode is import('./internal').VNode}\n */\nexport const isValidElement = vnode =>\n\tvnode != null && vnode.constructor === undefined;\n","import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function Component(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nComponent.prototype.setState = function(update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != null && this._nextState !== this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == null) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nComponent.prototype.forceUpdate = function(callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {import('./index').ComponentChildren | void}\n */\nComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == null) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._parent._children.indexOf(vnode) + 1)\n\t\t\t: null;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != null && sibling._dom != null) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : null;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tlet vnode = component._vnode,\n\t\toldDom = vnode._dom,\n\t\tparentDom = component._parentDom;\n\n\tif (parentDom) {\n\t\tlet commitQueue = [];\n\t\tconst oldVNode = assign({}, vnode);\n\t\toldVNode._original = vnode._original + 1;\n\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tvnode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tparentDom.ownerSVGElement !== undefined,\n\t\t\tvnode._hydrating != null ? [oldDom] : null,\n\t\t\tcommitQueue,\n\t\t\toldDom == null ? getDomSibling(vnode) : oldDom,\n\t\t\tvnode._hydrating\n\t\t);\n\t\tcommitRoot(commitQueue, vnode);\n\n\t\tif (vnode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(vnode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != null && vnode._component != null) {\n\t\tvnode._dom = vnode._component.base = null;\n\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\tlet child = vnode._children[i];\n\t\t\tif (child != null && child._dom != null) {\n\t\t\t\tvnode._dom = vnode._component.base = child._dom;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce !== options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\tlet c;\n\trerenderQueue.sort((a, b) => a._vnode._depth - b._vnode._depth);\n\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t// process() calls from getting scheduled while `queue` is still being consumed.\n\twhile ((c = rerenderQueue.shift())) {\n\t\tif (c._dirty) {\n\t\t\tlet renderQueueLength = rerenderQueue.length;\n\t\t\trenderComponent(c);\n\t\t\tif (rerenderQueue.length > renderQueueLength) {\n\t\t\t\t// When i.e. rerendering a provider additional new items can be injected, we want to\n\t\t\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t\t\t// single pass\n\t\t\t\trerenderQueue.sort((a, b) => a._vnode._depth - b._vnode._depth);\n\t\t\t}\n\t\t}\n\t}\n\tprocess._rerenderCount = 0;\n}\n\nprocess._rerenderCount = 0;\n","import { enqueueRender } from './component';\n\nexport let i = 0;\n\nexport function createContext(defaultValue, contextId) {\n\tcontextId = '__cC' + i++;\n\n\tconst context = {\n\t\t_id: contextId,\n\t\t_defaultValue: defaultValue,\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tConsumer(props, contextValue) {\n\t\t\t// return props.children(\n\t\t\t// \tcontext[contextId] ? context[contextId].props.value : defaultValue\n\t\t\t// );\n\t\t\treturn props.children(contextValue);\n\t\t},\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tProvider(props) {\n\t\t\tif (!this.getChildContext) {\n\t\t\t\t/** @type {import('./internal').Component[]} */\n\t\t\t\tlet subs = [];\n\t\t\t\tlet ctx = {};\n\t\t\t\tctx[contextId] = this;\n\n\t\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\t\tthis.shouldComponentUpdate = function(_props) {\n\t\t\t\t\tif (this.props.value !== _props.value) {\n\t\t\t\t\t\t// I think the forced value propagation here was only needed when `options.debounceRendering` was being bypassed:\n\t\t\t\t\t\t// https://github.com/preactjs/preact/commit/4d339fb803bea09e9f198abf38ca1bf8ea4b7771#diff-54682ce380935a717e41b8bfc54737f6R358\n\t\t\t\t\t\t// In those cases though, even with the value corrected, we're double-rendering all nodes.\n\t\t\t\t\t\t// It might be better to just tell folks not to use force-sync mode.\n\t\t\t\t\t\t// Currently, using `useContext()` in a class component will overwrite its `this.context` value.\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context[contextId] = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\t\t\t\t\t\tsubs.some(c => {\n\t\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis.sub = c => {\n\t\t\t\t\tsubs.push(c);\n\t\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\t\tsubs.splice(subs.indexOf(c), 1);\n\t\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn props.children;\n\t\t}\n\t};\n\n\t// Devtools needs access to the context object when it\n\t// encounters a Provider. This is necessary to support\n\t// setting `displayName` on the context object instead\n\t// of on the component itself. See:\n\t// https://reactjs.org/docs/context.html#contextdisplayname\n\n\treturn (context.Provider._contextRef = context.Consumer.contextType = context);\n}\n","export const EMPTY_OBJ = {};\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n","import { diff, unmount, applyRef } from './index';\nimport { createVNode, Fragment } from '../create-element';\nimport { EMPTY_OBJ, EMPTY_ARR } from '../constants';\nimport { getDomSibling } from '../component';\n\n/**\n * Diff the children of a virtual node\n * @param {import('../internal').PreactElement} parentDom The DOM element whose\n * children are being diffed\n * @param {import('../internal').ComponentChildren[]} renderResult\n * @param {import('../internal').VNode} newParentVNode The new virtual\n * node whose children should be diff'ed against oldParentVNode\n * @param {import('../internal').VNode} oldParentVNode The old virtual\n * node whose children should be diff'ed against newParentVNode\n * @param {object} globalContext The current context object - modified by getChildContext\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n */\nexport function diffChildren(\n\tparentDom,\n\trenderResult,\n\tnewParentVNode,\n\toldParentVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating\n) {\n\tlet i, j, oldVNode, childVNode, newDom, firstChildDom, refs;\n\n\t// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._children || EMPTY_ARR\n\t// as EMPTY_OBJ._children should be `undefined`.\n\tlet oldChildren = (oldParentVNode && oldParentVNode._children) || EMPTY_ARR;\n\n\tlet oldChildrenLength = oldChildren.length;\n\n\tnewParentVNode._children = [];\n\tfor (i = 0; i < renderResult.length; i++) {\n\t\tchildVNode = renderResult[i];\n\n\t\tif (childVNode == null || typeof childVNode == 'boolean') {\n\t\t\tchildVNode = newParentVNode._children[i] = null;\n\t\t}\n\t\t// If this newVNode is being reused (e.g.
{reuse}{reuse}
) in the same diff,\n\t\t// or we are rendering a component (e.g. setState) copy the oldVNodes so it can have\n\t\t// it's own DOM & etc. pointers\n\t\telse if (\n\t\t\ttypeof childVNode == 'string' ||\n\t\t\ttypeof childVNode == 'number' ||\n\t\t\t// eslint-disable-next-line valid-typeof\n\t\t\ttypeof childVNode == 'bigint'\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tnull,\n\t\t\t\tchildVNode,\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tchildVNode\n\t\t\t);\n\t\t} else if (Array.isArray(childVNode)) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tFragment,\n\t\t\t\t{ children: childVNode },\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if (childVNode._depth > 0) {\n\t\t\t// VNode is already in use, clone it. This can happen in the following\n\t\t\t// scenario:\n\t\t\t// const reuse =
\n\t\t\t//
{reuse}{reuse}
\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tchildVNode.type,\n\t\t\t\tchildVNode.props,\n\t\t\t\tchildVNode.key,\n\t\t\t\tchildVNode.ref ? childVNode.ref : null,\n\t\t\t\tchildVNode._original\n\t\t\t);\n\t\t} else {\n\t\t\tchildVNode = newParentVNode._children[i] = childVNode;\n\t\t}\n\n\t\t// Terser removes the `continue` here and wraps the loop body\n\t\t// in a `if (childVNode) { ... } condition\n\t\tif (childVNode == null) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tchildVNode._parent = newParentVNode;\n\t\tchildVNode._depth = newParentVNode._depth + 1;\n\n\t\t// Check if we find a corresponding element in oldChildren.\n\t\t// If found, delete the array item by setting to `undefined`.\n\t\t// We use `undefined`, as `null` is reserved for empty placeholders\n\t\t// (holes).\n\t\toldVNode = oldChildren[i];\n\n\t\tif (\n\t\t\toldVNode === null ||\n\t\t\t(oldVNode &&\n\t\t\t\tchildVNode.key == oldVNode.key &&\n\t\t\t\tchildVNode.type === oldVNode.type)\n\t\t) {\n\t\t\toldChildren[i] = undefined;\n\t\t} else {\n\t\t\t// Either oldVNode === undefined or oldChildrenLength > 0,\n\t\t\t// so after this loop oldVNode == null or oldVNode is a valid value.\n\t\t\tfor (j = 0; j < oldChildrenLength; j++) {\n\t\t\t\toldVNode = oldChildren[j];\n\t\t\t\t// If childVNode is unkeyed, we only match similarly unkeyed nodes, otherwise we match by key.\n\t\t\t\t// We always match by type (in either case).\n\t\t\t\tif (\n\t\t\t\t\toldVNode &&\n\t\t\t\t\tchildVNode.key == oldVNode.key &&\n\t\t\t\t\tchildVNode.type === oldVNode.type\n\t\t\t\t) {\n\t\t\t\t\toldChildren[j] = undefined;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\toldVNode = null;\n\t\t\t}\n\t\t}\n\n\t\toldVNode = oldVNode || EMPTY_OBJ;\n\n\t\t// Morph the old element into the new one, but don't append it to the dom yet\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tchildVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tisSvg,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\toldDom,\n\t\t\tisHydrating\n\t\t);\n\n\t\tnewDom = childVNode._dom;\n\n\t\tif ((j = childVNode.ref) && oldVNode.ref != j) {\n\t\t\tif (!refs) refs = [];\n\t\t\tif (oldVNode.ref) refs.push(oldVNode.ref, null, childVNode);\n\t\t\trefs.push(j, childVNode._component || newDom, childVNode);\n\t\t}\n\n\t\tif (newDom != null) {\n\t\t\tif (firstChildDom == null) {\n\t\t\t\tfirstChildDom = newDom;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\ttypeof childVNode.type == 'function' &&\n\t\t\t\tchildVNode._children === oldVNode._children\n\t\t\t) {\n\t\t\t\tchildVNode._nextDom = oldDom = reorderChildren(\n\t\t\t\t\tchildVNode,\n\t\t\t\t\toldDom,\n\t\t\t\t\tparentDom\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\toldDom = placeChild(\n\t\t\t\t\tparentDom,\n\t\t\t\t\tchildVNode,\n\t\t\t\t\toldVNode,\n\t\t\t\t\toldChildren,\n\t\t\t\t\tnewDom,\n\t\t\t\t\toldDom\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (typeof newParentVNode.type == 'function') {\n\t\t\t\t// Because the newParentVNode is Fragment-like, we need to set it's\n\t\t\t\t// _nextDom property to the nextSibling of its last child DOM node.\n\t\t\t\t//\n\t\t\t\t// `oldDom` contains the correct value here because if the last child\n\t\t\t\t// is a Fragment-like, then oldDom has already been set to that child's _nextDom.\n\t\t\t\t// If the last child is a DOM VNode, then oldDom will be set to that DOM\n\t\t\t\t// node's nextSibling.\n\t\t\t\tnewParentVNode._nextDom = oldDom;\n\t\t\t}\n\t\t} else if (\n\t\t\toldDom &&\n\t\t\toldVNode._dom == oldDom &&\n\t\t\toldDom.parentNode != parentDom\n\t\t) {\n\t\t\t// The above condition is to handle null placeholders. See test in placeholder.test.js:\n\t\t\t// `efficiently replace null placeholders in parent rerenders`\n\t\t\toldDom = getDomSibling(oldVNode);\n\t\t}\n\t}\n\n\tnewParentVNode._dom = firstChildDom;\n\n\t// Remove remaining oldChildren if there are any.\n\tfor (i = oldChildrenLength; i--; ) {\n\t\tif (oldChildren[i] != null) {\n\t\t\tif (\n\t\t\t\ttypeof newParentVNode.type == 'function' &&\n\t\t\t\toldChildren[i]._dom != null &&\n\t\t\t\toldChildren[i]._dom == newParentVNode._nextDom\n\t\t\t) {\n\t\t\t\t// If the newParentVNode.__nextDom points to a dom node that is about to\n\t\t\t\t// be unmounted, then get the next sibling of that vnode and set\n\t\t\t\t// _nextDom to it\n\t\t\t\tnewParentVNode._nextDom = getLastDom(oldParentVNode).nextSibling;\n\t\t\t}\n\n\t\t\tunmount(oldChildren[i], oldChildren[i]);\n\t\t}\n\t}\n\n\t// Set refs only after unmount\n\tif (refs) {\n\t\tfor (i = 0; i < refs.length; i++) {\n\t\t\tapplyRef(refs[i], refs[++i], refs[++i]);\n\t\t}\n\t}\n}\n\nfunction reorderChildren(childVNode, oldDom, parentDom) {\n\t// Note: VNodes in nested suspended trees may be missing _children.\n\tlet c = childVNode._children;\n\tlet tmp = 0;\n\tfor (; c && tmp < c.length; tmp++) {\n\t\tlet vnode = c[tmp];\n\t\tif (vnode) {\n\t\t\t// We typically enter this code path on sCU bailout, where we copy\n\t\t\t// oldVNode._children to newVNode._children. If that is the case, we need\n\t\t\t// to update the old children's _parent pointer to point to the newVNode\n\t\t\t// (childVNode here).\n\t\t\tvnode._parent = childVNode;\n\n\t\t\tif (typeof vnode.type == 'function') {\n\t\t\t\toldDom = reorderChildren(vnode, oldDom, parentDom);\n\t\t\t} else {\n\t\t\t\toldDom = placeChild(parentDom, vnode, vnode, c, vnode._dom, oldDom);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn oldDom;\n}\n\n/**\n * Flatten and loop through the children of a virtual node\n * @param {import('../index').ComponentChildren} children The unflattened\n * children of a virtual node\n * @returns {import('../internal').VNode[]}\n */\nexport function toChildArray(children, out) {\n\tout = out || [];\n\tif (children == null || typeof children == 'boolean') {\n\t} else if (Array.isArray(children)) {\n\t\tchildren.some(child => {\n\t\t\ttoChildArray(child, out);\n\t\t});\n\t} else {\n\t\tout.push(children);\n\t}\n\treturn out;\n}\n\nfunction placeChild(\n\tparentDom,\n\tchildVNode,\n\toldVNode,\n\toldChildren,\n\tnewDom,\n\toldDom\n) {\n\tlet nextDom;\n\tif (childVNode._nextDom !== undefined) {\n\t\t// Only Fragments or components that return Fragment like VNodes will\n\t\t// have a non-undefined _nextDom. Continue the diff from the sibling\n\t\t// of last DOM child of this child VNode\n\t\tnextDom = childVNode._nextDom;\n\n\t\t// Eagerly cleanup _nextDom. We don't need to persist the value because\n\t\t// it is only used by `diffChildren` to determine where to resume the diff after\n\t\t// diffing Components and Fragments. Once we store it the nextDOM local var, we\n\t\t// can clean up the property\n\t\tchildVNode._nextDom = undefined;\n\t} else if (\n\t\toldVNode == null ||\n\t\tnewDom != oldDom ||\n\t\tnewDom.parentNode == null\n\t) {\n\t\touter: if (oldDom == null || oldDom.parentNode !== parentDom) {\n\t\t\tparentDom.appendChild(newDom);\n\t\t\tnextDom = null;\n\t\t} else {\n\t\t\t// `j= 0; i--) {\n\t\t\tlet child = vnode._children[i];\n\t\t\tif (child) {\n\t\t\t\tlet lastDom = getLastDom(child);\n\t\t\t\tif (lastDom) {\n\t\t\t\t\treturn lastDom;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn null;\n}\n","import { IS_NON_DIMENSIONAL } from '../constants';\nimport options from '../options';\n\n/**\n * Diff the old and new properties of a VNode and apply changes to the DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to apply\n * changes to\n * @param {object} newProps The new props\n * @param {object} oldProps The old props\n * @param {boolean} isSvg Whether or not this node is an SVG node\n * @param {boolean} hydrate Whether or not we are in hydration mode\n */\nexport function diffProps(dom, newProps, oldProps, isSvg, hydrate) {\n\tlet i;\n\n\tfor (i in oldProps) {\n\t\tif (i !== 'children' && i !== 'key' && !(i in newProps)) {\n\t\t\tsetProperty(dom, i, null, oldProps[i], isSvg);\n\t\t}\n\t}\n\n\tfor (i in newProps) {\n\t\tif (\n\t\t\t(!hydrate || typeof newProps[i] == 'function') &&\n\t\t\ti !== 'children' &&\n\t\t\ti !== 'key' &&\n\t\t\ti !== 'value' &&\n\t\t\ti !== 'checked' &&\n\t\t\toldProps[i] !== newProps[i]\n\t\t) {\n\t\t\tsetProperty(dom, i, newProps[i], oldProps[i], isSvg);\n\t\t}\n\t}\n}\n\nfunction setStyle(style, key, value) {\n\tif (key[0] === '-') {\n\t\tstyle.setProperty(key, value == null ? '' : value);\n\t} else if (value == null) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, isSvg) {\n\tlet useCapture;\n\n\to: if (name === 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] !== oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] === 'o' && name[1] === 'n') {\n\t\tuseCapture = name !== (name = name.replace(/Capture$/, ''));\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (name.toLowerCase() in dom) name = name.toLowerCase().slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\t\tdom.addEventListener(name, handler, useCapture);\n\t\t\t}\n\t\t} else {\n\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\tdom.removeEventListener(name, handler, useCapture);\n\t\t}\n\t} else if (name !== 'dangerouslySetInnerHTML') {\n\t\tif (isSvg) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname !== 'width' &&\n\t\t\tname !== 'height' &&\n\t\t\tname !== 'href' &&\n\t\t\tname !== 'list' &&\n\t\t\tname !== 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname !== 'tabIndex' &&\n\t\t\tname !== 'download' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == null ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// ARIA-attributes have a different notion of boolean values.\n\t\t// The value `false` is different from the attribute not\n\t\t// existing on the DOM, so we can't remove it. For non-boolean\n\t\t// ARIA-attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost us too many bytes. On top of\n\t\t// that other VDOM frameworks also always stringify `false`.\n\n\t\tif (typeof value === 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != null && (value !== false || name.indexOf('-') != -1)) {\n\t\t\tdom.setAttribute(name, value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n\treturn this._listeners[e.type + false](options.event ? options.event(e) : e);\n}\n\nfunction eventProxyCapture(e) {\n\treturn this._listeners[e.type + true](options.event ? options.event(e) : e);\n}\n","import { EMPTY_OBJ } from '../constants';\nimport { Component, getDomSibling } from '../component';\nimport { Fragment } from '../create-element';\nimport { diffChildren } from './children';\nimport { diffProps, setProperty } from './props';\nimport { assign, removeNode, slice } from '../util';\nimport options from '../options';\n\n/**\n * Diff two virtual nodes and apply proper changes to the DOM\n * @param {import('../internal').PreactElement} parentDom The parent of the DOM element\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object. Modified by getChildContext\n * @param {boolean} isSvg Whether or not this element is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} [isHydrating] Whether or not we are in hydration\n */\nexport function diff(\n\tparentDom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating\n) {\n\tlet tmp,\n\t\tnewType = newVNode.type;\n\n\t// When passing through createElement it assigns the object\n\t// constructor as undefined. This to prevent JSON-injection.\n\tif (newVNode.constructor !== undefined) return null;\n\n\t// If the previous diff bailed out, resume creating/hydrating.\n\tif (oldVNode._hydrating != null) {\n\t\tisHydrating = oldVNode._hydrating;\n\t\toldDom = newVNode._dom = oldVNode._dom;\n\t\t// if we resume, we want the tree to be \"unlocked\"\n\t\tnewVNode._hydrating = null;\n\t\texcessDomChildren = [oldDom];\n\t}\n\n\tif ((tmp = options._diff)) tmp(newVNode);\n\n\ttry {\n\t\touter: if (typeof newType == 'function') {\n\t\t\tlet c, isNew, oldProps, oldState, snapshot, clearProcessingException;\n\t\t\tlet newProps = newVNode.props;\n\n\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t// the context value as `this.context` just for this component.\n\t\t\ttmp = newType.contextType;\n\t\t\tlet provider = tmp && globalContext[tmp._id];\n\t\t\tlet componentContext = tmp\n\t\t\t\t? provider\n\t\t\t\t\t? provider.props.value\n\t\t\t\t\t: tmp._defaultValue\n\t\t\t\t: globalContext;\n\n\t\t\t// Get component and set it to `c`\n\t\t\tif (oldVNode._component) {\n\t\t\t\tc = newVNode._component = oldVNode._component;\n\t\t\t\tclearProcessingException = c._processingException = c._pendingError;\n\t\t\t} else {\n\t\t\t\t// Instantiate the new component\n\t\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\t\t// @ts-ignore The check above verifies that newType is suppose to be constructed\n\t\t\t\t\tnewVNode._component = c = new newType(newProps, componentContext); // eslint-disable-line new-cap\n\t\t\t\t} else {\n\t\t\t\t\t// @ts-ignore Trust me, Component implements the interface we want\n\t\t\t\t\tnewVNode._component = c = new Component(newProps, componentContext);\n\t\t\t\t\tc.constructor = newType;\n\t\t\t\t\tc.render = doRender;\n\t\t\t\t}\n\t\t\t\tif (provider) provider.sub(c);\n\n\t\t\t\tc.props = newProps;\n\t\t\t\tif (!c.state) c.state = {};\n\t\t\t\tc.context = componentContext;\n\t\t\t\tc._globalContext = globalContext;\n\t\t\t\tisNew = c._dirty = true;\n\t\t\t\tc._renderCallbacks = [];\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t}\n\n\t\t\t// Invoke getDerivedStateFromProps\n\t\t\tif (c._nextState == null) {\n\t\t\t\tc._nextState = c.state;\n\t\t\t}\n\n\t\t\tif (newType.getDerivedStateFromProps != null) {\n\t\t\t\tif (c._nextState == c.state) {\n\t\t\t\t\tc._nextState = assign({}, c._nextState);\n\t\t\t\t}\n\n\t\t\t\tassign(\n\t\t\t\t\tc._nextState,\n\t\t\t\t\tnewType.getDerivedStateFromProps(newProps, c._nextState)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\toldProps = c.props;\n\t\t\toldState = c.state;\n\t\t\tc._vnode = newVNode;\n\n\t\t\t// Invoke pre-render lifecycle methods\n\t\t\tif (isNew) {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tc.componentWillMount != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillMount();\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidMount != null) {\n\t\t\t\t\tc._renderCallbacks.push(c.componentDidMount);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tnewProps !== oldProps &&\n\t\t\t\t\tc.componentWillReceiveProps != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillReceiveProps(newProps, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t(!c._force &&\n\t\t\t\t\t\tc.shouldComponentUpdate != null &&\n\t\t\t\t\t\tc.shouldComponentUpdate(\n\t\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\t\tc._nextState,\n\t\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t\t) === false) ||\n\t\t\t\t\tnewVNode._original === oldVNode._original\n\t\t\t\t) {\n\t\t\t\t\t// More info about this here: https://gist.github.com/JoviDeCroock/bec5f2ce93544d2e6070ef8e0036e4e8\n\t\t\t\t\tif (newVNode._original !== oldVNode._original) {\n\t\t\t\t\t\t// When we are dealing with a bail because of sCU we have to update\n\t\t\t\t\t\t// the props, state and dirty-state.\n\t\t\t\t\t\t// when we are dealing with strict-equality we don't as the child could still\n\t\t\t\t\t\t// be dirtied see #3883\n\t\t\t\t\t\tc.props = newProps;\n\t\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t\t\tc._dirty = false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// In cases of bailing due to strict-equality we have to reset force as well\n\t\t\t\t\tc._force = false;\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t\tnewVNode._children.forEach(vnode => {\n\t\t\t\t\t\tif (vnode) vnode._parent = newVNode;\n\t\t\t\t\t});\n\n\t\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t\t}\n\t\t\t\t\tc._stateCallbacks = [];\n\n\t\t\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\t\t\tcommitQueue.push(c);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\n\t\t\t\tif (c.componentWillUpdate != null) {\n\t\t\t\t\tc.componentWillUpdate(newProps, c._nextState, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidUpdate != null) {\n\t\t\t\t\tc._renderCallbacks.push(() => {\n\t\t\t\t\t\tc.componentDidUpdate(oldProps, oldState, snapshot);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tc.context = componentContext;\n\t\t\tc.props = newProps;\n\t\t\tc._parentDom = parentDom;\n\n\t\t\tlet renderHook = options._render,\n\t\t\t\tcount = 0;\n\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\tc.state = c._nextState;\n\t\t\t\tc._dirty = false;\n\n\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t}\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t} else {\n\t\t\t\tdo {\n\t\t\t\t\tc._dirty = false;\n\t\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\t\t// Handle setState called in render, see #2553\n\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t} while (c._dirty && ++count < 25);\n\t\t\t}\n\n\t\t\t// Handle setState called in render, see #2553\n\t\t\tc.state = c._nextState;\n\n\t\t\tif (c.getChildContext != null) {\n\t\t\t\tglobalContext = assign(assign({}, globalContext), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (!isNew && c.getSnapshotBeforeUpdate != null) {\n\t\t\t\tsnapshot = c.getSnapshotBeforeUpdate(oldProps, oldState);\n\t\t\t}\n\n\t\t\tlet isTopLevelFragment =\n\t\t\t\ttmp != null && tmp.type === Fragment && tmp.key == null;\n\t\t\tlet renderResult = isTopLevelFragment ? tmp.props.children : tmp;\n\n\t\t\tdiffChildren(\n\t\t\t\tparentDom,\n\t\t\t\tArray.isArray(renderResult) ? renderResult : [renderResult],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\toldDom,\n\t\t\t\tisHydrating\n\t\t\t);\n\n\t\t\tc.base = newVNode._dom;\n\n\t\t\t// We successfully rendered this VNode, unset any stored hydration/bailout state:\n\t\t\tnewVNode._hydrating = null;\n\n\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\tcommitQueue.push(c);\n\t\t\t}\n\n\t\t\tif (clearProcessingException) {\n\t\t\t\tc._pendingError = c._processingException = null;\n\t\t\t}\n\n\t\t\tc._force = false;\n\t\t} else if (\n\t\t\texcessDomChildren == null &&\n\t\t\tnewVNode._original === oldVNode._original\n\t\t) {\n\t\t\tnewVNode._children = oldVNode._children;\n\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t} else {\n\t\t\tnewVNode._dom = diffElementNodes(\n\t\t\t\toldVNode._dom,\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\tisHydrating\n\t\t\t);\n\t\t}\n\n\t\tif ((tmp = options.diffed)) tmp(newVNode);\n\t} catch (e) {\n\t\tnewVNode._original = null;\n\t\t// if hydrating or creating initial tree, bailout preserves DOM:\n\t\tif (isHydrating || excessDomChildren != null) {\n\t\t\tnewVNode._dom = oldDom;\n\t\t\tnewVNode._hydrating = !!isHydrating;\n\t\t\texcessDomChildren[excessDomChildren.indexOf(oldDom)] = null;\n\t\t\t// ^ could possibly be simplified to:\n\t\t\t// excessDomChildren.length = 0;\n\t\t}\n\t\toptions._catchError(e, newVNode, oldVNode);\n\t}\n}\n\n/**\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').VNode} root\n */\nexport function commitRoot(commitQueue, root) {\n\tif (options._commit) options._commit(root, commitQueue);\n\n\tcommitQueue.some(c => {\n\t\ttry {\n\t\t\t// @ts-ignore Reuse the commitQueue variable here so the type changes\n\t\t\tcommitQueue = c._renderCallbacks;\n\t\t\tc._renderCallbacks = [];\n\t\t\tcommitQueue.some(cb => {\n\t\t\t\t// @ts-ignore See above ts-ignore on commitQueue\n\t\t\t\tcb.call(c);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\toptions._catchError(e, c._vnode);\n\t\t}\n\t});\n}\n\n/**\n * Diff two virtual nodes representing DOM element\n * @param {import('../internal').PreactElement} dom The DOM element representing\n * the virtual nodes being diffed\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {*} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @returns {import('../internal').PreactElement}\n */\nfunction diffElementNodes(\n\tdom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\tisHydrating\n) {\n\tlet oldProps = oldVNode.props;\n\tlet newProps = newVNode.props;\n\tlet nodeType = newVNode.type;\n\tlet i = 0;\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tif (nodeType === 'svg') isSvg = true;\n\n\tif (excessDomChildren != null) {\n\t\tfor (; i < excessDomChildren.length; i++) {\n\t\t\tconst child = excessDomChildren[i];\n\n\t\t\t// if newVNode matches an element in excessDomChildren or the `dom`\n\t\t\t// argument matches an element in excessDomChildren, remove it from\n\t\t\t// excessDomChildren so it isn't later removed in diffChildren\n\t\t\tif (\n\t\t\t\tchild &&\n\t\t\t\t'setAttribute' in child === !!nodeType &&\n\t\t\t\t(nodeType ? child.localName === nodeType : child.nodeType === 3)\n\t\t\t) {\n\t\t\t\tdom = child;\n\t\t\t\texcessDomChildren[i] = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom == null) {\n\t\tif (nodeType === null) {\n\t\t\t// @ts-ignore createTextNode returns Text, we expect PreactElement\n\t\t\treturn document.createTextNode(newProps);\n\t\t}\n\n\t\tif (isSvg) {\n\t\t\tdom = document.createElementNS(\n\t\t\t\t'http://www.w3.org/2000/svg',\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType\n\t\t\t);\n\t\t} else {\n\t\t\tdom = document.createElement(\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType,\n\t\t\t\tnewProps.is && newProps\n\t\t\t);\n\t\t}\n\n\t\t// we created a new parent, so none of the previously attached children can be reused:\n\t\texcessDomChildren = null;\n\t\t// we are creating a new node, so we can assume this is a new subtree (in case we are hydrating), this deopts the hydrate\n\t\tisHydrating = false;\n\t}\n\n\tif (nodeType === null) {\n\t\t// During hydration, we still have to split merged text from SSR'd HTML.\n\t\tif (oldProps !== newProps && (!isHydrating || dom.data !== newProps)) {\n\t\t\tdom.data = newProps;\n\t\t}\n\t} else {\n\t\t// If excessDomChildren was not null, repopulate it with the current element's children:\n\t\texcessDomChildren = excessDomChildren && slice.call(dom.childNodes);\n\n\t\toldProps = oldVNode.props || EMPTY_OBJ;\n\n\t\tlet oldHtml = oldProps.dangerouslySetInnerHTML;\n\t\tlet newHtml = newProps.dangerouslySetInnerHTML;\n\n\t\t// During hydration, props are not diffed at all (including dangerouslySetInnerHTML)\n\t\t// @TODO we should warn in debug mode when props don't match here.\n\t\tif (!isHydrating) {\n\t\t\t// But, if we are in a situation where we are using existing DOM (e.g. replaceNode)\n\t\t\t// we should read the existing DOM attributes to diff them\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\toldProps = {};\n\t\t\t\tfor (i = 0; i < dom.attributes.length; i++) {\n\t\t\t\t\toldProps[dom.attributes[i].name] = dom.attributes[i].value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (newHtml || oldHtml) {\n\t\t\t\t// Avoid re-applying the same '__html' if it did not changed between re-render\n\t\t\t\tif (\n\t\t\t\t\t!newHtml ||\n\t\t\t\t\t((!oldHtml || newHtml.__html != oldHtml.__html) &&\n\t\t\t\t\t\tnewHtml.__html !== dom.innerHTML)\n\t\t\t\t) {\n\t\t\t\t\tdom.innerHTML = (newHtml && newHtml.__html) || '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdiffProps(dom, newProps, oldProps, isSvg, isHydrating);\n\n\t\t// If the new vnode didn't have dangerouslySetInnerHTML, diff its children\n\t\tif (newHtml) {\n\t\t\tnewVNode._children = [];\n\t\t} else {\n\t\t\ti = newVNode.props.children;\n\t\t\tdiffChildren(\n\t\t\t\tdom,\n\t\t\t\tArray.isArray(i) ? i : [i],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg && nodeType !== 'foreignObject',\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\texcessDomChildren\n\t\t\t\t\t? excessDomChildren[0]\n\t\t\t\t\t: oldVNode._children && getDomSibling(oldVNode, 0),\n\t\t\t\tisHydrating\n\t\t\t);\n\n\t\t\t// Remove children that are not part of any vnode.\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\tfor (i = excessDomChildren.length; i--; ) {\n\t\t\t\t\tif (excessDomChildren[i] != null) removeNode(excessDomChildren[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// (as above, don't diff props during hydration)\n\t\tif (!isHydrating) {\n\t\t\tif (\n\t\t\t\t'value' in newProps &&\n\t\t\t\t(i = newProps.value) !== undefined &&\n\t\t\t\t// #2756 For the -element the initial value is 0,\n\t\t\t\t// despite the attribute not being present. When the attribute\n\t\t\t\t// is missing the progress bar is treated as indeterminate.\n\t\t\t\t// To fix that we'll always update it when it is 0 for progress elements\n\t\t\t\t(i !== dom.value ||\n\t\t\t\t\t(nodeType === 'progress' && !i) ||\n\t\t\t\t\t// This is only for IE 11 to fix \n\t\tif (\n\t\t\ttype == 'select' &&\n\t\t\tnormalizedProps.multiple &&\n\t\t\tArray.isArray(normalizedProps.value)\n\t\t) {\n\t\t\t// forEach() always returns undefined, which we abuse here to unset the value prop.\n\t\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\t\tchild.props.selected =\n\t\t\t\t\tnormalizedProps.value.indexOf(child.props.value) != -1;\n\t\t\t});\n\t\t}\n\n\t\t// Adding support for defaultValue in select tag\n\t\tif (type == 'select' && normalizedProps.defaultValue != null) {\n\t\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\t\tif (normalizedProps.multiple) {\n\t\t\t\t\tchild.props.selected =\n\t\t\t\t\t\tnormalizedProps.defaultValue.indexOf(child.props.value) != -1;\n\t\t\t\t} else {\n\t\t\t\t\tchild.props.selected =\n\t\t\t\t\t\tnormalizedProps.defaultValue == child.props.value;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tvnode.props = normalizedProps;\n\n\t\tif (props.class != props.className) {\n\t\t\tclassNameDescriptor.enumerable = 'className' in props;\n\t\t\tif (props.className != null) normalizedProps.class = props.className;\n\t\t\tObject.defineProperty(normalizedProps, 'className', classNameDescriptor);\n\t\t}\n\t}\n\n\tvnode.$$typeof = REACT_ELEMENT_TYPE;\n\n\tif (oldVNodeHook) oldVNodeHook(vnode);\n};\n\n// Only needed for react-relay\nlet currentComponent;\nconst oldBeforeRender = options._render;\noptions._render = function(vnode) {\n\tif (oldBeforeRender) {\n\t\toldBeforeRender(vnode);\n\t}\n\tcurrentComponent = vnode._component;\n};\n\nconst oldDiffed = options.diffed;\n/** @type {(vnode: import('./internal').VNode)} */\noptions.diffed = function(vnode) {\n\tif (oldDiffed) {\n\t\toldDiffed(vnode);\n\t}\n\n\tconst props = vnode.props;\n\tconst dom = vnode._dom;\n\tif (\n\t\tdom != null &&\n\t\tvnode.type === 'textarea' &&\n\t\t'value' in props &&\n\t\tprops.value !== dom.value\n\t) {\n\t\tdom.value = props.value == null ? '' : props.value;\n\t}\n\n\tcurrentComponent = null;\n};\n\n// This is a very very private internal function for React it\n// is used to sort-of do runtime dependency injection. So far\n// only `react-relay` makes use of it. It uses it to read the\n// context value.\nexport const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {\n\tReactCurrentDispatcher: {\n\t\tcurrent: {\n\t\t\treadContext(context) {\n\t\t\t\treturn currentComponent._globalContext[context._id].props.value;\n\t\t\t}\n\t\t}\n\t}\n};\n","import {\n\tcreateElement,\n\trender as preactRender,\n\tcloneElement as preactCloneElement,\n\tcreateRef,\n\tComponent,\n\tcreateContext,\n\tFragment\n} from 'preact';\nimport {\n\tuseState,\n\tuseId,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue\n} from 'preact/hooks';\nimport { PureComponent } from './PureComponent';\nimport { memo } from './memo';\nimport { forwardRef } from './forwardRef';\nimport { Children } from './Children';\nimport { Suspense, lazy } from './suspense';\nimport { SuspenseList } from './suspense-list';\nimport { createPortal } from './portals';\nimport { is } from './util';\nimport {\n\thydrate,\n\trender,\n\tREACT_ELEMENT_TYPE,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n} from './render';\n\nconst version = '17.0.2'; // trick libraries to think we are react\n\n/**\n * Legacy version of createElement.\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component constructor\n */\nfunction createFactory(type) {\n\treturn createElement.bind(null, type);\n}\n\n/**\n * Check if the passed element is a valid (p)react node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isValidElement(element) {\n\treturn !!element && element.$$typeof === REACT_ELEMENT_TYPE;\n}\n\n/**\n * Wrap `cloneElement` to abort if the passed element is not a valid element and apply\n * all vnode normalizations.\n * @param {import('./internal').VNode} element The vnode to clone\n * @param {object} props Props to add when cloning\n * @param {Array} rest Optional component children\n */\nfunction cloneElement(element) {\n\tif (!isValidElement(element)) return element;\n\treturn preactCloneElement.apply(null, arguments);\n}\n\n/**\n * Remove a component tree from the DOM, including state and event handlers.\n * @param {import('./internal').PreactElement} container\n * @returns {boolean}\n */\nfunction unmountComponentAtNode(container) {\n\tif (container._children) {\n\t\tpreactRender(null, container);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n/**\n * Get the matching DOM node for a component\n * @param {import('./internal').Component} component\n * @returns {import('./internal').PreactElement | null}\n */\nfunction findDOMNode(component) {\n\treturn (\n\t\t(component &&\n\t\t\t(component.base || (component.nodeType === 1 && component))) ||\n\t\tnull\n\t);\n}\n\n/**\n * Deprecated way to control batched rendering inside the reconciler, but we\n * already schedule in batches inside our rendering code\n * @template Arg\n * @param {(arg: Arg) => void} callback function that triggers the updated\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n */\n// eslint-disable-next-line camelcase\nconst unstable_batchedUpdates = (callback, arg) => callback(arg);\n\n/**\n * In React, `flushSync` flushes the entire tree and forces a rerender. It's\n * implmented here as a no-op.\n * @template Arg\n * @template Result\n * @param {(arg: Arg) => Result} callback function that runs before the flush\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n * @returns\n */\nconst flushSync = (callback, arg) => callback(arg);\n\n/**\n * Strict Mode is not implemented in Preact, so we provide a stand-in for it\n * that just renders its children without imposing any restrictions.\n */\nconst StrictMode = Fragment;\n\nexport function startTransition(cb) {\n\tcb();\n}\n\nexport function useDeferredValue(val) {\n\treturn val;\n}\n\nexport function useTransition() {\n\treturn [false, startTransition];\n}\n\n// TODO: in theory this should be done after a VNode is diffed as we want to insert\n// styles/... before it attaches\nexport const useInsertionEffect = useLayoutEffect;\n\n/**\n * This is taken from https://github.com/facebook/react/blob/main/packages/use-sync-external-store/src/useSyncExternalStoreShimClient.js#L84\n * on a high level this cuts out the warnings, ... and attempts a smaller implementation\n */\nexport function useSyncExternalStore(subscribe, getSnapshot) {\n\tconst value = getSnapshot();\n\n\tconst [{ _instance }, forceUpdate] = useState({\n\t\t_instance: { _value: value, _getSnapshot: getSnapshot }\n\t});\n\n\tuseLayoutEffect(() => {\n\t\t_instance._value = value;\n\t\t_instance._getSnapshot = getSnapshot;\n\n\t\tif (!is(_instance._value, getSnapshot())) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\t}, [subscribe, value, getSnapshot]);\n\n\tuseEffect(() => {\n\t\tif (!is(_instance._value, _instance._getSnapshot())) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\n\t\treturn subscribe(() => {\n\t\t\tif (!is(_instance._value, _instance._getSnapshot())) {\n\t\t\t\tforceUpdate({ _instance });\n\t\t\t}\n\t\t});\n\t}, [subscribe]);\n\n\treturn value;\n}\n\nexport * from 'preact/hooks';\nexport {\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\t// eslint-disable-next-line camelcase\n\tunstable_batchedUpdates,\n\tStrictMode,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n\n// React copies the named exports to the default one.\nexport default {\n\tuseState,\n\tuseId,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseInsertionEffect,\n\tuseTransition,\n\tuseDeferredValue,\n\tuseSyncExternalStore,\n\tstartTransition,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue,\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\tunstable_batchedUpdates,\n\tStrictMode,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n","import { createElement } from 'preact';\nimport { shallowDiffers } from './util';\n\n/**\n * Memoize a component, so that it only updates when the props actually have\n * changed. This was previously known as `React.pure`.\n * @param {import('./internal').FunctionComponent} c functional component\n * @param {(prev: object, next: object) => boolean} [comparer] Custom equality function\n * @returns {import('./internal').FunctionComponent}\n */\nexport function memo(c, comparer) {\n\tfunction shouldUpdate(nextProps) {\n\t\tlet ref = this.props.ref;\n\t\tlet updateRef = ref == nextProps.ref;\n\t\tif (!updateRef && ref) {\n\t\t\tref.call ? ref(null) : (ref.current = null);\n\t\t}\n\n\t\tif (!comparer) {\n\t\t\treturn shallowDiffers(this.props, nextProps);\n\t\t}\n\n\t\treturn !comparer(this.props, nextProps) || !updateRef;\n\t}\n\n\tfunction Memoed(props) {\n\t\tthis.shouldComponentUpdate = shouldUpdate;\n\t\treturn createElement(c, props);\n\t}\n\tMemoed.displayName = 'Memo(' + (c.displayName || c.name) + ')';\n\tMemoed.prototype.isReactComponent = true;\n\tMemoed._forwarded = true;\n\treturn Memoed;\n}\n","import { useRef } from 'react';\n\n/**\n * A custom hook that creates a ref for a function, and updates it on every render.\n * The new value is always the same function, but the function's context changes on every render.\n */\nexport default function useFunctionRef(fn) {\n const fnRef = useRef(fn);\n fnRef.current = fn;\n return fnRef;\n}\n","function cycleDetected(): never {\n\tthrow new Error(\"Cycle detected\");\n}\n\n// Flags for Computed and Effect.\nconst RUNNING = 1 << 0;\nconst NOTIFIED = 1 << 1;\nconst OUTDATED = 1 << 2;\nconst DISPOSED = 1 << 3;\nconst HAS_ERROR = 1 << 4;\nconst TRACKING = 1 << 5;\n\n// A linked list node used to track dependencies (sources) and dependents (targets).\n// Also used to remember the source's last version number that the target saw.\ntype Node = {\n\t// A source whose value the target depends on.\n\t_source: Signal;\n\t_prevSource?: Node;\n\t_nextSource?: Node;\n\n\t// A target that depends on the source and should be notified when the source changes.\n\t_target: Computed | Effect;\n\t_prevTarget?: Node;\n\t_nextTarget?: Node;\n\n\t// The version number of the source that target has last seen. We use version numbers\n\t// instead of storing the source value, because source values can take arbitrary amount\n\t// of memory, and computeds could hang on to them forever because they're lazily evaluated.\n\t// Use the special value -1 to mark potentially unused but recyclable nodes.\n\t_version: number;\n\n\t// Used to remember & roll back the source's previous `._node` value when entering &\n\t// exiting a new evaluation context.\n\t_rollbackNode?: Node;\n};\n\nfunction startBatch() {\n\tbatchDepth++;\n}\n\nfunction endBatch() {\n\tif (batchDepth > 1) {\n\t\tbatchDepth--;\n\t\treturn;\n\t}\n\n\tlet error: unknown;\n\tlet hasError = false;\n\n\twhile (batchedEffect !== undefined) {\n\t\tlet effect: Effect | undefined = batchedEffect;\n\t\tbatchedEffect = undefined;\n\n\t\tbatchIteration++;\n\n\t\twhile (effect !== undefined) {\n\t\t\tconst next: Effect | undefined = effect._nextBatchedEffect;\n\t\t\teffect._nextBatchedEffect = undefined;\n\t\t\teffect._flags &= ~NOTIFIED;\n\n\t\t\tif (!(effect._flags & DISPOSED) && needsToRecompute(effect)) {\n\t\t\t\ttry {\n\t\t\t\t\teffect._callback();\n\t\t\t\t} catch (err) {\n\t\t\t\t\tif (!hasError) {\n\t\t\t\t\t\terror = err;\n\t\t\t\t\t\thasError = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\teffect = next;\n\t\t}\n\t}\n\tbatchIteration = 0;\n\tbatchDepth--;\n\n\tif (hasError) {\n\t\tthrow error;\n\t}\n}\n\nfunction batch(callback: () => T): T {\n\tif (batchDepth > 0) {\n\t\treturn callback();\n\t}\n\t/*@__INLINE__**/ startBatch();\n\ttry {\n\t\treturn callback();\n\t} finally {\n\t\tendBatch();\n\t}\n}\n\n// Currently evaluated computed or effect.\nlet evalContext: Computed | Effect | undefined = undefined;\n\n// Effects collected into a batch.\nlet batchedEffect: Effect | undefined = undefined;\nlet batchDepth = 0;\nlet batchIteration = 0;\n\n// A global version number for signals, used for fast-pathing repeated\n// computed.peek()/computed.value calls when nothing has changed globally.\nlet globalVersion = 0;\n\nfunction addDependency(signal: Signal): Node | undefined {\n\tif (evalContext === undefined) {\n\t\treturn undefined;\n\t}\n\n\tlet node = signal._node;\n\tif (node === undefined || node._target !== evalContext) {\n\t\t/**\n\t\t * `signal` is a new dependency. Create a new dependency node, and set it\n\t\t * as the tail of the current context's dependency list. e.g:\n\t\t *\n\t\t * { A <-> B }\n\t\t * ↑ ↑\n\t\t * tail node (new)\n\t\t * ↓\n\t\t * { A <-> B <-> C }\n\t\t * ↑\n\t\t * tail (evalContext._sources)\n\t\t */\n\t\tnode = {\n\t\t\t_version: 0,\n\t\t\t_source: signal,\n\t\t\t_prevSource: evalContext._sources,\n\t\t\t_nextSource: undefined,\n\t\t\t_target: evalContext,\n\t\t\t_prevTarget: undefined,\n\t\t\t_nextTarget: undefined,\n\t\t\t_rollbackNode: node,\n\t\t};\n\n\t\tif (evalContext._sources !== undefined) {\n\t\t\tevalContext._sources._nextSource = node;\n\t\t}\n\t\tevalContext._sources = node;\n\t\tsignal._node = node;\n\n\t\t// Subscribe to change notifications from this dependency if we're in an effect\n\t\t// OR evaluating a computed signal that in turn has subscribers.\n\t\tif (evalContext._flags & TRACKING) {\n\t\t\tsignal._subscribe(node);\n\t\t}\n\t\treturn node;\n\t} else if (node._version === -1) {\n\t\t// `signal` is an existing dependency from a previous evaluation. Reuse it.\n\t\tnode._version = 0;\n\n\t\t/**\n\t\t * If `node` is not already the current tail of the dependency list (i.e.\n\t\t * there is a next node in the list), then make the `node` the new tail. e.g:\n\t\t *\n\t\t * { A <-> B <-> C <-> D }\n\t\t * ↑ ↑\n\t\t * node ┌─── tail (evalContext._sources)\n\t\t * └─────│─────┐\n\t\t * ↓ ↓\n\t\t * { A <-> C <-> D <-> B }\n\t\t * ↑\n\t\t * tail (evalContext._sources)\n\t\t */\n\t\tif (node._nextSource !== undefined) {\n\t\t\tnode._nextSource._prevSource = node._prevSource;\n\n\t\t\tif (node._prevSource !== undefined) {\n\t\t\t\tnode._prevSource._nextSource = node._nextSource;\n\t\t\t}\n\n\t\t\tnode._prevSource = evalContext._sources;\n\t\t\tnode._nextSource = undefined;\n\n\t\t\tevalContext._sources!._nextSource = node;\n\t\t\tevalContext._sources = node;\n\t\t}\n\n\t\t// We can assume that the currently evaluated effect / computed signal is already\n\t\t// subscribed to change notifications from `signal` if needed.\n\t\treturn node;\n\t}\n\treturn undefined;\n}\n\ndeclare class Signal {\n\t/** @internal */\n\t_value: unknown;\n\n\t/**\n\t * @internal\n\t * Version numbers should always be >= 0, because the special value -1 is used\n\t * by Nodes to signify potentially unused but recyclable nodes.\n\t */\n\t_version: number;\n\n\t/** @internal */\n\t_node?: Node;\n\n\t/** @internal */\n\t_targets?: Node;\n\n\tconstructor(value?: T);\n\n\t/** @internal */\n\t_refresh(): boolean;\n\n\t/** @internal */\n\t_subscribe(node: Node): void;\n\n\t/** @internal */\n\t_unsubscribe(node: Node): void;\n\n\tsubscribe(fn: (value: T) => void): () => void;\n\n\tvalueOf(): T;\n\n\ttoString(): string;\n\n\tpeek(): T;\n\n\tget value(): T;\n\tset value(value: T);\n}\n\n/** @internal */\nfunction Signal(this: Signal, value?: unknown) {\n\tthis._value = value;\n\tthis._version = 0;\n\tthis._node = undefined;\n\tthis._targets = undefined;\n}\n\nSignal.prototype._refresh = function () {\n\treturn true;\n};\n\nSignal.prototype._subscribe = function (node) {\n\tif (this._targets !== node && node._prevTarget === undefined) {\n\t\tnode._nextTarget = this._targets;\n\t\tif (this._targets !== undefined) {\n\t\t\tthis._targets._prevTarget = node;\n\t\t}\n\t\tthis._targets = node;\n\t}\n};\n\nSignal.prototype._unsubscribe = function (node) {\n\t// Only run the unsubscribe step if the signal has any subscribers to begin with.\n\tif (this._targets !== undefined) {\n\t\tconst prev = node._prevTarget;\n\t\tconst next = node._nextTarget;\n\t\tif (prev !== undefined) {\n\t\t\tprev._nextTarget = next;\n\t\t\tnode._prevTarget = undefined;\n\t\t}\n\t\tif (next !== undefined) {\n\t\t\tnext._prevTarget = prev;\n\t\t\tnode._nextTarget = undefined;\n\t\t}\n\t\tif (node === this._targets) {\n\t\t\tthis._targets = next;\n\t\t}\n\t}\n};\n\nSignal.prototype.subscribe = function (fn) {\n\tconst signal = this;\n\treturn effect(function (this: Effect) {\n\t\tconst value = signal.value;\n\t\tconst flag = this._flags & TRACKING;\n\t\tthis._flags &= ~TRACKING;\n\t\ttry {\n\t\t\tfn(value);\n\t\t} finally {\n\t\t\tthis._flags |= flag;\n\t\t}\n\t});\n};\n\nSignal.prototype.valueOf = function () {\n\treturn this.value;\n};\n\nSignal.prototype.toString = function () {\n\treturn this.value + \"\";\n};\n\nSignal.prototype.peek = function () {\n\treturn this._value;\n};\n\nObject.defineProperty(Signal.prototype, \"value\", {\n\tget() {\n\t\tconst node = addDependency(this);\n\t\tif (node !== undefined) {\n\t\t\tnode._version = this._version;\n\t\t}\n\t\treturn this._value;\n\t},\n\tset(value) {\n\t\tif (value !== this._value) {\n\t\t\tif (batchIteration > 100) {\n\t\t\t\tcycleDetected();\n\t\t\t}\n\n\t\t\tthis._value = value;\n\t\t\tthis._version++;\n\t\t\tglobalVersion++;\n\n\t\t\t/**@__INLINE__*/ startBatch();\n\t\t\ttry {\n\t\t\t\tfor (\n\t\t\t\t\tlet node = this._targets;\n\t\t\t\t\tnode !== undefined;\n\t\t\t\t\tnode = node._nextTarget\n\t\t\t\t) {\n\t\t\t\t\tnode._target._notify();\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tendBatch();\n\t\t\t}\n\t\t}\n\t},\n});\n\nfunction signal(value: T): Signal {\n\treturn new Signal(value);\n}\n\nfunction needsToRecompute(target: Computed | Effect): boolean {\n\t// Check the dependencies for changed values. The dependency list is already\n\t// in order of use. Therefore if multiple dependencies have changed values, only\n\t// the first used dependency is re-evaluated at this point.\n\tfor (\n\t\tlet node = target._sources;\n\t\tnode !== undefined;\n\t\tnode = node._nextSource\n\t) {\n\t\t// If there's a new version of the dependency before or after refreshing,\n\t\t// or the dependency has something blocking it from refreshing at all (e.g. a\n\t\t// dependency cycle), then we need to recompute.\n\t\tif (\n\t\t\tnode._source._version !== node._version ||\n\t\t\t!node._source._refresh() ||\n\t\t\tnode._source._version !== node._version\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\t// If none of the dependencies have changed values since last recompute then\n\t// there's no need to recompute.\n\treturn false;\n}\n\nfunction prepareSources(target: Computed | Effect) {\n\t/**\n\t * 1. Mark all current sources as re-usable nodes (version: -1)\n\t * 2. Set a rollback node if the current node is being used in a different context\n\t * 3. Point 'target._sources' to the tail of the doubly-linked list, e.g:\n\t *\n\t * { undefined <- A <-> B <-> C -> undefined }\n\t * ↑ ↑\n\t * │ └──────┐\n\t * target._sources = A; (node is head) │\n\t * ↓ │\n\t * target._sources = C; (node is tail) ─┘\n\t */\n\tfor (\n\t\tlet node = target._sources;\n\t\tnode !== undefined;\n\t\tnode = node._nextSource\n\t) {\n\t\tconst rollbackNode = node._source._node;\n\t\tif (rollbackNode !== undefined) {\n\t\t\tnode._rollbackNode = rollbackNode;\n\t\t}\n\t\tnode._source._node = node;\n\t\tnode._version = -1;\n\n\t\tif (node._nextSource === undefined) {\n\t\t\ttarget._sources = node;\n\t\t\tbreak;\n\t\t}\n\t}\n}\n\nfunction cleanupSources(target: Computed | Effect) {\n\tlet node = target._sources;\n\tlet head = undefined;\n\n\t/**\n\t * At this point 'target._sources' points to the tail of the doubly-linked list.\n\t * It contains all existing sources + new sources in order of use.\n\t * Iterate backwards until we find the head node while dropping old dependencies.\n\t */\n\twhile (node !== undefined) {\n\t\tconst prev = node._prevSource;\n\n\t\t/**\n\t\t * The node was not re-used, unsubscribe from its change notifications and remove itself\n\t\t * from the doubly-linked list. e.g:\n\t\t *\n\t\t * { A <-> B <-> C }\n\t\t * ↓\n\t\t * { A <-> C }\n\t\t */\n\t\tif (node._version === -1) {\n\t\t\tnode._source._unsubscribe(node);\n\n\t\t\tif (prev !== undefined) {\n\t\t\t\tprev._nextSource = node._nextSource;\n\t\t\t}\n\t\t\tif (node._nextSource !== undefined) {\n\t\t\t\tnode._nextSource._prevSource = prev;\n\t\t\t}\n\t\t} else {\n\t\t\t/**\n\t\t\t * The new head is the last node seen which wasn't removed/unsubscribed\n\t\t\t * from the doubly-linked list. e.g:\n\t\t\t *\n\t\t\t * { A <-> B <-> C }\n\t\t\t * ↑ ↑ ↑\n\t\t\t * │ │ └ head = node\n\t\t\t * │ └ head = node\n\t\t\t * └ head = node\n\t\t\t */\n\t\t\thead = node;\n\t\t}\n\n\t\tnode._source._node = node._rollbackNode;\n\t\tif (node._rollbackNode !== undefined) {\n\t\t\tnode._rollbackNode = undefined;\n\t\t}\n\n\t\tnode = prev;\n\t}\n\n\ttarget._sources = head;\n}\n\ndeclare class Computed extends Signal {\n\t_compute: () => T;\n\t_sources?: Node;\n\t_globalVersion: number;\n\t_flags: number;\n\n\tconstructor(compute: () => T);\n\n\t_notify(): void;\n\tget value(): T;\n}\n\nfunction Computed(this: Computed, compute: () => unknown) {\n\tSignal.call(this, undefined);\n\n\tthis._compute = compute;\n\tthis._sources = undefined;\n\tthis._globalVersion = globalVersion - 1;\n\tthis._flags = OUTDATED;\n}\n\nComputed.prototype = new Signal() as Computed;\n\nComputed.prototype._refresh = function () {\n\tthis._flags &= ~NOTIFIED;\n\n\tif (this._flags & RUNNING) {\n\t\treturn false;\n\t}\n\n\t// If this computed signal has subscribed to updates from its dependencies\n\t// (TRACKING flag set) and none of them have notified about changes (OUTDATED\n\t// flag not set), then the computed value can't have changed.\n\tif ((this._flags & (OUTDATED | TRACKING)) === TRACKING) {\n\t\treturn true;\n\t}\n\tthis._flags &= ~OUTDATED;\n\n\tif (this._globalVersion === globalVersion) {\n\t\treturn true;\n\t}\n\tthis._globalVersion = globalVersion;\n\n\t// Mark this computed signal running before checking the dependencies for value\n\t// changes, so that the RUNNING flag can be used to notice cyclical dependencies.\n\tthis._flags |= RUNNING;\n\tif (this._version > 0 && !needsToRecompute(this)) {\n\t\tthis._flags &= ~RUNNING;\n\t\treturn true;\n\t}\n\n\tconst prevContext = evalContext;\n\ttry {\n\t\tprepareSources(this);\n\t\tevalContext = this;\n\t\tconst value = this._compute();\n\t\tif (\n\t\t\tthis._flags & HAS_ERROR ||\n\t\t\tthis._value !== value ||\n\t\t\tthis._version === 0\n\t\t) {\n\t\t\tthis._value = value;\n\t\t\tthis._flags &= ~HAS_ERROR;\n\t\t\tthis._version++;\n\t\t}\n\t} catch (err) {\n\t\tthis._value = err;\n\t\tthis._flags |= HAS_ERROR;\n\t\tthis._version++;\n\t}\n\tevalContext = prevContext;\n\tcleanupSources(this);\n\tthis._flags &= ~RUNNING;\n\treturn true;\n};\n\nComputed.prototype._subscribe = function (node) {\n\tif (this._targets === undefined) {\n\t\tthis._flags |= OUTDATED | TRACKING;\n\n\t\t// A computed signal subscribes lazily to its dependencies when the it\n\t\t// gets its first subscriber.\n\t\tfor (\n\t\t\tlet node = this._sources;\n\t\t\tnode !== undefined;\n\t\t\tnode = node._nextSource\n\t\t) {\n\t\t\tnode._source._subscribe(node);\n\t\t}\n\t}\n\tSignal.prototype._subscribe.call(this, node);\n};\n\nComputed.prototype._unsubscribe = function (node) {\n\t// Only run the unsubscribe step if the computed signal has any subscribers.\n\tif (this._targets !== undefined) {\n\t\tSignal.prototype._unsubscribe.call(this, node);\n\n\t\t// Computed signal unsubscribes from its dependencies when it loses its last subscriber.\n\t\t// This makes it possible for unreferences subgraphs of computed signals to get garbage collected.\n\t\tif (this._targets === undefined) {\n\t\t\tthis._flags &= ~TRACKING;\n\n\t\t\tfor (\n\t\t\t\tlet node = this._sources;\n\t\t\t\tnode !== undefined;\n\t\t\t\tnode = node._nextSource\n\t\t\t) {\n\t\t\t\tnode._source._unsubscribe(node);\n\t\t\t}\n\t\t}\n\t}\n};\n\nComputed.prototype._notify = function () {\n\tif (!(this._flags & NOTIFIED)) {\n\t\tthis._flags |= OUTDATED | NOTIFIED;\n\n\t\tfor (\n\t\t\tlet node = this._targets;\n\t\t\tnode !== undefined;\n\t\t\tnode = node._nextTarget\n\t\t) {\n\t\t\tnode._target._notify();\n\t\t}\n\t}\n};\n\nComputed.prototype.peek = function () {\n\tif (!this._refresh()) {\n\t\tcycleDetected();\n\t}\n\tif (this._flags & HAS_ERROR) {\n\t\tthrow this._value;\n\t}\n\treturn this._value;\n};\n\nObject.defineProperty(Computed.prototype, \"value\", {\n\tget() {\n\t\tif (this._flags & RUNNING) {\n\t\t\tcycleDetected();\n\t\t}\n\t\tconst node = addDependency(this);\n\t\tthis._refresh();\n\t\tif (node !== undefined) {\n\t\t\tnode._version = this._version;\n\t\t}\n\t\tif (this._flags & HAS_ERROR) {\n\t\t\tthrow this._value;\n\t\t}\n\t\treturn this._value;\n\t},\n});\n\ninterface ReadonlySignal extends Signal {\n\treadonly value: T;\n}\n\nfunction computed(compute: () => T): ReadonlySignal {\n\treturn new Computed(compute);\n}\n\nfunction cleanupEffect(effect: Effect) {\n\tconst cleanup = effect._cleanup;\n\teffect._cleanup = undefined;\n\n\tif (typeof cleanup === \"function\") {\n\t\t/*@__INLINE__**/ startBatch();\n\n\t\t// Run cleanup functions always outside of any context.\n\t\tconst prevContext = evalContext;\n\t\tevalContext = undefined;\n\t\ttry {\n\t\t\tcleanup();\n\t\t} catch (err) {\n\t\t\teffect._flags &= ~RUNNING;\n\t\t\teffect._flags |= DISPOSED;\n\t\t\tdisposeEffect(effect);\n\t\t\tthrow err;\n\t\t} finally {\n\t\t\tevalContext = prevContext;\n\t\t\tendBatch();\n\t\t}\n\t}\n}\n\nfunction disposeEffect(effect: Effect) {\n\tfor (\n\t\tlet node = effect._sources;\n\t\tnode !== undefined;\n\t\tnode = node._nextSource\n\t) {\n\t\tnode._source._unsubscribe(node);\n\t}\n\teffect._compute = undefined;\n\teffect._sources = undefined;\n\n\tcleanupEffect(effect);\n}\n\nfunction endEffect(this: Effect, prevContext?: Computed | Effect) {\n\tif (evalContext !== this) {\n\t\tthrow new Error(\"Out-of-order effect\");\n\t}\n\tcleanupSources(this);\n\tevalContext = prevContext;\n\n\tthis._flags &= ~RUNNING;\n\tif (this._flags & DISPOSED) {\n\t\tdisposeEffect(this);\n\t}\n\tendBatch();\n}\n\ndeclare class Effect {\n\t_compute?: () => unknown;\n\t_cleanup?: unknown;\n\t_sources?: Node;\n\t_nextBatchedEffect?: Effect;\n\t_flags: number;\n\n\tconstructor(compute: () => void);\n\n\t_callback(): void;\n\t_start(): () => void;\n\t_notify(): void;\n\t_dispose(): void;\n}\n\nfunction Effect(this: Effect, compute: () => void) {\n\tthis._compute = compute;\n\tthis._cleanup = undefined;\n\tthis._sources = undefined;\n\tthis._nextBatchedEffect = undefined;\n\tthis._flags = TRACKING;\n}\n\nEffect.prototype._callback = function () {\n\tconst finish = this._start();\n\ttry {\n\t\tif (!(this._flags & DISPOSED) && this._compute !== undefined) {\n\t\t\tthis._cleanup = this._compute();\n\t\t}\n\t} finally {\n\t\tfinish();\n\t}\n};\n\nEffect.prototype._start = function () {\n\tif (this._flags & RUNNING) {\n\t\tcycleDetected();\n\t}\n\tthis._flags |= RUNNING;\n\tthis._flags &= ~DISPOSED;\n\tcleanupEffect(this);\n\tprepareSources(this);\n\n\t/*@__INLINE__**/ startBatch();\n\tconst prevContext = evalContext;\n\tevalContext = this;\n\treturn endEffect.bind(this, prevContext);\n};\n\nEffect.prototype._notify = function () {\n\tif (!(this._flags & NOTIFIED)) {\n\t\tthis._flags |= NOTIFIED;\n\t\tthis._nextBatchedEffect = batchedEffect;\n\t\tbatchedEffect = this;\n\t}\n};\n\nEffect.prototype._dispose = function () {\n\tthis._flags |= DISPOSED;\n\n\tif (!(this._flags & RUNNING)) {\n\t\tdisposeEffect(this);\n\t}\n};\n\nfunction effect(compute: () => unknown): () => void {\n\tconst effect = new Effect(compute);\n\ttry {\n\t\teffect._callback();\n\t} catch (err) {\n\t\teffect._dispose();\n\t\tthrow err;\n\t}\n\t// Return a bound function instead of a wrapper like `() => effect._dispose()`,\n\t// because bound functions seem to be just as fast and take up a lot less memory.\n\treturn effect._dispose.bind(effect);\n}\n\nexport { signal, computed, effect, batch, Signal, ReadonlySignal };\n","import { options, Component } from \"preact\";\nimport { useRef, useMemo, useEffect } from \"preact/hooks\";\nimport {\n\tsignal,\n\tcomputed,\n\tbatch,\n\teffect,\n\tSignal,\n\ttype ReadonlySignal,\n} from \"@preact/signals-core\";\nimport {\n\tVNode,\n\tOptionsTypes,\n\tHookFn,\n\tEffect,\n\tPropertyUpdater,\n\tAugmentedComponent,\n\tAugmentedElement as Element,\n} from \"./internal\";\n\nexport { signal, computed, batch, effect, Signal, type ReadonlySignal };\n\nconst HAS_PENDING_UPDATE = 1 << 0;\nconst HAS_HOOK_STATE = 1 << 1;\nconst HAS_COMPUTEDS = 1 << 2;\n\n// Install a Preact options hook\nfunction hook(hookName: T, hookFn: HookFn) {\n\t// @ts-ignore-next-line private options hooks usage\n\toptions[hookName] = hookFn.bind(null, options[hookName] || (() => {}));\n}\n\nlet currentComponent: AugmentedComponent | undefined;\nlet finishUpdate: (() => void) | undefined;\n\nfunction setCurrentUpdater(updater?: Effect) {\n\t// end tracking for the current update:\n\tif (finishUpdate) finishUpdate();\n\t// start tracking the new update:\n\tfinishUpdate = updater && updater._start();\n}\n\nfunction createUpdater(update: () => void) {\n\tlet updater!: Effect;\n\teffect(function (this: Effect) {\n\t\tupdater = this;\n\t});\n\tupdater._callback = update;\n\treturn updater;\n}\n\n/** @todo This may be needed for complex prop value detection. */\n// function isSignalValue(value: any): value is Signal {\n// \tif (typeof value !== \"object\" || value == null) return false;\n// \tif (value instanceof Signal) return true;\n// \t// @TODO: uncomment this when we land Reactive (ideally behind a brand check)\n// \t// for (let i in value) if (value[i] instanceof Signal) return true;\n// \treturn false;\n// }\n\n/**\n * A wrapper component that renders a Signal directly as a Text node.\n * @todo: in Preact 11, just decorate Signal with `type:null`\n */\nfunction Text(this: AugmentedComponent, { data }: { data: Signal }) {\n\t// hasComputeds.add(this);\n\n\t// Store the props.data signal in another signal so that\n\t// passing a new signal reference re-runs the text computed:\n\tconst currentSignal = useSignal(data);\n\tcurrentSignal.value = data;\n\n\tconst s = useMemo(() => {\n\t\t// mark the parent component as having computeds so it gets optimized\n\t\tlet v = this.__v;\n\t\twhile ((v = v.__!)) {\n\t\t\tif (v.__c) {\n\t\t\t\tv.__c._updateFlags |= HAS_COMPUTEDS;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Replace this component's vdom updater with a direct text one:\n\t\tthis._updater!._callback = () => {\n\t\t\t(this.base as Text).data = s.peek();\n\t\t};\n\n\t\treturn computed(() => {\n\t\t\tlet data = currentSignal.value;\n\t\t\tlet s = data.value;\n\t\t\treturn s === 0 ? 0 : s === true ? \"\" : s || \"\";\n\t\t});\n\t}, []);\n\n\treturn s.value;\n}\nText.displayName = \"_st\";\n\nObject.defineProperties(Signal.prototype, {\n\tconstructor: { configurable: true, value: undefined },\n\ttype: { configurable: true, value: Text },\n\tprops: {\n\t\tconfigurable: true,\n\t\tget() {\n\t\t\treturn { data: this };\n\t\t},\n\t},\n\t// Setting a VNode's _depth to 1 forces Preact to clone it before modifying:\n\t// https://github.com/preactjs/preact/blob/d7a433ee8463a7dc23a05111bb47de9ec729ad4d/src/diff/children.js#L77\n\t// @todo remove this for Preact 11\n\t__b: { configurable: true, value: 1 },\n});\n\n/** Inject low-level property/attribute bindings for Signals into Preact's diff */\nhook(OptionsTypes.DIFF, (old, vnode) => {\n\tif (typeof vnode.type === \"string\") {\n\t\tlet signalProps: Record | undefined;\n\n\t\tlet props = vnode.props;\n\t\tfor (let i in props) {\n\t\t\tif (i === \"children\") continue;\n\n\t\t\tlet value = props[i];\n\t\t\tif (value instanceof Signal) {\n\t\t\t\tif (!signalProps) vnode.__np = signalProps = {};\n\t\t\t\tsignalProps[i] = value;\n\t\t\t\tprops[i] = value.peek();\n\t\t\t}\n\t\t}\n\t}\n\n\told(vnode);\n});\n\n/** Set up Updater before rendering a component */\nhook(OptionsTypes.RENDER, (old, vnode) => {\n\tsetCurrentUpdater();\n\n\tlet updater;\n\n\tlet component = vnode.__c;\n\tif (component) {\n\t\tcomponent._updateFlags &= ~HAS_PENDING_UPDATE;\n\n\t\tupdater = component._updater;\n\t\tif (updater === undefined) {\n\t\t\tcomponent._updater = updater = createUpdater(() => {\n\t\t\t\tcomponent._updateFlags |= HAS_PENDING_UPDATE;\n\t\t\t\tcomponent.setState({});\n\t\t\t});\n\t\t}\n\t}\n\n\tcurrentComponent = component;\n\tsetCurrentUpdater(updater);\n\told(vnode);\n});\n\n/** Finish current updater if a component errors */\nhook(OptionsTypes.CATCH_ERROR, (old, error, vnode, oldVNode) => {\n\tsetCurrentUpdater();\n\tcurrentComponent = undefined;\n\told(error, vnode, oldVNode);\n});\n\n/** Finish current updater after rendering any VNode */\nhook(OptionsTypes.DIFFED, (old, vnode) => {\n\tsetCurrentUpdater();\n\tcurrentComponent = undefined;\n\n\tlet dom: Element;\n\n\t// vnode._dom is undefined during string rendering,\n\t// so we use this to skip prop subscriptions during SSR.\n\tif (typeof vnode.type === \"string\" && (dom = vnode.__e as Element)) {\n\t\tlet props = vnode.__np;\n\t\tlet renderedProps = vnode.props;\n\t\tif (props) {\n\t\t\tlet updaters = dom._updaters;\n\t\t\tif (updaters) {\n\t\t\t\tfor (let prop in updaters) {\n\t\t\t\t\tlet updater = updaters[prop];\n\t\t\t\t\tif (updater !== undefined && !(prop in props)) {\n\t\t\t\t\t\tupdater._dispose();\n\t\t\t\t\t\t// @todo we could just always invoke _dispose() here\n\t\t\t\t\t\tupdaters[prop] = undefined;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tupdaters = {};\n\t\t\t\tdom._updaters = updaters;\n\t\t\t}\n\t\t\tfor (let prop in props) {\n\t\t\t\tlet updater = updaters[prop];\n\t\t\t\tlet signal = props[prop];\n\t\t\t\tif (updater === undefined) {\n\t\t\t\t\tupdater = createPropUpdater(dom, prop, signal, renderedProps);\n\t\t\t\t\tupdaters[prop] = updater;\n\t\t\t\t} else {\n\t\t\t\t\tupdater._update(signal, renderedProps);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\told(vnode);\n});\n\nfunction createPropUpdater(\n\tdom: Element,\n\tprop: string,\n\tpropSignal: Signal,\n\tprops: Record\n): PropertyUpdater {\n\tconst setAsProperty =\n\t\tprop in dom &&\n\t\t// SVG elements need to go through `setAttribute` because they\n\t\t// expect things like SVGAnimatedTransformList instead of strings.\n\t\t// @ts-ignore\n\t\tdom.ownerSVGElement === undefined;\n\n\tconst changeSignal = signal(propSignal);\n\treturn {\n\t\t_update: (newSignal: Signal, newProps: typeof props) => {\n\t\t\tchangeSignal.value = newSignal;\n\t\t\tprops = newProps;\n\t\t},\n\t\t_dispose: effect(() => {\n\t\t\tconst value = changeSignal.value.value;\n\t\t\t// If Preact just rendered this value, don't render it again:\n\t\t\tif (props[prop] === value) return;\n\t\t\tprops[prop] = value;\n\t\t\tif (setAsProperty) {\n\t\t\t\t// @ts-ignore-next-line silly\n\t\t\t\tdom[prop] = value;\n\t\t\t} else if (value) {\n\t\t\t\tdom.setAttribute(prop, value);\n\t\t\t} else {\n\t\t\t\tdom.removeAttribute(prop);\n\t\t\t}\n\t\t}),\n\t};\n}\n\n/** Unsubscribe from Signals when unmounting components/vnodes */\nhook(OptionsTypes.UNMOUNT, (old, vnode: VNode) => {\n\tif (typeof vnode.type === \"string\") {\n\t\tlet dom = vnode.__e as Element | undefined;\n\t\t// vnode._dom is undefined during string rendering\n\t\tif (dom) {\n\t\t\tconst updaters = dom._updaters;\n\t\t\tif (updaters) {\n\t\t\t\tdom._updaters = undefined;\n\t\t\t\tfor (let prop in updaters) {\n\t\t\t\t\tlet updater = updaters[prop];\n\t\t\t\t\tif (updater) updater._dispose();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\tlet component = vnode.__c;\n\t\tif (component) {\n\t\t\tconst updater = component._updater;\n\t\t\tif (updater) {\n\t\t\t\tcomponent._updater = undefined;\n\t\t\t\tupdater._dispose();\n\t\t\t}\n\t\t}\n\t}\n\told(vnode);\n});\n\n/** Mark components that use hook state so we can skip sCU optimization. */\nhook(OptionsTypes.HOOK, (old, component, index, type) => {\n\tif (type < 3)\n\t\t(component as AugmentedComponent)._updateFlags |= HAS_HOOK_STATE;\n\told(component, index, type);\n});\n\n/**\n * Auto-memoize components that use Signals/Computeds.\n * Note: Does _not_ optimize components that use hook/class state.\n */\nComponent.prototype.shouldComponentUpdate = function (\n\tthis: AugmentedComponent,\n\tprops,\n\tstate\n) {\n\t// @todo: Once preactjs/preact#3671 lands, this could just use `currentUpdater`:\n\tconst updater = this._updater;\n\tconst hasSignals = updater && updater._sources !== undefined;\n\n\t// let reason;\n\t// if (!hasSignals && !hasComputeds.has(this)) {\n\t// \treason = \"no signals or computeds\";\n\t// } else if (hasPendingUpdate.has(this)) {\n\t// \treason = \"has pending update\";\n\t// } else if (hasHookState.has(this)) {\n\t// \treason = \"has hook state\";\n\t// }\n\t// if (reason) {\n\t// \tif (!this) reason += \" (`this` bug)\";\n\t// \tconsole.log(\"not optimizing\", this?.constructor?.name, \": \", reason, {\n\t// \t\tdetails: {\n\t// \t\t\thasSignals,\n\t// \t\t\thasComputeds: hasComputeds.has(this),\n\t// \t\t\thasPendingUpdate: hasPendingUpdate.has(this),\n\t// \t\t\thasHookState: hasHookState.has(this),\n\t// \t\t\tdeps: Array.from(updater._deps),\n\t// \t\t\tupdater,\n\t// \t\t},\n\t// \t});\n\t// }\n\n\t// if this component used no signals or computeds, update:\n\tif (!hasSignals && !(this._updateFlags & HAS_COMPUTEDS)) return true;\n\n\t// if there is a pending re-render triggered from Signals,\n\t// or if there is hook or class state, update:\n\tif (this._updateFlags & (HAS_PENDING_UPDATE | HAS_HOOK_STATE)) return true;\n\n\t// @ts-ignore\n\tfor (let i in state) return true;\n\n\t// if any non-Signal props changed, update:\n\tfor (let i in props) {\n\t\tif (i !== \"__source\" && props[i] !== this.props[i]) return true;\n\t}\n\tfor (let i in this.props) if (!(i in props)) return true;\n\n\t// this is a purely Signal-driven component, don't update:\n\treturn false;\n};\n\nexport function useSignal(value: T) {\n\treturn useMemo(() => signal(value), []);\n}\n\nexport function useComputed(compute: () => T) {\n\tconst $compute = useRef(compute);\n\t$compute.current = compute;\n\t(currentComponent as AugmentedComponent)._updateFlags |= HAS_COMPUTEDS;\n\treturn useMemo(() => computed(() => $compute.current()), []);\n}\n\nexport function useSignalEffect(cb: () => void | (() => void)) {\n\tconst callback = useRef(cb);\n\tcallback.current = cb;\n\n\tuseEffect(() => {\n\t\treturn effect(() => callback.current());\n\t}, []);\n}\n\n/**\n * @todo Determine which Reactive implementation we'll be using.\n * @internal\n */\n// export function useReactive(value: T): Reactive {\n// \treturn useMemo(() => reactive(value), []);\n// }\n\n/**\n * @internal\n * Update a Reactive's using the properties of an object or other Reactive.\n * Also works for Signals.\n * @example\n * // Update a Reactive with Object.assign()-like syntax:\n * const r = reactive({ name: \"Alice\" });\n * update(r, { name: \"Bob\" });\n * update(r, { age: 42 }); // property 'age' does not exist in type '{ name?: string }'\n * update(r, 2); // '2' has no properties in common with '{ name?: string }'\n * console.log(r.name.value); // \"Bob\"\n *\n * @example\n * // Update a Reactive with the properties of another Reactive:\n * const A = reactive({ name: \"Alice\" });\n * const B = reactive({ name: \"Bob\", age: 42 });\n * update(A, B);\n * console.log(`${A.name} is ${A.age}`); // \"Bob is 42\"\n *\n * @example\n * // Update a signal with assign()-like syntax:\n * const s = signal(42);\n * update(s, \"hi\"); // Argument type 'string' not assignable to type 'number'\n * update(s, {}); // Argument type '{}' not assignable to type 'number'\n * update(s, 43);\n * console.log(s.value); // 43\n *\n * @param obj The Reactive or Signal to be updated\n * @param update The value, Signal, object or Reactive to update `obj` to match\n * @param overwrite If `true`, any properties `obj` missing from `update` are set to `undefined`\n */\n/*\nexport function update(\n\tobj: T,\n\tupdate: Partial>,\n\toverwrite = false\n) {\n\tif (obj instanceof Signal) {\n\t\tobj.value = peekValue(update);\n\t} else {\n\t\tfor (let i in update) {\n\t\t\tif (i in obj) {\n\t\t\t\tobj[i].value = peekValue(update[i]);\n\t\t\t} else {\n\t\t\t\tlet sig = signal(peekValue(update[i]));\n\t\t\t\tsig[KEY] = i;\n\t\t\t\tobj[i] = sig;\n\t\t\t}\n\t\t}\n\t\tif (overwrite) {\n\t\t\tfor (let i in obj) {\n\t\t\t\tif (!(i in update)) {\n\t\t\t\t\tobj[i].value = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n*/\n","/**\n * This method converts the hierarchical command list into a flat list of commands which is more convenient\n * for internal processing, whereas the hierarchical command list is more convenient for the user.\n */\nexport default function flattenCommands(\n commands: HierarchicalCommandList,\n parentId: CommandId = null\n): FlatCommandList {\n return Object.keys(commands).reduce((commandList, commandId) => {\n const {\n icon,\n description,\n name,\n subCommands,\n action,\n canHandleQueries,\n closeOnExecute,\n category,\n executeManually,\n } = commands[commandId] as Command & CommandGroup;\n\n // Create an uniquely identifiable command id for the flat command list\n const absoluteCommandId = parentId ? `${parentId}.${commandId}` : commandId;\n\n // Create list of available subcommand names\n const subCommandIds = subCommands\n ? Object.keys(subCommands).map((subCommandId) => `${absoluteCommandId}.${subCommandId}`)\n : [];\n\n // Insert the processed command into the flat command list\n commandList[absoluteCommandId] = {\n id: absoluteCommandId,\n name,\n icon,\n description,\n action,\n canHandleQueries,\n subCommandIds,\n parentId,\n closeOnExecute,\n category,\n executeManually,\n };\n\n // Insert subcommands into the list\n if (subCommandIds.length > 0) {\n return {\n ...commandList,\n ...flattenCommands(subCommands, absoluteCommandId),\n };\n }\n return commandList;\n }, {} as FlatCommandList);\n}\n","const PREFIX = '%c[COMMANDBAR]';\n\nconst logger = {\n ok: (message: string, ...args: any[]) => console.log(PREFIX, 'color: green', message, ...args),\n error: (message: string, ...args: any[]) => console.log(PREFIX, 'color: red', message, ...args),\n warn: (message: string, ...args: any[]) => console.warn(PREFIX, 'color: orange', message, ...args),\n debug:\n // @ts-ignore\n process.env.NODE_ENV === 'production'\n ? () => null\n : (message: string, ...args: any[]) => console.debug(PREFIX, 'color: lightblue', message, ...args),\n};\n\nexport default logger;\n","export default function clamp(value: number, min: number, max: number): number {\n return Math.max(min, Math.min(max, value));\n}\n","/**\n* Copyright (c) 2023, Leon Sorokin\n* All rights reserved. (MIT Licensed)\n*\n* uFuzzy.js (μFuzzy)\n* A tiny, efficient fuzzy matcher that doesn't suck\n* https://github.com/leeoniya/uFuzzy (v1.0.3)\n*/\n\nconst cmp = new Intl.Collator('en').compare;\n\nconst inf = Infinity;\n\nconst NEGS_RE = /(?:\\s+|^)-[a-z\\d]+/ig;\n\nconst OPTS = {\n\t// term segmentation & punct/whitespace merging\n\tinterSplit: \"[^A-Za-z0-9']+\",\n\tintraSplit: '[a-z][A-Z]',\n\n\t// intra bounds that will be used to increase lft1/rgt1 info counters\n\tintraBound: '[A-Za-z][0-9]|[0-9][A-Za-z]|[a-z][A-Z]',\n\n\t// inter-bounds mode\n\t// 2 = strict (will only match 'man' on whitepace and punct boundaries: Mega Man, Mega_Man, mega.man)\n\t// 1 = loose (plus allowance for alpha-num and case-change boundaries: MegaMan, 0007man)\n\t// 0 = any (will match 'man' as any substring: megamaniac)\n\tinterLft: 0,\n\tinterRgt: 0,\n\n\t// allowance between terms\n\tinterChars: '.',\n\tinterIns: inf,\n\n\t// allowance between chars in terms\n\tintraChars: \"[a-z\\\\d']\", // internally case-insensitive\n\tintraIns: 0,\n\n\tintraContr: \"'[a-z]{1,2}\\\\b\",\n\n\t// multi-insert or single-error mode\n\tintraMode: 0,\n\n\t// single-error bounds for errors within terms, default requires exact first char\n\tintraSlice: [1, inf],\n\n\t// single-error tolerance toggles\n\tintraSub: 0,\n\tintraTrn: 0,\n\tintraDel: 0,\n\n\t// can post-filter matches that are too far apart in distance or length\n\t// (since intraIns is between each char, it can accum to nonsense matches)\n\tintraFilt: (term, match, index) => true, // should this also accept WIP info?\n\n\t// final sorting fn\n\tsort: (info, haystack, needle) => {\n\t\tlet {\n\t\t\tidx,\n\t\t\tchars,\n\t\t\tterms,\n\t\t\tinterLft2,\n\t\t\tinterLft1,\n\t\t//\tinterRgt2,\n\t\t//\tinterRgt1,\n\t\t\tstart,\n\t\t\tintraIns,\n\t\t\tinterIns,\n\t\t} = info;\n\n\t\treturn idx.map((v, i) => i).sort((ia, ib) => (\n\t\t\t// most contig chars matched\n\t\t\tchars[ib] - chars[ia] ||\n\t\t\t// least char intra-fuzz (most contiguous)\n\t\t\tintraIns[ia] - intraIns[ib] ||\n\t\t\t// most prefix bounds, boosted by full term matches\n\t\t\t(\n\t\t\t\t(terms[ib] + interLft2[ib] + 0.5 * interLft1[ib]) -\n\t\t\t\t(terms[ia] + interLft2[ia] + 0.5 * interLft1[ia])\n\t\t\t) ||\n\t\t\t// highest density of match (least span)\n\t\t//\tspan[ia] - span[ib] ||\n\t\t\t// highest density of match (least term inter-fuzz)\n\t\t\tinterIns[ia] - interIns[ib] ||\n\t\t\t// earliest start of match\n\t\t\tstart[ia] - start[ib] ||\n\t\t\t// alphabetic\n\t\t\tcmp(haystack[idx[ia]], haystack[idx[ib]])\n\t\t));\n\t},\n};\n\nconst lazyRepeat = (chars, limit) => (\n\tlimit == 0 ? '' :\n\tlimit == 1 ? chars + '??' :\n\tlimit == inf ? chars + '*?' :\n\t chars + `{0,${limit}}?`\n);\n\nconst mode2Tpl = '(?:\\\\b|_)';\n\nfunction uFuzzy(opts) {\n\topts = Object.assign({}, OPTS, opts);\n\n\tconst {\n\t\tinterLft,\n\t\tinterRgt,\n\t\tintraMode,\n\t\tintraSlice,\n\t\tintraIns,\n\t\tintraSub,\n\t\tintraTrn,\n\t\tintraDel,\n\t\tintraContr,\n\t\tintraSplit: _intraSplit,\n\t\tinterSplit: _interSplit,\n\t\tintraBound: _intraBound,\n\t\tintraChars,\n\t} = opts;\n\n\tlet { intraRules } = opts;\n\n\tif (intraRules == null) {\n\t\tintraRules = p => {\n\t\t\t// default is exact term matches only\n\t\t\tlet _intraSlice = OPTS.intraSlice, // requires first char\n\t\t\t\t_intraIns = 0,\n\t\t\t\t_intraSub = 0,\n\t\t\t\t_intraTrn = 0,\n\t\t\t\t_intraDel = 0;\n\n\t\t\tlet plen = p.length;\n\n\t\t\t// prevent junk matches by requiring stricter rules for short terms\n\t\t\tif (plen <= 4) {\n\t\t\t\tif (plen >= 3) {\n\t\t\t\t\t// one swap in non-first char when 3-4 chars\n\t\t\t\t\t_intraTrn = Math.min(intraTrn, 1);\n\n\t\t\t\t\t// or one insertion when 4 chars\n\t\t\t\t\tif (plen == 4)\n\t\t\t\t\t\t_intraIns = Math.min(intraIns, 1);\n\t\t\t\t}\n\t\t\t\t// else exact match when 1-2 chars\n\t\t\t}\n\t\t\t// use supplied opts\n\t\t\telse {\n\t\t\t\t_intraSlice = intraSlice;\n\t\t\t\t_intraIns = intraIns,\n\t\t\t\t_intraSub = intraSub,\n\t\t\t\t_intraTrn = intraTrn,\n\t\t\t\t_intraDel = intraDel;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tintraSlice: _intraSlice,\n\t\t\t\tintraIns: _intraIns,\n\t\t\t\tintraSub: _intraSub,\n\t\t\t\tintraTrn: _intraTrn,\n\t\t\t\tintraDel: _intraDel,\n\t\t\t};\n\t\t};\n\t}\n\n\tlet withIntraSplit = !!_intraSplit;\n\n\tlet intraSplit = new RegExp(_intraSplit, 'g');\n\tlet interSplit = new RegExp(_interSplit, 'g');\n\n\tlet trimRe = new RegExp('^' + _interSplit + '|' + _interSplit + '$', 'g');\n\tlet contrsRe = new RegExp(intraContr, 'gi');\n\n\tconst split = needle => {\n\t\tneedle = needle.replace(trimRe, '').toLowerCase();\n\n\t\tif (withIntraSplit)\n\t\t\tneedle = needle.replace(intraSplit, m => m[0] + ' ' + m[1]);\n\n\t\treturn needle.split(interSplit).filter(t => t != '');\n\t};\n\n\tconst prepQuery = (needle, capt = 0, interOR = false) => {\n\t\t// split on punct, whitespace, num-alpha, and upper-lower boundaries\n\t\tlet parts = split(needle);\n\n\t\tif (parts.length == 0)\n\t\t\tthrow `Empty needle!`;\n\n\t\t// split out any detected contractions for each term that become required suffixes\n\t\tlet contrs = Array(parts.length).fill('');\n\t\tparts = parts.map((p, pi) => p.replace(contrsRe, m => {\n\t\t\tcontrs[pi] = m;\n\t\t\treturn '';\n\t\t}));\n\n\t\t// array of regexp tpls for each term\n\t\tlet reTpl;\n\n\t\t// allows single mutations within each term\n\t\tif (intraMode == 1) {\n\t\t\treTpl = parts.map((p, pi) => {\n\t\t\t\tlet {\n\t\t\t\t\tintraSlice,\n\t\t\t\t\tintraIns,\n\t\t\t\t\tintraSub,\n\t\t\t\t\tintraTrn,\n\t\t\t\t\tintraDel,\n\t\t\t\t} = intraRules(p);\n\n\t\t\t\tif (intraIns + intraSub + intraTrn + intraDel == 0)\n\t\t\t\t\treturn p + contrs[pi];\n\n\t\t\t\tlet [lftIdx, rgtIdx] = intraSlice;\n\t\t\t\tlet lftChar = p.slice(0, lftIdx); // prefix\n\t\t\t\tlet rgtChar = p.slice(rgtIdx); // suffix\n\n\t\t\t\tlet chars = p.slice(lftIdx, rgtIdx);\n\n\t\t\t\t// neg lookahead to prefer matching 'Test' instead of 'tTest' in ManifestTest or fittest\n\t\t\t\t// but skip when search term contains leading repetition (aardvark, aaa)\n\t\t\t\tif (intraIns == 1 && lftChar.length == 1 && lftChar != chars[0])\n\t\t\t\t\tlftChar += '(?!' + lftChar + ')';\n\n\t\t\t\tlet numChars = chars.length;\n\n\t\t\t\tlet variants = [];\n\n\t\t\t\t// variants with single char substitutions\n\t\t\t\tif (intraSub) {\n\t\t\t\t\tfor (let i = 0; i < numChars; i++)\n\t\t\t\t\t\tvariants.push(lftChar + chars.slice(0, i) + intraChars + chars.slice(i + 1) + rgtChar);\n\t\t\t\t}\n\n\t\t\t\t// variants with single transpositions\n\t\t\t\tif (intraTrn) {\n\t\t\t\t\tfor (let i = 0; i < numChars - 1; i++) {\n\t\t\t\t\t\tif (chars[i] != chars[i+1])\n\t\t\t\t\t\t\tvariants.push(lftChar + chars.slice(0, i) + chars[i+1] + chars[i] + chars.slice(i + 2) + rgtChar);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// variants with single char omissions\n\t\t\t\tif (intraDel) {\n\t\t\t\t\tfor (let i = 0; i < numChars; i++)\n\t\t\t\t\t\tvariants.push(lftChar + chars.slice(0, i + 1) + '?' + chars.slice(i + 1) + rgtChar);\n\t\t\t\t}\n\n\t\t\t\t// variants with single char insertions\n\t\t\t\tif (intraIns) {\n\t\t\t\t\tlet intraInsTpl = lazyRepeat(intraChars, 1);\n\n\t\t\t\t\tfor (let i = 0; i < numChars; i++)\n\t\t\t\t\t\tvariants.push(lftChar + chars.slice(0, i) + intraInsTpl + chars.slice(i) + rgtChar);\n\t\t\t\t}\n\n\t\t\t\tlet reTpl = '(?:' + p + '|' + variants.join('|') + ')' + contrs[pi];\n\n\t\t\t//\tconsole.log(reTpl);\n\n\t\t\t\treturn reTpl;\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tlet intraInsTpl = lazyRepeat(intraChars, intraIns);\n\n\t\t\t// capture at char level\n\t\t\tif (capt == 2 && intraIns > 0) {\n\t\t\t\t// sadly, we also have to capture the inter-term junk via parenth-wrapping .*?\n\t\t\t\t// to accum other capture groups' indices for \\b boosting during scoring\n\t\t\t\tintraInsTpl = ')(' + intraInsTpl + ')(';\n\t\t\t}\n\n\t\t\treTpl = parts.map((p, pi) => p.split('').map((c, i, chars) => {\n\t\t\t\t// neg lookahead to prefer matching 'Test' instead of 'tTest' in ManifestTest or fittest\n\t\t\t\t// but skip when search term contains leading repetition (aardvark, aaa)\n\t\t\t\tif (intraIns == 1 && i == 0 && chars.length > 1 && c[i] != c[i+1])\n\t\t\t\t\tc += '(?!' + c + ')';\n\n\t\t\t\treturn c;\n\t\t\t}).join(intraInsTpl) + contrs[pi]);\n\t\t}\n\n\t//\tconsole.log(reTpl);\n\n\t\t// this only helps to reduce initial matches early when they can be detected\n\t\t// TODO: might want a mode 3 that excludes _\n\t\tlet preTpl = interLft == 2 ? mode2Tpl : '';\n\t\tlet sufTpl = interRgt == 2 ? mode2Tpl : '';\n\n\t\tlet interCharsTpl = sufTpl + lazyRepeat(opts.interChars, opts.interIns) + preTpl;\n\n\t\t// capture at word level\n\t\tif (capt > 0) {\n\t\t\tif (interOR) {\n\t\t\t\t// this is basically for doing .matchAll() occurence counting and highlighting without needing permuted ooo needles\n\t\t\t\treTpl = preTpl + '(' + reTpl.join(')' + sufTpl + '|' + preTpl + '(') + ')' + sufTpl;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// sadly, we also have to capture the inter-term junk via parenth-wrapping .*?\n\t\t\t\t// to accum other capture groups' indices for \\b boosting during scoring\n\t\t\t\treTpl = '(' + reTpl.join(')(' + interCharsTpl + ')(') + ')';\n\t\t\t\treTpl = '(.?' + preTpl + ')' + reTpl + '(' + sufTpl + '.*)'; // nit: trailing capture here assumes interIns = Inf\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treTpl = reTpl.join(interCharsTpl);\n\t\t\treTpl = preTpl + reTpl + sufTpl;\n\t\t}\n\n\t//\tconsole.log(reTpl);\n\n\t\treturn [new RegExp(reTpl, 'i'), parts, contrs];\n\t};\n\n\tconst filter = (haystack, needle, idxs) => {\n\n\t\tlet out = [];\n\t\tlet [query] = prepQuery(needle);\n\n\t\tif (idxs != null) {\n\t\t\tfor (let i = 0; i < idxs.length; i++) {\n\t\t\t\tlet idx = idxs[i];\n\t\t\t\tquery.test(haystack[idx]) && out.push(idx);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor (let i = 0; i < haystack.length; i++)\n\t\t\t\tquery.test(haystack[i]) && out.push(i);\n\t\t}\n\n\t\treturn out;\n\t};\n\n\tlet withIntraBound = !!_intraBound;\n\n\tlet interBound = new RegExp(_interSplit);\n\tlet intraBound = new RegExp(_intraBound);\n\n\tconst info = (idxs, haystack, needle) => {\n\n\t\tlet [query, parts, contrs] = prepQuery(needle, 1);\n\t\tlet [queryR] = prepQuery(needle, 2);\n\t\tlet partsLen = parts.length;\n\n\t\tlet len = idxs.length;\n\n\t\tlet field = Array(len).fill(0);\n\n\t\tlet info = {\n\t\t\t// idx in haystack\n\t\t\tidx: Array(len),\n\n\t\t\t// start of match\n\t\t\tstart: field.slice(),\n\t\t\t// length of match\n\t\t//\tspan: field.slice(),\n\n\t\t\t// contiguous chars matched\n\t\t\tchars: field.slice(),\n\n\t\t\t// contiguous (no fuzz) and bounded terms (intra=0, lft2/1, rgt2/1)\n\t\t\t// excludes terms that are contiguous but have < 2 bounds (substrings)\n\t\t\tterms: field.slice(),\n\n\t\t\t// cumulative length of unmatched chars (fuzz) within span\n\t\t\tinterIns: field.slice(), // between terms\n\t\t\tintraIns: field.slice(), // within terms\n\n\t\t\t// interLft/interRgt counters\n\t\t\tinterLft2: field.slice(),\n\t\t\tinterRgt2: field.slice(),\n\t\t\tinterLft1: field.slice(),\n\t\t\tinterRgt1: field.slice(),\n\n\t\t\tranges: Array(len),\n\t\t};\n\n\t\t// might discard idxs based on bounds checks\n\t\tlet mayDiscard = interLft == 1 || interRgt == 1;\n\n\t\tlet ii = 0;\n\n\t\tfor (let i = 0; i < idxs.length; i++) {\n\t\t\tlet mhstr = haystack[idxs[i]];\n\n\t\t\t// the matched parts are [full, junk, term, junk, term, junk]\n\t\t\tlet m = mhstr.match(query);\n\n\t\t\t// leading junk\n\t\t\tlet start = m.index + m[1].length;\n\n\t\t\tlet idxAcc = start;\n\t\t//\tlet span = m[0].length;\n\n\t\t\tlet disc = false;\n\t\t\tlet lft2 = 0;\n\t\t\tlet lft1 = 0;\n\t\t\tlet rgt2 = 0;\n\t\t\tlet rgt1 = 0;\n\t\t\tlet chars = 0;\n\t\t\tlet terms = 0;\n\t\t\tlet inter = 0;\n\t\t\tlet intra = 0;\n\n\t\t\tlet refine = [];\n\n\t\t\tfor (let j = 0, k = 2; j < partsLen; j++, k+=2) {\n\t\t\t\tlet group = m[k].toLowerCase();\n\t\t\t\tlet term = parts[j] + contrs[j];\n\t\t\t\tlet termLen = term.length;\n\t\t\t\tlet groupLen = group.length;\n\t\t\t\tlet fullMatch = group == term;\n\n\t\t\t\t// this won't handle the case when an exact match exists across the boundary of the current group and the next junk\n\t\t\t\t// e.g. blob,ob when searching for 'bob' but finding the earlier `blob` (with extra insertion)\n\t\t\t\tif (!fullMatch && m[k+1].length >= termLen) {\n\t\t\t\t\t// probe for exact match in inter junk\n\t\t\t\t\tlet idxOf = m[k+1].toLowerCase().indexOf(term);\n\n\t\t\t\t\tif (idxOf > -1) {\n\t\t\t\t\t\trefine.push(idxAcc, idxOf, termLen);\n\t\t\t\t\t\tidxAcc += refineMatch(m, k, idxOf, termLen);\n\t\t\t\t\t\tgroup = term;\n\t\t\t\t\t\tgroupLen = termLen;\n\t\t\t\t\t\tfullMatch = true;\n\n\t\t\t\t\t\tif (j == 0)\n\t\t\t\t\t\t\tstart = idxAcc;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (mayDiscard || fullMatch) {\n\t\t\t\t\t// does group's left and/or right land on \\b\n\t\t\t\t\tlet lftCharIdx = idxAcc - 1;\n\t\t\t\t\tlet rgtCharIdx = idxAcc + groupLen;\n\n\t\t\t\t\tlet isPre = true;\n\t\t\t\t\tlet isSuf = true;\n\n\t\t\t\t\t// prefix info\n\t\t\t\t\tif (lftCharIdx == -1 || interBound.test(mhstr[lftCharIdx]))\n\t\t\t\t\t\tfullMatch && lft2++;\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (interLft == 2) {\n\t\t\t\t\t\t\tdisc = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (withIntraBound && intraBound.test(mhstr[lftCharIdx] + mhstr[lftCharIdx + 1]))\n\t\t\t\t\t\t\tfullMatch && lft1++;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (interLft == 1) {\n\t\t\t\t\t\t\t\t// regexps are eager, so try to improve the match by probing forward inter junk for exact match at a boundary\n\t\t\t\t\t\t\t\tlet junk = m[k+1];\n\t\t\t\t\t\t\t\tlet junkIdx = idxAcc + groupLen;\n\n\t\t\t\t\t\t\t\tif (junk.length >= termLen) {\n\t\t\t\t\t\t\t\t\tlet idxOf = 0;\n\t\t\t\t\t\t\t\t\tlet found = false;\n\t\t\t\t\t\t\t\t\tlet re = new RegExp(term, 'ig');\n\n\t\t\t\t\t\t\t\t\tlet m2;\n\t\t\t\t\t\t\t\t\twhile (m2 = re.exec(junk)) {\n\t\t\t\t\t\t\t\t\t\tidxOf = m2.index;\n\n\t\t\t\t\t\t\t\t\t\tlet charIdx = junkIdx + idxOf;\n\t\t\t\t\t\t\t\t\t\tlet lftCharIdx = charIdx - 1;\n\n\n\t\t\t\t\t\t\t\t\t\tif (lftCharIdx == -1 || interBound.test(mhstr[lftCharIdx])) {\n\t\t\t\t\t\t\t\t\t\t\tlft2++;\n\t\t\t\t\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (intraBound.test(mhstr[lftCharIdx] + mhstr[charIdx])) {\n\t\t\t\t\t\t\t\t\t\t\tlft1++;\n\t\t\t\t\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (found) {\n\t\t\t\t\t\t\t\t\t\t// identical to exact term refinement pass above\n\t\t\t\t\t\t\t\t\t\trefine.push(idxAcc, idxOf, termLen);\n\t\t\t\t\t\t\t\t\t\tidxAcc += refineMatch(m, k, idxOf, termLen);\n\t\t\t\t\t\t\t\t\t\tgroup = term;\n\t\t\t\t\t\t\t\t\t\tgroupLen = termLen;\n\t\t\t\t\t\t\t\t\t\tfullMatch = true;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tdisc = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tisPre = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// suffix info\n\t\t\t\t\tif (rgtCharIdx == mhstr.length || interBound.test(mhstr[rgtCharIdx]))\n\t\t\t\t\t\tfullMatch && rgt2++;\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (interRgt == 2) {\n\t\t\t\t\t\t\tdisc = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (withIntraBound && intraBound.test(mhstr[rgtCharIdx - 1] + mhstr[rgtCharIdx]))\n\t\t\t\t\t\t\tfullMatch && rgt1++;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (interRgt == 1) {\n\t\t\t\t\t\t\t\tdisc = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tisSuf = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (fullMatch) {\n\t\t\t\t\t\tchars += termLen;\n\n\t\t\t\t\t\tif (isPre && isSuf)\n\t\t\t\t\t\t\tterms++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (groupLen > termLen)\n\t\t\t\t\tintra += groupLen - termLen; // intraFuzz\n\n\t\t\t\tif (j > 0)\n\t\t\t\t\tinter += m[k-1].length; // interFuzz\n\n\t\t\t\t// TODO: group here is lowercased, which is okay for length cmp, but not more case-sensitive filts\n\t\t\t\tif (!opts.intraFilt(term, group, idxAcc)) {\n\t\t\t\t\tdisc = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (j < partsLen - 1)\n\t\t\t\t\tidxAcc += groupLen + m[k+1].length;\n\t\t\t}\n\n\t\t\tif (!disc) {\n\t\t\t\tinfo.idx[ii] = idxs[i];\n\t\t\t\tinfo.interLft2[ii] = lft2;\n\t\t\t\tinfo.interLft1[ii] = lft1;\n\t\t\t\tinfo.interRgt2[ii] = rgt2;\n\t\t\t\tinfo.interRgt1[ii] = rgt1;\n\t\t\t\tinfo.chars[ii] = chars;\n\t\t\t\tinfo.terms[ii] = terms;\n\t\t\t\tinfo.interIns[ii] = inter;\n\t\t\t\tinfo.intraIns[ii] = intra;\n\n\t\t\t\tinfo.start[ii] = start;\n\t\t\t//\tinfo.span[ii] = span;\n\n\t\t\t\t// ranges\n\t\t\t\tlet m = mhstr.match(queryR);\n\t\t\t\tlet ranges = info.ranges[ii] = [];\n\n\t\t\t\tlet idxAcc = m.index + m[1].length;\n\t\t\t\tlet from = idxAcc;\n\t\t\t\tlet to = idxAcc;\n\n\t\t\t\tlet refLen = refine.length;\n\t\t\t\tlet ri = refLen > 0 ? 0 : Infinity;\n\t\t\t\tlet lastRi = refLen - 3;\n\n\t\t\t\tfor (let i = 2; i < m.length; i++) {\n\t\t\t\t\tlet len = m[i].length;\n\n\t\t\t\t\tif (ri <= lastRi && refine[ri] == idxAcc) {\n\t\t\t\t\t\tlet idxInNext = refine[ri+1];\n\t\t\t\t\t\tlet matchLen = refine[ri+2];\n\t\t\t\t\t\tlet offset = idxInNext + matchLen;\n\n\t\t\t\t\t\tidxAcc += len + offset;\n\t\t\t\t\t\tfrom = idxAcc - matchLen;\n\t\t\t\t\t\tm[i+1] = m[i+1].slice(offset);\n\n\t\t\t\t\t\tri+=3;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tidxAcc += len;\n\n\t\t\t\t\tif (i % 2 == 0)\n\t\t\t\t\t\tto = idxAcc;\n\t\t\t\t\telse if (len > 0) {\n\t\t\t\t\t\tranges.push(from, to);\n\t\t\t\t\t\tfrom = to = idxAcc;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (to > from)\n\t\t\t\t\tranges.push(from, to);\n\n\t\t\t\tii++;\n\t\t\t}\n\t\t}\n\n\t\t// trim arrays\n\t\tif (ii < idxs.length) {\n\t\t\tfor (let k in info)\n\t\t\t\tinfo[k] = info[k].slice(0, ii);\n\t\t}\n\n\t\treturn info;\n\t};\n\n\tconst refineMatch = (m, k, idxInNext, termLen) => {\n\t\t// shift the current group into the prior junk\n\t\tlet prepend = m[k] + m[k+1].slice(0, idxInNext);\n\t\tm[k-1] += prepend;\n\t\tm[k] = m[k+1].slice(idxInNext, idxInNext + termLen);\n\t\tm[k+1] = m[k+1].slice(idxInNext + termLen);\n\t\treturn prepend.length;\n\t};\n\n\t// returns [idxs, info, order]\n\tconst _search = (haystack, needle, outOfOrder = false, infoThresh = 1e3, preFiltered) => {\n\t\tlet needles = null;\n\t\tlet matches = null;\n\n\t\tlet negs = [];\n\n\t\tneedle = needle.replace(NEGS_RE, m => {\n\t\t\tnegs.push(m.trim().slice(1));\n\t\t\treturn '';\n\t\t});\n\n\t\tlet negsRe;\n\n\t\tif (negs.length > 0) {\n\t\t\tnegsRe = new RegExp(negs.join('|'), 'i');\n\n\t\t\tif (needle.trim() == '') {\n\t\t\t\tlet idxs = [];\n\n\t\t\t\tfor (let i = 0; i < haystack.length; i++) {\n\t\t\t\t\tif (!negsRe.test(haystack[i]))\n\t\t\t\t\t\tidxs.push(i);\n\t\t\t\t}\n\n\t\t\t\treturn [idxs, null, null];\n\t\t\t}\n\t\t}\n\n\t//\tconsole.log(negs);\n\t//\tconsole.log(needle);\n\n\t\tif (outOfOrder) {\n\t\t\t// since uFuzzy is an AND-based search, we can iteratively pre-reduce the haystack by searching\n\t\t\t// for each term in isolation before running permutations on what's left.\n\t\t\t// this is a major perf win. e.g. searching \"test man ger pp a\" goes from 570ms -> 14ms\n\t\t\tlet terms = split(needle);\n\n\t\t\tif (terms.length > 1) {\n\t\t\t\t// longest -> shortest\n\t\t\t\tlet terms2 = terms.slice().sort((a, b) => b.length - a.length);\n\n\t\t\t\tfor (let ti = 0; ti < terms2.length; ti++) {\n\t\t\t\t\t// no haystack item contained all terms\n\t\t\t\t\tif (preFiltered && preFiltered.length == 0)\n\t\t\t\t\t\treturn [[], null, null];\n\n\t\t\t\t\tpreFiltered = filter(haystack, terms2[ti], preFiltered);\n\t\t\t\t}\n\n\t\t\t\tneedles = permute(terms).map(perm => perm.join(' '));\n\n\t\t\t\t// filtered matches for each needle excluding same matches for prior needles\n\t\t\t\tmatches = [];\n\n\t\t\t\t// keeps track of already-matched idxs to skip in follow-up permutations\n\t\t\t\tlet matchedIdxs = new Set();\n\n\t\t\t\tfor (let ni = 0; ni < needles.length; ni++) {\n\t\t\t\t\tif (matchedIdxs.size < preFiltered.length) {\n\t\t\t\t\t\t// filter further for this needle, exclude already-matched\n\t\t\t\t\t\tlet preFiltered2 = preFiltered.filter(idx => !matchedIdxs.has(idx));\n\n\t\t\t\t\t\tlet matched = filter(haystack, needles[ni], preFiltered2);\n\n\t\t\t\t\t\tfor (let j = 0; j < matched.length; j++)\n\t\t\t\t\t\t\tmatchedIdxs.add(matched[j]);\n\n\t\t\t\t\t\tmatches.push(matched);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tmatches.push([]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// interOR\n\t//\tconsole.log(prepQuery(needle, 1, null, true));\n\n\t\t// non-ooo or ooo w/single term\n\t\tif (needles == null) {\n\t\t\tneedles = [needle];\n\t\t\tmatches = [preFiltered && preFiltered.length > 0 ? preFiltered : filter(haystack, needle)];\n\t\t}\n\n\t\tlet retInfo = null;\n\t\tlet retOrder = null;\n\n\t\tif (negs.length > 0)\n\t\t\tmatches = matches.map(idxs => idxs.filter(idx => !negsRe.test(haystack[idx])));\n\n\t\tlet matchCount = matches.reduce((acc, idxs) => acc + idxs.length, 0);\n\n\t\t// rank, sort, concat\n\t\tif (matchCount <= infoThresh) {\n\t\t\tretInfo = {};\n\t\t\tretOrder = [];\n\n\t\t\tfor (let ni = 0; ni < matches.length; ni++) {\n\t\t\t\tlet idxs = matches[ni];\n\n\t\t\t\tif (idxs == null || idxs.length == 0)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tlet needle = needles[ni];\n\t\t\t\tlet _info = info(idxs, haystack, needle);\n\t\t\t\tlet order = opts.sort(_info, haystack, needle);\n\n\t\t\t\t// offset idxs for concat'ing infos\n\t\t\t\tif (ni > 0) {\n\t\t\t\t\tfor (let i = 0; i < order.length; i++)\n\t\t\t\t\t\torder[i] += retOrder.length;\n\t\t\t\t}\n\n\t\t\t\tfor (let k in _info) {\n\t\t\t\t\tretInfo[k] = (retInfo[k] ? retInfo[k] : []).concat(_info[k]);\n }\n\n\t\t\t\tretOrder = retOrder.concat(order);\n\t\t\t}\n\t\t}\n\n\t\treturn [\n\t\t\t[].concat(...matches),\n\t\t\tretInfo,\n\t\t\tretOrder,\n\t\t];\n\t};\n\n\treturn {\n\t\tsearch: (...args) => {\n\t\t\tlet out = _search(...args);\n\t\t\treturn out;\n\t\t},\n\t\tsplit,\n\t\tfilter,\n\t\tinfo,\n\t\tsort: opts.sort,\n\t};\n}\n\nconst latinize = (() => {\n\tlet accents = {\n\t\tA: 'ÁÀÃÂÄĄ',\n\t\ta: 'áàãâäą',\n\t\tE: 'ÉÈÊËĖ',\n\t\te: 'éèêëę',\n\t\tI: 'ÍÌÎÏĮ',\n\t\ti: 'íìîïį',\n\t\tO: 'ÓÒÔÕÖ',\n\t\to: 'óòôõö',\n\t\tU: 'ÚÙÛÜŪŲ',\n\t\tu: 'úùûüūų',\n\t\tC: 'ÇČ',\n\t\tc: 'çč',\n\t\tN: 'Ñ',\n\t\tn: 'ñ',\n\t\tS: 'Š',\n\t\ts: 'š'\n\t};\n\n\tlet accentsMap = new Map();\n\tlet accentsTpl = '';\n\n\tfor (let r in accents) {\n\t\taccents[r].split('').forEach(a => {\n\t\t\taccentsTpl += a;\n\t\t\taccentsMap.set(a, r);\n\t\t});\n\t}\n\n\tlet accentsRe = new RegExp(`[${accentsTpl}]`, 'g');\n\tlet replacer = m => accentsMap.get(m);\n\n\treturn strings => {\n\t\tif (typeof strings == 'string')\n\t\t\treturn strings.replace(accentsRe, replacer);\n\n\t\tlet out = Array(strings.length);\n\t\tfor (let i = 0; i < strings.length; i++)\n\t\t\tout[i] = strings[i].replace(accentsRe, replacer);\n\t\treturn out;\n\t};\n})();\n\n// https://stackoverflow.com/questions/9960908/permutations-in-javascript/37580979#37580979\nfunction permute(arr) {\n\tarr = arr.slice();\n\n\tlet length = arr.length,\n\t\tresult = [arr.slice()],\n\t\tc = new Array(length).fill(0),\n\t\ti = 1, k, p;\n\n\twhile (i < length) {\n\t\tif (c[i] < i) {\n\t\t\tk = i % 2 && c[i];\n\t\t\tp = arr[i];\n\t\t\tarr[i] = arr[k];\n\t\t\tarr[k] = p;\n\t\t\t++c[i];\n\t\t\ti = 1;\n\t\t\tresult.push(arr.slice());\n\t\t} else {\n\t\t\tc[i] = 0;\n\t\t\t++i;\n\t\t}\n\t}\n\n\treturn result;\n}\n\nconst _mark = (part, matched) => matched ? `${part}` : part;\nconst _append = (acc, part) => acc + part;\n\nfunction highlight(str, ranges, mark = _mark, accum = '', append = _append) {\n let tmp = append(accum, mark(str.substring(0, ranges[0]), false));\n\taccum = tmp !== null ? tmp : accum;\n\n\tfor (let i = 0; i < ranges.length; i+=2) {\n\t\tlet fr = ranges[i];\n\t\tlet to = ranges[i+1];\n\n tmp = append(accum, mark(str.substring(fr, to), true));\n\t\taccum = tmp !== null ? tmp : accum;\n\n\t\tif (i < ranges.length - 3) {\n tmp = append(accum, mark(str.substring(ranges[i + 1], ranges[i + 2]), false));\n accum = tmp !== null ? tmp : accum;\n }\n\t}\n\n tmp = append(accum, mark(str.substring(ranges[ranges.length - 1]), false));\n\taccum = tmp !== null ? tmp : accum;\n\n\treturn accum;\n}\n\nuFuzzy.latinize = latinize;\nuFuzzy.permute = arr => {\n\tlet idxs = permute([...Array(arr.length).keys()]).sort((a,b) => {\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tif (a[i] != b[i])\n\t\t\t\treturn a[i] - b[i];\n\t\t}\n\t\treturn 0;\n\t});\n\n\treturn idxs.map(pi => pi.map(i => arr[i]));\n};\nuFuzzy.highlight = highlight;\n\nexport { uFuzzy as default };\n","import uFuzzy from '@leeoniya/ufuzzy';\n\n// See https://github.com/leeoniya/uFuzzy#options\nconst uf = new uFuzzy({\n intraMode: 1,\n intraIns: 1,\n intraSub: 1,\n intraTrn: 1,\n intraDel: 1,\n});\n\nfunction sortCommands(\n a: ProcessedCommandItem,\n b: ProcessedCommandItem,\n favouriteCommands: CommandId[],\n recentCommands: CommandId[]\n): number {\n // Sort by recent first\n const aIsRecent = recentCommands.includes(a.id);\n const bIsRecent = recentCommands.includes(b.id);\n\n if (aIsRecent && !bIsRecent) {\n return -1;\n }\n\n if (!aIsRecent && bIsRecent) {\n return 1;\n }\n\n if (aIsRecent && bIsRecent) {\n return recentCommands.indexOf(a.id) - recentCommands.indexOf(b.id);\n }\n\n // Sort by favourites second\n const aIsFavourite = favouriteCommands.includes(a.id);\n const bIsFavourite = favouriteCommands.includes(b.id);\n\n if (aIsFavourite && !bIsFavourite) {\n return -1;\n }\n\n if (!aIsFavourite && bIsFavourite) {\n return 1;\n }\n\n // Sort by name third\n return a.name.localeCompare(b.name);\n}\n\nexport default function filterCommands(\n selectedCommandGroup: CommandId,\n searchWord: string,\n commands: FlatCommandList,\n favourites: CommandId[],\n recentCommands: CommandId[]\n): CommandId[] {\n // If there is a search word, return all commands to allow deep search\n // If no search word is given, return all commands in the currently selected group or all recent commands if no group is selected\n let availableCommands = Object.values(commands);\n availableCommands = searchWord\n ? availableCommands\n : availableCommands.filter(\n (command) =>\n command.parentId === selectedCommandGroup ||\n (!selectedCommandGroup && recentCommands.includes(command.id))\n );\n\n // If there is no search word, return all commands in the current context with favourites first, the recent commands will only be prioritised if we are at the top level\n if (!searchWord) {\n return availableCommands\n .sort((a, b) => sortCommands(a, b, favourites, selectedCommandGroup ? [] : recentCommands))\n .map((command) => command.id);\n }\n\n // Create a list of all available commands with their name and description as haystack for the search\n const availableCommandNames = availableCommands.map(({ name, description }) => name + ' ' + description);\n const [indices, , order] = uf.search(availableCommandNames, searchWord.toLowerCase());\n const matchingIds = order.map((i) => availableCommands[indices[i]].id);\n\n // Add all commands that can handle queries to the result, the Set removes duplicates\n return matchingIds;\n}\n","export default function assert(condition: unknown, message = 'Assertion failed'): asserts condition {\n if (condition === false) throw Error(message);\n}\n","export default function classnames(...args: Array): string {\n return args.filter(Boolean).join(' ');\n}\n","import { logger } from '../helpers';\n\nexport enum STATUS {\n COLLAPSED = 'collapsed',\n IDLE = 'idle',\n EXECUTING_COMMAND = 'executingCommand',\n DISPLAYING_RESULT = 'displayingResult',\n}\n\nexport enum TRANSITION {\n RESET_SEARCH = 'RESET_SEARCH',\n HIGHLIGHT_NEXT_ITEM = 'HIGHLIGHT_NEXT_ITEM',\n HIGHLIGHT_PREVIOUS_ITEM = 'HIGHLIGHT_PREVIOUS_ITEM',\n CANCEL = 'CANCEL',\n SELECT_GROUP = 'SELECT_GROUP',\n GO_TO_PARENT_GROUP = 'GO_TO_PARENT_GROUP',\n UPDATE_SEARCH = 'UPDATE_SEARCH',\n UPDATE_COMMAND_QUERY = 'UPDATE_COMMAND_QUERY',\n EXECUTE_COMMAND = 'EXECUTE_COMMAND',\n FINISH_COMMAND = 'FINISH_COMMAND',\n UPDATE_RESULT = 'UPDATE_RESULT',\n EXPAND = 'EXPAND',\n ADD_FAVOURITE = 'ADD_FAVOURITE',\n REMOVE_FAVOURITE = 'REMOVE_FAVOURITE',\n}\n\nexport enum ACTION {\n ADD_FAVOURITE = 'ADD_FAVOURITE',\n ADD_RECENTLY_USED = 'ADD_RECENTLY_USED',\n EXPAND = 'EXPAND',\n HIGHLIGHT_NEXT_COMMAND = 'HIGHLIGHT_NEXT_COMMAND',\n HIGHLIGHT_NEXT_OPTION = 'HIGHLIGHT_NEXT_OPTION',\n HIGHLIGHT_PREVIOUS_COMMAND = 'HIGHLIGHT_PREVIOUS_COMMAND',\n HIGHLIGHT_PREVIOUS_OPTION = 'HIGHLIGHT_PREVIOUS_OPTION',\n LEAVE_GROUP = 'LEAVE_GROUP',\n REFRESH_COMMANDS = 'REFRESH_COMMANDS',\n REMOVE_FAVOURITE = 'REMOVE_FAVOURITE',\n RESET_HIGHLIGHT = 'RESET_HIGHLIGHT',\n RESET_OPTION_HIGHLIGHT = 'RESET_OPTION_HIGHLIGHT',\n RESET_SEARCH = 'RESET_SEARCH',\n RESET_SEARCH_OR_LEAVE_GROUP = 'RESET_SEARCH_OR_LEAVE_GROUP',\n SET_ACTIVE_COMMAND = 'SET_ACTIVE_COMMAND',\n SET_COMMAND_QUERY = 'SET_COMMAND_QUERY',\n SET_GROUP = 'SET_GROUP',\n SET_SEARCH_WORD = 'SET_SEARCH_WORD',\n UNSET_ACTIVE_COMMAND = 'UNSET_ACTIVE_COMMAND',\n UNSET_RESULT = 'UNSET_RESULT',\n UPDATE_RESULT = 'UPDATE_RESULT',\n}\n\ninterface MachineDefinition {\n initial: STATUS;\n states: {\n [state in STATUS]: {\n on: {\n [transition in TRANSITION]?:\n | STATUS\n | {\n target: STATUS;\n actions?: ACTION[];\n };\n };\n };\n };\n}\n\nexport const machine: MachineDefinition = {\n initial: STATUS.COLLAPSED,\n states: {\n collapsed: {\n on: {\n UPDATE_SEARCH: {\n target: STATUS.IDLE,\n actions: [ACTION.EXPAND, ACTION.SET_SEARCH_WORD, ACTION.REFRESH_COMMANDS],\n },\n HIGHLIGHT_NEXT_ITEM: {\n target: STATUS.IDLE,\n actions: [ACTION.REFRESH_COMMANDS, ACTION.EXPAND],\n },\n EXPAND: {\n target: STATUS.IDLE,\n actions: [ACTION.REFRESH_COMMANDS, ACTION.EXPAND],\n },\n },\n },\n idle: {\n on: {\n UPDATE_SEARCH: {\n target: STATUS.IDLE,\n actions: [ACTION.SET_SEARCH_WORD, ACTION.RESET_HIGHLIGHT, ACTION.REFRESH_COMMANDS],\n },\n HIGHLIGHT_NEXT_ITEM: {\n target: STATUS.IDLE,\n actions: [ACTION.HIGHLIGHT_NEXT_COMMAND],\n },\n HIGHLIGHT_PREVIOUS_ITEM: {\n target: STATUS.IDLE,\n actions: [ACTION.HIGHLIGHT_PREVIOUS_COMMAND],\n },\n CANCEL: {\n target: STATUS.IDLE,\n actions: [ACTION.RESET_HIGHLIGHT, ACTION.RESET_SEARCH_OR_LEAVE_GROUP, ACTION.REFRESH_COMMANDS],\n },\n EXECUTE_COMMAND: {\n target: STATUS.EXECUTING_COMMAND,\n actions: [ACTION.ADD_RECENTLY_USED, ACTION.SET_ACTIVE_COMMAND, ACTION.REFRESH_COMMANDS],\n },\n GO_TO_PARENT_GROUP: {\n target: STATUS.IDLE,\n actions: [ACTION.RESET_HIGHLIGHT, ACTION.LEAVE_GROUP, ACTION.REFRESH_COMMANDS],\n },\n SELECT_GROUP: {\n target: STATUS.IDLE,\n actions: [ACTION.RESET_SEARCH, ACTION.RESET_HIGHLIGHT, ACTION.SET_GROUP, ACTION.REFRESH_COMMANDS],\n },\n ADD_FAVOURITE: {\n target: STATUS.IDLE,\n actions: [ACTION.ADD_FAVOURITE, ACTION.REFRESH_COMMANDS],\n },\n REMOVE_FAVOURITE: {\n target: STATUS.IDLE,\n actions: [ACTION.REMOVE_FAVOURITE, ACTION.REFRESH_COMMANDS],\n },\n },\n },\n executingCommand: {\n on: {\n UPDATE_RESULT: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.UPDATE_RESULT],\n },\n FINISH_COMMAND: {\n target: STATUS.IDLE,\n actions: [ACTION.UNSET_ACTIVE_COMMAND],\n },\n },\n },\n displayingResult: {\n on: {\n UPDATE_COMMAND_QUERY: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.SET_COMMAND_QUERY],\n },\n UPDATE_RESULT: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.UPDATE_RESULT, ACTION.RESET_OPTION_HIGHLIGHT],\n },\n HIGHLIGHT_NEXT_ITEM: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.HIGHLIGHT_NEXT_OPTION],\n },\n HIGHLIGHT_PREVIOUS_ITEM: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.HIGHLIGHT_PREVIOUS_OPTION],\n },\n EXECUTE_COMMAND: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.SET_ACTIVE_COMMAND],\n },\n CANCEL: {\n target: STATUS.IDLE,\n actions: [ACTION.UNSET_RESULT, ACTION.UNSET_ACTIVE_COMMAND, ACTION.RESET_OPTION_HIGHLIGHT],\n },\n FINISH_COMMAND: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.UNSET_ACTIVE_COMMAND],\n },\n },\n },\n },\n};\n\nexport interface MachineState {\n status: STATUS;\n}\n\ntype MachineEvent = {\n type: TRANSITION;\n payload?: any;\n};\n\nexport function transition(\n state: MachineState,\n event: MachineEvent,\n actionCallback?: (action: ACTION, nextState: MachineState, event: MachineEvent) => void\n): MachineState {\n let nextStateNode = machine.states[state.status].on?.[event.type] ?? null;\n\n if (!nextStateNode) {\n logger.error(`No transition found for event \"${event.type}\" in state \"${state.status}\"`);\n nextStateNode = { target: state.status };\n }\n\n const nextState = {\n ...state,\n status: typeof nextStateNode == 'string' ? nextStateNode : nextStateNode.target,\n } as MachineState;\n\n if (actionCallback && typeof nextStateNode == 'object') {\n nextStateNode.actions?.forEach((action) => actionCallback(action, nextState, event));\n }\n\n logger.debug(`Transitioned from \"${state.status}\" to \"${nextState.status}\" with event \"${event.type}\"`);\n\n return nextState;\n}\n","import { assert, clamp, filterCommands } from '../helpers';\nimport { ACTION, MachineState, TRANSITION, transition } from './commandBarMachine';\n\nexport type CommandBarEvent =\n | { type: TRANSITION.RESET_SEARCH }\n | { type: TRANSITION.HIGHLIGHT_NEXT_ITEM }\n | { type: TRANSITION.HIGHLIGHT_PREVIOUS_ITEM }\n | { type: TRANSITION.CANCEL }\n | { type: TRANSITION.SELECT_GROUP; commandId: string }\n | { type: TRANSITION.GO_TO_PARENT_GROUP }\n | { type: TRANSITION.UPDATE_SEARCH; searchWord: string }\n | { type: TRANSITION.UPDATE_COMMAND_QUERY; commandQuery: string }\n | { type: TRANSITION.EXECUTE_COMMAND; commandId: CommandId; message: string }\n | { type: TRANSITION.FINISH_COMMAND }\n | { type: TRANSITION.UPDATE_RESULT; result: CommandResult }\n | { type: TRANSITION.EXPAND }\n | { type: TRANSITION.ADD_FAVOURITE; commandId: CommandId }\n | { type: TRANSITION.REMOVE_FAVOURITE; commandId: CommandId };\n\nexport type CommandBarState = MachineState & {\n activeCommandId: CommandId;\n activeCommandMessage: string;\n availableCommandIds: CommandId[];\n commandQuery: string;\n commandQueryDirty: boolean;\n commands: FlatCommandList;\n expanded: boolean;\n favouriteCommands: CommandId[];\n highlightedItem: number;\n highlightedOption: number;\n recentCommands: CommandId[];\n result: CommandResult | null;\n resultCommandId: CommandId;\n searchWord: string;\n selectedCommandGroup: CommandId;\n showBranding: boolean;\n};\n\nconst MAX_RECENTLY_USED = 5;\n\nfunction runAction(action: ACTION, nextState: CommandBarState, event: CommandBarEvent) {\n switch (action) {\n case ACTION.RESET_SEARCH:\n nextState.searchWord = '';\n break;\n case ACTION.RESET_HIGHLIGHT:\n nextState.highlightedItem = 0;\n break;\n case ACTION.REFRESH_COMMANDS:\n nextState.availableCommandIds = filterCommands(\n nextState.selectedCommandGroup,\n nextState.searchWord,\n nextState.commands,\n nextState.favouriteCommands,\n nextState.recentCommands\n );\n break;\n case ACTION.HIGHLIGHT_NEXT_COMMAND:\n nextState.highlightedItem = clamp(\n nextState.highlightedItem + 1,\n 0,\n nextState.availableCommandIds.length - 1\n );\n break;\n case ACTION.HIGHLIGHT_PREVIOUS_COMMAND:\n nextState.highlightedItem = clamp(\n nextState.highlightedItem - 1,\n 0,\n nextState.availableCommandIds.length - 1\n );\n break;\n case ACTION.HIGHLIGHT_NEXT_OPTION:\n nextState.highlightedOption = clamp(\n nextState.highlightedOption + 1,\n 0,\n Object.keys(nextState.result.options).length - 1\n );\n break;\n case ACTION.HIGHLIGHT_PREVIOUS_OPTION:\n nextState.highlightedOption = clamp(\n nextState.highlightedOption - 1,\n 0,\n Object.keys(nextState.result.options).length - 1\n );\n break;\n case ACTION.SET_SEARCH_WORD:\n assert(event.type === TRANSITION.UPDATE_SEARCH);\n nextState.searchWord = event.searchWord;\n break;\n case ACTION.SET_COMMAND_QUERY:\n assert(event.type === TRANSITION.UPDATE_COMMAND_QUERY);\n nextState.commandQuery = event.commandQuery;\n nextState.commandQueryDirty = true;\n break;\n case ACTION.EXPAND:\n nextState.expanded = true;\n break;\n case ACTION.SET_ACTIVE_COMMAND:\n assert(event.type === TRANSITION.EXECUTE_COMMAND);\n nextState.activeCommandId = event.commandId;\n nextState.activeCommandMessage = event.message;\n break;\n case ACTION.UNSET_ACTIVE_COMMAND:\n nextState.activeCommandId = null;\n nextState.activeCommandMessage = null;\n break;\n case ACTION.UPDATE_RESULT:\n assert(event.type === TRANSITION.UPDATE_RESULT);\n assert(typeof event.result.success === 'boolean');\n nextState.result = {\n options: {},\n message: 'Command executed',\n view: null,\n success: false,\n ...event.result,\n };\n nextState.resultCommandId = nextState.activeCommandId;\n nextState.commandQueryDirty = false;\n break;\n case ACTION.RESET_OPTION_HIGHLIGHT:\n nextState.highlightedOption = 0;\n break;\n case ACTION.RESET_SEARCH_OR_LEAVE_GROUP:\n if (nextState.commandQuery) {\n nextState.commandQuery = '';\n } else if (nextState.searchWord) {\n nextState.searchWord = '';\n } else {\n nextState.selectedCommandGroup = nextState.selectedCommandGroup\n ? nextState.commands[nextState.selectedCommandGroup].parentId\n : null;\n }\n break;\n case ACTION.UNSET_RESULT:\n nextState.result = null;\n nextState.resultCommandId = null;\n nextState.commandQuery = '';\n break;\n case ACTION.LEAVE_GROUP:\n nextState.selectedCommandGroup = nextState.selectedCommandGroup\n ? nextState.commands[nextState.selectedCommandGroup].parentId\n : null;\n break;\n case ACTION.SET_GROUP:\n assert(event.type === TRANSITION.SELECT_GROUP);\n nextState.selectedCommandGroup = event.commandId;\n break;\n case ACTION.ADD_FAVOURITE:\n assert(event.type === TRANSITION.ADD_FAVOURITE);\n if (!nextState.favouriteCommands.includes(event.commandId)) {\n nextState.favouriteCommands = [...nextState.favouriteCommands, event.commandId];\n }\n break;\n case ACTION.REMOVE_FAVOURITE:\n assert(event.type === TRANSITION.REMOVE_FAVOURITE);\n nextState.favouriteCommands = nextState.favouriteCommands.filter((id) => id !== event.commandId);\n break;\n case ACTION.ADD_RECENTLY_USED:\n assert(event.type === TRANSITION.EXECUTE_COMMAND);\n // Only add to recently used if the command has an action\n if (!nextState.commands[event.commandId].action) {\n break;\n }\n if (nextState.recentCommands.includes(event.commandId)) {\n nextState.recentCommands = nextState.recentCommands.filter((id) => id !== event.commandId);\n }\n nextState.recentCommands.unshift(event.commandId);\n if (nextState.recentCommands.length > MAX_RECENTLY_USED) {\n nextState.recentCommands.pop();\n }\n break;\n default:\n throw Error(`Action ${action} not implemented`);\n }\n}\n\nconst commandBarReducer = (state: CommandBarState, event: CommandBarEvent): CommandBarState => {\n return transition(state, event, runAction) as CommandBarState;\n};\n\nexport { commandBarReducer };\n","import React from 'react';\n\nimport * as styles from './IconWrapper.module.css';\n\ntype IconWrapperProps = {\n children: JSX.Element;\n};\n\nconst IconWrapper: React.FC = ({ children }) => {\n return {children};\n};\n\nexport default React.memo(IconWrapper);\n",".iconWrap {\n width: var(--icon-size);\n max-height: var(--icon-size);\n display: inline-block;\n text-align: center;\n}\n\n.iconWrap svg {\n max-width: 100%;\n max-height: inherit;\n display: inline-block;\n}\n","import React from 'react';\nimport { useCommandBarState, useIntl } from '../../state';\n\nimport * as styles from './Branding.module.css';\n\nconst Branding: React.FC = () => {\n const {\n state: { showBranding },\n } = useCommandBarState();\n const { translate } = useIntl();\n\n if (!showBranding) return null;\n\n return (\n \n {translate('CommandBarFooter.brandingSmall', 'Made with love by')}\n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default React.memo(Branding);\n",".madeWithLove {\n display: flex;\n text-decoration: none;\n gap: 0.5rem;\n}\n\n.madeWithLove small {\n transition: color 0.1s ease-in-out;\n}\n\n.madeWithLove:hover small {\n color: var(--color-light-text-hover);\n}\n\n.madeWithLove svg {\n display: inline-block;\n width: var(--icon-size);\n height: auto;\n}\n","import React from 'react';\n\nexport function IconBack() {\n return (\n \n \n \n );\n}\n","import React from 'react';\n\nexport function IconNeos() {\n return (\n \n \n \n );\n}\n","import React from 'react';\n\nexport function IconSpinner() {\n return (\n \n \n \n );\n}\n","import React from 'react';\n\nexport function IconStar() {\n return (\n \n \n \n );\n}\n","import React from 'react';\n\nexport function IconPlay() {\n return (\n \n \n \n );\n}\n","import React from 'react';\n\nexport function IconRepeat() {\n return (\n \n \n \n );\n}\n",".searchBox {\n appearance: none;\n background: none;\n border: none;\n color: currentColor;\n font-size: 1.1em !important; /* Fix to prevent Neos.UI css from forcing the font size to 14px */\n font-weight: 300;\n outline: none;\n padding: 0.5rem;\n flex: 1;\n}\n\n.searchBox:disabled {\n color: var(--color-light-text);\n cursor: not-allowed;\n}\n\n.expandButton {\n position: absolute;\n padding: 0 1rem;\n height: 100%;\n right: 0;\n display: block;\n background: none;\n border: none;\n cursor: pointer;\n}\n\n.expandButton svg {\n color: var(--grayLighter);\n transition: color 0.1s ease-in-out;\n}\n\n.expandButton:hover svg {\n color: var(--primaryBlue);\n}\n\n.executeButton {\n position: absolute;\n padding: 0 1rem;\n height: 100%;\n right: 0;\n display: block;\n background: none;\n border: none;\n cursor: pointer;\n}\n\n.executeButton {\n color: var(--grayLighter);\n transition: color 0.1s ease-in-out;\n}\n\n.executeButton:hover svg {\n color: var(--primaryBlue);\n}\n\n.commandQueryDirty {\n color: var(--warn);\n}\n","import React from 'react';\nimport { useComputed } from '@preact/signals';\n\nimport { useCommandBarState } from '../../state';\nimport IconWrapper from '../IconWrapper/IconWrapper';\nimport Branding from './Branding';\nimport { IconNeos, IconSpinner } from '../Icons';\n\nimport * as styles from './CommandBarFooter.module.css';\n\nconst CommandBarFooter: React.FC = () => {\n const {\n state: { activeCommandId, activeCommandMessage, commands, result, selectedCommandGroup, expanded },\n Icon,\n } = useCommandBarState();\n\n const runningCommand = useComputed(() => {\n if (!activeCommandId.value) return null;\n // FIXME: This will not be correct when a command and an option in the result have the same id\n return activeCommandId.value\n ? commands.value[activeCommandId.value] ?? result.value.options[activeCommandId.value]\n : null;\n });\n\n if (!expanded.value) return null;\n\n return (\n
\n {activeCommandId.value ? (\n \n \n \n \n \n {runningCommand.value.name} ‒ {activeCommandMessage}\n \n \n ) : selectedCommandGroup.value ? (\n \n \n {commands.value[selectedCommandGroup.value].name}\n \n ) : (\n \n \n \n )}\n \n
\n );\n};\n\nexport default React.memo(CommandBarFooter);\n",".commandBarFooter {\n border-top: 1px solid var(--color-border);\n background-color: var(--footer-background);\n padding: 0.8rem 1rem;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 1rem;\n user-select: none;\n}\n\n.breadcrumb {\n display: flex;\n gap: 1rem;\n --icon-size: 0.875em;\n}\n\n.activity {\n display: flex;\n gap: 1rem;\n --icon-size: 0.875em;\n}\n\n.activity svg {\n animation-name: spinner;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n transform-origin: 50% 50%;\n display: inline-block;\n}\n@keyframes spinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n","import React, { useCallback, useRef } from 'react';\nimport { useSignalEffect } from '@preact/signals';\n\nimport { useCommandBarState, STATUS, useIntl, useCommandExecutor } from '../../state';\nimport IconWrapper from '../IconWrapper/IconWrapper';\nimport { IconPlay, IconRepeat } from '../Icons';\n\nimport * as styles from './SearchBox.module.css';\n\n// Timer helper for debouncing updates of command query results\nlet updateResultsTimer = null;\nconst RESULT_UPDATE_DEBOUNCE_TIME = 500;\n\nconst SearchBox: React.FC = () => {\n const { state, actions } = useCommandBarState();\n const { executeCommand } = useCommandExecutor();\n const { translate } = useIntl();\n const inputRef = useRef();\n const activeCommand = state.commands.value[state.activeCommandId.value || state.resultCommandId.value];\n\n const handleChange = useCallback((e) => {\n if (state.status.value === STATUS.DISPLAYING_RESULT) {\n actions.UPDATE_COMMAND_QUERY(e.target.value);\n\n // Execute command after a delay if it's not a manual command\n if (!state.commands.value[state.resultCommandId.value]?.executeManually) {\n if (updateResultsTimer) {\n clearTimeout(updateResultsTimer);\n }\n updateResultsTimer = setTimeout(\n () => executeCommand(state.resultCommandId.value),\n RESULT_UPDATE_DEBOUNCE_TIME\n );\n }\n } else {\n actions.UPDATE_SEARCH(e.target.value);\n }\n }, []);\n\n const handleKeyPress = useCallback(\n (e: React.KeyboardEvent) => {\n // Prevent escape event from bubbling up if the input is focused and the native reset should be used\n if (e.key === 'Escape') {\n if (inputRef.current.value) {\n e.preventDefault();\n e.stopPropagation();\n }\n }\n },\n [inputRef.current]\n );\n\n // Focus input when the command bar is ready for input\n useSignalEffect(() => {\n if (state.status.value !== STATUS.EXECUTING_COMMAND) {\n inputRef.current?.focus();\n }\n });\n\n return (\n <>\n \n {!state.expanded.value && (\n \n \n \n \n \n \n \n )}\n {state.status.value === STATUS.DISPLAYING_RESULT &&\n state.commands.value[state.resultCommandId.value]?.executeManually &&\n !state.activeCommandId.value && (\n executeCommand(state.resultCommandId.value)}\n title={translate('SearchBox.execute.title', 'Execute the command')}\n >\n {state.commandQueryDirty.value ? : }\n \n )}\n \n );\n};\n\nexport default React.memo(SearchBox);\n","import React from 'react';\nimport { useComputed } from '@preact/signals';\n\nimport { useCommandBarState, STATUS } from '../../state';\nimport IconWrapper from '../IconWrapper/IconWrapper';\nimport SearchBox from '../SearchBox/SearchBox';\nimport { IconBack } from '../Icons';\n\nimport * as styles from './CommandBarHeader.module.css';\n\nconst CommandBarHeader: React.FC = () => {\n const { state, actions } = useCommandBarState();\n const isDisplayingResults = useComputed(() => state.status.value == STATUS.DISPLAYING_RESULT);\n\n return (\n
\n {(isDisplayingResults.value || state.selectedCommandGroup.value) && (\n \n \n \n \n \n )}\n \n
\n );\n};\n\nexport default React.memo(CommandBarHeader);\n",".commandBarHeader {\n display: flex;\n align-items: center;\n gap: 1rem;\n padding: 0.3rem 0.5rem;\n border-bottom: 1px solid var(--color-border);\n position: relative;\n}\n\n.backButton {\n padding: 0.3rem;\n background-color: var(--color-icon-bg);\n border-radius: 50%;\n appearance: none;\n border: none;\n color: white;\n cursor: pointer;\n transition: background-color 0.1s ease-in-out;\n display: flex;\n}\n\n.backButton:hover {\n background-color: var(--color-icon-bg-hover);\n}\n","import React from 'react';\nimport { ReadonlySignal, useComputed } from '@preact/signals';\n\nimport { IconWrapper } from '../index';\nimport { classnames } from '../../helpers';\nimport { IconStar } from '../Icons';\n\nimport * as styles from './CommandListItem.module.css';\nimport { useCommandBarState, useIntl } from '../../state';\n\ntype CommandListItemProps = {\n command: ProcessedCommandItem;\n onItemSelect: (commandId: CommandId) => void;\n highlightedId: ReadonlySignal;\n onToggleFavourite?: (id: CommandId) => void;\n};\n\nfunction getCommandType(\n { subCommandIds, category, canHandleQueries, action }: ProcessedCommandItem,\n translate: TranslateFunction\n): string {\n let type = 'command';\n if (category) {\n return category;\n } else if (subCommandIds?.length > 0) {\n type = 'category';\n } else if (canHandleQueries) {\n type = 'query';\n } else if (typeof action == 'string') {\n type = 'link';\n }\n\n return translate(`CommandListItem.type.${type}`, type);\n}\n\nfunction CommandListItem({ command, onItemSelect, highlightedId, onToggleFavourite }: CommandListItemProps) {\n const {\n state: { favouriteCommands },\n Icon,\n } = useCommandBarState();\n const { translate } = useIntl();\n const { id, name, description, icon, action } = command;\n const commandType = getCommandType(command, translate);\n\n const isHighlighted = useComputed(() => highlightedId.value === id);\n const isFavourite = useComputed(() => favouriteCommands.value.includes(id));\n\n return (\n onItemSelect(id)}\n data-testid=\"CommandListItem\"\n >\n \n \n {name}\n {description && (\n \n {typeof description == 'string' ? description : description()}\n \n )}\n \n {onToggleFavourite && action && (\n {\n e.stopPropagation();\n onToggleFavourite(id);\n }}\n >\n \n \n \n \n )}\n {commandType}\n \n );\n}\n\n// Use memo to prevent rerendering of all items when the parent list is updated\nexport default React.memo(CommandListItem);\n",".commandListItem {\n cursor: pointer;\n display: flex !important; /* Necessary due to the neos header bar styling */\n gap: 1em;\n padding: 0.4rem 0.6rem;\n align-items: baseline;\n border-radius: var(--border-radius-item);\n transition: background-color 0.1s ease-in-out, opacity 0.1s ease-in-out;\n background-color: transparent;\n user-select: none;\n --icon-size: 0.875em;\n}\n\n.commandListItem:hover {\n background-color: var(--color-item-hover);\n}\n\n.highlighted {\n background-color: var(--color-item-highlighted);\n}\n\n.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.label {\n display: flex;\n flex-wrap: wrap;\n flex: 1;\n gap: 0.2em 1em;\n align-items: baseline;\n}\n\n.description {\n white-space:pre-wrap;\n font-size: 0.9em;\n}\n\n.type {\n max-width: 30%;\n}\n\n.favouriteButton {\n visibility: hidden;\n border: none;\n background: none;\n cursor: pointer;\n transition: color 0.1s ease-in-out;\n color: var(--textSubtleLight);\n align-self: baseline;\n padding: 0 0.3rem;\n}\n.favouriteButton:hover {\n color: var(--primaryBlue);\n}\n\n.commandListItem:hover .favouriteButton {\n visibility: visible;\n}\n\n.isFavourite {\n display: block;\n color: var(--primaryBlue);\n visibility: visible;\n}\n","import React, { useCallback } from 'react';\nimport { useComputed, useSignalEffect } from '@preact/signals';\n\nimport CommandListItem from '../CommandListItem/CommandListItem';\nimport { useCommandBarState, useCommandExecutor, useIntl, STATUS } from '../../state';\nimport { classnames } from '../../helpers';\n\nimport * as styles from './CommandListing.module.css';\n\nconst CommandList: React.FC = () => {\n const {\n state: {\n commands,\n highlightedItem,\n availableCommandIds,\n status,\n searchWord,\n favouriteCommands,\n recentCommands,\n selectedCommandGroup,\n },\n actions: { ADD_FAVOURITE, REMOVE_FAVOURITE },\n } = useCommandBarState();\n const { translate } = useIntl();\n const { executeCommand } = useCommandExecutor();\n const navRef = React.useRef(null);\n\n useSignalEffect(() => {\n navRef.current\n ?.querySelector(`li:nth-child(${highlightedItem.value})`)\n ?.scrollIntoView({ behavior: 'smooth', block: 'center' });\n });\n\n const handleToggleFavourite = useCallback(\n (commandId: CommandId) => {\n if (favouriteCommands.value.includes(commandId)) {\n REMOVE_FAVOURITE(commandId);\n } else {\n ADD_FAVOURITE(commandId);\n }\n },\n [favouriteCommands]\n );\n\n const suggestions = useComputed(() => {\n return searchWord.value || selectedCommandGroup.value\n ? []\n : availableCommandIds.value.filter((commandId) => recentCommands.value.includes(commandId));\n });\n const availableCommands = useComputed(() => {\n return searchWord.value || selectedCommandGroup.value\n ? availableCommandIds.value\n : availableCommandIds.value.filter((commandId) => !recentCommands.value.includes(commandId));\n });\n const highlightedCommand = useComputed(() => availableCommandIds.value[highlightedItem.value]);\n\n return (\n \n {suggestions.value.length > 0 && (\n <>\n
{translate('CommandList.suggestions', 'Recently used')}
\n
    \n {suggestions.value.map((commandId) => (\n \n ))}\n
\n \n )}\n {availableCommands.value.length > 0 && (\n <>\n
{translate('CommandList.heading', 'Commands')}
\n
    \n {availableCommands.value.map((commandId) => (\n \n ))}\n
\n \n )}\n {availableCommandIds.value.length === 0 && (\n \n {translate('CommandList.noCommandsMessage', 'No matching commands found')}\n \n )}\n \n );\n};\n\nexport default React.memo(CommandList);\n",".results {\n min-height: 0;\n transition: opacity 0.3s ease-in;\n overflow-y: auto;\n max-height: 60vh;\n height: 100%;\n}\n\n.results h6 {\n color: var(--color-light-text);\n margin: 0.5rem;\n font-size: 0.9em;\n font-weight: normal;\n user-select: none;\n}\n\n.results ul {\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: 0.5em;\n margin: 0;\n}\n\n.noResults {\n padding: 0.5rem;\n}\n\n.disabled {\n opacity: 0.5 !important;\n pointer-events: none;\n user-select: none;\n}\n","import React from 'react';\nimport { useComputed, useSignalEffect } from '@preact/signals';\n\nimport { useCommandBarState, useCommandExecutor, useIntl } from '../../state';\nimport CommandListItem from '../CommandListItem/CommandListItem';\n\nimport * as styles from './CommandResultsView.module.css';\n\nconst CommandResultsView: React.FC = () => {\n const {\n state: { result, highlightedOption, activeCommandId },\n } = useCommandBarState();\n const { executeCommand } = useCommandExecutor();\n const { translate } = useIntl();\n const navRef = React.useRef(null);\n const highlightedId = useComputed(() =>\n result.value ? Object.values(result.value.options)[highlightedOption.value].id : null\n );\n const isLoading = activeCommandId.value !== null;\n\n useSignalEffect(() => {\n const highlightedIndex = highlightedOption.value;\n navRef.current\n ?.querySelector(`li:nth-child(${highlightedIndex})`)\n ?.scrollIntoView({ behavior: 'smooth', block: 'center' });\n });\n\n const { options, view, message } = result.value ?? {};\n\n return (\n
\n {message &&
{message}
}\n {isLoading ?
{translate('CommandResultsView.waitingForResults', 'Waiting for results…')}
: ''}\n {!isLoading && view ?
{view}
: ''}\n {!isLoading && options && (\n \n )}\n
\n );\n};\n\nexport default CommandResultsView;\n",".commandResultsView {\n max-width: 100%;\n overflow: auto;\n}\n\n.message {\n font-size: 1em;\n margin: 0 0 1em;\n}\n\n.results {\n min-height: 0;\n transition: opacity 0.3s ease-in;\n overflow-y: auto;\n max-height: 60vh;\n height: 100%;\n}\n\n.results h6 {\n color: var(--color-light-text);\n margin: 0.5rem;\n font-size: 0.9em;\n font-weight: normal;\n user-select: none;\n}\n\n.results ul {\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: 0.5em;\n margin: 0;\n}\n\n.noResults {\n padding: 0.5rem;\n}\n\n.disabled {\n opacity: 0.5 !important;\n pointer-events: none;\n user-select: none;\n}\n","import React from 'react';\n\nimport * as styles from './ToggleButton.module.css';\nimport { classnames } from '../../helpers';\n\ntype ToggleButtonProps = {\n handleToggle: () => void;\n disabled?: boolean;\n label: string;\n title: string;\n active: boolean;\n};\n\nconst ToggleButton: React.FC = ({ handleToggle, disabled = false, label, title, active }) => {\n return (\n \n {label}\n ⌘K\n \n );\n};\n\nexport default React.memo(ToggleButton);\n",".toggleButton {\n background-color: var(--grayDark);\n border: 1px solid var(--grayMedium);\n color: var(--textSubtleLight);\n border-radius: 6px;\n display: flex;\n align-items: center;\n gap: 0.5em;\n transition: 0.1s ease-out;\n user-select: none;\n padding: 2px 0.3rem 2px 0.5rem;\n cursor: pointer;\n line-height: 1.4em;\n}\n\n.toggleButton:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.toggleButton:not(:disabled):hover {\n background-color: var(--grayLighter);\n color: var(--textOnWhite);\n}\n\n.toggleButtonActive .buttonIcon {\n background-color: var(--primaryBlue);\n}\n\n.buttonIcon {\n background-color: var(--gray);\n border-radius: 3px;\n color: var(--textOnGray);\n font-size: 80%;\n padding: 1px 4px;\n transition: background-color 0.1s ease-out;\n}\n\n.toggleButton:not(:disabled):hover .buttonIcon {\n background-color: var(--primaryBlue);\n}\n","import React, { createContext, useCallback, useContext, useMemo } from 'react';\nimport { signal, computed, ReadonlySignal } from '@preact/signals';\n\nimport { CommandBarEvent, commandBarReducer, CommandBarState } from './commandBarReducer';\nimport { flattenCommands, logger } from '../helpers';\nimport { STATUS, TRANSITION } from './commandBarMachine';\nimport { IconWrapper } from '../components';\n\ninterface CommandBarContextProps {\n commands: HierarchicalCommandList;\n children: JSX.Element;\n IconComponent: React.FC;\n userPreferences: UserPreferencesService;\n}\n\ninterface CommandBarContextValues {\n state: {\n activeCommandId: ReadonlySignal;\n activeCommandMessage: ReadonlySignal;\n availableCommandIds: ReadonlySignal;\n commandQuery: ReadonlySignal;\n commandQueryDirty: ReadonlySignal;\n commands: ReadonlySignal;\n expanded: ReadonlySignal;\n favouriteCommands: ReadonlySignal;\n highlightedItem: ReadonlySignal;\n highlightedOption: ReadonlySignal;\n recentCommands: ReadonlySignal;\n result: ReadonlySignal;\n resultCommandId: ReadonlySignal;\n searchWord: ReadonlySignal;\n selectedCommandGroup: ReadonlySignal;\n showBranding: ReadonlySignal;\n status: ReadonlySignal;\n };\n actions: Record void>;\n Icon: Renderable;\n}\n\nconst CommandBarContext = createContext({} as CommandBarContextValues);\nexport const useCommandBarState = (): CommandBarContextValues => useContext(CommandBarContext);\n\n/**\n * Create the app state and initialize it if it does not exist yet\n */\nfunction createAppState(initialState: CommandBarState) {\n // Define a signal to hold the state\n const commandBarState = signal(initialState);\n\n // Define a function to dispatch events to the reducer and its state machine and update the state with the result\n const dispatch = (event: CommandBarEvent) => {\n commandBarState.value = commandBarReducer(commandBarState.value, event);\n };\n\n // Derive readonly selectors for partial state values\n const activeCommandId = computed(() => commandBarState.value.activeCommandId);\n const activeCommandMessage = computed(() => commandBarState.value.activeCommandMessage);\n const availableCommandIds = computed(() => commandBarState.value.availableCommandIds);\n const commandQuery = computed(() => commandBarState.value.commandQuery);\n const commandQueryDirty = computed(() => commandBarState.value.commandQueryDirty);\n const commands = computed(() => commandBarState.value.commands);\n const expanded = computed(() => commandBarState.value.expanded);\n const favouriteCommands = computed(() => commandBarState.value.favouriteCommands);\n const highlightedItem = computed(() => commandBarState.value.highlightedItem);\n const highlightedOption = computed(() => commandBarState.value.highlightedOption);\n const recentCommands = computed(() => commandBarState.value.recentCommands);\n const result = computed(() => commandBarState.value.result);\n const resultCommandId = computed(() => commandBarState.value.resultCommandId);\n const searchWord = computed(() => commandBarState.value.searchWord);\n const selectedCommandGroup = computed(() => commandBarState.value.selectedCommandGroup);\n const showBranding = computed(() => commandBarState.value.showBranding);\n const status = computed(() => commandBarState.value.status);\n\n return {\n state: {\n activeCommandId,\n activeCommandMessage,\n availableCommandIds,\n commandQuery,\n commandQueryDirty,\n commands,\n expanded,\n favouriteCommands,\n highlightedItem,\n highlightedOption,\n recentCommands,\n result,\n resultCommandId,\n searchWord,\n selectedCommandGroup,\n showBranding,\n status,\n },\n dispatch,\n };\n}\n\nexport const CommandBarStateProvider: React.FC = ({\n commands,\n children,\n IconComponent,\n userPreferences,\n}) => {\n const { state, dispatch } = useMemo(() => {\n return createAppState({\n activeCommandId: null,\n activeCommandMessage: null,\n availableCommandIds: Object.keys(commands),\n commandQuery: '',\n commandQueryDirty: false,\n commands: flattenCommands(commands),\n expanded: false,\n favouriteCommands: userPreferences.favouriteCommands,\n highlightedItem: 0,\n highlightedOption: 0,\n recentCommands: userPreferences.recentCommands,\n result: null,\n resultCommandId: null,\n searchWord: '',\n selectedCommandGroup: null,\n showBranding: userPreferences.showBranding,\n status: STATUS.COLLAPSED,\n });\n }, []);\n\n // Provide all actions as shorthand functions\n const actions: Record void | Promise> = useMemo(() => {\n return {\n [TRANSITION.RESET_SEARCH]: () => dispatch({ type: TRANSITION.RESET_SEARCH }),\n [TRANSITION.HIGHLIGHT_NEXT_ITEM]: () => dispatch({ type: TRANSITION.HIGHLIGHT_NEXT_ITEM }),\n [TRANSITION.HIGHLIGHT_PREVIOUS_ITEM]: () => dispatch({ type: TRANSITION.HIGHLIGHT_PREVIOUS_ITEM }),\n [TRANSITION.CANCEL]: () => dispatch({ type: TRANSITION.CANCEL }),\n [TRANSITION.SELECT_GROUP]: (commandId: CommandId) => dispatch({ type: TRANSITION.SELECT_GROUP, commandId }),\n [TRANSITION.GO_TO_PARENT_GROUP]: () => dispatch({ type: TRANSITION.GO_TO_PARENT_GROUP }),\n [TRANSITION.UPDATE_SEARCH]: (searchWord: string) =>\n dispatch({ type: TRANSITION.UPDATE_SEARCH, searchWord }),\n [TRANSITION.UPDATE_COMMAND_QUERY]: (commandQuery: string) =>\n dispatch({ type: TRANSITION.UPDATE_COMMAND_QUERY, commandQuery }),\n [TRANSITION.EXECUTE_COMMAND]: async (commandId: CommandId, message: string) => {\n dispatch({\n type: TRANSITION.EXECUTE_COMMAND,\n commandId,\n message,\n });\n // Update recent commands in the user preferences when a command is executed\n return userPreferences\n .addRecentCommand(commandId)\n .catch((e) => logger.error('Could not add recent command', e));\n },\n [TRANSITION.FINISH_COMMAND]: () => dispatch({ type: TRANSITION.FINISH_COMMAND }),\n [TRANSITION.UPDATE_RESULT]: (result: CommandResult) => dispatch({ type: TRANSITION.UPDATE_RESULT, result }),\n [TRANSITION.EXPAND]: () => dispatch({ type: TRANSITION.EXPAND }),\n [TRANSITION.ADD_FAVOURITE]: (commandId: CommandId) => {\n dispatch({ type: TRANSITION.ADD_FAVOURITE, commandId });\n return userPreferences\n .setFavouriteCommands(state.favouriteCommands.value)\n .catch((e) => logger.error('Could not update favourite commands', e));\n },\n [TRANSITION.REMOVE_FAVOURITE]: (commandId: CommandId) => {\n dispatch({ type: TRANSITION.REMOVE_FAVOURITE, commandId });\n return userPreferences\n .setFavouriteCommands(state.favouriteCommands.value)\n .catch((e) => logger.error('Could not update favourite commands', e));\n },\n };\n }, []);\n\n const Icon: React.FC = useCallback(({ icon, spin = false }) => {\n return (\n \n \n \n );\n }, []);\n\n return {children};\n};\n","import React, { useCallback, useEffect } from 'react';\n\nimport useFunctionRef from '../hooks/useFunctionRef';\nimport { useCommandBarState } from './CommandBarStateProvider';\nimport { assert, logger } from '../helpers';\nimport { STATUS } from './commandBarMachine';\n\ninterface CommandInputContextProps {\n children: React.ReactElement | React.ReactElement[];\n toggleOpen: () => void;\n dialogRef: React.RefObject;\n open: boolean;\n}\n\ninterface CommandInputContextValues {\n executeCommand: (commandId: CommandId) => void;\n}\n\nconst CommandInputContext = React.createContext({} as CommandInputContextValues);\nexport const useCommandExecutor = (): CommandInputContextValues => React.useContext(CommandInputContext);\n\n/**\n * Context provider for the command bar input and command execution\n */\nexport const CommandBarExecutor: React.FC = ({ children, toggleOpen, dialogRef, open }) => {\n const { state, actions } = useCommandBarState();\n\n const handleKeyEnteredRef = useFunctionRef((e: KeyboardEvent | React.KeyboardEvent) => {\n if (!open || e.defaultPrevented) {\n return;\n }\n if (e.key === 'k' && (e.metaKey || e.ctrlKey) && dialogRef?.current.contains(e.target as Node)) {\n // Close command bar\n toggleOpen();\n e.stopPropagation();\n e.preventDefault();\n } else if (e.key === 'Escape') {\n // Cancel search, or selection, or close command bar\n e.stopPropagation();\n e.preventDefault();\n if (\n state.selectedCommandGroup.value ||\n state.searchWord.value ||\n state.commandQuery.value ||\n state.result.value\n ) {\n actions.CANCEL();\n } else {\n // Close command bar if cancel is noop\n toggleOpen();\n }\n } else if (e.key === 'ArrowDown') {\n // Navigate to next command\n e.stopPropagation();\n e.preventDefault();\n actions.HIGHLIGHT_NEXT_ITEM();\n } else if (e.key === 'ArrowUp') {\n // Navigate to previous command\n e.stopPropagation();\n e.preventDefault();\n actions.HIGHLIGHT_PREVIOUS_ITEM();\n } else if (e.key === 'Enter') {\n // Execute highlighted command\n e.stopPropagation();\n e.preventDefault();\n\n // Select the highlighted command by default\n let commandId = state.availableCommandIds.value[state.highlightedItem.value];\n if (state.status.value === STATUS.DISPLAYING_RESULT) {\n // If there are options the command to execute is the highlighted option\n if (!state.commandQueryDirty.value && Object.values(state.result.value.options).length) {\n commandId = Object.keys(state.result.value.options)[state.highlightedOption.value];\n } else {\n // If there are no options we run the command which generated the result again\n commandId = state.resultCommandId.value;\n }\n }\n\n if (commandId) {\n void executeCommand(commandId);\n }\n }\n });\n\n const executeCommand = useCallback(\n async (commandId: CommandId) => {\n const command = state.result.value?.options[commandId] ?? state.commands.value[commandId];\n const { action, canHandleQueries, subCommandIds, name } = command;\n\n // If the command is a group, select it\n if (subCommandIds?.length > 0) {\n actions.SELECT_GROUP(commandId);\n return;\n }\n\n assert(action, `Command ${commandId} has no action`);\n\n // If the command is a url, open it\n if (typeof action == 'string') {\n // We wait for the state change to be finished before opening the url\n await actions.EXECUTE_COMMAND(commandId, 'Loading url');\n\n // We need to check if the url is in the same domain, otherwise we need to open it in a new tab\n // TODO: We should add another option to a link command to define its target\n if (action.indexOf('http') === 0 && action.indexOf(document.location.origin) !== 0) {\n window.open(action, '_blank', 'noopener,noreferrer')?.focus();\n } else {\n window.location.href = action;\n }\n return actions.FINISH_COMMAND();\n }\n\n // If the command is a function, execute it\n actions.EXECUTE_COMMAND(commandId, 'Running command');\n const actionResult = action(canHandleQueries ? state.commandQuery.value : undefined);\n if ((actionResult as AsyncCommandResult).then) {\n // Handle Promises\n (actionResult as AsyncCommandResult)\n .then((result) => {\n if (result && !result.success) {\n throw new Error(`The command \"${name}\" failed`);\n }\n })\n .catch((error) => {\n // TODO: Show an error message to the user\n logger.error('Command error', name, error);\n })\n .finally(() => {\n actions.FINISH_COMMAND();\n });\n } else if ((actionResult as CommandGeneratorResult).next) {\n // Handle generators\n const generator = actionResult as CommandGeneratorResult;\n // TODO: Handle errors / success === false\n for await (const result of generator) {\n actions.UPDATE_RESULT(result);\n }\n actions.FINISH_COMMAND();\n } else {\n logger.error('Command result is not a promise or generator', actionResult);\n }\n\n if (command.closeOnExecute) {\n toggleOpen();\n }\n },\n [state.searchWord, state.commands, state.result]\n );\n\n const executeCommandRef = useFunctionRef((commandId: CommandId) => {\n void executeCommand(commandId);\n });\n\n /**\n * Add key event handler, needs to be updated when any parameter for the key event handler changes\n */\n useEffect(() => {\n if (!open) return;\n\n // const guestFrame = document.getElementsByName('neos-content-main')[0] as HTMLIFrameElement;\n // guestFrame.contentWindow?.addEventListener('keyup', (e) => {\n // log.debug('keypress in guestframe', e);\n // });\n // log.debug('guestFrame', guestFrame.contentWindow);\n\n const windowKeyEventHandler = (e) => handleKeyEnteredRef.current(e);\n\n window.addEventListener('keydown', windowKeyEventHandler);\n return () => window.removeEventListener('keydown', windowKeyEventHandler);\n }, [open]);\n\n return (\n \n {children}\n \n );\n};\n","import React, { createContext, ReactNode, useContext } from 'react';\n\ntype IntlProviderProps = {\n children: ReactNode;\n translate: TranslateFunction;\n};\n\ntype IntlProviderValues = {\n translate: TranslateFunction;\n};\n\nexport const IntlContext = createContext({} as IntlProviderValues);\nexport const useIntl = (): IntlProviderValues => useContext(IntlContext);\n\nexport const IntlProvider = ({ translate, children }: IntlProviderProps) => {\n return {children};\n};\n","import React, { CSSProperties, DragEventHandler, useCallback, useEffect, useRef } from 'react';\nimport { batch, useComputed, useSignal } from '@preact/signals';\n\nimport { CommandBarFooter, CommandBarHeader, CommandList, CommandResultsView } from '../index';\nimport { CommandBarExecutor, useCommandBarState } from '../../state';\nimport { clamp, classnames } from '../../helpers';\n\nimport * as styles from './CommandBarDialog.module.css';\n\ninterface CommandBarDialogProps {\n onDrag?: (state: boolean) => void;\n open: boolean;\n toggleOpen: () => void;\n}\n\nconst CommandBarDialog: React.FC = ({ onDrag, open, toggleOpen }) => {\n const {\n state: { expanded, result },\n } = useCommandBarState();\n const dialogRef = useRef(null);\n\n const isDragging = useSignal(false);\n const dialogPosition = useSignal<{\n left: number;\n top: number;\n }>({\n left: window.innerWidth / 2 - 300,\n top: window.innerHeight / 2 - 20,\n });\n const dragStateOffset = useSignal<{\n offsetLeft: number;\n offsetTop: number;\n }>({\n offsetLeft: 0,\n offsetTop: 0,\n });\n const hasBeenDragged = useSignal(false);\n\n const dialogStyle = useComputed(() => {\n const { left, top } = dialogPosition.value;\n return (\n hasBeenDragged.value\n ? {\n left: left + 'px',\n top: top + 'px',\n translate: 'none',\n visibility: isDragging.value ? 'hidden' : 'visible',\n }\n : {}\n ) as CSSProperties;\n });\n\n const reposition = useCallback((left: number, top: number) => {\n const dialogSize = dialogRef.current.getBoundingClientRect();\n dialogPosition.value = {\n left: clamp(left, 0, window.innerWidth - dialogSize.width),\n top: clamp(top, 0, window.innerHeight - dialogSize.height),\n };\n }, []);\n\n const handleDragStart: DragEventHandler = useCallback(\n (e) => {\n // @ts-ignore\n if (e.target.tagName === 'INPUT') {\n return;\n }\n console.debug('dragstart');\n e.dataTransfer.setData('text/plain', 'CommandBar');\n e.dataTransfer.dropEffect = 'move';\n e.dataTransfer.effectAllowed = 'move';\n\n batch(() => {\n dragStateOffset.value = {\n offsetLeft: e.clientX - dialogRef.current.offsetLeft,\n offsetTop: e.clientY - dialogRef.current.offsetTop,\n };\n hasBeenDragged.value = true;\n });\n\n onDrag && onDrag(true);\n },\n [dialogRef.current]\n );\n\n const handleDragDrop = useCallback(\n (e: DragEvent) => {\n const { clientX, clientY } = e;\n console.debug('dragdrop', clientX, clientY, dragStateOffset.value);\n batch(() => {\n isDragging.value = false;\n reposition(clientX - dragStateOffset.value.offsetLeft, clientY - dragStateOffset.value.offsetTop);\n });\n onDrag && onDrag(false);\n },\n [dialogRef.current]\n );\n\n const onResize = useCallback(() => reposition(dialogPosition.value.left, dialogPosition.value.top), []);\n\n useEffect(() => {\n if (!open) return;\n dialogRef.current?.parentElement?.addEventListener('drop', handleDragDrop);\n window.addEventListener('resize', onResize);\n return () => {\n dialogRef.current?.parentElement?.removeEventListener('drop', handleDragDrop);\n window.removeEventListener('resize', onResize);\n };\n }, [open, onResize, handleDragDrop]);\n\n if (!open) {\n return null;\n }\n\n return (\n (isDragging.value = true)}\n style={dialogStyle.value}\n data-testid=\"CommandBarDialog\"\n >\n \n \n \n {expanded.value && }\n {result.value && }\n
\n \n \n \n );\n};\n\nexport default CommandBarDialog;\n",".commandBar {\n backdrop-filter: blur(var(--dialog-blur));\n background: var(--bar-background);\n border-radius: var(--border-radius-bar, 5);\n border: 1px solid var(--color-border);\n box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);\n color: white;\n display: flex;\n flex-direction: column;\n left: 50%;\n margin: 0;\n max-width: var(--bar-max-width);\n min-width: var(--bar-min-width);\n max-height: 90vh;\n overflow: hidden;\n position: absolute;\n padding: 0;\n top: 50%;\n translate: -50% -50%;\n width: var(--bar-width);\n pointer-events: all;\n transition: width 0.1s ease-out;\n}\n\n.commandBar.hasResults {\n width: var(--bar-width-expanded);\n}\n\n.commandBar small {\n color: var(--color-light-text);\n font-size: 90%;\n}\n\n.commandBar ::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n}\n\n.commandBar ::-webkit-scrollbar-track {\n background-color: transparent;\n}\n\n.commandBar ::-webkit-scrollbar-thumb {\n background-color: var(--grayLight);\n}\n\n.commandBar ::-webkit-scrollbar-corner {\n background-color: var(--grayDark);\n}\n\n.resultsWrap {\n display: grid;\n grid-template-rows: 0fr;\n transform-origin: top center;\n transition: grid-template-rows 0.2s ease-in;\n overflow: auto;\n}\n\n.resultsWrap > * {\n opacity: 0;\n}\n\n.resultsWrap.expanded {\n grid-template-rows: 1fr;\n}\n\n.resultsWrap.expanded > * {\n opacity: 1;\n padding: 0.5rem;\n}\n.resultsWrap.split {\n grid-template-columns: 1fr 1fr;\n}\n","import React from 'react';\n\nimport { CommandBarStateProvider, IntlProvider } from './state';\nimport CommandBarDialog from './components/CommandBarDialog/CommandBarDialog';\n\ntype CommandBarProps = {\n commands: HierarchicalCommandList;\n open: boolean;\n toggleOpen: () => void;\n onDrag?: (state: boolean) => void;\n IconComponent: React.FC;\n userPreferences: UserPreferencesService;\n translate: TranslateFunction;\n};\n\nconst CommandBar: React.FC = ({\n commands,\n open,\n toggleOpen,\n onDrag,\n IconComponent,\n userPreferences,\n translate,\n}) => {\n return (\n \n \n \n \n \n );\n};\n\nexport default CommandBar;\n","export async function fetchData(endpoint: string, params?: Record, method = 'GET'): Promise {\n if (params && method === 'GET') {\n endpoint = Object.keys(params).reduce((url, key) => {\n return url + '&' + key + '=' + encodeURIComponent(params[key]);\n }, endpoint + '?');\n }\n return fetch(endpoint, {\n method,\n credentials: 'include',\n body: params && method === 'POST' ? JSON.stringify(params) : undefined,\n headers: {\n // FIXME: Include CSRF Token\n // 'X-Flow-Csrftoken': csrfToken,\n 'Content-Type': 'application/json',\n Accept: 'application/json',\n },\n }).then((response: Response) => {\n if (response.status !== 200) {\n throw new Error(`The request failed with code ${response.status}: \"${response.statusText}\"`);\n }\n if (response.headers.get('Content-Type')?.includes('application/json')) {\n return response.json();\n }\n return response.text();\n }) as Promise;\n}\n","import { fetchData } from './fetch';\n\nconst ENDPOINT_GET_PREFERENCES = '/neos/shel-neos-commandbar/preferences/getpreferences';\nconst ENDPOINT_SET_FAVOURITE_COMMANDS = '/neos/shel-neos-commandbar/preferences/setfavourites';\nconst ENDPOINT_ADD_RECENT_COMMAND = '/neos/shel-neos-commandbar/preferences/addrecentcommand';\nconst ENDPOINT_ADD_RECENT_DOCUMENT = '/neos/shel-neos-commandbar/preferences/addrecentdocument';\n\nasync function setPreference(endpoint: string, data: any): Promise {\n return fetchData(endpoint, data, 'POST');\n}\n\nexport async function getPreferences() {\n return fetchData(ENDPOINT_GET_PREFERENCES);\n}\n\nexport async function setFavouriteCommands(commandIds: CommandId[]) {\n return setPreference(ENDPOINT_SET_FAVOURITE_COMMANDS, { commandIds });\n}\n\nexport async function addRecentCommand(commandId: CommandId) {\n // TODO: Check if sendBeacon is a better option here to reduce the impact on the user\n return setPreference(ENDPOINT_ADD_RECENT_COMMAND, { commandId });\n}\n\nexport async function addRecentDocument(nodeContextPath: NodeContextPath) {\n // TODO: Check if sendBeacon is a better option here to reduce the impact on the user\n return setPreference(ENDPOINT_ADD_RECENT_DOCUMENT, { nodeContextPath });\n}\n","import { fetchData } from './fetch';\n\nconst ENDPOINT_COMMANDS = '/neos/service/data-source/shel-neos-commandbar-commands';\n\nexport async function getCommands() {\n return fetchData(ENDPOINT_COMMANDS);\n}\n","import { fetchData } from './fetch';\n\nconst ENDPOINT_SEARCH_NEOS_DOCS = '/neos/service/data-source/shel-neos-commandbar-search-neos-docs';\n\nexport async function searchNeosDocs(query: string): Promise {\n return query ? fetchData(ENDPOINT_SEARCH_NEOS_DOCS, { query }) : {};\n}\n","import { fetchData } from './fetch';\n\nconst ENDPOINT_SEARCH_NEOS_PACKAGES = '/neos/service/data-source/shel-neos-commandbar-search-neos-packages';\n\nexport async function searchNeosPackages(query: string): Promise {\n return query ? fetchData(ENDPOINT_SEARCH_NEOS_PACKAGES, { query }) : {};\n}\n",".pluginWrap {\n display: flex;\n align-items: center;\n height: 41px;\n font-size: 14px !important;\n line-height: 20px;\n margin: 0 1rem;\n}\n\n.fullScreenLayer {\n width: 100vw;\n height: 100vh;\n position: absolute;\n left: 0;\n top: 0;\n pointer-events: none;\n z-index: 9999;\n display: none;\n}\n\n.open {\n display: block;\n}\n\n@keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(359deg); }\n}\n\n.spin {\n animation: spin 2s linear infinite;\n}\n","import React from 'preact/compat';\nimport * as styles from './ModulePlugin.module.css';\n\n/**\n * As we don't have font awesome in the shadow dom, we need to render a fallback icon for commands\n */\nconst IconComponent: React.FC = ({ spin = false }) => {\n return (\n \n \n \n );\n};\n\nexport default IconComponent;\n","import { Component } from 'preact';\nimport React from 'preact/compat';\n\nimport { classnames, CommandBar, logger, ToggleButton } from '@neos-commandbar/commandbar';\nimport { PreferencesApi, CommandsApi, DocumentationApi, PackagesApi } from '@neos-commandbar/neos-api';\nimport IconComponent from './IconComponent';\n\nimport * as styles from './ModulePlugin.module.css';\nimport * as theme from '@neos-commandbar/commandbar/src/Theme.module.css';\n\n/**\n * This is a custom element that is used to render the command bar inside a shadow dom to prevent Neos and module\n * styles from leaking into the component\n */\nexport default class App extends Component<\n {\n styleuri: string;\n },\n {\n initialized: boolean;\n open: boolean;\n dragging: boolean;\n commands: HierarchicalCommandList;\n preferences: {\n favouriteCommands: CommandId[];\n recentCommands: CommandId[];\n recentDocuments: RecentDocument[];\n showBranding: boolean;\n };\n }\n> {\n static tagName = 'command-bar-container';\n static options = { shadow: true };\n private static i18nRegistry: NeosI18n;\n\n constructor() {\n super();\n App.i18nRegistry = (window as NeosModuleWindow).NeosCMS.I18n;\n this.state = {\n initialized: false,\n open: false,\n dragging: false,\n // TODO: Only load the search commands in dev context\n commands: {\n searchNeosDocs: {\n name: App.translate('CommandBarUiPlugin.command.documentation', 'Documentation'),\n description: App.translate(\n 'CommandBarUiPlugin.command.documentation.description',\n 'Browse or search the Neos documentation'\n ),\n icon: 'book',\n canHandleQueries: true,\n action: this.handleSearchNeosDocs.bind(this),\n },\n searchNeosPackages: {\n name: App.translate('CommandBarUiPlugin.command.packages', 'Packages'),\n description: App.translate(\n 'CommandBarUiPlugin.command.packages.description',\n 'Search for Neos packages'\n ),\n icon: 'boxes',\n canHandleQueries: true,\n action: this.handleSearchNeosPackages.bind(this),\n },\n },\n preferences: { favouriteCommands: [], recentCommands: [], recentDocuments: [], showBranding: true },\n };\n }\n\n /**\n * Wrapper for the Neos backend translation api\n */\n private static translate: TranslateFunction = (id, paramsOrFallback, fallback) => {\n if (typeof paramsOrFallback === 'string') {\n fallback = paramsOrFallback;\n paramsOrFallback = {};\n }\n return App.i18nRegistry.translate(id, fallback, 'Shel.Neos.CommandBar', 'Main', paramsOrFallback);\n };\n\n /**\n * Load the commands and preferences from the server and set the state to initialized\n */\n async componentDidMount() {\n try {\n const preferences = await PreferencesApi.getPreferences();\n const commands = await CommandsApi.getCommands();\n this.setState((prev) => ({ initialized: true, preferences, commands: { ...prev.commands, ...commands } }));\n\n document.addEventListener('keydown', (e) => {\n if (e.key === 'k' && (e.metaKey || e.ctrlKey)) {\n e.stopPropagation();\n e.preventDefault();\n this.handleToggle();\n }\n });\n } catch (e) {\n logger.error(e);\n }\n }\n\n handleToggle = () => {\n this.setState(({ open }) => ({\n open: !open,\n }));\n };\n\n handleDrag = (dragging: boolean) => {\n this.setState({ dragging: dragging });\n };\n\n handleSearchNeosDocs = async function* (query: string): CommandGeneratorResult {\n yield {\n success: true,\n message: App.translate(\n 'CommandBarUiPlugin.command.documentation.searching',\n { query },\n `Search for \"${query}\"`\n ),\n };\n let error;\n const options = await DocumentationApi.searchNeosDocs(query).catch((e) => {\n logger.error('Could not search Neos docs', e);\n error = e.message;\n });\n if (error || !options) {\n yield {\n success: false,\n message: App.translate('CommandBarUiPlugin.command.documentation.error', 'Search failed'),\n view: error,\n };\n } else {\n yield {\n success: true,\n message: App.translate(\n 'CommandBarUiPlugin.command.documentation.matches',\n { matches: Object.keys(options).length },\n `${Object.values(options).length} options match your query`\n ),\n options,\n };\n }\n };\n\n handleSearchNeosPackages = async function* (query: string): CommandGeneratorResult {\n yield {\n success: true,\n message: App.translate('CommandBarUiPlugin.command.packages.searching', { query }, `Search for \"${query}\"`),\n };\n let error;\n const options = await PackagesApi.searchNeosPackages(query).catch((e) => {\n logger.error('Could not search Neos packages', e);\n error = e.message;\n });\n if (error || !options) {\n yield {\n success: false,\n message: App.translate('CommandBarUiPlugin.command.packages.error', 'Search failed'),\n view: error,\n };\n } else {\n yield {\n success: true,\n message: App.translate(\n 'CommandBarUiPlugin.command.packages.matches',\n { matches: Object.values(options).length },\n `${Object.values(options).length} options match your query`\n ),\n options,\n };\n }\n };\n\n render() {\n const { initialized, open, dragging, commands, preferences } = this.state;\n\n return (\n <>\n \n
\n \n {initialized && (\n e.preventDefault()}\n style={dragging ? { pointerEvents: 'all' } : null}\n >\n \n
\n )}\n \n \n );\n }\n}\n",".commandBarTheme {\n --bar-min-width: 600px;\n --bar-max-width: 90vw;\n --bar-width: 30vw;\n --bar-width-expanded: 60vw;\n --bar-background: rgba(0, 0, 0, 0.8);\n --footer-background: rgba(0, 0, 0, 0.8);\n --color-shadow: rgba(255, 255, 255, 0.7);\n --color-light-text: rgba(255, 255, 255, 0.6);\n --color-light-text-hover: rgba(255, 255, 255, 0.8);\n --color-icon-bg: rgba(255, 255, 255, 0.2);\n --color-icon-bg-hover: rgba(255, 255, 255, 0.4);\n --color-border: rgba(255, 255, 255, 0.2);\n --color-item-highlighted: rgba(255, 255, 255, 0.15);\n --color-item-hover: rgba(255, 255, 255, 0.05);\n --border-radius-bar: 0.6rem;\n --border-radius-item: 0.4rem;\n --icon-size: 1.125em;\n --dialog-blur: 5px;\n\n /* Neos UI colors */\n --grayLight: #3f3f3f;\n --grayLighter: #eee;\n --grayMedium: #323232;\n --grayDark: #222;\n --gray: #555;\n --textSubtleLight: #adadad;\n --textOnGray: #fff;\n --textOnWhite: #252525;\n --primaryBlue: #00adee;\n --success: #00a338;\n --warn: #ff8700;\n}\n","import register from 'preact-custom-element';\n\nimport App from './App';\n\n// @ts-ignore\nif (process.env.NODE_ENV !== 'production') {\n // @ts-ignore\n require('preact/debug');\n}\n\nfunction initializeApp() {\n // Prevent registering the custom element twice\n if (window['SHEL_NEOS_COMMANDBAR_INITIALIZED']) return;\n window['SHEL_NEOS_COMMANDBAR_INITIALIZED'] = true;\n\n // Register & add the debug web component, tagName and attributes are automatically read from the component\n register(App, null, null, App.options);\n\n // Get the top bar left container and create a custom element to render the command bar into\n const topBarLeft = document.querySelector('.neos-top-bar-left');\n const pluginContainer = document.createElement('command-bar-container');\n pluginContainer.id = 'shel-neos-commandbar';\n\n // Get the style tag of the command bar package from the HTML head to also load it inside the custom element\n const commandBarStyleTag = document.querySelector(\n 'link[rel=\"stylesheet\"][href*=\"Shel.Neos.CommandBar\"]'\n ) as HTMLLinkElement;\n pluginContainer.setAttribute('styleuri', commandBarStyleTag.href);\n\n topBarLeft.appendChild(pluginContainer);\n}\n\n// If the api is already initialized, initialize the app as the event listener wouldn't be called anymore\nif (window.NeosCMS?.I18n?.initialized) {\n initializeApp();\n} else {\n window.addEventListener('neoscms-i18n-initialized', initializeApp);\n}\n"],"names":["slice","options","vnodeId","rerenderQueue","prevDebounce","defer","i","EMPTY_OBJ","EMPTY_ARR","IS_NON_DIMENSIONAL","assign","obj","props","removeNode","node","parentNode","removeChild","createElement","type","children","key","ref","normalizedProps","arguments","length","call","defaultProps","createVNode","original","vnode","__k","__","__b","__e","__d","__c","__h","constructor","__v","Fragment","Component","context","this","getDomSibling","childIndex","indexOf","sibling","updateParentDomPointers","child","base","enqueueRender","c","push","process","__r","debounceRendering","renderQueueLength","component","commitQueue","oldVNode","oldDom","parentDom","sort","a","b","shift","diff","ownerSVGElement","commitRoot","diffChildren","renderResult","newParentVNode","oldParentVNode","globalContext","isSvg","excessDomChildren","isHydrating","j","childVNode","newDom","firstChildDom","refs","oldChildren","oldChildrenLength","Array","isArray","reorderChildren","placeChild","getLastDom","nextSibling","unmount","applyRef","tmp","toChildArray","out","some","nextDom","sibDom","outer","appendChild","insertBefore","lastDom","setStyle","style","value","setProperty","test","dom","name","oldValue","useCapture","o","cssText","replace","toLowerCase","l","addEventListener","eventProxyCapture","eventProxy","removeEventListener","e","removeAttribute","setAttribute","event","newVNode","isNew","oldProps","oldState","snapshot","clearProcessingException","newProps","provider","componentContext","renderHook","count","newType","contextType","__E","prototype","render","doRender","sub","state","__n","_sb","__s","getDerivedStateFromProps","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","forEach","componentWillUpdate","componentDidUpdate","__P","getChildContext","getSnapshotBeforeUpdate","oldHtml","newHtml","nodeType","localName","document","createTextNode","createElementNS","is","data","childNodes","dangerouslySetInnerHTML","attributes","__html","innerHTML","diffProps","hydrate","checked","diffElementNodes","diffed","root","cb","current","parentVNode","skipRemove","r","componentWillUnmount","replaceNode","firstChild","cloneElement","createContext","defaultValue","contextId","Consumer","contextValue","Provider","subs","ctx","_props","old","splice","$8ce2b6e41a0de290$var$r","Object","t","n","hasOwnProperty","apply","ContextProvider","rest","connectedCallback","CustomEvent","detail","bubbles","cancelable","dispatchEvent","_vdom","h","toVdom","element","nodeName","cn","toCamelCase","slot","Slot","wrappedChildren","_vdomComponent","hasAttribute","_root","str","_","toUpperCase","attributeChangedCallback","newValue","disconnectedCallback","_this","_listener","stopPropagation","tagName","propNames","PreactElement","inst","Reflect","construct","HTMLElement","shadow","attachShadow","mode","create","observedAttributes","keys","propTypes","defineProperty","get","set","v","customElements","define","displayName","error","errorInfo","ctor","handled","getDerivedStateFromError","setState","componentDidCatch","update","callback","s","forceUpdate","Promise","then","bind","resolve","setTimeout","isStaticChildren","__source","__self","currentIndex","currentComponent","previousComponent","prevRaf","currentHook","afterPaintEffects","EMPTY","oldBeforeDiff","oldBeforeRender","oldAfterDiff","oldCommit","oldBeforeUnmount","getHookState","index","hooks","__H","__V","useState","initialState","useReducer","invokeOrReturn","reducer","init","hookState","_reducer","action","currentValue","__N","nextValue","_hasScuFromHooks","prevScu","p","stateHooks","filter","x","every","shouldUpdate","hookItem","useEffect","args","argsChanged","_pendingArgs","useLayoutEffect","useRef","initialValue","useMemo","factory","useCallback","useContext","flushAfterPaintEffects","invokeCleanup","invokeEffect","requestAnimationFrame","afterNextFrame","hasErrored","HAS_RAF","raf","done","clearTimeout","timeout","cancelAnimationFrame","hook","comp","cleanup","oldArgs","newArgs","arg","f","shallowDiffers","y","PureComponent","isPureReactComponent","oldDiffHook","__f","REACT_FORWARD_SYMBOL","Symbol","for","mapFn","fn","map","Children","only","normalized","toArray","oldCatchError","oldUnmount","detachedClone","detachedParent","effect","removeOriginal","originalParent","Suspense","__u","_suspenders","suspended","__a","SuspenseList","_next","_map","__R","promise","suspendingVNode","suspendingComponent","resolved","onResolved","onSuspensionComplete","suspendedVNode","pop","wasHydrating","detachedComponent","__O","fallback","list","delete","revealOrder","size","Portal","container","_container","_temp","before","delegated","unsuspend","wrappedUnsuspend","Map","reverse","REACT_ELEMENT_TYPE","CAMEL_PROPS","IS_DOM","onChangeInputType","isReactComponent","configurable","writable","oldEventHook","empty","isPropagationStopped","cancelBubble","isDefaultPrevented","defaultPrevented","persist","nativeEvent","classNameDescriptor","class","oldVNodeHook","nonCustomElement","multiple","selected","className","enumerable","$$typeof","oldDiffed","isValidElement","startTransition","useId","__m","mask","useInsertionEffect","useTransition","useDeferredValue","val","useSyncExternalStore","subscribe","getSnapshot","_useState","_instance","_getSnapshot","useImperativeHandle","createHandle","concat","useDebugValue","formatter","version","parent","textContent","preactRender","preactHydrate","unmountComponentAtNode","createPortal","el","containerInfo","createFactory","preactCloneElement","createRef","findDOMNode","memo","comparer","nextProps","updateRef","Memoed","forwardRef","Forwarded","clone","flushSync","unstable_batchedUpdates","StrictMode","lazy","loader","prom","Lazy","exports","default","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentDispatcher","readContext","$1b06254f22bdd07e$export$2e2bcd8739ae039","fnRef","$d6bdfea1a1e13052$export$b8f5890fc79d6aca","cycleDetected","Error","endBatch","batchDepth","hasError","batchedEffect","_effect","batchIteration","next","_nextBatchedEffect","_flags","needsToRecompute","_callback","err","batch","evalContext","globalVersion","addDependency","signal","_node","_target","_version","_source","_prevSource","_sources","_nextSource","_prevTarget","_nextTarget","_rollbackNode","_subscribe","Signal","_value","_targets","target","_refresh","prepareSources","rollbackNode","cleanupSources","head","prev","_unsubscribe","Computed","compute","_compute","_globalVersion","computed","cleanupEffect","_cleanup","prevContext","disposeEffect","endEffect","Effect","_dispose","hookName","hookFn","setCurrentUpdater","updater","finishUpdate","_start","Text","_ref","currentSignal","useSignal","_updateFlags","_updater","peek","createPropUpdater","prop","propSignal","setAsProperty","changeSignal","_update","newSignal","useComputed","$compute","useSignalEffect","$edcc64b978b003b2$export$2e2bcd8739ae039","commands","parentId","reduce","commandList","commandId","icon","description","subCommands","canHandleQueries","closeOnExecute","category","executeManually","absoluteCommandId","subCommandIds","subCommandId","id","flag","valueOf","toString","_notify","OUTDATED","finish","defineProperties","signalProps","__np","renderedProps","_updaters","updaters","_signal","_updater2","HAS_PENDING_UPDATE","_i","$ea926074f08a4cd5$var$PREFIX","$ea926074f08a4cd5$export$2e2bcd8739ae039","ok","message","console","log","warn","debug","$197034fc7f52566b$export$2e2bcd8739ae039","min","max","Math","$44ee2883445aae00$var$cmp","Intl","Collator","compare","$44ee2883445aae00$var$inf","Infinity","$44ee2883445aae00$var$NEGS_RE","$44ee2883445aae00$var$OPTS","interSplit","intraSplit","intraBound","interLft","interRgt","interChars","interIns","intraChars","intraIns","intraContr","intraMode","intraSlice","intraSub","intraTrn","intraDel","intraFilt","term","match","info","haystack","needle","idx","chars","terms","interLft2","interLft1","start","ia","ib","$44ee2883445aae00$var$lazyRepeat","limit","$44ee2883445aae00$var$mode2Tpl","$44ee2883445aae00$export$2e2bcd8739ae039","opts","_intraSplit","_interSplit","_intraBound","intraRules","_intraSlice","_intraIns","_intraSub","_intraTrn","_intraDel","plen","withIntraSplit","RegExp","trimRe","contrsRe","split","m","prepQuery","capt","interOR","parts","reTpl","contrs","fill","pi","lftIdx","rgtIdx","lftChar","rgtChar","numChars","variants","intraInsTpl","join","preTpl","sufTpl","interCharsTpl","idxs","query","withIntraBound","interBound","queryR","partsLen","len","field","interRgt2","interRgt1","ranges","mayDiscard","ii","mhstr","idxAcc","disc","lft2","lft1","rgt2","rgt1","inter","intra","refine","k","group","termLen","groupLen","fullMatch","idxOf","refineMatch","lftCharIdx","rgtCharIdx","isPre","isSuf","junk","junkIdx","m2","found","re","exec","charIdx","from","to","refLen","ri","lastRi","idxInNext","matchLen","offset","prepend","search","outOfOrder","infoThresh","preFiltered","negsRe","needles","matches","negs","trim","terms2","ti","$44ee2883445aae00$var$permute","perm","matchedIdxs","Set","ni","preFiltered2","has","matched","add","retInfo","retOrder","acc","_info","order","_search","$44ee2883445aae00$var$latinize","accents","A","E","I","O","U","u","C","N","S","accentsMap","accentsTpl","accentsRe","replacer","strings","arr","result","$44ee2883445aae00$var$_mark","part","$44ee2883445aae00$var$_append","latinize","permute","highlight","mark","accum","append","substring","fr","$f5323048963c3f50$var$uf","$f5323048963c3f50$export$2e2bcd8739ae039","selectedCommandGroup","searchWord","favourites","recentCommands","availableCommands","values","command","includes","favouriteCommands","aIsRecent","bIsRecent","aIsFavourite","bIsFavourite","localeCompare","$f5323048963c3f50$var$sortCommands","availableCommandNames","indices","$187cc7d792701051$export$2e2bcd8739ae039","condition","$4de6e96dcc9c5973$export$2e2bcd8739ae039","Boolean","$4327cc3088ca9bcc$export$e50006273435e7d4","STATUS","$4327cc3088ca9bcc$export$f2127cf693ff3edc","TRANSITION","$4327cc3088ca9bcc$export$9523889e0a5da4ba","ACTION","COLLAPSED","$4327cc3088ca9bcc$export$ea56d40cd27c3480","collapsed","on","UPDATE_SEARCH","IDLE","actions","EXPAND","SET_SEARCH_WORD","REFRESH_COMMANDS","HIGHLIGHT_NEXT_ITEM","idle","RESET_HIGHLIGHT","HIGHLIGHT_NEXT_COMMAND","HIGHLIGHT_PREVIOUS_ITEM","HIGHLIGHT_PREVIOUS_COMMAND","CANCEL","RESET_SEARCH_OR_LEAVE_GROUP","EXECUTE_COMMAND","EXECUTING_COMMAND","ADD_RECENTLY_USED","SET_ACTIVE_COMMAND","GO_TO_PARENT_GROUP","LEAVE_GROUP","SELECT_GROUP","RESET_SEARCH","SET_GROUP","ADD_FAVOURITE","REMOVE_FAVOURITE","executingCommand","UPDATE_RESULT","DISPLAYING_RESULT","FINISH_COMMAND","UNSET_ACTIVE_COMMAND","displayingResult","UPDATE_COMMAND_QUERY","SET_COMMAND_QUERY","RESET_OPTION_HIGHLIGHT","HIGHLIGHT_NEXT_OPTION","HIGHLIGHT_PREVIOUS_OPTION","UNSET_RESULT","$4327cc3088ca9bcc$export$66bb15e2994e6a26","actionCallback","nextStateNode","status","nextState","$3bdb7eb1bca92625$var$runAction","highlightedItem","availableCommandIds","highlightedOption","commandQuery","commandQueryDirty","expanded","activeCommandId","activeCommandMessage","success","view","resultCommandId","unshift","$3bdb7eb1bca92625$export$9e3f7bba62d514d7","$5105b2e4b958e09e$export$2e2bcd8739ae039","$a35043596f133777$export$2e2bcd8739ae039","$1f5e800e7e637d25$export$2e2bcd8739ae039","showBranding","$c92c3390bd0178a7$export$53e25b3b0bb3833c","translate","$16998066b180f6ef$export$5aebe9a147f4d146","href","title","rel","xmlns","width","height","viewBox","gradientUnits","x1","y1","x2","y2","stopColor","d","transform","$a9d8acb8ffa4eae4$export$9f1a005b19e034c8","$04a90802deaf6510$export$1440ab2404307ace","$aa76484c3e1ffc63$export$bd96d8defd13d2a9","$5dcc0a8fea92bfd7$export$bfe304c803da70de","$d8d8e5123e381d27$export$4b2505a64d1f53bd","$6e1f0402541249b7$export$ff536e3efa59dfb8","$c4716b7a8a8a93ad$export$2f8478004b9d9349","$2aa32f662e9078f8$export$2e2bcd8739ae039","Icon","runningCommand","$2f74d86b545ec476$export$e3d20747ab930783","$87c672bf702cb1a4$var$updateResultsTimer","$87c672bf702cb1a4$export$2e2bcd8739ae039","executeCommand","$1ea80d3c959bcb5f$export$40a06c0c5b3ff9aa","inputRef","activeCommand","handleChange","$d6bdfea1a1e13052$export$35808ee640e87ca7","handleKeyPress","preventDefault","$2f74d86b545ec476$export$ed99038c4a6f842a","focus","placeholder","disabled","autoFocus","onChange","onKeyUp","onClick","$937f9e11bd53a43f$export$2e2bcd8739ae039","isDisplayingResults","$b1dbce9614761190$var$CommandListItem","onItemSelect","highlightedId","onToggleFavourite","commandType","$b1dbce9614761190$var$getCommandType","isHighlighted","isFavourite","$b1dbce9614761190$export$2e2bcd8739ae039","$8564955bb37d770f$var$CommandList","navRef","querySelector","scrollIntoView","behavior","block","handleToggleFavourite","suggestions","highlightedCommand","$8564955bb37d770f$export$2e2bcd8739ae039","$798ea27d8acd4548$export$2e2bcd8739ae039","isLoading","highlightedIndex","$2a001a2eafdc7fa7$export$2e2bcd8739ae039","handleToggle","label","active","$c92c3390bd0178a7$var$CommandBarContext","$450fc775b2f7950e$export$fd42f52fd3ae1109","$d6bdfea1a1e13052$export$fae74005e78b1a27","$c92c3390bd0178a7$export$8ffac7c47764ac1d","IconComponent","userPreferences","dispatch","$d6bdfea1a1e13052$export$1538c33de8887b59","commandBarState","$0ed7988ef29ac9ba$export$e2ef10f86a8d60e8","$0ed7988ef29ac9ba$export$2983e091f1a1e8e2","$c92c3390bd0178a7$var$createAppState","async","addRecentCommand","catch","setFavouriteCommands","spin","$1ea80d3c959bcb5f$var$CommandInputContext","$1ea80d3c959bcb5f$export$c67beff7acfe625","toggleOpen","dialogRef","open","handleKeyEnteredRef","metaKey","ctrlKey","contains","location","origin","window","actionResult","undefined","finally","generator","executeCommandRef","$d6bdfea1a1e13052$export$6d9c69b0de29b591","windowKeyEventHandler","$16998066b180f6ef$export$9073ae457aa4b186","$16998066b180f6ef$export$480518999dfc4151","$e407a5ca25d14613$export$2e2bcd8739ae039","onDrag","isDragging","$2f74d86b545ec476$export$65d8bf213f6a4478","dialogPosition","left","innerWidth","top","innerHeight","dragStateOffset","offsetLeft","offsetTop","hasBeenDragged","dialogStyle","visibility","reposition","dialogSize","getBoundingClientRect","handleDragStart","dataTransfer","setData","dropEffect","effectAllowed","$0ed7988ef29ac9ba$export$712ea50be43a7858","clientX","clientY","handleDragDrop","onResize","parentElement","draggable","onDragStart","$0a82af2c679f148f$export$2e2bcd8739ae039","$6b9d0563b231bc8e$export$8134c072fddab6a5","endpoint","params","method","url","encodeURIComponent","fetch","credentials","body","JSON","stringify","headers","Accept","response","statusText","json","text","$524075ade96a5510$var$setPreference","$524075ade96a5510$export$1de6a888ae076ff8","$524075ade96a5510$export$df984a4ad36be2aa","commandIds","$524075ade96a5510$export$910806e2dc4fd6f4","$524075ade96a5510$export$6c5ba575b14611dc","nodeContextPath","$0c75c51914774a7a$export$7a6092e2ae7e1845","$a0088a67651538b4$export$e747fdfe1889f28d","$670219d361a1461f$export$6d49ca4503d8331","$0be707f3177806f3$export$27b1eaa2ed0d5a99","$0be707f3177806f3$export$c82e186cf428d56d","$83fa79e240d3a2bb$export$2e2bcd8739ae039","$563cc721c6a67067$export$34b9dba7ce09269b","$694b266eb137553d$export$2e2bcd8739ae039","$450fc775b2f7950e$export$16fa2f45be04daa8","static","super","i18nRegistry","NeosCMS","I18n","initialized","dragging","searchNeosDocs","handleSearchNeosDocs","searchNeosPackages","handleSearchNeosPackages","preferences","recentDocuments","paramsOrFallback","$524075ade96a5510$exports","getPreferences","$0c75c51914774a7a$exports","getCommands","handleDrag","$a0088a67651538b4$exports","$670219d361a1461f$exports","$450fc775b2f7950e$export$ffb0004e005737fa","styleuri","onDragOver","pointerEvents","addRecentDocument","$8edfd4053752e923$var$initializeApp","$8ce2b6e41a0de290$export$2e2bcd8739ae039","topBarLeft","pluginContainer","commandBarStyleTag"],"version":3,"file":"Module.js.map"} \ No newline at end of file +{"mappings":"iGA0BaA,MCfPC,ECRFC,ECyKAC,EAWAC,EAEEC,ECvLKC,ECFEC,EAAY,CAAlB,EACMC,EAAY,GACZC,EAAqB,oELOlBC,WAAOC,EAAKC,GAE3B,IAAK,IAAIN,KAAKM,EAAOD,EAAIL,GAAKM,EAAMN,GACpC,OAA6BK,CAC7B,CAQM,SAASE,EAAWC,GAC1B,IAAIC,EAAaD,EAAKC,WAClBA,GAAYA,EAAWC,YAAYF,EACvC,CEXM,SAASG,EAAcC,EAAMN,EAAOO,GAC1C,IACCC,EACAC,EACAf,EAHGgB,EAAkB,GAItB,IAAKhB,KAAKM,EACA,OAALN,EAAYc,EAAMR,EAAMN,GACd,OAALA,EAAYe,EAAMT,EAAMN,GAC5BgB,EAAgBhB,GAAKM,EAAMN,GAUjC,GAPIiB,UAAUC,OAAS,IACtBF,EAAgBH,SACfI,UAAUC,OAAS,EAAIxB,EAAMyB,KAAKF,UAAW,GAAKJ,GAKjC,mBAARD,GAA2C,MAArBA,EAAKQ,aACrC,IAAKpB,KAAKY,EAAKQ,sBACVJ,EAAgBhB,KACnBgB,EAAgBhB,GAAKY,EAAKQ,aAAapB,IAK1C,OAAOqB,EAAYT,EAAMI,EAAiBF,EAAKC,EAAK,KACpD,UAceM,EAAYT,EAAMN,EAAOQ,EAAKC,EAAKO,GAGlD,IAAMC,EAAQ,CACbX,OACAN,QACAQ,MACAC,MACAS,IAAW,KACXC,GAAS,KACTC,IAAQ,EACRC,IAAM,KAKNC,WACAC,IAAY,KACZC,IAAY,KACZC,mBACAC,IAAuB,MAAZV,IAAqB1B,EAAU0B,GAM3C,OAFgB,MAAZA,GAAqC,MAAjB3B,EAAQ4B,OAAe5B,EAAQ4B,MAAMA,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UDoLhByP,EAACxG,GAAW,CACRC,aAAc54B,KAAK44B,aACnB9B,UAAW6I,EACX9G,MAAOuG,GAAIhL,UAAU,qBAAsB,WAC3CG,MAAO6K,GAAIhL,UAAU,qBAAsB,+BAC3C0E,OAAQsB,IAEXuF,GACGR,EAAC,OACGznB,UAAW,CAACsnB,GAAwB5E,GF3LvC,eE2L4D5S,KAAK,KAC9DqZ,WAAa/7B,GAAMA,EAAE4xB,iBACrB7yB,MAAO+7B,EAAW,CAAEkB,cAAe,OAAU,K,SAE7C3B,EAAC/B,GAAS,CACNjd,SAAUA,EACVia,KAAMA,EACNF,WAAYl6B,KAAK44B,aACjB0C,OAAQt7B,KAAKwgC,WACbrH,cAAe+F,GACf9F,gBAAiB,IACV6G,EACHnG,qBAAsBsG,GAAetG,qBACrCF,iBAAkBwG,GAAexG,iBACjCmH,kBAAmBX,GAAeW,mBAEtC3M,UAAWgL,GAAIhL,mBAO3C,EE1MJ,SAAS4M,KAEL,GAAIrG,OAAO,iCAAqC,OAChDA,OAAO,kCAAsC,EAG7CsG,EAAS7B,GAAK,KAAM,KAAMA,GAAI7hC,SAG9B,MAAM2jC,EAAa35B,SAASywB,cAAc,sBACpCmJ,EAAkB55B,SAAShJ,cAAc,yBAC/C4iC,EAAgBjgB,GAAK,uBAGrB,MAAMkgB,EAAqB75B,SAASywB,cAChC,wDAEJmJ,EAAgBn8B,aAAa,WAAYo8B,EAAmB9M,MAE5D4M,EAAWz9B,YAAY09B,EAC3B,CAGIxG,OAAO8E,SAASC,MAAMC,YACtBqB,KAEArG,OAAOj2B,iBAAiB,2BAA4Bs8B,G","sources":["node_modules/preact/src/util.js","node_modules/preact/src/options.js","node_modules/preact/src/create-element.js","node_modules/preact/src/component.js","node_modules/preact/src/create-context.js","node_modules/preact/src/constants.js","node_modules/preact/src/diff/children.js","node_modules/preact/src/diff/props.js","node_modules/preact/src/diff/index.js","node_modules/preact/src/render.js","node_modules/preact/src/clone-element.js","node_modules/preact-custom-element/src/index.js","node_modules/preact/src/diff/catch-error.js","node_modules/preact/jsx-runtime/src/index.js","node_modules/preact/hooks/src/index.js","node_modules/preact/compat/src/util.js","node_modules/preact/compat/src/PureComponent.js","node_modules/preact/compat/src/forwardRef.js","node_modules/preact/compat/src/Children.js","node_modules/preact/compat/src/suspense.js","node_modules/preact/compat/src/suspense-list.js","node_modules/preact/compat/src/portals.js","node_modules/preact/compat/src/render.js","node_modules/preact/compat/src/index.js","node_modules/preact/compat/src/memo.js","packages/commandbar/src/hooks/useFunctionRef.ts","node_modules/@preact/signals-core/src/index.ts","node_modules/@preact/signals/src/index.ts","packages/commandbar/src/helpers/flattenCommands.ts","packages/commandbar/src/helpers/logger.ts","packages/commandbar/src/helpers/clamp.ts","node_modules/@leeoniya/ufuzzy/dist/uFuzzy.esm.js","packages/commandbar/src/helpers/filterCommands.ts","packages/commandbar/src/helpers/asset.ts","packages/commandbar/src/helpers/classnames.ts","packages/commandbar/src/state/commandBarMachine.ts","packages/commandbar/src/state/commandBarReducer.ts","packages/commandbar/src/components/IconWrapper/IconWrapper.tsx","packages/commandbar/src/components/IconWrapper/IconWrapper.module.css","packages/commandbar/src/components/CommandBarFooter/CommandBarFooter.module.css","packages/commandbar/src/components/CommandBarFooter/Branding.tsx","packages/commandbar/src/components/CommandBarFooter/Branding.module.css","packages/commandbar/src/components/Icons/IconBack.tsx","packages/commandbar/src/components/Icons/IconNeos.tsx","packages/commandbar/src/components/Icons/IconSpinner.tsx","packages/commandbar/src/components/Icons/IconStar.tsx","packages/commandbar/src/components/Icons/IconPlay.tsx","packages/commandbar/src/components/Icons/IconRepeat.tsx","packages/commandbar/src/components/SearchBox/SearchBox.module.css","packages/commandbar/src/components/CommandBarFooter/CommandBarFooter.tsx","packages/commandbar/src/components/SearchBox/SearchBox.tsx","packages/commandbar/src/components/CommandBarHeader/CommandBarHeader.tsx","packages/commandbar/src/components/CommandBarHeader/CommandBarHeader.module.css","packages/commandbar/src/components/CommandListItem/CommandListItem.tsx","packages/commandbar/src/components/CommandListItem/CommandListItem.module.css","packages/commandbar/src/components/CommandList/CommandList.tsx","packages/commandbar/src/components/CommandList/CommandListing.module.css","packages/commandbar/src/components/CommandResultsView/CommandResultsView.tsx","packages/commandbar/src/components/CommandResultsView/CommandResultsView.module.css","packages/commandbar/src/components/ToggleButton/ToggleButton.tsx","packages/commandbar/src/components/ToggleButton/ToggleButton.module.css","packages/commandbar/src/state/CommandBarStateProvider.tsx","packages/commandbar/src/state/CommandBarExecutor.tsx","packages/commandbar/src/state/IntlProvider.tsx","packages/commandbar/src/components/CommandBarDialog/CommandBarDialog.tsx","packages/commandbar/src/components/CommandBarDialog/CommandBarDialog.module.css","packages/commandbar/src/CommandBar.tsx","packages/neos-api/src/fetch.ts","packages/neos-api/src/preferences.ts","packages/neos-api/src/commands.ts","packages/neos-api/src/documentation.ts","packages/neos-api/src/packages.ts","packages/module-plugin/src/ModulePlugin.module.css","packages/module-plugin/src/IconComponent.tsx","packages/module-plugin/src/App.tsx","packages/commandbar/src/Theme.module.css","packages/module-plugin/src/index.tsx"],"sourcesContent":["import { EMPTY_ARR } from \"./constants\";\n\n/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\t// @ts-ignore We change the type of `obj` to be `O & P`\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Remove a child node from its parent if attached. This is a workaround for\n * IE11 which doesn't support `Element.prototype.remove()`. Using this function\n * is smaller than including a dedicated polyfill.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\nexport const slice = EMPTY_ARR.slice;\n","import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n","import { slice } from './util';\nimport options from './options';\n\nlet vnodeId = 0;\n\n/**\n * Create an virtual node (used for JSX)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * constructor for this virtual node\n * @param {object | null | undefined} [props] The properties of the virtual node\n * @param {Array} [children] The children of the virtual node\n * @returns {import('./internal').VNode}\n */\nexport function createElement(type, props, children) {\n\tlet normalizedProps = {},\n\t\tkey,\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse normalizedProps[i] = props[i];\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\t// If a Component VNode, check for and apply defaultProps\n\t// Note: type may be undefined in development, must never error here.\n\tif (typeof type == 'function' && type.defaultProps != null) {\n\t\tfor (i in type.defaultProps) {\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = type.defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn createVNode(type, normalizedProps, key, ref, null);\n}\n\n/**\n * Create a VNode (used internally by Preact)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * Constructor for this virtual node\n * @param {object | string | number | null} props The properties of this virtual node.\n * If this virtual node represents a text node, this is the text of the node (string or number).\n * @param {string | number | null} key The key for this virtual node, used when\n * diffing it against its children\n * @param {import('./internal').VNode[\"ref\"]} ref The ref property that will\n * receive a reference to its created child\n * @returns {import('./internal').VNode}\n */\nexport function createVNode(type, props, key, ref, original) {\n\t// V8 seems to be better at detecting type shapes if the object is allocated from the same call site\n\t// Do not inline into createElement and coerceToVNode!\n\tconst vnode = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t// _nextDom must be initialized to undefined b/c it will eventually\n\t\t// be set to dom.nextSibling which can return `null` and it is important\n\t\t// to be able to distinguish between an uninitialized _nextDom and\n\t\t// a _nextDom that has been set to `null`\n\t\t_nextDom: undefined,\n\t\t_component: null,\n\t\t_hydrating: null,\n\t\tconstructor: undefined,\n\t\t_original: original == null ? ++vnodeId : original\n\t};\n\n\t// Only invoke the vnode hook if this was *not* a direct copy:\n\tif (original == null && options.vnode != null) options.vnode(vnode);\n\n\treturn vnode;\n}\n\nexport function createRef() {\n\treturn { current: null };\n}\n\nexport function Fragment(props) {\n\treturn props.children;\n}\n\n/**\n * Check if a the argument is a valid Preact VNode.\n * @param {*} vnode\n * @returns {vnode is import('./internal').VNode}\n */\nexport const isValidElement = vnode =>\n\tvnode != null && vnode.constructor === undefined;\n","import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function Component(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nComponent.prototype.setState = function(update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != null && this._nextState !== this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == null) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nComponent.prototype.forceUpdate = function(callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {import('./index').ComponentChildren | void}\n */\nComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == null) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._parent._children.indexOf(vnode) + 1)\n\t\t\t: null;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != null && sibling._dom != null) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : null;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tlet vnode = component._vnode,\n\t\toldDom = vnode._dom,\n\t\tparentDom = component._parentDom;\n\n\tif (parentDom) {\n\t\tlet commitQueue = [];\n\t\tconst oldVNode = assign({}, vnode);\n\t\toldVNode._original = vnode._original + 1;\n\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tvnode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tparentDom.ownerSVGElement !== undefined,\n\t\t\tvnode._hydrating != null ? [oldDom] : null,\n\t\t\tcommitQueue,\n\t\t\toldDom == null ? getDomSibling(vnode) : oldDom,\n\t\t\tvnode._hydrating\n\t\t);\n\t\tcommitRoot(commitQueue, vnode);\n\n\t\tif (vnode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(vnode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != null && vnode._component != null) {\n\t\tvnode._dom = vnode._component.base = null;\n\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\tlet child = vnode._children[i];\n\t\t\tif (child != null && child._dom != null) {\n\t\t\t\tvnode._dom = vnode._component.base = child._dom;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce !== options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\tlet c;\n\trerenderQueue.sort((a, b) => a._vnode._depth - b._vnode._depth);\n\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t// process() calls from getting scheduled while `queue` is still being consumed.\n\twhile ((c = rerenderQueue.shift())) {\n\t\tif (c._dirty) {\n\t\t\tlet renderQueueLength = rerenderQueue.length;\n\t\t\trenderComponent(c);\n\t\t\tif (rerenderQueue.length > renderQueueLength) {\n\t\t\t\t// When i.e. rerendering a provider additional new items can be injected, we want to\n\t\t\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t\t\t// single pass\n\t\t\t\trerenderQueue.sort((a, b) => a._vnode._depth - b._vnode._depth);\n\t\t\t}\n\t\t}\n\t}\n\tprocess._rerenderCount = 0;\n}\n\nprocess._rerenderCount = 0;\n","import { enqueueRender } from './component';\n\nexport let i = 0;\n\nexport function createContext(defaultValue, contextId) {\n\tcontextId = '__cC' + i++;\n\n\tconst context = {\n\t\t_id: contextId,\n\t\t_defaultValue: defaultValue,\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tConsumer(props, contextValue) {\n\t\t\t// return props.children(\n\t\t\t// \tcontext[contextId] ? context[contextId].props.value : defaultValue\n\t\t\t// );\n\t\t\treturn props.children(contextValue);\n\t\t},\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tProvider(props) {\n\t\t\tif (!this.getChildContext) {\n\t\t\t\t/** @type {import('./internal').Component[]} */\n\t\t\t\tlet subs = [];\n\t\t\t\tlet ctx = {};\n\t\t\t\tctx[contextId] = this;\n\n\t\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\t\tthis.shouldComponentUpdate = function(_props) {\n\t\t\t\t\tif (this.props.value !== _props.value) {\n\t\t\t\t\t\t// I think the forced value propagation here was only needed when `options.debounceRendering` was being bypassed:\n\t\t\t\t\t\t// https://github.com/preactjs/preact/commit/4d339fb803bea09e9f198abf38ca1bf8ea4b7771#diff-54682ce380935a717e41b8bfc54737f6R358\n\t\t\t\t\t\t// In those cases though, even with the value corrected, we're double-rendering all nodes.\n\t\t\t\t\t\t// It might be better to just tell folks not to use force-sync mode.\n\t\t\t\t\t\t// Currently, using `useContext()` in a class component will overwrite its `this.context` value.\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context[contextId] = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\t\t\t\t\t\tsubs.some(c => {\n\t\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis.sub = c => {\n\t\t\t\t\tsubs.push(c);\n\t\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\t\tsubs.splice(subs.indexOf(c), 1);\n\t\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn props.children;\n\t\t}\n\t};\n\n\t// Devtools needs access to the context object when it\n\t// encounters a Provider. This is necessary to support\n\t// setting `displayName` on the context object instead\n\t// of on the component itself. See:\n\t// https://reactjs.org/docs/context.html#contextdisplayname\n\n\treturn (context.Provider._contextRef = context.Consumer.contextType = context);\n}\n","export const EMPTY_OBJ = {};\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n","import { diff, unmount, applyRef } from './index';\nimport { createVNode, Fragment } from '../create-element';\nimport { EMPTY_OBJ, EMPTY_ARR } from '../constants';\nimport { getDomSibling } from '../component';\n\n/**\n * Diff the children of a virtual node\n * @param {import('../internal').PreactElement} parentDom The DOM element whose\n * children are being diffed\n * @param {import('../internal').ComponentChildren[]} renderResult\n * @param {import('../internal').VNode} newParentVNode The new virtual\n * node whose children should be diff'ed against oldParentVNode\n * @param {import('../internal').VNode} oldParentVNode The old virtual\n * node whose children should be diff'ed against newParentVNode\n * @param {object} globalContext The current context object - modified by getChildContext\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n */\nexport function diffChildren(\n\tparentDom,\n\trenderResult,\n\tnewParentVNode,\n\toldParentVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating\n) {\n\tlet i, j, oldVNode, childVNode, newDom, firstChildDom, refs;\n\n\t// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._children || EMPTY_ARR\n\t// as EMPTY_OBJ._children should be `undefined`.\n\tlet oldChildren = (oldParentVNode && oldParentVNode._children) || EMPTY_ARR;\n\n\tlet oldChildrenLength = oldChildren.length;\n\n\tnewParentVNode._children = [];\n\tfor (i = 0; i < renderResult.length; i++) {\n\t\tchildVNode = renderResult[i];\n\n\t\tif (childVNode == null || typeof childVNode == 'boolean') {\n\t\t\tchildVNode = newParentVNode._children[i] = null;\n\t\t}\n\t\t// If this newVNode is being reused (e.g.
{reuse}{reuse}
) in the same diff,\n\t\t// or we are rendering a component (e.g. setState) copy the oldVNodes so it can have\n\t\t// it's own DOM & etc. pointers\n\t\telse if (\n\t\t\ttypeof childVNode == 'string' ||\n\t\t\ttypeof childVNode == 'number' ||\n\t\t\t// eslint-disable-next-line valid-typeof\n\t\t\ttypeof childVNode == 'bigint'\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tnull,\n\t\t\t\tchildVNode,\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tchildVNode\n\t\t\t);\n\t\t} else if (Array.isArray(childVNode)) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tFragment,\n\t\t\t\t{ children: childVNode },\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if (childVNode._depth > 0) {\n\t\t\t// VNode is already in use, clone it. This can happen in the following\n\t\t\t// scenario:\n\t\t\t// const reuse =
\n\t\t\t//
{reuse}{reuse}
\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tchildVNode.type,\n\t\t\t\tchildVNode.props,\n\t\t\t\tchildVNode.key,\n\t\t\t\tchildVNode.ref ? childVNode.ref : null,\n\t\t\t\tchildVNode._original\n\t\t\t);\n\t\t} else {\n\t\t\tchildVNode = newParentVNode._children[i] = childVNode;\n\t\t}\n\n\t\t// Terser removes the `continue` here and wraps the loop body\n\t\t// in a `if (childVNode) { ... } condition\n\t\tif (childVNode == null) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tchildVNode._parent = newParentVNode;\n\t\tchildVNode._depth = newParentVNode._depth + 1;\n\n\t\t// Check if we find a corresponding element in oldChildren.\n\t\t// If found, delete the array item by setting to `undefined`.\n\t\t// We use `undefined`, as `null` is reserved for empty placeholders\n\t\t// (holes).\n\t\toldVNode = oldChildren[i];\n\n\t\tif (\n\t\t\toldVNode === null ||\n\t\t\t(oldVNode &&\n\t\t\t\tchildVNode.key == oldVNode.key &&\n\t\t\t\tchildVNode.type === oldVNode.type)\n\t\t) {\n\t\t\toldChildren[i] = undefined;\n\t\t} else {\n\t\t\t// Either oldVNode === undefined or oldChildrenLength > 0,\n\t\t\t// so after this loop oldVNode == null or oldVNode is a valid value.\n\t\t\tfor (j = 0; j < oldChildrenLength; j++) {\n\t\t\t\toldVNode = oldChildren[j];\n\t\t\t\t// If childVNode is unkeyed, we only match similarly unkeyed nodes, otherwise we match by key.\n\t\t\t\t// We always match by type (in either case).\n\t\t\t\tif (\n\t\t\t\t\toldVNode &&\n\t\t\t\t\tchildVNode.key == oldVNode.key &&\n\t\t\t\t\tchildVNode.type === oldVNode.type\n\t\t\t\t) {\n\t\t\t\t\toldChildren[j] = undefined;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\toldVNode = null;\n\t\t\t}\n\t\t}\n\n\t\toldVNode = oldVNode || EMPTY_OBJ;\n\n\t\t// Morph the old element into the new one, but don't append it to the dom yet\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tchildVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tisSvg,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\toldDom,\n\t\t\tisHydrating\n\t\t);\n\n\t\tnewDom = childVNode._dom;\n\n\t\tif ((j = childVNode.ref) && oldVNode.ref != j) {\n\t\t\tif (!refs) refs = [];\n\t\t\tif (oldVNode.ref) refs.push(oldVNode.ref, null, childVNode);\n\t\t\trefs.push(j, childVNode._component || newDom, childVNode);\n\t\t}\n\n\t\tif (newDom != null) {\n\t\t\tif (firstChildDom == null) {\n\t\t\t\tfirstChildDom = newDom;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\ttypeof childVNode.type == 'function' &&\n\t\t\t\tchildVNode._children === oldVNode._children\n\t\t\t) {\n\t\t\t\tchildVNode._nextDom = oldDom = reorderChildren(\n\t\t\t\t\tchildVNode,\n\t\t\t\t\toldDom,\n\t\t\t\t\tparentDom\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\toldDom = placeChild(\n\t\t\t\t\tparentDom,\n\t\t\t\t\tchildVNode,\n\t\t\t\t\toldVNode,\n\t\t\t\t\toldChildren,\n\t\t\t\t\tnewDom,\n\t\t\t\t\toldDom\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (typeof newParentVNode.type == 'function') {\n\t\t\t\t// Because the newParentVNode is Fragment-like, we need to set it's\n\t\t\t\t// _nextDom property to the nextSibling of its last child DOM node.\n\t\t\t\t//\n\t\t\t\t// `oldDom` contains the correct value here because if the last child\n\t\t\t\t// is a Fragment-like, then oldDom has already been set to that child's _nextDom.\n\t\t\t\t// If the last child is a DOM VNode, then oldDom will be set to that DOM\n\t\t\t\t// node's nextSibling.\n\t\t\t\tnewParentVNode._nextDom = oldDom;\n\t\t\t}\n\t\t} else if (\n\t\t\toldDom &&\n\t\t\toldVNode._dom == oldDom &&\n\t\t\toldDom.parentNode != parentDom\n\t\t) {\n\t\t\t// The above condition is to handle null placeholders. See test in placeholder.test.js:\n\t\t\t// `efficiently replace null placeholders in parent rerenders`\n\t\t\toldDom = getDomSibling(oldVNode);\n\t\t}\n\t}\n\n\tnewParentVNode._dom = firstChildDom;\n\n\t// Remove remaining oldChildren if there are any.\n\tfor (i = oldChildrenLength; i--; ) {\n\t\tif (oldChildren[i] != null) {\n\t\t\tif (\n\t\t\t\ttypeof newParentVNode.type == 'function' &&\n\t\t\t\toldChildren[i]._dom != null &&\n\t\t\t\toldChildren[i]._dom == newParentVNode._nextDom\n\t\t\t) {\n\t\t\t\t// If the newParentVNode.__nextDom points to a dom node that is about to\n\t\t\t\t// be unmounted, then get the next sibling of that vnode and set\n\t\t\t\t// _nextDom to it\n\t\t\t\tnewParentVNode._nextDom = getLastDom(oldParentVNode).nextSibling;\n\t\t\t}\n\n\t\t\tunmount(oldChildren[i], oldChildren[i]);\n\t\t}\n\t}\n\n\t// Set refs only after unmount\n\tif (refs) {\n\t\tfor (i = 0; i < refs.length; i++) {\n\t\t\tapplyRef(refs[i], refs[++i], refs[++i]);\n\t\t}\n\t}\n}\n\nfunction reorderChildren(childVNode, oldDom, parentDom) {\n\t// Note: VNodes in nested suspended trees may be missing _children.\n\tlet c = childVNode._children;\n\tlet tmp = 0;\n\tfor (; c && tmp < c.length; tmp++) {\n\t\tlet vnode = c[tmp];\n\t\tif (vnode) {\n\t\t\t// We typically enter this code path on sCU bailout, where we copy\n\t\t\t// oldVNode._children to newVNode._children. If that is the case, we need\n\t\t\t// to update the old children's _parent pointer to point to the newVNode\n\t\t\t// (childVNode here).\n\t\t\tvnode._parent = childVNode;\n\n\t\t\tif (typeof vnode.type == 'function') {\n\t\t\t\toldDom = reorderChildren(vnode, oldDom, parentDom);\n\t\t\t} else {\n\t\t\t\toldDom = placeChild(parentDom, vnode, vnode, c, vnode._dom, oldDom);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn oldDom;\n}\n\n/**\n * Flatten and loop through the children of a virtual node\n * @param {import('../index').ComponentChildren} children The unflattened\n * children of a virtual node\n * @returns {import('../internal').VNode[]}\n */\nexport function toChildArray(children, out) {\n\tout = out || [];\n\tif (children == null || typeof children == 'boolean') {\n\t} else if (Array.isArray(children)) {\n\t\tchildren.some(child => {\n\t\t\ttoChildArray(child, out);\n\t\t});\n\t} else {\n\t\tout.push(children);\n\t}\n\treturn out;\n}\n\nfunction placeChild(\n\tparentDom,\n\tchildVNode,\n\toldVNode,\n\toldChildren,\n\tnewDom,\n\toldDom\n) {\n\tlet nextDom;\n\tif (childVNode._nextDom !== undefined) {\n\t\t// Only Fragments or components that return Fragment like VNodes will\n\t\t// have a non-undefined _nextDom. Continue the diff from the sibling\n\t\t// of last DOM child of this child VNode\n\t\tnextDom = childVNode._nextDom;\n\n\t\t// Eagerly cleanup _nextDom. We don't need to persist the value because\n\t\t// it is only used by `diffChildren` to determine where to resume the diff after\n\t\t// diffing Components and Fragments. Once we store it the nextDOM local var, we\n\t\t// can clean up the property\n\t\tchildVNode._nextDom = undefined;\n\t} else if (\n\t\toldVNode == null ||\n\t\tnewDom != oldDom ||\n\t\tnewDom.parentNode == null\n\t) {\n\t\touter: if (oldDom == null || oldDom.parentNode !== parentDom) {\n\t\t\tparentDom.appendChild(newDom);\n\t\t\tnextDom = null;\n\t\t} else {\n\t\t\t// `j= 0; i--) {\n\t\t\tlet child = vnode._children[i];\n\t\t\tif (child) {\n\t\t\t\tlet lastDom = getLastDom(child);\n\t\t\t\tif (lastDom) {\n\t\t\t\t\treturn lastDom;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn null;\n}\n","import { IS_NON_DIMENSIONAL } from '../constants';\nimport options from '../options';\n\n/**\n * Diff the old and new properties of a VNode and apply changes to the DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to apply\n * changes to\n * @param {object} newProps The new props\n * @param {object} oldProps The old props\n * @param {boolean} isSvg Whether or not this node is an SVG node\n * @param {boolean} hydrate Whether or not we are in hydration mode\n */\nexport function diffProps(dom, newProps, oldProps, isSvg, hydrate) {\n\tlet i;\n\n\tfor (i in oldProps) {\n\t\tif (i !== 'children' && i !== 'key' && !(i in newProps)) {\n\t\t\tsetProperty(dom, i, null, oldProps[i], isSvg);\n\t\t}\n\t}\n\n\tfor (i in newProps) {\n\t\tif (\n\t\t\t(!hydrate || typeof newProps[i] == 'function') &&\n\t\t\ti !== 'children' &&\n\t\t\ti !== 'key' &&\n\t\t\ti !== 'value' &&\n\t\t\ti !== 'checked' &&\n\t\t\toldProps[i] !== newProps[i]\n\t\t) {\n\t\t\tsetProperty(dom, i, newProps[i], oldProps[i], isSvg);\n\t\t}\n\t}\n}\n\nfunction setStyle(style, key, value) {\n\tif (key[0] === '-') {\n\t\tstyle.setProperty(key, value == null ? '' : value);\n\t} else if (value == null) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, isSvg) {\n\tlet useCapture;\n\n\to: if (name === 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] !== oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] === 'o' && name[1] === 'n') {\n\t\tuseCapture = name !== (name = name.replace(/Capture$/, ''));\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (name.toLowerCase() in dom) name = name.toLowerCase().slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\t\tdom.addEventListener(name, handler, useCapture);\n\t\t\t}\n\t\t} else {\n\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\tdom.removeEventListener(name, handler, useCapture);\n\t\t}\n\t} else if (name !== 'dangerouslySetInnerHTML') {\n\t\tif (isSvg) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname !== 'width' &&\n\t\t\tname !== 'height' &&\n\t\t\tname !== 'href' &&\n\t\t\tname !== 'list' &&\n\t\t\tname !== 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname !== 'tabIndex' &&\n\t\t\tname !== 'download' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == null ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// ARIA-attributes have a different notion of boolean values.\n\t\t// The value `false` is different from the attribute not\n\t\t// existing on the DOM, so we can't remove it. For non-boolean\n\t\t// ARIA-attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost us too many bytes. On top of\n\t\t// that other VDOM frameworks also always stringify `false`.\n\n\t\tif (typeof value === 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != null && (value !== false || name.indexOf('-') != -1)) {\n\t\t\tdom.setAttribute(name, value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n\treturn this._listeners[e.type + false](options.event ? options.event(e) : e);\n}\n\nfunction eventProxyCapture(e) {\n\treturn this._listeners[e.type + true](options.event ? options.event(e) : e);\n}\n","import { EMPTY_OBJ } from '../constants';\nimport { Component, getDomSibling } from '../component';\nimport { Fragment } from '../create-element';\nimport { diffChildren } from './children';\nimport { diffProps, setProperty } from './props';\nimport { assign, removeNode, slice } from '../util';\nimport options from '../options';\n\n/**\n * Diff two virtual nodes and apply proper changes to the DOM\n * @param {import('../internal').PreactElement} parentDom The parent of the DOM element\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object. Modified by getChildContext\n * @param {boolean} isSvg Whether or not this element is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} [isHydrating] Whether or not we are in hydration\n */\nexport function diff(\n\tparentDom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating\n) {\n\tlet tmp,\n\t\tnewType = newVNode.type;\n\n\t// When passing through createElement it assigns the object\n\t// constructor as undefined. This to prevent JSON-injection.\n\tif (newVNode.constructor !== undefined) return null;\n\n\t// If the previous diff bailed out, resume creating/hydrating.\n\tif (oldVNode._hydrating != null) {\n\t\tisHydrating = oldVNode._hydrating;\n\t\toldDom = newVNode._dom = oldVNode._dom;\n\t\t// if we resume, we want the tree to be \"unlocked\"\n\t\tnewVNode._hydrating = null;\n\t\texcessDomChildren = [oldDom];\n\t}\n\n\tif ((tmp = options._diff)) tmp(newVNode);\n\n\ttry {\n\t\touter: if (typeof newType == 'function') {\n\t\t\tlet c, isNew, oldProps, oldState, snapshot, clearProcessingException;\n\t\t\tlet newProps = newVNode.props;\n\n\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t// the context value as `this.context` just for this component.\n\t\t\ttmp = newType.contextType;\n\t\t\tlet provider = tmp && globalContext[tmp._id];\n\t\t\tlet componentContext = tmp\n\t\t\t\t? provider\n\t\t\t\t\t? provider.props.value\n\t\t\t\t\t: tmp._defaultValue\n\t\t\t\t: globalContext;\n\n\t\t\t// Get component and set it to `c`\n\t\t\tif (oldVNode._component) {\n\t\t\t\tc = newVNode._component = oldVNode._component;\n\t\t\t\tclearProcessingException = c._processingException = c._pendingError;\n\t\t\t} else {\n\t\t\t\t// Instantiate the new component\n\t\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\t\t// @ts-ignore The check above verifies that newType is suppose to be constructed\n\t\t\t\t\tnewVNode._component = c = new newType(newProps, componentContext); // eslint-disable-line new-cap\n\t\t\t\t} else {\n\t\t\t\t\t// @ts-ignore Trust me, Component implements the interface we want\n\t\t\t\t\tnewVNode._component = c = new Component(newProps, componentContext);\n\t\t\t\t\tc.constructor = newType;\n\t\t\t\t\tc.render = doRender;\n\t\t\t\t}\n\t\t\t\tif (provider) provider.sub(c);\n\n\t\t\t\tc.props = newProps;\n\t\t\t\tif (!c.state) c.state = {};\n\t\t\t\tc.context = componentContext;\n\t\t\t\tc._globalContext = globalContext;\n\t\t\t\tisNew = c._dirty = true;\n\t\t\t\tc._renderCallbacks = [];\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t}\n\n\t\t\t// Invoke getDerivedStateFromProps\n\t\t\tif (c._nextState == null) {\n\t\t\t\tc._nextState = c.state;\n\t\t\t}\n\n\t\t\tif (newType.getDerivedStateFromProps != null) {\n\t\t\t\tif (c._nextState == c.state) {\n\t\t\t\t\tc._nextState = assign({}, c._nextState);\n\t\t\t\t}\n\n\t\t\t\tassign(\n\t\t\t\t\tc._nextState,\n\t\t\t\t\tnewType.getDerivedStateFromProps(newProps, c._nextState)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\toldProps = c.props;\n\t\t\toldState = c.state;\n\t\t\tc._vnode = newVNode;\n\n\t\t\t// Invoke pre-render lifecycle methods\n\t\t\tif (isNew) {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tc.componentWillMount != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillMount();\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidMount != null) {\n\t\t\t\t\tc._renderCallbacks.push(c.componentDidMount);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tnewProps !== oldProps &&\n\t\t\t\t\tc.componentWillReceiveProps != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillReceiveProps(newProps, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t(!c._force &&\n\t\t\t\t\t\tc.shouldComponentUpdate != null &&\n\t\t\t\t\t\tc.shouldComponentUpdate(\n\t\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\t\tc._nextState,\n\t\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t\t) === false) ||\n\t\t\t\t\tnewVNode._original === oldVNode._original\n\t\t\t\t) {\n\t\t\t\t\t// More info about this here: https://gist.github.com/JoviDeCroock/bec5f2ce93544d2e6070ef8e0036e4e8\n\t\t\t\t\tif (newVNode._original !== oldVNode._original) {\n\t\t\t\t\t\t// When we are dealing with a bail because of sCU we have to update\n\t\t\t\t\t\t// the props, state and dirty-state.\n\t\t\t\t\t\t// when we are dealing with strict-equality we don't as the child could still\n\t\t\t\t\t\t// be dirtied see #3883\n\t\t\t\t\t\tc.props = newProps;\n\t\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t\t\tc._dirty = false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// In cases of bailing due to strict-equality we have to reset force as well\n\t\t\t\t\tc._force = false;\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t\tnewVNode._children.forEach(vnode => {\n\t\t\t\t\t\tif (vnode) vnode._parent = newVNode;\n\t\t\t\t\t});\n\n\t\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t\t}\n\t\t\t\t\tc._stateCallbacks = [];\n\n\t\t\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\t\t\tcommitQueue.push(c);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\n\t\t\t\tif (c.componentWillUpdate != null) {\n\t\t\t\t\tc.componentWillUpdate(newProps, c._nextState, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidUpdate != null) {\n\t\t\t\t\tc._renderCallbacks.push(() => {\n\t\t\t\t\t\tc.componentDidUpdate(oldProps, oldState, snapshot);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tc.context = componentContext;\n\t\t\tc.props = newProps;\n\t\t\tc._parentDom = parentDom;\n\n\t\t\tlet renderHook = options._render,\n\t\t\t\tcount = 0;\n\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\tc.state = c._nextState;\n\t\t\t\tc._dirty = false;\n\n\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t}\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t} else {\n\t\t\t\tdo {\n\t\t\t\t\tc._dirty = false;\n\t\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\t\t// Handle setState called in render, see #2553\n\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t} while (c._dirty && ++count < 25);\n\t\t\t}\n\n\t\t\t// Handle setState called in render, see #2553\n\t\t\tc.state = c._nextState;\n\n\t\t\tif (c.getChildContext != null) {\n\t\t\t\tglobalContext = assign(assign({}, globalContext), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (!isNew && c.getSnapshotBeforeUpdate != null) {\n\t\t\t\tsnapshot = c.getSnapshotBeforeUpdate(oldProps, oldState);\n\t\t\t}\n\n\t\t\tlet isTopLevelFragment =\n\t\t\t\ttmp != null && tmp.type === Fragment && tmp.key == null;\n\t\t\tlet renderResult = isTopLevelFragment ? tmp.props.children : tmp;\n\n\t\t\tdiffChildren(\n\t\t\t\tparentDom,\n\t\t\t\tArray.isArray(renderResult) ? renderResult : [renderResult],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\toldDom,\n\t\t\t\tisHydrating\n\t\t\t);\n\n\t\t\tc.base = newVNode._dom;\n\n\t\t\t// We successfully rendered this VNode, unset any stored hydration/bailout state:\n\t\t\tnewVNode._hydrating = null;\n\n\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\tcommitQueue.push(c);\n\t\t\t}\n\n\t\t\tif (clearProcessingException) {\n\t\t\t\tc._pendingError = c._processingException = null;\n\t\t\t}\n\n\t\t\tc._force = false;\n\t\t} else if (\n\t\t\texcessDomChildren == null &&\n\t\t\tnewVNode._original === oldVNode._original\n\t\t) {\n\t\t\tnewVNode._children = oldVNode._children;\n\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t} else {\n\t\t\tnewVNode._dom = diffElementNodes(\n\t\t\t\toldVNode._dom,\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\tisHydrating\n\t\t\t);\n\t\t}\n\n\t\tif ((tmp = options.diffed)) tmp(newVNode);\n\t} catch (e) {\n\t\tnewVNode._original = null;\n\t\t// if hydrating or creating initial tree, bailout preserves DOM:\n\t\tif (isHydrating || excessDomChildren != null) {\n\t\t\tnewVNode._dom = oldDom;\n\t\t\tnewVNode._hydrating = !!isHydrating;\n\t\t\texcessDomChildren[excessDomChildren.indexOf(oldDom)] = null;\n\t\t\t// ^ could possibly be simplified to:\n\t\t\t// excessDomChildren.length = 0;\n\t\t}\n\t\toptions._catchError(e, newVNode, oldVNode);\n\t}\n}\n\n/**\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').VNode} root\n */\nexport function commitRoot(commitQueue, root) {\n\tif (options._commit) options._commit(root, commitQueue);\n\n\tcommitQueue.some(c => {\n\t\ttry {\n\t\t\t// @ts-ignore Reuse the commitQueue variable here so the type changes\n\t\t\tcommitQueue = c._renderCallbacks;\n\t\t\tc._renderCallbacks = [];\n\t\t\tcommitQueue.some(cb => {\n\t\t\t\t// @ts-ignore See above ts-ignore on commitQueue\n\t\t\t\tcb.call(c);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\toptions._catchError(e, c._vnode);\n\t\t}\n\t});\n}\n\n/**\n * Diff two virtual nodes representing DOM element\n * @param {import('../internal').PreactElement} dom The DOM element representing\n * the virtual nodes being diffed\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {*} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @returns {import('../internal').PreactElement}\n */\nfunction diffElementNodes(\n\tdom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\tisHydrating\n) {\n\tlet oldProps = oldVNode.props;\n\tlet newProps = newVNode.props;\n\tlet nodeType = newVNode.type;\n\tlet i = 0;\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tif (nodeType === 'svg') isSvg = true;\n\n\tif (excessDomChildren != null) {\n\t\tfor (; i < excessDomChildren.length; i++) {\n\t\t\tconst child = excessDomChildren[i];\n\n\t\t\t// if newVNode matches an element in excessDomChildren or the `dom`\n\t\t\t// argument matches an element in excessDomChildren, remove it from\n\t\t\t// excessDomChildren so it isn't later removed in diffChildren\n\t\t\tif (\n\t\t\t\tchild &&\n\t\t\t\t'setAttribute' in child === !!nodeType &&\n\t\t\t\t(nodeType ? child.localName === nodeType : child.nodeType === 3)\n\t\t\t) {\n\t\t\t\tdom = child;\n\t\t\t\texcessDomChildren[i] = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom == null) {\n\t\tif (nodeType === null) {\n\t\t\t// @ts-ignore createTextNode returns Text, we expect PreactElement\n\t\t\treturn document.createTextNode(newProps);\n\t\t}\n\n\t\tif (isSvg) {\n\t\t\tdom = document.createElementNS(\n\t\t\t\t'http://www.w3.org/2000/svg',\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType\n\t\t\t);\n\t\t} else {\n\t\t\tdom = document.createElement(\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType,\n\t\t\t\tnewProps.is && newProps\n\t\t\t);\n\t\t}\n\n\t\t// we created a new parent, so none of the previously attached children can be reused:\n\t\texcessDomChildren = null;\n\t\t// we are creating a new node, so we can assume this is a new subtree (in case we are hydrating), this deopts the hydrate\n\t\tisHydrating = false;\n\t}\n\n\tif (nodeType === null) {\n\t\t// During hydration, we still have to split merged text from SSR'd HTML.\n\t\tif (oldProps !== newProps && (!isHydrating || dom.data !== newProps)) {\n\t\t\tdom.data = newProps;\n\t\t}\n\t} else {\n\t\t// If excessDomChildren was not null, repopulate it with the current element's children:\n\t\texcessDomChildren = excessDomChildren && slice.call(dom.childNodes);\n\n\t\toldProps = oldVNode.props || EMPTY_OBJ;\n\n\t\tlet oldHtml = oldProps.dangerouslySetInnerHTML;\n\t\tlet newHtml = newProps.dangerouslySetInnerHTML;\n\n\t\t// During hydration, props are not diffed at all (including dangerouslySetInnerHTML)\n\t\t// @TODO we should warn in debug mode when props don't match here.\n\t\tif (!isHydrating) {\n\t\t\t// But, if we are in a situation where we are using existing DOM (e.g. replaceNode)\n\t\t\t// we should read the existing DOM attributes to diff them\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\toldProps = {};\n\t\t\t\tfor (i = 0; i < dom.attributes.length; i++) {\n\t\t\t\t\toldProps[dom.attributes[i].name] = dom.attributes[i].value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (newHtml || oldHtml) {\n\t\t\t\t// Avoid re-applying the same '__html' if it did not changed between re-render\n\t\t\t\tif (\n\t\t\t\t\t!newHtml ||\n\t\t\t\t\t((!oldHtml || newHtml.__html != oldHtml.__html) &&\n\t\t\t\t\t\tnewHtml.__html !== dom.innerHTML)\n\t\t\t\t) {\n\t\t\t\t\tdom.innerHTML = (newHtml && newHtml.__html) || '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdiffProps(dom, newProps, oldProps, isSvg, isHydrating);\n\n\t\t// If the new vnode didn't have dangerouslySetInnerHTML, diff its children\n\t\tif (newHtml) {\n\t\t\tnewVNode._children = [];\n\t\t} else {\n\t\t\ti = newVNode.props.children;\n\t\t\tdiffChildren(\n\t\t\t\tdom,\n\t\t\t\tArray.isArray(i) ? i : [i],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg && nodeType !== 'foreignObject',\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\texcessDomChildren\n\t\t\t\t\t? excessDomChildren[0]\n\t\t\t\t\t: oldVNode._children && getDomSibling(oldVNode, 0),\n\t\t\t\tisHydrating\n\t\t\t);\n\n\t\t\t// Remove children that are not part of any vnode.\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\tfor (i = excessDomChildren.length; i--; ) {\n\t\t\t\t\tif (excessDomChildren[i] != null) removeNode(excessDomChildren[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// (as above, don't diff props during hydration)\n\t\tif (!isHydrating) {\n\t\t\tif (\n\t\t\t\t'value' in newProps &&\n\t\t\t\t(i = newProps.value) !== undefined &&\n\t\t\t\t// #2756 For the -element the initial value is 0,\n\t\t\t\t// despite the attribute not being present. When the attribute\n\t\t\t\t// is missing the progress bar is treated as indeterminate.\n\t\t\t\t// To fix that we'll always update it when it is 0 for progress elements\n\t\t\t\t(i !== dom.value ||\n\t\t\t\t\t(nodeType === 'progress' && !i) ||\n\t\t\t\t\t// This is only for IE 11 to fix \n\t\tif (\n\t\t\ttype == 'select' &&\n\t\t\tnormalizedProps.multiple &&\n\t\t\tArray.isArray(normalizedProps.value)\n\t\t) {\n\t\t\t// forEach() always returns undefined, which we abuse here to unset the value prop.\n\t\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\t\tchild.props.selected =\n\t\t\t\t\tnormalizedProps.value.indexOf(child.props.value) != -1;\n\t\t\t});\n\t\t}\n\n\t\t// Adding support for defaultValue in select tag\n\t\tif (type == 'select' && normalizedProps.defaultValue != null) {\n\t\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\t\tif (normalizedProps.multiple) {\n\t\t\t\t\tchild.props.selected =\n\t\t\t\t\t\tnormalizedProps.defaultValue.indexOf(child.props.value) != -1;\n\t\t\t\t} else {\n\t\t\t\t\tchild.props.selected =\n\t\t\t\t\t\tnormalizedProps.defaultValue == child.props.value;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tvnode.props = normalizedProps;\n\n\t\tif (props.class != props.className) {\n\t\t\tclassNameDescriptor.enumerable = 'className' in props;\n\t\t\tif (props.className != null) normalizedProps.class = props.className;\n\t\t\tObject.defineProperty(normalizedProps, 'className', classNameDescriptor);\n\t\t}\n\t}\n\n\tvnode.$$typeof = REACT_ELEMENT_TYPE;\n\n\tif (oldVNodeHook) oldVNodeHook(vnode);\n};\n\n// Only needed for react-relay\nlet currentComponent;\nconst oldBeforeRender = options._render;\noptions._render = function(vnode) {\n\tif (oldBeforeRender) {\n\t\toldBeforeRender(vnode);\n\t}\n\tcurrentComponent = vnode._component;\n};\n\nconst oldDiffed = options.diffed;\n/** @type {(vnode: import('./internal').VNode)} */\noptions.diffed = function(vnode) {\n\tif (oldDiffed) {\n\t\toldDiffed(vnode);\n\t}\n\n\tconst props = vnode.props;\n\tconst dom = vnode._dom;\n\tif (\n\t\tdom != null &&\n\t\tvnode.type === 'textarea' &&\n\t\t'value' in props &&\n\t\tprops.value !== dom.value\n\t) {\n\t\tdom.value = props.value == null ? '' : props.value;\n\t}\n\n\tcurrentComponent = null;\n};\n\n// This is a very very private internal function for React it\n// is used to sort-of do runtime dependency injection. So far\n// only `react-relay` makes use of it. It uses it to read the\n// context value.\nexport const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {\n\tReactCurrentDispatcher: {\n\t\tcurrent: {\n\t\t\treadContext(context) {\n\t\t\t\treturn currentComponent._globalContext[context._id].props.value;\n\t\t\t}\n\t\t}\n\t}\n};\n","import {\n\tcreateElement,\n\trender as preactRender,\n\tcloneElement as preactCloneElement,\n\tcreateRef,\n\tComponent,\n\tcreateContext,\n\tFragment\n} from 'preact';\nimport {\n\tuseState,\n\tuseId,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue\n} from 'preact/hooks';\nimport { PureComponent } from './PureComponent';\nimport { memo } from './memo';\nimport { forwardRef } from './forwardRef';\nimport { Children } from './Children';\nimport { Suspense, lazy } from './suspense';\nimport { SuspenseList } from './suspense-list';\nimport { createPortal } from './portals';\nimport { is } from './util';\nimport {\n\thydrate,\n\trender,\n\tREACT_ELEMENT_TYPE,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n} from './render';\n\nconst version = '17.0.2'; // trick libraries to think we are react\n\n/**\n * Legacy version of createElement.\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component constructor\n */\nfunction createFactory(type) {\n\treturn createElement.bind(null, type);\n}\n\n/**\n * Check if the passed element is a valid (p)react node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isValidElement(element) {\n\treturn !!element && element.$$typeof === REACT_ELEMENT_TYPE;\n}\n\n/**\n * Wrap `cloneElement` to abort if the passed element is not a valid element and apply\n * all vnode normalizations.\n * @param {import('./internal').VNode} element The vnode to clone\n * @param {object} props Props to add when cloning\n * @param {Array} rest Optional component children\n */\nfunction cloneElement(element) {\n\tif (!isValidElement(element)) return element;\n\treturn preactCloneElement.apply(null, arguments);\n}\n\n/**\n * Remove a component tree from the DOM, including state and event handlers.\n * @param {import('./internal').PreactElement} container\n * @returns {boolean}\n */\nfunction unmountComponentAtNode(container) {\n\tif (container._children) {\n\t\tpreactRender(null, container);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n/**\n * Get the matching DOM node for a component\n * @param {import('./internal').Component} component\n * @returns {import('./internal').PreactElement | null}\n */\nfunction findDOMNode(component) {\n\treturn (\n\t\t(component &&\n\t\t\t(component.base || (component.nodeType === 1 && component))) ||\n\t\tnull\n\t);\n}\n\n/**\n * Deprecated way to control batched rendering inside the reconciler, but we\n * already schedule in batches inside our rendering code\n * @template Arg\n * @param {(arg: Arg) => void} callback function that triggers the updated\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n */\n// eslint-disable-next-line camelcase\nconst unstable_batchedUpdates = (callback, arg) => callback(arg);\n\n/**\n * In React, `flushSync` flushes the entire tree and forces a rerender. It's\n * implmented here as a no-op.\n * @template Arg\n * @template Result\n * @param {(arg: Arg) => Result} callback function that runs before the flush\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n * @returns\n */\nconst flushSync = (callback, arg) => callback(arg);\n\n/**\n * Strict Mode is not implemented in Preact, so we provide a stand-in for it\n * that just renders its children without imposing any restrictions.\n */\nconst StrictMode = Fragment;\n\nexport function startTransition(cb) {\n\tcb();\n}\n\nexport function useDeferredValue(val) {\n\treturn val;\n}\n\nexport function useTransition() {\n\treturn [false, startTransition];\n}\n\n// TODO: in theory this should be done after a VNode is diffed as we want to insert\n// styles/... before it attaches\nexport const useInsertionEffect = useLayoutEffect;\n\n/**\n * This is taken from https://github.com/facebook/react/blob/main/packages/use-sync-external-store/src/useSyncExternalStoreShimClient.js#L84\n * on a high level this cuts out the warnings, ... and attempts a smaller implementation\n */\nexport function useSyncExternalStore(subscribe, getSnapshot) {\n\tconst value = getSnapshot();\n\n\tconst [{ _instance }, forceUpdate] = useState({\n\t\t_instance: { _value: value, _getSnapshot: getSnapshot }\n\t});\n\n\tuseLayoutEffect(() => {\n\t\t_instance._value = value;\n\t\t_instance._getSnapshot = getSnapshot;\n\n\t\tif (!is(_instance._value, getSnapshot())) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\t}, [subscribe, value, getSnapshot]);\n\n\tuseEffect(() => {\n\t\tif (!is(_instance._value, _instance._getSnapshot())) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\n\t\treturn subscribe(() => {\n\t\t\tif (!is(_instance._value, _instance._getSnapshot())) {\n\t\t\t\tforceUpdate({ _instance });\n\t\t\t}\n\t\t});\n\t}, [subscribe]);\n\n\treturn value;\n}\n\nexport * from 'preact/hooks';\nexport {\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\t// eslint-disable-next-line camelcase\n\tunstable_batchedUpdates,\n\tStrictMode,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n\n// React copies the named exports to the default one.\nexport default {\n\tuseState,\n\tuseId,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseInsertionEffect,\n\tuseTransition,\n\tuseDeferredValue,\n\tuseSyncExternalStore,\n\tstartTransition,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue,\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\tunstable_batchedUpdates,\n\tStrictMode,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n","import { createElement } from 'preact';\nimport { shallowDiffers } from './util';\n\n/**\n * Memoize a component, so that it only updates when the props actually have\n * changed. This was previously known as `React.pure`.\n * @param {import('./internal').FunctionComponent} c functional component\n * @param {(prev: object, next: object) => boolean} [comparer] Custom equality function\n * @returns {import('./internal').FunctionComponent}\n */\nexport function memo(c, comparer) {\n\tfunction shouldUpdate(nextProps) {\n\t\tlet ref = this.props.ref;\n\t\tlet updateRef = ref == nextProps.ref;\n\t\tif (!updateRef && ref) {\n\t\t\tref.call ? ref(null) : (ref.current = null);\n\t\t}\n\n\t\tif (!comparer) {\n\t\t\treturn shallowDiffers(this.props, nextProps);\n\t\t}\n\n\t\treturn !comparer(this.props, nextProps) || !updateRef;\n\t}\n\n\tfunction Memoed(props) {\n\t\tthis.shouldComponentUpdate = shouldUpdate;\n\t\treturn createElement(c, props);\n\t}\n\tMemoed.displayName = 'Memo(' + (c.displayName || c.name) + ')';\n\tMemoed.prototype.isReactComponent = true;\n\tMemoed._forwarded = true;\n\treturn Memoed;\n}\n","import { useRef } from 'react';\n\n/**\n * A custom hook that creates a ref for a function, and updates it on every render.\n * The new value is always the same function, but the function's context changes on every render.\n */\nexport default function useFunctionRef(fn) {\n const fnRef = useRef(fn);\n fnRef.current = fn;\n return fnRef;\n}\n","function cycleDetected(): never {\n\tthrow new Error(\"Cycle detected\");\n}\n\n// Flags for Computed and Effect.\nconst RUNNING = 1 << 0;\nconst NOTIFIED = 1 << 1;\nconst OUTDATED = 1 << 2;\nconst DISPOSED = 1 << 3;\nconst HAS_ERROR = 1 << 4;\nconst TRACKING = 1 << 5;\n\n// A linked list node used to track dependencies (sources) and dependents (targets).\n// Also used to remember the source's last version number that the target saw.\ntype Node = {\n\t// A source whose value the target depends on.\n\t_source: Signal;\n\t_prevSource?: Node;\n\t_nextSource?: Node;\n\n\t// A target that depends on the source and should be notified when the source changes.\n\t_target: Computed | Effect;\n\t_prevTarget?: Node;\n\t_nextTarget?: Node;\n\n\t// The version number of the source that target has last seen. We use version numbers\n\t// instead of storing the source value, because source values can take arbitrary amount\n\t// of memory, and computeds could hang on to them forever because they're lazily evaluated.\n\t// Use the special value -1 to mark potentially unused but recyclable nodes.\n\t_version: number;\n\n\t// Used to remember & roll back the source's previous `._node` value when entering &\n\t// exiting a new evaluation context.\n\t_rollbackNode?: Node;\n};\n\nfunction startBatch() {\n\tbatchDepth++;\n}\n\nfunction endBatch() {\n\tif (batchDepth > 1) {\n\t\tbatchDepth--;\n\t\treturn;\n\t}\n\n\tlet error: unknown;\n\tlet hasError = false;\n\n\twhile (batchedEffect !== undefined) {\n\t\tlet effect: Effect | undefined = batchedEffect;\n\t\tbatchedEffect = undefined;\n\n\t\tbatchIteration++;\n\n\t\twhile (effect !== undefined) {\n\t\t\tconst next: Effect | undefined = effect._nextBatchedEffect;\n\t\t\teffect._nextBatchedEffect = undefined;\n\t\t\teffect._flags &= ~NOTIFIED;\n\n\t\t\tif (!(effect._flags & DISPOSED) && needsToRecompute(effect)) {\n\t\t\t\ttry {\n\t\t\t\t\teffect._callback();\n\t\t\t\t} catch (err) {\n\t\t\t\t\tif (!hasError) {\n\t\t\t\t\t\terror = err;\n\t\t\t\t\t\thasError = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\teffect = next;\n\t\t}\n\t}\n\tbatchIteration = 0;\n\tbatchDepth--;\n\n\tif (hasError) {\n\t\tthrow error;\n\t}\n}\n\nfunction batch(callback: () => T): T {\n\tif (batchDepth > 0) {\n\t\treturn callback();\n\t}\n\t/*@__INLINE__**/ startBatch();\n\ttry {\n\t\treturn callback();\n\t} finally {\n\t\tendBatch();\n\t}\n}\n\n// Currently evaluated computed or effect.\nlet evalContext: Computed | Effect | undefined = undefined;\n\n// Effects collected into a batch.\nlet batchedEffect: Effect | undefined = undefined;\nlet batchDepth = 0;\nlet batchIteration = 0;\n\n// A global version number for signals, used for fast-pathing repeated\n// computed.peek()/computed.value calls when nothing has changed globally.\nlet globalVersion = 0;\n\nfunction addDependency(signal: Signal): Node | undefined {\n\tif (evalContext === undefined) {\n\t\treturn undefined;\n\t}\n\n\tlet node = signal._node;\n\tif (node === undefined || node._target !== evalContext) {\n\t\t/**\n\t\t * `signal` is a new dependency. Create a new dependency node, and set it\n\t\t * as the tail of the current context's dependency list. e.g:\n\t\t *\n\t\t * { A <-> B }\n\t\t * ↑ ↑\n\t\t * tail node (new)\n\t\t * ↓\n\t\t * { A <-> B <-> C }\n\t\t * ↑\n\t\t * tail (evalContext._sources)\n\t\t */\n\t\tnode = {\n\t\t\t_version: 0,\n\t\t\t_source: signal,\n\t\t\t_prevSource: evalContext._sources,\n\t\t\t_nextSource: undefined,\n\t\t\t_target: evalContext,\n\t\t\t_prevTarget: undefined,\n\t\t\t_nextTarget: undefined,\n\t\t\t_rollbackNode: node,\n\t\t};\n\n\t\tif (evalContext._sources !== undefined) {\n\t\t\tevalContext._sources._nextSource = node;\n\t\t}\n\t\tevalContext._sources = node;\n\t\tsignal._node = node;\n\n\t\t// Subscribe to change notifications from this dependency if we're in an effect\n\t\t// OR evaluating a computed signal that in turn has subscribers.\n\t\tif (evalContext._flags & TRACKING) {\n\t\t\tsignal._subscribe(node);\n\t\t}\n\t\treturn node;\n\t} else if (node._version === -1) {\n\t\t// `signal` is an existing dependency from a previous evaluation. Reuse it.\n\t\tnode._version = 0;\n\n\t\t/**\n\t\t * If `node` is not already the current tail of the dependency list (i.e.\n\t\t * there is a next node in the list), then make the `node` the new tail. e.g:\n\t\t *\n\t\t * { A <-> B <-> C <-> D }\n\t\t * ↑ ↑\n\t\t * node ┌─── tail (evalContext._sources)\n\t\t * └─────│─────┐\n\t\t * ↓ ↓\n\t\t * { A <-> C <-> D <-> B }\n\t\t * ↑\n\t\t * tail (evalContext._sources)\n\t\t */\n\t\tif (node._nextSource !== undefined) {\n\t\t\tnode._nextSource._prevSource = node._prevSource;\n\n\t\t\tif (node._prevSource !== undefined) {\n\t\t\t\tnode._prevSource._nextSource = node._nextSource;\n\t\t\t}\n\n\t\t\tnode._prevSource = evalContext._sources;\n\t\t\tnode._nextSource = undefined;\n\n\t\t\tevalContext._sources!._nextSource = node;\n\t\t\tevalContext._sources = node;\n\t\t}\n\n\t\t// We can assume that the currently evaluated effect / computed signal is already\n\t\t// subscribed to change notifications from `signal` if needed.\n\t\treturn node;\n\t}\n\treturn undefined;\n}\n\ndeclare class Signal {\n\t/** @internal */\n\t_value: unknown;\n\n\t/**\n\t * @internal\n\t * Version numbers should always be >= 0, because the special value -1 is used\n\t * by Nodes to signify potentially unused but recyclable nodes.\n\t */\n\t_version: number;\n\n\t/** @internal */\n\t_node?: Node;\n\n\t/** @internal */\n\t_targets?: Node;\n\n\tconstructor(value?: T);\n\n\t/** @internal */\n\t_refresh(): boolean;\n\n\t/** @internal */\n\t_subscribe(node: Node): void;\n\n\t/** @internal */\n\t_unsubscribe(node: Node): void;\n\n\tsubscribe(fn: (value: T) => void): () => void;\n\n\tvalueOf(): T;\n\n\ttoString(): string;\n\n\tpeek(): T;\n\n\tget value(): T;\n\tset value(value: T);\n}\n\n/** @internal */\nfunction Signal(this: Signal, value?: unknown) {\n\tthis._value = value;\n\tthis._version = 0;\n\tthis._node = undefined;\n\tthis._targets = undefined;\n}\n\nSignal.prototype._refresh = function () {\n\treturn true;\n};\n\nSignal.prototype._subscribe = function (node) {\n\tif (this._targets !== node && node._prevTarget === undefined) {\n\t\tnode._nextTarget = this._targets;\n\t\tif (this._targets !== undefined) {\n\t\t\tthis._targets._prevTarget = node;\n\t\t}\n\t\tthis._targets = node;\n\t}\n};\n\nSignal.prototype._unsubscribe = function (node) {\n\t// Only run the unsubscribe step if the signal has any subscribers to begin with.\n\tif (this._targets !== undefined) {\n\t\tconst prev = node._prevTarget;\n\t\tconst next = node._nextTarget;\n\t\tif (prev !== undefined) {\n\t\t\tprev._nextTarget = next;\n\t\t\tnode._prevTarget = undefined;\n\t\t}\n\t\tif (next !== undefined) {\n\t\t\tnext._prevTarget = prev;\n\t\t\tnode._nextTarget = undefined;\n\t\t}\n\t\tif (node === this._targets) {\n\t\t\tthis._targets = next;\n\t\t}\n\t}\n};\n\nSignal.prototype.subscribe = function (fn) {\n\tconst signal = this;\n\treturn effect(function (this: Effect) {\n\t\tconst value = signal.value;\n\t\tconst flag = this._flags & TRACKING;\n\t\tthis._flags &= ~TRACKING;\n\t\ttry {\n\t\t\tfn(value);\n\t\t} finally {\n\t\t\tthis._flags |= flag;\n\t\t}\n\t});\n};\n\nSignal.prototype.valueOf = function () {\n\treturn this.value;\n};\n\nSignal.prototype.toString = function () {\n\treturn this.value + \"\";\n};\n\nSignal.prototype.peek = function () {\n\treturn this._value;\n};\n\nObject.defineProperty(Signal.prototype, \"value\", {\n\tget() {\n\t\tconst node = addDependency(this);\n\t\tif (node !== undefined) {\n\t\t\tnode._version = this._version;\n\t\t}\n\t\treturn this._value;\n\t},\n\tset(value) {\n\t\tif (value !== this._value) {\n\t\t\tif (batchIteration > 100) {\n\t\t\t\tcycleDetected();\n\t\t\t}\n\n\t\t\tthis._value = value;\n\t\t\tthis._version++;\n\t\t\tglobalVersion++;\n\n\t\t\t/**@__INLINE__*/ startBatch();\n\t\t\ttry {\n\t\t\t\tfor (\n\t\t\t\t\tlet node = this._targets;\n\t\t\t\t\tnode !== undefined;\n\t\t\t\t\tnode = node._nextTarget\n\t\t\t\t) {\n\t\t\t\t\tnode._target._notify();\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tendBatch();\n\t\t\t}\n\t\t}\n\t},\n});\n\nfunction signal(value: T): Signal {\n\treturn new Signal(value);\n}\n\nfunction needsToRecompute(target: Computed | Effect): boolean {\n\t// Check the dependencies for changed values. The dependency list is already\n\t// in order of use. Therefore if multiple dependencies have changed values, only\n\t// the first used dependency is re-evaluated at this point.\n\tfor (\n\t\tlet node = target._sources;\n\t\tnode !== undefined;\n\t\tnode = node._nextSource\n\t) {\n\t\t// If there's a new version of the dependency before or after refreshing,\n\t\t// or the dependency has something blocking it from refreshing at all (e.g. a\n\t\t// dependency cycle), then we need to recompute.\n\t\tif (\n\t\t\tnode._source._version !== node._version ||\n\t\t\t!node._source._refresh() ||\n\t\t\tnode._source._version !== node._version\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\t// If none of the dependencies have changed values since last recompute then\n\t// there's no need to recompute.\n\treturn false;\n}\n\nfunction prepareSources(target: Computed | Effect) {\n\t/**\n\t * 1. Mark all current sources as re-usable nodes (version: -1)\n\t * 2. Set a rollback node if the current node is being used in a different context\n\t * 3. Point 'target._sources' to the tail of the doubly-linked list, e.g:\n\t *\n\t * { undefined <- A <-> B <-> C -> undefined }\n\t * ↑ ↑\n\t * │ └──────┐\n\t * target._sources = A; (node is head) │\n\t * ↓ │\n\t * target._sources = C; (node is tail) ─┘\n\t */\n\tfor (\n\t\tlet node = target._sources;\n\t\tnode !== undefined;\n\t\tnode = node._nextSource\n\t) {\n\t\tconst rollbackNode = node._source._node;\n\t\tif (rollbackNode !== undefined) {\n\t\t\tnode._rollbackNode = rollbackNode;\n\t\t}\n\t\tnode._source._node = node;\n\t\tnode._version = -1;\n\n\t\tif (node._nextSource === undefined) {\n\t\t\ttarget._sources = node;\n\t\t\tbreak;\n\t\t}\n\t}\n}\n\nfunction cleanupSources(target: Computed | Effect) {\n\tlet node = target._sources;\n\tlet head = undefined;\n\n\t/**\n\t * At this point 'target._sources' points to the tail of the doubly-linked list.\n\t * It contains all existing sources + new sources in order of use.\n\t * Iterate backwards until we find the head node while dropping old dependencies.\n\t */\n\twhile (node !== undefined) {\n\t\tconst prev = node._prevSource;\n\n\t\t/**\n\t\t * The node was not re-used, unsubscribe from its change notifications and remove itself\n\t\t * from the doubly-linked list. e.g:\n\t\t *\n\t\t * { A <-> B <-> C }\n\t\t * ↓\n\t\t * { A <-> C }\n\t\t */\n\t\tif (node._version === -1) {\n\t\t\tnode._source._unsubscribe(node);\n\n\t\t\tif (prev !== undefined) {\n\t\t\t\tprev._nextSource = node._nextSource;\n\t\t\t}\n\t\t\tif (node._nextSource !== undefined) {\n\t\t\t\tnode._nextSource._prevSource = prev;\n\t\t\t}\n\t\t} else {\n\t\t\t/**\n\t\t\t * The new head is the last node seen which wasn't removed/unsubscribed\n\t\t\t * from the doubly-linked list. e.g:\n\t\t\t *\n\t\t\t * { A <-> B <-> C }\n\t\t\t * ↑ ↑ ↑\n\t\t\t * │ │ └ head = node\n\t\t\t * │ └ head = node\n\t\t\t * └ head = node\n\t\t\t */\n\t\t\thead = node;\n\t\t}\n\n\t\tnode._source._node = node._rollbackNode;\n\t\tif (node._rollbackNode !== undefined) {\n\t\t\tnode._rollbackNode = undefined;\n\t\t}\n\n\t\tnode = prev;\n\t}\n\n\ttarget._sources = head;\n}\n\ndeclare class Computed extends Signal {\n\t_compute: () => T;\n\t_sources?: Node;\n\t_globalVersion: number;\n\t_flags: number;\n\n\tconstructor(compute: () => T);\n\n\t_notify(): void;\n\tget value(): T;\n}\n\nfunction Computed(this: Computed, compute: () => unknown) {\n\tSignal.call(this, undefined);\n\n\tthis._compute = compute;\n\tthis._sources = undefined;\n\tthis._globalVersion = globalVersion - 1;\n\tthis._flags = OUTDATED;\n}\n\nComputed.prototype = new Signal() as Computed;\n\nComputed.prototype._refresh = function () {\n\tthis._flags &= ~NOTIFIED;\n\n\tif (this._flags & RUNNING) {\n\t\treturn false;\n\t}\n\n\t// If this computed signal has subscribed to updates from its dependencies\n\t// (TRACKING flag set) and none of them have notified about changes (OUTDATED\n\t// flag not set), then the computed value can't have changed.\n\tif ((this._flags & (OUTDATED | TRACKING)) === TRACKING) {\n\t\treturn true;\n\t}\n\tthis._flags &= ~OUTDATED;\n\n\tif (this._globalVersion === globalVersion) {\n\t\treturn true;\n\t}\n\tthis._globalVersion = globalVersion;\n\n\t// Mark this computed signal running before checking the dependencies for value\n\t// changes, so that the RUNNING flag can be used to notice cyclical dependencies.\n\tthis._flags |= RUNNING;\n\tif (this._version > 0 && !needsToRecompute(this)) {\n\t\tthis._flags &= ~RUNNING;\n\t\treturn true;\n\t}\n\n\tconst prevContext = evalContext;\n\ttry {\n\t\tprepareSources(this);\n\t\tevalContext = this;\n\t\tconst value = this._compute();\n\t\tif (\n\t\t\tthis._flags & HAS_ERROR ||\n\t\t\tthis._value !== value ||\n\t\t\tthis._version === 0\n\t\t) {\n\t\t\tthis._value = value;\n\t\t\tthis._flags &= ~HAS_ERROR;\n\t\t\tthis._version++;\n\t\t}\n\t} catch (err) {\n\t\tthis._value = err;\n\t\tthis._flags |= HAS_ERROR;\n\t\tthis._version++;\n\t}\n\tevalContext = prevContext;\n\tcleanupSources(this);\n\tthis._flags &= ~RUNNING;\n\treturn true;\n};\n\nComputed.prototype._subscribe = function (node) {\n\tif (this._targets === undefined) {\n\t\tthis._flags |= OUTDATED | TRACKING;\n\n\t\t// A computed signal subscribes lazily to its dependencies when the it\n\t\t// gets its first subscriber.\n\t\tfor (\n\t\t\tlet node = this._sources;\n\t\t\tnode !== undefined;\n\t\t\tnode = node._nextSource\n\t\t) {\n\t\t\tnode._source._subscribe(node);\n\t\t}\n\t}\n\tSignal.prototype._subscribe.call(this, node);\n};\n\nComputed.prototype._unsubscribe = function (node) {\n\t// Only run the unsubscribe step if the computed signal has any subscribers.\n\tif (this._targets !== undefined) {\n\t\tSignal.prototype._unsubscribe.call(this, node);\n\n\t\t// Computed signal unsubscribes from its dependencies when it loses its last subscriber.\n\t\t// This makes it possible for unreferences subgraphs of computed signals to get garbage collected.\n\t\tif (this._targets === undefined) {\n\t\t\tthis._flags &= ~TRACKING;\n\n\t\t\tfor (\n\t\t\t\tlet node = this._sources;\n\t\t\t\tnode !== undefined;\n\t\t\t\tnode = node._nextSource\n\t\t\t) {\n\t\t\t\tnode._source._unsubscribe(node);\n\t\t\t}\n\t\t}\n\t}\n};\n\nComputed.prototype._notify = function () {\n\tif (!(this._flags & NOTIFIED)) {\n\t\tthis._flags |= OUTDATED | NOTIFIED;\n\n\t\tfor (\n\t\t\tlet node = this._targets;\n\t\t\tnode !== undefined;\n\t\t\tnode = node._nextTarget\n\t\t) {\n\t\t\tnode._target._notify();\n\t\t}\n\t}\n};\n\nComputed.prototype.peek = function () {\n\tif (!this._refresh()) {\n\t\tcycleDetected();\n\t}\n\tif (this._flags & HAS_ERROR) {\n\t\tthrow this._value;\n\t}\n\treturn this._value;\n};\n\nObject.defineProperty(Computed.prototype, \"value\", {\n\tget() {\n\t\tif (this._flags & RUNNING) {\n\t\t\tcycleDetected();\n\t\t}\n\t\tconst node = addDependency(this);\n\t\tthis._refresh();\n\t\tif (node !== undefined) {\n\t\t\tnode._version = this._version;\n\t\t}\n\t\tif (this._flags & HAS_ERROR) {\n\t\t\tthrow this._value;\n\t\t}\n\t\treturn this._value;\n\t},\n});\n\ninterface ReadonlySignal extends Signal {\n\treadonly value: T;\n}\n\nfunction computed(compute: () => T): ReadonlySignal {\n\treturn new Computed(compute);\n}\n\nfunction cleanupEffect(effect: Effect) {\n\tconst cleanup = effect._cleanup;\n\teffect._cleanup = undefined;\n\n\tif (typeof cleanup === \"function\") {\n\t\t/*@__INLINE__**/ startBatch();\n\n\t\t// Run cleanup functions always outside of any context.\n\t\tconst prevContext = evalContext;\n\t\tevalContext = undefined;\n\t\ttry {\n\t\t\tcleanup();\n\t\t} catch (err) {\n\t\t\teffect._flags &= ~RUNNING;\n\t\t\teffect._flags |= DISPOSED;\n\t\t\tdisposeEffect(effect);\n\t\t\tthrow err;\n\t\t} finally {\n\t\t\tevalContext = prevContext;\n\t\t\tendBatch();\n\t\t}\n\t}\n}\n\nfunction disposeEffect(effect: Effect) {\n\tfor (\n\t\tlet node = effect._sources;\n\t\tnode !== undefined;\n\t\tnode = node._nextSource\n\t) {\n\t\tnode._source._unsubscribe(node);\n\t}\n\teffect._compute = undefined;\n\teffect._sources = undefined;\n\n\tcleanupEffect(effect);\n}\n\nfunction endEffect(this: Effect, prevContext?: Computed | Effect) {\n\tif (evalContext !== this) {\n\t\tthrow new Error(\"Out-of-order effect\");\n\t}\n\tcleanupSources(this);\n\tevalContext = prevContext;\n\n\tthis._flags &= ~RUNNING;\n\tif (this._flags & DISPOSED) {\n\t\tdisposeEffect(this);\n\t}\n\tendBatch();\n}\n\ndeclare class Effect {\n\t_compute?: () => unknown;\n\t_cleanup?: unknown;\n\t_sources?: Node;\n\t_nextBatchedEffect?: Effect;\n\t_flags: number;\n\n\tconstructor(compute: () => void);\n\n\t_callback(): void;\n\t_start(): () => void;\n\t_notify(): void;\n\t_dispose(): void;\n}\n\nfunction Effect(this: Effect, compute: () => void) {\n\tthis._compute = compute;\n\tthis._cleanup = undefined;\n\tthis._sources = undefined;\n\tthis._nextBatchedEffect = undefined;\n\tthis._flags = TRACKING;\n}\n\nEffect.prototype._callback = function () {\n\tconst finish = this._start();\n\ttry {\n\t\tif (!(this._flags & DISPOSED) && this._compute !== undefined) {\n\t\t\tthis._cleanup = this._compute();\n\t\t}\n\t} finally {\n\t\tfinish();\n\t}\n};\n\nEffect.prototype._start = function () {\n\tif (this._flags & RUNNING) {\n\t\tcycleDetected();\n\t}\n\tthis._flags |= RUNNING;\n\tthis._flags &= ~DISPOSED;\n\tcleanupEffect(this);\n\tprepareSources(this);\n\n\t/*@__INLINE__**/ startBatch();\n\tconst prevContext = evalContext;\n\tevalContext = this;\n\treturn endEffect.bind(this, prevContext);\n};\n\nEffect.prototype._notify = function () {\n\tif (!(this._flags & NOTIFIED)) {\n\t\tthis._flags |= NOTIFIED;\n\t\tthis._nextBatchedEffect = batchedEffect;\n\t\tbatchedEffect = this;\n\t}\n};\n\nEffect.prototype._dispose = function () {\n\tthis._flags |= DISPOSED;\n\n\tif (!(this._flags & RUNNING)) {\n\t\tdisposeEffect(this);\n\t}\n};\n\nfunction effect(compute: () => unknown): () => void {\n\tconst effect = new Effect(compute);\n\ttry {\n\t\teffect._callback();\n\t} catch (err) {\n\t\teffect._dispose();\n\t\tthrow err;\n\t}\n\t// Return a bound function instead of a wrapper like `() => effect._dispose()`,\n\t// because bound functions seem to be just as fast and take up a lot less memory.\n\treturn effect._dispose.bind(effect);\n}\n\nexport { signal, computed, effect, batch, Signal, ReadonlySignal };\n","import { options, Component } from \"preact\";\nimport { useRef, useMemo, useEffect } from \"preact/hooks\";\nimport {\n\tsignal,\n\tcomputed,\n\tbatch,\n\teffect,\n\tSignal,\n\ttype ReadonlySignal,\n} from \"@preact/signals-core\";\nimport {\n\tVNode,\n\tOptionsTypes,\n\tHookFn,\n\tEffect,\n\tPropertyUpdater,\n\tAugmentedComponent,\n\tAugmentedElement as Element,\n} from \"./internal\";\n\nexport { signal, computed, batch, effect, Signal, type ReadonlySignal };\n\nconst HAS_PENDING_UPDATE = 1 << 0;\nconst HAS_HOOK_STATE = 1 << 1;\nconst HAS_COMPUTEDS = 1 << 2;\n\n// Install a Preact options hook\nfunction hook(hookName: T, hookFn: HookFn) {\n\t// @ts-ignore-next-line private options hooks usage\n\toptions[hookName] = hookFn.bind(null, options[hookName] || (() => {}));\n}\n\nlet currentComponent: AugmentedComponent | undefined;\nlet finishUpdate: (() => void) | undefined;\n\nfunction setCurrentUpdater(updater?: Effect) {\n\t// end tracking for the current update:\n\tif (finishUpdate) finishUpdate();\n\t// start tracking the new update:\n\tfinishUpdate = updater && updater._start();\n}\n\nfunction createUpdater(update: () => void) {\n\tlet updater!: Effect;\n\teffect(function (this: Effect) {\n\t\tupdater = this;\n\t});\n\tupdater._callback = update;\n\treturn updater;\n}\n\n/** @todo This may be needed for complex prop value detection. */\n// function isSignalValue(value: any): value is Signal {\n// \tif (typeof value !== \"object\" || value == null) return false;\n// \tif (value instanceof Signal) return true;\n// \t// @TODO: uncomment this when we land Reactive (ideally behind a brand check)\n// \t// for (let i in value) if (value[i] instanceof Signal) return true;\n// \treturn false;\n// }\n\n/**\n * A wrapper component that renders a Signal directly as a Text node.\n * @todo: in Preact 11, just decorate Signal with `type:null`\n */\nfunction Text(this: AugmentedComponent, { data }: { data: Signal }) {\n\t// hasComputeds.add(this);\n\n\t// Store the props.data signal in another signal so that\n\t// passing a new signal reference re-runs the text computed:\n\tconst currentSignal = useSignal(data);\n\tcurrentSignal.value = data;\n\n\tconst s = useMemo(() => {\n\t\t// mark the parent component as having computeds so it gets optimized\n\t\tlet v = this.__v;\n\t\twhile ((v = v.__!)) {\n\t\t\tif (v.__c) {\n\t\t\t\tv.__c._updateFlags |= HAS_COMPUTEDS;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Replace this component's vdom updater with a direct text one:\n\t\tthis._updater!._callback = () => {\n\t\t\t(this.base as Text).data = s.peek();\n\t\t};\n\n\t\treturn computed(() => {\n\t\t\tlet data = currentSignal.value;\n\t\t\tlet s = data.value;\n\t\t\treturn s === 0 ? 0 : s === true ? \"\" : s || \"\";\n\t\t});\n\t}, []);\n\n\treturn s.value;\n}\nText.displayName = \"_st\";\n\nObject.defineProperties(Signal.prototype, {\n\tconstructor: { configurable: true, value: undefined },\n\ttype: { configurable: true, value: Text },\n\tprops: {\n\t\tconfigurable: true,\n\t\tget() {\n\t\t\treturn { data: this };\n\t\t},\n\t},\n\t// Setting a VNode's _depth to 1 forces Preact to clone it before modifying:\n\t// https://github.com/preactjs/preact/blob/d7a433ee8463a7dc23a05111bb47de9ec729ad4d/src/diff/children.js#L77\n\t// @todo remove this for Preact 11\n\t__b: { configurable: true, value: 1 },\n});\n\n/** Inject low-level property/attribute bindings for Signals into Preact's diff */\nhook(OptionsTypes.DIFF, (old, vnode) => {\n\tif (typeof vnode.type === \"string\") {\n\t\tlet signalProps: Record | undefined;\n\n\t\tlet props = vnode.props;\n\t\tfor (let i in props) {\n\t\t\tif (i === \"children\") continue;\n\n\t\t\tlet value = props[i];\n\t\t\tif (value instanceof Signal) {\n\t\t\t\tif (!signalProps) vnode.__np = signalProps = {};\n\t\t\t\tsignalProps[i] = value;\n\t\t\t\tprops[i] = value.peek();\n\t\t\t}\n\t\t}\n\t}\n\n\told(vnode);\n});\n\n/** Set up Updater before rendering a component */\nhook(OptionsTypes.RENDER, (old, vnode) => {\n\tsetCurrentUpdater();\n\n\tlet updater;\n\n\tlet component = vnode.__c;\n\tif (component) {\n\t\tcomponent._updateFlags &= ~HAS_PENDING_UPDATE;\n\n\t\tupdater = component._updater;\n\t\tif (updater === undefined) {\n\t\t\tcomponent._updater = updater = createUpdater(() => {\n\t\t\t\tcomponent._updateFlags |= HAS_PENDING_UPDATE;\n\t\t\t\tcomponent.setState({});\n\t\t\t});\n\t\t}\n\t}\n\n\tcurrentComponent = component;\n\tsetCurrentUpdater(updater);\n\told(vnode);\n});\n\n/** Finish current updater if a component errors */\nhook(OptionsTypes.CATCH_ERROR, (old, error, vnode, oldVNode) => {\n\tsetCurrentUpdater();\n\tcurrentComponent = undefined;\n\told(error, vnode, oldVNode);\n});\n\n/** Finish current updater after rendering any VNode */\nhook(OptionsTypes.DIFFED, (old, vnode) => {\n\tsetCurrentUpdater();\n\tcurrentComponent = undefined;\n\n\tlet dom: Element;\n\n\t// vnode._dom is undefined during string rendering,\n\t// so we use this to skip prop subscriptions during SSR.\n\tif (typeof vnode.type === \"string\" && (dom = vnode.__e as Element)) {\n\t\tlet props = vnode.__np;\n\t\tlet renderedProps = vnode.props;\n\t\tif (props) {\n\t\t\tlet updaters = dom._updaters;\n\t\t\tif (updaters) {\n\t\t\t\tfor (let prop in updaters) {\n\t\t\t\t\tlet updater = updaters[prop];\n\t\t\t\t\tif (updater !== undefined && !(prop in props)) {\n\t\t\t\t\t\tupdater._dispose();\n\t\t\t\t\t\t// @todo we could just always invoke _dispose() here\n\t\t\t\t\t\tupdaters[prop] = undefined;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tupdaters = {};\n\t\t\t\tdom._updaters = updaters;\n\t\t\t}\n\t\t\tfor (let prop in props) {\n\t\t\t\tlet updater = updaters[prop];\n\t\t\t\tlet signal = props[prop];\n\t\t\t\tif (updater === undefined) {\n\t\t\t\t\tupdater = createPropUpdater(dom, prop, signal, renderedProps);\n\t\t\t\t\tupdaters[prop] = updater;\n\t\t\t\t} else {\n\t\t\t\t\tupdater._update(signal, renderedProps);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\told(vnode);\n});\n\nfunction createPropUpdater(\n\tdom: Element,\n\tprop: string,\n\tpropSignal: Signal,\n\tprops: Record\n): PropertyUpdater {\n\tconst setAsProperty =\n\t\tprop in dom &&\n\t\t// SVG elements need to go through `setAttribute` because they\n\t\t// expect things like SVGAnimatedTransformList instead of strings.\n\t\t// @ts-ignore\n\t\tdom.ownerSVGElement === undefined;\n\n\tconst changeSignal = signal(propSignal);\n\treturn {\n\t\t_update: (newSignal: Signal, newProps: typeof props) => {\n\t\t\tchangeSignal.value = newSignal;\n\t\t\tprops = newProps;\n\t\t},\n\t\t_dispose: effect(() => {\n\t\t\tconst value = changeSignal.value.value;\n\t\t\t// If Preact just rendered this value, don't render it again:\n\t\t\tif (props[prop] === value) return;\n\t\t\tprops[prop] = value;\n\t\t\tif (setAsProperty) {\n\t\t\t\t// @ts-ignore-next-line silly\n\t\t\t\tdom[prop] = value;\n\t\t\t} else if (value) {\n\t\t\t\tdom.setAttribute(prop, value);\n\t\t\t} else {\n\t\t\t\tdom.removeAttribute(prop);\n\t\t\t}\n\t\t}),\n\t};\n}\n\n/** Unsubscribe from Signals when unmounting components/vnodes */\nhook(OptionsTypes.UNMOUNT, (old, vnode: VNode) => {\n\tif (typeof vnode.type === \"string\") {\n\t\tlet dom = vnode.__e as Element | undefined;\n\t\t// vnode._dom is undefined during string rendering\n\t\tif (dom) {\n\t\t\tconst updaters = dom._updaters;\n\t\t\tif (updaters) {\n\t\t\t\tdom._updaters = undefined;\n\t\t\t\tfor (let prop in updaters) {\n\t\t\t\t\tlet updater = updaters[prop];\n\t\t\t\t\tif (updater) updater._dispose();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\tlet component = vnode.__c;\n\t\tif (component) {\n\t\t\tconst updater = component._updater;\n\t\t\tif (updater) {\n\t\t\t\tcomponent._updater = undefined;\n\t\t\t\tupdater._dispose();\n\t\t\t}\n\t\t}\n\t}\n\told(vnode);\n});\n\n/** Mark components that use hook state so we can skip sCU optimization. */\nhook(OptionsTypes.HOOK, (old, component, index, type) => {\n\tif (type < 3)\n\t\t(component as AugmentedComponent)._updateFlags |= HAS_HOOK_STATE;\n\told(component, index, type);\n});\n\n/**\n * Auto-memoize components that use Signals/Computeds.\n * Note: Does _not_ optimize components that use hook/class state.\n */\nComponent.prototype.shouldComponentUpdate = function (\n\tthis: AugmentedComponent,\n\tprops,\n\tstate\n) {\n\t// @todo: Once preactjs/preact#3671 lands, this could just use `currentUpdater`:\n\tconst updater = this._updater;\n\tconst hasSignals = updater && updater._sources !== undefined;\n\n\t// let reason;\n\t// if (!hasSignals && !hasComputeds.has(this)) {\n\t// \treason = \"no signals or computeds\";\n\t// } else if (hasPendingUpdate.has(this)) {\n\t// \treason = \"has pending update\";\n\t// } else if (hasHookState.has(this)) {\n\t// \treason = \"has hook state\";\n\t// }\n\t// if (reason) {\n\t// \tif (!this) reason += \" (`this` bug)\";\n\t// \tconsole.log(\"not optimizing\", this?.constructor?.name, \": \", reason, {\n\t// \t\tdetails: {\n\t// \t\t\thasSignals,\n\t// \t\t\thasComputeds: hasComputeds.has(this),\n\t// \t\t\thasPendingUpdate: hasPendingUpdate.has(this),\n\t// \t\t\thasHookState: hasHookState.has(this),\n\t// \t\t\tdeps: Array.from(updater._deps),\n\t// \t\t\tupdater,\n\t// \t\t},\n\t// \t});\n\t// }\n\n\t// if this component used no signals or computeds, update:\n\tif (!hasSignals && !(this._updateFlags & HAS_COMPUTEDS)) return true;\n\n\t// if there is a pending re-render triggered from Signals,\n\t// or if there is hook or class state, update:\n\tif (this._updateFlags & (HAS_PENDING_UPDATE | HAS_HOOK_STATE)) return true;\n\n\t// @ts-ignore\n\tfor (let i in state) return true;\n\n\t// if any non-Signal props changed, update:\n\tfor (let i in props) {\n\t\tif (i !== \"__source\" && props[i] !== this.props[i]) return true;\n\t}\n\tfor (let i in this.props) if (!(i in props)) return true;\n\n\t// this is a purely Signal-driven component, don't update:\n\treturn false;\n};\n\nexport function useSignal(value: T) {\n\treturn useMemo(() => signal(value), []);\n}\n\nexport function useComputed(compute: () => T) {\n\tconst $compute = useRef(compute);\n\t$compute.current = compute;\n\t(currentComponent as AugmentedComponent)._updateFlags |= HAS_COMPUTEDS;\n\treturn useMemo(() => computed(() => $compute.current()), []);\n}\n\nexport function useSignalEffect(cb: () => void | (() => void)) {\n\tconst callback = useRef(cb);\n\tcallback.current = cb;\n\n\tuseEffect(() => {\n\t\treturn effect(() => callback.current());\n\t}, []);\n}\n\n/**\n * @todo Determine which Reactive implementation we'll be using.\n * @internal\n */\n// export function useReactive(value: T): Reactive {\n// \treturn useMemo(() => reactive(value), []);\n// }\n\n/**\n * @internal\n * Update a Reactive's using the properties of an object or other Reactive.\n * Also works for Signals.\n * @example\n * // Update a Reactive with Object.assign()-like syntax:\n * const r = reactive({ name: \"Alice\" });\n * update(r, { name: \"Bob\" });\n * update(r, { age: 42 }); // property 'age' does not exist in type '{ name?: string }'\n * update(r, 2); // '2' has no properties in common with '{ name?: string }'\n * console.log(r.name.value); // \"Bob\"\n *\n * @example\n * // Update a Reactive with the properties of another Reactive:\n * const A = reactive({ name: \"Alice\" });\n * const B = reactive({ name: \"Bob\", age: 42 });\n * update(A, B);\n * console.log(`${A.name} is ${A.age}`); // \"Bob is 42\"\n *\n * @example\n * // Update a signal with assign()-like syntax:\n * const s = signal(42);\n * update(s, \"hi\"); // Argument type 'string' not assignable to type 'number'\n * update(s, {}); // Argument type '{}' not assignable to type 'number'\n * update(s, 43);\n * console.log(s.value); // 43\n *\n * @param obj The Reactive or Signal to be updated\n * @param update The value, Signal, object or Reactive to update `obj` to match\n * @param overwrite If `true`, any properties `obj` missing from `update` are set to `undefined`\n */\n/*\nexport function update(\n\tobj: T,\n\tupdate: Partial>,\n\toverwrite = false\n) {\n\tif (obj instanceof Signal) {\n\t\tobj.value = peekValue(update);\n\t} else {\n\t\tfor (let i in update) {\n\t\t\tif (i in obj) {\n\t\t\t\tobj[i].value = peekValue(update[i]);\n\t\t\t} else {\n\t\t\t\tlet sig = signal(peekValue(update[i]));\n\t\t\t\tsig[KEY] = i;\n\t\t\t\tobj[i] = sig;\n\t\t\t}\n\t\t}\n\t\tif (overwrite) {\n\t\t\tfor (let i in obj) {\n\t\t\t\tif (!(i in update)) {\n\t\t\t\t\tobj[i].value = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n*/\n","/**\n * This method converts the hierarchical command list into a flat list of commands which is more convenient\n * for internal processing, whereas the hierarchical command list is more convenient for the user.\n */\nexport default function flattenCommands(\n commands: HierarchicalCommandList,\n parentId: CommandId = null\n): FlatCommandList {\n return Object.keys(commands).reduce((commandList, commandId) => {\n const {\n icon,\n description,\n name,\n subCommands,\n action,\n canHandleQueries,\n closeOnExecute,\n category,\n executeManually,\n } = commands[commandId] as Command & CommandGroup;\n\n // Create an uniquely identifiable command id for the flat command list\n const absoluteCommandId = parentId ? `${parentId}.${commandId}` : commandId;\n\n // Create list of available subcommand names\n const subCommandIds = subCommands\n ? Object.keys(subCommands).map((subCommandId) => `${absoluteCommandId}.${subCommandId}`)\n : [];\n\n // Insert the processed command into the flat command list\n commandList[absoluteCommandId] = {\n id: absoluteCommandId,\n name,\n icon,\n description,\n action,\n canHandleQueries,\n subCommandIds,\n parentId,\n closeOnExecute,\n category,\n executeManually,\n };\n\n // Insert subcommands into the list\n if (subCommandIds.length > 0) {\n return {\n ...commandList,\n ...flattenCommands(subCommands, absoluteCommandId),\n };\n }\n return commandList;\n }, {} as FlatCommandList);\n}\n","const PREFIX = '%c[COMMANDBAR]';\n\nconst logger = {\n ok: (message: string, ...args: any[]) => console.log(PREFIX, 'color: green', message, ...args),\n error: (message: string, ...args: any[]) => console.log(PREFIX, 'color: red', message, ...args),\n warn: (message: string, ...args: any[]) => console.warn(PREFIX, 'color: orange', message, ...args),\n debug:\n // @ts-ignore\n process.env.NODE_ENV === 'production'\n ? () => null\n : (message: string, ...args: any[]) => console.debug(PREFIX, 'color: lightblue', message, ...args),\n};\n\nexport default logger;\n","export default function clamp(value: number, min: number, max: number): number {\n return Math.max(min, Math.min(max, value));\n}\n","/**\n* Copyright (c) 2023, Leon Sorokin\n* All rights reserved. (MIT Licensed)\n*\n* uFuzzy.js (μFuzzy)\n* A tiny, efficient fuzzy matcher that doesn't suck\n* https://github.com/leeoniya/uFuzzy (v1.0.3)\n*/\n\nconst cmp = new Intl.Collator('en').compare;\n\nconst inf = Infinity;\n\nconst NEGS_RE = /(?:\\s+|^)-[a-z\\d]+/ig;\n\nconst OPTS = {\n\t// term segmentation & punct/whitespace merging\n\tinterSplit: \"[^A-Za-z0-9']+\",\n\tintraSplit: '[a-z][A-Z]',\n\n\t// intra bounds that will be used to increase lft1/rgt1 info counters\n\tintraBound: '[A-Za-z][0-9]|[0-9][A-Za-z]|[a-z][A-Z]',\n\n\t// inter-bounds mode\n\t// 2 = strict (will only match 'man' on whitepace and punct boundaries: Mega Man, Mega_Man, mega.man)\n\t// 1 = loose (plus allowance for alpha-num and case-change boundaries: MegaMan, 0007man)\n\t// 0 = any (will match 'man' as any substring: megamaniac)\n\tinterLft: 0,\n\tinterRgt: 0,\n\n\t// allowance between terms\n\tinterChars: '.',\n\tinterIns: inf,\n\n\t// allowance between chars in terms\n\tintraChars: \"[a-z\\\\d']\", // internally case-insensitive\n\tintraIns: 0,\n\n\tintraContr: \"'[a-z]{1,2}\\\\b\",\n\n\t// multi-insert or single-error mode\n\tintraMode: 0,\n\n\t// single-error bounds for errors within terms, default requires exact first char\n\tintraSlice: [1, inf],\n\n\t// single-error tolerance toggles\n\tintraSub: 0,\n\tintraTrn: 0,\n\tintraDel: 0,\n\n\t// can post-filter matches that are too far apart in distance or length\n\t// (since intraIns is between each char, it can accum to nonsense matches)\n\tintraFilt: (term, match, index) => true, // should this also accept WIP info?\n\n\t// final sorting fn\n\tsort: (info, haystack, needle) => {\n\t\tlet {\n\t\t\tidx,\n\t\t\tchars,\n\t\t\tterms,\n\t\t\tinterLft2,\n\t\t\tinterLft1,\n\t\t//\tinterRgt2,\n\t\t//\tinterRgt1,\n\t\t\tstart,\n\t\t\tintraIns,\n\t\t\tinterIns,\n\t\t} = info;\n\n\t\treturn idx.map((v, i) => i).sort((ia, ib) => (\n\t\t\t// most contig chars matched\n\t\t\tchars[ib] - chars[ia] ||\n\t\t\t// least char intra-fuzz (most contiguous)\n\t\t\tintraIns[ia] - intraIns[ib] ||\n\t\t\t// most prefix bounds, boosted by full term matches\n\t\t\t(\n\t\t\t\t(terms[ib] + interLft2[ib] + 0.5 * interLft1[ib]) -\n\t\t\t\t(terms[ia] + interLft2[ia] + 0.5 * interLft1[ia])\n\t\t\t) ||\n\t\t\t// highest density of match (least span)\n\t\t//\tspan[ia] - span[ib] ||\n\t\t\t// highest density of match (least term inter-fuzz)\n\t\t\tinterIns[ia] - interIns[ib] ||\n\t\t\t// earliest start of match\n\t\t\tstart[ia] - start[ib] ||\n\t\t\t// alphabetic\n\t\t\tcmp(haystack[idx[ia]], haystack[idx[ib]])\n\t\t));\n\t},\n};\n\nconst lazyRepeat = (chars, limit) => (\n\tlimit == 0 ? '' :\n\tlimit == 1 ? chars + '??' :\n\tlimit == inf ? chars + '*?' :\n\t chars + `{0,${limit}}?`\n);\n\nconst mode2Tpl = '(?:\\\\b|_)';\n\nfunction uFuzzy(opts) {\n\topts = Object.assign({}, OPTS, opts);\n\n\tconst {\n\t\tinterLft,\n\t\tinterRgt,\n\t\tintraMode,\n\t\tintraSlice,\n\t\tintraIns,\n\t\tintraSub,\n\t\tintraTrn,\n\t\tintraDel,\n\t\tintraContr,\n\t\tintraSplit: _intraSplit,\n\t\tinterSplit: _interSplit,\n\t\tintraBound: _intraBound,\n\t\tintraChars,\n\t} = opts;\n\n\tlet { intraRules } = opts;\n\n\tif (intraRules == null) {\n\t\tintraRules = p => {\n\t\t\t// default is exact term matches only\n\t\t\tlet _intraSlice = OPTS.intraSlice, // requires first char\n\t\t\t\t_intraIns = 0,\n\t\t\t\t_intraSub = 0,\n\t\t\t\t_intraTrn = 0,\n\t\t\t\t_intraDel = 0;\n\n\t\t\tlet plen = p.length;\n\n\t\t\t// prevent junk matches by requiring stricter rules for short terms\n\t\t\tif (plen <= 4) {\n\t\t\t\tif (plen >= 3) {\n\t\t\t\t\t// one swap in non-first char when 3-4 chars\n\t\t\t\t\t_intraTrn = Math.min(intraTrn, 1);\n\n\t\t\t\t\t// or one insertion when 4 chars\n\t\t\t\t\tif (plen == 4)\n\t\t\t\t\t\t_intraIns = Math.min(intraIns, 1);\n\t\t\t\t}\n\t\t\t\t// else exact match when 1-2 chars\n\t\t\t}\n\t\t\t// use supplied opts\n\t\t\telse {\n\t\t\t\t_intraSlice = intraSlice;\n\t\t\t\t_intraIns = intraIns,\n\t\t\t\t_intraSub = intraSub,\n\t\t\t\t_intraTrn = intraTrn,\n\t\t\t\t_intraDel = intraDel;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tintraSlice: _intraSlice,\n\t\t\t\tintraIns: _intraIns,\n\t\t\t\tintraSub: _intraSub,\n\t\t\t\tintraTrn: _intraTrn,\n\t\t\t\tintraDel: _intraDel,\n\t\t\t};\n\t\t};\n\t}\n\n\tlet withIntraSplit = !!_intraSplit;\n\n\tlet intraSplit = new RegExp(_intraSplit, 'g');\n\tlet interSplit = new RegExp(_interSplit, 'g');\n\n\tlet trimRe = new RegExp('^' + _interSplit + '|' + _interSplit + '$', 'g');\n\tlet contrsRe = new RegExp(intraContr, 'gi');\n\n\tconst split = needle => {\n\t\tneedle = needle.replace(trimRe, '').toLowerCase();\n\n\t\tif (withIntraSplit)\n\t\t\tneedle = needle.replace(intraSplit, m => m[0] + ' ' + m[1]);\n\n\t\treturn needle.split(interSplit).filter(t => t != '');\n\t};\n\n\tconst prepQuery = (needle, capt = 0, interOR = false) => {\n\t\t// split on punct, whitespace, num-alpha, and upper-lower boundaries\n\t\tlet parts = split(needle);\n\n\t\tif (parts.length == 0)\n\t\t\tthrow `Empty needle!`;\n\n\t\t// split out any detected contractions for each term that become required suffixes\n\t\tlet contrs = Array(parts.length).fill('');\n\t\tparts = parts.map((p, pi) => p.replace(contrsRe, m => {\n\t\t\tcontrs[pi] = m;\n\t\t\treturn '';\n\t\t}));\n\n\t\t// array of regexp tpls for each term\n\t\tlet reTpl;\n\n\t\t// allows single mutations within each term\n\t\tif (intraMode == 1) {\n\t\t\treTpl = parts.map((p, pi) => {\n\t\t\t\tlet {\n\t\t\t\t\tintraSlice,\n\t\t\t\t\tintraIns,\n\t\t\t\t\tintraSub,\n\t\t\t\t\tintraTrn,\n\t\t\t\t\tintraDel,\n\t\t\t\t} = intraRules(p);\n\n\t\t\t\tif (intraIns + intraSub + intraTrn + intraDel == 0)\n\t\t\t\t\treturn p + contrs[pi];\n\n\t\t\t\tlet [lftIdx, rgtIdx] = intraSlice;\n\t\t\t\tlet lftChar = p.slice(0, lftIdx); // prefix\n\t\t\t\tlet rgtChar = p.slice(rgtIdx); // suffix\n\n\t\t\t\tlet chars = p.slice(lftIdx, rgtIdx);\n\n\t\t\t\t// neg lookahead to prefer matching 'Test' instead of 'tTest' in ManifestTest or fittest\n\t\t\t\t// but skip when search term contains leading repetition (aardvark, aaa)\n\t\t\t\tif (intraIns == 1 && lftChar.length == 1 && lftChar != chars[0])\n\t\t\t\t\tlftChar += '(?!' + lftChar + ')';\n\n\t\t\t\tlet numChars = chars.length;\n\n\t\t\t\tlet variants = [];\n\n\t\t\t\t// variants with single char substitutions\n\t\t\t\tif (intraSub) {\n\t\t\t\t\tfor (let i = 0; i < numChars; i++)\n\t\t\t\t\t\tvariants.push(lftChar + chars.slice(0, i) + intraChars + chars.slice(i + 1) + rgtChar);\n\t\t\t\t}\n\n\t\t\t\t// variants with single transpositions\n\t\t\t\tif (intraTrn) {\n\t\t\t\t\tfor (let i = 0; i < numChars - 1; i++) {\n\t\t\t\t\t\tif (chars[i] != chars[i+1])\n\t\t\t\t\t\t\tvariants.push(lftChar + chars.slice(0, i) + chars[i+1] + chars[i] + chars.slice(i + 2) + rgtChar);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// variants with single char omissions\n\t\t\t\tif (intraDel) {\n\t\t\t\t\tfor (let i = 0; i < numChars; i++)\n\t\t\t\t\t\tvariants.push(lftChar + chars.slice(0, i + 1) + '?' + chars.slice(i + 1) + rgtChar);\n\t\t\t\t}\n\n\t\t\t\t// variants with single char insertions\n\t\t\t\tif (intraIns) {\n\t\t\t\t\tlet intraInsTpl = lazyRepeat(intraChars, 1);\n\n\t\t\t\t\tfor (let i = 0; i < numChars; i++)\n\t\t\t\t\t\tvariants.push(lftChar + chars.slice(0, i) + intraInsTpl + chars.slice(i) + rgtChar);\n\t\t\t\t}\n\n\t\t\t\tlet reTpl = '(?:' + p + '|' + variants.join('|') + ')' + contrs[pi];\n\n\t\t\t//\tconsole.log(reTpl);\n\n\t\t\t\treturn reTpl;\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tlet intraInsTpl = lazyRepeat(intraChars, intraIns);\n\n\t\t\t// capture at char level\n\t\t\tif (capt == 2 && intraIns > 0) {\n\t\t\t\t// sadly, we also have to capture the inter-term junk via parenth-wrapping .*?\n\t\t\t\t// to accum other capture groups' indices for \\b boosting during scoring\n\t\t\t\tintraInsTpl = ')(' + intraInsTpl + ')(';\n\t\t\t}\n\n\t\t\treTpl = parts.map((p, pi) => p.split('').map((c, i, chars) => {\n\t\t\t\t// neg lookahead to prefer matching 'Test' instead of 'tTest' in ManifestTest or fittest\n\t\t\t\t// but skip when search term contains leading repetition (aardvark, aaa)\n\t\t\t\tif (intraIns == 1 && i == 0 && chars.length > 1 && c[i] != c[i+1])\n\t\t\t\t\tc += '(?!' + c + ')';\n\n\t\t\t\treturn c;\n\t\t\t}).join(intraInsTpl) + contrs[pi]);\n\t\t}\n\n\t//\tconsole.log(reTpl);\n\n\t\t// this only helps to reduce initial matches early when they can be detected\n\t\t// TODO: might want a mode 3 that excludes _\n\t\tlet preTpl = interLft == 2 ? mode2Tpl : '';\n\t\tlet sufTpl = interRgt == 2 ? mode2Tpl : '';\n\n\t\tlet interCharsTpl = sufTpl + lazyRepeat(opts.interChars, opts.interIns) + preTpl;\n\n\t\t// capture at word level\n\t\tif (capt > 0) {\n\t\t\tif (interOR) {\n\t\t\t\t// this is basically for doing .matchAll() occurence counting and highlighting without needing permuted ooo needles\n\t\t\t\treTpl = preTpl + '(' + reTpl.join(')' + sufTpl + '|' + preTpl + '(') + ')' + sufTpl;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// sadly, we also have to capture the inter-term junk via parenth-wrapping .*?\n\t\t\t\t// to accum other capture groups' indices for \\b boosting during scoring\n\t\t\t\treTpl = '(' + reTpl.join(')(' + interCharsTpl + ')(') + ')';\n\t\t\t\treTpl = '(.?' + preTpl + ')' + reTpl + '(' + sufTpl + '.*)'; // nit: trailing capture here assumes interIns = Inf\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treTpl = reTpl.join(interCharsTpl);\n\t\t\treTpl = preTpl + reTpl + sufTpl;\n\t\t}\n\n\t//\tconsole.log(reTpl);\n\n\t\treturn [new RegExp(reTpl, 'i'), parts, contrs];\n\t};\n\n\tconst filter = (haystack, needle, idxs) => {\n\n\t\tlet out = [];\n\t\tlet [query] = prepQuery(needle);\n\n\t\tif (idxs != null) {\n\t\t\tfor (let i = 0; i < idxs.length; i++) {\n\t\t\t\tlet idx = idxs[i];\n\t\t\t\tquery.test(haystack[idx]) && out.push(idx);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor (let i = 0; i < haystack.length; i++)\n\t\t\t\tquery.test(haystack[i]) && out.push(i);\n\t\t}\n\n\t\treturn out;\n\t};\n\n\tlet withIntraBound = !!_intraBound;\n\n\tlet interBound = new RegExp(_interSplit);\n\tlet intraBound = new RegExp(_intraBound);\n\n\tconst info = (idxs, haystack, needle) => {\n\n\t\tlet [query, parts, contrs] = prepQuery(needle, 1);\n\t\tlet [queryR] = prepQuery(needle, 2);\n\t\tlet partsLen = parts.length;\n\n\t\tlet len = idxs.length;\n\n\t\tlet field = Array(len).fill(0);\n\n\t\tlet info = {\n\t\t\t// idx in haystack\n\t\t\tidx: Array(len),\n\n\t\t\t// start of match\n\t\t\tstart: field.slice(),\n\t\t\t// length of match\n\t\t//\tspan: field.slice(),\n\n\t\t\t// contiguous chars matched\n\t\t\tchars: field.slice(),\n\n\t\t\t// contiguous (no fuzz) and bounded terms (intra=0, lft2/1, rgt2/1)\n\t\t\t// excludes terms that are contiguous but have < 2 bounds (substrings)\n\t\t\tterms: field.slice(),\n\n\t\t\t// cumulative length of unmatched chars (fuzz) within span\n\t\t\tinterIns: field.slice(), // between terms\n\t\t\tintraIns: field.slice(), // within terms\n\n\t\t\t// interLft/interRgt counters\n\t\t\tinterLft2: field.slice(),\n\t\t\tinterRgt2: field.slice(),\n\t\t\tinterLft1: field.slice(),\n\t\t\tinterRgt1: field.slice(),\n\n\t\t\tranges: Array(len),\n\t\t};\n\n\t\t// might discard idxs based on bounds checks\n\t\tlet mayDiscard = interLft == 1 || interRgt == 1;\n\n\t\tlet ii = 0;\n\n\t\tfor (let i = 0; i < idxs.length; i++) {\n\t\t\tlet mhstr = haystack[idxs[i]];\n\n\t\t\t// the matched parts are [full, junk, term, junk, term, junk]\n\t\t\tlet m = mhstr.match(query);\n\n\t\t\t// leading junk\n\t\t\tlet start = m.index + m[1].length;\n\n\t\t\tlet idxAcc = start;\n\t\t//\tlet span = m[0].length;\n\n\t\t\tlet disc = false;\n\t\t\tlet lft2 = 0;\n\t\t\tlet lft1 = 0;\n\t\t\tlet rgt2 = 0;\n\t\t\tlet rgt1 = 0;\n\t\t\tlet chars = 0;\n\t\t\tlet terms = 0;\n\t\t\tlet inter = 0;\n\t\t\tlet intra = 0;\n\n\t\t\tlet refine = [];\n\n\t\t\tfor (let j = 0, k = 2; j < partsLen; j++, k+=2) {\n\t\t\t\tlet group = m[k].toLowerCase();\n\t\t\t\tlet term = parts[j] + contrs[j];\n\t\t\t\tlet termLen = term.length;\n\t\t\t\tlet groupLen = group.length;\n\t\t\t\tlet fullMatch = group == term;\n\n\t\t\t\t// this won't handle the case when an exact match exists across the boundary of the current group and the next junk\n\t\t\t\t// e.g. blob,ob when searching for 'bob' but finding the earlier `blob` (with extra insertion)\n\t\t\t\tif (!fullMatch && m[k+1].length >= termLen) {\n\t\t\t\t\t// probe for exact match in inter junk\n\t\t\t\t\tlet idxOf = m[k+1].toLowerCase().indexOf(term);\n\n\t\t\t\t\tif (idxOf > -1) {\n\t\t\t\t\t\trefine.push(idxAcc, idxOf, termLen);\n\t\t\t\t\t\tidxAcc += refineMatch(m, k, idxOf, termLen);\n\t\t\t\t\t\tgroup = term;\n\t\t\t\t\t\tgroupLen = termLen;\n\t\t\t\t\t\tfullMatch = true;\n\n\t\t\t\t\t\tif (j == 0)\n\t\t\t\t\t\t\tstart = idxAcc;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (mayDiscard || fullMatch) {\n\t\t\t\t\t// does group's left and/or right land on \\b\n\t\t\t\t\tlet lftCharIdx = idxAcc - 1;\n\t\t\t\t\tlet rgtCharIdx = idxAcc + groupLen;\n\n\t\t\t\t\tlet isPre = true;\n\t\t\t\t\tlet isSuf = true;\n\n\t\t\t\t\t// prefix info\n\t\t\t\t\tif (lftCharIdx == -1 || interBound.test(mhstr[lftCharIdx]))\n\t\t\t\t\t\tfullMatch && lft2++;\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (interLft == 2) {\n\t\t\t\t\t\t\tdisc = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (withIntraBound && intraBound.test(mhstr[lftCharIdx] + mhstr[lftCharIdx + 1]))\n\t\t\t\t\t\t\tfullMatch && lft1++;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (interLft == 1) {\n\t\t\t\t\t\t\t\t// regexps are eager, so try to improve the match by probing forward inter junk for exact match at a boundary\n\t\t\t\t\t\t\t\tlet junk = m[k+1];\n\t\t\t\t\t\t\t\tlet junkIdx = idxAcc + groupLen;\n\n\t\t\t\t\t\t\t\tif (junk.length >= termLen) {\n\t\t\t\t\t\t\t\t\tlet idxOf = 0;\n\t\t\t\t\t\t\t\t\tlet found = false;\n\t\t\t\t\t\t\t\t\tlet re = new RegExp(term, 'ig');\n\n\t\t\t\t\t\t\t\t\tlet m2;\n\t\t\t\t\t\t\t\t\twhile (m2 = re.exec(junk)) {\n\t\t\t\t\t\t\t\t\t\tidxOf = m2.index;\n\n\t\t\t\t\t\t\t\t\t\tlet charIdx = junkIdx + idxOf;\n\t\t\t\t\t\t\t\t\t\tlet lftCharIdx = charIdx - 1;\n\n\n\t\t\t\t\t\t\t\t\t\tif (lftCharIdx == -1 || interBound.test(mhstr[lftCharIdx])) {\n\t\t\t\t\t\t\t\t\t\t\tlft2++;\n\t\t\t\t\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (intraBound.test(mhstr[lftCharIdx] + mhstr[charIdx])) {\n\t\t\t\t\t\t\t\t\t\t\tlft1++;\n\t\t\t\t\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (found) {\n\t\t\t\t\t\t\t\t\t\t// identical to exact term refinement pass above\n\t\t\t\t\t\t\t\t\t\trefine.push(idxAcc, idxOf, termLen);\n\t\t\t\t\t\t\t\t\t\tidxAcc += refineMatch(m, k, idxOf, termLen);\n\t\t\t\t\t\t\t\t\t\tgroup = term;\n\t\t\t\t\t\t\t\t\t\tgroupLen = termLen;\n\t\t\t\t\t\t\t\t\t\tfullMatch = true;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tdisc = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tisPre = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// suffix info\n\t\t\t\t\tif (rgtCharIdx == mhstr.length || interBound.test(mhstr[rgtCharIdx]))\n\t\t\t\t\t\tfullMatch && rgt2++;\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (interRgt == 2) {\n\t\t\t\t\t\t\tdisc = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (withIntraBound && intraBound.test(mhstr[rgtCharIdx - 1] + mhstr[rgtCharIdx]))\n\t\t\t\t\t\t\tfullMatch && rgt1++;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (interRgt == 1) {\n\t\t\t\t\t\t\t\tdisc = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tisSuf = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (fullMatch) {\n\t\t\t\t\t\tchars += termLen;\n\n\t\t\t\t\t\tif (isPre && isSuf)\n\t\t\t\t\t\t\tterms++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (groupLen > termLen)\n\t\t\t\t\tintra += groupLen - termLen; // intraFuzz\n\n\t\t\t\tif (j > 0)\n\t\t\t\t\tinter += m[k-1].length; // interFuzz\n\n\t\t\t\t// TODO: group here is lowercased, which is okay for length cmp, but not more case-sensitive filts\n\t\t\t\tif (!opts.intraFilt(term, group, idxAcc)) {\n\t\t\t\t\tdisc = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (j < partsLen - 1)\n\t\t\t\t\tidxAcc += groupLen + m[k+1].length;\n\t\t\t}\n\n\t\t\tif (!disc) {\n\t\t\t\tinfo.idx[ii] = idxs[i];\n\t\t\t\tinfo.interLft2[ii] = lft2;\n\t\t\t\tinfo.interLft1[ii] = lft1;\n\t\t\t\tinfo.interRgt2[ii] = rgt2;\n\t\t\t\tinfo.interRgt1[ii] = rgt1;\n\t\t\t\tinfo.chars[ii] = chars;\n\t\t\t\tinfo.terms[ii] = terms;\n\t\t\t\tinfo.interIns[ii] = inter;\n\t\t\t\tinfo.intraIns[ii] = intra;\n\n\t\t\t\tinfo.start[ii] = start;\n\t\t\t//\tinfo.span[ii] = span;\n\n\t\t\t\t// ranges\n\t\t\t\tlet m = mhstr.match(queryR);\n\t\t\t\tlet ranges = info.ranges[ii] = [];\n\n\t\t\t\tlet idxAcc = m.index + m[1].length;\n\t\t\t\tlet from = idxAcc;\n\t\t\t\tlet to = idxAcc;\n\n\t\t\t\tlet refLen = refine.length;\n\t\t\t\tlet ri = refLen > 0 ? 0 : Infinity;\n\t\t\t\tlet lastRi = refLen - 3;\n\n\t\t\t\tfor (let i = 2; i < m.length; i++) {\n\t\t\t\t\tlet len = m[i].length;\n\n\t\t\t\t\tif (ri <= lastRi && refine[ri] == idxAcc) {\n\t\t\t\t\t\tlet idxInNext = refine[ri+1];\n\t\t\t\t\t\tlet matchLen = refine[ri+2];\n\t\t\t\t\t\tlet offset = idxInNext + matchLen;\n\n\t\t\t\t\t\tidxAcc += len + offset;\n\t\t\t\t\t\tfrom = idxAcc - matchLen;\n\t\t\t\t\t\tm[i+1] = m[i+1].slice(offset);\n\n\t\t\t\t\t\tri+=3;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tidxAcc += len;\n\n\t\t\t\t\tif (i % 2 == 0)\n\t\t\t\t\t\tto = idxAcc;\n\t\t\t\t\telse if (len > 0) {\n\t\t\t\t\t\tranges.push(from, to);\n\t\t\t\t\t\tfrom = to = idxAcc;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (to > from)\n\t\t\t\t\tranges.push(from, to);\n\n\t\t\t\tii++;\n\t\t\t}\n\t\t}\n\n\t\t// trim arrays\n\t\tif (ii < idxs.length) {\n\t\t\tfor (let k in info)\n\t\t\t\tinfo[k] = info[k].slice(0, ii);\n\t\t}\n\n\t\treturn info;\n\t};\n\n\tconst refineMatch = (m, k, idxInNext, termLen) => {\n\t\t// shift the current group into the prior junk\n\t\tlet prepend = m[k] + m[k+1].slice(0, idxInNext);\n\t\tm[k-1] += prepend;\n\t\tm[k] = m[k+1].slice(idxInNext, idxInNext + termLen);\n\t\tm[k+1] = m[k+1].slice(idxInNext + termLen);\n\t\treturn prepend.length;\n\t};\n\n\t// returns [idxs, info, order]\n\tconst _search = (haystack, needle, outOfOrder = false, infoThresh = 1e3, preFiltered) => {\n\t\tlet needles = null;\n\t\tlet matches = null;\n\n\t\tlet negs = [];\n\n\t\tneedle = needle.replace(NEGS_RE, m => {\n\t\t\tnegs.push(m.trim().slice(1));\n\t\t\treturn '';\n\t\t});\n\n\t\tlet negsRe;\n\n\t\tif (negs.length > 0) {\n\t\t\tnegsRe = new RegExp(negs.join('|'), 'i');\n\n\t\t\tif (needle.trim() == '') {\n\t\t\t\tlet idxs = [];\n\n\t\t\t\tfor (let i = 0; i < haystack.length; i++) {\n\t\t\t\t\tif (!negsRe.test(haystack[i]))\n\t\t\t\t\t\tidxs.push(i);\n\t\t\t\t}\n\n\t\t\t\treturn [idxs, null, null];\n\t\t\t}\n\t\t}\n\n\t//\tconsole.log(negs);\n\t//\tconsole.log(needle);\n\n\t\tif (outOfOrder) {\n\t\t\t// since uFuzzy is an AND-based search, we can iteratively pre-reduce the haystack by searching\n\t\t\t// for each term in isolation before running permutations on what's left.\n\t\t\t// this is a major perf win. e.g. searching \"test man ger pp a\" goes from 570ms -> 14ms\n\t\t\tlet terms = split(needle);\n\n\t\t\tif (terms.length > 1) {\n\t\t\t\t// longest -> shortest\n\t\t\t\tlet terms2 = terms.slice().sort((a, b) => b.length - a.length);\n\n\t\t\t\tfor (let ti = 0; ti < terms2.length; ti++) {\n\t\t\t\t\t// no haystack item contained all terms\n\t\t\t\t\tif (preFiltered && preFiltered.length == 0)\n\t\t\t\t\t\treturn [[], null, null];\n\n\t\t\t\t\tpreFiltered = filter(haystack, terms2[ti], preFiltered);\n\t\t\t\t}\n\n\t\t\t\tneedles = permute(terms).map(perm => perm.join(' '));\n\n\t\t\t\t// filtered matches for each needle excluding same matches for prior needles\n\t\t\t\tmatches = [];\n\n\t\t\t\t// keeps track of already-matched idxs to skip in follow-up permutations\n\t\t\t\tlet matchedIdxs = new Set();\n\n\t\t\t\tfor (let ni = 0; ni < needles.length; ni++) {\n\t\t\t\t\tif (matchedIdxs.size < preFiltered.length) {\n\t\t\t\t\t\t// filter further for this needle, exclude already-matched\n\t\t\t\t\t\tlet preFiltered2 = preFiltered.filter(idx => !matchedIdxs.has(idx));\n\n\t\t\t\t\t\tlet matched = filter(haystack, needles[ni], preFiltered2);\n\n\t\t\t\t\t\tfor (let j = 0; j < matched.length; j++)\n\t\t\t\t\t\t\tmatchedIdxs.add(matched[j]);\n\n\t\t\t\t\t\tmatches.push(matched);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tmatches.push([]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// interOR\n\t//\tconsole.log(prepQuery(needle, 1, null, true));\n\n\t\t// non-ooo or ooo w/single term\n\t\tif (needles == null) {\n\t\t\tneedles = [needle];\n\t\t\tmatches = [preFiltered && preFiltered.length > 0 ? preFiltered : filter(haystack, needle)];\n\t\t}\n\n\t\tlet retInfo = null;\n\t\tlet retOrder = null;\n\n\t\tif (negs.length > 0)\n\t\t\tmatches = matches.map(idxs => idxs.filter(idx => !negsRe.test(haystack[idx])));\n\n\t\tlet matchCount = matches.reduce((acc, idxs) => acc + idxs.length, 0);\n\n\t\t// rank, sort, concat\n\t\tif (matchCount <= infoThresh) {\n\t\t\tretInfo = {};\n\t\t\tretOrder = [];\n\n\t\t\tfor (let ni = 0; ni < matches.length; ni++) {\n\t\t\t\tlet idxs = matches[ni];\n\n\t\t\t\tif (idxs == null || idxs.length == 0)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tlet needle = needles[ni];\n\t\t\t\tlet _info = info(idxs, haystack, needle);\n\t\t\t\tlet order = opts.sort(_info, haystack, needle);\n\n\t\t\t\t// offset idxs for concat'ing infos\n\t\t\t\tif (ni > 0) {\n\t\t\t\t\tfor (let i = 0; i < order.length; i++)\n\t\t\t\t\t\torder[i] += retOrder.length;\n\t\t\t\t}\n\n\t\t\t\tfor (let k in _info) {\n\t\t\t\t\tretInfo[k] = (retInfo[k] ? retInfo[k] : []).concat(_info[k]);\n }\n\n\t\t\t\tretOrder = retOrder.concat(order);\n\t\t\t}\n\t\t}\n\n\t\treturn [\n\t\t\t[].concat(...matches),\n\t\t\tretInfo,\n\t\t\tretOrder,\n\t\t];\n\t};\n\n\treturn {\n\t\tsearch: (...args) => {\n\t\t\tlet out = _search(...args);\n\t\t\treturn out;\n\t\t},\n\t\tsplit,\n\t\tfilter,\n\t\tinfo,\n\t\tsort: opts.sort,\n\t};\n}\n\nconst latinize = (() => {\n\tlet accents = {\n\t\tA: 'ÁÀÃÂÄĄ',\n\t\ta: 'áàãâäą',\n\t\tE: 'ÉÈÊËĖ',\n\t\te: 'éèêëę',\n\t\tI: 'ÍÌÎÏĮ',\n\t\ti: 'íìîïį',\n\t\tO: 'ÓÒÔÕÖ',\n\t\to: 'óòôõö',\n\t\tU: 'ÚÙÛÜŪŲ',\n\t\tu: 'úùûüūų',\n\t\tC: 'ÇČ',\n\t\tc: 'çč',\n\t\tN: 'Ñ',\n\t\tn: 'ñ',\n\t\tS: 'Š',\n\t\ts: 'š'\n\t};\n\n\tlet accentsMap = new Map();\n\tlet accentsTpl = '';\n\n\tfor (let r in accents) {\n\t\taccents[r].split('').forEach(a => {\n\t\t\taccentsTpl += a;\n\t\t\taccentsMap.set(a, r);\n\t\t});\n\t}\n\n\tlet accentsRe = new RegExp(`[${accentsTpl}]`, 'g');\n\tlet replacer = m => accentsMap.get(m);\n\n\treturn strings => {\n\t\tif (typeof strings == 'string')\n\t\t\treturn strings.replace(accentsRe, replacer);\n\n\t\tlet out = Array(strings.length);\n\t\tfor (let i = 0; i < strings.length; i++)\n\t\t\tout[i] = strings[i].replace(accentsRe, replacer);\n\t\treturn out;\n\t};\n})();\n\n// https://stackoverflow.com/questions/9960908/permutations-in-javascript/37580979#37580979\nfunction permute(arr) {\n\tarr = arr.slice();\n\n\tlet length = arr.length,\n\t\tresult = [arr.slice()],\n\t\tc = new Array(length).fill(0),\n\t\ti = 1, k, p;\n\n\twhile (i < length) {\n\t\tif (c[i] < i) {\n\t\t\tk = i % 2 && c[i];\n\t\t\tp = arr[i];\n\t\t\tarr[i] = arr[k];\n\t\t\tarr[k] = p;\n\t\t\t++c[i];\n\t\t\ti = 1;\n\t\t\tresult.push(arr.slice());\n\t\t} else {\n\t\t\tc[i] = 0;\n\t\t\t++i;\n\t\t}\n\t}\n\n\treturn result;\n}\n\nconst _mark = (part, matched) => matched ? `${part}` : part;\nconst _append = (acc, part) => acc + part;\n\nfunction highlight(str, ranges, mark = _mark, accum = '', append = _append) {\n let tmp = append(accum, mark(str.substring(0, ranges[0]), false));\n\taccum = tmp !== null ? tmp : accum;\n\n\tfor (let i = 0; i < ranges.length; i+=2) {\n\t\tlet fr = ranges[i];\n\t\tlet to = ranges[i+1];\n\n tmp = append(accum, mark(str.substring(fr, to), true));\n\t\taccum = tmp !== null ? tmp : accum;\n\n\t\tif (i < ranges.length - 3) {\n tmp = append(accum, mark(str.substring(ranges[i + 1], ranges[i + 2]), false));\n accum = tmp !== null ? tmp : accum;\n }\n\t}\n\n tmp = append(accum, mark(str.substring(ranges[ranges.length - 1]), false));\n\taccum = tmp !== null ? tmp : accum;\n\n\treturn accum;\n}\n\nuFuzzy.latinize = latinize;\nuFuzzy.permute = arr => {\n\tlet idxs = permute([...Array(arr.length).keys()]).sort((a,b) => {\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tif (a[i] != b[i])\n\t\t\t\treturn a[i] - b[i];\n\t\t}\n\t\treturn 0;\n\t});\n\n\treturn idxs.map(pi => pi.map(i => arr[i]));\n};\nuFuzzy.highlight = highlight;\n\nexport { uFuzzy as default };\n","import uFuzzy from '@leeoniya/ufuzzy';\n\n// See https://github.com/leeoniya/uFuzzy#options\nconst uf = new uFuzzy({\n intraMode: 1,\n intraIns: 1,\n intraSub: 1,\n intraTrn: 1,\n intraDel: 1,\n});\n\nfunction sortCommands(\n a: ProcessedCommandItem,\n b: ProcessedCommandItem,\n favouriteCommands: CommandId[],\n recentCommands: CommandId[]\n): number {\n // Sort by recent first\n const aIsRecent = recentCommands.includes(a.id);\n const bIsRecent = recentCommands.includes(b.id);\n\n if (aIsRecent && !bIsRecent) {\n return -1;\n }\n\n if (!aIsRecent && bIsRecent) {\n return 1;\n }\n\n if (aIsRecent && bIsRecent) {\n return recentCommands.indexOf(a.id) - recentCommands.indexOf(b.id);\n }\n\n // Sort by favourites second\n const aIsFavourite = favouriteCommands.includes(a.id);\n const bIsFavourite = favouriteCommands.includes(b.id);\n\n if (aIsFavourite && !bIsFavourite) {\n return -1;\n }\n\n if (!aIsFavourite && bIsFavourite) {\n return 1;\n }\n\n // Sort by name third\n return a.name.localeCompare(b.name);\n}\n\nexport default function filterCommands(\n selectedCommandGroup: CommandId,\n searchWord: string,\n commands: FlatCommandList,\n favourites: CommandId[],\n recentCommands: CommandId[]\n): CommandId[] {\n // If there is a search word, return all commands to allow deep search\n // If no search word is given, return all commands in the currently selected group or all recent commands if no group is selected\n let availableCommands = Object.values(commands);\n availableCommands = searchWord\n ? availableCommands\n : availableCommands.filter(\n (command) =>\n command.parentId === selectedCommandGroup ||\n (!selectedCommandGroup && recentCommands.includes(command.id))\n );\n\n // If there is no search word, return all commands in the current context with favourites first, the recent commands will only be prioritised if we are at the top level\n if (!searchWord) {\n return availableCommands\n .sort((a, b) => sortCommands(a, b, favourites, selectedCommandGroup ? [] : recentCommands))\n .map((command) => command.id);\n }\n\n // Create a list of all available commands with their name and description as haystack for the search\n const availableCommandNames = availableCommands.map(({ name, description }) => name + ' ' + description);\n const [indices, , order] = uf.search(availableCommandNames, searchWord.toLowerCase());\n const matchingIds = order.map((i) => availableCommands[indices[i]].id);\n\n // Add all commands that can handle queries to the result, the Set removes duplicates\n return matchingIds;\n}\n","export default function assert(condition: unknown, message = 'Assertion failed'): asserts condition {\n if (condition === false) throw Error(message);\n}\n","export default function classnames(...args: Array): string {\n return args.filter(Boolean).join(' ');\n}\n","import { logger } from '../helpers';\n\nexport enum STATUS {\n COLLAPSED = 'collapsed',\n IDLE = 'idle',\n EXECUTING_COMMAND = 'executingCommand',\n DISPLAYING_RESULT = 'displayingResult',\n}\n\nexport enum TRANSITION {\n RESET_SEARCH = 'RESET_SEARCH',\n HIGHLIGHT_NEXT_ITEM = 'HIGHLIGHT_NEXT_ITEM',\n HIGHLIGHT_PREVIOUS_ITEM = 'HIGHLIGHT_PREVIOUS_ITEM',\n CANCEL = 'CANCEL',\n SELECT_GROUP = 'SELECT_GROUP',\n GO_TO_PARENT_GROUP = 'GO_TO_PARENT_GROUP',\n UPDATE_SEARCH = 'UPDATE_SEARCH',\n UPDATE_COMMAND_QUERY = 'UPDATE_COMMAND_QUERY',\n EXECUTE_COMMAND = 'EXECUTE_COMMAND',\n FINISH_COMMAND = 'FINISH_COMMAND',\n UPDATE_RESULT = 'UPDATE_RESULT',\n EXPAND = 'EXPAND',\n ADD_FAVOURITE = 'ADD_FAVOURITE',\n REMOVE_FAVOURITE = 'REMOVE_FAVOURITE',\n}\n\nexport enum ACTION {\n ADD_FAVOURITE = 'ADD_FAVOURITE',\n ADD_RECENTLY_USED = 'ADD_RECENTLY_USED',\n EXPAND = 'EXPAND',\n HIGHLIGHT_NEXT_COMMAND = 'HIGHLIGHT_NEXT_COMMAND',\n HIGHLIGHT_NEXT_OPTION = 'HIGHLIGHT_NEXT_OPTION',\n HIGHLIGHT_PREVIOUS_COMMAND = 'HIGHLIGHT_PREVIOUS_COMMAND',\n HIGHLIGHT_PREVIOUS_OPTION = 'HIGHLIGHT_PREVIOUS_OPTION',\n LEAVE_GROUP = 'LEAVE_GROUP',\n REFRESH_COMMANDS = 'REFRESH_COMMANDS',\n REMOVE_FAVOURITE = 'REMOVE_FAVOURITE',\n RESET_HIGHLIGHT = 'RESET_HIGHLIGHT',\n RESET_OPTION_HIGHLIGHT = 'RESET_OPTION_HIGHLIGHT',\n RESET_SEARCH = 'RESET_SEARCH',\n RESET_SEARCH_OR_LEAVE_GROUP = 'RESET_SEARCH_OR_LEAVE_GROUP',\n SET_ACTIVE_COMMAND = 'SET_ACTIVE_COMMAND',\n SET_COMMAND_QUERY = 'SET_COMMAND_QUERY',\n SET_GROUP = 'SET_GROUP',\n SET_SEARCH_WORD = 'SET_SEARCH_WORD',\n UNSET_ACTIVE_COMMAND = 'UNSET_ACTIVE_COMMAND',\n UNSET_RESULT = 'UNSET_RESULT',\n UPDATE_RESULT = 'UPDATE_RESULT',\n}\n\ninterface MachineDefinition {\n initial: STATUS;\n states: {\n [state in STATUS]: {\n on: {\n [transition in TRANSITION]?:\n | STATUS\n | {\n target: STATUS;\n actions?: ACTION[];\n };\n };\n };\n };\n}\n\nexport const machine: MachineDefinition = {\n initial: STATUS.COLLAPSED,\n states: {\n collapsed: {\n on: {\n UPDATE_SEARCH: {\n target: STATUS.IDLE,\n actions: [ACTION.EXPAND, ACTION.SET_SEARCH_WORD, ACTION.REFRESH_COMMANDS],\n },\n HIGHLIGHT_NEXT_ITEM: {\n target: STATUS.IDLE,\n actions: [ACTION.REFRESH_COMMANDS, ACTION.EXPAND],\n },\n EXPAND: {\n target: STATUS.IDLE,\n actions: [ACTION.REFRESH_COMMANDS, ACTION.EXPAND],\n },\n },\n },\n idle: {\n on: {\n UPDATE_SEARCH: {\n target: STATUS.IDLE,\n actions: [ACTION.SET_SEARCH_WORD, ACTION.RESET_HIGHLIGHT, ACTION.REFRESH_COMMANDS],\n },\n HIGHLIGHT_NEXT_ITEM: {\n target: STATUS.IDLE,\n actions: [ACTION.HIGHLIGHT_NEXT_COMMAND],\n },\n HIGHLIGHT_PREVIOUS_ITEM: {\n target: STATUS.IDLE,\n actions: [ACTION.HIGHLIGHT_PREVIOUS_COMMAND],\n },\n CANCEL: {\n target: STATUS.IDLE,\n actions: [ACTION.RESET_HIGHLIGHT, ACTION.RESET_SEARCH_OR_LEAVE_GROUP, ACTION.REFRESH_COMMANDS],\n },\n EXECUTE_COMMAND: {\n target: STATUS.EXECUTING_COMMAND,\n actions: [ACTION.ADD_RECENTLY_USED, ACTION.SET_ACTIVE_COMMAND, ACTION.REFRESH_COMMANDS],\n },\n GO_TO_PARENT_GROUP: {\n target: STATUS.IDLE,\n actions: [ACTION.RESET_HIGHLIGHT, ACTION.LEAVE_GROUP, ACTION.REFRESH_COMMANDS],\n },\n SELECT_GROUP: {\n target: STATUS.IDLE,\n actions: [ACTION.RESET_SEARCH, ACTION.RESET_HIGHLIGHT, ACTION.SET_GROUP, ACTION.REFRESH_COMMANDS],\n },\n ADD_FAVOURITE: {\n target: STATUS.IDLE,\n actions: [ACTION.ADD_FAVOURITE, ACTION.REFRESH_COMMANDS],\n },\n REMOVE_FAVOURITE: {\n target: STATUS.IDLE,\n actions: [ACTION.REMOVE_FAVOURITE, ACTION.REFRESH_COMMANDS],\n },\n },\n },\n executingCommand: {\n on: {\n UPDATE_RESULT: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.UPDATE_RESULT],\n },\n FINISH_COMMAND: {\n target: STATUS.IDLE,\n actions: [ACTION.UNSET_ACTIVE_COMMAND],\n },\n },\n },\n displayingResult: {\n on: {\n UPDATE_COMMAND_QUERY: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.SET_COMMAND_QUERY],\n },\n UPDATE_RESULT: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.UPDATE_RESULT, ACTION.RESET_OPTION_HIGHLIGHT],\n },\n HIGHLIGHT_NEXT_ITEM: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.HIGHLIGHT_NEXT_OPTION],\n },\n HIGHLIGHT_PREVIOUS_ITEM: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.HIGHLIGHT_PREVIOUS_OPTION],\n },\n EXECUTE_COMMAND: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.SET_ACTIVE_COMMAND],\n },\n CANCEL: {\n target: STATUS.IDLE,\n actions: [ACTION.UNSET_RESULT, ACTION.UNSET_ACTIVE_COMMAND, ACTION.RESET_OPTION_HIGHLIGHT],\n },\n FINISH_COMMAND: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.UNSET_ACTIVE_COMMAND],\n },\n },\n },\n },\n};\n\nexport interface MachineState {\n status: STATUS;\n}\n\ntype MachineEvent = {\n type: TRANSITION;\n payload?: any;\n};\n\nexport function transition(\n state: MachineState,\n event: MachineEvent,\n actionCallback?: (action: ACTION, nextState: MachineState, event: MachineEvent) => void\n): MachineState {\n let nextStateNode = machine.states[state.status].on?.[event.type] ?? null;\n\n if (!nextStateNode) {\n logger.error(`No transition found for event \"${event.type}\" in state \"${state.status}\"`);\n nextStateNode = { target: state.status };\n }\n\n const nextState = {\n ...state,\n status: typeof nextStateNode == 'string' ? nextStateNode : nextStateNode.target,\n } as MachineState;\n\n if (actionCallback && typeof nextStateNode == 'object') {\n nextStateNode.actions?.forEach((action) => actionCallback(action, nextState, event));\n }\n\n logger.debug(`Transitioned from \"${state.status}\" to \"${nextState.status}\" with event \"${event.type}\"`);\n\n return nextState;\n}\n","import { assert, clamp, filterCommands } from '../helpers';\nimport { ACTION, MachineState, TRANSITION, transition } from './commandBarMachine';\n\nexport type CommandBarEvent =\n | { type: TRANSITION.RESET_SEARCH }\n | { type: TRANSITION.HIGHLIGHT_NEXT_ITEM }\n | { type: TRANSITION.HIGHLIGHT_PREVIOUS_ITEM }\n | { type: TRANSITION.CANCEL }\n | { type: TRANSITION.SELECT_GROUP; commandId: string }\n | { type: TRANSITION.GO_TO_PARENT_GROUP }\n | { type: TRANSITION.UPDATE_SEARCH; searchWord: string }\n | { type: TRANSITION.UPDATE_COMMAND_QUERY; commandQuery: string }\n | { type: TRANSITION.EXECUTE_COMMAND; commandId: CommandId; message: string }\n | { type: TRANSITION.FINISH_COMMAND }\n | { type: TRANSITION.UPDATE_RESULT; result: CommandResult }\n | { type: TRANSITION.EXPAND }\n | { type: TRANSITION.ADD_FAVOURITE; commandId: CommandId }\n | { type: TRANSITION.REMOVE_FAVOURITE; commandId: CommandId };\n\nexport type CommandBarState = MachineState & {\n activeCommandId: CommandId;\n activeCommandMessage: string;\n availableCommandIds: CommandId[];\n commandQuery: string;\n commandQueryDirty: boolean;\n commands: FlatCommandList;\n expanded: boolean;\n favouriteCommands: CommandId[];\n highlightedItem: number;\n highlightedOption: number;\n recentCommands: CommandId[];\n result: CommandResult | null;\n resultCommandId: CommandId;\n searchWord: string;\n selectedCommandGroup: CommandId;\n showBranding: boolean;\n};\n\nconst MAX_RECENTLY_USED = 5;\n\nfunction runAction(action: ACTION, nextState: CommandBarState, event: CommandBarEvent) {\n switch (action) {\n case ACTION.RESET_SEARCH:\n nextState.searchWord = '';\n break;\n case ACTION.RESET_HIGHLIGHT:\n nextState.highlightedItem = 0;\n break;\n case ACTION.REFRESH_COMMANDS:\n nextState.availableCommandIds = filterCommands(\n nextState.selectedCommandGroup,\n nextState.searchWord,\n nextState.commands,\n nextState.favouriteCommands,\n nextState.recentCommands\n );\n break;\n case ACTION.HIGHLIGHT_NEXT_COMMAND:\n nextState.highlightedItem = clamp(\n nextState.highlightedItem + 1,\n 0,\n nextState.availableCommandIds.length - 1\n );\n break;\n case ACTION.HIGHLIGHT_PREVIOUS_COMMAND:\n nextState.highlightedItem = clamp(\n nextState.highlightedItem - 1,\n 0,\n nextState.availableCommandIds.length - 1\n );\n break;\n case ACTION.HIGHLIGHT_NEXT_OPTION:\n nextState.highlightedOption = clamp(\n nextState.highlightedOption + 1,\n 0,\n Object.keys(nextState.result.options).length - 1\n );\n break;\n case ACTION.HIGHLIGHT_PREVIOUS_OPTION:\n nextState.highlightedOption = clamp(\n nextState.highlightedOption - 1,\n 0,\n Object.keys(nextState.result.options).length - 1\n );\n break;\n case ACTION.SET_SEARCH_WORD:\n assert(event.type === TRANSITION.UPDATE_SEARCH);\n nextState.searchWord = event.searchWord;\n break;\n case ACTION.SET_COMMAND_QUERY:\n assert(event.type === TRANSITION.UPDATE_COMMAND_QUERY);\n nextState.commandQuery = event.commandQuery;\n nextState.commandQueryDirty = true;\n break;\n case ACTION.EXPAND:\n nextState.expanded = true;\n break;\n case ACTION.SET_ACTIVE_COMMAND:\n assert(event.type === TRANSITION.EXECUTE_COMMAND);\n nextState.activeCommandId = event.commandId;\n nextState.activeCommandMessage = event.message;\n break;\n case ACTION.UNSET_ACTIVE_COMMAND:\n nextState.activeCommandId = null;\n nextState.activeCommandMessage = null;\n break;\n case ACTION.UPDATE_RESULT:\n assert(event.type === TRANSITION.UPDATE_RESULT);\n assert(typeof event.result.success === 'boolean');\n nextState.result = {\n options: {},\n message: 'Command executed',\n view: null,\n success: false,\n ...event.result,\n };\n nextState.resultCommandId = nextState.activeCommandId;\n nextState.commandQueryDirty = false;\n break;\n case ACTION.RESET_OPTION_HIGHLIGHT:\n nextState.highlightedOption = 0;\n break;\n case ACTION.RESET_SEARCH_OR_LEAVE_GROUP:\n if (nextState.commandQuery) {\n nextState.commandQuery = '';\n } else if (nextState.searchWord) {\n nextState.searchWord = '';\n } else {\n nextState.selectedCommandGroup = nextState.selectedCommandGroup\n ? nextState.commands[nextState.selectedCommandGroup].parentId\n : null;\n }\n break;\n case ACTION.UNSET_RESULT:\n nextState.result = null;\n nextState.resultCommandId = null;\n nextState.commandQuery = '';\n break;\n case ACTION.LEAVE_GROUP:\n nextState.selectedCommandGroup = nextState.selectedCommandGroup\n ? nextState.commands[nextState.selectedCommandGroup].parentId\n : null;\n break;\n case ACTION.SET_GROUP:\n assert(event.type === TRANSITION.SELECT_GROUP);\n nextState.selectedCommandGroup = event.commandId;\n break;\n case ACTION.ADD_FAVOURITE:\n assert(event.type === TRANSITION.ADD_FAVOURITE);\n if (!nextState.favouriteCommands.includes(event.commandId)) {\n nextState.favouriteCommands = [...nextState.favouriteCommands, event.commandId];\n }\n break;\n case ACTION.REMOVE_FAVOURITE:\n assert(event.type === TRANSITION.REMOVE_FAVOURITE);\n nextState.favouriteCommands = nextState.favouriteCommands.filter((id) => id !== event.commandId);\n break;\n case ACTION.ADD_RECENTLY_USED:\n assert(event.type === TRANSITION.EXECUTE_COMMAND);\n // Only add to recently used if the command has an action\n if (!nextState.commands[event.commandId].action) {\n break;\n }\n if (nextState.recentCommands.includes(event.commandId)) {\n nextState.recentCommands = nextState.recentCommands.filter((id) => id !== event.commandId);\n }\n nextState.recentCommands.unshift(event.commandId);\n if (nextState.recentCommands.length > MAX_RECENTLY_USED) {\n nextState.recentCommands.pop();\n }\n break;\n default:\n throw Error(`Action ${action} not implemented`);\n }\n}\n\nconst commandBarReducer = (state: CommandBarState, event: CommandBarEvent): CommandBarState => {\n return transition(state, event, runAction) as CommandBarState;\n};\n\nexport { commandBarReducer };\n","import React from 'react';\n\nimport * as styles from './IconWrapper.module.css';\n\ntype IconWrapperProps = {\n children: JSX.Element;\n};\n\nconst IconWrapper: React.FC = ({ children }) => {\n return {children};\n};\n\nexport default React.memo(IconWrapper);\n",".iconWrap {\n width: var(--icon-size);\n max-height: var(--icon-size);\n display: inline-block;\n text-align: center;\n}\n\n.iconWrap svg {\n max-width: 100%;\n max-height: inherit;\n display: inline-block;\n}\n",".commandBarFooter {\n border-top: 1px solid var(--color-border);\n background-color: var(--footer-background);\n padding: 0.8rem 1rem;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 1rem;\n user-select: none;\n}\n\n.breadcrumb {\n display: flex;\n gap: 1rem;\n --icon-size: 0.875em;\n}\n\n.activity {\n display: flex;\n gap: 1rem;\n --icon-size: 0.875em;\n}\n\n.activity svg {\n animation-name: spinner;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n transform-origin: 50% 50%;\n display: inline-block;\n}\n@keyframes spinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n","import React from 'react';\nimport { useCommandBarState, useIntl } from '../../state';\n\nimport * as styles from './Branding.module.css';\n\nconst Branding: React.FC = () => {\n const {\n state: { showBranding },\n } = useCommandBarState();\n const { translate } = useIntl();\n\n if (!showBranding) return null;\n\n return (\n \n {translate('CommandBarFooter.brandingSmall', 'Made with love by')}\n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default React.memo(Branding);\n",".madeWithLove {\n display: flex;\n text-decoration: none;\n gap: 0.5rem;\n}\n\n.madeWithLove small {\n transition: color 0.1s ease-in-out;\n}\n\n.madeWithLove:hover small {\n color: var(--color-light-text-hover);\n}\n\n.madeWithLove svg {\n display: inline-block;\n width: var(--icon-size);\n height: auto;\n}\n","import React from 'react';\n\nexport function IconBack() {\n return (\n \n \n \n );\n}\n","import React from 'react';\n\nexport function IconNeos() {\n return (\n \n \n \n );\n}\n","import React from 'react';\n\nexport function IconSpinner() {\n return (\n \n \n \n );\n}\n","import React from 'react';\n\nexport function IconStar() {\n return (\n \n \n \n );\n}\n","import React from 'react';\n\nexport function IconPlay() {\n return (\n \n \n \n );\n}\n","import React from 'react';\n\nexport function IconRepeat() {\n return (\n \n \n \n );\n}\n",".searchBox {\n appearance: none;\n background: none;\n border: none;\n color: currentColor;\n font-size: 1.1em !important; /* Fix to prevent Neos.UI css from forcing the font size to 14px */\n font-weight: 300;\n outline: none;\n padding: 0.5rem;\n flex: 1;\n}\n\n.searchBox:disabled {\n color: var(--color-light-text);\n cursor: not-allowed;\n}\n\n.expandButton {\n position: absolute;\n padding: 0 1rem;\n height: 100%;\n right: 0;\n display: block;\n background: none;\n border: none;\n cursor: pointer;\n}\n\n.expandButton svg {\n color: var(--grayLighter);\n transition: color 0.1s ease-in-out;\n}\n\n.expandButton:hover svg {\n color: var(--primaryBlue);\n}\n\n.executeButton {\n position: absolute;\n padding: 0 1rem;\n height: 100%;\n right: 0;\n display: block;\n background: none;\n border: none;\n cursor: pointer;\n}\n\n.executeButton {\n color: var(--grayLighter);\n transition: color 0.1s ease-in-out;\n}\n\n.executeButton:hover svg {\n color: var(--primaryBlue);\n}\n\n.commandQueryDirty {\n color: var(--warn);\n}\n","import React from 'react';\nimport { useComputed } from '@preact/signals';\n\nimport { useCommandBarState } from '../../state';\nimport IconWrapper from '../IconWrapper/IconWrapper';\nimport Branding from './Branding';\nimport { IconNeos, IconSpinner } from '../Icons';\n\nimport * as styles from './CommandBarFooter.module.css';\n\nconst CommandBarFooter: React.FC = () => {\n const {\n state: {\n activeCommandId,\n resultCommandId,\n activeCommandMessage,\n commands,\n result,\n selectedCommandGroup,\n expanded,\n },\n Icon,\n } = useCommandBarState();\n\n const commandForContext = useComputed(() => {\n const commandId = activeCommandId.value ?? resultCommandId.value;\n if (!commandId) return null;\n // FIXME: This will not be correct when a command and an option in the result have the same id\n return commandId ? commands.value[commandId] ?? result.value.options[commandId] : null;\n });\n\n const isRunning = activeCommandId.value !== null;\n\n if (!expanded.value) return null;\n\n return (\n
\n {isRunning ? (\n \n \n \n \n \n {commandForContext.value.name}\n {activeCommandMessage.value ? '﹘' + activeCommandMessage.value : ''}\n \n \n ) : commandForContext.value ? (\n \n \n {commandForContext.value.name}\n \n ) : selectedCommandGroup.value ? (\n \n \n {commands.value[selectedCommandGroup.value].name}\n \n ) : (\n \n \n \n )}\n \n
\n );\n};\n\nexport default React.memo(CommandBarFooter);\n","import React, { useCallback, useRef } from 'react';\nimport { useSignalEffect } from '@preact/signals';\n\nimport { useCommandBarState, STATUS, useIntl, useCommandExecutor } from '../../state';\nimport IconWrapper from '../IconWrapper/IconWrapper';\nimport { IconPlay, IconRepeat } from '../Icons';\n\nimport * as styles from './SearchBox.module.css';\n\n// Timer helper for debouncing updates of command query results\nlet updateResultsTimer = null;\nconst RESULT_UPDATE_DEBOUNCE_TIME = 500;\n\nconst SearchBox: React.FC = () => {\n const { state, actions } = useCommandBarState();\n const { executeCommand } = useCommandExecutor();\n const { translate } = useIntl();\n const inputRef = useRef();\n const activeCommand = state.commands.value[state.activeCommandId.value || state.resultCommandId.value];\n\n const handleChange = useCallback((e) => {\n if (state.status.value === STATUS.DISPLAYING_RESULT) {\n actions.UPDATE_COMMAND_QUERY(e.target.value);\n\n // Execute command after a delay if it's not a manual command\n if (!state.commands.value[state.resultCommandId.value]?.executeManually) {\n if (updateResultsTimer) {\n clearTimeout(updateResultsTimer);\n }\n updateResultsTimer = setTimeout(\n () => executeCommand(state.resultCommandId.value),\n RESULT_UPDATE_DEBOUNCE_TIME\n );\n }\n } else {\n actions.UPDATE_SEARCH(e.target.value);\n }\n }, []);\n\n const handleKeyPress = useCallback(\n (e: React.KeyboardEvent) => {\n // Prevent escape event from bubbling up if the input is focused and the native reset should be used\n if (e.key === 'Escape') {\n if (inputRef.current.value) {\n e.preventDefault();\n e.stopPropagation();\n }\n }\n },\n [inputRef.current]\n );\n\n // Focus input when the command bar is ready for input\n useSignalEffect(() => {\n if (state.status.value !== STATUS.EXECUTING_COMMAND) {\n inputRef.current?.focus();\n }\n });\n\n return (\n <>\n \n {!state.expanded.value && (\n \n \n \n \n \n \n \n )}\n {state.status.value === STATUS.DISPLAYING_RESULT &&\n state.commands.value[state.resultCommandId.value]?.executeManually &&\n !state.activeCommandId.value && (\n executeCommand(state.resultCommandId.value)}\n title={translate('SearchBox.execute.title', 'Execute the command')}\n >\n {state.commandQueryDirty.value ? : }\n \n )}\n \n );\n};\n\nexport default React.memo(SearchBox);\n","import React from 'react';\nimport { useComputed } from '@preact/signals';\n\nimport { useCommandBarState, STATUS } from '../../state';\nimport IconWrapper from '../IconWrapper/IconWrapper';\nimport SearchBox from '../SearchBox/SearchBox';\nimport { IconBack } from '../Icons';\n\nimport * as styles from './CommandBarHeader.module.css';\n\nconst CommandBarHeader: React.FC = () => {\n const { state, actions } = useCommandBarState();\n const isDisplayingResults = useComputed(() => state.status.value == STATUS.DISPLAYING_RESULT);\n\n return (\n
\n {(isDisplayingResults.value || state.selectedCommandGroup.value) && (\n \n \n \n \n \n )}\n \n
\n );\n};\n\nexport default React.memo(CommandBarHeader);\n",".commandBarHeader {\n display: flex;\n align-items: center;\n gap: 1rem;\n padding: 0.3rem 0.5rem;\n border-bottom: 1px solid var(--color-border);\n position: relative;\n}\n\n.backButton {\n padding: 0.3rem;\n background-color: var(--color-icon-bg);\n border-radius: 50%;\n appearance: none;\n border: none;\n color: white;\n cursor: pointer;\n transition: background-color 0.1s ease-in-out;\n display: flex;\n}\n\n.backButton:hover {\n background-color: var(--color-icon-bg-hover);\n}\n","import React from 'react';\nimport { ReadonlySignal, useComputed } from '@preact/signals';\n\nimport { IconWrapper } from '../index';\nimport { classnames } from '../../helpers';\nimport { IconStar } from '../Icons';\n\nimport * as styles from './CommandListItem.module.css';\nimport { useCommandBarState, useIntl } from '../../state';\n\ntype CommandListItemProps = {\n command: ProcessedCommandItem;\n onItemSelect: (commandId: CommandId) => void;\n highlightedId: ReadonlySignal;\n onToggleFavourite?: (id: CommandId) => void;\n};\n\nfunction getCommandType(\n { subCommandIds, category, canHandleQueries, action }: ProcessedCommandItem,\n translate: TranslateFunction\n): string {\n let type = 'command';\n if (category) {\n return category;\n } else if (subCommandIds?.length > 0) {\n type = 'category';\n } else if (canHandleQueries) {\n type = 'query';\n } else if (typeof action == 'string') {\n type = 'link';\n }\n\n return translate(`CommandListItem.type.${type}`, type);\n}\n\nfunction CommandListItem({ command, onItemSelect, highlightedId, onToggleFavourite }: CommandListItemProps) {\n const {\n state: { favouriteCommands },\n Icon,\n } = useCommandBarState();\n const { translate } = useIntl();\n const { id, name, description, icon, action } = command;\n const commandType = getCommandType(command, translate);\n\n const isHighlighted = useComputed(() => highlightedId.value === id);\n const isFavourite = useComputed(() => favouriteCommands.value.includes(id));\n\n return (\n onItemSelect(id)}\n data-testid=\"CommandListItem\"\n >\n \n \n {name}\n {description && (\n \n {typeof description == 'string' ? description : description()}\n \n )}\n \n {onToggleFavourite && action && (\n {\n e.stopPropagation();\n onToggleFavourite(id);\n }}\n >\n \n \n \n \n )}\n {commandType}\n \n );\n}\n\n// Use memo to prevent rerendering of all items when the parent list is updated\nexport default React.memo(CommandListItem);\n",".commandListItem {\n cursor: pointer;\n display: flex !important; /* Necessary due to the neos header bar styling */\n gap: 1em;\n padding: 0.4rem 0.6rem;\n align-items: baseline;\n border-radius: var(--border-radius-item);\n transition: background-color 0.1s ease-in-out, opacity 0.1s ease-in-out;\n background-color: transparent;\n user-select: none;\n --icon-size: 0.875em;\n}\n\n.commandListItem:hover {\n background-color: var(--color-item-hover);\n}\n\n.highlighted {\n background-color: var(--color-item-highlighted);\n}\n\n.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.label {\n display: flex;\n flex-wrap: wrap;\n flex: 1;\n gap: 0.2em 1em;\n align-items: baseline;\n}\n\n.description {\n white-space:pre-wrap;\n font-size: 0.9em;\n}\n\n.type {\n max-width: 30%;\n}\n\n.favouriteButton {\n visibility: hidden;\n border: none;\n background: none;\n cursor: pointer;\n transition: color 0.1s ease-in-out;\n color: var(--textSubtleLight);\n align-self: baseline;\n padding: 0 0.3rem;\n}\n.favouriteButton:hover {\n color: var(--primaryBlue);\n}\n\n.commandListItem:hover .favouriteButton {\n visibility: visible;\n}\n\n.isFavourite {\n display: block;\n color: var(--primaryBlue);\n visibility: visible;\n}\n","import React, { useCallback } from 'react';\nimport { useComputed, useSignalEffect } from '@preact/signals';\n\nimport CommandListItem from '../CommandListItem/CommandListItem';\nimport { useCommandBarState, useCommandExecutor, useIntl, STATUS } from '../../state';\nimport { classnames } from '../../helpers';\n\nimport * as styles from './CommandListing.module.css';\n\nconst CommandList: React.FC = () => {\n const {\n state: {\n commands,\n highlightedItem,\n availableCommandIds,\n status,\n searchWord,\n favouriteCommands,\n recentCommands,\n selectedCommandGroup,\n },\n actions: { ADD_FAVOURITE, REMOVE_FAVOURITE },\n } = useCommandBarState();\n const { translate } = useIntl();\n const { executeCommand } = useCommandExecutor();\n const navRef = React.useRef(null);\n\n useSignalEffect(() => {\n navRef.current\n ?.querySelector(`li:nth-child(${highlightedItem.value})`)\n ?.scrollIntoView({ behavior: 'smooth', block: 'center' });\n });\n\n const handleToggleFavourite = useCallback(\n (commandId: CommandId) => {\n if (favouriteCommands.value.includes(commandId)) {\n REMOVE_FAVOURITE(commandId);\n } else {\n ADD_FAVOURITE(commandId);\n }\n },\n [favouriteCommands]\n );\n\n const suggestions = useComputed(() => {\n return searchWord.value || selectedCommandGroup.value\n ? []\n : availableCommandIds.value.filter((commandId) => recentCommands.value.includes(commandId));\n });\n const availableCommands = useComputed(() => {\n return searchWord.value || selectedCommandGroup.value\n ? availableCommandIds.value\n : availableCommandIds.value.filter((commandId) => !recentCommands.value.includes(commandId));\n });\n const highlightedCommand = useComputed(() => availableCommandIds.value[highlightedItem.value]);\n\n return (\n \n {suggestions.value.length > 0 && (\n <>\n
{translate('CommandList.suggestions', 'Recently used')}
\n
    \n {suggestions.value.map((commandId) => (\n \n ))}\n
\n \n )}\n {availableCommands.value.length > 0 && (\n <>\n
{translate('CommandList.heading', 'Commands')}
\n
    \n {availableCommands.value.map((commandId) => (\n \n ))}\n
\n \n )}\n {availableCommandIds.value.length === 0 && (\n \n {translate('CommandList.noCommandsMessage', 'No matching commands found')}\n \n )}\n \n );\n};\n\nexport default React.memo(CommandList);\n",".results {\n min-height: 0;\n transition: opacity 0.3s ease-in;\n overflow-y: auto;\n max-height: 60vh;\n height: 100%;\n}\n\n.results h6 {\n color: var(--color-light-text);\n margin: 0.5rem;\n font-size: 0.9em;\n font-weight: normal;\n user-select: none;\n}\n\n.results ul {\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: 0.5em;\n margin: 0;\n}\n\n.noResults {\n padding: 0.5rem;\n}\n\n.disabled {\n opacity: 0.5 !important;\n pointer-events: none;\n user-select: none;\n}\n","import React from 'react';\nimport { useComputed, useSignalEffect } from '@preact/signals';\n\nimport { useCommandBarState, useCommandExecutor, useIntl } from '../../state';\nimport CommandListItem from '../CommandListItem/CommandListItem';\n\nimport * as styles from './CommandResultsView.module.css';\n\nconst CommandResultsView: React.FC = () => {\n const {\n state: { result, highlightedOption, activeCommandId },\n } = useCommandBarState();\n const { executeCommand } = useCommandExecutor();\n const { translate } = useIntl();\n const navRef = React.useRef(null);\n const highlightedId = useComputed(() =>\n result.value ? Object.values(result.value.options)[highlightedOption.value].id : null\n );\n const isLoading = activeCommandId.value !== null;\n\n useSignalEffect(() => {\n const highlightedIndex = highlightedOption.value;\n navRef.current\n ?.querySelector(`li:nth-child(${highlightedIndex})`)\n ?.scrollIntoView({ behavior: 'smooth', block: 'center' });\n });\n\n const { options, view, message } = result.value ?? {};\n\n return (\n
\n {!isLoading && message &&
{message}
}\n {isLoading ?
{translate('CommandResultsView.waitingForResults', 'Waiting for results…')}
: ''}\n {!isLoading && view ?
{view}
: ''}\n {!isLoading && options && (\n \n )}\n
\n );\n};\n\nexport default CommandResultsView;\n",".commandResultsView {\n max-width: 100%;\n overflow: auto;\n}\n\n.message {\n font-size: 1em;\n margin: 0 0 1em;\n}\n\n.results {\n min-height: 0;\n transition: opacity 0.3s ease-in;\n overflow-y: auto;\n max-height: 60vh;\n height: 100%;\n}\n\n.results h6 {\n color: var(--color-light-text);\n margin: 0.5rem;\n font-size: 0.9em;\n font-weight: normal;\n user-select: none;\n}\n\n.results ul {\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: 0.5em;\n margin: 0;\n}\n\n.noResults {\n padding: 0.5rem;\n}\n\n.disabled {\n opacity: 0.5 !important;\n pointer-events: none;\n user-select: none;\n}\n","import React from 'react';\n\nimport * as styles from './ToggleButton.module.css';\nimport { classnames } from '../../helpers';\n\ntype ToggleButtonProps = {\n handleToggle: () => void;\n disabled?: boolean;\n label: string;\n title: string;\n active: boolean;\n};\n\nconst ToggleButton: React.FC = ({ handleToggle, disabled = false, label, title, active }) => {\n return (\n \n {label}\n ⌘K\n \n );\n};\n\nexport default React.memo(ToggleButton);\n",".toggleButton {\n background-color: var(--grayDark);\n border: 1px solid var(--grayMedium);\n color: var(--textSubtleLight);\n border-radius: 6px;\n display: flex;\n align-items: center;\n gap: 0.5em;\n transition: 0.1s ease-out;\n user-select: none;\n padding: 2px 0.3rem 2px 0.5rem;\n cursor: pointer;\n line-height: 1.4em;\n}\n\n.toggleButton:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.toggleButton:not(:disabled):hover {\n background-color: var(--grayLighter);\n color: var(--textOnWhite);\n}\n\n.toggleButtonActive .buttonIcon {\n background-color: var(--primaryBlue);\n}\n\n.buttonIcon {\n background-color: var(--gray);\n border-radius: 3px;\n color: var(--textOnGray);\n font-size: 80%;\n padding: 1px 4px;\n transition: background-color 0.1s ease-out;\n}\n\n.toggleButton:not(:disabled):hover .buttonIcon {\n background-color: var(--primaryBlue);\n}\n","import React, { createContext, useCallback, useContext, useMemo } from 'react';\nimport { signal, computed, ReadonlySignal } from '@preact/signals';\n\nimport { CommandBarEvent, commandBarReducer, CommandBarState } from './commandBarReducer';\nimport { flattenCommands, logger } from '../helpers';\nimport { STATUS, TRANSITION } from './commandBarMachine';\nimport { IconWrapper } from '../components';\n\ninterface CommandBarContextProps {\n commands: HierarchicalCommandList;\n children: JSX.Element;\n IconComponent: React.FC;\n userPreferences: UserPreferencesService;\n}\n\ninterface CommandBarContextValues {\n state: {\n activeCommandId: ReadonlySignal;\n activeCommandMessage: ReadonlySignal;\n availableCommandIds: ReadonlySignal;\n commandQuery: ReadonlySignal;\n commandQueryDirty: ReadonlySignal;\n commands: ReadonlySignal;\n expanded: ReadonlySignal;\n favouriteCommands: ReadonlySignal;\n highlightedItem: ReadonlySignal;\n highlightedOption: ReadonlySignal;\n recentCommands: ReadonlySignal;\n result: ReadonlySignal;\n resultCommandId: ReadonlySignal;\n searchWord: ReadonlySignal;\n selectedCommandGroup: ReadonlySignal;\n showBranding: ReadonlySignal;\n status: ReadonlySignal;\n };\n actions: Record void>;\n Icon: Renderable;\n}\n\nconst CommandBarContext = createContext({} as CommandBarContextValues);\nexport const useCommandBarState = (): CommandBarContextValues => useContext(CommandBarContext);\n\n/**\n * Create the app state and initialize it if it does not exist yet\n */\nfunction createAppState(initialState: CommandBarState) {\n // Define a signal to hold the state\n const commandBarState = signal(initialState);\n\n // Define a function to dispatch events to the reducer and its state machine and update the state with the result\n const dispatch = (event: CommandBarEvent) => {\n commandBarState.value = commandBarReducer(commandBarState.value, event);\n };\n\n // Derive readonly selectors for partial state values\n const activeCommandId = computed(() => commandBarState.value.activeCommandId);\n const activeCommandMessage = computed(() => commandBarState.value.activeCommandMessage);\n const availableCommandIds = computed(() => commandBarState.value.availableCommandIds);\n const commandQuery = computed(() => commandBarState.value.commandQuery);\n const commandQueryDirty = computed(() => commandBarState.value.commandQueryDirty);\n const commands = computed(() => commandBarState.value.commands);\n const expanded = computed(() => commandBarState.value.expanded);\n const favouriteCommands = computed(() => commandBarState.value.favouriteCommands);\n const highlightedItem = computed(() => commandBarState.value.highlightedItem);\n const highlightedOption = computed(() => commandBarState.value.highlightedOption);\n const recentCommands = computed(() => commandBarState.value.recentCommands);\n const result = computed(() => commandBarState.value.result);\n const resultCommandId = computed(() => commandBarState.value.resultCommandId);\n const searchWord = computed(() => commandBarState.value.searchWord);\n const selectedCommandGroup = computed(() => commandBarState.value.selectedCommandGroup);\n const showBranding = computed(() => commandBarState.value.showBranding);\n const status = computed(() => commandBarState.value.status);\n\n return {\n state: {\n activeCommandId,\n activeCommandMessage,\n availableCommandIds,\n commandQuery,\n commandQueryDirty,\n commands,\n expanded,\n favouriteCommands,\n highlightedItem,\n highlightedOption,\n recentCommands,\n result,\n resultCommandId,\n searchWord,\n selectedCommandGroup,\n showBranding,\n status,\n },\n dispatch,\n };\n}\n\nexport const CommandBarStateProvider: React.FC = ({\n commands,\n children,\n IconComponent,\n userPreferences,\n}) => {\n const { state, dispatch } = useMemo(() => {\n return createAppState({\n activeCommandId: null,\n activeCommandMessage: null,\n availableCommandIds: Object.keys(commands),\n commandQuery: '',\n commandQueryDirty: false,\n commands: flattenCommands(commands),\n expanded: false,\n favouriteCommands: userPreferences.favouriteCommands,\n highlightedItem: 0,\n highlightedOption: 0,\n recentCommands: userPreferences.recentCommands,\n result: null,\n resultCommandId: null,\n searchWord: '',\n selectedCommandGroup: null,\n showBranding: userPreferences.showBranding,\n status: STATUS.COLLAPSED,\n });\n }, []);\n\n // Provide all actions as shorthand functions\n const actions: Record void | Promise> = useMemo(() => {\n return {\n [TRANSITION.RESET_SEARCH]: () => dispatch({ type: TRANSITION.RESET_SEARCH }),\n [TRANSITION.HIGHLIGHT_NEXT_ITEM]: () => dispatch({ type: TRANSITION.HIGHLIGHT_NEXT_ITEM }),\n [TRANSITION.HIGHLIGHT_PREVIOUS_ITEM]: () => dispatch({ type: TRANSITION.HIGHLIGHT_PREVIOUS_ITEM }),\n [TRANSITION.CANCEL]: () => dispatch({ type: TRANSITION.CANCEL }),\n [TRANSITION.SELECT_GROUP]: (commandId: CommandId) => dispatch({ type: TRANSITION.SELECT_GROUP, commandId }),\n [TRANSITION.GO_TO_PARENT_GROUP]: () => dispatch({ type: TRANSITION.GO_TO_PARENT_GROUP }),\n [TRANSITION.UPDATE_SEARCH]: (searchWord: string) =>\n dispatch({ type: TRANSITION.UPDATE_SEARCH, searchWord }),\n [TRANSITION.UPDATE_COMMAND_QUERY]: (commandQuery: string) =>\n dispatch({ type: TRANSITION.UPDATE_COMMAND_QUERY, commandQuery }),\n [TRANSITION.EXECUTE_COMMAND]: async (commandId: CommandId, message: string) => {\n dispatch({\n type: TRANSITION.EXECUTE_COMMAND,\n commandId,\n message,\n });\n // Update recent commands in the user preferences when a command is executed\n return userPreferences\n .addRecentCommand(commandId)\n .catch((e) => logger.error('Could not add recent command', e));\n },\n [TRANSITION.FINISH_COMMAND]: () => dispatch({ type: TRANSITION.FINISH_COMMAND }),\n [TRANSITION.UPDATE_RESULT]: (result: CommandResult) => dispatch({ type: TRANSITION.UPDATE_RESULT, result }),\n [TRANSITION.EXPAND]: () => dispatch({ type: TRANSITION.EXPAND }),\n [TRANSITION.ADD_FAVOURITE]: (commandId: CommandId) => {\n dispatch({ type: TRANSITION.ADD_FAVOURITE, commandId });\n return userPreferences\n .setFavouriteCommands(state.favouriteCommands.value)\n .catch((e) => logger.error('Could not update favourite commands', e));\n },\n [TRANSITION.REMOVE_FAVOURITE]: (commandId: CommandId) => {\n dispatch({ type: TRANSITION.REMOVE_FAVOURITE, commandId });\n return userPreferences\n .setFavouriteCommands(state.favouriteCommands.value)\n .catch((e) => logger.error('Could not update favourite commands', e));\n },\n };\n }, []);\n\n const Icon: React.FC = useCallback(({ icon, spin = false }) => {\n return (\n \n \n \n );\n }, []);\n\n return {children};\n};\n","import React, { useCallback, useEffect } from 'react';\n\nimport useFunctionRef from '../hooks/useFunctionRef';\nimport { useCommandBarState } from './CommandBarStateProvider';\nimport { assert, logger } from '../helpers';\nimport { STATUS } from './commandBarMachine';\n\ninterface CommandInputContextProps {\n children: React.ReactElement | React.ReactElement[];\n toggleOpen: () => void;\n dialogRef: React.RefObject;\n open: boolean;\n}\n\ninterface CommandInputContextValues {\n executeCommand: (commandId: CommandId) => void;\n}\n\nconst CommandInputContext = React.createContext({} as CommandInputContextValues);\nexport const useCommandExecutor = (): CommandInputContextValues => React.useContext(CommandInputContext);\n\n/**\n * Context provider for the command bar input and command execution\n */\nexport const CommandBarExecutor: React.FC = ({ children, toggleOpen, dialogRef, open }) => {\n const { state, actions } = useCommandBarState();\n\n const handleKeyEnteredRef = useFunctionRef((e: KeyboardEvent | React.KeyboardEvent) => {\n if (!open || e.defaultPrevented) {\n return;\n }\n if (e.key === 'k' && (e.metaKey || e.ctrlKey) && dialogRef?.current.contains(e.target as Node)) {\n // Close command bar\n toggleOpen();\n e.stopPropagation();\n e.preventDefault();\n } else if (e.key === 'Escape') {\n // Cancel search, or selection, or close command bar\n e.stopPropagation();\n e.preventDefault();\n if (\n state.selectedCommandGroup.value ||\n state.searchWord.value ||\n state.commandQuery.value ||\n state.result.value\n ) {\n actions.CANCEL();\n } else {\n // Close command bar if cancel is noop\n toggleOpen();\n }\n } else if (e.key === 'ArrowDown') {\n // Navigate to next command\n e.stopPropagation();\n e.preventDefault();\n actions.HIGHLIGHT_NEXT_ITEM();\n } else if (e.key === 'ArrowUp') {\n // Navigate to previous command\n e.stopPropagation();\n e.preventDefault();\n actions.HIGHLIGHT_PREVIOUS_ITEM();\n } else if (e.key === 'Enter') {\n // Execute highlighted command\n e.stopPropagation();\n e.preventDefault();\n\n // Select the highlighted command by default\n let commandId = state.availableCommandIds.value[state.highlightedItem.value];\n if (state.status.value === STATUS.DISPLAYING_RESULT) {\n // If there are options the command to execute is the highlighted option\n if (!state.commandQueryDirty.value && Object.values(state.result.value.options).length) {\n commandId = Object.keys(state.result.value.options)[state.highlightedOption.value];\n } else {\n // If there are no options we run the command which generated the result again\n commandId = state.resultCommandId.value;\n }\n }\n\n if (commandId) {\n void executeCommand(commandId);\n }\n }\n });\n\n const executeCommand = useCallback(\n async (commandId: CommandId) => {\n const command = state.result.value?.options[commandId] ?? state.commands.value[commandId];\n const { action, canHandleQueries, subCommandIds, name } = command;\n\n // If the command is a group, select it\n if (subCommandIds?.length > 0) {\n actions.SELECT_GROUP(commandId);\n return;\n }\n\n assert(action, `Command ${commandId} has no action`);\n\n // If the command is a url, open it\n if (typeof action == 'string') {\n // We wait for the state change to be finished before opening the url\n await actions.EXECUTE_COMMAND(commandId, 'Loading url');\n\n // We need to check if the url is in the same domain, otherwise we need to open it in a new tab\n // TODO: We should add another option to a link command to define its target\n if (action.indexOf('http') === 0 && action.indexOf(document.location.origin) !== 0) {\n window.open(action, '_blank', 'noopener,noreferrer')?.focus();\n } else {\n window.location.href = action;\n }\n return actions.FINISH_COMMAND();\n }\n\n // If the command is a function, execute it\n actions.EXECUTE_COMMAND(commandId, 'Running command');\n const actionResult = action(canHandleQueries ? state.commandQuery.value : undefined);\n if ((actionResult as AsyncCommandResult).then) {\n // Handle Promises\n (actionResult as AsyncCommandResult)\n .then((result) => {\n if (result && !result.success) {\n throw new Error(`The command \"${name}\" failed`);\n }\n })\n .catch((error) => {\n // TODO: Show an error message to the user\n logger.error('Command error', name, error);\n })\n .finally(() => {\n actions.FINISH_COMMAND();\n });\n } else if ((actionResult as CommandGeneratorResult).next) {\n // Handle generators\n const generator = actionResult as CommandGeneratorResult;\n // TODO: Handle errors / success === false\n for await (const result of generator) {\n actions.UPDATE_RESULT(result);\n }\n actions.FINISH_COMMAND();\n } else {\n logger.error('Command result is not a promise or generator', actionResult);\n }\n\n if (command.closeOnExecute) {\n toggleOpen();\n }\n },\n [state.searchWord, state.commands, state.result]\n );\n\n const executeCommandRef = useFunctionRef((commandId: CommandId) => {\n void executeCommand(commandId);\n });\n\n /**\n * Add key event handler, needs to be updated when any parameter for the key event handler changes\n */\n useEffect(() => {\n if (!open) return;\n\n // const guestFrame = document.getElementsByName('neos-content-main')[0] as HTMLIFrameElement;\n // guestFrame.contentWindow?.addEventListener('keyup', (e) => {\n // log.debug('keypress in guestframe', e);\n // });\n // log.debug('guestFrame', guestFrame.contentWindow);\n\n const windowKeyEventHandler = (e) => handleKeyEnteredRef.current(e);\n\n window.addEventListener('keydown', windowKeyEventHandler);\n return () => window.removeEventListener('keydown', windowKeyEventHandler);\n }, [open]);\n\n return (\n \n {children}\n \n );\n};\n","import React, { createContext, ReactNode, useContext } from 'react';\n\ntype IntlProviderProps = {\n children: ReactNode;\n translate: TranslateFunction;\n};\n\ntype IntlProviderValues = {\n translate: TranslateFunction;\n};\n\nexport const IntlContext = createContext({} as IntlProviderValues);\nexport const useIntl = (): IntlProviderValues => useContext(IntlContext);\n\nexport const IntlProvider = ({ translate, children }: IntlProviderProps) => {\n return {children};\n};\n","import React, { CSSProperties, DragEventHandler, useCallback, useEffect, useRef } from 'react';\nimport { batch, useComputed, useSignal } from '@preact/signals';\n\nimport { CommandBarFooter, CommandBarHeader, CommandList, CommandResultsView } from '../index';\nimport { CommandBarExecutor, useCommandBarState } from '../../state';\nimport { clamp, classnames } from '../../helpers';\n\nimport * as styles from './CommandBarDialog.module.css';\n\ninterface CommandBarDialogProps {\n onDrag?: (state: boolean) => void;\n open: boolean;\n toggleOpen: () => void;\n}\n\nconst CommandBarDialog: React.FC = ({ onDrag, open, toggleOpen }) => {\n const {\n state: { expanded, result },\n } = useCommandBarState();\n const dialogRef = useRef(null);\n\n const isDragging = useSignal(false);\n const dialogPosition = useSignal<{\n left: number;\n top: number;\n }>({\n left: window.innerWidth / 2 - 300,\n top: window.innerHeight / 2 - 20,\n });\n const dragStateOffset = useSignal<{\n offsetLeft: number;\n offsetTop: number;\n }>({\n offsetLeft: 0,\n offsetTop: 0,\n });\n const hasBeenDragged = useSignal(false);\n\n const dialogStyle = useComputed(() => {\n const { left, top } = dialogPosition.value;\n return (\n hasBeenDragged.value\n ? {\n left: left + 'px',\n top: top + 'px',\n translate: 'none',\n visibility: isDragging.value ? 'hidden' : 'visible',\n }\n : {}\n ) as CSSProperties;\n });\n\n const reposition = useCallback((left: number, top: number) => {\n const dialogSize = dialogRef.current.getBoundingClientRect();\n dialogPosition.value = {\n left: clamp(left, 0, window.innerWidth - dialogSize.width),\n top: clamp(top, 0, window.innerHeight - dialogSize.height),\n };\n }, []);\n\n const handleDragStart: DragEventHandler = useCallback(\n (e) => {\n // @ts-ignore\n if (e.target.tagName === 'INPUT') {\n return;\n }\n console.debug('dragstart');\n e.dataTransfer.setData('text/plain', 'CommandBar');\n e.dataTransfer.dropEffect = 'move';\n e.dataTransfer.effectAllowed = 'move';\n\n batch(() => {\n dragStateOffset.value = {\n offsetLeft: e.clientX - dialogRef.current.offsetLeft,\n offsetTop: e.clientY - dialogRef.current.offsetTop,\n };\n hasBeenDragged.value = true;\n });\n\n onDrag && onDrag(true);\n },\n [dialogRef.current]\n );\n\n const handleDragDrop = useCallback(\n (e: DragEvent) => {\n const { clientX, clientY } = e;\n console.debug('dragdrop', clientX, clientY, dragStateOffset.value);\n batch(() => {\n isDragging.value = false;\n reposition(clientX - dragStateOffset.value.offsetLeft, clientY - dragStateOffset.value.offsetTop);\n });\n onDrag && onDrag(false);\n },\n [dialogRef.current]\n );\n\n const onResize = useCallback(() => reposition(dialogPosition.value.left, dialogPosition.value.top), []);\n\n useEffect(() => {\n if (!open) return;\n dialogRef.current?.parentElement?.addEventListener('drop', handleDragDrop);\n window.addEventListener('resize', onResize);\n return () => {\n dialogRef.current?.parentElement?.removeEventListener('drop', handleDragDrop);\n window.removeEventListener('resize', onResize);\n };\n }, [open, onResize, handleDragDrop]);\n\n if (!open) {\n return null;\n }\n\n return (\n (isDragging.value = true)}\n style={dialogStyle.value}\n data-testid=\"CommandBarDialog\"\n >\n \n \n
\n {expanded.value && !result.value && }\n {result.value && }\n
\n \n
\n \n );\n};\n\nexport default CommandBarDialog;\n",".commandBar {\n backdrop-filter: blur(var(--dialog-blur));\n background: var(--bar-background);\n border-radius: var(--border-radius-bar, 5);\n border: 1px solid var(--color-border);\n box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);\n color: white;\n display: flex;\n flex-direction: column;\n left: 50%;\n margin: 0;\n max-width: var(--bar-max-width);\n min-width: var(--bar-min-width);\n max-height: 90vh;\n overflow: hidden;\n position: absolute;\n padding: 0;\n top: 50%;\n translate: -50% -50%;\n width: var(--bar-width);\n pointer-events: all;\n transition: width 0.1s ease-out;\n}\n\n.commandBar.hasResults {\n width: var(--bar-width-expanded);\n}\n\n.commandBar small {\n color: var(--color-light-text);\n font-size: 90%;\n}\n\n.commandBar ::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n}\n\n.commandBar ::-webkit-scrollbar-track {\n background-color: transparent;\n}\n\n.commandBar ::-webkit-scrollbar-thumb {\n background-color: var(--grayLight);\n}\n\n.commandBar ::-webkit-scrollbar-corner {\n background-color: var(--grayDark);\n}\n\n.resultsWrap {\n display: grid;\n grid-template-rows: 0fr;\n transform-origin: top center;\n transition: grid-template-rows 0.2s ease-in;\n overflow: auto;\n}\n\n.resultsWrap > * {\n opacity: 0;\n}\n\n.resultsWrap.expanded {\n grid-template-rows: 1fr;\n}\n\n.resultsWrap.expanded > * {\n opacity: 1;\n padding: 0.5rem;\n}\n","import React from 'react';\n\nimport { CommandBarStateProvider, IntlProvider } from './state';\nimport CommandBarDialog from './components/CommandBarDialog/CommandBarDialog';\n\ntype CommandBarProps = {\n commands: HierarchicalCommandList;\n open: boolean;\n toggleOpen: () => void;\n onDrag?: (state: boolean) => void;\n IconComponent: React.FC;\n userPreferences: UserPreferencesService;\n translate: TranslateFunction;\n};\n\nconst CommandBar: React.FC = ({\n commands,\n open,\n toggleOpen,\n onDrag,\n IconComponent,\n userPreferences,\n translate,\n}) => {\n return (\n \n \n \n \n \n );\n};\n\nexport default CommandBar;\n","export async function fetchData(endpoint: string, params?: Record, method = 'GET'): Promise {\n if (params && method === 'GET') {\n endpoint = Object.keys(params).reduce((url, key) => {\n return url + '&' + key + '=' + encodeURIComponent(params[key]);\n }, endpoint + '?');\n }\n return fetch(endpoint, {\n method,\n credentials: 'include',\n body: params && method === 'POST' ? JSON.stringify(params) : undefined,\n headers: {\n // FIXME: Include CSRF Token\n // 'X-Flow-Csrftoken': csrfToken,\n 'Content-Type': 'application/json',\n Accept: 'application/json',\n },\n }).then((response: Response) => {\n if (response.status !== 200) {\n throw new Error(`The request failed with code ${response.status}: \"${response.statusText}\"`);\n }\n if (response.headers.get('Content-Type')?.includes('application/json')) {\n return response.json();\n }\n return response.text();\n }) as Promise;\n}\n","import { fetchData } from './fetch';\n\nconst ENDPOINT_GET_PREFERENCES = '/neos/shel-neos-commandbar/preferences/getpreferences';\nconst ENDPOINT_SET_FAVOURITE_COMMANDS = '/neos/shel-neos-commandbar/preferences/setfavourites';\nconst ENDPOINT_ADD_RECENT_COMMAND = '/neos/shel-neos-commandbar/preferences/addrecentcommand';\nconst ENDPOINT_ADD_RECENT_DOCUMENT = '/neos/shel-neos-commandbar/preferences/addrecentdocument';\n\nasync function setPreference(endpoint: string, data: any): Promise {\n return fetchData(endpoint, data, 'POST');\n}\n\nexport async function getPreferences() {\n return fetchData(ENDPOINT_GET_PREFERENCES);\n}\n\nexport async function setFavouriteCommands(commandIds: CommandId[]) {\n return setPreference(ENDPOINT_SET_FAVOURITE_COMMANDS, { commandIds });\n}\n\nexport async function addRecentCommand(commandId: CommandId) {\n // TODO: Check if sendBeacon is a better option here to reduce the impact on the user\n return setPreference(ENDPOINT_ADD_RECENT_COMMAND, { commandId });\n}\n\nexport async function addRecentDocument(nodeContextPath: NodeContextPath) {\n // TODO: Check if sendBeacon is a better option here to reduce the impact on the user\n return setPreference(ENDPOINT_ADD_RECENT_DOCUMENT, { nodeContextPath });\n}\n","import { fetchData } from './fetch';\n\nconst ENDPOINT_COMMANDS = '/neos/service/data-source/shel-neos-commandbar-commands';\n\nexport async function getCommands() {\n return fetchData(ENDPOINT_COMMANDS);\n}\n","import { fetchData } from './fetch';\n\nconst ENDPOINT_SEARCH_NEOS_DOCS = '/neos/service/data-source/shel-neos-commandbar-search-neos-docs';\n\nexport async function searchNeosDocs(query: string): Promise {\n return query ? fetchData(ENDPOINT_SEARCH_NEOS_DOCS, { query }) : {};\n}\n","import { fetchData } from './fetch';\n\nconst ENDPOINT_SEARCH_NEOS_PACKAGES = '/neos/service/data-source/shel-neos-commandbar-search-neos-packages';\n\nexport async function searchNeosPackages(query: string): Promise {\n return query ? fetchData(ENDPOINT_SEARCH_NEOS_PACKAGES, { query }) : {};\n}\n",".pluginWrap {\n display: flex;\n align-items: center;\n height: 41px;\n font-size: 14px !important;\n line-height: 20px;\n margin: 0 1rem;\n}\n\n.fullScreenLayer {\n width: 100vw;\n height: 100vh;\n position: absolute;\n left: 0;\n top: 0;\n pointer-events: none;\n z-index: 9999;\n display: none;\n}\n\n.open {\n display: block;\n}\n\n@keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(359deg); }\n}\n\n.spin {\n animation: spin 2s linear infinite;\n}\n","import React from 'preact/compat';\nimport * as styles from './ModulePlugin.module.css';\n\n/**\n * As we don't have font awesome in the shadow dom, we need to render a fallback icon for commands\n */\nconst IconComponent: React.FC = ({ spin = false }) => {\n return (\n \n \n \n );\n};\n\nexport default IconComponent;\n","import { Component } from 'preact';\nimport React from 'preact/compat';\n\nimport { classnames, CommandBar, logger, ToggleButton } from '@neos-commandbar/commandbar';\nimport { PreferencesApi, CommandsApi, DocumentationApi, PackagesApi } from '@neos-commandbar/neos-api';\nimport IconComponent from './IconComponent';\n\nimport * as styles from './ModulePlugin.module.css';\nimport * as theme from '@neos-commandbar/commandbar/src/Theme.module.css';\n\n/**\n * This is a custom element that is used to render the command bar inside a shadow dom to prevent Neos and module\n * styles from leaking into the component\n */\nexport default class App extends Component<\n {\n styleuri: string;\n },\n {\n initialized: boolean;\n open: boolean;\n dragging: boolean;\n commands: HierarchicalCommandList;\n preferences: {\n favouriteCommands: CommandId[];\n recentCommands: CommandId[];\n recentDocuments: RecentDocument[];\n showBranding: boolean;\n };\n }\n> {\n static tagName = 'command-bar-container';\n static options = { shadow: true };\n private static i18nRegistry: NeosI18n;\n\n constructor() {\n super();\n App.i18nRegistry = (window as NeosModuleWindow).NeosCMS.I18n;\n this.state = {\n initialized: false,\n open: false,\n dragging: false,\n // TODO: Only load the search commands in dev context\n commands: {\n searchNeosDocs: {\n name: App.translate('CommandBarUiPlugin.command.documentation', 'Documentation'),\n description: App.translate(\n 'CommandBarUiPlugin.command.documentation.description',\n 'Browse or search the Neos documentation'\n ),\n icon: 'book',\n canHandleQueries: true,\n action: this.handleSearchNeosDocs.bind(this),\n },\n searchNeosPackages: {\n name: App.translate('CommandBarUiPlugin.command.packages', 'Packages'),\n description: App.translate(\n 'CommandBarUiPlugin.command.packages.description',\n 'Search for Neos packages'\n ),\n icon: 'boxes',\n canHandleQueries: true,\n action: this.handleSearchNeosPackages.bind(this),\n },\n },\n preferences: { favouriteCommands: [], recentCommands: [], recentDocuments: [], showBranding: true },\n };\n }\n\n /**\n * Wrapper for the Neos backend translation api\n */\n private static translate: TranslateFunction = (id, paramsOrFallback, fallback) => {\n if (typeof paramsOrFallback === 'string') {\n fallback = paramsOrFallback;\n paramsOrFallback = {};\n }\n return App.i18nRegistry.translate(id, fallback, 'Shel.Neos.CommandBar', 'Main', paramsOrFallback);\n };\n\n /**\n * Load the commands and preferences from the server and set the state to initialized\n */\n async componentDidMount() {\n try {\n const preferences = await PreferencesApi.getPreferences();\n const commands = await CommandsApi.getCommands();\n this.setState((prev) => ({ initialized: true, preferences, commands: { ...prev.commands, ...commands } }));\n\n document.addEventListener('keydown', (e) => {\n if (e.key === 'k' && (e.metaKey || e.ctrlKey)) {\n e.stopPropagation();\n e.preventDefault();\n this.handleToggle();\n }\n });\n } catch (e) {\n logger.error(e);\n }\n }\n\n handleToggle = () => {\n this.setState(({ open }) => ({\n open: !open,\n }));\n };\n\n handleDrag = (dragging: boolean) => {\n this.setState({ dragging: dragging });\n };\n\n handleSearchNeosDocs = async function* (query: string): CommandGeneratorResult {\n yield {\n success: true,\n message: App.translate(\n 'CommandBarUiPlugin.command.documentation.searching',\n { query },\n `Search for \"${query}\"`\n ),\n };\n let error;\n const options = await DocumentationApi.searchNeosDocs(query).catch((e) => {\n logger.error('Could not search Neos docs', e);\n error = e.message;\n });\n if (error || !options) {\n yield {\n success: false,\n message: App.translate('CommandBarUiPlugin.command.documentation.error', 'Search failed'),\n view: error,\n };\n } else {\n yield {\n success: true,\n message: App.translate(\n 'CommandBarUiPlugin.command.documentation.matches',\n { matches: Object.keys(options).length },\n `${Object.values(options).length} options match your query`\n ),\n options,\n };\n }\n };\n\n handleSearchNeosPackages = async function* (query: string): CommandGeneratorResult {\n yield {\n success: true,\n message: App.translate('CommandBarUiPlugin.command.packages.searching', { query }, `Search for \"${query}\"`),\n };\n let error;\n const options = await PackagesApi.searchNeosPackages(query).catch((e) => {\n logger.error('Could not search Neos packages', e);\n error = e.message;\n });\n if (error || !options) {\n yield {\n success: false,\n message: App.translate('CommandBarUiPlugin.command.packages.error', 'Search failed'),\n view: error,\n };\n } else {\n yield {\n success: true,\n message: App.translate(\n 'CommandBarUiPlugin.command.packages.matches',\n { matches: Object.values(options).length },\n `${Object.values(options).length} options match your query`\n ),\n options,\n };\n }\n };\n\n render() {\n const { initialized, open, dragging, commands, preferences } = this.state;\n\n return (\n <>\n \n
\n \n {initialized && (\n e.preventDefault()}\n style={dragging ? { pointerEvents: 'all' } : null}\n >\n \n
\n )}\n
\n \n );\n }\n}\n",".commandBarTheme {\n --bar-min-width: 600px;\n --bar-max-width: 90vw;\n --bar-width: 30vw;\n --bar-width-expanded: 60vw;\n --bar-background: rgba(0, 0, 0, 0.8);\n --footer-background: rgba(0, 0, 0, 0.8);\n --color-shadow: rgba(255, 255, 255, 0.7);\n --color-light-text: rgba(255, 255, 255, 0.6);\n --color-light-text-hover: rgba(255, 255, 255, 0.8);\n --color-icon-bg: rgba(255, 255, 255, 0.2);\n --color-icon-bg-hover: rgba(255, 255, 255, 0.4);\n --color-border: rgba(255, 255, 255, 0.2);\n --color-item-highlighted: rgba(255, 255, 255, 0.15);\n --color-item-hover: rgba(255, 255, 255, 0.05);\n --border-radius-bar: 0.6rem;\n --border-radius-item: 0.4rem;\n --icon-size: 1.125em;\n --dialog-blur: 5px;\n\n /* Neos UI colors */\n --grayLight: #3f3f3f;\n --grayLighter: #eee;\n --grayMedium: #323232;\n --grayDark: #222;\n --gray: #555;\n --textSubtleLight: #adadad;\n --textOnGray: #fff;\n --textOnWhite: #252525;\n --primaryBlue: #00adee;\n --success: #00a338;\n --warn: #ff8700;\n}\n","import register from 'preact-custom-element';\n\nimport App from './App';\n\n// @ts-ignore\nif (process.env.NODE_ENV !== 'production') {\n // @ts-ignore\n require('preact/debug');\n}\n\nfunction initializeApp() {\n // Prevent registering the custom element twice\n if (window['SHEL_NEOS_COMMANDBAR_INITIALIZED']) return;\n window['SHEL_NEOS_COMMANDBAR_INITIALIZED'] = true;\n\n // Register & add the debug web component, tagName and attributes are automatically read from the component\n register(App, null, null, App.options);\n\n // Get the top bar left container and create a custom element to render the command bar into\n const topBarLeft = document.querySelector('.neos-top-bar-left');\n const pluginContainer = document.createElement('command-bar-container');\n pluginContainer.id = 'shel-neos-commandbar';\n\n // Get the style tag of the command bar package from the HTML head to also load it inside the custom element\n const commandBarStyleTag = document.querySelector(\n 'link[rel=\"stylesheet\"][href*=\"Shel.Neos.CommandBar\"]'\n ) as HTMLLinkElement;\n pluginContainer.setAttribute('styleuri', commandBarStyleTag.href);\n\n topBarLeft.appendChild(pluginContainer);\n}\n\n// If the api is already initialized, initialize the app as the event listener wouldn't be called anymore\nif (window.NeosCMS?.I18n?.initialized) {\n initializeApp();\n} else {\n window.addEventListener('neoscms-i18n-initialized', initializeApp);\n}\n"],"names":["slice","options","vnodeId","rerenderQueue","prevDebounce","defer","i","EMPTY_OBJ","EMPTY_ARR","IS_NON_DIMENSIONAL","assign","obj","props","removeNode","node","parentNode","removeChild","createElement","type","children","key","ref","normalizedProps","arguments","length","call","defaultProps","createVNode","original","vnode","__k","__","__b","__e","__d","__c","__h","constructor","__v","Fragment","Component","context","this","getDomSibling","childIndex","indexOf","sibling","updateParentDomPointers","child","base","enqueueRender","c","push","process","__r","debounceRendering","renderQueueLength","component","commitQueue","oldVNode","oldDom","parentDom","sort","a","b","shift","diff","ownerSVGElement","commitRoot","diffChildren","renderResult","newParentVNode","oldParentVNode","globalContext","isSvg","excessDomChildren","isHydrating","j","childVNode","newDom","firstChildDom","refs","oldChildren","oldChildrenLength","Array","isArray","reorderChildren","placeChild","getLastDom","nextSibling","unmount","applyRef","tmp","toChildArray","out","some","nextDom","sibDom","outer","appendChild","insertBefore","lastDom","setStyle","style","value","setProperty","test","dom","name","oldValue","useCapture","o","cssText","replace","toLowerCase","l","addEventListener","eventProxyCapture","eventProxy","removeEventListener","e","removeAttribute","setAttribute","event","newVNode","isNew","oldProps","oldState","snapshot","clearProcessingException","newProps","provider","componentContext","renderHook","count","newType","contextType","__E","prototype","render","doRender","sub","state","__n","_sb","__s","getDerivedStateFromProps","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","forEach","componentWillUpdate","componentDidUpdate","__P","getChildContext","getSnapshotBeforeUpdate","oldHtml","newHtml","nodeType","localName","document","createTextNode","createElementNS","is","data","childNodes","dangerouslySetInnerHTML","attributes","__html","innerHTML","diffProps","hydrate","checked","diffElementNodes","diffed","root","cb","current","parentVNode","skipRemove","r","componentWillUnmount","replaceNode","firstChild","cloneElement","createContext","defaultValue","contextId","Consumer","contextValue","Provider","subs","ctx","_props","old","splice","$8ce2b6e41a0de290$var$r","Object","t","n","hasOwnProperty","apply","ContextProvider","rest","connectedCallback","CustomEvent","detail","bubbles","cancelable","dispatchEvent","_vdom","h","toVdom","element","nodeName","cn","toCamelCase","slot","Slot","wrappedChildren","_vdomComponent","hasAttribute","_root","str","_","toUpperCase","attributeChangedCallback","newValue","disconnectedCallback","_this","_listener","stopPropagation","tagName","propNames","PreactElement","inst","Reflect","construct","HTMLElement","shadow","attachShadow","mode","create","observedAttributes","keys","propTypes","defineProperty","get","set","v","customElements","define","displayName","error","errorInfo","ctor","handled","getDerivedStateFromError","setState","componentDidCatch","update","callback","s","forceUpdate","Promise","then","bind","resolve","setTimeout","isStaticChildren","__source","__self","currentIndex","currentComponent","previousComponent","prevRaf","currentHook","afterPaintEffects","EMPTY","oldBeforeDiff","oldBeforeRender","oldAfterDiff","oldCommit","oldBeforeUnmount","getHookState","index","hooks","__H","__V","useState","initialState","useReducer","invokeOrReturn","reducer","init","hookState","_reducer","action","currentValue","__N","nextValue","_hasScuFromHooks","prevScu","p","stateHooks","filter","x","every","shouldUpdate","hookItem","useEffect","args","argsChanged","_pendingArgs","useLayoutEffect","useRef","initialValue","useMemo","factory","useCallback","useContext","flushAfterPaintEffects","invokeCleanup","invokeEffect","requestAnimationFrame","afterNextFrame","hasErrored","HAS_RAF","raf","done","clearTimeout","timeout","cancelAnimationFrame","hook","comp","cleanup","oldArgs","newArgs","arg","f","shallowDiffers","y","PureComponent","isPureReactComponent","oldDiffHook","__f","REACT_FORWARD_SYMBOL","Symbol","for","mapFn","fn","map","Children","only","normalized","toArray","oldCatchError","oldUnmount","detachedClone","detachedParent","effect","removeOriginal","originalParent","Suspense","__u","_suspenders","suspended","__a","SuspenseList","_next","_map","__R","promise","suspendingVNode","suspendingComponent","resolved","onResolved","onSuspensionComplete","suspendedVNode","pop","wasHydrating","detachedComponent","__O","fallback","list","delete","revealOrder","size","Portal","container","_container","_temp","before","delegated","unsuspend","wrappedUnsuspend","Map","reverse","REACT_ELEMENT_TYPE","CAMEL_PROPS","IS_DOM","onChangeInputType","isReactComponent","configurable","writable","oldEventHook","empty","isPropagationStopped","cancelBubble","isDefaultPrevented","defaultPrevented","persist","nativeEvent","classNameDescriptor","class","oldVNodeHook","nonCustomElement","multiple","selected","className","enumerable","$$typeof","oldDiffed","isValidElement","startTransition","useId","__m","mask","useInsertionEffect","useTransition","useDeferredValue","val","useSyncExternalStore","subscribe","getSnapshot","_useState","_instance","_getSnapshot","useImperativeHandle","createHandle","concat","useDebugValue","formatter","version","parent","textContent","preactRender","preactHydrate","unmountComponentAtNode","createPortal","el","containerInfo","createFactory","preactCloneElement","createRef","findDOMNode","memo","comparer","nextProps","updateRef","Memoed","forwardRef","Forwarded","clone","flushSync","unstable_batchedUpdates","StrictMode","lazy","loader","prom","Lazy","exports","default","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentDispatcher","readContext","$1b06254f22bdd07e$export$2e2bcd8739ae039","fnRef","$d6bdfea1a1e13052$export$b8f5890fc79d6aca","cycleDetected","Error","endBatch","batchDepth","hasError","batchedEffect","_effect","batchIteration","next","_nextBatchedEffect","_flags","needsToRecompute","_callback","err","batch","evalContext","globalVersion","addDependency","signal","_node","_target","_version","_source","_prevSource","_sources","_nextSource","_prevTarget","_nextTarget","_rollbackNode","_subscribe","Signal","_value","_targets","target","_refresh","prepareSources","rollbackNode","cleanupSources","head","prev","_unsubscribe","Computed","compute","_compute","_globalVersion","computed","cleanupEffect","_cleanup","prevContext","disposeEffect","endEffect","Effect","_dispose","hookName","hookFn","setCurrentUpdater","updater","finishUpdate","_start","Text","_ref","currentSignal","useSignal","_updateFlags","_updater","peek","createPropUpdater","prop","propSignal","setAsProperty","changeSignal","_update","newSignal","useComputed","$compute","useSignalEffect","$edcc64b978b003b2$export$2e2bcd8739ae039","commands","parentId","reduce","commandList","commandId","icon","description","subCommands","canHandleQueries","closeOnExecute","category","executeManually","absoluteCommandId","subCommandIds","subCommandId","id","flag","valueOf","toString","_notify","OUTDATED","finish","defineProperties","signalProps","__np","renderedProps","_updaters","updaters","_signal","_updater2","HAS_PENDING_UPDATE","_i","$ea926074f08a4cd5$var$PREFIX","$ea926074f08a4cd5$export$2e2bcd8739ae039","ok","message","console","log","warn","debug","$197034fc7f52566b$export$2e2bcd8739ae039","min","max","Math","$44ee2883445aae00$var$cmp","Intl","Collator","compare","$44ee2883445aae00$var$inf","Infinity","$44ee2883445aae00$var$NEGS_RE","$44ee2883445aae00$var$OPTS","interSplit","intraSplit","intraBound","interLft","interRgt","interChars","interIns","intraChars","intraIns","intraContr","intraMode","intraSlice","intraSub","intraTrn","intraDel","intraFilt","term","match","info","haystack","needle","idx","chars","terms","interLft2","interLft1","start","ia","ib","$44ee2883445aae00$var$lazyRepeat","limit","$44ee2883445aae00$var$mode2Tpl","$44ee2883445aae00$export$2e2bcd8739ae039","opts","_intraSplit","_interSplit","_intraBound","intraRules","_intraSlice","_intraIns","_intraSub","_intraTrn","_intraDel","plen","withIntraSplit","RegExp","trimRe","contrsRe","split","m","prepQuery","capt","interOR","parts","reTpl","contrs","fill","pi","lftIdx","rgtIdx","lftChar","rgtChar","numChars","variants","intraInsTpl","join","preTpl","sufTpl","interCharsTpl","idxs","query","withIntraBound","interBound","queryR","partsLen","len","field","interRgt2","interRgt1","ranges","mayDiscard","ii","mhstr","idxAcc","disc","lft2","lft1","rgt2","rgt1","inter","intra","refine","k","group","termLen","groupLen","fullMatch","idxOf","refineMatch","lftCharIdx","rgtCharIdx","isPre","isSuf","junk","junkIdx","m2","found","re","exec","charIdx","from","to","refLen","ri","lastRi","idxInNext","matchLen","offset","prepend","search","outOfOrder","infoThresh","preFiltered","negsRe","needles","matches","negs","trim","terms2","ti","$44ee2883445aae00$var$permute","perm","matchedIdxs","Set","ni","preFiltered2","has","matched","add","retInfo","retOrder","acc","_info","order","_search","$44ee2883445aae00$var$latinize","accents","A","E","I","O","U","u","C","N","S","accentsMap","accentsTpl","accentsRe","replacer","strings","arr","result","$44ee2883445aae00$var$_mark","part","$44ee2883445aae00$var$_append","latinize","permute","highlight","mark","accum","append","substring","fr","$f5323048963c3f50$var$uf","$f5323048963c3f50$export$2e2bcd8739ae039","selectedCommandGroup","searchWord","favourites","recentCommands","availableCommands","values","command","includes","favouriteCommands","aIsRecent","bIsRecent","aIsFavourite","bIsFavourite","localeCompare","$f5323048963c3f50$var$sortCommands","availableCommandNames","indices","$187cc7d792701051$export$2e2bcd8739ae039","condition","$4de6e96dcc9c5973$export$2e2bcd8739ae039","Boolean","$4327cc3088ca9bcc$export$e50006273435e7d4","STATUS","$4327cc3088ca9bcc$export$f2127cf693ff3edc","TRANSITION","$4327cc3088ca9bcc$export$9523889e0a5da4ba","ACTION","COLLAPSED","$4327cc3088ca9bcc$export$ea56d40cd27c3480","collapsed","on","UPDATE_SEARCH","IDLE","actions","EXPAND","SET_SEARCH_WORD","REFRESH_COMMANDS","HIGHLIGHT_NEXT_ITEM","idle","RESET_HIGHLIGHT","HIGHLIGHT_NEXT_COMMAND","HIGHLIGHT_PREVIOUS_ITEM","HIGHLIGHT_PREVIOUS_COMMAND","CANCEL","RESET_SEARCH_OR_LEAVE_GROUP","EXECUTE_COMMAND","EXECUTING_COMMAND","ADD_RECENTLY_USED","SET_ACTIVE_COMMAND","GO_TO_PARENT_GROUP","LEAVE_GROUP","SELECT_GROUP","RESET_SEARCH","SET_GROUP","ADD_FAVOURITE","REMOVE_FAVOURITE","executingCommand","UPDATE_RESULT","DISPLAYING_RESULT","FINISH_COMMAND","UNSET_ACTIVE_COMMAND","displayingResult","UPDATE_COMMAND_QUERY","SET_COMMAND_QUERY","RESET_OPTION_HIGHLIGHT","HIGHLIGHT_NEXT_OPTION","HIGHLIGHT_PREVIOUS_OPTION","UNSET_RESULT","$4327cc3088ca9bcc$export$66bb15e2994e6a26","actionCallback","nextStateNode","status","nextState","$3bdb7eb1bca92625$var$runAction","highlightedItem","availableCommandIds","highlightedOption","commandQuery","commandQueryDirty","expanded","activeCommandId","activeCommandMessage","success","view","resultCommandId","unshift","$3bdb7eb1bca92625$export$9e3f7bba62d514d7","$5105b2e4b958e09e$export$2e2bcd8739ae039","$a35043596f133777$export$2e2bcd8739ae039","$c4caeabf22edabb4$export$a40ebde8ba896166","$1f5e800e7e637d25$export$2e2bcd8739ae039","showBranding","$c92c3390bd0178a7$export$53e25b3b0bb3833c","translate","$16998066b180f6ef$export$5aebe9a147f4d146","href","title","rel","xmlns","width","height","viewBox","gradientUnits","x1","y1","x2","y2","stopColor","d","transform","$a9d8acb8ffa4eae4$export$9f1a005b19e034c8","$04a90802deaf6510$export$1440ab2404307ace","$aa76484c3e1ffc63$export$bd96d8defd13d2a9","$5dcc0a8fea92bfd7$export$bfe304c803da70de","$d8d8e5123e381d27$export$4b2505a64d1f53bd","$6e1f0402541249b7$export$ff536e3efa59dfb8","$c4716b7a8a8a93ad$export$2f8478004b9d9349","$2aa32f662e9078f8$export$2e2bcd8739ae039","Icon","commandForContext","$2f74d86b545ec476$export$e3d20747ab930783","isRunning","$87c672bf702cb1a4$var$updateResultsTimer","$87c672bf702cb1a4$export$2e2bcd8739ae039","executeCommand","$1ea80d3c959bcb5f$export$40a06c0c5b3ff9aa","inputRef","activeCommand","handleChange","$d6bdfea1a1e13052$export$35808ee640e87ca7","handleKeyPress","preventDefault","$2f74d86b545ec476$export$ed99038c4a6f842a","focus","placeholder","disabled","autoFocus","onChange","onKeyUp","onClick","$937f9e11bd53a43f$export$2e2bcd8739ae039","isDisplayingResults","$b1dbce9614761190$var$CommandListItem","onItemSelect","highlightedId","onToggleFavourite","commandType","$b1dbce9614761190$var$getCommandType","isHighlighted","isFavourite","$b1dbce9614761190$export$2e2bcd8739ae039","$8564955bb37d770f$var$CommandList","navRef","querySelector","scrollIntoView","behavior","block","handleToggleFavourite","suggestions","highlightedCommand","$8564955bb37d770f$export$2e2bcd8739ae039","$798ea27d8acd4548$export$2e2bcd8739ae039","isLoading","highlightedIndex","$2a001a2eafdc7fa7$export$2e2bcd8739ae039","handleToggle","label","active","$c92c3390bd0178a7$var$CommandBarContext","$450fc775b2f7950e$export$fd42f52fd3ae1109","$d6bdfea1a1e13052$export$fae74005e78b1a27","$c92c3390bd0178a7$export$8ffac7c47764ac1d","IconComponent","userPreferences","dispatch","$d6bdfea1a1e13052$export$1538c33de8887b59","commandBarState","$0ed7988ef29ac9ba$export$e2ef10f86a8d60e8","$0ed7988ef29ac9ba$export$2983e091f1a1e8e2","$c92c3390bd0178a7$var$createAppState","async","addRecentCommand","catch","setFavouriteCommands","spin","$1ea80d3c959bcb5f$var$CommandInputContext","$1ea80d3c959bcb5f$export$c67beff7acfe625","toggleOpen","dialogRef","open","handleKeyEnteredRef","metaKey","ctrlKey","contains","location","origin","window","actionResult","undefined","finally","generator","executeCommandRef","$d6bdfea1a1e13052$export$6d9c69b0de29b591","windowKeyEventHandler","$16998066b180f6ef$export$9073ae457aa4b186","$16998066b180f6ef$export$480518999dfc4151","$e407a5ca25d14613$export$2e2bcd8739ae039","onDrag","isDragging","$2f74d86b545ec476$export$65d8bf213f6a4478","dialogPosition","left","innerWidth","top","innerHeight","dragStateOffset","offsetLeft","offsetTop","hasBeenDragged","dialogStyle","visibility","reposition","dialogSize","getBoundingClientRect","handleDragStart","dataTransfer","setData","dropEffect","effectAllowed","$0ed7988ef29ac9ba$export$712ea50be43a7858","clientX","clientY","handleDragDrop","onResize","parentElement","draggable","onDragStart","$0a82af2c679f148f$export$2e2bcd8739ae039","$6b9d0563b231bc8e$export$8134c072fddab6a5","endpoint","params","method","url","encodeURIComponent","fetch","credentials","body","JSON","stringify","headers","Accept","response","statusText","json","text","$524075ade96a5510$var$setPreference","$524075ade96a5510$export$1de6a888ae076ff8","$524075ade96a5510$export$df984a4ad36be2aa","commandIds","$524075ade96a5510$export$910806e2dc4fd6f4","$524075ade96a5510$export$6c5ba575b14611dc","nodeContextPath","$0c75c51914774a7a$export$7a6092e2ae7e1845","$a0088a67651538b4$export$e747fdfe1889f28d","$670219d361a1461f$export$6d49ca4503d8331","$0be707f3177806f3$export$27b1eaa2ed0d5a99","$0be707f3177806f3$export$c82e186cf428d56d","$83fa79e240d3a2bb$export$2e2bcd8739ae039","$563cc721c6a67067$export$34b9dba7ce09269b","$694b266eb137553d$export$2e2bcd8739ae039","$450fc775b2f7950e$export$16fa2f45be04daa8","static","super","i18nRegistry","NeosCMS","I18n","initialized","dragging","searchNeosDocs","handleSearchNeosDocs","searchNeosPackages","handleSearchNeosPackages","preferences","recentDocuments","paramsOrFallback","$524075ade96a5510$exports","getPreferences","$0c75c51914774a7a$exports","getCommands","handleDrag","$a0088a67651538b4$exports","$670219d361a1461f$exports","$450fc775b2f7950e$export$ffb0004e005737fa","styleuri","onDragOver","pointerEvents","addRecentDocument","$8edfd4053752e923$var$initializeApp","$8ce2b6e41a0de290$export$2e2bcd8739ae039","topBarLeft","pluginContainer","commandBarStyleTag"],"version":3,"file":"Module.js.map"} \ No newline at end of file diff --git a/Resources/Public/Plugin.css b/Resources/Public/Plugin.css index 82d56bc..28e7ca6 100644 --- a/Resources/Public/Plugin.css +++ b/Resources/Public/Plugin.css @@ -437,10 +437,6 @@ padding: 0.5rem; } -.CommandBarDialog-module__resultsWrap___2gd3U.CommandBarDialog-module__split___66TVs { - grid-template-columns: 1fr 1fr; -} - .CommandBarUiPlugin-module__fullScreenLayer___1cUx4 { width: 100vw; height: 100vh; diff --git a/Resources/Public/Plugin.css.map b/Resources/Public/Plugin.css.map index f372756..3d721a2 100644 --- a/Resources/Public/Plugin.css.map +++ b/Resources/Public/Plugin.css.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///../commandbar/src/components/IconWrapper/IconWrapper.module.css","webpack:///../commandbar/src/components/CommandBarFooter/Branding.module.css","webpack:///../commandbar/src/components/CommandBarFooter/CommandBarFooter.module.css","webpack:///../commandbar/src/components/SearchBox/SearchBox.module.css","webpack:///../commandbar/src/components/CommandBarHeader/CommandBarHeader.module.css","webpack:///../commandbar/src/components/CommandListItem/CommandListItem.module.css","webpack:///../commandbar/src/components/CommandList/CommandListing.module.css","webpack:///../commandbar/src/components/CommandResultsView/CommandResultsView.module.css","webpack:///../commandbar/src/components/ToggleButton/ToggleButton.module.css","webpack:///../commandbar/src/components/CommandBarDialog/CommandBarDialog.module.css","webpack:///./src/CommandBarUiPlugin.module.css","webpack:///../commandbar/src/Theme.module.css"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;ACzBA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"./Plugin.css","sourcesContent":[".IconWrapper-module__iconWrap___1Z3nD {\n width: var(--icon-size);\n max-height: var(--icon-size);\n display: inline-block;\n text-align: center;\n}\n\n.IconWrapper-module__iconWrap___1Z3nD svg {\n max-width: 100%;\n max-height: inherit;\n display: inline-block;\n}\n",".Branding-module__madeWithLove___2ibna {\n display: flex;\n text-decoration: none;\n gap: 0.5rem;\n}\n\n.Branding-module__madeWithLove___2ibna small {\n transition: color 0.1s ease-in-out;\n}\n\n.Branding-module__madeWithLove___2ibna:hover small {\n color: var(--color-light-text-hover);\n}\n\n.Branding-module__madeWithLove___2ibna svg {\n display: inline-block;\n width: var(--icon-size);\n height: auto;\n}\n",".CommandBarFooter-module__commandBarFooter___2mcre {\n border-top: 1px solid var(--color-border);\n background-color: var(--footer-background);\n padding: 0.8rem 1rem;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 1rem;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.CommandBarFooter-module__breadcrumb___1Ul24 {\n display: flex;\n gap: 1rem;\n --icon-size: 0.875em;\n}\n\n.CommandBarFooter-module__activity___2GXJU {\n display: flex;\n gap: 1rem;\n --icon-size: 0.875em;\n}\n\n.CommandBarFooter-module__activity___2GXJU svg {\n animation-name: CommandBarFooter-module__spinner___1mRmX;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n transform-origin: 50% 50%;\n display: inline-block;\n}\n\n@keyframes CommandBarFooter-module__spinner___1mRmX {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n",".SearchBox-module__searchBox___1SEtn {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n background: none;\n border: none;\n color: currentColor;\n font-size: 1.1em !important; /* Fix to prevent Neos.UI css from forcing the font size to 14px */\n font-weight: 300;\n outline: none;\n padding: 0.5rem;\n flex: 1;\n}\n\n.SearchBox-module__searchBox___1SEtn:disabled {\n color: var(--color-light-text);\n cursor: not-allowed;\n}\n\n.SearchBox-module__expandButton___B2jYv {\n position: absolute;\n padding: 0 1rem;\n height: 100%;\n right: 0;\n display: block;\n background: none;\n border: none;\n cursor: pointer;\n}\n\n.SearchBox-module__expandButton___B2jYv svg {\n color: var(--grayLighter);\n transition: color 0.1s ease-in-out;\n}\n\n.SearchBox-module__expandButton___B2jYv:hover svg {\n color: var(--primaryBlue);\n}\n\n.SearchBox-module__executeButton___3hg_l {\n position: absolute;\n padding: 0 1rem;\n height: 100%;\n right: 0;\n display: block;\n background: none;\n border: none;\n cursor: pointer;\n}\n\n.SearchBox-module__executeButton___3hg_l {\n color: var(--grayLighter);\n transition: color 0.1s ease-in-out;\n}\n\n.SearchBox-module__executeButton___3hg_l:hover svg {\n color: var(--primaryBlue);\n}\n\n.SearchBox-module__commandQueryDirty___s_CVX {\n color: var(--warn);\n}\n",".CommandBarHeader-module__commandBarHeader___3Y2hR {\n display: flex;\n align-items: center;\n gap: 1rem;\n padding: 0.3rem 0.5rem;\n border-bottom: 1px solid var(--color-border);\n position: relative;\n}\n\n.CommandBarHeader-module__backButton___1qIGu {\n padding: 0.3rem;\n background-color: var(--color-icon-bg);\n border-radius: 50%;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n color: white;\n cursor: pointer;\n transition: background-color 0.1s ease-in-out;\n display: flex;\n}\n\n.CommandBarHeader-module__backButton___1qIGu:hover {\n background-color: var(--color-icon-bg-hover);\n}\n",".CommandListItem-module__commandListItem___2u7xD {\n cursor: pointer;\n display: flex !important; /* Necessary due to the neos header bar styling */\n gap: 1em;\n padding: 0.4rem 0.6rem;\n align-items: baseline;\n border-radius: var(--border-radius-item);\n transition: background-color 0.1s ease-in-out, opacity 0.1s ease-in-out;\n background-color: transparent;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n --icon-size: 0.875em;\n}\n\n.CommandListItem-module__commandListItem___2u7xD:hover {\n background-color: var(--color-item-hover);\n}\n\n.CommandListItem-module__highlighted___1LR6R {\n background-color: var(--color-item-highlighted);\n}\n\n.CommandListItem-module__disabled___7wCym {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.CommandListItem-module__label___1bznO {\n display: flex;\n flex-wrap: wrap;\n flex: 1;\n gap: 0.2em 1em;\n align-items: baseline;\n}\n\n.CommandListItem-module__description___2RTG3 {\n white-space:pre-wrap;\n font-size: 0.9em;\n}\n\n.CommandListItem-module__type___1C7PR {\n max-width: 30%;\n}\n\n.CommandListItem-module__favouriteButton___3n3yV {\n visibility: hidden;\n border: none;\n background: none;\n cursor: pointer;\n transition: color 0.1s ease-in-out;\n color: var(--textSubtleLight);\n align-self: baseline;\n padding: 0 0.3rem;\n}\n\n.CommandListItem-module__favouriteButton___3n3yV:hover {\n color: var(--primaryBlue);\n}\n\n.CommandListItem-module__commandListItem___2u7xD:hover .CommandListItem-module__favouriteButton___3n3yV {\n visibility: visible;\n}\n\n.CommandListItem-module__isFavourite___KSM9p {\n display: block;\n color: var(--primaryBlue);\n visibility: visible;\n}\n",".CommandListing-module__results___23Rve {\n min-height: 0;\n transition: opacity 0.3s ease-in;\n overflow-y: auto;\n max-height: 60vh;\n height: 100%;\n}\n\n.CommandListing-module__results___23Rve h6 {\n color: var(--color-light-text);\n margin: 0.5rem;\n font-size: 0.9em;\n font-weight: normal;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.CommandListing-module__results___23Rve ul {\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: 0.5em;\n margin: 0;\n}\n\n.CommandListing-module__noResults___Mb89V {\n padding: 0.5rem;\n}\n\n.CommandListing-module__disabled___6gpPj {\n opacity: 0.5 !important;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n",".CommandResultsView-module__commandResultsView___xLqwb {\n max-width: 100%;\n overflow: auto;\n}\n\n.CommandResultsView-module__message___NhUkR {\n font-size: 1em;\n margin: 0 0 1em;\n}\n\n.CommandResultsView-module__results___1t6jB {\n min-height: 0;\n transition: opacity 0.3s ease-in;\n overflow-y: auto;\n max-height: 60vh;\n height: 100%;\n}\n\n.CommandResultsView-module__results___1t6jB h6 {\n color: var(--color-light-text);\n margin: 0.5rem;\n font-size: 0.9em;\n font-weight: normal;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.CommandResultsView-module__results___1t6jB ul {\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: 0.5em;\n margin: 0;\n}\n\n.CommandResultsView-module__noResults___2ksIF {\n padding: 0.5rem;\n}\n\n.CommandResultsView-module__disabled___OmNvX {\n opacity: 0.5 !important;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n",".ToggleButton-module__toggleButton___2wPs- {\n background-color: var(--grayDark);\n border: 1px solid var(--grayMedium);\n color: var(--textSubtleLight);\n border-radius: 6px;\n display: flex;\n align-items: center;\n gap: 0.5em;\n transition: 0.1s ease-out;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n padding: 2px 0.3rem 2px 0.5rem;\n cursor: pointer;\n line-height: 1.4em;\n}\n\n.ToggleButton-module__toggleButton___2wPs-:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.ToggleButton-module__toggleButton___2wPs-:not(:disabled):hover {\n background-color: var(--grayLighter);\n color: var(--textOnWhite);\n}\n\n.ToggleButton-module__toggleButtonActive___3bWD5 .ToggleButton-module__buttonIcon___UjFjw {\n background-color: var(--primaryBlue);\n}\n\n.ToggleButton-module__buttonIcon___UjFjw {\n background-color: var(--gray);\n border-radius: 3px;\n color: var(--textOnGray);\n font-size: 80%;\n padding: 1px 4px;\n transition: background-color 0.1s ease-out;\n}\n\n.ToggleButton-module__toggleButton___2wPs-:not(:disabled):hover .ToggleButton-module__buttonIcon___UjFjw {\n background-color: var(--primaryBlue);\n}\n",".CommandBarDialog-module__commandBar___1Hb5s {\n -webkit-backdrop-filter: blur(var(--dialog-blur));\n backdrop-filter: blur(var(--dialog-blur));\n background: var(--bar-background);\n border-radius: var(--border-radius-bar, 5);\n border: 1px solid var(--color-border);\n box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);\n color: white;\n display: flex;\n flex-direction: column;\n left: 50%;\n margin: 0;\n max-width: var(--bar-max-width);\n min-width: var(--bar-min-width);\n max-height: 90vh;\n overflow: hidden;\n position: absolute;\n padding: 0;\n top: 50%;\n translate: -50% -50%;\n width: var(--bar-width);\n pointer-events: all;\n transition: width 0.1s ease-out;\n}\n\n.CommandBarDialog-module__commandBar___1Hb5s.CommandBarDialog-module__hasResults___3iM8B {\n width: var(--bar-width-expanded);\n}\n\n.CommandBarDialog-module__commandBar___1Hb5s small {\n color: var(--color-light-text);\n font-size: 90%;\n}\n\n.CommandBarDialog-module__commandBar___1Hb5s ::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n}\n\n.CommandBarDialog-module__commandBar___1Hb5s ::-webkit-scrollbar-track {\n background-color: transparent;\n}\n\n.CommandBarDialog-module__commandBar___1Hb5s ::-webkit-scrollbar-thumb {\n background-color: var(--grayLight);\n}\n\n.CommandBarDialog-module__commandBar___1Hb5s ::-webkit-scrollbar-corner {\n background-color: var(--grayDark);\n}\n\n.CommandBarDialog-module__resultsWrap___2gd3U {\n display: grid;\n grid-template-rows: 0fr;\n transform-origin: top center;\n transition: grid-template-rows 0.2s ease-in;\n overflow: auto;\n}\n\n.CommandBarDialog-module__resultsWrap___2gd3U > * {\n opacity: 0;\n}\n\n.CommandBarDialog-module__resultsWrap___2gd3U.CommandBarDialog-module__expanded___jby7g {\n grid-template-rows: 1fr;\n}\n\n.CommandBarDialog-module__resultsWrap___2gd3U.CommandBarDialog-module__expanded___jby7g > * {\n opacity: 1;\n padding: 0.5rem;\n}\n\n.CommandBarDialog-module__resultsWrap___2gd3U.CommandBarDialog-module__split___66TVs {\n grid-template-columns: 1fr 1fr;\n}\n",".CommandBarUiPlugin-module__fullScreenLayer___1cUx4 {\n width: 100vw;\n height: 100vh;\n position: absolute;\n left: 0;\n top: 0;\n pointer-events: none;\n z-index: 9999;\n display: none;\n}\n\n.CommandBarUiPlugin-module__open___1Bjxj {\n display: block;\n}\n\n.CommandBarUiPlugin-module__commandBarToolbarComponent___1agRY {\n display: flex;\n align-items: center;\n}\n",".Theme-module__commandBarTheme___1Z1-S {\n --bar-min-width: 600px;\n --bar-max-width: 90vw;\n --bar-width: 30vw;\n --bar-width-expanded: 60vw;\n --bar-background: rgba(0, 0, 0, 0.8);\n --footer-background: rgba(0, 0, 0, 0.8);\n --color-shadow: rgba(255, 255, 255, 0.7);\n --color-light-text: rgba(255, 255, 255, 0.6);\n --color-light-text-hover: rgba(255, 255, 255, 0.8);\n --color-icon-bg: rgba(255, 255, 255, 0.2);\n --color-icon-bg-hover: rgba(255, 255, 255, 0.4);\n --color-border: rgba(255, 255, 255, 0.2);\n --color-item-highlighted: rgba(255, 255, 255, 0.15);\n --color-item-hover: rgba(255, 255, 255, 0.05);\n --border-radius-bar: 0.6rem;\n --border-radius-item: 0.4rem;\n --icon-size: 1.125em;\n --dialog-blur: 5px;\n\n /* Neos UI colors */\n --grayLight: #3f3f3f;\n --grayLighter: #eee;\n --grayMedium: #323232;\n --grayDark: #222;\n --gray: #555;\n --textSubtleLight: #adadad;\n --textOnGray: #fff;\n --textOnWhite: #252525;\n --primaryBlue: #00adee;\n --success: #00a338;\n --warn: #ff8700;\n}\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///../commandbar/src/components/IconWrapper/IconWrapper.module.css","webpack:///../commandbar/src/components/CommandBarFooter/Branding.module.css","webpack:///../commandbar/src/components/CommandBarFooter/CommandBarFooter.module.css","webpack:///../commandbar/src/components/SearchBox/SearchBox.module.css","webpack:///../commandbar/src/components/CommandBarHeader/CommandBarHeader.module.css","webpack:///../commandbar/src/components/CommandListItem/CommandListItem.module.css","webpack:///../commandbar/src/components/CommandList/CommandListing.module.css","webpack:///../commandbar/src/components/CommandResultsView/CommandResultsView.module.css","webpack:///../commandbar/src/components/ToggleButton/ToggleButton.module.css","webpack:///../commandbar/src/components/CommandBarDialog/CommandBarDialog.module.css","webpack:///./src/CommandBarUiPlugin.module.css","webpack:///../commandbar/src/Theme.module.css"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;ACzBA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"./Plugin.css","sourcesContent":[".IconWrapper-module__iconWrap___1Z3nD {\n width: var(--icon-size);\n max-height: var(--icon-size);\n display: inline-block;\n text-align: center;\n}\n\n.IconWrapper-module__iconWrap___1Z3nD svg {\n max-width: 100%;\n max-height: inherit;\n display: inline-block;\n}\n",".Branding-module__madeWithLove___2ibna {\n display: flex;\n text-decoration: none;\n gap: 0.5rem;\n}\n\n.Branding-module__madeWithLove___2ibna small {\n transition: color 0.1s ease-in-out;\n}\n\n.Branding-module__madeWithLove___2ibna:hover small {\n color: var(--color-light-text-hover);\n}\n\n.Branding-module__madeWithLove___2ibna svg {\n display: inline-block;\n width: var(--icon-size);\n height: auto;\n}\n",".CommandBarFooter-module__commandBarFooter___2mcre {\n border-top: 1px solid var(--color-border);\n background-color: var(--footer-background);\n padding: 0.8rem 1rem;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 1rem;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.CommandBarFooter-module__breadcrumb___1Ul24 {\n display: flex;\n gap: 1rem;\n --icon-size: 0.875em;\n}\n\n.CommandBarFooter-module__activity___2GXJU {\n display: flex;\n gap: 1rem;\n --icon-size: 0.875em;\n}\n\n.CommandBarFooter-module__activity___2GXJU svg {\n animation-name: CommandBarFooter-module__spinner___1mRmX;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n transform-origin: 50% 50%;\n display: inline-block;\n}\n\n@keyframes CommandBarFooter-module__spinner___1mRmX {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n",".SearchBox-module__searchBox___1SEtn {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n background: none;\n border: none;\n color: currentColor;\n font-size: 1.1em !important; /* Fix to prevent Neos.UI css from forcing the font size to 14px */\n font-weight: 300;\n outline: none;\n padding: 0.5rem;\n flex: 1;\n}\n\n.SearchBox-module__searchBox___1SEtn:disabled {\n color: var(--color-light-text);\n cursor: not-allowed;\n}\n\n.SearchBox-module__expandButton___B2jYv {\n position: absolute;\n padding: 0 1rem;\n height: 100%;\n right: 0;\n display: block;\n background: none;\n border: none;\n cursor: pointer;\n}\n\n.SearchBox-module__expandButton___B2jYv svg {\n color: var(--grayLighter);\n transition: color 0.1s ease-in-out;\n}\n\n.SearchBox-module__expandButton___B2jYv:hover svg {\n color: var(--primaryBlue);\n}\n\n.SearchBox-module__executeButton___3hg_l {\n position: absolute;\n padding: 0 1rem;\n height: 100%;\n right: 0;\n display: block;\n background: none;\n border: none;\n cursor: pointer;\n}\n\n.SearchBox-module__executeButton___3hg_l {\n color: var(--grayLighter);\n transition: color 0.1s ease-in-out;\n}\n\n.SearchBox-module__executeButton___3hg_l:hover svg {\n color: var(--primaryBlue);\n}\n\n.SearchBox-module__commandQueryDirty___s_CVX {\n color: var(--warn);\n}\n",".CommandBarHeader-module__commandBarHeader___3Y2hR {\n display: flex;\n align-items: center;\n gap: 1rem;\n padding: 0.3rem 0.5rem;\n border-bottom: 1px solid var(--color-border);\n position: relative;\n}\n\n.CommandBarHeader-module__backButton___1qIGu {\n padding: 0.3rem;\n background-color: var(--color-icon-bg);\n border-radius: 50%;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n color: white;\n cursor: pointer;\n transition: background-color 0.1s ease-in-out;\n display: flex;\n}\n\n.CommandBarHeader-module__backButton___1qIGu:hover {\n background-color: var(--color-icon-bg-hover);\n}\n",".CommandListItem-module__commandListItem___2u7xD {\n cursor: pointer;\n display: flex !important; /* Necessary due to the neos header bar styling */\n gap: 1em;\n padding: 0.4rem 0.6rem;\n align-items: baseline;\n border-radius: var(--border-radius-item);\n transition: background-color 0.1s ease-in-out, opacity 0.1s ease-in-out;\n background-color: transparent;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n --icon-size: 0.875em;\n}\n\n.CommandListItem-module__commandListItem___2u7xD:hover {\n background-color: var(--color-item-hover);\n}\n\n.CommandListItem-module__highlighted___1LR6R {\n background-color: var(--color-item-highlighted);\n}\n\n.CommandListItem-module__disabled___7wCym {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.CommandListItem-module__label___1bznO {\n display: flex;\n flex-wrap: wrap;\n flex: 1;\n gap: 0.2em 1em;\n align-items: baseline;\n}\n\n.CommandListItem-module__description___2RTG3 {\n white-space:pre-wrap;\n font-size: 0.9em;\n}\n\n.CommandListItem-module__type___1C7PR {\n max-width: 30%;\n}\n\n.CommandListItem-module__favouriteButton___3n3yV {\n visibility: hidden;\n border: none;\n background: none;\n cursor: pointer;\n transition: color 0.1s ease-in-out;\n color: var(--textSubtleLight);\n align-self: baseline;\n padding: 0 0.3rem;\n}\n\n.CommandListItem-module__favouriteButton___3n3yV:hover {\n color: var(--primaryBlue);\n}\n\n.CommandListItem-module__commandListItem___2u7xD:hover .CommandListItem-module__favouriteButton___3n3yV {\n visibility: visible;\n}\n\n.CommandListItem-module__isFavourite___KSM9p {\n display: block;\n color: var(--primaryBlue);\n visibility: visible;\n}\n",".CommandListing-module__results___23Rve {\n min-height: 0;\n transition: opacity 0.3s ease-in;\n overflow-y: auto;\n max-height: 60vh;\n height: 100%;\n}\n\n.CommandListing-module__results___23Rve h6 {\n color: var(--color-light-text);\n margin: 0.5rem;\n font-size: 0.9em;\n font-weight: normal;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.CommandListing-module__results___23Rve ul {\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: 0.5em;\n margin: 0;\n}\n\n.CommandListing-module__noResults___Mb89V {\n padding: 0.5rem;\n}\n\n.CommandListing-module__disabled___6gpPj {\n opacity: 0.5 !important;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n",".CommandResultsView-module__commandResultsView___xLqwb {\n max-width: 100%;\n overflow: auto;\n}\n\n.CommandResultsView-module__message___NhUkR {\n font-size: 1em;\n margin: 0 0 1em;\n}\n\n.CommandResultsView-module__results___1t6jB {\n min-height: 0;\n transition: opacity 0.3s ease-in;\n overflow-y: auto;\n max-height: 60vh;\n height: 100%;\n}\n\n.CommandResultsView-module__results___1t6jB h6 {\n color: var(--color-light-text);\n margin: 0.5rem;\n font-size: 0.9em;\n font-weight: normal;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.CommandResultsView-module__results___1t6jB ul {\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: 0.5em;\n margin: 0;\n}\n\n.CommandResultsView-module__noResults___2ksIF {\n padding: 0.5rem;\n}\n\n.CommandResultsView-module__disabled___OmNvX {\n opacity: 0.5 !important;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n",".ToggleButton-module__toggleButton___2wPs- {\n background-color: var(--grayDark);\n border: 1px solid var(--grayMedium);\n color: var(--textSubtleLight);\n border-radius: 6px;\n display: flex;\n align-items: center;\n gap: 0.5em;\n transition: 0.1s ease-out;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n padding: 2px 0.3rem 2px 0.5rem;\n cursor: pointer;\n line-height: 1.4em;\n}\n\n.ToggleButton-module__toggleButton___2wPs-:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.ToggleButton-module__toggleButton___2wPs-:not(:disabled):hover {\n background-color: var(--grayLighter);\n color: var(--textOnWhite);\n}\n\n.ToggleButton-module__toggleButtonActive___3bWD5 .ToggleButton-module__buttonIcon___UjFjw {\n background-color: var(--primaryBlue);\n}\n\n.ToggleButton-module__buttonIcon___UjFjw {\n background-color: var(--gray);\n border-radius: 3px;\n color: var(--textOnGray);\n font-size: 80%;\n padding: 1px 4px;\n transition: background-color 0.1s ease-out;\n}\n\n.ToggleButton-module__toggleButton___2wPs-:not(:disabled):hover .ToggleButton-module__buttonIcon___UjFjw {\n background-color: var(--primaryBlue);\n}\n",".CommandBarDialog-module__commandBar___1Hb5s {\n -webkit-backdrop-filter: blur(var(--dialog-blur));\n backdrop-filter: blur(var(--dialog-blur));\n background: var(--bar-background);\n border-radius: var(--border-radius-bar, 5);\n border: 1px solid var(--color-border);\n box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);\n color: white;\n display: flex;\n flex-direction: column;\n left: 50%;\n margin: 0;\n max-width: var(--bar-max-width);\n min-width: var(--bar-min-width);\n max-height: 90vh;\n overflow: hidden;\n position: absolute;\n padding: 0;\n top: 50%;\n translate: -50% -50%;\n width: var(--bar-width);\n pointer-events: all;\n transition: width 0.1s ease-out;\n}\n\n.CommandBarDialog-module__commandBar___1Hb5s.CommandBarDialog-module__hasResults___3iM8B {\n width: var(--bar-width-expanded);\n}\n\n.CommandBarDialog-module__commandBar___1Hb5s small {\n color: var(--color-light-text);\n font-size: 90%;\n}\n\n.CommandBarDialog-module__commandBar___1Hb5s ::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n}\n\n.CommandBarDialog-module__commandBar___1Hb5s ::-webkit-scrollbar-track {\n background-color: transparent;\n}\n\n.CommandBarDialog-module__commandBar___1Hb5s ::-webkit-scrollbar-thumb {\n background-color: var(--grayLight);\n}\n\n.CommandBarDialog-module__commandBar___1Hb5s ::-webkit-scrollbar-corner {\n background-color: var(--grayDark);\n}\n\n.CommandBarDialog-module__resultsWrap___2gd3U {\n display: grid;\n grid-template-rows: 0fr;\n transform-origin: top center;\n transition: grid-template-rows 0.2s ease-in;\n overflow: auto;\n}\n\n.CommandBarDialog-module__resultsWrap___2gd3U > * {\n opacity: 0;\n}\n\n.CommandBarDialog-module__resultsWrap___2gd3U.CommandBarDialog-module__expanded___jby7g {\n grid-template-rows: 1fr;\n}\n\n.CommandBarDialog-module__resultsWrap___2gd3U.CommandBarDialog-module__expanded___jby7g > * {\n opacity: 1;\n padding: 0.5rem;\n}\n",".CommandBarUiPlugin-module__fullScreenLayer___1cUx4 {\n width: 100vw;\n height: 100vh;\n position: absolute;\n left: 0;\n top: 0;\n pointer-events: none;\n z-index: 9999;\n display: none;\n}\n\n.CommandBarUiPlugin-module__open___1Bjxj {\n display: block;\n}\n\n.CommandBarUiPlugin-module__commandBarToolbarComponent___1agRY {\n display: flex;\n align-items: center;\n}\n",".Theme-module__commandBarTheme___1Z1-S {\n --bar-min-width: 600px;\n --bar-max-width: 90vw;\n --bar-width: 30vw;\n --bar-width-expanded: 60vw;\n --bar-background: rgba(0, 0, 0, 0.8);\n --footer-background: rgba(0, 0, 0, 0.8);\n --color-shadow: rgba(255, 255, 255, 0.7);\n --color-light-text: rgba(255, 255, 255, 0.6);\n --color-light-text-hover: rgba(255, 255, 255, 0.8);\n --color-icon-bg: rgba(255, 255, 255, 0.2);\n --color-icon-bg-hover: rgba(255, 255, 255, 0.4);\n --color-border: rgba(255, 255, 255, 0.2);\n --color-item-highlighted: rgba(255, 255, 255, 0.15);\n --color-item-hover: rgba(255, 255, 255, 0.05);\n --border-radius-bar: 0.6rem;\n --border-radius-item: 0.4rem;\n --icon-size: 1.125em;\n --dialog-blur: 5px;\n\n /* Neos UI colors */\n --grayLight: #3f3f3f;\n --grayLighter: #eee;\n --grayMedium: #323232;\n --grayDark: #222;\n --gray: #555;\n --textSubtleLight: #adadad;\n --textOnGray: #fff;\n --textOnWhite: #252525;\n --primaryBlue: #00adee;\n --success: #00a338;\n --warn: #ff8700;\n}\n"],"sourceRoot":""} \ No newline at end of file diff --git a/Resources/Public/Plugin.js b/Resources/Public/Plugin.js index a5abf65..c494f8d 100644 --- a/Resources/Public/Plugin.js +++ b/Resources/Public/Plugin.js @@ -1,3 +1,3 @@ /*! For license information please see Plugin.js.LICENSE.txt */ -!function(e){var t={};function __webpack_require__(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}__webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)__webpack_require__.d(n,r,function(t){return e[t]}.bind(null,r));return n},__webpack_require__.n=function(e){var t=e&&e.__esModule?function getDefault(){return e.default}:function getModuleExports(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=22)}([function(e,t,n){"use strict";var r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(3));e.exports=(0,r.default)("vendor")().React},function(e,t,n){"use strict";var r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(3));e.exports=(0,r.default)("vendor")().PropTypes},function(e,t,n){"use strict";var r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(3));e.exports=(0,r.default)("NeosProjectPackages")().NeosUiReduxStore},function(e,t,n){"use strict";var __read=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,s=n.call(e),f=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)f.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(o)throw o.error}}return f},__spreadArray=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,s=t.length;o{var n,r,o;return{...e,plugins:{...e.plugins,commandBar:{open:void 0!==(null===(n=t.payload)||void 0===n?void 0:n.open)?t.payload.open:!(null===(o=null===(r=e.plugins)||void 0===r?void 0:r.commandBar)||void 0===o?void 0:o.open)}}}}},{plugins:{commandBar:{open:!1}}}),E={commandBarOpen:e=>{var t,n;return null===(n=null===(t=e.plugins)||void 0===t?void 0:t.commandBar)||void 0===n?void 0:n.open},previewUrl:e=>{var t,n;return null===(n=null===(t=e.ui)||void 0===t?void 0:t.contentCanvas)||void 0===n?void 0:n.previewUrl}}},function(e,t,n){e.exports={searchBox:"SearchBox-module__searchBox___1SEtn",expandButton:"SearchBox-module__expandButton___B2jYv",executeButton:"SearchBox-module__executeButton___3hg_l",commandQueryDirty:"SearchBox-module__commandQueryDirty___s_CVX"}},function(e,t,n){e.exports={commandBarFooter:"CommandBarFooter-module__commandBarFooter___2mcre",breadcrumb:"CommandBarFooter-module__breadcrumb___1Ul24",activity:"CommandBarFooter-module__activity___2GXJU",spinner:"CommandBarFooter-module__spinner___1mRmX"}},function(e,t,n){e.exports={results:"CommandListing-module__results___23Rve",noResults:"CommandListing-module__noResults___Mb89V",disabled:"CommandListing-module__disabled___6gpPj"}},function(e,t,n){e.exports={commandResultsView:"CommandResultsView-module__commandResultsView___xLqwb",message:"CommandResultsView-module__message___NhUkR",results:"CommandResultsView-module__results___1t6jB",noResults:"CommandResultsView-module__noResults___2ksIF",disabled:"CommandResultsView-module__disabled___OmNvX"}},function(e,t,n){e.exports={toggleButton:"ToggleButton-module__toggleButton___2wPs-",toggleButtonActive:"ToggleButton-module__toggleButtonActive___3bWD5",buttonIcon:"ToggleButton-module__buttonIcon___UjFjw"}},function(e,t,n){e.exports={fullScreenLayer:"CommandBarUiPlugin-module__fullScreenLayer___1cUx4",open:"CommandBarUiPlugin-module__open___1Bjxj",commandBarToolbarComponent:"CommandBarUiPlugin-module__commandBarToolbarComponent___1agRY"}},function(e,t,n){"use strict";var r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(3));e.exports=(0,r.default)("vendor")().reduxActions},function(e,t,n){"use strict";var r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(3));e.exports=(0,r.default)("vendor")().reactRedux},function(e,t,n){e.exports={commandBarHeader:"CommandBarHeader-module__commandBarHeader___3Y2hR",backButton:"CommandBarHeader-module__backButton___1qIGu"}},function(e,t,n){"use strict";var r,o=(r=function extendStatics(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),__importDefault=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var s=__importDefault(n(28)),f=__importDefault(n(29)),E=function(e){function SynchronousRegistry(t){var n=e.call(this,t)||this;return n._registry=[],n}return o(SynchronousRegistry,e),SynchronousRegistry.prototype.set=function(e,t,n){if(void 0===n&&(n=0),"string"!=typeof e)throw new Error("Key must be a string");if("string"!=typeof n&&"number"!=typeof n)throw new Error("Position must be a string or a number");var r={key:e,value:t};n&&(r.position=n);var o=this._registry.findIndex((function(t){return t.key===e}));return-1===o?this._registry.push(r):this._registry[o]=r,t},SynchronousRegistry.prototype.get=function(e){if("string"!=typeof e)return console.error("Key must be a string"),null;var t=this._registry.find((function(t){return t.key===e}));return t?t.value:null},SynchronousRegistry.prototype._getChildrenWrapped=function(e){var t=this._registry.filter((function(t){return 0===t.key.indexOf(e+"/")}));return(0,f.default)(t)},SynchronousRegistry.prototype.getChildrenAsObject=function(e){var t={};return this._getChildrenWrapped(e).forEach((function(e){t[e.key]=e.value})),t},SynchronousRegistry.prototype.getChildren=function(e){return this._getChildrenWrapped(e).map((function(e){return e.value}))},SynchronousRegistry.prototype.has=function(e){return"string"!=typeof e?(console.error("Key must be a string"),!1):Boolean(this._registry.find((function(t){return t.key===e})))},SynchronousRegistry.prototype._getAllWrapped=function(){return(0,f.default)(this._registry)},SynchronousRegistry.prototype.getAllAsObject=function(){var e={};return this._getAllWrapped().forEach((function(t){e[t.key]=t.value})),e},SynchronousRegistry.prototype.getAllAsList=function(){return this._getAllWrapped().map((function(e){return Object.assign({id:e.key},e.value)}))},SynchronousRegistry}(s.default);t.default=E},function(e,t,n){"use strict";var r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(3));e.exports=(0,r.default)("NeosProjectPackages")().NeosUiDecorators},function(e,t,n){"use strict";var r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(3));e.exports=(0,r.default)("NeosProjectPackages")().ReactUiComponents},function(e,t,n){e.exports={iconWrap:"IconWrapper-module__iconWrap___1Z3nD"}},function(e,t,n){e.exports={madeWithLove:"Branding-module__madeWithLove___2ibna"}},function(e,t,n){e.exports={commandBarTheme:"Theme-module__commandBarTheme___1Z1-S"}},function(e,t,n){"use strict";n(23)},function(e,t,n){"use strict";var r=n(24),o=_interopRequireDefault(r),s=n(6),f=_interopRequireDefault(n(32));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(0,o.default)("Shel.Neos.CommandBar:CommandBar",{},(function(e,t){t.frontendConfiguration["Shel.Neos.CommandBar:CommandBar"].enabled&&(e.set("Shel.Neos.CommandBar",new r.SynchronousRegistry("\n # Shel.Neos.CommandBar 3rd party commands\n ")),e.get("containers").set("PrimaryToolbar/Middle/CommandBar",f.default),e.get("reducers").set("Shel.Neos.CommandBar",{reducer:s.reducer}))}))},function(e,t,n){"use strict";var __importDefault=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.SynchronousMetaRegistry=t.SynchronousRegistry=t.readFromConsumerApi=t.createConsumerApi=void 0;var r=__importDefault(n(25));t.createConsumerApi=r.default;var o=__importDefault(n(3));t.readFromConsumerApi=o.default;var s=n(27);t.SynchronousRegistry=s.SynchronousRegistry,t.SynchronousMetaRegistry=s.SynchronousMetaRegistry,t.default=(0,o.default)("manifest")},function(e,t,n){"use strict";var __importDefault=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var r=__importDefault(n(26)),o=function createReadOnlyValue(e){return{value:e,writable:!1,enumerable:!1,configurable:!0}};t.default=function createConsumerApi(e,t){var n={};Object.keys(t).forEach((function(e){Object.defineProperty(n,e,o(t[e]))})),Object.defineProperty(n,"@manifest",o((0,r.default)(e))),Object.defineProperty(window,"@Neos:HostPluginAPI",o(n))}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return function(t,n,r){var o;e.push(((o={})[t]={options:n,bootstrap:r},o))}}},function(e,t,n){"use strict";var __importDefault=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.SynchronousMetaRegistry=t.SynchronousRegistry=void 0;var r=__importDefault(n(16));t.SynchronousRegistry=r.default;var o=__importDefault(n(31));t.SynchronousMetaRegistry=o.default},function(e,t,n){"use strict";t.__esModule=!0;var r=function r(e){this.SERIAL_VERSION_UID="d8a5aa78-978e-11e6-ae22-56b6b6499611",this.description=e};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r=n(30);t.default=function positionalArraySorter(e,t,n){var o,s,f,E,C,R,I,S,O,T,A,P,D,N;void 0===t&&(t="position"),void 0===n&&(n="key");var M="string"==typeof t?function(e){return e[t]}:t,U={},L={},x={},H={},k={},B={};e.forEach((function(e,t){var r=e[n]?e[n]:String(t);U[r]=t;var o=M(e),s=String(o||t),f=!1;if(s.startsWith("start")){var E=(C=s.match(/start\s+(\d+)/))&&C[1]?Number(C[1]):0;x[E]||(x[E]=[]),x[E].push(r)}else if(s.startsWith("end")){var C;E=(C=s.match(/end\s+(\d+)/))&&C[1]?Number(C[1]):0;H[E]||(H[E]=[]),H[E].push(r)}else if(s.startsWith("before")){if(I=s.match(/before\s+(\S+)(\s+(\d+))?/)){var R=I[1];E=I[3]?Number(I[3]):0;k[R]||(k[R]={}),k[R][E]||(k[R][E]=[]),k[R][E].push(r)}else f=!0}else if(s.startsWith("after")){var I;if(I=s.match(/after\s+(\S+)(\s+(\d+))?/)){R=I[1],E=I[3]?Number(I[3]):0;B[R]||(B[R]={}),B[R][E]||(B[R][E]=[]),B[R][E].push(r)}else f=!0}else f=!0;if(f){var S=parseFloat(s);!isNaN(S)&&isFinite(S)||(S=t),L[S]||(L[S]=[]),L[S].push(r)}}));var G=[],F=[],V=[],W=[],q=function sortedWeights(e,t){var n=Object.keys(e).map((function(e){return Number(e)})).sort((function(e,t){return e-t}));return t?n:n.reverse()},X=function addToResults(e,t){e.forEach((function(e){var n,o,s,f;if(!(W.indexOf(e)>=0)){if(W.push(e),k[e]){var E=q(k[e],!0);try{for(var C=r.__values(E),R=C.next();!R.done;R=C.next()){var I=R.value;addToResults(k[e][I],t)}}catch(e){n={error:e}}finally{try{R&&!R.done&&(o=C.return)&&o.call(C)}finally{if(n)throw n.error}}}if(t.push(e),B[e]){var S=q(B[e],!1);try{for(var O=r.__values(S),T=O.next();!T.done;T=O.next()){I=T.value;addToResults(B[e][I],t)}}catch(e){s={error:e}}finally{try{T&&!T.done&&(f=O.return)&&f.call(O)}finally{if(s)throw s.error}}}}}))};try{for(var Q=r.__values(q(x,!1)),z=Q.next();!z.done;z=Q.next()){var Y=z.value;X(x[Y],G)}}catch(e){o={error:e}}finally{try{z&&!z.done&&(s=Q.return)&&s.call(Q)}finally{if(o)throw o.error}}try{for(var $=r.__values(q(L,!0)),K=$.next();!K.done;K=$.next()){Y=K.value;X(L[Y],F)}}catch(e){f={error:e}}finally{try{K&&!K.done&&(E=$.return)&&E.call($)}finally{if(f)throw f.error}}try{for(var Z=r.__values(q(H,!0)),J=Z.next();!J.done;J=Z.next()){Y=J.value;X(H[Y],V)}}catch(e){C={error:e}}finally{try{J&&!J.done&&(R=Z.return)&&R.call(Z)}finally{if(C)throw C.error}}try{for(var ee=r.__values(Object.keys(k)),te=ee.next();!te.done;te=ee.next()){var ne=te.value;if(!(W.indexOf(ne)>=0))try{for(var ae=(O=void 0,r.__values(q(k[ne],!1))),re=ae.next();!re.done;re=ae.next()){Y=re.value;X(k[ne][Y],G)}}catch(e){O={error:e}}finally{try{re&&!re.done&&(T=ae.return)&&T.call(ae)}finally{if(O)throw O.error}}}}catch(e){I={error:e}}finally{try{te&&!te.done&&(S=ee.return)&&S.call(ee)}finally{if(I)throw I.error}}try{for(var oe=r.__values(Object.keys(B)),se=oe.next();!se.done;se=oe.next()){ne=se.value;if(!(W.indexOf(ne)>=0))try{for(var ie=(D=void 0,r.__values(q(B[ne],!1))),ce=ie.next();!ce.done;ce=ie.next()){Y=ce.value;X(B[ne][Y],F)}}catch(e){D={error:e}}finally{try{ce&&!ce.done&&(N=ie.return)&&N.call(ie)}finally{if(D)throw D.error}}}}catch(e){A={error:e}}finally{try{se&&!se.done&&(P=oe.return)&&P.call(oe)}finally{if(A)throw A.error}}return r.__spread(G,F,V).map((function(e){return U[e]})).map((function(t){return e[t]}))}},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return __extends})),n.d(t,"__assign",(function(){return __assign})),n.d(t,"__rest",(function(){return __rest})),n.d(t,"__decorate",(function(){return __decorate})),n.d(t,"__param",(function(){return __param})),n.d(t,"__metadata",(function(){return __metadata})),n.d(t,"__awaiter",(function(){return __awaiter})),n.d(t,"__generator",(function(){return __generator})),n.d(t,"__createBinding",(function(){return __createBinding})),n.d(t,"__exportStar",(function(){return __exportStar})),n.d(t,"__values",(function(){return __values})),n.d(t,"__read",(function(){return __read})),n.d(t,"__spread",(function(){return __spread})),n.d(t,"__spreadArrays",(function(){return __spreadArrays})),n.d(t,"__await",(function(){return __await})),n.d(t,"__asyncGenerator",(function(){return __asyncGenerator})),n.d(t,"__asyncDelegator",(function(){return __asyncDelegator})),n.d(t,"__asyncValues",(function(){return __asyncValues})),n.d(t,"__makeTemplateObject",(function(){return __makeTemplateObject})),n.d(t,"__importStar",(function(){return __importStar})),n.d(t,"__importDefault",(function(){return __importDefault})),n.d(t,"__classPrivateFieldGet",(function(){return __classPrivateFieldGet})),n.d(t,"__classPrivateFieldSet",(function(){return __classPrivateFieldSet}));var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function __extends(e,t){function __(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function __assign(e){for(var t,n=1,r=arguments.length;n=0;E--)(o=e[E])&&(f=(s<3?o(f):s>3?o(t,n,f):o(t,n))||f);return s>3&&f&&Object.defineProperty(t,n,f),f}function __param(e,t){return function(n,r){t(n,r,e)}}function __metadata(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function __awaiter(e,t,n,r){return new(n||(n=Promise))((function(o,s){function fulfilled(e){try{step(r.next(e))}catch(e){s(e)}}function rejected(e){try{step(r.throw(e))}catch(e){s(e)}}function step(e){e.done?o(e.value):function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(fulfilled,rejected)}step((r=r.apply(e,t||[])).next())}))}function __generator(e,t){var n,r,o,s,f={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function verb(s){return function(E){return function step(s){if(n)throw new TypeError("Generator is already executing.");for(;f;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return f.label++,{value:s[1],done:!1};case 5:f.label++,r=s[1],s=[0];continue;case 7:s=f.ops.pop(),f.trys.pop();continue;default:if(!(o=f.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){f=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,s=n.call(e),f=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)f.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(o)throw o.error}}return f}function __spread(){for(var e=[],t=0;t1||resume(e,t)}))})}function resume(e,t){try{!function step(e){e.value instanceof __await?Promise.resolve(e.value.v).then(fulfill,reject):settle(s[0][2],e)}(o[e](t))}catch(e){settle(s[0][3],e)}}function fulfill(e){resume("next",e)}function reject(e){resume("throw",e)}function settle(e,t){e(t),s.shift(),s.length&&resume(s[0][0],s[0][1])}}function __asyncDelegator(e){var t,n;return t={},verb("next"),verb("throw",(function(e){throw e})),verb("return"),t[Symbol.iterator]=function(){return this},t;function verb(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:__await(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function __asyncValues(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=__values(e),t={},verb("next"),verb("throw"),verb("return"),t[Symbol.asyncIterator]=function(){return this},t);function verb(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function settle(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function __makeTemplateObject(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function __importStar(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function __importDefault(e){return e&&e.__esModule?e:{default:e}}function __classPrivateFieldGet(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function __classPrivateFieldSet(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";var r,o=(r=function extendStatics(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),__importDefault=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var s=function(e){function SynchronousMetaRegistry(){return null!==e&&e.apply(this,arguments)||this}return o(SynchronousMetaRegistry,e),SynchronousMetaRegistry.prototype.set=function(t,n){if("d8a5aa78-978e-11e6-ae22-56b6b6499611"!==n.SERIAL_VERSION_UID)throw new Error("You can only add registries to a meta registry");return e.prototype.set.call(this,t,n)},SynchronousMetaRegistry}(__importDefault(n(16)).default);t.default=s},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"getPreferences",(function(){return getPreferences})),n.d(r,"setFavouriteCommands",(function(){return setFavouriteCommands})),n.d(r,"addRecentCommand",(function(){return addRecentCommand})),n.d(r,"addRecentDocument",(function(){return addRecentDocument}));var o={};n.r(o),n.d(o,"getCommands",(function(){return getCommands}));var s={};n.r(s),n.d(s,"searchNeosDocs",(function(){return searchNeosDocs}));var f={};n.r(f),n.d(f,"searchNeosPackages",(function(){return searchNeosPackages}));var E={};n.r(E),n.d(E,"searchNodes",(function(){return searchNodes}));var C=n(0),R=n.n(C),I=n(14),S=n(1),O=n.n(S),T=n(17),A=n(2),P=n(18);function useFunctionRef(e){const t=Object(C.useRef)(e);return t.current=e,t}function i(){throw new Error("Cycle detected")}function signals_core_module_t(){if(M>1)M--;else{for(var e,t=!1;void 0!==N;){var n=N;for(N=void 0,U++;void 0!==n;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&d(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(U=0,M--,t)throw e}}function h(e){if(M>0)return e();M++;try{return e()}finally{signals_core_module_t()}}var D=void 0,N=void 0,M=0,U=0,L=0;function v(e){if(void 0!==D){var t=e.n;if(void 0===t||t.t!==D)return t={i:0,S:e,p:D.s,n:void 0,t:D,e:void 0,x:void 0,r:t},void 0!==D.s&&(D.s.n=t),D.s=t,e.n=t,32&D.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=D.s,t.n=void 0,D.s.n=t,D.s=t),t}}function signals_core_module_e(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}function u(e){return new signals_core_module_e(e)}function d(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function c(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function a(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function l(e){signals_core_module_e.call(this,void 0),this.x=e,this.s=void 0,this.g=L-1,this.f=4}function w(e){return new l(e)}function y(e){var t=e.u;if(e.u=void 0,"function"==typeof t){M++;var n=D;D=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,_(e),t}finally{D=n,signals_core_module_t()}}}function _(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,y(e)}function g(e){if(D!==this)throw new Error("Out-of-order effect");a(this),D=e,this.f&=-2,8&this.f&&_(this),signals_core_module_t()}function b(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}function p(e){var t=new b(e);try{t.c()}catch(e){throw t.d(),e}return t.d.bind(t)}signals_core_module_e.prototype.h=function(){return!0},signals_core_module_e.prototype.S=function(e){this.t!==e&&void 0===e.e&&(e.x=this.t,void 0!==this.t&&(this.t.e=e),this.t=e)},signals_core_module_e.prototype.U=function(e){if(void 0!==this.t){var t=e.e,n=e.x;void 0!==t&&(t.x=n,e.e=void 0),void 0!==n&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}},signals_core_module_e.prototype.subscribe=function(e){var t=this;return p((function(){var n=t.value,r=32&this.f;this.f&=-33;try{e(n)}finally{this.f|=r}}))},signals_core_module_e.prototype.valueOf=function(){return this.value},signals_core_module_e.prototype.toString=function(){return this.value+""},signals_core_module_e.prototype.peek=function(){return this.v},Object.defineProperty(signals_core_module_e.prototype,"value",{get:function(){var e=v(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){U>100&&i(),this.v=e,this.i++,L++,M++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{signals_core_module_t()}}}}),(l.prototype=new signals_core_module_e).h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===L)return!0;if(this.g=L,this.f|=1,this.i>0&&!d(this))return this.f&=-2,!0;var e=D;try{c(this),D=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return D=e,a(this),this.f&=-2,!0},l.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}signals_core_module_e.prototype.S.call(this,e)},l.prototype.U=function(e){if(void 0!==this.t&&(signals_core_module_e.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},l.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},l.prototype.peek=function(){if(this.h()||i(),16&this.f)throw this.v;return this.v},Object.defineProperty(l.prototype,"value",{get:function(){1&this.f&&i();var e=v(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),b.prototype.c=function(){var e=this.S();try{8&this.f||void 0===this.x||(this.u=this.x())}finally{e()}},b.prototype.S=function(){1&this.f&&i(),this.f|=1,this.f&=-9,y(this),c(this),M++;var e=D;return D=this,g.bind(this,e)},b.prototype.N=function(){2&this.f||(this.f|=2,this.o=N,N=this)},b.prototype.d=function(){this.f|=8,1&this.f||_(this)};var x,H=R.a.createElement;R.a.createElement=function(e,t){if("string"==typeof e&&t)for(var n in t){var r=t[n];"children"!==n&&r instanceof signals_core_module_e&&(t[n]=r.value)}return H.apply(this,arguments)};var k=new WeakMap;function signals_module_p(e){x&&x(),x=e&&e.S()}var B=H("a").$$typeof;Object.defineProperties(signals_core_module_e.prototype,{$$typeof:{configurable:!0,value:B},type:{configurable:!0,value:function(e){return e.data.value}},props:{configurable:!0,get:function(){return{data:this}}},ref:{configurable:!0,value:null}});var G,F=!1,m=function(){return{}};Object.defineProperty(C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher,"current",{get:function(){return G},set:function(e){if(G=e,!F)if(e&&!function(e){var t=V.get(e);if(void 0!==t)return t;var n=e.useCallback.length<2||/Invalid/.test(e.useCallback);return V.set(e,n),n}(e)){F=!0;var t=e.useReducer(m,{})[1];F=!1;var n=k.get(t);n?n.c=t:(n=function(e){var t;return p((function(){t=this})),t.c=e,t}(t),k.set(t,n)),signals_module_p(n)}else signals_module_p()}});var V=new Map;function signals_module_h(e){return Object(C.useMemo)((function(){return u(e)}),[])}function signals_module_y(e){var t=Object(C.useRef)(e);return t.current=e,Object(C.useMemo)((function(){return w((function(){return t.current()}))}),[])}function j(e){var t=Object(C.useRef)(e);t.current=e,Object(C.useEffect)((function(){return p((function(){return t.current()}))}),[])}function flattenCommands(e,t=null){return Object.keys(e).reduce((n,r)=>{const{icon:o,description:s,name:f,subCommands:E,action:C,canHandleQueries:R,closeOnExecute:I,category:S,executeManually:O}=e[r],T=t?`${t}.${r}`:r,A=E?Object.keys(E).map(e=>`${T}.${e}`):[];return n[T]={id:T,name:f,icon:o,description:s,action:C,canHandleQueries:R,subCommandIds:A,parentId:t,closeOnExecute:I,category:S,executeManually:O},A.length>0?{...n,...flattenCommands(E,T)}:n},{})}const W="%c[COMMANDBAR]";var q={ok:(e,...t)=>console.log(W,"color: green",e,...t),error:(e,...t)=>console.log(W,"color: red",e,...t),warn:(e,...t)=>console.warn(W,"color: orange",e,...t),debug:()=>null};function clamp(e,t,n){return Math.max(t,Math.min(n,e))}const X=new Intl.Collator("en").compare,Q=/(?:\s+|^)-[a-z\d]+/gi,z={interSplit:"[^A-Za-z0-9']+",intraSplit:"[a-z][A-Z]",intraBound:"[A-Za-z][0-9]|[0-9][A-Za-z]|[a-z][A-Z]",interLft:0,interRgt:0,interChars:".",interIns:1/0,intraChars:"[a-z\\d']",intraIns:0,intraContr:"'[a-z]{1,2}\\b",intraMode:0,intraSlice:[1,1/0],intraSub:0,intraTrn:0,intraDel:0,intraFilt:(e,t,n)=>!0,sort:(e,t,n)=>{let{idx:r,chars:o,terms:s,interLft2:f,interLft1:E,start:C,intraIns:R,interIns:I}=e;return r.map((e,t)=>t).sort((e,n)=>o[n]-o[e]||R[e]-R[n]||s[n]+f[n]+.5*E[n]-(s[e]+f[e]+.5*E[e])||I[e]-I[n]||C[e]-C[n]||X(t[r[e]],t[r[n]]))}},lazyRepeat=(e,t)=>0==t?"":1==t?e+"??":t==1/0?e+"*?":e+`{0,${t}}?`;function uFuzzy(e){e=Object.assign({},z,e);const{interLft:t,interRgt:n,intraMode:r,intraSlice:o,intraIns:s,intraSub:f,intraTrn:E,intraDel:C,intraContr:R,intraSplit:I,interSplit:S,intraBound:O,intraChars:T}=e;let{intraRules:A}=e;null==A&&(A=e=>{let t=z.intraSlice,n=0,r=0,R=0,I=0,S=e.length;return S<=4?S>=3&&(R=Math.min(E,1),4==S&&(n=Math.min(s,1))):(t=o,n=s,r=f,R=E,I=C),{intraSlice:t,intraIns:n,intraSub:r,intraTrn:R,intraDel:I}});let P=!!I,D=new RegExp(I,"g"),N=new RegExp(S,"g"),M=new RegExp("^"+S+"|"+S+"$","g"),U=new RegExp(R,"gi");const split=e=>(e=e.replace(M,"").toLowerCase(),P&&(e=e.replace(D,e=>e[0]+" "+e[1])),e.split(N).filter(e=>""!=e)),prepQuery=(o,f=0,E=!1)=>{let C=split(o);if(0==C.length)throw"Empty needle!";let R,I=Array(C.length).fill("");if(C=C.map((e,t)=>e.replace(U,e=>(I[t]=e,""))),1==r)R=C.map((e,t)=>{let{intraSlice:n,intraIns:r,intraSub:o,intraTrn:s,intraDel:f}=A(e);if(r+o+s+f==0)return e+I[t];let[E,C]=n,R=e.slice(0,E),S=e.slice(C),O=e.slice(E,C);1==r&&1==R.length&&R!=O[0]&&(R+="(?!"+R+")");let P=O.length,D=[];if(o)for(let e=0;e0&&(e=")("+e+")("),R=C.map((t,n)=>t.split("").map((e,t,n)=>(1==s&&0==t&&n.length>1&&e[t]!=e[t+1]&&(e+="(?!"+e+")"),e)).join(e)+I[n])}let S=2==t?"(?:\\b|_)":"",O=2==n?"(?:\\b|_)":"",P=O+lazyRepeat(e.interChars,e.interIns)+S;return f>0?E?R=S+"("+R.join(")"+O+"|"+S+"(")+")"+O:(R="("+R.join(")("+P+")(")+")",R="(.?"+S+")"+R+"("+O+".*)"):(R=R.join(P),R=S+R+O),[new RegExp(R,"i"),C,I]},filter=(e,t,n)=>{let r=[],[o]=prepQuery(t);if(null!=n)for(let t=0;t{let[f,E,C]=prepQuery(s,1),[R]=prepQuery(s,2),I=E.length,S=r.length,O=Array(S).fill(0),T={idx:Array(S),start:O.slice(),chars:O.slice(),terms:O.slice(),interIns:O.slice(),intraIns:O.slice(),interLft2:O.slice(),interRgt2:O.slice(),interLft1:O.slice(),interRgt1:O.slice(),ranges:Array(S)},A=1==t||1==n,P=0;for(let s=0;s=R){let e=O[o+1].toLowerCase().indexOf(f);e>-1&&(X.push(N,e,R),N+=refineMatch(O,o,e,R),s=f,T=R,P=!0,0==r&&(D=N))}if(A||P){let e=N-1,r=N+T,E=!0,C=!0;if(-1==e||x.test(S[e]))P&&U++;else{if(2==t){M=!0;break}if(L&&H.test(S[e]+S[e+1]))P&&k++;else{if(1==t){let e=O[o+1],t=N+T;if(e.length>=R){let n,r=0,E=!1,C=new RegExp(f,"ig");for(;n=C.exec(e);){r=n.index;let e=t+r,o=e-1;if(-1==o||x.test(S[o])){U++,E=!0;break}if(H.test(S[o]+S[e])){k++,E=!0;break}}if(E){X.push(N,r,R),N+=refineMatch(O,o,r,R),s=f,T=R,P=!0;break}}M=!0;break}E=!1}}if(r==S.length||x.test(S[r]))P&&B++;else{if(2==n){M=!0;break}if(L&&H.test(S[r-1]+S[r]))P&&G++;else{if(1==n){M=!0;break}C=!1}}P&&(F+=R,E&&C&&V++)}if(T>R&&(q+=T-R),r>0&&(W+=O[o-1].length),!e.intraFilt(f,s,N)){M=!0;break}r0?0:1/0,I=E-3;for(let r=2;r0&&(t.push(o,f),o=f=n)}f>o&&t.push(o,f),P++}}if(P{let o=e[t]+e[t+1].slice(0,n);return e[t-1]+=o,e[t]=e[t+1].slice(n,n+r),e[t+1]=e[t+1].slice(n+r),o.length};return{search:(...t)=>((t,n,r=!1,o=1e3,s)=>{let f,E=null,C=null,R=[];if(n=n.replace(Q,e=>(R.push(e.trim().slice(1)),"")),R.length>0&&(f=new RegExp(R.join("|"),"i"),""==n.trim())){let e=[];for(let n=0;n1){let n=e.slice().sort((e,t)=>t.length-e.length);for(let e=0;ee.join(" ")),C=[];let r=new Set;for(let e=0;e!r.has(e)),o=filter(t,E[e],n);for(let e=0;e0?s:filter(t,n)]);let I=null,S=null;if(R.length>0&&(C=C.map(e=>e.filter(e=>!f.test(t[e])))),C.reduce((e,t)=>e+t.length,0)<=o){I={},S=[];for(let n=0;n0)for(let e=0;e{let e={A:"ÁÀÃÂÄĄ",a:"áàãâäą",E:"ÉÈÊËĖ",e:"éèêëę",I:"ÍÌÎÏĮ",i:"íìîïį",O:"ÓÒÔÕÖ",o:"óòôõö",U:"ÚÙÛÜŪŲ",u:"úùûüūų",C:"ÇČ",c:"çč",N:"Ñ",n:"ñ",S:"Š",s:"š"},t=new Map,n="";for(let r in e)e[r].split("").forEach(e=>{n+=e,t.set(e,r)});let r=new RegExp(`[${n}]`,"g"),replacer=e=>t.get(e);return e=>{if("string"==typeof e)return e.replace(r,replacer);let t=Array(e.length);for(let n=0;nt?`${e}`:e,_append=(e,t)=>e+t;uFuzzy.latinize=Y,uFuzzy.permute=e=>permute([...Array(e.length).keys()]).sort((e,t)=>{for(let n=0;nt.map(t=>e[t])),uFuzzy.highlight=function highlight(e,t,n=_mark,r="",o=_append){let s=o(r,n(e.substring(0,t[0]),!1));r=null!==s?s:r;for(let f=0;ft.parentId===e||!e&&o.includes(t.id)),!t)return s.sort((t,n)=>function sortCommands(e,t,n,r){const o=r.includes(e.id),s=r.includes(t.id);if(o&&!s)return-1;if(!o&&s)return 1;if(o&&s)return r.indexOf(e.id)-r.indexOf(t.id);const f=n.includes(e.id),E=n.includes(t.id);return f&&!E?-1:!f&&E?1:e.name.localeCompare(t.name)}(t,n,r,e?[]:o)).map(e=>e.id);const f=s.map(({name:e,description:t})=>e+" "+t),[E,,C]=$.search(f,t.toLowerCase());return C.map(e=>s[E[e]].id)}(t.selectedCommandGroup,t.searchWord,t.commands,t.favouriteCommands,t.recentCommands);break;case J.HIGHLIGHT_NEXT_COMMAND:t.highlightedItem=clamp(t.highlightedItem+1,0,t.availableCommandIds.length-1);break;case J.HIGHLIGHT_PREVIOUS_COMMAND:t.highlightedItem=clamp(t.highlightedItem-1,0,t.availableCommandIds.length-1);break;case J.HIGHLIGHT_NEXT_OPTION:t.highlightedOption=clamp(t.highlightedOption+1,0,Object.keys(t.result.options).length-1);break;case J.HIGHLIGHT_PREVIOUS_OPTION:t.highlightedOption=clamp(t.highlightedOption-1,0,Object.keys(t.result.options).length-1);break;case J.SET_SEARCH_WORD:assert(n.type===Z.UPDATE_SEARCH),t.searchWord=n.searchWord;break;case J.SET_COMMAND_QUERY:assert(n.type===Z.UPDATE_COMMAND_QUERY),t.commandQuery=n.commandQuery,t.commandQueryDirty=!0;break;case J.EXPAND:t.expanded=!0;break;case J.SET_ACTIVE_COMMAND:assert(n.type===Z.EXECUTE_COMMAND),t.activeCommandId=n.commandId,t.activeCommandMessage=n.message;break;case J.UNSET_ACTIVE_COMMAND:t.activeCommandId=null,t.activeCommandMessage=null;break;case J.UPDATE_RESULT:assert(n.type===Z.UPDATE_RESULT),assert("boolean"==typeof n.result.success),t.result={options:{},message:"Command executed",view:null,success:!1,...n.result},t.resultCommandId=t.activeCommandId,t.commandQueryDirty=!1;break;case J.RESET_OPTION_HIGHLIGHT:t.highlightedOption=0;break;case J.RESET_SEARCH_OR_LEAVE_GROUP:t.commandQuery?t.commandQuery="":t.searchWord?t.searchWord="":t.selectedCommandGroup=t.selectedCommandGroup?t.commands[t.selectedCommandGroup].parentId:null;break;case J.UNSET_RESULT:t.result=null,t.resultCommandId=null,t.commandQuery="";break;case J.LEAVE_GROUP:t.selectedCommandGroup=t.selectedCommandGroup?t.commands[t.selectedCommandGroup].parentId:null;break;case J.SET_GROUP:assert(n.type===Z.SELECT_GROUP),t.selectedCommandGroup=n.commandId;break;case J.ADD_FAVOURITE:assert(n.type===Z.ADD_FAVOURITE),t.favouriteCommands.includes(n.commandId)||(t.favouriteCommands=[...t.favouriteCommands,n.commandId]);break;case J.REMOVE_FAVOURITE:assert(n.type===Z.REMOVE_FAVOURITE),t.favouriteCommands=t.favouriteCommands.filter(e=>e!==n.commandId);break;case J.ADD_RECENTLY_USED:if(assert(n.type===Z.EXECUTE_COMMAND),!t.commands[n.commandId].action)break;t.recentCommands.includes(n.commandId)&&(t.recentCommands=t.recentCommands.filter(e=>e!==n.commandId)),t.recentCommands.unshift(n.commandId),t.recentCommands.length>5&&t.recentCommands.pop();break;default:throw Error(`Action ${e} not implemented`)}}const commandBarReducer=(e,t)=>function transition(e,t,n){var r,o,s;let f=null!==(o=null===(r=ee.states[e.status].on)||void 0===r?void 0:r[t.type])&&void 0!==o?o:null;f||(q.error(`No transition found for event "${t.type}" in state "${e.status}"`),f={target:e.status});const E={...e,status:"string"==typeof f?f:f.target};return n&&"object"==typeof f&&(null===(s=f.actions)||void 0===s||s.forEach(e=>n(e,E,t))),q.debug(`Transitioned from "${e.status}" to "${E.status}" with event "${t.type}"`),E}(e,t,runAction);var te=n(19);var ne=R.a.memo(({children:e})=>R.a.createElement("span",{className:te.iconWrap},e)),ae=n(20);var re=R.a.memo(()=>{const{state:{showBranding:e}}=useCommandBarState(),{translate:t}=useIntl();return e?R.a.createElement("a",{href:"https://helzle.it/projects?source=commandbar",title:t("CommandBarFooter.branding","Made with love by Sebastian Helzle"),target:"_blank",rel:"noreferrer noopener",className:ae.madeWithLove},R.a.createElement("small",null,t("CommandBarFooter.brandingSmall","Made with love by")),R.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 180 180"},R.a.createElement("defs",null,R.a.createElement("linearGradient",{id:"a",gradientUnits:"userSpaceOnUse",x1:"280.25",y1:"377.003",x2:"373.261",y2:"377.003"},R.a.createElement("stop",{offset:"0",stopColor:"#297AAC"}),R.a.createElement("stop",{offset:"1",stopColor:"#53AADA"}))),R.a.createElement("path",{d:"M0 180.017h37.287L71.35 52.898H34.061zM48.717 0l-9.083 33.898h36.675L85.392 0z",fill:"#B9B7B3"}),R.a.createElement("path",{d:"M335.972 313.444H288.25l-8 28.306h47.691l-28.03 98.813h39.287l34.063-127.119z",fill:"url(#a)",transform:"translate(-195.462 -260.325)"}))):null});function IconBack(){return R.a.createElement("svg",{viewBox:"0 0 448 512"},R.a.createElement("path",{fill:"currentColor",d:"m257.5 445.1-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}))}function IconNeos(){return R.a.createElement("svg",{viewBox:"0 0 512 512"},R.a.createElement("path",{fill:"currentColor",d:"M415.44 512h-95.11L212.12 357.46v91.1L125.69 512H28V29.82L68.47 0h108.05l123.74 176.13V63.45L386.69 0h97.69v461.5zM38.77 35.27V496l72-52.88V194l215.5 307.64h84.79l52.35-38.17h-78.27L69 13zm82.54 466.61 80-58.78v-101l-79.76-114.4v220.94L49 501.89h72.34zM80.63 10.77l310.6 442.57h82.37V10.77h-79.75v317.56L170.91 10.77zM311 191.65l72 102.81V15.93l-72 53v122.72z"}))}function IconSpinner(){return R.a.createElement("svg",{viewBox:"0 0 512 512"},R.a.createElement("path",{fill:"currentColor",d:"M288 39.056v16.659c0 10.804 7.281 20.159 17.686 23.066C383.204 100.434 440 171.518 440 256c0 101.689-82.295 184-184 184-101.689 0-184-82.295-184-184 0-84.47 56.786-155.564 134.312-177.219C216.719 75.874 224 66.517 224 55.712V39.064c0-15.709-14.834-27.153-30.046-23.234C86.603 43.482 7.394 141.206 8.003 257.332c.72 137.052 111.477 246.956 248.531 246.667C393.255 503.711 504 392.788 504 256c0-115.633-79.14-212.779-186.211-240.236C302.678 11.889 288 23.456 288 39.056z"}))}function IconStar(){return R.a.createElement("svg",{viewBox:"0 0 576 512"},R.a.createElement("path",{fill:"currentColor",d:"M528.1 171.5 382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6zM388.6 312.3l23.7 138.4L288 385.4l-124.3 65.3 23.7-138.4-100.6-98 139-20.2 62.2-126 62.2 126 139 20.2-100.6 98z"}))}function IconPlay(){return R.a.createElement("svg",{viewBox:"0 0 512 512"},R.a.createElement("path",{fill:"currentColor",d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z"}))}function IconRepeat(){return R.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},R.a.createElement("path",{fill:"currentColor",d:"M0 224c0 17.7 14.3 32 32 32s32-14.3 32-32c0-53 43-96 96-96H320v32c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-9.2-9.2-22.9-11.9-34.9-6.9S320 19.1 320 32V64H160C71.6 64 0 135.6 0 224zm512 64c0-17.7-14.3-32-32-32s-32 14.3-32 32c0 53-43 96-96 96H192V352c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V448H352c88.4 0 160-71.6 160-160z"}))}var oe=n(8);var se=R.a.memo(()=>{const{state:{activeCommandId:e,activeCommandMessage:t,commands:n,result:r,selectedCommandGroup:o,expanded:s},Icon:f}=useCommandBarState(),E=signals_module_y(()=>{var t;return e.value&&e.value?null!==(t=n.value[e.value])&&void 0!==t?t:r.value.options[e.value]:null});return s.value?R.a.createElement("footer",{className:oe.commandBarFooter},e.value?R.a.createElement("span",{className:oe.activity},R.a.createElement(ne,null,R.a.createElement(IconSpinner,null)),R.a.createElement("em",null,E.value.name," ‒ ",t)):o.value?R.a.createElement("span",{className:oe.breadcrumb},R.a.createElement(f,{icon:n.value[o.value].icon}),R.a.createElement("small",null,n.value[o.value].name)):R.a.createElement(ne,null,R.a.createElement(IconNeos,null)),R.a.createElement(re,null)):null}),ie=n(7);let ce=null;var le=R.a.memo(()=>{var e;const{state:t,actions:n}=useCommandBarState(),{executeCommand:r}=useCommandExecutor(),{translate:o}=useIntl(),s=Object(C.useRef)(),f=t.commands.value[t.activeCommandId.value||t.resultCommandId.value],E=Object(C.useCallback)(e=>{var o;t.status.value===K.DISPLAYING_RESULT?(n.UPDATE_COMMAND_QUERY(e.target.value),(null===(o=t.commands.value[t.resultCommandId.value])||void 0===o?void 0:o.executeManually)||(ce&&clearTimeout(ce),ce=setTimeout(()=>r(t.resultCommandId.value),500))):n.UPDATE_SEARCH(e.target.value)},[]),I=Object(C.useCallback)(e=>{"Escape"===e.key&&s.current.value&&(e.preventDefault(),e.stopPropagation())},[s.current]);return j(()=>{var e;t.status.value!==K.EXECUTING_COMMAND&&(null===(e=s.current)||void 0===e||e.focus())}),R.a.createElement(R.a.Fragment,null,R.a.createElement("input",{ref:s,className:ie.searchBox,type:"search",placeholder:t.status.value===K.DISPLAYING_RESULT?o("SearchBox.commandQuery.placeholder","Enter the query for the command"):o("SearchBox.placeholder","What do you want to do today?"),disabled:t.status.value===K.DISPLAYING_RESULT&&!(null==f?void 0:f.canHandleQueries),autoFocus:!0,onChange:E,onKeyUp:I,value:t.status.value===K.DISPLAYING_RESULT?t.commandQuery:t.searchWord,"data-testid":"SearchBox"}),!t.expanded.value&&R.a.createElement("button",{className:ie.expandButton,onClick:n.EXPAND,title:o("SearchBox.expand.title","Expand to show all commands")},R.a.createElement(ne,null,R.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},R.a.createElement("path",{fill:"currentColor",d:"M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"})))),t.status.value===K.DISPLAYING_RESULT&&(null===(e=t.commands.value[t.resultCommandId.value])||void 0===e?void 0:e.executeManually)&&!t.activeCommandId.value&&R.a.createElement("button",{className:[ie.executeButton,t.commandQueryDirty.value?ie.commandQueryDirty:""].join(" "),onClick:()=>r(t.resultCommandId.value),title:o("SearchBox.execute.title","Execute the command")},R.a.createElement(ne,null,t.commandQueryDirty.value?R.a.createElement(IconPlay,null):R.a.createElement(IconRepeat,null))))}),ue=n(15);var de=R.a.memo(()=>{const{state:e,actions:t}=useCommandBarState(),n=signals_module_y(()=>e.status.value==K.DISPLAYING_RESULT);return R.a.createElement("header",{className:ue.commandBarHeader},(n.value||e.selectedCommandGroup.value)&&R.a.createElement("button",{type:"button",onClick:n.value?t.CANCEL:t.GO_TO_PARENT_GROUP,className:ue.backButton,title:"Back"},R.a.createElement(ne,null,R.a.createElement(IconBack,null))),R.a.createElement(le,null))}),me=n(4);var _e=R.a.memo((function CommandListItem({command:e,onItemSelect:t,highlightedId:n,onToggleFavourite:r}){const{state:{favouriteCommands:o},Icon:s}=useCommandBarState(),{translate:f}=useIntl(),{id:E,name:C,description:I,icon:S,action:O}=e,T=function getCommandType({subCommandIds:e,category:t,canHandleQueries:n,action:r},o){let s="command";return t||((null==e?void 0:e.length)>0?s="category":n?s="query":"string"==typeof r&&(s="link"),o("CommandListItem.type."+s,s))}(e,f),A=signals_module_y(()=>n.value===E),P=signals_module_y(()=>o.value.includes(E));return R.a.createElement("li",{className:classnames(me.commandListItem,A.value&&me.highlighted),onClick:()=>t(E),"data-testid":"CommandListItem"},R.a.createElement(s,{icon:S}),R.a.createElement("span",{className:me.label},R.a.createElement("span",null,C),I&&R.a.createElement("span",{className:me.description},"string"==typeof I?I:I())),r&&O&&R.a.createElement("button",{type:"button",className:classnames(me.favouriteButton,P.value&&me.isFavourite),title:f("CommandListItem.toggleFavourite","Toggle favourite"),onClick:e=>{e.stopPropagation(),r(E)}},R.a.createElement(ne,null,R.a.createElement(IconStar,null))),R.a.createElement("small",{className:me.type},T))})),fe=n(9);var he=R.a.memo(()=>{const{state:{commands:e,highlightedItem:t,availableCommandIds:n,status:r,searchWord:o,favouriteCommands:s,recentCommands:f,selectedCommandGroup:E},actions:{ADD_FAVOURITE:I,REMOVE_FAVOURITE:S}}=useCommandBarState(),{translate:O}=useIntl(),{executeCommand:T}=useCommandExecutor(),A=R.a.useRef(null);j(()=>{var e,n;null===(n=null===(e=A.current)||void 0===e?void 0:e.querySelector(`li:nth-child(${t.value})`))||void 0===n||n.scrollIntoView({behavior:"smooth",block:"center"})});const P=Object(C.useCallback)(e=>{s.value.includes(e)?S(e):I(e)},[s]),D=signals_module_y(()=>o.value||E.value?[]:n.value.filter(e=>f.value.includes(e))),N=signals_module_y(()=>o.value||E.value?n.value:n.value.filter(e=>!f.value.includes(e))),M=signals_module_y(()=>n.value[t.value]);return R.a.createElement("nav",{className:classnames(fe.results,r.value!==K.IDLE&&fe.disabled),"data-testid":"CommandList",ref:A},D.value.length>0&&R.a.createElement(R.a.Fragment,null,R.a.createElement("h6",null,O("CommandList.suggestions","Recently used")),R.a.createElement("ul",null,D.value.map(t=>R.a.createElement(_e,{key:t,command:e.value[t],onItemSelect:T,highlightedId:M,onToggleFavourite:P})))),N.value.length>0&&R.a.createElement(R.a.Fragment,null,R.a.createElement("h6",null,O("CommandList.heading","Commands")),R.a.createElement("ul",null,N.value.map(t=>R.a.createElement(_e,{key:t,command:e.value[t],onItemSelect:T,highlightedId:M,onToggleFavourite:P})))),0===n.value.length&&R.a.createElement("small",{className:fe.noResults},O("CommandList.noCommandsMessage","No matching commands found")))}),pe=n(10);var CommandResultsView_CommandResultsView=()=>{var e;const{state:{result:t,highlightedOption:n,activeCommandId:r}}=useCommandBarState(),{executeCommand:o}=useCommandExecutor(),{translate:s}=useIntl(),f=R.a.useRef(null),E=signals_module_y(()=>t.value?Object.values(t.value.options)[n.value].id:null),C=null!==r.value;j(()=>{var e,t;const r=n.value;null===(t=null===(e=f.current)||void 0===e?void 0:e.querySelector(`li:nth-child(${r})`))||void 0===t||t.scrollIntoView({behavior:"smooth",block:"center"})});const{options:I,view:S,message:O}=null!==(e=t.value)&&void 0!==e?e:{};return R.a.createElement("div",{className:pe.commandResultsView},O&&R.a.createElement("h6",{className:pe.message},O),C?R.a.createElement("div",null,s("CommandResultsView.waitingForResults","Waiting for results…")):"",!C&&S?R.a.createElement("div",null,S):"",!C&&I&&R.a.createElement("nav",{className:pe.results,ref:f},R.a.createElement("ul",null,Object.keys(I).map(e=>R.a.createElement(_e,{key:e,command:I[e],onItemSelect:o,highlightedId:E})))))},ve=n(11);var ge=R.a.memo(({handleToggle:e,disabled:t=!1,label:n,title:r,active:o})=>R.a.createElement("button",{className:classnames(ve.toggleButton,o&&ve.toggleButtonActive),onClick:e,disabled:t,title:r},R.a.createElement("span",null,n),R.a.createElement("span",{className:ve.buttonIcon},"⌘K")));const Ee=Object(C.createContext)({}),useCommandBarState=()=>Object(C.useContext)(Ee);const CommandBarStateProvider=({commands:e,children:t,IconComponent:n,userPreferences:r})=>{const{state:o,dispatch:s}=Object(C.useMemo)(()=>function createAppState(e){const t=u(e);return{state:{activeCommandId:w(()=>t.value.activeCommandId),activeCommandMessage:w(()=>t.value.activeCommandMessage),availableCommandIds:w(()=>t.value.availableCommandIds),commandQuery:w(()=>t.value.commandQuery),commandQueryDirty:w(()=>t.value.commandQueryDirty),commands:w(()=>t.value.commands),expanded:w(()=>t.value.expanded),favouriteCommands:w(()=>t.value.favouriteCommands),highlightedItem:w(()=>t.value.highlightedItem),highlightedOption:w(()=>t.value.highlightedOption),recentCommands:w(()=>t.value.recentCommands),result:w(()=>t.value.result),resultCommandId:w(()=>t.value.resultCommandId),searchWord:w(()=>t.value.searchWord),selectedCommandGroup:w(()=>t.value.selectedCommandGroup),showBranding:w(()=>t.value.showBranding),status:w(()=>t.value.status)},dispatch:e=>{t.value=commandBarReducer(t.value,e)}}}({activeCommandId:null,activeCommandMessage:null,availableCommandIds:Object.keys(e),commandQuery:"",commandQueryDirty:!1,commands:flattenCommands(e),expanded:!1,favouriteCommands:r.favouriteCommands,highlightedItem:0,highlightedOption:0,recentCommands:r.recentCommands,result:null,resultCommandId:null,searchWord:"",selectedCommandGroup:null,showBranding:r.showBranding,status:K.COLLAPSED}),[]),f=Object(C.useMemo)(()=>({[Z.RESET_SEARCH]:()=>s({type:Z.RESET_SEARCH}),[Z.HIGHLIGHT_NEXT_ITEM]:()=>s({type:Z.HIGHLIGHT_NEXT_ITEM}),[Z.HIGHLIGHT_PREVIOUS_ITEM]:()=>s({type:Z.HIGHLIGHT_PREVIOUS_ITEM}),[Z.CANCEL]:()=>s({type:Z.CANCEL}),[Z.SELECT_GROUP]:e=>s({type:Z.SELECT_GROUP,commandId:e}),[Z.GO_TO_PARENT_GROUP]:()=>s({type:Z.GO_TO_PARENT_GROUP}),[Z.UPDATE_SEARCH]:e=>s({type:Z.UPDATE_SEARCH,searchWord:e}),[Z.UPDATE_COMMAND_QUERY]:e=>s({type:Z.UPDATE_COMMAND_QUERY,commandQuery:e}),[Z.EXECUTE_COMMAND]:async(e,t)=>(s({type:Z.EXECUTE_COMMAND,commandId:e,message:t}),r.addRecentCommand(e).catch(e=>q.error("Could not add recent command",e))),[Z.FINISH_COMMAND]:()=>s({type:Z.FINISH_COMMAND}),[Z.UPDATE_RESULT]:e=>s({type:Z.UPDATE_RESULT,result:e}),[Z.EXPAND]:()=>s({type:Z.EXPAND}),[Z.ADD_FAVOURITE]:e=>(s({type:Z.ADD_FAVOURITE,commandId:e}),r.setFavouriteCommands(o.favouriteCommands.value).catch(e=>q.error("Could not update favourite commands",e))),[Z.REMOVE_FAVOURITE]:e=>(s({type:Z.REMOVE_FAVOURITE,commandId:e}),r.setFavouriteCommands(o.favouriteCommands.value).catch(e=>q.error("Could not update favourite commands",e)))}),[]),E=Object(C.useCallback)(({icon:e,spin:t=!1})=>R.a.createElement(ne,null,R.a.createElement(n,{icon:e,spin:t})),[]);return R.a.createElement(Ee.Provider,{value:{state:o,actions:f,Icon:E}},t)},ye=R.a.createContext({}),useCommandExecutor=()=>R.a.useContext(ye),CommandBarExecutor=({children:e,toggleOpen:t,dialogRef:n,open:r})=>{const{state:o,actions:s}=useCommandBarState(),f=useFunctionRef(e=>{if(r&&!e.defaultPrevented)if("k"===e.key&&(e.metaKey||e.ctrlKey)&&(null==n?void 0:n.current.contains(e.target)))t(),e.stopPropagation(),e.preventDefault();else if("Escape"===e.key)e.stopPropagation(),e.preventDefault(),o.selectedCommandGroup.value||o.searchWord.value||o.commandQuery.value||o.result.value?s.CANCEL():t();else if("ArrowDown"===e.key)e.stopPropagation(),e.preventDefault(),s.HIGHLIGHT_NEXT_ITEM();else if("ArrowUp"===e.key)e.stopPropagation(),e.preventDefault(),s.HIGHLIGHT_PREVIOUS_ITEM();else if("Enter"===e.key){e.stopPropagation(),e.preventDefault();let t=o.availableCommandIds.value[o.highlightedItem.value];o.status.value===K.DISPLAYING_RESULT&&(t=!o.commandQueryDirty.value&&Object.values(o.result.value.options).length?Object.keys(o.result.value.options)[o.highlightedOption.value]:o.resultCommandId.value),t&&E(t)}}),E=Object(C.useCallback)(async e=>{var n,r,f;const E=null!==(r=null===(n=o.result.value)||void 0===n?void 0:n.options[e])&&void 0!==r?r:o.commands.value[e],{action:C,canHandleQueries:R,subCommandIds:I,name:S}=E;if((null==I?void 0:I.length)>0)return void s.SELECT_GROUP(e);if(assert(C,`Command ${e} has no action`),"string"==typeof C)return await s.EXECUTE_COMMAND(e,"Loading url"),0===C.indexOf("http")&&0!==C.indexOf(document.location.origin)?null===(f=window.open(C,"_blank","noopener,noreferrer"))||void 0===f||f.focus():window.location.href=C,s.FINISH_COMMAND();s.EXECUTE_COMMAND(e,"Running command");const O=C(R?o.commandQuery.value:void 0);if(O.then)O.then(e=>{if(e&&!e.success)throw new Error(`The command "${S}" failed`)}).catch(e=>{q.error("Command error",S,e)}).finally(()=>{s.FINISH_COMMAND()});else if(O.next){const e=O;for await(const t of e)s.UPDATE_RESULT(t);s.FINISH_COMMAND()}else q.error("Command result is not a promise or generator",O);E.closeOnExecute&&t()},[o.searchWord,o.commands,o.result]),I=useFunctionRef(e=>{E(e)});return Object(C.useEffect)(()=>{if(!r)return;const windowKeyEventHandler=e=>f.current(e);return window.addEventListener("keydown",windowKeyEventHandler),()=>window.removeEventListener("keydown",windowKeyEventHandler)},[r]),R.a.createElement(ye.Provider,{value:{executeCommand:I.current}},e)},Ce=Object(C.createContext)({}),useIntl=()=>Object(C.useContext)(Ce),IntlProvider=({translate:e,children:t})=>R.a.createElement(Ce.Provider,{value:{translate:e}},t);var be=n(5);var CommandBarDialog_CommandBarDialog=({onDrag:e,open:t,toggleOpen:n})=>{const{state:{expanded:r,result:o}}=useCommandBarState(),s=Object(C.useRef)(null),f=signals_module_h(!1),E=signals_module_h({left:window.innerWidth/2-300,top:window.innerHeight/2-20}),I=signals_module_h({offsetLeft:0,offsetTop:0}),S=signals_module_h(!1),O=signals_module_y(()=>{const{left:e,top:t}=E.value;return S.value?{left:e+"px",top:t+"px",translate:"none",visibility:f.value?"hidden":"visible"}:{}}),T=Object(C.useCallback)((e,t)=>{const n=s.current.getBoundingClientRect();E.value={left:clamp(e,0,window.innerWidth-n.width),top:clamp(t,0,window.innerHeight-n.height)}},[]),A=Object(C.useCallback)(t=>{"INPUT"!==t.target.tagName&&(console.debug("dragstart"),t.dataTransfer.setData("text/plain","CommandBar"),t.dataTransfer.dropEffect="move",t.dataTransfer.effectAllowed="move",h(()=>{I.value={offsetLeft:t.clientX-s.current.offsetLeft,offsetTop:t.clientY-s.current.offsetTop},S.value=!0}),e&&e(!0))},[s.current]),P=Object(C.useCallback)(t=>{const{clientX:n,clientY:r}=t;console.debug("dragdrop",n,r,I.value),h(()=>{f.value=!1,T(n-I.value.offsetLeft,r-I.value.offsetTop)}),e&&e(!1)},[s.current]),D=Object(C.useCallback)(()=>T(E.value.left,E.value.top),[]);return Object(C.useEffect)(()=>{var e,n;if(t)return null===(n=null===(e=s.current)||void 0===e?void 0:e.parentElement)||void 0===n||n.addEventListener("drop",P),window.addEventListener("resize",D),()=>{var e,t;null===(t=null===(e=s.current)||void 0===e?void 0:e.parentElement)||void 0===t||t.removeEventListener("drop",P),window.removeEventListener("resize",D)}},[t,D,P]),t?R.a.createElement("dialog",{ref:s,className:classnames(be.commandBar,o.value&&be.hasResults),open:t,draggable:!0,onDragStart:A,onDrag:()=>f.value=!0,style:O.value,"data-testid":"CommandBarDialog"},R.a.createElement(CommandBarExecutor,{toggleOpen:n,dialogRef:s,open:t},R.a.createElement(de,null),R.a.createElement("div",{className:classnames(be.resultsWrap,r.value&&be.expanded,o.value&&be.split)},r.value&&R.a.createElement(he,null),o.value&&R.a.createElement(CommandResultsView_CommandResultsView,null)),R.a.createElement(se,null))):null};var src_CommandBar=({commands:e,open:t,toggleOpen:n,onDrag:r,IconComponent:o,userPreferences:s,translate:f})=>R.a.createElement(IntlProvider,{translate:f},R.a.createElement(CommandBarStateProvider,{commands:e,IconComponent:o,userPreferences:s},R.a.createElement(CommandBarDialog_CommandBarDialog,{onDrag:r,open:t,toggleOpen:n})));async function fetchData(e,t,n="GET"){return t&&"GET"===n&&(e=Object.keys(t).reduce((e,n)=>e+"&"+n+"="+encodeURIComponent(t[n]),e+"?")),fetch(e,{method:n,credentials:"include",body:t&&"POST"===n?JSON.stringify(t):void 0,headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(e=>{var t;if(200!==e.status)throw new Error(`The request failed with code ${e.status}: "${e.statusText}"`);return(null===(t=e.headers.get("Content-Type"))||void 0===t?void 0:t.includes("application/json"))?e.json():e.text()})}async function setPreference(e,t){return fetchData(e,t,"POST")}async function getPreferences(){return fetchData("/neos/shel-neos-commandbar/preferences/getpreferences")}async function setFavouriteCommands(e){return setPreference("/neos/shel-neos-commandbar/preferences/setfavourites",{commandIds:e})}async function addRecentCommand(e){return setPreference("/neos/shel-neos-commandbar/preferences/addrecentcommand",{commandId:e})}async function addRecentDocument(e){return setPreference("/neos/shel-neos-commandbar/preferences/addrecentdocument",{nodeContextPath:e})}async function getCommands(){return fetchData("/neos/service/data-source/shel-neos-commandbar-commands")}async function searchNeosDocs(e){return e?fetchData("/neos/service/data-source/shel-neos-commandbar-search-neos-docs",{query:e}):{}}async function searchNeosPackages(e){return e?fetchData("/neos/service/data-source/shel-neos-commandbar-search-neos-packages",{query:e}):{}}async function searchNodes(e,t){return e?fetchData("service/data-source/shel-neos-commandbar-search-nodes",{query:e,node:t}):[]}var Re=n(6),Ie=n(12),Se=n(21);const CommandBarUiPlugin_IconComponent=({icon:e,spin:t=!1})=>C.createElement(P.Icon,{icon:e,spin:t});class CommandBarUiPlugin_CommandBarUiPlugin extends C.PureComponent{constructor(e){super(e),this.buildCommandsFromHotkeys=()=>{const{hotkeyRegistry:e,handleHotkeyAction:t,config:n}=this.props;return e.getAllAsList().reduce((e,{id:r,description:o,action:s})=>(n.hotkeys.filter.includes(r)||(e[r]={name:o,description:r,icon:this.mapHotkeyIdToIcon(r),action:async()=>{t(s())},closeOnExecute:!0}),e),{})},this.buildCommandsFromWorkspaces=()=>{const{allowedTargetWorkspaces:e}=this.props.neos.configuration;return Object.keys(e).reduce((t,n)=>{const r=e[n];return r.readonly||(t[n]={name:r.title,description:r.description,icon:"cube",action:async()=>{this.props.changeBaseWorkspaceAction(r.name)},closeOnExecute:!0}),t},{})},this.buildCommandsFromEditPreviewModes=()=>{const{setEditPreviewMode:e,editPreviewModes:t,i18nRegistry:n}=this.props;return Object.keys(t).reduce((r,o)=>{const{title:s,isEditingMode:f}=t[o];return r[o]={name:n.translate(s),description:()=>this.props.editPreviewMode===o?this.translate("CommandBarUiPlugin.command.switchEditPreviewMode.active","Currently active"):"",icon:f?"pencil":"eye",action:async()=>e(o)},r},{})},this.handleAddNode=async()=>{const{addNode:e,documentNode:t,focusedNodeContextPath:n,toggleCommandBar:r}=this.props;r(),e(n||t.contextPath,void 0,"after")},this.showRecentDocuments=async function*(){const{recentDocuments:e}=this.state,{setActiveContentCanvasContextPath:t,setActiveContentCanvasSrc:n}=this.props;e.length?yield{success:!0,message:this.translate("CommandBarUiPlugin.command.recentDocuments.options","Recent documents"),options:e.reduce((e,{name:r,contextPath:o,uri:s,icon:f})=>(e[o]={id:o,name:r,icon:f,action:async()=>{n(s),t(o)},closeOnExecute:!0},e),{})}:yield{success:!1,message:this.translate("CommandBarUiPlugin.command.searchDocuments.searchFailed","Search failed")}},this.handleSearchNode=async function*(e){const{siteNode:t,setActiveContentCanvasSrc:n}=this.props;let r;yield{success:!0,message:this.translate("CommandBarUiPlugin.command.searchDocuments.searching",{query:e})};const o=await E.searchNodes(e,t.contextPath).catch(e=>{q.error("Could not search nodes",e),r=e.message});o?yield{success:!0,message:this.translate("CommandBarUiPlugin.command.searchDocuments.matches",{matches:o.length}),options:o.reduce((e,{name:t,nodetype:r,contextPath:o,uri:s,icon:f})=>s?(e[o]={id:o,name:t,category:r,action:async()=>{n(s)},closeOnExecute:!0,icon:f},e):e,{})}:yield{success:!1,message:this.translate("CommandBarUiPlugin.command.searchDocuments.searchFailed","Search failed"),view:r}},this.handleSearchNeosDocs=async function*(e){let t;yield{success:!0,message:this.translate("CommandBarUiPlugin.command.documentation.searching",{query:e},`Search for "${e}"`)};const n=await s.searchNeosDocs(e).catch(e=>{q.error("Could not search Neos docs",e),t=e.message});t||!n?yield{success:!1,message:this.translate("CommandBarUiPlugin.command.documentation.error","Search failed"),view:t}:yield{success:!0,message:this.translate("CommandBarUiPlugin.command.documentation.matches",{matches:Object.keys(n).length},Object.values(n).length+" options match your query"),options:n}},this.handleSearchNeosPackages=async function*(e){let t;yield{success:!0,message:this.translate("CommandBarUiPlugin.command.packages.searching",{query:e},`Search for "${e}"`)};const n=await f.searchNeosPackages(e).catch(e=>{q.error("Could not search Neos packages",e),t=e.message});t||!n?yield{success:!1,message:this.translate("CommandBarUiPlugin.command.packages.error","Search failed"),view:t}:yield{success:!0,message:this.translate("CommandBarUiPlugin.command.packages.matches",{matches:Object.values(n).length},Object.values(n).length+" options match your query"),options:n}},this.handlePublish=async()=>{const{publishableNodesInDocument:e,publishAction:t,baseWorkspace:n}=this.props;return t(e.map(e=>e.contextPath),n),{success:!0,message:this.translate("CommandBarUiPlugin.command.publish.success",{count:e.length},`Published ${e.length} changes`)}},this.handlePublishAll=async()=>{const{publishableNodes:e,publishAction:t,baseWorkspace:n}=this.props;return t(e.map(e=>e.contextPath),n),{success:!0,message:this.translate("CommandBarUiPlugin.command.publishAll.success",{count:e.length},`Published ${e.length} changes`)}},this.handleDiscard=async()=>{const{publishableNodesInDocument:e,discardAction:t}=this.props;return t(e.map(e=>e.contextPath)),{success:!0,message:this.translate("CommandBarUiPlugin.command.discard.success",{count:e.length},`Discarded ${e.length} changes`)}},this.handleDiscardAll=async()=>{const{publishableNodes:e,discardAction:t}=this.props;return t(e.map(e=>e.contextPath)),{success:!0,message:this.translate("CommandBarUiPlugin.command.discardAll.success",{count:e.length},`Discarded ${e.length} changes`)}},this.setDragging=e=>{this.setState({...this.state,dragging:e})},this.translate=(e,t,n)=>("string"==typeof t&&(n=t,t={}),this.props.i18nRegistry.translate(e,n,t,"Shel.Neos.CommandBar","Main")),this.state={loaded:!1,dragging:!1,favouriteCommands:[],recentCommands:[],recentDocuments:[],showBranding:!0,commands:{addNode:{name:this.translate("CommandBarUiPlugin.command.addNode","Add content"),icon:"plus",description:this.translate("CommandBarUiPlugin.command.addNode.description","Add new content"),action:this.handleAddNode},searchDocuments:{name:this.translate("CommandBarUiPlugin.command.searchDocuments","Search documents"),icon:"search",description:this.translate("CommandBarUiPlugin.command.searchDocuments.description","Search and navigate to documents"),action:this.handleSearchNode.bind(this),canHandleQueries:!0},switchWorkspace:{name:this.translate("CommandBarUiPlugin.command.switchWorkspace","Switch workspace"),icon:"exchange-alt",description:this.translate("CommandBarUiPlugin.command.switchWorkspace.description","Switch to another workspace"),subCommands:this.buildCommandsFromWorkspaces()},publishDiscard:{name:this.translate("CommandBarUiPlugin.command.publishDiscard","Publish / discard"),description:this.translate("CommandBarUiPlugin.command.publishDiscard.description","Publish or discard changes"),icon:"check",subCommands:{publish:{name:this.translate("CommandBarUiPlugin.command.publish","Publish"),description:this.translate("CommandBarUiPlugin.command.publish.description","Publish changes in this document"),icon:"check",action:this.handlePublish},publishAll:{name:this.translate("CommandBarUiPlugin.command.publishAll","Publish all"),description:this.translate("CommandBarUiPlugin.command.publishAll.description","Publish changes in all documents"),icon:"check-double",action:this.handlePublishAll},discard:{name:this.translate("CommandBarUiPlugin.command.discard","Discard"),description:this.translate("CommandBarUiPlugin.command.discard.description","Discard changes in the current document"),icon:"ban",action:this.handleDiscard},discardAll:{name:this.translate("CommandBarUiPlugin.command.discardAll","Discard all"),description:this.translate("CommandBarUiPlugin.command.discardAll.description","Discard changes in all documents"),icon:"ban",action:this.handleDiscardAll}}},quickActions:{name:this.translate("CommandBarUiPlugin.command.quickActions","Quick actions"),icon:"keyboard",description:this.translate("CommandBarUiPlugin.command.quickActions.description","Execute hotkeys"),subCommands:this.buildCommandsFromHotkeys()},switchEditPreviewMode:{name:this.translate("CommandBarUiPlugin.command.switchEditPreviewMode","Switch edit/preview mode"),icon:"pencil",description:this.translate("CommandBarUiPlugin.command.switchEditPreviewMode.description","Switch between edit and preview modes"),subCommands:this.buildCommandsFromEditPreviewModes()},openPreview:{name:this.translate("CommandBarUiPlugin.command.openPreview","Open preview"),description:this.translate("CommandBarUiPlugin.command.openPreview.description","Open the preview for current document"),icon:"external-link-alt",action:async()=>{var e;this.props.previewUrl?null===(e=window.open(this.props.previewUrl,"_blank","noopener,noreferrer"))||void 0===e||e.focus():q.warn("No preview url to open")},closeOnExecute:!0},recentDocument:{name:this.translate("CommandBarUiPlugin.command.recentDocuments","Recent documents"),description:this.translate("CommandBarUiPlugin.command.recentDocuments.description","Open a recently visited documents"),icon:"history",action:this.showRecentDocuments.bind(this)}}},e.config.features.searchNeosDocs&&(this.state.commands.searchNeosDocs={name:this.translate("CommandBarUiPlugin.command.documentation","Documentation"),description:this.translate("CommandBarUiPlugin.command.documentation.description","Browse or search the Neos documentation"),icon:"book",canHandleQueries:!0,action:this.handleSearchNeosDocs.bind(this)}),e.config.features.searchNeosPackages&&(this.state.commands.searchNeosPackages={name:this.translate("CommandBarUiPlugin.command.packages","Packages"),description:this.translate("CommandBarUiPlugin.command.packages.description","Search for Neos packages"),icon:"boxes",canHandleQueries:!0,action:this.handleSearchNeosPackages.bind(this)})}mapHotkeyIdToIcon(e){let t=e.split(".").pop();switch(t.indexOf("toggle")>=0&&(t="toggle"),t){case"toggle":return"toggle-on";case"reload":return"redo";case"cancel":case"close":return"window-close";case"apply":return"check"}return"neos"}async componentDidMount(){const{plugins:e}=this.props;let t={};if(e)for(const n of Object.keys(e)){const r=e[n];try{const e=await r();Object.keys(e).length>0&&(t={...t,...e})}catch(e){q.warn("Could not load commands from plugin "+n,e)}}const n=await o.getCommands().catch(e=>{q.error("Failed to load commands",e)}),s=await r.getPreferences().catch(e=>{q.error("Failed to load user preferences",e)});s&&n&&(this.setState(e=>({loaded:!0,...s,commands:{...e.commands,...n,...t}})),document.addEventListener("keydown",e=>{"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.stopPropagation(),e.preventDefault(),this.props.toggleCommandBar())}))}async componentDidUpdate(e){var t,n;(null===(t=e.documentNode)||void 0===t?void 0:t.contextPath)!=(null===(n=this.props.documentNode)||void 0===n?void 0:n.contextPath)&&addRecentDocument(this.props.documentNode.contextPath).then(e=>{this.setState({recentDocuments:e})})}render(){const{commandBarOpen:e,toggleCommandBar:t}=this.props,{commands:n,loaded:o,dragging:s,favouriteCommands:f,recentCommands:E,recentDocuments:R,showBranding:I}=this.state;return C.createElement("div",{className:classnames(Ie.commandBarToolbarComponent,Se.commandBarTheme)},C.createElement(ge,{handleToggle:t,disabled:!o,label:this.translate("ToggleButton.label","Search…"),title:this.translate("ToggleButton.title","Search for commands"),active:e}),o&&C.createElement("div",{className:[Ie.fullScreenLayer,e&&Ie.open].join(" "),onDragOver:e=>e.preventDefault(),style:s?{pointerEvents:"all"}:null},C.createElement(src_CommandBar,{open:e,commands:n,toggleOpen:t,onDrag:this.setDragging,IconComponent:CommandBarUiPlugin_IconComponent,userPreferences:{favouriteCommands:f,recentCommands:E,recentDocuments:R,showBranding:I,addRecentCommand:r.addRecentCommand,addRecentDocument:r.addRecentDocument,setFavouriteCommands:r.setFavouriteCommands},translate:this.translate})))}}CommandBarUiPlugin_CommandBarUiPlugin.propTypes={addNode:O.a.func.isRequired,baseWorkspace:O.a.string.isRequired,commandBarOpen:O.a.bool,config:O.a.object.isRequired,discardAction:O.a.func.isRequired,documentNode:O.a.object,editPreviewMode:O.a.string.isRequired,editPreviewModes:O.a.object.isRequired,focusedNodeContextPath:O.a.string,handleHotkeyAction:O.a.func.isRequired,hotkeyRegistry:O.a.object.isRequired,i18nRegistry:O.a.object.isRequired,isWorkspaceReadOnly:O.a.bool,publishAction:O.a.func.isRequired,publishableNodes:O.a.array,publishableNodesInDocument:O.a.array,previewUrl:O.a.string,setActiveContentCanvasSrc:O.a.func.isRequired,setActiveContentCanvasContextPath:O.a.func.isRequired,setEditPreviewMode:O.a.func.isRequired,siteNode:O.a.object,toggleCommandBar:O.a.func.isRequired,neos:O.a.object.isRequired};const Oe=Object(T.neos)(e=>({i18nRegistry:e.get("i18n"),hotkeyRegistry:e.get("hotkeys"),config:e.get("frontendConfiguration").get("Shel.Neos.CommandBar:CommandBar"),nodeTypesRegistry:e.get("@neos-project/neos-ui-contentrepository"),editPreviewModes:e.get("frontendConfiguration").get("editPreviewModes"),plugins:e.get("Shel.Neos.CommandBar").getChildrenAsObject("plugins")}));t.default=Object(I.connect)(()=>({}),{toggleCommandBar:Re.actions.toggleCommandBar,addNode:A.actions.CR.Nodes.commenceCreation,setEditPreviewMode:A.actions.UI.EditPreviewMode.set,publishAction:A.actions.CR.Workspaces.publish,discardAction:A.actions.CR.Workspaces.commenceDiscard,setActiveContentCanvasSrc:A.actions.UI.ContentCanvas.setSrc,setActiveContentCanvasContextPath:A.actions.CR.Nodes.setDocumentNode,changeBaseWorkspaceAction:A.actions.CR.Workspaces.changeBaseWorkspace})(Object(I.connect)(e=>({siteNode:A.selectors.CR.Nodes.siteNodeSelector(e),documentNode:A.selectors.CR.Nodes.documentNodeSelector(e),focusedNodeContextPath:A.selectors.CR.Nodes.focusedNodePathSelector(e),publishableNodes:A.selectors.CR.Workspaces.publishableNodesSelector(e),publishableNodesInDocument:A.selectors.CR.Workspaces.publishableNodesInDocumentSelector(e),isWorkspaceReadOnly:A.selectors.CR.Workspaces.isWorkspaceReadOnlySelector(e),baseWorkspace:A.selectors.CR.Workspaces.baseWorkspaceSelector(e),commandBarOpen:Re.selectors.commandBarOpen(e),editPreviewMode:A.selectors.UI.EditPreviewMode.currentEditPreviewMode(e),previewUrl:Re.selectors.previewUrl(e)}),e=>({handleHotkeyAction:e}))(Oe(CommandBarUiPlugin_CommandBarUiPlugin)))}]); +!function(e){var t={};function __webpack_require__(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}__webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)__webpack_require__.d(n,r,function(t){return e[t]}.bind(null,r));return n},__webpack_require__.n=function(e){var t=e&&e.__esModule?function getDefault(){return e.default}:function getModuleExports(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=22)}([function(e,t,n){"use strict";var r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(3));e.exports=(0,r.default)("vendor")().React},function(e,t,n){"use strict";var r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(3));e.exports=(0,r.default)("vendor")().PropTypes},function(e,t,n){"use strict";var r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(3));e.exports=(0,r.default)("NeosProjectPackages")().NeosUiReduxStore},function(e,t,n){"use strict";var __read=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,s=n.call(e),f=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)f.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(o)throw o.error}}return f},__spreadArray=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,s=t.length;o{var n,r,o;return{...e,plugins:{...e.plugins,commandBar:{open:void 0!==(null===(n=t.payload)||void 0===n?void 0:n.open)?t.payload.open:!(null===(o=null===(r=e.plugins)||void 0===r?void 0:r.commandBar)||void 0===o?void 0:o.open)}}}}},{plugins:{commandBar:{open:!1}}}),E={commandBarOpen:e=>{var t,n;return null===(n=null===(t=e.plugins)||void 0===t?void 0:t.commandBar)||void 0===n?void 0:n.open},previewUrl:e=>{var t,n;return null===(n=null===(t=e.ui)||void 0===t?void 0:t.contentCanvas)||void 0===n?void 0:n.previewUrl}}},function(e,t,n){e.exports={commandBarFooter:"CommandBarFooter-module__commandBarFooter___2mcre",breadcrumb:"CommandBarFooter-module__breadcrumb___1Ul24",activity:"CommandBarFooter-module__activity___2GXJU",spinner:"CommandBarFooter-module__spinner___1mRmX"}},function(e,t,n){e.exports={searchBox:"SearchBox-module__searchBox___1SEtn",expandButton:"SearchBox-module__expandButton___B2jYv",executeButton:"SearchBox-module__executeButton___3hg_l",commandQueryDirty:"SearchBox-module__commandQueryDirty___s_CVX"}},function(e,t,n){e.exports={commandBar:"CommandBarDialog-module__commandBar___1Hb5s",hasResults:"CommandBarDialog-module__hasResults___3iM8B",resultsWrap:"CommandBarDialog-module__resultsWrap___2gd3U",expanded:"CommandBarDialog-module__expanded___jby7g"}},function(e,t,n){e.exports={results:"CommandListing-module__results___23Rve",noResults:"CommandListing-module__noResults___Mb89V",disabled:"CommandListing-module__disabled___6gpPj"}},function(e,t,n){e.exports={commandResultsView:"CommandResultsView-module__commandResultsView___xLqwb",message:"CommandResultsView-module__message___NhUkR",results:"CommandResultsView-module__results___1t6jB",noResults:"CommandResultsView-module__noResults___2ksIF",disabled:"CommandResultsView-module__disabled___OmNvX"}},function(e,t,n){e.exports={toggleButton:"ToggleButton-module__toggleButton___2wPs-",toggleButtonActive:"ToggleButton-module__toggleButtonActive___3bWD5",buttonIcon:"ToggleButton-module__buttonIcon___UjFjw"}},function(e,t,n){e.exports={fullScreenLayer:"CommandBarUiPlugin-module__fullScreenLayer___1cUx4",open:"CommandBarUiPlugin-module__open___1Bjxj",commandBarToolbarComponent:"CommandBarUiPlugin-module__commandBarToolbarComponent___1agRY"}},function(e,t,n){"use strict";var r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(3));e.exports=(0,r.default)("vendor")().reduxActions},function(e,t,n){"use strict";var r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(3));e.exports=(0,r.default)("vendor")().reactRedux},function(e,t,n){e.exports={commandBarHeader:"CommandBarHeader-module__commandBarHeader___3Y2hR",backButton:"CommandBarHeader-module__backButton___1qIGu"}},function(e,t,n){"use strict";var r,o=(r=function extendStatics(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),__importDefault=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var s=__importDefault(n(28)),f=__importDefault(n(29)),E=function(e){function SynchronousRegistry(t){var n=e.call(this,t)||this;return n._registry=[],n}return o(SynchronousRegistry,e),SynchronousRegistry.prototype.set=function(e,t,n){if(void 0===n&&(n=0),"string"!=typeof e)throw new Error("Key must be a string");if("string"!=typeof n&&"number"!=typeof n)throw new Error("Position must be a string or a number");var r={key:e,value:t};n&&(r.position=n);var o=this._registry.findIndex((function(t){return t.key===e}));return-1===o?this._registry.push(r):this._registry[o]=r,t},SynchronousRegistry.prototype.get=function(e){if("string"!=typeof e)return console.error("Key must be a string"),null;var t=this._registry.find((function(t){return t.key===e}));return t?t.value:null},SynchronousRegistry.prototype._getChildrenWrapped=function(e){var t=this._registry.filter((function(t){return 0===t.key.indexOf(e+"/")}));return(0,f.default)(t)},SynchronousRegistry.prototype.getChildrenAsObject=function(e){var t={};return this._getChildrenWrapped(e).forEach((function(e){t[e.key]=e.value})),t},SynchronousRegistry.prototype.getChildren=function(e){return this._getChildrenWrapped(e).map((function(e){return e.value}))},SynchronousRegistry.prototype.has=function(e){return"string"!=typeof e?(console.error("Key must be a string"),!1):Boolean(this._registry.find((function(t){return t.key===e})))},SynchronousRegistry.prototype._getAllWrapped=function(){return(0,f.default)(this._registry)},SynchronousRegistry.prototype.getAllAsObject=function(){var e={};return this._getAllWrapped().forEach((function(t){e[t.key]=t.value})),e},SynchronousRegistry.prototype.getAllAsList=function(){return this._getAllWrapped().map((function(e){return Object.assign({id:e.key},e.value)}))},SynchronousRegistry}(s.default);t.default=E},function(e,t,n){"use strict";var r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(3));e.exports=(0,r.default)("NeosProjectPackages")().NeosUiDecorators},function(e,t,n){"use strict";var r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n(3));e.exports=(0,r.default)("NeosProjectPackages")().ReactUiComponents},function(e,t,n){e.exports={iconWrap:"IconWrapper-module__iconWrap___1Z3nD"}},function(e,t,n){e.exports={madeWithLove:"Branding-module__madeWithLove___2ibna"}},function(e,t,n){e.exports={commandBarTheme:"Theme-module__commandBarTheme___1Z1-S"}},function(e,t,n){"use strict";n(23)},function(e,t,n){"use strict";var r=n(24),o=_interopRequireDefault(r),s=n(5),f=_interopRequireDefault(n(32));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(0,o.default)("Shel.Neos.CommandBar:CommandBar",{},(function(e,t){t.frontendConfiguration["Shel.Neos.CommandBar:CommandBar"].enabled&&(e.set("Shel.Neos.CommandBar",new r.SynchronousRegistry("\n # Shel.Neos.CommandBar 3rd party commands\n ")),e.get("containers").set("PrimaryToolbar/Middle/CommandBar",f.default),e.get("reducers").set("Shel.Neos.CommandBar",{reducer:s.reducer}))}))},function(e,t,n){"use strict";var __importDefault=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.SynchronousMetaRegistry=t.SynchronousRegistry=t.readFromConsumerApi=t.createConsumerApi=void 0;var r=__importDefault(n(25));t.createConsumerApi=r.default;var o=__importDefault(n(3));t.readFromConsumerApi=o.default;var s=n(27);t.SynchronousRegistry=s.SynchronousRegistry,t.SynchronousMetaRegistry=s.SynchronousMetaRegistry,t.default=(0,o.default)("manifest")},function(e,t,n){"use strict";var __importDefault=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var r=__importDefault(n(26)),o=function createReadOnlyValue(e){return{value:e,writable:!1,enumerable:!1,configurable:!0}};t.default=function createConsumerApi(e,t){var n={};Object.keys(t).forEach((function(e){Object.defineProperty(n,e,o(t[e]))})),Object.defineProperty(n,"@manifest",o((0,r.default)(e))),Object.defineProperty(window,"@Neos:HostPluginAPI",o(n))}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return function(t,n,r){var o;e.push(((o={})[t]={options:n,bootstrap:r},o))}}},function(e,t,n){"use strict";var __importDefault=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.SynchronousMetaRegistry=t.SynchronousRegistry=void 0;var r=__importDefault(n(16));t.SynchronousRegistry=r.default;var o=__importDefault(n(31));t.SynchronousMetaRegistry=o.default},function(e,t,n){"use strict";t.__esModule=!0;var r=function r(e){this.SERIAL_VERSION_UID="d8a5aa78-978e-11e6-ae22-56b6b6499611",this.description=e};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var r=n(30);t.default=function positionalArraySorter(e,t,n){var o,s,f,E,C,R,I,S,O,T,A,P,D,N;void 0===t&&(t="position"),void 0===n&&(n="key");var M="string"==typeof t?function(e){return e[t]}:t,U={},L={},x={},H={},k={},B={};e.forEach((function(e,t){var r=e[n]?e[n]:String(t);U[r]=t;var o=M(e),s=String(o||t),f=!1;if(s.startsWith("start")){var E=(C=s.match(/start\s+(\d+)/))&&C[1]?Number(C[1]):0;x[E]||(x[E]=[]),x[E].push(r)}else if(s.startsWith("end")){var C;E=(C=s.match(/end\s+(\d+)/))&&C[1]?Number(C[1]):0;H[E]||(H[E]=[]),H[E].push(r)}else if(s.startsWith("before")){if(I=s.match(/before\s+(\S+)(\s+(\d+))?/)){var R=I[1];E=I[3]?Number(I[3]):0;k[R]||(k[R]={}),k[R][E]||(k[R][E]=[]),k[R][E].push(r)}else f=!0}else if(s.startsWith("after")){var I;if(I=s.match(/after\s+(\S+)(\s+(\d+))?/)){R=I[1],E=I[3]?Number(I[3]):0;B[R]||(B[R]={}),B[R][E]||(B[R][E]=[]),B[R][E].push(r)}else f=!0}else f=!0;if(f){var S=parseFloat(s);!isNaN(S)&&isFinite(S)||(S=t),L[S]||(L[S]=[]),L[S].push(r)}}));var G=[],F=[],V=[],W=[],q=function sortedWeights(e,t){var n=Object.keys(e).map((function(e){return Number(e)})).sort((function(e,t){return e-t}));return t?n:n.reverse()},X=function addToResults(e,t){e.forEach((function(e){var n,o,s,f;if(!(W.indexOf(e)>=0)){if(W.push(e),k[e]){var E=q(k[e],!0);try{for(var C=r.__values(E),R=C.next();!R.done;R=C.next()){var I=R.value;addToResults(k[e][I],t)}}catch(e){n={error:e}}finally{try{R&&!R.done&&(o=C.return)&&o.call(C)}finally{if(n)throw n.error}}}if(t.push(e),B[e]){var S=q(B[e],!1);try{for(var O=r.__values(S),T=O.next();!T.done;T=O.next()){I=T.value;addToResults(B[e][I],t)}}catch(e){s={error:e}}finally{try{T&&!T.done&&(f=O.return)&&f.call(O)}finally{if(s)throw s.error}}}}}))};try{for(var Q=r.__values(q(x,!1)),z=Q.next();!z.done;z=Q.next()){var Y=z.value;X(x[Y],G)}}catch(e){o={error:e}}finally{try{z&&!z.done&&(s=Q.return)&&s.call(Q)}finally{if(o)throw o.error}}try{for(var $=r.__values(q(L,!0)),K=$.next();!K.done;K=$.next()){Y=K.value;X(L[Y],F)}}catch(e){f={error:e}}finally{try{K&&!K.done&&(E=$.return)&&E.call($)}finally{if(f)throw f.error}}try{for(var Z=r.__values(q(H,!0)),J=Z.next();!J.done;J=Z.next()){Y=J.value;X(H[Y],V)}}catch(e){C={error:e}}finally{try{J&&!J.done&&(R=Z.return)&&R.call(Z)}finally{if(C)throw C.error}}try{for(var ee=r.__values(Object.keys(k)),te=ee.next();!te.done;te=ee.next()){var ne=te.value;if(!(W.indexOf(ne)>=0))try{for(var ae=(O=void 0,r.__values(q(k[ne],!1))),re=ae.next();!re.done;re=ae.next()){Y=re.value;X(k[ne][Y],G)}}catch(e){O={error:e}}finally{try{re&&!re.done&&(T=ae.return)&&T.call(ae)}finally{if(O)throw O.error}}}}catch(e){I={error:e}}finally{try{te&&!te.done&&(S=ee.return)&&S.call(ee)}finally{if(I)throw I.error}}try{for(var oe=r.__values(Object.keys(B)),se=oe.next();!se.done;se=oe.next()){ne=se.value;if(!(W.indexOf(ne)>=0))try{for(var ie=(D=void 0,r.__values(q(B[ne],!1))),ce=ie.next();!ce.done;ce=ie.next()){Y=ce.value;X(B[ne][Y],F)}}catch(e){D={error:e}}finally{try{ce&&!ce.done&&(N=ie.return)&&N.call(ie)}finally{if(D)throw D.error}}}}catch(e){A={error:e}}finally{try{se&&!se.done&&(P=oe.return)&&P.call(oe)}finally{if(A)throw A.error}}return r.__spread(G,F,V).map((function(e){return U[e]})).map((function(t){return e[t]}))}},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return __extends})),n.d(t,"__assign",(function(){return __assign})),n.d(t,"__rest",(function(){return __rest})),n.d(t,"__decorate",(function(){return __decorate})),n.d(t,"__param",(function(){return __param})),n.d(t,"__metadata",(function(){return __metadata})),n.d(t,"__awaiter",(function(){return __awaiter})),n.d(t,"__generator",(function(){return __generator})),n.d(t,"__createBinding",(function(){return __createBinding})),n.d(t,"__exportStar",(function(){return __exportStar})),n.d(t,"__values",(function(){return __values})),n.d(t,"__read",(function(){return __read})),n.d(t,"__spread",(function(){return __spread})),n.d(t,"__spreadArrays",(function(){return __spreadArrays})),n.d(t,"__await",(function(){return __await})),n.d(t,"__asyncGenerator",(function(){return __asyncGenerator})),n.d(t,"__asyncDelegator",(function(){return __asyncDelegator})),n.d(t,"__asyncValues",(function(){return __asyncValues})),n.d(t,"__makeTemplateObject",(function(){return __makeTemplateObject})),n.d(t,"__importStar",(function(){return __importStar})),n.d(t,"__importDefault",(function(){return __importDefault})),n.d(t,"__classPrivateFieldGet",(function(){return __classPrivateFieldGet})),n.d(t,"__classPrivateFieldSet",(function(){return __classPrivateFieldSet}));var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function __extends(e,t){function __(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function __assign(e){for(var t,n=1,r=arguments.length;n=0;E--)(o=e[E])&&(f=(s<3?o(f):s>3?o(t,n,f):o(t,n))||f);return s>3&&f&&Object.defineProperty(t,n,f),f}function __param(e,t){return function(n,r){t(n,r,e)}}function __metadata(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function __awaiter(e,t,n,r){return new(n||(n=Promise))((function(o,s){function fulfilled(e){try{step(r.next(e))}catch(e){s(e)}}function rejected(e){try{step(r.throw(e))}catch(e){s(e)}}function step(e){e.done?o(e.value):function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(fulfilled,rejected)}step((r=r.apply(e,t||[])).next())}))}function __generator(e,t){var n,r,o,s,f={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function verb(s){return function(E){return function step(s){if(n)throw new TypeError("Generator is already executing.");for(;f;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return f.label++,{value:s[1],done:!1};case 5:f.label++,r=s[1],s=[0];continue;case 7:s=f.ops.pop(),f.trys.pop();continue;default:if(!(o=f.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){f=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,s=n.call(e),f=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)f.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(o)throw o.error}}return f}function __spread(){for(var e=[],t=0;t1||resume(e,t)}))})}function resume(e,t){try{!function step(e){e.value instanceof __await?Promise.resolve(e.value.v).then(fulfill,reject):settle(s[0][2],e)}(o[e](t))}catch(e){settle(s[0][3],e)}}function fulfill(e){resume("next",e)}function reject(e){resume("throw",e)}function settle(e,t){e(t),s.shift(),s.length&&resume(s[0][0],s[0][1])}}function __asyncDelegator(e){var t,n;return t={},verb("next"),verb("throw",(function(e){throw e})),verb("return"),t[Symbol.iterator]=function(){return this},t;function verb(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:__await(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function __asyncValues(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=__values(e),t={},verb("next"),verb("throw"),verb("return"),t[Symbol.asyncIterator]=function(){return this},t);function verb(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function settle(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function __makeTemplateObject(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function __importStar(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function __importDefault(e){return e&&e.__esModule?e:{default:e}}function __classPrivateFieldGet(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function __classPrivateFieldSet(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";var r,o=(r=function extendStatics(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),__importDefault=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var s=function(e){function SynchronousMetaRegistry(){return null!==e&&e.apply(this,arguments)||this}return o(SynchronousMetaRegistry,e),SynchronousMetaRegistry.prototype.set=function(t,n){if("d8a5aa78-978e-11e6-ae22-56b6b6499611"!==n.SERIAL_VERSION_UID)throw new Error("You can only add registries to a meta registry");return e.prototype.set.call(this,t,n)},SynchronousMetaRegistry}(__importDefault(n(16)).default);t.default=s},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"getPreferences",(function(){return getPreferences})),n.d(r,"setFavouriteCommands",(function(){return setFavouriteCommands})),n.d(r,"addRecentCommand",(function(){return addRecentCommand})),n.d(r,"addRecentDocument",(function(){return addRecentDocument}));var o={};n.r(o),n.d(o,"getCommands",(function(){return getCommands}));var s={};n.r(s),n.d(s,"searchNeosDocs",(function(){return searchNeosDocs}));var f={};n.r(f),n.d(f,"searchNeosPackages",(function(){return searchNeosPackages}));var E={};n.r(E),n.d(E,"searchNodes",(function(){return searchNodes}));var C=n(0),R=n.n(C),I=n(14),S=n(1),O=n.n(S),T=n(17),A=n(2),P=n(18);function useFunctionRef(e){const t=Object(C.useRef)(e);return t.current=e,t}function i(){throw new Error("Cycle detected")}function signals_core_module_t(){if(M>1)M--;else{for(var e,t=!1;void 0!==N;){var n=N;for(N=void 0,U++;void 0!==n;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&d(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(U=0,M--,t)throw e}}function h(e){if(M>0)return e();M++;try{return e()}finally{signals_core_module_t()}}var D=void 0,N=void 0,M=0,U=0,L=0;function v(e){if(void 0!==D){var t=e.n;if(void 0===t||t.t!==D)return t={i:0,S:e,p:D.s,n:void 0,t:D,e:void 0,x:void 0,r:t},void 0!==D.s&&(D.s.n=t),D.s=t,e.n=t,32&D.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=D.s,t.n=void 0,D.s.n=t,D.s=t),t}}function signals_core_module_e(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}function u(e){return new signals_core_module_e(e)}function d(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function c(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function a(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function l(e){signals_core_module_e.call(this,void 0),this.x=e,this.s=void 0,this.g=L-1,this.f=4}function w(e){return new l(e)}function y(e){var t=e.u;if(e.u=void 0,"function"==typeof t){M++;var n=D;D=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,_(e),t}finally{D=n,signals_core_module_t()}}}function _(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,y(e)}function g(e){if(D!==this)throw new Error("Out-of-order effect");a(this),D=e,this.f&=-2,8&this.f&&_(this),signals_core_module_t()}function b(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}function p(e){var t=new b(e);try{t.c()}catch(e){throw t.d(),e}return t.d.bind(t)}signals_core_module_e.prototype.h=function(){return!0},signals_core_module_e.prototype.S=function(e){this.t!==e&&void 0===e.e&&(e.x=this.t,void 0!==this.t&&(this.t.e=e),this.t=e)},signals_core_module_e.prototype.U=function(e){if(void 0!==this.t){var t=e.e,n=e.x;void 0!==t&&(t.x=n,e.e=void 0),void 0!==n&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}},signals_core_module_e.prototype.subscribe=function(e){var t=this;return p((function(){var n=t.value,r=32&this.f;this.f&=-33;try{e(n)}finally{this.f|=r}}))},signals_core_module_e.prototype.valueOf=function(){return this.value},signals_core_module_e.prototype.toString=function(){return this.value+""},signals_core_module_e.prototype.peek=function(){return this.v},Object.defineProperty(signals_core_module_e.prototype,"value",{get:function(){var e=v(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){U>100&&i(),this.v=e,this.i++,L++,M++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{signals_core_module_t()}}}}),(l.prototype=new signals_core_module_e).h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===L)return!0;if(this.g=L,this.f|=1,this.i>0&&!d(this))return this.f&=-2,!0;var e=D;try{c(this),D=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return D=e,a(this),this.f&=-2,!0},l.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}signals_core_module_e.prototype.S.call(this,e)},l.prototype.U=function(e){if(void 0!==this.t&&(signals_core_module_e.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},l.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},l.prototype.peek=function(){if(this.h()||i(),16&this.f)throw this.v;return this.v},Object.defineProperty(l.prototype,"value",{get:function(){1&this.f&&i();var e=v(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),b.prototype.c=function(){var e=this.S();try{8&this.f||void 0===this.x||(this.u=this.x())}finally{e()}},b.prototype.S=function(){1&this.f&&i(),this.f|=1,this.f&=-9,y(this),c(this),M++;var e=D;return D=this,g.bind(this,e)},b.prototype.N=function(){2&this.f||(this.f|=2,this.o=N,N=this)},b.prototype.d=function(){this.f|=8,1&this.f||_(this)};var x,H=R.a.createElement;R.a.createElement=function(e,t){if("string"==typeof e&&t)for(var n in t){var r=t[n];"children"!==n&&r instanceof signals_core_module_e&&(t[n]=r.value)}return H.apply(this,arguments)};var k=new WeakMap;function signals_module_p(e){x&&x(),x=e&&e.S()}var B=H("a").$$typeof;Object.defineProperties(signals_core_module_e.prototype,{$$typeof:{configurable:!0,value:B},type:{configurable:!0,value:function(e){return e.data.value}},props:{configurable:!0,get:function(){return{data:this}}},ref:{configurable:!0,value:null}});var G,F=!1,m=function(){return{}};Object.defineProperty(C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher,"current",{get:function(){return G},set:function(e){if(G=e,!F)if(e&&!function(e){var t=V.get(e);if(void 0!==t)return t;var n=e.useCallback.length<2||/Invalid/.test(e.useCallback);return V.set(e,n),n}(e)){F=!0;var t=e.useReducer(m,{})[1];F=!1;var n=k.get(t);n?n.c=t:(n=function(e){var t;return p((function(){t=this})),t.c=e,t}(t),k.set(t,n)),signals_module_p(n)}else signals_module_p()}});var V=new Map;function signals_module_h(e){return Object(C.useMemo)((function(){return u(e)}),[])}function signals_module_y(e){var t=Object(C.useRef)(e);return t.current=e,Object(C.useMemo)((function(){return w((function(){return t.current()}))}),[])}function j(e){var t=Object(C.useRef)(e);t.current=e,Object(C.useEffect)((function(){return p((function(){return t.current()}))}),[])}function flattenCommands(e,t=null){return Object.keys(e).reduce((n,r)=>{const{icon:o,description:s,name:f,subCommands:E,action:C,canHandleQueries:R,closeOnExecute:I,category:S,executeManually:O}=e[r],T=t?`${t}.${r}`:r,A=E?Object.keys(E).map(e=>`${T}.${e}`):[];return n[T]={id:T,name:f,icon:o,description:s,action:C,canHandleQueries:R,subCommandIds:A,parentId:t,closeOnExecute:I,category:S,executeManually:O},A.length>0?{...n,...flattenCommands(E,T)}:n},{})}const W="%c[COMMANDBAR]";var q={ok:(e,...t)=>console.log(W,"color: green",e,...t),error:(e,...t)=>console.log(W,"color: red",e,...t),warn:(e,...t)=>console.warn(W,"color: orange",e,...t),debug:()=>null};function clamp(e,t,n){return Math.max(t,Math.min(n,e))}const X=new Intl.Collator("en").compare,Q=/(?:\s+|^)-[a-z\d]+/gi,z={interSplit:"[^A-Za-z0-9']+",intraSplit:"[a-z][A-Z]",intraBound:"[A-Za-z][0-9]|[0-9][A-Za-z]|[a-z][A-Z]",interLft:0,interRgt:0,interChars:".",interIns:1/0,intraChars:"[a-z\\d']",intraIns:0,intraContr:"'[a-z]{1,2}\\b",intraMode:0,intraSlice:[1,1/0],intraSub:0,intraTrn:0,intraDel:0,intraFilt:(e,t,n)=>!0,sort:(e,t,n)=>{let{idx:r,chars:o,terms:s,interLft2:f,interLft1:E,start:C,intraIns:R,interIns:I}=e;return r.map((e,t)=>t).sort((e,n)=>o[n]-o[e]||R[e]-R[n]||s[n]+f[n]+.5*E[n]-(s[e]+f[e]+.5*E[e])||I[e]-I[n]||C[e]-C[n]||X(t[r[e]],t[r[n]]))}},lazyRepeat=(e,t)=>0==t?"":1==t?e+"??":t==1/0?e+"*?":e+`{0,${t}}?`;function uFuzzy(e){e=Object.assign({},z,e);const{interLft:t,interRgt:n,intraMode:r,intraSlice:o,intraIns:s,intraSub:f,intraTrn:E,intraDel:C,intraContr:R,intraSplit:I,interSplit:S,intraBound:O,intraChars:T}=e;let{intraRules:A}=e;null==A&&(A=e=>{let t=z.intraSlice,n=0,r=0,R=0,I=0,S=e.length;return S<=4?S>=3&&(R=Math.min(E,1),4==S&&(n=Math.min(s,1))):(t=o,n=s,r=f,R=E,I=C),{intraSlice:t,intraIns:n,intraSub:r,intraTrn:R,intraDel:I}});let P=!!I,D=new RegExp(I,"g"),N=new RegExp(S,"g"),M=new RegExp("^"+S+"|"+S+"$","g"),U=new RegExp(R,"gi");const split=e=>(e=e.replace(M,"").toLowerCase(),P&&(e=e.replace(D,e=>e[0]+" "+e[1])),e.split(N).filter(e=>""!=e)),prepQuery=(o,f=0,E=!1)=>{let C=split(o);if(0==C.length)throw"Empty needle!";let R,I=Array(C.length).fill("");if(C=C.map((e,t)=>e.replace(U,e=>(I[t]=e,""))),1==r)R=C.map((e,t)=>{let{intraSlice:n,intraIns:r,intraSub:o,intraTrn:s,intraDel:f}=A(e);if(r+o+s+f==0)return e+I[t];let[E,C]=n,R=e.slice(0,E),S=e.slice(C),O=e.slice(E,C);1==r&&1==R.length&&R!=O[0]&&(R+="(?!"+R+")");let P=O.length,D=[];if(o)for(let e=0;e0&&(e=")("+e+")("),R=C.map((t,n)=>t.split("").map((e,t,n)=>(1==s&&0==t&&n.length>1&&e[t]!=e[t+1]&&(e+="(?!"+e+")"),e)).join(e)+I[n])}let S=2==t?"(?:\\b|_)":"",O=2==n?"(?:\\b|_)":"",P=O+lazyRepeat(e.interChars,e.interIns)+S;return f>0?E?R=S+"("+R.join(")"+O+"|"+S+"(")+")"+O:(R="("+R.join(")("+P+")(")+")",R="(.?"+S+")"+R+"("+O+".*)"):(R=R.join(P),R=S+R+O),[new RegExp(R,"i"),C,I]},filter=(e,t,n)=>{let r=[],[o]=prepQuery(t);if(null!=n)for(let t=0;t{let[f,E,C]=prepQuery(s,1),[R]=prepQuery(s,2),I=E.length,S=r.length,O=Array(S).fill(0),T={idx:Array(S),start:O.slice(),chars:O.slice(),terms:O.slice(),interIns:O.slice(),intraIns:O.slice(),interLft2:O.slice(),interRgt2:O.slice(),interLft1:O.slice(),interRgt1:O.slice(),ranges:Array(S)},A=1==t||1==n,P=0;for(let s=0;s=R){let e=O[o+1].toLowerCase().indexOf(f);e>-1&&(X.push(N,e,R),N+=refineMatch(O,o,e,R),s=f,T=R,P=!0,0==r&&(D=N))}if(A||P){let e=N-1,r=N+T,E=!0,C=!0;if(-1==e||x.test(S[e]))P&&U++;else{if(2==t){M=!0;break}if(L&&H.test(S[e]+S[e+1]))P&&k++;else{if(1==t){let e=O[o+1],t=N+T;if(e.length>=R){let n,r=0,E=!1,C=new RegExp(f,"ig");for(;n=C.exec(e);){r=n.index;let e=t+r,o=e-1;if(-1==o||x.test(S[o])){U++,E=!0;break}if(H.test(S[o]+S[e])){k++,E=!0;break}}if(E){X.push(N,r,R),N+=refineMatch(O,o,r,R),s=f,T=R,P=!0;break}}M=!0;break}E=!1}}if(r==S.length||x.test(S[r]))P&&B++;else{if(2==n){M=!0;break}if(L&&H.test(S[r-1]+S[r]))P&&G++;else{if(1==n){M=!0;break}C=!1}}P&&(F+=R,E&&C&&V++)}if(T>R&&(q+=T-R),r>0&&(W+=O[o-1].length),!e.intraFilt(f,s,N)){M=!0;break}r0?0:1/0,I=E-3;for(let r=2;r0&&(t.push(o,f),o=f=n)}f>o&&t.push(o,f),P++}}if(P{let o=e[t]+e[t+1].slice(0,n);return e[t-1]+=o,e[t]=e[t+1].slice(n,n+r),e[t+1]=e[t+1].slice(n+r),o.length};return{search:(...t)=>((t,n,r=!1,o=1e3,s)=>{let f,E=null,C=null,R=[];if(n=n.replace(Q,e=>(R.push(e.trim().slice(1)),"")),R.length>0&&(f=new RegExp(R.join("|"),"i"),""==n.trim())){let e=[];for(let n=0;n1){let n=e.slice().sort((e,t)=>t.length-e.length);for(let e=0;ee.join(" ")),C=[];let r=new Set;for(let e=0;e!r.has(e)),o=filter(t,E[e],n);for(let e=0;e0?s:filter(t,n)]);let I=null,S=null;if(R.length>0&&(C=C.map(e=>e.filter(e=>!f.test(t[e])))),C.reduce((e,t)=>e+t.length,0)<=o){I={},S=[];for(let n=0;n0)for(let e=0;e{let e={A:"ÁÀÃÂÄĄ",a:"áàãâäą",E:"ÉÈÊËĖ",e:"éèêëę",I:"ÍÌÎÏĮ",i:"íìîïį",O:"ÓÒÔÕÖ",o:"óòôõö",U:"ÚÙÛÜŪŲ",u:"úùûüūų",C:"ÇČ",c:"çč",N:"Ñ",n:"ñ",S:"Š",s:"š"},t=new Map,n="";for(let r in e)e[r].split("").forEach(e=>{n+=e,t.set(e,r)});let r=new RegExp(`[${n}]`,"g"),replacer=e=>t.get(e);return e=>{if("string"==typeof e)return e.replace(r,replacer);let t=Array(e.length);for(let n=0;nt?`${e}`:e,_append=(e,t)=>e+t;uFuzzy.latinize=Y,uFuzzy.permute=e=>permute([...Array(e.length).keys()]).sort((e,t)=>{for(let n=0;nt.map(t=>e[t])),uFuzzy.highlight=function highlight(e,t,n=_mark,r="",o=_append){let s=o(r,n(e.substring(0,t[0]),!1));r=null!==s?s:r;for(let f=0;ft.parentId===e||!e&&o.includes(t.id)),!t)return s.sort((t,n)=>function sortCommands(e,t,n,r){const o=r.includes(e.id),s=r.includes(t.id);if(o&&!s)return-1;if(!o&&s)return 1;if(o&&s)return r.indexOf(e.id)-r.indexOf(t.id);const f=n.includes(e.id),E=n.includes(t.id);return f&&!E?-1:!f&&E?1:e.name.localeCompare(t.name)}(t,n,r,e?[]:o)).map(e=>e.id);const f=s.map(({name:e,description:t})=>e+" "+t),[E,,C]=$.search(f,t.toLowerCase());return C.map(e=>s[E[e]].id)}(t.selectedCommandGroup,t.searchWord,t.commands,t.favouriteCommands,t.recentCommands);break;case J.HIGHLIGHT_NEXT_COMMAND:t.highlightedItem=clamp(t.highlightedItem+1,0,t.availableCommandIds.length-1);break;case J.HIGHLIGHT_PREVIOUS_COMMAND:t.highlightedItem=clamp(t.highlightedItem-1,0,t.availableCommandIds.length-1);break;case J.HIGHLIGHT_NEXT_OPTION:t.highlightedOption=clamp(t.highlightedOption+1,0,Object.keys(t.result.options).length-1);break;case J.HIGHLIGHT_PREVIOUS_OPTION:t.highlightedOption=clamp(t.highlightedOption-1,0,Object.keys(t.result.options).length-1);break;case J.SET_SEARCH_WORD:assert(n.type===Z.UPDATE_SEARCH),t.searchWord=n.searchWord;break;case J.SET_COMMAND_QUERY:assert(n.type===Z.UPDATE_COMMAND_QUERY),t.commandQuery=n.commandQuery,t.commandQueryDirty=!0;break;case J.EXPAND:t.expanded=!0;break;case J.SET_ACTIVE_COMMAND:assert(n.type===Z.EXECUTE_COMMAND),t.activeCommandId=n.commandId,t.activeCommandMessage=n.message;break;case J.UNSET_ACTIVE_COMMAND:t.activeCommandId=null,t.activeCommandMessage=null;break;case J.UPDATE_RESULT:assert(n.type===Z.UPDATE_RESULT),assert("boolean"==typeof n.result.success),t.result={options:{},message:"Command executed",view:null,success:!1,...n.result},t.resultCommandId=t.activeCommandId,t.commandQueryDirty=!1;break;case J.RESET_OPTION_HIGHLIGHT:t.highlightedOption=0;break;case J.RESET_SEARCH_OR_LEAVE_GROUP:t.commandQuery?t.commandQuery="":t.searchWord?t.searchWord="":t.selectedCommandGroup=t.selectedCommandGroup?t.commands[t.selectedCommandGroup].parentId:null;break;case J.UNSET_RESULT:t.result=null,t.resultCommandId=null,t.commandQuery="";break;case J.LEAVE_GROUP:t.selectedCommandGroup=t.selectedCommandGroup?t.commands[t.selectedCommandGroup].parentId:null;break;case J.SET_GROUP:assert(n.type===Z.SELECT_GROUP),t.selectedCommandGroup=n.commandId;break;case J.ADD_FAVOURITE:assert(n.type===Z.ADD_FAVOURITE),t.favouriteCommands.includes(n.commandId)||(t.favouriteCommands=[...t.favouriteCommands,n.commandId]);break;case J.REMOVE_FAVOURITE:assert(n.type===Z.REMOVE_FAVOURITE),t.favouriteCommands=t.favouriteCommands.filter(e=>e!==n.commandId);break;case J.ADD_RECENTLY_USED:if(assert(n.type===Z.EXECUTE_COMMAND),!t.commands[n.commandId].action)break;t.recentCommands.includes(n.commandId)&&(t.recentCommands=t.recentCommands.filter(e=>e!==n.commandId)),t.recentCommands.unshift(n.commandId),t.recentCommands.length>5&&t.recentCommands.pop();break;default:throw Error(`Action ${e} not implemented`)}}const commandBarReducer=(e,t)=>function transition(e,t,n){var r,o,s;let f=null!==(o=null===(r=ee.states[e.status].on)||void 0===r?void 0:r[t.type])&&void 0!==o?o:null;f||(q.error(`No transition found for event "${t.type}" in state "${e.status}"`),f={target:e.status});const E={...e,status:"string"==typeof f?f:f.target};return n&&"object"==typeof f&&(null===(s=f.actions)||void 0===s||s.forEach(e=>n(e,E,t))),q.debug(`Transitioned from "${e.status}" to "${E.status}" with event "${t.type}"`),E}(e,t,runAction);var te=n(19);var ne=R.a.memo(({children:e})=>R.a.createElement("span",{className:te.iconWrap},e)),ae=n(20);var re=R.a.memo(()=>{const{state:{showBranding:e}}=useCommandBarState(),{translate:t}=useIntl();return e?R.a.createElement("a",{href:"https://helzle.it/projects?source=commandbar",title:t("CommandBarFooter.branding","Made with love by Sebastian Helzle"),target:"_blank",rel:"noreferrer noopener",className:ae.madeWithLove},R.a.createElement("small",null,t("CommandBarFooter.brandingSmall","Made with love by")),R.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 180 180"},R.a.createElement("defs",null,R.a.createElement("linearGradient",{id:"a",gradientUnits:"userSpaceOnUse",x1:"280.25",y1:"377.003",x2:"373.261",y2:"377.003"},R.a.createElement("stop",{offset:"0",stopColor:"#297AAC"}),R.a.createElement("stop",{offset:"1",stopColor:"#53AADA"}))),R.a.createElement("path",{d:"M0 180.017h37.287L71.35 52.898H34.061zM48.717 0l-9.083 33.898h36.675L85.392 0z",fill:"#B9B7B3"}),R.a.createElement("path",{d:"M335.972 313.444H288.25l-8 28.306h47.691l-28.03 98.813h39.287l34.063-127.119z",fill:"url(#a)",transform:"translate(-195.462 -260.325)"}))):null});function IconBack(){return R.a.createElement("svg",{viewBox:"0 0 448 512"},R.a.createElement("path",{fill:"currentColor",d:"m257.5 445.1-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}))}function IconNeos(){return R.a.createElement("svg",{viewBox:"0 0 512 512"},R.a.createElement("path",{fill:"currentColor",d:"M415.44 512h-95.11L212.12 357.46v91.1L125.69 512H28V29.82L68.47 0h108.05l123.74 176.13V63.45L386.69 0h97.69v461.5zM38.77 35.27V496l72-52.88V194l215.5 307.64h84.79l52.35-38.17h-78.27L69 13zm82.54 466.61 80-58.78v-101l-79.76-114.4v220.94L49 501.89h72.34zM80.63 10.77l310.6 442.57h82.37V10.77h-79.75v317.56L170.91 10.77zM311 191.65l72 102.81V15.93l-72 53v122.72z"}))}function IconSpinner(){return R.a.createElement("svg",{viewBox:"0 0 512 512"},R.a.createElement("path",{fill:"currentColor",d:"M288 39.056v16.659c0 10.804 7.281 20.159 17.686 23.066C383.204 100.434 440 171.518 440 256c0 101.689-82.295 184-184 184-101.689 0-184-82.295-184-184 0-84.47 56.786-155.564 134.312-177.219C216.719 75.874 224 66.517 224 55.712V39.064c0-15.709-14.834-27.153-30.046-23.234C86.603 43.482 7.394 141.206 8.003 257.332c.72 137.052 111.477 246.956 248.531 246.667C393.255 503.711 504 392.788 504 256c0-115.633-79.14-212.779-186.211-240.236C302.678 11.889 288 23.456 288 39.056z"}))}function IconStar(){return R.a.createElement("svg",{viewBox:"0 0 576 512"},R.a.createElement("path",{fill:"currentColor",d:"M528.1 171.5 382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6zM388.6 312.3l23.7 138.4L288 385.4l-124.3 65.3 23.7-138.4-100.6-98 139-20.2 62.2-126 62.2 126 139 20.2-100.6 98z"}))}function IconPlay(){return R.a.createElement("svg",{viewBox:"0 0 512 512"},R.a.createElement("path",{fill:"currentColor",d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z"}))}function IconRepeat(){return R.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},R.a.createElement("path",{fill:"currentColor",d:"M0 224c0 17.7 14.3 32 32 32s32-14.3 32-32c0-53 43-96 96-96H320v32c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-9.2-9.2-22.9-11.9-34.9-6.9S320 19.1 320 32V64H160C71.6 64 0 135.6 0 224zm512 64c0-17.7-14.3-32-32-32s-32 14.3-32 32c0 53-43 96-96 96H192V352c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V448H352c88.4 0 160-71.6 160-160z"}))}var oe=n(6);var se=R.a.memo(()=>{const{state:{activeCommandId:e,resultCommandId:t,activeCommandMessage:n,commands:r,result:o,selectedCommandGroup:s,expanded:f},Icon:E}=useCommandBarState(),C=signals_module_y(()=>{var n,s;const f=null!==(n=e.value)&&void 0!==n?n:t.value;return f&&f?null!==(s=r.value[f])&&void 0!==s?s:o.value.options[f]:null}),I=null!==e.value;return f.value?R.a.createElement("footer",{className:oe.commandBarFooter},I?R.a.createElement("span",{className:oe.activity},R.a.createElement(ne,null,R.a.createElement(IconSpinner,null)),R.a.createElement("em",null,C.value.name,n.value?"﹘"+n.value:"")):C.value?R.a.createElement("span",{className:oe.breadcrumb},R.a.createElement(E,{icon:C.value.icon}),R.a.createElement("small",null,C.value.name)):s.value?R.a.createElement("span",{className:oe.breadcrumb},R.a.createElement(E,{icon:r.value[s.value].icon}),R.a.createElement("small",null,r.value[s.value].name)):R.a.createElement(ne,null,R.a.createElement(IconNeos,null)),R.a.createElement(re,null)):null}),ie=n(7);let ce=null;var le=R.a.memo(()=>{var e;const{state:t,actions:n}=useCommandBarState(),{executeCommand:r}=useCommandExecutor(),{translate:o}=useIntl(),s=Object(C.useRef)(),f=t.commands.value[t.activeCommandId.value||t.resultCommandId.value],E=Object(C.useCallback)(e=>{var o;t.status.value===K.DISPLAYING_RESULT?(n.UPDATE_COMMAND_QUERY(e.target.value),(null===(o=t.commands.value[t.resultCommandId.value])||void 0===o?void 0:o.executeManually)||(ce&&clearTimeout(ce),ce=setTimeout(()=>r(t.resultCommandId.value),500))):n.UPDATE_SEARCH(e.target.value)},[]),I=Object(C.useCallback)(e=>{"Escape"===e.key&&s.current.value&&(e.preventDefault(),e.stopPropagation())},[s.current]);return j(()=>{var e;t.status.value!==K.EXECUTING_COMMAND&&(null===(e=s.current)||void 0===e||e.focus())}),R.a.createElement(R.a.Fragment,null,R.a.createElement("input",{ref:s,className:ie.searchBox,type:"search",placeholder:t.status.value===K.DISPLAYING_RESULT?o("SearchBox.commandQuery.placeholder","Enter the query for the command"):o("SearchBox.placeholder","What do you want to do today?"),disabled:t.status.value===K.DISPLAYING_RESULT&&!(null==f?void 0:f.canHandleQueries),autoFocus:!0,onChange:E,onKeyUp:I,value:t.status.value===K.DISPLAYING_RESULT?t.commandQuery:t.searchWord,"data-testid":"SearchBox"}),!t.expanded.value&&R.a.createElement("button",{className:ie.expandButton,onClick:n.EXPAND,title:o("SearchBox.expand.title","Expand to show all commands")},R.a.createElement(ne,null,R.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},R.a.createElement("path",{fill:"currentColor",d:"M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"})))),t.status.value===K.DISPLAYING_RESULT&&(null===(e=t.commands.value[t.resultCommandId.value])||void 0===e?void 0:e.executeManually)&&!t.activeCommandId.value&&R.a.createElement("button",{className:[ie.executeButton,t.commandQueryDirty.value?ie.commandQueryDirty:""].join(" "),onClick:()=>r(t.resultCommandId.value),title:o("SearchBox.execute.title","Execute the command")},R.a.createElement(ne,null,t.commandQueryDirty.value?R.a.createElement(IconPlay,null):R.a.createElement(IconRepeat,null))))}),ue=n(15);var de=R.a.memo(()=>{const{state:e,actions:t}=useCommandBarState(),n=signals_module_y(()=>e.status.value==K.DISPLAYING_RESULT);return R.a.createElement("header",{className:ue.commandBarHeader},(n.value||e.selectedCommandGroup.value)&&R.a.createElement("button",{type:"button",onClick:n.value?t.CANCEL:t.GO_TO_PARENT_GROUP,className:ue.backButton,title:"Back"},R.a.createElement(ne,null,R.a.createElement(IconBack,null))),R.a.createElement(le,null))}),me=n(4);var _e=R.a.memo((function CommandListItem({command:e,onItemSelect:t,highlightedId:n,onToggleFavourite:r}){const{state:{favouriteCommands:o},Icon:s}=useCommandBarState(),{translate:f}=useIntl(),{id:E,name:C,description:I,icon:S,action:O}=e,T=function getCommandType({subCommandIds:e,category:t,canHandleQueries:n,action:r},o){let s="command";return t||((null==e?void 0:e.length)>0?s="category":n?s="query":"string"==typeof r&&(s="link"),o("CommandListItem.type."+s,s))}(e,f),A=signals_module_y(()=>n.value===E),P=signals_module_y(()=>o.value.includes(E));return R.a.createElement("li",{className:classnames(me.commandListItem,A.value&&me.highlighted),onClick:()=>t(E),"data-testid":"CommandListItem"},R.a.createElement(s,{icon:S}),R.a.createElement("span",{className:me.label},R.a.createElement("span",null,C),I&&R.a.createElement("span",{className:me.description},"string"==typeof I?I:I())),r&&O&&R.a.createElement("button",{type:"button",className:classnames(me.favouriteButton,P.value&&me.isFavourite),title:f("CommandListItem.toggleFavourite","Toggle favourite"),onClick:e=>{e.stopPropagation(),r(E)}},R.a.createElement(ne,null,R.a.createElement(IconStar,null))),R.a.createElement("small",{className:me.type},T))})),fe=n(9);var he=R.a.memo(()=>{const{state:{commands:e,highlightedItem:t,availableCommandIds:n,status:r,searchWord:o,favouriteCommands:s,recentCommands:f,selectedCommandGroup:E},actions:{ADD_FAVOURITE:I,REMOVE_FAVOURITE:S}}=useCommandBarState(),{translate:O}=useIntl(),{executeCommand:T}=useCommandExecutor(),A=R.a.useRef(null);j(()=>{var e,n;null===(n=null===(e=A.current)||void 0===e?void 0:e.querySelector(`li:nth-child(${t.value})`))||void 0===n||n.scrollIntoView({behavior:"smooth",block:"center"})});const P=Object(C.useCallback)(e=>{s.value.includes(e)?S(e):I(e)},[s]),D=signals_module_y(()=>o.value||E.value?[]:n.value.filter(e=>f.value.includes(e))),N=signals_module_y(()=>o.value||E.value?n.value:n.value.filter(e=>!f.value.includes(e))),M=signals_module_y(()=>n.value[t.value]);return R.a.createElement("nav",{className:classnames(fe.results,r.value!==K.IDLE&&fe.disabled),"data-testid":"CommandList",ref:A},D.value.length>0&&R.a.createElement(R.a.Fragment,null,R.a.createElement("h6",null,O("CommandList.suggestions","Recently used")),R.a.createElement("ul",null,D.value.map(t=>R.a.createElement(_e,{key:t,command:e.value[t],onItemSelect:T,highlightedId:M,onToggleFavourite:P})))),N.value.length>0&&R.a.createElement(R.a.Fragment,null,R.a.createElement("h6",null,O("CommandList.heading","Commands")),R.a.createElement("ul",null,N.value.map(t=>R.a.createElement(_e,{key:t,command:e.value[t],onItemSelect:T,highlightedId:M,onToggleFavourite:P})))),0===n.value.length&&R.a.createElement("small",{className:fe.noResults},O("CommandList.noCommandsMessage","No matching commands found")))}),pe=n(10);var CommandResultsView_CommandResultsView=()=>{var e;const{state:{result:t,highlightedOption:n,activeCommandId:r}}=useCommandBarState(),{executeCommand:o}=useCommandExecutor(),{translate:s}=useIntl(),f=R.a.useRef(null),E=signals_module_y(()=>t.value?Object.values(t.value.options)[n.value].id:null),C=null!==r.value;j(()=>{var e,t;const r=n.value;null===(t=null===(e=f.current)||void 0===e?void 0:e.querySelector(`li:nth-child(${r})`))||void 0===t||t.scrollIntoView({behavior:"smooth",block:"center"})});const{options:I,view:S,message:O}=null!==(e=t.value)&&void 0!==e?e:{};return R.a.createElement("div",{className:pe.commandResultsView},!C&&O&&R.a.createElement("h6",{className:pe.message},O),C?R.a.createElement("div",null,s("CommandResultsView.waitingForResults","Waiting for results…")):"",!C&&S?R.a.createElement("div",null,S):"",!C&&I&&R.a.createElement("nav",{className:pe.results,ref:f},R.a.createElement("ul",null,Object.keys(I).map(e=>R.a.createElement(_e,{key:e,command:I[e],onItemSelect:o,highlightedId:E})))))},ve=n(11);var ge=R.a.memo(({handleToggle:e,disabled:t=!1,label:n,title:r,active:o})=>R.a.createElement("button",{className:classnames(ve.toggleButton,o&&ve.toggleButtonActive),onClick:e,disabled:t,title:r},R.a.createElement("span",null,n),R.a.createElement("span",{className:ve.buttonIcon},"⌘K")));const Ee=Object(C.createContext)({}),useCommandBarState=()=>Object(C.useContext)(Ee);const CommandBarStateProvider=({commands:e,children:t,IconComponent:n,userPreferences:r})=>{const{state:o,dispatch:s}=Object(C.useMemo)(()=>function createAppState(e){const t=u(e);return{state:{activeCommandId:w(()=>t.value.activeCommandId),activeCommandMessage:w(()=>t.value.activeCommandMessage),availableCommandIds:w(()=>t.value.availableCommandIds),commandQuery:w(()=>t.value.commandQuery),commandQueryDirty:w(()=>t.value.commandQueryDirty),commands:w(()=>t.value.commands),expanded:w(()=>t.value.expanded),favouriteCommands:w(()=>t.value.favouriteCommands),highlightedItem:w(()=>t.value.highlightedItem),highlightedOption:w(()=>t.value.highlightedOption),recentCommands:w(()=>t.value.recentCommands),result:w(()=>t.value.result),resultCommandId:w(()=>t.value.resultCommandId),searchWord:w(()=>t.value.searchWord),selectedCommandGroup:w(()=>t.value.selectedCommandGroup),showBranding:w(()=>t.value.showBranding),status:w(()=>t.value.status)},dispatch:e=>{t.value=commandBarReducer(t.value,e)}}}({activeCommandId:null,activeCommandMessage:null,availableCommandIds:Object.keys(e),commandQuery:"",commandQueryDirty:!1,commands:flattenCommands(e),expanded:!1,favouriteCommands:r.favouriteCommands,highlightedItem:0,highlightedOption:0,recentCommands:r.recentCommands,result:null,resultCommandId:null,searchWord:"",selectedCommandGroup:null,showBranding:r.showBranding,status:K.COLLAPSED}),[]),f=Object(C.useMemo)(()=>({[Z.RESET_SEARCH]:()=>s({type:Z.RESET_SEARCH}),[Z.HIGHLIGHT_NEXT_ITEM]:()=>s({type:Z.HIGHLIGHT_NEXT_ITEM}),[Z.HIGHLIGHT_PREVIOUS_ITEM]:()=>s({type:Z.HIGHLIGHT_PREVIOUS_ITEM}),[Z.CANCEL]:()=>s({type:Z.CANCEL}),[Z.SELECT_GROUP]:e=>s({type:Z.SELECT_GROUP,commandId:e}),[Z.GO_TO_PARENT_GROUP]:()=>s({type:Z.GO_TO_PARENT_GROUP}),[Z.UPDATE_SEARCH]:e=>s({type:Z.UPDATE_SEARCH,searchWord:e}),[Z.UPDATE_COMMAND_QUERY]:e=>s({type:Z.UPDATE_COMMAND_QUERY,commandQuery:e}),[Z.EXECUTE_COMMAND]:async(e,t)=>(s({type:Z.EXECUTE_COMMAND,commandId:e,message:t}),r.addRecentCommand(e).catch(e=>q.error("Could not add recent command",e))),[Z.FINISH_COMMAND]:()=>s({type:Z.FINISH_COMMAND}),[Z.UPDATE_RESULT]:e=>s({type:Z.UPDATE_RESULT,result:e}),[Z.EXPAND]:()=>s({type:Z.EXPAND}),[Z.ADD_FAVOURITE]:e=>(s({type:Z.ADD_FAVOURITE,commandId:e}),r.setFavouriteCommands(o.favouriteCommands.value).catch(e=>q.error("Could not update favourite commands",e))),[Z.REMOVE_FAVOURITE]:e=>(s({type:Z.REMOVE_FAVOURITE,commandId:e}),r.setFavouriteCommands(o.favouriteCommands.value).catch(e=>q.error("Could not update favourite commands",e)))}),[]),E=Object(C.useCallback)(({icon:e,spin:t=!1})=>R.a.createElement(ne,null,R.a.createElement(n,{icon:e,spin:t})),[]);return R.a.createElement(Ee.Provider,{value:{state:o,actions:f,Icon:E}},t)},ye=R.a.createContext({}),useCommandExecutor=()=>R.a.useContext(ye),CommandBarExecutor=({children:e,toggleOpen:t,dialogRef:n,open:r})=>{const{state:o,actions:s}=useCommandBarState(),f=useFunctionRef(e=>{if(r&&!e.defaultPrevented)if("k"===e.key&&(e.metaKey||e.ctrlKey)&&(null==n?void 0:n.current.contains(e.target)))t(),e.stopPropagation(),e.preventDefault();else if("Escape"===e.key)e.stopPropagation(),e.preventDefault(),o.selectedCommandGroup.value||o.searchWord.value||o.commandQuery.value||o.result.value?s.CANCEL():t();else if("ArrowDown"===e.key)e.stopPropagation(),e.preventDefault(),s.HIGHLIGHT_NEXT_ITEM();else if("ArrowUp"===e.key)e.stopPropagation(),e.preventDefault(),s.HIGHLIGHT_PREVIOUS_ITEM();else if("Enter"===e.key){e.stopPropagation(),e.preventDefault();let t=o.availableCommandIds.value[o.highlightedItem.value];o.status.value===K.DISPLAYING_RESULT&&(t=!o.commandQueryDirty.value&&Object.values(o.result.value.options).length?Object.keys(o.result.value.options)[o.highlightedOption.value]:o.resultCommandId.value),t&&E(t)}}),E=Object(C.useCallback)(async e=>{var n,r,f;const E=null!==(r=null===(n=o.result.value)||void 0===n?void 0:n.options[e])&&void 0!==r?r:o.commands.value[e],{action:C,canHandleQueries:R,subCommandIds:I,name:S}=E;if((null==I?void 0:I.length)>0)return void s.SELECT_GROUP(e);if(assert(C,`Command ${e} has no action`),"string"==typeof C)return await s.EXECUTE_COMMAND(e,"Loading url"),0===C.indexOf("http")&&0!==C.indexOf(document.location.origin)?null===(f=window.open(C,"_blank","noopener,noreferrer"))||void 0===f||f.focus():window.location.href=C,s.FINISH_COMMAND();s.EXECUTE_COMMAND(e,"Running command");const O=C(R?o.commandQuery.value:void 0);if(O.then)O.then(e=>{if(e&&!e.success)throw new Error(`The command "${S}" failed`)}).catch(e=>{q.error("Command error",S,e)}).finally(()=>{s.FINISH_COMMAND()});else if(O.next){const e=O;for await(const t of e)s.UPDATE_RESULT(t);s.FINISH_COMMAND()}else q.error("Command result is not a promise or generator",O);E.closeOnExecute&&t()},[o.searchWord,o.commands,o.result]),I=useFunctionRef(e=>{E(e)});return Object(C.useEffect)(()=>{if(!r)return;const windowKeyEventHandler=e=>f.current(e);return window.addEventListener("keydown",windowKeyEventHandler),()=>window.removeEventListener("keydown",windowKeyEventHandler)},[r]),R.a.createElement(ye.Provider,{value:{executeCommand:I.current}},e)},Ce=Object(C.createContext)({}),useIntl=()=>Object(C.useContext)(Ce),IntlProvider=({translate:e,children:t})=>R.a.createElement(Ce.Provider,{value:{translate:e}},t);var be=n(8);var CommandBarDialog_CommandBarDialog=({onDrag:e,open:t,toggleOpen:n})=>{const{state:{expanded:r,result:o}}=useCommandBarState(),s=Object(C.useRef)(null),f=signals_module_h(!1),E=signals_module_h({left:window.innerWidth/2-300,top:window.innerHeight/2-20}),I=signals_module_h({offsetLeft:0,offsetTop:0}),S=signals_module_h(!1),O=signals_module_y(()=>{const{left:e,top:t}=E.value;return S.value?{left:e+"px",top:t+"px",translate:"none",visibility:f.value?"hidden":"visible"}:{}}),T=Object(C.useCallback)((e,t)=>{const n=s.current.getBoundingClientRect();E.value={left:clamp(e,0,window.innerWidth-n.width),top:clamp(t,0,window.innerHeight-n.height)}},[]),A=Object(C.useCallback)(t=>{"INPUT"!==t.target.tagName&&(console.debug("dragstart"),t.dataTransfer.setData("text/plain","CommandBar"),t.dataTransfer.dropEffect="move",t.dataTransfer.effectAllowed="move",h(()=>{I.value={offsetLeft:t.clientX-s.current.offsetLeft,offsetTop:t.clientY-s.current.offsetTop},S.value=!0}),e&&e(!0))},[s.current]),P=Object(C.useCallback)(t=>{const{clientX:n,clientY:r}=t;console.debug("dragdrop",n,r,I.value),h(()=>{f.value=!1,T(n-I.value.offsetLeft,r-I.value.offsetTop)}),e&&e(!1)},[s.current]),D=Object(C.useCallback)(()=>T(E.value.left,E.value.top),[]);return Object(C.useEffect)(()=>{var e,n;if(t)return null===(n=null===(e=s.current)||void 0===e?void 0:e.parentElement)||void 0===n||n.addEventListener("drop",P),window.addEventListener("resize",D),()=>{var e,t;null===(t=null===(e=s.current)||void 0===e?void 0:e.parentElement)||void 0===t||t.removeEventListener("drop",P),window.removeEventListener("resize",D)}},[t,D,P]),t?R.a.createElement("dialog",{ref:s,className:classnames(be.commandBar,o.value&&be.hasResults),open:t,draggable:!0,onDragStart:A,onDrag:()=>f.value=!0,style:O.value,"data-testid":"CommandBarDialog"},R.a.createElement(CommandBarExecutor,{toggleOpen:n,dialogRef:s,open:t},R.a.createElement(de,null),R.a.createElement("div",{className:classnames(be.resultsWrap,r.value&&be.expanded)},r.value&&!o.value&&R.a.createElement(he,null),o.value&&R.a.createElement(CommandResultsView_CommandResultsView,null)),R.a.createElement(se,null))):null};var src_CommandBar=({commands:e,open:t,toggleOpen:n,onDrag:r,IconComponent:o,userPreferences:s,translate:f})=>R.a.createElement(IntlProvider,{translate:f},R.a.createElement(CommandBarStateProvider,{commands:e,IconComponent:o,userPreferences:s},R.a.createElement(CommandBarDialog_CommandBarDialog,{onDrag:r,open:t,toggleOpen:n})));async function fetchData(e,t,n="GET"){return t&&"GET"===n&&(e=Object.keys(t).reduce((e,n)=>e+"&"+n+"="+encodeURIComponent(t[n]),e+"?")),fetch(e,{method:n,credentials:"include",body:t&&"POST"===n?JSON.stringify(t):void 0,headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(e=>{var t;if(200!==e.status)throw new Error(`The request failed with code ${e.status}: "${e.statusText}"`);return(null===(t=e.headers.get("Content-Type"))||void 0===t?void 0:t.includes("application/json"))?e.json():e.text()})}async function setPreference(e,t){return fetchData(e,t,"POST")}async function getPreferences(){return fetchData("/neos/shel-neos-commandbar/preferences/getpreferences")}async function setFavouriteCommands(e){return setPreference("/neos/shel-neos-commandbar/preferences/setfavourites",{commandIds:e})}async function addRecentCommand(e){return setPreference("/neos/shel-neos-commandbar/preferences/addrecentcommand",{commandId:e})}async function addRecentDocument(e){return setPreference("/neos/shel-neos-commandbar/preferences/addrecentdocument",{nodeContextPath:e})}async function getCommands(){return fetchData("/neos/service/data-source/shel-neos-commandbar-commands")}async function searchNeosDocs(e){return e?fetchData("/neos/service/data-source/shel-neos-commandbar-search-neos-docs",{query:e}):{}}async function searchNeosPackages(e){return e?fetchData("/neos/service/data-source/shel-neos-commandbar-search-neos-packages",{query:e}):{}}async function searchNodes(e,t){return e?fetchData("service/data-source/shel-neos-commandbar-search-nodes",{query:e,node:t}):[]}var Re=n(5),Ie=n(12),Se=n(21);const CommandBarUiPlugin_IconComponent=({icon:e,spin:t=!1})=>C.createElement(P.Icon,{icon:e,spin:t});class CommandBarUiPlugin_CommandBarUiPlugin extends C.PureComponent{constructor(e){super(e),this.buildCommandsFromHotkeys=()=>{const{hotkeyRegistry:e,handleHotkeyAction:t,config:n}=this.props;return e.getAllAsList().reduce((e,{id:r,description:o,action:s})=>(n.hotkeys.filter.includes(r)||(e[r]={name:o,description:r,icon:this.mapHotkeyIdToIcon(r),action:async()=>{t(s())},closeOnExecute:!0}),e),{})},this.buildCommandsFromWorkspaces=()=>{const{allowedTargetWorkspaces:e}=this.props.neos.configuration;return Object.keys(e).reduce((t,n)=>{const r=e[n];return r.readonly||(t[n]={name:r.title,description:r.description,icon:"cube",action:async()=>{this.props.changeBaseWorkspaceAction(r.name)},closeOnExecute:!0}),t},{})},this.buildCommandsFromEditPreviewModes=()=>{const{setEditPreviewMode:e,editPreviewModes:t,i18nRegistry:n}=this.props;return Object.keys(t).reduce((r,o)=>{const{title:s,isEditingMode:f}=t[o];return r[o]={name:n.translate(s),description:()=>this.props.editPreviewMode===o?this.translate("CommandBarUiPlugin.command.switchEditPreviewMode.active","Currently active"):"",icon:f?"pencil":"eye",action:async()=>e(o)},r},{})},this.handleAddNode=async()=>{const{addNode:e,documentNode:t,focusedNodeContextPath:n,toggleCommandBar:r}=this.props;r(),e(n||t.contextPath,void 0,"after")},this.showRecentDocuments=async function*(){const{recentDocuments:e}=this.state,{setActiveContentCanvasContextPath:t,setActiveContentCanvasSrc:n}=this.props;e.length?yield{success:!0,message:this.translate("CommandBarUiPlugin.command.recentDocuments.options","Recent documents"),options:e.reduce((e,{name:r,contextPath:o,uri:s,icon:f})=>(e[o]={id:o,name:r,icon:f,action:async()=>{n(s),t(o)},closeOnExecute:!0},e),{})}:yield{success:!1,message:this.translate("CommandBarUiPlugin.command.searchDocuments.searchFailed","Search failed")}},this.handleSearchNode=async function*(e){const{siteNode:t,setActiveContentCanvasSrc:n}=this.props;let r;yield{success:!0,message:this.translate("CommandBarUiPlugin.command.searchDocuments.searching",{query:e})};const o=await E.searchNodes(e,t.contextPath).catch(e=>{q.error("Could not search nodes",e),r=e.message});o?yield{success:!0,message:this.translate("CommandBarUiPlugin.command.searchDocuments.matches",{matches:o.length}),options:o.reduce((e,{name:t,nodetype:r,contextPath:o,uri:s,icon:f})=>s?(e[o]={id:o,name:t,category:r,action:async()=>{n(s)},closeOnExecute:!0,icon:f},e):e,{})}:yield{success:!1,message:this.translate("CommandBarUiPlugin.command.searchDocuments.searchFailed","Search failed"),view:r}},this.handleSearchNeosDocs=async function*(e){let t;yield{success:!0,message:this.translate("CommandBarUiPlugin.command.documentation.searching",{query:e},`Search for "${e}"`)};const n=await s.searchNeosDocs(e).catch(e=>{q.error("Could not search Neos docs",e),t=e.message});t||!n?yield{success:!1,message:this.translate("CommandBarUiPlugin.command.documentation.error","Search failed"),view:t}:yield{success:!0,message:this.translate("CommandBarUiPlugin.command.documentation.matches",{matches:Object.keys(n).length},Object.values(n).length+" options match your query"),options:n}},this.handleSearchNeosPackages=async function*(e){let t;yield{success:!0,message:this.translate("CommandBarUiPlugin.command.packages.searching",{query:e},`Search for "${e}"`)};const n=await f.searchNeosPackages(e).catch(e=>{q.error("Could not search Neos packages",e),t=e.message});t||!n?yield{success:!1,message:this.translate("CommandBarUiPlugin.command.packages.error","Search failed"),view:t}:yield{success:!0,message:this.translate("CommandBarUiPlugin.command.packages.matches",{matches:Object.values(n).length},Object.values(n).length+" options match your query"),options:n}},this.handlePublish=async()=>{const{publishableNodesInDocument:e,publishAction:t,baseWorkspace:n}=this.props;return t(e.map(e=>e.contextPath),n),{success:!0,message:this.translate("CommandBarUiPlugin.command.publish.success",{count:e.length},`Published ${e.length} changes`)}},this.handlePublishAll=async()=>{const{publishableNodes:e,publishAction:t,baseWorkspace:n}=this.props;return t(e.map(e=>e.contextPath),n),{success:!0,message:this.translate("CommandBarUiPlugin.command.publishAll.success",{count:e.length},`Published ${e.length} changes`)}},this.handleDiscard=async()=>{const{publishableNodesInDocument:e,discardAction:t}=this.props;return t(e.map(e=>e.contextPath)),{success:!0,message:this.translate("CommandBarUiPlugin.command.discard.success",{count:e.length},`Discarded ${e.length} changes`)}},this.handleDiscardAll=async()=>{const{publishableNodes:e,discardAction:t}=this.props;return t(e.map(e=>e.contextPath)),{success:!0,message:this.translate("CommandBarUiPlugin.command.discardAll.success",{count:e.length},`Discarded ${e.length} changes`)}},this.setDragging=e=>{this.setState({...this.state,dragging:e})},this.translate=(e,t,n)=>("string"==typeof t&&(n=t,t={}),this.props.i18nRegistry.translate(e,n,t,"Shel.Neos.CommandBar","Main")),this.state={loaded:!1,dragging:!1,favouriteCommands:[],recentCommands:[],recentDocuments:[],showBranding:!0,commands:{addNode:{name:this.translate("CommandBarUiPlugin.command.addNode","Add content"),icon:"plus",description:this.translate("CommandBarUiPlugin.command.addNode.description","Add new content"),action:this.handleAddNode},searchDocuments:{name:this.translate("CommandBarUiPlugin.command.searchDocuments","Search documents"),icon:"search",description:this.translate("CommandBarUiPlugin.command.searchDocuments.description","Search and navigate to documents"),action:this.handleSearchNode.bind(this),canHandleQueries:!0},switchWorkspace:{name:this.translate("CommandBarUiPlugin.command.switchWorkspace","Switch workspace"),icon:"exchange-alt",description:this.translate("CommandBarUiPlugin.command.switchWorkspace.description","Switch to another workspace"),subCommands:this.buildCommandsFromWorkspaces()},publishDiscard:{name:this.translate("CommandBarUiPlugin.command.publishDiscard","Publish / discard"),description:this.translate("CommandBarUiPlugin.command.publishDiscard.description","Publish or discard changes"),icon:"check",subCommands:{publish:{name:this.translate("CommandBarUiPlugin.command.publish","Publish"),description:this.translate("CommandBarUiPlugin.command.publish.description","Publish changes in this document"),icon:"check",action:this.handlePublish},publishAll:{name:this.translate("CommandBarUiPlugin.command.publishAll","Publish all"),description:this.translate("CommandBarUiPlugin.command.publishAll.description","Publish changes in all documents"),icon:"check-double",action:this.handlePublishAll},discard:{name:this.translate("CommandBarUiPlugin.command.discard","Discard"),description:this.translate("CommandBarUiPlugin.command.discard.description","Discard changes in the current document"),icon:"ban",action:this.handleDiscard},discardAll:{name:this.translate("CommandBarUiPlugin.command.discardAll","Discard all"),description:this.translate("CommandBarUiPlugin.command.discardAll.description","Discard changes in all documents"),icon:"ban",action:this.handleDiscardAll}}},quickActions:{name:this.translate("CommandBarUiPlugin.command.quickActions","Quick actions"),icon:"keyboard",description:this.translate("CommandBarUiPlugin.command.quickActions.description","Execute hotkeys"),subCommands:this.buildCommandsFromHotkeys()},switchEditPreviewMode:{name:this.translate("CommandBarUiPlugin.command.switchEditPreviewMode","Switch edit/preview mode"),icon:"pencil",description:this.translate("CommandBarUiPlugin.command.switchEditPreviewMode.description","Switch between edit and preview modes"),subCommands:this.buildCommandsFromEditPreviewModes()},openPreview:{name:this.translate("CommandBarUiPlugin.command.openPreview","Open preview"),description:this.translate("CommandBarUiPlugin.command.openPreview.description","Open the preview for current document"),icon:"external-link-alt",action:async()=>{var e;this.props.previewUrl?null===(e=window.open(this.props.previewUrl,"_blank","noopener,noreferrer"))||void 0===e||e.focus():q.warn("No preview url to open")},closeOnExecute:!0},recentDocument:{name:this.translate("CommandBarUiPlugin.command.recentDocuments","Recent documents"),description:this.translate("CommandBarUiPlugin.command.recentDocuments.description","Open a recently visited documents"),icon:"history",action:this.showRecentDocuments.bind(this)}}},e.config.features.searchNeosDocs&&(this.state.commands.searchNeosDocs={name:this.translate("CommandBarUiPlugin.command.documentation","Documentation"),description:this.translate("CommandBarUiPlugin.command.documentation.description","Browse or search the Neos documentation"),icon:"book",canHandleQueries:!0,action:this.handleSearchNeosDocs.bind(this)}),e.config.features.searchNeosPackages&&(this.state.commands.searchNeosPackages={name:this.translate("CommandBarUiPlugin.command.packages","Packages"),description:this.translate("CommandBarUiPlugin.command.packages.description","Search for Neos packages"),icon:"boxes",canHandleQueries:!0,action:this.handleSearchNeosPackages.bind(this)})}mapHotkeyIdToIcon(e){let t=e.split(".").pop();switch(t.indexOf("toggle")>=0&&(t="toggle"),t){case"toggle":return"toggle-on";case"reload":return"redo";case"cancel":case"close":return"window-close";case"apply":return"check"}return"neos"}async componentDidMount(){const{plugins:e}=this.props;let t={};if(e)for(const n of Object.keys(e)){const r=e[n];try{const e=await r();Object.keys(e).length>0&&(t={...t,...e})}catch(e){q.warn("Could not load commands from plugin "+n,e)}}const n=await o.getCommands().catch(e=>{q.error("Failed to load commands",e)}),s=await r.getPreferences().catch(e=>{q.error("Failed to load user preferences",e)});s&&n&&(this.setState(e=>({loaded:!0,...s,commands:{...e.commands,...n,...t}})),document.addEventListener("keydown",e=>{"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.stopPropagation(),e.preventDefault(),this.props.toggleCommandBar())}))}async componentDidUpdate(e){var t,n;(null===(t=e.documentNode)||void 0===t?void 0:t.contextPath)!=(null===(n=this.props.documentNode)||void 0===n?void 0:n.contextPath)&&addRecentDocument(this.props.documentNode.contextPath).then(e=>{this.setState({recentDocuments:e})})}render(){const{commandBarOpen:e,toggleCommandBar:t}=this.props,{commands:n,loaded:o,dragging:s,favouriteCommands:f,recentCommands:E,recentDocuments:R,showBranding:I}=this.state;return C.createElement("div",{className:classnames(Ie.commandBarToolbarComponent,Se.commandBarTheme)},C.createElement(ge,{handleToggle:t,disabled:!o,label:this.translate("ToggleButton.label","Search…"),title:this.translate("ToggleButton.title","Search for commands"),active:e}),o&&C.createElement("div",{className:[Ie.fullScreenLayer,e&&Ie.open].join(" "),onDragOver:e=>e.preventDefault(),style:s?{pointerEvents:"all"}:null},C.createElement(src_CommandBar,{open:e,commands:n,toggleOpen:t,onDrag:this.setDragging,IconComponent:CommandBarUiPlugin_IconComponent,userPreferences:{favouriteCommands:f,recentCommands:E,recentDocuments:R,showBranding:I,addRecentCommand:r.addRecentCommand,addRecentDocument:r.addRecentDocument,setFavouriteCommands:r.setFavouriteCommands},translate:this.translate})))}}CommandBarUiPlugin_CommandBarUiPlugin.propTypes={addNode:O.a.func.isRequired,baseWorkspace:O.a.string.isRequired,commandBarOpen:O.a.bool,config:O.a.object.isRequired,discardAction:O.a.func.isRequired,documentNode:O.a.object,editPreviewMode:O.a.string.isRequired,editPreviewModes:O.a.object.isRequired,focusedNodeContextPath:O.a.string,handleHotkeyAction:O.a.func.isRequired,hotkeyRegistry:O.a.object.isRequired,i18nRegistry:O.a.object.isRequired,isWorkspaceReadOnly:O.a.bool,publishAction:O.a.func.isRequired,publishableNodes:O.a.array,publishableNodesInDocument:O.a.array,previewUrl:O.a.string,setActiveContentCanvasSrc:O.a.func.isRequired,setActiveContentCanvasContextPath:O.a.func.isRequired,setEditPreviewMode:O.a.func.isRequired,siteNode:O.a.object,toggleCommandBar:O.a.func.isRequired,neos:O.a.object.isRequired};const Oe=Object(T.neos)(e=>({i18nRegistry:e.get("i18n"),hotkeyRegistry:e.get("hotkeys"),config:e.get("frontendConfiguration").get("Shel.Neos.CommandBar:CommandBar"),nodeTypesRegistry:e.get("@neos-project/neos-ui-contentrepository"),editPreviewModes:e.get("frontendConfiguration").get("editPreviewModes"),plugins:e.get("Shel.Neos.CommandBar").getChildrenAsObject("plugins")}));t.default=Object(I.connect)(()=>({}),{toggleCommandBar:Re.actions.toggleCommandBar,addNode:A.actions.CR.Nodes.commenceCreation,setEditPreviewMode:A.actions.UI.EditPreviewMode.set,publishAction:A.actions.CR.Workspaces.publish,discardAction:A.actions.CR.Workspaces.commenceDiscard,setActiveContentCanvasSrc:A.actions.UI.ContentCanvas.setSrc,setActiveContentCanvasContextPath:A.actions.CR.Nodes.setDocumentNode,changeBaseWorkspaceAction:A.actions.CR.Workspaces.changeBaseWorkspace})(Object(I.connect)(e=>({siteNode:A.selectors.CR.Nodes.siteNodeSelector(e),documentNode:A.selectors.CR.Nodes.documentNodeSelector(e),focusedNodeContextPath:A.selectors.CR.Nodes.focusedNodePathSelector(e),publishableNodes:A.selectors.CR.Workspaces.publishableNodesSelector(e),publishableNodesInDocument:A.selectors.CR.Workspaces.publishableNodesInDocumentSelector(e),isWorkspaceReadOnly:A.selectors.CR.Workspaces.isWorkspaceReadOnlySelector(e),baseWorkspace:A.selectors.CR.Workspaces.baseWorkspaceSelector(e),commandBarOpen:Re.selectors.commandBarOpen(e),editPreviewMode:A.selectors.UI.EditPreviewMode.currentEditPreviewMode(e),previewUrl:Re.selectors.previewUrl(e)}),e=>({handleHotkeyAction:e}))(Oe(CommandBarUiPlugin_CommandBarUiPlugin)))}]); //# sourceMappingURL=Plugin.js.map \ No newline at end of file diff --git a/Resources/Public/Plugin.js.map b/Resources/Public/Plugin.js.map index 09fdfda..43adee6 100644 --- a/Resources/Public/Plugin.js.map +++ b/Resources/Public/Plugin.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/prop-types/index.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js","webpack:///../commandbar/src/components/CommandListItem/CommandListItem.module.css?723f","webpack:///../commandbar/src/components/CommandBarDialog/CommandBarDialog.module.css?1489","webpack:///./src/actions/index.ts","webpack:///../commandbar/src/components/SearchBox/SearchBox.module.css?0a5b","webpack:///../commandbar/src/components/CommandBarFooter/CommandBarFooter.module.css?04f4","webpack:///../commandbar/src/components/CommandList/CommandListing.module.css?1951","webpack:///../commandbar/src/components/CommandResultsView/CommandResultsView.module.css?c238","webpack:///../commandbar/src/components/ToggleButton/ToggleButton.module.css?c05f","webpack:///./src/CommandBarUiPlugin.module.css?b5cb","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/redux-actions/index.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js","webpack:///../commandbar/src/components/CommandBarHeader/CommandBarHeader.module.css?71c1","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousRegistry.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-decorators/index.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js","webpack:///../commandbar/src/components/IconWrapper/IconWrapper.module.css?2df3","webpack:///../commandbar/src/components/CommandBarFooter/Branding.module.css?63c0","webpack:///../commandbar/src/Theme.module.css?9f41","webpack:///./src/index.js","webpack:///./src/manifest.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/dist/index.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/dist/createConsumerApi.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/dist/manifest.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/dist/registry/index.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/dist/registry/AbstractRegistry.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/positional-array-sorter/dist/positionalArraySorter.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/tslib/tslib.es6.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousMetaRegistry.js","webpack:///../commandbar/src/hooks/useFunctionRef.ts","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@preact/signals-core/dist/signals-core.module.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@preact/signals-react/dist/signals.module.js","webpack:///../commandbar/src/helpers/flattenCommands.ts","webpack:///../commandbar/src/helpers/logger.ts","webpack:///../commandbar/src/helpers/clamp.ts","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@leeoniya/ufuzzy/dist/uFuzzy.esm.js","webpack:///../commandbar/src/helpers/filterCommands.ts","webpack:///../commandbar/src/helpers/asset.ts","webpack:///../commandbar/src/helpers/classnames.ts","webpack:///../commandbar/src/state/commandBarMachine.ts","webpack:///../commandbar/src/state/commandBarReducer.ts","webpack:///../commandbar/src/components/IconWrapper/IconWrapper.tsx","webpack:///../commandbar/src/components/CommandBarFooter/Branding.tsx","webpack:///../commandbar/src/components/Icons/IconBack.tsx","webpack:///../commandbar/src/components/Icons/IconNeos.tsx","webpack:///../commandbar/src/components/Icons/IconSpinner.tsx","webpack:///../commandbar/src/components/Icons/IconStar.tsx","webpack:///../commandbar/src/components/Icons/IconPlay.tsx","webpack:///../commandbar/src/components/Icons/IconRepeat.tsx","webpack:///../commandbar/src/components/CommandBarFooter/CommandBarFooter.tsx","webpack:///../commandbar/src/components/SearchBox/SearchBox.tsx","webpack:///../commandbar/src/components/CommandBarHeader/CommandBarHeader.tsx","webpack:///../commandbar/src/components/CommandListItem/CommandListItem.tsx","webpack:///../commandbar/src/components/CommandList/CommandList.tsx","webpack:///../commandbar/src/components/CommandResultsView/CommandResultsView.tsx","webpack:///../commandbar/src/components/ToggleButton/ToggleButton.tsx","webpack:///../commandbar/src/state/CommandBarStateProvider.tsx","webpack:///../commandbar/src/state/CommandBarExecutor.tsx","webpack:///../commandbar/src/state/IntlProvider.tsx","webpack:///../commandbar/src/components/CommandBarDialog/CommandBarDialog.tsx","webpack:///../commandbar/src/CommandBar.tsx","webpack:///../neos-api/src/fetch.ts","webpack:///../neos-api/src/preferences.ts","webpack:///../neos-api/src/commands.ts","webpack:///../neos-api/src/documentation.ts","webpack:///../neos-api/src/packages.ts","webpack:///../neos-api/src/nodes.ts","webpack:///./src/CommandBarUiPlugin.tsx"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","getDefault","getModuleExports","object","property","prototype","hasOwnProperty","p","s","React","PropTypes","NeosUiReduxStore","__read","iterator","e","ar","next","done","push","error","__spreadArray","to","from","pack","arguments","length","Array","slice","concat","readFromConsumerApi","_a","args","_i","window","apply","Error","actionTypes","TOGGLE_COMMAND_BAR","actions","toggleCommandBar","reducer","state","action","_b","_c","plugins","commandBar","open","undefined","payload","selectors","commandBarOpen","previewUrl","ui","contentCanvas","reduxActions","reactRedux","extendStatics","__extends","b","setPrototypeOf","__proto__","TypeError","String","__","this","constructor","__importDefault","mod","AbstractRegistry_1","require","positional_array_sorter_1","SynchronousRegistry","_super","description","_this","_registry","set","position","entry","indexOfItemWithTheSameKey","findIndex","item","console","result","find","_getChildrenWrapped","searchKey","unsortedChildren","filter","indexOf","getChildrenAsObject","forEach","getChildren","map","has","Boolean","_getAllWrapped","getAllAsObject","getAllAsList","assign","id","NeosUiDecorators","ReactUiComponents","globalRegistry","frontendConfiguration","enabled","CommandBarUiPlugin","SynchronousMetaRegistry","createConsumerApi","createConsumerApi_1","readFromConsumerApi_1","index_1","manifest_1","createReadOnlyValue","writable","configurable","manifests","exposureMap","api","keys","identifier","options","bootstrap","SynchronousRegistry_1","SynchronousMetaRegistry_1","AbstractRegistry","SERIAL_VERSION_UID","tslib_1","positionalArraySorter","subject","idKey","e_1","e_2","e_3","e_4","_d","e_5","_e","e_6","_f","e_7","_g","positionAccessor","indexMapping","middleKeys","startKeys","endKeys","beforeKeys","afterKeys","index","positionValue","invalid","startsWith","weight","weightMatch","match","Number","reference","numberPosition","parseFloat","isNaN","isFinite","resultStart","resultMiddle","resultEnd","processedKeys","sortedWeights","dict","asc","weights","x","sort","a","reverse","addToResults","e_8","e_9","beforeWeights","beforeWeights_1","__values","beforeWeights_1_1","e_8_1","afterWeights","afterWeights_1","afterWeights_1_1","e_9_1","_h","_j","e_1_1","_k","_l","e_2_1","_m","_o","e_3_1","_p","_q","_r","_s","e_5_1","e_4_1","_t","_u","_v","_w","e_7_1","e_6_1","__spread","__assign","__rest","getOwnPropertySymbols","propertyIsEnumerable","__decorate","decorators","target","desc","getOwnPropertyDescriptor","Reflect","decorate","__param","paramIndex","decorator","__metadata","metadataKey","metadataValue","metadata","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","rejected","adopt","then","__generator","body","f","y","g","_","label","sent","trys","ops","verb","v","op","pop","__createBinding","k","k2","__exportStar","__spreadArrays","il","j","jl","__await","__asyncGenerator","asyncIterator","q","resume","fulfill","settle","shift","__asyncDelegator","__asyncValues","__makeTemplateObject","cooked","raw","__importStar","default","__classPrivateFieldGet","receiver","privateMap","__classPrivateFieldSet","useFunctionRef","fn","fnRef","current","h","S","u","U","w","subscribe","valueOf","toString","peek","N","createElement","WeakMap","$$typeof","defineProperties","type","data","props","ref","ReactCurrentDispatcher","useCallback","test","useReducer","Map","flattenCommands","commands","parentId","reduce","commandList","commandId","icon","subCommands","canHandleQueries","closeOnExecute","category","executeManually","absoluteCommandId","subCommandIds","subCommandId","PREFIX","ok","message","log","warn","debug","clamp","min","max","Math","cmp","Intl","Collator","compare","NEGS_RE","OPTS","interSplit","intraSplit","intraBound","interLft","interRgt","interChars","interIns","Infinity","intraChars","intraIns","intraContr","intraMode","intraSlice","intraSub","intraTrn","intraDel","intraFilt","term","info","haystack","needle","idx","chars","terms","interLft2","interLft1","start","ia","ib","lazyRepeat","limit","uFuzzy","opts","_intraSplit","_interSplit","_intraBound","intraRules","_intraSlice","_intraIns","_intraSub","_intraTrn","_intraDel","plen","withIntraSplit","RegExp","trimRe","contrsRe","split","replace","toLowerCase","prepQuery","capt","interOR","parts","reTpl","contrs","fill","pi","lftIdx","rgtIdx","lftChar","rgtChar","numChars","variants","intraInsTpl","join","preTpl","sufTpl","interCharsTpl","idxs","out","query","withIntraBound","interBound","queryR","partsLen","len","field","interRgt2","interRgt1","ranges","mayDiscard","ii","mhstr","idxAcc","disc","lft2","lft1","rgt2","rgt1","inter","intra","refine","group","termLen","groupLen","fullMatch","idxOf","refineMatch","lftCharIdx","rgtCharIdx","isPre","isSuf","junk","junkIdx","m2","found","re","exec","charIdx","refLen","ri","lastRi","idxInNext","matchLen","offset","prepend","search","outOfOrder","infoThresh","preFiltered","negsRe","needles","matches","negs","trim","terms2","ti","permute","perm","matchedIdxs","Set","ni","size","preFiltered2","matched","add","retInfo","retOrder","acc","_info","order","_search","latinize","accents","A","E","I","O","C","accentsMap","accentsTpl","accentsRe","replacer","strings","arr","_mark","part","_append","highlight","str","mark","accum","append","tmp","substring","fr","uf","assert","condition","classnames","STATUS","TRANSITION","ACTION","machine","initial","COLLAPSED","states","collapsed","on","UPDATE_SEARCH","IDLE","EXPAND","SET_SEARCH_WORD","REFRESH_COMMANDS","HIGHLIGHT_NEXT_ITEM","idle","RESET_HIGHLIGHT","HIGHLIGHT_NEXT_COMMAND","HIGHLIGHT_PREVIOUS_ITEM","HIGHLIGHT_PREVIOUS_COMMAND","CANCEL","RESET_SEARCH_OR_LEAVE_GROUP","EXECUTE_COMMAND","EXECUTING_COMMAND","ADD_RECENTLY_USED","SET_ACTIVE_COMMAND","GO_TO_PARENT_GROUP","LEAVE_GROUP","SELECT_GROUP","RESET_SEARCH","SET_GROUP","ADD_FAVOURITE","REMOVE_FAVOURITE","executingCommand","UPDATE_RESULT","DISPLAYING_RESULT","FINISH_COMMAND","UNSET_ACTIVE_COMMAND","displayingResult","UPDATE_COMMAND_QUERY","SET_COMMAND_QUERY","RESET_OPTION_HIGHLIGHT","HIGHLIGHT_NEXT_OPTION","HIGHLIGHT_PREVIOUS_OPTION","UNSET_RESULT","runAction","nextState","event","searchWord","highlightedItem","availableCommandIds","filterCommands","selectedCommandGroup","favourites","recentCommands","availableCommands","values","command","includes","sortCommands","favouriteCommands","aIsRecent","bIsRecent","aIsFavourite","bIsFavourite","localeCompare","availableCommandNames","indices","highlightedOption","commandQuery","commandQueryDirty","expanded","activeCommandId","activeCommandMessage","success","view","resultCommandId","unshift","commandBarReducer","transition","actionCallback","nextStateNode","status","memo","children","className","showBranding","useCommandBarState","translate","useIntl","href","title","rel","xmlns","width","height","viewBox","gradientUnits","x1","y1","x2","y2","stopColor","transform","IconBack","IconNeos","IconSpinner","IconStar","IconPlay","IconRepeat","Icon","runningCommand","updateResultsTimer","executeCommand","useCommandExecutor","inputRef","activeCommand","handleChange","clearTimeout","setTimeout","handleKeyPress","preventDefault","stopPropagation","focus","Fragment","placeholder","disabled","autoFocus","onChange","onKeyUp","onClick","isDisplayingResults","CommandListItem","onItemSelect","highlightedId","onToggleFavourite","commandType","getCommandType","isHighlighted","isFavourite","navRef","useRef","querySelector","scrollIntoView","behavior","block","handleToggleFavourite","suggestions","highlightedCommand","isLoading","highlightedIndex","handleToggle","active","CommandBarContext","CommandBarStateProvider","IconComponent","userPreferences","dispatch","createAppState","initialState","commandBarState","async","addRecentCommand","catch","setFavouriteCommands","spin","Provider","CommandInputContext","createContext","useContext","CommandBarExecutor","toggleOpen","dialogRef","handleKeyEnteredRef","defaultPrevented","metaKey","ctrlKey","contains","document","location","origin","actionResult","finally","executeCommandRef","windowKeyEventHandler","addEventListener","removeEventListener","IntlContext","IntlProvider","onDrag","isDragging","dialogPosition","left","innerWidth","top","innerHeight","dragStateOffset","offsetLeft","offsetTop","hasBeenDragged","dialogStyle","visibility","reposition","dialogSize","getBoundingClientRect","handleDragStart","tagName","dataTransfer","setData","dropEffect","effectAllowed","clientX","clientY","handleDragDrop","onResize","parentElement","draggable","onDragStart","style","fetchData","endpoint","params","method","url","encodeURIComponent","fetch","credentials","JSON","stringify","headers","Accept","response","statusText","json","text","setPreference","getPreferences","commandIds","addRecentDocument","nodeContextPath","getCommands","searchNeosDocs","searchNeosPackages","searchNodes","node","super","buildCommandsFromHotkeys","hotkeyRegistry","handleHotkeyAction","config","carry","hotkeys","mapHotkeyIdToIcon","buildCommandsFromWorkspaces","allowedTargetWorkspaces","neos","configuration","workspaceName","workspace","readonly","changeBaseWorkspaceAction","buildCommandsFromEditPreviewModes","setEditPreviewMode","editPreviewModes","i18nRegistry","isEditingMode","editPreviewMode","handleAddNode","addNode","documentNode","focusedNodeContextPath","contextPath","showRecentDocuments","recentDocuments","setActiveContentCanvasContextPath","setActiveContentCanvasSrc","uri","handleSearchNode","siteNode","results","nodetype","handleSearchNeosDocs","handleSearchNeosPackages","handlePublish","publishableNodesInDocument","publishAction","baseWorkspace","count","handlePublishAll","publishableNodes","handleDiscard","discardAction","handleDiscardAll","setDragging","dragging","setState","paramsOrFallback","fallback","loaded","searchDocuments","switchWorkspace","publishDiscard","publish","publishAll","discard","discardAll","quickActions","switchEditPreviewMode","openPreview","recentDocument","features","actionName","pluginCommands","pluginName","plugin","pluginResult","preferences","prev","prevProps","onDragOver","pointerEvents","propTypes","func","isRequired","string","bool","isWorkspaceReadOnly","array","mapGlobalRegistryToProps","nodeTypesRegistry","CR","Nodes","commenceCreation","UI","EditPreviewMode","Workspaces","commenceDiscard","ContentCanvas","setSrc","setDocumentNode","changeBaseWorkspace","siteNodeSelector","documentNodeSelector","focusedNodePathSelector","publishableNodesSelector","publishableNodesInDocumentSelector","isWorkspaceReadOnlySelector","baseWorkspaceSelector","currentEditPreviewMode"],"mappings":";aACE,IAAIA,EAAmB,GAGvB,SAASC,oBAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,qBAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,oBAAoBQ,EAAIF,EAGxBN,oBAAoBS,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AGK,WAAWW,4BAA4B/yB,GACzEmvB,cAAe,YAAU4C,GAAGK,WAAWY,sBAAsBhzB,GAC7DU,eAAgB,aAAoBA,eAAeV,GACnD+tB,gBAAiB,YAAUmE,GAAGC,gBAAgBc,uBAAuBjzB,GACrEW,WAAY,aAAoBA,WAAWX,KAEnBknB,IAAa,CACrC2F,mBAAoB3F,IAmBrB,CAA6C2K,GAAyB","file":"Plugin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 22);\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().React;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().PropTypes;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiReduxStore;\n","\"use strict\";\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nexports.__esModule = true;\nfunction readFromConsumerApi(key) {\n return function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (window['@Neos:HostPluginAPI'] && window['@Neos:HostPluginAPI'][\"@\".concat(key)]) {\n return (_a = window['@Neos:HostPluginAPI'])[\"@\".concat(key)].apply(_a, __spreadArray([], __read(args), false));\n }\n throw new Error('You are trying to read from a consumer api that hasn\\'t been initialized yet!');\n };\n}\nexports[\"default\"] = readFromConsumerApi;\n//# sourceMappingURL=readFromConsumerApi.js.map","// extracted by mini-css-extract-plugin\nmodule.exports = {\"commandListItem\":\"CommandListItem-module__commandListItem___2u7xD\",\"highlighted\":\"CommandListItem-module__highlighted___1LR6R\",\"disabled\":\"CommandListItem-module__disabled___7wCym\",\"label\":\"CommandListItem-module__label___1bznO\",\"description\":\"CommandListItem-module__description___2RTG3\",\"type\":\"CommandListItem-module__type___1C7PR\",\"favouriteButton\":\"CommandListItem-module__favouriteButton___3n3yV\",\"isFavourite\":\"CommandListItem-module__isFavourite___KSM9p\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"commandBar\":\"CommandBarDialog-module__commandBar___1Hb5s\",\"hasResults\":\"CommandBarDialog-module__hasResults___3iM8B\",\"resultsWrap\":\"CommandBarDialog-module__resultsWrap___2gd3U\",\"expanded\":\"CommandBarDialog-module__expanded___jby7g\",\"split\":\"CommandBarDialog-module__split___66TVs\"};","import { createAction, handleActions } from 'redux-actions';\nexport const actionTypes = {\n TOGGLE_COMMAND_BAR: 'TOGGLE_COMMAND_BAR',\n};\nconst toggleCommandBar = createAction(actionTypes.TOGGLE_COMMAND_BAR);\nexport const actions = {\n toggleCommandBar,\n};\nexport const reducer = handleActions({\n TOGGLE_COMMAND_BAR: (state, action) => {\n var _a, _b, _c;\n return ({\n ...state,\n plugins: {\n ...state.plugins,\n commandBar: {\n open: ((_a = action.payload) === null || _a === void 0 ? void 0 : _a.open) !== undefined ? action.payload.open : !((_c = (_b = state.plugins) === null || _b === void 0 ? void 0 : _b.commandBar) === null || _c === void 0 ? void 0 : _c.open),\n },\n },\n });\n },\n}, {\n plugins: {\n commandBar: {\n open: false,\n },\n },\n});\nexport const selectors = {\n commandBarOpen: (state) => { var _a, _b; return (_b = (_a = state.plugins) === null || _a === void 0 ? void 0 : _a.commandBar) === null || _b === void 0 ? void 0 : _b.open; },\n previewUrl: (state) => { var _a, _b; return (_b = (_a = state.ui) === null || _a === void 0 ? void 0 : _a.contentCanvas) === null || _b === void 0 ? void 0 : _b.previewUrl; },\n};\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"searchBox\":\"SearchBox-module__searchBox___1SEtn\",\"expandButton\":\"SearchBox-module__expandButton___B2jYv\",\"executeButton\":\"SearchBox-module__executeButton___3hg_l\",\"commandQueryDirty\":\"SearchBox-module__commandQueryDirty___s_CVX\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"commandBarFooter\":\"CommandBarFooter-module__commandBarFooter___2mcre\",\"breadcrumb\":\"CommandBarFooter-module__breadcrumb___1Ul24\",\"activity\":\"CommandBarFooter-module__activity___2GXJU\",\"spinner\":\"CommandBarFooter-module__spinner___1mRmX\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"results\":\"CommandListing-module__results___23Rve\",\"noResults\":\"CommandListing-module__noResults___Mb89V\",\"disabled\":\"CommandListing-module__disabled___6gpPj\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"commandResultsView\":\"CommandResultsView-module__commandResultsView___xLqwb\",\"message\":\"CommandResultsView-module__message___NhUkR\",\"results\":\"CommandResultsView-module__results___1t6jB\",\"noResults\":\"CommandResultsView-module__noResults___2ksIF\",\"disabled\":\"CommandResultsView-module__disabled___OmNvX\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"toggleButton\":\"ToggleButton-module__toggleButton___2wPs-\",\"toggleButtonActive\":\"ToggleButton-module__toggleButtonActive___3bWD5\",\"buttonIcon\":\"ToggleButton-module__buttonIcon___UjFjw\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"fullScreenLayer\":\"CommandBarUiPlugin-module__fullScreenLayer___1cUx4\",\"open\":\"CommandBarUiPlugin-module__open___1Bjxj\",\"commandBarToolbarComponent\":\"CommandBarUiPlugin-module__commandBarToolbarComponent___1agRY\"};","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().reduxActions;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().reactRedux;\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"commandBarHeader\":\"CommandBarHeader-module__commandBarHeader___3Y2hR\",\"backButton\":\"CommandBarHeader-module__backButton___1qIGu\"};","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nexports.__esModule = true;\nvar AbstractRegistry_1 = __importDefault(require(\"./AbstractRegistry\"));\nvar positional_array_sorter_1 = __importDefault(require(\"@neos-project/positional-array-sorter\"));\nvar SynchronousRegistry = (function (_super) {\n __extends(SynchronousRegistry, _super);\n function SynchronousRegistry(description) {\n var _this = _super.call(this, description) || this;\n _this._registry = [];\n return _this;\n }\n SynchronousRegistry.prototype.set = function (key, value, position) {\n if (position === void 0) { position = 0; }\n if (typeof key !== 'string') {\n throw new Error('Key must be a string');\n }\n if (typeof position !== 'string' && typeof position !== 'number') {\n throw new Error('Position must be a string or a number');\n }\n var entry = { key: key, value: value };\n if (position) {\n entry.position = position;\n }\n var indexOfItemWithTheSameKey = this._registry.findIndex(function (item) { return item.key === key; });\n if (indexOfItemWithTheSameKey === -1) {\n this._registry.push(entry);\n }\n else {\n this._registry[indexOfItemWithTheSameKey] = entry;\n }\n return value;\n };\n SynchronousRegistry.prototype.get = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return null;\n }\n var result = this._registry.find(function (item) { return item.key === key; });\n return result ? result.value : null;\n };\n SynchronousRegistry.prototype._getChildrenWrapped = function (searchKey) {\n var unsortedChildren = this._registry.filter(function (item) { return item.key.indexOf(searchKey + '/') === 0; });\n return (0, positional_array_sorter_1[\"default\"])(unsortedChildren);\n };\n SynchronousRegistry.prototype.getChildrenAsObject = function (searchKey) {\n var result = {};\n this._getChildrenWrapped(searchKey).forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getChildren = function (searchKey) {\n return this._getChildrenWrapped(searchKey).map(function (item) { return item.value; });\n };\n SynchronousRegistry.prototype.has = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return false;\n }\n return Boolean(this._registry.find(function (item) { return item.key === key; }));\n };\n SynchronousRegistry.prototype._getAllWrapped = function () {\n return (0, positional_array_sorter_1[\"default\"])(this._registry);\n };\n SynchronousRegistry.prototype.getAllAsObject = function () {\n var result = {};\n this._getAllWrapped().forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getAllAsList = function () {\n return this._getAllWrapped().map(function (item) { return Object.assign({ id: item.key }, item.value); });\n };\n return SynchronousRegistry;\n}(AbstractRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousRegistry;\n//# sourceMappingURL=SynchronousRegistry.js.map","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiDecorators;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().ReactUiComponents;\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"iconWrap\":\"IconWrapper-module__iconWrap___1Z3nD\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"madeWithLove\":\"Branding-module__madeWithLove___2ibna\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"commandBarTheme\":\"Theme-module__commandBarTheme___1Z1-S\"};","require('./manifest');\n","import manifest, { SynchronousRegistry } from '@neos-project/neos-ui-extensibility';\n\nimport { reducer } from './actions';\nimport CommandBarUiPlugin from './CommandBarUiPlugin';\n\nmanifest('Shel.Neos.CommandBar:CommandBar', {}, (globalRegistry, { frontendConfiguration }) => {\n /** @type {{ enabled: boolean, features: { loadTestCommands: boolean } }} pluginConfig */\n const pluginConfig = frontendConfiguration['Shel.Neos.CommandBar:CommandBar'];\n const { enabled } = pluginConfig;\n\n if (!enabled) {\n return;\n }\n\n // Create our new registry for 3rd party command bar plugins\n globalRegistry.set(\n 'Shel.Neos.CommandBar',\n new SynchronousRegistry(`\n # Shel.Neos.CommandBar 3rd party commands\n `)\n );\n\n // Register commandbar component in the primary toolbar\n globalRegistry.get('containers').set('PrimaryToolbar/Middle/CommandBar', CommandBarUiPlugin);\n\n // Register reducer\n globalRegistry.get('reducers').set('Shel.Neos.CommandBar', { reducer });\n});\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nexports.__esModule = true;\nexports.SynchronousMetaRegistry = exports.SynchronousRegistry = exports.readFromConsumerApi = exports.createConsumerApi = void 0;\nvar createConsumerApi_1 = __importDefault(require(\"./createConsumerApi\"));\nexports.createConsumerApi = createConsumerApi_1[\"default\"];\nvar readFromConsumerApi_1 = __importDefault(require(\"./readFromConsumerApi\"));\nexports.readFromConsumerApi = readFromConsumerApi_1[\"default\"];\nvar index_1 = require(\"./registry/index\");\nexports.SynchronousRegistry = index_1.SynchronousRegistry;\nexports.SynchronousMetaRegistry = index_1.SynchronousMetaRegistry;\nexports[\"default\"] = (0, readFromConsumerApi_1[\"default\"])('manifest');\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nexports.__esModule = true;\nvar manifest_1 = __importDefault(require(\"./manifest\"));\nvar createReadOnlyValue = function (value) { return ({\n value: value,\n writable: false,\n enumerable: false,\n configurable: true\n}); };\nfunction createConsumerApi(manifests, exposureMap) {\n var api = {};\n Object.keys(exposureMap).forEach(function (key) {\n Object.defineProperty(api, key, createReadOnlyValue(exposureMap[key]));\n });\n Object.defineProperty(api, '@manifest', createReadOnlyValue((0, manifest_1[\"default\"])(manifests)));\n Object.defineProperty(window, '@Neos:HostPluginAPI', createReadOnlyValue(api));\n}\nexports[\"default\"] = createConsumerApi;\n//# sourceMappingURL=createConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nexports[\"default\"] = (function (manifests) {\n return function (identifier, options, bootstrap) {\n var _a;\n manifests.push((_a = {},\n _a[identifier] = {\n options: options,\n bootstrap: bootstrap\n },\n _a));\n };\n});\n//# sourceMappingURL=manifest.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nexports.__esModule = true;\nexports.SynchronousMetaRegistry = exports.SynchronousRegistry = void 0;\nvar SynchronousRegistry_1 = __importDefault(require(\"./SynchronousRegistry\"));\nexports.SynchronousRegistry = SynchronousRegistry_1[\"default\"];\nvar SynchronousMetaRegistry_1 = __importDefault(require(\"./SynchronousMetaRegistry\"));\nexports.SynchronousMetaRegistry = SynchronousMetaRegistry_1[\"default\"];\n//# sourceMappingURL=index.js.map","\"use strict\";\nexports.__esModule = true;\nvar AbstractRegistry = (function () {\n function AbstractRegistry(description) {\n this.SERIAL_VERSION_UID = 'd8a5aa78-978e-11e6-ae22-56b6b6499611';\n this.description = description;\n }\n return AbstractRegistry;\n}());\nexports[\"default\"] = AbstractRegistry;\n//# sourceMappingURL=AbstractRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar positionalArraySorter = function (subject, position, idKey) {\n var e_1, _a, e_2, _b, e_3, _c, e_4, _d, e_5, _e, e_6, _f, e_7, _g;\n if (position === void 0) { position = 'position'; }\n if (idKey === void 0) { idKey = 'key'; }\n var positionAccessor = typeof position === 'string' ? function (value) { return value[position]; } : position;\n var indexMapping = {};\n var middleKeys = {};\n var startKeys = {};\n var endKeys = {};\n var beforeKeys = {};\n var afterKeys = {};\n subject.forEach(function (item, index) {\n var key = item[idKey] ? item[idKey] : String(index);\n indexMapping[key] = index;\n var positionValue = positionAccessor(item);\n var position = String(positionValue ? positionValue : index);\n var invalid = false;\n if (position.startsWith('start')) {\n var weightMatch = position.match(/start\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!startKeys[weight]) {\n startKeys[weight] = [];\n }\n startKeys[weight].push(key);\n }\n else if (position.startsWith('end')) {\n var weightMatch = position.match(/end\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!endKeys[weight]) {\n endKeys[weight] = [];\n }\n endKeys[weight].push(key);\n }\n else if (position.startsWith('before')) {\n var match = position.match(/before\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!beforeKeys[reference]) {\n beforeKeys[reference] = {};\n }\n if (!beforeKeys[reference][weight]) {\n beforeKeys[reference][weight] = [];\n }\n beforeKeys[reference][weight].push(key);\n }\n }\n else if (position.startsWith('after')) {\n var match = position.match(/after\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!afterKeys[reference]) {\n afterKeys[reference] = {};\n }\n if (!afterKeys[reference][weight]) {\n afterKeys[reference][weight] = [];\n }\n afterKeys[reference][weight].push(key);\n }\n }\n else {\n invalid = true;\n }\n if (invalid) {\n var numberPosition = parseFloat(position);\n if (isNaN(numberPosition) || !isFinite(numberPosition)) {\n numberPosition = index;\n }\n if (!middleKeys[numberPosition]) {\n middleKeys[numberPosition] = [];\n }\n middleKeys[numberPosition].push(key);\n }\n });\n var resultStart = [];\n var resultMiddle = [];\n var resultEnd = [];\n var processedKeys = [];\n var sortedWeights = function (dict, asc) {\n var weights = Object.keys(dict).map(function (x) { return Number(x); }).sort(function (a, b) { return a - b; });\n return asc ? weights : weights.reverse();\n };\n var addToResults = function (keys, result) {\n keys.forEach(function (key) {\n var e_8, _a, e_9, _b;\n if (processedKeys.indexOf(key) >= 0) {\n return;\n }\n processedKeys.push(key);\n if (beforeKeys[key]) {\n var beforeWeights = sortedWeights(beforeKeys[key], true);\n try {\n for (var beforeWeights_1 = tslib_1.__values(beforeWeights), beforeWeights_1_1 = beforeWeights_1.next(); !beforeWeights_1_1.done; beforeWeights_1_1 = beforeWeights_1.next()) {\n var i = beforeWeights_1_1.value;\n addToResults(beforeKeys[key][i], result);\n }\n }\n catch (e_8_1) { e_8 = { error: e_8_1 }; }\n finally {\n try {\n if (beforeWeights_1_1 && !beforeWeights_1_1.done && (_a = beforeWeights_1[\"return\"])) _a.call(beforeWeights_1);\n }\n finally { if (e_8) throw e_8.error; }\n }\n }\n result.push(key);\n if (afterKeys[key]) {\n var afterWeights = sortedWeights(afterKeys[key], false);\n try {\n for (var afterWeights_1 = tslib_1.__values(afterWeights), afterWeights_1_1 = afterWeights_1.next(); !afterWeights_1_1.done; afterWeights_1_1 = afterWeights_1.next()) {\n var i = afterWeights_1_1.value;\n addToResults(afterKeys[key][i], result);\n }\n }\n catch (e_9_1) { e_9 = { error: e_9_1 }; }\n finally {\n try {\n if (afterWeights_1_1 && !afterWeights_1_1.done && (_b = afterWeights_1[\"return\"])) _b.call(afterWeights_1);\n }\n finally { if (e_9) throw e_9.error; }\n }\n }\n });\n };\n try {\n for (var _h = tslib_1.__values(sortedWeights(startKeys, false)), _j = _h.next(); !_j.done; _j = _h.next()) {\n var i = _j.value;\n addToResults(startKeys[i], resultStart);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_j && !_j.done && (_a = _h[\"return\"])) _a.call(_h);\n }\n finally { if (e_1) throw e_1.error; }\n }\n try {\n for (var _k = tslib_1.__values(sortedWeights(middleKeys, true)), _l = _k.next(); !_l.done; _l = _k.next()) {\n var i = _l.value;\n addToResults(middleKeys[i], resultMiddle);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_l && !_l.done && (_b = _k[\"return\"])) _b.call(_k);\n }\n finally { if (e_2) throw e_2.error; }\n }\n try {\n for (var _m = tslib_1.__values(sortedWeights(endKeys, true)), _o = _m.next(); !_o.done; _o = _m.next()) {\n var i = _o.value;\n addToResults(endKeys[i], resultEnd);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_o && !_o.done && (_c = _m[\"return\"])) _c.call(_m);\n }\n finally { if (e_3) throw e_3.error; }\n }\n try {\n for (var _p = tslib_1.__values(Object.keys(beforeKeys)), _q = _p.next(); !_q.done; _q = _p.next()) {\n var key = _q.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _r = (e_5 = void 0, tslib_1.__values(sortedWeights(beforeKeys[key], false))), _s = _r.next(); !_s.done; _s = _r.next()) {\n var i = _s.value;\n addToResults(beforeKeys[key][i], resultStart);\n }\n }\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\n finally {\n try {\n if (_s && !_s.done && (_e = _r[\"return\"])) _e.call(_r);\n }\n finally { if (e_5) throw e_5.error; }\n }\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_q && !_q.done && (_d = _p[\"return\"])) _d.call(_p);\n }\n finally { if (e_4) throw e_4.error; }\n }\n try {\n for (var _t = tslib_1.__values(Object.keys(afterKeys)), _u = _t.next(); !_u.done; _u = _t.next()) {\n var key = _u.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _v = (e_7 = void 0, tslib_1.__values(sortedWeights(afterKeys[key], false))), _w = _v.next(); !_w.done; _w = _v.next()) {\n var i = _w.value;\n addToResults(afterKeys[key][i], resultMiddle);\n }\n }\n catch (e_7_1) { e_7 = { error: e_7_1 }; }\n finally {\n try {\n if (_w && !_w.done && (_g = _v[\"return\"])) _g.call(_v);\n }\n finally { if (e_7) throw e_7.error; }\n }\n }\n }\n catch (e_6_1) { e_6 = { error: e_6_1 }; }\n finally {\n try {\n if (_u && !_u.done && (_f = _t[\"return\"])) _f.call(_t);\n }\n finally { if (e_6) throw e_6.error; }\n }\n var sortedKeys = tslib_1.__spread(resultStart, resultMiddle, resultEnd);\n return sortedKeys.map(function (key) { return indexMapping[key]; }).map(function (i) { return subject[i]; });\n};\nexports[\"default\"] = positionalArraySorter;\n//# sourceMappingURL=positionalArraySorter.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nexports.__esModule = true;\nvar SynchronousRegistry_1 = __importDefault(require(\"./SynchronousRegistry\"));\nvar SynchronousMetaRegistry = (function (_super) {\n __extends(SynchronousMetaRegistry, _super);\n function SynchronousMetaRegistry() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SynchronousMetaRegistry.prototype.set = function (key, value) {\n if (value.SERIAL_VERSION_UID !== 'd8a5aa78-978e-11e6-ae22-56b6b6499611') {\n throw new Error('You can only add registries to a meta registry');\n }\n return _super.prototype.set.call(this, key, value);\n };\n return SynchronousMetaRegistry;\n}(SynchronousRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousMetaRegistry;\n//# sourceMappingURL=SynchronousMetaRegistry.js.map","import { useRef } from 'react';\n/**\n * A custom hook that creates a ref for a function, and updates it on every render.\n * The new value is always the same function, but the function's context changes on every render.\n */\nexport default function useFunctionRef(fn) {\n const fnRef = useRef(fn);\n fnRef.current = fn;\n return fnRef;\n}\n","function i(){throw new Error(\"Cycle detected\")}function t(){if(!(s>1)){var i,t=!1;while(void 0!==r){var h=r;r=void 0;n++;while(void 0!==h){var o=h.o;h.o=void 0;h.f&=-3;if(!(8&h.f)&&d(h))try{h.c()}catch(h){if(!t){i=h;t=!0}}h=o}}n=0;s--;if(t)throw i}else s--}function h(i){if(s>0)return i();s++;try{return i()}finally{t()}}var o=void 0,r=void 0,s=0,n=0,f=0;function v(i){if(void 0!==o){var t=i.n;if(void 0===t||t.t!==o){t={i:0,S:i,p:o.s,n:void 0,t:o,e:void 0,x:void 0,r:t};if(void 0!==o.s)o.s.n=t;o.s=t;i.n=t;if(32&o.f)i.S(t);return t}else if(-1===t.i){t.i=0;if(void 0!==t.n){t.n.p=t.p;if(void 0!==t.p)t.p.n=t.n;t.p=o.s;t.n=void 0;o.s.n=t;o.s=t}return t}}}function e(i){this.v=i;this.i=0;this.n=void 0;this.t=void 0}e.prototype.h=function(){return!0};e.prototype.S=function(i){if(this.t!==i&&void 0===i.e){i.x=this.t;if(void 0!==this.t)this.t.e=i;this.t=i}};e.prototype.U=function(i){if(void 0!==this.t){var t=i.e,h=i.x;if(void 0!==t){t.x=h;i.e=void 0}if(void 0!==h){h.e=t;i.x=void 0}if(i===this.t)this.t=h}};e.prototype.subscribe=function(i){var t=this;return p(function(){var h=t.value,o=32&this.f;this.f&=-33;try{i(h)}finally{this.f|=o}})};e.prototype.valueOf=function(){return this.value};e.prototype.toString=function(){return this.value+\"\"};e.prototype.peek=function(){return this.v};Object.defineProperty(e.prototype,\"value\",{get:function(){var i=v(this);if(void 0!==i)i.i=this.i;return this.v},set:function(h){if(h!==this.v){if(n>100)i();this.v=h;this.i++;f++;s++;try{for(var o=this.t;void 0!==o;o=o.x)o.t.N()}finally{t()}}}});function u(i){return new e(i)}function d(i){for(var t=i.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function c(i){for(var t=i.s;void 0!==t;t=t.n){var h=t.S.n;if(void 0!==h)t.r=h;t.S.n=t;t.i=-1;if(void 0===t.n){i.s=t;break}}}function a(i){var t=i.s,h=void 0;while(void 0!==t){var o=t.p;if(-1===t.i){t.S.U(t);if(void 0!==o)o.n=t.n;if(void 0!==t.n)t.n.p=o}else h=t;t.S.n=t.r;if(void 0!==t.r)t.r=void 0;t=o}i.s=h}function l(i){e.call(this,void 0);this.x=i;this.s=void 0;this.g=f-1;this.f=4}(l.prototype=new e).h=function(){this.f&=-3;if(1&this.f)return!1;if(32==(36&this.f))return!0;this.f&=-5;if(this.g===f)return!0;this.g=f;this.f|=1;if(this.i>0&&!d(this)){this.f&=-2;return!0}var i=o;try{c(this);o=this;var t=this.x();if(16&this.f||this.v!==t||0===this.i){this.v=t;this.f&=-17;this.i++}}catch(i){this.v=i;this.f|=16;this.i++}o=i;a(this);this.f&=-2;return!0};l.prototype.S=function(i){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}e.prototype.S.call(this,i)};l.prototype.U=function(i){if(void 0!==this.t){e.prototype.U.call(this,i);if(void 0===this.t){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}}};l.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var i=this.t;void 0!==i;i=i.x)i.t.N()}};l.prototype.peek=function(){if(!this.h())i();if(16&this.f)throw this.v;return this.v};Object.defineProperty(l.prototype,\"value\",{get:function(){if(1&this.f)i();var t=v(this);this.h();if(void 0!==t)t.i=this.i;if(16&this.f)throw this.v;return this.v}});function w(i){return new l(i)}function y(i){var h=i.u;i.u=void 0;if(\"function\"==typeof h){s++;var r=o;o=void 0;try{h()}catch(t){i.f&=-2;i.f|=8;_(i);throw t}finally{o=r;t()}}}function _(i){for(var t=i.s;void 0!==t;t=t.n)t.S.U(t);i.x=void 0;i.s=void 0;y(i)}function g(i){if(o!==this)throw new Error(\"Out-of-order effect\");a(this);o=i;this.f&=-2;if(8&this.f)_(this);t()}function b(i){this.x=i;this.u=void 0;this.s=void 0;this.o=void 0;this.f=32}b.prototype.c=function(){var i=this.S();try{if(!(8&this.f)&&void 0!==this.x)this.u=this.x()}finally{i()}};b.prototype.S=function(){if(1&this.f)i();this.f|=1;this.f&=-9;y(this);c(this);s++;var t=o;o=this;return g.bind(this,t)};b.prototype.N=function(){if(!(2&this.f)){this.f|=2;this.o=r;r=this}};b.prototype.d=function(){this.f|=8;if(!(1&this.f))_(this)};function p(i){var t=new b(i);try{t.c()}catch(i){t.d();throw i}return t.d.bind(t)}export{e as Signal,h as batch,w as computed,p as effect,u as signal};//# sourceMappingURL=signals-core.module.js.map\n","import n,{__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED as r,useMemo as t,useRef as e,useEffect as i}from\"react\";import{Signal as u,effect as f,signal as o,computed as a}from\"@preact/signals-core\";export{Signal,batch,computed,effect,signal}from\"@preact/signals-core\";var c,v=n.createElement;n.createElement=function(n,r){if(\"string\"==typeof n&&r)for(var t in r){var e=r[t];if(\"children\"!==t&&e instanceof u)r[t]=e.value}return v.apply(this,arguments)};var l=new WeakMap;function p(n){if(c)c();c=n&&n.S()}var s=v(\"a\").$$typeof;Object.defineProperties(u.prototype,{$$typeof:{configurable:!0,value:s},type:{configurable:!0,value:function(n){return n.data.value}},props:{configurable:!0,get:function(){return{data:this}}},ref:{configurable:!0,value:null}});var g,b=!1,m=function(){return{}};Object.defineProperty(r.ReactCurrentDispatcher,\"current\",{get:function(){return g},set:function(n){g=n;if(!b)if(n&&!function(n){var r=d.get(n);if(void 0!==r)return r;var t=n.useCallback.length<2||/Invalid/.test(n.useCallback);d.set(n,t);return t}(n)){b=!0;var r=n.useReducer(m,{})[1];b=!1;var t=l.get(r);if(!t){t=function(n){var r;f(function(){r=this});r.c=n;return r}(r);l.set(r,t)}else t.c=r;p(t)}else p()}});var d=new Map;function h(n){return t(function(){return o(n)},[])}function y(n){var r=e(n);r.current=n;return t(function(){return a(function(){return r.current()})},[])}function j(n){var r=e(n);r.current=n;i(function(){return f(function(){return r.current()})},[])}export{y as useComputed,h as useSignal,j as useSignalEffect};//# sourceMappingURL=signals.module.js.map\n","/**\n * This method converts the hierarchical command list into a flat list of commands which is more convenient\n * for internal processing, whereas the hierarchical command list is more convenient for the user.\n */\nexport default function flattenCommands(commands, parentId = null) {\n return Object.keys(commands).reduce((commandList, commandId) => {\n const { icon, description, name, subCommands, action, canHandleQueries, closeOnExecute, category, executeManually, } = commands[commandId];\n // Create an uniquely identifiable command id for the flat command list\n const absoluteCommandId = parentId ? `${parentId}.${commandId}` : commandId;\n // Create list of available subcommand names\n const subCommandIds = subCommands\n ? Object.keys(subCommands).map((subCommandId) => `${absoluteCommandId}.${subCommandId}`)\n : [];\n // Insert the processed command into the flat command list\n commandList[absoluteCommandId] = {\n id: absoluteCommandId,\n name,\n icon,\n description,\n action,\n canHandleQueries,\n subCommandIds,\n parentId,\n closeOnExecute,\n category,\n executeManually,\n };\n // Insert subcommands into the list\n if (subCommandIds.length > 0) {\n return {\n ...commandList,\n ...flattenCommands(subCommands, absoluteCommandId),\n };\n }\n return commandList;\n }, {});\n}\n","const PREFIX = '%c[COMMANDBAR]';\nconst logger = {\n ok: (message, ...args) => console.log(PREFIX, 'color: green', message, ...args),\n error: (message, ...args) => console.log(PREFIX, 'color: red', message, ...args),\n warn: (message, ...args) => console.warn(PREFIX, 'color: orange', message, ...args),\n debug: \n // @ts-ignore\n process.env.NODE_ENV === 'production'\n ? () => null\n : (message, ...args) => console.debug(PREFIX, 'color: lightblue', message, ...args),\n};\nexport default logger;\n","export default function clamp(value, min, max) {\n return Math.max(min, Math.min(max, value));\n}\n","/**\n* Copyright (c) 2023, Leon Sorokin\n* All rights reserved. (MIT Licensed)\n*\n* uFuzzy.js (μFuzzy)\n* A tiny, efficient fuzzy matcher that doesn't suck\n* https://github.com/leeoniya/uFuzzy (v1.0.3)\n*/\n\nconst cmp = new Intl.Collator('en').compare;\n\nconst inf = Infinity;\n\nconst NEGS_RE = /(?:\\s+|^)-[a-z\\d]+/ig;\n\nconst OPTS = {\n\t// term segmentation & punct/whitespace merging\n\tinterSplit: \"[^A-Za-z0-9']+\",\n\tintraSplit: '[a-z][A-Z]',\n\n\t// intra bounds that will be used to increase lft1/rgt1 info counters\n\tintraBound: '[A-Za-z][0-9]|[0-9][A-Za-z]|[a-z][A-Z]',\n\n\t// inter-bounds mode\n\t// 2 = strict (will only match 'man' on whitepace and punct boundaries: Mega Man, Mega_Man, mega.man)\n\t// 1 = loose (plus allowance for alpha-num and case-change boundaries: MegaMan, 0007man)\n\t// 0 = any (will match 'man' as any substring: megamaniac)\n\tinterLft: 0,\n\tinterRgt: 0,\n\n\t// allowance between terms\n\tinterChars: '.',\n\tinterIns: inf,\n\n\t// allowance between chars in terms\n\tintraChars: \"[a-z\\\\d']\", // internally case-insensitive\n\tintraIns: 0,\n\n\tintraContr: \"'[a-z]{1,2}\\\\b\",\n\n\t// multi-insert or single-error mode\n\tintraMode: 0,\n\n\t// single-error bounds for errors within terms, default requires exact first char\n\tintraSlice: [1, inf],\n\n\t// single-error tolerance toggles\n\tintraSub: 0,\n\tintraTrn: 0,\n\tintraDel: 0,\n\n\t// can post-filter matches that are too far apart in distance or length\n\t// (since intraIns is between each char, it can accum to nonsense matches)\n\tintraFilt: (term, match, index) => true, // should this also accept WIP info?\n\n\t// final sorting fn\n\tsort: (info, haystack, needle) => {\n\t\tlet {\n\t\t\tidx,\n\t\t\tchars,\n\t\t\tterms,\n\t\t\tinterLft2,\n\t\t\tinterLft1,\n\t\t//\tinterRgt2,\n\t\t//\tinterRgt1,\n\t\t\tstart,\n\t\t\tintraIns,\n\t\t\tinterIns,\n\t\t} = info;\n\n\t\treturn idx.map((v, i) => i).sort((ia, ib) => (\n\t\t\t// most contig chars matched\n\t\t\tchars[ib] - chars[ia] ||\n\t\t\t// least char intra-fuzz (most contiguous)\n\t\t\tintraIns[ia] - intraIns[ib] ||\n\t\t\t// most prefix bounds, boosted by full term matches\n\t\t\t(\n\t\t\t\t(terms[ib] + interLft2[ib] + 0.5 * interLft1[ib]) -\n\t\t\t\t(terms[ia] + interLft2[ia] + 0.5 * interLft1[ia])\n\t\t\t) ||\n\t\t\t// highest density of match (least span)\n\t\t//\tspan[ia] - span[ib] ||\n\t\t\t// highest density of match (least term inter-fuzz)\n\t\t\tinterIns[ia] - interIns[ib] ||\n\t\t\t// earliest start of match\n\t\t\tstart[ia] - start[ib] ||\n\t\t\t// alphabetic\n\t\t\tcmp(haystack[idx[ia]], haystack[idx[ib]])\n\t\t));\n\t},\n};\n\nconst lazyRepeat = (chars, limit) => (\n\tlimit == 0 ? '' :\n\tlimit == 1 ? chars + '??' :\n\tlimit == inf ? chars + '*?' :\n\t chars + `{0,${limit}}?`\n);\n\nconst mode2Tpl = '(?:\\\\b|_)';\n\nfunction uFuzzy(opts) {\n\topts = Object.assign({}, OPTS, opts);\n\n\tconst {\n\t\tinterLft,\n\t\tinterRgt,\n\t\tintraMode,\n\t\tintraSlice,\n\t\tintraIns,\n\t\tintraSub,\n\t\tintraTrn,\n\t\tintraDel,\n\t\tintraContr,\n\t\tintraSplit: _intraSplit,\n\t\tinterSplit: _interSplit,\n\t\tintraBound: _intraBound,\n\t\tintraChars,\n\t} = opts;\n\n\tlet { intraRules } = opts;\n\n\tif (intraRules == null) {\n\t\tintraRules = p => {\n\t\t\t// default is exact term matches only\n\t\t\tlet _intraSlice = OPTS.intraSlice, // requires first char\n\t\t\t\t_intraIns = 0,\n\t\t\t\t_intraSub = 0,\n\t\t\t\t_intraTrn = 0,\n\t\t\t\t_intraDel = 0;\n\n\t\t\tlet plen = p.length;\n\n\t\t\t// prevent junk matches by requiring stricter rules for short terms\n\t\t\tif (plen <= 4) {\n\t\t\t\tif (plen >= 3) {\n\t\t\t\t\t// one swap in non-first char when 3-4 chars\n\t\t\t\t\t_intraTrn = Math.min(intraTrn, 1);\n\n\t\t\t\t\t// or one insertion when 4 chars\n\t\t\t\t\tif (plen == 4)\n\t\t\t\t\t\t_intraIns = Math.min(intraIns, 1);\n\t\t\t\t}\n\t\t\t\t// else exact match when 1-2 chars\n\t\t\t}\n\t\t\t// use supplied opts\n\t\t\telse {\n\t\t\t\t_intraSlice = intraSlice;\n\t\t\t\t_intraIns = intraIns,\n\t\t\t\t_intraSub = intraSub,\n\t\t\t\t_intraTrn = intraTrn,\n\t\t\t\t_intraDel = intraDel;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tintraSlice: _intraSlice,\n\t\t\t\tintraIns: _intraIns,\n\t\t\t\tintraSub: _intraSub,\n\t\t\t\tintraTrn: _intraTrn,\n\t\t\t\tintraDel: _intraDel,\n\t\t\t};\n\t\t};\n\t}\n\n\tlet withIntraSplit = !!_intraSplit;\n\n\tlet intraSplit = new RegExp(_intraSplit, 'g');\n\tlet interSplit = new RegExp(_interSplit, 'g');\n\n\tlet trimRe = new RegExp('^' + _interSplit + '|' + _interSplit + '$', 'g');\n\tlet contrsRe = new RegExp(intraContr, 'gi');\n\n\tconst split = needle => {\n\t\tneedle = needle.replace(trimRe, '').toLowerCase();\n\n\t\tif (withIntraSplit)\n\t\t\tneedle = needle.replace(intraSplit, m => m[0] + ' ' + m[1]);\n\n\t\treturn needle.split(interSplit).filter(t => t != '');\n\t};\n\n\tconst prepQuery = (needle, capt = 0, interOR = false) => {\n\t\t// split on punct, whitespace, num-alpha, and upper-lower boundaries\n\t\tlet parts = split(needle);\n\n\t\tif (parts.length == 0)\n\t\t\tthrow `Empty needle!`;\n\n\t\t// split out any detected contractions for each term that become required suffixes\n\t\tlet contrs = Array(parts.length).fill('');\n\t\tparts = parts.map((p, pi) => p.replace(contrsRe, m => {\n\t\t\tcontrs[pi] = m;\n\t\t\treturn '';\n\t\t}));\n\n\t\t// array of regexp tpls for each term\n\t\tlet reTpl;\n\n\t\t// allows single mutations within each term\n\t\tif (intraMode == 1) {\n\t\t\treTpl = parts.map((p, pi) => {\n\t\t\t\tlet {\n\t\t\t\t\tintraSlice,\n\t\t\t\t\tintraIns,\n\t\t\t\t\tintraSub,\n\t\t\t\t\tintraTrn,\n\t\t\t\t\tintraDel,\n\t\t\t\t} = intraRules(p);\n\n\t\t\t\tif (intraIns + intraSub + intraTrn + intraDel == 0)\n\t\t\t\t\treturn p + contrs[pi];\n\n\t\t\t\tlet [lftIdx, rgtIdx] = intraSlice;\n\t\t\t\tlet lftChar = p.slice(0, lftIdx); // prefix\n\t\t\t\tlet rgtChar = p.slice(rgtIdx); // suffix\n\n\t\t\t\tlet chars = p.slice(lftIdx, rgtIdx);\n\n\t\t\t\t// neg lookahead to prefer matching 'Test' instead of 'tTest' in ManifestTest or fittest\n\t\t\t\t// but skip when search term contains leading repetition (aardvark, aaa)\n\t\t\t\tif (intraIns == 1 && lftChar.length == 1 && lftChar != chars[0])\n\t\t\t\t\tlftChar += '(?!' + lftChar + ')';\n\n\t\t\t\tlet numChars = chars.length;\n\n\t\t\t\tlet variants = [];\n\n\t\t\t\t// variants with single char substitutions\n\t\t\t\tif (intraSub) {\n\t\t\t\t\tfor (let i = 0; i < numChars; i++)\n\t\t\t\t\t\tvariants.push(lftChar + chars.slice(0, i) + intraChars + chars.slice(i + 1) + rgtChar);\n\t\t\t\t}\n\n\t\t\t\t// variants with single transpositions\n\t\t\t\tif (intraTrn) {\n\t\t\t\t\tfor (let i = 0; i < numChars - 1; i++) {\n\t\t\t\t\t\tif (chars[i] != chars[i+1])\n\t\t\t\t\t\t\tvariants.push(lftChar + chars.slice(0, i) + chars[i+1] + chars[i] + chars.slice(i + 2) + rgtChar);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// variants with single char omissions\n\t\t\t\tif (intraDel) {\n\t\t\t\t\tfor (let i = 0; i < numChars; i++)\n\t\t\t\t\t\tvariants.push(lftChar + chars.slice(0, i + 1) + '?' + chars.slice(i + 1) + rgtChar);\n\t\t\t\t}\n\n\t\t\t\t// variants with single char insertions\n\t\t\t\tif (intraIns) {\n\t\t\t\t\tlet intraInsTpl = lazyRepeat(intraChars, 1);\n\n\t\t\t\t\tfor (let i = 0; i < numChars; i++)\n\t\t\t\t\t\tvariants.push(lftChar + chars.slice(0, i) + intraInsTpl + chars.slice(i) + rgtChar);\n\t\t\t\t}\n\n\t\t\t\tlet reTpl = '(?:' + p + '|' + variants.join('|') + ')' + contrs[pi];\n\n\t\t\t//\tconsole.log(reTpl);\n\n\t\t\t\treturn reTpl;\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tlet intraInsTpl = lazyRepeat(intraChars, intraIns);\n\n\t\t\t// capture at char level\n\t\t\tif (capt == 2 && intraIns > 0) {\n\t\t\t\t// sadly, we also have to capture the inter-term junk via parenth-wrapping .*?\n\t\t\t\t// to accum other capture groups' indices for \\b boosting during scoring\n\t\t\t\tintraInsTpl = ')(' + intraInsTpl + ')(';\n\t\t\t}\n\n\t\t\treTpl = parts.map((p, pi) => p.split('').map((c, i, chars) => {\n\t\t\t\t// neg lookahead to prefer matching 'Test' instead of 'tTest' in ManifestTest or fittest\n\t\t\t\t// but skip when search term contains leading repetition (aardvark, aaa)\n\t\t\t\tif (intraIns == 1 && i == 0 && chars.length > 1 && c[i] != c[i+1])\n\t\t\t\t\tc += '(?!' + c + ')';\n\n\t\t\t\treturn c;\n\t\t\t}).join(intraInsTpl) + contrs[pi]);\n\t\t}\n\n\t//\tconsole.log(reTpl);\n\n\t\t// this only helps to reduce initial matches early when they can be detected\n\t\t// TODO: might want a mode 3 that excludes _\n\t\tlet preTpl = interLft == 2 ? mode2Tpl : '';\n\t\tlet sufTpl = interRgt == 2 ? mode2Tpl : '';\n\n\t\tlet interCharsTpl = sufTpl + lazyRepeat(opts.interChars, opts.interIns) + preTpl;\n\n\t\t// capture at word level\n\t\tif (capt > 0) {\n\t\t\tif (interOR) {\n\t\t\t\t// this is basically for doing .matchAll() occurence counting and highlighting without needing permuted ooo needles\n\t\t\t\treTpl = preTpl + '(' + reTpl.join(')' + sufTpl + '|' + preTpl + '(') + ')' + sufTpl;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// sadly, we also have to capture the inter-term junk via parenth-wrapping .*?\n\t\t\t\t// to accum other capture groups' indices for \\b boosting during scoring\n\t\t\t\treTpl = '(' + reTpl.join(')(' + interCharsTpl + ')(') + ')';\n\t\t\t\treTpl = '(.?' + preTpl + ')' + reTpl + '(' + sufTpl + '.*)'; // nit: trailing capture here assumes interIns = Inf\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treTpl = reTpl.join(interCharsTpl);\n\t\t\treTpl = preTpl + reTpl + sufTpl;\n\t\t}\n\n\t//\tconsole.log(reTpl);\n\n\t\treturn [new RegExp(reTpl, 'i'), parts, contrs];\n\t};\n\n\tconst filter = (haystack, needle, idxs) => {\n\n\t\tlet out = [];\n\t\tlet [query] = prepQuery(needle);\n\n\t\tif (idxs != null) {\n\t\t\tfor (let i = 0; i < idxs.length; i++) {\n\t\t\t\tlet idx = idxs[i];\n\t\t\t\tquery.test(haystack[idx]) && out.push(idx);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor (let i = 0; i < haystack.length; i++)\n\t\t\t\tquery.test(haystack[i]) && out.push(i);\n\t\t}\n\n\t\treturn out;\n\t};\n\n\tlet withIntraBound = !!_intraBound;\n\n\tlet interBound = new RegExp(_interSplit);\n\tlet intraBound = new RegExp(_intraBound);\n\n\tconst info = (idxs, haystack, needle) => {\n\n\t\tlet [query, parts, contrs] = prepQuery(needle, 1);\n\t\tlet [queryR] = prepQuery(needle, 2);\n\t\tlet partsLen = parts.length;\n\n\t\tlet len = idxs.length;\n\n\t\tlet field = Array(len).fill(0);\n\n\t\tlet info = {\n\t\t\t// idx in haystack\n\t\t\tidx: Array(len),\n\n\t\t\t// start of match\n\t\t\tstart: field.slice(),\n\t\t\t// length of match\n\t\t//\tspan: field.slice(),\n\n\t\t\t// contiguous chars matched\n\t\t\tchars: field.slice(),\n\n\t\t\t// contiguous (no fuzz) and bounded terms (intra=0, lft2/1, rgt2/1)\n\t\t\t// excludes terms that are contiguous but have < 2 bounds (substrings)\n\t\t\tterms: field.slice(),\n\n\t\t\t// cumulative length of unmatched chars (fuzz) within span\n\t\t\tinterIns: field.slice(), // between terms\n\t\t\tintraIns: field.slice(), // within terms\n\n\t\t\t// interLft/interRgt counters\n\t\t\tinterLft2: field.slice(),\n\t\t\tinterRgt2: field.slice(),\n\t\t\tinterLft1: field.slice(),\n\t\t\tinterRgt1: field.slice(),\n\n\t\t\tranges: Array(len),\n\t\t};\n\n\t\t// might discard idxs based on bounds checks\n\t\tlet mayDiscard = interLft == 1 || interRgt == 1;\n\n\t\tlet ii = 0;\n\n\t\tfor (let i = 0; i < idxs.length; i++) {\n\t\t\tlet mhstr = haystack[idxs[i]];\n\n\t\t\t// the matched parts are [full, junk, term, junk, term, junk]\n\t\t\tlet m = mhstr.match(query);\n\n\t\t\t// leading junk\n\t\t\tlet start = m.index + m[1].length;\n\n\t\t\tlet idxAcc = start;\n\t\t//\tlet span = m[0].length;\n\n\t\t\tlet disc = false;\n\t\t\tlet lft2 = 0;\n\t\t\tlet lft1 = 0;\n\t\t\tlet rgt2 = 0;\n\t\t\tlet rgt1 = 0;\n\t\t\tlet chars = 0;\n\t\t\tlet terms = 0;\n\t\t\tlet inter = 0;\n\t\t\tlet intra = 0;\n\n\t\t\tlet refine = [];\n\n\t\t\tfor (let j = 0, k = 2; j < partsLen; j++, k+=2) {\n\t\t\t\tlet group = m[k].toLowerCase();\n\t\t\t\tlet term = parts[j] + contrs[j];\n\t\t\t\tlet termLen = term.length;\n\t\t\t\tlet groupLen = group.length;\n\t\t\t\tlet fullMatch = group == term;\n\n\t\t\t\t// this won't handle the case when an exact match exists across the boundary of the current group and the next junk\n\t\t\t\t// e.g. blob,ob when searching for 'bob' but finding the earlier `blob` (with extra insertion)\n\t\t\t\tif (!fullMatch && m[k+1].length >= termLen) {\n\t\t\t\t\t// probe for exact match in inter junk\n\t\t\t\t\tlet idxOf = m[k+1].toLowerCase().indexOf(term);\n\n\t\t\t\t\tif (idxOf > -1) {\n\t\t\t\t\t\trefine.push(idxAcc, idxOf, termLen);\n\t\t\t\t\t\tidxAcc += refineMatch(m, k, idxOf, termLen);\n\t\t\t\t\t\tgroup = term;\n\t\t\t\t\t\tgroupLen = termLen;\n\t\t\t\t\t\tfullMatch = true;\n\n\t\t\t\t\t\tif (j == 0)\n\t\t\t\t\t\t\tstart = idxAcc;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (mayDiscard || fullMatch) {\n\t\t\t\t\t// does group's left and/or right land on \\b\n\t\t\t\t\tlet lftCharIdx = idxAcc - 1;\n\t\t\t\t\tlet rgtCharIdx = idxAcc + groupLen;\n\n\t\t\t\t\tlet isPre = true;\n\t\t\t\t\tlet isSuf = true;\n\n\t\t\t\t\t// prefix info\n\t\t\t\t\tif (lftCharIdx == -1 || interBound.test(mhstr[lftCharIdx]))\n\t\t\t\t\t\tfullMatch && lft2++;\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (interLft == 2) {\n\t\t\t\t\t\t\tdisc = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (withIntraBound && intraBound.test(mhstr[lftCharIdx] + mhstr[lftCharIdx + 1]))\n\t\t\t\t\t\t\tfullMatch && lft1++;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (interLft == 1) {\n\t\t\t\t\t\t\t\t// regexps are eager, so try to improve the match by probing forward inter junk for exact match at a boundary\n\t\t\t\t\t\t\t\tlet junk = m[k+1];\n\t\t\t\t\t\t\t\tlet junkIdx = idxAcc + groupLen;\n\n\t\t\t\t\t\t\t\tif (junk.length >= termLen) {\n\t\t\t\t\t\t\t\t\tlet idxOf = 0;\n\t\t\t\t\t\t\t\t\tlet found = false;\n\t\t\t\t\t\t\t\t\tlet re = new RegExp(term, 'ig');\n\n\t\t\t\t\t\t\t\t\tlet m2;\n\t\t\t\t\t\t\t\t\twhile (m2 = re.exec(junk)) {\n\t\t\t\t\t\t\t\t\t\tidxOf = m2.index;\n\n\t\t\t\t\t\t\t\t\t\tlet charIdx = junkIdx + idxOf;\n\t\t\t\t\t\t\t\t\t\tlet lftCharIdx = charIdx - 1;\n\n\n\t\t\t\t\t\t\t\t\t\tif (lftCharIdx == -1 || interBound.test(mhstr[lftCharIdx])) {\n\t\t\t\t\t\t\t\t\t\t\tlft2++;\n\t\t\t\t\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (intraBound.test(mhstr[lftCharIdx] + mhstr[charIdx])) {\n\t\t\t\t\t\t\t\t\t\t\tlft1++;\n\t\t\t\t\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (found) {\n\t\t\t\t\t\t\t\t\t\t// identical to exact term refinement pass above\n\t\t\t\t\t\t\t\t\t\trefine.push(idxAcc, idxOf, termLen);\n\t\t\t\t\t\t\t\t\t\tidxAcc += refineMatch(m, k, idxOf, termLen);\n\t\t\t\t\t\t\t\t\t\tgroup = term;\n\t\t\t\t\t\t\t\t\t\tgroupLen = termLen;\n\t\t\t\t\t\t\t\t\t\tfullMatch = true;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tdisc = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tisPre = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// suffix info\n\t\t\t\t\tif (rgtCharIdx == mhstr.length || interBound.test(mhstr[rgtCharIdx]))\n\t\t\t\t\t\tfullMatch && rgt2++;\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (interRgt == 2) {\n\t\t\t\t\t\t\tdisc = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (withIntraBound && intraBound.test(mhstr[rgtCharIdx - 1] + mhstr[rgtCharIdx]))\n\t\t\t\t\t\t\tfullMatch && rgt1++;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (interRgt == 1) {\n\t\t\t\t\t\t\t\tdisc = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tisSuf = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (fullMatch) {\n\t\t\t\t\t\tchars += termLen;\n\n\t\t\t\t\t\tif (isPre && isSuf)\n\t\t\t\t\t\t\tterms++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (groupLen > termLen)\n\t\t\t\t\tintra += groupLen - termLen; // intraFuzz\n\n\t\t\t\tif (j > 0)\n\t\t\t\t\tinter += m[k-1].length; // interFuzz\n\n\t\t\t\t// TODO: group here is lowercased, which is okay for length cmp, but not more case-sensitive filts\n\t\t\t\tif (!opts.intraFilt(term, group, idxAcc)) {\n\t\t\t\t\tdisc = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (j < partsLen - 1)\n\t\t\t\t\tidxAcc += groupLen + m[k+1].length;\n\t\t\t}\n\n\t\t\tif (!disc) {\n\t\t\t\tinfo.idx[ii] = idxs[i];\n\t\t\t\tinfo.interLft2[ii] = lft2;\n\t\t\t\tinfo.interLft1[ii] = lft1;\n\t\t\t\tinfo.interRgt2[ii] = rgt2;\n\t\t\t\tinfo.interRgt1[ii] = rgt1;\n\t\t\t\tinfo.chars[ii] = chars;\n\t\t\t\tinfo.terms[ii] = terms;\n\t\t\t\tinfo.interIns[ii] = inter;\n\t\t\t\tinfo.intraIns[ii] = intra;\n\n\t\t\t\tinfo.start[ii] = start;\n\t\t\t//\tinfo.span[ii] = span;\n\n\t\t\t\t// ranges\n\t\t\t\tlet m = mhstr.match(queryR);\n\t\t\t\tlet ranges = info.ranges[ii] = [];\n\n\t\t\t\tlet idxAcc = m.index + m[1].length;\n\t\t\t\tlet from = idxAcc;\n\t\t\t\tlet to = idxAcc;\n\n\t\t\t\tlet refLen = refine.length;\n\t\t\t\tlet ri = refLen > 0 ? 0 : Infinity;\n\t\t\t\tlet lastRi = refLen - 3;\n\n\t\t\t\tfor (let i = 2; i < m.length; i++) {\n\t\t\t\t\tlet len = m[i].length;\n\n\t\t\t\t\tif (ri <= lastRi && refine[ri] == idxAcc) {\n\t\t\t\t\t\tlet idxInNext = refine[ri+1];\n\t\t\t\t\t\tlet matchLen = refine[ri+2];\n\t\t\t\t\t\tlet offset = idxInNext + matchLen;\n\n\t\t\t\t\t\tidxAcc += len + offset;\n\t\t\t\t\t\tfrom = idxAcc - matchLen;\n\t\t\t\t\t\tm[i+1] = m[i+1].slice(offset);\n\n\t\t\t\t\t\tri+=3;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tidxAcc += len;\n\n\t\t\t\t\tif (i % 2 == 0)\n\t\t\t\t\t\tto = idxAcc;\n\t\t\t\t\telse if (len > 0) {\n\t\t\t\t\t\tranges.push(from, to);\n\t\t\t\t\t\tfrom = to = idxAcc;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (to > from)\n\t\t\t\t\tranges.push(from, to);\n\n\t\t\t\tii++;\n\t\t\t}\n\t\t}\n\n\t\t// trim arrays\n\t\tif (ii < idxs.length) {\n\t\t\tfor (let k in info)\n\t\t\t\tinfo[k] = info[k].slice(0, ii);\n\t\t}\n\n\t\treturn info;\n\t};\n\n\tconst refineMatch = (m, k, idxInNext, termLen) => {\n\t\t// shift the current group into the prior junk\n\t\tlet prepend = m[k] + m[k+1].slice(0, idxInNext);\n\t\tm[k-1] += prepend;\n\t\tm[k] = m[k+1].slice(idxInNext, idxInNext + termLen);\n\t\tm[k+1] = m[k+1].slice(idxInNext + termLen);\n\t\treturn prepend.length;\n\t};\n\n\t// returns [idxs, info, order]\n\tconst _search = (haystack, needle, outOfOrder = false, infoThresh = 1e3, preFiltered) => {\n\t\tlet needles = null;\n\t\tlet matches = null;\n\n\t\tlet negs = [];\n\n\t\tneedle = needle.replace(NEGS_RE, m => {\n\t\t\tnegs.push(m.trim().slice(1));\n\t\t\treturn '';\n\t\t});\n\n\t\tlet negsRe;\n\n\t\tif (negs.length > 0) {\n\t\t\tnegsRe = new RegExp(negs.join('|'), 'i');\n\n\t\t\tif (needle.trim() == '') {\n\t\t\t\tlet idxs = [];\n\n\t\t\t\tfor (let i = 0; i < haystack.length; i++) {\n\t\t\t\t\tif (!negsRe.test(haystack[i]))\n\t\t\t\t\t\tidxs.push(i);\n\t\t\t\t}\n\n\t\t\t\treturn [idxs, null, null];\n\t\t\t}\n\t\t}\n\n\t//\tconsole.log(negs);\n\t//\tconsole.log(needle);\n\n\t\tif (outOfOrder) {\n\t\t\t// since uFuzzy is an AND-based search, we can iteratively pre-reduce the haystack by searching\n\t\t\t// for each term in isolation before running permutations on what's left.\n\t\t\t// this is a major perf win. e.g. searching \"test man ger pp a\" goes from 570ms -> 14ms\n\t\t\tlet terms = split(needle);\n\n\t\t\tif (terms.length > 1) {\n\t\t\t\t// longest -> shortest\n\t\t\t\tlet terms2 = terms.slice().sort((a, b) => b.length - a.length);\n\n\t\t\t\tfor (let ti = 0; ti < terms2.length; ti++) {\n\t\t\t\t\t// no haystack item contained all terms\n\t\t\t\t\tif (preFiltered && preFiltered.length == 0)\n\t\t\t\t\t\treturn [[], null, null];\n\n\t\t\t\t\tpreFiltered = filter(haystack, terms2[ti], preFiltered);\n\t\t\t\t}\n\n\t\t\t\tneedles = permute(terms).map(perm => perm.join(' '));\n\n\t\t\t\t// filtered matches for each needle excluding same matches for prior needles\n\t\t\t\tmatches = [];\n\n\t\t\t\t// keeps track of already-matched idxs to skip in follow-up permutations\n\t\t\t\tlet matchedIdxs = new Set();\n\n\t\t\t\tfor (let ni = 0; ni < needles.length; ni++) {\n\t\t\t\t\tif (matchedIdxs.size < preFiltered.length) {\n\t\t\t\t\t\t// filter further for this needle, exclude already-matched\n\t\t\t\t\t\tlet preFiltered2 = preFiltered.filter(idx => !matchedIdxs.has(idx));\n\n\t\t\t\t\t\tlet matched = filter(haystack, needles[ni], preFiltered2);\n\n\t\t\t\t\t\tfor (let j = 0; j < matched.length; j++)\n\t\t\t\t\t\t\tmatchedIdxs.add(matched[j]);\n\n\t\t\t\t\t\tmatches.push(matched);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tmatches.push([]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// interOR\n\t//\tconsole.log(prepQuery(needle, 1, null, true));\n\n\t\t// non-ooo or ooo w/single term\n\t\tif (needles == null) {\n\t\t\tneedles = [needle];\n\t\t\tmatches = [preFiltered && preFiltered.length > 0 ? preFiltered : filter(haystack, needle)];\n\t\t}\n\n\t\tlet retInfo = null;\n\t\tlet retOrder = null;\n\n\t\tif (negs.length > 0)\n\t\t\tmatches = matches.map(idxs => idxs.filter(idx => !negsRe.test(haystack[idx])));\n\n\t\tlet matchCount = matches.reduce((acc, idxs) => acc + idxs.length, 0);\n\n\t\t// rank, sort, concat\n\t\tif (matchCount <= infoThresh) {\n\t\t\tretInfo = {};\n\t\t\tretOrder = [];\n\n\t\t\tfor (let ni = 0; ni < matches.length; ni++) {\n\t\t\t\tlet idxs = matches[ni];\n\n\t\t\t\tif (idxs == null || idxs.length == 0)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tlet needle = needles[ni];\n\t\t\t\tlet _info = info(idxs, haystack, needle);\n\t\t\t\tlet order = opts.sort(_info, haystack, needle);\n\n\t\t\t\t// offset idxs for concat'ing infos\n\t\t\t\tif (ni > 0) {\n\t\t\t\t\tfor (let i = 0; i < order.length; i++)\n\t\t\t\t\t\torder[i] += retOrder.length;\n\t\t\t\t}\n\n\t\t\t\tfor (let k in _info) {\n\t\t\t\t\tretInfo[k] = (retInfo[k] ? retInfo[k] : []).concat(_info[k]);\n }\n\n\t\t\t\tretOrder = retOrder.concat(order);\n\t\t\t}\n\t\t}\n\n\t\treturn [\n\t\t\t[].concat(...matches),\n\t\t\tretInfo,\n\t\t\tretOrder,\n\t\t];\n\t};\n\n\treturn {\n\t\tsearch: (...args) => {\n\t\t\tlet out = _search(...args);\n\t\t\treturn out;\n\t\t},\n\t\tsplit,\n\t\tfilter,\n\t\tinfo,\n\t\tsort: opts.sort,\n\t};\n}\n\nconst latinize = (() => {\n\tlet accents = {\n\t\tA: 'ÁÀÃÂÄĄ',\n\t\ta: 'áàãâäą',\n\t\tE: 'ÉÈÊËĖ',\n\t\te: 'éèêëę',\n\t\tI: 'ÍÌÎÏĮ',\n\t\ti: 'íìîïį',\n\t\tO: 'ÓÒÔÕÖ',\n\t\to: 'óòôõö',\n\t\tU: 'ÚÙÛÜŪŲ',\n\t\tu: 'úùûüūų',\n\t\tC: 'ÇČ',\n\t\tc: 'çč',\n\t\tN: 'Ñ',\n\t\tn: 'ñ',\n\t\tS: 'Š',\n\t\ts: 'š'\n\t};\n\n\tlet accentsMap = new Map();\n\tlet accentsTpl = '';\n\n\tfor (let r in accents) {\n\t\taccents[r].split('').forEach(a => {\n\t\t\taccentsTpl += a;\n\t\t\taccentsMap.set(a, r);\n\t\t});\n\t}\n\n\tlet accentsRe = new RegExp(`[${accentsTpl}]`, 'g');\n\tlet replacer = m => accentsMap.get(m);\n\n\treturn strings => {\n\t\tif (typeof strings == 'string')\n\t\t\treturn strings.replace(accentsRe, replacer);\n\n\t\tlet out = Array(strings.length);\n\t\tfor (let i = 0; i < strings.length; i++)\n\t\t\tout[i] = strings[i].replace(accentsRe, replacer);\n\t\treturn out;\n\t};\n})();\n\n// https://stackoverflow.com/questions/9960908/permutations-in-javascript/37580979#37580979\nfunction permute(arr) {\n\tarr = arr.slice();\n\n\tlet length = arr.length,\n\t\tresult = [arr.slice()],\n\t\tc = new Array(length).fill(0),\n\t\ti = 1, k, p;\n\n\twhile (i < length) {\n\t\tif (c[i] < i) {\n\t\t\tk = i % 2 && c[i];\n\t\t\tp = arr[i];\n\t\t\tarr[i] = arr[k];\n\t\t\tarr[k] = p;\n\t\t\t++c[i];\n\t\t\ti = 1;\n\t\t\tresult.push(arr.slice());\n\t\t} else {\n\t\t\tc[i] = 0;\n\t\t\t++i;\n\t\t}\n\t}\n\n\treturn result;\n}\n\nconst _mark = (part, matched) => matched ? `${part}` : part;\nconst _append = (acc, part) => acc + part;\n\nfunction highlight(str, ranges, mark = _mark, accum = '', append = _append) {\n let tmp = append(accum, mark(str.substring(0, ranges[0]), false));\n\taccum = tmp !== null ? tmp : accum;\n\n\tfor (let i = 0; i < ranges.length; i+=2) {\n\t\tlet fr = ranges[i];\n\t\tlet to = ranges[i+1];\n\n tmp = append(accum, mark(str.substring(fr, to), true));\n\t\taccum = tmp !== null ? tmp : accum;\n\n\t\tif (i < ranges.length - 3) {\n tmp = append(accum, mark(str.substring(ranges[i + 1], ranges[i + 2]), false));\n accum = tmp !== null ? tmp : accum;\n }\n\t}\n\n tmp = append(accum, mark(str.substring(ranges[ranges.length - 1]), false));\n\taccum = tmp !== null ? tmp : accum;\n\n\treturn accum;\n}\n\nuFuzzy.latinize = latinize;\nuFuzzy.permute = arr => {\n\tlet idxs = permute([...Array(arr.length).keys()]).sort((a,b) => {\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tif (a[i] != b[i])\n\t\t\t\treturn a[i] - b[i];\n\t\t}\n\t\treturn 0;\n\t});\n\n\treturn idxs.map(pi => pi.map(i => arr[i]));\n};\nuFuzzy.highlight = highlight;\n\nexport { uFuzzy as default };\n","import uFuzzy from '@leeoniya/ufuzzy';\n// See https://github.com/leeoniya/uFuzzy#options\nconst uf = new uFuzzy({\n intraMode: 1,\n intraIns: 1,\n intraSub: 1,\n intraTrn: 1,\n intraDel: 1,\n});\nfunction sortCommands(a, b, favouriteCommands, recentCommands) {\n // Sort by recent first\n const aIsRecent = recentCommands.includes(a.id);\n const bIsRecent = recentCommands.includes(b.id);\n if (aIsRecent && !bIsRecent) {\n return -1;\n }\n if (!aIsRecent && bIsRecent) {\n return 1;\n }\n if (aIsRecent && bIsRecent) {\n return recentCommands.indexOf(a.id) - recentCommands.indexOf(b.id);\n }\n // Sort by favourites second\n const aIsFavourite = favouriteCommands.includes(a.id);\n const bIsFavourite = favouriteCommands.includes(b.id);\n if (aIsFavourite && !bIsFavourite) {\n return -1;\n }\n if (!aIsFavourite && bIsFavourite) {\n return 1;\n }\n // Sort by name third\n return a.name.localeCompare(b.name);\n}\nexport default function filterCommands(selectedCommandGroup, searchWord, commands, favourites, recentCommands) {\n // If there is a search word, return all commands to allow deep search\n // If no search word is given, return all commands in the currently selected group or all recent commands if no group is selected\n let availableCommands = Object.values(commands);\n availableCommands = searchWord\n ? availableCommands\n : availableCommands.filter((command) => command.parentId === selectedCommandGroup ||\n (!selectedCommandGroup && recentCommands.includes(command.id)));\n // If there is no search word, return all commands in the current context with favourites first, the recent commands will only be prioritised if we are at the top level\n if (!searchWord) {\n return availableCommands\n .sort((a, b) => sortCommands(a, b, favourites, selectedCommandGroup ? [] : recentCommands))\n .map((command) => command.id);\n }\n // Create a list of all available commands with their name and description as haystack for the search\n const availableCommandNames = availableCommands.map(({ name, description }) => name + ' ' + description);\n const [indices, , order] = uf.search(availableCommandNames, searchWord.toLowerCase());\n const matchingIds = order.map((i) => availableCommands[indices[i]].id);\n // Add all commands that can handle queries to the result, the Set removes duplicates\n return matchingIds;\n}\n","export default function assert(condition, message = 'Assertion failed') {\n if (condition === false)\n throw Error(message);\n}\n","export default function classnames(...args) {\n return args.filter(Boolean).join(' ');\n}\n","import { logger } from '../helpers';\nexport var STATUS;\n(function (STATUS) {\n STATUS[\"COLLAPSED\"] = \"collapsed\";\n STATUS[\"IDLE\"] = \"idle\";\n STATUS[\"EXECUTING_COMMAND\"] = \"executingCommand\";\n STATUS[\"DISPLAYING_RESULT\"] = \"displayingResult\";\n})(STATUS || (STATUS = {}));\nexport var TRANSITION;\n(function (TRANSITION) {\n TRANSITION[\"RESET_SEARCH\"] = \"RESET_SEARCH\";\n TRANSITION[\"HIGHLIGHT_NEXT_ITEM\"] = \"HIGHLIGHT_NEXT_ITEM\";\n TRANSITION[\"HIGHLIGHT_PREVIOUS_ITEM\"] = \"HIGHLIGHT_PREVIOUS_ITEM\";\n TRANSITION[\"CANCEL\"] = \"CANCEL\";\n TRANSITION[\"SELECT_GROUP\"] = \"SELECT_GROUP\";\n TRANSITION[\"GO_TO_PARENT_GROUP\"] = \"GO_TO_PARENT_GROUP\";\n TRANSITION[\"UPDATE_SEARCH\"] = \"UPDATE_SEARCH\";\n TRANSITION[\"UPDATE_COMMAND_QUERY\"] = \"UPDATE_COMMAND_QUERY\";\n TRANSITION[\"EXECUTE_COMMAND\"] = \"EXECUTE_COMMAND\";\n TRANSITION[\"FINISH_COMMAND\"] = \"FINISH_COMMAND\";\n TRANSITION[\"UPDATE_RESULT\"] = \"UPDATE_RESULT\";\n TRANSITION[\"EXPAND\"] = \"EXPAND\";\n TRANSITION[\"ADD_FAVOURITE\"] = \"ADD_FAVOURITE\";\n TRANSITION[\"REMOVE_FAVOURITE\"] = \"REMOVE_FAVOURITE\";\n})(TRANSITION || (TRANSITION = {}));\nexport var ACTION;\n(function (ACTION) {\n ACTION[\"ADD_FAVOURITE\"] = \"ADD_FAVOURITE\";\n ACTION[\"ADD_RECENTLY_USED\"] = \"ADD_RECENTLY_USED\";\n ACTION[\"EXPAND\"] = \"EXPAND\";\n ACTION[\"HIGHLIGHT_NEXT_COMMAND\"] = \"HIGHLIGHT_NEXT_COMMAND\";\n ACTION[\"HIGHLIGHT_NEXT_OPTION\"] = \"HIGHLIGHT_NEXT_OPTION\";\n ACTION[\"HIGHLIGHT_PREVIOUS_COMMAND\"] = \"HIGHLIGHT_PREVIOUS_COMMAND\";\n ACTION[\"HIGHLIGHT_PREVIOUS_OPTION\"] = \"HIGHLIGHT_PREVIOUS_OPTION\";\n ACTION[\"LEAVE_GROUP\"] = \"LEAVE_GROUP\";\n ACTION[\"REFRESH_COMMANDS\"] = \"REFRESH_COMMANDS\";\n ACTION[\"REMOVE_FAVOURITE\"] = \"REMOVE_FAVOURITE\";\n ACTION[\"RESET_HIGHLIGHT\"] = \"RESET_HIGHLIGHT\";\n ACTION[\"RESET_OPTION_HIGHLIGHT\"] = \"RESET_OPTION_HIGHLIGHT\";\n ACTION[\"RESET_SEARCH\"] = \"RESET_SEARCH\";\n ACTION[\"RESET_SEARCH_OR_LEAVE_GROUP\"] = \"RESET_SEARCH_OR_LEAVE_GROUP\";\n ACTION[\"SET_ACTIVE_COMMAND\"] = \"SET_ACTIVE_COMMAND\";\n ACTION[\"SET_COMMAND_QUERY\"] = \"SET_COMMAND_QUERY\";\n ACTION[\"SET_GROUP\"] = \"SET_GROUP\";\n ACTION[\"SET_SEARCH_WORD\"] = \"SET_SEARCH_WORD\";\n ACTION[\"UNSET_ACTIVE_COMMAND\"] = \"UNSET_ACTIVE_COMMAND\";\n ACTION[\"UNSET_RESULT\"] = \"UNSET_RESULT\";\n ACTION[\"UPDATE_RESULT\"] = \"UPDATE_RESULT\";\n})(ACTION || (ACTION = {}));\nexport const machine = {\n initial: STATUS.COLLAPSED,\n states: {\n collapsed: {\n on: {\n UPDATE_SEARCH: {\n target: STATUS.IDLE,\n actions: [ACTION.EXPAND, ACTION.SET_SEARCH_WORD, ACTION.REFRESH_COMMANDS],\n },\n HIGHLIGHT_NEXT_ITEM: {\n target: STATUS.IDLE,\n actions: [ACTION.REFRESH_COMMANDS, ACTION.EXPAND],\n },\n EXPAND: {\n target: STATUS.IDLE,\n actions: [ACTION.REFRESH_COMMANDS, ACTION.EXPAND],\n },\n },\n },\n idle: {\n on: {\n UPDATE_SEARCH: {\n target: STATUS.IDLE,\n actions: [ACTION.SET_SEARCH_WORD, ACTION.RESET_HIGHLIGHT, ACTION.REFRESH_COMMANDS],\n },\n HIGHLIGHT_NEXT_ITEM: {\n target: STATUS.IDLE,\n actions: [ACTION.HIGHLIGHT_NEXT_COMMAND],\n },\n HIGHLIGHT_PREVIOUS_ITEM: {\n target: STATUS.IDLE,\n actions: [ACTION.HIGHLIGHT_PREVIOUS_COMMAND],\n },\n CANCEL: {\n target: STATUS.IDLE,\n actions: [ACTION.RESET_HIGHLIGHT, ACTION.RESET_SEARCH_OR_LEAVE_GROUP, ACTION.REFRESH_COMMANDS],\n },\n EXECUTE_COMMAND: {\n target: STATUS.EXECUTING_COMMAND,\n actions: [ACTION.ADD_RECENTLY_USED, ACTION.SET_ACTIVE_COMMAND, ACTION.REFRESH_COMMANDS],\n },\n GO_TO_PARENT_GROUP: {\n target: STATUS.IDLE,\n actions: [ACTION.RESET_HIGHLIGHT, ACTION.LEAVE_GROUP, ACTION.REFRESH_COMMANDS],\n },\n SELECT_GROUP: {\n target: STATUS.IDLE,\n actions: [ACTION.RESET_SEARCH, ACTION.RESET_HIGHLIGHT, ACTION.SET_GROUP, ACTION.REFRESH_COMMANDS],\n },\n ADD_FAVOURITE: {\n target: STATUS.IDLE,\n actions: [ACTION.ADD_FAVOURITE, ACTION.REFRESH_COMMANDS],\n },\n REMOVE_FAVOURITE: {\n target: STATUS.IDLE,\n actions: [ACTION.REMOVE_FAVOURITE, ACTION.REFRESH_COMMANDS],\n },\n },\n },\n executingCommand: {\n on: {\n UPDATE_RESULT: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.UPDATE_RESULT],\n },\n FINISH_COMMAND: {\n target: STATUS.IDLE,\n actions: [ACTION.UNSET_ACTIVE_COMMAND],\n },\n },\n },\n displayingResult: {\n on: {\n UPDATE_COMMAND_QUERY: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.SET_COMMAND_QUERY],\n },\n UPDATE_RESULT: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.UPDATE_RESULT, ACTION.RESET_OPTION_HIGHLIGHT],\n },\n HIGHLIGHT_NEXT_ITEM: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.HIGHLIGHT_NEXT_OPTION],\n },\n HIGHLIGHT_PREVIOUS_ITEM: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.HIGHLIGHT_PREVIOUS_OPTION],\n },\n EXECUTE_COMMAND: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.SET_ACTIVE_COMMAND],\n },\n CANCEL: {\n target: STATUS.IDLE,\n actions: [ACTION.UNSET_RESULT, ACTION.UNSET_ACTIVE_COMMAND, ACTION.RESET_OPTION_HIGHLIGHT],\n },\n FINISH_COMMAND: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.UNSET_ACTIVE_COMMAND],\n },\n },\n },\n },\n};\nexport function transition(state, event, actionCallback) {\n var _a, _b, _c;\n let nextStateNode = (_b = (_a = machine.states[state.status].on) === null || _a === void 0 ? void 0 : _a[event.type]) !== null && _b !== void 0 ? _b : null;\n if (!nextStateNode) {\n logger.error(`No transition found for event \"${event.type}\" in state \"${state.status}\"`);\n nextStateNode = { target: state.status };\n }\n const nextState = {\n ...state,\n status: typeof nextStateNode == 'string' ? nextStateNode : nextStateNode.target,\n };\n if (actionCallback && typeof nextStateNode == 'object') {\n (_c = nextStateNode.actions) === null || _c === void 0 ? void 0 : _c.forEach((action) => actionCallback(action, nextState, event));\n }\n logger.debug(`Transitioned from \"${state.status}\" to \"${nextState.status}\" with event \"${event.type}\"`);\n return nextState;\n}\n","import { assert, clamp, filterCommands } from '../helpers';\nimport { ACTION, TRANSITION, transition } from './commandBarMachine';\nconst MAX_RECENTLY_USED = 5;\nfunction runAction(action, nextState, event) {\n switch (action) {\n case ACTION.RESET_SEARCH:\n nextState.searchWord = '';\n break;\n case ACTION.RESET_HIGHLIGHT:\n nextState.highlightedItem = 0;\n break;\n case ACTION.REFRESH_COMMANDS:\n nextState.availableCommandIds = filterCommands(nextState.selectedCommandGroup, nextState.searchWord, nextState.commands, nextState.favouriteCommands, nextState.recentCommands);\n break;\n case ACTION.HIGHLIGHT_NEXT_COMMAND:\n nextState.highlightedItem = clamp(nextState.highlightedItem + 1, 0, nextState.availableCommandIds.length - 1);\n break;\n case ACTION.HIGHLIGHT_PREVIOUS_COMMAND:\n nextState.highlightedItem = clamp(nextState.highlightedItem - 1, 0, nextState.availableCommandIds.length - 1);\n break;\n case ACTION.HIGHLIGHT_NEXT_OPTION:\n nextState.highlightedOption = clamp(nextState.highlightedOption + 1, 0, Object.keys(nextState.result.options).length - 1);\n break;\n case ACTION.HIGHLIGHT_PREVIOUS_OPTION:\n nextState.highlightedOption = clamp(nextState.highlightedOption - 1, 0, Object.keys(nextState.result.options).length - 1);\n break;\n case ACTION.SET_SEARCH_WORD:\n assert(event.type === TRANSITION.UPDATE_SEARCH);\n nextState.searchWord = event.searchWord;\n break;\n case ACTION.SET_COMMAND_QUERY:\n assert(event.type === TRANSITION.UPDATE_COMMAND_QUERY);\n nextState.commandQuery = event.commandQuery;\n nextState.commandQueryDirty = true;\n break;\n case ACTION.EXPAND:\n nextState.expanded = true;\n break;\n case ACTION.SET_ACTIVE_COMMAND:\n assert(event.type === TRANSITION.EXECUTE_COMMAND);\n nextState.activeCommandId = event.commandId;\n nextState.activeCommandMessage = event.message;\n break;\n case ACTION.UNSET_ACTIVE_COMMAND:\n nextState.activeCommandId = null;\n nextState.activeCommandMessage = null;\n break;\n case ACTION.UPDATE_RESULT:\n assert(event.type === TRANSITION.UPDATE_RESULT);\n assert(typeof event.result.success === 'boolean');\n nextState.result = {\n options: {},\n message: 'Command executed',\n view: null,\n success: false,\n ...event.result,\n };\n nextState.resultCommandId = nextState.activeCommandId;\n nextState.commandQueryDirty = false;\n break;\n case ACTION.RESET_OPTION_HIGHLIGHT:\n nextState.highlightedOption = 0;\n break;\n case ACTION.RESET_SEARCH_OR_LEAVE_GROUP:\n if (nextState.commandQuery) {\n nextState.commandQuery = '';\n }\n else if (nextState.searchWord) {\n nextState.searchWord = '';\n }\n else {\n nextState.selectedCommandGroup = nextState.selectedCommandGroup\n ? nextState.commands[nextState.selectedCommandGroup].parentId\n : null;\n }\n break;\n case ACTION.UNSET_RESULT:\n nextState.result = null;\n nextState.resultCommandId = null;\n nextState.commandQuery = '';\n break;\n case ACTION.LEAVE_GROUP:\n nextState.selectedCommandGroup = nextState.selectedCommandGroup\n ? nextState.commands[nextState.selectedCommandGroup].parentId\n : null;\n break;\n case ACTION.SET_GROUP:\n assert(event.type === TRANSITION.SELECT_GROUP);\n nextState.selectedCommandGroup = event.commandId;\n break;\n case ACTION.ADD_FAVOURITE:\n assert(event.type === TRANSITION.ADD_FAVOURITE);\n if (!nextState.favouriteCommands.includes(event.commandId)) {\n nextState.favouriteCommands = [...nextState.favouriteCommands, event.commandId];\n }\n break;\n case ACTION.REMOVE_FAVOURITE:\n assert(event.type === TRANSITION.REMOVE_FAVOURITE);\n nextState.favouriteCommands = nextState.favouriteCommands.filter((id) => id !== event.commandId);\n break;\n case ACTION.ADD_RECENTLY_USED:\n assert(event.type === TRANSITION.EXECUTE_COMMAND);\n // Only add to recently used if the command has an action\n if (!nextState.commands[event.commandId].action) {\n break;\n }\n if (nextState.recentCommands.includes(event.commandId)) {\n nextState.recentCommands = nextState.recentCommands.filter((id) => id !== event.commandId);\n }\n nextState.recentCommands.unshift(event.commandId);\n if (nextState.recentCommands.length > MAX_RECENTLY_USED) {\n nextState.recentCommands.pop();\n }\n break;\n default:\n throw Error(`Action ${action} not implemented`);\n }\n}\nconst commandBarReducer = (state, event) => {\n return transition(state, event, runAction);\n};\nexport { commandBarReducer };\n","import React from 'react';\nimport * as styles from './IconWrapper.module.css';\nconst IconWrapper = ({ children }) => {\n return React.createElement(\"span\", { className: styles.iconWrap }, children);\n};\nexport default React.memo(IconWrapper);\n","import React from 'react';\nimport { useCommandBarState, useIntl } from '../../state';\nimport * as styles from './Branding.module.css';\nconst Branding = () => {\n const { state: { showBranding }, } = useCommandBarState();\n const { translate } = useIntl();\n if (!showBranding)\n return null;\n return (React.createElement(\"a\", { href: \"https://helzle.it/projects?source=commandbar\", title: translate('CommandBarFooter.branding', 'Made with love by Sebastian Helzle'), target: \"_blank\", rel: \"noreferrer noopener\", className: styles.madeWithLove },\n React.createElement(\"small\", null, translate('CommandBarFooter.brandingSmall', 'Made with love by')),\n React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"18\", height: \"18\", viewBox: \"0 0 180 180\" },\n React.createElement(\"defs\", null,\n React.createElement(\"linearGradient\", { id: \"a\", gradientUnits: \"userSpaceOnUse\", x1: \"280.25\", y1: \"377.003\", x2: \"373.261\", y2: \"377.003\" },\n React.createElement(\"stop\", { offset: \"0\", stopColor: \"#297AAC\" }),\n React.createElement(\"stop\", { offset: \"1\", stopColor: \"#53AADA\" }))),\n React.createElement(\"path\", { d: \"M0 180.017h37.287L71.35 52.898H34.061zM48.717 0l-9.083 33.898h36.675L85.392 0z\", fill: \"#B9B7B3\" }),\n React.createElement(\"path\", { d: \"M335.972 313.444H288.25l-8 28.306h47.691l-28.03 98.813h39.287l34.063-127.119z\", fill: \"url(#a)\", transform: \"translate(-195.462 -260.325)\" }))));\n};\nexport default React.memo(Branding);\n","import React from 'react';\nexport function IconBack() {\n return (React.createElement(\"svg\", { viewBox: \"0 0 448 512\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"m257.5 445.1-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z\" })));\n}\n","import React from 'react';\nexport function IconNeos() {\n return (React.createElement(\"svg\", { viewBox: \"0 0 512 512\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M415.44 512h-95.11L212.12 357.46v91.1L125.69 512H28V29.82L68.47 0h108.05l123.74 176.13V63.45L386.69 0h97.69v461.5zM38.77 35.27V496l72-52.88V194l215.5 307.64h84.79l52.35-38.17h-78.27L69 13zm82.54 466.61 80-58.78v-101l-79.76-114.4v220.94L49 501.89h72.34zM80.63 10.77l310.6 442.57h82.37V10.77h-79.75v317.56L170.91 10.77zM311 191.65l72 102.81V15.93l-72 53v122.72z\" })));\n}\n","import React from 'react';\nexport function IconSpinner() {\n return (React.createElement(\"svg\", { viewBox: \"0 0 512 512\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M288 39.056v16.659c0 10.804 7.281 20.159 17.686 23.066C383.204 100.434 440 171.518 440 256c0 101.689-82.295 184-184 184-101.689 0-184-82.295-184-184 0-84.47 56.786-155.564 134.312-177.219C216.719 75.874 224 66.517 224 55.712V39.064c0-15.709-14.834-27.153-30.046-23.234C86.603 43.482 7.394 141.206 8.003 257.332c.72 137.052 111.477 246.956 248.531 246.667C393.255 503.711 504 392.788 504 256c0-115.633-79.14-212.779-186.211-240.236C302.678 11.889 288 23.456 288 39.056z\" })));\n}\n","import React from 'react';\nexport function IconStar() {\n return (React.createElement(\"svg\", { viewBox: \"0 0 576 512\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M528.1 171.5 382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6zM388.6 312.3l23.7 138.4L288 385.4l-124.3 65.3 23.7-138.4-100.6-98 139-20.2 62.2-126 62.2 126 139 20.2-100.6 98z\" })));\n}\n","import React from 'react';\nexport function IconPlay() {\n return (React.createElement(\"svg\", { viewBox: \"0 0 512 512\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z\" })));\n}\n","import React from 'react';\nexport function IconRepeat() {\n return (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 512 512\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M0 224c0 17.7 14.3 32 32 32s32-14.3 32-32c0-53 43-96 96-96H320v32c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-9.2-9.2-22.9-11.9-34.9-6.9S320 19.1 320 32V64H160C71.6 64 0 135.6 0 224zm512 64c0-17.7-14.3-32-32-32s-32 14.3-32 32c0 53-43 96-96 96H192V352c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V448H352c88.4 0 160-71.6 160-160z\" })));\n}\n","import React from 'react';\nimport { useComputed } from '@preact/signals';\nimport { useCommandBarState } from '../../state';\nimport IconWrapper from '../IconWrapper/IconWrapper';\nimport Branding from './Branding';\nimport { IconNeos, IconSpinner } from '../Icons';\nimport * as styles from './CommandBarFooter.module.css';\nconst CommandBarFooter = () => {\n const { state: { activeCommandId, activeCommandMessage, commands, result, selectedCommandGroup, expanded }, Icon, } = useCommandBarState();\n const runningCommand = useComputed(() => {\n var _a;\n if (!activeCommandId.value)\n return null;\n // FIXME: This will not be correct when a command and an option in the result have the same id\n return activeCommandId.value\n ? (_a = commands.value[activeCommandId.value]) !== null && _a !== void 0 ? _a : result.value.options[activeCommandId.value]\n : null;\n });\n if (!expanded.value)\n return null;\n return (React.createElement(\"footer\", { className: styles.commandBarFooter },\n activeCommandId.value ? (React.createElement(\"span\", { className: styles.activity },\n React.createElement(IconWrapper, null,\n React.createElement(IconSpinner, null)),\n React.createElement(\"em\", null,\n runningCommand.value.name,\n \" \\u2012 \",\n activeCommandMessage))) : selectedCommandGroup.value ? (React.createElement(\"span\", { className: styles.breadcrumb },\n React.createElement(Icon, { icon: commands.value[selectedCommandGroup.value].icon }),\n React.createElement(\"small\", null, commands.value[selectedCommandGroup.value].name))) : (React.createElement(IconWrapper, null,\n React.createElement(IconNeos, null))),\n React.createElement(Branding, null)));\n};\nexport default React.memo(CommandBarFooter);\n","import React, { useCallback, useRef } from 'react';\nimport { useSignalEffect } from '@preact/signals';\nimport { useCommandBarState, STATUS, useIntl, useCommandExecutor } from '../../state';\nimport IconWrapper from '../IconWrapper/IconWrapper';\nimport { IconPlay, IconRepeat } from '../Icons';\nimport * as styles from './SearchBox.module.css';\n// Timer helper for debouncing updates of command query results\nlet updateResultsTimer = null;\nconst RESULT_UPDATE_DEBOUNCE_TIME = 500;\nconst SearchBox = () => {\n var _a;\n const { state, actions } = useCommandBarState();\n const { executeCommand } = useCommandExecutor();\n const { translate } = useIntl();\n const inputRef = useRef();\n const activeCommand = state.commands.value[state.activeCommandId.value || state.resultCommandId.value];\n const handleChange = useCallback((e) => {\n var _a;\n if (state.status.value === STATUS.DISPLAYING_RESULT) {\n actions.UPDATE_COMMAND_QUERY(e.target.value);\n // Execute command after a delay if it's not a manual command\n if (!((_a = state.commands.value[state.resultCommandId.value]) === null || _a === void 0 ? void 0 : _a.executeManually)) {\n if (updateResultsTimer) {\n clearTimeout(updateResultsTimer);\n }\n updateResultsTimer = setTimeout(() => executeCommand(state.resultCommandId.value), RESULT_UPDATE_DEBOUNCE_TIME);\n }\n }\n else {\n actions.UPDATE_SEARCH(e.target.value);\n }\n }, []);\n const handleKeyPress = useCallback((e) => {\n // Prevent escape event from bubbling up if the input is focused and the native reset should be used\n if (e.key === 'Escape') {\n if (inputRef.current.value) {\n e.preventDefault();\n e.stopPropagation();\n }\n }\n }, [inputRef.current]);\n // Focus input when the command bar is ready for input\n useSignalEffect(() => {\n var _a;\n if (state.status.value !== STATUS.EXECUTING_COMMAND) {\n (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();\n }\n });\n return (React.createElement(React.Fragment, null,\n React.createElement(\"input\", { ref: inputRef, className: styles.searchBox, type: \"search\", placeholder: state.status.value === STATUS.DISPLAYING_RESULT\n ? translate('SearchBox.commandQuery.placeholder', 'Enter the query for the command')\n : translate('SearchBox.placeholder', 'What do you want to do today?'), disabled: state.status.value === STATUS.DISPLAYING_RESULT && !(activeCommand === null || activeCommand === void 0 ? void 0 : activeCommand.canHandleQueries), autoFocus: true, onChange: handleChange, onKeyUp: handleKeyPress, value: (state.status.value === STATUS.DISPLAYING_RESULT\n ? state.commandQuery\n : state.searchWord), \"data-testid\": \"SearchBox\" }),\n !state.expanded.value && (React.createElement(\"button\", { className: styles.expandButton, onClick: actions.EXPAND, title: translate('SearchBox.expand.title', 'Expand to show all commands') },\n React.createElement(IconWrapper, null,\n React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 320 512\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z\" }))))),\n state.status.value === STATUS.DISPLAYING_RESULT &&\n ((_a = state.commands.value[state.resultCommandId.value]) === null || _a === void 0 ? void 0 : _a.executeManually) &&\n !state.activeCommandId.value && (React.createElement(\"button\", { className: [\n styles.executeButton,\n state.commandQueryDirty.value ? styles.commandQueryDirty : '',\n ].join(' '), onClick: () => executeCommand(state.resultCommandId.value), title: translate('SearchBox.execute.title', 'Execute the command') },\n React.createElement(IconWrapper, null, state.commandQueryDirty.value ? React.createElement(IconPlay, null) : React.createElement(IconRepeat, null))))));\n};\nexport default React.memo(SearchBox);\n","import React from 'react';\nimport { useComputed } from '@preact/signals';\nimport { useCommandBarState, STATUS } from '../../state';\nimport IconWrapper from '../IconWrapper/IconWrapper';\nimport SearchBox from '../SearchBox/SearchBox';\nimport { IconBack } from '../Icons';\nimport * as styles from './CommandBarHeader.module.css';\nconst CommandBarHeader = () => {\n const { state, actions } = useCommandBarState();\n const isDisplayingResults = useComputed(() => state.status.value == STATUS.DISPLAYING_RESULT);\n return (React.createElement(\"header\", { className: styles.commandBarHeader },\n (isDisplayingResults.value || state.selectedCommandGroup.value) && (React.createElement(\"button\", { type: \"button\", onClick: isDisplayingResults.value ? actions.CANCEL : actions.GO_TO_PARENT_GROUP, className: styles.backButton, title: \"Back\" },\n React.createElement(IconWrapper, null,\n React.createElement(IconBack, null)))),\n React.createElement(SearchBox, null)));\n};\nexport default React.memo(CommandBarHeader);\n","import React from 'react';\nimport { useComputed } from '@preact/signals';\nimport { IconWrapper } from '../index';\nimport { classnames } from '../../helpers';\nimport { IconStar } from '../Icons';\nimport * as styles from './CommandListItem.module.css';\nimport { useCommandBarState, useIntl } from '../../state';\nfunction getCommandType({ subCommandIds, category, canHandleQueries, action }, translate) {\n let type = 'command';\n if (category) {\n return category;\n }\n else if ((subCommandIds === null || subCommandIds === void 0 ? void 0 : subCommandIds.length) > 0) {\n type = 'category';\n }\n else if (canHandleQueries) {\n type = 'query';\n }\n else if (typeof action == 'string') {\n type = 'link';\n }\n return translate(`CommandListItem.type.${type}`, type);\n}\nfunction CommandListItem({ command, onItemSelect, highlightedId, onToggleFavourite }) {\n const { state: { favouriteCommands }, Icon, } = useCommandBarState();\n const { translate } = useIntl();\n const { id, name, description, icon, action } = command;\n const commandType = getCommandType(command, translate);\n const isHighlighted = useComputed(() => highlightedId.value === id);\n const isFavourite = useComputed(() => favouriteCommands.value.includes(id));\n return (React.createElement(\"li\", { className: classnames(styles.commandListItem, isHighlighted.value && styles.highlighted), onClick: () => onItemSelect(id), \"data-testid\": \"CommandListItem\" },\n React.createElement(Icon, { icon: icon }),\n React.createElement(\"span\", { className: styles.label },\n React.createElement(\"span\", null, name),\n description && (React.createElement(\"span\", { className: styles.description }, typeof description == 'string' ? description : description()))),\n onToggleFavourite && action && (React.createElement(\"button\", { type: \"button\", className: classnames(styles.favouriteButton, isFavourite.value && styles.isFavourite), title: translate('CommandListItem.toggleFavourite', 'Toggle favourite'), onClick: (e) => {\n e.stopPropagation();\n onToggleFavourite(id);\n } },\n React.createElement(IconWrapper, null,\n React.createElement(IconStar, null)))),\n React.createElement(\"small\", { className: styles.type }, commandType)));\n}\n// Use memo to prevent rerendering of all items when the parent list is updated\nexport default React.memo(CommandListItem);\n","import React, { useCallback } from 'react';\nimport { useComputed, useSignalEffect } from '@preact/signals';\nimport CommandListItem from '../CommandListItem/CommandListItem';\nimport { useCommandBarState, useCommandExecutor, useIntl, STATUS } from '../../state';\nimport { classnames } from '../../helpers';\nimport * as styles from './CommandListing.module.css';\nconst CommandList = () => {\n const { state: { commands, highlightedItem, availableCommandIds, status, searchWord, favouriteCommands, recentCommands, selectedCommandGroup, }, actions: { ADD_FAVOURITE, REMOVE_FAVOURITE }, } = useCommandBarState();\n const { translate } = useIntl();\n const { executeCommand } = useCommandExecutor();\n const navRef = React.useRef(null);\n useSignalEffect(() => {\n var _a, _b;\n (_b = (_a = navRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(`li:nth-child(${highlightedItem.value})`)) === null || _b === void 0 ? void 0 : _b.scrollIntoView({ behavior: 'smooth', block: 'center' });\n });\n const handleToggleFavourite = useCallback((commandId) => {\n if (favouriteCommands.value.includes(commandId)) {\n REMOVE_FAVOURITE(commandId);\n }\n else {\n ADD_FAVOURITE(commandId);\n }\n }, [favouriteCommands]);\n const suggestions = useComputed(() => {\n return searchWord.value || selectedCommandGroup.value\n ? []\n : availableCommandIds.value.filter((commandId) => recentCommands.value.includes(commandId));\n });\n const availableCommands = useComputed(() => {\n return searchWord.value || selectedCommandGroup.value\n ? availableCommandIds.value\n : availableCommandIds.value.filter((commandId) => !recentCommands.value.includes(commandId));\n });\n const highlightedCommand = useComputed(() => availableCommandIds.value[highlightedItem.value]);\n return (React.createElement(\"nav\", { className: classnames(styles.results, status.value !== STATUS.IDLE && styles.disabled), \"data-testid\": \"CommandList\", ref: navRef },\n suggestions.value.length > 0 && (React.createElement(React.Fragment, null,\n React.createElement(\"h6\", null, translate('CommandList.suggestions', 'Recently used')),\n React.createElement(\"ul\", null, suggestions.value.map((commandId) => (React.createElement(CommandListItem, { key: commandId, command: commands.value[commandId], onItemSelect: executeCommand, highlightedId: highlightedCommand, onToggleFavourite: handleToggleFavourite })))))),\n availableCommands.value.length > 0 && (React.createElement(React.Fragment, null,\n React.createElement(\"h6\", null, translate('CommandList.heading', 'Commands')),\n React.createElement(\"ul\", null, availableCommands.value.map((commandId) => (React.createElement(CommandListItem, { key: commandId, command: commands.value[commandId], onItemSelect: executeCommand, highlightedId: highlightedCommand, onToggleFavourite: handleToggleFavourite })))))),\n availableCommandIds.value.length === 0 && (React.createElement(\"small\", { className: styles.noResults }, translate('CommandList.noCommandsMessage', 'No matching commands found')))));\n};\nexport default React.memo(CommandList);\n","import React from 'react';\nimport { useComputed, useSignalEffect } from '@preact/signals';\nimport { useCommandBarState, useCommandExecutor, useIntl } from '../../state';\nimport CommandListItem from '../CommandListItem/CommandListItem';\nimport * as styles from './CommandResultsView.module.css';\nconst CommandResultsView = () => {\n var _a;\n const { state: { result, highlightedOption, activeCommandId }, } = useCommandBarState();\n const { executeCommand } = useCommandExecutor();\n const { translate } = useIntl();\n const navRef = React.useRef(null);\n const highlightedId = useComputed(() => result.value ? Object.values(result.value.options)[highlightedOption.value].id : null);\n const isLoading = activeCommandId.value !== null;\n useSignalEffect(() => {\n var _a, _b;\n const highlightedIndex = highlightedOption.value;\n (_b = (_a = navRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(`li:nth-child(${highlightedIndex})`)) === null || _b === void 0 ? void 0 : _b.scrollIntoView({ behavior: 'smooth', block: 'center' });\n });\n const { options, view, message } = (_a = result.value) !== null && _a !== void 0 ? _a : {};\n return (React.createElement(\"div\", { className: styles.commandResultsView },\n message && React.createElement(\"h6\", { className: styles.message }, message),\n isLoading ? React.createElement(\"div\", null, translate('CommandResultsView.waitingForResults', 'Waiting for results…')) : '',\n !isLoading && view ? React.createElement(\"div\", null, view) : '',\n !isLoading && options && (React.createElement(\"nav\", { className: styles.results, ref: navRef },\n React.createElement(\"ul\", null, Object.keys(options).map((commandId) => (React.createElement(CommandListItem, { key: commandId, command: options[commandId], onItemSelect: executeCommand, highlightedId: highlightedId }))))))));\n};\nexport default CommandResultsView;\n","import React from 'react';\nimport * as styles from './ToggleButton.module.css';\nimport { classnames } from '../../helpers';\nconst ToggleButton = ({ handleToggle, disabled = false, label, title, active }) => {\n return (React.createElement(\"button\", { className: classnames(styles.toggleButton, active && styles.toggleButtonActive), onClick: handleToggle, disabled: disabled, title: title },\n React.createElement(\"span\", null, label),\n React.createElement(\"span\", { className: styles.buttonIcon }, \"\\u2318K\")));\n};\nexport default React.memo(ToggleButton);\n","import React, { createContext, useCallback, useContext, useMemo } from 'react';\nimport { signal, computed } from '@preact/signals';\nimport { commandBarReducer } from './commandBarReducer';\nimport { flattenCommands, logger } from '../helpers';\nimport { STATUS, TRANSITION } from './commandBarMachine';\nimport { IconWrapper } from '../components';\nconst CommandBarContext = createContext({});\nexport const useCommandBarState = () => useContext(CommandBarContext);\n/**\n * Create the app state and initialize it if it does not exist yet\n */\nfunction createAppState(initialState) {\n // Define a signal to hold the state\n const commandBarState = signal(initialState);\n // Define a function to dispatch events to the reducer and its state machine and update the state with the result\n const dispatch = (event) => {\n commandBarState.value = commandBarReducer(commandBarState.value, event);\n };\n // Derive readonly selectors for partial state values\n const activeCommandId = computed(() => commandBarState.value.activeCommandId);\n const activeCommandMessage = computed(() => commandBarState.value.activeCommandMessage);\n const availableCommandIds = computed(() => commandBarState.value.availableCommandIds);\n const commandQuery = computed(() => commandBarState.value.commandQuery);\n const commandQueryDirty = computed(() => commandBarState.value.commandQueryDirty);\n const commands = computed(() => commandBarState.value.commands);\n const expanded = computed(() => commandBarState.value.expanded);\n const favouriteCommands = computed(() => commandBarState.value.favouriteCommands);\n const highlightedItem = computed(() => commandBarState.value.highlightedItem);\n const highlightedOption = computed(() => commandBarState.value.highlightedOption);\n const recentCommands = computed(() => commandBarState.value.recentCommands);\n const result = computed(() => commandBarState.value.result);\n const resultCommandId = computed(() => commandBarState.value.resultCommandId);\n const searchWord = computed(() => commandBarState.value.searchWord);\n const selectedCommandGroup = computed(() => commandBarState.value.selectedCommandGroup);\n const showBranding = computed(() => commandBarState.value.showBranding);\n const status = computed(() => commandBarState.value.status);\n return {\n state: {\n activeCommandId,\n activeCommandMessage,\n availableCommandIds,\n commandQuery,\n commandQueryDirty,\n commands,\n expanded,\n favouriteCommands,\n highlightedItem,\n highlightedOption,\n recentCommands,\n result,\n resultCommandId,\n searchWord,\n selectedCommandGroup,\n showBranding,\n status,\n },\n dispatch,\n };\n}\nexport const CommandBarStateProvider = ({ commands, children, IconComponent, userPreferences, }) => {\n const { state, dispatch } = useMemo(() => {\n return createAppState({\n activeCommandId: null,\n activeCommandMessage: null,\n availableCommandIds: Object.keys(commands),\n commandQuery: '',\n commandQueryDirty: false,\n commands: flattenCommands(commands),\n expanded: false,\n favouriteCommands: userPreferences.favouriteCommands,\n highlightedItem: 0,\n highlightedOption: 0,\n recentCommands: userPreferences.recentCommands,\n result: null,\n resultCommandId: null,\n searchWord: '',\n selectedCommandGroup: null,\n showBranding: userPreferences.showBranding,\n status: STATUS.COLLAPSED,\n });\n }, []);\n // Provide all actions as shorthand functions\n const actions = useMemo(() => {\n return {\n [TRANSITION.RESET_SEARCH]: () => dispatch({ type: TRANSITION.RESET_SEARCH }),\n [TRANSITION.HIGHLIGHT_NEXT_ITEM]: () => dispatch({ type: TRANSITION.HIGHLIGHT_NEXT_ITEM }),\n [TRANSITION.HIGHLIGHT_PREVIOUS_ITEM]: () => dispatch({ type: TRANSITION.HIGHLIGHT_PREVIOUS_ITEM }),\n [TRANSITION.CANCEL]: () => dispatch({ type: TRANSITION.CANCEL }),\n [TRANSITION.SELECT_GROUP]: (commandId) => dispatch({ type: TRANSITION.SELECT_GROUP, commandId }),\n [TRANSITION.GO_TO_PARENT_GROUP]: () => dispatch({ type: TRANSITION.GO_TO_PARENT_GROUP }),\n [TRANSITION.UPDATE_SEARCH]: (searchWord) => dispatch({ type: TRANSITION.UPDATE_SEARCH, searchWord }),\n [TRANSITION.UPDATE_COMMAND_QUERY]: (commandQuery) => dispatch({ type: TRANSITION.UPDATE_COMMAND_QUERY, commandQuery }),\n [TRANSITION.EXECUTE_COMMAND]: async (commandId, message) => {\n dispatch({\n type: TRANSITION.EXECUTE_COMMAND,\n commandId,\n message,\n });\n // Update recent commands in the user preferences when a command is executed\n return userPreferences\n .addRecentCommand(commandId)\n .catch((e) => logger.error('Could not add recent command', e));\n },\n [TRANSITION.FINISH_COMMAND]: () => dispatch({ type: TRANSITION.FINISH_COMMAND }),\n [TRANSITION.UPDATE_RESULT]: (result) => dispatch({ type: TRANSITION.UPDATE_RESULT, result }),\n [TRANSITION.EXPAND]: () => dispatch({ type: TRANSITION.EXPAND }),\n [TRANSITION.ADD_FAVOURITE]: (commandId) => {\n dispatch({ type: TRANSITION.ADD_FAVOURITE, commandId });\n return userPreferences\n .setFavouriteCommands(state.favouriteCommands.value)\n .catch((e) => logger.error('Could not update favourite commands', e));\n },\n [TRANSITION.REMOVE_FAVOURITE]: (commandId) => {\n dispatch({ type: TRANSITION.REMOVE_FAVOURITE, commandId });\n return userPreferences\n .setFavouriteCommands(state.favouriteCommands.value)\n .catch((e) => logger.error('Could not update favourite commands', e));\n },\n };\n }, []);\n const Icon = useCallback(({ icon, spin = false }) => {\n return (React.createElement(IconWrapper, null,\n React.createElement(IconComponent, { icon: icon, spin: spin })));\n }, []);\n return React.createElement(CommandBarContext.Provider, { value: { state, actions, Icon } }, children);\n};\n","import React, { useCallback, useEffect } from 'react';\nimport useFunctionRef from '../hooks/useFunctionRef';\nimport { useCommandBarState } from './CommandBarStateProvider';\nimport { assert, logger } from '../helpers';\nimport { STATUS } from './commandBarMachine';\nconst CommandInputContext = React.createContext({});\nexport const useCommandExecutor = () => React.useContext(CommandInputContext);\n/**\n * Context provider for the command bar input and command execution\n */\nexport const CommandBarExecutor = ({ children, toggleOpen, dialogRef, open }) => {\n const { state, actions } = useCommandBarState();\n const handleKeyEnteredRef = useFunctionRef((e) => {\n if (!open || e.defaultPrevented) {\n return;\n }\n if (e.key === 'k' && (e.metaKey || e.ctrlKey) && (dialogRef === null || dialogRef === void 0 ? void 0 : dialogRef.current.contains(e.target))) {\n // Close command bar\n toggleOpen();\n e.stopPropagation();\n e.preventDefault();\n }\n else if (e.key === 'Escape') {\n // Cancel search, or selection, or close command bar\n e.stopPropagation();\n e.preventDefault();\n if (state.selectedCommandGroup.value ||\n state.searchWord.value ||\n state.commandQuery.value ||\n state.result.value) {\n actions.CANCEL();\n }\n else {\n // Close command bar if cancel is noop\n toggleOpen();\n }\n }\n else if (e.key === 'ArrowDown') {\n // Navigate to next command\n e.stopPropagation();\n e.preventDefault();\n actions.HIGHLIGHT_NEXT_ITEM();\n }\n else if (e.key === 'ArrowUp') {\n // Navigate to previous command\n e.stopPropagation();\n e.preventDefault();\n actions.HIGHLIGHT_PREVIOUS_ITEM();\n }\n else if (e.key === 'Enter') {\n // Execute highlighted command\n e.stopPropagation();\n e.preventDefault();\n // Select the highlighted command by default\n let commandId = state.availableCommandIds.value[state.highlightedItem.value];\n if (state.status.value === STATUS.DISPLAYING_RESULT) {\n // If there are options the command to execute is the highlighted option\n if (!state.commandQueryDirty.value && Object.values(state.result.value.options).length) {\n commandId = Object.keys(state.result.value.options)[state.highlightedOption.value];\n }\n else {\n // If there are no options we run the command which generated the result again\n commandId = state.resultCommandId.value;\n }\n }\n if (commandId) {\n void executeCommand(commandId);\n }\n }\n });\n const executeCommand = useCallback(async (commandId) => {\n var _a, _b, _c;\n const command = (_b = (_a = state.result.value) === null || _a === void 0 ? void 0 : _a.options[commandId]) !== null && _b !== void 0 ? _b : state.commands.value[commandId];\n const { action, canHandleQueries, subCommandIds, name } = command;\n // If the command is a group, select it\n if ((subCommandIds === null || subCommandIds === void 0 ? void 0 : subCommandIds.length) > 0) {\n actions.SELECT_GROUP(commandId);\n return;\n }\n assert(action, `Command ${commandId} has no action`);\n // If the command is a url, open it\n if (typeof action == 'string') {\n // We wait for the state change to be finished before opening the url\n await actions.EXECUTE_COMMAND(commandId, 'Loading url');\n // We need to check if the url is in the same domain, otherwise we need to open it in a new tab\n // TODO: We should add another option to a link command to define its target\n if (action.indexOf('http') === 0 && action.indexOf(document.location.origin) !== 0) {\n (_c = window.open(action, '_blank', 'noopener,noreferrer')) === null || _c === void 0 ? void 0 : _c.focus();\n }\n else {\n window.location.href = action;\n }\n return actions.FINISH_COMMAND();\n }\n // If the command is a function, execute it\n actions.EXECUTE_COMMAND(commandId, 'Running command');\n const actionResult = action(canHandleQueries ? state.commandQuery.value : undefined);\n if (actionResult.then) {\n // Handle Promises\n actionResult\n .then((result) => {\n if (result && !result.success) {\n throw new Error(`The command \"${name}\" failed`);\n }\n })\n .catch((error) => {\n // TODO: Show an error message to the user\n logger.error('Command error', name, error);\n })\n .finally(() => {\n actions.FINISH_COMMAND();\n });\n }\n else if (actionResult.next) {\n // Handle generators\n const generator = actionResult;\n // TODO: Handle errors / success === false\n for await (const result of generator) {\n actions.UPDATE_RESULT(result);\n }\n actions.FINISH_COMMAND();\n }\n else {\n logger.error('Command result is not a promise or generator', actionResult);\n }\n if (command.closeOnExecute) {\n toggleOpen();\n }\n }, [state.searchWord, state.commands, state.result]);\n const executeCommandRef = useFunctionRef((commandId) => {\n void executeCommand(commandId);\n });\n /**\n * Add key event handler, needs to be updated when any parameter for the key event handler changes\n */\n useEffect(() => {\n if (!open)\n return;\n // const guestFrame = document.getElementsByName('neos-content-main')[0] as HTMLIFrameElement;\n // guestFrame.contentWindow?.addEventListener('keyup', (e) => {\n // log.debug('keypress in guestframe', e);\n // });\n // log.debug('guestFrame', guestFrame.contentWindow);\n const windowKeyEventHandler = (e) => handleKeyEnteredRef.current(e);\n window.addEventListener('keydown', windowKeyEventHandler);\n return () => window.removeEventListener('keydown', windowKeyEventHandler);\n }, [open]);\n return (React.createElement(CommandInputContext.Provider, { value: { executeCommand: executeCommandRef.current } }, children));\n};\n","import React, { createContext, useContext } from 'react';\nexport const IntlContext = createContext({});\nexport const useIntl = () => useContext(IntlContext);\nexport const IntlProvider = ({ translate, children }) => {\n return React.createElement(IntlContext.Provider, { value: { translate } }, children);\n};\n","import React, { useCallback, useEffect, useRef } from 'react';\nimport { batch, useComputed, useSignal } from '@preact/signals';\nimport { CommandBarFooter, CommandBarHeader, CommandList, CommandResultsView } from '../index';\nimport { CommandBarExecutor, useCommandBarState } from '../../state';\nimport { clamp, classnames } from '../../helpers';\nimport * as styles from './CommandBarDialog.module.css';\nconst CommandBarDialog = ({ onDrag, open, toggleOpen }) => {\n const { state: { expanded, result }, } = useCommandBarState();\n const dialogRef = useRef(null);\n const isDragging = useSignal(false);\n const dialogPosition = useSignal({\n left: window.innerWidth / 2 - 300,\n top: window.innerHeight / 2 - 20,\n });\n const dragStateOffset = useSignal({\n offsetLeft: 0,\n offsetTop: 0,\n });\n const hasBeenDragged = useSignal(false);\n const dialogStyle = useComputed(() => {\n const { left, top } = dialogPosition.value;\n return (hasBeenDragged.value\n ? {\n left: left + 'px',\n top: top + 'px',\n translate: 'none',\n visibility: isDragging.value ? 'hidden' : 'visible',\n }\n : {});\n });\n const reposition = useCallback((left, top) => {\n const dialogSize = dialogRef.current.getBoundingClientRect();\n dialogPosition.value = {\n left: clamp(left, 0, window.innerWidth - dialogSize.width),\n top: clamp(top, 0, window.innerHeight - dialogSize.height),\n };\n }, []);\n const handleDragStart = useCallback((e) => {\n // @ts-ignore\n if (e.target.tagName === 'INPUT') {\n return;\n }\n console.debug('dragstart');\n e.dataTransfer.setData('text/plain', 'CommandBar');\n e.dataTransfer.dropEffect = 'move';\n e.dataTransfer.effectAllowed = 'move';\n batch(() => {\n dragStateOffset.value = {\n offsetLeft: e.clientX - dialogRef.current.offsetLeft,\n offsetTop: e.clientY - dialogRef.current.offsetTop,\n };\n hasBeenDragged.value = true;\n });\n onDrag && onDrag(true);\n }, [dialogRef.current]);\n const handleDragDrop = useCallback((e) => {\n const { clientX, clientY } = e;\n console.debug('dragdrop', clientX, clientY, dragStateOffset.value);\n batch(() => {\n isDragging.value = false;\n reposition(clientX - dragStateOffset.value.offsetLeft, clientY - dragStateOffset.value.offsetTop);\n });\n onDrag && onDrag(false);\n }, [dialogRef.current]);\n const onResize = useCallback(() => reposition(dialogPosition.value.left, dialogPosition.value.top), []);\n useEffect(() => {\n var _a, _b;\n if (!open)\n return;\n (_b = (_a = dialogRef.current) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.addEventListener('drop', handleDragDrop);\n window.addEventListener('resize', onResize);\n return () => {\n var _a, _b;\n (_b = (_a = dialogRef.current) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.removeEventListener('drop', handleDragDrop);\n window.removeEventListener('resize', onResize);\n };\n }, [open, onResize, handleDragDrop]);\n if (!open) {\n return null;\n }\n return (React.createElement(\"dialog\", { ref: dialogRef, className: classnames(styles.commandBar, result.value && styles.hasResults), open: open, draggable: true, onDragStart: handleDragStart, onDrag: () => (isDragging.value = true), style: dialogStyle.value, \"data-testid\": \"CommandBarDialog\" },\n React.createElement(CommandBarExecutor, { toggleOpen: toggleOpen, dialogRef: dialogRef, open: open },\n React.createElement(CommandBarHeader, null),\n React.createElement(\"div\", { className: classnames(styles.resultsWrap, expanded.value && styles.expanded, result.value && styles.split) },\n expanded.value && React.createElement(CommandList, null),\n result.value && React.createElement(CommandResultsView, null)),\n React.createElement(CommandBarFooter, null))));\n};\nexport default CommandBarDialog;\n","import React from 'react';\nimport { CommandBarStateProvider, IntlProvider } from './state';\nimport CommandBarDialog from './components/CommandBarDialog/CommandBarDialog';\nconst CommandBar = ({ commands, open, toggleOpen, onDrag, IconComponent, userPreferences, translate, }) => {\n return (React.createElement(IntlProvider, { translate: translate },\n React.createElement(CommandBarStateProvider, { commands: commands, IconComponent: IconComponent, userPreferences: userPreferences },\n React.createElement(CommandBarDialog, { onDrag: onDrag, open: open, toggleOpen: toggleOpen }))));\n};\nexport default CommandBar;\n","export async function fetchData(endpoint, params, method = 'GET') {\n if (params && method === 'GET') {\n endpoint = Object.keys(params).reduce((url, key) => {\n return url + '&' + key + '=' + encodeURIComponent(params[key]);\n }, endpoint + '?');\n }\n return fetch(endpoint, {\n method,\n credentials: 'include',\n body: params && method === 'POST' ? JSON.stringify(params) : undefined,\n headers: {\n // FIXME: Include CSRF Token\n // 'X-Flow-Csrftoken': csrfToken,\n 'Content-Type': 'application/json',\n Accept: 'application/json',\n },\n }).then((response) => {\n var _a;\n if (response.status !== 200) {\n throw new Error(`The request failed with code ${response.status}: \"${response.statusText}\"`);\n }\n if ((_a = response.headers.get('Content-Type')) === null || _a === void 0 ? void 0 : _a.includes('application/json')) {\n return response.json();\n }\n return response.text();\n });\n}\n","import { fetchData } from './fetch';\nconst ENDPOINT_GET_PREFERENCES = '/neos/shel-neos-commandbar/preferences/getpreferences';\nconst ENDPOINT_SET_FAVOURITE_COMMANDS = '/neos/shel-neos-commandbar/preferences/setfavourites';\nconst ENDPOINT_ADD_RECENT_COMMAND = '/neos/shel-neos-commandbar/preferences/addrecentcommand';\nconst ENDPOINT_ADD_RECENT_DOCUMENT = '/neos/shel-neos-commandbar/preferences/addrecentdocument';\nasync function setPreference(endpoint, data) {\n return fetchData(endpoint, data, 'POST');\n}\nexport async function getPreferences() {\n return fetchData(ENDPOINT_GET_PREFERENCES);\n}\nexport async function setFavouriteCommands(commandIds) {\n return setPreference(ENDPOINT_SET_FAVOURITE_COMMANDS, { commandIds });\n}\nexport async function addRecentCommand(commandId) {\n // TODO: Check if sendBeacon is a better option here to reduce the impact on the user\n return setPreference(ENDPOINT_ADD_RECENT_COMMAND, { commandId });\n}\nexport async function addRecentDocument(nodeContextPath) {\n // TODO: Check if sendBeacon is a better option here to reduce the impact on the user\n return setPreference(ENDPOINT_ADD_RECENT_DOCUMENT, { nodeContextPath });\n}\n","import { fetchData } from './fetch';\nconst ENDPOINT_COMMANDS = '/neos/service/data-source/shel-neos-commandbar-commands';\nexport async function getCommands() {\n return fetchData(ENDPOINT_COMMANDS);\n}\n","import { fetchData } from './fetch';\nconst ENDPOINT_SEARCH_NEOS_DOCS = '/neos/service/data-source/shel-neos-commandbar-search-neos-docs';\nexport async function searchNeosDocs(query) {\n return query ? fetchData(ENDPOINT_SEARCH_NEOS_DOCS, { query }) : {};\n}\n","import { fetchData } from './fetch';\nconst ENDPOINT_SEARCH_NEOS_PACKAGES = '/neos/service/data-source/shel-neos-commandbar-search-neos-packages';\nexport async function searchNeosPackages(query) {\n return query ? fetchData(ENDPOINT_SEARCH_NEOS_PACKAGES, { query }) : {};\n}\n","import { fetchData } from './fetch';\nconst ENDPOINT_SEARCH_NODES = 'service/data-source/shel-neos-commandbar-search-nodes';\nexport async function searchNodes(query, node) {\n return query\n ? fetchData(ENDPOINT_SEARCH_NODES, {\n query,\n node,\n })\n : [];\n}\n","import * as React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\n// Neos dependencies are provided by the UI\n// @ts-ignore\nimport { neos } from '@neos-project/neos-ui-decorators';\n// @ts-ignore\nimport { selectors, actions } from '@neos-project/neos-ui-redux-store';\nimport { Icon } from '@neos-project/react-ui-components';\nimport { CommandBar, logger, ToggleButton, classnames } from '@neos-commandbar/commandbar';\nimport { CommandsApi, PreferencesApi, DocumentationApi, NodesApi, PackagesApi } from '@neos-commandbar/neos-api';\nimport { actions as commandBarActions, selectors as commandBarSelectors } from './actions';\nimport * as styles from './CommandBarUiPlugin.module.css';\nimport * as theme from '@neos-commandbar/commandbar/src/Theme.module.css';\nimport { addRecentDocument } from '@neos-commandbar/neos-api/src/preferences';\nconst IconComponent = ({ icon, spin = false }) => React.createElement(Icon, { icon: icon, spin: spin });\nclass CommandBarUiPlugin extends React.PureComponent {\n constructor(props) {\n super(props);\n this.buildCommandsFromHotkeys = () => {\n const { hotkeyRegistry, handleHotkeyAction, config } = this.props;\n const hotkeys = hotkeyRegistry.getAllAsList();\n return hotkeys.reduce((carry, { id, description, action }) => {\n if (!config.hotkeys.filter.includes(id)) {\n carry[id] = {\n name: description,\n description: id,\n icon: this.mapHotkeyIdToIcon(id),\n action: async () => void handleHotkeyAction(action()),\n closeOnExecute: true,\n };\n }\n return carry;\n }, {});\n };\n this.buildCommandsFromWorkspaces = () => {\n const { allowedTargetWorkspaces } = this.props.neos.configuration;\n return Object.keys(allowedTargetWorkspaces).reduce((carry, workspaceName) => {\n const workspace = allowedTargetWorkspaces[workspaceName];\n if (workspace.readonly) {\n return carry;\n }\n carry[workspaceName] = {\n name: workspace.title,\n description: workspace.description,\n icon: 'cube',\n action: async () => {\n this.props.changeBaseWorkspaceAction(workspace.name);\n },\n closeOnExecute: true,\n };\n return carry;\n }, {});\n };\n this.buildCommandsFromEditPreviewModes = () => {\n const { setEditPreviewMode, editPreviewModes, i18nRegistry } = this.props;\n return Object.keys(editPreviewModes).reduce((carry, mode) => {\n const { title, isEditingMode } = editPreviewModes[mode];\n carry[mode] = {\n name: i18nRegistry.translate(title),\n description: () => this.props.editPreviewMode === mode\n ? this.translate('CommandBarUiPlugin.command.switchEditPreviewMode.active', 'Currently active')\n : '',\n icon: isEditingMode ? 'pencil' : 'eye',\n action: async () => setEditPreviewMode(mode),\n };\n return carry;\n }, {});\n };\n this.handleAddNode = async () => {\n const { addNode, documentNode, focusedNodeContextPath, toggleCommandBar } = this.props;\n toggleCommandBar();\n addNode(focusedNodeContextPath || documentNode.contextPath, undefined, 'after');\n };\n this.showRecentDocuments = async function* () {\n const { recentDocuments } = this.state;\n const { setActiveContentCanvasContextPath, setActiveContentCanvasSrc } = this.props;\n if (!recentDocuments.length) {\n yield {\n success: false,\n message: this.translate('CommandBarUiPlugin.command.searchDocuments.searchFailed', 'Search failed'),\n };\n }\n else {\n yield {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.recentDocuments.options', 'Recent documents'),\n options: recentDocuments.reduce((carry, { name, contextPath, uri, icon }) => {\n carry[contextPath] = {\n id: contextPath,\n name,\n icon,\n action: async () => {\n setActiveContentCanvasSrc(uri);\n setActiveContentCanvasContextPath(contextPath);\n },\n closeOnExecute: true,\n };\n return carry;\n }, {}),\n };\n }\n };\n this.handleSearchNode = async function* (query) {\n const { siteNode, setActiveContentCanvasSrc } = this.props;\n yield {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.searchDocuments.searching', { query }),\n };\n let error;\n const results = await NodesApi.searchNodes(query, siteNode.contextPath).catch((e) => {\n logger.error('Could not search nodes', e);\n error = e.message;\n });\n if (!results) {\n yield {\n success: false,\n message: this.translate('CommandBarUiPlugin.command.searchDocuments.searchFailed', 'Search failed'),\n view: error,\n };\n }\n else {\n yield {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.searchDocuments.matches', {\n matches: results.length,\n }),\n options: results.reduce((carry, { name, nodetype, contextPath, uri, icon }) => {\n if (!uri) {\n // TODO: Show hint that document cannot be opened or filter them remotely already?\n return carry;\n }\n carry[contextPath] = {\n id: contextPath,\n name,\n category: nodetype,\n action: async () => {\n setActiveContentCanvasSrc(uri);\n },\n closeOnExecute: true,\n icon,\n };\n return carry;\n }, {}),\n };\n }\n };\n this.handleSearchNeosDocs = async function* (query) {\n yield {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.documentation.searching', { query }, `Search for \"${query}\"`),\n };\n let error;\n const options = await DocumentationApi.searchNeosDocs(query).catch((e) => {\n logger.error('Could not search Neos docs', e);\n error = e.message;\n });\n if (error || !options) {\n yield {\n success: false,\n message: this.translate('CommandBarUiPlugin.command.documentation.error', 'Search failed'),\n view: error,\n };\n }\n else {\n yield {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.documentation.matches', { matches: Object.keys(options).length }, `${Object.values(options).length} options match your query`),\n options,\n };\n }\n };\n this.handleSearchNeosPackages = async function* (query) {\n yield {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.packages.searching', { query }, `Search for \"${query}\"`),\n };\n let error;\n const options = await PackagesApi.searchNeosPackages(query).catch((e) => {\n logger.error('Could not search Neos packages', e);\n error = e.message;\n });\n if (error || !options) {\n yield {\n success: false,\n message: this.translate('CommandBarUiPlugin.command.packages.error', 'Search failed'),\n view: error,\n };\n }\n else {\n yield {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.packages.matches', { matches: Object.values(options).length }, `${Object.values(options).length} options match your query`),\n options,\n };\n }\n };\n this.handlePublish = async () => {\n const { publishableNodesInDocument, publishAction, baseWorkspace } = this.props;\n publishAction(publishableNodesInDocument.map((node) => node.contextPath), baseWorkspace);\n return {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.publish.success', { count: publishableNodesInDocument.length }, `Published ${publishableNodesInDocument.length} changes`),\n };\n };\n this.handlePublishAll = async () => {\n const { publishableNodes, publishAction, baseWorkspace } = this.props;\n publishAction(publishableNodes.map((node) => node.contextPath), baseWorkspace);\n return {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.publishAll.success', { count: publishableNodes.length }, `Published ${publishableNodes.length} changes`),\n };\n };\n this.handleDiscard = async () => {\n const { publishableNodesInDocument, discardAction } = this.props;\n discardAction(publishableNodesInDocument.map((node) => node.contextPath));\n return {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.discard.success', { count: publishableNodesInDocument.length }, `Discarded ${publishableNodesInDocument.length} changes`),\n };\n };\n this.handleDiscardAll = async () => {\n const { publishableNodes, discardAction } = this.props;\n discardAction(publishableNodes.map((node) => node.contextPath));\n return {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.discardAll.success', { count: publishableNodes.length }, `Discarded ${publishableNodes.length} changes`),\n };\n };\n this.setDragging = (dragging) => {\n this.setState({ ...this.state, dragging });\n };\n this.translate = (id, paramsOrFallback, fallback) => {\n if (typeof paramsOrFallback === 'string') {\n fallback = paramsOrFallback;\n paramsOrFallback = {};\n }\n return this.props.i18nRegistry.translate(id, fallback, paramsOrFallback, 'Shel.Neos.CommandBar', 'Main');\n };\n this.state = {\n loaded: false,\n dragging: false,\n favouriteCommands: [],\n recentCommands: [],\n recentDocuments: [],\n showBranding: true,\n commands: {\n addNode: {\n name: this.translate('CommandBarUiPlugin.command.addNode', 'Add content'),\n icon: 'plus',\n description: this.translate('CommandBarUiPlugin.command.addNode.description', 'Add new content'),\n action: this.handleAddNode,\n },\n searchDocuments: {\n name: this.translate('CommandBarUiPlugin.command.searchDocuments', 'Search documents'),\n icon: 'search',\n description: this.translate('CommandBarUiPlugin.command.searchDocuments.description', 'Search and navigate to documents'),\n action: this.handleSearchNode.bind(this),\n canHandleQueries: true,\n },\n switchWorkspace: {\n name: this.translate('CommandBarUiPlugin.command.switchWorkspace', 'Switch workspace'),\n icon: 'exchange-alt',\n description: this.translate('CommandBarUiPlugin.command.switchWorkspace.description', 'Switch to another workspace'),\n subCommands: this.buildCommandsFromWorkspaces(),\n },\n publishDiscard: {\n name: this.translate('CommandBarUiPlugin.command.publishDiscard', 'Publish / discard'),\n description: this.translate('CommandBarUiPlugin.command.publishDiscard.description', 'Publish or discard changes'),\n icon: 'check',\n subCommands: {\n publish: {\n name: this.translate('CommandBarUiPlugin.command.publish', 'Publish'),\n description: this.translate('CommandBarUiPlugin.command.publish.description', 'Publish changes in this document'),\n icon: 'check',\n action: this.handlePublish,\n },\n publishAll: {\n name: this.translate('CommandBarUiPlugin.command.publishAll', 'Publish all'),\n description: this.translate('CommandBarUiPlugin.command.publishAll.description', 'Publish changes in all documents'),\n icon: 'check-double',\n action: this.handlePublishAll,\n },\n discard: {\n name: this.translate('CommandBarUiPlugin.command.discard', 'Discard'),\n description: this.translate('CommandBarUiPlugin.command.discard.description', 'Discard changes in the current document'),\n icon: 'ban',\n action: this.handleDiscard,\n },\n discardAll: {\n name: this.translate('CommandBarUiPlugin.command.discardAll', 'Discard all'),\n description: this.translate('CommandBarUiPlugin.command.discardAll.description', 'Discard changes in all documents'),\n icon: 'ban',\n action: this.handleDiscardAll,\n },\n },\n },\n quickActions: {\n name: this.translate('CommandBarUiPlugin.command.quickActions', 'Quick actions'),\n icon: 'keyboard',\n description: this.translate('CommandBarUiPlugin.command.quickActions.description', 'Execute hotkeys'),\n subCommands: this.buildCommandsFromHotkeys(),\n },\n switchEditPreviewMode: {\n name: this.translate('CommandBarUiPlugin.command.switchEditPreviewMode', 'Switch edit/preview mode'),\n icon: 'pencil',\n description: this.translate('CommandBarUiPlugin.command.switchEditPreviewMode.description', 'Switch between edit and preview modes'),\n subCommands: this.buildCommandsFromEditPreviewModes(),\n },\n openPreview: {\n name: this.translate('CommandBarUiPlugin.command.openPreview', 'Open preview'),\n description: this.translate('CommandBarUiPlugin.command.openPreview.description', 'Open the preview for current document'),\n icon: 'external-link-alt',\n action: async () => {\n var _a;\n if (this.props.previewUrl) {\n (_a = window.open(this.props.previewUrl, '_blank', 'noopener,noreferrer')) === null || _a === void 0 ? void 0 : _a.focus();\n }\n else {\n logger.warn('No preview url to open');\n }\n },\n closeOnExecute: true,\n },\n recentDocument: {\n name: this.translate('CommandBarUiPlugin.command.recentDocuments', 'Recent documents'),\n description: this.translate('CommandBarUiPlugin.command.recentDocuments.description', 'Open a recently visited documents'),\n icon: 'history',\n action: this.showRecentDocuments.bind(this),\n },\n },\n };\n if (props.config.features.searchNeosDocs) {\n this.state.commands.searchNeosDocs = {\n name: this.translate('CommandBarUiPlugin.command.documentation', 'Documentation'),\n description: this.translate('CommandBarUiPlugin.command.documentation.description', 'Browse or search the Neos documentation'),\n icon: 'book',\n canHandleQueries: true,\n action: this.handleSearchNeosDocs.bind(this),\n };\n }\n if (props.config.features.searchNeosPackages) {\n this.state.commands.searchNeosPackages = {\n name: this.translate('CommandBarUiPlugin.command.packages', 'Packages'),\n description: this.translate('CommandBarUiPlugin.command.packages.description', 'Search for Neos packages'),\n icon: 'boxes',\n canHandleQueries: true,\n action: this.handleSearchNeosPackages.bind(this),\n };\n }\n }\n mapHotkeyIdToIcon(id) {\n let actionName = id.split('.').pop();\n // Some actions have the name 'toggle' with a suffix, e.g. 'toggleFullScreen'\n if (actionName.indexOf('toggle') >= 0) {\n actionName = 'toggle';\n }\n switch (actionName) {\n case 'toggle':\n return 'toggle-on';\n case 'reload':\n return 'redo';\n case 'cancel':\n case 'close':\n return 'window-close';\n case 'apply':\n return 'check';\n }\n return 'neos';\n }\n async componentDidMount() {\n const { plugins } = this.props;\n // Load 3rd party commands\n let pluginCommands = {};\n if (plugins) {\n for (const pluginName of Object.keys(plugins)) {\n const plugin = plugins[pluginName];\n try {\n const pluginResult = await plugin();\n if (Object.keys(pluginResult).length > 0) {\n pluginCommands = { ...pluginCommands, ...pluginResult };\n }\n }\n catch (e) {\n logger.warn(`Could not load commands from plugin ${pluginName}`, e);\n }\n }\n }\n // Load commands from data source which are not available via the UI API\n const commands = await CommandsApi.getCommands().catch((error) => {\n logger.error('Failed to load commands', error);\n });\n // Load user preferences\n const preferences = await PreferencesApi.getPreferences().catch((error) => {\n logger.error('Failed to load user preferences', error);\n });\n if (!preferences || !commands)\n return;\n this.setState((prev) => ({\n loaded: true,\n ...preferences,\n commands: { ...prev.commands, ...commands, ...pluginCommands },\n }));\n // add event-listener directly as the neos-ui hotkey-handling can't prevent defaults\n document.addEventListener('keydown', (e) => {\n if (e.key === 'k' && (e.metaKey || e.ctrlKey)) {\n e.stopPropagation();\n e.preventDefault();\n this.props.toggleCommandBar();\n }\n });\n }\n async componentDidUpdate(prevProps) {\n var _a, _b;\n if (((_a = prevProps.documentNode) === null || _a === void 0 ? void 0 : _a.contextPath) != ((_b = this.props.documentNode) === null || _b === void 0 ? void 0 : _b.contextPath)) {\n addRecentDocument(this.props.documentNode.contextPath).then((recentDocuments) => {\n this.setState({ recentDocuments });\n });\n }\n }\n render() {\n const { commandBarOpen, toggleCommandBar } = this.props;\n const { commands, loaded, dragging, favouriteCommands, recentCommands, recentDocuments, showBranding } = this.state;\n return (React.createElement(\"div\", { className: classnames(styles.commandBarToolbarComponent, theme.commandBarTheme) },\n React.createElement(ToggleButton, { handleToggle: toggleCommandBar, disabled: !loaded, label: this.translate('ToggleButton.label', 'Search…'), title: this.translate('ToggleButton.title', 'Search for commands'), active: commandBarOpen }),\n loaded && (React.createElement(\"div\", { className: [styles.fullScreenLayer, commandBarOpen && styles.open].join(' '), onDragOver: (e) => e.preventDefault(), style: dragging ? { pointerEvents: 'all' } : null },\n React.createElement(CommandBar, { open: commandBarOpen, commands: commands, toggleOpen: toggleCommandBar, onDrag: this.setDragging, IconComponent: IconComponent, userPreferences: {\n favouriteCommands,\n recentCommands,\n recentDocuments,\n showBranding,\n addRecentCommand: PreferencesApi.addRecentCommand,\n addRecentDocument: PreferencesApi.addRecentDocument,\n setFavouriteCommands: PreferencesApi.setFavouriteCommands,\n }, translate: this.translate })))));\n }\n}\nCommandBarUiPlugin.propTypes = {\n addNode: PropTypes.func.isRequired,\n baseWorkspace: PropTypes.string.isRequired,\n commandBarOpen: PropTypes.bool,\n config: PropTypes.object.isRequired,\n discardAction: PropTypes.func.isRequired,\n documentNode: PropTypes.object,\n editPreviewMode: PropTypes.string.isRequired,\n editPreviewModes: PropTypes.object.isRequired,\n focusedNodeContextPath: PropTypes.string,\n handleHotkeyAction: PropTypes.func.isRequired,\n hotkeyRegistry: PropTypes.object.isRequired,\n i18nRegistry: PropTypes.object.isRequired,\n isWorkspaceReadOnly: PropTypes.bool,\n publishAction: PropTypes.func.isRequired,\n publishableNodes: PropTypes.array,\n publishableNodesInDocument: PropTypes.array,\n previewUrl: PropTypes.string,\n setActiveContentCanvasSrc: PropTypes.func.isRequired,\n setActiveContentCanvasContextPath: PropTypes.func.isRequired,\n setEditPreviewMode: PropTypes.func.isRequired,\n siteNode: PropTypes.object,\n toggleCommandBar: PropTypes.func.isRequired,\n neos: PropTypes.object.isRequired,\n};\nconst mapStateToProps = (state) => ({\n siteNode: selectors.CR.Nodes.siteNodeSelector(state),\n documentNode: selectors.CR.Nodes.documentNodeSelector(state),\n focusedNodeContextPath: selectors.CR.Nodes.focusedNodePathSelector(state),\n publishableNodes: selectors.CR.Workspaces.publishableNodesSelector(state),\n publishableNodesInDocument: selectors.CR.Workspaces.publishableNodesInDocumentSelector(state),\n isWorkspaceReadOnly: selectors.CR.Workspaces.isWorkspaceReadOnlySelector(state),\n baseWorkspace: selectors.CR.Workspaces.baseWorkspaceSelector(state),\n commandBarOpen: commandBarSelectors.commandBarOpen(state),\n editPreviewMode: selectors.UI.EditPreviewMode.currentEditPreviewMode(state),\n previewUrl: commandBarSelectors.previewUrl(state),\n});\nconst mapDispatchToProps = (dispatch) => ({\n handleHotkeyAction: dispatch,\n});\nconst mapGlobalRegistryToProps = neos((globalRegistry) => ({\n i18nRegistry: globalRegistry.get('i18n'),\n hotkeyRegistry: globalRegistry.get('hotkeys'),\n config: globalRegistry.get('frontendConfiguration').get('Shel.Neos.CommandBar:CommandBar'),\n nodeTypesRegistry: globalRegistry.get('@neos-project/neos-ui-contentrepository'),\n editPreviewModes: globalRegistry.get('frontendConfiguration').get('editPreviewModes'),\n plugins: globalRegistry.get('Shel.Neos.CommandBar').getChildrenAsObject('plugins'),\n}));\nexport default connect(() => ({}), {\n toggleCommandBar: commandBarActions.toggleCommandBar,\n addNode: actions.CR.Nodes.commenceCreation,\n setEditPreviewMode: actions.UI.EditPreviewMode.set,\n publishAction: actions.CR.Workspaces.publish,\n discardAction: actions.CR.Workspaces.commenceDiscard,\n setActiveContentCanvasSrc: actions.UI.ContentCanvas.setSrc,\n setActiveContentCanvasContextPath: actions.CR.Nodes.setDocumentNode,\n changeBaseWorkspaceAction: actions.CR.Workspaces.changeBaseWorkspace,\n})(connect(mapStateToProps, mapDispatchToProps)(mapGlobalRegistryToProps(CommandBarUiPlugin)));\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/prop-types/index.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js","webpack:///../commandbar/src/components/CommandListItem/CommandListItem.module.css?723f","webpack:///./src/actions/index.ts","webpack:///../commandbar/src/components/CommandBarFooter/CommandBarFooter.module.css?04f4","webpack:///../commandbar/src/components/SearchBox/SearchBox.module.css?0a5b","webpack:///../commandbar/src/components/CommandBarDialog/CommandBarDialog.module.css?1489","webpack:///../commandbar/src/components/CommandList/CommandListing.module.css?1951","webpack:///../commandbar/src/components/CommandResultsView/CommandResultsView.module.css?c238","webpack:///../commandbar/src/components/ToggleButton/ToggleButton.module.css?c05f","webpack:///./src/CommandBarUiPlugin.module.css?b5cb","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/redux-actions/index.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js","webpack:///../commandbar/src/components/CommandBarHeader/CommandBarHeader.module.css?71c1","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousRegistry.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-decorators/index.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js","webpack:///../commandbar/src/components/IconWrapper/IconWrapper.module.css?2df3","webpack:///../commandbar/src/components/CommandBarFooter/Branding.module.css?63c0","webpack:///../commandbar/src/Theme.module.css?9f41","webpack:///./src/index.js","webpack:///./src/manifest.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/dist/index.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/dist/createConsumerApi.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/dist/manifest.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/dist/registry/index.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/dist/registry/AbstractRegistry.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/positional-array-sorter/dist/positionalArraySorter.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/tslib/tslib.es6.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousMetaRegistry.js","webpack:///../commandbar/src/hooks/useFunctionRef.ts","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@preact/signals-core/dist/signals-core.module.js","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@preact/signals-react/dist/signals.module.js","webpack:///../commandbar/src/helpers/flattenCommands.ts","webpack:///../commandbar/src/helpers/logger.ts","webpack:///../commandbar/src/helpers/clamp.ts","webpack:////Users/sebastianhelzle/Workspace/1und1/access-shops-dist/app/Packages/Plugins/Shel.Neos.CommandBar/node_modules/@leeoniya/ufuzzy/dist/uFuzzy.esm.js","webpack:///../commandbar/src/helpers/filterCommands.ts","webpack:///../commandbar/src/helpers/asset.ts","webpack:///../commandbar/src/helpers/classnames.ts","webpack:///../commandbar/src/state/commandBarMachine.ts","webpack:///../commandbar/src/state/commandBarReducer.ts","webpack:///../commandbar/src/components/IconWrapper/IconWrapper.tsx","webpack:///../commandbar/src/components/CommandBarFooter/Branding.tsx","webpack:///../commandbar/src/components/Icons/IconBack.tsx","webpack:///../commandbar/src/components/Icons/IconNeos.tsx","webpack:///../commandbar/src/components/Icons/IconSpinner.tsx","webpack:///../commandbar/src/components/Icons/IconStar.tsx","webpack:///../commandbar/src/components/Icons/IconPlay.tsx","webpack:///../commandbar/src/components/Icons/IconRepeat.tsx","webpack:///../commandbar/src/components/CommandBarFooter/CommandBarFooter.tsx","webpack:///../commandbar/src/components/SearchBox/SearchBox.tsx","webpack:///../commandbar/src/components/CommandBarHeader/CommandBarHeader.tsx","webpack:///../commandbar/src/components/CommandListItem/CommandListItem.tsx","webpack:///../commandbar/src/components/CommandList/CommandList.tsx","webpack:///../commandbar/src/components/CommandResultsView/CommandResultsView.tsx","webpack:///../commandbar/src/components/ToggleButton/ToggleButton.tsx","webpack:///../commandbar/src/state/CommandBarStateProvider.tsx","webpack:///../commandbar/src/state/CommandBarExecutor.tsx","webpack:///../commandbar/src/state/IntlProvider.tsx","webpack:///../commandbar/src/components/CommandBarDialog/CommandBarDialog.tsx","webpack:///../commandbar/src/CommandBar.tsx","webpack:///../neos-api/src/fetch.ts","webpack:///../neos-api/src/preferences.ts","webpack:///../neos-api/src/commands.ts","webpack:///../neos-api/src/documentation.ts","webpack:///../neos-api/src/packages.ts","webpack:///../neos-api/src/nodes.ts","webpack:///./src/CommandBarUiPlugin.tsx"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","getDefault","getModuleExports","object","property","prototype","hasOwnProperty","p","s","React","PropTypes","NeosUiReduxStore","__read","iterator","e","ar","next","done","push","error","__spreadArray","to","from","pack","arguments","length","Array","slice","concat","readFromConsumerApi","_a","args","_i","window","apply","Error","actionTypes","TOGGLE_COMMAND_BAR","actions","toggleCommandBar","reducer","state","action","_b","_c","plugins","commandBar","open","undefined","payload","selectors","commandBarOpen","previewUrl","ui","contentCanvas","reduxActions","reactRedux","extendStatics","__extends","b","setPrototypeOf","__proto__","TypeError","String","__","this","constructor","__importDefault","mod","AbstractRegistry_1","require","positional_array_sorter_1","SynchronousRegistry","_super","description","_this","_registry","set","position","entry","indexOfItemWithTheSameKey","findIndex","item","console","result","find","_getChildrenWrapped","searchKey","unsortedChildren","filter","indexOf","getChildrenAsObject","forEach","getChildren","map","has","Boolean","_getAllWrapped","getAllAsObject","getAllAsList","assign","id","NeosUiDecorators","ReactUiComponents","globalRegistry","frontendConfiguration","enabled","CommandBarUiPlugin","SynchronousMetaRegistry","createConsumerApi","createConsumerApi_1","readFromConsumerApi_1","index_1","manifest_1","createReadOnlyValue","writable","configurable","manifests","exposureMap","api","keys","identifier","options","bootstrap","SynchronousRegistry_1","SynchronousMetaRegistry_1","AbstractRegistry","SERIAL_VERSION_UID","tslib_1","positionalArraySorter","subject","idKey","e_1","e_2","e_3","e_4","_d","e_5","_e","e_6","_f","e_7","_g","positionAccessor","indexMapping","middleKeys","startKeys","endKeys","beforeKeys","afterKeys","index","positionValue","invalid","startsWith","weight","weightMatch","match","Number","reference","numberPosition","parseFloat","isNaN","isFinite","resultStart","resultMiddle","resultEnd","processedKeys","sortedWeights","dict","asc","weights","x","sort","a","reverse","addToResults","e_8","e_9","beforeWeights","beforeWeights_1","__values","beforeWeights_1_1","e_8_1","afterWeights","afterWeights_1","afterWeights_1_1","e_9_1","_h","_j","e_1_1","_k","_l","e_2_1","_m","_o","e_3_1","_p","_q","_r","_s","e_5_1","e_4_1","_t","_u","_v","_w","e_7_1","e_6_1","__spread","__assign","__rest","getOwnPropertySymbols","propertyIsEnumerable","__decorate","decorators","target","desc","getOwnPropertyDescriptor","Reflect","decorate","__param","paramIndex","decorator","__metadata","metadataKey","metadataValue","metadata","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","rejected","adopt","then","__generator","body","f","y","g","_","label","sent","trys","ops","verb","v","op","pop","__createBinding","k","k2","__exportStar","__spreadArrays","il","j","jl","__await","__asyncGenerator","asyncIterator","q","resume","fulfill","settle","shift","__asyncDelegator","__asyncValues","__makeTemplateObject","cooked","raw","__importStar","default","__classPrivateFieldGet","receiver","privateMap","__classPrivateFieldSet","useFunctionRef","fn","fnRef","current","h","S","u","U","w","subscribe","valueOf","toString","peek","N","createElement","WeakMap","$$typeof","defineProperties","type","data","props","ref","ReactCurrentDispatcher","useCallback","test","useReducer","Map","flattenCommands","commands","parentId","reduce","commandList","commandId","icon","subCommands","canHandleQueries","closeOnExecute","category","executeManually","absoluteCommandId","subCommandIds","subCommandId","PREFIX","ok","message","log","warn","debug","clamp","min","max","Math","cmp","Intl","Collator","compare","NEGS_RE","OPTS","interSplit","intraSplit","intraBound","interLft","interRgt","interChars","interIns","Infinity","intraChars","intraIns","intraContr","intraMode","intraSlice","intraSub","intraTrn","intraDel","intraFilt","term","info","haystack","needle","idx","chars","terms","interLft2","interLft1","start","ia","ib","lazyRepeat","limit","uFuzzy","opts","_intraSplit","_interSplit","_intraBound","intraRules","_intraSlice","_intraIns","_intraSub","_intraTrn","_intraDel","plen","withIntraSplit","RegExp","trimRe","contrsRe","split","replace","toLowerCase","prepQuery","capt","interOR","parts","reTpl","contrs","fill","pi","lftIdx","rgtIdx","lftChar","rgtChar","numChars","variants","intraInsTpl","join","preTpl","sufTpl","interCharsTpl","idxs","out","query","withIntraBound","interBound","queryR","partsLen","len","field","interRgt2","interRgt1","ranges","mayDiscard","ii","mhstr","idxAcc","disc","lft2","lft1","rgt2","rgt1","inter","intra","refine","group","termLen","groupLen","fullMatch","idxOf","refineMatch","lftCharIdx","rgtCharIdx","isPre","isSuf","junk","junkIdx","m2","found","re","exec","charIdx","refLen","ri","lastRi","idxInNext","matchLen","offset","prepend","search","outOfOrder","infoThresh","preFiltered","negsRe","needles","matches","negs","trim","terms2","ti","permute","perm","matchedIdxs","Set","ni","size","preFiltered2","matched","add","retInfo","retOrder","acc","_info","order","_search","latinize","accents","A","E","I","O","C","accentsMap","accentsTpl","accentsRe","replacer","strings","arr","_mark","part","_append","highlight","str","mark","accum","append","tmp","substring","fr","uf","assert","condition","classnames","STATUS","TRANSITION","ACTION","machine","initial","COLLAPSED","states","collapsed","on","UPDATE_SEARCH","IDLE","EXPAND","SET_SEARCH_WORD","REFRESH_COMMANDS","HIGHLIGHT_NEXT_ITEM","idle","RESET_HIGHLIGHT","HIGHLIGHT_NEXT_COMMAND","HIGHLIGHT_PREVIOUS_ITEM","HIGHLIGHT_PREVIOUS_COMMAND","CANCEL","RESET_SEARCH_OR_LEAVE_GROUP","EXECUTE_COMMAND","EXECUTING_COMMAND","ADD_RECENTLY_USED","SET_ACTIVE_COMMAND","GO_TO_PARENT_GROUP","LEAVE_GROUP","SELECT_GROUP","RESET_SEARCH","SET_GROUP","ADD_FAVOURITE","REMOVE_FAVOURITE","executingCommand","UPDATE_RESULT","DISPLAYING_RESULT","FINISH_COMMAND","UNSET_ACTIVE_COMMAND","displayingResult","UPDATE_COMMAND_QUERY","SET_COMMAND_QUERY","RESET_OPTION_HIGHLIGHT","HIGHLIGHT_NEXT_OPTION","HIGHLIGHT_PREVIOUS_OPTION","UNSET_RESULT","runAction","nextState","event","searchWord","highlightedItem","availableCommandIds","filterCommands","selectedCommandGroup","favourites","recentCommands","availableCommands","values","command","includes","sortCommands","favouriteCommands","aIsRecent","bIsRecent","aIsFavourite","bIsFavourite","localeCompare","availableCommandNames","indices","highlightedOption","commandQuery","commandQueryDirty","expanded","activeCommandId","activeCommandMessage","success","view","resultCommandId","unshift","commandBarReducer","transition","actionCallback","nextStateNode","status","memo","children","className","showBranding","useCommandBarState","translate","useIntl","href","title","rel","xmlns","width","height","viewBox","gradientUnits","x1","y1","x2","y2","stopColor","transform","IconBack","IconNeos","IconSpinner","IconStar","IconPlay","IconRepeat","Icon","commandForContext","isRunning","updateResultsTimer","executeCommand","useCommandExecutor","inputRef","activeCommand","handleChange","clearTimeout","setTimeout","handleKeyPress","preventDefault","stopPropagation","focus","Fragment","placeholder","disabled","autoFocus","onChange","onKeyUp","onClick","isDisplayingResults","CommandListItem","onItemSelect","highlightedId","onToggleFavourite","commandType","getCommandType","isHighlighted","isFavourite","navRef","useRef","querySelector","scrollIntoView","behavior","block","handleToggleFavourite","suggestions","highlightedCommand","isLoading","highlightedIndex","handleToggle","active","CommandBarContext","CommandBarStateProvider","IconComponent","userPreferences","dispatch","createAppState","initialState","commandBarState","async","addRecentCommand","catch","setFavouriteCommands","spin","Provider","CommandInputContext","createContext","useContext","CommandBarExecutor","toggleOpen","dialogRef","handleKeyEnteredRef","defaultPrevented","metaKey","ctrlKey","contains","document","location","origin","actionResult","finally","executeCommandRef","windowKeyEventHandler","addEventListener","removeEventListener","IntlContext","IntlProvider","onDrag","isDragging","dialogPosition","left","innerWidth","top","innerHeight","dragStateOffset","offsetLeft","offsetTop","hasBeenDragged","dialogStyle","visibility","reposition","dialogSize","getBoundingClientRect","handleDragStart","tagName","dataTransfer","setData","dropEffect","effectAllowed","clientX","clientY","handleDragDrop","onResize","parentElement","draggable","onDragStart","style","fetchData","endpoint","params","method","url","encodeURIComponent","fetch","credentials","JSON","stringify","headers","Accept","response","statusText","json","text","setPreference","getPreferences","commandIds","addRecentDocument","nodeContextPath","getCommands","searchNeosDocs","searchNeosPackages","searchNodes","node","super","buildCommandsFromHotkeys","hotkeyRegistry","handleHotkeyAction","config","carry","hotkeys","mapHotkeyIdToIcon","buildCommandsFromWorkspaces","allowedTargetWorkspaces","neos","configuration","workspaceName","workspace","readonly","changeBaseWorkspaceAction","buildCommandsFromEditPreviewModes","setEditPreviewMode","editPreviewModes","i18nRegistry","isEditingMode","editPreviewMode","handleAddNode","addNode","documentNode","focusedNodeContextPath","contextPath","showRecentDocuments","recentDocuments","setActiveContentCanvasContextPath","setActiveContentCanvasSrc","uri","handleSearchNode","siteNode","results","nodetype","handleSearchNeosDocs","handleSearchNeosPackages","handlePublish","publishableNodesInDocument","publishAction","baseWorkspace","count","handlePublishAll","publishableNodes","handleDiscard","discardAction","handleDiscardAll","setDragging","dragging","setState","paramsOrFallback","fallback","loaded","searchDocuments","switchWorkspace","publishDiscard","publish","publishAll","discard","discardAll","quickActions","switchEditPreviewMode","openPreview","recentDocument","features","actionName","pluginCommands","pluginName","plugin","pluginResult","preferences","prev","prevProps","onDragOver","pointerEvents","propTypes","func","isRequired","string","bool","isWorkspaceReadOnly","array","mapGlobalRegistryToProps","nodeTypesRegistry","CR","Nodes","commenceCreation","UI","EditPreviewMode","Workspaces","commenceDiscard","ContentCanvas","setSrc","setDocumentNode","changeBaseWorkspace","siteNodeSelector","documentNodeSelector","focusedNodePathSelector","publishableNodesSelector","publishableNodesInDocumentSelector","isWorkspaceReadOnlySelector","baseWorkspaceSelector","currentEditPreviewMode"],"mappings":";aACE,IAAIA,EAAmB,GAGvB,SAASC,oBAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,qBAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,oBAAoBQ,EAAIF,EAGxBN,oBAAoBS,EAAIV,EAGxBC,oBAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,oBAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,oBAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,oBAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,oBAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,oBAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,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{};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 22);\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().React;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().PropTypes;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiReduxStore;\n","\"use strict\";\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nexports.__esModule = true;\nfunction readFromConsumerApi(key) {\n return function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (window['@Neos:HostPluginAPI'] && window['@Neos:HostPluginAPI'][\"@\".concat(key)]) {\n return (_a = window['@Neos:HostPluginAPI'])[\"@\".concat(key)].apply(_a, __spreadArray([], __read(args), false));\n }\n throw new Error('You are trying to read from a consumer api that hasn\\'t been initialized yet!');\n };\n}\nexports[\"default\"] = readFromConsumerApi;\n//# sourceMappingURL=readFromConsumerApi.js.map","// extracted by mini-css-extract-plugin\nmodule.exports = {\"commandListItem\":\"CommandListItem-module__commandListItem___2u7xD\",\"highlighted\":\"CommandListItem-module__highlighted___1LR6R\",\"disabled\":\"CommandListItem-module__disabled___7wCym\",\"label\":\"CommandListItem-module__label___1bznO\",\"description\":\"CommandListItem-module__description___2RTG3\",\"type\":\"CommandListItem-module__type___1C7PR\",\"favouriteButton\":\"CommandListItem-module__favouriteButton___3n3yV\",\"isFavourite\":\"CommandListItem-module__isFavourite___KSM9p\"};","import { createAction, handleActions } from 'redux-actions';\nexport const actionTypes = {\n TOGGLE_COMMAND_BAR: 'TOGGLE_COMMAND_BAR',\n};\nconst toggleCommandBar = createAction(actionTypes.TOGGLE_COMMAND_BAR);\nexport const actions = {\n toggleCommandBar,\n};\nexport const reducer = handleActions({\n TOGGLE_COMMAND_BAR: (state, action) => {\n var _a, _b, _c;\n return ({\n ...state,\n plugins: {\n ...state.plugins,\n commandBar: {\n open: ((_a = action.payload) === null || _a === void 0 ? void 0 : _a.open) !== undefined ? action.payload.open : !((_c = (_b = state.plugins) === null || _b === void 0 ? void 0 : _b.commandBar) === null || _c === void 0 ? void 0 : _c.open),\n },\n },\n });\n },\n}, {\n plugins: {\n commandBar: {\n open: false,\n },\n },\n});\nexport const selectors = {\n commandBarOpen: (state) => { var _a, _b; return (_b = (_a = state.plugins) === null || _a === void 0 ? void 0 : _a.commandBar) === null || _b === void 0 ? void 0 : _b.open; },\n previewUrl: (state) => { var _a, _b; return (_b = (_a = state.ui) === null || _a === void 0 ? void 0 : _a.contentCanvas) === null || _b === void 0 ? void 0 : _b.previewUrl; },\n};\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"commandBarFooter\":\"CommandBarFooter-module__commandBarFooter___2mcre\",\"breadcrumb\":\"CommandBarFooter-module__breadcrumb___1Ul24\",\"activity\":\"CommandBarFooter-module__activity___2GXJU\",\"spinner\":\"CommandBarFooter-module__spinner___1mRmX\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"searchBox\":\"SearchBox-module__searchBox___1SEtn\",\"expandButton\":\"SearchBox-module__expandButton___B2jYv\",\"executeButton\":\"SearchBox-module__executeButton___3hg_l\",\"commandQueryDirty\":\"SearchBox-module__commandQueryDirty___s_CVX\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"commandBar\":\"CommandBarDialog-module__commandBar___1Hb5s\",\"hasResults\":\"CommandBarDialog-module__hasResults___3iM8B\",\"resultsWrap\":\"CommandBarDialog-module__resultsWrap___2gd3U\",\"expanded\":\"CommandBarDialog-module__expanded___jby7g\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"results\":\"CommandListing-module__results___23Rve\",\"noResults\":\"CommandListing-module__noResults___Mb89V\",\"disabled\":\"CommandListing-module__disabled___6gpPj\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"commandResultsView\":\"CommandResultsView-module__commandResultsView___xLqwb\",\"message\":\"CommandResultsView-module__message___NhUkR\",\"results\":\"CommandResultsView-module__results___1t6jB\",\"noResults\":\"CommandResultsView-module__noResults___2ksIF\",\"disabled\":\"CommandResultsView-module__disabled___OmNvX\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"toggleButton\":\"ToggleButton-module__toggleButton___2wPs-\",\"toggleButtonActive\":\"ToggleButton-module__toggleButtonActive___3bWD5\",\"buttonIcon\":\"ToggleButton-module__buttonIcon___UjFjw\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"fullScreenLayer\":\"CommandBarUiPlugin-module__fullScreenLayer___1cUx4\",\"open\":\"CommandBarUiPlugin-module__open___1Bjxj\",\"commandBarToolbarComponent\":\"CommandBarUiPlugin-module__commandBarToolbarComponent___1agRY\"};","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().reduxActions;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().reactRedux;\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"commandBarHeader\":\"CommandBarHeader-module__commandBarHeader___3Y2hR\",\"backButton\":\"CommandBarHeader-module__backButton___1qIGu\"};","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nexports.__esModule = true;\nvar AbstractRegistry_1 = __importDefault(require(\"./AbstractRegistry\"));\nvar positional_array_sorter_1 = __importDefault(require(\"@neos-project/positional-array-sorter\"));\nvar SynchronousRegistry = (function (_super) {\n __extends(SynchronousRegistry, _super);\n function SynchronousRegistry(description) {\n var _this = _super.call(this, description) || this;\n _this._registry = [];\n return _this;\n }\n SynchronousRegistry.prototype.set = function (key, value, position) {\n if (position === void 0) { position = 0; }\n if (typeof key !== 'string') {\n throw new Error('Key must be a string');\n }\n if (typeof position !== 'string' && typeof position !== 'number') {\n throw new Error('Position must be a string or a number');\n }\n var entry = { key: key, value: value };\n if (position) {\n entry.position = position;\n }\n var indexOfItemWithTheSameKey = this._registry.findIndex(function (item) { return item.key === key; });\n if (indexOfItemWithTheSameKey === -1) {\n this._registry.push(entry);\n }\n else {\n this._registry[indexOfItemWithTheSameKey] = entry;\n }\n return value;\n };\n SynchronousRegistry.prototype.get = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return null;\n }\n var result = this._registry.find(function (item) { return item.key === key; });\n return result ? result.value : null;\n };\n SynchronousRegistry.prototype._getChildrenWrapped = function (searchKey) {\n var unsortedChildren = this._registry.filter(function (item) { return item.key.indexOf(searchKey + '/') === 0; });\n return (0, positional_array_sorter_1[\"default\"])(unsortedChildren);\n };\n SynchronousRegistry.prototype.getChildrenAsObject = function (searchKey) {\n var result = {};\n this._getChildrenWrapped(searchKey).forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getChildren = function (searchKey) {\n return this._getChildrenWrapped(searchKey).map(function (item) { return item.value; });\n };\n SynchronousRegistry.prototype.has = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return false;\n }\n return Boolean(this._registry.find(function (item) { return item.key === key; }));\n };\n SynchronousRegistry.prototype._getAllWrapped = function () {\n return (0, positional_array_sorter_1[\"default\"])(this._registry);\n };\n SynchronousRegistry.prototype.getAllAsObject = function () {\n var result = {};\n this._getAllWrapped().forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getAllAsList = function () {\n return this._getAllWrapped().map(function (item) { return Object.assign({ id: item.key }, item.value); });\n };\n return SynchronousRegistry;\n}(AbstractRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousRegistry;\n//# sourceMappingURL=SynchronousRegistry.js.map","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiDecorators;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().ReactUiComponents;\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"iconWrap\":\"IconWrapper-module__iconWrap___1Z3nD\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"madeWithLove\":\"Branding-module__madeWithLove___2ibna\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"commandBarTheme\":\"Theme-module__commandBarTheme___1Z1-S\"};","require('./manifest');\n","import manifest, { SynchronousRegistry } from '@neos-project/neos-ui-extensibility';\n\nimport { reducer } from './actions';\nimport CommandBarUiPlugin from './CommandBarUiPlugin';\n\nmanifest('Shel.Neos.CommandBar:CommandBar', {}, (globalRegistry, { frontendConfiguration }) => {\n /** @type {{ enabled: boolean, features: { loadTestCommands: boolean } }} pluginConfig */\n const pluginConfig = frontendConfiguration['Shel.Neos.CommandBar:CommandBar'];\n const { enabled } = pluginConfig;\n\n if (!enabled) {\n return;\n }\n\n // Create our new registry for 3rd party command bar plugins\n globalRegistry.set(\n 'Shel.Neos.CommandBar',\n new SynchronousRegistry(`\n # Shel.Neos.CommandBar 3rd party commands\n `)\n );\n\n // Register commandbar component in the primary toolbar\n globalRegistry.get('containers').set('PrimaryToolbar/Middle/CommandBar', CommandBarUiPlugin);\n\n // Register reducer\n globalRegistry.get('reducers').set('Shel.Neos.CommandBar', { reducer });\n});\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nexports.__esModule = true;\nexports.SynchronousMetaRegistry = exports.SynchronousRegistry = exports.readFromConsumerApi = exports.createConsumerApi = void 0;\nvar createConsumerApi_1 = __importDefault(require(\"./createConsumerApi\"));\nexports.createConsumerApi = createConsumerApi_1[\"default\"];\nvar readFromConsumerApi_1 = __importDefault(require(\"./readFromConsumerApi\"));\nexports.readFromConsumerApi = readFromConsumerApi_1[\"default\"];\nvar index_1 = require(\"./registry/index\");\nexports.SynchronousRegistry = index_1.SynchronousRegistry;\nexports.SynchronousMetaRegistry = index_1.SynchronousMetaRegistry;\nexports[\"default\"] = (0, readFromConsumerApi_1[\"default\"])('manifest');\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nexports.__esModule = true;\nvar manifest_1 = __importDefault(require(\"./manifest\"));\nvar createReadOnlyValue = function (value) { return ({\n value: value,\n writable: false,\n enumerable: false,\n configurable: true\n}); };\nfunction createConsumerApi(manifests, exposureMap) {\n var api = {};\n Object.keys(exposureMap).forEach(function (key) {\n Object.defineProperty(api, key, createReadOnlyValue(exposureMap[key]));\n });\n Object.defineProperty(api, '@manifest', createReadOnlyValue((0, manifest_1[\"default\"])(manifests)));\n Object.defineProperty(window, '@Neos:HostPluginAPI', createReadOnlyValue(api));\n}\nexports[\"default\"] = createConsumerApi;\n//# sourceMappingURL=createConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nexports[\"default\"] = (function (manifests) {\n return function (identifier, options, bootstrap) {\n var _a;\n manifests.push((_a = {},\n _a[identifier] = {\n options: options,\n bootstrap: bootstrap\n },\n _a));\n };\n});\n//# sourceMappingURL=manifest.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nexports.__esModule = true;\nexports.SynchronousMetaRegistry = exports.SynchronousRegistry = void 0;\nvar SynchronousRegistry_1 = __importDefault(require(\"./SynchronousRegistry\"));\nexports.SynchronousRegistry = SynchronousRegistry_1[\"default\"];\nvar SynchronousMetaRegistry_1 = __importDefault(require(\"./SynchronousMetaRegistry\"));\nexports.SynchronousMetaRegistry = SynchronousMetaRegistry_1[\"default\"];\n//# sourceMappingURL=index.js.map","\"use strict\";\nexports.__esModule = true;\nvar AbstractRegistry = (function () {\n function AbstractRegistry(description) {\n this.SERIAL_VERSION_UID = 'd8a5aa78-978e-11e6-ae22-56b6b6499611';\n this.description = description;\n }\n return AbstractRegistry;\n}());\nexports[\"default\"] = AbstractRegistry;\n//# sourceMappingURL=AbstractRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar positionalArraySorter = function (subject, position, idKey) {\n var e_1, _a, e_2, _b, e_3, _c, e_4, _d, e_5, _e, e_6, _f, e_7, _g;\n if (position === void 0) { position = 'position'; }\n if (idKey === void 0) { idKey = 'key'; }\n var positionAccessor = typeof position === 'string' ? function (value) { return value[position]; } : position;\n var indexMapping = {};\n var middleKeys = {};\n var startKeys = {};\n var endKeys = {};\n var beforeKeys = {};\n var afterKeys = {};\n subject.forEach(function (item, index) {\n var key = item[idKey] ? item[idKey] : String(index);\n indexMapping[key] = index;\n var positionValue = positionAccessor(item);\n var position = String(positionValue ? positionValue : index);\n var invalid = false;\n if (position.startsWith('start')) {\n var weightMatch = position.match(/start\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!startKeys[weight]) {\n startKeys[weight] = [];\n }\n startKeys[weight].push(key);\n }\n else if (position.startsWith('end')) {\n var weightMatch = position.match(/end\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!endKeys[weight]) {\n endKeys[weight] = [];\n }\n endKeys[weight].push(key);\n }\n else if (position.startsWith('before')) {\n var match = position.match(/before\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!beforeKeys[reference]) {\n beforeKeys[reference] = {};\n }\n if (!beforeKeys[reference][weight]) {\n beforeKeys[reference][weight] = [];\n }\n beforeKeys[reference][weight].push(key);\n }\n }\n else if (position.startsWith('after')) {\n var match = position.match(/after\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!afterKeys[reference]) {\n afterKeys[reference] = {};\n }\n if (!afterKeys[reference][weight]) {\n afterKeys[reference][weight] = [];\n }\n afterKeys[reference][weight].push(key);\n }\n }\n else {\n invalid = true;\n }\n if (invalid) {\n var numberPosition = parseFloat(position);\n if (isNaN(numberPosition) || !isFinite(numberPosition)) {\n numberPosition = index;\n }\n if (!middleKeys[numberPosition]) {\n middleKeys[numberPosition] = [];\n }\n middleKeys[numberPosition].push(key);\n }\n });\n var resultStart = [];\n var resultMiddle = [];\n var resultEnd = [];\n var processedKeys = [];\n var sortedWeights = function (dict, asc) {\n var weights = Object.keys(dict).map(function (x) { return Number(x); }).sort(function (a, b) { return a - b; });\n return asc ? weights : weights.reverse();\n };\n var addToResults = function (keys, result) {\n keys.forEach(function (key) {\n var e_8, _a, e_9, _b;\n if (processedKeys.indexOf(key) >= 0) {\n return;\n }\n processedKeys.push(key);\n if (beforeKeys[key]) {\n var beforeWeights = sortedWeights(beforeKeys[key], true);\n try {\n for (var beforeWeights_1 = tslib_1.__values(beforeWeights), beforeWeights_1_1 = beforeWeights_1.next(); !beforeWeights_1_1.done; beforeWeights_1_1 = beforeWeights_1.next()) {\n var i = beforeWeights_1_1.value;\n addToResults(beforeKeys[key][i], result);\n }\n }\n catch (e_8_1) { e_8 = { error: e_8_1 }; }\n finally {\n try {\n if (beforeWeights_1_1 && !beforeWeights_1_1.done && (_a = beforeWeights_1[\"return\"])) _a.call(beforeWeights_1);\n }\n finally { if (e_8) throw e_8.error; }\n }\n }\n result.push(key);\n if (afterKeys[key]) {\n var afterWeights = sortedWeights(afterKeys[key], false);\n try {\n for (var afterWeights_1 = tslib_1.__values(afterWeights), afterWeights_1_1 = afterWeights_1.next(); !afterWeights_1_1.done; afterWeights_1_1 = afterWeights_1.next()) {\n var i = afterWeights_1_1.value;\n addToResults(afterKeys[key][i], result);\n }\n }\n catch (e_9_1) { e_9 = { error: e_9_1 }; }\n finally {\n try {\n if (afterWeights_1_1 && !afterWeights_1_1.done && (_b = afterWeights_1[\"return\"])) _b.call(afterWeights_1);\n }\n finally { if (e_9) throw e_9.error; }\n }\n }\n });\n };\n try {\n for (var _h = tslib_1.__values(sortedWeights(startKeys, false)), _j = _h.next(); !_j.done; _j = _h.next()) {\n var i = _j.value;\n addToResults(startKeys[i], resultStart);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_j && !_j.done && (_a = _h[\"return\"])) _a.call(_h);\n }\n finally { if (e_1) throw e_1.error; }\n }\n try {\n for (var _k = tslib_1.__values(sortedWeights(middleKeys, true)), _l = _k.next(); !_l.done; _l = _k.next()) {\n var i = _l.value;\n addToResults(middleKeys[i], resultMiddle);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_l && !_l.done && (_b = _k[\"return\"])) _b.call(_k);\n }\n finally { if (e_2) throw e_2.error; }\n }\n try {\n for (var _m = tslib_1.__values(sortedWeights(endKeys, true)), _o = _m.next(); !_o.done; _o = _m.next()) {\n var i = _o.value;\n addToResults(endKeys[i], resultEnd);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_o && !_o.done && (_c = _m[\"return\"])) _c.call(_m);\n }\n finally { if (e_3) throw e_3.error; }\n }\n try {\n for (var _p = tslib_1.__values(Object.keys(beforeKeys)), _q = _p.next(); !_q.done; _q = _p.next()) {\n var key = _q.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _r = (e_5 = void 0, tslib_1.__values(sortedWeights(beforeKeys[key], false))), _s = _r.next(); !_s.done; _s = _r.next()) {\n var i = _s.value;\n addToResults(beforeKeys[key][i], resultStart);\n }\n }\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\n finally {\n try {\n if (_s && !_s.done && (_e = _r[\"return\"])) _e.call(_r);\n }\n finally { if (e_5) throw e_5.error; }\n }\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_q && !_q.done && (_d = _p[\"return\"])) _d.call(_p);\n }\n finally { if (e_4) throw e_4.error; }\n }\n try {\n for (var _t = tslib_1.__values(Object.keys(afterKeys)), _u = _t.next(); !_u.done; _u = _t.next()) {\n var key = _u.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _v = (e_7 = void 0, tslib_1.__values(sortedWeights(afterKeys[key], false))), _w = _v.next(); !_w.done; _w = _v.next()) {\n var i = _w.value;\n addToResults(afterKeys[key][i], resultMiddle);\n }\n }\n catch (e_7_1) { e_7 = { error: e_7_1 }; }\n finally {\n try {\n if (_w && !_w.done && (_g = _v[\"return\"])) _g.call(_v);\n }\n finally { if (e_7) throw e_7.error; }\n }\n }\n }\n catch (e_6_1) { e_6 = { error: e_6_1 }; }\n finally {\n try {\n if (_u && !_u.done && (_f = _t[\"return\"])) _f.call(_t);\n }\n finally { if (e_6) throw e_6.error; }\n }\n var sortedKeys = tslib_1.__spread(resultStart, resultMiddle, resultEnd);\n return sortedKeys.map(function (key) { return indexMapping[key]; }).map(function (i) { return subject[i]; });\n};\nexports[\"default\"] = positionalArraySorter;\n//# sourceMappingURL=positionalArraySorter.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nexports.__esModule = true;\nvar SynchronousRegistry_1 = __importDefault(require(\"./SynchronousRegistry\"));\nvar SynchronousMetaRegistry = (function (_super) {\n __extends(SynchronousMetaRegistry, _super);\n function SynchronousMetaRegistry() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SynchronousMetaRegistry.prototype.set = function (key, value) {\n if (value.SERIAL_VERSION_UID !== 'd8a5aa78-978e-11e6-ae22-56b6b6499611') {\n throw new Error('You can only add registries to a meta registry');\n }\n return _super.prototype.set.call(this, key, value);\n };\n return SynchronousMetaRegistry;\n}(SynchronousRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousMetaRegistry;\n//# sourceMappingURL=SynchronousMetaRegistry.js.map","import { useRef } from 'react';\n/**\n * A custom hook that creates a ref for a function, and updates it on every render.\n * The new value is always the same function, but the function's context changes on every render.\n */\nexport default function useFunctionRef(fn) {\n const fnRef = useRef(fn);\n fnRef.current = fn;\n return fnRef;\n}\n","function i(){throw new Error(\"Cycle detected\")}function t(){if(!(s>1)){var i,t=!1;while(void 0!==r){var h=r;r=void 0;n++;while(void 0!==h){var o=h.o;h.o=void 0;h.f&=-3;if(!(8&h.f)&&d(h))try{h.c()}catch(h){if(!t){i=h;t=!0}}h=o}}n=0;s--;if(t)throw i}else s--}function h(i){if(s>0)return i();s++;try{return i()}finally{t()}}var o=void 0,r=void 0,s=0,n=0,f=0;function v(i){if(void 0!==o){var t=i.n;if(void 0===t||t.t!==o){t={i:0,S:i,p:o.s,n:void 0,t:o,e:void 0,x:void 0,r:t};if(void 0!==o.s)o.s.n=t;o.s=t;i.n=t;if(32&o.f)i.S(t);return t}else if(-1===t.i){t.i=0;if(void 0!==t.n){t.n.p=t.p;if(void 0!==t.p)t.p.n=t.n;t.p=o.s;t.n=void 0;o.s.n=t;o.s=t}return t}}}function e(i){this.v=i;this.i=0;this.n=void 0;this.t=void 0}e.prototype.h=function(){return!0};e.prototype.S=function(i){if(this.t!==i&&void 0===i.e){i.x=this.t;if(void 0!==this.t)this.t.e=i;this.t=i}};e.prototype.U=function(i){if(void 0!==this.t){var t=i.e,h=i.x;if(void 0!==t){t.x=h;i.e=void 0}if(void 0!==h){h.e=t;i.x=void 0}if(i===this.t)this.t=h}};e.prototype.subscribe=function(i){var t=this;return p(function(){var h=t.value,o=32&this.f;this.f&=-33;try{i(h)}finally{this.f|=o}})};e.prototype.valueOf=function(){return this.value};e.prototype.toString=function(){return this.value+\"\"};e.prototype.peek=function(){return this.v};Object.defineProperty(e.prototype,\"value\",{get:function(){var i=v(this);if(void 0!==i)i.i=this.i;return this.v},set:function(h){if(h!==this.v){if(n>100)i();this.v=h;this.i++;f++;s++;try{for(var o=this.t;void 0!==o;o=o.x)o.t.N()}finally{t()}}}});function u(i){return new e(i)}function d(i){for(var t=i.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function c(i){for(var t=i.s;void 0!==t;t=t.n){var h=t.S.n;if(void 0!==h)t.r=h;t.S.n=t;t.i=-1;if(void 0===t.n){i.s=t;break}}}function a(i){var t=i.s,h=void 0;while(void 0!==t){var o=t.p;if(-1===t.i){t.S.U(t);if(void 0!==o)o.n=t.n;if(void 0!==t.n)t.n.p=o}else h=t;t.S.n=t.r;if(void 0!==t.r)t.r=void 0;t=o}i.s=h}function l(i){e.call(this,void 0);this.x=i;this.s=void 0;this.g=f-1;this.f=4}(l.prototype=new e).h=function(){this.f&=-3;if(1&this.f)return!1;if(32==(36&this.f))return!0;this.f&=-5;if(this.g===f)return!0;this.g=f;this.f|=1;if(this.i>0&&!d(this)){this.f&=-2;return!0}var i=o;try{c(this);o=this;var t=this.x();if(16&this.f||this.v!==t||0===this.i){this.v=t;this.f&=-17;this.i++}}catch(i){this.v=i;this.f|=16;this.i++}o=i;a(this);this.f&=-2;return!0};l.prototype.S=function(i){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}e.prototype.S.call(this,i)};l.prototype.U=function(i){if(void 0!==this.t){e.prototype.U.call(this,i);if(void 0===this.t){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}}};l.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var i=this.t;void 0!==i;i=i.x)i.t.N()}};l.prototype.peek=function(){if(!this.h())i();if(16&this.f)throw this.v;return this.v};Object.defineProperty(l.prototype,\"value\",{get:function(){if(1&this.f)i();var t=v(this);this.h();if(void 0!==t)t.i=this.i;if(16&this.f)throw this.v;return this.v}});function w(i){return new l(i)}function y(i){var h=i.u;i.u=void 0;if(\"function\"==typeof h){s++;var r=o;o=void 0;try{h()}catch(t){i.f&=-2;i.f|=8;_(i);throw t}finally{o=r;t()}}}function _(i){for(var t=i.s;void 0!==t;t=t.n)t.S.U(t);i.x=void 0;i.s=void 0;y(i)}function g(i){if(o!==this)throw new Error(\"Out-of-order effect\");a(this);o=i;this.f&=-2;if(8&this.f)_(this);t()}function b(i){this.x=i;this.u=void 0;this.s=void 0;this.o=void 0;this.f=32}b.prototype.c=function(){var i=this.S();try{if(!(8&this.f)&&void 0!==this.x)this.u=this.x()}finally{i()}};b.prototype.S=function(){if(1&this.f)i();this.f|=1;this.f&=-9;y(this);c(this);s++;var t=o;o=this;return g.bind(this,t)};b.prototype.N=function(){if(!(2&this.f)){this.f|=2;this.o=r;r=this}};b.prototype.d=function(){this.f|=8;if(!(1&this.f))_(this)};function p(i){var t=new b(i);try{t.c()}catch(i){t.d();throw i}return t.d.bind(t)}export{e as Signal,h as batch,w as computed,p as effect,u as signal};//# sourceMappingURL=signals-core.module.js.map\n","import n,{__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED as r,useMemo as t,useRef as e,useEffect as i}from\"react\";import{Signal as u,effect as f,signal as o,computed as a}from\"@preact/signals-core\";export{Signal,batch,computed,effect,signal}from\"@preact/signals-core\";var c,v=n.createElement;n.createElement=function(n,r){if(\"string\"==typeof n&&r)for(var t in r){var e=r[t];if(\"children\"!==t&&e instanceof u)r[t]=e.value}return v.apply(this,arguments)};var l=new WeakMap;function p(n){if(c)c();c=n&&n.S()}var s=v(\"a\").$$typeof;Object.defineProperties(u.prototype,{$$typeof:{configurable:!0,value:s},type:{configurable:!0,value:function(n){return n.data.value}},props:{configurable:!0,get:function(){return{data:this}}},ref:{configurable:!0,value:null}});var g,b=!1,m=function(){return{}};Object.defineProperty(r.ReactCurrentDispatcher,\"current\",{get:function(){return g},set:function(n){g=n;if(!b)if(n&&!function(n){var r=d.get(n);if(void 0!==r)return r;var t=n.useCallback.length<2||/Invalid/.test(n.useCallback);d.set(n,t);return t}(n)){b=!0;var r=n.useReducer(m,{})[1];b=!1;var t=l.get(r);if(!t){t=function(n){var r;f(function(){r=this});r.c=n;return r}(r);l.set(r,t)}else t.c=r;p(t)}else p()}});var d=new Map;function h(n){return t(function(){return o(n)},[])}function y(n){var r=e(n);r.current=n;return t(function(){return a(function(){return r.current()})},[])}function j(n){var r=e(n);r.current=n;i(function(){return f(function(){return r.current()})},[])}export{y as useComputed,h as useSignal,j as useSignalEffect};//# sourceMappingURL=signals.module.js.map\n","/**\n * This method converts the hierarchical command list into a flat list of commands which is more convenient\n * for internal processing, whereas the hierarchical command list is more convenient for the user.\n */\nexport default function flattenCommands(commands, parentId = null) {\n return Object.keys(commands).reduce((commandList, commandId) => {\n const { icon, description, name, subCommands, action, canHandleQueries, closeOnExecute, category, executeManually, } = commands[commandId];\n // Create an uniquely identifiable command id for the flat command list\n const absoluteCommandId = parentId ? `${parentId}.${commandId}` : commandId;\n // Create list of available subcommand names\n const subCommandIds = subCommands\n ? Object.keys(subCommands).map((subCommandId) => `${absoluteCommandId}.${subCommandId}`)\n : [];\n // Insert the processed command into the flat command list\n commandList[absoluteCommandId] = {\n id: absoluteCommandId,\n name,\n icon,\n description,\n action,\n canHandleQueries,\n subCommandIds,\n parentId,\n closeOnExecute,\n category,\n executeManually,\n };\n // Insert subcommands into the list\n if (subCommandIds.length > 0) {\n return {\n ...commandList,\n ...flattenCommands(subCommands, absoluteCommandId),\n };\n }\n return commandList;\n }, {});\n}\n","const PREFIX = '%c[COMMANDBAR]';\nconst logger = {\n ok: (message, ...args) => console.log(PREFIX, 'color: green', message, ...args),\n error: (message, ...args) => console.log(PREFIX, 'color: red', message, ...args),\n warn: (message, ...args) => console.warn(PREFIX, 'color: orange', message, ...args),\n debug: \n // @ts-ignore\n process.env.NODE_ENV === 'production'\n ? () => null\n : (message, ...args) => console.debug(PREFIX, 'color: lightblue', message, ...args),\n};\nexport default logger;\n","export default function clamp(value, min, max) {\n return Math.max(min, Math.min(max, value));\n}\n","/**\n* Copyright (c) 2023, Leon Sorokin\n* All rights reserved. (MIT Licensed)\n*\n* uFuzzy.js (μFuzzy)\n* A tiny, efficient fuzzy matcher that doesn't suck\n* https://github.com/leeoniya/uFuzzy (v1.0.3)\n*/\n\nconst cmp = new Intl.Collator('en').compare;\n\nconst inf = Infinity;\n\nconst NEGS_RE = /(?:\\s+|^)-[a-z\\d]+/ig;\n\nconst OPTS = {\n\t// term segmentation & punct/whitespace merging\n\tinterSplit: \"[^A-Za-z0-9']+\",\n\tintraSplit: '[a-z][A-Z]',\n\n\t// intra bounds that will be used to increase lft1/rgt1 info counters\n\tintraBound: '[A-Za-z][0-9]|[0-9][A-Za-z]|[a-z][A-Z]',\n\n\t// inter-bounds mode\n\t// 2 = strict (will only match 'man' on whitepace and punct boundaries: Mega Man, Mega_Man, mega.man)\n\t// 1 = loose (plus allowance for alpha-num and case-change boundaries: MegaMan, 0007man)\n\t// 0 = any (will match 'man' as any substring: megamaniac)\n\tinterLft: 0,\n\tinterRgt: 0,\n\n\t// allowance between terms\n\tinterChars: '.',\n\tinterIns: inf,\n\n\t// allowance between chars in terms\n\tintraChars: \"[a-z\\\\d']\", // internally case-insensitive\n\tintraIns: 0,\n\n\tintraContr: \"'[a-z]{1,2}\\\\b\",\n\n\t// multi-insert or single-error mode\n\tintraMode: 0,\n\n\t// single-error bounds for errors within terms, default requires exact first char\n\tintraSlice: [1, inf],\n\n\t// single-error tolerance toggles\n\tintraSub: 0,\n\tintraTrn: 0,\n\tintraDel: 0,\n\n\t// can post-filter matches that are too far apart in distance or length\n\t// (since intraIns is between each char, it can accum to nonsense matches)\n\tintraFilt: (term, match, index) => true, // should this also accept WIP info?\n\n\t// final sorting fn\n\tsort: (info, haystack, needle) => {\n\t\tlet {\n\t\t\tidx,\n\t\t\tchars,\n\t\t\tterms,\n\t\t\tinterLft2,\n\t\t\tinterLft1,\n\t\t//\tinterRgt2,\n\t\t//\tinterRgt1,\n\t\t\tstart,\n\t\t\tintraIns,\n\t\t\tinterIns,\n\t\t} = info;\n\n\t\treturn idx.map((v, i) => i).sort((ia, ib) => (\n\t\t\t// most contig chars matched\n\t\t\tchars[ib] - chars[ia] ||\n\t\t\t// least char intra-fuzz (most contiguous)\n\t\t\tintraIns[ia] - intraIns[ib] ||\n\t\t\t// most prefix bounds, boosted by full term matches\n\t\t\t(\n\t\t\t\t(terms[ib] + interLft2[ib] + 0.5 * interLft1[ib]) -\n\t\t\t\t(terms[ia] + interLft2[ia] + 0.5 * interLft1[ia])\n\t\t\t) ||\n\t\t\t// highest density of match (least span)\n\t\t//\tspan[ia] - span[ib] ||\n\t\t\t// highest density of match (least term inter-fuzz)\n\t\t\tinterIns[ia] - interIns[ib] ||\n\t\t\t// earliest start of match\n\t\t\tstart[ia] - start[ib] ||\n\t\t\t// alphabetic\n\t\t\tcmp(haystack[idx[ia]], haystack[idx[ib]])\n\t\t));\n\t},\n};\n\nconst lazyRepeat = (chars, limit) => (\n\tlimit == 0 ? '' :\n\tlimit == 1 ? chars + '??' :\n\tlimit == inf ? chars + '*?' :\n\t chars + `{0,${limit}}?`\n);\n\nconst mode2Tpl = '(?:\\\\b|_)';\n\nfunction uFuzzy(opts) {\n\topts = Object.assign({}, OPTS, opts);\n\n\tconst {\n\t\tinterLft,\n\t\tinterRgt,\n\t\tintraMode,\n\t\tintraSlice,\n\t\tintraIns,\n\t\tintraSub,\n\t\tintraTrn,\n\t\tintraDel,\n\t\tintraContr,\n\t\tintraSplit: _intraSplit,\n\t\tinterSplit: _interSplit,\n\t\tintraBound: _intraBound,\n\t\tintraChars,\n\t} = opts;\n\n\tlet { intraRules } = opts;\n\n\tif (intraRules == null) {\n\t\tintraRules = p => {\n\t\t\t// default is exact term matches only\n\t\t\tlet _intraSlice = OPTS.intraSlice, // requires first char\n\t\t\t\t_intraIns = 0,\n\t\t\t\t_intraSub = 0,\n\t\t\t\t_intraTrn = 0,\n\t\t\t\t_intraDel = 0;\n\n\t\t\tlet plen = p.length;\n\n\t\t\t// prevent junk matches by requiring stricter rules for short terms\n\t\t\tif (plen <= 4) {\n\t\t\t\tif (plen >= 3) {\n\t\t\t\t\t// one swap in non-first char when 3-4 chars\n\t\t\t\t\t_intraTrn = Math.min(intraTrn, 1);\n\n\t\t\t\t\t// or one insertion when 4 chars\n\t\t\t\t\tif (plen == 4)\n\t\t\t\t\t\t_intraIns = Math.min(intraIns, 1);\n\t\t\t\t}\n\t\t\t\t// else exact match when 1-2 chars\n\t\t\t}\n\t\t\t// use supplied opts\n\t\t\telse {\n\t\t\t\t_intraSlice = intraSlice;\n\t\t\t\t_intraIns = intraIns,\n\t\t\t\t_intraSub = intraSub,\n\t\t\t\t_intraTrn = intraTrn,\n\t\t\t\t_intraDel = intraDel;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tintraSlice: _intraSlice,\n\t\t\t\tintraIns: _intraIns,\n\t\t\t\tintraSub: _intraSub,\n\t\t\t\tintraTrn: _intraTrn,\n\t\t\t\tintraDel: _intraDel,\n\t\t\t};\n\t\t};\n\t}\n\n\tlet withIntraSplit = !!_intraSplit;\n\n\tlet intraSplit = new RegExp(_intraSplit, 'g');\n\tlet interSplit = new RegExp(_interSplit, 'g');\n\n\tlet trimRe = new RegExp('^' + _interSplit + '|' + _interSplit + '$', 'g');\n\tlet contrsRe = new RegExp(intraContr, 'gi');\n\n\tconst split = needle => {\n\t\tneedle = needle.replace(trimRe, '').toLowerCase();\n\n\t\tif (withIntraSplit)\n\t\t\tneedle = needle.replace(intraSplit, m => m[0] + ' ' + m[1]);\n\n\t\treturn needle.split(interSplit).filter(t => t != '');\n\t};\n\n\tconst prepQuery = (needle, capt = 0, interOR = false) => {\n\t\t// split on punct, whitespace, num-alpha, and upper-lower boundaries\n\t\tlet parts = split(needle);\n\n\t\tif (parts.length == 0)\n\t\t\tthrow `Empty needle!`;\n\n\t\t// split out any detected contractions for each term that become required suffixes\n\t\tlet contrs = Array(parts.length).fill('');\n\t\tparts = parts.map((p, pi) => p.replace(contrsRe, m => {\n\t\t\tcontrs[pi] = m;\n\t\t\treturn '';\n\t\t}));\n\n\t\t// array of regexp tpls for each term\n\t\tlet reTpl;\n\n\t\t// allows single mutations within each term\n\t\tif (intraMode == 1) {\n\t\t\treTpl = parts.map((p, pi) => {\n\t\t\t\tlet {\n\t\t\t\t\tintraSlice,\n\t\t\t\t\tintraIns,\n\t\t\t\t\tintraSub,\n\t\t\t\t\tintraTrn,\n\t\t\t\t\tintraDel,\n\t\t\t\t} = intraRules(p);\n\n\t\t\t\tif (intraIns + intraSub + intraTrn + intraDel == 0)\n\t\t\t\t\treturn p + contrs[pi];\n\n\t\t\t\tlet [lftIdx, rgtIdx] = intraSlice;\n\t\t\t\tlet lftChar = p.slice(0, lftIdx); // prefix\n\t\t\t\tlet rgtChar = p.slice(rgtIdx); // suffix\n\n\t\t\t\tlet chars = p.slice(lftIdx, rgtIdx);\n\n\t\t\t\t// neg lookahead to prefer matching 'Test' instead of 'tTest' in ManifestTest or fittest\n\t\t\t\t// but skip when search term contains leading repetition (aardvark, aaa)\n\t\t\t\tif (intraIns == 1 && lftChar.length == 1 && lftChar != chars[0])\n\t\t\t\t\tlftChar += '(?!' + lftChar + ')';\n\n\t\t\t\tlet numChars = chars.length;\n\n\t\t\t\tlet variants = [];\n\n\t\t\t\t// variants with single char substitutions\n\t\t\t\tif (intraSub) {\n\t\t\t\t\tfor (let i = 0; i < numChars; i++)\n\t\t\t\t\t\tvariants.push(lftChar + chars.slice(0, i) + intraChars + chars.slice(i + 1) + rgtChar);\n\t\t\t\t}\n\n\t\t\t\t// variants with single transpositions\n\t\t\t\tif (intraTrn) {\n\t\t\t\t\tfor (let i = 0; i < numChars - 1; i++) {\n\t\t\t\t\t\tif (chars[i] != chars[i+1])\n\t\t\t\t\t\t\tvariants.push(lftChar + chars.slice(0, i) + chars[i+1] + chars[i] + chars.slice(i + 2) + rgtChar);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// variants with single char omissions\n\t\t\t\tif (intraDel) {\n\t\t\t\t\tfor (let i = 0; i < numChars; i++)\n\t\t\t\t\t\tvariants.push(lftChar + chars.slice(0, i + 1) + '?' + chars.slice(i + 1) + rgtChar);\n\t\t\t\t}\n\n\t\t\t\t// variants with single char insertions\n\t\t\t\tif (intraIns) {\n\t\t\t\t\tlet intraInsTpl = lazyRepeat(intraChars, 1);\n\n\t\t\t\t\tfor (let i = 0; i < numChars; i++)\n\t\t\t\t\t\tvariants.push(lftChar + chars.slice(0, i) + intraInsTpl + chars.slice(i) + rgtChar);\n\t\t\t\t}\n\n\t\t\t\tlet reTpl = '(?:' + p + '|' + variants.join('|') + ')' + contrs[pi];\n\n\t\t\t//\tconsole.log(reTpl);\n\n\t\t\t\treturn reTpl;\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tlet intraInsTpl = lazyRepeat(intraChars, intraIns);\n\n\t\t\t// capture at char level\n\t\t\tif (capt == 2 && intraIns > 0) {\n\t\t\t\t// sadly, we also have to capture the inter-term junk via parenth-wrapping .*?\n\t\t\t\t// to accum other capture groups' indices for \\b boosting during scoring\n\t\t\t\tintraInsTpl = ')(' + intraInsTpl + ')(';\n\t\t\t}\n\n\t\t\treTpl = parts.map((p, pi) => p.split('').map((c, i, chars) => {\n\t\t\t\t// neg lookahead to prefer matching 'Test' instead of 'tTest' in ManifestTest or fittest\n\t\t\t\t// but skip when search term contains leading repetition (aardvark, aaa)\n\t\t\t\tif (intraIns == 1 && i == 0 && chars.length > 1 && c[i] != c[i+1])\n\t\t\t\t\tc += '(?!' + c + ')';\n\n\t\t\t\treturn c;\n\t\t\t}).join(intraInsTpl) + contrs[pi]);\n\t\t}\n\n\t//\tconsole.log(reTpl);\n\n\t\t// this only helps to reduce initial matches early when they can be detected\n\t\t// TODO: might want a mode 3 that excludes _\n\t\tlet preTpl = interLft == 2 ? mode2Tpl : '';\n\t\tlet sufTpl = interRgt == 2 ? mode2Tpl : '';\n\n\t\tlet interCharsTpl = sufTpl + lazyRepeat(opts.interChars, opts.interIns) + preTpl;\n\n\t\t// capture at word level\n\t\tif (capt > 0) {\n\t\t\tif (interOR) {\n\t\t\t\t// this is basically for doing .matchAll() occurence counting and highlighting without needing permuted ooo needles\n\t\t\t\treTpl = preTpl + '(' + reTpl.join(')' + sufTpl + '|' + preTpl + '(') + ')' + sufTpl;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// sadly, we also have to capture the inter-term junk via parenth-wrapping .*?\n\t\t\t\t// to accum other capture groups' indices for \\b boosting during scoring\n\t\t\t\treTpl = '(' + reTpl.join(')(' + interCharsTpl + ')(') + ')';\n\t\t\t\treTpl = '(.?' + preTpl + ')' + reTpl + '(' + sufTpl + '.*)'; // nit: trailing capture here assumes interIns = Inf\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treTpl = reTpl.join(interCharsTpl);\n\t\t\treTpl = preTpl + reTpl + sufTpl;\n\t\t}\n\n\t//\tconsole.log(reTpl);\n\n\t\treturn [new RegExp(reTpl, 'i'), parts, contrs];\n\t};\n\n\tconst filter = (haystack, needle, idxs) => {\n\n\t\tlet out = [];\n\t\tlet [query] = prepQuery(needle);\n\n\t\tif (idxs != null) {\n\t\t\tfor (let i = 0; i < idxs.length; i++) {\n\t\t\t\tlet idx = idxs[i];\n\t\t\t\tquery.test(haystack[idx]) && out.push(idx);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor (let i = 0; i < haystack.length; i++)\n\t\t\t\tquery.test(haystack[i]) && out.push(i);\n\t\t}\n\n\t\treturn out;\n\t};\n\n\tlet withIntraBound = !!_intraBound;\n\n\tlet interBound = new RegExp(_interSplit);\n\tlet intraBound = new RegExp(_intraBound);\n\n\tconst info = (idxs, haystack, needle) => {\n\n\t\tlet [query, parts, contrs] = prepQuery(needle, 1);\n\t\tlet [queryR] = prepQuery(needle, 2);\n\t\tlet partsLen = parts.length;\n\n\t\tlet len = idxs.length;\n\n\t\tlet field = Array(len).fill(0);\n\n\t\tlet info = {\n\t\t\t// idx in haystack\n\t\t\tidx: Array(len),\n\n\t\t\t// start of match\n\t\t\tstart: field.slice(),\n\t\t\t// length of match\n\t\t//\tspan: field.slice(),\n\n\t\t\t// contiguous chars matched\n\t\t\tchars: field.slice(),\n\n\t\t\t// contiguous (no fuzz) and bounded terms (intra=0, lft2/1, rgt2/1)\n\t\t\t// excludes terms that are contiguous but have < 2 bounds (substrings)\n\t\t\tterms: field.slice(),\n\n\t\t\t// cumulative length of unmatched chars (fuzz) within span\n\t\t\tinterIns: field.slice(), // between terms\n\t\t\tintraIns: field.slice(), // within terms\n\n\t\t\t// interLft/interRgt counters\n\t\t\tinterLft2: field.slice(),\n\t\t\tinterRgt2: field.slice(),\n\t\t\tinterLft1: field.slice(),\n\t\t\tinterRgt1: field.slice(),\n\n\t\t\tranges: Array(len),\n\t\t};\n\n\t\t// might discard idxs based on bounds checks\n\t\tlet mayDiscard = interLft == 1 || interRgt == 1;\n\n\t\tlet ii = 0;\n\n\t\tfor (let i = 0; i < idxs.length; i++) {\n\t\t\tlet mhstr = haystack[idxs[i]];\n\n\t\t\t// the matched parts are [full, junk, term, junk, term, junk]\n\t\t\tlet m = mhstr.match(query);\n\n\t\t\t// leading junk\n\t\t\tlet start = m.index + m[1].length;\n\n\t\t\tlet idxAcc = start;\n\t\t//\tlet span = m[0].length;\n\n\t\t\tlet disc = false;\n\t\t\tlet lft2 = 0;\n\t\t\tlet lft1 = 0;\n\t\t\tlet rgt2 = 0;\n\t\t\tlet rgt1 = 0;\n\t\t\tlet chars = 0;\n\t\t\tlet terms = 0;\n\t\t\tlet inter = 0;\n\t\t\tlet intra = 0;\n\n\t\t\tlet refine = [];\n\n\t\t\tfor (let j = 0, k = 2; j < partsLen; j++, k+=2) {\n\t\t\t\tlet group = m[k].toLowerCase();\n\t\t\t\tlet term = parts[j] + contrs[j];\n\t\t\t\tlet termLen = term.length;\n\t\t\t\tlet groupLen = group.length;\n\t\t\t\tlet fullMatch = group == term;\n\n\t\t\t\t// this won't handle the case when an exact match exists across the boundary of the current group and the next junk\n\t\t\t\t// e.g. blob,ob when searching for 'bob' but finding the earlier `blob` (with extra insertion)\n\t\t\t\tif (!fullMatch && m[k+1].length >= termLen) {\n\t\t\t\t\t// probe for exact match in inter junk\n\t\t\t\t\tlet idxOf = m[k+1].toLowerCase().indexOf(term);\n\n\t\t\t\t\tif (idxOf > -1) {\n\t\t\t\t\t\trefine.push(idxAcc, idxOf, termLen);\n\t\t\t\t\t\tidxAcc += refineMatch(m, k, idxOf, termLen);\n\t\t\t\t\t\tgroup = term;\n\t\t\t\t\t\tgroupLen = termLen;\n\t\t\t\t\t\tfullMatch = true;\n\n\t\t\t\t\t\tif (j == 0)\n\t\t\t\t\t\t\tstart = idxAcc;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (mayDiscard || fullMatch) {\n\t\t\t\t\t// does group's left and/or right land on \\b\n\t\t\t\t\tlet lftCharIdx = idxAcc - 1;\n\t\t\t\t\tlet rgtCharIdx = idxAcc + groupLen;\n\n\t\t\t\t\tlet isPre = true;\n\t\t\t\t\tlet isSuf = true;\n\n\t\t\t\t\t// prefix info\n\t\t\t\t\tif (lftCharIdx == -1 || interBound.test(mhstr[lftCharIdx]))\n\t\t\t\t\t\tfullMatch && lft2++;\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (interLft == 2) {\n\t\t\t\t\t\t\tdisc = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (withIntraBound && intraBound.test(mhstr[lftCharIdx] + mhstr[lftCharIdx + 1]))\n\t\t\t\t\t\t\tfullMatch && lft1++;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (interLft == 1) {\n\t\t\t\t\t\t\t\t// regexps are eager, so try to improve the match by probing forward inter junk for exact match at a boundary\n\t\t\t\t\t\t\t\tlet junk = m[k+1];\n\t\t\t\t\t\t\t\tlet junkIdx = idxAcc + groupLen;\n\n\t\t\t\t\t\t\t\tif (junk.length >= termLen) {\n\t\t\t\t\t\t\t\t\tlet idxOf = 0;\n\t\t\t\t\t\t\t\t\tlet found = false;\n\t\t\t\t\t\t\t\t\tlet re = new RegExp(term, 'ig');\n\n\t\t\t\t\t\t\t\t\tlet m2;\n\t\t\t\t\t\t\t\t\twhile (m2 = re.exec(junk)) {\n\t\t\t\t\t\t\t\t\t\tidxOf = m2.index;\n\n\t\t\t\t\t\t\t\t\t\tlet charIdx = junkIdx + idxOf;\n\t\t\t\t\t\t\t\t\t\tlet lftCharIdx = charIdx - 1;\n\n\n\t\t\t\t\t\t\t\t\t\tif (lftCharIdx == -1 || interBound.test(mhstr[lftCharIdx])) {\n\t\t\t\t\t\t\t\t\t\t\tlft2++;\n\t\t\t\t\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (intraBound.test(mhstr[lftCharIdx] + mhstr[charIdx])) {\n\t\t\t\t\t\t\t\t\t\t\tlft1++;\n\t\t\t\t\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (found) {\n\t\t\t\t\t\t\t\t\t\t// identical to exact term refinement pass above\n\t\t\t\t\t\t\t\t\t\trefine.push(idxAcc, idxOf, termLen);\n\t\t\t\t\t\t\t\t\t\tidxAcc += refineMatch(m, k, idxOf, termLen);\n\t\t\t\t\t\t\t\t\t\tgroup = term;\n\t\t\t\t\t\t\t\t\t\tgroupLen = termLen;\n\t\t\t\t\t\t\t\t\t\tfullMatch = true;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tdisc = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tisPre = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// suffix info\n\t\t\t\t\tif (rgtCharIdx == mhstr.length || interBound.test(mhstr[rgtCharIdx]))\n\t\t\t\t\t\tfullMatch && rgt2++;\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (interRgt == 2) {\n\t\t\t\t\t\t\tdisc = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (withIntraBound && intraBound.test(mhstr[rgtCharIdx - 1] + mhstr[rgtCharIdx]))\n\t\t\t\t\t\t\tfullMatch && rgt1++;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (interRgt == 1) {\n\t\t\t\t\t\t\t\tdisc = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tisSuf = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (fullMatch) {\n\t\t\t\t\t\tchars += termLen;\n\n\t\t\t\t\t\tif (isPre && isSuf)\n\t\t\t\t\t\t\tterms++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (groupLen > termLen)\n\t\t\t\t\tintra += groupLen - termLen; // intraFuzz\n\n\t\t\t\tif (j > 0)\n\t\t\t\t\tinter += m[k-1].length; // interFuzz\n\n\t\t\t\t// TODO: group here is lowercased, which is okay for length cmp, but not more case-sensitive filts\n\t\t\t\tif (!opts.intraFilt(term, group, idxAcc)) {\n\t\t\t\t\tdisc = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (j < partsLen - 1)\n\t\t\t\t\tidxAcc += groupLen + m[k+1].length;\n\t\t\t}\n\n\t\t\tif (!disc) {\n\t\t\t\tinfo.idx[ii] = idxs[i];\n\t\t\t\tinfo.interLft2[ii] = lft2;\n\t\t\t\tinfo.interLft1[ii] = lft1;\n\t\t\t\tinfo.interRgt2[ii] = rgt2;\n\t\t\t\tinfo.interRgt1[ii] = rgt1;\n\t\t\t\tinfo.chars[ii] = chars;\n\t\t\t\tinfo.terms[ii] = terms;\n\t\t\t\tinfo.interIns[ii] = inter;\n\t\t\t\tinfo.intraIns[ii] = intra;\n\n\t\t\t\tinfo.start[ii] = start;\n\t\t\t//\tinfo.span[ii] = span;\n\n\t\t\t\t// ranges\n\t\t\t\tlet m = mhstr.match(queryR);\n\t\t\t\tlet ranges = info.ranges[ii] = [];\n\n\t\t\t\tlet idxAcc = m.index + m[1].length;\n\t\t\t\tlet from = idxAcc;\n\t\t\t\tlet to = idxAcc;\n\n\t\t\t\tlet refLen = refine.length;\n\t\t\t\tlet ri = refLen > 0 ? 0 : Infinity;\n\t\t\t\tlet lastRi = refLen - 3;\n\n\t\t\t\tfor (let i = 2; i < m.length; i++) {\n\t\t\t\t\tlet len = m[i].length;\n\n\t\t\t\t\tif (ri <= lastRi && refine[ri] == idxAcc) {\n\t\t\t\t\t\tlet idxInNext = refine[ri+1];\n\t\t\t\t\t\tlet matchLen = refine[ri+2];\n\t\t\t\t\t\tlet offset = idxInNext + matchLen;\n\n\t\t\t\t\t\tidxAcc += len + offset;\n\t\t\t\t\t\tfrom = idxAcc - matchLen;\n\t\t\t\t\t\tm[i+1] = m[i+1].slice(offset);\n\n\t\t\t\t\t\tri+=3;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tidxAcc += len;\n\n\t\t\t\t\tif (i % 2 == 0)\n\t\t\t\t\t\tto = idxAcc;\n\t\t\t\t\telse if (len > 0) {\n\t\t\t\t\t\tranges.push(from, to);\n\t\t\t\t\t\tfrom = to = idxAcc;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (to > from)\n\t\t\t\t\tranges.push(from, to);\n\n\t\t\t\tii++;\n\t\t\t}\n\t\t}\n\n\t\t// trim arrays\n\t\tif (ii < idxs.length) {\n\t\t\tfor (let k in info)\n\t\t\t\tinfo[k] = info[k].slice(0, ii);\n\t\t}\n\n\t\treturn info;\n\t};\n\n\tconst refineMatch = (m, k, idxInNext, termLen) => {\n\t\t// shift the current group into the prior junk\n\t\tlet prepend = m[k] + m[k+1].slice(0, idxInNext);\n\t\tm[k-1] += prepend;\n\t\tm[k] = m[k+1].slice(idxInNext, idxInNext + termLen);\n\t\tm[k+1] = m[k+1].slice(idxInNext + termLen);\n\t\treturn prepend.length;\n\t};\n\n\t// returns [idxs, info, order]\n\tconst _search = (haystack, needle, outOfOrder = false, infoThresh = 1e3, preFiltered) => {\n\t\tlet needles = null;\n\t\tlet matches = null;\n\n\t\tlet negs = [];\n\n\t\tneedle = needle.replace(NEGS_RE, m => {\n\t\t\tnegs.push(m.trim().slice(1));\n\t\t\treturn '';\n\t\t});\n\n\t\tlet negsRe;\n\n\t\tif (negs.length > 0) {\n\t\t\tnegsRe = new RegExp(negs.join('|'), 'i');\n\n\t\t\tif (needle.trim() == '') {\n\t\t\t\tlet idxs = [];\n\n\t\t\t\tfor (let i = 0; i < haystack.length; i++) {\n\t\t\t\t\tif (!negsRe.test(haystack[i]))\n\t\t\t\t\t\tidxs.push(i);\n\t\t\t\t}\n\n\t\t\t\treturn [idxs, null, null];\n\t\t\t}\n\t\t}\n\n\t//\tconsole.log(negs);\n\t//\tconsole.log(needle);\n\n\t\tif (outOfOrder) {\n\t\t\t// since uFuzzy is an AND-based search, we can iteratively pre-reduce the haystack by searching\n\t\t\t// for each term in isolation before running permutations on what's left.\n\t\t\t// this is a major perf win. e.g. searching \"test man ger pp a\" goes from 570ms -> 14ms\n\t\t\tlet terms = split(needle);\n\n\t\t\tif (terms.length > 1) {\n\t\t\t\t// longest -> shortest\n\t\t\t\tlet terms2 = terms.slice().sort((a, b) => b.length - a.length);\n\n\t\t\t\tfor (let ti = 0; ti < terms2.length; ti++) {\n\t\t\t\t\t// no haystack item contained all terms\n\t\t\t\t\tif (preFiltered && preFiltered.length == 0)\n\t\t\t\t\t\treturn [[], null, null];\n\n\t\t\t\t\tpreFiltered = filter(haystack, terms2[ti], preFiltered);\n\t\t\t\t}\n\n\t\t\t\tneedles = permute(terms).map(perm => perm.join(' '));\n\n\t\t\t\t// filtered matches for each needle excluding same matches for prior needles\n\t\t\t\tmatches = [];\n\n\t\t\t\t// keeps track of already-matched idxs to skip in follow-up permutations\n\t\t\t\tlet matchedIdxs = new Set();\n\n\t\t\t\tfor (let ni = 0; ni < needles.length; ni++) {\n\t\t\t\t\tif (matchedIdxs.size < preFiltered.length) {\n\t\t\t\t\t\t// filter further for this needle, exclude already-matched\n\t\t\t\t\t\tlet preFiltered2 = preFiltered.filter(idx => !matchedIdxs.has(idx));\n\n\t\t\t\t\t\tlet matched = filter(haystack, needles[ni], preFiltered2);\n\n\t\t\t\t\t\tfor (let j = 0; j < matched.length; j++)\n\t\t\t\t\t\t\tmatchedIdxs.add(matched[j]);\n\n\t\t\t\t\t\tmatches.push(matched);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tmatches.push([]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// interOR\n\t//\tconsole.log(prepQuery(needle, 1, null, true));\n\n\t\t// non-ooo or ooo w/single term\n\t\tif (needles == null) {\n\t\t\tneedles = [needle];\n\t\t\tmatches = [preFiltered && preFiltered.length > 0 ? preFiltered : filter(haystack, needle)];\n\t\t}\n\n\t\tlet retInfo = null;\n\t\tlet retOrder = null;\n\n\t\tif (negs.length > 0)\n\t\t\tmatches = matches.map(idxs => idxs.filter(idx => !negsRe.test(haystack[idx])));\n\n\t\tlet matchCount = matches.reduce((acc, idxs) => acc + idxs.length, 0);\n\n\t\t// rank, sort, concat\n\t\tif (matchCount <= infoThresh) {\n\t\t\tretInfo = {};\n\t\t\tretOrder = [];\n\n\t\t\tfor (let ni = 0; ni < matches.length; ni++) {\n\t\t\t\tlet idxs = matches[ni];\n\n\t\t\t\tif (idxs == null || idxs.length == 0)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tlet needle = needles[ni];\n\t\t\t\tlet _info = info(idxs, haystack, needle);\n\t\t\t\tlet order = opts.sort(_info, haystack, needle);\n\n\t\t\t\t// offset idxs for concat'ing infos\n\t\t\t\tif (ni > 0) {\n\t\t\t\t\tfor (let i = 0; i < order.length; i++)\n\t\t\t\t\t\torder[i] += retOrder.length;\n\t\t\t\t}\n\n\t\t\t\tfor (let k in _info) {\n\t\t\t\t\tretInfo[k] = (retInfo[k] ? retInfo[k] : []).concat(_info[k]);\n }\n\n\t\t\t\tretOrder = retOrder.concat(order);\n\t\t\t}\n\t\t}\n\n\t\treturn [\n\t\t\t[].concat(...matches),\n\t\t\tretInfo,\n\t\t\tretOrder,\n\t\t];\n\t};\n\n\treturn {\n\t\tsearch: (...args) => {\n\t\t\tlet out = _search(...args);\n\t\t\treturn out;\n\t\t},\n\t\tsplit,\n\t\tfilter,\n\t\tinfo,\n\t\tsort: opts.sort,\n\t};\n}\n\nconst latinize = (() => {\n\tlet accents = {\n\t\tA: 'ÁÀÃÂÄĄ',\n\t\ta: 'áàãâäą',\n\t\tE: 'ÉÈÊËĖ',\n\t\te: 'éèêëę',\n\t\tI: 'ÍÌÎÏĮ',\n\t\ti: 'íìîïį',\n\t\tO: 'ÓÒÔÕÖ',\n\t\to: 'óòôõö',\n\t\tU: 'ÚÙÛÜŪŲ',\n\t\tu: 'úùûüūų',\n\t\tC: 'ÇČ',\n\t\tc: 'çč',\n\t\tN: 'Ñ',\n\t\tn: 'ñ',\n\t\tS: 'Š',\n\t\ts: 'š'\n\t};\n\n\tlet accentsMap = new Map();\n\tlet accentsTpl = '';\n\n\tfor (let r in accents) {\n\t\taccents[r].split('').forEach(a => {\n\t\t\taccentsTpl += a;\n\t\t\taccentsMap.set(a, r);\n\t\t});\n\t}\n\n\tlet accentsRe = new RegExp(`[${accentsTpl}]`, 'g');\n\tlet replacer = m => accentsMap.get(m);\n\n\treturn strings => {\n\t\tif (typeof strings == 'string')\n\t\t\treturn strings.replace(accentsRe, replacer);\n\n\t\tlet out = Array(strings.length);\n\t\tfor (let i = 0; i < strings.length; i++)\n\t\t\tout[i] = strings[i].replace(accentsRe, replacer);\n\t\treturn out;\n\t};\n})();\n\n// https://stackoverflow.com/questions/9960908/permutations-in-javascript/37580979#37580979\nfunction permute(arr) {\n\tarr = arr.slice();\n\n\tlet length = arr.length,\n\t\tresult = [arr.slice()],\n\t\tc = new Array(length).fill(0),\n\t\ti = 1, k, p;\n\n\twhile (i < length) {\n\t\tif (c[i] < i) {\n\t\t\tk = i % 2 && c[i];\n\t\t\tp = arr[i];\n\t\t\tarr[i] = arr[k];\n\t\t\tarr[k] = p;\n\t\t\t++c[i];\n\t\t\ti = 1;\n\t\t\tresult.push(arr.slice());\n\t\t} else {\n\t\t\tc[i] = 0;\n\t\t\t++i;\n\t\t}\n\t}\n\n\treturn result;\n}\n\nconst _mark = (part, matched) => matched ? `${part}` : part;\nconst _append = (acc, part) => acc + part;\n\nfunction highlight(str, ranges, mark = _mark, accum = '', append = _append) {\n let tmp = append(accum, mark(str.substring(0, ranges[0]), false));\n\taccum = tmp !== null ? tmp : accum;\n\n\tfor (let i = 0; i < ranges.length; i+=2) {\n\t\tlet fr = ranges[i];\n\t\tlet to = ranges[i+1];\n\n tmp = append(accum, mark(str.substring(fr, to), true));\n\t\taccum = tmp !== null ? tmp : accum;\n\n\t\tif (i < ranges.length - 3) {\n tmp = append(accum, mark(str.substring(ranges[i + 1], ranges[i + 2]), false));\n accum = tmp !== null ? tmp : accum;\n }\n\t}\n\n tmp = append(accum, mark(str.substring(ranges[ranges.length - 1]), false));\n\taccum = tmp !== null ? tmp : accum;\n\n\treturn accum;\n}\n\nuFuzzy.latinize = latinize;\nuFuzzy.permute = arr => {\n\tlet idxs = permute([...Array(arr.length).keys()]).sort((a,b) => {\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tif (a[i] != b[i])\n\t\t\t\treturn a[i] - b[i];\n\t\t}\n\t\treturn 0;\n\t});\n\n\treturn idxs.map(pi => pi.map(i => arr[i]));\n};\nuFuzzy.highlight = highlight;\n\nexport { uFuzzy as default };\n","import uFuzzy from '@leeoniya/ufuzzy';\n// See https://github.com/leeoniya/uFuzzy#options\nconst uf = new uFuzzy({\n intraMode: 1,\n intraIns: 1,\n intraSub: 1,\n intraTrn: 1,\n intraDel: 1,\n});\nfunction sortCommands(a, b, favouriteCommands, recentCommands) {\n // Sort by recent first\n const aIsRecent = recentCommands.includes(a.id);\n const bIsRecent = recentCommands.includes(b.id);\n if (aIsRecent && !bIsRecent) {\n return -1;\n }\n if (!aIsRecent && bIsRecent) {\n return 1;\n }\n if (aIsRecent && bIsRecent) {\n return recentCommands.indexOf(a.id) - recentCommands.indexOf(b.id);\n }\n // Sort by favourites second\n const aIsFavourite = favouriteCommands.includes(a.id);\n const bIsFavourite = favouriteCommands.includes(b.id);\n if (aIsFavourite && !bIsFavourite) {\n return -1;\n }\n if (!aIsFavourite && bIsFavourite) {\n return 1;\n }\n // Sort by name third\n return a.name.localeCompare(b.name);\n}\nexport default function filterCommands(selectedCommandGroup, searchWord, commands, favourites, recentCommands) {\n // If there is a search word, return all commands to allow deep search\n // If no search word is given, return all commands in the currently selected group or all recent commands if no group is selected\n let availableCommands = Object.values(commands);\n availableCommands = searchWord\n ? availableCommands\n : availableCommands.filter((command) => command.parentId === selectedCommandGroup ||\n (!selectedCommandGroup && recentCommands.includes(command.id)));\n // If there is no search word, return all commands in the current context with favourites first, the recent commands will only be prioritised if we are at the top level\n if (!searchWord) {\n return availableCommands\n .sort((a, b) => sortCommands(a, b, favourites, selectedCommandGroup ? [] : recentCommands))\n .map((command) => command.id);\n }\n // Create a list of all available commands with their name and description as haystack for the search\n const availableCommandNames = availableCommands.map(({ name, description }) => name + ' ' + description);\n const [indices, , order] = uf.search(availableCommandNames, searchWord.toLowerCase());\n const matchingIds = order.map((i) => availableCommands[indices[i]].id);\n // Add all commands that can handle queries to the result, the Set removes duplicates\n return matchingIds;\n}\n","export default function assert(condition, message = 'Assertion failed') {\n if (condition === false)\n throw Error(message);\n}\n","export default function classnames(...args) {\n return args.filter(Boolean).join(' ');\n}\n","import { logger } from '../helpers';\nexport var STATUS;\n(function (STATUS) {\n STATUS[\"COLLAPSED\"] = \"collapsed\";\n STATUS[\"IDLE\"] = \"idle\";\n STATUS[\"EXECUTING_COMMAND\"] = \"executingCommand\";\n STATUS[\"DISPLAYING_RESULT\"] = \"displayingResult\";\n})(STATUS || (STATUS = {}));\nexport var TRANSITION;\n(function (TRANSITION) {\n TRANSITION[\"RESET_SEARCH\"] = \"RESET_SEARCH\";\n TRANSITION[\"HIGHLIGHT_NEXT_ITEM\"] = \"HIGHLIGHT_NEXT_ITEM\";\n TRANSITION[\"HIGHLIGHT_PREVIOUS_ITEM\"] = \"HIGHLIGHT_PREVIOUS_ITEM\";\n TRANSITION[\"CANCEL\"] = \"CANCEL\";\n TRANSITION[\"SELECT_GROUP\"] = \"SELECT_GROUP\";\n TRANSITION[\"GO_TO_PARENT_GROUP\"] = \"GO_TO_PARENT_GROUP\";\n TRANSITION[\"UPDATE_SEARCH\"] = \"UPDATE_SEARCH\";\n TRANSITION[\"UPDATE_COMMAND_QUERY\"] = \"UPDATE_COMMAND_QUERY\";\n TRANSITION[\"EXECUTE_COMMAND\"] = \"EXECUTE_COMMAND\";\n TRANSITION[\"FINISH_COMMAND\"] = \"FINISH_COMMAND\";\n TRANSITION[\"UPDATE_RESULT\"] = \"UPDATE_RESULT\";\n TRANSITION[\"EXPAND\"] = \"EXPAND\";\n TRANSITION[\"ADD_FAVOURITE\"] = \"ADD_FAVOURITE\";\n TRANSITION[\"REMOVE_FAVOURITE\"] = \"REMOVE_FAVOURITE\";\n})(TRANSITION || (TRANSITION = {}));\nexport var ACTION;\n(function (ACTION) {\n ACTION[\"ADD_FAVOURITE\"] = \"ADD_FAVOURITE\";\n ACTION[\"ADD_RECENTLY_USED\"] = \"ADD_RECENTLY_USED\";\n ACTION[\"EXPAND\"] = \"EXPAND\";\n ACTION[\"HIGHLIGHT_NEXT_COMMAND\"] = \"HIGHLIGHT_NEXT_COMMAND\";\n ACTION[\"HIGHLIGHT_NEXT_OPTION\"] = \"HIGHLIGHT_NEXT_OPTION\";\n ACTION[\"HIGHLIGHT_PREVIOUS_COMMAND\"] = \"HIGHLIGHT_PREVIOUS_COMMAND\";\n ACTION[\"HIGHLIGHT_PREVIOUS_OPTION\"] = \"HIGHLIGHT_PREVIOUS_OPTION\";\n ACTION[\"LEAVE_GROUP\"] = \"LEAVE_GROUP\";\n ACTION[\"REFRESH_COMMANDS\"] = \"REFRESH_COMMANDS\";\n ACTION[\"REMOVE_FAVOURITE\"] = \"REMOVE_FAVOURITE\";\n ACTION[\"RESET_HIGHLIGHT\"] = \"RESET_HIGHLIGHT\";\n ACTION[\"RESET_OPTION_HIGHLIGHT\"] = \"RESET_OPTION_HIGHLIGHT\";\n ACTION[\"RESET_SEARCH\"] = \"RESET_SEARCH\";\n ACTION[\"RESET_SEARCH_OR_LEAVE_GROUP\"] = \"RESET_SEARCH_OR_LEAVE_GROUP\";\n ACTION[\"SET_ACTIVE_COMMAND\"] = \"SET_ACTIVE_COMMAND\";\n ACTION[\"SET_COMMAND_QUERY\"] = \"SET_COMMAND_QUERY\";\n ACTION[\"SET_GROUP\"] = \"SET_GROUP\";\n ACTION[\"SET_SEARCH_WORD\"] = \"SET_SEARCH_WORD\";\n ACTION[\"UNSET_ACTIVE_COMMAND\"] = \"UNSET_ACTIVE_COMMAND\";\n ACTION[\"UNSET_RESULT\"] = \"UNSET_RESULT\";\n ACTION[\"UPDATE_RESULT\"] = \"UPDATE_RESULT\";\n})(ACTION || (ACTION = {}));\nexport const machine = {\n initial: STATUS.COLLAPSED,\n states: {\n collapsed: {\n on: {\n UPDATE_SEARCH: {\n target: STATUS.IDLE,\n actions: [ACTION.EXPAND, ACTION.SET_SEARCH_WORD, ACTION.REFRESH_COMMANDS],\n },\n HIGHLIGHT_NEXT_ITEM: {\n target: STATUS.IDLE,\n actions: [ACTION.REFRESH_COMMANDS, ACTION.EXPAND],\n },\n EXPAND: {\n target: STATUS.IDLE,\n actions: [ACTION.REFRESH_COMMANDS, ACTION.EXPAND],\n },\n },\n },\n idle: {\n on: {\n UPDATE_SEARCH: {\n target: STATUS.IDLE,\n actions: [ACTION.SET_SEARCH_WORD, ACTION.RESET_HIGHLIGHT, ACTION.REFRESH_COMMANDS],\n },\n HIGHLIGHT_NEXT_ITEM: {\n target: STATUS.IDLE,\n actions: [ACTION.HIGHLIGHT_NEXT_COMMAND],\n },\n HIGHLIGHT_PREVIOUS_ITEM: {\n target: STATUS.IDLE,\n actions: [ACTION.HIGHLIGHT_PREVIOUS_COMMAND],\n },\n CANCEL: {\n target: STATUS.IDLE,\n actions: [ACTION.RESET_HIGHLIGHT, ACTION.RESET_SEARCH_OR_LEAVE_GROUP, ACTION.REFRESH_COMMANDS],\n },\n EXECUTE_COMMAND: {\n target: STATUS.EXECUTING_COMMAND,\n actions: [ACTION.ADD_RECENTLY_USED, ACTION.SET_ACTIVE_COMMAND, ACTION.REFRESH_COMMANDS],\n },\n GO_TO_PARENT_GROUP: {\n target: STATUS.IDLE,\n actions: [ACTION.RESET_HIGHLIGHT, ACTION.LEAVE_GROUP, ACTION.REFRESH_COMMANDS],\n },\n SELECT_GROUP: {\n target: STATUS.IDLE,\n actions: [ACTION.RESET_SEARCH, ACTION.RESET_HIGHLIGHT, ACTION.SET_GROUP, ACTION.REFRESH_COMMANDS],\n },\n ADD_FAVOURITE: {\n target: STATUS.IDLE,\n actions: [ACTION.ADD_FAVOURITE, ACTION.REFRESH_COMMANDS],\n },\n REMOVE_FAVOURITE: {\n target: STATUS.IDLE,\n actions: [ACTION.REMOVE_FAVOURITE, ACTION.REFRESH_COMMANDS],\n },\n },\n },\n executingCommand: {\n on: {\n UPDATE_RESULT: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.UPDATE_RESULT],\n },\n FINISH_COMMAND: {\n target: STATUS.IDLE,\n actions: [ACTION.UNSET_ACTIVE_COMMAND],\n },\n },\n },\n displayingResult: {\n on: {\n UPDATE_COMMAND_QUERY: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.SET_COMMAND_QUERY],\n },\n UPDATE_RESULT: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.UPDATE_RESULT, ACTION.RESET_OPTION_HIGHLIGHT],\n },\n HIGHLIGHT_NEXT_ITEM: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.HIGHLIGHT_NEXT_OPTION],\n },\n HIGHLIGHT_PREVIOUS_ITEM: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.HIGHLIGHT_PREVIOUS_OPTION],\n },\n EXECUTE_COMMAND: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.SET_ACTIVE_COMMAND],\n },\n CANCEL: {\n target: STATUS.IDLE,\n actions: [ACTION.UNSET_RESULT, ACTION.UNSET_ACTIVE_COMMAND, ACTION.RESET_OPTION_HIGHLIGHT],\n },\n FINISH_COMMAND: {\n target: STATUS.DISPLAYING_RESULT,\n actions: [ACTION.UNSET_ACTIVE_COMMAND],\n },\n },\n },\n },\n};\nexport function transition(state, event, actionCallback) {\n var _a, _b, _c;\n let nextStateNode = (_b = (_a = machine.states[state.status].on) === null || _a === void 0 ? void 0 : _a[event.type]) !== null && _b !== void 0 ? _b : null;\n if (!nextStateNode) {\n logger.error(`No transition found for event \"${event.type}\" in state \"${state.status}\"`);\n nextStateNode = { target: state.status };\n }\n const nextState = {\n ...state,\n status: typeof nextStateNode == 'string' ? nextStateNode : nextStateNode.target,\n };\n if (actionCallback && typeof nextStateNode == 'object') {\n (_c = nextStateNode.actions) === null || _c === void 0 ? void 0 : _c.forEach((action) => actionCallback(action, nextState, event));\n }\n logger.debug(`Transitioned from \"${state.status}\" to \"${nextState.status}\" with event \"${event.type}\"`);\n return nextState;\n}\n","import { assert, clamp, filterCommands } from '../helpers';\nimport { ACTION, TRANSITION, transition } from './commandBarMachine';\nconst MAX_RECENTLY_USED = 5;\nfunction runAction(action, nextState, event) {\n switch (action) {\n case ACTION.RESET_SEARCH:\n nextState.searchWord = '';\n break;\n case ACTION.RESET_HIGHLIGHT:\n nextState.highlightedItem = 0;\n break;\n case ACTION.REFRESH_COMMANDS:\n nextState.availableCommandIds = filterCommands(nextState.selectedCommandGroup, nextState.searchWord, nextState.commands, nextState.favouriteCommands, nextState.recentCommands);\n break;\n case ACTION.HIGHLIGHT_NEXT_COMMAND:\n nextState.highlightedItem = clamp(nextState.highlightedItem + 1, 0, nextState.availableCommandIds.length - 1);\n break;\n case ACTION.HIGHLIGHT_PREVIOUS_COMMAND:\n nextState.highlightedItem = clamp(nextState.highlightedItem - 1, 0, nextState.availableCommandIds.length - 1);\n break;\n case ACTION.HIGHLIGHT_NEXT_OPTION:\n nextState.highlightedOption = clamp(nextState.highlightedOption + 1, 0, Object.keys(nextState.result.options).length - 1);\n break;\n case ACTION.HIGHLIGHT_PREVIOUS_OPTION:\n nextState.highlightedOption = clamp(nextState.highlightedOption - 1, 0, Object.keys(nextState.result.options).length - 1);\n break;\n case ACTION.SET_SEARCH_WORD:\n assert(event.type === TRANSITION.UPDATE_SEARCH);\n nextState.searchWord = event.searchWord;\n break;\n case ACTION.SET_COMMAND_QUERY:\n assert(event.type === TRANSITION.UPDATE_COMMAND_QUERY);\n nextState.commandQuery = event.commandQuery;\n nextState.commandQueryDirty = true;\n break;\n case ACTION.EXPAND:\n nextState.expanded = true;\n break;\n case ACTION.SET_ACTIVE_COMMAND:\n assert(event.type === TRANSITION.EXECUTE_COMMAND);\n nextState.activeCommandId = event.commandId;\n nextState.activeCommandMessage = event.message;\n break;\n case ACTION.UNSET_ACTIVE_COMMAND:\n nextState.activeCommandId = null;\n nextState.activeCommandMessage = null;\n break;\n case ACTION.UPDATE_RESULT:\n assert(event.type === TRANSITION.UPDATE_RESULT);\n assert(typeof event.result.success === 'boolean');\n nextState.result = {\n options: {},\n message: 'Command executed',\n view: null,\n success: false,\n ...event.result,\n };\n nextState.resultCommandId = nextState.activeCommandId;\n nextState.commandQueryDirty = false;\n break;\n case ACTION.RESET_OPTION_HIGHLIGHT:\n nextState.highlightedOption = 0;\n break;\n case ACTION.RESET_SEARCH_OR_LEAVE_GROUP:\n if (nextState.commandQuery) {\n nextState.commandQuery = '';\n }\n else if (nextState.searchWord) {\n nextState.searchWord = '';\n }\n else {\n nextState.selectedCommandGroup = nextState.selectedCommandGroup\n ? nextState.commands[nextState.selectedCommandGroup].parentId\n : null;\n }\n break;\n case ACTION.UNSET_RESULT:\n nextState.result = null;\n nextState.resultCommandId = null;\n nextState.commandQuery = '';\n break;\n case ACTION.LEAVE_GROUP:\n nextState.selectedCommandGroup = nextState.selectedCommandGroup\n ? nextState.commands[nextState.selectedCommandGroup].parentId\n : null;\n break;\n case ACTION.SET_GROUP:\n assert(event.type === TRANSITION.SELECT_GROUP);\n nextState.selectedCommandGroup = event.commandId;\n break;\n case ACTION.ADD_FAVOURITE:\n assert(event.type === TRANSITION.ADD_FAVOURITE);\n if (!nextState.favouriteCommands.includes(event.commandId)) {\n nextState.favouriteCommands = [...nextState.favouriteCommands, event.commandId];\n }\n break;\n case ACTION.REMOVE_FAVOURITE:\n assert(event.type === TRANSITION.REMOVE_FAVOURITE);\n nextState.favouriteCommands = nextState.favouriteCommands.filter((id) => id !== event.commandId);\n break;\n case ACTION.ADD_RECENTLY_USED:\n assert(event.type === TRANSITION.EXECUTE_COMMAND);\n // Only add to recently used if the command has an action\n if (!nextState.commands[event.commandId].action) {\n break;\n }\n if (nextState.recentCommands.includes(event.commandId)) {\n nextState.recentCommands = nextState.recentCommands.filter((id) => id !== event.commandId);\n }\n nextState.recentCommands.unshift(event.commandId);\n if (nextState.recentCommands.length > MAX_RECENTLY_USED) {\n nextState.recentCommands.pop();\n }\n break;\n default:\n throw Error(`Action ${action} not implemented`);\n }\n}\nconst commandBarReducer = (state, event) => {\n return transition(state, event, runAction);\n};\nexport { commandBarReducer };\n","import React from 'react';\nimport * as styles from './IconWrapper.module.css';\nconst IconWrapper = ({ children }) => {\n return React.createElement(\"span\", { className: styles.iconWrap }, children);\n};\nexport default React.memo(IconWrapper);\n","import React from 'react';\nimport { useCommandBarState, useIntl } from '../../state';\nimport * as styles from './Branding.module.css';\nconst Branding = () => {\n const { state: { showBranding }, } = useCommandBarState();\n const { translate } = useIntl();\n if (!showBranding)\n return null;\n return (React.createElement(\"a\", { href: \"https://helzle.it/projects?source=commandbar\", title: translate('CommandBarFooter.branding', 'Made with love by Sebastian Helzle'), target: \"_blank\", rel: \"noreferrer noopener\", className: styles.madeWithLove },\n React.createElement(\"small\", null, translate('CommandBarFooter.brandingSmall', 'Made with love by')),\n React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"18\", height: \"18\", viewBox: \"0 0 180 180\" },\n React.createElement(\"defs\", null,\n React.createElement(\"linearGradient\", { id: \"a\", gradientUnits: \"userSpaceOnUse\", x1: \"280.25\", y1: \"377.003\", x2: \"373.261\", y2: \"377.003\" },\n React.createElement(\"stop\", { offset: \"0\", stopColor: \"#297AAC\" }),\n React.createElement(\"stop\", { offset: \"1\", stopColor: \"#53AADA\" }))),\n React.createElement(\"path\", { d: \"M0 180.017h37.287L71.35 52.898H34.061zM48.717 0l-9.083 33.898h36.675L85.392 0z\", fill: \"#B9B7B3\" }),\n React.createElement(\"path\", { d: \"M335.972 313.444H288.25l-8 28.306h47.691l-28.03 98.813h39.287l34.063-127.119z\", fill: \"url(#a)\", transform: \"translate(-195.462 -260.325)\" }))));\n};\nexport default React.memo(Branding);\n","import React from 'react';\nexport function IconBack() {\n return (React.createElement(\"svg\", { viewBox: \"0 0 448 512\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"m257.5 445.1-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z\" })));\n}\n","import React from 'react';\nexport function IconNeos() {\n return (React.createElement(\"svg\", { viewBox: \"0 0 512 512\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M415.44 512h-95.11L212.12 357.46v91.1L125.69 512H28V29.82L68.47 0h108.05l123.74 176.13V63.45L386.69 0h97.69v461.5zM38.77 35.27V496l72-52.88V194l215.5 307.64h84.79l52.35-38.17h-78.27L69 13zm82.54 466.61 80-58.78v-101l-79.76-114.4v220.94L49 501.89h72.34zM80.63 10.77l310.6 442.57h82.37V10.77h-79.75v317.56L170.91 10.77zM311 191.65l72 102.81V15.93l-72 53v122.72z\" })));\n}\n","import React from 'react';\nexport function IconSpinner() {\n return (React.createElement(\"svg\", { viewBox: \"0 0 512 512\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M288 39.056v16.659c0 10.804 7.281 20.159 17.686 23.066C383.204 100.434 440 171.518 440 256c0 101.689-82.295 184-184 184-101.689 0-184-82.295-184-184 0-84.47 56.786-155.564 134.312-177.219C216.719 75.874 224 66.517 224 55.712V39.064c0-15.709-14.834-27.153-30.046-23.234C86.603 43.482 7.394 141.206 8.003 257.332c.72 137.052 111.477 246.956 248.531 246.667C393.255 503.711 504 392.788 504 256c0-115.633-79.14-212.779-186.211-240.236C302.678 11.889 288 23.456 288 39.056z\" })));\n}\n","import React from 'react';\nexport function IconStar() {\n return (React.createElement(\"svg\", { viewBox: \"0 0 576 512\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M528.1 171.5 382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6zM388.6 312.3l23.7 138.4L288 385.4l-124.3 65.3 23.7-138.4-100.6-98 139-20.2 62.2-126 62.2 126 139 20.2-100.6 98z\" })));\n}\n","import React from 'react';\nexport function IconPlay() {\n return (React.createElement(\"svg\", { viewBox: \"0 0 512 512\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z\" })));\n}\n","import React from 'react';\nexport function IconRepeat() {\n return (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 512 512\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M0 224c0 17.7 14.3 32 32 32s32-14.3 32-32c0-53 43-96 96-96H320v32c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-9.2-9.2-22.9-11.9-34.9-6.9S320 19.1 320 32V64H160C71.6 64 0 135.6 0 224zm512 64c0-17.7-14.3-32-32-32s-32 14.3-32 32c0 53-43 96-96 96H192V352c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V448H352c88.4 0 160-71.6 160-160z\" })));\n}\n","import React from 'react';\nimport { useComputed } from '@preact/signals';\nimport { useCommandBarState } from '../../state';\nimport IconWrapper from '../IconWrapper/IconWrapper';\nimport Branding from './Branding';\nimport { IconNeos, IconSpinner } from '../Icons';\nimport * as styles from './CommandBarFooter.module.css';\nconst CommandBarFooter = () => {\n const { state: { activeCommandId, resultCommandId, activeCommandMessage, commands, result, selectedCommandGroup, expanded, }, Icon, } = useCommandBarState();\n const commandForContext = useComputed(() => {\n var _a, _b;\n const commandId = (_a = activeCommandId.value) !== null && _a !== void 0 ? _a : resultCommandId.value;\n if (!commandId)\n return null;\n // FIXME: This will not be correct when a command and an option in the result have the same id\n return commandId ? (_b = commands.value[commandId]) !== null && _b !== void 0 ? _b : result.value.options[commandId] : null;\n });\n const isRunning = activeCommandId.value !== null;\n if (!expanded.value)\n return null;\n return (React.createElement(\"footer\", { className: styles.commandBarFooter },\n isRunning ? (React.createElement(\"span\", { className: styles.activity },\n React.createElement(IconWrapper, null,\n React.createElement(IconSpinner, null)),\n React.createElement(\"em\", null,\n commandForContext.value.name,\n activeCommandMessage.value ? '﹘' + activeCommandMessage.value : ''))) : commandForContext.value ? (React.createElement(\"span\", { className: styles.breadcrumb },\n React.createElement(Icon, { icon: commandForContext.value.icon }),\n React.createElement(\"small\", null, commandForContext.value.name))) : selectedCommandGroup.value ? (React.createElement(\"span\", { className: styles.breadcrumb },\n React.createElement(Icon, { icon: commands.value[selectedCommandGroup.value].icon }),\n React.createElement(\"small\", null, commands.value[selectedCommandGroup.value].name))) : (React.createElement(IconWrapper, null,\n React.createElement(IconNeos, null))),\n React.createElement(Branding, null)));\n};\nexport default React.memo(CommandBarFooter);\n","import React, { useCallback, useRef } from 'react';\nimport { useSignalEffect } from '@preact/signals';\nimport { useCommandBarState, STATUS, useIntl, useCommandExecutor } from '../../state';\nimport IconWrapper from '../IconWrapper/IconWrapper';\nimport { IconPlay, IconRepeat } from '../Icons';\nimport * as styles from './SearchBox.module.css';\n// Timer helper for debouncing updates of command query results\nlet updateResultsTimer = null;\nconst RESULT_UPDATE_DEBOUNCE_TIME = 500;\nconst SearchBox = () => {\n var _a;\n const { state, actions } = useCommandBarState();\n const { executeCommand } = useCommandExecutor();\n const { translate } = useIntl();\n const inputRef = useRef();\n const activeCommand = state.commands.value[state.activeCommandId.value || state.resultCommandId.value];\n const handleChange = useCallback((e) => {\n var _a;\n if (state.status.value === STATUS.DISPLAYING_RESULT) {\n actions.UPDATE_COMMAND_QUERY(e.target.value);\n // Execute command after a delay if it's not a manual command\n if (!((_a = state.commands.value[state.resultCommandId.value]) === null || _a === void 0 ? void 0 : _a.executeManually)) {\n if (updateResultsTimer) {\n clearTimeout(updateResultsTimer);\n }\n updateResultsTimer = setTimeout(() => executeCommand(state.resultCommandId.value), RESULT_UPDATE_DEBOUNCE_TIME);\n }\n }\n else {\n actions.UPDATE_SEARCH(e.target.value);\n }\n }, []);\n const handleKeyPress = useCallback((e) => {\n // Prevent escape event from bubbling up if the input is focused and the native reset should be used\n if (e.key === 'Escape') {\n if (inputRef.current.value) {\n e.preventDefault();\n e.stopPropagation();\n }\n }\n }, [inputRef.current]);\n // Focus input when the command bar is ready for input\n useSignalEffect(() => {\n var _a;\n if (state.status.value !== STATUS.EXECUTING_COMMAND) {\n (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();\n }\n });\n return (React.createElement(React.Fragment, null,\n React.createElement(\"input\", { ref: inputRef, className: styles.searchBox, type: \"search\", placeholder: state.status.value === STATUS.DISPLAYING_RESULT\n ? translate('SearchBox.commandQuery.placeholder', 'Enter the query for the command')\n : translate('SearchBox.placeholder', 'What do you want to do today?'), disabled: state.status.value === STATUS.DISPLAYING_RESULT && !(activeCommand === null || activeCommand === void 0 ? void 0 : activeCommand.canHandleQueries), autoFocus: true, onChange: handleChange, onKeyUp: handleKeyPress, value: (state.status.value === STATUS.DISPLAYING_RESULT\n ? state.commandQuery\n : state.searchWord), \"data-testid\": \"SearchBox\" }),\n !state.expanded.value && (React.createElement(\"button\", { className: styles.expandButton, onClick: actions.EXPAND, title: translate('SearchBox.expand.title', 'Expand to show all commands') },\n React.createElement(IconWrapper, null,\n React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 320 512\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z\" }))))),\n state.status.value === STATUS.DISPLAYING_RESULT &&\n ((_a = state.commands.value[state.resultCommandId.value]) === null || _a === void 0 ? void 0 : _a.executeManually) &&\n !state.activeCommandId.value && (React.createElement(\"button\", { className: [\n styles.executeButton,\n state.commandQueryDirty.value ? styles.commandQueryDirty : '',\n ].join(' '), onClick: () => executeCommand(state.resultCommandId.value), title: translate('SearchBox.execute.title', 'Execute the command') },\n React.createElement(IconWrapper, null, state.commandQueryDirty.value ? React.createElement(IconPlay, null) : React.createElement(IconRepeat, null))))));\n};\nexport default React.memo(SearchBox);\n","import React from 'react';\nimport { useComputed } from '@preact/signals';\nimport { useCommandBarState, STATUS } from '../../state';\nimport IconWrapper from '../IconWrapper/IconWrapper';\nimport SearchBox from '../SearchBox/SearchBox';\nimport { IconBack } from '../Icons';\nimport * as styles from './CommandBarHeader.module.css';\nconst CommandBarHeader = () => {\n const { state, actions } = useCommandBarState();\n const isDisplayingResults = useComputed(() => state.status.value == STATUS.DISPLAYING_RESULT);\n return (React.createElement(\"header\", { className: styles.commandBarHeader },\n (isDisplayingResults.value || state.selectedCommandGroup.value) && (React.createElement(\"button\", { type: \"button\", onClick: isDisplayingResults.value ? actions.CANCEL : actions.GO_TO_PARENT_GROUP, className: styles.backButton, title: \"Back\" },\n React.createElement(IconWrapper, null,\n React.createElement(IconBack, null)))),\n React.createElement(SearchBox, null)));\n};\nexport default React.memo(CommandBarHeader);\n","import React from 'react';\nimport { useComputed } from '@preact/signals';\nimport { IconWrapper } from '../index';\nimport { classnames } from '../../helpers';\nimport { IconStar } from '../Icons';\nimport * as styles from './CommandListItem.module.css';\nimport { useCommandBarState, useIntl } from '../../state';\nfunction getCommandType({ subCommandIds, category, canHandleQueries, action }, translate) {\n let type = 'command';\n if (category) {\n return category;\n }\n else if ((subCommandIds === null || subCommandIds === void 0 ? void 0 : subCommandIds.length) > 0) {\n type = 'category';\n }\n else if (canHandleQueries) {\n type = 'query';\n }\n else if (typeof action == 'string') {\n type = 'link';\n }\n return translate(`CommandListItem.type.${type}`, type);\n}\nfunction CommandListItem({ command, onItemSelect, highlightedId, onToggleFavourite }) {\n const { state: { favouriteCommands }, Icon, } = useCommandBarState();\n const { translate } = useIntl();\n const { id, name, description, icon, action } = command;\n const commandType = getCommandType(command, translate);\n const isHighlighted = useComputed(() => highlightedId.value === id);\n const isFavourite = useComputed(() => favouriteCommands.value.includes(id));\n return (React.createElement(\"li\", { className: classnames(styles.commandListItem, isHighlighted.value && styles.highlighted), onClick: () => onItemSelect(id), \"data-testid\": \"CommandListItem\" },\n React.createElement(Icon, { icon: icon }),\n React.createElement(\"span\", { className: styles.label },\n React.createElement(\"span\", null, name),\n description && (React.createElement(\"span\", { className: styles.description }, typeof description == 'string' ? description : description()))),\n onToggleFavourite && action && (React.createElement(\"button\", { type: \"button\", className: classnames(styles.favouriteButton, isFavourite.value && styles.isFavourite), title: translate('CommandListItem.toggleFavourite', 'Toggle favourite'), onClick: (e) => {\n e.stopPropagation();\n onToggleFavourite(id);\n } },\n React.createElement(IconWrapper, null,\n React.createElement(IconStar, null)))),\n React.createElement(\"small\", { className: styles.type }, commandType)));\n}\n// Use memo to prevent rerendering of all items when the parent list is updated\nexport default React.memo(CommandListItem);\n","import React, { useCallback } from 'react';\nimport { useComputed, useSignalEffect } from '@preact/signals';\nimport CommandListItem from '../CommandListItem/CommandListItem';\nimport { useCommandBarState, useCommandExecutor, useIntl, STATUS } from '../../state';\nimport { classnames } from '../../helpers';\nimport * as styles from './CommandListing.module.css';\nconst CommandList = () => {\n const { state: { commands, highlightedItem, availableCommandIds, status, searchWord, favouriteCommands, recentCommands, selectedCommandGroup, }, actions: { ADD_FAVOURITE, REMOVE_FAVOURITE }, } = useCommandBarState();\n const { translate } = useIntl();\n const { executeCommand } = useCommandExecutor();\n const navRef = React.useRef(null);\n useSignalEffect(() => {\n var _a, _b;\n (_b = (_a = navRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(`li:nth-child(${highlightedItem.value})`)) === null || _b === void 0 ? void 0 : _b.scrollIntoView({ behavior: 'smooth', block: 'center' });\n });\n const handleToggleFavourite = useCallback((commandId) => {\n if (favouriteCommands.value.includes(commandId)) {\n REMOVE_FAVOURITE(commandId);\n }\n else {\n ADD_FAVOURITE(commandId);\n }\n }, [favouriteCommands]);\n const suggestions = useComputed(() => {\n return searchWord.value || selectedCommandGroup.value\n ? []\n : availableCommandIds.value.filter((commandId) => recentCommands.value.includes(commandId));\n });\n const availableCommands = useComputed(() => {\n return searchWord.value || selectedCommandGroup.value\n ? availableCommandIds.value\n : availableCommandIds.value.filter((commandId) => !recentCommands.value.includes(commandId));\n });\n const highlightedCommand = useComputed(() => availableCommandIds.value[highlightedItem.value]);\n return (React.createElement(\"nav\", { className: classnames(styles.results, status.value !== STATUS.IDLE && styles.disabled), \"data-testid\": \"CommandList\", ref: navRef },\n suggestions.value.length > 0 && (React.createElement(React.Fragment, null,\n React.createElement(\"h6\", null, translate('CommandList.suggestions', 'Recently used')),\n React.createElement(\"ul\", null, suggestions.value.map((commandId) => (React.createElement(CommandListItem, { key: commandId, command: commands.value[commandId], onItemSelect: executeCommand, highlightedId: highlightedCommand, onToggleFavourite: handleToggleFavourite })))))),\n availableCommands.value.length > 0 && (React.createElement(React.Fragment, null,\n React.createElement(\"h6\", null, translate('CommandList.heading', 'Commands')),\n React.createElement(\"ul\", null, availableCommands.value.map((commandId) => (React.createElement(CommandListItem, { key: commandId, command: commands.value[commandId], onItemSelect: executeCommand, highlightedId: highlightedCommand, onToggleFavourite: handleToggleFavourite })))))),\n availableCommandIds.value.length === 0 && (React.createElement(\"small\", { className: styles.noResults }, translate('CommandList.noCommandsMessage', 'No matching commands found')))));\n};\nexport default React.memo(CommandList);\n","import React from 'react';\nimport { useComputed, useSignalEffect } from '@preact/signals';\nimport { useCommandBarState, useCommandExecutor, useIntl } from '../../state';\nimport CommandListItem from '../CommandListItem/CommandListItem';\nimport * as styles from './CommandResultsView.module.css';\nconst CommandResultsView = () => {\n var _a;\n const { state: { result, highlightedOption, activeCommandId }, } = useCommandBarState();\n const { executeCommand } = useCommandExecutor();\n const { translate } = useIntl();\n const navRef = React.useRef(null);\n const highlightedId = useComputed(() => result.value ? Object.values(result.value.options)[highlightedOption.value].id : null);\n const isLoading = activeCommandId.value !== null;\n useSignalEffect(() => {\n var _a, _b;\n const highlightedIndex = highlightedOption.value;\n (_b = (_a = navRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(`li:nth-child(${highlightedIndex})`)) === null || _b === void 0 ? void 0 : _b.scrollIntoView({ behavior: 'smooth', block: 'center' });\n });\n const { options, view, message } = (_a = result.value) !== null && _a !== void 0 ? _a : {};\n return (React.createElement(\"div\", { className: styles.commandResultsView },\n !isLoading && message && React.createElement(\"h6\", { className: styles.message }, message),\n isLoading ? React.createElement(\"div\", null, translate('CommandResultsView.waitingForResults', 'Waiting for results…')) : '',\n !isLoading && view ? React.createElement(\"div\", null, view) : '',\n !isLoading && options && (React.createElement(\"nav\", { className: styles.results, ref: navRef },\n React.createElement(\"ul\", null, Object.keys(options).map((commandId) => (React.createElement(CommandListItem, { key: commandId, command: options[commandId], onItemSelect: executeCommand, highlightedId: highlightedId }))))))));\n};\nexport default CommandResultsView;\n","import React from 'react';\nimport * as styles from './ToggleButton.module.css';\nimport { classnames } from '../../helpers';\nconst ToggleButton = ({ handleToggle, disabled = false, label, title, active }) => {\n return (React.createElement(\"button\", { className: classnames(styles.toggleButton, active && styles.toggleButtonActive), onClick: handleToggle, disabled: disabled, title: title },\n React.createElement(\"span\", null, label),\n React.createElement(\"span\", { className: styles.buttonIcon }, \"\\u2318K\")));\n};\nexport default React.memo(ToggleButton);\n","import React, { createContext, useCallback, useContext, useMemo } from 'react';\nimport { signal, computed } from '@preact/signals';\nimport { commandBarReducer } from './commandBarReducer';\nimport { flattenCommands, logger } from '../helpers';\nimport { STATUS, TRANSITION } from './commandBarMachine';\nimport { IconWrapper } from '../components';\nconst CommandBarContext = createContext({});\nexport const useCommandBarState = () => useContext(CommandBarContext);\n/**\n * Create the app state and initialize it if it does not exist yet\n */\nfunction createAppState(initialState) {\n // Define a signal to hold the state\n const commandBarState = signal(initialState);\n // Define a function to dispatch events to the reducer and its state machine and update the state with the result\n const dispatch = (event) => {\n commandBarState.value = commandBarReducer(commandBarState.value, event);\n };\n // Derive readonly selectors for partial state values\n const activeCommandId = computed(() => commandBarState.value.activeCommandId);\n const activeCommandMessage = computed(() => commandBarState.value.activeCommandMessage);\n const availableCommandIds = computed(() => commandBarState.value.availableCommandIds);\n const commandQuery = computed(() => commandBarState.value.commandQuery);\n const commandQueryDirty = computed(() => commandBarState.value.commandQueryDirty);\n const commands = computed(() => commandBarState.value.commands);\n const expanded = computed(() => commandBarState.value.expanded);\n const favouriteCommands = computed(() => commandBarState.value.favouriteCommands);\n const highlightedItem = computed(() => commandBarState.value.highlightedItem);\n const highlightedOption = computed(() => commandBarState.value.highlightedOption);\n const recentCommands = computed(() => commandBarState.value.recentCommands);\n const result = computed(() => commandBarState.value.result);\n const resultCommandId = computed(() => commandBarState.value.resultCommandId);\n const searchWord = computed(() => commandBarState.value.searchWord);\n const selectedCommandGroup = computed(() => commandBarState.value.selectedCommandGroup);\n const showBranding = computed(() => commandBarState.value.showBranding);\n const status = computed(() => commandBarState.value.status);\n return {\n state: {\n activeCommandId,\n activeCommandMessage,\n availableCommandIds,\n commandQuery,\n commandQueryDirty,\n commands,\n expanded,\n favouriteCommands,\n highlightedItem,\n highlightedOption,\n recentCommands,\n result,\n resultCommandId,\n searchWord,\n selectedCommandGroup,\n showBranding,\n status,\n },\n dispatch,\n };\n}\nexport const CommandBarStateProvider = ({ commands, children, IconComponent, userPreferences, }) => {\n const { state, dispatch } = useMemo(() => {\n return createAppState({\n activeCommandId: null,\n activeCommandMessage: null,\n availableCommandIds: Object.keys(commands),\n commandQuery: '',\n commandQueryDirty: false,\n commands: flattenCommands(commands),\n expanded: false,\n favouriteCommands: userPreferences.favouriteCommands,\n highlightedItem: 0,\n highlightedOption: 0,\n recentCommands: userPreferences.recentCommands,\n result: null,\n resultCommandId: null,\n searchWord: '',\n selectedCommandGroup: null,\n showBranding: userPreferences.showBranding,\n status: STATUS.COLLAPSED,\n });\n }, []);\n // Provide all actions as shorthand functions\n const actions = useMemo(() => {\n return {\n [TRANSITION.RESET_SEARCH]: () => dispatch({ type: TRANSITION.RESET_SEARCH }),\n [TRANSITION.HIGHLIGHT_NEXT_ITEM]: () => dispatch({ type: TRANSITION.HIGHLIGHT_NEXT_ITEM }),\n [TRANSITION.HIGHLIGHT_PREVIOUS_ITEM]: () => dispatch({ type: TRANSITION.HIGHLIGHT_PREVIOUS_ITEM }),\n [TRANSITION.CANCEL]: () => dispatch({ type: TRANSITION.CANCEL }),\n [TRANSITION.SELECT_GROUP]: (commandId) => dispatch({ type: TRANSITION.SELECT_GROUP, commandId }),\n [TRANSITION.GO_TO_PARENT_GROUP]: () => dispatch({ type: TRANSITION.GO_TO_PARENT_GROUP }),\n [TRANSITION.UPDATE_SEARCH]: (searchWord) => dispatch({ type: TRANSITION.UPDATE_SEARCH, searchWord }),\n [TRANSITION.UPDATE_COMMAND_QUERY]: (commandQuery) => dispatch({ type: TRANSITION.UPDATE_COMMAND_QUERY, commandQuery }),\n [TRANSITION.EXECUTE_COMMAND]: async (commandId, message) => {\n dispatch({\n type: TRANSITION.EXECUTE_COMMAND,\n commandId,\n message,\n });\n // Update recent commands in the user preferences when a command is executed\n return userPreferences\n .addRecentCommand(commandId)\n .catch((e) => logger.error('Could not add recent command', e));\n },\n [TRANSITION.FINISH_COMMAND]: () => dispatch({ type: TRANSITION.FINISH_COMMAND }),\n [TRANSITION.UPDATE_RESULT]: (result) => dispatch({ type: TRANSITION.UPDATE_RESULT, result }),\n [TRANSITION.EXPAND]: () => dispatch({ type: TRANSITION.EXPAND }),\n [TRANSITION.ADD_FAVOURITE]: (commandId) => {\n dispatch({ type: TRANSITION.ADD_FAVOURITE, commandId });\n return userPreferences\n .setFavouriteCommands(state.favouriteCommands.value)\n .catch((e) => logger.error('Could not update favourite commands', e));\n },\n [TRANSITION.REMOVE_FAVOURITE]: (commandId) => {\n dispatch({ type: TRANSITION.REMOVE_FAVOURITE, commandId });\n return userPreferences\n .setFavouriteCommands(state.favouriteCommands.value)\n .catch((e) => logger.error('Could not update favourite commands', e));\n },\n };\n }, []);\n const Icon = useCallback(({ icon, spin = false }) => {\n return (React.createElement(IconWrapper, null,\n React.createElement(IconComponent, { icon: icon, spin: spin })));\n }, []);\n return React.createElement(CommandBarContext.Provider, { value: { state, actions, Icon } }, children);\n};\n","import React, { useCallback, useEffect } from 'react';\nimport useFunctionRef from '../hooks/useFunctionRef';\nimport { useCommandBarState } from './CommandBarStateProvider';\nimport { assert, logger } from '../helpers';\nimport { STATUS } from './commandBarMachine';\nconst CommandInputContext = React.createContext({});\nexport const useCommandExecutor = () => React.useContext(CommandInputContext);\n/**\n * Context provider for the command bar input and command execution\n */\nexport const CommandBarExecutor = ({ children, toggleOpen, dialogRef, open }) => {\n const { state, actions } = useCommandBarState();\n const handleKeyEnteredRef = useFunctionRef((e) => {\n if (!open || e.defaultPrevented) {\n return;\n }\n if (e.key === 'k' && (e.metaKey || e.ctrlKey) && (dialogRef === null || dialogRef === void 0 ? void 0 : dialogRef.current.contains(e.target))) {\n // Close command bar\n toggleOpen();\n e.stopPropagation();\n e.preventDefault();\n }\n else if (e.key === 'Escape') {\n // Cancel search, or selection, or close command bar\n e.stopPropagation();\n e.preventDefault();\n if (state.selectedCommandGroup.value ||\n state.searchWord.value ||\n state.commandQuery.value ||\n state.result.value) {\n actions.CANCEL();\n }\n else {\n // Close command bar if cancel is noop\n toggleOpen();\n }\n }\n else if (e.key === 'ArrowDown') {\n // Navigate to next command\n e.stopPropagation();\n e.preventDefault();\n actions.HIGHLIGHT_NEXT_ITEM();\n }\n else if (e.key === 'ArrowUp') {\n // Navigate to previous command\n e.stopPropagation();\n e.preventDefault();\n actions.HIGHLIGHT_PREVIOUS_ITEM();\n }\n else if (e.key === 'Enter') {\n // Execute highlighted command\n e.stopPropagation();\n e.preventDefault();\n // Select the highlighted command by default\n let commandId = state.availableCommandIds.value[state.highlightedItem.value];\n if (state.status.value === STATUS.DISPLAYING_RESULT) {\n // If there are options the command to execute is the highlighted option\n if (!state.commandQueryDirty.value && Object.values(state.result.value.options).length) {\n commandId = Object.keys(state.result.value.options)[state.highlightedOption.value];\n }\n else {\n // If there are no options we run the command which generated the result again\n commandId = state.resultCommandId.value;\n }\n }\n if (commandId) {\n void executeCommand(commandId);\n }\n }\n });\n const executeCommand = useCallback(async (commandId) => {\n var _a, _b, _c;\n const command = (_b = (_a = state.result.value) === null || _a === void 0 ? void 0 : _a.options[commandId]) !== null && _b !== void 0 ? _b : state.commands.value[commandId];\n const { action, canHandleQueries, subCommandIds, name } = command;\n // If the command is a group, select it\n if ((subCommandIds === null || subCommandIds === void 0 ? void 0 : subCommandIds.length) > 0) {\n actions.SELECT_GROUP(commandId);\n return;\n }\n assert(action, `Command ${commandId} has no action`);\n // If the command is a url, open it\n if (typeof action == 'string') {\n // We wait for the state change to be finished before opening the url\n await actions.EXECUTE_COMMAND(commandId, 'Loading url');\n // We need to check if the url is in the same domain, otherwise we need to open it in a new tab\n // TODO: We should add another option to a link command to define its target\n if (action.indexOf('http') === 0 && action.indexOf(document.location.origin) !== 0) {\n (_c = window.open(action, '_blank', 'noopener,noreferrer')) === null || _c === void 0 ? void 0 : _c.focus();\n }\n else {\n window.location.href = action;\n }\n return actions.FINISH_COMMAND();\n }\n // If the command is a function, execute it\n actions.EXECUTE_COMMAND(commandId, 'Running command');\n const actionResult = action(canHandleQueries ? state.commandQuery.value : undefined);\n if (actionResult.then) {\n // Handle Promises\n actionResult\n .then((result) => {\n if (result && !result.success) {\n throw new Error(`The command \"${name}\" failed`);\n }\n })\n .catch((error) => {\n // TODO: Show an error message to the user\n logger.error('Command error', name, error);\n })\n .finally(() => {\n actions.FINISH_COMMAND();\n });\n }\n else if (actionResult.next) {\n // Handle generators\n const generator = actionResult;\n // TODO: Handle errors / success === false\n for await (const result of generator) {\n actions.UPDATE_RESULT(result);\n }\n actions.FINISH_COMMAND();\n }\n else {\n logger.error('Command result is not a promise or generator', actionResult);\n }\n if (command.closeOnExecute) {\n toggleOpen();\n }\n }, [state.searchWord, state.commands, state.result]);\n const executeCommandRef = useFunctionRef((commandId) => {\n void executeCommand(commandId);\n });\n /**\n * Add key event handler, needs to be updated when any parameter for the key event handler changes\n */\n useEffect(() => {\n if (!open)\n return;\n // const guestFrame = document.getElementsByName('neos-content-main')[0] as HTMLIFrameElement;\n // guestFrame.contentWindow?.addEventListener('keyup', (e) => {\n // log.debug('keypress in guestframe', e);\n // });\n // log.debug('guestFrame', guestFrame.contentWindow);\n const windowKeyEventHandler = (e) => handleKeyEnteredRef.current(e);\n window.addEventListener('keydown', windowKeyEventHandler);\n return () => window.removeEventListener('keydown', windowKeyEventHandler);\n }, [open]);\n return (React.createElement(CommandInputContext.Provider, { value: { executeCommand: executeCommandRef.current } }, children));\n};\n","import React, { createContext, useContext } from 'react';\nexport const IntlContext = createContext({});\nexport const useIntl = () => useContext(IntlContext);\nexport const IntlProvider = ({ translate, children }) => {\n return React.createElement(IntlContext.Provider, { value: { translate } }, children);\n};\n","import React, { useCallback, useEffect, useRef } from 'react';\nimport { batch, useComputed, useSignal } from '@preact/signals';\nimport { CommandBarFooter, CommandBarHeader, CommandList, CommandResultsView } from '../index';\nimport { CommandBarExecutor, useCommandBarState } from '../../state';\nimport { clamp, classnames } from '../../helpers';\nimport * as styles from './CommandBarDialog.module.css';\nconst CommandBarDialog = ({ onDrag, open, toggleOpen }) => {\n const { state: { expanded, result }, } = useCommandBarState();\n const dialogRef = useRef(null);\n const isDragging = useSignal(false);\n const dialogPosition = useSignal({\n left: window.innerWidth / 2 - 300,\n top: window.innerHeight / 2 - 20,\n });\n const dragStateOffset = useSignal({\n offsetLeft: 0,\n offsetTop: 0,\n });\n const hasBeenDragged = useSignal(false);\n const dialogStyle = useComputed(() => {\n const { left, top } = dialogPosition.value;\n return (hasBeenDragged.value\n ? {\n left: left + 'px',\n top: top + 'px',\n translate: 'none',\n visibility: isDragging.value ? 'hidden' : 'visible',\n }\n : {});\n });\n const reposition = useCallback((left, top) => {\n const dialogSize = dialogRef.current.getBoundingClientRect();\n dialogPosition.value = {\n left: clamp(left, 0, window.innerWidth - dialogSize.width),\n top: clamp(top, 0, window.innerHeight - dialogSize.height),\n };\n }, []);\n const handleDragStart = useCallback((e) => {\n // @ts-ignore\n if (e.target.tagName === 'INPUT') {\n return;\n }\n console.debug('dragstart');\n e.dataTransfer.setData('text/plain', 'CommandBar');\n e.dataTransfer.dropEffect = 'move';\n e.dataTransfer.effectAllowed = 'move';\n batch(() => {\n dragStateOffset.value = {\n offsetLeft: e.clientX - dialogRef.current.offsetLeft,\n offsetTop: e.clientY - dialogRef.current.offsetTop,\n };\n hasBeenDragged.value = true;\n });\n onDrag && onDrag(true);\n }, [dialogRef.current]);\n const handleDragDrop = useCallback((e) => {\n const { clientX, clientY } = e;\n console.debug('dragdrop', clientX, clientY, dragStateOffset.value);\n batch(() => {\n isDragging.value = false;\n reposition(clientX - dragStateOffset.value.offsetLeft, clientY - dragStateOffset.value.offsetTop);\n });\n onDrag && onDrag(false);\n }, [dialogRef.current]);\n const onResize = useCallback(() => reposition(dialogPosition.value.left, dialogPosition.value.top), []);\n useEffect(() => {\n var _a, _b;\n if (!open)\n return;\n (_b = (_a = dialogRef.current) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.addEventListener('drop', handleDragDrop);\n window.addEventListener('resize', onResize);\n return () => {\n var _a, _b;\n (_b = (_a = dialogRef.current) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.removeEventListener('drop', handleDragDrop);\n window.removeEventListener('resize', onResize);\n };\n }, [open, onResize, handleDragDrop]);\n if (!open) {\n return null;\n }\n return (React.createElement(\"dialog\", { ref: dialogRef, className: classnames(styles.commandBar, result.value && styles.hasResults), open: open, draggable: true, onDragStart: handleDragStart, onDrag: () => (isDragging.value = true), style: dialogStyle.value, \"data-testid\": \"CommandBarDialog\" },\n React.createElement(CommandBarExecutor, { toggleOpen: toggleOpen, dialogRef: dialogRef, open: open },\n React.createElement(CommandBarHeader, null),\n React.createElement(\"div\", { className: classnames(styles.resultsWrap, expanded.value && styles.expanded) },\n expanded.value && !result.value && React.createElement(CommandList, null),\n result.value && React.createElement(CommandResultsView, null)),\n React.createElement(CommandBarFooter, null))));\n};\nexport default CommandBarDialog;\n","import React from 'react';\nimport { CommandBarStateProvider, IntlProvider } from './state';\nimport CommandBarDialog from './components/CommandBarDialog/CommandBarDialog';\nconst CommandBar = ({ commands, open, toggleOpen, onDrag, IconComponent, userPreferences, translate, }) => {\n return (React.createElement(IntlProvider, { translate: translate },\n React.createElement(CommandBarStateProvider, { commands: commands, IconComponent: IconComponent, userPreferences: userPreferences },\n React.createElement(CommandBarDialog, { onDrag: onDrag, open: open, toggleOpen: toggleOpen }))));\n};\nexport default CommandBar;\n","export async function fetchData(endpoint, params, method = 'GET') {\n if (params && method === 'GET') {\n endpoint = Object.keys(params).reduce((url, key) => {\n return url + '&' + key + '=' + encodeURIComponent(params[key]);\n }, endpoint + '?');\n }\n return fetch(endpoint, {\n method,\n credentials: 'include',\n body: params && method === 'POST' ? JSON.stringify(params) : undefined,\n headers: {\n // FIXME: Include CSRF Token\n // 'X-Flow-Csrftoken': csrfToken,\n 'Content-Type': 'application/json',\n Accept: 'application/json',\n },\n }).then((response) => {\n var _a;\n if (response.status !== 200) {\n throw new Error(`The request failed with code ${response.status}: \"${response.statusText}\"`);\n }\n if ((_a = response.headers.get('Content-Type')) === null || _a === void 0 ? void 0 : _a.includes('application/json')) {\n return response.json();\n }\n return response.text();\n });\n}\n","import { fetchData } from './fetch';\nconst ENDPOINT_GET_PREFERENCES = '/neos/shel-neos-commandbar/preferences/getpreferences';\nconst ENDPOINT_SET_FAVOURITE_COMMANDS = '/neos/shel-neos-commandbar/preferences/setfavourites';\nconst ENDPOINT_ADD_RECENT_COMMAND = '/neos/shel-neos-commandbar/preferences/addrecentcommand';\nconst ENDPOINT_ADD_RECENT_DOCUMENT = '/neos/shel-neos-commandbar/preferences/addrecentdocument';\nasync function setPreference(endpoint, data) {\n return fetchData(endpoint, data, 'POST');\n}\nexport async function getPreferences() {\n return fetchData(ENDPOINT_GET_PREFERENCES);\n}\nexport async function setFavouriteCommands(commandIds) {\n return setPreference(ENDPOINT_SET_FAVOURITE_COMMANDS, { commandIds });\n}\nexport async function addRecentCommand(commandId) {\n // TODO: Check if sendBeacon is a better option here to reduce the impact on the user\n return setPreference(ENDPOINT_ADD_RECENT_COMMAND, { commandId });\n}\nexport async function addRecentDocument(nodeContextPath) {\n // TODO: Check if sendBeacon is a better option here to reduce the impact on the user\n return setPreference(ENDPOINT_ADD_RECENT_DOCUMENT, { nodeContextPath });\n}\n","import { fetchData } from './fetch';\nconst ENDPOINT_COMMANDS = '/neos/service/data-source/shel-neos-commandbar-commands';\nexport async function getCommands() {\n return fetchData(ENDPOINT_COMMANDS);\n}\n","import { fetchData } from './fetch';\nconst ENDPOINT_SEARCH_NEOS_DOCS = '/neos/service/data-source/shel-neos-commandbar-search-neos-docs';\nexport async function searchNeosDocs(query) {\n return query ? fetchData(ENDPOINT_SEARCH_NEOS_DOCS, { query }) : {};\n}\n","import { fetchData } from './fetch';\nconst ENDPOINT_SEARCH_NEOS_PACKAGES = '/neos/service/data-source/shel-neos-commandbar-search-neos-packages';\nexport async function searchNeosPackages(query) {\n return query ? fetchData(ENDPOINT_SEARCH_NEOS_PACKAGES, { query }) : {};\n}\n","import { fetchData } from './fetch';\nconst ENDPOINT_SEARCH_NODES = 'service/data-source/shel-neos-commandbar-search-nodes';\nexport async function searchNodes(query, node) {\n return query\n ? fetchData(ENDPOINT_SEARCH_NODES, {\n query,\n node,\n })\n : [];\n}\n","import * as React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\n// Neos dependencies are provided by the UI\n// @ts-ignore\nimport { neos } from '@neos-project/neos-ui-decorators';\n// @ts-ignore\nimport { selectors, actions } from '@neos-project/neos-ui-redux-store';\nimport { Icon } from '@neos-project/react-ui-components';\nimport { CommandBar, logger, ToggleButton, classnames } from '@neos-commandbar/commandbar';\nimport { CommandsApi, PreferencesApi, DocumentationApi, NodesApi, PackagesApi } from '@neos-commandbar/neos-api';\nimport { actions as commandBarActions, selectors as commandBarSelectors } from './actions';\nimport * as styles from './CommandBarUiPlugin.module.css';\nimport * as theme from '@neos-commandbar/commandbar/src/Theme.module.css';\nimport { addRecentDocument } from '@neos-commandbar/neos-api/src/preferences';\nconst IconComponent = ({ icon, spin = false }) => React.createElement(Icon, { icon: icon, spin: spin });\nclass CommandBarUiPlugin extends React.PureComponent {\n constructor(props) {\n super(props);\n this.buildCommandsFromHotkeys = () => {\n const { hotkeyRegistry, handleHotkeyAction, config } = this.props;\n const hotkeys = hotkeyRegistry.getAllAsList();\n return hotkeys.reduce((carry, { id, description, action }) => {\n if (!config.hotkeys.filter.includes(id)) {\n carry[id] = {\n name: description,\n description: id,\n icon: this.mapHotkeyIdToIcon(id),\n action: async () => void handleHotkeyAction(action()),\n closeOnExecute: true,\n };\n }\n return carry;\n }, {});\n };\n this.buildCommandsFromWorkspaces = () => {\n const { allowedTargetWorkspaces } = this.props.neos.configuration;\n return Object.keys(allowedTargetWorkspaces).reduce((carry, workspaceName) => {\n const workspace = allowedTargetWorkspaces[workspaceName];\n if (workspace.readonly) {\n return carry;\n }\n carry[workspaceName] = {\n name: workspace.title,\n description: workspace.description,\n icon: 'cube',\n action: async () => {\n this.props.changeBaseWorkspaceAction(workspace.name);\n },\n closeOnExecute: true,\n };\n return carry;\n }, {});\n };\n this.buildCommandsFromEditPreviewModes = () => {\n const { setEditPreviewMode, editPreviewModes, i18nRegistry } = this.props;\n return Object.keys(editPreviewModes).reduce((carry, mode) => {\n const { title, isEditingMode } = editPreviewModes[mode];\n carry[mode] = {\n name: i18nRegistry.translate(title),\n description: () => this.props.editPreviewMode === mode\n ? this.translate('CommandBarUiPlugin.command.switchEditPreviewMode.active', 'Currently active')\n : '',\n icon: isEditingMode ? 'pencil' : 'eye',\n action: async () => setEditPreviewMode(mode),\n };\n return carry;\n }, {});\n };\n this.handleAddNode = async () => {\n const { addNode, documentNode, focusedNodeContextPath, toggleCommandBar } = this.props;\n toggleCommandBar();\n addNode(focusedNodeContextPath || documentNode.contextPath, undefined, 'after');\n };\n this.showRecentDocuments = async function* () {\n const { recentDocuments } = this.state;\n const { setActiveContentCanvasContextPath, setActiveContentCanvasSrc } = this.props;\n if (!recentDocuments.length) {\n yield {\n success: false,\n message: this.translate('CommandBarUiPlugin.command.searchDocuments.searchFailed', 'Search failed'),\n };\n }\n else {\n yield {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.recentDocuments.options', 'Recent documents'),\n options: recentDocuments.reduce((carry, { name, contextPath, uri, icon }) => {\n carry[contextPath] = {\n id: contextPath,\n name,\n icon,\n action: async () => {\n setActiveContentCanvasSrc(uri);\n setActiveContentCanvasContextPath(contextPath);\n },\n closeOnExecute: true,\n };\n return carry;\n }, {}),\n };\n }\n };\n this.handleSearchNode = async function* (query) {\n const { siteNode, setActiveContentCanvasSrc } = this.props;\n yield {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.searchDocuments.searching', { query }),\n };\n let error;\n const results = await NodesApi.searchNodes(query, siteNode.contextPath).catch((e) => {\n logger.error('Could not search nodes', e);\n error = e.message;\n });\n if (!results) {\n yield {\n success: false,\n message: this.translate('CommandBarUiPlugin.command.searchDocuments.searchFailed', 'Search failed'),\n view: error,\n };\n }\n else {\n yield {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.searchDocuments.matches', {\n matches: results.length,\n }),\n options: results.reduce((carry, { name, nodetype, contextPath, uri, icon }) => {\n if (!uri) {\n // TODO: Show hint that document cannot be opened or filter them remotely already?\n return carry;\n }\n carry[contextPath] = {\n id: contextPath,\n name,\n category: nodetype,\n action: async () => {\n setActiveContentCanvasSrc(uri);\n },\n closeOnExecute: true,\n icon,\n };\n return carry;\n }, {}),\n };\n }\n };\n this.handleSearchNeosDocs = async function* (query) {\n yield {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.documentation.searching', { query }, `Search for \"${query}\"`),\n };\n let error;\n const options = await DocumentationApi.searchNeosDocs(query).catch((e) => {\n logger.error('Could not search Neos docs', e);\n error = e.message;\n });\n if (error || !options) {\n yield {\n success: false,\n message: this.translate('CommandBarUiPlugin.command.documentation.error', 'Search failed'),\n view: error,\n };\n }\n else {\n yield {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.documentation.matches', { matches: Object.keys(options).length }, `${Object.values(options).length} options match your query`),\n options,\n };\n }\n };\n this.handleSearchNeosPackages = async function* (query) {\n yield {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.packages.searching', { query }, `Search for \"${query}\"`),\n };\n let error;\n const options = await PackagesApi.searchNeosPackages(query).catch((e) => {\n logger.error('Could not search Neos packages', e);\n error = e.message;\n });\n if (error || !options) {\n yield {\n success: false,\n message: this.translate('CommandBarUiPlugin.command.packages.error', 'Search failed'),\n view: error,\n };\n }\n else {\n yield {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.packages.matches', { matches: Object.values(options).length }, `${Object.values(options).length} options match your query`),\n options,\n };\n }\n };\n this.handlePublish = async () => {\n const { publishableNodesInDocument, publishAction, baseWorkspace } = this.props;\n publishAction(publishableNodesInDocument.map((node) => node.contextPath), baseWorkspace);\n return {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.publish.success', { count: publishableNodesInDocument.length }, `Published ${publishableNodesInDocument.length} changes`),\n };\n };\n this.handlePublishAll = async () => {\n const { publishableNodes, publishAction, baseWorkspace } = this.props;\n publishAction(publishableNodes.map((node) => node.contextPath), baseWorkspace);\n return {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.publishAll.success', { count: publishableNodes.length }, `Published ${publishableNodes.length} changes`),\n };\n };\n this.handleDiscard = async () => {\n const { publishableNodesInDocument, discardAction } = this.props;\n discardAction(publishableNodesInDocument.map((node) => node.contextPath));\n return {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.discard.success', { count: publishableNodesInDocument.length }, `Discarded ${publishableNodesInDocument.length} changes`),\n };\n };\n this.handleDiscardAll = async () => {\n const { publishableNodes, discardAction } = this.props;\n discardAction(publishableNodes.map((node) => node.contextPath));\n return {\n success: true,\n message: this.translate('CommandBarUiPlugin.command.discardAll.success', { count: publishableNodes.length }, `Discarded ${publishableNodes.length} changes`),\n };\n };\n this.setDragging = (dragging) => {\n this.setState({ ...this.state, dragging });\n };\n this.translate = (id, paramsOrFallback, fallback) => {\n if (typeof paramsOrFallback === 'string') {\n fallback = paramsOrFallback;\n paramsOrFallback = {};\n }\n return this.props.i18nRegistry.translate(id, fallback, paramsOrFallback, 'Shel.Neos.CommandBar', 'Main');\n };\n this.state = {\n loaded: false,\n dragging: false,\n favouriteCommands: [],\n recentCommands: [],\n recentDocuments: [],\n showBranding: true,\n commands: {\n addNode: {\n name: this.translate('CommandBarUiPlugin.command.addNode', 'Add content'),\n icon: 'plus',\n description: this.translate('CommandBarUiPlugin.command.addNode.description', 'Add new content'),\n action: this.handleAddNode,\n },\n searchDocuments: {\n name: this.translate('CommandBarUiPlugin.command.searchDocuments', 'Search documents'),\n icon: 'search',\n description: this.translate('CommandBarUiPlugin.command.searchDocuments.description', 'Search and navigate to documents'),\n action: this.handleSearchNode.bind(this),\n canHandleQueries: true,\n },\n switchWorkspace: {\n name: this.translate('CommandBarUiPlugin.command.switchWorkspace', 'Switch workspace'),\n icon: 'exchange-alt',\n description: this.translate('CommandBarUiPlugin.command.switchWorkspace.description', 'Switch to another workspace'),\n subCommands: this.buildCommandsFromWorkspaces(),\n },\n publishDiscard: {\n name: this.translate('CommandBarUiPlugin.command.publishDiscard', 'Publish / discard'),\n description: this.translate('CommandBarUiPlugin.command.publishDiscard.description', 'Publish or discard changes'),\n icon: 'check',\n subCommands: {\n publish: {\n name: this.translate('CommandBarUiPlugin.command.publish', 'Publish'),\n description: this.translate('CommandBarUiPlugin.command.publish.description', 'Publish changes in this document'),\n icon: 'check',\n action: this.handlePublish,\n },\n publishAll: {\n name: this.translate('CommandBarUiPlugin.command.publishAll', 'Publish all'),\n description: this.translate('CommandBarUiPlugin.command.publishAll.description', 'Publish changes in all documents'),\n icon: 'check-double',\n action: this.handlePublishAll,\n },\n discard: {\n name: this.translate('CommandBarUiPlugin.command.discard', 'Discard'),\n description: this.translate('CommandBarUiPlugin.command.discard.description', 'Discard changes in the current document'),\n icon: 'ban',\n action: this.handleDiscard,\n },\n discardAll: {\n name: this.translate('CommandBarUiPlugin.command.discardAll', 'Discard all'),\n description: this.translate('CommandBarUiPlugin.command.discardAll.description', 'Discard changes in all documents'),\n icon: 'ban',\n action: this.handleDiscardAll,\n },\n },\n },\n quickActions: {\n name: this.translate('CommandBarUiPlugin.command.quickActions', 'Quick actions'),\n icon: 'keyboard',\n description: this.translate('CommandBarUiPlugin.command.quickActions.description', 'Execute hotkeys'),\n subCommands: this.buildCommandsFromHotkeys(),\n },\n switchEditPreviewMode: {\n name: this.translate('CommandBarUiPlugin.command.switchEditPreviewMode', 'Switch edit/preview mode'),\n icon: 'pencil',\n description: this.translate('CommandBarUiPlugin.command.switchEditPreviewMode.description', 'Switch between edit and preview modes'),\n subCommands: this.buildCommandsFromEditPreviewModes(),\n },\n openPreview: {\n name: this.translate('CommandBarUiPlugin.command.openPreview', 'Open preview'),\n description: this.translate('CommandBarUiPlugin.command.openPreview.description', 'Open the preview for current document'),\n icon: 'external-link-alt',\n action: async () => {\n var _a;\n if (this.props.previewUrl) {\n (_a = window.open(this.props.previewUrl, '_blank', 'noopener,noreferrer')) === null || _a === void 0 ? void 0 : _a.focus();\n }\n else {\n logger.warn('No preview url to open');\n }\n },\n closeOnExecute: true,\n },\n recentDocument: {\n name: this.translate('CommandBarUiPlugin.command.recentDocuments', 'Recent documents'),\n description: this.translate('CommandBarUiPlugin.command.recentDocuments.description', 'Open a recently visited documents'),\n icon: 'history',\n action: this.showRecentDocuments.bind(this),\n },\n },\n };\n if (props.config.features.searchNeosDocs) {\n this.state.commands.searchNeosDocs = {\n name: this.translate('CommandBarUiPlugin.command.documentation', 'Documentation'),\n description: this.translate('CommandBarUiPlugin.command.documentation.description', 'Browse or search the Neos documentation'),\n icon: 'book',\n canHandleQueries: true,\n action: this.handleSearchNeosDocs.bind(this),\n };\n }\n if (props.config.features.searchNeosPackages) {\n this.state.commands.searchNeosPackages = {\n name: this.translate('CommandBarUiPlugin.command.packages', 'Packages'),\n description: this.translate('CommandBarUiPlugin.command.packages.description', 'Search for Neos packages'),\n icon: 'boxes',\n canHandleQueries: true,\n action: this.handleSearchNeosPackages.bind(this),\n };\n }\n }\n mapHotkeyIdToIcon(id) {\n let actionName = id.split('.').pop();\n // Some actions have the name 'toggle' with a suffix, e.g. 'toggleFullScreen'\n if (actionName.indexOf('toggle') >= 0) {\n actionName = 'toggle';\n }\n switch (actionName) {\n case 'toggle':\n return 'toggle-on';\n case 'reload':\n return 'redo';\n case 'cancel':\n case 'close':\n return 'window-close';\n case 'apply':\n return 'check';\n }\n return 'neos';\n }\n async componentDidMount() {\n const { plugins } = this.props;\n // Load 3rd party commands\n let pluginCommands = {};\n if (plugins) {\n for (const pluginName of Object.keys(plugins)) {\n const plugin = plugins[pluginName];\n try {\n const pluginResult = await plugin();\n if (Object.keys(pluginResult).length > 0) {\n pluginCommands = { ...pluginCommands, ...pluginResult };\n }\n }\n catch (e) {\n logger.warn(`Could not load commands from plugin ${pluginName}`, e);\n }\n }\n }\n // Load commands from data source which are not available via the UI API\n const commands = await CommandsApi.getCommands().catch((error) => {\n logger.error('Failed to load commands', error);\n });\n // Load user preferences\n const preferences = await PreferencesApi.getPreferences().catch((error) => {\n logger.error('Failed to load user preferences', error);\n });\n if (!preferences || !commands)\n return;\n this.setState((prev) => ({\n loaded: true,\n ...preferences,\n commands: { ...prev.commands, ...commands, ...pluginCommands },\n }));\n // add event-listener directly as the neos-ui hotkey-handling can't prevent defaults\n document.addEventListener('keydown', (e) => {\n if (e.key === 'k' && (e.metaKey || e.ctrlKey)) {\n e.stopPropagation();\n e.preventDefault();\n this.props.toggleCommandBar();\n }\n });\n }\n async componentDidUpdate(prevProps) {\n var _a, _b;\n if (((_a = prevProps.documentNode) === null || _a === void 0 ? void 0 : _a.contextPath) != ((_b = this.props.documentNode) === null || _b === void 0 ? void 0 : _b.contextPath)) {\n addRecentDocument(this.props.documentNode.contextPath).then((recentDocuments) => {\n this.setState({ recentDocuments });\n });\n }\n }\n render() {\n const { commandBarOpen, toggleCommandBar } = this.props;\n const { commands, loaded, dragging, favouriteCommands, recentCommands, recentDocuments, showBranding } = this.state;\n return (React.createElement(\"div\", { className: classnames(styles.commandBarToolbarComponent, theme.commandBarTheme) },\n React.createElement(ToggleButton, { handleToggle: toggleCommandBar, disabled: !loaded, label: this.translate('ToggleButton.label', 'Search…'), title: this.translate('ToggleButton.title', 'Search for commands'), active: commandBarOpen }),\n loaded && (React.createElement(\"div\", { className: [styles.fullScreenLayer, commandBarOpen && styles.open].join(' '), onDragOver: (e) => e.preventDefault(), style: dragging ? { pointerEvents: 'all' } : null },\n React.createElement(CommandBar, { open: commandBarOpen, commands: commands, toggleOpen: toggleCommandBar, onDrag: this.setDragging, IconComponent: IconComponent, userPreferences: {\n favouriteCommands,\n recentCommands,\n recentDocuments,\n showBranding,\n addRecentCommand: PreferencesApi.addRecentCommand,\n addRecentDocument: PreferencesApi.addRecentDocument,\n setFavouriteCommands: PreferencesApi.setFavouriteCommands,\n }, translate: this.translate })))));\n }\n}\nCommandBarUiPlugin.propTypes = {\n addNode: PropTypes.func.isRequired,\n baseWorkspace: PropTypes.string.isRequired,\n commandBarOpen: PropTypes.bool,\n config: PropTypes.object.isRequired,\n discardAction: PropTypes.func.isRequired,\n documentNode: PropTypes.object,\n editPreviewMode: PropTypes.string.isRequired,\n editPreviewModes: PropTypes.object.isRequired,\n focusedNodeContextPath: PropTypes.string,\n handleHotkeyAction: PropTypes.func.isRequired,\n hotkeyRegistry: PropTypes.object.isRequired,\n i18nRegistry: PropTypes.object.isRequired,\n isWorkspaceReadOnly: PropTypes.bool,\n publishAction: PropTypes.func.isRequired,\n publishableNodes: PropTypes.array,\n publishableNodesInDocument: PropTypes.array,\n previewUrl: PropTypes.string,\n setActiveContentCanvasSrc: PropTypes.func.isRequired,\n setActiveContentCanvasContextPath: PropTypes.func.isRequired,\n setEditPreviewMode: PropTypes.func.isRequired,\n siteNode: PropTypes.object,\n toggleCommandBar: PropTypes.func.isRequired,\n neos: PropTypes.object.isRequired,\n};\nconst mapStateToProps = (state) => ({\n siteNode: selectors.CR.Nodes.siteNodeSelector(state),\n documentNode: selectors.CR.Nodes.documentNodeSelector(state),\n focusedNodeContextPath: selectors.CR.Nodes.focusedNodePathSelector(state),\n publishableNodes: selectors.CR.Workspaces.publishableNodesSelector(state),\n publishableNodesInDocument: selectors.CR.Workspaces.publishableNodesInDocumentSelector(state),\n isWorkspaceReadOnly: selectors.CR.Workspaces.isWorkspaceReadOnlySelector(state),\n baseWorkspace: selectors.CR.Workspaces.baseWorkspaceSelector(state),\n commandBarOpen: commandBarSelectors.commandBarOpen(state),\n editPreviewMode: selectors.UI.EditPreviewMode.currentEditPreviewMode(state),\n previewUrl: commandBarSelectors.previewUrl(state),\n});\nconst mapDispatchToProps = (dispatch) => ({\n handleHotkeyAction: dispatch,\n});\nconst mapGlobalRegistryToProps = neos((globalRegistry) => ({\n i18nRegistry: globalRegistry.get('i18n'),\n hotkeyRegistry: globalRegistry.get('hotkeys'),\n config: globalRegistry.get('frontendConfiguration').get('Shel.Neos.CommandBar:CommandBar'),\n nodeTypesRegistry: globalRegistry.get('@neos-project/neos-ui-contentrepository'),\n editPreviewModes: globalRegistry.get('frontendConfiguration').get('editPreviewModes'),\n plugins: globalRegistry.get('Shel.Neos.CommandBar').getChildrenAsObject('plugins'),\n}));\nexport default connect(() => ({}), {\n toggleCommandBar: commandBarActions.toggleCommandBar,\n addNode: actions.CR.Nodes.commenceCreation,\n setEditPreviewMode: actions.UI.EditPreviewMode.set,\n publishAction: actions.CR.Workspaces.publish,\n discardAction: actions.CR.Workspaces.commenceDiscard,\n setActiveContentCanvasSrc: actions.UI.ContentCanvas.setSrc,\n setActiveContentCanvasContextPath: actions.CR.Nodes.setDocumentNode,\n changeBaseWorkspaceAction: actions.CR.Workspaces.changeBaseWorkspace,\n})(connect(mapStateToProps, mapDispatchToProps)(mapGlobalRegistryToProps(CommandBarUiPlugin)));\n"],"sourceRoot":""} \ No newline at end of file