@vitejs/devtools 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DockIcon-zZkKuxFy.js → DockIcon-7v-JouW5.js} +25 -25
- package/dist/DockStandalone-DZ0INpRC.js +3246 -0
- package/dist/{LogItem-D-AbVX5q.js → LogItem-Ca0SsU39.js} +20 -17
- package/dist/{ViewBuiltinLogs-D9GVXA00.js → ViewBuiltinLogs-B_CLlali.js} +2 -2
- package/dist/{ViewBuiltinTerminals-afgLtRQP.js → ViewBuiltinTerminals-ZrMObMte.js} +2 -3
- package/dist/auth-state-DXCxEqSd.js +54 -0
- package/dist/build-static-zB8LrlMJ.js +49 -0
- package/dist/cli-commands.js +10 -45
- package/dist/client/inject.js +186 -3
- package/dist/client/standalone/assets/DockStandalone-BUOgWTCb.js +1 -0
- package/dist/client/standalone/assets/LogItem-BnVhub2j.js +1 -0
- package/dist/client/standalone/assets/ViewBuiltinLogs-rU-E-8qT.js +1 -0
- package/dist/client/standalone/assets/{ViewBuiltinTerminals-CpNVjAgX.js → ViewBuiltinTerminals-UWfUyC_P.js} +2 -2
- package/dist/client/standalone/assets/{ViewJsonRender-CbWAIBeO.js → ViewJsonRender-De5eeIha.js} +3 -3
- package/dist/client/standalone/assets/dist-CAaP5Isp.js +1 -0
- package/dist/client/standalone/assets/iconify-C-CPDXMf.js +2 -0
- package/dist/client/standalone/assets/index-DtZFMvER.css +1 -0
- package/dist/client/standalone/assets/index-hQ4JAD5S.js +3 -0
- package/dist/client/standalone/assets/runtime-core.esm-bundler-Bvz2jy0O.js +1 -0
- package/dist/client/standalone/index.html +6 -5
- package/dist/client/webcomponents.js +28 -25
- package/dist/{server-DhChc9gv.js → context-DmXts6Ac.js} +112 -53
- package/dist/{dist-CBtGbo90.js → dist-CCdqIez-.js} +124 -1
- package/dist/index.d.ts +42 -2
- package/dist/index.js +3 -4
- package/dist/internal.d.ts +1 -1
- package/dist/plugins-vfc-N600.js +59 -0
- package/dist/{popup-CAT8YohS.js → popup-DcuzpgO2.js} +113 -54
- package/dist/server-C54I1zbj.js +2 -0
- package/dist/server-DH39-LHL.js +50 -0
- package/dist/{server-BuWZ1h8p.js → server-DSh-GQIq.js} +3 -56
- package/dist/{standalone-CAJbdnf4.js → standalone-w_GYdx1T.js} +2 -3
- package/package.json +8 -6
- package/dist/DockStandalone-BuMVHLt_.js +0 -1256
- package/dist/client/standalone/assets/DockStandalone-DvxQ5kAU.js +0 -1
- package/dist/client/standalone/assets/LogItem-Mx4UyReX.js +0 -1
- package/dist/client/standalone/assets/ViewBuiltinLogs-C4j4vgSn.js +0 -1
- package/dist/client/standalone/assets/dist-DIlAYcjk.js +0 -1
- package/dist/client/standalone/assets/index-BEyoIK7m.css +0 -1
- package/dist/client/standalone/assets/index-BGGAiDua.js +0 -4
- package/dist/client/standalone/assets/runtime-core.esm-bundler-CJlaYmKv.js +0 -1
- package/dist/plugins-DfC1vp4w.js +0 -31
- package/dist/server-Ca6LOTxO.js +0 -3
- /package/dist/{ViewJsonRender-DtluXw3F.js → ViewJsonRender-Cc5BPfnv.js} +0 -0
- /package/dist/{context-internal-BA4ba-FN.d.ts → context-internal-Ys7Zu3q3.d.ts} +0 -0
- /package/dist/{static-dump-Q0iG9hz3.js → static-dump-BqRb_x-O.js} +0 -0
|
@@ -0,0 +1,3246 @@
|
|
|
1
|
+
import { i as __exportAll } from "./constants-DfEeYo9W.js";
|
|
2
|
+
import { i as useEventListener, l as useDebounceFn, n as useDark, t as onClickOutside } from "./dist-CCdqIez-.js";
|
|
3
|
+
import { _ as KNOWN_BROWSER_SHORTCUTS, b as isMac, c as setDocksOverflowPanel, d as useDockContextMenu, f as useDocksOverflowPanel, h as docksGroupByCategories, i as requestDockPopupOpen, l as setEdgePositionDropdown, m as useFloatingTooltip, n as isDockPopupSupported, o as useIsDockPopupOpen, p as useEdgePositionDropdown, s as setDockContextMenu, u as setFloatingTooltip, w as sharedStateToRef, y as formatKeybinding } from "./popup-DcuzpgO2.js";
|
|
4
|
+
import { r as export_helper_default, t as _sfc_main$21 } from "./DockIcon-7v-JouW5.js";
|
|
5
|
+
import { c as dismissToast, l as useToasts, n as _sfc_main$23, s as useLogs, t as _sfc_main$22 } from "./LogItem-Ca0SsU39.js";
|
|
6
|
+
import { DEFAULT_STATE_USER_SETTINGS } from "@vitejs/devtools-kit/constants";
|
|
7
|
+
import { Fragment, Suspense, TransitionGroup, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createStaticVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, defineCustomElement, h, markRaw, nextTick, normalizeClass, normalizeStyle, onMounted, onUnmounted, openBlock, ref, renderList, renderSlot, toDisplayString, toRefs, unref, useTemplateRef, vModelText, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
8
|
+
import { evaluateWhen } from "@vitejs/devtools-kit/utils/when";
|
|
9
|
+
//#region src/client/webcomponents/.generated/css.ts
|
|
10
|
+
var css_default = "*{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:before{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:after{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:before{--un-content:\"\"}:after{--un-content:\"\"}html{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button{-webkit-appearance:button;background-color:transparent;background-image:none}[type=button]{-webkit-appearance:button;background-color:transparent;background-image:none}[type=reset]{-webkit-appearance:button;background-color:transparent;background-image:none}[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::placeholder{opacity:1;color:#9ca3af}textarea::placeholder{opacity:1;color:#9ca3af}button{cursor:pointer}[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.xterm{cursor:text;user-select:none;position:relative}.xterm.focus{outline:none}.xterm:focus{outline:none}.xterm .xterm-helpers{z-index:5;position:absolute;top:0}.xterm .xterm-helper-textarea{opacity:0;z-index:-5;white-space:nowrap;resize:none;border:0;width:0;height:0;margin:0;padding:0;position:absolute;top:0;left:-9999em;overflow:hidden}.xterm .composition-view{color:#fff;white-space:nowrap;z-index:1;background:#000;display:none;position:absolute}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{cursor:default;background-color:#000;position:absolute;top:0;bottom:0;left:0;right:0;overflow-y:scroll}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;top:0;left:0}.xterm-char-measure-element{visibility:hidden;line-height:normal;display:inline-block;position:absolute;top:0;left:-9999em}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-message{z-index:10;color:transparent;pointer-events:none;position:absolute;top:0;bottom:0;left:0;right:0}.xterm .xterm-accessibility:not(.debug){z-index:10;color:transparent;pointer-events:none;position:absolute;top:0;bottom:0;left:0;right:0}.xterm .xterm-accessibility-tree:not(.debug) ::selection{color:transparent}.xterm .xterm-accessibility-tree{user-select:text;white-space:pre;font-family:monospace}.xterm .xterm-accessibility-tree>div{transform-origin:0;width:fit-content}.xterm .live-region{width:1px;height:1px;position:absolute;left:-9999px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:underline double}.xterm-underline-3{text-decoration:underline wavy}.xterm-underline-4{text-decoration:underline dotted}.xterm-underline-5{text-decoration:underline dashed}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:underline overline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;pointer-events:none;position:absolute;top:0;right:0}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;z-index:11;background:0 0;transition:opacity .1s linear}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{display:none;position:absolute}.xterm .xterm-scrollable-element>.shadow.top{width:100%;height:3px;box-shadow:var(--vscode-scrollbar-shadow,#000) 0 6px 6px -6px inset;display:block;top:0;left:3px}.xterm .xterm-scrollable-element>.shadow.left{width:3px;height:100%;box-shadow:var(--vscode-scrollbar-shadow,#000) 6px 0 6px -6px inset;display:block;top:3px;left:0}.xterm .xterm-scrollable-element>.shadow.top-left-corner{width:3px;height:3px;display:block;top:0;left:0}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow,#000) 6px 0 6px -6px inset}:root{--un-text-opacity:100%}#vite-devtools-anchor{z-index:2147483644;box-sizing:border-box;transform-origin:50%;width:0;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-size:15px;position:fixed;transform:translate(-50%,-50%)rotate(0)}#vite-devtools-anchor #vite-devtools-dock-container{width:max-content;min-width:100px;height:40px;display:flex;position:absolute;top:0;left:0;transform:translate(-50%,-50%)}#vite-devtools-anchor.vite-devtools-vertical #vite-devtools-dock-container{transition-property:all;transition-duration:.5s;transition-timing-function:cubic-bezier(.4,0,.2,1);transform:translate(-50%,-50%)rotate(90deg)}#vite-devtools-anchor #vite-devtools-dock{touch-action:none;user-select:none;--vdt-backdrop-blur:blur(7px);height:40px;backdrop-filter:var(--vdt-backdrop-blur) var(--vdt-backdrop-brightness) var(--vdt-backdrop-contrast) var(--vdt-backdrop-grayscale) var(--vdt-backdrop-hue-rotate) var(--vdt-backdrop-invert) var(--vdt-backdrop-opacity) var(--vdt-backdrop-saturate) var(--vdt-backdrop-sepia);--vdt-text-opacity:1;color:rgba(51,51,51,var(--vdt-text-opacity));--vdt-shadow:var(--vdt-shadow-inset) 0 1px 3px 0 var(--vdt-shadow-color,rgba(0,0,0,.1)),var(--vdt-shadow-inset) 0 1px 2px -1px var(--vdt-shadow-color,rgba(0,0,0,.1));box-shadow:var(--vdt-ring-offset-shadow), var(--vdt-ring-shadow), var(--vdt-shadow);width:calc-size(max-content, size);background-color:rgba(255,255,255,.5);-webkit-border-radius:9999px;border-radius:9999px;margin:auto;transition-property:all;transition-duration:.5s;transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (prefers-color-scheme:dark){#vite-devtools-anchor #vite-devtools-dock{--vdt-text-opacity:1;color:rgba(255,255,255,var(--vdt-text-opacity));background-color:rgba(17,17,17,.5)}}#vite-devtools-anchor.vite-devtools-minimized #vite-devtools-dock{width:22px;height:22px;padding:2px 0}#vite-devtools-anchor.vite-devtools-minimized .vite-devtools-dock-bracket{opacity:.5;width:.375rem}#vite-devtools-anchor:hover #vite-devtools-glowing{opacity:.6}#vite-devtools-anchor #vite-devtools-glowing{pointer-events:none;z-index:-1;opacity:0;--vdt-blur:blur(60px);width:160px;height:160px;filter:var(--vdt-blur) var(--vdt-brightness) var(--vdt-contrast) var(--vdt-drop-shadow) var(--vdt-grayscale) var(--vdt-hue-rotate) var(--vdt-invert) var(--vdt-saturate) var(--vdt-sepia);background-image:linear-gradient(45deg,#61d9ff,#7a23a1,#715ebd);-webkit-border-radius:9999px;border-radius:9999px;transition-property:all;transition-duration:1s;transition-timing-function:cubic-bezier(0,0,.2,1);position:absolute;top:0;left:0;transform:translate(-50%,-50%)}@media print{#vite-devtools-anchor{display:none}}.vite-devtools-resize-handle-horizontal{cursor:ns-resize;-webkit-border-radius:.375rem;border-radius:.375rem;height:10px;margin-top:-5px;margin-bottom:-5px;position:absolute;left:6px;right:6px}.vite-devtools-resize-handle-vertical{cursor:ew-resize;-webkit-border-radius:.375rem;border-radius:.375rem;width:10px;margin-left:-5px;margin-right:-5px;position:absolute;top:6px;bottom:0}.vite-devtools-resize-handle-corner{-webkit-border-radius:.375rem;border-radius:.375rem;width:14px;height:14px;margin:-6px;position:absolute}.vite-devtools-resize-handle{z-index:30}.vite-devtools-resize-handle:hover{background-color:rgba(156,163,175,.1)}*{--vdt-rotate:0;--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-scale-x:1;--vdt-scale-y:1;--vdt-scale-z:1;--vdt-skew-x:0;--vdt-skew-y:0;--vdt-translate-x:0;--vdt-translate-y:0;--vdt-translate-z:0;--vdt-pan-x: ;--vdt-pan-y: ;--vdt-pinch-zoom: ;--vdt-scroll-snap-strictness:proximity;--vdt-ordinal: ;--vdt-slashed-zero: ;--vdt-numeric-figure: ;--vdt-numeric-spacing: ;--vdt-numeric-fraction: ;--vdt-border-spacing-x:0;--vdt-border-spacing-y:0;--vdt-ring-offset-shadow:0 0 transparent;--vdt-ring-shadow:0 0 transparent;--vdt-shadow-inset: ;--vdt-shadow:0 0 transparent;--vdt-ring-inset: ;--vdt-ring-offset-width:0px;--vdt-ring-offset-color:#fff;--vdt-ring-width:0px;--vdt-ring-color:rgba(147,197,253,.5);--vdt-blur: ;--vdt-brightness: ;--vdt-contrast: ;--vdt-drop-shadow: ;--vdt-grayscale: ;--vdt-hue-rotate: ;--vdt-invert: ;--vdt-saturate: ;--vdt-sepia: ;--vdt-backdrop-blur: ;--vdt-backdrop-brightness: ;--vdt-backdrop-contrast: ;--vdt-backdrop-grayscale: ;--vdt-backdrop-hue-rotate: ;--vdt-backdrop-invert: ;--vdt-backdrop-opacity: ;--vdt-backdrop-saturate: ;--vdt-backdrop-sepia: }:before{--vdt-rotate:0;--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-scale-x:1;--vdt-scale-y:1;--vdt-scale-z:1;--vdt-skew-x:0;--vdt-skew-y:0;--vdt-translate-x:0;--vdt-translate-y:0;--vdt-translate-z:0;--vdt-pan-x: ;--vdt-pan-y: ;--vdt-pinch-zoom: ;--vdt-scroll-snap-strictness:proximity;--vdt-ordinal: ;--vdt-slashed-zero: ;--vdt-numeric-figure: ;--vdt-numeric-spacing: ;--vdt-numeric-fraction: ;--vdt-border-spacing-x:0;--vdt-border-spacing-y:0;--vdt-ring-offset-shadow:0 0 transparent;--vdt-ring-shadow:0 0 transparent;--vdt-shadow-inset: ;--vdt-shadow:0 0 transparent;--vdt-ring-inset: ;--vdt-ring-offset-width:0px;--vdt-ring-offset-color:#fff;--vdt-ring-width:0px;--vdt-ring-color:rgba(147,197,253,.5);--vdt-blur: ;--vdt-brightness: ;--vdt-contrast: ;--vdt-drop-shadow: ;--vdt-grayscale: ;--vdt-hue-rotate: ;--vdt-invert: ;--vdt-saturate: ;--vdt-sepia: ;--vdt-backdrop-blur: ;--vdt-backdrop-brightness: ;--vdt-backdrop-contrast: ;--vdt-backdrop-grayscale: ;--vdt-backdrop-hue-rotate: ;--vdt-backdrop-invert: ;--vdt-backdrop-opacity: ;--vdt-backdrop-saturate: ;--vdt-backdrop-sepia: }:after{--vdt-rotate:0;--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-scale-x:1;--vdt-scale-y:1;--vdt-scale-z:1;--vdt-skew-x:0;--vdt-skew-y:0;--vdt-translate-x:0;--vdt-translate-y:0;--vdt-translate-z:0;--vdt-pan-x: ;--vdt-pan-y: ;--vdt-pinch-zoom: ;--vdt-scroll-snap-strictness:proximity;--vdt-ordinal: ;--vdt-slashed-zero: ;--vdt-numeric-figure: ;--vdt-numeric-spacing: ;--vdt-numeric-fraction: ;--vdt-border-spacing-x:0;--vdt-border-spacing-y:0;--vdt-ring-offset-shadow:0 0 transparent;--vdt-ring-shadow:0 0 transparent;--vdt-shadow-inset: ;--vdt-shadow:0 0 transparent;--vdt-ring-inset: ;--vdt-ring-offset-width:0px;--vdt-ring-offset-color:#fff;--vdt-ring-width:0px;--vdt-ring-color:rgba(147,197,253,.5);--vdt-blur: ;--vdt-brightness: ;--vdt-contrast: ;--vdt-drop-shadow: ;--vdt-grayscale: ;--vdt-hue-rotate: ;--vdt-invert: ;--vdt-saturate: ;--vdt-sepia: ;--vdt-backdrop-blur: ;--vdt-backdrop-brightness: ;--vdt-backdrop-contrast: ;--vdt-backdrop-grayscale: ;--vdt-backdrop-hue-rotate: ;--vdt-backdrop-invert: ;--vdt-backdrop-opacity: ;--vdt-backdrop-saturate: ;--vdt-backdrop-sepia: }::backdrop{--vdt-rotate:0;--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-scale-x:1;--vdt-scale-y:1;--vdt-scale-z:1;--vdt-skew-x:0;--vdt-skew-y:0;--vdt-translate-x:0;--vdt-translate-y:0;--vdt-translate-z:0;--vdt-pan-x: ;--vdt-pan-y: ;--vdt-pinch-zoom: ;--vdt-scroll-snap-strictness:proximity;--vdt-ordinal: ;--vdt-slashed-zero: ;--vdt-numeric-figure: ;--vdt-numeric-spacing: ;--vdt-numeric-fraction: ;--vdt-border-spacing-x:0;--vdt-border-spacing-y:0;--vdt-ring-offset-shadow:0 0 transparent;--vdt-ring-shadow:0 0 transparent;--vdt-shadow-inset: ;--vdt-shadow:0 0 transparent;--vdt-ring-inset: ;--vdt-ring-offset-width:0px;--vdt-ring-offset-color:#fff;--vdt-ring-width:0px;--vdt-ring-color:rgba(147,197,253,.5);--vdt-blur: ;--vdt-brightness: ;--vdt-contrast: ;--vdt-drop-shadow: ;--vdt-grayscale: ;--vdt-hue-rotate: ;--vdt-invert: ;--vdt-saturate: ;--vdt-sepia: ;--vdt-backdrop-blur: ;--vdt-backdrop-brightness: ;--vdt-backdrop-contrast: ;--vdt-backdrop-grayscale: ;--vdt-backdrop-hue-rotate: ;--vdt-backdrop-invert: ;--vdt-backdrop-opacity: ;--vdt-backdrop-saturate: ;--vdt-backdrop-sepia: }.i-carbon-clean{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M26 20h-6v-2h6zm4 8h-6v-2h6zm-2-4h-6v-2h6z'/%3E%3Cpath fill='currentColor' d='M17.003 20a4.9 4.9 0 0 0-2.404-4.173L22 3l-1.73-1l-7.577 13.126a5.7 5.7 0 0 0-5.243 1.503C3.706 20.24 3.996 28.682 4.01 29.04a1 1 0 0 0 1 .96h14.991a1 1 0 0 0 .6-1.8c-3.54-2.656-3.598-8.146-3.598-8.2m-5.073-3.003A3.11 3.11 0 0 1 15.004 20c0 .038.002.208.017.469l-5.9-2.624a3.8 3.8 0 0 1 2.809-.848M15.45 28A5.2 5.2 0 0 1 14 25h-2a6.5 6.5 0 0 0 .968 3h-2.223A16.6 16.6 0 0 1 10 24H8a17.3 17.3 0 0 0 .665 4H6c.031-1.836.29-5.892 1.803-8.553l7.533 3.35A13 13 0 0 0 17.596 28Z'/%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-fluent-emoji-flat-warning{background:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none'%3E%3Cpath fill='%23FFB02E' d='m14.839 5.668l-12.66 21.93c-.51.89.13 2.01 1.16 2.01h25.32c1.03 0 1.67-1.11 1.16-2.01l-12.66-21.93c-.52-.89-1.8-.89-2.32 0'/%3E%3Cpath fill='%23000' d='M14.599 21.498a1.4 1.4 0 1 0 2.8-.01v-9.16c0-.77-.62-1.4-1.4-1.4c-.77 0-1.4.62-1.4 1.4zm2.8 3.98a1.4 1.4 0 1 1-2.8 0a1.4 1.4 0 0 1 2.8 0'/%3E%3C/g%3E%3C/svg%3E\") 0 0/100% 100% no-repeat;width:1em;height:1em}.i-ph-arrow-clockwise{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M240 56v48a8 8 0 0 1-8 8h-48a8 8 0 0 1 0-16h27.4l-26.59-24.36l-.25-.24a80 80 0 1 0-1.67 114.78a8 8 0 0 1 11 11.63A95.44 95.44 0 0 1 128 224h-1.32a96 96 0 1 1 69.07-164L224 85.8V56a8 8 0 1 1 16 0'/%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-arrow-clockwise-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M216 128a88 88 0 1 1-88-88a88 88 0 0 1 88 88' opacity='.2'/%3E%3Cpath d='M240 56v48a8 8 0 0 1-8 8h-48a8 8 0 0 1 0-16h27.4l-26.59-24.36l-.25-.24a80 80 0 1 0-1.67 114.78a8 8 0 0 1 11 11.63A95.44 95.44 0 0 1 128 224h-1.32a96 96 0 1 1 69.07-164L224 85.8V56a8 8 0 1 1 16 0'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-arrow-counter-clockwise{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M224 128a96 96 0 0 1-94.71 96H128a95.38 95.38 0 0 1-65.9-26.2a8 8 0 0 1 11-11.63a80 80 0 1 0-1.67-114.78a3 3 0 0 1-.26.25L44.59 96H72a8 8 0 0 1 0 16H24a8 8 0 0 1-8-8V56a8 8 0 0 1 16 0v29.8L60.25 60A96 96 0 0 1 224 128'/%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-arrow-square-out-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M184 80v128a8 8 0 0 1-8 8H48a8 8 0 0 1-8-8V80a8 8 0 0 1 8-8h128a8 8 0 0 1 8 8' opacity='.2'/%3E%3Cpath d='M224 104a8 8 0 0 1-16 0V59.32l-66.33 66.34a8 8 0 0 1-11.32-11.32L196.68 48H152a8 8 0 0 1 0-16h64a8 8 0 0 1 8 8Zm-40 24a8 8 0 0 0-8 8v72H48V80h72a8 8 0 0 0 0-16H48a16 16 0 0 0-16 16v128a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-72a8 8 0 0 0-8-8'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-arrows-counter-clockwise-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M216 128a88 88 0 1 1-88-88a88 88 0 0 1 88 88' opacity='.2'/%3E%3Cpath d='M88 104H40a8 8 0 0 1-8-8V48a8 8 0 0 1 16 0v28.69l14.63-14.63A95.43 95.43 0 0 1 130 33.94h.53a95.36 95.36 0 0 1 67.07 27.33a8 8 0 0 1-11.18 11.44a79.52 79.52 0 0 0-55.89-22.77h-.45a79.56 79.56 0 0 0-56.14 23.43L59.31 88H88a8 8 0 0 1 0 16m128 48h-48a8 8 0 0 0 0 16h28.69l-14.63 14.63a79.56 79.56 0 0 1-56.13 23.43h-.45a79.52 79.52 0 0 1-55.89-22.77a8 8 0 1 0-11.18 11.44a95.36 95.36 0 0 0 67.07 27.33h.52a95.43 95.43 0 0 0 67.36-28.12L208 179.31V208a8 8 0 0 0 16 0v-48a8 8 0 0 0-8-8'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-arrows-out-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M208 48v160H48V48Z' opacity='.2'/%3E%3Cpath d='M216 48v48a8 8 0 0 1-16 0V67.31l-42.34 42.35a8 8 0 0 1-11.32-11.32L188.69 56H160a8 8 0 0 1 0-16h48a8 8 0 0 1 8 8M98.34 146.34L56 188.69V160a8 8 0 0 0-16 0v48a8 8 0 0 0 8 8h48a8 8 0 0 0 0-16H67.31l42.35-42.34a8 8 0 0 0-11.32-11.32M208 152a8 8 0 0 0-8 8v28.69l-42.34-42.35a8 8 0 0 0-11.32 11.32L188.69 200H160a8 8 0 0 0 0 16h48a8 8 0 0 0 8-8v-48a8 8 0 0 0-8-8M67.31 56H96a8 8 0 0 0 0-16H48a8 8 0 0 0-8 8v48a8 8 0 0 0 16 0V67.31l42.34 42.35a8 8 0 0 0 11.32-11.32Z'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-cards-three-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M216 104v96a8 8 0 0 1-8 8H48a8 8 0 0 1-8-8v-96a8 8 0 0 1 8-8h160a8 8 0 0 1 8 8' opacity='.2'/%3E%3Cpath d='M208 88H48a16 16 0 0 0-16 16v96a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16v-96a16 16 0 0 0-16-16m0 112H48v-96h160zM48 64a8 8 0 0 1 8-8h144a8 8 0 0 1 0 16H56a8 8 0 0 1-8-8m16-32a8 8 0 0 1 8-8h112a8 8 0 0 1 0 16H72a8 8 0 0 1-8-8'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-caret-down{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32'/%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-caret-left{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M165.66 202.34a8 8 0 0 1-11.32 11.32l-80-80a8 8 0 0 1 0-11.32l80-80a8 8 0 0 1 11.32 11.32L91.31 128Z'/%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-caret-right{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m181.66 133.66l-80 80a8 8 0 0 1-11.32-11.32L164.69 128L90.34 53.66a8 8 0 0 1 11.32-11.32l80 80a8 8 0 0 1 0 11.32'/%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-caret-up{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M213.66 165.66a8 8 0 0 1-11.32 0L128 91.31l-74.34 74.35a8 8 0 0 1-11.32-11.32l80-80a8 8 0 0 1 11.32 0l80 80a8 8 0 0 1 0 11.32'/%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-check-bold{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m232.49 80.49l-128 128a12 12 0 0 1-17 0l-56-56a12 12 0 1 1 17-17L96 183L215.51 63.51a12 12 0 0 1 17 17Z'/%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-check-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M232 56v144a16 16 0 0 1-16 16H40a16 16 0 0 1-16-16V56a16 16 0 0 1 16-16h176a16 16 0 0 1 16 16' opacity='.2'/%3E%3Cpath d='m205.66 85.66l-96 96a8 8 0 0 1-11.32 0l-40-40a8 8 0 0 1 11.32-11.32L104 164.69l90.34-90.35a8 8 0 0 1 11.32 11.32'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-circle-notch{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M232 128a104 104 0 0 1-208 0c0-41 23.81-78.36 60.66-95.27a8 8 0 0 1 6.68 14.54C60.15 61.59 40 93.27 40 128a88 88 0 0 0 176 0c0-34.73-20.15-66.41-51.34-80.73a8 8 0 0 1 6.68-14.54C208.19 49.64 232 87 232 128'/%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-eye-slash{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M53.92 34.62a8 8 0 1 0-11.84 10.76l19.24 21.17C25 88.84 9.38 123.2 8.69 124.76a8 8 0 0 0 0 6.5c.35.79 8.82 19.57 27.65 38.4C61.43 194.74 93.12 208 128 208a127.1 127.1 0 0 0 52.07-10.83l22 24.21a8 8 0 1 0 11.84-10.76Zm47.33 75.84l41.67 45.85a32 32 0 0 1-41.67-45.85M128 192c-30.78 0-57.67-11.19-79.93-33.25A133.2 133.2 0 0 1 25 128c4.69-8.79 19.66-33.39 47.35-49.38l18 19.75a48 48 0 0 0 63.66 70l14.73 16.2A112 112 0 0 1 128 192m6-95.43a8 8 0 0 1 3-15.72a48.16 48.16 0 0 1 38.77 42.64a8 8 0 0 1-7.22 8.71a6 6 0 0 1-.75 0a8 8 0 0 1-8-7.26A32.09 32.09 0 0 0 134 96.57m113.28 34.69c-.42.94-10.55 23.37-33.36 43.8a8 8 0 1 1-10.67-11.92a132.8 132.8 0 0 0 27.8-35.14a133.2 133.2 0 0 0-23.12-30.77C185.67 75.19 158.78 64 128 64a118.4 118.4 0 0 0-19.36 1.57A8 8 0 1 1 106 49.79A134 134 0 0 1 128 48c34.88 0 66.57 13.26 91.66 38.35c18.83 18.83 27.3 37.62 27.65 38.41a8 8 0 0 1 0 6.5Z'/%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-eye-slash-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M128 56c-80 0-112 72-112 72s32 72 112 72s112-72 112-72s-32-72-112-72m0 112a40 40 0 1 1 40-40a40 40 0 0 1-40 40' opacity='.2'/%3E%3Cpath d='M53.92 34.62a8 8 0 1 0-11.84 10.76l19.24 21.17C25 88.84 9.38 123.2 8.69 124.76a8 8 0 0 0 0 6.5c.35.79 8.82 19.57 27.65 38.4C61.43 194.74 93.12 208 128 208a127.1 127.1 0 0 0 52.07-10.83l22 24.21a8 8 0 1 0 11.84-10.76Zm47.33 75.84l41.67 45.85a32 32 0 0 1-41.67-45.85M128 192c-30.78 0-57.67-11.19-79.93-33.25A133.2 133.2 0 0 1 25 128c4.69-8.79 19.66-33.39 47.35-49.38l18 19.75a48 48 0 0 0 63.66 70l14.73 16.2A112 112 0 0 1 128 192m6-95.43a8 8 0 0 1 3-15.72a48.16 48.16 0 0 1 38.77 42.64a8 8 0 0 1-7.22 8.71a6 6 0 0 1-.75 0a8 8 0 0 1-8-7.26A32.09 32.09 0 0 0 134 96.57m113.28 34.69c-.42.94-10.55 23.37-33.36 43.8a8 8 0 1 1-10.67-11.92a132.8 132.8 0 0 0 27.8-35.14a133.2 133.2 0 0 0-23.12-30.77C185.67 75.19 158.78 64 128 64a118.4 118.4 0 0 0-19.36 1.57A8 8 0 1 1 106 49.79A134 134 0 0 1 128 48c34.88 0 66.57 13.26 91.66 38.35c18.83 18.83 27.3 37.62 27.65 38.41a8 8 0 0 1 0 6.5Z'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-globe{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 24a104 104 0 1 0 104 104A104.12 104.12 0 0 0 128 24m88 104a87.6 87.6 0 0 1-3.33 24h-38.51a157.4 157.4 0 0 0 0-48h38.51a87.6 87.6 0 0 1 3.33 24m-114 40h52a115.1 115.1 0 0 1-26 45a115.3 115.3 0 0 1-26-45m-3.9-16a140.8 140.8 0 0 1 0-48h59.88a140.8 140.8 0 0 1 0 48ZM40 128a87.6 87.6 0 0 1 3.33-24h38.51a157.4 157.4 0 0 0 0 48H43.33A87.6 87.6 0 0 1 40 128m114-40h-52a115.1 115.1 0 0 1 26-45a115.3 115.3 0 0 1 26 45m52.33 0h-35.62a135.3 135.3 0 0 0-22.3-45.6A88.29 88.29 0 0 1 206.37 88Zm-98.74-45.6A135.3 135.3 0 0 0 85.29 88H49.63a88.29 88.29 0 0 1 57.96-45.6M49.63 168h35.66a135.3 135.3 0 0 0 22.3 45.6A88.29 88.29 0 0 1 49.63 168m98.78 45.6a135.3 135.3 0 0 0 22.3-45.6h35.66a88.29 88.29 0 0 1-57.96 45.6'/%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-keyboard-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M232 64v128a8 8 0 0 1-8 8H32a8 8 0 0 1-8-8V64a8 8 0 0 1 8-8h192a8 8 0 0 1 8 8' opacity='.2'/%3E%3Cpath d='M224 48H32a16 16 0 0 0-16 16v128a16 16 0 0 0 16 16h192a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16m0 144H32V64h192zm-16-64a8 8 0 0 1-8 8H56a8 8 0 0 1 0-16h144a8 8 0 0 1 8 8m0-32a8 8 0 0 1-8 8H56a8 8 0 0 1 0-16h144a8 8 0 0 1 8 8M72 160a8 8 0 0 1-8 8h-8a8 8 0 0 1 0-16h8a8 8 0 0 1 8 8m96 0a8 8 0 0 1-8 8H96a8 8 0 0 1 0-16h64a8 8 0 0 1 8 8m40 0a8 8 0 0 1-8 8h-8a8 8 0 0 1 0-16h8a8 8 0 0 1 8 8'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-layout-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M104 104v104H40a8 8 0 0 1-8-8v-96Z' opacity='.2'/%3E%3Cpath d='M216 40H40a16 16 0 0 0-16 16v144a16 16 0 0 0 16 16h176a16 16 0 0 0 16-16V56a16 16 0 0 0-16-16m0 16v40H40V56ZM40 112h56v88H40Zm176 88H112v-88h104z'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-magnifying-glass-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M192 112a80 80 0 1 1-80-80a80 80 0 0 1 80 80' opacity='.2'/%3E%3Cpath d='m229.66 218.34l-50.06-50.06a88.21 88.21 0 1 0-11.32 11.31l50.06 50.07a8 8 0 0 0 11.32-11.32M40 112a72 72 0 1 1 72 72a72.08 72.08 0 0 1-72-72'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-paint-brush-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M224 32c0 32.81-31.64 67.43-58.64 91.05A84.4 84.4 0 0 0 133 90.64c23.57-27 58.19-58.64 91-58.64' opacity='.2'/%3E%3Cpath d='M232 32a8 8 0 0 0-8-8c-44.08 0-89.31 49.71-114.43 82.63A60 60 0 0 0 32 164c0 30.88-19.54 44.73-20.47 45.37A8 8 0 0 0 16 224h76a60 60 0 0 0 57.37-77.57C182.3 121.31 232 76.08 232 32M92 208H34.63C41.38 198.41 48 183.92 48 164a44 44 0 1 1 44 44m32.42-94.45q5.14-6.66 10.09-12.55A76.2 76.2 0 0 1 155 121.49q-5.9 4.94-12.55 10.09a60.5 60.5 0 0 0-18.03-18.03m42.7-2.68a92.6 92.6 0 0 0-22-22c31.78-34.53 55.75-45 69.9-47.91c-2.85 14.16-13.37 38.13-47.9 69.91'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-push-pin{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m235.32 81.37l-60.69-60.68a16 16 0 0 0-22.63 0l-53.63 53.8c-10.66-3.34-35-7.37-60.4 13.14a16 16 0 0 0-1.29 23.78L85 159.71l-42.66 42.63a8 8 0 0 0 11.32 11.32L96.29 171l48.29 48.29A16 16 0 0 0 155.9 224h1.13a15.93 15.93 0 0 0 11.64-6.33c19.64-26.1 17.75-47.32 13.19-60L235.33 104a16 16 0 0 0-.01-22.63M224 92.69l-57.27 57.46a8 8 0 0 0-1.49 9.22c9.46 18.93-1.8 38.59-9.34 48.62L48 100.08c12.08-9.74 23.64-12.31 32.48-12.31A40.1 40.1 0 0 1 96.81 91a8 8 0 0 0 9.25-1.51L163.32 32L224 92.68Z'/%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-push-pin-fill{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m235.33 104l-53.47 53.65c4.56 12.67 6.45 33.89-13.19 60A15.93 15.93 0 0 1 157 224h-1.13a16 16 0 0 1-11.32-4.69L96.29 171l-42.63 42.66a8 8 0 0 1-11.32-11.32L85 159.71l-48.3-48.3A16 16 0 0 1 38 87.63c25.42-20.51 49.75-16.48 60.4-13.14L152 20.7a16 16 0 0 1 22.63 0l60.69 60.68a16 16 0 0 1 .01 22.62'/%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-rocket-launch-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M184 120v61.65a8 8 0 0 1-2.34 5.65l-34.35 34.35a8 8 0 0 1-13.57-4.53L128 176Zm-48-48H74.35a8 8 0 0 0-5.65 2.34l-34.35 34.35a8 8 0 0 0 4.53 13.57L80 128ZM40 216c37.65 0 50.69-19.69 54.56-28.18l-26.38-26.38C59.69 165.31 40 178.35 40 216' opacity='.2'/%3E%3Cpath d='M223.85 47.12a16 16 0 0 0-15-15c-12.58-.75-44.73.4-71.41 27.07L132.69 64H74.36A15.9 15.9 0 0 0 63 68.68L28.7 103a16 16 0 0 0 9.07 27.16l38.47 5.37l44.21 44.21l5.37 38.49a15.94 15.94 0 0 0 10.78 12.92a16.1 16.1 0 0 0 5.1.83a15.9 15.9 0 0 0 11.3-4.68l34.32-34.3a15.9 15.9 0 0 0 4.68-11.36v-58.33l4.77-4.77c26.68-26.68 27.83-58.83 27.08-71.42M74.36 80h42.33l-39.53 39.52L40 114.34Zm74.41-9.45a76.65 76.65 0 0 1 59.11-22.47a76.46 76.46 0 0 1-22.42 59.16L128 164.68L91.32 128ZM176 181.64L141.67 216l-5.19-37.17L176 139.31Zm-74.16 9.5C97.34 201 82.29 224 40 224a8 8 0 0 1-8-8c0-42.29 23-57.34 32.86-61.85a8 8 0 0 1 6.64 14.56c-6.43 2.93-20.62 12.36-23.12 38.91c26.55-2.5 36-16.69 38.91-23.12a8 8 0 1 1 14.56 6.64Z'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-spinner-gap-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M224 128a96 96 0 1 1-96-96a96 96 0 0 1 96 96' opacity='.2'/%3E%3Cpath d='M136 32v32a8 8 0 0 1-16 0V32a8 8 0 0 1 16 0m88 88h-32a8 8 0 0 0 0 16h32a8 8 0 0 0 0-16m-45.09 47.6a8 8 0 0 0-11.31 11.31l22.62 22.63a8 8 0 0 0 11.32-11.32ZM128 184a8 8 0 0 0-8 8v32a8 8 0 0 0 16 0v-32a8 8 0 0 0-8-8m-50.91-16.4l-22.63 22.62a8 8 0 0 0 11.32 11.32l22.62-22.63a8 8 0 0 0-11.31-11.31M72 128a8 8 0 0 0-8-8H32a8 8 0 0 0 0 16h32a8 8 0 0 0 8-8m-6.22-73.54a8 8 0 0 0-11.32 11.32L77.09 88.4A8 8 0 0 0 88.4 77.09Z'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-square-half-bottom-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M208 128v72a8 8 0 0 1-8 8H56a8 8 0 0 1-8-8v-72Z' opacity='.2'/%3E%3Cpath d='M200 40H56a16 16 0 0 0-16 16v144a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16V56a16 16 0 0 0-16-16m0 16v64H56V56Zm0 144H56v-64h144z'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-trash-duotone,.i-ph\\:trash-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M200 56v152a8 8 0 0 1-8 8H64a8 8 0 0 1-8-8V56Z' opacity='.2'/%3E%3Cpath d='M216 48h-40v-8a24 24 0 0 0-24-24h-48a24 24 0 0 0-24 24v8H40a8 8 0 0 0 0 16h8v144a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16V64h8a8 8 0 0 0 0-16M96 40a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8v8H96Zm96 168H64V64h128Zm-80-104v64a8 8 0 0 1-16 0v-64a8 8 0 0 1 16 0m48 0v64a8 8 0 0 1-16 0v-64a8 8 0 0 1 16 0'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-warning-duotone,.i-ph\\:warning-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M215.46 216H40.54c-12.62 0-20.54-13.21-14.41-23.91l87.46-151.87c6.3-11 22.52-11 28.82 0l87.46 151.87c6.13 10.7-1.79 23.91-14.41 23.91' opacity='.2'/%3E%3Cpath d='M236.8 188.09L149.35 36.22a24.76 24.76 0 0 0-42.7 0L19.2 188.09a23.51 23.51 0 0 0 0 23.72A24.35 24.35 0 0 0 40.55 224h174.9a24.35 24.35 0 0 0 21.33-12.19a23.51 23.51 0 0 0 .02-23.72m-13.87 15.71a8.5 8.5 0 0 1-7.48 4.2H40.55a8.5 8.5 0 0 1-7.48-4.2a7.59 7.59 0 0 1 0-7.72l87.45-151.87a8.75 8.75 0 0 1 15 0l87.45 151.87a7.59 7.59 0 0 1-.04 7.72M120 144v-40a8 8 0 0 1 16 0v40a8 8 0 0 1-16 0m20 36a12 12 0 1 1-12-12a12 12 0 0 1 12 12'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-wrench-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M224 96a64 64 0 0 1-94.94 56L73 217a24 24 0 0 1-34-34l65-56.06a64 64 0 0 1 80-90.29L144 80l5.66 26.34L176 112l43.35-40A63.8 63.8 0 0 1 224 96' opacity='.2'/%3E%3Cpath d='M226.76 69a8 8 0 0 0-12.84-2.88l-40.3 37.19l-17.23-3.7l-3.7-17.23l37.19-40.3A8 8 0 0 0 187 29.24A72 72 0 0 0 88 96a72.3 72.3 0 0 0 6 28.94L33.79 177c-.15.12-.29.26-.43.39a32 32 0 0 0 45.26 45.26c.13-.13.27-.28.39-.42L131.06 162A72 72 0 0 0 232 96a71.6 71.6 0 0 0-5.24-27M160 152a56.14 56.14 0 0 1-27.07-7a8 8 0 0 0-9.92 1.77l-55.9 64.74a16 16 0 0 1-22.62-22.62L109.18 133a8 8 0 0 0 1.77-9.93a56 56 0 0 1 58.36-82.31l-31.2 33.81a8 8 0 0 0-1.94 7.1l5.66 26.33a8 8 0 0 0 6.14 6.14l26.35 5.66a8 8 0 0 0 7.1-1.94l33.81-31.2A56.06 56.06 0 0 1 160 152'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph-x{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M205.66 194.34a8 8 0 0 1-11.32 11.32L128 139.31l-66.34 66.35a8 8 0 0 1-11.32-11.32L116.69 128L50.34 61.66a8 8 0 0 1 11.32-11.32L128 116.69l66.34-66.35a8 8 0 0 1 11.32 11.32L139.31 128Z'/%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph\\:bell-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M208 192H48a8 8 0 0 1-6.88-12C47.71 168.6 56 139.81 56 104a72 72 0 0 1 144 0c0 35.82 8.3 64.6 14.9 76a8 8 0 0 1-6.9 12' opacity='.2'/%3E%3Cpath d='M221.8 175.94c-5.55-9.56-13.8-36.61-13.8-71.94a80 80 0 1 0-160 0c0 35.34-8.26 62.38-13.81 71.94A16 16 0 0 0 48 200h40.81a40 40 0 0 0 78.38 0H208a16 16 0 0 0 13.8-24.06M128 216a24 24 0 0 1-22.62-16h45.24A24 24 0 0 1 128 216m-80-32c7.7-13.24 16-43.92 16-80a64 64 0 1 1 128 0c0 36.05 8.28 66.73 16 80Z'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph\\:bell-slash-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M208 192H48a8 8 0 0 1-6.88-12C47.71 168.6 56 139.81 56 104a72 72 0 0 1 144 0c0 35.82 8.3 64.6 14.9 76a8 8 0 0 1-6.9 12' opacity='.2'/%3E%3Cpath d='M53.92 34.62a8 8 0 1 0-11.84 10.76L58.82 63.8A79.6 79.6 0 0 0 48 104c0 35.34-8.26 62.38-13.81 71.94A16 16 0 0 0 48 200h40.8a40 40 0 0 0 78.4 0h15.44l19.44 21.38a8 8 0 1 0 11.84-10.76ZM128 216a24 24 0 0 1-22.62-16h45.24A24 24 0 0 1 128 216m-80-32c7.7-13.24 16-43.92 16-80a63.65 63.65 0 0 1 6.26-27.62L168.09 184Zm166-4.73a8.1 8.1 0 0 1-2.93.55a8 8 0 0 1-7.44-5.08C196.35 156.19 192 129.75 192 104a64 64 0 0 0-95.57-55.69a8 8 0 0 1-7.9-13.91A80 80 0 0 1 208 104c0 35.35 8.05 58.59 10.52 64.88a8 8 0 0 1-4.52 10.37Z'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph\\:bug-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M208 128v16a80 80 0 0 1-160 0v-16Z' opacity='.2'/%3E%3Cpath d='M144 92a12 12 0 1 1 12 12a12 12 0 0 1-12-12m-44-12a12 12 0 1 0 12 12a12 12 0 0 0-12-12m116 64a87.8 87.8 0 0 1-3 23l22.24 9.72A8 8 0 0 1 232 192a7.9 7.9 0 0 1-3.2-.67L207.38 182a88 88 0 0 1-158.76 0l-21.42 9.33a7.9 7.9 0 0 1-3.2.67a8 8 0 0 1-3.2-15.33L43 167a87.8 87.8 0 0 1-3-23v-8H16a8 8 0 0 1 0-16h24v-8a87.8 87.8 0 0 1 3-23l-22.2-9.67a8 8 0 1 1 6.4-14.66L48.62 74a88 88 0 0 1 158.76 0l21.42-9.36a8 8 0 0 1 6.4 14.66L213 89.05a87.8 87.8 0 0 1 3 23v8h24a8 8 0 0 1 0 16h-24ZM56 120h144v-8a72 72 0 0 0-144 0Zm64 95.54V136H56v8a72.08 72.08 0 0 0 64 71.54M200 144v-8h-64v79.54A72.08 72.08 0 0 0 200 144'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph\\:check-circle-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M224 128a96 96 0 1 1-96-96a96 96 0 0 1 96 96' opacity='.2'/%3E%3Cpath d='M173.66 98.34a8 8 0 0 1 0 11.32l-56 56a8 8 0 0 1-11.32 0l-24-24a8 8 0 0 1 11.32-11.32L112 148.69l50.34-50.35a8 8 0 0 1 11.32 0M232 128A104 104 0 1 1 128 24a104.11 104.11 0 0 1 104 104m-16 0a88 88 0 1 0-88 88a88.1 88.1 0 0 0 88-88'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph\\:file-code-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M208 88h-56V32Z' opacity='.2'/%3E%3Cpath d='M181.66 146.34a8 8 0 0 1 0 11.32l-24 24a8 8 0 0 1-11.32-11.32L164.69 152l-18.35-18.34a8 8 0 0 1 11.32-11.32Zm-72-24a8 8 0 0 0-11.32 0l-24 24a8 8 0 0 0 0 11.32l24 24a8 8 0 0 0 11.32-11.32L91.31 152l18.35-18.34a8 8 0 0 0 0-11.32M216 88v128a16 16 0 0 1-16 16H56a16 16 0 0 1-16-16V40a16 16 0 0 1 16-16h96a8 8 0 0 1 5.66 2.34l56 56A8 8 0 0 1 216 88m-56-8h28.69L160 51.31Zm40 136V96h-48a8 8 0 0 1-8-8V40H56v176z'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph\\:funnel-x-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M221.9 61.38L152 136v58.65a8 8 0 0 1-3.56 6.66l-32 21.33A8 8 0 0 1 104 216v-80L34.1 61.38A8 8 0 0 1 40 48h176a8 8 0 0 1 5.9 13.38' opacity='.2'/%3E%3Cpath d='M227.82 66.76A16 16 0 0 0 216 40H40a16 16 0 0 0-11.81 26.76l.08.09L96 139.17V216a16 16 0 0 0 24.87 13.32l32-21.34a16 16 0 0 0 7.13-13.32v-55.49l67.73-72.32Zm-81.63 63.83A8 8 0 0 0 144 136v58.66L112 216v-80a8 8 0 0 0-2.16-5.46L40 56h176Zm99.49 79.81a8 8 0 0 1-11.32 11.32L216 203.32l-18.34 18.35a8 8 0 0 1-11.31-11.32L204.69 192l-18.34-18.35a8 8 0 0 1 11.31-11.31L216 180.69l18.34-18.34a8 8 0 0 1 11.32 11.31L227.31 192Z'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph\\:globe-simple-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M224 128a96 96 0 1 1-96-96a96 96 0 0 1 96 96' opacity='.2'/%3E%3Cpath d='M128 24a104 104 0 1 0 104 104A104.12 104.12 0 0 0 128 24m87.62 96h-39.83c-1.79-36.51-15.85-62.33-27.38-77.6a88.19 88.19 0 0 1 67.22 77.6ZM96.23 136h63.54c-2.31 41.61-22.23 67.11-31.77 77c-9.55-9.9-29.46-35.4-31.77-77m0-16c2.31-41.61 22.23-67.11 31.77-77c9.55 9.93 29.46 35.43 31.77 77Zm11.36-77.6C96.06 57.67 82 83.49 80.21 120H40.37a88.19 88.19 0 0 1 67.22-77.6M40.37 136h39.84c1.82 36.51 15.85 62.33 27.38 77.6A88.19 88.19 0 0 1 40.37 136m108 77.6c11.53-15.27 25.56-41.09 27.38-77.6h39.84a88.19 88.19 0 0 1-67.18 77.6Z'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph\\:hexagon-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M224 80.18v95.64a8 8 0 0 1-4.16 7l-88 48.18a8 8 0 0 1-7.68 0l-88-48.18a8 8 0 0 1-4.16-7V80.18a8 8 0 0 1 4.16-7l88-48.18a8 8 0 0 1 7.68 0l88 48.18a8 8 0 0 1 4.16 7' opacity='.2'/%3E%3Cpath d='m223.68 66.15l-88-48.15a15.88 15.88 0 0 0-15.36 0l-88 48.17a16 16 0 0 0-8.32 14v95.64a16 16 0 0 0 8.32 14l88 48.17a15.88 15.88 0 0 0 15.36 0l88-48.17a16 16 0 0 0 8.32-14V80.18a16 16 0 0 0-8.32-14.03M216 175.82L128 224l-88-48.18V80.18L128 32l88 48.17Z'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph\\:info-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M224 128a96 96 0 1 1-96-96a96 96 0 0 1 96 96' opacity='.2'/%3E%3Cpath d='M144 176a8 8 0 0 1-8 8a16 16 0 0 1-16-16v-40a8 8 0 0 1 0-16a16 16 0 0 1 16 16v40a8 8 0 0 1 8 8m88-48A104 104 0 1 1 128 24a104.11 104.11 0 0 1 104 104m-16 0a88 88 0 1 0-88 88a88.1 88.1 0 0 0 88-88m-92-32a12 12 0 1 0-12-12a12 12 0 0 0 12 12'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph\\:sort-ascending-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M224 80v88l-24 24H48V64h160a16 16 0 0 1 16 16' opacity='.2'/%3E%3Cpath d='M128 128a8 8 0 0 1-8 8H48a8 8 0 0 1 0-16h72a8 8 0 0 1 8 8M48 72h136a8 8 0 0 0 0-16H48a8 8 0 0 0 0 16m56 112H48a8 8 0 0 0 0 16h56a8 8 0 0 0 0-16m125.66-21.66a8 8 0 0 0-11.32 0L192 188.69V112a8 8 0 0 0-16 0v76.69l-26.34-26.35a8 8 0 0 0-11.32 11.32l40 40a8 8 0 0 0 11.32 0l40-40a8 8 0 0 0 0-11.32'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph\\:sort-descending-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M224 88v88a16 16 0 0 1-16 16H48V64h152Z' opacity='.2'/%3E%3Cpath d='M40 128a8 8 0 0 1 8-8h72a8 8 0 0 1 0 16H48a8 8 0 0 1-8-8m8-56h56a8 8 0 0 0 0-16H48a8 8 0 0 0 0 16m136 112H48a8 8 0 0 0 0 16h136a8 8 0 0 0 0-16m45.66-101.66l-40-40a8 8 0 0 0-11.32 0l-40 40a8 8 0 0 0 11.32 11.32L176 67.31V144a8 8 0 0 0 16 0V67.31l26.34 26.35a8 8 0 0 0 11.32-11.32'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph\\:timer-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M216 136a88 88 0 1 1-88-88a88 88 0 0 1 88 88' opacity='.2'/%3E%3Cpath d='M128 40a96 96 0 1 0 96 96a96.11 96.11 0 0 0-96-96m0 176a80 80 0 1 1 80-80a80.09 80.09 0 0 1-80 80m45.66-125.66a8 8 0 0 1 0 11.32l-40 40a8 8 0 0 1-11.32-11.32l40-40a8 8 0 0 1 11.32 0M96 16a8 8 0 0 1 8-8h48a8 8 0 0 1 0 16h-48a8 8 0 0 1-8-8'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph\\:warning-diamond-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='m229.67 133.62l-96 96a7.94 7.94 0 0 1-11.24 0l-96-96a7.94 7.94 0 0 1 0-11.24l96.05-96a7.94 7.94 0 0 1 11.24 0l96 96.05a7.94 7.94 0 0 1-.05 11.19' opacity='.2'/%3E%3Cpath d='M128 72a8 8 0 0 1 8 8v56a8 8 0 0 1-16 0V80a8 8 0 0 1 8-8m-12 100a12 12 0 1 0 12-12a12 12 0 0 0-12 12m124-44a15.85 15.85 0 0 1-4.67 11.28l-96.05 96.06a16 16 0 0 1-22.56 0l-96-96.06a16 16 0 0 1 0-22.56l96.05-96.06a16 16 0 0 1 22.56 0l96.05 96.06A15.85 15.85 0 0 1 240 128m-16 0l-96-96l-96 96l96 96Z'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-ph\\:x-circle-duotone{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M224 128a96 96 0 1 1-96-96a96 96 0 0 1 96 96' opacity='.2'/%3E%3Cpath d='M165.66 101.66L139.31 128l26.35 26.34a8 8 0 0 1-11.32 11.32L128 139.31l-26.34 26.35a8 8 0 0 1-11.32-11.32L116.69 128l-26.35-26.34a8 8 0 0 1 11.32-11.32L128 116.69l26.34-26.35a8 8 0 0 1 11.32 11.32M232 128A104 104 0 1 1 128 24a104.11 104.11 0 0 1 104 104m-16 0a88 88 0 1 0-88 88a88.1 88.1 0 0 0 88-88'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.i-svg-spinners-8-dots-rotate{--vdt-icon:url(\"data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Ccircle cx='3' cy='12' r='2' fill='currentColor'/%3E%3Ccircle cx='21' cy='12' r='2' fill='currentColor'/%3E%3Ccircle cx='12' cy='21' r='2' fill='currentColor'/%3E%3Ccircle cx='12' cy='3' r='2' fill='currentColor'/%3E%3Ccircle cx='5.64' cy='5.64' r='2' fill='currentColor'/%3E%3Ccircle cx='18.36' cy='18.36' r='2' fill='currentColor'/%3E%3Ccircle cx='5.64' cy='18.36' r='2' fill='currentColor'/%3E%3Ccircle cx='18.36' cy='5.64' r='2' fill='currentColor'/%3E%3CanimateTransform attributeName='transform' dur='1.5s' repeatCount='indefinite' type='rotate' values='0 12 12;360 12 12'/%3E%3C/g%3E%3C/svg%3E\");-webkit-mask:var(--vdt-icon) no-repeat;mask:var(--vdt-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;mask-size:100% 100%}.container{width:100%}.z-command-palette{z-index:2147483646}.z-floating-anchor{z-index:2147483644}.z-floating-tooltip{z-index:2147483645}.border-base{--vdt-border-opacity:.13;border-color:rgba(136,136,136,var(--vdt-border-opacity))}.hover\\:border-base:hover{--vdt-border-opacity:.13;border-color:rgba(136,136,136,var(--vdt-border-opacity))}.bg-active{--vdt-bg-opacity:.07;background-color:rgba(136,136,136,var(--vdt-bg-opacity))}.bg-base{--vdt-bg-opacity:1;background-color:rgba(255,255,255,var(--vdt-bg-opacity))}.bg-glass{--vdt-backdrop-blur:blur(7px);backdrop-filter:var(--vdt-backdrop-blur) var(--vdt-backdrop-brightness) var(--vdt-backdrop-contrast) var(--vdt-backdrop-grayscale) var(--vdt-backdrop-hue-rotate) var(--vdt-backdrop-invert) var(--vdt-backdrop-opacity) var(--vdt-backdrop-saturate) var(--vdt-backdrop-sepia);background-color:rgba(255,255,255,.5)}.bg-glass\\:75{--vdt-backdrop-blur:blur(7px);backdrop-filter:var(--vdt-backdrop-blur) var(--vdt-backdrop-brightness) var(--vdt-backdrop-contrast) var(--vdt-backdrop-grayscale) var(--vdt-backdrop-hue-rotate) var(--vdt-backdrop-invert) var(--vdt-backdrop-opacity) var(--vdt-backdrop-saturate) var(--vdt-backdrop-sepia);background-color:rgba(255,255,255,.75)}.hover\\:bg-active:hover{--vdt-bg-opacity:.07;background-color:rgba(136,136,136,var(--vdt-bg-opacity))}.color-base{--vdt-text-opacity:1;color:rgba(38,38,38,var(--vdt-text-opacity))}@media (prefers-color-scheme:dark){.bg-base{--vdt-bg-opacity:1;background-color:rgba(17,17,17,var(--vdt-bg-opacity))}.bg-glass{background-color:rgba(17,17,17,.5)}.bg-glass\\:75{background-color:rgba(17,17,17,.75)}.color-base{--vdt-text-opacity:1;color:rgba(229,229,229,var(--vdt-text-opacity))}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.disabled\\:pointer-events-none:disabled{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{top:0;bottom:0;left:0;right:0}.bottom-0{bottom:0}.bottom-4{bottom:1rem}.bottom-4px{bottom:4px}.left--1{left:-.25rem}.left-0{left:0}.left-1\\/2{left:50%}.left-2{left:.5rem}.left-5px{left:5px}.right--1{right:-.25rem}.right--1px{right:-1px}.right-0{right:0}.right-2{right:.5rem}.right-4{right:1rem}.top--32px{top:-32px}.top-0\\.5{top:.125rem}.top-1{top:.25rem}.top-1\\/2{top:50%}.top-4px{top:4px}.z--1{z-index:-1}.z-2147483647{z-index:2147483647}.grid{display:grid}.cols-\\[max-content_1fr\\]{grid-template-columns:max-content 1fr}.grid-cols-\\[1fr_1fr\\]{grid-template-columns:1fr 1fr}.grid-rows-\\[max-content_1fr\\]{grid-template-rows:max-content 1fr}.m-auto,.ma{margin:auto}.m1{margin:.25rem}.mx--1{margin-left:-.25rem;margin-right:-.25rem}.mx-0\\.5{margin-left:.125rem;margin-right:.125rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-1{margin-bottom:.25rem}.mb-1\\.5{margin-bottom:.375rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb2{margin-bottom:.5rem}.ml-2{margin-left:.5rem}.ml-6{margin-left:1.5rem}.mr-1{margin-right:.25rem}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt2{margin-top:.5rem}.mt6{margin-top:1.5rem}.mt8{margin-top:2rem}.box-border{box-sizing:border-box}.inline{display:inline}.block{display:block}.hidden{display:none}.h-0\\.5{height:.125rem}.h-1\\.5{height:.375rem}.h-10{height:2.5rem}.h-20{height:5rem}.h-20px{height:20px}.h-3{height:.75rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-4\\.5{height:1.125rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\\[60vh\\]{max-height:60vh}.max-w-150{max-width:37.5rem}.max-w-200{max-width:50rem}.max-w-220px{max-width:220px}.min-h-0{min-height:0}.min-w-0{min-width:0}.min-w-28{min-width:7rem}.min-w-36{min-width:9rem}.w-\\[40px\\]{width:40px}.w-1\\.5{width:.375rem}.w-10{width:2.5rem}.w-2\\.5{width:.625rem}.w-20{width:5rem}.w-20px{width:20px}.w-2px{width:2px}.w-3{width:.75rem}.w-3\\.5{width:.875rem}.w-4{width:1rem}.w-4\\.5{width:1.125rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-96{width:24rem}.w-fit{width:fit-content}.w-full{width:100%}.w-lg{width:32rem}.w-max{width:max-content}.w-px{width:1px}.w-screen{width:100vw}.flex{display:flex}.flex-1{flex:1}.flex-auto{flex:auto}.flex-none{flex:none}.shrink-0{flex-shrink:0}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.-translate-y-2{--vdt-translate-y:-.5rem;transform:translateX(var(--vdt-translate-x)) translateY(var(--vdt-translate-y)) translateZ(var(--vdt-translate-z)) rotate(var(--vdt-rotate)) rotateX(var(--vdt-rotate-x)) rotateY(var(--vdt-rotate-y)) rotateZ(var(--vdt-rotate-z)) skewX(var(--vdt-skew-x)) skewY(var(--vdt-skew-y)) scaleX(var(--vdt-scale-x)) scaleY(var(--vdt-scale-y)) scaleZ(var(--vdt-scale-z))}.translate-x--1\\/2{--vdt-translate-x:-50%;transform:translateX(var(--vdt-translate-x)) translateY(var(--vdt-translate-y)) translateZ(var(--vdt-translate-z)) rotate(var(--vdt-rotate)) rotateX(var(--vdt-rotate-x)) rotateY(var(--vdt-rotate-y)) rotateZ(var(--vdt-rotate-z)) skewX(var(--vdt-skew-x)) skewY(var(--vdt-skew-y)) scaleX(var(--vdt-scale-x)) scaleY(var(--vdt-scale-y)) scaleZ(var(--vdt-scale-z))}.translate-x-1{--vdt-translate-x:.25rem;transform:translateX(var(--vdt-translate-x)) translateY(var(--vdt-translate-y)) translateZ(var(--vdt-translate-z)) rotate(var(--vdt-rotate)) rotateX(var(--vdt-rotate-x)) rotateY(var(--vdt-rotate-y)) rotateZ(var(--vdt-rotate-z)) skewX(var(--vdt-skew-x)) skewY(var(--vdt-skew-y)) scaleX(var(--vdt-scale-x)) scaleY(var(--vdt-scale-y)) scaleZ(var(--vdt-scale-z))}.translate-x-4{--vdt-translate-x:1rem;transform:translateX(var(--vdt-translate-x)) translateY(var(--vdt-translate-y)) translateZ(var(--vdt-translate-z)) rotate(var(--vdt-rotate)) rotateX(var(--vdt-rotate-x)) rotateY(var(--vdt-rotate-y)) rotateZ(var(--vdt-rotate-z)) skewX(var(--vdt-skew-x)) skewY(var(--vdt-skew-y)) scaleX(var(--vdt-scale-x)) scaleY(var(--vdt-scale-y)) scaleZ(var(--vdt-scale-z))}.translate-x-5{--vdt-translate-x:1.25rem;transform:translateX(var(--vdt-translate-x)) translateY(var(--vdt-translate-y)) translateZ(var(--vdt-translate-z)) rotate(var(--vdt-rotate)) rotateX(var(--vdt-rotate-x)) rotateY(var(--vdt-rotate-y)) rotateZ(var(--vdt-rotate-z)) skewX(var(--vdt-skew-x)) skewY(var(--vdt-skew-y)) scaleX(var(--vdt-scale-x)) scaleY(var(--vdt-scale-y)) scaleZ(var(--vdt-scale-z))}.translate-y--1\\/2{--vdt-translate-y:-50%;transform:translateX(var(--vdt-translate-x)) translateY(var(--vdt-translate-y)) translateZ(var(--vdt-translate-z)) rotate(var(--vdt-rotate)) rotateX(var(--vdt-rotate-x)) rotateY(var(--vdt-rotate-y)) rotateZ(var(--vdt-rotate-z)) skewX(var(--vdt-skew-x)) skewY(var(--vdt-skew-y)) scaleX(var(--vdt-scale-x)) scaleY(var(--vdt-scale-y)) scaleZ(var(--vdt-scale-z))}.translate-y-0{--vdt-translate-y:0;transform:translateX(var(--vdt-translate-x)) translateY(var(--vdt-translate-y)) translateZ(var(--vdt-translate-z)) rotate(var(--vdt-rotate)) rotateX(var(--vdt-rotate-x)) rotateY(var(--vdt-rotate-y)) rotateZ(var(--vdt-rotate-z)) skewX(var(--vdt-skew-x)) skewY(var(--vdt-skew-y)) scaleX(var(--vdt-scale-x)) scaleY(var(--vdt-scale-y)) scaleZ(var(--vdt-scale-z))}.rotate--45{--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-rotate:-45deg;transform:translateX(var(--vdt-translate-x)) translateY(var(--vdt-translate-y)) translateZ(var(--vdt-translate-z)) rotate(var(--vdt-rotate)) rotateX(var(--vdt-rotate-x)) rotateY(var(--vdt-rotate-y)) rotateZ(var(--vdt-rotate-z)) skewX(var(--vdt-skew-x)) skewY(var(--vdt-skew-y)) scaleX(var(--vdt-scale-x)) scaleY(var(--vdt-scale-y)) scaleZ(var(--vdt-scale-z))}.rotate-0{--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-rotate:0deg;transform:translateX(var(--vdt-translate-x)) translateY(var(--vdt-translate-y)) translateZ(var(--vdt-translate-z)) rotate(var(--vdt-rotate)) rotateX(var(--vdt-rotate-x)) rotateY(var(--vdt-rotate-y)) rotateZ(var(--vdt-rotate-z)) skewX(var(--vdt-skew-x)) skewY(var(--vdt-skew-y)) scaleX(var(--vdt-scale-x)) scaleY(var(--vdt-scale-y)) scaleZ(var(--vdt-scale-z))}.rotate-180{--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-rotate:180deg;transform:translateX(var(--vdt-translate-x)) translateY(var(--vdt-translate-y)) translateZ(var(--vdt-translate-z)) rotate(var(--vdt-rotate)) rotateX(var(--vdt-rotate-x)) rotateY(var(--vdt-rotate-y)) rotateZ(var(--vdt-rotate-z)) skewX(var(--vdt-skew-x)) skewY(var(--vdt-skew-y)) scaleX(var(--vdt-scale-x)) scaleY(var(--vdt-scale-y)) scaleZ(var(--vdt-scale-z))}.rotate-270{--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-rotate:270deg;transform:translateX(var(--vdt-translate-x)) translateY(var(--vdt-translate-y)) translateZ(var(--vdt-translate-z)) rotate(var(--vdt-rotate)) rotateX(var(--vdt-rotate-x)) rotateY(var(--vdt-rotate-y)) rotateZ(var(--vdt-rotate-z)) skewX(var(--vdt-skew-x)) skewY(var(--vdt-skew-y)) scaleX(var(--vdt-scale-x)) scaleY(var(--vdt-scale-y)) scaleZ(var(--vdt-scale-z))}.rotate-90{--vdt-rotate-x:0;--vdt-rotate-y:0;--vdt-rotate-z:0;--vdt-rotate:90deg;transform:translateX(var(--vdt-translate-x)) translateY(var(--vdt-translate-y)) translateZ(var(--vdt-translate-z)) rotate(var(--vdt-rotate)) rotateX(var(--vdt-rotate-x)) rotateY(var(--vdt-rotate-y)) rotateZ(var(--vdt-rotate-z)) skewX(var(--vdt-skew-x)) skewY(var(--vdt-skew-y)) scaleX(var(--vdt-scale-x)) scaleY(var(--vdt-scale-y)) scaleZ(var(--vdt-scale-z))}.scale-100{--vdt-scale-x:1;--vdt-scale-y:1;transform:translateX(var(--vdt-translate-x)) translateY(var(--vdt-translate-y)) translateZ(var(--vdt-translate-z)) rotate(var(--vdt-rotate)) rotateX(var(--vdt-rotate-x)) rotateY(var(--vdt-rotate-y)) rotateZ(var(--vdt-rotate-z)) skewX(var(--vdt-skew-x)) skewY(var(--vdt-skew-y)) scaleX(var(--vdt-scale-x)) scaleY(var(--vdt-scale-y)) scaleZ(var(--vdt-scale-z))}.scale-120{--vdt-scale-x:1.2;--vdt-scale-y:1.2;transform:translateX(var(--vdt-translate-x)) translateY(var(--vdt-translate-y)) translateZ(var(--vdt-translate-z)) rotate(var(--vdt-rotate)) rotateX(var(--vdt-rotate-x)) rotateY(var(--vdt-rotate-y)) rotateZ(var(--vdt-rotate-z)) skewX(var(--vdt-skew-x)) skewY(var(--vdt-skew-y)) scaleX(var(--vdt-scale-x)) scaleY(var(--vdt-scale-y)) scaleZ(var(--vdt-scale-z))}.scale-98{--vdt-scale-x:.98;--vdt-scale-y:.98;transform:translateX(var(--vdt-translate-x)) translateY(var(--vdt-translate-y)) translateZ(var(--vdt-translate-z)) rotate(var(--vdt-rotate)) rotateX(var(--vdt-rotate-x)) rotateY(var(--vdt-rotate-y)) rotateZ(var(--vdt-rotate-z)) skewX(var(--vdt-skew-x)) skewY(var(--vdt-skew-y)) scaleX(var(--vdt-scale-x)) scaleY(var(--vdt-scale-y)) scaleZ(var(--vdt-scale-z))}.hover\\:scale-110:hover{--vdt-scale-x:1.1;--vdt-scale-y:1.1;transform:translateX(var(--vdt-translate-x)) translateY(var(--vdt-translate-y)) translateZ(var(--vdt-translate-z)) rotate(var(--vdt-rotate)) rotateX(var(--vdt-rotate-x)) rotateY(var(--vdt-rotate-y)) rotateZ(var(--vdt-rotate-z)) skewX(var(--vdt-skew-x)) skewY(var(--vdt-skew-y)) scaleX(var(--vdt-scale-x)) scaleY(var(--vdt-scale-y)) scaleZ(var(--vdt-scale-z))}.scale-y--100{--vdt-scale-y:-1;transform:translateX(var(--vdt-translate-x)) translateY(var(--vdt-translate-y)) translateZ(var(--vdt-translate-z)) rotate(var(--vdt-rotate)) rotateX(var(--vdt-rotate-x)) rotateY(var(--vdt-rotate-y)) rotateZ(var(--vdt-rotate-z)) skewX(var(--vdt-skew-x)) skewY(var(--vdt-skew-y)) scaleX(var(--vdt-scale-x)) scaleY(var(--vdt-scale-y)) scaleZ(var(--vdt-scale-z))}.transform{transform:translateX(var(--vdt-translate-x)) translateY(var(--vdt-translate-y)) translateZ(var(--vdt-translate-z)) rotate(var(--vdt-rotate)) rotateX(var(--vdt-rotate-x)) rotateY(var(--vdt-rotate-y)) rotateZ(var(--vdt-rotate-z)) skewX(var(--vdt-skew-x)) skewY(var(--vdt-skew-y)) scaleX(var(--vdt-scale-x)) scaleY(var(--vdt-scale-y)) scaleZ(var(--vdt-scale-z))}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:1s linear infinite spin}.cursor-pointer{cursor:pointer}.cursor-not-allowed{cursor:not-allowed}.select-none{user-select:none}.resize{resize:both}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0}.gap-0\\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-2{column-gap:.5rem}.gap-y-0\\.5{row-gap:.125rem}.space-y-0\\.5>:not([hidden])~:not([hidden]){--vdt-space-y-reverse:0;margin-top:calc(.125rem * calc(1 - var(--vdt-space-y-reverse)));margin-bottom:calc(.125rem * var(--vdt-space-y-reverse))}.of-auto,.overflow-auto{overflow:auto}.of-hidden,.overflow-hidden{overflow:hidden}.of-x-auto,.overflow-x-auto{overflow-x:auto}.of-y-auto{overflow-y:auto}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.whitespace-pre-wrap{white-space:pre-wrap}.ws-nowrap{white-space:nowrap}.border{border-width:1px}.border-1\\.5{border-width:1.5px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0}.border-b-1\\.5{border-bottom-width:1.5px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-r-1\\.5{border-right-width:1.5px}.border-t{border-top-width:1px}.border-t-0{border-top-width:0}.last\\:border-b-0:last-child{border-bottom-width:0}.border-amber\\/20{border-color:rgba(251,191,36,.2)}.border-current{border-color:currentColor}.border-primary\\/30{border-color:rgba(213,119,255,.3)}.border-transparent{border-color:transparent}.focus-within\\:border-gray\\/15:focus-within{border-color:rgba(156,163,175,.15)}.hover\\:border-gray\\/10:hover{border-color:rgba(156,163,175,.1)}.focus\\:border-primary\\/40:focus{border-color:rgba(213,119,255,.4)}.focus\\:border-purple:focus{--vdt-border-opacity:1;border-color:rgba(192,132,252,var(--vdt-border-opacity))}.focus\\:border-violet:focus{--vdt-border-opacity:1;border-color:rgba(167,139,250,var(--vdt-border-opacity))}.border-t-transparent{border-top-color:transparent}.rounded{-webkit-border-radius:.25rem;border-radius:.25rem}.rounded-full{-webkit-border-radius:9999px;border-radius:9999px}.rounded-lg{-webkit-border-radius:.5rem;border-radius:.5rem}.rounded-md{-webkit-border-radius:.375rem;border-radius:.375rem}.rounded-xl{-webkit-border-radius:.75rem;border-radius:.75rem}.rounded-r{-webkit-border-top-right-radius:.25rem;border-top-right-radius:.25rem;-webkit-border-bottom-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-t{-webkit-border-top-left-radius:.25rem;border-top-left-radius:.25rem;-webkit-border-top-right-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-md{-webkit-border-top-left-radius:.375rem;border-top-left-radius:.375rem;-webkit-border-top-right-radius:.375rem;border-top-right-radius:.375rem}.bg-\\[\\#8881\\]{--vdt-bg-opacity:.07;background-color:rgba(136,136,136,var(--vdt-bg-opacity))}.bg-amber{--vdt-bg-opacity:1;background-color:rgba(251,191,36,var(--vdt-bg-opacity))}.bg-amber\\/10{background-color:rgba(251,191,36,.1)}.bg-black{--vdt-bg-opacity:1;background-color:rgba(0,0,0,var(--vdt-bg-opacity))}.bg-black\\/30{background-color:rgba(0,0,0,.3)}.bg-blue{--vdt-bg-opacity:1;background-color:rgba(96,165,250,var(--vdt-bg-opacity))}.bg-blue\\/10{background-color:rgba(96,165,250,.1)}.bg-gray{--vdt-bg-opacity:1;background-color:rgba(156,163,175,var(--vdt-bg-opacity))}.bg-gray-6{--vdt-bg-opacity:1;background-color:rgba(75,85,99,var(--vdt-bg-opacity))}.bg-gray\\/10{background-color:rgba(156,163,175,.1)}.bg-gray\\/20{background-color:rgba(156,163,175,.2)}.bg-gray\\/30{background-color:rgba(156,163,175,.3)}.bg-gray\\/5{background-color:rgba(156,163,175,.05)}.bg-green{--vdt-bg-opacity:1;background-color:rgba(74,222,128,var(--vdt-bg-opacity))}.bg-green\\:5{background-color:rgba(74,222,128,.05)}.bg-lime{--vdt-bg-opacity:1;background-color:rgba(163,230,53,var(--vdt-bg-opacity))}.bg-lime\\/20{background-color:rgba(163,230,53,.2)}.bg-lime6{--vdt-bg-opacity:1;background-color:rgba(101,163,13,var(--vdt-bg-opacity))}.bg-orange\\/10{background-color:rgba(251,146,60,.1)}.bg-primary{--vdt-bg-opacity:1;background-color:rgba(213,119,255,var(--vdt-bg-opacity))}.bg-primary\\/10{background-color:rgba(213,119,255,.1)}.bg-primary\\/15{background-color:rgba(213,119,255,.15)}.bg-red{--vdt-bg-opacity:1;background-color:rgba(248,113,113,var(--vdt-bg-opacity))}.bg-red\\/10{background-color:rgba(248,113,113,.1)}.bg-transparent{background-color:transparent}.bg-violet{--vdt-bg-opacity:1;background-color:rgba(167,139,250,var(--vdt-bg-opacity))}.bg-white{--vdt-bg-opacity:1;background-color:rgba(255,255,255,var(--vdt-bg-opacity))}.bg-white\\/50{background-color:rgba(255,255,255,.5)}.hover\\:bg-\\[\\#8881\\]:hover{--vdt-bg-opacity:.07;background-color:rgba(136,136,136,var(--vdt-bg-opacity))}.hover\\:bg-\\[\\#8882\\]:hover{--vdt-bg-opacity:.13;background-color:rgba(136,136,136,var(--vdt-bg-opacity))}.hover\\:bg-gray\\/10:hover{background-color:rgba(156,163,175,.1)}.hover\\:bg-gray\\/15:hover{background-color:rgba(156,163,175,.15)}.hover\\:bg-gray\\/20:hover{background-color:rgba(156,163,175,.2)}.hover\\:bg-gray\\/5:hover{background-color:rgba(156,163,175,.05)}.hover\\:bg-lime7:hover{--vdt-bg-opacity:1;background-color:rgba(77,124,15,var(--vdt-bg-opacity))}.hover\\:bg-orange\\/20:hover{background-color:rgba(251,146,60,.2)}.hover\\:bg-primary\\/25:hover{background-color:rgba(213,119,255,.25)}.hover\\:bg-red\\/20:hover{background-color:rgba(248,113,113,.2)}.disabled\\:bg-gray6\\!:disabled{--vdt-bg-opacity:1!important;background-color:rgba(75,85,99,var(--vdt-bg-opacity))!important}.fill-black{--vdt-fill-opacity:1;fill:rgba(0,0,0,var(--vdt-fill-opacity))}.fill-hex-08060D{--vdt-fill-opacity:1;fill:rgba(8,6,13,var(--vdt-fill-opacity))}.p-0\\.5{padding:.125rem}.p-1,.p1{padding:.25rem}.p-1\\.5,.p1\\.5{padding:.375rem}.p-2,.p2{padding:.5rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p20{padding:5rem}.p3{padding:.75rem}.p8{padding:2rem}.px,.px-4,.px4{padding-left:1rem;padding-right:1rem}.px-1,.px1{padding-left:.25rem;padding-right:.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2,.px2{padding-left:.5rem;padding-right:.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-3,.px3{padding-left:.75rem;padding-right:.75rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-top:0;padding-bottom:0}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1,.py1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5,.py1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pt-\\[20vh\\]{padding-top:20vh}.pt-3{padding-top:.75rem}.pt-6{padding-top:1.5rem}.text-center{text-align:center}.text-left{text-align:left}.indent{text-indent:1.5rem}.text-\\[10px\\]{font-size:10px}.text-\\[15px\\]{font-size:15px}.text-0\\.6em{font-size:.6em}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.text-amber{--vdt-text-opacity:1;color:rgba(251,191,36,var(--vdt-text-opacity))}.text-amber-800{--vdt-text-opacity:1;color:rgba(146,64,14,var(--vdt-text-opacity))}.text-blue{--vdt-text-opacity:1;color:rgba(96,165,250,var(--vdt-text-opacity))}.text-gray{--vdt-text-opacity:1;color:rgba(156,163,175,var(--vdt-text-opacity))}.text-green{--vdt-text-opacity:1;color:rgba(74,222,128,var(--vdt-text-opacity))}.text-green-800{--vdt-text-opacity:1;color:rgba(22,101,52,var(--vdt-text-opacity))}.text-lime{--vdt-text-opacity:1;color:rgba(163,230,53,var(--vdt-text-opacity))}.text-orange{--vdt-text-opacity:1;color:rgba(251,146,60,var(--vdt-text-opacity))}.text-primary{--vdt-text-opacity:1;color:rgba(213,119,255,var(--vdt-text-opacity))}.text-purple{--vdt-text-opacity:1;color:rgba(192,132,252,var(--vdt-text-opacity))}.text-red{--vdt-text-opacity:1;color:rgba(248,113,113,var(--vdt-text-opacity))}.text-violet{--vdt-text-opacity:1;color:rgba(167,139,250,var(--vdt-text-opacity))}.text-white{--vdt-text-opacity:1;color:rgba(255,255,255,var(--vdt-text-opacity))}.font-bold{font-weight:700}.font-medium{font-weight:500}.leading-4{line-height:1rem}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.capitalize{text-transform:capitalize}.line-through{text-decoration-line:line-through}.hover\\:underline:hover{text-decoration-line:underline}.tab{tab-size:4}.op0,.opacity-0{opacity:0}.op100,.opacity-100{opacity:1}.group:hover .group-hover\\:opacity-100{opacity:1}.op30{opacity:.3}.op40{opacity:.4}.op50{opacity:.5}.group:hover .group-hover\\:op50{opacity:.5}.op60{opacity:.6}.op60\\!{opacity:.6!important}.op70{opacity:.7}.op75{opacity:.75}.op80{opacity:.8}.hover\\:op100:hover{opacity:1}.hover\\:op100\\!:hover{opacity:1!important}.hover\\:op60:hover{opacity:.6}.hover\\:op70:hover{opacity:.7}.hover\\:op80:hover{opacity:.8}.disabled\\:op40:disabled{opacity:.4}.shadow{--vdt-shadow:var(--vdt-shadow-inset) 0 1px 3px 0 var(--vdt-shadow-color,rgba(0,0,0,.1)),var(--vdt-shadow-inset) 0 1px 2px -1px var(--vdt-shadow-color,rgba(0,0,0,.1));box-shadow:var(--vdt-ring-offset-shadow), var(--vdt-ring-shadow), var(--vdt-shadow)}.shadow-xl{--vdt-shadow:var(--vdt-shadow-inset) 0 20px 25px -5px var(--vdt-shadow-color,rgba(0,0,0,.1)),var(--vdt-shadow-inset) 0 8px 10px -6px var(--vdt-shadow-color,rgba(0,0,0,.1));box-shadow:var(--vdt-ring-offset-shadow), var(--vdt-ring-shadow), var(--vdt-shadow)}.outline-none{outline-offset:2px;outline:2px solid transparent}.focus\\:ring-1:focus{--vdt-ring-width:1px;--vdt-ring-offset-shadow:var(--vdt-ring-inset) 0 0 0 var(--vdt-ring-offset-width) var(--vdt-ring-offset-color);--vdt-ring-shadow:var(--vdt-ring-inset) 0 0 0 calc(var(--vdt-ring-width) + var(--vdt-ring-offset-width)) var(--vdt-ring-color);box-shadow:var(--vdt-ring-offset-shadow), var(--vdt-ring-shadow), var(--vdt-shadow)}.focus\\:ring-primary\\/30:focus{--vdt-ring-color:rgba(213,119,255,.3)}.backdrop-blur-0{--vdt-backdrop-blur:blur(0);backdrop-filter:var(--vdt-backdrop-blur) var(--vdt-backdrop-brightness) var(--vdt-backdrop-contrast) var(--vdt-backdrop-grayscale) var(--vdt-backdrop-hue-rotate) var(--vdt-backdrop-invert) var(--vdt-backdrop-opacity) var(--vdt-backdrop-saturate) var(--vdt-backdrop-sepia)}.backdrop-blur-1{--vdt-backdrop-blur:blur(1px);backdrop-filter:var(--vdt-backdrop-blur) var(--vdt-backdrop-brightness) var(--vdt-backdrop-contrast) var(--vdt-backdrop-grayscale) var(--vdt-backdrop-hue-rotate) var(--vdt-backdrop-invert) var(--vdt-backdrop-opacity) var(--vdt-backdrop-saturate) var(--vdt-backdrop-sepia)}.saturate-0{--vdt-saturate:saturate(0);filter:var(--vdt-blur) var(--vdt-brightness) var(--vdt-contrast) var(--vdt-drop-shadow) var(--vdt-grayscale) var(--vdt-hue-rotate) var(--vdt-invert) var(--vdt-saturate) var(--vdt-sepia)}.filter{filter:var(--vdt-blur) var(--vdt-brightness) var(--vdt-contrast) var(--vdt-drop-shadow) var(--vdt-grayscale) var(--vdt-hue-rotate) var(--vdt-invert) var(--vdt-saturate) var(--vdt-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.delay-200{transition-delay:.2s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@media (prefers-color-scheme:dark){.dark-hidden{display:none}.dark\\:bg-black\\/30{background-color:rgba(0,0,0,.3)}.dark\\:fill-hex-fff,.dark\\:fill-white{--vdt-fill-opacity:1;fill:rgba(255,255,255,var(--vdt-fill-opacity))}.dark\\:text-amber-200{--vdt-text-opacity:1;color:rgba(253,230,138,var(--vdt-text-opacity))}.dark\\:text-green-200{--vdt-text-opacity:1;color:rgba(187,247,208,var(--vdt-text-opacity))}}@media (prefers-color-scheme:light){.light-hidden{display:none}}";
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region ../../node_modules/.pnpm/fuse.js@7.1.0/node_modules/fuse.js/dist/fuse.mjs
|
|
13
|
+
/**
|
|
14
|
+
* Fuse.js v7.1.0 - Lightweight fuzzy-search (http://fusejs.io)
|
|
15
|
+
*
|
|
16
|
+
* Copyright (c) 2025 Kiro Risk (http://kiro.me)
|
|
17
|
+
* All Rights Reserved. Apache Software License 2.0
|
|
18
|
+
*
|
|
19
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
20
|
+
*/
|
|
21
|
+
function isArray(value) {
|
|
22
|
+
return !Array.isArray ? getTag(value) === "[object Array]" : Array.isArray(value);
|
|
23
|
+
}
|
|
24
|
+
const INFINITY = Infinity;
|
|
25
|
+
function baseToString(value) {
|
|
26
|
+
if (typeof value == "string") return value;
|
|
27
|
+
let result = value + "";
|
|
28
|
+
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
29
|
+
}
|
|
30
|
+
function toString(value) {
|
|
31
|
+
return value == null ? "" : baseToString(value);
|
|
32
|
+
}
|
|
33
|
+
function isString(value) {
|
|
34
|
+
return typeof value === "string";
|
|
35
|
+
}
|
|
36
|
+
function isNumber(value) {
|
|
37
|
+
return typeof value === "number";
|
|
38
|
+
}
|
|
39
|
+
function isBoolean(value) {
|
|
40
|
+
return value === true || value === false || isObjectLike(value) && getTag(value) == "[object Boolean]";
|
|
41
|
+
}
|
|
42
|
+
function isObject(value) {
|
|
43
|
+
return typeof value === "object";
|
|
44
|
+
}
|
|
45
|
+
function isObjectLike(value) {
|
|
46
|
+
return isObject(value) && value !== null;
|
|
47
|
+
}
|
|
48
|
+
function isDefined(value) {
|
|
49
|
+
return value !== void 0 && value !== null;
|
|
50
|
+
}
|
|
51
|
+
function isBlank(value) {
|
|
52
|
+
return !value.trim().length;
|
|
53
|
+
}
|
|
54
|
+
function getTag(value) {
|
|
55
|
+
return value == null ? value === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(value);
|
|
56
|
+
}
|
|
57
|
+
const INCORRECT_INDEX_TYPE = "Incorrect 'index' type";
|
|
58
|
+
const LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = (key) => `Invalid value for key ${key}`;
|
|
59
|
+
const PATTERN_LENGTH_TOO_LARGE = (max) => `Pattern length exceeds max of ${max}.`;
|
|
60
|
+
const MISSING_KEY_PROPERTY = (name) => `Missing ${name} property in key`;
|
|
61
|
+
const INVALID_KEY_WEIGHT_VALUE = (key) => `Property 'weight' in key '${key}' must be a positive integer`;
|
|
62
|
+
const hasOwn = Object.prototype.hasOwnProperty;
|
|
63
|
+
var KeyStore = class {
|
|
64
|
+
constructor(keys) {
|
|
65
|
+
this._keys = [];
|
|
66
|
+
this._keyMap = {};
|
|
67
|
+
let totalWeight = 0;
|
|
68
|
+
keys.forEach((key) => {
|
|
69
|
+
let obj = createKey(key);
|
|
70
|
+
this._keys.push(obj);
|
|
71
|
+
this._keyMap[obj.id] = obj;
|
|
72
|
+
totalWeight += obj.weight;
|
|
73
|
+
});
|
|
74
|
+
this._keys.forEach((key) => {
|
|
75
|
+
key.weight /= totalWeight;
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
get(keyId) {
|
|
79
|
+
return this._keyMap[keyId];
|
|
80
|
+
}
|
|
81
|
+
keys() {
|
|
82
|
+
return this._keys;
|
|
83
|
+
}
|
|
84
|
+
toJSON() {
|
|
85
|
+
return JSON.stringify(this._keys);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
function createKey(key) {
|
|
89
|
+
let path = null;
|
|
90
|
+
let id = null;
|
|
91
|
+
let src = null;
|
|
92
|
+
let weight = 1;
|
|
93
|
+
let getFn = null;
|
|
94
|
+
if (isString(key) || isArray(key)) {
|
|
95
|
+
src = key;
|
|
96
|
+
path = createKeyPath(key);
|
|
97
|
+
id = createKeyId(key);
|
|
98
|
+
} else {
|
|
99
|
+
if (!hasOwn.call(key, "name")) throw new Error(MISSING_KEY_PROPERTY("name"));
|
|
100
|
+
const name = key.name;
|
|
101
|
+
src = name;
|
|
102
|
+
if (hasOwn.call(key, "weight")) {
|
|
103
|
+
weight = key.weight;
|
|
104
|
+
if (weight <= 0) throw new Error(INVALID_KEY_WEIGHT_VALUE(name));
|
|
105
|
+
}
|
|
106
|
+
path = createKeyPath(name);
|
|
107
|
+
id = createKeyId(name);
|
|
108
|
+
getFn = key.getFn;
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
path,
|
|
112
|
+
id,
|
|
113
|
+
weight,
|
|
114
|
+
src,
|
|
115
|
+
getFn
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function createKeyPath(key) {
|
|
119
|
+
return isArray(key) ? key : key.split(".");
|
|
120
|
+
}
|
|
121
|
+
function createKeyId(key) {
|
|
122
|
+
return isArray(key) ? key.join(".") : key;
|
|
123
|
+
}
|
|
124
|
+
function get(obj, path) {
|
|
125
|
+
let list = [];
|
|
126
|
+
let arr = false;
|
|
127
|
+
const deepGet = (obj, path, index) => {
|
|
128
|
+
if (!isDefined(obj)) return;
|
|
129
|
+
if (!path[index]) list.push(obj);
|
|
130
|
+
else {
|
|
131
|
+
const value = obj[path[index]];
|
|
132
|
+
if (!isDefined(value)) return;
|
|
133
|
+
if (index === path.length - 1 && (isString(value) || isNumber(value) || isBoolean(value))) list.push(toString(value));
|
|
134
|
+
else if (isArray(value)) {
|
|
135
|
+
arr = true;
|
|
136
|
+
for (let i = 0, len = value.length; i < len; i += 1) deepGet(value[i], path, index + 1);
|
|
137
|
+
} else if (path.length) deepGet(value, path, index + 1);
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
deepGet(obj, isString(path) ? path.split(".") : path, 0);
|
|
141
|
+
return arr ? list : list[0];
|
|
142
|
+
}
|
|
143
|
+
const MatchOptions = {
|
|
144
|
+
includeMatches: false,
|
|
145
|
+
findAllMatches: false,
|
|
146
|
+
minMatchCharLength: 1
|
|
147
|
+
};
|
|
148
|
+
const BasicOptions = {
|
|
149
|
+
isCaseSensitive: false,
|
|
150
|
+
ignoreDiacritics: false,
|
|
151
|
+
includeScore: false,
|
|
152
|
+
keys: [],
|
|
153
|
+
shouldSort: true,
|
|
154
|
+
sortFn: (a, b) => a.score === b.score ? a.idx < b.idx ? -1 : 1 : a.score < b.score ? -1 : 1
|
|
155
|
+
};
|
|
156
|
+
const FuzzyOptions = {
|
|
157
|
+
location: 0,
|
|
158
|
+
threshold: .6,
|
|
159
|
+
distance: 100
|
|
160
|
+
};
|
|
161
|
+
const AdvancedOptions = {
|
|
162
|
+
useExtendedSearch: false,
|
|
163
|
+
getFn: get,
|
|
164
|
+
ignoreLocation: false,
|
|
165
|
+
ignoreFieldNorm: false,
|
|
166
|
+
fieldNormWeight: 1
|
|
167
|
+
};
|
|
168
|
+
var Config = {
|
|
169
|
+
...BasicOptions,
|
|
170
|
+
...MatchOptions,
|
|
171
|
+
...FuzzyOptions,
|
|
172
|
+
...AdvancedOptions
|
|
173
|
+
};
|
|
174
|
+
const SPACE = /[^ ]+/g;
|
|
175
|
+
function norm(weight = 1, mantissa = 3) {
|
|
176
|
+
const cache = /* @__PURE__ */ new Map();
|
|
177
|
+
const m = Math.pow(10, mantissa);
|
|
178
|
+
return {
|
|
179
|
+
get(value) {
|
|
180
|
+
const numTokens = value.match(SPACE).length;
|
|
181
|
+
if (cache.has(numTokens)) return cache.get(numTokens);
|
|
182
|
+
const norm = 1 / Math.pow(numTokens, .5 * weight);
|
|
183
|
+
const n = parseFloat(Math.round(norm * m) / m);
|
|
184
|
+
cache.set(numTokens, n);
|
|
185
|
+
return n;
|
|
186
|
+
},
|
|
187
|
+
clear() {
|
|
188
|
+
cache.clear();
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
var FuseIndex = class {
|
|
193
|
+
constructor({ getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}) {
|
|
194
|
+
this.norm = norm(fieldNormWeight, 3);
|
|
195
|
+
this.getFn = getFn;
|
|
196
|
+
this.isCreated = false;
|
|
197
|
+
this.setIndexRecords();
|
|
198
|
+
}
|
|
199
|
+
setSources(docs = []) {
|
|
200
|
+
this.docs = docs;
|
|
201
|
+
}
|
|
202
|
+
setIndexRecords(records = []) {
|
|
203
|
+
this.records = records;
|
|
204
|
+
}
|
|
205
|
+
setKeys(keys = []) {
|
|
206
|
+
this.keys = keys;
|
|
207
|
+
this._keysMap = {};
|
|
208
|
+
keys.forEach((key, idx) => {
|
|
209
|
+
this._keysMap[key.id] = idx;
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
create() {
|
|
213
|
+
if (this.isCreated || !this.docs.length) return;
|
|
214
|
+
this.isCreated = true;
|
|
215
|
+
if (isString(this.docs[0])) this.docs.forEach((doc, docIndex) => {
|
|
216
|
+
this._addString(doc, docIndex);
|
|
217
|
+
});
|
|
218
|
+
else this.docs.forEach((doc, docIndex) => {
|
|
219
|
+
this._addObject(doc, docIndex);
|
|
220
|
+
});
|
|
221
|
+
this.norm.clear();
|
|
222
|
+
}
|
|
223
|
+
add(doc) {
|
|
224
|
+
const idx = this.size();
|
|
225
|
+
if (isString(doc)) this._addString(doc, idx);
|
|
226
|
+
else this._addObject(doc, idx);
|
|
227
|
+
}
|
|
228
|
+
removeAt(idx) {
|
|
229
|
+
this.records.splice(idx, 1);
|
|
230
|
+
for (let i = idx, len = this.size(); i < len; i += 1) this.records[i].i -= 1;
|
|
231
|
+
}
|
|
232
|
+
getValueForItemAtKeyId(item, keyId) {
|
|
233
|
+
return item[this._keysMap[keyId]];
|
|
234
|
+
}
|
|
235
|
+
size() {
|
|
236
|
+
return this.records.length;
|
|
237
|
+
}
|
|
238
|
+
_addString(doc, docIndex) {
|
|
239
|
+
if (!isDefined(doc) || isBlank(doc)) return;
|
|
240
|
+
let record = {
|
|
241
|
+
v: doc,
|
|
242
|
+
i: docIndex,
|
|
243
|
+
n: this.norm.get(doc)
|
|
244
|
+
};
|
|
245
|
+
this.records.push(record);
|
|
246
|
+
}
|
|
247
|
+
_addObject(doc, docIndex) {
|
|
248
|
+
let record = {
|
|
249
|
+
i: docIndex,
|
|
250
|
+
$: {}
|
|
251
|
+
};
|
|
252
|
+
this.keys.forEach((key, keyIndex) => {
|
|
253
|
+
let value = key.getFn ? key.getFn(doc) : this.getFn(doc, key.path);
|
|
254
|
+
if (!isDefined(value)) return;
|
|
255
|
+
if (isArray(value)) {
|
|
256
|
+
let subRecords = [];
|
|
257
|
+
const stack = [{
|
|
258
|
+
nestedArrIndex: -1,
|
|
259
|
+
value
|
|
260
|
+
}];
|
|
261
|
+
while (stack.length) {
|
|
262
|
+
const { nestedArrIndex, value } = stack.pop();
|
|
263
|
+
if (!isDefined(value)) continue;
|
|
264
|
+
if (isString(value) && !isBlank(value)) {
|
|
265
|
+
let subRecord = {
|
|
266
|
+
v: value,
|
|
267
|
+
i: nestedArrIndex,
|
|
268
|
+
n: this.norm.get(value)
|
|
269
|
+
};
|
|
270
|
+
subRecords.push(subRecord);
|
|
271
|
+
} else if (isArray(value)) value.forEach((item, k) => {
|
|
272
|
+
stack.push({
|
|
273
|
+
nestedArrIndex: k,
|
|
274
|
+
value: item
|
|
275
|
+
});
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
record.$[keyIndex] = subRecords;
|
|
279
|
+
} else if (isString(value) && !isBlank(value)) {
|
|
280
|
+
let subRecord = {
|
|
281
|
+
v: value,
|
|
282
|
+
n: this.norm.get(value)
|
|
283
|
+
};
|
|
284
|
+
record.$[keyIndex] = subRecord;
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
this.records.push(record);
|
|
288
|
+
}
|
|
289
|
+
toJSON() {
|
|
290
|
+
return {
|
|
291
|
+
keys: this.keys,
|
|
292
|
+
records: this.records
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
function createIndex(keys, docs, { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}) {
|
|
297
|
+
const myIndex = new FuseIndex({
|
|
298
|
+
getFn,
|
|
299
|
+
fieldNormWeight
|
|
300
|
+
});
|
|
301
|
+
myIndex.setKeys(keys.map(createKey));
|
|
302
|
+
myIndex.setSources(docs);
|
|
303
|
+
myIndex.create();
|
|
304
|
+
return myIndex;
|
|
305
|
+
}
|
|
306
|
+
function parseIndex(data, { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}) {
|
|
307
|
+
const { keys, records } = data;
|
|
308
|
+
const myIndex = new FuseIndex({
|
|
309
|
+
getFn,
|
|
310
|
+
fieldNormWeight
|
|
311
|
+
});
|
|
312
|
+
myIndex.setKeys(keys);
|
|
313
|
+
myIndex.setIndexRecords(records);
|
|
314
|
+
return myIndex;
|
|
315
|
+
}
|
|
316
|
+
function computeScore$1(pattern, { errors = 0, currentLocation = 0, expectedLocation = 0, distance = Config.distance, ignoreLocation = Config.ignoreLocation } = {}) {
|
|
317
|
+
const accuracy = errors / pattern.length;
|
|
318
|
+
if (ignoreLocation) return accuracy;
|
|
319
|
+
const proximity = Math.abs(expectedLocation - currentLocation);
|
|
320
|
+
if (!distance) return proximity ? 1 : accuracy;
|
|
321
|
+
return accuracy + proximity / distance;
|
|
322
|
+
}
|
|
323
|
+
function convertMaskToIndices(matchmask = [], minMatchCharLength = Config.minMatchCharLength) {
|
|
324
|
+
let indices = [];
|
|
325
|
+
let start = -1;
|
|
326
|
+
let end = -1;
|
|
327
|
+
let i = 0;
|
|
328
|
+
for (let len = matchmask.length; i < len; i += 1) {
|
|
329
|
+
let match = matchmask[i];
|
|
330
|
+
if (match && start === -1) start = i;
|
|
331
|
+
else if (!match && start !== -1) {
|
|
332
|
+
end = i - 1;
|
|
333
|
+
if (end - start + 1 >= minMatchCharLength) indices.push([start, end]);
|
|
334
|
+
start = -1;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
if (matchmask[i - 1] && i - start >= minMatchCharLength) indices.push([start, i - 1]);
|
|
338
|
+
return indices;
|
|
339
|
+
}
|
|
340
|
+
const MAX_BITS = 32;
|
|
341
|
+
function search(text, pattern, patternAlphabet, { location = Config.location, distance = Config.distance, threshold = Config.threshold, findAllMatches = Config.findAllMatches, minMatchCharLength = Config.minMatchCharLength, includeMatches = Config.includeMatches, ignoreLocation = Config.ignoreLocation } = {}) {
|
|
342
|
+
if (pattern.length > MAX_BITS) throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS));
|
|
343
|
+
const patternLen = pattern.length;
|
|
344
|
+
const textLen = text.length;
|
|
345
|
+
const expectedLocation = Math.max(0, Math.min(location, textLen));
|
|
346
|
+
let currentThreshold = threshold;
|
|
347
|
+
let bestLocation = expectedLocation;
|
|
348
|
+
const computeMatches = minMatchCharLength > 1 || includeMatches;
|
|
349
|
+
const matchMask = computeMatches ? Array(textLen) : [];
|
|
350
|
+
let index;
|
|
351
|
+
while ((index = text.indexOf(pattern, bestLocation)) > -1) {
|
|
352
|
+
let score = computeScore$1(pattern, {
|
|
353
|
+
currentLocation: index,
|
|
354
|
+
expectedLocation,
|
|
355
|
+
distance,
|
|
356
|
+
ignoreLocation
|
|
357
|
+
});
|
|
358
|
+
currentThreshold = Math.min(score, currentThreshold);
|
|
359
|
+
bestLocation = index + patternLen;
|
|
360
|
+
if (computeMatches) {
|
|
361
|
+
let i = 0;
|
|
362
|
+
while (i < patternLen) {
|
|
363
|
+
matchMask[index + i] = 1;
|
|
364
|
+
i += 1;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
bestLocation = -1;
|
|
369
|
+
let lastBitArr = [];
|
|
370
|
+
let finalScore = 1;
|
|
371
|
+
let binMax = patternLen + textLen;
|
|
372
|
+
const mask = 1 << patternLen - 1;
|
|
373
|
+
for (let i = 0; i < patternLen; i += 1) {
|
|
374
|
+
let binMin = 0;
|
|
375
|
+
let binMid = binMax;
|
|
376
|
+
while (binMin < binMid) {
|
|
377
|
+
if (computeScore$1(pattern, {
|
|
378
|
+
errors: i,
|
|
379
|
+
currentLocation: expectedLocation + binMid,
|
|
380
|
+
expectedLocation,
|
|
381
|
+
distance,
|
|
382
|
+
ignoreLocation
|
|
383
|
+
}) <= currentThreshold) binMin = binMid;
|
|
384
|
+
else binMax = binMid;
|
|
385
|
+
binMid = Math.floor((binMax - binMin) / 2 + binMin);
|
|
386
|
+
}
|
|
387
|
+
binMax = binMid;
|
|
388
|
+
let start = Math.max(1, expectedLocation - binMid + 1);
|
|
389
|
+
let finish = findAllMatches ? textLen : Math.min(expectedLocation + binMid, textLen) + patternLen;
|
|
390
|
+
let bitArr = Array(finish + 2);
|
|
391
|
+
bitArr[finish + 1] = (1 << i) - 1;
|
|
392
|
+
for (let j = finish; j >= start; j -= 1) {
|
|
393
|
+
let currentLocation = j - 1;
|
|
394
|
+
let charMatch = patternAlphabet[text.charAt(currentLocation)];
|
|
395
|
+
if (computeMatches) matchMask[currentLocation] = +!!charMatch;
|
|
396
|
+
bitArr[j] = (bitArr[j + 1] << 1 | 1) & charMatch;
|
|
397
|
+
if (i) bitArr[j] |= (lastBitArr[j + 1] | lastBitArr[j]) << 1 | 1 | lastBitArr[j + 1];
|
|
398
|
+
if (bitArr[j] & mask) {
|
|
399
|
+
finalScore = computeScore$1(pattern, {
|
|
400
|
+
errors: i,
|
|
401
|
+
currentLocation,
|
|
402
|
+
expectedLocation,
|
|
403
|
+
distance,
|
|
404
|
+
ignoreLocation
|
|
405
|
+
});
|
|
406
|
+
if (finalScore <= currentThreshold) {
|
|
407
|
+
currentThreshold = finalScore;
|
|
408
|
+
bestLocation = currentLocation;
|
|
409
|
+
if (bestLocation <= expectedLocation) break;
|
|
410
|
+
start = Math.max(1, 2 * expectedLocation - bestLocation);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
if (computeScore$1(pattern, {
|
|
415
|
+
errors: i + 1,
|
|
416
|
+
currentLocation: expectedLocation,
|
|
417
|
+
expectedLocation,
|
|
418
|
+
distance,
|
|
419
|
+
ignoreLocation
|
|
420
|
+
}) > currentThreshold) break;
|
|
421
|
+
lastBitArr = bitArr;
|
|
422
|
+
}
|
|
423
|
+
const result = {
|
|
424
|
+
isMatch: bestLocation >= 0,
|
|
425
|
+
score: Math.max(.001, finalScore)
|
|
426
|
+
};
|
|
427
|
+
if (computeMatches) {
|
|
428
|
+
const indices = convertMaskToIndices(matchMask, minMatchCharLength);
|
|
429
|
+
if (!indices.length) result.isMatch = false;
|
|
430
|
+
else if (includeMatches) result.indices = indices;
|
|
431
|
+
}
|
|
432
|
+
return result;
|
|
433
|
+
}
|
|
434
|
+
function createPatternAlphabet(pattern) {
|
|
435
|
+
let mask = {};
|
|
436
|
+
for (let i = 0, len = pattern.length; i < len; i += 1) {
|
|
437
|
+
const char = pattern.charAt(i);
|
|
438
|
+
mask[char] = (mask[char] || 0) | 1 << len - i - 1;
|
|
439
|
+
}
|
|
440
|
+
return mask;
|
|
441
|
+
}
|
|
442
|
+
const stripDiacritics = String.prototype.normalize ? ((str) => str.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g, "")) : ((str) => str);
|
|
443
|
+
var BitapSearch = class {
|
|
444
|
+
constructor(pattern, { location = Config.location, threshold = Config.threshold, distance = Config.distance, includeMatches = Config.includeMatches, findAllMatches = Config.findAllMatches, minMatchCharLength = Config.minMatchCharLength, isCaseSensitive = Config.isCaseSensitive, ignoreDiacritics = Config.ignoreDiacritics, ignoreLocation = Config.ignoreLocation } = {}) {
|
|
445
|
+
this.options = {
|
|
446
|
+
location,
|
|
447
|
+
threshold,
|
|
448
|
+
distance,
|
|
449
|
+
includeMatches,
|
|
450
|
+
findAllMatches,
|
|
451
|
+
minMatchCharLength,
|
|
452
|
+
isCaseSensitive,
|
|
453
|
+
ignoreDiacritics,
|
|
454
|
+
ignoreLocation
|
|
455
|
+
};
|
|
456
|
+
pattern = isCaseSensitive ? pattern : pattern.toLowerCase();
|
|
457
|
+
pattern = ignoreDiacritics ? stripDiacritics(pattern) : pattern;
|
|
458
|
+
this.pattern = pattern;
|
|
459
|
+
this.chunks = [];
|
|
460
|
+
if (!this.pattern.length) return;
|
|
461
|
+
const addChunk = (pattern, startIndex) => {
|
|
462
|
+
this.chunks.push({
|
|
463
|
+
pattern,
|
|
464
|
+
alphabet: createPatternAlphabet(pattern),
|
|
465
|
+
startIndex
|
|
466
|
+
});
|
|
467
|
+
};
|
|
468
|
+
const len = this.pattern.length;
|
|
469
|
+
if (len > MAX_BITS) {
|
|
470
|
+
let i = 0;
|
|
471
|
+
const remainder = len % MAX_BITS;
|
|
472
|
+
const end = len - remainder;
|
|
473
|
+
while (i < end) {
|
|
474
|
+
addChunk(this.pattern.substr(i, MAX_BITS), i);
|
|
475
|
+
i += MAX_BITS;
|
|
476
|
+
}
|
|
477
|
+
if (remainder) {
|
|
478
|
+
const startIndex = len - MAX_BITS;
|
|
479
|
+
addChunk(this.pattern.substr(startIndex), startIndex);
|
|
480
|
+
}
|
|
481
|
+
} else addChunk(this.pattern, 0);
|
|
482
|
+
}
|
|
483
|
+
searchIn(text) {
|
|
484
|
+
const { isCaseSensitive, ignoreDiacritics, includeMatches } = this.options;
|
|
485
|
+
text = isCaseSensitive ? text : text.toLowerCase();
|
|
486
|
+
text = ignoreDiacritics ? stripDiacritics(text) : text;
|
|
487
|
+
if (this.pattern === text) {
|
|
488
|
+
let result = {
|
|
489
|
+
isMatch: true,
|
|
490
|
+
score: 0
|
|
491
|
+
};
|
|
492
|
+
if (includeMatches) result.indices = [[0, text.length - 1]];
|
|
493
|
+
return result;
|
|
494
|
+
}
|
|
495
|
+
const { location, distance, threshold, findAllMatches, minMatchCharLength, ignoreLocation } = this.options;
|
|
496
|
+
let allIndices = [];
|
|
497
|
+
let totalScore = 0;
|
|
498
|
+
let hasMatches = false;
|
|
499
|
+
this.chunks.forEach(({ pattern, alphabet, startIndex }) => {
|
|
500
|
+
const { isMatch, score, indices } = search(text, pattern, alphabet, {
|
|
501
|
+
location: location + startIndex,
|
|
502
|
+
distance,
|
|
503
|
+
threshold,
|
|
504
|
+
findAllMatches,
|
|
505
|
+
minMatchCharLength,
|
|
506
|
+
includeMatches,
|
|
507
|
+
ignoreLocation
|
|
508
|
+
});
|
|
509
|
+
if (isMatch) hasMatches = true;
|
|
510
|
+
totalScore += score;
|
|
511
|
+
if (isMatch && indices) allIndices = [...allIndices, ...indices];
|
|
512
|
+
});
|
|
513
|
+
let result = {
|
|
514
|
+
isMatch: hasMatches,
|
|
515
|
+
score: hasMatches ? totalScore / this.chunks.length : 1
|
|
516
|
+
};
|
|
517
|
+
if (hasMatches && includeMatches) result.indices = allIndices;
|
|
518
|
+
return result;
|
|
519
|
+
}
|
|
520
|
+
};
|
|
521
|
+
var BaseMatch = class {
|
|
522
|
+
constructor(pattern) {
|
|
523
|
+
this.pattern = pattern;
|
|
524
|
+
}
|
|
525
|
+
static isMultiMatch(pattern) {
|
|
526
|
+
return getMatch(pattern, this.multiRegex);
|
|
527
|
+
}
|
|
528
|
+
static isSingleMatch(pattern) {
|
|
529
|
+
return getMatch(pattern, this.singleRegex);
|
|
530
|
+
}
|
|
531
|
+
search() {}
|
|
532
|
+
};
|
|
533
|
+
function getMatch(pattern, exp) {
|
|
534
|
+
const matches = pattern.match(exp);
|
|
535
|
+
return matches ? matches[1] : null;
|
|
536
|
+
}
|
|
537
|
+
var ExactMatch = class extends BaseMatch {
|
|
538
|
+
constructor(pattern) {
|
|
539
|
+
super(pattern);
|
|
540
|
+
}
|
|
541
|
+
static get type() {
|
|
542
|
+
return "exact";
|
|
543
|
+
}
|
|
544
|
+
static get multiRegex() {
|
|
545
|
+
return /^="(.*)"$/;
|
|
546
|
+
}
|
|
547
|
+
static get singleRegex() {
|
|
548
|
+
return /^=(.*)$/;
|
|
549
|
+
}
|
|
550
|
+
search(text) {
|
|
551
|
+
const isMatch = text === this.pattern;
|
|
552
|
+
return {
|
|
553
|
+
isMatch,
|
|
554
|
+
score: isMatch ? 0 : 1,
|
|
555
|
+
indices: [0, this.pattern.length - 1]
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
};
|
|
559
|
+
var InverseExactMatch = class extends BaseMatch {
|
|
560
|
+
constructor(pattern) {
|
|
561
|
+
super(pattern);
|
|
562
|
+
}
|
|
563
|
+
static get type() {
|
|
564
|
+
return "inverse-exact";
|
|
565
|
+
}
|
|
566
|
+
static get multiRegex() {
|
|
567
|
+
return /^!"(.*)"$/;
|
|
568
|
+
}
|
|
569
|
+
static get singleRegex() {
|
|
570
|
+
return /^!(.*)$/;
|
|
571
|
+
}
|
|
572
|
+
search(text) {
|
|
573
|
+
const isMatch = text.indexOf(this.pattern) === -1;
|
|
574
|
+
return {
|
|
575
|
+
isMatch,
|
|
576
|
+
score: isMatch ? 0 : 1,
|
|
577
|
+
indices: [0, text.length - 1]
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
var PrefixExactMatch = class extends BaseMatch {
|
|
582
|
+
constructor(pattern) {
|
|
583
|
+
super(pattern);
|
|
584
|
+
}
|
|
585
|
+
static get type() {
|
|
586
|
+
return "prefix-exact";
|
|
587
|
+
}
|
|
588
|
+
static get multiRegex() {
|
|
589
|
+
return /^\^"(.*)"$/;
|
|
590
|
+
}
|
|
591
|
+
static get singleRegex() {
|
|
592
|
+
return /^\^(.*)$/;
|
|
593
|
+
}
|
|
594
|
+
search(text) {
|
|
595
|
+
const isMatch = text.startsWith(this.pattern);
|
|
596
|
+
return {
|
|
597
|
+
isMatch,
|
|
598
|
+
score: isMatch ? 0 : 1,
|
|
599
|
+
indices: [0, this.pattern.length - 1]
|
|
600
|
+
};
|
|
601
|
+
}
|
|
602
|
+
};
|
|
603
|
+
var InversePrefixExactMatch = class extends BaseMatch {
|
|
604
|
+
constructor(pattern) {
|
|
605
|
+
super(pattern);
|
|
606
|
+
}
|
|
607
|
+
static get type() {
|
|
608
|
+
return "inverse-prefix-exact";
|
|
609
|
+
}
|
|
610
|
+
static get multiRegex() {
|
|
611
|
+
return /^!\^"(.*)"$/;
|
|
612
|
+
}
|
|
613
|
+
static get singleRegex() {
|
|
614
|
+
return /^!\^(.*)$/;
|
|
615
|
+
}
|
|
616
|
+
search(text) {
|
|
617
|
+
const isMatch = !text.startsWith(this.pattern);
|
|
618
|
+
return {
|
|
619
|
+
isMatch,
|
|
620
|
+
score: isMatch ? 0 : 1,
|
|
621
|
+
indices: [0, text.length - 1]
|
|
622
|
+
};
|
|
623
|
+
}
|
|
624
|
+
};
|
|
625
|
+
var SuffixExactMatch = class extends BaseMatch {
|
|
626
|
+
constructor(pattern) {
|
|
627
|
+
super(pattern);
|
|
628
|
+
}
|
|
629
|
+
static get type() {
|
|
630
|
+
return "suffix-exact";
|
|
631
|
+
}
|
|
632
|
+
static get multiRegex() {
|
|
633
|
+
return /^"(.*)"\$$/;
|
|
634
|
+
}
|
|
635
|
+
static get singleRegex() {
|
|
636
|
+
return /^(.*)\$$/;
|
|
637
|
+
}
|
|
638
|
+
search(text) {
|
|
639
|
+
const isMatch = text.endsWith(this.pattern);
|
|
640
|
+
return {
|
|
641
|
+
isMatch,
|
|
642
|
+
score: isMatch ? 0 : 1,
|
|
643
|
+
indices: [text.length - this.pattern.length, text.length - 1]
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
};
|
|
647
|
+
var InverseSuffixExactMatch = class extends BaseMatch {
|
|
648
|
+
constructor(pattern) {
|
|
649
|
+
super(pattern);
|
|
650
|
+
}
|
|
651
|
+
static get type() {
|
|
652
|
+
return "inverse-suffix-exact";
|
|
653
|
+
}
|
|
654
|
+
static get multiRegex() {
|
|
655
|
+
return /^!"(.*)"\$$/;
|
|
656
|
+
}
|
|
657
|
+
static get singleRegex() {
|
|
658
|
+
return /^!(.*)\$$/;
|
|
659
|
+
}
|
|
660
|
+
search(text) {
|
|
661
|
+
const isMatch = !text.endsWith(this.pattern);
|
|
662
|
+
return {
|
|
663
|
+
isMatch,
|
|
664
|
+
score: isMatch ? 0 : 1,
|
|
665
|
+
indices: [0, text.length - 1]
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
};
|
|
669
|
+
var FuzzyMatch = class extends BaseMatch {
|
|
670
|
+
constructor(pattern, { location = Config.location, threshold = Config.threshold, distance = Config.distance, includeMatches = Config.includeMatches, findAllMatches = Config.findAllMatches, minMatchCharLength = Config.minMatchCharLength, isCaseSensitive = Config.isCaseSensitive, ignoreDiacritics = Config.ignoreDiacritics, ignoreLocation = Config.ignoreLocation } = {}) {
|
|
671
|
+
super(pattern);
|
|
672
|
+
this._bitapSearch = new BitapSearch(pattern, {
|
|
673
|
+
location,
|
|
674
|
+
threshold,
|
|
675
|
+
distance,
|
|
676
|
+
includeMatches,
|
|
677
|
+
findAllMatches,
|
|
678
|
+
minMatchCharLength,
|
|
679
|
+
isCaseSensitive,
|
|
680
|
+
ignoreDiacritics,
|
|
681
|
+
ignoreLocation
|
|
682
|
+
});
|
|
683
|
+
}
|
|
684
|
+
static get type() {
|
|
685
|
+
return "fuzzy";
|
|
686
|
+
}
|
|
687
|
+
static get multiRegex() {
|
|
688
|
+
return /^"(.*)"$/;
|
|
689
|
+
}
|
|
690
|
+
static get singleRegex() {
|
|
691
|
+
return /^(.*)$/;
|
|
692
|
+
}
|
|
693
|
+
search(text) {
|
|
694
|
+
return this._bitapSearch.searchIn(text);
|
|
695
|
+
}
|
|
696
|
+
};
|
|
697
|
+
var IncludeMatch = class extends BaseMatch {
|
|
698
|
+
constructor(pattern) {
|
|
699
|
+
super(pattern);
|
|
700
|
+
}
|
|
701
|
+
static get type() {
|
|
702
|
+
return "include";
|
|
703
|
+
}
|
|
704
|
+
static get multiRegex() {
|
|
705
|
+
return /^'"(.*)"$/;
|
|
706
|
+
}
|
|
707
|
+
static get singleRegex() {
|
|
708
|
+
return /^'(.*)$/;
|
|
709
|
+
}
|
|
710
|
+
search(text) {
|
|
711
|
+
let location = 0;
|
|
712
|
+
let index;
|
|
713
|
+
const indices = [];
|
|
714
|
+
const patternLen = this.pattern.length;
|
|
715
|
+
while ((index = text.indexOf(this.pattern, location)) > -1) {
|
|
716
|
+
location = index + patternLen;
|
|
717
|
+
indices.push([index, location - 1]);
|
|
718
|
+
}
|
|
719
|
+
const isMatch = !!indices.length;
|
|
720
|
+
return {
|
|
721
|
+
isMatch,
|
|
722
|
+
score: isMatch ? 0 : 1,
|
|
723
|
+
indices
|
|
724
|
+
};
|
|
725
|
+
}
|
|
726
|
+
};
|
|
727
|
+
const searchers = [
|
|
728
|
+
ExactMatch,
|
|
729
|
+
IncludeMatch,
|
|
730
|
+
PrefixExactMatch,
|
|
731
|
+
InversePrefixExactMatch,
|
|
732
|
+
InverseSuffixExactMatch,
|
|
733
|
+
SuffixExactMatch,
|
|
734
|
+
InverseExactMatch,
|
|
735
|
+
FuzzyMatch
|
|
736
|
+
];
|
|
737
|
+
const searchersLen = searchers.length;
|
|
738
|
+
const SPACE_RE = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/;
|
|
739
|
+
const OR_TOKEN = "|";
|
|
740
|
+
function parseQuery(pattern, options = {}) {
|
|
741
|
+
return pattern.split(OR_TOKEN).map((item) => {
|
|
742
|
+
let query = item.trim().split(SPACE_RE).filter((item) => item && !!item.trim());
|
|
743
|
+
let results = [];
|
|
744
|
+
for (let i = 0, len = query.length; i < len; i += 1) {
|
|
745
|
+
const queryItem = query[i];
|
|
746
|
+
let found = false;
|
|
747
|
+
let idx = -1;
|
|
748
|
+
while (!found && ++idx < searchersLen) {
|
|
749
|
+
const searcher = searchers[idx];
|
|
750
|
+
let token = searcher.isMultiMatch(queryItem);
|
|
751
|
+
if (token) {
|
|
752
|
+
results.push(new searcher(token, options));
|
|
753
|
+
found = true;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
if (found) continue;
|
|
757
|
+
idx = -1;
|
|
758
|
+
while (++idx < searchersLen) {
|
|
759
|
+
const searcher = searchers[idx];
|
|
760
|
+
let token = searcher.isSingleMatch(queryItem);
|
|
761
|
+
if (token) {
|
|
762
|
+
results.push(new searcher(token, options));
|
|
763
|
+
break;
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
return results;
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
const MultiMatchSet = new Set([FuzzyMatch.type, IncludeMatch.type]);
|
|
771
|
+
/**
|
|
772
|
+
* Command-like searching
|
|
773
|
+
* ======================
|
|
774
|
+
*
|
|
775
|
+
* Given multiple search terms delimited by spaces.e.g. `^jscript .python$ ruby !java`,
|
|
776
|
+
* search in a given text.
|
|
777
|
+
*
|
|
778
|
+
* Search syntax:
|
|
779
|
+
*
|
|
780
|
+
* | Token | Match type | Description |
|
|
781
|
+
* | ----------- | -------------------------- | -------------------------------------- |
|
|
782
|
+
* | `jscript` | fuzzy-match | Items that fuzzy match `jscript` |
|
|
783
|
+
* | `=scheme` | exact-match | Items that are `scheme` |
|
|
784
|
+
* | `'python` | include-match | Items that include `python` |
|
|
785
|
+
* | `!ruby` | inverse-exact-match | Items that do not include `ruby` |
|
|
786
|
+
* | `^java` | prefix-exact-match | Items that start with `java` |
|
|
787
|
+
* | `!^earlang` | inverse-prefix-exact-match | Items that do not start with `earlang` |
|
|
788
|
+
* | `.js$` | suffix-exact-match | Items that end with `.js` |
|
|
789
|
+
* | `!.go$` | inverse-suffix-exact-match | Items that do not end with `.go` |
|
|
790
|
+
*
|
|
791
|
+
* A single pipe character acts as an OR operator. For example, the following
|
|
792
|
+
* query matches entries that start with `core` and end with either`go`, `rb`,
|
|
793
|
+
* or`py`.
|
|
794
|
+
*
|
|
795
|
+
* ```
|
|
796
|
+
* ^core go$ | rb$ | py$
|
|
797
|
+
* ```
|
|
798
|
+
*/
|
|
799
|
+
var ExtendedSearch = class {
|
|
800
|
+
constructor(pattern, { isCaseSensitive = Config.isCaseSensitive, ignoreDiacritics = Config.ignoreDiacritics, includeMatches = Config.includeMatches, minMatchCharLength = Config.minMatchCharLength, ignoreLocation = Config.ignoreLocation, findAllMatches = Config.findAllMatches, location = Config.location, threshold = Config.threshold, distance = Config.distance } = {}) {
|
|
801
|
+
this.query = null;
|
|
802
|
+
this.options = {
|
|
803
|
+
isCaseSensitive,
|
|
804
|
+
ignoreDiacritics,
|
|
805
|
+
includeMatches,
|
|
806
|
+
minMatchCharLength,
|
|
807
|
+
findAllMatches,
|
|
808
|
+
ignoreLocation,
|
|
809
|
+
location,
|
|
810
|
+
threshold,
|
|
811
|
+
distance
|
|
812
|
+
};
|
|
813
|
+
pattern = isCaseSensitive ? pattern : pattern.toLowerCase();
|
|
814
|
+
pattern = ignoreDiacritics ? stripDiacritics(pattern) : pattern;
|
|
815
|
+
this.pattern = pattern;
|
|
816
|
+
this.query = parseQuery(this.pattern, this.options);
|
|
817
|
+
}
|
|
818
|
+
static condition(_, options) {
|
|
819
|
+
return options.useExtendedSearch;
|
|
820
|
+
}
|
|
821
|
+
searchIn(text) {
|
|
822
|
+
const query = this.query;
|
|
823
|
+
if (!query) return {
|
|
824
|
+
isMatch: false,
|
|
825
|
+
score: 1
|
|
826
|
+
};
|
|
827
|
+
const { includeMatches, isCaseSensitive, ignoreDiacritics } = this.options;
|
|
828
|
+
text = isCaseSensitive ? text : text.toLowerCase();
|
|
829
|
+
text = ignoreDiacritics ? stripDiacritics(text) : text;
|
|
830
|
+
let numMatches = 0;
|
|
831
|
+
let allIndices = [];
|
|
832
|
+
let totalScore = 0;
|
|
833
|
+
for (let i = 0, qLen = query.length; i < qLen; i += 1) {
|
|
834
|
+
const searchers = query[i];
|
|
835
|
+
allIndices.length = 0;
|
|
836
|
+
numMatches = 0;
|
|
837
|
+
for (let j = 0, pLen = searchers.length; j < pLen; j += 1) {
|
|
838
|
+
const searcher = searchers[j];
|
|
839
|
+
const { isMatch, indices, score } = searcher.search(text);
|
|
840
|
+
if (isMatch) {
|
|
841
|
+
numMatches += 1;
|
|
842
|
+
totalScore += score;
|
|
843
|
+
if (includeMatches) {
|
|
844
|
+
const type = searcher.constructor.type;
|
|
845
|
+
if (MultiMatchSet.has(type)) allIndices = [...allIndices, ...indices];
|
|
846
|
+
else allIndices.push(indices);
|
|
847
|
+
}
|
|
848
|
+
} else {
|
|
849
|
+
totalScore = 0;
|
|
850
|
+
numMatches = 0;
|
|
851
|
+
allIndices.length = 0;
|
|
852
|
+
break;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
if (numMatches) {
|
|
856
|
+
let result = {
|
|
857
|
+
isMatch: true,
|
|
858
|
+
score: totalScore / numMatches
|
|
859
|
+
};
|
|
860
|
+
if (includeMatches) result.indices = allIndices;
|
|
861
|
+
return result;
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
return {
|
|
865
|
+
isMatch: false,
|
|
866
|
+
score: 1
|
|
867
|
+
};
|
|
868
|
+
}
|
|
869
|
+
};
|
|
870
|
+
const registeredSearchers = [];
|
|
871
|
+
function register(...args) {
|
|
872
|
+
registeredSearchers.push(...args);
|
|
873
|
+
}
|
|
874
|
+
function createSearcher(pattern, options) {
|
|
875
|
+
for (let i = 0, len = registeredSearchers.length; i < len; i += 1) {
|
|
876
|
+
let searcherClass = registeredSearchers[i];
|
|
877
|
+
if (searcherClass.condition(pattern, options)) return new searcherClass(pattern, options);
|
|
878
|
+
}
|
|
879
|
+
return new BitapSearch(pattern, options);
|
|
880
|
+
}
|
|
881
|
+
const LogicalOperator = {
|
|
882
|
+
AND: "$and",
|
|
883
|
+
OR: "$or"
|
|
884
|
+
};
|
|
885
|
+
const KeyType = {
|
|
886
|
+
PATH: "$path",
|
|
887
|
+
PATTERN: "$val"
|
|
888
|
+
};
|
|
889
|
+
const isExpression = (query) => !!(query[LogicalOperator.AND] || query[LogicalOperator.OR]);
|
|
890
|
+
const isPath = (query) => !!query[KeyType.PATH];
|
|
891
|
+
const isLeaf = (query) => !isArray(query) && isObject(query) && !isExpression(query);
|
|
892
|
+
const convertToExplicit = (query) => ({ [LogicalOperator.AND]: Object.keys(query).map((key) => ({ [key]: query[key] })) });
|
|
893
|
+
function parse(query, options, { auto = true } = {}) {
|
|
894
|
+
const next = (query) => {
|
|
895
|
+
let keys = Object.keys(query);
|
|
896
|
+
const isQueryPath = isPath(query);
|
|
897
|
+
if (!isQueryPath && keys.length > 1 && !isExpression(query)) return next(convertToExplicit(query));
|
|
898
|
+
if (isLeaf(query)) {
|
|
899
|
+
const key = isQueryPath ? query[KeyType.PATH] : keys[0];
|
|
900
|
+
const pattern = isQueryPath ? query[KeyType.PATTERN] : query[key];
|
|
901
|
+
if (!isString(pattern)) throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key));
|
|
902
|
+
const obj = {
|
|
903
|
+
keyId: createKeyId(key),
|
|
904
|
+
pattern
|
|
905
|
+
};
|
|
906
|
+
if (auto) obj.searcher = createSearcher(pattern, options);
|
|
907
|
+
return obj;
|
|
908
|
+
}
|
|
909
|
+
let node = {
|
|
910
|
+
children: [],
|
|
911
|
+
operator: keys[0]
|
|
912
|
+
};
|
|
913
|
+
keys.forEach((key) => {
|
|
914
|
+
const value = query[key];
|
|
915
|
+
if (isArray(value)) value.forEach((item) => {
|
|
916
|
+
node.children.push(next(item));
|
|
917
|
+
});
|
|
918
|
+
});
|
|
919
|
+
return node;
|
|
920
|
+
};
|
|
921
|
+
if (!isExpression(query)) query = convertToExplicit(query);
|
|
922
|
+
return next(query);
|
|
923
|
+
}
|
|
924
|
+
function computeScore(results, { ignoreFieldNorm = Config.ignoreFieldNorm }) {
|
|
925
|
+
results.forEach((result) => {
|
|
926
|
+
let totalScore = 1;
|
|
927
|
+
result.matches.forEach(({ key, norm, score }) => {
|
|
928
|
+
const weight = key ? key.weight : null;
|
|
929
|
+
totalScore *= Math.pow(score === 0 && weight ? Number.EPSILON : score, (weight || 1) * (ignoreFieldNorm ? 1 : norm));
|
|
930
|
+
});
|
|
931
|
+
result.score = totalScore;
|
|
932
|
+
});
|
|
933
|
+
}
|
|
934
|
+
function transformMatches(result, data) {
|
|
935
|
+
const matches = result.matches;
|
|
936
|
+
data.matches = [];
|
|
937
|
+
if (!isDefined(matches)) return;
|
|
938
|
+
matches.forEach((match) => {
|
|
939
|
+
if (!isDefined(match.indices) || !match.indices.length) return;
|
|
940
|
+
const { indices, value } = match;
|
|
941
|
+
let obj = {
|
|
942
|
+
indices,
|
|
943
|
+
value
|
|
944
|
+
};
|
|
945
|
+
if (match.key) obj.key = match.key.src;
|
|
946
|
+
if (match.idx > -1) obj.refIndex = match.idx;
|
|
947
|
+
data.matches.push(obj);
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
function transformScore(result, data) {
|
|
951
|
+
data.score = result.score;
|
|
952
|
+
}
|
|
953
|
+
function format(results, docs, { includeMatches = Config.includeMatches, includeScore = Config.includeScore } = {}) {
|
|
954
|
+
const transformers = [];
|
|
955
|
+
if (includeMatches) transformers.push(transformMatches);
|
|
956
|
+
if (includeScore) transformers.push(transformScore);
|
|
957
|
+
return results.map((result) => {
|
|
958
|
+
const { idx } = result;
|
|
959
|
+
const data = {
|
|
960
|
+
item: docs[idx],
|
|
961
|
+
refIndex: idx
|
|
962
|
+
};
|
|
963
|
+
if (transformers.length) transformers.forEach((transformer) => {
|
|
964
|
+
transformer(result, data);
|
|
965
|
+
});
|
|
966
|
+
return data;
|
|
967
|
+
});
|
|
968
|
+
}
|
|
969
|
+
var Fuse = class {
|
|
970
|
+
constructor(docs, options = {}, index) {
|
|
971
|
+
this.options = {
|
|
972
|
+
...Config,
|
|
973
|
+
...options
|
|
974
|
+
};
|
|
975
|
+
if (this.options.useExtendedSearch && false);
|
|
976
|
+
this._keyStore = new KeyStore(this.options.keys);
|
|
977
|
+
this.setCollection(docs, index);
|
|
978
|
+
}
|
|
979
|
+
setCollection(docs, index) {
|
|
980
|
+
this._docs = docs;
|
|
981
|
+
if (index && !(index instanceof FuseIndex)) throw new Error(INCORRECT_INDEX_TYPE);
|
|
982
|
+
this._myIndex = index || createIndex(this.options.keys, this._docs, {
|
|
983
|
+
getFn: this.options.getFn,
|
|
984
|
+
fieldNormWeight: this.options.fieldNormWeight
|
|
985
|
+
});
|
|
986
|
+
}
|
|
987
|
+
add(doc) {
|
|
988
|
+
if (!isDefined(doc)) return;
|
|
989
|
+
this._docs.push(doc);
|
|
990
|
+
this._myIndex.add(doc);
|
|
991
|
+
}
|
|
992
|
+
remove(predicate = () => false) {
|
|
993
|
+
const results = [];
|
|
994
|
+
for (let i = 0, len = this._docs.length; i < len; i += 1) {
|
|
995
|
+
const doc = this._docs[i];
|
|
996
|
+
if (predicate(doc, i)) {
|
|
997
|
+
this.removeAt(i);
|
|
998
|
+
i -= 1;
|
|
999
|
+
len -= 1;
|
|
1000
|
+
results.push(doc);
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
return results;
|
|
1004
|
+
}
|
|
1005
|
+
removeAt(idx) {
|
|
1006
|
+
this._docs.splice(idx, 1);
|
|
1007
|
+
this._myIndex.removeAt(idx);
|
|
1008
|
+
}
|
|
1009
|
+
getIndex() {
|
|
1010
|
+
return this._myIndex;
|
|
1011
|
+
}
|
|
1012
|
+
search(query, { limit = -1 } = {}) {
|
|
1013
|
+
const { includeMatches, includeScore, shouldSort, sortFn, ignoreFieldNorm } = this.options;
|
|
1014
|
+
let results = isString(query) ? isString(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query);
|
|
1015
|
+
computeScore(results, { ignoreFieldNorm });
|
|
1016
|
+
if (shouldSort) results.sort(sortFn);
|
|
1017
|
+
if (isNumber(limit) && limit > -1) results = results.slice(0, limit);
|
|
1018
|
+
return format(results, this._docs, {
|
|
1019
|
+
includeMatches,
|
|
1020
|
+
includeScore
|
|
1021
|
+
});
|
|
1022
|
+
}
|
|
1023
|
+
_searchStringList(query) {
|
|
1024
|
+
const searcher = createSearcher(query, this.options);
|
|
1025
|
+
const { records } = this._myIndex;
|
|
1026
|
+
const results = [];
|
|
1027
|
+
records.forEach(({ v: text, i: idx, n: norm }) => {
|
|
1028
|
+
if (!isDefined(text)) return;
|
|
1029
|
+
const { isMatch, score, indices } = searcher.searchIn(text);
|
|
1030
|
+
if (isMatch) results.push({
|
|
1031
|
+
item: text,
|
|
1032
|
+
idx,
|
|
1033
|
+
matches: [{
|
|
1034
|
+
score,
|
|
1035
|
+
value: text,
|
|
1036
|
+
norm,
|
|
1037
|
+
indices
|
|
1038
|
+
}]
|
|
1039
|
+
});
|
|
1040
|
+
});
|
|
1041
|
+
return results;
|
|
1042
|
+
}
|
|
1043
|
+
_searchLogical(query) {
|
|
1044
|
+
const expression = parse(query, this.options);
|
|
1045
|
+
const evaluate = (node, item, idx) => {
|
|
1046
|
+
if (!node.children) {
|
|
1047
|
+
const { keyId, searcher } = node;
|
|
1048
|
+
const matches = this._findMatches({
|
|
1049
|
+
key: this._keyStore.get(keyId),
|
|
1050
|
+
value: this._myIndex.getValueForItemAtKeyId(item, keyId),
|
|
1051
|
+
searcher
|
|
1052
|
+
});
|
|
1053
|
+
if (matches && matches.length) return [{
|
|
1054
|
+
idx,
|
|
1055
|
+
item,
|
|
1056
|
+
matches
|
|
1057
|
+
}];
|
|
1058
|
+
return [];
|
|
1059
|
+
}
|
|
1060
|
+
const res = [];
|
|
1061
|
+
for (let i = 0, len = node.children.length; i < len; i += 1) {
|
|
1062
|
+
const child = node.children[i];
|
|
1063
|
+
const result = evaluate(child, item, idx);
|
|
1064
|
+
if (result.length) res.push(...result);
|
|
1065
|
+
else if (node.operator === LogicalOperator.AND) return [];
|
|
1066
|
+
}
|
|
1067
|
+
return res;
|
|
1068
|
+
};
|
|
1069
|
+
const records = this._myIndex.records;
|
|
1070
|
+
const resultMap = {};
|
|
1071
|
+
const results = [];
|
|
1072
|
+
records.forEach(({ $: item, i: idx }) => {
|
|
1073
|
+
if (isDefined(item)) {
|
|
1074
|
+
let expResults = evaluate(expression, item, idx);
|
|
1075
|
+
if (expResults.length) {
|
|
1076
|
+
if (!resultMap[idx]) {
|
|
1077
|
+
resultMap[idx] = {
|
|
1078
|
+
idx,
|
|
1079
|
+
item,
|
|
1080
|
+
matches: []
|
|
1081
|
+
};
|
|
1082
|
+
results.push(resultMap[idx]);
|
|
1083
|
+
}
|
|
1084
|
+
expResults.forEach(({ matches }) => {
|
|
1085
|
+
resultMap[idx].matches.push(...matches);
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
});
|
|
1090
|
+
return results;
|
|
1091
|
+
}
|
|
1092
|
+
_searchObjectList(query) {
|
|
1093
|
+
const searcher = createSearcher(query, this.options);
|
|
1094
|
+
const { keys, records } = this._myIndex;
|
|
1095
|
+
const results = [];
|
|
1096
|
+
records.forEach(({ $: item, i: idx }) => {
|
|
1097
|
+
if (!isDefined(item)) return;
|
|
1098
|
+
let matches = [];
|
|
1099
|
+
keys.forEach((key, keyIndex) => {
|
|
1100
|
+
matches.push(...this._findMatches({
|
|
1101
|
+
key,
|
|
1102
|
+
value: item[keyIndex],
|
|
1103
|
+
searcher
|
|
1104
|
+
}));
|
|
1105
|
+
});
|
|
1106
|
+
if (matches.length) results.push({
|
|
1107
|
+
idx,
|
|
1108
|
+
item,
|
|
1109
|
+
matches
|
|
1110
|
+
});
|
|
1111
|
+
});
|
|
1112
|
+
return results;
|
|
1113
|
+
}
|
|
1114
|
+
_findMatches({ key, value, searcher }) {
|
|
1115
|
+
if (!isDefined(value)) return [];
|
|
1116
|
+
let matches = [];
|
|
1117
|
+
if (isArray(value)) value.forEach(({ v: text, i: idx, n: norm }) => {
|
|
1118
|
+
if (!isDefined(text)) return;
|
|
1119
|
+
const { isMatch, score, indices } = searcher.searchIn(text);
|
|
1120
|
+
if (isMatch) matches.push({
|
|
1121
|
+
score,
|
|
1122
|
+
key,
|
|
1123
|
+
value: text,
|
|
1124
|
+
idx,
|
|
1125
|
+
norm,
|
|
1126
|
+
indices
|
|
1127
|
+
});
|
|
1128
|
+
});
|
|
1129
|
+
else {
|
|
1130
|
+
const { v: text, n: norm } = value;
|
|
1131
|
+
const { isMatch, score, indices } = searcher.searchIn(text);
|
|
1132
|
+
if (isMatch) matches.push({
|
|
1133
|
+
score,
|
|
1134
|
+
key,
|
|
1135
|
+
value: text,
|
|
1136
|
+
norm,
|
|
1137
|
+
indices
|
|
1138
|
+
});
|
|
1139
|
+
}
|
|
1140
|
+
return matches;
|
|
1141
|
+
}
|
|
1142
|
+
};
|
|
1143
|
+
Fuse.version = "7.1.0";
|
|
1144
|
+
Fuse.createIndex = createIndex;
|
|
1145
|
+
Fuse.parseIndex = parseIndex;
|
|
1146
|
+
Fuse.config = Config;
|
|
1147
|
+
Fuse.parseQuery = parse;
|
|
1148
|
+
register(ExtendedSearch);
|
|
1149
|
+
//#endregion
|
|
1150
|
+
//#region ../ui/src/composables/dark.ts
|
|
1151
|
+
const isDark = useDark({ valueLight: "light" });
|
|
1152
|
+
//#endregion
|
|
1153
|
+
//#region src/client/webcomponents/components/icons/ViteDevTools.vue
|
|
1154
|
+
const _hoisted_1$16 = {
|
|
1155
|
+
viewBox: "0 0 979 89",
|
|
1156
|
+
fill: "none",
|
|
1157
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1158
|
+
"pointer-events-none": ""
|
|
1159
|
+
};
|
|
1160
|
+
const _hoisted_2$13 = ["fill"];
|
|
1161
|
+
const _hoisted_3$11 = ["fill"];
|
|
1162
|
+
const _hoisted_4$8 = ["fill"];
|
|
1163
|
+
const _hoisted_5$8 = ["fill"];
|
|
1164
|
+
const _sfc_main$20 = /* @__PURE__ */ defineComponent({
|
|
1165
|
+
__name: "ViteDevTools",
|
|
1166
|
+
setup(__props) {
|
|
1167
|
+
const theme = computed(() => isDark.value ? "white" : "black");
|
|
1168
|
+
return (_ctx, _cache) => {
|
|
1169
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$16, [
|
|
1170
|
+
_cache[0] || (_cache[0] = createStaticVNode("<path d=\"M328.999 86.823C327.739 88.427 325.161 87.535 325.161 85.4973V65.9264C325.161 63.5532 323.238 61.63 320.865 61.63H299.256C297.509 61.63 296.49 59.6537 297.509 58.2339L311.715 38.3438C313.749 35.5001 311.715 31.5474 308.217 31.5474H282.067C280.319 31.5474 279.3 29.5711 280.319 28.1512L298.736 2.36497C299.141 1.80031 299.792 1.46478 300.484 1.46478H355.366C357.113 1.46478 358.132 3.4411 357.114 4.86094L342.907 24.751C340.873 27.5948 342.907 31.5474 346.405 31.5474H368.014C369.806 31.5474 370.813 33.6137 369.704 35.0254L329.003 86.8271L328.999 86.823Z\" fill=\"#9135FF\"></path><mask id=\"mask0_logo\" style=\"mask-type:alpha;\" maskUnits=\"userSpaceOnUse\" x=\"279\" y=\"1\" width=\"91\" height=\"87\"><path d=\"M328.801 86.8227C327.541 88.4266 324.963 87.5346 324.963 85.4969V65.9261C324.963 63.5528 323.04 61.6297 320.666 61.6297H299.058C297.311 61.6297 296.292 59.6534 297.311 58.2335L311.517 38.3435C313.551 35.4997 311.517 31.5471 308.019 31.5471H281.868C280.121 31.5471 279.102 29.5708 280.121 28.1509L298.538 2.36463C298.943 1.79997 299.594 1.46445 300.285 1.46445H355.168C356.915 1.46445 357.934 3.44077 356.915 4.86061L342.709 24.7507C340.675 27.5944 342.709 31.5471 346.207 31.5471H367.816C369.608 31.5471 370.615 33.6134 369.506 35.0251L328.805 86.8268L328.801 86.8227Z\" fill=\"black\"></path></mask><g mask=\"url(#mask0_logo)\"><g filter=\"url(#filter0_f_logo)\"><ellipse cx=\"10.4623\" cy=\"27.9302\" rx=\"10.4623\" ry=\"27.9302\" transform=\"matrix(0.00324134 0.999995 0.999995 -0.00324134 271.227 61.3274)\" fill=\"#EEE6FF\"></ellipse></g><g filter=\"url(#filter1_f_logo)\"><ellipse cx=\"19.7534\" cy=\"56.7016\" rx=\"19.7534\" ry=\"56.7016\" transform=\"matrix(0.00324134 0.999995 0.999995 -0.00324134 205.013 16.4374)\" fill=\"#EEE6FF\"></ellipse></g><g filter=\"url(#filter2_f_logo)\"><ellipse cx=\"10.4623\" cy=\"57.9085\" rx=\"10.4623\" ry=\"57.9085\" transform=\"matrix(0.00324134 0.999995 0.999995 -0.00324134 202.85 22.9685)\" fill=\"#8900FF\"></ellipse></g><g filter=\"url(#filter3_f_logo)\"><ellipse cx=\"10.4623\" cy=\"58.1208\" rx=\"10.4623\" ry=\"58.1208\" transform=\"matrix(0.00324134 0.999995 0.999995 -0.00324134 211.578 57.1575)\" fill=\"#8900FF\"></ellipse></g><g filter=\"url(#filter4_f_logo)\"><ellipse cx=\"10.4623\" cy=\"58.1208\" rx=\"10.4623\" ry=\"58.1208\" transform=\"matrix(0.00324134 0.999995 0.999995 -0.00324134 214.489 59.3398)\" fill=\"#8900FF\"></ellipse></g><g filter=\"url(#filter5_f_logo)\"><ellipse cx=\"26.7282\" cy=\"41.937\" rx=\"26.7282\" ry=\"41.937\" transform=\"matrix(0.0584509 -0.99829 -0.99829 -0.0584509 420.939 52.4903)\" fill=\"#EEE6FF\"></ellipse></g><g filter=\"url(#filter6_f_logo)\"><ellipse cx=\"6.59178\" cy=\"40.8401\" rx=\"6.59178\" ry=\"40.8401\" transform=\"matrix(-0.0172986 -0.99985 -0.99985 0.0172986 423.684 35.7737)\" fill=\"#8900FF\"></ellipse></g><g filter=\"url(#filter7_f_logo)\"><ellipse cx=\"6.59178\" cy=\"40.8401\" rx=\"6.59178\" ry=\"40.8401\" transform=\"matrix(-0.0172986 -0.99985 -0.99985 0.0172986 423.684 35.7737)\" fill=\"#8900FF\"></ellipse></g><g filter=\"url(#filter8_f_logo)\"><ellipse cx=\"280.451\" cy=\"18.5056\" rx=\"8.37029\" ry=\"55.2889\" transform=\"rotate(39.5103 280.451 18.5056)\" fill=\"#8900FF\"></ellipse></g><g filter=\"url(#filter9_f_logo)\"><ellipse cx=\"369.984\" cy=\"-10.1065\" rx=\"8.37029\" ry=\"55.2889\" transform=\"rotate(37.8923 369.984 -10.1065)\" fill=\"#8900FF\"></ellipse></g><g filter=\"url(#filter10_f_logo)\"><ellipse cx=\"358.377\" cy=\"13.4947\" rx=\"11.3426\" ry=\"18.3586\" transform=\"rotate(37.8923 358.377 13.4947)\" fill=\"#00C2FF\"></ellipse></g><g filter=\"url(#filter11_f_logo)\"><ellipse cx=\"276.147\" cy=\"74.2747\" rx=\"8.37029\" ry=\"55.2889\" transform=\"rotate(37.8923 276.147 74.2747)\" fill=\"#8900FF\"></ellipse></g><g filter=\"url(#filter12_f_logo)\"><ellipse cx=\"276.147\" cy=\"74.2747\" rx=\"8.37029\" ry=\"55.2889\" transform=\"rotate(37.8923 276.147 74.2747)\" fill=\"#8900FF\"></ellipse></g><g filter=\"url(#filter13_f_logo)\"><ellipse cx=\"347.434\" cy=\"58.2714\" rx=\"8.37029\" ry=\"55.2889\" transform=\"rotate(37.8923 347.434 58.2714)\" fill=\"#8900FF\"></ellipse></g><g filter=\"url(#filter14_f_logo)\"><ellipse cx=\"352.689\" cy=\"63.0069\" rx=\"11.3426\" ry=\"29.0568\" transform=\"rotate(37.8923 352.689 63.0069)\" fill=\"#00C2FF\"></ellipse></g></g>", 3)),
|
|
1171
|
+
createElementVNode("path", {
|
|
1172
|
+
d: "M265.911 0C248.439 25.0088 248.337 63.7742 265.911 88.8731H277.716C260.146 63.7742 260.248 25.0088 277.716 0H265.911Z",
|
|
1173
|
+
fill: theme.value
|
|
1174
|
+
}, null, 8, _hoisted_2$13),
|
|
1175
|
+
createElementVNode("path", {
|
|
1176
|
+
d: "M383.972 9.15527e-05H372.167C389.639 25.0089 389.741 63.7743 372.167 88.8732H383.972C401.542 63.7743 401.44 25.0089 383.972 9.15527e-05Z",
|
|
1177
|
+
fill: theme.value
|
|
1178
|
+
}, null, 8, _hoisted_3$11),
|
|
1179
|
+
createElementVNode("path", {
|
|
1180
|
+
d: "M423.64 75V19H458.84C478.28 19 489.4 27.88 489.4 47C489.4 66.2 478.2 75 458.76 75H423.64ZM469.72 47C469.72 36.52 465.24 32.6 456.12 32.6H442.84V61.4H456.12C465.24 61.4 469.72 57.48 469.72 47ZM499.187 75V19H554.467V32.6H518.387V40.12H553.907V53.32H518.387V61.4H555.507V75H499.187ZM579.751 19L594.551 59.32L609.111 19H629.031L606.951 75H581.351L559.271 19H579.751ZM653.236 75V32.76H631.716V19H693.956V32.76H672.436V75H653.236ZM731.745 75.96C708.145 75.96 695.825 66.04 695.825 47C695.825 27.96 708.145 18.04 731.745 18.04C755.345 18.04 767.745 27.96 767.745 47C767.745 66.04 755.345 75.96 731.745 75.96ZM731.745 62.12C742.865 62.12 748.065 57.4 748.065 47C748.065 36.52 742.865 31.8 731.745 31.8C720.625 31.8 715.425 36.52 715.425 47C715.425 57.4 720.625 62.12 731.745 62.12ZM809.948 75.96C786.348 75.96 774.028 66.04 774.028 47C774.028 27.96 786.348 18.04 809.948 18.04C833.548 18.04 845.948 27.96 845.948 47C845.948 66.04 833.548 75.96 809.948 75.96ZM809.948 62.12C821.068 62.12 826.268 57.4 826.268 47C826.268 36.52 821.068 31.8 809.948 31.8C798.828 31.8 793.628 36.52 793.628 47C793.628 57.4 798.828 62.12 809.948 62.12ZM855.671 75V19H874.871V61H908.391V75H855.671ZM944.226 75.96C921.346 75.96 911.666 70.04 911.666 56.28V56.2H931.106V56.28C931.106 60.92 934.226 63.4 944.226 63.4C954.546 63.4 956.946 61.48 956.946 58.52C956.946 55.88 955.186 54.68 951.346 54.36L935.026 53.08C917.746 51.72 912.466 46.44 912.466 36.36C912.466 24.2 923.026 18.04 944.546 18.04C966.546 18.04 975.426 23.72 975.426 36.84V37H956.306V36.84C956.306 32.2 953.426 30.44 944.226 30.44C934.546 30.44 931.586 32.2 931.586 35.32C931.586 38.04 933.746 39.08 938.786 39.48L954.946 40.68C970.146 41.8 976.386 46.68 976.386 57.16C976.386 69.24 967.346 75.96 944.226 75.96Z",
|
|
1181
|
+
fill: theme.value
|
|
1182
|
+
}, null, 8, _hoisted_4$8),
|
|
1183
|
+
createElementVNode("path", {
|
|
1184
|
+
d: "M20.72 19L35.52 59.32L50.08 19H70L47.92 75H22.32L0.24 19H20.72ZM76.64 75V19H95.84V75H76.64ZM124.361 75V32.76H102.841V19H165.081V32.76H143.561V75H124.361ZM172.109 75V19H227.389V32.6H191.309V40.12H226.829V53.32H191.309V61.4H228.429V75H172.109Z",
|
|
1185
|
+
fill: theme.value
|
|
1186
|
+
}, null, 8, _hoisted_5$8),
|
|
1187
|
+
_cache[1] || (_cache[1] = createStaticVNode("<defs><filter id=\"filter0_f_logo\" x=\"242.164\" y=\"32.1395\" width=\"114.054\" height=\"79.1192\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"14.5485\" result=\"effect1_foregroundBlur_logo\"></feGaussianBlur></filter><filter id=\"filter1_f_logo\" x=\"175.98\" y=\"-12.8443\" width=\"171.597\" height=\"97.7023\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"14.5485\" result=\"effect1_foregroundBlur_logo\"></feGaussianBlur></filter><filter id=\"filter2_f_logo\" x=\"185.426\" y=\"5.32093\" width=\"150.733\" height=\"55.8442\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"8.72909\" result=\"effect1_foregroundBlur_logo\"></feGaussianBlur></filter><filter id=\"filter3_f_logo\" x=\"194.154\" y=\"39.5092\" width=\"151.157\" height=\"55.8443\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"8.72909\" result=\"effect1_foregroundBlur_logo\"></feGaussianBlur></filter><filter id=\"filter4_f_logo\" x=\"197.064\" y=\"41.6914\" width=\"151.157\" height=\"55.8443\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"8.72909\" result=\"effect1_foregroundBlur_logo\"></feGaussianBlur></filter><filter id=\"filter5_f_logo\" x=\"309.644\" y=\"-32.5371\" width=\"141.984\" height=\"111.787\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"14.5485\" result=\"effect1_foregroundBlur_logo\"></feGaussianBlur></filter><filter id=\"filter6_f_logo\" x=\"324.444\" y=\"5.80213\" width=\"116.585\" height=\"48.1746\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"8.72909\" result=\"effect1_foregroundBlur_logo\"></feGaussianBlur></filter><filter id=\"filter7_f_logo\" x=\"324.444\" y=\"5.80213\" width=\"116.585\" height=\"48.1746\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"8.72909\" result=\"effect1_foregroundBlur_logo\"></feGaussianBlur></filter><filter id=\"filter8_f_logo\" x=\"227.223\" y=\"-41.9441\" width=\"106.456\" height=\"120.899\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"8.72909\" result=\"effect1_foregroundBlur_logo\"></feGaussianBlur></filter><filter id=\"filter9_f_logo\" x=\"317.926\" y=\"-71.5028\" width=\"104.117\" height=\"122.793\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"8.72909\" result=\"effect1_foregroundBlur_logo\"></feGaussianBlur></filter><filter id=\"filter10_f_logo\" x=\"326.522\" y=\"-20.0431\" width=\"63.7106\" height=\"67.0755\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"8.72909\" result=\"effect1_foregroundBlur_logo\"></feGaussianBlur></filter><filter id=\"filter11_f_logo\" x=\"224.088\" y=\"12.8784\" width=\"104.117\" height=\"122.793\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"8.72909\" result=\"effect1_foregroundBlur_logo\"></feGaussianBlur></filter><filter id=\"filter12_f_logo\" x=\"224.088\" y=\"12.8784\" width=\"104.117\" height=\"122.793\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"8.72909\" result=\"effect1_foregroundBlur_logo\"></feGaussianBlur></filter><filter id=\"filter13_f_logo\" x=\"295.376\" y=\"-3.12496\" width=\"104.117\" height=\"122.793\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"8.72909\" result=\"effect1_foregroundBlur_logo\"></feGaussianBlur></filter><filter id=\"filter14_f_logo\" x=\"315.262\" y=\"21.5769\" width=\"74.8554\" height=\"82.8601\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"8.72909\" result=\"effect1_foregroundBlur_logo\"></feGaussianBlur></filter></defs>", 1))
|
|
1188
|
+
]);
|
|
1189
|
+
};
|
|
1190
|
+
}
|
|
1191
|
+
});
|
|
1192
|
+
//#endregion
|
|
1193
|
+
//#region src/client/webcomponents/components/command-palette/KeybindingBadge.vue
|
|
1194
|
+
const _hoisted_1$15 = { class: "flex items-center gap-0.5" };
|
|
1195
|
+
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
1196
|
+
__name: "KeybindingBadge",
|
|
1197
|
+
props: { keyString: {} },
|
|
1198
|
+
setup(__props) {
|
|
1199
|
+
const keys = formatKeybinding(__props.keyString);
|
|
1200
|
+
return (_ctx, _cache) => {
|
|
1201
|
+
return openBlock(), createElementBlock("span", _hoisted_1$15, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(keys), (key, j) => {
|
|
1202
|
+
return openBlock(), createElementBlock("kbd", {
|
|
1203
|
+
key: j,
|
|
1204
|
+
class: "px-1.5 py-0.5 text-[10px] rounded bg-base border border-base op60 font-mono"
|
|
1205
|
+
}, toDisplayString(key), 1);
|
|
1206
|
+
}), 128))]);
|
|
1207
|
+
};
|
|
1208
|
+
}
|
|
1209
|
+
});
|
|
1210
|
+
//#endregion
|
|
1211
|
+
//#region src/client/webcomponents/components/command-palette/CommandPaletteItem.vue
|
|
1212
|
+
const _hoisted_1$14 = ["id"];
|
|
1213
|
+
const _hoisted_2$12 = { class: "flex items-center gap-2 flex-1 of-hidden min-w-0" };
|
|
1214
|
+
const _hoisted_3$10 = { class: "flex-1 min-w-0" };
|
|
1215
|
+
const _hoisted_4$7 = { class: "flex items-center gap-1.5" };
|
|
1216
|
+
const _hoisted_5$7 = { class: "truncate" };
|
|
1217
|
+
const _hoisted_6$6 = {
|
|
1218
|
+
key: 0,
|
|
1219
|
+
class: "op50"
|
|
1220
|
+
};
|
|
1221
|
+
const _hoisted_7$3 = {
|
|
1222
|
+
key: 0,
|
|
1223
|
+
class: "text-[10px] px-1 py-0 rounded bg-blue/10 text-blue shrink-0 leading-4"
|
|
1224
|
+
};
|
|
1225
|
+
const _hoisted_8$3 = {
|
|
1226
|
+
key: 0,
|
|
1227
|
+
class: "truncate text-xs op40 mt-0.5"
|
|
1228
|
+
};
|
|
1229
|
+
const _hoisted_9$3 = { class: "flex items-center gap-1.5 flex-none" };
|
|
1230
|
+
const _hoisted_10$3 = {
|
|
1231
|
+
key: 0,
|
|
1232
|
+
class: "i-ph-spinner-gap-duotone w-3.5 h-3.5 animate-spin op50"
|
|
1233
|
+
};
|
|
1234
|
+
const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
1235
|
+
__name: "CommandPaletteItem",
|
|
1236
|
+
props: {
|
|
1237
|
+
entry: {},
|
|
1238
|
+
parentTitle: {},
|
|
1239
|
+
showParentTitle: { type: Boolean },
|
|
1240
|
+
selected: { type: Boolean },
|
|
1241
|
+
loading: { type: Boolean },
|
|
1242
|
+
keybindings: {}
|
|
1243
|
+
},
|
|
1244
|
+
emits: ["select", "activate"],
|
|
1245
|
+
setup(__props) {
|
|
1246
|
+
return (_ctx, _cache) => {
|
|
1247
|
+
return openBlock(), createElementBlock("button", {
|
|
1248
|
+
id: `cmd-${__props.entry.id}`,
|
|
1249
|
+
class: "w-full text-left",
|
|
1250
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("activate")),
|
|
1251
|
+
onMouseover: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("select"))
|
|
1252
|
+
}, [createElementVNode("div", { class: normalizeClass(["flex items-center gap-2 justify-between rounded-md px-2.5 py-1.5 text-sm transition-colors", __props.selected ? "bg-primary/10 text-primary" : "op80 hover:op100"]) }, [createElementVNode("div", _hoisted_2$12, [__props.entry.icon ? (openBlock(), createBlock(_sfc_main$21, {
|
|
1253
|
+
key: 0,
|
|
1254
|
+
icon: __props.entry.icon,
|
|
1255
|
+
class: "w-4 h-4 flex-none op70"
|
|
1256
|
+
}, null, 8, ["icon"])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_3$10, [createElementVNode("div", _hoisted_4$7, [createElementVNode("span", _hoisted_5$7, [__props.parentTitle && __props.showParentTitle ? (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(__props.parentTitle) + " › ", 1)) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(__props.entry.title), 1)]), __props.entry.source === "server" ? (openBlock(), createElementBlock("span", _hoisted_7$3, "server")) : createCommentVNode("v-if", true)]), __props.selected && __props.entry.description ? (openBlock(), createElementBlock("div", _hoisted_8$3, toDisplayString(__props.entry.description), 1)) : createCommentVNode("v-if", true)])]), createElementVNode("div", _hoisted_9$3, [
|
|
1257
|
+
createCommentVNode(" Keybinding badges "),
|
|
1258
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.keybindings, (kb, ki) => {
|
|
1259
|
+
return openBlock(), createBlock(_sfc_main$19, {
|
|
1260
|
+
key: ki,
|
|
1261
|
+
"key-string": kb.key
|
|
1262
|
+
}, null, 8, ["key-string"]);
|
|
1263
|
+
}), 128)),
|
|
1264
|
+
createCommentVNode(" Loading indicator "),
|
|
1265
|
+
__props.loading ? (openBlock(), createElementBlock("span", _hoisted_10$3)) : __props.entry.children?.length ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" Drill-down indicator "), _cache[2] || (_cache[2] = createElementVNode("span", { class: "i-ph-caret-right w-3 h-3 op40" }, null, -1))], 2112)) : createCommentVNode("v-if", true)
|
|
1266
|
+
])], 2)], 40, _hoisted_1$14);
|
|
1267
|
+
};
|
|
1268
|
+
}
|
|
1269
|
+
});
|
|
1270
|
+
//#endregion
|
|
1271
|
+
//#region src/client/webcomponents/components/command-palette/CommandPalette.vue
|
|
1272
|
+
const _hoisted_1$13 = { class: "absolute inset-0 flex items-start justify-center relative pt-[20vh] pointer-events-none" };
|
|
1273
|
+
const _hoisted_2$11 = { class: "w-full w-lg bg-base border border-base rounded-lg shadow-xl pointer-events-auto of-hidden flex flex-col max-h-[60vh]" };
|
|
1274
|
+
const _hoisted_3$9 = { class: "border-b border-base flex items-center px-3" };
|
|
1275
|
+
const _hoisted_4$6 = ["onClick"];
|
|
1276
|
+
const _hoisted_5$6 = { class: "flex-1 of-y-auto p-1.5" };
|
|
1277
|
+
const _hoisted_6$5 = {
|
|
1278
|
+
key: 0,
|
|
1279
|
+
class: "py-8 flex flex-col items-center justify-center gap-2 op50 text-sm"
|
|
1280
|
+
};
|
|
1281
|
+
const _hoisted_7$2 = { key: 0 };
|
|
1282
|
+
const _hoisted_8$2 = { class: "text-primary op100" };
|
|
1283
|
+
const _hoisted_9$2 = { key: 1 };
|
|
1284
|
+
const _hoisted_10$2 = { class: "border-t border-base flex items-center justify-between gap-4 px-3 py-1.5 text-[10px] op50" };
|
|
1285
|
+
const _hoisted_11$2 = { class: "flex items-center gap-1.5" };
|
|
1286
|
+
const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
1287
|
+
__name: "CommandPalette",
|
|
1288
|
+
props: { context: {} },
|
|
1289
|
+
setup(__props) {
|
|
1290
|
+
const props = __props;
|
|
1291
|
+
const commandsCtx = computed(() => props.context.commands);
|
|
1292
|
+
const show = computed({
|
|
1293
|
+
get: () => commandsCtx.value.paletteOpen,
|
|
1294
|
+
set: (v) => {
|
|
1295
|
+
commandsCtx.value.paletteOpen = v;
|
|
1296
|
+
}
|
|
1297
|
+
});
|
|
1298
|
+
const search = ref("");
|
|
1299
|
+
const selectedIndex = ref(0);
|
|
1300
|
+
const searchInput = useTemplateRef("searchInput");
|
|
1301
|
+
const visible = ref(false);
|
|
1302
|
+
const breadcrumb = ref([]);
|
|
1303
|
+
const flattenedItems = computed(() => {
|
|
1304
|
+
const result = [];
|
|
1305
|
+
for (const cmd of commandsCtx.value.paletteCommands) {
|
|
1306
|
+
result.push({
|
|
1307
|
+
entry: cmd,
|
|
1308
|
+
searchTitle: cmd.title
|
|
1309
|
+
});
|
|
1310
|
+
if (cmd.children && cmd.showInPalette !== "without-children") for (const child of cmd.children) {
|
|
1311
|
+
if (child.showInPalette === false) continue;
|
|
1312
|
+
result.push({
|
|
1313
|
+
entry: child,
|
|
1314
|
+
parentTitle: cmd.title,
|
|
1315
|
+
searchTitle: `${cmd.title} > ${child.title}`
|
|
1316
|
+
});
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
return result;
|
|
1320
|
+
});
|
|
1321
|
+
const currentFlatItems = computed(() => {
|
|
1322
|
+
if (breadcrumb.value.length > 0) return breadcrumb.value.at(-1).items.map((entry) => ({
|
|
1323
|
+
entry,
|
|
1324
|
+
searchTitle: entry.title
|
|
1325
|
+
}));
|
|
1326
|
+
return flattenedItems.value;
|
|
1327
|
+
});
|
|
1328
|
+
const dynamicItems = ref();
|
|
1329
|
+
const activeItems = computed(() => {
|
|
1330
|
+
if (dynamicItems.value) return dynamicItems.value.map((entry) => ({
|
|
1331
|
+
entry,
|
|
1332
|
+
searchTitle: entry.title
|
|
1333
|
+
}));
|
|
1334
|
+
return currentFlatItems.value;
|
|
1335
|
+
});
|
|
1336
|
+
const fuse = computed(() => new Fuse(activeItems.value, {
|
|
1337
|
+
keys: [
|
|
1338
|
+
"searchTitle",
|
|
1339
|
+
"entry.description",
|
|
1340
|
+
"entry.id"
|
|
1341
|
+
],
|
|
1342
|
+
distance: 50,
|
|
1343
|
+
threshold: .4
|
|
1344
|
+
}));
|
|
1345
|
+
const filtered = computed(() => {
|
|
1346
|
+
if (!search.value) return activeItems.value;
|
|
1347
|
+
return fuse.value.search(search.value).map((i) => i.item);
|
|
1348
|
+
});
|
|
1349
|
+
watch(search, () => {
|
|
1350
|
+
selectedIndex.value = 0;
|
|
1351
|
+
});
|
|
1352
|
+
watch(show, (v) => {
|
|
1353
|
+
if (v) {
|
|
1354
|
+
search.value = "";
|
|
1355
|
+
selectedIndex.value = 0;
|
|
1356
|
+
breadcrumb.value = [];
|
|
1357
|
+
dynamicItems.value = void 0;
|
|
1358
|
+
requestAnimationFrame(() => {
|
|
1359
|
+
visible.value = true;
|
|
1360
|
+
});
|
|
1361
|
+
nextTick(() => searchInput.value?.focus());
|
|
1362
|
+
} else visible.value = false;
|
|
1363
|
+
});
|
|
1364
|
+
function moveSelected(delta) {
|
|
1365
|
+
const len = filtered.value.length;
|
|
1366
|
+
if (len === 0) return;
|
|
1367
|
+
selectedIndex.value = (selectedIndex.value + delta + len) % len;
|
|
1368
|
+
scrollToItem();
|
|
1369
|
+
}
|
|
1370
|
+
function scrollToItem() {
|
|
1371
|
+
const item = filtered.value[selectedIndex.value];
|
|
1372
|
+
if (!item) return;
|
|
1373
|
+
document.getElementById(`cmd-${item.entry.id}`)?.scrollIntoView({ block: "nearest" });
|
|
1374
|
+
}
|
|
1375
|
+
const loadingId = ref(null);
|
|
1376
|
+
async function enterItem(flatItem) {
|
|
1377
|
+
const entry = flatItem.entry;
|
|
1378
|
+
if (entry.children && entry.children.length > 0) {
|
|
1379
|
+
breadcrumb.value.push({
|
|
1380
|
+
title: entry.title,
|
|
1381
|
+
items: entry.children
|
|
1382
|
+
});
|
|
1383
|
+
search.value = "";
|
|
1384
|
+
selectedIndex.value = 0;
|
|
1385
|
+
dynamicItems.value = void 0;
|
|
1386
|
+
return;
|
|
1387
|
+
}
|
|
1388
|
+
if (entry.source === "client" && entry.action) {
|
|
1389
|
+
try {
|
|
1390
|
+
const result = await entry.action();
|
|
1391
|
+
if (Array.isArray(result)) {
|
|
1392
|
+
dynamicItems.value = result;
|
|
1393
|
+
search.value = "";
|
|
1394
|
+
selectedIndex.value = 0;
|
|
1395
|
+
return;
|
|
1396
|
+
}
|
|
1397
|
+
} catch (err) {
|
|
1398
|
+
console.error(`[DevTools] Command "${entry.id}" failed:`, err);
|
|
1399
|
+
}
|
|
1400
|
+
close();
|
|
1401
|
+
return;
|
|
1402
|
+
}
|
|
1403
|
+
if (entry.source === "server") {
|
|
1404
|
+
loadingId.value = entry.id;
|
|
1405
|
+
try {
|
|
1406
|
+
await commandsCtx.value.execute(entry.id);
|
|
1407
|
+
} catch (err) {
|
|
1408
|
+
console.error(`[DevTools] Command "${entry.id}" failed:`, err);
|
|
1409
|
+
} finally {
|
|
1410
|
+
loadingId.value = null;
|
|
1411
|
+
}
|
|
1412
|
+
close();
|
|
1413
|
+
return;
|
|
1414
|
+
}
|
|
1415
|
+
close();
|
|
1416
|
+
}
|
|
1417
|
+
function close() {
|
|
1418
|
+
visible.value = false;
|
|
1419
|
+
setTimeout(() => {
|
|
1420
|
+
show.value = false;
|
|
1421
|
+
search.value = "";
|
|
1422
|
+
breadcrumb.value = [];
|
|
1423
|
+
dynamicItems.value = void 0;
|
|
1424
|
+
}, 150);
|
|
1425
|
+
}
|
|
1426
|
+
function goBack() {
|
|
1427
|
+
if (dynamicItems.value) {
|
|
1428
|
+
dynamicItems.value = void 0;
|
|
1429
|
+
search.value = "";
|
|
1430
|
+
selectedIndex.value = 0;
|
|
1431
|
+
return;
|
|
1432
|
+
}
|
|
1433
|
+
if (breadcrumb.value.length > 0) {
|
|
1434
|
+
breadcrumb.value.pop();
|
|
1435
|
+
search.value = "";
|
|
1436
|
+
selectedIndex.value = 0;
|
|
1437
|
+
return;
|
|
1438
|
+
}
|
|
1439
|
+
close();
|
|
1440
|
+
}
|
|
1441
|
+
function onKeyDown(e) {
|
|
1442
|
+
if (e.key === "Backspace" && !search.value && (breadcrumb.value.length > 0 || dynamicItems.value)) {
|
|
1443
|
+
e.preventDefault();
|
|
1444
|
+
goBack();
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
function onGlobalKeyDown(e) {
|
|
1448
|
+
if (!show.value) return;
|
|
1449
|
+
switch (e.key) {
|
|
1450
|
+
case "ArrowDown":
|
|
1451
|
+
case "ArrowUp":
|
|
1452
|
+
e.preventDefault();
|
|
1453
|
+
moveSelected(e.key === "ArrowDown" ? 1 : -1);
|
|
1454
|
+
break;
|
|
1455
|
+
case "Enter": {
|
|
1456
|
+
const item = filtered.value[selectedIndex.value];
|
|
1457
|
+
if (item) {
|
|
1458
|
+
e.preventDefault();
|
|
1459
|
+
enterItem(item);
|
|
1460
|
+
}
|
|
1461
|
+
break;
|
|
1462
|
+
}
|
|
1463
|
+
case "Escape":
|
|
1464
|
+
e.preventDefault();
|
|
1465
|
+
if (breadcrumb.value.length > 0 || dynamicItems.value) goBack();
|
|
1466
|
+
else close();
|
|
1467
|
+
break;
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
function getKeybindings(id) {
|
|
1471
|
+
return commandsCtx.value.getKeybindings(id);
|
|
1472
|
+
}
|
|
1473
|
+
return (_ctx, _cache) => {
|
|
1474
|
+
return show.value ? (openBlock(), createElementBlock("div", {
|
|
1475
|
+
key: 0,
|
|
1476
|
+
class: "vite-devtools-command-palette fixed inset-0 z-command-palette",
|
|
1477
|
+
onKeydown: onGlobalKeyDown
|
|
1478
|
+
}, [
|
|
1479
|
+
createCommentVNode(" Backdrop "),
|
|
1480
|
+
createElementVNode("div", {
|
|
1481
|
+
class: normalizeClass(["absolute inset-0 bg-white/50 dark:bg-black/30 transition-opacity duration-150", visible.value ? "opacity-100 backdrop-blur-1" : "opacity-0 backdrop-blur-0"]),
|
|
1482
|
+
onClick: close
|
|
1483
|
+
}, null, 2),
|
|
1484
|
+
createCommentVNode(" Dialog "),
|
|
1485
|
+
createElementVNode("div", _hoisted_1$13, [createElementVNode("div", { class: normalizeClass(["flex flex-col transition-all duration-150", visible.value ? "opacity-100 scale-100 translate-y-0" : "opacity-0 scale-98 -translate-y-2"]) }, [createVNode(_sfc_main$20, { class: "absolute top--32px left-5px w-60 pointer-events-none" }), createElementVNode("div", _hoisted_2$11, [
|
|
1486
|
+
createCommentVNode(" Header "),
|
|
1487
|
+
createElementVNode("header", _hoisted_3$9, [
|
|
1488
|
+
createCommentVNode(" Breadcrumb "),
|
|
1489
|
+
breadcrumb.value.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(breadcrumb.value, (crumb, i) => {
|
|
1490
|
+
return openBlock(), createElementBlock("button", {
|
|
1491
|
+
key: i,
|
|
1492
|
+
class: "text-xs op60 hover:op80 mr-1 flex items-center gap-0.5",
|
|
1493
|
+
onClick: ($event) => {
|
|
1494
|
+
breadcrumb.value.splice(i);
|
|
1495
|
+
search.value = "";
|
|
1496
|
+
selectedIndex.value = 0;
|
|
1497
|
+
}
|
|
1498
|
+
}, [createTextVNode(toDisplayString(crumb.title) + " ", 1), _cache[1] || (_cache[1] = createElementVNode("span", { class: "op40" }, "›", -1))], 8, _hoisted_4$6);
|
|
1499
|
+
}), 128)) : createCommentVNode("v-if", true),
|
|
1500
|
+
withDirectives(createElementVNode("input", {
|
|
1501
|
+
ref_key: "searchInput",
|
|
1502
|
+
ref: searchInput,
|
|
1503
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => search.value = $event),
|
|
1504
|
+
class: "flex-1 bg-transparent py-3 outline-none text-sm text-base",
|
|
1505
|
+
placeholder: "Type a command...",
|
|
1506
|
+
onKeydown: onKeyDown
|
|
1507
|
+
}, null, 544), [[vModelText, search.value]])
|
|
1508
|
+
]),
|
|
1509
|
+
createCommentVNode(" Items "),
|
|
1510
|
+
createElementVNode("div", _hoisted_5$6, [(openBlock(true), createElementBlock(Fragment, null, renderList(filtered.value, (item, idx) => {
|
|
1511
|
+
return openBlock(), createBlock(_sfc_main$18, {
|
|
1512
|
+
key: item.entry.id,
|
|
1513
|
+
entry: item.entry,
|
|
1514
|
+
"parent-title": item.parentTitle,
|
|
1515
|
+
"show-parent-title": !breadcrumb.value.length,
|
|
1516
|
+
selected: selectedIndex.value === idx,
|
|
1517
|
+
loading: loadingId.value === item.entry.id,
|
|
1518
|
+
keybindings: getKeybindings(item.entry.id),
|
|
1519
|
+
onSelect: ($event) => selectedIndex.value = idx,
|
|
1520
|
+
onActivate: ($event) => enterItem(item)
|
|
1521
|
+
}, null, 8, [
|
|
1522
|
+
"entry",
|
|
1523
|
+
"parent-title",
|
|
1524
|
+
"show-parent-title",
|
|
1525
|
+
"selected",
|
|
1526
|
+
"loading",
|
|
1527
|
+
"keybindings",
|
|
1528
|
+
"onSelect",
|
|
1529
|
+
"onActivate"
|
|
1530
|
+
]);
|
|
1531
|
+
}), 128)), !filtered.value.length ? (openBlock(), createElementBlock("div", _hoisted_6$5, [_cache[4] || (_cache[4] = createElementVNode("div", { class: "i-ph-magnifying-glass-duotone w-6 h-6" }, null, -1)), search.value ? (openBlock(), createElementBlock("div", _hoisted_7$2, [
|
|
1532
|
+
_cache[2] || (_cache[2] = createTextVNode(" No results for \"", -1)),
|
|
1533
|
+
createElementVNode("strong", _hoisted_8$2, toDisplayString(search.value), 1),
|
|
1534
|
+
_cache[3] || (_cache[3] = createTextVNode("\" ", -1))
|
|
1535
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_9$2, " No commands available "))])) : createCommentVNode("v-if", true)]),
|
|
1536
|
+
createCommentVNode(" Footer "),
|
|
1537
|
+
createElementVNode("footer", _hoisted_10$2, [
|
|
1538
|
+
_cache[6] || (_cache[6] = createElementVNode("div", { class: "flex items-center gap-1.5" }, [createElementVNode("kbd", { class: "px-1 py-0.5 rounded border border-base bg-base font-mono" }, "↓↑"), createElementVNode("span", null, "navigate")], -1)),
|
|
1539
|
+
createElementVNode("div", _hoisted_11$2, [_cache[5] || (_cache[5] = createElementVNode("kbd", { class: "px-1 py-0.5 rounded border border-base bg-base font-mono" }, "esc", -1)), createElementVNode("span", null, toDisplayString(breadcrumb.value.length > 0 || dynamicItems.value ? "back" : "close"), 1)]),
|
|
1540
|
+
_cache[7] || (_cache[7] = createElementVNode("div", { class: "flex items-center gap-1.5" }, [createElementVNode("kbd", { class: "px-1 py-0.5 rounded border border-base bg-base font-mono" }, "↵"), createElementVNode("span", null, "select")], -1))
|
|
1541
|
+
])
|
|
1542
|
+
])], 2)])
|
|
1543
|
+
], 32)) : createCommentVNode("v-if", true);
|
|
1544
|
+
};
|
|
1545
|
+
}
|
|
1546
|
+
});
|
|
1547
|
+
//#endregion
|
|
1548
|
+
//#region src/client/webcomponents/components/display/ToastOverlay.vue
|
|
1549
|
+
const _hoisted_1$12 = {
|
|
1550
|
+
key: 0,
|
|
1551
|
+
class: "fixed bottom-4 right-4 z-2147483647 flex flex-col gap-2 pointer-events-auto w-72"
|
|
1552
|
+
};
|
|
1553
|
+
const _hoisted_2$10 = ["onClick"];
|
|
1554
|
+
const _hoisted_3$8 = ["onClick"];
|
|
1555
|
+
const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
1556
|
+
__name: "ToastOverlay",
|
|
1557
|
+
props: { context: {} },
|
|
1558
|
+
setup(__props) {
|
|
1559
|
+
const props = __props;
|
|
1560
|
+
if (props.context) useLogs(props.context);
|
|
1561
|
+
const toasts = useToasts();
|
|
1562
|
+
function openLogs(toastId) {
|
|
1563
|
+
dismissToast(toastId);
|
|
1564
|
+
props.context?.docks.switchEntry("~logs");
|
|
1565
|
+
}
|
|
1566
|
+
return (_ctx, _cache) => {
|
|
1567
|
+
return unref(toasts).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$12, [createVNode(TransitionGroup, {
|
|
1568
|
+
"enter-active-class": "transition-all duration-300 ease-out",
|
|
1569
|
+
"leave-active-class": "transition-all duration-200 ease-in",
|
|
1570
|
+
"enter-from-class": "opacity-0 translate-x-4",
|
|
1571
|
+
"leave-to-class": "opacity-0 translate-x-4"
|
|
1572
|
+
}, {
|
|
1573
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(toasts), (toast) => {
|
|
1574
|
+
return openBlock(), createElementBlock("div", {
|
|
1575
|
+
key: toast.id,
|
|
1576
|
+
class: "bg-glass border color-base border-base shadow-xl cursor-pointer hover:bg-active transition-colors rounded",
|
|
1577
|
+
onClick: ($event) => openLogs(toast.id)
|
|
1578
|
+
}, [createVNode(_sfc_main$22, {
|
|
1579
|
+
entry: toast.entry,
|
|
1580
|
+
compact: "",
|
|
1581
|
+
class: "px-3 py-2.5"
|
|
1582
|
+
}, {
|
|
1583
|
+
actions: withCtx(() => [createElementVNode("button", {
|
|
1584
|
+
class: "flex-none op30 hover:op100 p-0.5 rounded hover:bg-active transition",
|
|
1585
|
+
onClick: withModifiers(($event) => unref(dismissToast)(toast.id), ["stop"])
|
|
1586
|
+
}, [..._cache[0] || (_cache[0] = [createElementVNode("div", { class: "i-ph-x w-3 h-3" }, null, -1)])], 8, _hoisted_3$8)]),
|
|
1587
|
+
_: 2
|
|
1588
|
+
}, 1032, ["entry"])], 8, _hoisted_2$10);
|
|
1589
|
+
}), 128))]),
|
|
1590
|
+
_: 1
|
|
1591
|
+
})])) : createCommentVNode("v-if", true);
|
|
1592
|
+
};
|
|
1593
|
+
}
|
|
1594
|
+
});
|
|
1595
|
+
//#endregion
|
|
1596
|
+
//#region src/client/webcomponents/components/floating/FloatingPopover.ts
|
|
1597
|
+
const DETECT_MARGIN = 100;
|
|
1598
|
+
const DEFAULT_GAP = 10;
|
|
1599
|
+
const FloatingPopoverComponent = defineComponent({
|
|
1600
|
+
name: "FloatingPopover",
|
|
1601
|
+
props: {
|
|
1602
|
+
item: {
|
|
1603
|
+
type: Object,
|
|
1604
|
+
required: false
|
|
1605
|
+
},
|
|
1606
|
+
dismissOnClickOutside: {
|
|
1607
|
+
type: Boolean,
|
|
1608
|
+
default: true
|
|
1609
|
+
}
|
|
1610
|
+
},
|
|
1611
|
+
emits: ["dismiss"],
|
|
1612
|
+
setup(props, { emit }) {
|
|
1613
|
+
const panel = useTemplateRef("panel");
|
|
1614
|
+
const el = ref(props.item?.el);
|
|
1615
|
+
const renderCounter = ref(0);
|
|
1616
|
+
const clearThrottled = useDebounceFn(() => {
|
|
1617
|
+
if (props.item?.el == null) el.value = void 0;
|
|
1618
|
+
}, 800);
|
|
1619
|
+
if (props.dismissOnClickOutside) onClickOutside(panel, () => {
|
|
1620
|
+
emit("dismiss");
|
|
1621
|
+
});
|
|
1622
|
+
watch(() => props.item, (value) => {
|
|
1623
|
+
if (value) if (el.value !== value.el) el.value = value.el;
|
|
1624
|
+
else renderCounter.value++;
|
|
1625
|
+
else clearThrottled();
|
|
1626
|
+
});
|
|
1627
|
+
let previousContent;
|
|
1628
|
+
let previousStyle = {};
|
|
1629
|
+
return () => {
|
|
1630
|
+
renderCounter.value;
|
|
1631
|
+
if (!el.value) return null;
|
|
1632
|
+
if (!props.item) return h("div", {
|
|
1633
|
+
ref: "panel",
|
|
1634
|
+
class: ["fixed z-floating-tooltip text-xs transition-all duration-300 w-max bg-glass color-base border border-base rounded px2 p1", "op0 pointer-events-none"],
|
|
1635
|
+
style: previousStyle
|
|
1636
|
+
}, previousContent);
|
|
1637
|
+
const rect = el.value.getBoundingClientRect();
|
|
1638
|
+
let align = "bottom";
|
|
1639
|
+
const vw = window.innerWidth;
|
|
1640
|
+
const vh = window.innerHeight;
|
|
1641
|
+
if (rect.left < DETECT_MARGIN) align = "right";
|
|
1642
|
+
else if (rect.left + rect.width > vw - DETECT_MARGIN) align = "left";
|
|
1643
|
+
else if (rect.top < DETECT_MARGIN) align = "bottom";
|
|
1644
|
+
else if (rect.top + rect.height > vh - DETECT_MARGIN) align = "top";
|
|
1645
|
+
let style = {};
|
|
1646
|
+
const gap = props.item?.gap ?? DEFAULT_GAP;
|
|
1647
|
+
switch (align) {
|
|
1648
|
+
case "bottom":
|
|
1649
|
+
style = {
|
|
1650
|
+
left: `${rect.left + rect.width / 2}px`,
|
|
1651
|
+
top: `${rect.top + rect.height + gap}px`,
|
|
1652
|
+
transform: "translateX(-50%)"
|
|
1653
|
+
};
|
|
1654
|
+
break;
|
|
1655
|
+
case "top":
|
|
1656
|
+
style = {
|
|
1657
|
+
left: `${rect.left + rect.width / 2}px`,
|
|
1658
|
+
bottom: `${vh - rect.top + gap}px`,
|
|
1659
|
+
transform: "translateX(-50%)"
|
|
1660
|
+
};
|
|
1661
|
+
break;
|
|
1662
|
+
case "left":
|
|
1663
|
+
style = {
|
|
1664
|
+
right: `${vw - rect.left + gap}px`,
|
|
1665
|
+
top: `${rect.top + rect.height / 2}px`,
|
|
1666
|
+
transform: "translateY(-50%)"
|
|
1667
|
+
};
|
|
1668
|
+
break;
|
|
1669
|
+
case "right":
|
|
1670
|
+
style = {
|
|
1671
|
+
left: `${rect.left + rect.width + gap}px`,
|
|
1672
|
+
top: `${rect.top + rect.height / 2}px`,
|
|
1673
|
+
transform: "translateY(-50%)"
|
|
1674
|
+
};
|
|
1675
|
+
break;
|
|
1676
|
+
}
|
|
1677
|
+
previousStyle = style;
|
|
1678
|
+
const content = (typeof props.item?.content === "string" ? h("span", props.item?.content) : props.item?.content()) ?? previousContent;
|
|
1679
|
+
previousContent = content;
|
|
1680
|
+
return h("div", {
|
|
1681
|
+
ref: "panel",
|
|
1682
|
+
class: ["fixed z-floating-tooltip text-xs transition-all duration-300 w-max bg-glass color-base border border-base rounded px2 p1", props.item ? "op100" : "op0 pointer-events-none"],
|
|
1683
|
+
style
|
|
1684
|
+
}, content);
|
|
1685
|
+
};
|
|
1686
|
+
}
|
|
1687
|
+
});
|
|
1688
|
+
//#endregion
|
|
1689
|
+
//#region src/client/webcomponents/components/floating/FloatingElements.vue
|
|
1690
|
+
const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
1691
|
+
__name: "FloatingElements",
|
|
1692
|
+
setup(__props) {
|
|
1693
|
+
const tooltip = useFloatingTooltip();
|
|
1694
|
+
const docksOverflowPanel = useDocksOverflowPanel();
|
|
1695
|
+
const dockContextMenu = useDockContextMenu();
|
|
1696
|
+
const edgePositionDropdown = useEdgePositionDropdown();
|
|
1697
|
+
useEventListener(window, "keydown", (e) => {
|
|
1698
|
+
if (e.key !== "Escape") return;
|
|
1699
|
+
if (dockContextMenu.value) setDockContextMenu(null);
|
|
1700
|
+
});
|
|
1701
|
+
return (_ctx, _cache) => {
|
|
1702
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
1703
|
+
createVNode(unref(FloatingPopoverComponent), {
|
|
1704
|
+
item: unref(docksOverflowPanel),
|
|
1705
|
+
onDismiss: _cache[0] || (_cache[0] = () => unref(setDocksOverflowPanel)(null))
|
|
1706
|
+
}, null, 8, ["item"]),
|
|
1707
|
+
createVNode(unref(FloatingPopoverComponent), {
|
|
1708
|
+
item: unref(dockContextMenu),
|
|
1709
|
+
onDismiss: _cache[1] || (_cache[1] = () => unref(setDockContextMenu)(null))
|
|
1710
|
+
}, null, 8, ["item"]),
|
|
1711
|
+
createVNode(unref(FloatingPopoverComponent), {
|
|
1712
|
+
item: unref(edgePositionDropdown),
|
|
1713
|
+
onDismiss: _cache[2] || (_cache[2] = () => unref(setEdgePositionDropdown)(null))
|
|
1714
|
+
}, null, 8, ["item"]),
|
|
1715
|
+
createVNode(unref(FloatingPopoverComponent), { item: unref(tooltip) }, null, 8, ["item"])
|
|
1716
|
+
], 64);
|
|
1717
|
+
};
|
|
1718
|
+
}
|
|
1719
|
+
});
|
|
1720
|
+
//#endregion
|
|
1721
|
+
//#region src/client/webcomponents/components/dock/DockContextMenu.ts
|
|
1722
|
+
function renderMenuItem(item) {
|
|
1723
|
+
return h("button", {
|
|
1724
|
+
class: "flex items-center gap-2 px3 py1.5 rounded hover:bg-active transition text-left",
|
|
1725
|
+
onClick: item.action
|
|
1726
|
+
}, [h("div", { class: `${item.icon} text-base op60` }), h("span", item.label)]);
|
|
1727
|
+
}
|
|
1728
|
+
function hideDock(context, entry) {
|
|
1729
|
+
const settingsStore = context.docks.settings;
|
|
1730
|
+
const id = entry.id;
|
|
1731
|
+
settingsStore.mutate((state) => {
|
|
1732
|
+
if (!state.docksHidden.includes(id)) state.docksHidden = [...state.docksHidden, id];
|
|
1733
|
+
});
|
|
1734
|
+
if (context.docks.selected?.id === id) context.docks.switchEntry(null);
|
|
1735
|
+
setDockContextMenu(null);
|
|
1736
|
+
}
|
|
1737
|
+
function refreshDock(context, entry) {
|
|
1738
|
+
const iframe = context.docks.getStateById(entry.id)?.domElements.iframe;
|
|
1739
|
+
if (!iframe) {
|
|
1740
|
+
setDockContextMenu(null);
|
|
1741
|
+
return;
|
|
1742
|
+
}
|
|
1743
|
+
const src = iframe.src;
|
|
1744
|
+
iframe.src = "";
|
|
1745
|
+
iframe.src = src;
|
|
1746
|
+
setDockContextMenu(null);
|
|
1747
|
+
}
|
|
1748
|
+
function canHide(context, entry) {
|
|
1749
|
+
if (entry.id === "~settings") return false;
|
|
1750
|
+
return context.docks.entries.some((item) => item.id === entry.id);
|
|
1751
|
+
}
|
|
1752
|
+
function canRefresh(entry) {
|
|
1753
|
+
return entry.type === "iframe";
|
|
1754
|
+
}
|
|
1755
|
+
function openDockContextMenu(options) {
|
|
1756
|
+
const { context, entry, el, gap = 6 } = options;
|
|
1757
|
+
const isEdgeMode = context.panel.store.mode === "edge";
|
|
1758
|
+
const items = [
|
|
1759
|
+
{
|
|
1760
|
+
label: "Hide",
|
|
1761
|
+
icon: "i-ph-eye-slash-duotone",
|
|
1762
|
+
action: () => hideDock(context, entry),
|
|
1763
|
+
visible: canHide(context, entry)
|
|
1764
|
+
},
|
|
1765
|
+
{
|
|
1766
|
+
label: "Refresh",
|
|
1767
|
+
icon: "i-ph-arrow-clockwise-duotone",
|
|
1768
|
+
action: () => refreshDock(context, entry),
|
|
1769
|
+
visible: canRefresh(entry)
|
|
1770
|
+
},
|
|
1771
|
+
{
|
|
1772
|
+
label: isEdgeMode ? "Float Mode" : "Edge Mode",
|
|
1773
|
+
icon: isEdgeMode ? "i-ph-arrows-out-duotone" : "i-ph-square-half-bottom-duotone",
|
|
1774
|
+
action: () => {
|
|
1775
|
+
if (isEdgeMode) {
|
|
1776
|
+
const store = context.panel.store;
|
|
1777
|
+
switch (store.position) {
|
|
1778
|
+
case "bottom":
|
|
1779
|
+
store.left = 50;
|
|
1780
|
+
store.top = 100;
|
|
1781
|
+
break;
|
|
1782
|
+
case "top":
|
|
1783
|
+
store.left = 50;
|
|
1784
|
+
store.top = 0;
|
|
1785
|
+
break;
|
|
1786
|
+
case "left":
|
|
1787
|
+
store.left = 0;
|
|
1788
|
+
store.top = 50;
|
|
1789
|
+
break;
|
|
1790
|
+
case "right":
|
|
1791
|
+
store.left = 100;
|
|
1792
|
+
store.top = 50;
|
|
1793
|
+
break;
|
|
1794
|
+
}
|
|
1795
|
+
store.mode = "float";
|
|
1796
|
+
} else context.panel.store.mode = "edge";
|
|
1797
|
+
setDockContextMenu(null);
|
|
1798
|
+
},
|
|
1799
|
+
visible: context.clientType === "embedded"
|
|
1800
|
+
},
|
|
1801
|
+
{
|
|
1802
|
+
label: "Popup",
|
|
1803
|
+
icon: "i-ph-arrow-square-out-duotone",
|
|
1804
|
+
action: () => {
|
|
1805
|
+
setDockContextMenu(null);
|
|
1806
|
+
requestDockPopupOpen(context);
|
|
1807
|
+
},
|
|
1808
|
+
visible: isDockPopupSupported() && !useIsDockPopupOpen().value && context.clientType === "embedded"
|
|
1809
|
+
}
|
|
1810
|
+
].filter((item) => item.visible);
|
|
1811
|
+
if (items.length === 0) return;
|
|
1812
|
+
setDockContextMenu({
|
|
1813
|
+
el,
|
|
1814
|
+
gap,
|
|
1815
|
+
content: () => h("div", { class: "flex flex-col text-sm min-w-36 mx--1" }, items.map(renderMenuItem))
|
|
1816
|
+
});
|
|
1817
|
+
}
|
|
1818
|
+
//#endregion
|
|
1819
|
+
//#region src/client/webcomponents/components/dock/DockEntry.vue
|
|
1820
|
+
const _hoisted_1$11 = ["title"];
|
|
1821
|
+
const _hoisted_2$9 = {
|
|
1822
|
+
key: 0,
|
|
1823
|
+
class: "absolute top-0.5 right-0 bg-gray-6 text-white text-0.6em px-1 rounded-full shadow"
|
|
1824
|
+
};
|
|
1825
|
+
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
1826
|
+
__name: "DockEntry",
|
|
1827
|
+
props: {
|
|
1828
|
+
context: {},
|
|
1829
|
+
dock: {},
|
|
1830
|
+
isAction: { type: Boolean },
|
|
1831
|
+
isSelected: { type: Boolean },
|
|
1832
|
+
isDimmed: { type: Boolean },
|
|
1833
|
+
isVertical: { type: Boolean },
|
|
1834
|
+
badge: {},
|
|
1835
|
+
tooltip: {
|
|
1836
|
+
type: Boolean,
|
|
1837
|
+
default: true
|
|
1838
|
+
}
|
|
1839
|
+
},
|
|
1840
|
+
setup(__props) {
|
|
1841
|
+
const props = __props;
|
|
1842
|
+
const button = useTemplateRef("button");
|
|
1843
|
+
function updateTooltip() {
|
|
1844
|
+
if (!props.tooltip) return;
|
|
1845
|
+
if (!button.value) return;
|
|
1846
|
+
setFloatingTooltip({
|
|
1847
|
+
content: props.dock.title,
|
|
1848
|
+
el: button.value
|
|
1849
|
+
});
|
|
1850
|
+
}
|
|
1851
|
+
function clearTitle() {
|
|
1852
|
+
if (!props.tooltip) return;
|
|
1853
|
+
setFloatingTooltip(null);
|
|
1854
|
+
}
|
|
1855
|
+
function openContextMenu(e) {
|
|
1856
|
+
if (!button.value) return;
|
|
1857
|
+
if (props.dock.id === "overflow") return;
|
|
1858
|
+
e.preventDefault();
|
|
1859
|
+
clearTitle();
|
|
1860
|
+
const entry = props.context.docks.entries.find((item) => item.id === props.dock.id);
|
|
1861
|
+
if (!entry) return;
|
|
1862
|
+
openDockContextMenu({
|
|
1863
|
+
context: props.context,
|
|
1864
|
+
entry,
|
|
1865
|
+
el: button.value,
|
|
1866
|
+
gap: 6
|
|
1867
|
+
});
|
|
1868
|
+
}
|
|
1869
|
+
useEventListener("pointerdown", () => {
|
|
1870
|
+
if (!props.tooltip) return;
|
|
1871
|
+
setFloatingTooltip(null);
|
|
1872
|
+
});
|
|
1873
|
+
return (_ctx, _cache) => {
|
|
1874
|
+
return openBlock(), createElementBlock("div", {
|
|
1875
|
+
key: __props.dock.id,
|
|
1876
|
+
class: "relative group vite-devtools-dock-entry",
|
|
1877
|
+
onPointerenter: updateTooltip,
|
|
1878
|
+
onPointerleave: clearTitle,
|
|
1879
|
+
onContextmenu: openContextMenu
|
|
1880
|
+
}, [createElementVNode("button", {
|
|
1881
|
+
ref_key: "button",
|
|
1882
|
+
ref: button,
|
|
1883
|
+
title: __props.dock.title,
|
|
1884
|
+
class: normalizeClass([[
|
|
1885
|
+
__props.isVertical ? "rotate-270" : "",
|
|
1886
|
+
__props.isDimmed ? "op50 saturate-0" : "",
|
|
1887
|
+
__props.isSelected ? "scale-120 text-purple" : "",
|
|
1888
|
+
__props.isAction ? "bg-[#8881] hover:bg-[#8882] rounded-full" : "rounded-xl"
|
|
1889
|
+
], "flex items-center justify-center p1.5 hover:bg-[#8881] hover:scale-110 transition-all duration-300 relative"])
|
|
1890
|
+
}, [createVNode(_sfc_main$21, {
|
|
1891
|
+
icon: __props.dock.icon,
|
|
1892
|
+
title: __props.dock.title,
|
|
1893
|
+
class: "w-5 h-5 select-none"
|
|
1894
|
+
}, null, 8, ["icon", "title"]), __props.badge ? (openBlock(), createElementBlock("div", _hoisted_2$9, toDisplayString(__props.badge), 1)) : createCommentVNode("v-if", true)], 10, _hoisted_1$11)], 32);
|
|
1895
|
+
};
|
|
1896
|
+
}
|
|
1897
|
+
});
|
|
1898
|
+
//#endregion
|
|
1899
|
+
//#region src/client/webcomponents/components/dock/DockEntries.vue
|
|
1900
|
+
const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
1901
|
+
__name: "DockEntries",
|
|
1902
|
+
props: {
|
|
1903
|
+
context: {},
|
|
1904
|
+
entries: {},
|
|
1905
|
+
selected: {},
|
|
1906
|
+
isVertical: { type: Boolean }
|
|
1907
|
+
},
|
|
1908
|
+
emits: ["select"],
|
|
1909
|
+
setup(__props, { emit: __emit }) {
|
|
1910
|
+
const props = __props;
|
|
1911
|
+
const emit = __emit;
|
|
1912
|
+
const { selected, isVertical, entries } = toRefs(props);
|
|
1913
|
+
function isDockVisible(dock) {
|
|
1914
|
+
if (!dock.when) return true;
|
|
1915
|
+
return evaluateWhen(dock.when, props.context.when.context);
|
|
1916
|
+
}
|
|
1917
|
+
function toggleDockEntry(dock) {
|
|
1918
|
+
if (selected.value?.id === dock.id) emit("select", void 0);
|
|
1919
|
+
else emit("select", dock);
|
|
1920
|
+
}
|
|
1921
|
+
return (_ctx, _cache) => {
|
|
1922
|
+
return openBlock(true), createElementBlock(Fragment, null, renderList(unref(entries), (dock) => {
|
|
1923
|
+
return openBlock(), createElementBlock(Fragment, { key: dock.id }, [isDockVisible(dock) ? (openBlock(), createBlock(_sfc_main$14, {
|
|
1924
|
+
key: 0,
|
|
1925
|
+
context: __props.context,
|
|
1926
|
+
dock,
|
|
1927
|
+
"is-action": dock.type === "action",
|
|
1928
|
+
"is-selected": unref(selected)?.id === dock.id,
|
|
1929
|
+
"is-dimmed": unref(selected) ? unref(selected).id !== dock.id : false,
|
|
1930
|
+
"is-vertical": unref(isVertical),
|
|
1931
|
+
badge: dock.badge,
|
|
1932
|
+
onClick: ($event) => toggleDockEntry(dock)
|
|
1933
|
+
}, null, 8, [
|
|
1934
|
+
"context",
|
|
1935
|
+
"dock",
|
|
1936
|
+
"is-action",
|
|
1937
|
+
"is-selected",
|
|
1938
|
+
"is-dimmed",
|
|
1939
|
+
"is-vertical",
|
|
1940
|
+
"badge",
|
|
1941
|
+
"onClick"
|
|
1942
|
+
])) : createCommentVNode("v-if", true)], 64);
|
|
1943
|
+
}), 128);
|
|
1944
|
+
};
|
|
1945
|
+
}
|
|
1946
|
+
});
|
|
1947
|
+
//#endregion
|
|
1948
|
+
//#region src/client/webcomponents/components/dock/DockEntriesWithCategories.vue
|
|
1949
|
+
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
1950
|
+
__name: "DockEntriesWithCategories",
|
|
1951
|
+
props: {
|
|
1952
|
+
context: {},
|
|
1953
|
+
groups: {},
|
|
1954
|
+
selected: {},
|
|
1955
|
+
isVertical: { type: Boolean },
|
|
1956
|
+
rotate: {
|
|
1957
|
+
type: Boolean,
|
|
1958
|
+
default: true
|
|
1959
|
+
}
|
|
1960
|
+
},
|
|
1961
|
+
emits: ["select"],
|
|
1962
|
+
setup(__props, { emit: __emit }) {
|
|
1963
|
+
const emit = __emit;
|
|
1964
|
+
return (_ctx, _cache) => {
|
|
1965
|
+
return openBlock(true), createElementBlock(Fragment, null, renderList(__props.groups, ([category, entries], idx) => {
|
|
1966
|
+
return openBlock(), createElementBlock(Fragment, { key: category }, [idx > 0 ? renderSlot(_ctx.$slots, "separator", {
|
|
1967
|
+
key: 0,
|
|
1968
|
+
category,
|
|
1969
|
+
index: idx,
|
|
1970
|
+
isVertical: __props.isVertical
|
|
1971
|
+
}, () => [createElementVNode("div", { class: normalizeClass(["border-base m1", __props.isVertical && !__props.rotate ? "w-20px h-px border-b-1.5" : "h-20px w-px border-r-1.5"]) }, null, 2)]) : createCommentVNode("v-if", true), createVNode(_sfc_main$13, {
|
|
1972
|
+
context: __props.context,
|
|
1973
|
+
entries,
|
|
1974
|
+
"is-vertical": __props.isVertical && __props.rotate,
|
|
1975
|
+
selected: __props.selected,
|
|
1976
|
+
onSelect: _cache[0] || (_cache[0] = (e) => emit("select", e))
|
|
1977
|
+
}, null, 8, [
|
|
1978
|
+
"context",
|
|
1979
|
+
"entries",
|
|
1980
|
+
"is-vertical",
|
|
1981
|
+
"selected"
|
|
1982
|
+
])], 64);
|
|
1983
|
+
}), 128);
|
|
1984
|
+
};
|
|
1985
|
+
}
|
|
1986
|
+
});
|
|
1987
|
+
//#endregion
|
|
1988
|
+
//#region src/client/webcomponents/utils/PersistedDomViewsManager.ts
|
|
1989
|
+
var PersistedDomViewsManager = class {
|
|
1990
|
+
holders = {};
|
|
1991
|
+
constructor(container) {
|
|
1992
|
+
this.container = container;
|
|
1993
|
+
}
|
|
1994
|
+
getHolder(id, _type) {
|
|
1995
|
+
return this.holders[id];
|
|
1996
|
+
}
|
|
1997
|
+
getOrCreateHolder(id, type) {
|
|
1998
|
+
if (!this.container.value) throw new Error("[VITE DEVTOOLS] PersistedDomViewsManager: container is not set");
|
|
1999
|
+
let holder;
|
|
2000
|
+
if (!this.holders[id]) {
|
|
2001
|
+
const el = document.createElement(type);
|
|
2002
|
+
this.holders[id] = new PersistedDomHolder(id, el);
|
|
2003
|
+
this.container.value.appendChild(el);
|
|
2004
|
+
holder = this.holders[id];
|
|
2005
|
+
} else holder = this.holders[id];
|
|
2006
|
+
return holder;
|
|
2007
|
+
}
|
|
2008
|
+
removeHolder(id) {
|
|
2009
|
+
const holder = this.holders[id];
|
|
2010
|
+
if (!holder) return false;
|
|
2011
|
+
holder.unmount();
|
|
2012
|
+
holder.element.remove();
|
|
2013
|
+
delete this.holders[id];
|
|
2014
|
+
return true;
|
|
2015
|
+
}
|
|
2016
|
+
};
|
|
2017
|
+
var PersistedDomHolder = class {
|
|
2018
|
+
element;
|
|
2019
|
+
id;
|
|
2020
|
+
anchor;
|
|
2021
|
+
_cleanups = [];
|
|
2022
|
+
constructor(id, iframe) {
|
|
2023
|
+
this.id = id;
|
|
2024
|
+
this.element = iframe;
|
|
2025
|
+
}
|
|
2026
|
+
cleanup() {
|
|
2027
|
+
this._cleanups.forEach((cleanup) => cleanup());
|
|
2028
|
+
this._cleanups = [];
|
|
2029
|
+
}
|
|
2030
|
+
mount(parent) {
|
|
2031
|
+
if (this.anchor === parent) {
|
|
2032
|
+
this.show();
|
|
2033
|
+
return;
|
|
2034
|
+
}
|
|
2035
|
+
this.cleanup();
|
|
2036
|
+
this.anchor = parent;
|
|
2037
|
+
const update = () => this.update();
|
|
2038
|
+
window.addEventListener("resize", update);
|
|
2039
|
+
this._cleanups.push(() => window.removeEventListener("resize", update));
|
|
2040
|
+
this.show();
|
|
2041
|
+
}
|
|
2042
|
+
hide() {
|
|
2043
|
+
this.element.style.display = "none";
|
|
2044
|
+
}
|
|
2045
|
+
show() {
|
|
2046
|
+
this.element.style.display = "block";
|
|
2047
|
+
this.update();
|
|
2048
|
+
}
|
|
2049
|
+
update() {
|
|
2050
|
+
if (!this.anchor) return;
|
|
2051
|
+
const rect = this.anchor.getBoundingClientRect();
|
|
2052
|
+
this.element.style.position = "absolute";
|
|
2053
|
+
this.element.style.width = `${rect.width}px`;
|
|
2054
|
+
this.element.style.height = `${rect.height}px`;
|
|
2055
|
+
}
|
|
2056
|
+
unmount() {
|
|
2057
|
+
this.cleanup();
|
|
2058
|
+
this.hide();
|
|
2059
|
+
this.anchor = void 0;
|
|
2060
|
+
}
|
|
2061
|
+
};
|
|
2062
|
+
//#endregion
|
|
2063
|
+
//#region src/client/webcomponents/components/icons/VitePlus.vue
|
|
2064
|
+
const _sfc_main$11 = {};
|
|
2065
|
+
const _hoisted_1$10 = {
|
|
2066
|
+
viewBox: "0 0 40 40",
|
|
2067
|
+
fill: "none",
|
|
2068
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2069
|
+
};
|
|
2070
|
+
function _sfc_render(_ctx, _cache) {
|
|
2071
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$10, [..._cache[0] || (_cache[0] = [createStaticVNode("<path d=\"M21.1636 29.535C21.1017 29.6144 21.0166 29.6725 20.92 29.7012C20.8234 29.7298 20.7204 29.7276 20.6251 29.6947C20.5299 29.6619 20.4474 29.6001 20.389 29.518C20.3307 29.436 20.2994 29.3377 20.2996 29.237V24.834C20.2996 24.5775 20.1978 24.3316 20.0164 24.1502C19.8351 23.9689 19.5891 23.867 19.3326 23.867H14.4706C14.3819 23.867 14.2948 23.8426 14.219 23.7963C14.1432 23.7501 14.0816 23.6839 14.041 23.6049C14.0004 23.526 13.9823 23.4374 13.9888 23.3488C13.9952 23.2603 14.026 23.1752 14.0776 23.103L17.2746 18.628C17.3782 18.4833 17.4399 18.3129 17.4529 18.1354C17.4658 17.958 17.4296 17.7804 17.3481 17.6222C17.2666 17.464 17.1431 17.3314 16.9911 17.2389C16.8391 17.1464 16.6646 17.0977 16.4866 17.098H10.6036C10.5149 17.098 10.4278 17.0736 10.352 17.0273C10.2762 16.9811 10.2146 16.9149 10.174 16.8359C10.1334 16.757 10.1153 16.6684 10.1218 16.5798C10.1282 16.4913 10.159 16.4062 10.2106 16.334L14.3536 10.533C14.3982 10.47 14.4572 10.4186 14.5258 10.3833C14.5944 10.348 14.6705 10.3297 14.7476 10.33H27.0956C27.4886 10.33 27.7176 10.775 27.4886 11.094L24.2916 15.57C23.8346 16.21 24.2916 17.1 25.0796 17.1H29.9406C30.3446 17.1 30.5706 17.564 30.3206 17.882L21.1636 29.535Z\" fill=\"#6254FE\"></path><mask id=\"mask0_3_2\" style=\"mask-type:alpha;\" maskUnits=\"userSpaceOnUse\" x=\"10\" y=\"10\" width=\"21\" height=\"20\"><path d=\"M21.1636 29.535C21.1017 29.6144 21.0166 29.6725 20.92 29.7012C20.8234 29.7298 20.7204 29.7276 20.6251 29.6947C20.5299 29.6619 20.4474 29.6001 20.389 29.518C20.3307 29.436 20.2994 29.3377 20.2996 29.237V24.834C20.2996 24.5775 20.1978 24.3316 20.0164 24.1502C19.8351 23.9689 19.5891 23.867 19.3326 23.867H14.4706C14.3819 23.867 14.2948 23.8426 14.219 23.7963C14.1432 23.7501 14.0816 23.6839 14.041 23.6049C14.0004 23.526 13.9823 23.4374 13.9888 23.3488C13.9952 23.2603 14.026 23.1752 14.0776 23.103L17.2746 18.628C17.3782 18.4833 17.4399 18.3129 17.4529 18.1354C17.4658 17.958 17.4296 17.7804 17.3481 17.6222C17.2666 17.464 17.1431 17.3314 16.9911 17.2389C16.8391 17.1464 16.6646 17.0977 16.4866 17.098H10.6036C10.5149 17.098 10.4278 17.0736 10.352 17.0273C10.2762 16.9811 10.2146 16.9149 10.174 16.8359C10.1334 16.757 10.1153 16.6684 10.1218 16.5798C10.1282 16.4913 10.159 16.4062 10.2106 16.334L14.3536 10.533C14.3982 10.47 14.4572 10.4186 14.5258 10.3833C14.5944 10.348 14.6705 10.3297 14.7476 10.33H27.0956C27.4886 10.33 27.7176 10.775 27.4886 11.094L24.2916 15.57C23.8346 16.21 24.2916 17.1 25.0796 17.1H29.9406C30.3446 17.1 30.5706 17.564 30.3206 17.882L21.1636 29.535Z\" fill=\"#833BFF\"></path></mask><g mask=\"url(#mask0_3_2)\"><g filter=\"url(#filter0_f_3_2)\"><path d=\"M20.7408 26.1119C20.745 27.4119 17.935 28.475 14.4644 28.4863C10.9939 28.4975 8.17705 27.4527 8.17283 26.1527C8.16861 24.8526 10.9786 23.7895 14.4492 23.7783C17.9197 23.767 20.7365 24.8118 20.7408 26.1119Z\" fill=\"#EDE6FF\"></path></g><g filter=\"url(#filter1_f_3_2)\"><path d=\"M18.7973 18.0605C18.8053 20.5148 13.0998 22.523 6.05378 22.5458C-0.992227 22.5687 -6.71061 20.5976 -6.71858 18.1433C-6.72654 15.6889 -1.02108 13.6808 6.02493 13.6579C13.0709 13.635 18.7893 15.6061 18.7973 18.0605Z\" fill=\"#EDE6FF\"></path></g><g filter=\"url(#filter2_f_3_2)\"><path d=\"M18.8447 17.4381C18.8489 18.7382 13.0191 19.8111 5.82339 19.8344C-1.37229 19.8578 -7.20896 18.8228 -7.21318 17.5227C-7.2174 16.2226 -1.38757 15.1498 5.80811 15.1264C13.0038 15.1031 18.8405 16.1381 18.8447 17.4381Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter3_f_3_2)\"><path d=\"M20.9053 25.1293C20.9095 26.4294 15.0581 27.5022 7.83591 27.5256C0.613678 27.549 -5.24451 26.5141 -5.24872 25.214C-5.25293 23.9139 0.598424 22.841 7.82065 22.8176C15.0429 22.7942 20.9011 23.8292 20.9053 25.1293Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter4_f_3_2)\"><path d=\"M21.561 25.6205C21.5652 26.9206 15.7139 27.9935 8.49167 28.017C1.26948 28.0404 -4.58868 27.0055 -4.5929 25.7054C-4.59712 24.4054 1.2542 23.3324 8.47639 23.309C15.6986 23.2855 21.5567 24.3205 21.561 25.6205Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter5_f_3_2)\"><path d=\"M23.3606 14.7039C23.5547 11.3881 27.9295 8.94703 33.1319 9.25155C38.3344 9.55608 42.3945 12.4909 42.2004 15.8067C42.0063 19.1224 37.6315 21.5635 32.4291 21.259C27.2266 20.9545 23.1665 18.0196 23.3606 14.7039Z\" fill=\"#EDE6FF\"></path></g><g filter=\"url(#filter6_f_3_2)\"><path d=\"M24.0654 16.8853C24.0512 16.0664 28.1532 15.3313 33.2274 15.2436C38.3016 15.1558 42.4265 15.7485 42.4407 16.5674C42.4548 17.3863 38.3529 18.1214 33.2787 18.2091C28.2045 18.2969 24.0796 17.7042 24.0654 16.8853Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter7_f_3_2)\"><path d=\"M24.0654 16.8853C24.0512 16.0664 28.1532 15.3313 33.2274 15.2436C38.3016 15.1558 42.4265 15.7485 42.4407 16.5674C42.4548 17.3863 38.3529 18.1214 33.2787 18.2091C28.2045 18.2969 24.0796 17.7042 24.0654 16.8853Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter8_f_3_2)\"><path d=\"M2.32515 23.7616C3.12749 24.4233 7.32135 20.6626 11.6924 15.362C16.0635 10.0614 18.9565 5.228 18.1541 4.56637C17.3518 3.90474 13.1579 7.66538 8.78688 12.966C4.41583 18.2666 1.52282 23.1 2.32515 23.7616Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter9_f_3_2)\"><path d=\"M22.7441 17.5449C23.5648 18.1836 27.6508 14.306 31.8704 8.8841C36.0901 3.46217 38.8455 -1.45095 38.0248 -2.08966C37.2041 -2.72838 33.1181 1.14919 28.8984 6.57112C24.6788 11.993 21.9234 16.9062 22.7441 17.5449Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter10_f_3_2)\"><path d=\"M24.2638 18.7387C25.8062 19.9392 28.5247 19.0259 30.3357 16.6989C32.1467 14.372 32.3644 11.5124 30.8219 10.312C29.2795 9.11157 26.561 10.0248 24.75 12.3518C22.939 14.6788 22.7213 17.5383 24.2638 18.7387Z\" fill=\"#2BFDD2\"></path></g><g filter=\"url(#filter11_f_3_2)\"><path d=\"M1.6313 36.5293C2.452 37.168 6.53801 33.2904 10.7576 27.8685C14.9773 22.4465 17.7327 17.5334 16.912 16.8947C16.0913 16.256 12.0053 20.1336 7.78563 25.5555C3.56599 30.9774 0.810605 35.8905 1.6313 36.5293Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter12_f_3_2)\"><path d=\"M1.6313 36.5293C2.452 37.168 6.53801 33.2904 10.7576 27.8685C14.9773 22.4465 17.7327 17.5334 16.912 16.8947C16.0913 16.256 12.0053 20.1336 7.78563 25.5555C3.56599 30.9774 0.810605 35.8905 1.6313 36.5293Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter13_f_3_2)\"><path d=\"M17.5773 32.8563C18.4494 33.535 22.5771 29.6899 26.7968 24.268C31.0164 18.846 33.7301 13.9005 32.858 13.2217C31.9859 12.543 27.8582 16.3881 23.6385 21.81C19.4189 27.232 16.7052 32.1775 17.5773 32.8563Z\" fill=\"#4E14FF\"></path></g><g filter=\"url(#filter14_f_3_2)\"><path d=\"M21.6002 31.5389C23.0982 32.7047 26.7882 30.4688 29.842 26.5449C32.8958 22.621 34.1571 18.4949 32.6591 17.3291C31.1611 16.1633 27.4711 18.3991 24.4173 22.3231C21.3635 26.247 20.1022 30.3731 21.6002 31.5389Z\" fill=\"#2BFDD2\"></path></g></g><path d=\"M6.95763 10C3.02563 15.628 3.00263 24.351 6.95763 30H9.61363C5.65963 24.35 5.68363 15.627 9.61363 10H6.95763ZM33.9386 20H36.5956C36.5946 16.407 35.6056 12.816 33.6386 10H30.9826C32.9486 12.816 33.9366 16.407 33.9386 20ZM38.6276 24.907H35.9626C36.1589 24.1665 36.3102 23.4148 36.4156 22.656H33.7586C33.6531 23.4148 33.5019 24.1665 33.3056 24.907H30.6366C30.3961 25.8176 30.0804 26.7067 29.6926 27.565H32.3616C31.9785 28.4179 31.5165 29.2331 30.9816 30H33.6376C34.1725 29.2331 34.6345 28.4179 35.0176 27.565H37.6826C38.0686 26.714 38.3836 25.823 38.6276 24.907Z\" fill=\"#08060D\" class=\"fill-hex-08060D dark:fill-hex-fff\"></path><defs><filter id=\"filter0_f_3_2\" x=\"1.62683\" y=\"17.2322\" width=\"25.6599\" height=\"17.8001\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"3.273\" result=\"effect1_foregroundBlur_3_2\"></feGaussianBlur></filter><filter id=\"filter1_f_3_2\" x=\"-13.2646\" y=\"7.11168\" width=\"38.6079\" height=\"21.9804\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"3.273\" result=\"effect1_foregroundBlur_3_2\"></feGaussianBlur></filter><filter id=\"filter2_f_3_2\" x=\"-11.1412\" y=\"11.198\" width=\"33.9139\" height=\"12.5648\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_3_2\"></feGaussianBlur></filter><filter id=\"filter3_f_3_2\" x=\"-9.17672\" y=\"18.8893\" width=\"34.01\" height=\"12.5648\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_3_2\"></feGaussianBlur></filter><filter id=\"filter4_f_3_2\" x=\"-8.5209\" y=\"19.3806\" width=\"34.0099\" height=\"12.5648\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_3_2\"></feGaussianBlur></filter><filter id=\"filter5_f_3_2\" x=\"16.8079\" y=\"2.67989\" width=\"31.9451\" height=\"25.1508\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"3.273\" result=\"effect1_foregroundBlur_3_2\"></feGaussianBlur></filter><filter id=\"filter6_f_3_2\" x=\"20.1374\" y=\"11.307\" width=\"26.2313\" height=\"10.8388\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_3_2\"></feGaussianBlur></filter><filter id=\"filter7_f_3_2\" x=\"20.1374\" y=\"11.307\" width=\"26.2313\" height=\"10.8388\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_3_2\"></feGaussianBlur></filter><filter id=\"filter8_f_3_2\" x=\"-1.73649\" y=\"0.562875\" width=\"23.9523\" height=\"27.2023\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_3_2\"></feGaussianBlur></filter><filter id=\"filter9_f_3_2\" x=\"18.6715\" y=\"-6.08651\" width=\"23.4259\" height=\"27.6282\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_3_2\"></feGaussianBlur></filter><filter id=\"filter10_f_3_2\" x=\"19.3075\" y=\"5.85539\" width=\"16.4707\" height=\"17.3399\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_3_2\"></feGaussianBlur></filter><filter id=\"filter11_f_3_2\" x=\"-2.44132\" y=\"12.8979\" width=\"23.4259\" height=\"27.6282\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_3_2\"></feGaussianBlur></filter><filter id=\"filter12_f_3_2\" x=\"-2.44132\" y=\"12.8979\" width=\"23.4259\" height=\"27.6282\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_3_2\"></feGaussianBlur></filter><filter id=\"filter13_f_3_2\" x=\"13.4863\" y=\"9.21607\" width=\"23.4628\" height=\"27.6459\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_3_2\"></feGaussianBlur></filter><filter id=\"filter14_f_3_2\" x=\"17.0414\" y=\"13.0922\" width=\"20.1765\" height=\"22.6836\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"1.964\" result=\"effect1_foregroundBlur_3_2\"></feGaussianBlur></filter></defs>", 5)])]);
|
|
2072
|
+
}
|
|
2073
|
+
var VitePlus_default = /* @__PURE__ */ export_helper_default(_sfc_main$11, [["render", _sfc_render]]);
|
|
2074
|
+
//#endregion
|
|
2075
|
+
//#region src/client/webcomponents/components/views-builtin/ViewBuiltinClientAuthNotice.vue
|
|
2076
|
+
const _hoisted_1$9 = { class: "w-full h-full flex flex-col items-center justify-center p20" };
|
|
2077
|
+
const _hoisted_2$8 = { class: "max-w-150 flex flex-col items-center justify-center gap-2" };
|
|
2078
|
+
const _hoisted_3$7 = ["disabled"];
|
|
2079
|
+
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
2080
|
+
__name: "ViewBuiltinClientAuthNotice",
|
|
2081
|
+
props: { context: {} },
|
|
2082
|
+
setup(__props) {
|
|
2083
|
+
const props = __props;
|
|
2084
|
+
const tokenInput = ref("");
|
|
2085
|
+
function submitToken() {
|
|
2086
|
+
const value = tokenInput.value.trim();
|
|
2087
|
+
if (!value) return;
|
|
2088
|
+
props.context.rpc.requestTrustWithToken(value);
|
|
2089
|
+
}
|
|
2090
|
+
return (_ctx, _cache) => {
|
|
2091
|
+
return openBlock(), createElementBlock("div", _hoisted_1$9, [createElementVNode("div", _hoisted_2$8, [
|
|
2092
|
+
createVNode(VitePlus_default, { class: "w-20 h-20" }),
|
|
2093
|
+
_cache[1] || (_cache[1] = createStaticVNode("<h1 class=\"text-2xl font-bold text-violet mb2\"> Vite DevTools needs Authorization </h1><p class=\"op75\"> Vite DevTools offers advanced features that can access your server, view your filesystem, and execute commands. </p><p class=\"op75\"> To protect your project from unauthorized access, please authorize your browser before proceeding. </p><p class=\"font-bold bg-green:5 p1 px3 rounded mt8 text-green\"> Check your terminal for the authorization prompt and come back. </p><div class=\"mt6 op50\"> or </div>", 5)),
|
|
2094
|
+
createElementVNode("form", {
|
|
2095
|
+
class: "mt2 flex items-center gap-2",
|
|
2096
|
+
onSubmit: withModifiers(submitToken, ["prevent"])
|
|
2097
|
+
}, [withDirectives(createElementVNode("input", {
|
|
2098
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => tokenInput.value = $event),
|
|
2099
|
+
type: "text",
|
|
2100
|
+
placeholder: "Enter auth token",
|
|
2101
|
+
class: "px3 py1.5 rounded border border-base bg-transparent text-sm outline-none focus:border-violet"
|
|
2102
|
+
}, null, 512), [[vModelText, tokenInput.value]]), createElementVNode("button", {
|
|
2103
|
+
type: "submit",
|
|
2104
|
+
class: "px3 py1.5 rounded bg-violet text-white text-sm hover:op80 disabled:op40",
|
|
2105
|
+
disabled: !tokenInput.value.trim()
|
|
2106
|
+
}, " Authorize ", 8, _hoisted_3$7)], 32)
|
|
2107
|
+
])]);
|
|
2108
|
+
};
|
|
2109
|
+
}
|
|
2110
|
+
});
|
|
2111
|
+
//#endregion
|
|
2112
|
+
//#region src/client/webcomponents/components/views-builtin/SettingsAdvanced.vue
|
|
2113
|
+
const _hoisted_1$8 = { class: "flex flex-col gap-6" };
|
|
2114
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
2115
|
+
__name: "SettingsAdvanced",
|
|
2116
|
+
props: {
|
|
2117
|
+
context: {},
|
|
2118
|
+
settingsStore: {}
|
|
2119
|
+
},
|
|
2120
|
+
setup(__props) {
|
|
2121
|
+
const props = __props;
|
|
2122
|
+
function resetAllSettings() {
|
|
2123
|
+
if (confirm("Reset all settings to defaults? This includes appearance, docks, and shortcuts.")) {
|
|
2124
|
+
props.settingsStore.mutate(() => {
|
|
2125
|
+
return DEFAULT_STATE_USER_SETTINGS();
|
|
2126
|
+
});
|
|
2127
|
+
props.context.commands.shortcutOverrides.mutate((state) => {
|
|
2128
|
+
for (const key of Object.keys(state)) delete state[key];
|
|
2129
|
+
});
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
function resetShortcuts() {
|
|
2133
|
+
if (confirm("Reset all keyboard shortcuts to defaults?")) props.context.commands.shortcutOverrides.mutate((state) => {
|
|
2134
|
+
for (const key of Object.keys(state)) delete state[key];
|
|
2135
|
+
});
|
|
2136
|
+
}
|
|
2137
|
+
function resetDocks() {
|
|
2138
|
+
if (confirm("Reset dock visibility, order, and pinning to defaults?")) props.settingsStore.mutate((state) => {
|
|
2139
|
+
const defaults = DEFAULT_STATE_USER_SETTINGS();
|
|
2140
|
+
state.docksHidden = defaults.docksHidden;
|
|
2141
|
+
state.docksCategoriesHidden = defaults.docksCategoriesHidden;
|
|
2142
|
+
state.docksCustomOrder = defaults.docksCustomOrder;
|
|
2143
|
+
state.docksPinned = defaults.docksPinned;
|
|
2144
|
+
});
|
|
2145
|
+
}
|
|
2146
|
+
return (_ctx, _cache) => {
|
|
2147
|
+
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
2148
|
+
createCommentVNode(" Reset Shortcuts "),
|
|
2149
|
+
createElementVNode("div", { class: "flex items-start gap-4" }, [_cache[1] || (_cache[1] = createElementVNode("div", { class: "flex-1" }, [createElementVNode("div", { class: "text-sm" }, " Reset Keyboard Shortcuts "), createElementVNode("div", { class: "text-xs op50 mt-0.5" }, " Remove all custom shortcut overrides and restore default keybindings ")], -1)), createElementVNode("button", {
|
|
2150
|
+
class: "px-4 py-2 rounded bg-orange/10 text-orange hover:bg-orange/20 transition-colors flex items-center gap-2 text-sm shrink-0",
|
|
2151
|
+
onClick: resetShortcuts
|
|
2152
|
+
}, [..._cache[0] || (_cache[0] = [createElementVNode("div", { class: "i-ph-keyboard-duotone w-4 h-4" }, null, -1), createTextVNode(" Reset Shortcuts ", -1)])])]),
|
|
2153
|
+
createCommentVNode(" Reset Docks "),
|
|
2154
|
+
createElementVNode("div", { class: "flex items-start gap-4" }, [_cache[3] || (_cache[3] = createElementVNode("div", { class: "flex-1" }, [createElementVNode("div", { class: "text-sm" }, " Reset Dock Settings "), createElementVNode("div", { class: "text-xs op50 mt-0.5" }, " Restore default dock visibility, order, and pinning ")], -1)), createElementVNode("button", {
|
|
2155
|
+
class: "px-4 py-2 rounded bg-orange/10 text-orange hover:bg-orange/20 transition-colors flex items-center gap-2 text-sm shrink-0",
|
|
2156
|
+
onClick: resetDocks
|
|
2157
|
+
}, [..._cache[2] || (_cache[2] = [createElementVNode("div", { class: "i-ph-layout-duotone w-4 h-4" }, null, -1), createTextVNode(" Reset Docks ", -1)])])]),
|
|
2158
|
+
createCommentVNode(" Reset All "),
|
|
2159
|
+
createElementVNode("div", { class: "border-t border-base pt-6" }, [createElementVNode("div", { class: "flex items-start gap-4" }, [_cache[5] || (_cache[5] = createElementVNode("div", { class: "flex-1" }, [createElementVNode("div", { class: "text-sm" }, " Reset All Settings "), createElementVNode("div", { class: "text-xs op50 mt-0.5" }, " Reset everything to defaults including appearance, docks, and shortcuts ")], -1)), createElementVNode("button", {
|
|
2160
|
+
class: "px-4 py-2 rounded bg-red/10 text-red hover:bg-red/20 transition-colors flex items-center gap-2 text-sm shrink-0",
|
|
2161
|
+
onClick: resetAllSettings
|
|
2162
|
+
}, [..._cache[4] || (_cache[4] = [createElementVNode("div", { class: "i-ph-arrow-counter-clockwise w-4 h-4" }, null, -1), createTextVNode(" Reset All ", -1)])])])])
|
|
2163
|
+
]);
|
|
2164
|
+
};
|
|
2165
|
+
}
|
|
2166
|
+
});
|
|
2167
|
+
//#endregion
|
|
2168
|
+
//#region src/client/webcomponents/components/views-builtin/SettingsAppearance.vue
|
|
2169
|
+
const _hoisted_1$7 = { class: "flex flex-col gap-4" };
|
|
2170
|
+
const _hoisted_2$7 = {
|
|
2171
|
+
key: 0,
|
|
2172
|
+
class: "flex flex-col gap-2"
|
|
2173
|
+
};
|
|
2174
|
+
const _hoisted_3$6 = { class: "flex items-center gap-1 bg-gray/10 rounded-lg p1 w-fit" };
|
|
2175
|
+
const _hoisted_4$5 = ["onClick"];
|
|
2176
|
+
const _hoisted_5$5 = { class: "flex items-center gap-3 cursor-pointer group" };
|
|
2177
|
+
const _hoisted_6$4 = { class: "flex items-center gap-3 cursor-pointer group" };
|
|
2178
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
2179
|
+
__name: "SettingsAppearance",
|
|
2180
|
+
props: {
|
|
2181
|
+
context: {},
|
|
2182
|
+
settingsStore: {}
|
|
2183
|
+
},
|
|
2184
|
+
setup(__props) {
|
|
2185
|
+
const props = __props;
|
|
2186
|
+
const settings = sharedStateToRef(props.settingsStore);
|
|
2187
|
+
const panelStore = props.context.panel.store;
|
|
2188
|
+
const isEmbedded = props.context.clientType === "embedded";
|
|
2189
|
+
const isDockPopupOpen = useIsDockPopupOpen();
|
|
2190
|
+
const dockModeOptions = computed(() => {
|
|
2191
|
+
const options = [{
|
|
2192
|
+
value: "float",
|
|
2193
|
+
label: "Float",
|
|
2194
|
+
icon: "i-ph-cards-three-duotone"
|
|
2195
|
+
}, {
|
|
2196
|
+
value: "edge",
|
|
2197
|
+
label: "Edge",
|
|
2198
|
+
icon: "i-ph-square-half-bottom-duotone"
|
|
2199
|
+
}];
|
|
2200
|
+
if (isDockPopupSupported()) options.push({
|
|
2201
|
+
value: "popup",
|
|
2202
|
+
label: "Popup",
|
|
2203
|
+
icon: "i-ph-arrow-square-out-duotone"
|
|
2204
|
+
});
|
|
2205
|
+
return options;
|
|
2206
|
+
});
|
|
2207
|
+
const currentDockMode = computed(() => panelStore.mode);
|
|
2208
|
+
function setDockMode(mode) {
|
|
2209
|
+
if (mode === "popup") requestDockPopupOpen(props.context);
|
|
2210
|
+
else panelStore.mode = mode;
|
|
2211
|
+
}
|
|
2212
|
+
return (_ctx, _cache) => {
|
|
2213
|
+
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
2214
|
+
createCommentVNode(" Dock mode "),
|
|
2215
|
+
isEmbedded && !unref(isDockPopupOpen) ? (openBlock(), createElementBlock("div", _hoisted_2$7, [_cache[2] || (_cache[2] = createElementVNode("div", { class: "flex flex-col" }, [createElementVNode("span", { class: "text-sm" }, "Dock mode"), createElementVNode("span", { class: "text-xs op50" }, "How the DevTools panel is displayed")], -1)), createElementVNode("div", _hoisted_3$6, [(openBlock(true), createElementBlock(Fragment, null, renderList(dockModeOptions.value, (option) => {
|
|
2216
|
+
return openBlock(), createElementBlock("button", {
|
|
2217
|
+
key: option.value,
|
|
2218
|
+
class: normalizeClass(["flex items-center gap-1.5 px3 py1.5 rounded-md text-sm transition-all", currentDockMode.value === option.value ? "bg-base shadow text-primary font-medium" : "op60 hover:op100 hover:bg-gray/10"]),
|
|
2219
|
+
onClick: ($event) => setDockMode(option.value)
|
|
2220
|
+
}, [createElementVNode("div", { class: normalizeClass([option.icon, "w-4 h-4"]) }, null, 2), createTextVNode(" " + toDisplayString(option.label), 1)], 10, _hoisted_4$5);
|
|
2221
|
+
}), 128))])])) : createCommentVNode("v-if", true),
|
|
2222
|
+
createCommentVNode(" Show iframe address bar toggle "),
|
|
2223
|
+
createElementVNode("label", _hoisted_5$5, [createElementVNode("button", {
|
|
2224
|
+
class: normalizeClass(["w-10 h-6 rounded-full transition-colors relative shrink-0", unref(settings).showIframeAddressBar ? "bg-lime" : "bg-gray/30"]),
|
|
2225
|
+
onClick: _cache[0] || (_cache[0] = ($event) => __props.settingsStore.mutate((s) => {
|
|
2226
|
+
s.showIframeAddressBar = !s.showIframeAddressBar;
|
|
2227
|
+
}))
|
|
2228
|
+
}, [createElementVNode("div", { class: normalizeClass(["absolute top-1 w-4 h-4 rounded-full bg-white shadow transition-transform", unref(settings).showIframeAddressBar ? "translate-x-5" : "translate-x-1"]) }, null, 2)], 2), _cache[3] || (_cache[3] = createElementVNode("div", { class: "flex flex-col" }, [createElementVNode("span", { class: "text-sm" }, "Show iframe address bar"), createElementVNode("span", { class: "text-xs op50" }, "Display navigation controls and URL bar for iframe views")], -1))]),
|
|
2229
|
+
createCommentVNode(" Close on outside click toggle "),
|
|
2230
|
+
createElementVNode("label", _hoisted_6$4, [createElementVNode("button", {
|
|
2231
|
+
class: normalizeClass(["w-10 h-6 rounded-full transition-colors relative shrink-0", unref(settings).closeOnOutsideClick ? "bg-lime" : "bg-gray/30"]),
|
|
2232
|
+
onClick: _cache[1] || (_cache[1] = ($event) => __props.settingsStore.mutate((s) => {
|
|
2233
|
+
s.closeOnOutsideClick = !s.closeOnOutsideClick;
|
|
2234
|
+
}))
|
|
2235
|
+
}, [createElementVNode("div", { class: normalizeClass(["absolute top-1 w-4 h-4 rounded-full bg-white shadow transition-transform", unref(settings).closeOnOutsideClick ? "translate-x-5" : "translate-x-1"]) }, null, 2)], 2), _cache[4] || (_cache[4] = createElementVNode("div", { class: "flex flex-col" }, [createElementVNode("span", { class: "text-sm" }, "Close panel on outside click"), createElementVNode("span", { class: "text-xs op50" }, "Close the DevTools panel when clicking outside of it (embedded mode only)")], -1))])
|
|
2236
|
+
]);
|
|
2237
|
+
};
|
|
2238
|
+
}
|
|
2239
|
+
});
|
|
2240
|
+
//#endregion
|
|
2241
|
+
//#region src/client/webcomponents/components/views-builtin/SettingsDocks.vue
|
|
2242
|
+
const _hoisted_1$6 = { class: "flex flex-col gap-4" };
|
|
2243
|
+
const _hoisted_2$6 = { class: "flex items-center gap-2 px-4 py-3 bg-gray/5 cursor-pointer select-none border-b border-base" };
|
|
2244
|
+
const _hoisted_3$5 = ["disabled", "onClick"];
|
|
2245
|
+
const _hoisted_4$4 = { class: "font-medium capitalize" };
|
|
2246
|
+
const _hoisted_5$4 = { class: "text-xs op40" };
|
|
2247
|
+
const _hoisted_6$3 = ["onClick"];
|
|
2248
|
+
const _hoisted_7$1 = [
|
|
2249
|
+
"disabled",
|
|
2250
|
+
"title",
|
|
2251
|
+
"onClick"
|
|
2252
|
+
];
|
|
2253
|
+
const _hoisted_8$1 = {
|
|
2254
|
+
key: 0,
|
|
2255
|
+
class: "i-ph-check-bold text-xs"
|
|
2256
|
+
};
|
|
2257
|
+
const _hoisted_9$1 = { class: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity" };
|
|
2258
|
+
const _hoisted_10$1 = ["onClick"];
|
|
2259
|
+
const _hoisted_11$1 = ["onClick"];
|
|
2260
|
+
const _hoisted_12$1 = ["title", "onClick"];
|
|
2261
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
2262
|
+
__name: "SettingsDocks",
|
|
2263
|
+
props: {
|
|
2264
|
+
context: {},
|
|
2265
|
+
settingsStore: {}
|
|
2266
|
+
},
|
|
2267
|
+
setup(__props) {
|
|
2268
|
+
const props = __props;
|
|
2269
|
+
const settings = sharedStateToRef(props.settingsStore);
|
|
2270
|
+
const categories = computed(() => {
|
|
2271
|
+
return docksGroupByCategories(props.context.docks.entries, props.settingsStore.value(), { includeHidden: true });
|
|
2272
|
+
});
|
|
2273
|
+
function getCategoryLabel(category) {
|
|
2274
|
+
return {
|
|
2275
|
+
"~viteplus": "Vite+",
|
|
2276
|
+
"default": "Default",
|
|
2277
|
+
"app": "App",
|
|
2278
|
+
"framework": "Framework",
|
|
2279
|
+
"web": "Web",
|
|
2280
|
+
"advanced": "Advanced",
|
|
2281
|
+
"~builtin": "Built-in"
|
|
2282
|
+
}[category] || category;
|
|
2283
|
+
}
|
|
2284
|
+
function toggleDock(id, visible) {
|
|
2285
|
+
if (id === "~settings") return;
|
|
2286
|
+
const isHidden = settings.value.docksHidden.includes(id);
|
|
2287
|
+
if (visible ?? isHidden) props.settingsStore.mutate((state) => {
|
|
2288
|
+
state.docksHidden = state.docksHidden.filter((i) => i !== id);
|
|
2289
|
+
});
|
|
2290
|
+
else props.settingsStore.mutate((state) => {
|
|
2291
|
+
state.docksHidden = [...state.docksHidden, id];
|
|
2292
|
+
});
|
|
2293
|
+
}
|
|
2294
|
+
function toggleCategory(category, visible) {
|
|
2295
|
+
if (category === "~builtin") return;
|
|
2296
|
+
const isHidden = settings.value.docksCategoriesHidden.includes(category);
|
|
2297
|
+
if (visible ?? isHidden) props.settingsStore.mutate((state) => {
|
|
2298
|
+
state.docksCategoriesHidden = state.docksCategoriesHidden.filter((i) => i !== category);
|
|
2299
|
+
});
|
|
2300
|
+
else props.settingsStore.mutate((state) => {
|
|
2301
|
+
state.docksCategoriesHidden = [...state.docksCategoriesHidden, category];
|
|
2302
|
+
});
|
|
2303
|
+
}
|
|
2304
|
+
function togglePin(id) {
|
|
2305
|
+
if (settings.value.docksPinned.includes(id)) props.settingsStore.mutate((state) => {
|
|
2306
|
+
state.docksPinned = state.docksPinned.filter((i) => i !== id);
|
|
2307
|
+
});
|
|
2308
|
+
else props.settingsStore.mutate((state) => {
|
|
2309
|
+
state.docksPinned = [...state.docksPinned, id];
|
|
2310
|
+
});
|
|
2311
|
+
}
|
|
2312
|
+
function isInCustomOrder(id) {
|
|
2313
|
+
return settings.value.docksCustomOrder[id] !== void 0;
|
|
2314
|
+
}
|
|
2315
|
+
function moveOrder(category, id, delta) {
|
|
2316
|
+
const items = categories.value.find(([cat]) => cat === category);
|
|
2317
|
+
if (!items) throw new Error(`Category ${category} not found`);
|
|
2318
|
+
const array = [...items[1]];
|
|
2319
|
+
const index = array.findIndex((item) => item.id === id);
|
|
2320
|
+
const newIndex = index + delta;
|
|
2321
|
+
if (newIndex < 0 || newIndex >= array.length) throw new Error(`Invalid new index ${newIndex} for category ${category}`);
|
|
2322
|
+
array.splice(newIndex, 0, array.splice(index, 1)[0]);
|
|
2323
|
+
items[1] = array;
|
|
2324
|
+
props.settingsStore.mutate((state) => {
|
|
2325
|
+
array.forEach((item, index) => {
|
|
2326
|
+
state.docksCustomOrder[item.id] = index;
|
|
2327
|
+
});
|
|
2328
|
+
});
|
|
2329
|
+
}
|
|
2330
|
+
function doesCategoryHaveCustomOrder(category) {
|
|
2331
|
+
const items = categories.value.find(([cat]) => cat === category);
|
|
2332
|
+
if (!items) return false;
|
|
2333
|
+
return items[1].some((item) => isInCustomOrder(item.id));
|
|
2334
|
+
}
|
|
2335
|
+
function resetCustomOrderForCategory(category) {
|
|
2336
|
+
const items = categories.value.find(([cat]) => cat === category);
|
|
2337
|
+
if (!items) return;
|
|
2338
|
+
props.settingsStore.mutate((state) => {
|
|
2339
|
+
items[1].forEach((item) => {
|
|
2340
|
+
delete state.docksCustomOrder[item.id];
|
|
2341
|
+
});
|
|
2342
|
+
});
|
|
2343
|
+
}
|
|
2344
|
+
return (_ctx, _cache) => {
|
|
2345
|
+
return openBlock(), createElementBlock(Fragment, null, [_cache[5] || (_cache[5] = createElementVNode("p", { class: "text-sm op50 mb-4" }, " Manage visibility and order of dock entries. Hidden entries will not appear in the dock bar. ", -1)), createElementVNode("div", _hoisted_1$6, [(openBlock(true), createElementBlock(Fragment, null, renderList(categories.value, ([category, entries]) => {
|
|
2346
|
+
return openBlock(), createElementBlock("div", {
|
|
2347
|
+
key: category,
|
|
2348
|
+
class: normalizeClass(["border border-base rounded-lg overflow-hidden transition-opacity", unref(settings).docksCategoriesHidden.includes(category) ? "op40" : ""])
|
|
2349
|
+
}, [
|
|
2350
|
+
createCommentVNode(" Category header "),
|
|
2351
|
+
createElementVNode("div", _hoisted_2$6, [
|
|
2352
|
+
createElementVNode("button", {
|
|
2353
|
+
class: normalizeClass(["w-5 h-5 flex items-center justify-center rounded transition-colors", [category === "~builtin" ? "bg-gray/20 cursor-not-allowed op50" : unref(settings).docksCategoriesHidden.includes(category) ? "bg-gray/20" : "bg-lime/20 text-lime"]]),
|
|
2354
|
+
disabled: category === "~builtin",
|
|
2355
|
+
onClick: ($event) => toggleCategory(category)
|
|
2356
|
+
}, [createElementVNode("div", { class: normalizeClass(["transition-transform", unref(settings).docksCategoriesHidden.includes(category) ? "i-ph-eye-slash text-sm op50" : "i-ph-check-bold text-xs"]) }, null, 2)], 10, _hoisted_3$5),
|
|
2357
|
+
createElementVNode("span", _hoisted_4$4, toDisplayString(getCategoryLabel(category)), 1),
|
|
2358
|
+
createElementVNode("span", _hoisted_5$4, "(" + toDisplayString(entries.length) + ")", 1),
|
|
2359
|
+
_cache[1] || (_cache[1] = createElementVNode("span", { class: "flex-auto" }, null, -1)),
|
|
2360
|
+
doesCategoryHaveCustomOrder(category) ? (openBlock(), createElementBlock("button", {
|
|
2361
|
+
key: 0,
|
|
2362
|
+
class: "w-6 h-6 flex items-center justify-center rounded hover:bg-gray/20 transition-colors",
|
|
2363
|
+
title: "Reset custom order",
|
|
2364
|
+
onClick: ($event) => resetCustomOrderForCategory(category)
|
|
2365
|
+
}, [..._cache[0] || (_cache[0] = [createElementVNode("div", { class: "i-ph-arrows-counter-clockwise-duotone text-sm op60" }, null, -1)])], 8, _hoisted_6$3)) : createCommentVNode("v-if", true)
|
|
2366
|
+
]),
|
|
2367
|
+
createCommentVNode(" Entries "),
|
|
2368
|
+
createElementVNode("div", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(entries, (dock, index) => {
|
|
2369
|
+
return openBlock(), createElementBlock("div", {
|
|
2370
|
+
key: dock.id,
|
|
2371
|
+
class: normalizeClass(["flex items-center gap-3 px-4 py-2.5 hover:bg-gray/5 transition-colors group border-b border-base border-t-0", unref(settings).docksHidden.includes(dock.id) ? "op40" : ""])
|
|
2372
|
+
}, [
|
|
2373
|
+
createCommentVNode(" Visibility toggle "),
|
|
2374
|
+
createElementVNode("button", {
|
|
2375
|
+
class: normalizeClass(["w-6 h-6 flex items-center justify-center rounded border border-transparent hover:border-base transition-colors shrink-0", dock.id === "~settings" ? "cursor-not-allowed op50" : unref(settings).docksHidden.includes(dock.id) ? "op50" : ""]),
|
|
2376
|
+
disabled: dock.id === "~settings",
|
|
2377
|
+
title: dock.id === "~settings" ? "Always visible" : unref(settings).docksHidden.includes(dock.id) ? "Show" : "Hide",
|
|
2378
|
+
onClick: ($event) => toggleDock(dock.id)
|
|
2379
|
+
}, [createElementVNode("div", { class: normalizeClass(["w-4 h-4 rounded flex items-center justify-center transition-colors", dock.id === "~settings" ? "bg-gray/30" : unref(settings).docksHidden.includes(dock.id) ? "bg-gray/30" : "bg-lime/20 text-lime"]) }, [!unref(settings).docksHidden.includes(dock.id) ? (openBlock(), createElementBlock("div", _hoisted_8$1)) : createCommentVNode("v-if", true)], 2)], 10, _hoisted_7$1),
|
|
2380
|
+
createCommentVNode(" Icon & Title "),
|
|
2381
|
+
createVNode(_sfc_main$21, {
|
|
2382
|
+
icon: dock.icon,
|
|
2383
|
+
title: dock.title,
|
|
2384
|
+
class: normalizeClass(["w-5 h-5 shrink-0", unref(settings).docksHidden.includes(dock.id) ? "saturate-0" : ""])
|
|
2385
|
+
}, null, 8, [
|
|
2386
|
+
"icon",
|
|
2387
|
+
"title",
|
|
2388
|
+
"class"
|
|
2389
|
+
]),
|
|
2390
|
+
createElementVNode("span", { class: normalizeClass(["truncate", unref(settings).docksHidden.includes(dock.id) ? "line-through op60" : ""]) }, toDisplayString(dock.title), 3),
|
|
2391
|
+
dock.type === "action" ? (openBlock(), createBlock(_sfc_main$23, {
|
|
2392
|
+
key: 0,
|
|
2393
|
+
label: "Action",
|
|
2394
|
+
class: "flex-none text-xs"
|
|
2395
|
+
})) : createCommentVNode("v-if", true),
|
|
2396
|
+
_cache[4] || (_cache[4] = createElementVNode("div", { class: "flex flex-auto" }, null, -1)),
|
|
2397
|
+
createCommentVNode(" Order controls "),
|
|
2398
|
+
createElementVNode("div", _hoisted_9$1, [index > 0 ? (openBlock(), createElementBlock("button", {
|
|
2399
|
+
key: 0,
|
|
2400
|
+
class: "w-6 h-6 flex items-center justify-center rounded hover:bg-gray/20 transition-colors",
|
|
2401
|
+
title: "Move up (higher priority)",
|
|
2402
|
+
onClick: ($event) => moveOrder(category, dock.id, -1)
|
|
2403
|
+
}, [..._cache[2] || (_cache[2] = [createElementVNode("div", { class: "i-ph-caret-up text-sm op60" }, null, -1)])], 8, _hoisted_10$1)) : createCommentVNode("v-if", true), index < entries.length - 1 ? (openBlock(), createElementBlock("button", {
|
|
2404
|
+
key: 1,
|
|
2405
|
+
class: "w-6 h-6 flex items-center justify-center rounded hover:bg-gray/20 transition-colors",
|
|
2406
|
+
title: "Move down (lower priority)",
|
|
2407
|
+
onClick: ($event) => moveOrder(category, dock.id, 1)
|
|
2408
|
+
}, [..._cache[3] || (_cache[3] = [createElementVNode("div", { class: "i-ph-caret-down text-sm op60" }, null, -1)])], 8, _hoisted_11$1)) : createCommentVNode("v-if", true)]),
|
|
2409
|
+
createCommentVNode(" Pin toggle "),
|
|
2410
|
+
createElementVNode("button", {
|
|
2411
|
+
class: normalizeClass(["w-7 h-7 flex items-center justify-center rounded hover:bg-gray/20 transition-colors shrink-0", unref(settings).docksPinned.includes(dock.id) ? "text-amber" : "op40 hover:op70"]),
|
|
2412
|
+
title: unref(settings).docksPinned.includes(dock.id) ? "Unpin" : "Pin",
|
|
2413
|
+
onClick: ($event) => togglePin(dock.id)
|
|
2414
|
+
}, [createElementVNode("div", { class: normalizeClass([unref(settings).docksPinned.includes(dock.id) ? "i-ph-push-pin-fill rotate--45" : "i-ph-push-pin", "text-base"]) }, null, 2)], 10, _hoisted_12$1)
|
|
2415
|
+
], 2);
|
|
2416
|
+
}), 128))])
|
|
2417
|
+
], 2);
|
|
2418
|
+
}), 128))])], 64);
|
|
2419
|
+
};
|
|
2420
|
+
}
|
|
2421
|
+
});
|
|
2422
|
+
//#endregion
|
|
2423
|
+
//#region src/client/webcomponents/components/views-builtin/SettingsShortcuts.vue
|
|
2424
|
+
const _hoisted_1$5 = { class: "mb-3" };
|
|
2425
|
+
const _hoisted_2$5 = { class: "border border-base rounded-lg overflow-hidden" };
|
|
2426
|
+
const _hoisted_3$4 = { class: "flex-1 min-w-0" };
|
|
2427
|
+
const _hoisted_4$3 = { class: "flex items-center gap-1.5" };
|
|
2428
|
+
const _hoisted_5$3 = { class: "truncate text-sm" };
|
|
2429
|
+
const _hoisted_6$2 = {
|
|
2430
|
+
key: 0,
|
|
2431
|
+
class: "text-[10px] px-1.5 py-0.5 rounded bg-blue/10 text-blue shrink-0"
|
|
2432
|
+
};
|
|
2433
|
+
const _hoisted_7 = {
|
|
2434
|
+
key: 0,
|
|
2435
|
+
class: "text-xs op40 truncate mt-0.5"
|
|
2436
|
+
};
|
|
2437
|
+
const _hoisted_8 = { class: "flex items-center gap-1.5 shrink-0" };
|
|
2438
|
+
const _hoisted_9 = ["onClick"];
|
|
2439
|
+
const _hoisted_10 = ["onClick"];
|
|
2440
|
+
const _hoisted_11 = ["onClick"];
|
|
2441
|
+
const _hoisted_12 = ["onClick"];
|
|
2442
|
+
const _hoisted_13 = {
|
|
2443
|
+
key: 0,
|
|
2444
|
+
class: "py-6 text-center text-sm op40"
|
|
2445
|
+
};
|
|
2446
|
+
const _hoisted_14 = {
|
|
2447
|
+
key: 0,
|
|
2448
|
+
class: "fixed inset-0 z-command-palette flex items-center justify-center"
|
|
2449
|
+
};
|
|
2450
|
+
const _hoisted_15 = { class: "relative bg-base border border-base rounded-lg shadow-xl w-96 p-5" };
|
|
2451
|
+
const _hoisted_16 = { class: "mb-4" };
|
|
2452
|
+
const _hoisted_17 = ["value"];
|
|
2453
|
+
const _hoisted_18 = { class: "flex items-center gap-2 mb-4" };
|
|
2454
|
+
const _hoisted_19 = {
|
|
2455
|
+
key: 0,
|
|
2456
|
+
class: "mb-4 flex flex-col gap-1.5"
|
|
2457
|
+
};
|
|
2458
|
+
const _hoisted_20 = { class: "flex items-center justify-end gap-2" };
|
|
2459
|
+
const _hoisted_21 = ["disabled"];
|
|
2460
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
2461
|
+
__name: "SettingsShortcuts",
|
|
2462
|
+
props: { context: {} },
|
|
2463
|
+
setup(__props) {
|
|
2464
|
+
const commandsCtx = __props.context.commands;
|
|
2465
|
+
const shortcutOverrides = sharedStateToRef(commandsCtx.shortcutOverrides);
|
|
2466
|
+
const shortcutSearch = ref("");
|
|
2467
|
+
const shortcutRows = computed(() => {
|
|
2468
|
+
const rows = [];
|
|
2469
|
+
for (const cmd of commandsCtx.commands) {
|
|
2470
|
+
rows.push({
|
|
2471
|
+
command: cmd,
|
|
2472
|
+
indent: false
|
|
2473
|
+
});
|
|
2474
|
+
if (cmd.children) for (const child of cmd.children) rows.push({
|
|
2475
|
+
command: child,
|
|
2476
|
+
parentTitle: cmd.title,
|
|
2477
|
+
indent: true
|
|
2478
|
+
});
|
|
2479
|
+
}
|
|
2480
|
+
return rows;
|
|
2481
|
+
});
|
|
2482
|
+
const filteredShortcutRows = computed(() => {
|
|
2483
|
+
if (!shortcutSearch.value) return shortcutRows.value;
|
|
2484
|
+
const q = shortcutSearch.value.toLowerCase();
|
|
2485
|
+
return shortcutRows.value.filter((row) => row.command.title.toLowerCase().includes(q) || row.command.id.toLowerCase().includes(q) || row.command.description?.toLowerCase().includes(q));
|
|
2486
|
+
});
|
|
2487
|
+
function getEffectiveKeybindings(id) {
|
|
2488
|
+
return commandsCtx.getKeybindings(id);
|
|
2489
|
+
}
|
|
2490
|
+
function isOverridden(id) {
|
|
2491
|
+
return shortcutOverrides.value[id] !== void 0;
|
|
2492
|
+
}
|
|
2493
|
+
function clearShortcut(commandId) {
|
|
2494
|
+
commandsCtx.shortcutOverrides.mutate((state) => {
|
|
2495
|
+
state[commandId] = [];
|
|
2496
|
+
});
|
|
2497
|
+
}
|
|
2498
|
+
function resetShortcut(commandId) {
|
|
2499
|
+
commandsCtx.shortcutOverrides.mutate((state) => {
|
|
2500
|
+
delete state[commandId];
|
|
2501
|
+
});
|
|
2502
|
+
}
|
|
2503
|
+
const editorOpen = ref(false);
|
|
2504
|
+
const editorCommandId = ref(null);
|
|
2505
|
+
const editorMod = ref(false);
|
|
2506
|
+
const editorCtrl = ref(false);
|
|
2507
|
+
const editorAlt = ref(false);
|
|
2508
|
+
const editorShift = ref(false);
|
|
2509
|
+
const editorKey = ref("");
|
|
2510
|
+
function openEditor(commandId) {
|
|
2511
|
+
const bindings = getEffectiveKeybindings(commandId);
|
|
2512
|
+
editorCommandId.value = commandId;
|
|
2513
|
+
if (bindings.length > 0) {
|
|
2514
|
+
const parts = bindings[0].key.split("+");
|
|
2515
|
+
editorMod.value = parts.includes("Mod");
|
|
2516
|
+
editorCtrl.value = parts.includes("Ctrl");
|
|
2517
|
+
editorAlt.value = parts.includes("Alt");
|
|
2518
|
+
editorShift.value = parts.includes("Shift");
|
|
2519
|
+
editorKey.value = parts.filter((p) => ![
|
|
2520
|
+
"Mod",
|
|
2521
|
+
"Ctrl",
|
|
2522
|
+
"Alt",
|
|
2523
|
+
"Shift",
|
|
2524
|
+
"Meta"
|
|
2525
|
+
].includes(p)).join("+");
|
|
2526
|
+
} else {
|
|
2527
|
+
editorMod.value = false;
|
|
2528
|
+
editorCtrl.value = false;
|
|
2529
|
+
editorAlt.value = false;
|
|
2530
|
+
editorShift.value = false;
|
|
2531
|
+
editorKey.value = "";
|
|
2532
|
+
}
|
|
2533
|
+
editorOpen.value = true;
|
|
2534
|
+
}
|
|
2535
|
+
function closeEditor() {
|
|
2536
|
+
editorOpen.value = false;
|
|
2537
|
+
editorCommandId.value = null;
|
|
2538
|
+
}
|
|
2539
|
+
const editorComposedKey = computed(() => {
|
|
2540
|
+
const parts = [];
|
|
2541
|
+
if (editorMod.value) parts.push("Mod");
|
|
2542
|
+
if (editorCtrl.value) parts.push("Ctrl");
|
|
2543
|
+
if (editorAlt.value) parts.push("Alt");
|
|
2544
|
+
if (editorShift.value) parts.push("Shift");
|
|
2545
|
+
if (editorKey.value) parts.push(editorKey.value);
|
|
2546
|
+
return parts.join("+");
|
|
2547
|
+
});
|
|
2548
|
+
const editorWarnings = computed(() => {
|
|
2549
|
+
const warnings = [];
|
|
2550
|
+
const key = editorComposedKey.value;
|
|
2551
|
+
if (!key) return warnings;
|
|
2552
|
+
const hasModifier = editorMod.value || editorCtrl.value || editorAlt.value;
|
|
2553
|
+
if (!hasModifier && editorKey.value) warnings.push("Single key without modifiers may interfere with typing");
|
|
2554
|
+
if (!hasModifier && editorShift.value && editorKey.value.length === 1) warnings.push("Shift + letter may interfere with typing");
|
|
2555
|
+
const browserDescription = KNOWN_BROWSER_SHORTCUTS[key];
|
|
2556
|
+
if (browserDescription) {
|
|
2557
|
+
const formatted = formatKeybinding(key).join("+");
|
|
2558
|
+
warnings.push(`Conflicts with browser shortcut: ${browserDescription} (${formatted})`);
|
|
2559
|
+
}
|
|
2560
|
+
if (editorCommandId.value) for (const row of shortcutRows.value) {
|
|
2561
|
+
if (row.command.id === editorCommandId.value) continue;
|
|
2562
|
+
if (getEffectiveKeybindings(row.command.id).some((b) => b.key === key)) {
|
|
2563
|
+
warnings.push(`Conflicts with "${row.command.title}"`);
|
|
2564
|
+
break;
|
|
2565
|
+
}
|
|
2566
|
+
}
|
|
2567
|
+
return warnings;
|
|
2568
|
+
});
|
|
2569
|
+
const editorCanSave = computed(() => {
|
|
2570
|
+
return editorKey.value.length > 0;
|
|
2571
|
+
});
|
|
2572
|
+
function onEditorKeyDown(e) {
|
|
2573
|
+
e.preventDefault();
|
|
2574
|
+
e.stopPropagation();
|
|
2575
|
+
if ([
|
|
2576
|
+
"Control",
|
|
2577
|
+
"Meta",
|
|
2578
|
+
"Alt",
|
|
2579
|
+
"Shift"
|
|
2580
|
+
].includes(e.key)) return;
|
|
2581
|
+
editorMod.value = isMac ? e.metaKey : e.ctrlKey;
|
|
2582
|
+
if (isMac && e.ctrlKey) editorCtrl.value = true;
|
|
2583
|
+
editorAlt.value = e.altKey;
|
|
2584
|
+
editorShift.value = e.shiftKey;
|
|
2585
|
+
let key = e.key;
|
|
2586
|
+
if (key.length === 1) key = key.toUpperCase();
|
|
2587
|
+
editorKey.value = key;
|
|
2588
|
+
}
|
|
2589
|
+
function saveEditor() {
|
|
2590
|
+
if (!editorCommandId.value || !editorCanSave.value) return;
|
|
2591
|
+
commandsCtx.shortcutOverrides.mutate((state) => {
|
|
2592
|
+
state[editorCommandId.value] = [{ key: editorComposedKey.value }];
|
|
2593
|
+
});
|
|
2594
|
+
closeEditor();
|
|
2595
|
+
}
|
|
2596
|
+
watch(editorOpen, (v) => {
|
|
2597
|
+
if (!v) return;
|
|
2598
|
+
const handler = (e) => {
|
|
2599
|
+
if (e.key === "Escape") {
|
|
2600
|
+
const active = document.activeElement;
|
|
2601
|
+
if (!active || !active.classList.contains("shortcut-key-input")) {
|
|
2602
|
+
closeEditor();
|
|
2603
|
+
window.removeEventListener("keydown", handler);
|
|
2604
|
+
}
|
|
2605
|
+
}
|
|
2606
|
+
};
|
|
2607
|
+
window.addEventListener("keydown", handler);
|
|
2608
|
+
});
|
|
2609
|
+
return (_ctx, _cache) => {
|
|
2610
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
2611
|
+
_cache[10] || (_cache[10] = createElementVNode("p", { class: "text-sm op50 mb-4" }, " Customize keyboard shortcuts for commands. ", -1)),
|
|
2612
|
+
createCommentVNode(" Search "),
|
|
2613
|
+
createElementVNode("div", _hoisted_1$5, [withDirectives(createElementVNode("input", {
|
|
2614
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => shortcutSearch.value = $event),
|
|
2615
|
+
class: "w-full bg-gray/10 rounded-lg px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-primary/30",
|
|
2616
|
+
placeholder: "Search commands..."
|
|
2617
|
+
}, null, 512), [[vModelText, shortcutSearch.value]])]),
|
|
2618
|
+
createCommentVNode(" Shortcut list "),
|
|
2619
|
+
createElementVNode("div", _hoisted_2$5, [(openBlock(true), createElementBlock(Fragment, null, renderList(filteredShortcutRows.value, (row) => {
|
|
2620
|
+
return openBlock(), createElementBlock("div", {
|
|
2621
|
+
key: row.command.id,
|
|
2622
|
+
class: "flex items-center gap-3 px-4 py-2.5 hover:bg-gray/5 transition-colors border-b border-base last:border-b-0"
|
|
2623
|
+
}, [
|
|
2624
|
+
createCommentVNode(" Icon & Title "),
|
|
2625
|
+
row.command.icon ? (openBlock(), createBlock(_sfc_main$21, {
|
|
2626
|
+
key: 0,
|
|
2627
|
+
icon: row.command.icon,
|
|
2628
|
+
class: normalizeClass(["w-4 h-4 shrink-0 op60", { "ml-6": row.indent }])
|
|
2629
|
+
}, null, 8, ["icon", "class"])) : (openBlock(), createElementBlock("div", {
|
|
2630
|
+
key: 1,
|
|
2631
|
+
class: normalizeClass([{ "ml-6": row.indent }, "w-4 h-4 shrink-0"])
|
|
2632
|
+
}, null, 2)),
|
|
2633
|
+
createElementVNode("div", _hoisted_3$4, [createElementVNode("div", _hoisted_4$3, [createElementVNode("span", _hoisted_5$3, toDisplayString(row.command.title), 1), row.command.source === "server" ? (openBlock(), createElementBlock("span", _hoisted_6$2, "server")) : createCommentVNode("v-if", true)]), row.command.description ? (openBlock(), createElementBlock("div", _hoisted_7, toDisplayString(row.command.description), 1)) : createCommentVNode("v-if", true)]),
|
|
2634
|
+
createCommentVNode(" Keybinding display "),
|
|
2635
|
+
createElementVNode("div", _hoisted_8, [
|
|
2636
|
+
getEffectiveKeybindings(row.command.id).length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(getEffectiveKeybindings(row.command.id), (kb, ki) => {
|
|
2637
|
+
return openBlock(), createElementBlock("button", {
|
|
2638
|
+
key: ki,
|
|
2639
|
+
class: "flex items-center gap-0.5 hover:bg-gray/10 rounded px-1 py-0.5 transition-colors",
|
|
2640
|
+
title: "Click to edit",
|
|
2641
|
+
onClick: ($event) => openEditor(row.command.id)
|
|
2642
|
+
}, [createVNode(_sfc_main$19, { "key-string": kb.key }, null, 8, ["key-string"])], 8, _hoisted_9);
|
|
2643
|
+
}), 128)) : (openBlock(), createElementBlock("button", {
|
|
2644
|
+
key: 1,
|
|
2645
|
+
class: "text-xs op30 hover:op60 px-2 py-1 rounded hover:bg-gray/10 transition-colors",
|
|
2646
|
+
onClick: ($event) => openEditor(row.command.id)
|
|
2647
|
+
}, " Add shortcut ", 8, _hoisted_10)),
|
|
2648
|
+
createCommentVNode(" Clear shortcut "),
|
|
2649
|
+
getEffectiveKeybindings(row.command.id).length > 0 ? (openBlock(), createElementBlock("button", {
|
|
2650
|
+
key: 2,
|
|
2651
|
+
class: "w-5 h-5 flex items-center justify-center rounded hover:bg-gray/20 transition-colors op30 hover:op70",
|
|
2652
|
+
title: "Clear shortcut",
|
|
2653
|
+
onClick: ($event) => clearShortcut(row.command.id)
|
|
2654
|
+
}, [..._cache[5] || (_cache[5] = [createElementVNode("div", { class: "i-ph-x text-xs" }, null, -1)])], 8, _hoisted_11)) : createCommentVNode("v-if", true),
|
|
2655
|
+
createCommentVNode(" Reset to default (only if overridden) "),
|
|
2656
|
+
isOverridden(row.command.id) ? (openBlock(), createElementBlock("button", {
|
|
2657
|
+
key: 3,
|
|
2658
|
+
class: "w-5 h-5 flex items-center justify-center rounded hover:bg-gray/20 transition-colors op30 hover:op70",
|
|
2659
|
+
title: "Reset to default",
|
|
2660
|
+
onClick: ($event) => resetShortcut(row.command.id)
|
|
2661
|
+
}, [..._cache[6] || (_cache[6] = [createElementVNode("div", { class: "i-ph-arrow-counter-clockwise text-xs" }, null, -1)])], 8, _hoisted_12)) : createCommentVNode("v-if", true)
|
|
2662
|
+
])
|
|
2663
|
+
]);
|
|
2664
|
+
}), 128)), filteredShortcutRows.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_13, " No commands found ")) : createCommentVNode("v-if", true)]),
|
|
2665
|
+
createCommentVNode(" Shortcut Editor Popup "),
|
|
2666
|
+
editorOpen.value ? (openBlock(), createElementBlock("div", _hoisted_14, [createElementVNode("div", {
|
|
2667
|
+
class: "absolute inset-0 bg-black/30",
|
|
2668
|
+
onClick: closeEditor
|
|
2669
|
+
}), createElementVNode("div", _hoisted_15, [
|
|
2670
|
+
_cache[9] || (_cache[9] = createElementVNode("h3", { class: "text-sm font-medium mb-4" }, " Edit Shortcut ", -1)),
|
|
2671
|
+
createCommentVNode(" Key capture input "),
|
|
2672
|
+
createElementVNode("div", _hoisted_16, [_cache[7] || (_cache[7] = createElementVNode("label", { class: "text-xs op50 mb-1.5 block" }, "Press a key combination or toggle modifiers below", -1)), createElementVNode("input", {
|
|
2673
|
+
class: "shortcut-key-input w-full bg-gray/10 border border-base rounded-lg px-3 py-2.5 text-center text-sm font-mono outline-none focus:border-primary/40",
|
|
2674
|
+
value: editorComposedKey.value ? unref(formatKeybinding)(editorComposedKey.value).join(" + ") : "",
|
|
2675
|
+
placeholder: "Press keys...",
|
|
2676
|
+
readonly: "",
|
|
2677
|
+
onKeydown: onEditorKeyDown
|
|
2678
|
+
}, null, 40, _hoisted_17)]),
|
|
2679
|
+
createCommentVNode(" Modifier toggles "),
|
|
2680
|
+
createElementVNode("div", _hoisted_18, [
|
|
2681
|
+
createElementVNode("button", {
|
|
2682
|
+
class: normalizeClass(["px-3 py-1.5 rounded-md text-xs font-mono border transition-colors", editorMod.value ? "bg-primary/15 border-primary/30 text-primary" : "border-base op50 hover:op80"]),
|
|
2683
|
+
onClick: _cache[1] || (_cache[1] = ($event) => editorMod.value = !editorMod.value)
|
|
2684
|
+
}, toDisplayString(unref(isMac) ? "⌘ Cmd" : "Ctrl"), 3),
|
|
2685
|
+
unref(isMac) ? (openBlock(), createElementBlock("button", {
|
|
2686
|
+
key: 0,
|
|
2687
|
+
class: normalizeClass(["px-3 py-1.5 rounded-md text-xs font-mono border transition-colors", editorCtrl.value ? "bg-primary/15 border-primary/30 text-primary" : "border-base op50 hover:op80"]),
|
|
2688
|
+
onClick: _cache[2] || (_cache[2] = ($event) => editorCtrl.value = !editorCtrl.value)
|
|
2689
|
+
}, " \\u2303 Ctrl ", 2)) : createCommentVNode("v-if", true),
|
|
2690
|
+
createElementVNode("button", {
|
|
2691
|
+
class: normalizeClass(["px-3 py-1.5 rounded-md text-xs font-mono border transition-colors", editorAlt.value ? "bg-primary/15 border-primary/30 text-primary" : "border-base op50 hover:op80"]),
|
|
2692
|
+
onClick: _cache[3] || (_cache[3] = ($event) => editorAlt.value = !editorAlt.value)
|
|
2693
|
+
}, toDisplayString(unref(isMac) ? "⌥ Alt" : "Alt"), 3),
|
|
2694
|
+
createElementVNode("button", {
|
|
2695
|
+
class: normalizeClass(["px-3 py-1.5 rounded-md text-xs font-mono border transition-colors", editorShift.value ? "bg-primary/15 border-primary/30 text-primary" : "border-base op50 hover:op80"]),
|
|
2696
|
+
onClick: _cache[4] || (_cache[4] = ($event) => editorShift.value = !editorShift.value)
|
|
2697
|
+
}, toDisplayString(unref(isMac) ? "⇧ Shift" : "Shift"), 3)
|
|
2698
|
+
]),
|
|
2699
|
+
createCommentVNode(" Warnings "),
|
|
2700
|
+
editorWarnings.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_19, [(openBlock(true), createElementBlock(Fragment, null, renderList(editorWarnings.value, (warning, wi) => {
|
|
2701
|
+
return openBlock(), createElementBlock("div", {
|
|
2702
|
+
key: wi,
|
|
2703
|
+
class: "flex items-center gap-1.5 text-xs text-amber"
|
|
2704
|
+
}, [_cache[8] || (_cache[8] = createElementVNode("div", { class: "i-ph-warning-duotone w-3.5 h-3.5 shrink-0" }, null, -1)), createTextVNode(" " + toDisplayString(warning), 1)]);
|
|
2705
|
+
}), 128))])) : createCommentVNode("v-if", true),
|
|
2706
|
+
createCommentVNode(" Actions "),
|
|
2707
|
+
createElementVNode("div", _hoisted_20, [createElementVNode("button", {
|
|
2708
|
+
class: "px-3 py-1.5 rounded text-xs op60 hover:op100 hover:bg-gray/10 transition-colors",
|
|
2709
|
+
onClick: closeEditor
|
|
2710
|
+
}, " Cancel "), createElementVNode("button", {
|
|
2711
|
+
class: normalizeClass(["px-3 py-1.5 rounded text-xs transition-colors", editorCanSave.value ? "bg-primary/15 text-primary hover:bg-primary/25" : "op30 cursor-not-allowed"]),
|
|
2712
|
+
disabled: !editorCanSave.value,
|
|
2713
|
+
onClick: saveEditor
|
|
2714
|
+
}, " OK ", 10, _hoisted_21)])
|
|
2715
|
+
])])) : createCommentVNode("v-if", true)
|
|
2716
|
+
], 64);
|
|
2717
|
+
};
|
|
2718
|
+
}
|
|
2719
|
+
});
|
|
2720
|
+
//#endregion
|
|
2721
|
+
//#region src/client/webcomponents/components/views-builtin/ViewBuiltinSettings.vue
|
|
2722
|
+
const _hoisted_1$4 = { class: "h-full w-full overflow-hidden flex flex-col" };
|
|
2723
|
+
const _hoisted_2$4 = { class: "flex items-center border-b border-base px-6 shrink-0" };
|
|
2724
|
+
const _hoisted_3$3 = ["onClick"];
|
|
2725
|
+
const _hoisted_4$2 = {
|
|
2726
|
+
key: 0,
|
|
2727
|
+
class: "absolute bottom-0 left-2 right-2 h-0.5 bg-primary rounded-full"
|
|
2728
|
+
};
|
|
2729
|
+
const _hoisted_5$2 = { class: "flex-1 overflow-auto p8" };
|
|
2730
|
+
const _hoisted_6$1 = { class: "max-w-200 mx-auto" };
|
|
2731
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
2732
|
+
__name: "ViewBuiltinSettings",
|
|
2733
|
+
props: {
|
|
2734
|
+
context: {},
|
|
2735
|
+
entry: {}
|
|
2736
|
+
},
|
|
2737
|
+
setup(__props) {
|
|
2738
|
+
const props = __props;
|
|
2739
|
+
const tabs = [
|
|
2740
|
+
{
|
|
2741
|
+
id: "appearance",
|
|
2742
|
+
label: "Appearance",
|
|
2743
|
+
icon: "i-ph-paint-brush-duotone"
|
|
2744
|
+
},
|
|
2745
|
+
{
|
|
2746
|
+
id: "docks",
|
|
2747
|
+
label: "Docks",
|
|
2748
|
+
icon: "i-ph-layout-duotone"
|
|
2749
|
+
},
|
|
2750
|
+
{
|
|
2751
|
+
id: "shortcuts",
|
|
2752
|
+
label: "Shortcuts",
|
|
2753
|
+
icon: "i-ph-keyboard-duotone"
|
|
2754
|
+
},
|
|
2755
|
+
{
|
|
2756
|
+
id: "advanced",
|
|
2757
|
+
label: "Advanced",
|
|
2758
|
+
icon: "i-ph-wrench-duotone"
|
|
2759
|
+
}
|
|
2760
|
+
];
|
|
2761
|
+
const activeTab = ref("appearance");
|
|
2762
|
+
const settingsStore = props.context.docks.settings;
|
|
2763
|
+
return (_ctx, _cache) => {
|
|
2764
|
+
return openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
2765
|
+
createCommentVNode(" Tab bar "),
|
|
2766
|
+
createElementVNode("div", _hoisted_2$4, [(openBlock(), createElementBlock(Fragment, null, renderList(tabs, (tab) => {
|
|
2767
|
+
return createElementVNode("button", {
|
|
2768
|
+
key: tab.id,
|
|
2769
|
+
class: normalizeClass(["flex items-center gap-1.5 px-4 py-3 text-sm transition-colors relative", activeTab.value === tab.id ? "op100 text-primary" : "op50 hover:op80"]),
|
|
2770
|
+
onClick: ($event) => activeTab.value = tab.id
|
|
2771
|
+
}, [
|
|
2772
|
+
createElementVNode("div", { class: normalizeClass([tab.icon, "w-4 h-4"]) }, null, 2),
|
|
2773
|
+
createTextVNode(" " + toDisplayString(tab.label) + " ", 1),
|
|
2774
|
+
activeTab.value === tab.id ? (openBlock(), createElementBlock("div", _hoisted_4$2)) : createCommentVNode("v-if", true)
|
|
2775
|
+
], 10, _hoisted_3$3);
|
|
2776
|
+
}), 64))]),
|
|
2777
|
+
createCommentVNode(" Tab content "),
|
|
2778
|
+
createElementVNode("div", _hoisted_5$2, [createElementVNode("div", _hoisted_6$1, [
|
|
2779
|
+
activeTab.value === "appearance" ? (openBlock(), createBlock(_sfc_main$8, {
|
|
2780
|
+
key: 0,
|
|
2781
|
+
context: __props.context,
|
|
2782
|
+
"settings-store": unref(settingsStore)
|
|
2783
|
+
}, null, 8, ["context", "settings-store"])) : createCommentVNode("v-if", true),
|
|
2784
|
+
activeTab.value === "shortcuts" ? (openBlock(), createBlock(_sfc_main$6, {
|
|
2785
|
+
key: 1,
|
|
2786
|
+
context: __props.context
|
|
2787
|
+
}, null, 8, ["context"])) : createCommentVNode("v-if", true),
|
|
2788
|
+
activeTab.value === "docks" ? (openBlock(), createBlock(_sfc_main$7, {
|
|
2789
|
+
key: 2,
|
|
2790
|
+
context: __props.context,
|
|
2791
|
+
"settings-store": unref(settingsStore)
|
|
2792
|
+
}, null, 8, ["context", "settings-store"])) : createCommentVNode("v-if", true),
|
|
2793
|
+
activeTab.value === "advanced" ? (openBlock(), createBlock(_sfc_main$9, {
|
|
2794
|
+
key: 3,
|
|
2795
|
+
context: __props.context,
|
|
2796
|
+
"settings-store": unref(settingsStore)
|
|
2797
|
+
}, null, 8, ["context", "settings-store"])) : createCommentVNode("v-if", true)
|
|
2798
|
+
])])
|
|
2799
|
+
]);
|
|
2800
|
+
};
|
|
2801
|
+
}
|
|
2802
|
+
});
|
|
2803
|
+
//#endregion
|
|
2804
|
+
//#region src/client/webcomponents/components/views/ViewCustomRenderer.vue
|
|
2805
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
2806
|
+
__name: "ViewCustomRenderer",
|
|
2807
|
+
props: {
|
|
2808
|
+
context: {},
|
|
2809
|
+
entry: {},
|
|
2810
|
+
persistedDoms: {},
|
|
2811
|
+
divStyle: {}
|
|
2812
|
+
},
|
|
2813
|
+
setup(__props) {
|
|
2814
|
+
const props = __props;
|
|
2815
|
+
const isLoading = ref(true);
|
|
2816
|
+
const viewFrame = useTemplateRef("viewFrame");
|
|
2817
|
+
onMounted(() => {
|
|
2818
|
+
const holder = props.persistedDoms.getOrCreateHolder(props.entry.id, "div");
|
|
2819
|
+
holder.element.style.boxShadow = "none";
|
|
2820
|
+
holder.element.style.outline = "none";
|
|
2821
|
+
Object.assign(holder.element.style, props.divStyle);
|
|
2822
|
+
const entryState = props.context.docks.getStateById(props.entry.id);
|
|
2823
|
+
if (entryState) entryState.domElements.panel = holder.element;
|
|
2824
|
+
holder.mount(viewFrame.value);
|
|
2825
|
+
isLoading.value = false;
|
|
2826
|
+
nextTick(() => {
|
|
2827
|
+
holder.update();
|
|
2828
|
+
});
|
|
2829
|
+
watch(() => props.context.panel, () => {
|
|
2830
|
+
holder.update();
|
|
2831
|
+
}, { deep: true });
|
|
2832
|
+
watchEffect(() => {
|
|
2833
|
+
holder.element.style.pointerEvents = props.context.panel.isDragging || props.context.panel.isResizing ? "none" : "auto";
|
|
2834
|
+
}, { flush: "sync" });
|
|
2835
|
+
});
|
|
2836
|
+
onUnmounted(() => {
|
|
2837
|
+
props.persistedDoms.getHolder(props.entry.id, "div")?.unmount();
|
|
2838
|
+
});
|
|
2839
|
+
return (_ctx, _cache) => {
|
|
2840
|
+
return openBlock(), createElementBlock("div", {
|
|
2841
|
+
ref_key: "viewFrame",
|
|
2842
|
+
ref: viewFrame,
|
|
2843
|
+
class: "vite-devtools-view-custom-renderer w-full h-full flex items-center justify-center"
|
|
2844
|
+
}, null, 512);
|
|
2845
|
+
};
|
|
2846
|
+
}
|
|
2847
|
+
});
|
|
2848
|
+
//#endregion
|
|
2849
|
+
//#region src/client/webcomponents/components/views/ViewIframe.vue
|
|
2850
|
+
const _hoisted_1$3 = { class: "w-full h-full flex flex-col" };
|
|
2851
|
+
const _hoisted_2$3 = { class: "flex-1 flex items-center h-7 px-2.5 rounded bg-gray/5 border border-transparent hover:border-gray/10 focus-within:border-gray/15 transition-colors" };
|
|
2852
|
+
const _hoisted_3$2 = ["value", "readonly"];
|
|
2853
|
+
const _hoisted_4$1 = {
|
|
2854
|
+
key: 0,
|
|
2855
|
+
class: "i-ph-circle-notch text-sm op40 ml-2 shrink-0 animate-spin"
|
|
2856
|
+
};
|
|
2857
|
+
const _hoisted_5$1 = {
|
|
2858
|
+
key: 0,
|
|
2859
|
+
class: "op50 z--1"
|
|
2860
|
+
};
|
|
2861
|
+
const ADDRESS_BAR_HEIGHT = 40;
|
|
2862
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
2863
|
+
__name: "ViewIframe",
|
|
2864
|
+
props: {
|
|
2865
|
+
context: {},
|
|
2866
|
+
entry: {},
|
|
2867
|
+
persistedDoms: {},
|
|
2868
|
+
iframeStyle: {}
|
|
2869
|
+
},
|
|
2870
|
+
setup(__props) {
|
|
2871
|
+
const props = __props;
|
|
2872
|
+
const settings = sharedStateToRef(props.context.docks.settings);
|
|
2873
|
+
const showAddressBar = computed(() => settings.value.showIframeAddressBar ?? true);
|
|
2874
|
+
const isEdgeMode = computed(() => props.context.panel.store.mode === "edge");
|
|
2875
|
+
const isLoading = ref(true);
|
|
2876
|
+
const isIframeLoading = ref(false);
|
|
2877
|
+
const viewFrame = useTemplateRef("viewFrame");
|
|
2878
|
+
const urlInputRef = useTemplateRef("urlInput");
|
|
2879
|
+
const currentUrl = ref(props.entry.url);
|
|
2880
|
+
const editingUrl = ref(props.entry.url);
|
|
2881
|
+
const isEditing = ref(false);
|
|
2882
|
+
const iframeElement = computed(() => {
|
|
2883
|
+
return props.persistedDoms.getHolder(props.entry.id, "iframe")?.element;
|
|
2884
|
+
});
|
|
2885
|
+
const currentPageOrigin = computed(() => {
|
|
2886
|
+
try {
|
|
2887
|
+
return window.location.origin;
|
|
2888
|
+
} catch {
|
|
2889
|
+
return "";
|
|
2890
|
+
}
|
|
2891
|
+
});
|
|
2892
|
+
const isCrossOrigin = computed(() => {
|
|
2893
|
+
try {
|
|
2894
|
+
return new URL(currentUrl.value).origin !== currentPageOrigin.value;
|
|
2895
|
+
} catch {
|
|
2896
|
+
return true;
|
|
2897
|
+
}
|
|
2898
|
+
});
|
|
2899
|
+
const displayUrl = computed(() => {
|
|
2900
|
+
if (isCrossOrigin.value) return currentUrl.value;
|
|
2901
|
+
try {
|
|
2902
|
+
const url = new URL(currentUrl.value);
|
|
2903
|
+
return url.pathname + url.search + url.hash;
|
|
2904
|
+
} catch {
|
|
2905
|
+
return currentUrl.value;
|
|
2906
|
+
}
|
|
2907
|
+
});
|
|
2908
|
+
function updateCurrentUrl() {
|
|
2909
|
+
try {
|
|
2910
|
+
const iframe = iframeElement.value;
|
|
2911
|
+
if (iframe?.contentWindow?.location?.href) currentUrl.value = iframe.contentWindow.location.href;
|
|
2912
|
+
} catch {}
|
|
2913
|
+
}
|
|
2914
|
+
function navigateTo(url) {
|
|
2915
|
+
const iframe = iframeElement.value;
|
|
2916
|
+
if (!iframe) return;
|
|
2917
|
+
let normalizedUrl = url.trim();
|
|
2918
|
+
if (normalizedUrl && !/^https?:\/\//i.test(normalizedUrl)) if (normalizedUrl.startsWith("/")) normalizedUrl = `${window.location.origin}${normalizedUrl}`;
|
|
2919
|
+
else normalizedUrl = `http://${normalizedUrl}`;
|
|
2920
|
+
currentUrl.value = normalizedUrl;
|
|
2921
|
+
editingUrl.value = normalizedUrl;
|
|
2922
|
+
iframe.src = normalizedUrl;
|
|
2923
|
+
isIframeLoading.value = true;
|
|
2924
|
+
}
|
|
2925
|
+
function handleUrlSubmit() {
|
|
2926
|
+
isEditing.value = false;
|
|
2927
|
+
if (editingUrl.value !== currentUrl.value) navigateTo(editingUrl.value);
|
|
2928
|
+
}
|
|
2929
|
+
function handleUrlFocus() {
|
|
2930
|
+
isEditing.value = true;
|
|
2931
|
+
editingUrl.value = currentUrl.value;
|
|
2932
|
+
nextTick(() => {
|
|
2933
|
+
urlInputRef.value?.select();
|
|
2934
|
+
});
|
|
2935
|
+
}
|
|
2936
|
+
function handleUrlBlur() {
|
|
2937
|
+
isEditing.value = false;
|
|
2938
|
+
editingUrl.value = currentUrl.value;
|
|
2939
|
+
}
|
|
2940
|
+
function handleUrlKeydown(e) {
|
|
2941
|
+
if (e.key === "Escape") {
|
|
2942
|
+
isEditing.value = false;
|
|
2943
|
+
editingUrl.value = currentUrl.value;
|
|
2944
|
+
urlInputRef.value?.blur();
|
|
2945
|
+
}
|
|
2946
|
+
}
|
|
2947
|
+
function goBack() {
|
|
2948
|
+
try {
|
|
2949
|
+
iframeElement.value?.contentWindow?.history.back();
|
|
2950
|
+
} catch {}
|
|
2951
|
+
}
|
|
2952
|
+
function refresh() {
|
|
2953
|
+
const iframe = iframeElement.value;
|
|
2954
|
+
if (!iframe) return;
|
|
2955
|
+
isIframeLoading.value = true;
|
|
2956
|
+
const src = iframe.src;
|
|
2957
|
+
iframe.src = "";
|
|
2958
|
+
iframe.src = src;
|
|
2959
|
+
}
|
|
2960
|
+
onMounted(() => {
|
|
2961
|
+
if (props.persistedDoms.getHolder(props.entry.id, "iframe")) updateCurrentUrl();
|
|
2962
|
+
const holder = props.persistedDoms.getOrCreateHolder(props.entry.id, "iframe");
|
|
2963
|
+
holder.element.style.boxShadow = "none";
|
|
2964
|
+
holder.element.style.outline = "none";
|
|
2965
|
+
if (!holder.element.src) holder.element.src = props.entry.url;
|
|
2966
|
+
holder.element.addEventListener("load", () => {
|
|
2967
|
+
isIframeLoading.value = false;
|
|
2968
|
+
updateCurrentUrl();
|
|
2969
|
+
});
|
|
2970
|
+
const entryState = props.context.docks.getStateById(props.entry.id);
|
|
2971
|
+
if (entryState) entryState.domElements.iframe = holder.element;
|
|
2972
|
+
watchEffect(() => {
|
|
2973
|
+
Object.assign(holder.element.style, props.iframeStyle);
|
|
2974
|
+
if (showAddressBar.value) {
|
|
2975
|
+
holder.element.style.marginTop = `${ADDRESS_BAR_HEIGHT}px`;
|
|
2976
|
+
if (!isEdgeMode.value) {
|
|
2977
|
+
holder.element.style.borderTopLeftRadius = "0px";
|
|
2978
|
+
holder.element.style.borderTopRightRadius = "0px";
|
|
2979
|
+
}
|
|
2980
|
+
} else {
|
|
2981
|
+
holder.element.style.marginTop = "0px";
|
|
2982
|
+
holder.element.style.borderTopLeftRadius = "";
|
|
2983
|
+
holder.element.style.borderTopRightRadius = "";
|
|
2984
|
+
}
|
|
2985
|
+
if (isEdgeMode.value) {
|
|
2986
|
+
holder.element.style.borderRadius = "0px";
|
|
2987
|
+
holder.element.style.border = "none";
|
|
2988
|
+
}
|
|
2989
|
+
});
|
|
2990
|
+
watch(() => props.context.panel, () => {
|
|
2991
|
+
holder.update();
|
|
2992
|
+
}, { deep: true });
|
|
2993
|
+
watchEffect(() => {
|
|
2994
|
+
holder.element.style.pointerEvents = props.context.panel.isDragging || props.context.panel.isResizing ? "none" : "auto";
|
|
2995
|
+
}, { flush: "sync" });
|
|
2996
|
+
holder.mount(viewFrame.value);
|
|
2997
|
+
isLoading.value = false;
|
|
2998
|
+
nextTick(() => {
|
|
2999
|
+
holder.update();
|
|
3000
|
+
});
|
|
3001
|
+
});
|
|
3002
|
+
onUnmounted(() => {
|
|
3003
|
+
props.persistedDoms.getHolder(props.entry.id, "iframe")?.unmount();
|
|
3004
|
+
});
|
|
3005
|
+
return (_ctx, _cache) => {
|
|
3006
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3, [showAddressBar.value ? (openBlock(), createElementBlock("div", {
|
|
3007
|
+
key: 0,
|
|
3008
|
+
class: normalizeClass(["flex-none px-2 w-full flex items-center gap-1", isEdgeMode.value ? "border-b border-base" : "border rounded-t-md border-base border-b-0"]),
|
|
3009
|
+
style: normalizeStyle({ height: `${ADDRESS_BAR_HEIGHT}px` })
|
|
3010
|
+
}, [
|
|
3011
|
+
createCommentVNode(" Navigation buttons (hidden for cross-origin) "),
|
|
3012
|
+
!isCrossOrigin.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
3013
|
+
createCommentVNode(" Back button "),
|
|
3014
|
+
createElementVNode("button", {
|
|
3015
|
+
class: "w-7 h-7 flex items-center justify-center rounded hover:bg-gray/15 transition-colors shrink-0",
|
|
3016
|
+
title: "Back",
|
|
3017
|
+
onClick: goBack
|
|
3018
|
+
}, [..._cache[1] || (_cache[1] = [createElementVNode("div", { class: "i-ph-caret-left op60 w-4.5 h-4.5" }, null, -1)])]),
|
|
3019
|
+
createCommentVNode(" Refresh button "),
|
|
3020
|
+
createElementVNode("button", {
|
|
3021
|
+
class: "w-7 h-7 flex items-center justify-center rounded hover:bg-gray/15 transition-colors shrink-0",
|
|
3022
|
+
title: "Refresh",
|
|
3023
|
+
onClick: refresh
|
|
3024
|
+
}, [..._cache[2] || (_cache[2] = [createElementVNode("div", { class: "i-ph-arrow-clockwise op60 w-4.5 h-4.5" }, null, -1)])])
|
|
3025
|
+
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" Cross-origin badge "), _cache[3] || (_cache[3] = createElementVNode("div", {
|
|
3026
|
+
class: "flex items-center gap-1 px2 py1 rounded text-xs bg-amber/10 text-amber border border-amber/20 shrink-0",
|
|
3027
|
+
title: "Cross-origin iframe - navigation controls unavailable"
|
|
3028
|
+
}, [createElementVNode("div", { class: "i-ph-globe text-sm" }), createElementVNode("span", null, "Cross-Origin")], -1))], 2112)),
|
|
3029
|
+
createCommentVNode(" URL input "),
|
|
3030
|
+
createElementVNode("div", _hoisted_2$3, [createElementVNode("input", {
|
|
3031
|
+
ref: "urlInput",
|
|
3032
|
+
value: isEditing.value ? editingUrl.value : displayUrl.value,
|
|
3033
|
+
type: "text",
|
|
3034
|
+
class: "flex-1 bg-transparent outline-none text-sm font-mono",
|
|
3035
|
+
placeholder: "Enter URL...",
|
|
3036
|
+
readonly: isCrossOrigin.value,
|
|
3037
|
+
onInput: _cache[0] || (_cache[0] = ($event) => editingUrl.value = $event.target.value),
|
|
3038
|
+
onFocus: handleUrlFocus,
|
|
3039
|
+
onBlur: handleUrlBlur,
|
|
3040
|
+
onKeydown: [handleUrlKeydown, withKeys(handleUrlSubmit, ["enter"])]
|
|
3041
|
+
}, null, 40, _hoisted_3$2), isIframeLoading.value ? (openBlock(), createElementBlock("div", _hoisted_4$1)) : createCommentVNode("v-if", true)])
|
|
3042
|
+
], 6)) : createCommentVNode("v-if", true), createElementVNode("div", {
|
|
3043
|
+
ref_key: "viewFrame",
|
|
3044
|
+
ref: viewFrame,
|
|
3045
|
+
class: "vite-devtools-view-iframe w-full h-full flex-1 items-center justify-center"
|
|
3046
|
+
}, [isLoading.value ? (openBlock(), createElementBlock("div", _hoisted_5$1, " Loading iframe... ")) : createCommentVNode("v-if", true)], 512)]);
|
|
3047
|
+
};
|
|
3048
|
+
}
|
|
3049
|
+
});
|
|
3050
|
+
//#endregion
|
|
3051
|
+
//#region src/client/webcomponents/components/views/ViewLauncher.vue
|
|
3052
|
+
const _hoisted_1$2 = { class: "flex flex-col gap-4 items-center justify-center h-full relative" };
|
|
3053
|
+
const _hoisted_2$2 = { class: "text-2xl font-bold" };
|
|
3054
|
+
const _hoisted_3$1 = ["disabled"];
|
|
3055
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
3056
|
+
__name: "ViewLauncher",
|
|
3057
|
+
props: {
|
|
3058
|
+
context: {},
|
|
3059
|
+
entry: {}
|
|
3060
|
+
},
|
|
3061
|
+
setup(__props) {
|
|
3062
|
+
const props = __props;
|
|
3063
|
+
function onLaunch() {
|
|
3064
|
+
props.context.rpc.call("devtoolskit:internal:docks:on-launch", props.entry.id);
|
|
3065
|
+
}
|
|
3066
|
+
const status = computed(() => props.entry.launcher.status || "idle");
|
|
3067
|
+
const iconsMap = {
|
|
3068
|
+
error: "i-ph-warning-duotone",
|
|
3069
|
+
idle: "i-ph-rocket-launch-duotone",
|
|
3070
|
+
loading: "i-svg-spinners-8-dots-rotate",
|
|
3071
|
+
success: "i-ph-check-duotone"
|
|
3072
|
+
};
|
|
3073
|
+
const buttonText = computed(() => {
|
|
3074
|
+
if (status.value === "idle") return props.entry.launcher.buttonStart || "Launch";
|
|
3075
|
+
else if (status.value === "loading") return props.entry.launcher.buttonLoading || "Loading...";
|
|
3076
|
+
else if (status.value === "error") return "ERROR";
|
|
3077
|
+
else if (status.value === "success") return "Success";
|
|
3078
|
+
else return `UNKNOWN STATUS: ${status.value}`;
|
|
3079
|
+
});
|
|
3080
|
+
return (_ctx, _cache) => {
|
|
3081
|
+
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
3082
|
+
createVNode(_sfc_main$21, {
|
|
3083
|
+
icon: __props.entry.launcher.icon || __props.entry.icon,
|
|
3084
|
+
class: "w-10 h-10"
|
|
3085
|
+
}, null, 8, ["icon"]),
|
|
3086
|
+
createElementVNode("h1", _hoisted_2$2, toDisplayString(__props.entry.launcher.title), 1),
|
|
3087
|
+
createElementVNode("p", null, toDisplayString(__props.entry.launcher.description), 1),
|
|
3088
|
+
createElementVNode("button", {
|
|
3089
|
+
class: "bg-lime6 px4 py1 rounded hover:bg-lime7 transition-all duration-300 flex gap-2 items-center disabled:bg-gray6! disabled:pointer-events-none",
|
|
3090
|
+
disabled: status.value !== "idle",
|
|
3091
|
+
onClick: onLaunch
|
|
3092
|
+
}, [createElementVNode("div", { class: normalizeClass(iconsMap[status.value]) }, null, 2), createElementVNode("div", null, toDisplayString(buttonText.value), 1)], 8, _hoisted_3$1)
|
|
3093
|
+
]);
|
|
3094
|
+
};
|
|
3095
|
+
}
|
|
3096
|
+
});
|
|
3097
|
+
//#endregion
|
|
3098
|
+
//#region src/client/webcomponents/components/views/ViewEntry.vue
|
|
3099
|
+
const _hoisted_1$1 = { key: 4 };
|
|
3100
|
+
const _hoisted_2$1 = { key: 6 };
|
|
3101
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
3102
|
+
__name: "ViewEntry",
|
|
3103
|
+
props: {
|
|
3104
|
+
context: {},
|
|
3105
|
+
entry: {},
|
|
3106
|
+
persistedDoms: {},
|
|
3107
|
+
iframeStyle: {},
|
|
3108
|
+
divStyle: {}
|
|
3109
|
+
},
|
|
3110
|
+
setup(__props) {
|
|
3111
|
+
const ViewBuiltinTerminals = defineAsyncComponent(() => import("./ViewBuiltinTerminals-ZrMObMte.js"));
|
|
3112
|
+
const ViewBuiltinLogs = defineAsyncComponent(() => import("./ViewBuiltinLogs-B_CLlali.js"));
|
|
3113
|
+
const ViewJsonRender = defineAsyncComponent(() => import("./ViewJsonRender-Cc5BPfnv.js"));
|
|
3114
|
+
return (_ctx, _cache) => {
|
|
3115
|
+
return openBlock(), createBlock(Suspense, null, {
|
|
3116
|
+
fallback: withCtx(() => [..._cache[0] || (_cache[0] = [createElementVNode("div", null, " Loading... ", -1)])]),
|
|
3117
|
+
default: withCtx(() => [__props.entry.type === "~builtin" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [__props.entry.id === "~terminals" ? (openBlock(), createBlock(unref(ViewBuiltinTerminals), {
|
|
3118
|
+
key: 0,
|
|
3119
|
+
context: __props.context,
|
|
3120
|
+
entry: __props.entry
|
|
3121
|
+
}, null, 8, ["context", "entry"])) : __props.entry.id === "~logs" ? (openBlock(), createBlock(unref(ViewBuiltinLogs), {
|
|
3122
|
+
key: 1,
|
|
3123
|
+
context: __props.context,
|
|
3124
|
+
entry: __props.entry
|
|
3125
|
+
}, null, 8, ["context", "entry"])) : __props.entry.id === "~settings" ? (openBlock(), createBlock(_sfc_main$5, {
|
|
3126
|
+
key: 2,
|
|
3127
|
+
context: __props.context,
|
|
3128
|
+
entry: __props.entry
|
|
3129
|
+
}, null, 8, ["context", "entry"])) : __props.entry.id === "~client-auth-notice" ? (openBlock(), createBlock(_sfc_main$10, {
|
|
3130
|
+
key: 3,
|
|
3131
|
+
context: __props.context
|
|
3132
|
+
}, null, 8, ["context"])) : (openBlock(), createElementBlock("div", _hoisted_1$1, " Unknown builtin entry: " + toDisplayString(__props.entry), 1))], 64)) : __props.entry.type === "action" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" Entry for Actions ")], 64)) : __props.entry.type === "iframe" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createCommentVNode(" User-defined entries "), createVNode(_sfc_main$3, {
|
|
3133
|
+
context: __props.context,
|
|
3134
|
+
entry: __props.entry,
|
|
3135
|
+
"persisted-doms": __props.persistedDoms,
|
|
3136
|
+
"iframe-style": __props.iframeStyle
|
|
3137
|
+
}, null, 8, [
|
|
3138
|
+
"context",
|
|
3139
|
+
"entry",
|
|
3140
|
+
"persisted-doms",
|
|
3141
|
+
"iframe-style"
|
|
3142
|
+
])], 2112)) : __props.entry.type === "custom-render" ? (openBlock(), createBlock(_sfc_main$4, {
|
|
3143
|
+
key: 3,
|
|
3144
|
+
context: __props.context,
|
|
3145
|
+
entry: __props.entry,
|
|
3146
|
+
"persisted-doms": __props.persistedDoms,
|
|
3147
|
+
"div-style": __props.divStyle
|
|
3148
|
+
}, null, 8, [
|
|
3149
|
+
"context",
|
|
3150
|
+
"entry",
|
|
3151
|
+
"persisted-doms",
|
|
3152
|
+
"div-style"
|
|
3153
|
+
])) : __props.entry.type === "launcher" ? (openBlock(), createBlock(_sfc_main$2, {
|
|
3154
|
+
key: 4,
|
|
3155
|
+
context: __props.context,
|
|
3156
|
+
entry: __props.entry
|
|
3157
|
+
}, null, 8, ["context", "entry"])) : __props.entry.type === "json-render" ? (openBlock(), createBlock(unref(ViewJsonRender), {
|
|
3158
|
+
key: 5,
|
|
3159
|
+
context: __props.context,
|
|
3160
|
+
entry: __props.entry
|
|
3161
|
+
}, null, 8, ["context", "entry"])) : (openBlock(), createElementBlock("div", _hoisted_2$1, " Unknown entry: " + toDisplayString(__props.entry), 1))]),
|
|
3162
|
+
_: 1
|
|
3163
|
+
});
|
|
3164
|
+
};
|
|
3165
|
+
}
|
|
3166
|
+
});
|
|
3167
|
+
//#endregion
|
|
3168
|
+
//#region src/client/webcomponents/components/dock/DockStandalone.vue
|
|
3169
|
+
const _hoisted_1 = {
|
|
3170
|
+
key: 0,
|
|
3171
|
+
class: "h-screen w-screen of-hidden"
|
|
3172
|
+
};
|
|
3173
|
+
const _hoisted_2 = {
|
|
3174
|
+
key: 1,
|
|
3175
|
+
class: "h-screen w-screen of-hidden grid cols-[max-content_1fr]"
|
|
3176
|
+
};
|
|
3177
|
+
const _hoisted_3 = { class: "border-r border-base flex flex-col min-h-0" };
|
|
3178
|
+
const _hoisted_4 = { class: "p2 border-b border-base flex" };
|
|
3179
|
+
const _hoisted_5 = { class: "transition duration-200 p2 of-y-auto" };
|
|
3180
|
+
const _hoisted_6 = { class: "min-h-0" };
|
|
3181
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3182
|
+
__name: "DockStandalone",
|
|
3183
|
+
props: { context: {} },
|
|
3184
|
+
setup(__props) {
|
|
3185
|
+
const context = __props.context;
|
|
3186
|
+
const viewsContainer = useTemplateRef("viewsContainer");
|
|
3187
|
+
const persistedDoms = markRaw(new PersistedDomViewsManager(viewsContainer));
|
|
3188
|
+
const isRpcTrusted = ref(context.rpc.isTrusted);
|
|
3189
|
+
context.rpc.events.on("rpc:is-trusted:updated", (isTrusted) => {
|
|
3190
|
+
isRpcTrusted.value = isTrusted;
|
|
3191
|
+
if (!isTrusted) context.docks.switchEntry(null);
|
|
3192
|
+
});
|
|
3193
|
+
watch(() => context.docks.entries, () => {
|
|
3194
|
+
context.docks.selectedId ||= context.docks.entries[0]?.id ?? null;
|
|
3195
|
+
}, { immediate: true });
|
|
3196
|
+
const groupedEntries = computed(() => context.docks.groupedEntries);
|
|
3197
|
+
function switchEntry(id) {
|
|
3198
|
+
if (id) context.docks.switchEntry(id);
|
|
3199
|
+
}
|
|
3200
|
+
return (_ctx, _cache) => {
|
|
3201
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
3202
|
+
!isRpcTrusted.value ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(_sfc_main$10, { context: unref(context) }, null, 8, ["context"])])) : (openBlock(), createElementBlock("div", _hoisted_2, [createElementVNode("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [createVNode(VitePlus_default, { class: "w-7 h-7 ma" })]), createElementVNode("div", _hoisted_5, [createVNode(_sfc_main$12, {
|
|
3203
|
+
context: unref(context),
|
|
3204
|
+
groups: groupedEntries.value,
|
|
3205
|
+
"is-vertical": false,
|
|
3206
|
+
selected: unref(context).docks.selected,
|
|
3207
|
+
onSelect: _cache[0] || (_cache[0] = (e) => switchEntry(e?.id))
|
|
3208
|
+
}, {
|
|
3209
|
+
separator: withCtx(() => [..._cache[1] || (_cache[1] = [createElementVNode("div", { class: "border-base border-b w-full my-2" }, null, -1)])]),
|
|
3210
|
+
_: 1
|
|
3211
|
+
}, 8, [
|
|
3212
|
+
"context",
|
|
3213
|
+
"groups",
|
|
3214
|
+
"selected"
|
|
3215
|
+
])])]), createElementVNode("div", _hoisted_6, [createElementVNode("div", {
|
|
3216
|
+
id: "vite-devtools-views-container",
|
|
3217
|
+
ref_key: "viewsContainer",
|
|
3218
|
+
ref: viewsContainer,
|
|
3219
|
+
class: "pointer-events-auto"
|
|
3220
|
+
}, null, 512), unref(context).docks.selected && viewsContainer.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
3221
|
+
key: unref(context).docks.selected.id,
|
|
3222
|
+
entry: unref(context).docks.selected,
|
|
3223
|
+
context: unref(context),
|
|
3224
|
+
"persisted-doms": unref(persistedDoms)
|
|
3225
|
+
}, null, 8, [
|
|
3226
|
+
"entry",
|
|
3227
|
+
"context",
|
|
3228
|
+
"persisted-doms"
|
|
3229
|
+
])) : createCommentVNode("v-if", true)])])),
|
|
3230
|
+
createVNode(_sfc_main$15),
|
|
3231
|
+
createVNode(_sfc_main$17, { context: unref(context) }, null, 8, ["context"]),
|
|
3232
|
+
createVNode(_sfc_main$16, { context: unref(context) }, null, 8, ["context"])
|
|
3233
|
+
], 64);
|
|
3234
|
+
};
|
|
3235
|
+
}
|
|
3236
|
+
});
|
|
3237
|
+
//#endregion
|
|
3238
|
+
//#region src/client/webcomponents/components/DockStandalone.ts
|
|
3239
|
+
var DockStandalone_exports = /* @__PURE__ */ __exportAll({ DockStandalone: () => DockStandalone });
|
|
3240
|
+
const DockStandalone = defineCustomElement(_sfc_main, {
|
|
3241
|
+
shadowRoot: true,
|
|
3242
|
+
styles: [css_default]
|
|
3243
|
+
});
|
|
3244
|
+
if (!customElements.get("vite-devtools-dock-standalone")) customElements.define("vite-devtools-dock-standalone", DockStandalone);
|
|
3245
|
+
//#endregion
|
|
3246
|
+
export { PersistedDomViewsManager as a, openDockContextMenu as c, _sfc_main$17 as d, css_default as f, PersistedDomHolder as i, _sfc_main$15 as l, DockStandalone_exports as n, _sfc_main$12 as o, _sfc_main$1 as r, _sfc_main$14 as s, DockStandalone as t, _sfc_main$16 as u };
|