@vostride/agent-qa-dashboard-ui 0.0.1 → 0.1.2
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/LICENSE.md +105 -0
- package/NOTICE.md +11 -0
- package/dist/assets/abap-tccnpReA.js +1 -0
- package/dist/assets/apex-BKVkKsbj.js +1 -0
- package/dist/assets/arrow-up-down-DyIZvSrC.js +1 -0
- package/dist/assets/azcli-BRcTI6AW.js +1 -0
- package/dist/assets/badge-BbhOGRC0.js +1 -0
- package/dist/assets/bat-CY1d4Jjr.js +1 -0
- package/dist/assets/batch-action-bar-CZxUcNFZ.js +1 -0
- package/dist/assets/bicep--LouBhCq.js +2 -0
- package/dist/assets/cameligo-DSekJmSA.js +1 -0
- package/dist/assets/chunk-CilyBKbf.js +1 -0
- package/dist/assets/circle-alert-pBH5T6su.js +1 -0
- package/dist/assets/circle-x-DLBotPS8.js +1 -0
- package/dist/assets/clojure-GBhsYY7r.js +1 -0
- package/dist/assets/codicon-ngg6Pgfi.ttf +0 -0
- package/dist/assets/coffee-9z_JJIkP.js +1 -0
- package/dist/assets/config-BfxB7vJt.js +10 -0
- package/dist/assets/copy-Gj5_oF-8.js +1 -0
- package/dist/assets/cpp-D7LwQw_o.js +1 -0
- package/dist/assets/csharp-Df6S3RJJ.js +1 -0
- package/dist/assets/csp-AyuN80rc.js +1 -0
- package/dist/assets/css-CYIs0S-t.js +3 -0
- package/dist/assets/css.worker-Wv5dxAWO.js +89 -0
- package/dist/assets/cssMode-BB-fH2D6.js +1 -0
- package/dist/assets/cypher-CWTgbj6F.js +1 -0
- package/dist/assets/dart-BkjNQt7D.js +1 -0
- package/dist/assets/display-step-CV3zilMS.js +1 -0
- package/dist/assets/dist-DFSjTjXY.js +1 -0
- package/dist/assets/dist-DZYW0-Ta.js +1 -0
- package/dist/assets/dist-o2A-YJGQ.js +1 -0
- package/dist/assets/dockerfile-jNxF4_km.js +1 -0
- package/dist/assets/ecl-CybE3oEZ.js +1 -0
- package/dist/assets/editor-Br_kD0ds.css +1 -0
- package/dist/assets/editor.api2-DEGvZ9jW.js +872 -0
- package/dist/assets/editor.worker-Bd9IXS8d.js +26 -0
- package/dist/assets/elixir-CdaOBnQZ.js +1 -0
- package/dist/assets/empty-state-Dluv5C1Q.js +1 -0
- package/dist/assets/external-link-BZ9gsZx_.js +1 -0
- package/dist/assets/eye-CZ7GiZXJ.js +1 -0
- package/dist/assets/file-code-GHpcb0ud.js +1 -0
- package/dist/assets/file-search-CIA16Vb8.js +1 -0
- package/dist/assets/filename-validation-BOmZP9gf.js +1 -0
- package/dist/assets/flow9-0HKoddfT.js +1 -0
- package/dist/assets/format-BpI4TiHn.js +1 -0
- package/dist/assets/freemarker2-BZ9nT_ca.js +3 -0
- package/dist/assets/fsharp-B4rCGS2D.js +1 -0
- package/dist/assets/geist-cyrillic-wght-normal-CHSlOQsW.woff2 +0 -0
- package/dist/assets/geist-latin-ext-wght-normal-DMtmJ5ZE.woff2 +0 -0
- package/dist/assets/geist-latin-wght-normal-Dm3htQBi.woff2 +0 -0
- package/dist/assets/geist-mono-cyrillic-wght-normal-BZdD_g9V.woff2 +0 -0
- package/dist/assets/geist-mono-latin-ext-wght-normal-b6lpi8_2.woff2 +0 -0
- package/dist/assets/geist-mono-latin-wght-normal-Cjtb1TV-.woff2 +0 -0
- package/dist/assets/go-BMkOAZO-.js +1 -0
- package/dist/assets/graphql-CT1i0Azo.js +1 -0
- package/dist/assets/grip-vertical-aDoBVncr.js +1 -0
- package/dist/assets/handlebars-CcFgORss.js +1 -0
- package/dist/assets/hcl-Dqo24S10.js +1 -0
- package/dist/assets/hook-editor-Dvrur2VR.js +1 -0
- package/dist/assets/hook-runtime-ChJ0-jZo.js +5 -0
- package/dist/assets/hook-viewer-DwQt3CRN.js +1 -0
- package/dist/assets/hooks-DcW2AVgE.js +1 -0
- package/dist/assets/html-C5cEOw4y.js +1 -0
- package/dist/assets/html.worker-CQP8QQsS.js +502 -0
- package/dist/assets/htmlMode-B54wW7aG.js +1 -0
- package/dist/assets/id-badge-Dzm7eQ9l.js +111 -0
- package/dist/assets/index-B3xPCIyH.js +57 -0
- package/dist/assets/index-cLLRFOsN.css +2 -0
- package/dist/assets/ini-B2qo6Bwi.js +1 -0
- package/dist/assets/insights-line-grid-G3ouKANt.js +39 -0
- package/dist/assets/insights-rNBE_Oot.js +1 -0
- package/dist/assets/java-BIPaikgB.js +1 -0
- package/dist/assets/javascript-jZJvS0Ev.js +1 -0
- package/dist/assets/json.worker-DzV-CpCQ.js +58 -0
- package/dist/assets/jsonMode-BJu_sWuN.js +7 -0
- package/dist/assets/julia-DaOMlCPl.js +1 -0
- package/dist/assets/kotlin-Bu1Cf0EE.js +1 -0
- package/dist/assets/less-CkzKMiAu.js +2 -0
- package/dist/assets/lexon-TKzNnbcT.js +1 -0
- package/dist/assets/lib-BPEPp1D-.js +4 -0
- package/dist/assets/liquid-B0Wk3SRC.js +1 -0
- package/dist/assets/live-run-C2WLFzlf.js +1 -0
- package/dist/assets/lspLanguageFeatures-Bn8JS-MZ.js +4 -0
- package/dist/assets/lua-6W3WJOvj.js +1 -0
- package/dist/assets/m3-B_B1XtJr.js +1 -0
- package/dist/assets/markdown-LT3qFBoR.js +1 -0
- package/dist/assets/marked.esm-Ba5AUJng.js +64 -0
- package/dist/assets/mdx-BE6dqG5T.js +1 -0
- package/dist/assets/memory-DcKox3BM.js +1 -0
- package/dist/assets/memory-product-oHTD8fqS.js +2 -0
- package/dist/assets/mips-BuZ0JnPP.js +1 -0
- package/dist/assets/monaco-editor-CDJrOpKK.js +2 -0
- package/dist/assets/monaco-editor-inner-Q9WqqJ52.js +6 -0
- package/dist/assets/monaco.contribution-DTHp-zXN.js +2 -0
- package/dist/assets/msdax-BHMmXeIF.js +1 -0
- package/dist/assets/mysql-B1RGnQ_F.js +1 -0
- package/dist/assets/objective-c-CFGQUdp0.js +1 -0
- package/dist/assets/observation-block-DdB7C1c0.js +1 -0
- package/dist/assets/observation-markdown-CvCuqq7R.js +1 -0
- package/dist/assets/pascal-Bunb0gdj.js +1 -0
- package/dist/assets/pascaligo-Ci9pazxY.js +1 -0
- package/dist/assets/pencil-BmkcPKBm.js +1 -0
- package/dist/assets/perl-Brcsz0QG.js +1 -0
- package/dist/assets/pgsql-BeM5icw2.js +1 -0
- package/dist/assets/php-D_0c0usD.js +1 -0
- package/dist/assets/pla-BXJXsrLp.js +1 -0
- package/dist/assets/plus-C6Zz9JLt.js +1 -0
- package/dist/assets/popover-CvQRjfg5.js +1 -0
- package/dist/assets/postiats-Bh7pQpS0.js +1 -0
- package/dist/assets/powerquery-17x2qNlN.js +1 -0
- package/dist/assets/powershell-BK7CP1HA.js +1 -0
- package/dist/assets/protobuf-BIk_BSvx.js +2 -0
- package/dist/assets/pug-AfVB1dqb.js +1 -0
- package/dist/assets/python-DYEP_Px-.js +1 -0
- package/dist/assets/qsharp-DdD7_Hjo.js +1 -0
- package/dist/assets/r-BGqTutCA.js +1 -0
- package/dist/assets/razor-BARiZmvH.js +1 -0
- package/dist/assets/redis-Dlp6Na1w.js +1 -0
- package/dist/assets/redshift-i2kKyIGQ.js +1 -0
- package/dist/assets/refresh-cw-v_0wwa0P.js +1 -0
- package/dist/assets/resizable-COfX_iMb.js +1 -0
- package/dist/assets/restructuredtext-LmY6AGSd.js +1 -0
- package/dist/assets/ruby-BxBoU2eR.js +1 -0
- package/dist/assets/run-detail-B6QhqCjq.js +1 -0
- package/dist/assets/runs-DO4LkmoV.js +1 -0
- package/dist/assets/rust-D9N2vQ1K.js +1 -0
- package/dist/assets/sb-BLTMTQei.js +1 -0
- package/dist/assets/scala-Ctl2an6m.js +1 -0
- package/dist/assets/scheme-DWYXU9Gm.js +1 -0
- package/dist/assets/scroll-area-DfPMtFw0.js +1 -0
- package/dist/assets/scss-Fo6PaAQp.js +3 -0
- package/dist/assets/select-B5gV6YUf.js +1 -0
- package/dist/assets/shell-gQZQk28C.js +1 -0
- package/dist/assets/shortcut-hints-CfVf0REF.js +1 -0
- package/dist/assets/solidity-np-sz1ji.js +1 -0
- package/dist/assets/sophia-Cpc3f9d7.js +1 -0
- package/dist/assets/sparql-BM_09I__.js +1 -0
- package/dist/assets/split-button-C7J0EKrF.js +1 -0
- package/dist/assets/sql-wg3M4gQ8.js +1 -0
- package/dist/assets/square-CvSqzenY.js +1 -0
- package/dist/assets/st-CRbYFk1r.js +1 -0
- package/dist/assets/step-name-pills-COKv64-4.js +1 -0
- package/dist/assets/suite-editor-CaMQ5mWb.js +5 -0
- package/dist/assets/suite-navbar-CnJmeIp-.js +1 -0
- package/dist/assets/suite-viewer-HsI0Pn4t.js +1 -0
- package/dist/assets/suites-Cbjz7uPI.js +1 -0
- package/dist/assets/swift-B8HA7HL5.js +1 -0
- package/dist/assets/switch-BOdp7A9U.js +1 -0
- package/dist/assets/systemverilog-Dm-upaoS.js +1 -0
- package/dist/assets/tab-console-CLKFTABo.js +1 -0
- package/dist/assets/table-DL0PmHAE.js +1 -0
- package/dist/assets/tabs-CfNQIHt-.js +1 -0
- package/dist/assets/tcl-BroSe0zp.js +1 -0
- package/dist/assets/test-editor-CIRL6zSb.js +9 -0
- package/dist/assets/test-navbar-CZhYoxgB.js +7 -0
- package/dist/assets/test-viewer-C6Rg-HeW.js +1 -0
- package/dist/assets/tests-C0Xhq39F.js +1 -0
- package/dist/assets/tests-suites-table-widths-tlOYaS72.js +1 -0
- package/dist/assets/textarea-ByegDm2e.js +1 -0
- package/dist/assets/trash-2-CawFHfTJ.js +1 -0
- package/dist/assets/ts.worker-METxwbDZ.js +67719 -0
- package/dist/assets/tsMode-DGJI_hpV.js +11 -0
- package/dist/assets/twig-C-LV7gG6.js +1 -0
- package/dist/assets/typescript-BrDOgG8S.js +1 -0
- package/dist/assets/typespec-DxaoVH5m.js +1 -0
- package/dist/assets/use-hook-run-session-Cjqu9VED.js +1 -0
- package/dist/assets/use-keyboard-shortcuts-BRF3cm7O.js +1 -0
- package/dist/assets/use-page-title-CK82kWb2.js +1 -0
- package/dist/assets/use-run-status-favicon-DoJZcfHz.js +1 -0
- package/dist/assets/use-selection-queue-CZ4rXNAT.js +1 -0
- package/dist/assets/vb-qvhMNncD.js +1 -0
- package/dist/assets/viewer-url-state-CZTYs75z.js +1 -0
- package/dist/assets/wgsl-CZM87x1c.js +298 -0
- package/dist/assets/workers-BbHjH3Kx.js +1 -0
- package/dist/assets/xml-6YL6VXLw.js +1 -0
- package/dist/assets/yaml-sHG1-XNr.js +1 -0
- package/dist/assets/zap-C7OZlYXQ.js +1 -0
- package/dist/favicon.svg +3 -0
- package/dist/index.html +37 -0
- package/package.json +81 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={comments:{lineComment:`#`},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`'`,close:`'`},{open:`"`,close:`"`}],autoClosingPairs:[{open:`'`,close:`'`,notIn:[`string`,`comment`]},{open:`"`,close:`"`,notIn:[`comment`]},{open:`"""`,close:`"""`},{open:"`",close:"`",notIn:[`string`,`comment`]},{open:`(`,close:`)`},{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`<<`,close:`>>`}],indentationRules:{increaseIndentPattern:/^\s*(after|else|catch|rescue|fn|[^#]*(do|<\-|\->|\{|\[|\=))\s*$/,decreaseIndentPattern:/^\s*((\}|\])\s*$|(after|else|catch|rescue|end)\b)/}},t={defaultToken:`source`,tokenPostfix:`.elixir`,brackets:[{open:`[`,close:`]`,token:`delimiter.square`},{open:`(`,close:`)`,token:`delimiter.parenthesis`},{open:`{`,close:`}`,token:`delimiter.curly`},{open:`<<`,close:`>>`,token:`delimiter.angle.special`}],declarationKeywords:[`def`,`defp`,`defn`,`defnp`,`defguard`,`defguardp`,`defmacro`,`defmacrop`,`defdelegate`,`defcallback`,`defmacrocallback`,`defmodule`,`defprotocol`,`defexception`,`defimpl`,`defstruct`],operatorKeywords:[`and`,`in`,`not`,`or`,`when`],namespaceKeywords:[`alias`,`import`,`require`,`use`],otherKeywords:[`after`,`case`,`catch`,`cond`,`do`,`else`,`end`,`fn`,`for`,`if`,`quote`,`raise`,`receive`,`rescue`,`super`,`throw`,`try`,`unless`,`unquote_splicing`,`unquote`,`with`],constants:[`true`,`false`,`nil`],nameBuiltin:[`__MODULE__`,`__DIR__`,`__ENV__`,`__CALLER__`,`__STACKTRACE__`],operator:/-[->]?|!={0,2}|\*{1,2}|\/|\\\\|&{1,3}|\.\.?|\^(?:\^\^)?|\+\+?|<(?:-|<<|=|>|\|>|~>?)?|=~|={1,3}|>(?:=|>>)?|\|~>|\|>|\|{1,3}|~>>?|~~~|::/,variableName:/[a-z_][a-zA-Z0-9_]*[?!]?/,atomName:/[a-zA-Z_][a-zA-Z0-9_@]*[?!]?|@specialAtomName|@operator/,specialAtomName:/\.\.\.|<<>>|%\{\}|%|\{\}/,aliasPart:/[A-Z][a-zA-Z0-9_]*/,moduleName:/@aliasPart(?:\.@aliasPart)*/,sigilSymmetricDelimiter:/"""|'''|"|'|\/|\|/,sigilStartDelimiter:/@sigilSymmetricDelimiter|<|\{|\[|\(/,sigilEndDelimiter:/@sigilSymmetricDelimiter|>|\}|\]|\)/,sigilModifiers:/[a-zA-Z0-9]*/,decimal:/\d(?:_?\d)*/,hex:/[0-9a-fA-F](_?[0-9a-fA-F])*/,octal:/[0-7](_?[0-7])*/,binary:/[01](_?[01])*/,escape:/\\u[0-9a-fA-F]{4}|\\x[0-9a-fA-F]{2}|\\./,tokenizer:{root:[{include:`@whitespace`},{include:`@comments`},{include:`@keywordsShorthand`},{include:`@numbers`},{include:`@identifiers`},{include:`@strings`},{include:`@atoms`},{include:`@sigils`},{include:`@attributes`},{include:`@symbols`}],whitespace:[[/\s+/,`white`]],comments:[[/(#)(.*)/,[`comment.punctuation`,`comment`]]],keywordsShorthand:[[/(@atomName)(:)(\s+)/,[`constant`,`constant.punctuation`,`white`]],[/"(?=([^"]|#\{.*?\}|\\")*":)/,{token:`constant.delimiter`,next:`@doubleQuotedStringKeyword`}],[/'(?=([^']|#\{.*?\}|\\')*':)/,{token:`constant.delimiter`,next:`@singleQuotedStringKeyword`}]],doubleQuotedStringKeyword:[[/":/,{token:`constant.delimiter`,next:`@pop`}],{include:`@stringConstantContentInterpol`}],singleQuotedStringKeyword:[[/':/,{token:`constant.delimiter`,next:`@pop`}],{include:`@stringConstantContentInterpol`}],numbers:[[/0b@binary/,`number.binary`],[/0o@octal/,`number.octal`],[/0x@hex/,`number.hex`],[/@decimal\.@decimal([eE]-?@decimal)?/,`number.float`],[/@decimal/,`number`]],identifiers:[[/\b(defp?|defnp?|defmacrop?|defguardp?|defdelegate)(\s+)(@variableName)(?!\s+@operator)/,[`keyword.declaration`,`white`,{cases:{unquote:`keyword`,"@default":`function`}}]],[/(@variableName)(?=\s*\.?\s*\()/,{cases:{"@declarationKeywords":`keyword.declaration`,"@namespaceKeywords":`keyword`,"@otherKeywords":`keyword`,"@default":`function.call`}}],[/(@moduleName)(\s*)(\.)(\s*)(@variableName)/,[`type.identifier`,`white`,`operator`,`white`,`function.call`]],[/(:)(@atomName)(\s*)(\.)(\s*)(@variableName)/,[`constant.punctuation`,`constant`,`white`,`operator`,`white`,`function.call`]],[/(\|>)(\s*)(@variableName)/,[`operator`,`white`,{cases:{"@otherKeywords":`keyword`,"@default":`function.call`}}]],[/(&)(\s*)(@variableName)/,[`operator`,`white`,`function.call`]],[/@variableName/,{cases:{"@declarationKeywords":`keyword.declaration`,"@operatorKeywords":`keyword.operator`,"@namespaceKeywords":`keyword`,"@otherKeywords":`keyword`,"@constants":`constant.language`,"@nameBuiltin":`variable.language`,"_.*":`comment.unused`,"@default":`identifier`}}],[/@moduleName/,`type.identifier`]],strings:[[/"""/,{token:`string.delimiter`,next:`@doubleQuotedHeredoc`}],[/'''/,{token:`string.delimiter`,next:`@singleQuotedHeredoc`}],[/"/,{token:`string.delimiter`,next:`@doubleQuotedString`}],[/'/,{token:`string.delimiter`,next:`@singleQuotedString`}]],doubleQuotedHeredoc:[[/"""/,{token:`string.delimiter`,next:`@pop`}],{include:`@stringContentInterpol`}],singleQuotedHeredoc:[[/'''/,{token:`string.delimiter`,next:`@pop`}],{include:`@stringContentInterpol`}],doubleQuotedString:[[/"/,{token:`string.delimiter`,next:`@pop`}],{include:`@stringContentInterpol`}],singleQuotedString:[[/'/,{token:`string.delimiter`,next:`@pop`}],{include:`@stringContentInterpol`}],atoms:[[/(:)(@atomName)/,[`constant.punctuation`,`constant`]],[/:"/,{token:`constant.delimiter`,next:`@doubleQuotedStringAtom`}],[/:'/,{token:`constant.delimiter`,next:`@singleQuotedStringAtom`}]],doubleQuotedStringAtom:[[/"/,{token:`constant.delimiter`,next:`@pop`}],{include:`@stringConstantContentInterpol`}],singleQuotedStringAtom:[[/'/,{token:`constant.delimiter`,next:`@pop`}],{include:`@stringConstantContentInterpol`}],sigils:[[/~[a-z]@sigilStartDelimiter/,{token:`@rematch`,next:`@sigil.interpol`}],[/~([A-Z]+)@sigilStartDelimiter/,{token:`@rematch`,next:`@sigil.noInterpol`}]],sigil:[[/~([a-z]|[A-Z]+)\{/,{token:`@rematch`,switchTo:`@sigilStart.$S2.$1.{.}`}],[/~([a-z]|[A-Z]+)\[/,{token:`@rematch`,switchTo:`@sigilStart.$S2.$1.[.]`}],[/~([a-z]|[A-Z]+)\(/,{token:`@rematch`,switchTo:`@sigilStart.$S2.$1.(.)`}],[/~([a-z]|[A-Z]+)\</,{token:`@rematch`,switchTo:`@sigilStart.$S2.$1.<.>`}],[/~([a-z]|[A-Z]+)(@sigilSymmetricDelimiter)/,{token:`@rematch`,switchTo:`@sigilStart.$S2.$1.$2.$2`}]],"sigilStart.interpol.s":[[/~s@sigilStartDelimiter/,{token:`string.delimiter`,switchTo:`@sigilContinue.$S2.$S3.$S4.$S5`}]],"sigilContinue.interpol.s":[[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:`string.delimiter`,next:`@pop`},"@default":`string`}}],{include:`@stringContentInterpol`}],"sigilStart.noInterpol.S":[[/~S@sigilStartDelimiter/,{token:`string.delimiter`,switchTo:`@sigilContinue.$S2.$S3.$S4.$S5`}]],"sigilContinue.noInterpol.S":[[/(^|[^\\])\\@sigilEndDelimiter/,`string`],[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:`string.delimiter`,next:`@pop`},"@default":`string`}}],{include:`@stringContent`}],"sigilStart.interpol.r":[[/~r@sigilStartDelimiter/,{token:`regexp.delimiter`,switchTo:`@sigilContinue.$S2.$S3.$S4.$S5`}]],"sigilContinue.interpol.r":[[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:`regexp.delimiter`,next:`@pop`},"@default":`regexp`}}],{include:`@regexpContentInterpol`}],"sigilStart.noInterpol.R":[[/~R@sigilStartDelimiter/,{token:`regexp.delimiter`,switchTo:`@sigilContinue.$S2.$S3.$S4.$S5`}]],"sigilContinue.noInterpol.R":[[/(^|[^\\])\\@sigilEndDelimiter/,`regexp`],[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:`regexp.delimiter`,next:`@pop`},"@default":`regexp`}}],{include:`@regexpContent`}],"sigilStart.interpol":[[/~([a-z]|[A-Z]+)@sigilStartDelimiter/,{token:`sigil.delimiter`,switchTo:`@sigilContinue.$S2.$S3.$S4.$S5`}]],"sigilContinue.interpol":[[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:`sigil.delimiter`,next:`@pop`},"@default":`sigil`}}],{include:`@sigilContentInterpol`}],"sigilStart.noInterpol":[[/~([a-z]|[A-Z]+)@sigilStartDelimiter/,{token:`sigil.delimiter`,switchTo:`@sigilContinue.$S2.$S3.$S4.$S5`}]],"sigilContinue.noInterpol":[[/(^|[^\\])\\@sigilEndDelimiter/,`sigil`],[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:`sigil.delimiter`,next:`@pop`},"@default":`sigil`}}],{include:`@sigilContent`}],attributes:[[/\@(module|type)?doc (~[sS])?"""/,{token:`comment.block.documentation`,next:`@doubleQuotedHeredocDocstring`}],[/\@(module|type)?doc (~[sS])?'''/,{token:`comment.block.documentation`,next:`@singleQuotedHeredocDocstring`}],[/\@(module|type)?doc (~[sS])?"/,{token:`comment.block.documentation`,next:`@doubleQuotedStringDocstring`}],[/\@(module|type)?doc (~[sS])?'/,{token:`comment.block.documentation`,next:`@singleQuotedStringDocstring`}],[/\@(module|type)?doc false/,`comment.block.documentation`],[/\@(@variableName)/,`variable`]],doubleQuotedHeredocDocstring:[[/"""/,{token:`comment.block.documentation`,next:`@pop`}],{include:`@docstringContent`}],singleQuotedHeredocDocstring:[[/'''/,{token:`comment.block.documentation`,next:`@pop`}],{include:`@docstringContent`}],doubleQuotedStringDocstring:[[/"/,{token:`comment.block.documentation`,next:`@pop`}],{include:`@docstringContent`}],singleQuotedStringDocstring:[[/'/,{token:`comment.block.documentation`,next:`@pop`}],{include:`@docstringContent`}],symbols:[[/\?(\\.|[^\\\s])/,`number.constant`],[/&\d+/,`operator`],[/<<<|>>>/,`operator`],[/[()\[\]\{\}]|<<|>>/,`@brackets`],[/\.\.\./,`identifier`],[/=>/,`punctuation`],[/@operator/,`operator`],[/[:;,.%]/,`punctuation`]],stringContentInterpol:[{include:`@interpolation`},{include:`@escapeChar`},{include:`@stringContent`}],stringContent:[[/./,`string`]],stringConstantContentInterpol:[{include:`@interpolation`},{include:`@escapeChar`},{include:`@stringConstantContent`}],stringConstantContent:[[/./,`constant`]],regexpContentInterpol:[{include:`@interpolation`},{include:`@escapeChar`},{include:`@regexpContent`}],regexpContent:[[/(\s)(#)(\s.*)$/,[`white`,`comment.punctuation`,`comment`]],[/./,`regexp`]],sigilContentInterpol:[{include:`@interpolation`},{include:`@escapeChar`},{include:`@sigilContent`}],sigilContent:[[/./,`sigil`]],docstringContent:[[/./,`comment.block.documentation`]],escapeChar:[[/@escape/,`constant.character.escape`]],interpolation:[[/#{/,{token:`delimiter.bracket.embed`,next:`@interpolationContinue`}]],interpolationContinue:[[/}/,{token:`delimiter.bracket.embed`,next:`@pop`}],{include:`@root`}]}};export{e as conf,t as language};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ht as e,Zn as t}from"./index-B3xPCIyH.js";var n=t();function r({icon:t,title:r,description:i,actionLabel:a,onAction:o}){return(0,n.jsxs)(`div`,{className:`flex flex-col items-center justify-center min-h-[50vh] p-8`,children:[(0,n.jsx)(`div`,{className:`rounded-full bg-muted p-4 mb-4`,children:(0,n.jsx)(t,{className:`h-8 w-8 text-muted-foreground`})}),(0,n.jsx)(`h3`,{className:`text-lg font-semibold mb-1`,children:r}),(0,n.jsx)(`p`,{className:`text-muted-foreground text-center mb-6 max-w-sm`,children:i}),a&&o&&(0,n.jsx)(e,{onClick:o,children:a})]})}export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{qn as e}from"./index-B3xPCIyH.js";var t=e(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{qn as e}from"./index-B3xPCIyH.js";var t=e(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{qn as e}from"./index-B3xPCIyH.js";var t=e(`file-code`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{qn as e}from"./index-B3xPCIyH.js";var t=e(`file-search`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`11.5`,cy:`14.5`,r:`2.5`,key:`1bq0ko`}],[`path`,{d:`M13.3 16.3 15 18`,key:`2quom7`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./chunk-CilyBKbf.js";import{d as t,f as n,i as r,n as i,o as a,r as o,t as s,u as c}from"./tab-console-CLKFTABo.js";import{i as ee,n as l,o as u,s as d,t as te,u as ne}from"./select-B5gV6YUf.js";import{C as f,c as re,i as p,n as m,r as h,w as g}from"./id-badge-Dzm7eQ9l.js";import{r as ie}from"./monaco-editor-CDJrOpKK.js";import{t as _}from"./circle-x-DLBotPS8.js";import{t as ae}from"./copy-Gj5_oF-8.js";import{t as v}from"./eye-CZ7GiZXJ.js";import{t as oe}from"./file-search-CIA16Vb8.js";import{c as se}from"./split-button-C7J0EKrF.js";import{t as y}from"./refresh-cw-v_0wwa0P.js";import{t as ce}from"./square-CvSqzenY.js";import{a as b}from"./dist-DFSjTjXY.js";import{t as x}from"./scroll-area-DfPMtFw0.js";import{t as S}from"./switch-BOdp7A9U.js";import{i as C,n as le,r as ue,t as de}from"./tabs-CfNQIHt-.js";import{$n as w,Bt as T,Hn as E,Ht as D,Kt as fe,Ln as pe,Mn as me,Nn as O,Pn as k,Rn as he,U as ge,Un as _e,Ut as A,V as j,Vt as M,Wn as N,Zn as P,ar as ve,er as ye,fr as F,qn as be,yt as xe,z as I}from"./index-B3xPCIyH.js";import{t as L}from"./badge-BbhOGRC0.js";import{n as Se,r as Ce,t as we}from"./resizable-COfX_iMb.js";import{t as R}from"./empty-state-Dluv5C1Q.js";import{t as z}from"./display-step-CV3zilMS.js";var B=be(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Te=be(`wifi-off`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),V=e(F(),1);function H(e){function t(e){if(h(e)){e.flow=!1;for(let n of e.items)t(n.value)}if(p(e)){e.flow=!1;for(let n of e.items)t(n)}}t(e.contents)}function Ee(e){function t(e){return h(e)?(e.items=e.items.filter(e=>!t(e.value)),e.items.length===0):!1}t(e.contents)}var De=[`name`,`test-id`,`target`,`use`,`meta`,`context`,`steps`];function Oe(e){function t(e,n){if(h(e)){n?e.items.sort((e,t)=>{let n=De.indexOf(String(e.key)),r=De.indexOf(String(t.key));return(n===-1?De.length:n)-(r===-1?De.length:r)}):e.items.sort((e,t)=>String(e.key).localeCompare(String(t.key)));for(let n of e.items)t(n.value,!1)}}t(e.contents,!0)}function ke(e){return Ee(e),H(e),Oe(e),e.toString()}function Ae(e){let t=(0,V.useRef)(null),{doc:n,error:r}=(0,V.useMemo)(()=>{if(!e)return{doc:null,error:null};try{let n=m(e);return t.current=n,{doc:n,error:null}}catch(e){return{doc:t.current,error:e instanceof Error?e.message:`Invalid YAML`}}},[e]);return{doc:n,error:r,getIn:(0,V.useCallback)(e=>{if(n)return n.getIn(e)},[n]),setIn:(0,V.useCallback)((t,n)=>{let r=m(e);return r.setIn(t,n),ke(r)},[e]),deleteIn:(0,V.useCallback)(t=>{let n=m(e);return n.deleteIn(t),ke(n)},[e])}}var U=P(),je=[{value:`chromium`,label:`Chromium`},{value:`firefox`,label:`Firefox`},{value:`webkit`,label:`WebKit`}];function W(e){return e==null?``:`${e} (inherited)`}function Me(e){return e===!0?`(inherited: on)`:e===!1?`(inherited: off)`:`(inherited)`}function G(e){return e===`preserve`?`Preserve app data (inherited)`:e===`reset`?`Reset app data (inherited)`:`Select app state`}function Ne({content:e,onChange:t,selectedTarget:n,showMeta:r=!0}){let{getIn:i,setIn:a,deleteIn:o}=Ae(e);function s(e,n){t(n===``||n==null?o(e):a(e,n))}function c(e,n,r){t(n===(r??!1)?o(e):a(e,n))}let{targets:ne,globalUse:f}=re(),p=n?ne[n]?.platform:void 0,m=p===`android`||p===`ios`,h=i([`use`,`browser`,`name`]),g=i([`use`,`browser`,`headless`]),ie=i([`use`,`browser`,`viewport`,`width`]),_=i([`use`,`browser`,`viewport`,`height`]),ae=i([`use`,`timeout`,`step`]),v=i([`use`,`timeout`,`test`]),oe=i([`use`,`timeout`,`navigation`]),se=i([`use`,`healing`,`maxAttempts`]),y=i([`use`,`planner`,`maxSubActions`]),ce=i([`use`,`planner`,`previousStepCount`]),x=i([`use`,`logCapture`,`console`]),C=i([`use`,`logCapture`,`network`]),le=i([`use`,`llm`]),ue=i([`use`,`parallel`]),de=i([`use`,`device`]),w=i([`use`,`mobile`,`appState`]),E=i([`meta`,`retries`]),D=i([`meta`,`record`]),fe=f?.browser?.headless,pe=f?.logCapture?.console,me=f?.logCapture?.network,O=f?.parallel,k=f?.mobile?.appState,he=r?`Select a device for this mobile test.`:`Select a device for this mobile suite.`;function ge(e){t(e===k?o([`use`,`mobile`,`appState`]):a([`use`,`mobile`,`appState`],e))}return(0,U.jsxs)(`div`,{className:`space-y-3`,children:[m?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`space-y-1 opacity-50`,children:[(0,U.jsx)(`span`,{className:`text-sm font-semibold text-foreground tracking-tight`,children:`Browser`}),(0,U.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:`Not applicable to mobile targets`})]}),(0,U.jsx)(T,{})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`span`,{className:`text-sm font-semibold text-foreground tracking-tight`,children:`Browser`}),(0,U.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,U.jsx)(b,{className:`text-[11px] text-muted-foreground`,children:`Engine`}),(0,U.jsxs)(te,{value:h??``,onValueChange:e=>s([`use`,`browser`,`name`],e||void 0),children:[(0,U.jsx)(u,{className:`w-full h-7 text-xs`,children:(0,U.jsx)(d,{placeholder:W(f?.browser?.name??`chromium`)})}),(0,U.jsx)(l,{children:je.map(e=>(0,U.jsx)(ee,{value:e.value,children:e.label},e.value))})]})]}),(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsxs)(b,{className:`text-[11px] text-muted-foreground`,children:[`Headless `,g===void 0&&(0,U.jsx)(`span`,{className:`text-muted-foreground/50`,children:Me(fe)})]}),(0,U.jsx)(S,{checked:g??fe??!0,onCheckedChange:e=>c([`use`,`browser`,`headless`],e,fe)})]}),(0,U.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,U.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,U.jsx)(b,{className:`text-[11px] text-muted-foreground`,children:`Viewport W`}),(0,U.jsx)(M,{type:`number`,value:ie??``,onChange:e=>s([`use`,`browser`,`viewport`,`width`],e.target.value?Number(e.target.value):void 0),placeholder:W(f?.browser?.viewport?.width??1280),className:`h-7 text-xs`})]}),(0,U.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,U.jsx)(b,{className:`text-[11px] text-muted-foreground`,children:`Viewport H`}),(0,U.jsx)(M,{type:`number`,value:_??``,onChange:e=>s([`use`,`browser`,`viewport`,`height`],e.target.value?Number(e.target.value):void 0),placeholder:W(f?.browser?.viewport?.height??720),className:`h-7 text-xs`})]})]})]}),(0,U.jsx)(T,{})]}),m?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`span`,{className:`text-sm font-semibold text-foreground tracking-tight`,children:`Mobile`}),(0,U.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,U.jsx)(b,{className:`text-[11px] text-muted-foreground`,children:`Device`}),(0,U.jsx)(M,{value:de??``,onChange:e=>s([`use`,`device`],e.target.value||void 0),placeholder:he,className:`h-7 text-xs`})]}),(0,U.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,U.jsx)(b,{className:`text-[11px] text-muted-foreground`,children:`App state`}),(0,U.jsxs)(te,{value:w??``,onValueChange:e=>ge(e),children:[(0,U.jsx)(u,{className:`w-full h-7 text-xs`,children:(0,U.jsx)(d,{placeholder:G(k)})}),(0,U.jsxs)(l,{children:[(0,U.jsx)(ee,{value:`preserve`,children:`Preserve app data`}),(0,U.jsx)(ee,{value:`reset`,children:`Reset app data`})]})]})]})]}),(0,U.jsx)(T,{})]}):null,(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`span`,{className:`text-sm font-semibold text-foreground tracking-tight`,children:`Timeouts`}),(0,U.jsxs)(`div`,{className:`grid grid-cols-3 gap-2`,children:[(0,U.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,U.jsx)(b,{className:`text-[11px] text-muted-foreground`,children:`Step`}),(0,U.jsx)(M,{value:ae??``,onChange:e=>s([`use`,`timeout`,`step`],e.target.value||void 0),placeholder:W(f?.timeout?.step??`30s`),className:`h-7 text-xs`})]}),(0,U.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,U.jsx)(b,{className:`text-[11px] text-muted-foreground`,children:`Test`}),(0,U.jsx)(M,{value:v??``,onChange:e=>s([`use`,`timeout`,`test`],e.target.value||void 0),placeholder:W(f?.timeout?.test??`5m`),className:`h-7 text-xs`})]}),(0,U.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,U.jsx)(b,{className:`text-[11px] text-muted-foreground`,children:`Navigation`}),(0,U.jsx)(M,{value:oe??``,onChange:e=>s([`use`,`timeout`,`navigation`],e.target.value||void 0),placeholder:W(f?.timeout?.navigation??`15s`),className:`h-7 text-xs`})]})]})]}),(0,U.jsx)(T,{}),(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`span`,{className:`text-sm font-semibold text-foreground tracking-tight`,children:`Agent`}),(0,U.jsxs)(`div`,{className:`grid grid-cols-3 gap-2`,children:[(0,U.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,U.jsx)(b,{className:`text-[11px] text-muted-foreground`,children:`Heal Attempts`}),(0,U.jsx)(M,{type:`number`,min:0,value:se??``,onChange:e=>s([`use`,`healing`,`maxAttempts`],e.target.value?Number(e.target.value):void 0),placeholder:W(f?.healing?.maxAttempts??3),className:`h-7 text-xs`})]}),(0,U.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,U.jsx)(b,{className:`text-[11px] text-muted-foreground`,children:`Sub-Actions`}),(0,U.jsx)(M,{type:`number`,min:1,value:y??``,onChange:e=>s([`use`,`planner`,`maxSubActions`],e.target.value?Number(e.target.value):void 0),placeholder:W(f?.planner?.maxSubActions??5),className:`h-7 text-xs`})]}),(0,U.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,U.jsx)(b,{className:`text-[11px] text-muted-foreground`,children:`Prev Steps`}),(0,U.jsx)(M,{type:`number`,min:0,value:ce??``,onChange:e=>s([`use`,`planner`,`previousStepCount`],e.target.value?Number(e.target.value):void 0),placeholder:W(f?.planner?.previousStepCount??3),className:`h-7 text-xs`})]})]})]}),(0,U.jsx)(T,{}),(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`span`,{className:`text-sm font-semibold text-foreground tracking-tight`,children:`Log Capture`}),(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsxs)(b,{className:`text-[11px] text-muted-foreground`,children:[`Console `,x===void 0&&(0,U.jsx)(`span`,{className:`text-muted-foreground/50`,children:Me(pe)})]}),(0,U.jsx)(S,{checked:x??pe??!1,onCheckedChange:e=>c([`use`,`logCapture`,`console`],e,pe)})]}),(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsxs)(b,{className:`text-[11px] text-muted-foreground`,children:[`Network `,C===void 0&&(0,U.jsx)(`span`,{className:`text-muted-foreground/50`,children:Me(me)})]}),(0,U.jsx)(S,{checked:C??me??!1,onCheckedChange:e=>c([`use`,`logCapture`,`network`],e,me)})]})]}),(0,U.jsx)(T,{}),(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`span`,{className:`text-sm font-semibold text-foreground tracking-tight`,children:`LLM`}),(0,U.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,U.jsx)(b,{className:`text-[11px] text-muted-foreground`,children:`LLM Config`}),(0,U.jsx)(M,{value:le??``,onChange:e=>s([`use`,`llm`],e.target.value||void 0),placeholder:W(f?.llm??`default`),className:`h-7 text-xs`})]})]}),(0,U.jsx)(T,{}),(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`span`,{className:`text-sm font-semibold text-foreground tracking-tight`,children:`Execution`}),(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsxs)(b,{className:`text-[11px] text-muted-foreground`,children:[`Parallel `,ue===void 0&&(0,U.jsx)(`span`,{className:`text-muted-foreground/50`,children:Me(O)})]}),(0,U.jsx)(S,{checked:ue??O??!1,onCheckedChange:e=>c([`use`,`parallel`],e,O)})]}),r&&(0,U.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,U.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,U.jsx)(b,{className:`text-[11px] text-muted-foreground`,children:`Retries`}),(0,U.jsx)(M,{type:`number`,min:0,value:E??``,onChange:e=>s([`meta`,`retries`],e.target.value?Number(e.target.value):void 0),placeholder:`0 (inherited)`,className:`h-7 text-xs`})]}),(0,U.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,U.jsxs)(b,{className:`text-[11px] text-muted-foreground`,children:[`Record `,D===void 0&&(0,U.jsx)(`span`,{className:`text-muted-foreground/50`,children:`(inherited: off)`})]}),(0,U.jsx)(`div`,{className:`flex items-center h-7`,children:(0,U.jsx)(S,{checked:D??!1,onCheckedChange:e=>c([`meta`,`record`],e,!1)})})]})]})]})]})}function Pe({runId:e,onClose:n}){let[r,i]=(0,V.useState)([]),[a,o]=(0,V.useState)(`connecting`),[s,c]=(0,V.useState)(),[ee,l]=(0,V.useState)(0),u=(0,V.useRef)(null);if((0,V.useEffect)(()=>{if(!e)return;let t=!1;i([]),o(`connecting`),c(void 0),l(0);let n=Date.now();u.current=setInterval(()=>{t||l(Date.now()-n)},200);let r=xe(e,{onRunStart:()=>{t||o(`running`)},onStepStart:e=>{t||(o(`running`),i(t=>[...t,{name:e.stepName,status:`running`}]))},onStepComplete:e=>{t||i(t=>{let n=!1;return t.map(t=>n||t.name!==e.stepName||t.status!==`running`?t:(n=!0,{...t,status:ve(e.status),duration:e.duration,error:e.error??void 0}))})},onRunComplete:e=>{if(t)return;let n=ye(e.status);c(n.normalized),o(n.normalized===`passed`?`complete`:`error`),i(t=>t.map(t=>t.status===`running`?{...t,status:w(e.status)}:t)),u.current&&clearInterval(u.current)},onRunError:e=>{t||(o(`error`),i(t=>[...t,{name:`Run Error`,status:`failed`,error:e.error}]),u.current&&clearInterval(u.current))}});return()=>{t=!0,u.current&&clearInterval(u.current),r.close()}},[e]),!e)return null;let d=s?ye(s):null,te=a===`connecting`?`Connecting...`:a===`running`?`Running`:d?.label??(a===`complete`?`Passed`:`Failed`);return(0,U.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-3 border-b border-border`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[a===`running`||a===`connecting`?(0,U.jsx)(g,{className:`size-4 text-primary`}):d?.normalized===`passed`||a===`complete`?(0,U.jsx)(E,{className:`size-4 text-emerald-500`}):d?.normalized===`cancelled`?(0,U.jsx)(ce,{className:`size-4 text-muted-foreground`}):d?.normalized===`flaky`||d?.normalized===`healed`?(0,U.jsx)(y,{className:`size-4 text-amber-500`}):(0,U.jsx)(_,{className:`size-4 text-red-500`}),(0,U.jsx)(`span`,{className:`text-sm font-medium`,children:te}),(a===`running`||a===`connecting`)&&(0,U.jsxs)(L,{variant:`outline`,className:`text-xs gap-1`,children:[(0,U.jsx)(t,{className:`size-3`}),fe(ee)]})]}),(0,U.jsx)(D,{variant:`ghost`,size:`icon-xs`,onClick:n,children:(0,U.jsx)(me,{className:`size-3.5`})})]}),(0,U.jsx)(x,{className:`flex-1 [&>[data-slot=scroll-area-viewport]>div]:!block`,children:(0,U.jsxs)(`div`,{className:`p-3 space-y-1.5`,children:[r.map((e,t)=>(0,U.jsxs)(`div`,{className:A(`relative overflow-hidden flex items-start gap-2 rounded-md border px-3 py-2 text-sm`,e.status===`running`&&`live-running-surface border-border/60 bg-primary/5`,e.status===`passed`&&`border-emerald-500/20 bg-emerald-500/5`,e.status===`failed`&&`border-destructive/20 bg-destructive/5`,e.status===`cancelled`&&`border-border/60 bg-muted/30`,e.status===`flaky`&&`border-amber-500/20 bg-amber-500/5`,e.status!==`running`&&e.status!==`passed`&&e.status!==`failed`&&e.status!==`cancelled`&&e.status!==`flaky`&&`border-border/60 bg-card/40`),children:[e.status===`running`?(0,U.jsx)(g,{className:`size-3.5 mt-0.5 shrink-0 text-primary`}):e.status===`passed`||e.status===`completed`?(0,U.jsx)(E,{className:`size-3.5 mt-0.5 text-emerald-500 shrink-0`}):e.status===`cancelled`?(0,U.jsx)(ce,{className:`size-3.5 mt-0.5 text-muted-foreground shrink-0`}):e.status===`flaky`?(0,U.jsx)(y,{className:`size-3.5 mt-0.5 text-amber-500 shrink-0`}):(0,U.jsx)(_,{className:`size-3.5 mt-0.5 text-red-500 shrink-0`}),(0,U.jsx)(`span`,{className:`flex-1 min-w-0 break-words`,children:e.name}),e.duration!==void 0&&(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground shrink-0`,children:fe(e.duration)})]},`${e.name}-${t}`)),r.length===0&&a===`connecting`&&(0,U.jsx)(`div`,{className:`text-sm text-muted-foreground text-center py-8`,children:`Waiting for events...`})]})})]})}function Fe({ariaTree:e,onRefresh:t,isExecuting:n}){return e?(0,U.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,U.jsx)(`div`,{className:`flex items-center justify-end px-3 py-1 border-b border-border/50`,children:t&&(0,U.jsxs)(`button`,{type:`button`,onClick:t,disabled:n,className:`flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors disabled:opacity-50`,"aria-label":`Refresh ARIA tree`,children:[(0,U.jsx)(y,{className:`size-3`}),`Refresh`]})}),(0,U.jsx)(x,{className:`flex-1`,children:(0,U.jsx)(`pre`,{className:`font-mono text-xs p-3 whitespace-pre-wrap`,children:e})})]}):(0,U.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-2 text-sm text-muted-foreground`,children:[(0,U.jsx)(`span`,{children:`Run a step or click Fetch to capture the accessibility tree`}),t&&(0,U.jsxs)(`button`,{type:`button`,onClick:t,disabled:n,className:`flex items-center gap-1.5 text-xs px-2.5 py-1 rounded border border-border hover:bg-muted transition-colors disabled:opacity-50`,children:[(0,U.jsx)(y,{className:`size-3`}),`Fetch`]})]})}function K(e){let t=[];return e.observation&&t.push({key:`observation`,label:`Observation`,icon:v,content:e.observation,duration:e.phaseDurations?.observe??null}),e.reasoning&&t.push({key:`reasoning`,label:`Reasoning`,icon:n,content:e.reasoning,duration:e.phaseDurations?.plan??null}),e.plannedAction!=null&&t.push({key:`plannedAction`,label:`Planned Action`,icon:pe,content:null,duration:e.phaseDurations?.execute??null,children:(0,U.jsx)(`pre`,{className:`max-w-full min-w-0 text-[10px] font-mono bg-muted/30 rounded-sm p-2 overflow-x-auto whitespace-pre-wrap break-words`,children:typeof e.plannedAction==`string`?e.plannedAction:JSON.stringify(e.plannedAction,null,2)})}),e.verifierReasoning&&t.push({key:`verifier`,label:`Verifier`,icon:c,content:e.verifierReasoning,duration:e.phaseDurations?.verify??null}),t}function Ie(e){let t=[];return e.observation&&t.push({key:`observation`,label:`Observation`,icon:v,content:e.observation,duration:null}),e.reasoning&&t.push({key:`reasoning`,label:`Reasoning`,icon:n,content:e.reasoning,duration:null}),e.plannedAction!=null&&t.push({key:`plannedAction`,label:`Planned Action`,icon:pe,content:null,duration:null,children:(0,U.jsx)(`pre`,{className:`max-w-full min-w-0 text-[10px] font-mono bg-muted/30 rounded-sm p-2 overflow-x-auto whitespace-pre-wrap break-words`,children:typeof e.plannedAction==`string`?e.plannedAction:JSON.stringify(e.plannedAction,null,2)})}),t}function Le({step:e,subAction:t}){if(t){let e=K(t);return(0,U.jsxs)(`div`,{className:`p-3 space-y-3 min-w-0`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,U.jsxs)(`span`,{className:`font-medium`,children:[`Sub-action #`,t.index+1]}),(0,U.jsx)(`span`,{className:`text-xs font-medium ${t.result===`success`?`text-emerald-500`:`text-red-500`}`,children:t.result}),t.confidence!=null&&(0,U.jsx)(a,{confidence:t.confidence})]}),(0,U.jsx)(r,{mode:`static`,sections:e}),t.error&&(0,U.jsx)(`div`,{className:`bg-destructive/10 text-destructive rounded-sm p-2 text-xs break-words [overflow-wrap:anywhere]`,children:t.error})]})}let n=Ie(e);return(0,U.jsxs)(`div`,{className:`p-3 space-y-3 min-w-0`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,U.jsxs)(`span`,{className:`font-medium`,children:[`Step #`,e.stepOrder+1]}),e.confidence!=null&&(0,U.jsx)(a,{confidence:e.confidence})]}),n.length>0?(0,U.jsx)(r,{mode:`static`,sections:n}):(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No reasoning data yet.`}),e.error&&(0,U.jsx)(`div`,{className:`bg-destructive/10 text-destructive rounded-sm p-2 text-xs break-words [overflow-wrap:anywhere]`,children:e.error})]})}function Re({screenshot:e,connectionState:t,onReconnect:n}){return(0,U.jsx)(`div`,{className:`relative flex h-full w-full items-center justify-center overflow-hidden bg-background`,children:e?(0,U.jsx)(`img`,{src:e,alt:`Browser preview`,className:`max-w-full max-h-full object-contain`}):t===`connecting`||t===`connected`&&!e?(0,U.jsxs)(`div`,{className:`flex flex-col items-center gap-3 text-muted-foreground`,children:[(0,U.jsx)(he,{className:`h-6 w-6 animate-spin`}),(0,U.jsx)(`span`,{className:`text-sm`,children:`Connecting to browser...`})]}):t===`disconnected`||t===`error`?(0,U.jsxs)(`div`,{className:`flex flex-col items-center gap-3 text-muted-foreground`,children:[(0,U.jsx)(Te,{className:`h-6 w-6`}),(0,U.jsx)(`span`,{className:`text-sm`,children:`Browser disconnected`}),n&&(0,U.jsx)(D,{variant:`outline`,size:`sm`,onClick:n,children:`Reconnect`})]}):null})}var ze={idle:{label:`Ready`,tone:`bg-muted-foreground/35`},connecting:{label:`Connecting`,tone:`bg-primary animate-pulse`},connected:{label:`Connected`,tone:`bg-emerald-500`},executing:{label:`Executing`,tone:`bg-primary animate-pulse`},disconnected:{label:`Disconnected`,tone:`bg-amber-500`},error:{label:`Error`,tone:`bg-destructive`}};function Be(e){switch(e){case`invalid`:return{label:`Draft invalid`,className:`border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400`};case`saved`:return{label:`Saved draft`,className:`border-border/70 bg-background text-muted-foreground`};default:return{label:`Using unsaved draft`,className:`border-primary/25 bg-primary/10 text-primary`}}}function Ve(e,t){let n=e.trim();if(!n)return``;if(/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n))return n;if(n.startsWith(`/`))try{return new URL(n,t??`https://example.com`).toString()}catch{return n}return/^[\w.-]+(?::\d+)?(?:[/?#]|$)/.test(n)?`https://${n}`:n}function He({hook:e}){return e.status===`passed`?(0,U.jsxs)(L,{className:`border-emerald-500/20 bg-emerald-500/15 text-emerald-500`,children:[(0,U.jsx)(E,{className:`size-3`}),`Passed`]}):e.status===`failed`?(0,U.jsxs)(L,{variant:`destructive`,children:[(0,U.jsx)(k,{className:`size-3`}),`Failed`]}):e.status===`running`?(0,U.jsxs)(L,{className:`border-primary/20 bg-primary/15 text-primary`,children:[(0,U.jsx)(he,{className:`size-3 animate-spin`}),`Running`]}):(0,U.jsx)(L,{variant:`outline`,children:`Pending`})}function Ue({hook:e}){return!e.variables||Object.keys(e.variables).length===0?(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:`This hook did not emit any variables`}):(0,U.jsx)(`div`,{className:`space-y-2 p-4`,children:Object.entries(e.variables).map(([e,t])=>(0,U.jsxs)(`div`,{className:`rounded-md border bg-background/80 px-3 py-2`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-medium uppercase tracking-wide text-muted-foreground`,children:e}),(0,U.jsx)(`pre`,{className:`mt-1 whitespace-pre-wrap break-all font-mono text-xs`,children:t})]},e))})}function We({hook:e}){return(0,U.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(O,{className:`size-4 text-muted-foreground`}),(0,U.jsx)(`span`,{className:`text-sm font-medium`,children:e.name})]}),(0,U.jsx)(L,{variant:`outline`,className:`font-mono text-[10px]`,children:e.id}),(0,U.jsx)(L,{variant:`outline`,className:`text-[10px] uppercase tracking-wide`,children:e.phase}),(0,U.jsx)(He,{hook:e}),e.duration!=null&&(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.duration<1e3?`${e.duration}ms`:`${(e.duration/1e3).toFixed(1)}s`})]}),e.error&&(0,U.jsx)(`div`,{className:`min-w-0 max-w-full rounded-md border border-destructive/25 bg-destructive/10 px-3 py-2 text-sm text-destructive [overflow-wrap:anywhere]`,children:e.error}),e.stdout&&(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:`stdout`}),(0,U.jsx)(`pre`,{className:`rounded-md border bg-background/80 p-3 text-xs whitespace-pre-wrap break-all`,children:e.stdout})]}),e.stderr&&(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:`stderr`}),(0,U.jsx)(`pre`,{className:`rounded-md border border-destructive/20 bg-destructive/5 p-3 text-xs whitespace-pre-wrap break-all text-destructive`,children:e.stderr})]}),e.variables&&Object.keys(e.variables).length>0&&(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:`Emitted Variables`}),(0,U.jsx)(Ue,{hook:e})]}),!e.stdout&&!e.stderr&&(!e.variables||Object.keys(e.variables).length===0)&&!e.error&&(0,U.jsx)(R,{icon:O,title:`No hook output yet`,description:`Connect a live session, run a teardown hook, or end the current session to capture hook output.`})]})}function Ge(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n.status!==`idle`||n.phases.length>0||n.executionHistory.length>0||n.consoleLogs.length>0||n.networkLogs.length>0)return n}return null}function Ke(e){switch(e){case`running`:return`border-primary/20 bg-primary/10 text-primary`;case`passed`:return`border-emerald-500/20 bg-emerald-500/10 text-emerald-500`;case`failed`:return`border-destructive/20 bg-destructive/10 text-destructive`;case`cancelled`:return`border-amber-500/20 bg-amber-500/10 text-amber-600 dark:text-amber-400`;default:return`border-border/70 bg-background text-muted-foreground`}}function qe(e){switch(e){case`running`:return`border-primary/20 bg-primary/10 text-primary`;case`passed`:case`healed`:case`flaky`:return`border-emerald-500/20 bg-emerald-500/10 text-emerald-500`;case`failed`:case`cancelled`:case`skipped`:return`border-destructive/20 bg-destructive/10 text-destructive`;default:return`border-border/70 bg-background text-muted-foreground`}}function Je({test:e,selectedStep:t,subAction:n}){let r=e.liveSteps.map(e=>z(e,e.stepIndex));return(0,U.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`div`,{className:`text-sm font-medium`,children:e.name}),(0,U.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e.path})]}),(0,U.jsx)(L,{variant:`outline`,className:A(`text-[10px] uppercase tracking-wide`,Ke(e.status)),children:e.status}),typeof e.duration==`number`&&(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.duration<1e3?`${e.duration}ms`:`${(e.duration/1e3).toFixed(1)}s`})]}),e.error&&(0,U.jsx)(`div`,{className:`min-w-0 max-w-full rounded-md border border-destructive/25 bg-destructive/10 px-3 py-2 text-sm text-destructive [overflow-wrap:anywhere]`,children:e.error}),(0,U.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-2`,children:[(0,U.jsxs)(`div`,{className:`rounded-md border bg-background/80 px-3 py-2`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-medium uppercase tracking-wide text-muted-foreground`,children:`Setup Hooks`}),(0,U.jsx)(`div`,{className:`mt-2 text-sm`,children:e.perTestSetupHooks.length>0?e.perTestSetupHooks.map(e=>`${e.name} (${e.status})`).join(`, `):`No per-test setup hooks`})]}),(0,U.jsxs)(`div`,{className:`rounded-md border bg-background/80 px-3 py-2`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-medium uppercase tracking-wide text-muted-foreground`,children:`Teardown Hooks`}),(0,U.jsx)(`div`,{className:`mt-2 text-sm`,children:e.perTestTeardownHooks.length>0?e.perTestTeardownHooks.map(e=>`${e.name} (${e.status})`).join(`, `):`No per-test teardown hooks`})]})]}),r.length>0?(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-medium uppercase tracking-wide text-muted-foreground`,children:`Steps`}),(0,U.jsx)(`div`,{className:`space-y-3`,children:r.map(e=>{let r=t?.id===e.id,i=e.subActionsData??[];return(0,U.jsxs)(`div`,{className:A(`overflow-hidden rounded-md border bg-background/80`,r&&`border-primary/30 ring-1 ring-primary/20`),children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2 border-b px-3 py-2`,children:[(0,U.jsxs)(`span`,{className:`shrink-0 text-sm font-medium`,children:[`Step #`,e.stepOrder+1]}),(0,U.jsx)(L,{variant:`outline`,className:A(`text-[10px] uppercase tracking-wide`,qe(e.status)),children:e.status}),(0,U.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm text-foreground`,children:e.name}),e.duration>0&&(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.duration<1e3?`${e.duration}ms`:`${(e.duration/1e3).toFixed(1)}s`})]}),i.length>0?(0,U.jsx)(`div`,{className:`divide-y divide-border/60`,children:i.map(t=>(0,U.jsx)(`div`,{className:A(r&&n?.index===t.index&&`bg-primary/5`),children:(0,U.jsx)(Le,{step:e,subAction:t})},`${e.id}-sub-${t.index}`))}):(0,U.jsx)(Le,{step:e,subAction:r?n:null})]},e.id)})})]}):(0,U.jsx)(`div`,{className:`rounded-md border border-dashed px-4 py-6 text-sm text-muted-foreground`,children:`This test has not produced any live step detail yet. Run it from the queue to inspect reasoning, console, network, and hook output.`})]})}function q({connectionState:e,isLaunching:t,targetName:n,targetLabel:r,platform:a,screenshot:c,currentUrl:ee,pendingNavigation:l,steps:u,setupHooks:d,teardownHooks:te,tests:re=[],selection:p,runningStepId:m,terminalState:h,draftState:g,ariaTree:_,errorMessage:v,devtoolsTab:b,canRunAll:S,isRunningAll:w,isStoppingRunAll:T,setupHooksStale:E=!1,onDevtoolsTabChange:fe,onRunAll:pe,onStopAll:me,onEndSession:O,onRestartSession:ge,showEndSessionAction:j=!1,onCloseLiveMode:M,onStartFreshSession:P,onBack:ve,onForward:ye,onRefresh:F,onNavigate:be,onRequestAriaTree:xe,executionUnit:I=`step`,runAllLabel:Te,stopAllLabel:H,liveSessionNumber:Ee=null,unitRowsSlot:De}){let[Oe,ke]=(0,V.useState)(!1),[Ae,je]=(0,V.useState)(``),[W,Me]=(0,V.useState)(!1),G=t?`connecting`:e,Ne=h?{label:h.reason===`ended`?`Ended`:`Disconnected`,tone:h.reason===`ended`?`bg-muted-foreground/45`:`bg-amber-500`}:ze[G],Pe=(0,V.useMemo)(()=>u.map((e,t)=>z(e,t)),[u]),K=I===`test`,Ie=!K,He=(0,V.useMemo)(()=>[...d,...te],[d,te]),Ke=(0,V.useMemo)(()=>m||(Ge(u)?.id??null),[m,u]),qe=p&&`stepId`in p?p.stepId:Ke,q=(0,V.useMemo)(()=>Pe.find(e=>e.id===qe)??null,[Pe,qe]),Ye=(0,V.useMemo)(()=>p?.type!==`subaction`||!q?null:q.subActionsData?.[p.subIndex]??null,[p,q]),Xe=(0,V.useMemo)(()=>u.find(e=>e.id===q?.id)??null,[q,u]),J=(0,V.useMemo)(()=>p?.type===`hook`?He.find(e=>e.id===p.hookId)??null:null,[p,He]),Y=(0,V.useMemo)(()=>!K||!p?null:p.type===`test`||p.type===`test-hook`?re[p.testIndex]??null:`stepId`in p?re.find(e=>e.liveSteps.some(e=>e.id===p.stepId))??null:null,[p,K,re]),Ze=(0,V.useMemo)(()=>!K||p?.type!==`suite-hook`?null:(p.phase===`setup`?d:te).find(e=>e.id===p.hookId)??null,[p,d,K,te]),Qe=(0,V.useMemo)(()=>{if(!K||p?.type!==`test-hook`)return null;let e=re[p.testIndex];return e?(p.phase===`setup`?e.perTestSetupHooks:e.perTestTeardownHooks).find(e=>e.id===p.hookId)??null:null},[p,K,re]),X=(0,V.useMemo)(()=>{if(!K||!Y)return null;if(p&&`stepId`in p){let e=Y.liveSteps.find(e=>e.id===p.stepId);if(e)return e}if(Y.runningStepIndex!==null){let e=Y.liveSteps.find(e=>e.stepIndex===Y.runningStepIndex);if(e)return e}return Ge(Y.liveSteps)},[p,Y,K]),Z=(0,V.useMemo)(()=>X?z(X,X.stepIndex):null,[X]),$e=(0,V.useMemo)(()=>p?.type!==`subaction`||!Z?null:Z.subActionsData?.[p.subIndex]??null,[p,Z]),et=(0,V.useMemo)(()=>Y?.liveSteps.map(e=>z(e,e.stepIndex))??[],[Y]),tt=X?.executionLogs??[],nt=Xe?.executionLogs??[],Q=Be(g),$=a===`web`?ee||r||`Configured start URL`:r||(a===`android`?`Android device`:`iOS device`);(0,V.useEffect)(()=>{W||je($)},[$,W]);let rt=(0,V.useMemo)(()=>{if(K){let e=re.find(e=>e.status===`running`);return e?`Running ${e.name}`:null}if(!m)return null;let e=Pe.find(e=>e.id===m);return e?`Running step ${e.stepOrder+1}`:`Running current step`},[Pe,m,K,re]),it=async()=>{$&&(await navigator.clipboard.writeText($),ke(!0),window.setTimeout(()=>ke(!1),1500))},at=()=>{let e=Ve(Ae,ee);if(!e){je($);return}je(e),Me(!1),be(e)},ot=!K&&!!(p&&p.type!==`hook`&&!q);return(0,U.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col bg-card/30`,children:[(0,U.jsxs)(`div`,{className:`border-b px-4 py-3`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,U.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,U.jsx)(`span`,{className:`text-sm font-medium`,children:n||`Live Session`}),(0,U.jsx)(L,{variant:`outline`,className:`text-[10px] uppercase tracking-wide`,children:Ne.label}),(e===`connected`||e===`executing`)&&typeof Ee==`number`&&(0,U.jsxs)(L,{variant:`outline`,"aria-live":`polite`,className:`text-[10px] tracking-wider font-medium text-muted-foreground bg-muted/50 border-border/50`,children:[`Session #`,Ee]}),rt&&(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:rt})]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[a===`web`?(0,U.jsx)(se,{className:`size-3.5 shrink-0`}):(0,U.jsx)(f,{className:`size-3.5 shrink-0`}),(0,U.jsx)(`span`,{className:`truncate`,title:$,children:$})]}),v&&!h&&(0,U.jsx)(`div`,{className:`min-w-0 max-w-2xl text-xs text-destructive [overflow-wrap:anywhere]`,children:v})]}),!h&&(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:[(0,U.jsx)(L,{variant:`outline`,className:A(`text-[10px]`,Q.className),children:Q.label}),E&&(0,U.jsx)(L,{className:`border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400`,children:`Restart required`}),Ie&&(w?(0,U.jsxs)(D,{variant:`outline`,size:`sm`,onClick:me,disabled:T,children:[T?(0,U.jsx)(he,{className:`size-3.5 animate-spin`}):(0,U.jsx)(ce,{className:`size-3.5`}),T?`Stopping...`:H??`Stop All Steps`]}):(0,U.jsxs)(D,{variant:`outline`,size:`sm`,onClick:pe,disabled:!S,children:[(0,U.jsx)(ie,{className:`size-3.5`}),Te??`Run All Steps`]})),j&&(0,U.jsxs)(D,{variant:`destructive`,size:`sm`,onClick:O,children:[(0,U.jsx)(ce,{className:`size-3.5`}),`End Live Session`]})]})]}),E&&!h&&(0,U.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-start justify-between gap-3 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-sm text-amber-700 dark:text-amber-300`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-start gap-2`,children:[(0,U.jsx)(k,{className:`mt-0.5 size-4 shrink-0`}),(0,U.jsx)(`span`,{children:`Hook order or names changed after this live session started. Continue using the current disposable session, or restart to apply the latest setup and teardown hooks.`})]}),ge&&(0,U.jsx)(D,{type:`button`,size:`sm`,className:`shrink-0`,onClick:ge,children:`Restart Live Session`})]}),!h&&(a===`web`?(0,U.jsxs)(`div`,{className:`mt-3 flex items-center gap-2`,children:[(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,U.jsx)(D,{variant:`ghost`,size:`icon-sm`,onClick:ve,disabled:G===`executing`||G===`idle`,"aria-label":`Go back`,children:(0,U.jsx)(N,{className:`size-3.5`})}),(0,U.jsx)(D,{variant:`ghost`,size:`icon-sm`,onClick:ye,disabled:G===`executing`||G===`idle`,"aria-label":`Go forward`,children:(0,U.jsx)(_e,{className:`size-3.5`})}),(0,U.jsx)(D,{variant:`ghost`,size:`icon-sm`,onClick:F,disabled:G===`executing`||G===`idle`,"aria-label":`Refresh page`,children:(0,U.jsx)(y,{className:`size-3.5`})})]}),(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2 rounded-full border bg-background px-3 py-2`,children:[l?(0,U.jsx)(he,{className:`size-3.5 shrink-0 animate-spin text-muted-foreground`}):(0,U.jsx)(se,{className:`size-3.5 shrink-0 text-muted-foreground`}),(0,U.jsx)(`input`,{value:Ae,title:$,onFocus:()=>Me(!0),onBlur:()=>{Me(!1),je($)},onChange:e=>je(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),at()),e.key===`Escape`&&(e.preventDefault(),Me(!1),je($))},disabled:G===`executing`||G===`idle`,className:A(`min-w-0 flex-1 bg-transparent text-sm outline-none`,W?`text-left`:`text-center`)})]}),(0,U.jsx)(`div`,{className:`flex shrink-0 items-center justify-end gap-1`,children:(0,U.jsx)(D,{variant:`ghost`,size:`icon-sm`,onClick:it,disabled:!$,"aria-label":Oe?`URL copied`:`Copy URL`,title:Oe?`URL copied`:`Copy URL`,children:Oe?(0,U.jsx)(ne,{className:`size-3.5`}):(0,U.jsx)(ae,{className:`size-3.5`})})})]}):(0,U.jsx)(`div`,{className:`mt-3 flex flex-wrap items-center gap-2`,children:j&&(0,U.jsxs)(D,{variant:`destructive`,size:`sm`,onClick:O,children:[(0,U.jsx)(ce,{className:`size-3.5`}),`End Live Session`]})}))]}),I===`test`&&De,(0,U.jsxs)(Ce,{orientation:`vertical`,className:`min-h-0 flex-1`,children:[(0,U.jsx)(Se,{defaultSize:62,minSize:32,children:h?(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center px-6 py-8`,children:(0,U.jsxs)(`div`,{className:`flex max-w-lg flex-col items-center gap-4 rounded-lg border bg-background/80 px-6 py-8 text-center`,children:[(0,U.jsx)(`div`,{className:`rounded-full bg-muted p-3`,children:(0,U.jsx)(B,{className:`size-6 text-muted-foreground`})}),(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`h3`,{className:`text-base font-semibold`,children:h.title}),(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:h.description})]}),(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:[M&&(0,U.jsx)(D,{variant:`outline`,size:`sm`,onClick:M,children:`Close Live Mode`}),P&&(0,U.jsx)(D,{size:`sm`,onClick:P,children:`Start Fresh Session`})]})]})}):G===`idle`?(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center px-6 py-8`,children:(0,U.jsxs)(`div`,{className:`flex max-w-md flex-col items-center gap-4 rounded-lg border bg-background/70 px-6 py-8 text-center`,children:[(0,U.jsx)(`div`,{className:`rounded-full bg-muted p-3`,children:(0,U.jsx)(B,{className:`size-6 text-muted-foreground`})}),(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`h3`,{className:`text-base font-semibold`,children:`Live mode is target-scoped`}),(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This workspace runs the current builder draft against the selected target. Sessions are disposable and draft changes only persist when you save the test.`})]})]})}):(0,U.jsx)(Re,{screenshot:c,connectionState:G})}),(0,U.jsx)(we,{withHandle:!0}),(0,U.jsx)(Se,{defaultSize:38,minSize:20,children:(0,U.jsxs)(de,{value:b,onValueChange:e=>fe(e),className:`flex h-full min-h-0 flex-col`,children:[(0,U.jsxs)(ue,{variant:`line`,className:`h-9 justify-start rounded-none border-b px-3`,children:[(0,U.jsx)(C,{value:`reasoning`,className:`rounded-none text-xs`,children:`Reasoning`}),(0,U.jsx)(C,{value:`env`,className:`rounded-none text-xs`,children:`Env`}),(0,U.jsx)(C,{value:`network`,className:`rounded-none text-xs`,children:`Network`}),(0,U.jsx)(C,{value:`console`,className:`rounded-none text-xs`,children:`Console`}),(0,U.jsx)(C,{value:`aria`,className:`rounded-none text-xs`,children:`ARIA Tree`})]}),(0,U.jsx)(le,{value:`reasoning`,className:`m-0 flex-1 overflow-hidden`,children:(0,U.jsx)(x,{className:`h-full`,children:K?Ze?(0,U.jsx)(We,{hook:Ze}):Qe?(0,U.jsx)(We,{hook:Qe}):Y?(0,U.jsx)(Je,{test:Y,selectedStep:Z,subAction:$e}):(0,U.jsx)(R,{icon:oe,title:`Select a test to inspect it`,description:`Choose a test in the live queue to see its reasoning, logs, hooks, and network activity.`}):J?(0,U.jsx)(We,{hook:J}):q?(0,U.jsx)(Le,{step:q,subAction:Ye}):ot?(0,U.jsx)(R,{icon:oe,title:`Selection is no longer available`,description:`Pick another step in the builder to inspect its reasoning.`}):(0,U.jsx)(R,{icon:oe,title:`No reasoning yet`,description:`Run a step from the builder or use Run All Steps to populate the live reasoning trace.`})})}),(0,U.jsx)(le,{value:`env`,className:`m-0 flex-1 overflow-hidden`,children:K?Ze?(0,U.jsx)(x,{className:`h-full`,children:(0,U.jsx)(Ue,{hook:Ze})}):Qe?(0,U.jsx)(x,{className:`h-full`,children:(0,U.jsx)(Ue,{hook:Qe})}):X?(0,U.jsx)(x,{className:`h-full`,children:(0,U.jsx)(o,{step:X,executionLogs:tt})}):Y?(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:`Select a test-owned hook or run a step to inspect variables and runJS output`}):(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:`Select a test to inspect it`}):J?(0,U.jsx)(x,{className:`h-full`,children:(0,U.jsx)(Ue,{hook:J})}):Xe?(0,U.jsx)(x,{className:`h-full`,children:(0,U.jsx)(o,{step:Xe,executionLogs:nt})}):(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:`Select a step to inspect variables and runJS output`})}),(0,U.jsx)(le,{value:`network`,className:`m-0 flex-1 overflow-hidden`,children:K?Ze||Qe?(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center px-6 text-sm text-muted-foreground`,children:`Hooks do not capture browser network activity. Select a test step to inspect requests.`}):X?(0,U.jsx)(x,{className:`h-full`,children:(0,U.jsx)(i,{step:Z,allSteps:et,platform:a})}):Y?(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:`Run this test to inspect its network activity`}):(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:`Select a test to inspect it`}):J?(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center px-6 text-sm text-muted-foreground`,children:`Hooks do not capture browser network activity. Select a step to inspect requests.`}):q?(0,U.jsx)(x,{className:`h-full`,children:(0,U.jsx)(i,{step:q,allSteps:Pe,platform:a})}):(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:`Select a step to inspect network activity`})}),(0,U.jsx)(le,{value:`console`,className:`m-0 flex-1 overflow-hidden`,children:K?Ze?(0,U.jsx)(x,{className:`h-full`,children:(0,U.jsx)(We,{hook:Ze})}):Qe?(0,U.jsx)(x,{className:`h-full`,children:(0,U.jsx)(We,{hook:Qe})}):X?(0,U.jsx)(x,{className:`h-full`,children:(0,U.jsx)(s,{step:Z,allSteps:et,executionLogs:tt,isHookStep:tt.length>0})}):Y?(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:`Run this test to inspect console output`}):(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:`Select a test to inspect it`}):J?(0,U.jsx)(x,{className:`h-full`,children:(0,U.jsx)(We,{hook:J})}):q?(0,U.jsx)(x,{className:`h-full`,children:(0,U.jsx)(s,{step:q,allSteps:Pe,executionLogs:nt,isHookStep:nt.length>0})}):(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:`Select a step to inspect console output`})}),(0,U.jsx)(le,{value:`aria`,className:`m-0 flex-1 overflow-hidden`,children:(0,U.jsx)(Fe,{ariaTree:_,onRefresh:xe,isExecuting:G===`executing`})})]})})]})]})}function Ye(){return typeof window<`u`&&window.localStorage!==void 0}function Xe(){if(!Ye())return!1;try{return window.localStorage.getItem(`agent-qa:live-debug`)===`1`}catch{return!1}}function J(e,t,n){if(!Xe())return;let r=`[agent-qa live:${e}] ${t}`;if(n){console.info(r,n);return}console.info(r)}function Y(e,t){let n=typeof e==`string`?{instruction:e}:e;return{id:t?.id??n.draftId??crypto.randomUUID(),draftId:n.draftId??t?.draftId??null,instruction:n.instruction,status:t?.status??`idle`,duration:t?.duration,error:t?.error,phases:t?.phases??[],executionHistory:t?.executionHistory??[],capturedVariables:t?.capturedVariables,consoleLogs:t?.consoleLogs??[],networkLogs:t?.networkLogs??[],variableSnapshot:t?.variableSnapshot??null,originalStepName:t?.originalStepName??null,subActionsData:t?.subActionsData??null,executionLogs:t?.executionLogs??[],executionGeneration:t?.executionGeneration??0}}function Ze(e,t){return{id:e.hookId,executionId:t?.executionId??null,name:e.name??t?.name??e.hookId,phase:e.phase,status:t?.status??`pending`,duration:t?.duration,stdout:t?.stdout??null,stderr:t?.stderr??null,variables:t?.variables??null,error:t?.error,createdAt:t?.createdAt}}function Qe(e,t){return{...Y({draftId:t?.draftId,instruction:e.instruction},t),id:t?.id??crypto.randomUUID(),stepIndex:e.stepIndex}}function X(e,t){let n=e.findIndex(e=>e.id===t.id);return n===-1?[...e,t]:e.map((e,r)=>r===n?{...e,...t}:e)}function Z(e,t,n){let r=e.find(e=>e.stepIndex===t.stepIndex),i={...Qe(t,r),...n};return[...r?e.map(e=>e.stepIndex===t.stepIndex?i:e):[...e,i]].sort((e,t)=>e.stepIndex-t.stepIndex)}function $e(e,t){let n=t.map(e=>({draftId:e.draftId,instruction:e.instruction}));if(e.length===n.length&&e.every((e,t)=>e.instruction===n[t].instruction&&e.draftId===n[t].draftId))return e;let r=new Map(e.filter(e=>!!e.draftId).map(e=>[e.draftId,e]));return n.map((t,n)=>Y(t,t.draftId?r.get(t.draftId):e[n]))}function et(e,t,n){if(e.length===t.length&&e.every((e,r)=>e.id===t[r]&&e.phase===n))return e;let r=new Map(e.map(e=>[e.id,e]));return t.map(e=>Ze({hookId:e,phase:n},r.get(e)))}function tt(e,t,n){return{id:n?.id??`${e.testId}:${e.path}:${t}`,draftId:e.draftId??n?.draftId??null,testId:e.testId,path:e.path,name:e.name,status:n?.status??`idle`,duration:n?.duration,error:n?.error,testExecutionId:n?.testExecutionId??null,liveSteps:n?.liveSteps??[],runningStepIndex:n?.runningStepIndex??null,perTestSetupHooks:n?.perTestSetupHooks??[],perTestTeardownHooks:n?.perTestTeardownHooks??[],lastRunAt:n?.lastRunAt}}function nt(e,t){let n=e.findIndex(e=>e.testExecutionId===t.testExecutionId);if(n!==-1)return n;let r=e.findIndex(e=>e.testId===t.testId&&e.name===t.testName);return r===-1?t.testIndex>=0&&t.testIndex<e.length?t.testIndex:-1:r}function Q(e,t,n){let r=nt(e,t);return r===-1?e:e.map((e,t)=>t===r?n(e):e)}function $(e){return e.scope===`test`}function rt(e,t={}){let n=t.steps,r=t.tests,i=t.setupHooks??[],a=t.teardownHooks??[],o=t.allowReconnect??!n,[s,c]=(0,V.useState)(`idle`),[ee,l]=(0,V.useState)([]),[u,d]=(0,V.useState)(()=>et([],i,`setup`)),[te,ne]=(0,V.useState)(()=>et([],a,`teardown`)),[f,re]=(0,V.useState)(null),[p,m]=(0,V.useState)(null),[h,g]=(0,V.useState)(null),[ie,_]=(0,V.useState)(null),[ae,v]=(0,V.useState)(null),[oe,se]=(0,V.useState)([]),[y,ce]=(0,V.useState)(`web`),[b,x]=(0,V.useState)(null),[S,C]=(0,V.useState)(!1),[le,ue]=(0,V.useState)(!1),[de,w]=(0,V.useState)([]),[T,E]=(0,V.useState)(null),[D,fe]=(0,V.useState)(!1),[pe,me]=(0,V.useState)(!1),O=(0,V.useRef)(null),k=(0,V.useRef)(0),he=(0,V.useRef)(null),ge=(0,V.useRef)(null),_e=(0,V.useRef)(`idle`),A=(0,V.useRef)([]),j=(0,V.useRef)(null),M=(0,V.useRef)(!1),N=(0,V.useRef)(null),P=(0,V.useRef)(null),ve=(0,V.useRef)(!1),ye=(0,V.useRef)(0),F=(0,V.useRef)(`web`),be=(0,V.useRef)(null),xe=(0,V.useRef)(!!n),I=(0,V.useRef)(null),L=(0,V.useRef)([]),Se=(0,V.useRef)(null),Ce=(0,V.useRef)(!1),we=(0,V.useRef)(null);_e.current=s,A.current=ee,j.current=ae,F.current=y,xe.current=!!n,L.current=de,Se.current=T;let R=(0,V.useCallback)(()=>{ge.current&&=(clearInterval(ge.current),null)},[]),z=(0,V.useCallback)(e=>{let t=O.current;t&&t.readyState===WebSocket.OPEN&&t.send(JSON.stringify(e))},[]),B=(0,V.useCallback)(e=>{R(),ge.current=setInterval(()=>{document.hidden||z({type:`get-screenshot`})},e)},[R,z]),Te=(0,V.useCallback)(()=>new Promise(e=>{P.current=e,setTimeout(()=>{P.current===e&&(P.current=null,e())},5e3)}),[]),H=(0,V.useCallback)(()=>{let e=be.current;e&&(be.current=null,l(t=>$e(t,e)))},[]),Ee=(0,V.useCallback)(e=>{O.current&&=(J(`hook`,`closing previous websocket before reconnect`,{sessionId:e}),O.current.close(),null),c(`connecting`),M.current=!1,J(`hook`,`connecting websocket`,{sessionId:e});let t=`${location.protocol===`https:`?`wss:`:`ws:`}//${location.host}/api/live-editor/ws?sessionId=${e}`,n=new WebSocket(t);O.current=n,n.onopen=()=>{k.current=0,J(`hook`,`websocket opened`,{sessionId:e})},n.onmessage=t=>{let n;try{n=JSON.parse(t.data)}catch{return}switch(n.type){case`session-ready`:{let t=n.platform??`web`;ce(t),F.current=t;let r=n.interactive!==!1;c(r?`connected`:`error`),_(n.error??null),J(`hook`,`session ready`,{sessionId:e,platform:t,interactive:r}),r&&B(t===`web`?1e3:2e3);break}case`hook-start`:{let e=n.hook,t={id:e.hookId,executionId:e.executionId,name:e.hookName,phase:e.phase,status:`running`,duration:void 0,stdout:null,stderr:null,variables:null,error:void 0,createdAt:e.createdAt};if(e.owner.scope===`suite`)(e.phase===`setup`?d:ne)(e=>X(e,t)),I.current&&I.current.phase===e.phase&&I.current.hookId===e.hookId&&(I.current={...I.current,executionId:e.executionId});else if($(e.owner)){let n=e.owner;w(r=>Q(r,n,n=>({...n,perTestSetupHooks:e.phase===`setup`?X(n.perTestSetupHooks,t):n.perTestSetupHooks,perTestTeardownHooks:e.phase===`teardown`?X(n.perTestTeardownHooks,t):n.perTestTeardownHooks})))}break}case`hook-complete`:{let e=n.hook,t={id:e.hookId,executionId:e.executionId,name:e.hookName,phase:e.phase,status:e.status,duration:e.duration,stdout:e.stdout??null,stderr:e.stderr??null,variables:e.variables??null,error:e.error,createdAt:e.createdAt};if(e.owner.scope===`suite`)(t.phase===`setup`?d:ne)(e=>X(e,t)),I.current&&I.current.phase===t.phase&&I.current.hookId===t.id&&(!I.current.executionId||I.current.executionId===t.executionId)&&(I.current=null,c(`connected`),B(F.current===`web`?1e3:2e3),H());else if($(e.owner)){let n=e.owner;w(e=>Q(e,n,e=>({...e,perTestSetupHooks:t.phase===`setup`?X(e.perTestSetupHooks,t):e.perTestSetupHooks,perTestTeardownHooks:t.phase===`teardown`?X(e.perTestTeardownHooks,t):e.perTestTeardownHooks})))}break}case`step-phase`:l(e=>e.map((e,t)=>t===j.current&&e.status===`running`&&e.executionGeneration===ye.current?{...e,phases:[...e.phases,{phase:n.phase,text:n.data?.text,confidence:n.data?.confidence,action:n.data?.action,success:n.data?.success,duration:n.data?.duration,timestamp:new Date().toISOString()}]}:e));break;case`step-complete`:{let t=n.result,r=j.current,i=t?.status===`passed`?`passed`:`failed`;l(e=>e.map((e,n)=>n===r&&e.status===`running`?{...e,status:i,duration:t?.duration,error:t?.error,capturedVariables:t?.capturedVariables,consoleLogs:t?.consoleLogs??[],networkLogs:t?.networkLogs??[],variableSnapshot:t?.variableSnapshot??null,originalStepName:t?.originalStepName??null,subActionsData:t?.subActionsData??null,executionLogs:t?.executionLogs??[]}:e)),v(null),c(`connected`),J(`hook`,`step completed`,{sessionId:e,stepIndex:r??void 0,status:i}),B(F.current===`web`?1e3:2e3),N.current?.({status:i}),N.current=null,P.current?.(),P.current=null,H();break}case`test-start`:{let e=n.test;Se.current=e.testIndex,E(e.testIndex),w(t=>Q(t,e,t=>({...t,status:`running`,duration:void 0,error:void 0,testExecutionId:e.testExecutionId,runningStepIndex:null,liveSteps:[],perTestSetupHooks:[],perTestTeardownHooks:[]})));break}case`test-step-start`:{let e=n.step;w(t=>Q(t,e,t=>({...t,status:`running`,testExecutionId:e.testExecutionId,runningStepIndex:e.stepIndex,liveSteps:Z(t.liveSteps,{stepIndex:e.stepIndex,instruction:e.stepInstruction},{status:`running`,duration:void 0,error:void 0,phases:[],consoleLogs:[],networkLogs:[],variableSnapshot:null,originalStepName:null,subActionsData:null,executionLogs:[]})})));break}case`test-step-phase`:{let e=n.step;w(t=>Q(t,e,t=>({...t,liveSteps:Z(t.liveSteps,{stepIndex:e.stepIndex,instruction:e.stepInstruction},{status:`running`,phases:[...t.liveSteps.find(t=>t.stepIndex===e.stepIndex)?.phases??[],{phase:n.phase,text:n.data?.text,confidence:n.data?.confidence,action:n.data?.action,success:n.data?.success,duration:n.data?.duration,timestamp:new Date().toISOString()}]})})));break}case`test-step-complete`:{let e=n.step,t=n.result;w(n=>Q(n,e,n=>({...n,runningStepIndex:n.runningStepIndex===e.stepIndex?null:n.runningStepIndex,liveSteps:Z(n.liveSteps,{stepIndex:e.stepIndex,instruction:e.stepInstruction},{status:t?.status??`failed`,duration:t?.duration,error:t?.error,capturedVariables:t?.capturedVariables,consoleLogs:t?.consoleLogs??[],networkLogs:t?.networkLogs??[],variableSnapshot:t?.variableSnapshot??null,originalStepName:t?.originalStepName??null,subActionsData:t?.subActionsData??null,executionLogs:t?.executionLogs??[]})})));break}case`test-step-cancelled`:{let e=n.step;w(t=>Q(t,e,t=>({...t,runningStepIndex:t.runningStepIndex===e.stepIndex?null:t.runningStepIndex,liveSteps:Z(t.liveSteps,{stepIndex:e.stepIndex,instruction:e.stepInstruction},{status:`cancelled`})})));break}case`test-step-error`:{let e=n.step;w(t=>Q(t,e,t=>({...t,runningStepIndex:t.runningStepIndex===e.stepIndex?null:t.runningStepIndex,liveSteps:Z(t.liveSteps,{stepIndex:e.stepIndex,instruction:e.stepInstruction},{status:`failed`,error:n.error})})));break}case`test-complete`:{let e=n.test,t=n.result,r=t?.status??`failed`,i=t?.error;if(!i&&r===`failed`&&Array.isArray(t?.stepResults)){let e=t.stepResults.find(e=>e?.status===`failed`);e?.error&&(i=`Step ${t.stepResults.indexOf(e)+1} failed: ${e.error}`)}w(n=>Q(n,e,n=>({...n,status:r,duration:t?.duration,error:i,testExecutionId:e.testExecutionId,runningStepIndex:null,lastRunAt:new Date().toISOString(),liveSteps:Array.isArray(t?.stepResults)?t.stepResults.reduce((e,t,r)=>{let i=n.liveSteps.find(e=>e.stepIndex===r);return i?Z(e,{stepIndex:r,instruction:i.instruction},{status:t?.status??i.status,duration:t?.duration,error:t?.error,capturedVariables:t?.capturedVariables,consoleLogs:t?.consoleLogs??i.consoleLogs,networkLogs:t?.networkLogs??i.networkLogs,variableSnapshot:t?.variableSnapshot??i.variableSnapshot,originalStepName:t?.originalStepName??i.originalStepName,subActionsData:t?.subActionsData??i.subActionsData,executionLogs:t?.executionLogs??i.executionLogs}):e},n.liveSteps):n.liveSteps,perTestSetupHooks:Array.isArray(t?.setupHookExecutions)?t.setupHookExecutions.map(e=>({id:e.hookId,executionId:e.executionId??null,name:e.hookName,phase:e.phase,status:e.status,duration:e.duration,stdout:e.stdout??null,stderr:e.stderr??null,variables:e.variables??null,error:e.error,createdAt:e.createdAt})):n.perTestSetupHooks,perTestTeardownHooks:Array.isArray(t?.teardownHookExecutions)?t.teardownHookExecutions.map(e=>({id:e.hookId,executionId:e.executionId??null,name:e.hookName,phase:e.phase,status:e.status,duration:e.duration,stdout:e.stdout??null,stderr:e.stderr??null,variables:e.variables??null,error:e.error,createdAt:e.createdAt})):n.perTestTeardownHooks}))),Se.current=null,E(null),c(`connected`),B(F.current===`web`?1e3:2e3);let a=we.current;we.current=null,a?.({status:r});break}case`test-error`:{let e=n.test;w(t=>Q(t,e,t=>({...t,status:`failed`,error:n.error,testExecutionId:e.testExecutionId,runningStepIndex:null,lastRunAt:new Date().toISOString()}))),Se.current=null,E(null),c(`connected`),B(F.current===`web`?1e3:2e3);let t=we.current;we.current=null,t?.({status:`failed`});break}case`step-error`:J(`hook`,`step failed`,{sessionId:e,stepIndex:j.current??void 0,error:n.error}),l(e=>e.map((e,t)=>t===j.current?e.status===`cancelling`?{...e,status:`cancelled`}:e.status===`running`?{...e,status:`failed`,error:n.error}:e:e)),v(null),c(`connected`),B(F.current===`web`?1e3:2e3),N.current?.({status:`failed`}),N.current=null,P.current?.(),P.current=null,H();break;case`step-cancelled`:l(e=>e.map((e,t)=>t===j.current&&(e.status===`running`||e.status===`cancelling`)?{...e,status:`cancelled`}:e)),v(null),c(`connected`),J(`hook`,`step cancelled`,{sessionId:e,stepIndex:j.current??void 0}),B(F.current===`web`?1e3:2e3),N.current?.({status:`cancelled`}),N.current=null,P.current?.(),P.current=null,H();break;case`step-busy`:g(null),I.current&&(I.current=null,c(`connected`),B(F.current===`web`?1e3:2e3)),_(`Step already in progress: ${n.currentStep}`);break;case`screenshot`:re(`data:image/jpeg;base64,${n.data}`);break;case`navigate-complete`:m(n.url??null),g(null);break;case`session-state`:n.state&&`currentUrl`in n.state&&m(n.state.currentUrl??null),n.state?.interactive===!1&&(c(`error`),_(n.state.terminalError??`Live session is not ready`));break;case`device-logs`:se(e=>[...e,...n.entries]);break;case`aria-tree`:x(n.tree);break;case`session-terminated`:c(`disconnected`),g(null),I.current=null,R(),H(),J(`hook`,`session terminated by server`,{sessionId:e});break;case`error`:g(null),I.current&&(I.current=null,c(`connected`),B(F.current===`web`?1e3:2e3),H()),_(n.message),J(`hook`,`server reported error`,{sessionId:e,message:n.message});break}},n.onclose=()=>{if(O.current=null,R(),M.current){J(`hook`,`websocket closed after local termination`,{sessionId:e});return}if(J(`hook`,`websocket closed unexpectedly`,{sessionId:e,allowReconnect:o,reconnectCount:k.current}),c(`disconnected`),g(null),I.current=null,l(e=>e.map(e=>e.status===`running`||e.status===`cancelling`?{...e,status:`cancelled`}:e)),j.current=null,v(null),N.current?.({status:`cancelled`}),N.current=null,P.current?.(),P.current=null,H(),o&&k.current<3){let t=2**k.current*1e3;k.current++,J(`hook`,`scheduling reconnect`,{sessionId:e,delay:t,reconnectCount:k.current}),he.current=setTimeout(()=>Ee(e),t)}},n.onerror=()=>{J(`hook`,`websocket error event`,{sessionId:e})}},[o,H,R,B]);(0,V.useEffect)(()=>{if(n){if(_e.current===`executing`){be.current=n,J(`hook`,`queued external step sync while executing`,{stepCount:n.length});return}be.current=null,J(`hook`,`syncing external steps`,{stepCount:n.length}),l(e=>$e(e,n))}},[n]),(0,V.useEffect)(()=>{d(e=>et(e,i,`setup`))},[i]),(0,V.useEffect)(()=>{ne(e=>et(e,a,`teardown`))},[a]),(0,V.useEffect)(()=>{r&&w(e=>{let t=new Map(e.map(e=>[`${e.testId}::${e.path}`,e]));return r.map((e,n)=>tt(e,n,t.get(`${e.testId}::${e.path}`)))})},[r]),(0,V.useEffect)(()=>{if(!e){c(`idle`),l(n?$e([],n):[]),d(et([],i,`setup`)),ne(et([],a,`teardown`)),re(null),m(null),g(null),_(null),I.current=null,se([]),ce(`web`),x(null),C(!1),ue(!1),w(r?.map((e,t)=>tt(e,t))??[]),E(null),fe(!1),me(!1);return}return Ee(e),()=>{R(),he.current&&=(clearTimeout(he.current),null),O.current&&=(J(`hook`,`cleaning up websocket for session effect`,{sessionId:e}),O.current.close(),null)}},[R,Ee,e]),(0,V.useEffect)(()=>{s===`executing`?B(y===`web`?500:1e3):s===`connected`?B(y===`web`?1e3:2e3):R()},[s,y,B,R]),(0,V.useEffect)(()=>{let e=()=>{if(document.hidden)R();else{let e=_e.current,t=F.current;e===`executing`?B(t===`web`?500:1e3):e===`connected`&&B(t===`web`?1e3:2e3)}};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[R,B]);let De=(0,V.useCallback)(e=>{if(xe.current)return;let t=A.current.length;l(t=>[...t,{id:crypto.randomUUID(),draftId:null,instruction:e,status:`running`,phases:[],executionHistory:[],consoleLogs:[],networkLogs:[],variableSnapshot:null,originalStepName:null,subActionsData:null,executionLogs:[],executionGeneration:0}]),v(t),c(`executing`),_(null),z({type:`execute-step`,stepInstruction:e,stepIndex:t})},[z]),Oe=(0,V.useCallback)(async(t,n)=>{let r=A.current[t];if(!r||!r.instruction.trim())return;if(j.current!==null){let e=j.current;ve.current=!0,l(t=>t.map((t,n)=>n===e&&t.status===`running`?{...t,status:`cancelling`}:t)),z({type:`cancel-step`}),await Te()}ye.current++;let i=ye.current;j.current=t,v(t),l(e=>e.map((e,n)=>n===t?{...e,status:`running`,phases:[],executionHistory:e.phases.length>0?[...e.executionHistory,{phases:e.phases,status:e.status,duration:e.duration,error:e.error,timestamp:new Date().toISOString()}]:e.executionHistory,error:void 0,duration:void 0,consoleLogs:[],networkLogs:[],variableSnapshot:null,originalStepName:null,subActionsData:null,executionLogs:[],executionGeneration:i}:e)),c(`executing`),_(null),J(`hook`,`executing step`,{sessionId:e,stepIndex:t,instruction:r.instruction,testName:n?.testName}),z({type:`execute-step`,stepInstruction:r.instruction,stepIndex:t,draft:n})},[z,e,Te]),ke=(0,V.useCallback)(async(t,n)=>{if(_e.current!==`connected`){_(`Live session is busy or not ready`);return}I.current={phase:t,hookId:n},(t===`setup`?d:ne)(e=>e.map(e=>e.id===n?{...e,status:`running`,duration:void 0,stdout:null,stderr:null,variables:null,error:void 0}:e)),c(`executing`),_(null),J(`hook`,`executing hook`,{sessionId:e,phase:t,hookId:n}),z({type:`execute-hook`,phase:t,hookId:n})},[z,e]),Ae=(0,V.useCallback)(()=>{xe.current||l(e=>[...e,Y(``)])},[]),U=(0,V.useCallback)(e=>{xe.current||l(t=>t.filter((t,n)=>n!==e))},[]),je=(0,V.useCallback)((e,t)=>{xe.current||l(n=>n.map((n,r)=>r===e?{...n,instruction:t}:n))},[]),W=(0,V.useCallback)((e,t)=>{if(xe.current)return;l(n=>{let r=[...n],[i]=r.splice(e,1);return r.splice(t,0,i),r});let n=j.current;if(n!==null){let r=n;n===e?r=t:e<n&&t>=n?r=n-1:e>n&&t<=n&&(r=n+1),r!==n&&(j.current=r,v(r))}},[]),Me=(0,V.useCallback)(()=>{S&&(ve.current=!0,ue(!0)),l(e=>e.map((e,t)=>t===j.current&&e.status===`running`?{...e,status:`cancelling`}:e)),J(`hook`,`cancelling active step`,{sessionId:e}),z({type:`cancel-step`})},[S,z,e]),G=(0,V.useCallback)(()=>{z({type:`get-screenshot`})},[z]),Ne=(0,V.useCallback)(()=>{g({action:`refresh`}),z({type:`refresh-page`})},[z]),Pe=(0,V.useCallback)(()=>{g({action:`back`}),z({type:`go-back`})},[z]),Fe=(0,V.useCallback)(()=>{g({action:`forward`}),z({type:`go-forward`})},[z]),K=(0,V.useCallback)(()=>{z({type:`get-aria-tree`})},[z]),Ie=(0,V.useCallback)(e=>{g({action:`navigate`,targetUrl:e}),z({type:`navigate`,url:e})},[z]),Le=(0,V.useCallback)((e,t)=>new Promise(n=>{N.current=n;let r=A.current[e];if(!r||!r.instruction.trim()){N.current=null,n({status:`skipped`});return}ye.current++;let i=ye.current;j.current=e,v(e),l(t=>t.map((t,n)=>n===e?{...t,status:`running`,phases:[],executionHistory:t.phases.length>0?[...t.executionHistory,{phases:t.phases,status:t.status,duration:t.duration,error:t.error,timestamp:new Date().toISOString()}]:t.executionHistory,error:void 0,duration:void 0,consoleLogs:[],networkLogs:[],variableSnapshot:null,originalStepName:null,subActionsData:null,executionLogs:[],executionGeneration:i}:t)),c(`executing`),_(null),z({type:`execute-step`,stepInstruction:r.instruction,stepIndex:e,draft:t})}),[z]),Re=(0,V.useCallback)(async t=>{if(S)return;ve.current=!1;let n=A.current.length;C(!0),ue(!1),J(`hook`,`running all steps`,{sessionId:e,stepCount:n});try{for(let e=0;e<n&&!ve.current;e++){if(!A.current[e].instruction.trim())continue;let n=await Le(e,t);if(n.status===`failed`||n.status===`cancelled`)break}}finally{ve.current=!1,C(!1),ue(!1)}},[Le,S,e]),ze=(0,V.useCallback)(()=>{S&&(ve.current=!0,ue(!0),l(e=>e.map((e,t)=>t===j.current&&e.status===`running`?{...e,status:`cancelling`}:e)),j.current!==null&&z({type:`cancel-step`}))},[S,z]),Be=(0,V.useCallback)((e,t)=>new Promise(n=>{we.current=n;let r=L.current[e];if(!r){we.current=null,n({status:`skipped`});return}let i=crypto.randomUUID();Se.current=e,E(e),w(t=>t.map((t,n)=>n===e?{...t,status:`running`,duration:void 0,error:void 0,testExecutionId:i,runningStepIndex:null,liveSteps:[],perTestSetupHooks:[],perTestTeardownHooks:[]}:t)),c(`executing`),_(null),z({type:`execute-test`,testExecutionId:i,testId:r.testId,path:r.path,testIndex:e,draft:t})}),[z]),Ve=(0,V.useCallback)(async(e,t)=>{L.current[e]&&await Be(e,t)},[Be]),He=(0,V.useCallback)(async e=>{if(D)return;Ce.current=!1;let t=L.current.length;fe(!0),me(!1);try{for(let n=0;n<t&&!Ce.current;n++){let t=await Be(n,e);if(t.status===`failed`||t.status===`cancelled`)break}}finally{Ce.current=!1,fe(!1),me(!1)}},[Be,D]),Ue=(0,V.useCallback)(()=>{D&&(Ce.current=!0,me(!0),Se.current!==null&&z({type:`cancel-step`}))},[D,z]);return{connectionState:s,steps:ee,setupHooks:u,teardownHooks:te,screenshot:f,currentUrl:p,pendingNavigation:h,error:ie,executeStep:De,executeStepByIndex:Oe,executeHookById:ke,cancelStep:Me,requestScreenshot:G,refreshPage:Ne,goBack:Pe,goForward:Fe,navigate:Ie,runAll:Re,cancelRunAll:ze,terminateSession:(0,V.useCallback)(()=>{ve.current=!0,C(!1),ue(!1),M.current=!0,J(`hook`,`terminating session`,{sessionId:e}),z({type:`terminate-session`})},[z,e]),addStep:Ae,removeStep:U,updateStepInstruction:je,reorderSteps:W,runningStepIndex:ae,runningStepId:ae===null?null:ee[ae]?.id??null,sessionId:e,isTerminated:M.current,deviceLogs:oe,platform:y,ariaTree:b,requestAriaTree:K,isRunningAll:S,isStoppingRunAll:le,tests:de,executeTestByIndex:Ve,runAllTests:He,cancelRunAllTests:Ue,runningTestIndex:T,isRunningAllTests:D,isStoppingRunAllTests:pe}}function it(e){try{let t=m(e);if(t.errors.length>0)return{};let n=t.toJSON(),r=n?.use?.mobile?.appState;return{headless:n?.use?.browser?.headless,device:typeof n?.use?.device==`string`?n.use.device:void 0,appState:r===`preserve`||r===`reset`?r:void 0}}catch{return{}}}function at(e){let t=e.targets[e.targetName];if(!t)throw Error(`Selected target "${e.targetName}" was not found in workspace config`);let n=it(e.content),r=n.headless??e.globalUse?.browser?.headless;if(t.platform===`web`){if(!t.url)throw Error(`Selected web target "${e.targetName}" is missing a URL`);return{platform:`web`,url:t.url,headless:r}}return{platform:t.platform,targetName:e.targetName,useDeviceName:n.device,appState:n.appState??e.globalUse?.mobile?.appState,bundleId:t.bundleId,appPackage:t.appPackage,appActivity:t.appActivity,headless:r}}var ot=[{namespace:`runJS`,name:`document.title`,label:`Page title`},{namespace:`runJS`,name:`Date.now()`,label:`Current timestamp`},{namespace:`runJS`,name:`window.location.href`,label:`Current URL`},{namespace:`runJS`,name:`document.querySelector('...').textContent`,label:`Extract element text`}];function st(e){let[t,n]=(0,V.useState)([]),[r,i]=(0,V.useState)([]),[a,o]=(0,V.useState)([]),[s,c]=(0,V.useState)(!1);return(0,V.useEffect)(()=>{let t=!1;c(!0);let r=[j().then(e=>{t||n(e.keys)}).catch(()=>{t||n([])}),ge().then(e=>{t||i(e.hooks.map(e=>({id:e.id,name:e.name})))}).catch(()=>{t||i([])})];return e&&r.push(I(e).then(e=>{t||o(e.names)}).catch(()=>{t||o([])})),Promise.allSettled(r).then(()=>{t||c(!1)}),()=>{t=!0}},[e]),{suggestions:(0,V.useMemo)(()=>{let e=[];for(let n of t)e.push({namespace:`env`,name:n,label:`env`});for(let t of r)e.push({namespace:`runHook`,name:t.name,label:`hook`,insertValue:t.id,description:t.id});for(let t of a)e.push({namespace:`capture`,name:t,label:`captured`});return e.push(...ot),e},[t,r,a]),isLoading:s}}var ct=/^[a-zA-Z0-9._-]+$/,lt=/\.(yaml|yml)$/;function ut(e){return e.trim().replace(/\\/g,`/`).replace(/^\.\//,``)}function dt(e){let t=ut(e).replace(/[.+^${}()|[\]\\]/g,`\\$&`).replace(/\?/g,`.`).replace(/\*\*\//g,`__DIRSTAR__`).replace(/\*\*/g,`__DIRSTAR__`).replace(/\*/g,`[^/]*`).replace(/__DIRSTAR__/g,`(?:.*/)?`);return RegExp(`^${t}$`)}function ft(e,t){let n=ut(e);return t.some(e=>dt(e).test(n))}function pt(e){let t=e.trim();if(!t)return`Filename is required`;if(t.includes(`..`))return`Path must not contain '..' segments`;if(t.startsWith(`/`))return`Path must be relative, not absolute`;let n=t.split(`/`);for(let e of n){if(!e)return`Path contains empty segment (double slash)`;if(!ct.test(e))return`Path must contain only letters, numbers, hyphens, dots, underscores, and forward slashes, ending with .yaml or .yml`}let r=n[n.length-1];return lt.test(r)?null:`File must end with .yaml or .yml`}function mt(e,t,n){let r=pt(e);if(r)return r;let i=(t??[]).map(e=>e.trim()).filter(Boolean);return i.length===0?`workspace.${n} must contain at least one pattern`:ft(e.trim(),i)?null:`File path must match one of your workspace's ${n} patterns (${i.join(`, `)})`}export{J as a,Ne as c,rt as i,st as n,q as o,at as r,Pe as s,mt as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={comments:{blockComment:[`/*`,`*/`],lineComment:`//`},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`,notIn:[`string`]},{open:`[`,close:`]`,notIn:[`string`]},{open:`(`,close:`)`,notIn:[`string`]},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`]}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`<`,close:`>`}]},t={defaultToken:``,tokenPostfix:`.flow`,keywords:[`import`,`require`,`export`,`forbid`,`native`,`if`,`else`,`cast`,`unsafe`,`switch`,`default`],types:[`io`,`mutable`,`bool`,`int`,`double`,`string`,`flow`,`void`,`ref`,`true`,`false`,`with`],operators:[`=`,`>`,`<`,`<=`,`>=`,`==`,`!`,`!=`,`:=`,`::=`,`&&`,`||`,`+`,`-`,`*`,`/`,`@`,`&`,`%`,`:`,`->`,`\\`,`$`,`??`,`^`],symbols:/[@$=><!~?:&|+\-*\\\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@keywords":`keyword`,"@types":`type`,"@default":`identifier`}}],{include:`@whitespace`},[/[{}()\[\]]/,`delimiter`],[/[<>](?!@symbols)/,`delimiter`],[/@symbols/,{cases:{"@operators":`delimiter`,"@default":``}}],[/((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)/,`number`],[/[;,.]/,`delimiter`],[/"([^"\\]|\\.)*$/,`string.invalid`],[/"/,`string`,`@string`]],whitespace:[[/[ \t\r\n]+/,``],[/\/\*/,`comment`,`@comment`],[/\/\/.*$/,`comment`]],comment:[[/[^\/*]+/,`comment`],[/\*\//,`comment`,`@pop`],[/[\/*]/,`comment`]],string:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@pop`]]}};export{e as conf,t as language};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1});function t(t){return e.format(t)}export{t};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{u as e}from"./editor.api2-DEGvZ9jW.js";var t=[`assign`,`flush`,`ftl`,`return`,`global`,`import`,`include`,`break`,`continue`,`local`,`nested`,`nt`,`setting`,`stop`,`t`,`lt`,`rt`,`fallback`],n=[`attempt`,`autoesc`,`autoEsc`,`compress`,`comment`,`escape`,`noescape`,`function`,`if`,`list`,`items`,`sep`,`macro`,`noparse`,`noParse`,`noautoesc`,`noAutoEsc`,`outputformat`,`switch`,`visit`,`recurse`],r={close:`>`,id:`angle`,open:`<`},i={close:`\\]`,id:`bracket`,open:`\\[`},a={close:`[>\\]]`,id:`auto`,open:`[<\\[]`},o={close:`\\}`,id:`dollar`,open1:`\\$`,open2:`\\{`},s={close:`\\]`,id:`bracket`,open1:`\\[`,open2:`=`};function c(r){return{brackets:[[`<`,`>`],[`[`,`]`],[`(`,`)`],[`{`,`}`]],comments:{blockComment:[`${r.open}--`,`--${r.close}`]},autoCloseBefore:`
|
|
2
|
+
\r }]),.:;=`,autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`]}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`<`,close:`>`}],folding:{markers:{start:RegExp(`${r.open}#(?:${n.join(`|`)})([^/${r.close}]*(?!/)${r.close})[^${r.open}]*$`),end:RegExp(`${r.open}/#(?:${n.join(`|`)})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:RegExp(`${r.open}#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/${r.close}]*(?!/)${r.close})[^${r.open}]*$`),afterText:RegExp(`^${r.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${r.close}$`),action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`${r.open}#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/${r.close}]*(?!/)${r.close})[^${r.open}]*$`),action:{indentAction:e.IndentAction.Indent}}]}}function l(){return{brackets:[[`<`,`>`],[`[`,`]`],[`(`,`)`],[`{`,`}`]],autoCloseBefore:`
|
|
3
|
+
\r }]),.:;=`,autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`]}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`<`,close:`>`}],folding:{markers:{start:RegExp(`[<\\[]#(?:${n.join(`|`)})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:RegExp(`[<\\[]/#(?:${n.join(`|`)})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:RegExp(`[<\\[]#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:RegExp(`^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$`),action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`[<\\[]#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:e.IndentAction.Indent}}]}}function u(e,t){let n=`_${e.id}_${t.id}`,r=e=>e.replace(/__id__/g,n),i=e=>{let t=e.source.replace(/__id__/g,n);return new RegExp(t,e.flags)};return{unicode:!0,includeLF:!1,start:r(`default__id__`),ignoreCase:!1,defaultToken:`invalid`,tokenPostfix:`.freemarker2`,brackets:[{open:`{`,close:`}`,token:`delimiter.curly`},{open:`[`,close:`]`,token:`delimiter.square`},{open:`(`,close:`)`,token:`delimiter.parenthesis`},{open:`<`,close:`>`,token:`delimiter.angle`}],[r(`open__id__`)]:new RegExp(e.open),[r(`close__id__`)]:new RegExp(e.close),[r(`iOpen1__id__`)]:new RegExp(t.open1),[r(`iOpen2__id__`)]:new RegExp(t.open2),[r(`iClose__id__`)]:new RegExp(t.close),[r(`startTag__id__`)]:i(/(@open__id__)(#)/),[r(`endTag__id__`)]:i(/(@open__id__)(\/#)/),[r(`startOrEndTag__id__`)]:i(/(@open__id__)(\/?#)/),[r(`closeTag1__id__`)]:i(/((?:@blank)*)(@close__id__)/),[r(`closeTag2__id__`)]:i(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:[`false`,`true`,`in`,`as`,`using`],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/<=|>=|\\lte|\\lt|<|\\gte|\\gt|>|&&|\\and|->|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:[`->`,`->`],delimiters:[`;`,`:`,`,`,`.`],stringOperators:[`lte`,`lt`,`gte`,`gt`],noParseTags:[`noparse`,`noParse`,`comment`],tokenizer:{[r(`default__id__`)]:[{include:r(`@directive_token__id__`)},{include:r(`@interpolation_and_text_token__id__`)}],[r(`fmExpression__id__.directive`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@directive_end_token__id__`)},{include:r(`@expression_token__id__`)}],[r(`fmExpression__id__.interpolation`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@expression_token__id__`)},{include:r(`@greater_operators_token__id__`)}],[r(`inParen__id__.plain`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@directive_end_token__id__`)},{include:r(`@expression_token__id__`)}],[r(`inParen__id__.gt`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@expression_token__id__`)},{include:r(`@greater_operators_token__id__`)}],[r(`noSpaceExpression__id__`)]:[{include:r(`@no_space_expression_end_token__id__`)},{include:r(`@directive_end_token__id__`)},{include:r(`@expression_token__id__`)}],[r(`unifiedCall__id__`)]:[{include:r(`@unified_call_token__id__`)}],[r(`singleString__id__`)]:[{include:r(`@string_single_token__id__`)}],[r(`doubleString__id__`)]:[{include:r(`@string_double_token__id__`)}],[r(`rawSingleString__id__`)]:[{include:r(`@string_single_raw_token__id__`)}],[r(`rawDoubleString__id__`)]:[{include:r(`@string_double_raw_token__id__`)}],[r(`expressionComment__id__`)]:[{include:r(`@expression_comment_token__id__`)}],[r(`noParse__id__`)]:[{include:r(`@no_parse_token__id__`)}],[r(`terseComment__id__`)]:[{include:r(`@terse_comment_token__id__`)}],[r(`directive_token__id__`)]:[[i(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{cases:{"@noParseTags":{token:`tag`,next:r(`@noParse__id__.$3`)},"@default":{token:`tag`}}},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:``,next:r(`@fmExpression__id__.directive`)}]],[i(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(@open__id__)(@)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`,next:r(`@unifiedCall__id__`)}]],[i(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(@open__id__)#--/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:{token:`comment`,next:r(`@terseComment__id__`)}],[i(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag.invalid`,next:r(`@fmExpression__id__.directive`)}]]],[r(`interpolation_and_text_token__id__`)]:[[i(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:t.id===`bracket`?`@brackets.interpolation`:`delimiter.interpolation`},{token:t.id===`bracket`?`delimiter.interpolation`:`@brackets.interpolation`,next:r(`@fmExpression__id__.interpolation`)}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:`source`}]],[r(`string_single_token__id__`)]:[[/[^'\\]/,{token:`string`}],[/@escapedChar/,{token:`string.escape`}],[/'/,{token:`string`,next:`@pop`}]],[r(`string_double_token__id__`)]:[[/[^"\\]/,{token:`string`}],[/@escapedChar/,{token:`string.escape`}],[/"/,{token:`string`,next:`@pop`}]],[r(`string_single_raw_token__id__`)]:[[/[^']+/,{token:`string.raw`}],[/'/,{token:`string.raw`,next:`@pop`}]],[r(`string_double_raw_token__id__`)]:[[/[^"]+/,{token:`string.raw`}],[/"/,{token:`string.raw`,next:`@pop`}]],[r(`expression_token__id__`)]:[[/(r?)(['"])/,{cases:{"r'":[{token:`keyword`},{token:`string.raw`,next:r(`@rawSingleString__id__`)}],'r"':[{token:`keyword`},{token:`string.raw`,next:r(`@rawDoubleString__id__`)}],"'":[{token:`source`},{token:`string`,next:r(`@singleString__id__`)}],'"':[{token:`source`},{token:`string`,next:r(`@doubleString__id__`)}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:`number`},"@default":{token:`number.float`}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:`delimiter`},{token:``},{token:`identifier`}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:`meta.arrow`},"@delimiters":{token:`delimiter`},"@default":{token:`operators`}}}],[/@id/,{cases:{"@keywords":{token:`keyword.$0`},"@stringOperators":{token:`operators`},"@default":{token:`identifier`}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:`@brackets`,next:r(`@inParen__id__.gt`)},"@default":{token:`@brackets`,next:r(`@inParen__id__.plain`)}}},"\\]":{cases:{...t.id===`bracket`?{"$S2==interpolation":{token:`@brackets.interpolation`,next:`@popall`}}:{},...e.id===`bracket`?{"$S2==directive":{token:`@brackets.directive`,next:`@popall`}}:{},[r(`$S1==inParen__id__`)]:{token:`@brackets`,next:`@pop`},"@default":{token:`@brackets`}}},"\\(":{token:`@brackets`,next:r(`@inParen__id__.gt`)},"\\)":{cases:{[r(`$S1==inParen__id__`)]:{token:`@brackets`,next:`@pop`},"@default":{token:`@brackets`}}},"\\{":{cases:{"$S2==gt":{token:`@brackets`,next:r(`@inParen__id__.gt`)},"@default":{token:`@brackets`,next:r(`@inParen__id__.plain`)}}},"\\}":{cases:{...t.id===`bracket`?{}:{"$S2==interpolation":{token:`@brackets.interpolation`,next:`@popall`}},[r(`$S1==inParen__id__`)]:{token:`@brackets`,next:`@pop`},"@default":{token:`@brackets`}}}}}],[/\$\{/,{token:`delimiter.invalid`}]],[r(`blank_and_expression_comment_token__id__`)]:[[/(?:@blank)+/,{token:``}],[/[<\[][#!]--/,{token:`comment`,next:r(`@expressionComment__id__`)}]],[r(`directive_end_token__id__`)]:[[/>/,e.id===`bracket`?{token:`operators`}:{token:`@brackets.directive`,next:`@popall`}],[i(/(\/)(@close__id__)/),[{token:`delimiter.directive`},{token:`@brackets.directive`,next:`@popall`}]]],[r(`greater_operators_token__id__`)]:[[/>/,{token:`operators`}],[/>=/,{token:`operators`}]],[r(`no_space_expression_end_token__id__`)]:[[/(?:@blank)+/,{token:``,switchTo:r(`@fmExpression__id__.directive`)}]],[r(`unified_call_token__id__`)]:[[/(@id)((?:@blank)+)/,[{token:`tag`},{token:``,next:r(`@fmExpression__id__.directive`)}]],[i(/(@id)(\/?)(@close__id__)/),[{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`,next:`@popall`}]],[/./,{token:`@rematch`,next:r(`@noSpaceExpression__id__`)}]],[r(`no_parse_token__id__`)]:[[i(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:``},{token:`@brackets.directive`,next:`@popall`}],"$S2==comment":[{token:`comment`},{token:`comment`},{token:`comment`},{token:`comment`},{token:`comment`}],"@default":[{token:`source`},{token:`source`},{token:`source`},{token:`source`},{token:`source`}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:`comment`},"@default":{token:`source`}}}]],[r(`expression_comment_token__id__`)]:[[/--[>\]]/,{token:`comment`,next:`@pop`}],[/[^\->\]]+|[>\]\-]/,{token:`comment`}]],[r(`terse_comment_token__id__`)]:[[i(/--(?:@close__id__)/),{token:`comment`,next:`@popall`}],[/[^<\[\-]+|[<\[\-]/,{token:`comment`}]]}}}function d(e){let t=u(r,e),n=u(i,e),o=u(a,e);return{...t,...n,...o,unicode:!0,includeLF:!1,start:`default_auto_${e.id}`,ignoreCase:!1,defaultToken:`invalid`,tokenPostfix:`.freemarker2`,brackets:[{open:`{`,close:`}`,token:`delimiter.curly`},{open:`[`,close:`]`,token:`delimiter.square`},{open:`(`,close:`)`,token:`delimiter.parenthesis`},{open:`<`,close:`>`,token:`delimiter.angle`}],tokenizer:{...t.tokenizer,...n.tokenizer,...o.tokenizer}}}var f={conf:c(r),language:u(r,o)},p={conf:c(i),language:u(i,o)},m={conf:c(r),language:u(r,s)},h={conf:c(i),language:u(i,s)},g={conf:l(),language:d(o)},_={conf:l(),language:d(s)};export{m as TagAngleInterpolationBracket,f as TagAngleInterpolationDollar,_ as TagAutoInterpolationBracket,g as TagAutoInterpolationDollar,h as TagBracketInterpolationBracket,p as TagBracketInterpolationDollar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={comments:{lineComment:`//`,blockComment:[`(*`,`*)`]},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],folding:{markers:{start:RegExp(`^\\s*//\\s*#region\\b|^\\s*\\(\\*\\s*#region(.*)\\*\\)`),end:RegExp(`^\\s*//\\s*#endregion\\b|^\\s*\\(\\*\\s*#endregion\\s*\\*\\)`)}}},t={defaultToken:``,tokenPostfix:`.fs`,keywords:`abstract.and.atomic.as.assert.asr.base.begin.break.checked.component.const.constraint.constructor.continue.class.default.delegate.do.done.downcast.downto.elif.else.end.exception.eager.event.external.extern.false.finally.for.fun.function.fixed.functor.global.if.in.include.inherit.inline.interface.internal.land.lor.lsl.lsr.lxor.lazy.let.match.member.mod.module.mutable.namespace.method.mixin.new.not.null.of.open.or.object.override.private.parallel.process.protected.pure.public.rec.return.static.sealed.struct.sig.then.to.true.tailcall.trait.try.type.upcast.use.val.void.virtual.volatile.when.while.with.yield`.split(`.`),symbols:/[=><!~?:&|+\-*\^%;\.,\/]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,integersuffix:/[uU]?[yslnLI]?/,floatsuffix:/[fFmM]?/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@keywords":{token:`keyword.$0`},"@default":`identifier`}}],{include:`@whitespace`},[/\[<.*>\]/,`annotation`],[/^#(if|else|endif)/,`keyword`],[/[{}()\[\]]/,`@brackets`],[/[<>](?!@symbols)/,`@brackets`],[/@symbols/,`delimiter`],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,`number.float`],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,`number.float`],[/0x[0-9a-fA-F]+LF/,`number.float`],[/0x[0-9a-fA-F]+(@integersuffix)/,`number.hex`],[/0b[0-1]+(@integersuffix)/,`number.bin`],[/\d+(@integersuffix)/,`number`],[/[;,.]/,`delimiter`],[/"([^"\\]|\\.)*$/,`string.invalid`],[/"""/,`string`,`@string."""`],[/"/,`string`,`@string."`],[/\@"/,{token:`string.quote`,next:`@litstring`}],[/'[^\\']'B?/,`string`],[/(')(@escapes)(')/,[`string`,`string.escape`,`string`]],[/'/,`string.invalid`]],whitespace:[[/[ \t\r\n]+/,``],[/\(\*(?!\))/,`comment`,`@comment`],[/\/\/.*$/,`comment`]],comment:[[/[^*(]+/,`comment`],[/\*\)/,`comment`,`@pop`],[/\*/,`comment`],[/\(\*\)/,`comment`],[/\(/,`comment`]],string:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/("""|"B?)/,{cases:{"$#==$S2":{token:`string`,next:`@pop`},"@default":`string`}}]],litstring:[[/[^"]+/,`string`],[/""/,`string.escape`],[/"/,{token:`string.quote`,next:`@pop`}]]}};export{e as conf,t as language};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={comments:{lineComment:`//`,blockComment:[`/*`,`*/`]},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:"`",close:"`",notIn:[`string`]},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`,`comment`]}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:"`",close:"`"},{open:`"`,close:`"`},{open:`'`,close:`'`}]},t={defaultToken:``,tokenPostfix:`.go`,keywords:`break.case.chan.const.continue.default.defer.else.fallthrough.for.func.go.goto.if.import.interface.map.package.range.return.select.struct.switch.type.var.bool.true.false.uint8.uint16.uint32.uint64.int8.int16.int32.int64.float32.float64.complex64.complex128.byte.rune.uint.int.uintptr.string.nil`.split(`.`),operators:`+ - * / % & | ^ << >> &^ += -= *= /= %= &= |= ^= <<= >>= &^= && || <- ++ -- == < > = ! != <= >= := ... ( ) ] { } , ; . :`.split(` `),symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@keywords":{token:`keyword.$0`},"@default":`identifier`}}],{include:`@whitespace`},[/\[\[.*\]\]/,`annotation`],[/^\s*#\w+/,`keyword`],[/[{}()\[\]]/,`@brackets`],[/[<>](?!@symbols)/,`@brackets`],[/@symbols/,{cases:{"@operators":`delimiter`,"@default":``}}],[/\d*\d+[eE]([\-+]?\d+)?/,`number.float`],[/\d*\.\d+([eE][\-+]?\d+)?/,`number.float`],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,`number.hex`],[/0[0-7']*[0-7]/,`number.octal`],[/0[bB][0-1']*[0-1]/,`number.binary`],[/\d[\d']*/,`number`],[/\d/,`number`],[/[;,.]/,`delimiter`],[/"([^"\\]|\\.)*$/,`string.invalid`],[/"/,`string`,`@string`],[/`/,`string`,`@rawstring`],[/'[^\\']'/,`string`],[/(')(@escapes)(')/,[`string`,`string.escape`,`string`]],[/'/,`string.invalid`]],whitespace:[[/[ \t\r\n]+/,``],[/\/\*\*(?!\/)/,`comment.doc`,`@doccomment`],[/\/\*/,`comment`,`@comment`],[/\/\/.*$/,`comment`]],comment:[[/[^\/*]+/,`comment`],[/\*\//,`comment`,`@pop`],[/[\/*]/,`comment`]],doccomment:[[/[^\/*]+/,`comment.doc`],[/\/\*/,`comment.doc.invalid`],[/\*\//,`comment.doc`,`@pop`],[/[\/*]/,`comment.doc`]],string:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@pop`]],rawstring:[[/[^\`]/,`string`],[/`/,`string`,`@pop`]]}};export{e as conf,t as language};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={comments:{lineComment:`#`},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"""`,close:`"""`,notIn:[`string`,`comment`]},{open:`"`,close:`"`,notIn:[`string`,`comment`]}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"""`,close:`"""`},{open:`"`,close:`"`}],folding:{offSide:!0}},t={defaultToken:`invalid`,tokenPostfix:`.gql`,keywords:[`null`,`true`,`false`,`query`,`mutation`,`subscription`,`extend`,`schema`,`directive`,`scalar`,`type`,`interface`,`union`,`enum`,`input`,`implements`,`fragment`,`on`],typeKeywords:[`Int`,`Float`,`String`,`Boolean`,`ID`],directiveLocations:[`SCHEMA`,`SCALAR`,`OBJECT`,`FIELD_DEFINITION`,`ARGUMENT_DEFINITION`,`INTERFACE`,`UNION`,`ENUM`,`ENUM_VALUE`,`INPUT_OBJECT`,`INPUT_FIELD_DEFINITION`,`QUERY`,`MUTATION`,`SUBSCRIPTION`,`FIELD`,`FRAGMENT_DEFINITION`,`FRAGMENT_SPREAD`,`INLINE_FRAGMENT`,`VARIABLE_DEFINITION`],operators:[`=`,`!`,`?`,`:`,`&`,`|`],symbols:/[=!?:&|]+/,escapes:/\\(?:["\\\/bfnrt]|u[0-9A-Fa-f]{4})/,tokenizer:{root:[[/[a-z_][\w$]*/,{cases:{"@keywords":`keyword`,"@default":`key.identifier`}}],[/[$][\w$]*/,{cases:{"@keywords":`keyword`,"@default":`argument.identifier`}}],[/[A-Z][\w\$]*/,{cases:{"@typeKeywords":`keyword`,"@default":`type.identifier`}}],{include:`@whitespace`},[/[{}()\[\]]/,`@brackets`],[/@symbols/,{cases:{"@operators":`operator`,"@default":``}}],[/@\s*[a-zA-Z_\$][\w\$]*/,{token:`annotation`,log:`annotation token: $0`}],[/\d*\.\d+([eE][\-+]?\d+)?/,`number.float`],[/0[xX][0-9a-fA-F]+/,`number.hex`],[/\d+/,`number`],[/[;,.]/,`delimiter`],[/"""/,{token:`string`,next:`@mlstring`,nextEmbedded:`markdown`}],[/"([^"\\]|\\.)*$/,`string.invalid`],[/"/,{token:`string.quote`,bracket:`@open`,next:`@string`}]],mlstring:[[/[^"]+/,`string`],[`"""`,{token:`string`,next:`@pop`,nextEmbedded:`@pop`}]],string:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,{token:`string.quote`,bracket:`@close`,next:`@pop`}]],whitespace:[[/[ \t\r\n]+/,``],[/#.*$/,`comment`]]}};export{e as conf,t as language};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{qn as e}from"./index-B3xPCIyH.js";var t=e(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as e}from"./editor.api2-DEGvZ9jW.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[`{{!--`,`--}}`]},brackets:[[`<!--`,`-->`],[`<`,`>`],[`{{`,`}}`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`<`,close:`>`},{open:`"`,close:`"`},{open:`'`,close:`'`}],onEnterRules:[{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}]},r={defaultToken:``,tokenPostfix:``,tokenizer:{root:[[/\{\{!--/,`comment.block.start.handlebars`,`@commentBlock`],[/\{\{!/,`comment.start.handlebars`,`@comment`],[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.root`}],[/<!DOCTYPE/,`metatag.html`,`@doctype`],[/<!--/,`comment.html`,`@commentHtml`],[/(<)(\w+)(\/>)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/(<)(script)/,[`delimiter.html`,{token:`tag.html`,next:`@script`}]],[/(<)(style)/,[`delimiter.html`,{token:`tag.html`,next:`@style`}]],[/(<)([:\w]+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/(<\/)(\w+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/</,`delimiter.html`],[/\{/,`delimiter.html`],[/[^<{]+/]],doctype:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.comment`}],[/[^>]+/,`metatag.content.html`],[/>/,`metatag.html`,`@pop`]],comment:[[/\}\}/,`comment.end.handlebars`,`@pop`],[/./,`comment.content.handlebars`]],commentBlock:[[/--\}\}/,`comment.block.end.handlebars`,`@pop`],[/./,`comment.content.handlebars`]],commentHtml:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.comment`}],[/-->/,`comment.html`,`@pop`],[/[^-]+/,`comment.content.html`],[/./,`comment.content.html`]],otherTag:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.otherTag`}],[/\/?>/,`delimiter.html`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.script`}],[/type/,`attribute.name`,`@scriptAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],scriptAfterType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.scriptAfterType`}],[/=/,`delimiter`,`@scriptAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptAfterTypeEquals:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.scriptAfterTypeEquals`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptWithCustomType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.scriptWithCustomType.$S2`}],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptEmbedded:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInEmbeddedState.scriptEmbedded.$S2`,nextEmbedded:`@pop`}],[/<\/script/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}]],style:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.style`}],[/type/,`attribute.name`,`@styleAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],styleAfterType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.styleAfterType`}],[/=/,`delimiter`,`@styleAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleAfterTypeEquals:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.styleAfterTypeEquals`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleWithCustomType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.styleWithCustomType.$S2`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleEmbedded:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInEmbeddedState.styleEmbedded.$S2`,nextEmbedded:`@pop`}],[/<\/style/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}]],handlebarsInSimpleState:[[/\{\{\{?/,`delimiter.handlebars`],[/\}\}\}?/,{token:`delimiter.handlebars`,switchTo:`@$S2.$S3`}],{include:`handlebarsRoot`}],handlebarsInEmbeddedState:[[/\{\{\{?/,`delimiter.handlebars`],[/\}\}\}?/,{token:`delimiter.handlebars`,switchTo:`@$S2.$S3`,nextEmbedded:`$S3`}],{include:`handlebarsRoot`}],handlebarsRoot:[[/"[^"]*"/,`string.handlebars`],[/[#/][^\s}]+/,`keyword.helper.handlebars`],[/else\b/,`keyword.helper.handlebars`],[/[\s]+/],[/[^}]/,`variable.parameter.handlebars`]]}};export{n as conf,r as language};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={comments:{lineComment:`#`,blockComment:[`/*`,`*/`]},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`}]},t={defaultToken:``,tokenPostfix:`.hcl`,keywords:[`var`,`local`,`path`,`for_each`,`any`,`string`,`number`,`bool`,`true`,`false`,`null`,`if `,`else `,`endif `,`for `,`in`,`endfor`],operators:[`=`,`>=`,`<=`,`==`,`!=`,`+`,`-`,`*`,`/`,`%`,`&&`,`||`,`!`,`<`,`>`,`?`,`...`,`:`],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,terraformFunctions:/(abs|ceil|floor|log|max|min|pow|signum|chomp|format|formatlist|indent|join|lower|regex|regexall|replace|split|strrev|substr|title|trimspace|upper|chunklist|coalesce|coalescelist|compact|concat|contains|distinct|element|flatten|index|keys|length|list|lookup|map|matchkeys|merge|range|reverse|setintersection|setproduct|setunion|slice|sort|transpose|values|zipmap|base64decode|base64encode|base64gzip|csvdecode|jsondecode|jsonencode|urlencode|yamldecode|yamlencode|abspath|dirname|pathexpand|basename|file|fileexists|fileset|filebase64|templatefile|formatdate|timeadd|timestamp|base64sha256|base64sha512|bcrypt|filebase64sha256|filebase64sha512|filemd5|filemd1|filesha256|filesha512|md5|rsadecrypt|sha1|sha256|sha512|uuid|uuidv5|cidrhost|cidrnetmask|cidrsubnet|tobool|tolist|tomap|tonumber|toset|tostring)/,terraformMainBlocks:/(module|data|terraform|resource|provider|variable|output|locals)/,tokenizer:{root:[[/^@terraformMainBlocks([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)(\{)/,[`type`,``,`string`,``,`string`,``,`@brackets`]],[/(\w+[ \t]+)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)(\{)/,[`identifier`,``,`string`,``,`string`,``,`@brackets`]],[/(\w+[ \t]+)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)([\w-]+|"[\w-]+"|)(=)(\{)/,[`identifier`,``,`string`,``,`operator`,``,`@brackets`]],{include:`@terraform`}],terraform:[[/@terraformFunctions(\()/,[`type`,`@brackets`]],[/[a-zA-Z_]\w*-*/,{cases:{"@keywords":{token:`keyword.$0`},"@default":`variable`}}],{include:`@whitespace`},{include:`@heredoc`},[/[{}()\[\]]/,`@brackets`],[/[<>](?!@symbols)/,`@brackets`],[/@symbols/,{cases:{"@operators":`operator`,"@default":``}}],[/\d*\d+[eE]([\-+]?\d+)?/,`number.float`],[/\d*\.\d+([eE][\-+]?\d+)?/,`number.float`],[/\d[\d']*/,`number`],[/\d/,`number`],[/[;,.]/,`delimiter`],[/"/,`string`,`@string`],[/'/,`invalid`]],heredoc:[[/<<[-]*\s*["]?([\w\-]+)["]?/,{token:`string.heredoc.delimiter`,next:`@heredocBody.$1`}]],heredocBody:[[/([\w\-]+)$/,{cases:{"$1==$S2":[{token:`string.heredoc.delimiter`,next:`@popall`}],"@default":`string.heredoc`}}],[/./,`string.heredoc`]],whitespace:[[/[ \t\r\n]+/,``],[/\/\*/,`comment`,`@comment`],[/\/\/.*$/,`comment`],[/#.*$/,`comment`]],comment:[[/[^\/*]+/,`comment`],[/\*\//,`comment`,`@pop`],[/[\/*]/,`comment`]],string:[[/\$\{/,{token:`delimiter`,next:`@stringExpression`}],[/[^\\"\$]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@popall`]],stringInsideExpression:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@pop`]],stringExpression:[[/\}/,{token:`delimiter`,next:`@pop`}],[/"/,`string`,`@stringInsideExpression`],{include:`@terraform`}]}};export{e as conf,t as language};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./chunk-CilyBKbf.js";import{i as t,n,o as r,s as ee,t as te}from"./select-B5gV6YUf.js";import{t as ne}from"./monaco-editor-CDJrOpKK.js";import{t as re}from"./refresh-cw-v_0wwa0P.js";import{t as ie}from"./use-page-title-CK82kWb2.js";import{a as i,t as a}from"./dist-DFSjTjXY.js";import{t as ae}from"./scroll-area-DfPMtFw0.js";import{t as oe}from"./switch-BOdp7A9U.js";import{A as se,Ct as ce,Ht as le,Jt as ue,Pn as de,Qn as o,S as s,T as fe,Ut as c,Vt as l,W as pe,Zn as u,cr as me,fr as d,r as he,sr as ge}from"./index-B3xPCIyH.js";import{i as _e,n as f,r as ve,t as ye}from"./hook-runtime-ChJ0-jZo.js";import{a as be,i as xe,n as Se,o as Ce,r as we,t as Te}from"./use-hook-run-session-Cjqu9VED.js";import{t as Ee}from"./empty-state-Dluv5C1Q.js";var p=e(d(),1),m=u();function De({title:e,body:t,tone:n=`warning`,children:r}){return(0,m.jsxs)(`div`,{className:`rounded-sm border px-4 py-3 text-sm ${n===`error`?`border-destructive/30 bg-destructive/10`:n===`neutral`?`border-border bg-muted/40`:`border-amber-500/30 bg-amber-500/10`}`,children:[(0,m.jsx)(`div`,{className:`font-medium text-foreground`,children:e}),(0,m.jsx)(`div`,{className:`mt-1 text-muted-foreground`,children:t}),r?(0,m.jsx)(`div`,{className:`mt-3`,children:r}):null]})}function Oe(e){if(e===0)return`0ms`;for(let t of[{suffix:`d`,value:864e5},{suffix:`h`,value:36e5},{suffix:`m`,value:6e4},{suffix:`s`,value:1e3}])if(e%t.value===0)return`${e/t.value}${t.suffix}`;return`${e}ms`}function h(e){return JSON.stringify({name:e.name,runtime:e.runtime,file:e.file,timeout:e.timeout,network:e.network,source:e.source})}function g(e,t){return e.find(e=>e.field===t)??null}function ke(e){return Array.isArray(e)}function Ae(e){switch(e){case`javascript`:return`JavaScript`;case`typescript`:return`TypeScript`;case`python`:return`Python`;case`shell`:return`Shell`;default:return e}}function _(){let{id:e}=me(),u=ge(),d=ue(),_=!e,v=e??``,y=(0,p.useMemo)(()=>f(`node`),[]),b=(0,p.useRef)(_?a():v),[x,S]=(0,p.useState)(b.current),[C,w]=(0,p.useState)(``),[T,E]=(0,p.useState)(`node`),[D,O]=(0,p.useState)(y.file),[k,A]=(0,p.useState)(`30s`),[j,M]=(0,p.useState)(!0),[N,P]=(0,p.useState)(y.source),[F,I]=(0,p.useState)([]),[je,L]=(0,p.useState)(!_),[Me,R]=(0,p.useState)(!1),[Ne,Pe]=(0,p.useState)(!1),[Fe,z]=(0,p.useState)(null),[Ie,B]=(0,p.useState)([]),[Le,V]=(0,p.useState)(null),[Re,ze]=(0,p.useState)(!1),[Be,Ve]=(0,p.useState)(!1),[He,Ue]=(0,p.useState)(()=>h({name:``,runtime:`node`,file:y.file,timeout:`30s`,network:!0,source:y.source})),H=(0,p.useRef)(y.file),U=(0,p.useRef)(y.source);ie(_?`New Hook`:C.trim()||`Hook`);let W=h({name:C,runtime:T,file:D,timeout:k,network:j,source:N})!==He,We=F.find(e=>e.code===`file_missing`)??null,G=Te({hookId:x}),K=_e(T),Ge=Ae(K),q=(0,p.useMemo)(()=>_||!x||W?`Save this hook to run the latest changes.`:F.length>0?F.map(e=>e.message).join(` `):null,[F,x,_,W]);(0,p.useEffect)(()=>{if(_){S(b.current),R(!1);return}let e=!1;return L(!0),pe(v).then(t=>{if(e)return;let n=Oe(t.hook.timeout),r=t.source??``;S(t.hook.id),w(t.hook.name),E(t.hook.runtime),O(t.hook.file),A(n),M(t.hook.network),P(r),I(t.fieldErrors),z(null),V(null),B([]),R(!1),Ue(h({name:t.hook.name,runtime:t.hook.runtime,file:t.hook.file,timeout:n,network:t.hook.network,source:r})),H.current=t.hook.file,U.current=r}).catch(t=>{if(!e){if(t instanceof s&&t.status===404){R(!0);return}z(t instanceof Error?t.message:`Failed to load hook`)}}).finally(()=>{e||L(!1)}),()=>{e=!0}},[_,v]);function Ke(e){if(_){let t=f(e,C);(D===H.current||!D.trim())&&O(t.file),(N===U.current||!N.trim())&&P(t.source),H.current=t.file,U.current=t.source}E(e)}function qe(e){if(w(e),!_)return;let t=f(T,e);(D===H.current||!D.trim())&&O(t.file),H.current=t.file}function Je(){if(!_)return;let e=a();b.current=e,S(e)}async function Ye(){Pe(!0),z(null),V(null),B([]);let e={hook:{id:x,name:C.trim(),runtime:T,file:D.trim(),timeout:k.trim(),network:j},source:N};try{let t=_?await fe(e):await ce(x,e),n=Oe(t.hook.timeout),r=t.source??N;S(t.hook.id),w(t.hook.name),E(t.hook.runtime),O(t.hook.file),A(n),M(t.hook.network),P(r),I(t.fieldErrors),Ue(h({name:t.hook.name,runtime:t.hook.runtime,file:t.hook.file,timeout:n,network:t.hook.network,source:r})),H.current=t.hook.file,U.current=r,_&&u(o.hookEdit(t.hook.id),{replace:!0})}catch(e){if(e instanceof s){let t=e.payload?.error,n=e.payload?.fieldErrors;t===`validation_failed`&&ke(n)?(I(n),z(`Couldn't save this hook. Fix the highlighted issues and try again.`)):z(e.message)}else z(e instanceof Error?e.message:`Failed to save hook`)}finally{Pe(!1)}}async function Xe(e=!1){if(!(_||!x)){ze(!0),V(null);try{await se(x,{force:e}),u(o.hooks)}catch(e){if(e instanceof s){let t=e.payload?.error,n=e.payload?.references;if(t===`hook_in_use`&&Array.isArray(n)){B(n);return}V(e.message)}else V(e instanceof Error?e.message:`Failed to delete hook`)}finally{ze(!1)}}}function Ze(){V(null),B([]),Ve(!0)}function Qe(e){Ve(e),e||(V(null),B([]))}async function $e(){q||await G.submitRun()}if(je)return(0,m.jsx)(he,{});if(Me)return(0,m.jsx)(Ee,{icon:de,title:`Hook not found`,description:`This hook doesn't exist or could not be loaded.`,actionLabel:`View All Hooks`,onAction:()=>u(o.hooks)});let J=g(F,`name`),Y=g(F,`runtime`),X=g(F,`file`),Z=g(F,`timeout`),Q=g(F,`network`),$=(0,m.jsxs)(`div`,{className:c(`p-3`,d?`space-y-3`:`flex h-full min-h-0 flex-col gap-3 overflow-hidden`),children:[(0,m.jsxs)(`div`,{className:`space-y-3 shrink-0`,children:[Fe?(0,m.jsx)(De,{title:`Couldn't save this hook.`,body:Fe,tone:`error`}):null,We?(0,m.jsx)(De,{title:`Hook file missing`,body:`This hook is still registered, but its source file can't be found. Update the path or recreate the file, then save again.`}):null,(0,m.jsxs)(`section`,{className:`space-y-3`,children:[(0,m.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,m.jsx)(i,{htmlFor:`hook-name`,children:`Hook name`}),(0,m.jsx)(l,{id:`hook-name`,value:C,onChange:e=>qe(e.currentTarget.value),placeholder:`Capture auth session`,"aria-invalid":!!J}),J?(0,m.jsx)(`p`,{className:`text-xs text-destructive`,children:J.message}):null]}),_?(0,m.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,m.jsx)(i,{htmlFor:`hook-id`,children:`Hook ID`}),(0,m.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,m.jsx)(l,{id:`hook-id`,value:x,readOnly:!0,disabled:!0,"aria-label":`Hook ID`}),(0,m.jsx)(le,{type:`button`,variant:`ghost`,size:`icon-sm`,onClick:Je,"aria-label":`Generate new hook ID`,children:(0,m.jsx)(re,{className:`size-3.5`})})]})]}):null,(0,m.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,m.jsx)(i,{htmlFor:`hook-file`,children:`File path`}),(0,m.jsx)(l,{id:`hook-file`,value:D,onChange:e=>O(e.currentTarget.value),placeholder:`./hooks/login.js`,"aria-invalid":!!X}),X?(0,m.jsx)(`p`,{className:`text-xs text-destructive`,children:X.message}):null]}),(0,m.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-[minmax(0,1fr)_minmax(0,0.8fr)_minmax(0,0.8fr)]`,children:[(0,m.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,m.jsx)(i,{htmlFor:`hook-runtime`,children:`Runtime`}),(0,m.jsxs)(te,{value:T,onValueChange:e=>Ke(e),children:[(0,m.jsx)(r,{id:`hook-runtime`,"aria-invalid":!!Y,children:(0,m.jsx)(ee,{placeholder:`Runtime`})}),(0,m.jsx)(n,{children:ye.map(e=>(0,m.jsx)(t,{value:e,children:ve(e).label},e))})]}),Y?(0,m.jsx)(`p`,{className:`text-xs text-destructive`,children:Y.message}):null]}),(0,m.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,m.jsx)(i,{htmlFor:`hook-timeout`,children:`Timeout`}),(0,m.jsx)(l,{id:`hook-timeout`,value:k,onChange:e=>A(e.currentTarget.value),placeholder:`5s`,"aria-invalid":!!Z}),(0,m.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Examples: 5s, 10m, 250ms`}),Z?(0,m.jsx)(`p`,{className:`text-xs text-destructive`,children:Z.message}):null]}),(0,m.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,m.jsx)(i,{htmlFor:`hook-network`,children:`Network`}),(0,m.jsxs)(`div`,{className:`flex h-10 items-center justify-between rounded-sm border bg-background/70 px-3`,children:[(0,m.jsx)(`span`,{className:`text-sm text-foreground`,children:j?`Enabled`:`Disabled`}),(0,m.jsx)(oe,{id:`hook-network`,checked:j,onCheckedChange:M,"aria-invalid":!!Q})]}),Q?(0,m.jsx)(`p`,{className:`text-xs text-destructive`,children:Q.message}):null]})]})]})]}),(0,m.jsxs)(`section`,{className:c(`space-y-2`,d?``:`flex min-h-[300px] flex-1 flex-col overflow-hidden`),children:[(0,m.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,m.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Source`}),(0,m.jsx)(`span`,{className:`rounded-sm border px-1.5 py-0.5 text-[11px] text-muted-foreground`,children:Ge})]}),(0,m.jsx)(ne,{value:N,onChange:P,onSave:Ye,language:K,className:c(`rounded-sm`,d?`h-[360px] min-h-[320px]`:`h-full min-h-[300px] flex-1`)})]})]}),et=d?(0,m.jsx)(ae,{className:`h-full`,children:$}):$,tt=(0,m.jsx)(we,{baselineCount:G.baselineVariables.length,baselineFilePath:G.baselineFilePath,baselineInfo:G.baselineInfo,isBaselineLoading:G.isBaselineLoading,overrideRows:G.overrideRows,overridingRowIds:G.overridingRowIds,recentRuns:G.recentRuns,selectedRunId:G.selectedRunId,isRunning:G.isRunning,runDisabledReason:q,runError:G.runError,onAddOverride:()=>G.addOverrideRow(),onUpdateOverride:G.updateOverrideRow,onRemoveOverride:G.removeOverrideRow,onRun:()=>{$e()},onSelectRun:G.selectRun}),nt=(0,m.jsx)(xe,{selectedRun:G.selectedRun});return(0,m.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:[(0,m.jsx)(be,{hookName:C.trim()||`New Hook`,isCreateMode:_,mode:`edit`,hookHref:_?void 0:o.hookView(x),editHref:_?void 0:o.hookEdit(x),unsaved:W,isSaving:Ne,isRunning:G.isRunning,isDeleting:Re,onSave:Ye,onRun:_?void 0:()=>{$e()},runDisabled:!!q,onDelete:_?void 0:Ze}),(0,m.jsx)(Se,{isMobile:d,leftPane:et,rightTopPane:tt,rightBottomPane:nt}),_?null:(0,m.jsx)(Ce,{open:Be,onOpenChange:Qe,hook:{id:x,name:C.trim()||`Hook`,runtime:T,file:D},isDeleting:Re,deleteError:Le,blockedReferences:Ie,onDelete:()=>{Xe(!1)},onForceDelete:()=>{Xe(!0)}})]})}export{_ as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{r as e}from"./chunk-CilyBKbf.js";import{Zn as t,fr as n}from"./index-B3xPCIyH.js";var r=e(n(),1),i={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},a=r.createContext&&r.createContext(i),o=[`attr`,`size`,`title`];function s(e,t){if(e==null)return{};var n,r,i=c(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function c(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(null,arguments)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?u(Object(n),!0).forEach(function(t){f(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function f(e,t,n){return(t=p(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){var t=m(e,`string`);return typeof t==`symbol`?t:t+``}function m(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function h(e){return e&&e.map((e,t)=>r.createElement(e.tag,d({key:t},e.attr),h(e.child)))}function g(e){return t=>r.createElement(_,l({attr:d({},e.attr)},t),h(e.child))}function _(e){var t=t=>{var{attr:n,size:i,title:a}=e,c=s(e,o),u=i||t.size||`1em`,f;return t.className&&(f=t.className),e.className&&(f=(f?f+` `:``)+e.className),r.createElement(`svg`,l({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},t.attr,n,c,{className:f,style:d(d({color:e.color||t.color},t.style),e.style),height:u,width:u,xmlns:`http://www.w3.org/2000/svg`}),a&&r.createElement(`title`,null,a),e.children)};return a===void 0?t(i):r.createElement(a.Consumer,null,e=>t(e))}function v(e){return g({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M432 32H80a64.07 64.07 0 0 0-64 64v320a64.07 64.07 0 0 0 64 64h352a64.07 64.07 0 0 0 64-64V96a64.07 64.07 0 0 0-64-64zM96 256a16 16 0 0 1-10-28.49L150.39 176 86 124.49a16 16 0 1 1 20-25l80 64a16 16 0 0 1 0 25l-80 64A16 16 0 0 1 96 256zm160 0h-64a16 16 0 0 1 0-32h64a16 16 0 0 1 0 32z`},child:[]}]})(e)}function y(e){return g({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M314 36.38c-18.59-3.06-45.8-4.47-64.27-4.38a311.09 311.09 0 0 0-51.66 4.38c-45.74 8-54.07 24.7-54.07 55.54V128h112v16H107.62C66.06 144 32.33 193.67 32 255.12v.88a162.91 162.91 0 0 0 3.13 32c9.29 46.28 38.23 80 72.49 80H128v-54c0-31.3 20.84-59.95 55-66.1l9.87-1.23H314a56.05 56.05 0 0 0 15.06-2A52.48 52.48 0 0 0 368 193.68V91.92c0-28.92-24.68-50.73-54-55.54zM194.93 105.5a20.37 20.37 0 1 1 20.3-20.3 20.29 20.29 0 0 1-20.3 20.3z`},child:[]},{tag:`path`,attr:{d:`M475.28 217c-10.7-42.61-38.41-73-70.9-73h-17.71v47.45c0 39.57-26 68.22-57.74 73.13a63.54 63.54 0 0 1-9.69.75H198.08a60 60 0 0 0-15.23 1.95C160.54 273.14 144 291.7 144 315.77v101.77c0 29 29.14 46 57.73 54.31 34.21 9.95 71.48 11.75 112.42 0 27.19-7.77 53.85-23.48 53.85-54.31V384H256v-16h148.38c29.44 0 54.95-24.93 67.45-61.31A156.83 156.83 0 0 0 480 256a160.64 160.64 0 0 0-4.72-39zM316.51 404a20.37 20.37 0 1 1-20.3 20.3 20.29 20.29 0 0 1 20.3-20.3z`},child:[]}]})(e)}function b(e){return g({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M429.76 130.07 274.33 36.85a37 37 0 0 0-36.65 0L82.24 130.06A38.2 38.2 0 0 0 64 162.83V349a38.26 38.26 0 0 0 18.24 32.8L123 406.14l.23.13c20.58 10.53 28.46 10.53 37.59 10.53 32.14 0 52.11-20.8 52.11-54.29V182a8.51 8.51 0 0 0-8.42-8.58h-22.38a8.51 8.51 0 0 0-8.42 8.58v180.51a15 15 0 0 1-6.85 13.07c-5.9 3.6-14.47 2.84-24.14-2.15l-39.06-23.51a1.1 1.1 0 0 1-.48-.92V165.46a1.32 1.32 0 0 1 .59-1.06l151.84-93a.82.82 0 0 1 .73 0l151.93 93a1.34 1.34 0 0 1 .55 1.1V349a1.28 1.28 0 0 1-.45 1l-152.06 90.65a1.22 1.22 0 0 1-.8 0l-38.83-23.06a7.8 7.8 0 0 0-7.83-.41l-.34.2c-10.72 6.35-13.6 8-23.54 11.62-1.62.59-5.43 2-5.76 5.77s3.29 6.45 6.51 8.32l51.9 31.87a35.67 35.67 0 0 0 18.3 5.07h.58a35.87 35.87 0 0 0 17.83-5.07l155.43-93.13A38.37 38.37 0 0 0 448 349V162.83a38.21 38.21 0 0 0-18.24-32.76z`},child:[]},{tag:`path`,attr:{d:`M307.88 318.05c-37.29 0-45.24-10.42-47.6-27.24a8.43 8.43 0 0 0-8.22-7.32h-19.8a8.44 8.44 0 0 0-8.26 8.58c0 14.58 5.12 62.17 83.92 62.17 24.38 0 44.66-5.7 58.63-16.49S388 311.26 388 292.55c0-37.55-24.5-47.83-72.75-54.55-49.05-6.82-49.05-10.29-49.05-17.89 0-5.47 0-18.28 35.46-18.28 25.23 0 38.74 3.19 43.06 20a8.35 8.35 0 0 0 8.06 6.67h19.87a8.24 8.24 0 0 0 6.16-2.86 8.91 8.91 0 0 0 2.12-6.44c-2.57-35.55-28.56-53.58-79.24-53.58-46.06 0-73.55 20.75-73.55 55.5 0 38.1 28.49 48.87 71.29 53.33 50 5.17 50 12.71 50 19.37.03 10.38-4.28 24.23-41.55 24.23z`},child:[]}]})(e)}var x=t();function S({className:e}){return(0,x.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,className:e,children:(0,x.jsx)(`path`,{fill:`currentColor`,d:`M11.966 22.566c6.609 0 11.966-4.326 11.966-9.661 0-3.308-2.051-6.23-5.204-7.963-1.283-.713-2.291-1.353-3.13-1.885-1.58-1.004-2.555-1.623-3.632-1.623-1.094 0-2.327.783-3.955 1.816a49.78 49.78 0 0 1-2.808 1.692C2.051 6.675 0 9.597 0 12.905c0 5.335 5.357 9.66 11.966 9.66Zm-1.397-17.83a5.885 5.885 0 0 0 .497-2.403c0-.144.201-.186.229-.028.656 2.775-.9 4.15-2.051 4.61-.124.048-.199-.12-.103-.208a5.748 5.748 0 0 0 1.428-1.971Zm2.052-.102a5.795 5.795 0 0 0-.78-2.3v-.015c-.068-.123.086-.263.185-.172 1.956 2.105 1.303 4.055.554 5.037-.082.102-.229-.003-.188-.126a5.837 5.837 0 0 0 .229-2.424Zm1.771-.559a5.708 5.708 0 0 0-1.607-1.801V2.26c-.112-.085-.024-.274.113-.218 2.588 1.084 2.766 3.171 2.452 4.395a.116.116 0 0 1-.048.071.11.11 0 0 1-.153-.026.118.118 0 0 1-.022-.083 5.864 5.864 0 0 0-.735-2.324Zm-5.072.559c-.616.544-1.279.758-2.058.997-.116 0-.194-.078-.155-.18 1.747-.907 2.369-1.645 2.99-2.771 0 0 .155-.117.188.085 0 .303-.348 1.325-.965 1.869Zm4.931 11.205a2.949 2.949 0 0 1-.935 1.549 2.16 2.16 0 0 1-1.282.618 2.167 2.167 0 0 1-1.323-.618 2.95 2.95 0 0 1-.923-1.549.243.243 0 0 1 .064-.197.23.23 0 0 1 .192-.069h3.954a.226.226 0 0 1 .19.07.239.239 0 0 1 .063.196Zm-5.443-2.17a1.85 1.85 0 0 1-2.377-.244 1.969 1.969 0 0 1-.233-2.44c.207-.318.502-.565.846-.711a1.84 1.84 0 0 1 1.089-.11c.365.075.701.26.964.53.264.27.443.616.515.99a1.98 1.98 0 0 1-.108 1.118 1.923 1.923 0 0 1-.696.866Zm8.471.005a1.849 1.849 0 0 1-2.374-.252 1.956 1.956 0 0 1-.546-1.362c0-.383.11-.758.319-1.076.207-.318.502-.566.847-.711a1.84 1.84 0 0 1 1.09-.108c.366.076.702.261.965.533s.44.617.512.993a1.98 1.98 0 0 1-.113 1.118 1.922 1.922 0 0 1-.7.865Z`})})}var C=[`node`,`bun`,`python`,`bash`],w={node:b,bun:S,python:y,bash:v},T={node:{label:`Node.js`,shortLabel:`JS`,icon:w.node,monacoLanguage:`javascript`,extension:`.js`,template:[`const fs = require('node:fs')`,``,`const envLines = [`,` 'HOOK_STATUS=ready',`,` 'HOOK_RUNTIME=node',`,`].join('\\n')`,``,"fs.writeFileSync('/tmp/agent-qa.env', `${envLines}\\n`)",`console.log('Hook wrote HOOK_STATUS and HOOK_RUNTIME to /tmp/agent-qa.env')`,`console.error('Sample stderr: replace with warnings or debug details when needed')`,``].join(`
|
|
2
|
+
`)},bun:{label:`Bun`,shortLabel:`BUN`,icon:w.bun,monacoLanguage:`typescript`,extension:`.ts`,template:[`const envLines = [`,` 'HOOK_STATUS=ready',`,` 'HOOK_RUNTIME=bun',`,`].join('\\n')`,``,"await Bun.write('/tmp/agent-qa.env', `${envLines}\\n`)",`console.log('Hook wrote HOOK_STATUS and HOOK_RUNTIME to /tmp/agent-qa.env')`,`console.error('Sample stderr: replace with warnings or debug details when needed')`,``].join(`
|
|
3
|
+
`)},python:{label:`Python`,shortLabel:`PY`,icon:w.python,monacoLanguage:`python`,extension:`.py`,template:[`from pathlib import Path`,`import sys`,``,`env_lines = '\\n'.join([`,` 'HOOK_STATUS=ready',`,` 'HOOK_RUNTIME=python',`,`]) + '\\n'`,``,`Path('/tmp/agent-qa.env').write_text(env_lines, encoding='utf-8')`,`print('Hook wrote HOOK_STATUS and HOOK_RUNTIME to /tmp/agent-qa.env')`,`print('Sample stderr: replace with warnings or debug details when needed', file=sys.stderr)`,``].join(`
|
|
4
|
+
`)},bash:{label:`Bash`,shortLabel:`SH`,icon:w.bash,monacoLanguage:`shell`,extension:`.sh`,template:[`#!/usr/bin/env bash`,`set -euo pipefail`,``,`cat > /tmp/agent-qa.env <<'EOF'`,`HOOK_STATUS=ready`,`HOOK_RUNTIME=bash`,`EOF`,``,`echo 'Hook wrote HOOK_STATUS and HOOK_RUNTIME to /tmp/agent-qa.env'`,`echo 'Sample stderr: replace with warnings or debug details when needed' >&2`,``].join(`
|
|
5
|
+
`)}};function E(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||`new-hook`}function D(e){return T[e]}function O(e){return T[e].monacoLanguage}function k(e,t=``){let n=D(e);return{file:`./hooks/${E(t)}${n.extension}`,source:n.template}}export{O as i,k as n,D as r,C as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./chunk-CilyBKbf.js";import{t}from"./monaco-editor-CDJrOpKK.js";import{t as n}from"./use-page-title-CK82kWb2.js";import{t as ee}from"./scroll-area-DfPMtFw0.js";import{A as te,Jt as ne,Kt as re,Mt as ie,Pn as r,Qn as i,S as a,Ut as o,W as ae,Zn as s,cr as oe,fr as c,lr as se,qn as l,r as ce,sr as le}from"./index-B3xPCIyH.js";import{t as u}from"./badge-BbhOGRC0.js";import{i as d,r as f}from"./hook-runtime-ChJ0-jZo.js";import{a as p,i as m,n as h,o as g,r as _,t as v}from"./use-hook-run-session-Cjqu9VED.js";import{t as y}from"./empty-state-Dluv5C1Q.js";import{t as ue}from"./use-keyboard-shortcuts-BRF3cm7O.js";var de=l(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),b=e(c(),1),x=s(),S=[`overview`,`source`,`run`];function C(e){return e!==null&&S.includes(e)}function fe(e){let t=e.get(`tab`);return C(t)?t:`overview`}function w({title:e,body:t,tone:n=`warning`}){return(0,x.jsxs)(`div`,{className:`rounded-sm border px-4 py-3 text-sm ${n===`error`?`border-destructive/30 bg-destructive/10`:n===`neutral`?`border-border bg-muted/40`:`border-amber-500/30 bg-amber-500/10`}`,children:[(0,x.jsx)(`div`,{className:`font-medium text-foreground`,children:e}),(0,x.jsx)(`div`,{className:`mt-1 text-muted-foreground`,children:t})]})}function T({fileMissing:e}){return e?(0,x.jsx)(u,{variant:`outline`,className:`border-amber-500/30 text-amber-600`,children:`File missing`}):(0,x.jsx)(u,{variant:`outline`,className:`border-emerald-500/30 text-emerald-600`,children:`Ready`})}function E({label:e,value:t,mono:n=!1}){return(0,x.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,x.jsx)(`div`,{className:`text-xs font-semibold uppercase tracking-wide text-muted-foreground`,children:e}),(0,x.jsx)(`div`,{className:n?`font-mono text-xs text-foreground break-all`:`text-sm text-foreground`,children:t})]})}function D(){let{id:e}=oe(),s=le(),[c,l]=se(),u=e??``,S=ne(),[C,D]=(0,b.useState)(null),[pe,O]=(0,b.useState)(!0),[k,A]=(0,b.useState)(!1),[j,M]=(0,b.useState)(null),[N,P]=(0,b.useState)(!1),[F,I]=(0,b.useState)(null),[L,R]=(0,b.useState)([]),[z,B]=(0,b.useState)(!1),[me,V]=(0,b.useState)(!1),H=(0,b.useRef)(null),U=(0,b.useRef)(null),W=(0,b.useRef)(c.has(`tab`)?fe(c):null),G=v({hookId:u});(0,b.useEffect)(()=>{if(c.has(`tab`)){let e=new URLSearchParams(c);e.delete(`tab`),l(e,{replace:!0})}},[c,l]),(0,b.useEffect)(()=>{let e=!1;return O(!0),A(!1),M(null),ae(u).then(t=>{e||D(t)}).catch(t=>{if(!e){if(D(null),t instanceof a&&t.status===404){A(!0);return}M(t instanceof Error?t.message:`Failed to load hook`)}}).finally(()=>{e||O(!1)}),()=>{e=!0}},[u]),n(C?.hook.name??`Hook`);let K=(0,b.useMemo)(()=>C?f(C.hook.runtime):null,[C]),q=K?.icon,J=C?.fieldErrors.some(e=>e.code===`file_missing`)??!1,Y=C?.fieldErrors.filter(e=>e.code!==`file_missing`)??[],X=(0,b.useMemo)(()=>C?C.fieldErrors.length===0?null:C.fieldErrors.map(e=>e.message).join(` `):`Hook details are still loading.`,[C]),Z=(0,b.useCallback)(async()=>{U.current?.scrollIntoView?.({block:`start`}),!X&&await G.submitRun()},[X,G]),he=(0,b.useCallback)(()=>{I(null),R([]),P(!0)},[]),ge=(0,b.useCallback)(e=>{P(e),e||(I(null),R([]))},[]),Q=(0,b.useCallback)(async(e=!1)=>{if(u){B(!0),I(null);try{await te(u,{force:e}),s(i.hooks)}catch(e){if(e instanceof a){let t=e.payload?.error,n=e.payload?.references;if(t===`hook_in_use`&&Array.isArray(n)){R(n);return}I(e.message)}else I(e instanceof Error?e.message:`Failed to delete hook`)}finally{B(!1)}}},[u,s]),_e=i.hookEdit(u);if(ue({e:()=>{C&&s(_e)},r:()=>{Z()},"shift+?":()=>V(e=>!e)}),(0,b.useEffect)(()=>{!C||!W.current||(W.current===`source`&&H.current?.scrollIntoView?.({block:`start`}),W.current===`run`&&U.current?.scrollIntoView?.({block:`start`}),W.current=null)},[C]),pe)return(0,x.jsx)(ce,{});if(k)return(0,x.jsx)(y,{icon:de,title:`Hook not found`,description:`This hook doesn't exist or could not be loaded.`,actionLabel:`View All Hooks`,onAction:()=>s(i.hooks)});if(!C)return(0,x.jsx)(y,{icon:r,title:`Hook couldn't be loaded`,description:j??`This hook could not be loaded right now.`,actionLabel:`View All Hooks`,onAction:()=>s(i.hooks)});let $=(0,x.jsxs)(`div`,{className:o(`p-3`,S?`space-y-3`:`flex h-full min-h-0 flex-col gap-3 overflow-hidden`),children:[(0,x.jsxs)(`div`,{className:`space-y-3 shrink-0`,children:[j?(0,x.jsx)(w,{title:`Hook could not be loaded`,body:j,tone:`error`}):null,J?(0,x.jsx)(w,{title:`Hook file missing`,body:`This hook is still registered, but its source file can't be found. Update the path or recreate the file, then save again.`}):null,Y.length>0?(0,x.jsx)(w,{title:`Hook has recoverable authoring issues`,body:Y.map(e=>e.message).join(` `)}):null,(0,x.jsxs)(`section`,{className:`space-y-3`,children:[(0,x.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,x.jsxs)(`div`,{className:`space-y-1`,children:[(0,x.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Hook`}),(0,x.jsx)(`div`,{className:`text-base font-semibold text-foreground`,children:C.hook.name})]}),(0,x.jsx)(T,{fileMissing:J})]}),(0,x.jsxs)(`div`,{className:`grid gap-x-5 gap-y-3 sm:grid-cols-2`,children:[(0,x.jsx)(E,{label:`File`,value:C.hook.file,mono:!0}),(0,x.jsx)(E,{label:`Hook ID`,value:C.hook.id,mono:!0}),(0,x.jsx)(E,{label:`Runtime`,value:(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[q?(0,x.jsx)(q,{className:`h-4 w-4 text-muted-foreground`}):null,(0,x.jsx)(`span`,{children:K?.label??C.hook.runtime})]})}),(0,x.jsx)(E,{label:`Timeout`,value:re(C.hook.timeout)}),(0,x.jsx)(E,{label:`Network`,value:C.hook.network?`Enabled`:`Disabled`}),(0,x.jsx)(E,{label:`Health`,value:(0,x.jsx)(T,{fileMissing:J})})]})]})]}),(0,x.jsxs)(`section`,{ref:H,className:o(`space-y-2`,S?``:`flex min-h-[300px] flex-1 flex-col overflow-hidden`),children:[(0,x.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Source`}),C.source?(0,x.jsx)(t,{value:C.source,onChange:()=>{},readOnly:!0,language:d(C.hook.runtime),className:o(`rounded-sm`,S?`h-[360px] min-h-[320px]`:`h-full min-h-[300px] flex-1`)}):(0,x.jsx)(`div`,{className:o(`flex items-center justify-center rounded-sm border border-dashed px-6 py-12 text-center`,S?`min-h-[320px]`:`min-h-[300px] flex-1`),children:(0,x.jsxs)(`div`,{children:[(0,x.jsx)(r,{className:`mx-auto h-5 w-5 text-muted-foreground`}),(0,x.jsx)(`div`,{className:`mt-3 text-sm font-medium text-foreground`,children:`No hook source found for this record.`}),(0,x.jsx)(`div`,{className:`mt-1 text-sm text-muted-foreground`,children:`Update the path or recreate the file in edit mode.`})]})})]})]}),ve=S?(0,x.jsx)(ee,{className:`h-full`,children:$}):$,ye=(0,x.jsx)(`div`,{ref:U,className:`h-full`,children:(0,x.jsx)(_,{baselineCount:G.baselineVariables.length,baselineFilePath:G.baselineFilePath,baselineInfo:G.baselineInfo,isBaselineLoading:G.isBaselineLoading,overrideRows:G.overrideRows,overridingRowIds:G.overridingRowIds,recentRuns:G.recentRuns,selectedRunId:G.selectedRunId,isRunning:G.isRunning,runDisabledReason:X,runError:G.runError,onAddOverride:()=>G.addOverrideRow(),onUpdateOverride:G.updateOverrideRow,onRemoveOverride:G.removeOverrideRow,onRun:()=>{Z()},onSelectRun:G.selectRun})}),be=(0,x.jsx)(m,{selectedRun:G.selectedRun});return(0,x.jsx)(ie,{children:(0,x.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:[(0,x.jsx)(p,{hookName:C.hook.name,isCreateMode:!1,mode:`view`,hookHref:i.hookView(C.hook.id),editHref:i.hookEdit(C.hook.id),isRunning:G.isRunning,onRun:()=>{Z()},runDisabled:!!X,onDelete:he,isDeleting:z,shortcutsOpen:me,onToggleShortcuts:()=>V(e=>!e)}),(0,x.jsx)(h,{isMobile:S,leftPane:ve,rightTopPane:ye,rightBottomPane:be}),(0,x.jsx)(g,{open:N,onOpenChange:ge,hook:{id:C.hook.id,name:C.hook.name,runtime:C.hook.runtime,file:C.hook.file},isDeleting:z,deleteError:F,blockedReferences:L,onDelete:()=>{Q(!1)},onForceDelete:()=>{Q(!0)}})]})})}export{D as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./chunk-CilyBKbf.js";import{t}from"./arrow-up-down-DyIZvSrC.js";import{i as n,n as r,o as i,s as a,t as o}from"./select-B5gV6YUf.js";import{t as s}from"./file-code-GHpcb0ud.js";import{n as c,r as l}from"./shortcut-hints-CfVf0REF.js";import{t as u}from"./plus-C6Zz9JLt.js";import{t as d}from"./use-page-title-CK82kWb2.js";import{n as ee,t as te}from"./scroll-area-DfPMtFw0.js";import{At as ne,Ht as f,Kt as re,Mt as ie,Nt as ae,Qn as p,U as oe,Ut as m,Vt as se,Zn as h,a as ce,fr as g,jt as le,lr as _,sr as ue}from"./index-B3xPCIyH.js";import{t as v}from"./badge-BbhOGRC0.js";import{a as de,i as y,n as fe,o as b,r as x,t as S}from"./table-DL0PmHAE.js";import{r as C,t as pe}from"./hook-runtime-ChJ0-jZo.js";import{t as me}from"./empty-state-Dluv5C1Q.js";import{t as he}from"./use-keyboard-shortcuts-BRF3cm7O.js";var w=e(g(),1),T=new Set([`asc`,`desc`]);function E(e){let t=new URLSearchParams;return e.search&&t.set(`search`,e.search),e.runtime&&t.set(`runtime`,e.runtime),e.health&&t.set(`health`,e.health),e.sort&&(t.set(`sort`,e.sort),t.set(`order`,e.order)),t}function ge(){let[e,t]=_(),n=e.get(`search`)??``,r=e.get(`runtime`)??``,i=e.get(`health`)??``,a=e.get(`sort`)??``,o=e.get(`order`)??`asc`,s=T.has(o)?o:`asc`,c=(0,w.useMemo)(()=>a?[{id:a,desc:s===`desc`}]:[],[a,s]),l=(0,w.useRef)(c);l.current=c;let u=(0,w.useMemo)(()=>({search:n,runtime:r,health:i,sort:a,order:s}),[n,r,i,a,s]);(0,w.useEffect)(()=>{let n=E(u);n.toString()!==e.toString()&&t(n,{replace:!0})},[e,t,u]);let d=(0,w.useCallback)(e=>{t(E({...u,...e}),{replace:!0})},[t,u]);return{search:n,runtime:r,health:i,sort:a,order:s,sorting:c,onSortingChange:(0,w.useCallback)(e=>{let t=typeof e==`function`?e(l.current):e;t.length>0?d({sort:t[0].id,order:t[0].desc?`desc`:`asc`}):d({sort:``,order:`asc`})},[d]),setSearch:(0,w.useCallback)(e=>d({search:e}),[d]),setRuntime:(0,w.useCallback)(e=>d({runtime:e}),[d]),setHealth:(0,w.useCallback)(e=>d({health:e}),[d])}}var D=h(),O={hooks:[],filePath:null,errors:[],missing:!1},k=50;function A(e){return e.fileMissing?`file-missing`:`ready`}function j(e){return e===`file-missing`?`File missing`:`Ready`}function _e({hook:e}){return A(e)===`file-missing`?(0,D.jsx)(v,{variant:`outline`,className:`border-amber-500/30 text-amber-600`,children:`File missing`}):(0,D.jsx)(v,{variant:`outline`,className:`border-emerald-500/30 text-emerald-600`,children:`Ready`})}function ve({runtime:e}){let t=C(e),n=t.icon;return(0,D.jsxs)(`span`,{className:`inline-flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,D.jsx)(n,{className:`h-4 w-4 shrink-0`}),(0,D.jsx)(`span`,{children:t.label})]})}function ye({title:e,body:t}){return(0,D.jsxs)(`div`,{className:`rounded-md border border-amber-500/30 bg-amber-500/10 px-4 py-3 text-sm`,children:[(0,D.jsx)(`div`,{className:`font-medium text-foreground`,children:e}),(0,D.jsx)(`div`,{className:`mt-1 text-muted-foreground`,children:t})]})}function be({isActive:e}){return m(`cursor-pointer outline-none hover:bg-muted/20 focus-visible:bg-primary/10 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-primary/60`,e&&`bg-primary/10 ring-1 ring-inset ring-primary/60`)}function M(){d(`Hooks`);let e=ue(),[m,h]=(0,w.useState)(O),[g,_]=(0,w.useState)(null),[v,T]=(0,w.useState)(!0),[E,M]=(0,w.useState)(-1),[N,P]=(0,w.useState)(0),F=(0,w.useRef)([]),{search:I,runtime:L,health:R,sorting:z,onSortingChange:xe,setSearch:B,setRuntime:V,setHealth:H}=ge();(0,w.useEffect)(()=>{let e=!1;return oe().then(t=>{e||(h(t),_(null))}).catch(t=>{e||(h(O),_(t instanceof Error?t.message:`Failed to load hooks`))}).finally(()=>{e||T(!1)}),()=>{e=!0}},[]);let U=(0,w.useMemo)(()=>g?{title:`Hooks could not be loaded`,body:g}:m.missing?{title:`${m.filePath??`configured hooks file`} not found`,body:`Create the first hook to generate the configured hooks file for this workspace.`}:m.errors.length>0?{title:`Hooks could not be loaded from ${m.filePath??`configured hooks file`}`,body:m.errors[0]??`Unknown registry error`}:null,[m.errors,m.filePath,m.missing,g]),W=(0,w.useMemo)(()=>{let e=I.trim().toLowerCase(),t=z[0],n=m.hooks.filter(t=>L&&t.runtime!==L||R&&A(t)!==R?!1:e?t.name.toLowerCase().includes(e)||t.file.toLowerCase().includes(e)||t.id.toLowerCase().includes(e):!0);return t?[...n].sort((e,n)=>{let r=0;switch(t.id){case`runtime`:r=C(e.runtime).label.localeCompare(C(n.runtime).label);break;case`timeout`:r=e.timeout-n.timeout;break;case`health`:r=j(A(e)).localeCompare(j(A(n)));break;default:r=e.name.localeCompare(n.name);break}return t.desc?r*-1:r}):n},[m.hooks,R,L,I,z]),G=W.length,K=Math.ceil(G/k),q=K>0?Math.min(N,K-1):0,J=q*k,Y=W.slice(J,J+k),Se=G>0?J+1:0,Ce=Math.min(J+k,G);(0,w.useEffect)(()=>{N!==q&&P(q)},[N,q]);let we=(0,w.useCallback)(e=>{M(-1),P(0),B(e)},[B]),Te=(0,w.useCallback)(e=>{M(-1),P(0),V(e===`all`?``:e)},[V]),X=(0,w.useCallback)(e=>{M(-1),P(0),H(e===`all`?``:e)},[H]),Z=(0,w.useCallback)((t,n=!1)=>{let r=p.hookView(t.id);if(n){window.open(r,`_blank`);return}e(r)},[e]);he((0,w.useMemo)(()=>{let e=()=>M(e=>Math.min(e+1,Y.length-1)),t=()=>M(e=>Math.max(e-1,0));return{j:e,arrowdown:e,k:t,arrowup:t,enter:e=>{E<0||!Y[E]||Z(Y[E],e.metaKey||e.ctrlKey)}}},[Z,E,Y])),(0,w.useEffect)(()=>{if(Y.length===0){E!==-1&&M(-1);return}E>=Y.length&&M(Y.length-1)},[E,Y.length]),(0,w.useEffect)(()=>{if(E<0)return;let e=F.current[E];e&&document.activeElement!==e&&e.focus()},[E,Y.length]);let Ee=(0,w.useCallback)((e,t)=>{t&&t.preventDefault(),Z(e,!!(t&&(t.metaKey||t.ctrlKey)))},[Z]);function Q(e){M(-1),P(0),xe(t=>{let n=t[0];return!n||n.id!==e?[{id:e,desc:!1}]:n.desc?[]:[{id:e,desc:!0}]})}if(v)return(0,D.jsx)(ce,{});let De=G===0,$=!m.errors.length&&!g;return(0,D.jsx)(ie,{children:(0,D.jsxs)(`div`,{className:`space-y-6`,children:[(0,D.jsxs)(`div`,{className:`flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Hooks`}),(0,D.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Manage reusable setup, teardown, and inline hook scripts for this workspace.`})]}),(0,D.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,D.jsxs)(ne,{children:[(0,D.jsx)(ae,{asChild:!0,children:(0,D.jsx)(f,{variant:`ghost`,size:`icon-sm`,type:`button`,"aria-label":`Keyboard shortcuts`,children:(0,D.jsx)(l,{className:`h-4 w-4`})})}),(0,D.jsx)(le,{side:`bottom`,className:`p-3`,children:(0,D.jsx)(c,{hints:[{key:`J / ↓`,label:`Next row`},{key:`K / ↑`,label:`Previous row`},{key:`Enter`,label:`Open hook`},{key:`⌘+Enter`,label:`Open in new tab`}]})})]}),(0,D.jsxs)(f,{type:`button`,onClick:()=>e(p.hookNew),children:[(0,D.jsx)(u,{className:`h-4 w-4`}),`Create Hook`]})]})]}),U&&(0,D.jsx)(ye,{title:U.title,body:U.body}),(0,D.jsx)(`div`,{className:`flex flex-col gap-3 lg:flex-row lg:items-center`,children:(0,D.jsxs)(`div`,{className:`flex flex-col gap-3 lg:flex-row lg:items-center`,children:[(0,D.jsx)(se,{value:I,onChange:e=>we(e.currentTarget.value),placeholder:`Search hooks`,className:`lg:max-w-sm`,"aria-label":`Search hooks`}),(0,D.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row`,children:[(0,D.jsxs)(o,{value:L||`all`,onValueChange:Te,children:[(0,D.jsx)(i,{className:`w-full sm:w-44`,"aria-label":`Runtime filter`,children:(0,D.jsx)(a,{placeholder:`Runtime`})}),(0,D.jsxs)(r,{children:[(0,D.jsx)(n,{value:`all`,children:`All runtimes`}),pe.map(e=>(0,D.jsx)(n,{value:e,children:C(e).label},e))]})]}),(0,D.jsxs)(o,{value:R||`all`,onValueChange:X,children:[(0,D.jsx)(i,{className:`w-full sm:w-44`,"aria-label":`Health filter`,children:(0,D.jsx)(a,{placeholder:`Health`})}),(0,D.jsxs)(r,{children:[(0,D.jsx)(n,{value:`all`,children:`All health`}),(0,D.jsx)(n,{value:`ready`,children:`Ready`}),(0,D.jsx)(n,{value:`file-missing`,children:`File missing`})]})]})]})]})}),De?(0,D.jsx)(me,{icon:s,title:m.hooks.length===0?`No hooks yet`:`No hooks match your filters`,description:m.hooks.length===0?`Create a hook to add reusable setup, teardown, or inline automation to this workspace.`:`Adjust your search or filters to see more hook records.`,actionLabel:$?`Create Hook`:void 0,onAction:$?()=>e(p.hookNew):void 0}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(te,{className:`rounded-md border`,children:[(0,D.jsxs)(S,{className:`min-w-full`,children:[(0,D.jsx)(de,{children:(0,D.jsxs)(b,{children:[(0,D.jsx)(y,{className:`w-[40%]`,children:(0,D.jsxs)(f,{type:`button`,variant:`ghost`,className:`-ml-3`,onClick:()=>Q(`name`),children:[`Hook`,(0,D.jsx)(t,{className:`h-4 w-4`})]})}),(0,D.jsx)(y,{children:(0,D.jsxs)(f,{type:`button`,variant:`ghost`,className:`-ml-3`,onClick:()=>Q(`runtime`),children:[`Runtime`,(0,D.jsx)(t,{className:`h-4 w-4`})]})}),(0,D.jsx)(y,{children:(0,D.jsxs)(f,{type:`button`,variant:`ghost`,className:`-ml-3`,onClick:()=>Q(`timeout`),children:[`Timeout / Network`,(0,D.jsx)(t,{className:`h-4 w-4`})]})}),(0,D.jsx)(y,{children:(0,D.jsxs)(f,{type:`button`,variant:`ghost`,className:`-ml-3`,onClick:()=>Q(`health`),children:[`Health`,(0,D.jsx)(t,{className:`h-4 w-4`})]})})]})}),(0,D.jsx)(fe,{children:Y.map((e,t)=>{let n=t===E;return(0,D.jsxs)(b,{ref:e=>{F.current[t]=e},"data-hooks-row-surface":e.id,tabIndex:n?0:-1,"aria-selected":n,className:be({isActive:n}),onClick:()=>{M(t),Z(e)},onFocus:()=>M(t),onKeyDown:t=>{t.key===`Enter`&&Ee(e,t)},children:[(0,D.jsx)(x,{className:`max-w-0`,children:(0,D.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,D.jsx)(`div`,{className:`truncate text-sm font-medium text-foreground`,children:e.name}),(0,D.jsx)(`div`,{className:`truncate text-xs text-muted-foreground`,children:e.file})]})}),(0,D.jsx)(x,{children:(0,D.jsx)(ve,{runtime:e.runtime})}),(0,D.jsx)(x,{children:(0,D.jsxs)(`div`,{className:`space-y-1`,children:[(0,D.jsx)(`div`,{className:`text-sm text-foreground`,children:re(e.timeout)}),(0,D.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e.network?`Network on`:`Network off`})]})}),(0,D.jsx)(x,{children:(0,D.jsx)(_e,{hook:e})})]},e.id)})})]}),(0,D.jsx)(ee,{orientation:`horizontal`})]}),(0,D.jsxs)(`div`,{className:`flex items-center justify-between px-2`,children:[(0,D.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Showing `,Se,`-`,Ce,` of `,G]}),(0,D.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,D.jsx)(f,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>{M(-1),P(e=>Math.max(e-1,0))},disabled:q===0,children:`Previous`}),(0,D.jsx)(f,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>{M(-1),P(e=>Math.min(e+1,Math.max(K-1,0)))},disabled:q>=K-1,children:`Next`})]})]})]})]})})}export{M as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as e}from"./editor.api2-DEGvZ9jW.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[`<!--`,`-->`]},brackets:[[`<!--`,`-->`],[`<`,`>`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`<`,close:`>`}],onEnterRules:[{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:RegExp(`^\\s*<!--\\s*#region\\b.*-->`),end:RegExp(`^\\s*<!--\\s*#endregion\\b.*-->`)}}},r={defaultToken:``,tokenPostfix:`.html`,ignoreCase:!0,tokenizer:{root:[[/<!DOCTYPE/,`metatag`,`@doctype`],[/<!--/,`comment`,`@comment`],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,[`delimiter`,`tag`,``,`delimiter`]],[/(<)(script)/,[`delimiter`,{token:`tag`,next:`@script`}]],[/(<)(style)/,[`delimiter`,{token:`tag`,next:`@style`}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,[`delimiter`,{token:`tag`,next:`@otherTag`}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,[`delimiter`,{token:`tag`,next:`@otherTag`}]],[/</,`delimiter`],[/[^<]+/]],doctype:[[/[^>]+/,`metatag.content`],[/>/,`metatag`,`@pop`]],comment:[[/-->/,`comment`,`@pop`],[/[^-]+/,`comment.content`],[/./,`comment.content`]],otherTag:[[/\/?>/,`delimiter`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],script:[[/type/,`attribute.name`,`@scriptAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,[`delimiter`,`tag`,{token:`delimiter`,next:`@pop`}]]],scriptAfterType:[[/=/,`delimiter`,`@scriptAfterTypeEquals`],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptAfterTypeEquals:[[/"module"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.text/javascript`}],[/'module'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.text/javascript`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptWithCustomType:[[/>/,{token:`delimiter`,next:`@scriptEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptEmbedded:[[/<\/script/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}],[/[^<]+/,``]],style:[[/type/,`attribute.name`,`@styleAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,[`delimiter`,`tag`,{token:`delimiter`,next:`@pop`}]]],styleAfterType:[[/=/,`delimiter`,`@styleAfterTypeEquals`],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleWithCustomType:[[/>/,{token:`delimiter`,next:`@styleEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleEmbedded:[[/<\/style/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}],[/[^<]+/,``]]}};export{n as conf,r as language};
|