@workflow/web 4.0.1-beta.20 → 4.0.1-beta.21

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.
Files changed (84) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +2 -2
  3. package/.next/fallback-build-manifest.json +2 -2
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/server/app/_global-error.html +2 -2
  6. package/.next/server/app/_global-error.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  12. package/.next/server/app/_not-found/page/server-reference-manifest.json +17 -17
  13. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  14. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next/server/app/page/server-reference-manifest.json +32 -17
  16. package/.next/server/app/page.js.nft.json +1 -1
  17. package/.next/server/app/page_client-reference-manifest.js +1 -1
  18. package/.next/server/app/run/[runId]/page/server-reference-manifest.json +32 -17
  19. package/.next/server/app/run/[runId]/page.js.nft.json +1 -1
  20. package/.next/server/app/run/[runId]/page_client-reference-manifest.js +1 -1
  21. package/.next/server/chunks/ssr/[root-of-the-server]__1365a866._.js +2 -2
  22. package/.next/server/chunks/ssr/[root-of-the-server]__1365a866._.js.map +1 -1
  23. package/.next/server/chunks/ssr/[root-of-the-server]__2168651f._.js +1 -1
  24. package/.next/server/chunks/ssr/[root-of-the-server]__2168651f._.js.map +1 -1
  25. package/.next/server/chunks/ssr/[root-of-the-server]__25c4ca9a._.js +1 -1
  26. package/.next/server/chunks/ssr/[root-of-the-server]__25c4ca9a._.js.map +1 -1
  27. package/.next/server/chunks/ssr/[root-of-the-server]__d416fa5e._.js +1 -1
  28. package/.next/server/chunks/ssr/[root-of-the-server]__d416fa5e._.js.map +1 -1
  29. package/.next/server/chunks/ssr/[root-of-the-server]__e576a2e1._.js +2 -2
  30. package/.next/server/chunks/ssr/[root-of-the-server]__e576a2e1._.js.map +1 -1
  31. package/.next/server/chunks/ssr/_af28dabd._.js +1 -1
  32. package/.next/server/chunks/ssr/_af28dabd._.js.map +1 -1
  33. package/.next/server/chunks/ssr/_bff7cae2._.js +9 -0
  34. package/.next/server/chunks/ssr/_bff7cae2._.js.map +1 -0
  35. package/.next/server/chunks/ssr/_c8bf1458._.js +9 -0
  36. package/.next/server/chunks/ssr/_c8bf1458._.js.map +1 -0
  37. package/.next/server/chunks/ssr/{node_modules__pnpm_604882ab._.js → node_modules__pnpm_1053b681._.js} +2 -2
  38. package/.next/server/chunks/ssr/node_modules__pnpm_9ac28e5c._.js +3 -0
  39. package/.next/server/chunks/ssr/node_modules__pnpm_9ac28e5c._.js.map +1 -0
  40. package/.next/server/chunks/ssr/node_modules__pnpm_c6ddcd47._.js +1 -1
  41. package/.next/server/chunks/ssr/node_modules__pnpm_c6ddcd47._.js.map +1 -1
  42. package/.next/server/chunks/ssr/node_modules__pnpm_ecc06f40._.js +3 -0
  43. package/.next/server/chunks/ssr/node_modules__pnpm_ecc06f40._.js.map +1 -0
  44. package/.next/server/chunks/ssr/packages_web_src_app_page_tsx_cd282e82._.js +5 -1
  45. package/.next/server/chunks/ssr/packages_web_src_app_page_tsx_cd282e82._.js.map +1 -1
  46. package/.next/server/chunks/ssr/packages_web_src_app_run_[runId]_page_tsx_c7d0b139._.js +6 -6
  47. package/.next/server/chunks/ssr/packages_web_src_app_run_[runId]_page_tsx_c7d0b139._.js.map +1 -1
  48. package/.next/server/chunks/ssr/packages_web_src_components_ui_select_tsx_7c5238ef._.js +1 -1
  49. package/.next/server/chunks/ssr/packages_web_src_components_ui_select_tsx_7c5238ef._.js.map +1 -1
  50. package/.next/server/pages/500.html +2 -2
  51. package/.next/server/server-reference-manifest.js +1 -1
  52. package/.next/server/server-reference-manifest.json +40 -18
  53. package/.next/static/chunks/080d73f6a8a7055f.js +1 -0
  54. package/.next/static/chunks/0bf0e3b66b375058.js +2 -0
  55. package/.next/static/chunks/1633a4677cb7eacd.js +7 -0
  56. package/.next/static/chunks/19288057adbbaf16.css +2 -0
  57. package/.next/static/chunks/7993564ea9cd3862.js +60 -0
  58. package/.next/static/chunks/826c531268249b18.js +1 -0
  59. package/.next/static/chunks/915c48af605695f8.js +5 -0
  60. package/.next/static/chunks/a2fdd31ef7d1ed50.js +154 -0
  61. package/.next/static/chunks/b39dd1bd2af229c0.css +3 -0
  62. package/.next/static/chunks/{f860cef1a19defc2.js → c41b2f1bfdc5f91e.js} +1 -1
  63. package/.next/static/chunks/d3781b000675e89a.js +7 -0
  64. package/.next/static/chunks/ebaf4c277606b4fc.js +14 -0
  65. package/.next/trace +1 -1
  66. package/.next/trace-build +1 -1
  67. package/package.json +4 -4
  68. package/.next/server/chunks/ssr/_5587a26a._.js +0 -3
  69. package/.next/server/chunks/ssr/_5587a26a._.js.map +0 -1
  70. package/.next/server/chunks/ssr/_905b4948._.js +0 -3
  71. package/.next/server/chunks/ssr/_905b4948._.js.map +0 -1
  72. package/.next/static/chunks/0ba5474f4ed4a8c8.js +0 -154
  73. package/.next/static/chunks/3cf543bacb44cfb5.js +0 -1
  74. package/.next/static/chunks/65a1beec565c5452.js +0 -1
  75. package/.next/static/chunks/74dc45834647aebe.css +0 -3
  76. package/.next/static/chunks/a6a14ee8e38e3e97.js +0 -14
  77. package/.next/static/chunks/e1532e8c78b14240.js +0 -1
  78. package/.next/static/chunks/e834043d5d00c377.js +0 -60
  79. package/.next/static/chunks/ed676821fd9c42fe.js +0 -1
  80. package/.next/static/chunks/f00878722fec5692.js +0 -2
  81. /package/.next/server/chunks/ssr/{node_modules__pnpm_604882ab._.js.map → node_modules__pnpm_1053b681._.js.map} +0 -0
  82. /package/.next/static/{kDel5ryx8YzI2wcHKGqt0 → 1Gd0u_mHFXgTr2DR4OTNR}/_buildManifest.js +0 -0
  83. /package/.next/static/{kDel5ryx8YzI2wcHKGqt0 → 1Gd0u_mHFXgTr2DR4OTNR}/_clientMiddlewareManifest.json +0 -0
  84. /package/.next/static/{kDel5ryx8YzI2wcHKGqt0 → 1Gd0u_mHFXgTr2DR4OTNR}/_ssgManifest.js +0 -0
@@ -0,0 +1,60 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,51379,e=>{"use strict";function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var r=t(),n={exec:()=>null};function s(e,t=""){let r="string"==typeof e?e:e.source,n={replace:(e,t)=>{let s="string"==typeof t?t:t.source;return s=s.replace(l.caret,"$1"),r=r.replace(e,s),n},getRegex:()=>new RegExp(r,t)};return n}var l={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},a=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,i=/(?:[*+-]|\d{1,9}[.)])/,o=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,c=s(o).replace(/bull/g,i).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),u=s(o).replace(/bull/g,i).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),d=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,p=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,h=s(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",p).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),f=s(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,i).getRegex(),m="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",g=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,x=s("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",g).replace("tag",m).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),k=s(d).replace("hr",a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",m).getRegex(),b={blockquote:s(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",k).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:h,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:a,html:x,lheading:c,list:f,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:k,table:n,text:/^[^\n]+/},v=s("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",m).getRegex(),w={...b,lheading:u,table:v,paragraph:s(d).replace("hr",a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",v).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",m).getRegex()},y={...b,html:s(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",g).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:n,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:s(d).replace("hr",a).replace("heading",` *#{1,6} *[^
2
+ ]`).replace("lheading",c).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},S=/^( {2,}|\\)\n(?!\s*$)/,C=/[\p{P}\p{S}]/u,j=/[\s\p{P}\p{S}]/u,R=/[^\s\p{P}\p{S}]/u,T=s(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,j).getRegex(),N=/(?!~)[\p{P}\p{S}]/u,E=s(/link|code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<!`)(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("code",/(?<!`)(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),L=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,P=s(L,"u").replace(/punct/g,C).getRegex(),$=s(L,"u").replace(/punct/g,N).getRegex(),A="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",I=s(A,"gu").replace(/notPunctSpace/g,R).replace(/punctSpace/g,j).replace(/punct/g,C).getRegex(),z=s(A,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,N).getRegex(),M=s("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,R).replace(/punctSpace/g,j).replace(/punct/g,C).getRegex(),H=s(/\\(punct)/,"gu").replace(/punct/g,C).getRegex(),_=s(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),D=s(g).replace("(?:-->|$)","-->").getRegex(),q=s("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",D).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),B=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,V=s(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",B).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),F=s(/^!?\[(label)\]\[(ref)\]/).replace("label",B).replace("ref",p).getRegex(),O=s(/^!?\[(ref)\](?:\[\])?/).replace("ref",p).getRegex(),U=s("reflink|nolink(?!\\()","g").replace("reflink",F).replace("nolink",O).getRegex(),Z=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,W={_backpedal:n,anyPunctuation:H,autolink:_,blockSkip:E,br:S,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:n,emStrongLDelim:P,emStrongRDelimAst:I,emStrongRDelimUnd:M,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:V,nolink:O,punctuation:T,reflink:F,reflinkSearch:U,tag:q,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:n},K={...W,link:s(/^!?\[(label)\]\((.*?)\)/).replace("label",B).getRegex(),reflink:s(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",B).getRegex()},Q={...W,emStrongRDelimAst:z,emStrongLDelim:$,url:s(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Z).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:s(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Z).getRegex()},G={...Q,br:s(S).replace("{2,}","*").getRegex(),text:s(Q.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},X={normal:b,gfm:w,pedantic:y},Y={normal:W,gfm:Q,breaks:G,pedantic:K},J={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ee=e=>J[e];function et(e,t){if(t){if(l.escapeTest.test(e))return e.replace(l.escapeReplace,ee)}else if(l.escapeTestNoEncode.test(e))return e.replace(l.escapeReplaceNoEncode,ee);return e}function er(e){try{e=encodeURI(e).replace(l.percentDecode,"%")}catch{return null}return e}function en(e,t){let r=e.replace(l.findPipe,(e,t,r)=>{let n=!1,s=t;for(;--s>=0&&"\\"===r[s];)n=!n;return n?"|":" |"}).split(l.splitPipe),n=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(l.slashPipe,"|");return r}function es(e,t,r){let n=e.length;if(0===n)return"";let s=0;for(;s<n;){let l=e.charAt(n-s-1);if(l!==t||r)if(l!==t&&r)s++;else break;else s++}return e.slice(0,n-s)}function el(e,t,r,n,s){let l=t.href,a=t.title||null,i=e[1].replace(s.other.outputLinkReplace,"$1");n.state.inLink=!0;let o={type:"!"===e[0].charAt(0)?"image":"link",raw:r,href:l,title:a,text:i,tokens:n.inlineTokens(i)};return n.state.inLink=!1,o}var ea=class{options;rules;lexer;constructor(e){this.options=e||r}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:es(e,`
3
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],r=function(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(null===n)return t;let s=n[1];return t.split(`
4
+ `).map(e=>{let t=e.match(r.other.beginningSpace);if(null===t)return e;let[n]=t;return n.length>=s.length?e.slice(s.length):e}).join(`
5
+ `)}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=es(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:es(t[0],`
6
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=es(t[0],`
7
+ `).split(`
8
+ `),r="",n="",s=[];for(;e.length>0;){let t=!1,l=[],a;for(a=0;a<e.length;a++)if(this.rules.other.blockquoteStart.test(e[a]))l.push(e[a]),t=!0;else if(t)break;else l.push(e[a]);e=e.slice(a);let i=l.join(`
9
+ `),o=i.replace(this.rules.other.blockquoteSetextReplace,`
10
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
11
+ ${i}`:i,n=n?`${n}
12
+ ${o}`:o;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(o,s,!0),this.lexer.state.top=c,0===e.length)break;let u=s.at(-1);if(u?.type==="code")break;if(u?.type==="blockquote"){let t=u.raw+`
13
+ `+e.join(`
14
+ `),l=this.blockquote(t);s[s.length-1]=l,r=r.substring(0,r.length-u.raw.length)+l.raw,n=n.substring(0,n.length-u.text.length)+l.text;break}if(u?.type==="list"){let t=u.raw+`
15
+ `+e.join(`
16
+ `),l=this.list(t);s[s.length-1]=l,r=r.substring(0,r.length-u.raw.length)+l.raw,n=n.substring(0,n.length-u.raw.length)+l.raw,e=t.substring(s.at(-1).raw.length).split(`
17
+ `);continue}}return{type:"blockquote",raw:r,tokens:s,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim(),n=r.length>1,s={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let l=this.rules.other.listItemRegex(r),a=!1;for(;e;){let r=!1,n="",i="";if(!(t=l.exec(e))||this.rules.block.hr.test(e))break;n=t[0],e=e.substring(n.length);let o=t[2].split(`
18
+ `,1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),c=e.split(`
19
+ `,1)[0],u=!o.trim(),d=0;if(this.options.pedantic?(d=2,i=o.trimStart()):u?d=t[1].length+1:(d=(d=t[2].search(this.rules.other.nonSpaceChar))>4?1:d,i=o.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(c)&&(n+=c+`
20
+ `,e=e.substring(c.length+1),r=!0),!r){let t=this.rules.other.nextBulletRegex(d),r=this.rules.other.hrRegex(d),s=this.rules.other.fencesBeginRegex(d),l=this.rules.other.headingBeginRegex(d),a=this.rules.other.htmlBeginRegex(d);for(;e;){let p=e.split(`
21
+ `,1)[0],h;if(c=p,h=this.options.pedantic?c=c.replace(this.rules.other.listReplaceNesting," "):c.replace(this.rules.other.tabCharGlobal," "),s.test(c)||l.test(c)||a.test(c)||t.test(c)||r.test(c))break;if(h.search(this.rules.other.nonSpaceChar)>=d||!c.trim())i+=`
22
+ `+h.slice(d);else{if(u||o.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||s.test(o)||l.test(o)||r.test(o))break;i+=`
23
+ `+c}u||c.trim()||(u=!0),n+=p+`
24
+ `,e=e.substring(p.length+1),o=h.slice(d)}}s.loose||(a?s.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(a=!0));let p=null,h;this.options.gfm&&(p=this.rules.other.listIsTask.exec(i))&&(h="[ ] "!==p[0],i=i.replace(this.rules.other.listReplaceTask,"")),s.items.push({type:"list_item",raw:n,task:!!p,checked:h,loose:!1,text:i,tokens:[]}),s.raw+=n}let i=s.items.at(-1);if(!i)return;i.raw=i.raw.trimEnd(),i.text=i.text.trimEnd(),s.raw=s.raw.trimEnd();for(let e=0;e<s.items.length;e++)if(this.lexer.state.top=!1,s.items[e].tokens=this.lexer.blockTokens(s.items[e].text,[]),!s.loose){let t=s.items[e].tokens.filter(e=>"space"===e.type);s.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}if(s.loose)for(let e=0;e<s.items.length;e++)s.items[e].loose=!0;return s}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:r,title:n}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=en(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
25
+ `):[],l={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===n.length){for(let e of n)this.rules.other.tableAlignRight.test(e)?l.align.push("right"):this.rules.other.tableAlignCenter.test(e)?l.align.push("center"):this.rules.other.tableAlignLeft.test(e)?l.align.push("left"):l.align.push(null);for(let e=0;e<r.length;e++)l.header.push({text:r[e],tokens:this.lexer.inline(r[e]),header:!0,align:l.align[e]});for(let e of s)l.rows.push(en(e,l.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:l.align[t]})));return l}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
26
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=es(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(")"))return -1;let r=0;for(let t=0;t<e.length;t++)if("\\"===e[t])t++;else if("("===e[t])r++;else if(")"===e[t]&&--r<0)return t;return r>0?-2:-1}(t[2],0);if(-2===e)return;if(e>-1){let r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],n="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(r);e&&(r=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?r.slice(1):r.slice(1,-1)),el(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let e=t[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return el(r,e,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){let r=[...n[0]].length-1,s,l,a=r,i=0,o="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(o.lastIndex=0,t=t.slice(-1*e.length+r);null!=(n=o.exec(t));){if(!(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6]))continue;if(l=[...s].length,n[3]||n[4]){a+=l;continue}if((n[5]||n[6])&&r%3&&!((r+l)%3)){i+=l;continue}if((a-=l)>0)continue;l=Math.min(l,l+a+i);let t=[...n[0]][0].length,o=e.slice(0,r+n.index+t+l);if(Math.min(r,l)%2){let e=o.slice(1,-1);return{type:"em",raw:o,text:e,tokens:this.lexer.inlineTokens(e)}}let c=o.slice(2,-2);return{type:"strong",raw:o,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(e),n=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return r&&n&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,r;return r="@"===t[2]?"mailto:"+(e=t[1]):e=t[1],{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])r="mailto:"+(e=t[0]);else{let n;do n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(n!==t[0])e=t[0],r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},ei=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||r,this.options.tokenizer=this.options.tokenizer||new ea,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:l,block:X.normal,inline:Y.normal};this.options.pedantic?(t.block=X.pedantic,t.inline=Y.pedantic):this.options.gfm&&(t.block=X.gfm,this.options.breaks?t.inline=Y.breaks:t.inline=Y.gfm),this.tokenizer.rules=t}static get rules(){return{block:X,inline:Y}}static lex(t,r){return new e(r).lex(t)}static lexInline(t,r){return new e(r).inlineTokens(t)}lex(e){e=e.replace(l.carriageReturn,`
27
+ `),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],r=!1){for(this.options.pedantic&&(e=e.replace(l.tabCharGlobal," ").replace(l.spaceLine,""));e;){let n;if(this.options.extensions?.block?.some(r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))continue;if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length);let r=t.at(-1);1===n.raw.length&&void 0!==r?r.raw+=`
28
+ `:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length);let r=t.at(-1);r?.type==="paragraph"||r?.type==="text"?(r.raw+=(r.raw.endsWith(`
29
+ `)?"":`
30
+ `)+n.raw,r.text+=`
31
+ `+n.text,this.inlineQueue.at(-1).src=r.text):t.push(n);continue}if((n=this.tokenizer.fences(e))||(n=this.tokenizer.heading(e))||(n=this.tokenizer.hr(e))||(n=this.tokenizer.blockquote(e))||(n=this.tokenizer.list(e))||(n=this.tokenizer.html(e))){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length);let r=t.at(-1);r?.type==="paragraph"||r?.type==="text"?(r.raw+=(r.raw.endsWith(`
32
+ `)?"":`
33
+ `)+n.raw,r.text+=`
34
+ `+n.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},t.push(n));continue}if((n=this.tokenizer.table(e))||(n=this.tokenizer.lheading(e))){e=e.substring(n.raw.length),t.push(n);continue}let s=e;if(this.options.extensions?.startBlock){let t=1/0,r=e.slice(1),n;this.options.extensions.startBlock.forEach(e=>{"number"==typeof(n=e.call({lexer:this},r))&&n>=0&&(t=Math.min(t,n))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(s))){let l=t.at(-1);r&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
35
+ `)?"":`
36
+ `)+n.raw,l.text+=`
37
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):t.push(n),r=s.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length);let r=t.at(-1);r?.type==="text"?(r.raw+=(r.raw.endsWith(`
38
+ `)?"":`
39
+ `)+n.raw,r.text+=`
40
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(n);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let r=e,n=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(n=this.tokenizer.rules.inline.reflinkSearch.exec(r));)e.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(n=this.tokenizer.rules.inline.anyPunctuation.exec(r));)r=r.slice(0,n.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(n=this.tokenizer.rules.inline.blockSkip.exec(r));)r=r.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let s=!1,l="";for(;e;){let n;if(s||(l=""),s=!1,this.options.extensions?.inline?.some(r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))continue;if((n=this.tokenizer.escape(e))||(n=this.tokenizer.tag(e))||(n=this.tokenizer.link(e))){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length);let r=t.at(-1);"text"===n.type&&r?.type==="text"?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if((n=this.tokenizer.emStrong(e,r,l))||(n=this.tokenizer.codespan(e))||(n=this.tokenizer.br(e))||(n=this.tokenizer.del(e))||(n=this.tokenizer.autolink(e))||!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}let a=e;if(this.options.extensions?.startInline){let t=1/0,r=e.slice(1),n;this.options.extensions.startInline.forEach(e=>{"number"==typeof(n=e.call({lexer:this},r))&&n>=0&&(t=Math.min(t,n))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(a)){e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(l=n.raw.slice(-1)),s=!0;let r=t.at(-1);r?.type==="text"?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return t}},eo=class{options;parser;constructor(e){this.options=e||r}space(e){return""}code({text:e,lang:t,escaped:r}){let n=(t||"").match(l.notSpaceStart)?.[0],s=e.replace(l.endingNewline,"")+`
41
+ `;return n?'<pre><code class="language-'+et(n)+'">'+(r?s:et(s,!0))+`</code></pre>
42
+ `:"<pre><code>"+(r?s:et(s,!0))+`</code></pre>
43
+ `}blockquote({tokens:e}){return`<blockquote>
44
+ ${this.parser.parse(e)}</blockquote>
45
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
46
+ `}hr(e){return`<hr>
47
+ `}list(e){let t=e.ordered,r=e.start,n="";for(let t=0;t<e.items.length;t++){let r=e.items[t];n+=this.listitem(r)}let s=t?"ol":"ul";return"<"+s+(t&&1!==r?' start="'+r+'"':"")+`>
48
+ `+n+"</"+s+`>
49
+ `}listitem(e){let t="";if(e.task){let r=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type==="paragraph"?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=r+" "+et(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
50
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
51
+ `}table(e){let t="",r="";for(let t=0;t<e.header.length;t++)r+=this.tablecell(e.header[t]);t+=this.tablerow({text:r});let n="";for(let t=0;t<e.rows.length;t++){let s=e.rows[t];r="";for(let e=0;e<s.length;e++)r+=this.tablecell(s[e]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
52
+ <thead>
53
+ `+t+`</thead>
54
+ `+n+`</table>
55
+ `}tablerow({text:e}){return`<tr>
56
+ ${e}</tr>
57
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
58
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${et(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){let n=this.parser.parseInline(r),s=er(e);if(null===s)return n;let l='<a href="'+(e=s)+'"';return t&&(l+=' title="'+et(t)+'"'),l+=">"+n+"</a>"}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let s=er(e);if(null===s)return et(r);e=s;let l=`<img src="${e}" alt="${r}"`;return t&&(l+=` title="${et(t)}"`),l+=">"}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:et(e.text)}},ec=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},eu=class e{options;renderer;textRenderer;constructor(e){this.options=e||r,this.options.renderer=this.options.renderer||new eo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ec}static parse(t,r){return new e(r).parse(t)}static parseInline(t,r){return new e(r).parseInline(t)}parse(e,t=!0){let r="";for(let n=0;n<e.length;n++){let s=e[n];if(this.options.extensions?.renderers?.[s.type]){let e=this.options.extensions.renderers[s.type].call({parser:this},s);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){r+=e||"";continue}}switch(s.type){case"space":r+=this.renderer.space(s);continue;case"hr":r+=this.renderer.hr(s);continue;case"heading":r+=this.renderer.heading(s);continue;case"code":r+=this.renderer.code(s);continue;case"table":r+=this.renderer.table(s);continue;case"blockquote":r+=this.renderer.blockquote(s);continue;case"list":r+=this.renderer.list(s);continue;case"html":r+=this.renderer.html(s);continue;case"def":r+=this.renderer.def(s);continue;case"paragraph":r+=this.renderer.paragraph(s);continue;case"text":{let l=s,a=this.renderer.text(l);for(;n+1<e.length&&"text"===e[n+1].type;)l=e[++n],a+=`
59
+ `+this.renderer.text(l);t?r+=this.renderer.paragraph({type:"paragraph",raw:a,text:a,tokens:[{type:"text",raw:a,text:a,escaped:!0}]}):r+=a;continue}default:{let e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw Error(e)}}}return r}parseInline(e,t=this.renderer){let r="";for(let n=0;n<e.length;n++){let s=e[n];if(this.options.extensions?.renderers?.[s.type]){let e=this.options.extensions.renderers[s.type].call({parser:this},s);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){r+=e||"";continue}}switch(s.type){case"escape":case"text":r+=t.text(s);break;case"html":r+=t.html(s);break;case"link":r+=t.link(s);break;case"image":r+=t.image(s);break;case"strong":r+=t.strong(s);break;case"em":r+=t.em(s);break;case"codespan":r+=t.codespan(s);break;case"br":r+=t.br(s);break;case"del":r+=t.del(s);break;default:{let e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw Error(e)}}}return r}},ed=class{options;block;constructor(e){this.options=e||r}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?ei.lex:ei.lexInline}provideParser(){return this.block?eu.parse:eu.parseInline}},ep=new class{defaults=t();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=eu;Renderer=eo;TextRenderer=ec;Lexer=ei;Tokenizer=ea;Hooks=ed;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(let n of e)switch(r=r.concat(t.call(this,n)),n.type){case"table":for(let e of n.header)r=r.concat(this.walkTokens(e.tokens,t));for(let e of n.rows)for(let n of e)r=r.concat(this.walkTokens(n.tokens,t));break;case"list":r=r.concat(this.walkTokens(n.items,t));break;default:{let e=n;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(n=>{let s=e[n].flat(1/0);r=r.concat(this.walkTokens(s,t))}):e.tokens&&(r=r.concat(this.walkTokens(e.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let r={...e};if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error("extension name required");if("renderer"in e){let r=t.renderers[e.name];r?t.renderers[e.name]=function(...t){let n=e.renderer.apply(this,t);return!1===n&&(n=r.apply(this,t)),n}:t.renderers[e.name]=e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw Error("extension level must be 'block' or 'inline'");let r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),r.extensions=t),e.renderer){let t=this.defaults.renderer||new eo(this.defaults);for(let r in e.renderer){if(!(r in t))throw Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let n=e.renderer[r],s=t[r];t[r]=(...e)=>{let r=n.apply(t,e);return!1===r&&(r=s.apply(t,e)),r||""}}r.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new ea(this.defaults);for(let r in e.tokenizer){if(!(r in t))throw Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let n=e.tokenizer[r],s=t[r];t[r]=(...e)=>{let r=n.apply(t,e);return!1===r&&(r=s.apply(t,e)),r}}r.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new ed;for(let r in e.hooks){if(!(r in t))throw Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let n=e.hooks[r],s=t[r];ed.passThroughHooks.has(r)?t[r]=e=>{if(this.defaults.async&&ed.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await n.call(t,e);return s.call(t,r)})();let l=n.call(t,e);return s.call(t,l)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let r=await n.apply(t,e);return!1===r&&(r=await s.apply(t,e)),r})();let r=n.apply(t,e);return!1===r&&(r=s.apply(t,e)),r}}r.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,n=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(n.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ei.lex(e,t??this.defaults)}parser(e,t){return eu.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let n={...r},s={...this.defaults,...n},l=this.onError(!!s.silent,!!s.async);if(!0===this.defaults.async&&!1===n.async)return l(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return l(Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return l(Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=e),s.async)return(async()=>{let r=s.hooks?await s.hooks.preprocess(t):t,n=await (s.hooks?await s.hooks.provideLexer():e?ei.lex:ei.lexInline)(r,s),l=s.hooks?await s.hooks.processAllTokens(n):n;s.walkTokens&&await Promise.all(this.walkTokens(l,s.walkTokens));let a=await (s.hooks?await s.hooks.provideParser():e?eu.parse:eu.parseInline)(l,s);return s.hooks?await s.hooks.postprocess(a):a})().catch(l);try{s.hooks&&(t=s.hooks.preprocess(t));let r=(s.hooks?s.hooks.provideLexer():e?ei.lex:ei.lexInline)(t,s);s.hooks&&(r=s.hooks.processAllTokens(r)),s.walkTokens&&this.walkTokens(r,s.walkTokens);let n=(s.hooks?s.hooks.provideParser():e?eu.parse:eu.parseInline)(r,s);return s.hooks&&(n=s.hooks.postprocess(n)),n}catch(e){return l(e)}}}onError(e,t){return r=>{if(r.message+=`
60
+ Please report this to https://github.com/markedjs/marked.`,e){let e="<p>An error occurred:</p><pre>"+et(r.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(r);throw r}}};function eh(e,t){return ep.parse(e,t)}eh.options=eh.setOptions=function(e){return ep.setOptions(e),eh.defaults=ep.defaults,r=eh.defaults,eh},eh.getDefaults=t,eh.defaults=r,eh.use=function(...e){return ep.use(...e),eh.defaults=ep.defaults,r=eh.defaults,eh},eh.walkTokens=function(e,t){return ep.walkTokens(e,t)},eh.parseInline=ep.parseInline,eh.Parser=eu,eh.parser=eu.parse,eh.Renderer=eo,eh.TextRenderer=ec,eh.Lexer=ei,eh.lexer=ei.lex,eh.Tokenizer=ea,eh.Hooks=ed,eh.parse=eh,eh.options,eh.setOptions,eh.use,eh.walkTokens,eh.parseInline,eu.parse,ei.lex,e.s(["Lexer",()=>ei,"marked",()=>eh])},170349,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},809737,e=>{e.v("/_next/static/media/worker.e575ad4f.js")},346131,345594,376268,e=>{"use strict";let t;var r=e.i(666426),n=e.i(686107),s=e.i(571577);function l(e,[t,r]){return Math.min(r,Math.max(t,e))}var a=e.i(291967),i=e.i(177779),o=e.i(221588),c=e.i(810096),u=e.i(92581),d=e.i(975287),p=0;function h(){n.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??f()),document.body.insertAdjacentElement("beforeend",e[1]??f()),p++,()=>{1===p&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),p--}},[])}function f(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}e.s(["useFocusGuards",()=>h],345594);var m=e.i(692792),g=e.i(852947),x="focusScope.autoFocusOnMount",k="focusScope.autoFocusOnUnmount",b={bubbles:!1,cancelable:!0},v=n.forwardRef((e,t)=>{let{loop:s=!1,trapped:l=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...c}=e,[u,d]=n.useState(null),p=(0,g.useCallbackRef)(a),h=(0,g.useCallbackRef)(i),f=n.useRef(null),v=(0,o.useComposedRefs)(t,e=>d(e)),j=n.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;n.useEffect(()=>{if(l){let e=function(e){if(j.paused||!u)return;let t=e.target;u.contains(t)?f.current=t:S(f.current,{select:!0})},t=function(e){if(j.paused||!u)return;let t=e.relatedTarget;null!==t&&(u.contains(t)||S(f.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&S(u)});return u&&r.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[l,u,j.paused]),n.useEffect(()=>{if(u){C.add(j);let e=document.activeElement;if(!u.contains(e)){let t=new CustomEvent(x,b);u.addEventListener(x,p),u.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(S(n,{select:t}),document.activeElement!==r)return}(w(u).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&S(u))}return()=>{u.removeEventListener(x,p),setTimeout(()=>{let t=new CustomEvent(k,b);u.addEventListener(k,h),u.dispatchEvent(t),t.defaultPrevented||S(e??document.body,{select:!0}),u.removeEventListener(k,h),C.remove(j)},0)}}},[u,p,h,j]);let R=n.useCallback(e=>{if(!s&&!l||j.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){var n;let t,l=e.currentTarget,[a,i]=[y(t=w(n=l),n),y(t.reverse(),n)];a&&i?e.shiftKey||r!==i?e.shiftKey&&r===a&&(e.preventDefault(),s&&S(i,{select:!0})):(e.preventDefault(),s&&S(a,{select:!0})):r===l&&e.preventDefault()}},[s,l,j.paused]);return(0,r.jsx)(m.Primitive.div,{tabIndex:-1,...c,ref:v,onKeyDown:R})});function w(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function y(e,t){for(let r of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(r,{upTo:t}))return r}function S(e,{select:t=!1}={}){if(e&&e.focus){var r;let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(r=e)instanceof HTMLInputElement&&"select"in r&&t&&e.select()}}v.displayName="FocusScope";var C=(t=[],{add(e){let r=t[0];e!==r&&r?.pause(),(t=j(t,e)).unshift(e)},remove(e){t=j(t,e),t[0]?.resume()}});function j(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}e.s(["FocusScope",()=>v],376268);var R=e.i(244107),T=e.i(509377),N=e.i(153840),E=e.i(545136),L=e.i(802313),P=e.i(225088),$=e.i(962687),A=e.i(73772),I=e.i(891246),z=[" ","Enter","ArrowUp","ArrowDown"],M=[" ","Enter"],H="Select",[_,D,q]=(0,i.createCollection)(H),[B,V]=(0,c.createContextScope)(H,[q,T.createPopperScope]),F=(0,T.createPopperScope)(),[O,U]=B(H),[Z,W]=B(H),K=e=>{let{__scopeSelect:t,children:s,open:l,defaultOpen:a,onOpenChange:i,value:o,defaultValue:c,onValueChange:d,dir:p,name:h,autoComplete:f,disabled:m,required:g,form:x}=e,k=F(t),[b,v]=n.useState(null),[w,y]=n.useState(null),[S,C]=n.useState(!1),j=(0,u.useDirection)(p),[N,E]=(0,L.useControllableState)({prop:l,defaultProp:a??!1,onChange:i,caller:H}),[P,$]=(0,L.useControllableState)({prop:o,defaultProp:c,onChange:d,caller:H}),A=n.useRef(null),I=!b||x||!!b.closest("form"),[z,M]=n.useState(new Set),D=Array.from(z).map(e=>e.props.value).join(";");return(0,r.jsx)(T.Root,{...k,children:(0,r.jsxs)(O,{required:g,scope:t,trigger:b,onTriggerChange:v,valueNode:w,onValueNodeChange:y,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:(0,R.useId)(),value:P,onValueChange:$,open:N,onOpenChange:E,dir:j,triggerPointerDownPosRef:A,disabled:m,children:[(0,r.jsx)(_.Provider,{scope:t,children:(0,r.jsx)(Z,{scope:e.__scopeSelect,onNativeOptionAdd:n.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:n.useCallback(e=>{M(t=>{let r=new Set(t);return r.delete(e),r})},[]),children:s})}),I?(0,r.jsxs)(eA,{"aria-hidden":!0,required:g,tabIndex:-1,name:h,autoComplete:f,value:P,onChange:e=>$(e.target.value),disabled:m,form:x,children:[void 0===P?(0,r.jsx)("option",{value:""}):null,Array.from(z)]},D):null]})})};K.displayName=H;var Q="SelectTrigger",G=n.forwardRef((e,t)=>{let{__scopeSelect:s,disabled:l=!1,...i}=e,c=F(s),u=U(Q,s),d=u.disabled||l,p=(0,o.useComposedRefs)(t,u.onTriggerChange),h=D(s),f=n.useRef("touch"),[g,x,k]=ez(e=>{let t=h().filter(e=>!e.disabled),r=t.find(e=>e.value===u.value),n=eM(t,e,r);void 0!==n&&u.onValueChange(n.value)}),b=e=>{d||(u.onOpenChange(!0),k()),e&&(u.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,r.jsx)(T.Anchor,{asChild:!0,...c,children:(0,r.jsx)(m.Primitive.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":eI(u.value)?"":void 0,...i,ref:p,onClick:(0,a.composeEventHandlers)(i.onClick,e=>{e.currentTarget.focus(),"mouse"!==f.current&&b(e)}),onPointerDown:(0,a.composeEventHandlers)(i.onPointerDown,e=>{f.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(b(e),e.preventDefault())}),onKeyDown:(0,a.composeEventHandlers)(i.onKeyDown,e=>{let t=""!==g.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||x(e.key),(!t||" "!==e.key)&&z.includes(e.key)&&(b(),e.preventDefault())})})})});G.displayName=Q;var X="SelectValue",Y=n.forwardRef((e,t)=>{let{__scopeSelect:n,className:s,style:l,children:a,placeholder:i="",...c}=e,u=U(X,n),{onValueNodeHasChildrenChange:d}=u,p=void 0!==a,h=(0,o.useComposedRefs)(t,u.onValueNodeChange);return(0,P.useLayoutEffect)(()=>{d(p)},[d,p]),(0,r.jsx)(m.Primitive.span,{...c,ref:h,style:{pointerEvents:"none"},children:eI(u.value)?(0,r.jsx)(r.Fragment,{children:i}):a})});Y.displayName=X;var J=n.forwardRef((e,t)=>{let{__scopeSelect:n,children:s,...l}=e;return(0,r.jsx)(m.Primitive.span,{"aria-hidden":!0,...l,ref:t,children:s||"▼"})});J.displayName="SelectIcon";var ee=e=>(0,r.jsx)(N.Portal,{asChild:!0,...e});ee.displayName="SelectPortal";var et="SelectContent",er=n.forwardRef((e,t)=>{let l=U(et,e.__scopeSelect),[a,i]=n.useState();return((0,P.useLayoutEffect)(()=>{i(new DocumentFragment)},[]),l.open)?(0,r.jsx)(ea,{...e,ref:t}):a?s.createPortal((0,r.jsx)(en,{scope:e.__scopeSelect,children:(0,r.jsx)(_.Slot,{scope:e.__scopeSelect,children:(0,r.jsx)("div",{children:e.children})})}),a):null});er.displayName=et;var[en,es]=B(et),el=(0,E.createSlot)("SelectContent.RemoveScroll"),ea=n.forwardRef((e,t)=>{let{__scopeSelect:s,position:l="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:c,onPointerDownOutside:u,side:p,sideOffset:f,align:m,alignOffset:g,arrowPadding:x,collisionBoundary:k,collisionPadding:b,sticky:w,hideWhenDetached:y,avoidCollisions:S,...C}=e,j=U(et,s),[R,T]=n.useState(null),[N,E]=n.useState(null),L=(0,o.useComposedRefs)(t,e=>T(e)),[P,$]=n.useState(null),[z,M]=n.useState(null),H=D(s),[_,q]=n.useState(!1),B=n.useRef(!1);n.useEffect(()=>{if(R)return(0,A.hideOthers)(R)},[R]),h();let V=n.useCallback(e=>{let[t,...r]=H().map(e=>e.ref.current),[n]=r.slice(-1),s=document.activeElement;for(let r of e)if(r===s||(r?.scrollIntoView({block:"nearest"}),r===t&&N&&(N.scrollTop=0),r===n&&N&&(N.scrollTop=N.scrollHeight),r?.focus(),document.activeElement!==s))return},[H,N]),F=n.useCallback(()=>V([P,R]),[V,P,R]);n.useEffect(()=>{_&&F()},[_,F]);let{onOpenChange:O,triggerPointerDownPosRef:Z}=j;n.useEffect(()=>{if(R){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(Z.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(Z.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():R.contains(r.target)||O(!1),document.removeEventListener("pointermove",t),Z.current=null};return null!==Z.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[R,O,Z]),n.useEffect(()=>{let e=()=>O(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[O]);let[W,K]=ez(e=>{let t=H().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),n=eM(t,e,r);n&&setTimeout(()=>n.ref.current.focus())}),Q=n.useCallback((e,t,r)=>{let n=!B.current&&!r;(void 0!==j.value&&j.value===t||n)&&($(e),n&&(B.current=!0))},[j.value]),G=n.useCallback(()=>R?.focus(),[R]),X=n.useCallback((e,t,r)=>{let n=!B.current&&!r;(void 0!==j.value&&j.value===t||n)&&M(e)},[j.value]),Y="popper"===l?eo:ei,J=Y===eo?{side:p,sideOffset:f,align:m,alignOffset:g,arrowPadding:x,collisionBoundary:k,collisionPadding:b,sticky:w,hideWhenDetached:y,avoidCollisions:S}:{};return(0,r.jsx)(en,{scope:s,content:R,viewport:N,onViewportChange:E,itemRefCallback:Q,selectedItem:P,onItemLeave:G,itemTextRefCallback:X,focusSelectedItem:F,selectedItemText:z,position:l,isPositioned:_,searchRef:W,children:(0,r.jsx)(I.RemoveScroll,{as:el,allowPinchZoom:!0,children:(0,r.jsx)(v,{asChild:!0,trapped:j.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,a.composeEventHandlers)(i,e=>{j.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,r.jsx)(d.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>j.onOpenChange(!1),children:(0,r.jsx)(Y,{role:"listbox",id:j.contentId,"data-state":j.open?"open":"closed",dir:j.dir,onContextMenu:e=>e.preventDefault(),...C,...J,onPlaced:()=>q(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:(0,a.composeEventHandlers)(C.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||K(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=H().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout(()=>V(t)),e.preventDefault()}})})})})})})});ea.displayName="SelectContentImpl";var ei=n.forwardRef((e,t)=>{let{__scopeSelect:s,onPlaced:a,...i}=e,c=U(et,s),u=es(et,s),[d,p]=n.useState(null),[h,f]=n.useState(null),g=(0,o.useComposedRefs)(t,e=>f(e)),x=D(s),k=n.useRef(!1),b=n.useRef(!0),{viewport:v,selectedItem:w,selectedItemText:y,focusSelectedItem:S}=u,C=n.useCallback(()=>{if(c.trigger&&c.valueNode&&d&&h&&v&&w&&y){let e=c.trigger.getBoundingClientRect(),t=h.getBoundingClientRect(),r=c.valueNode.getBoundingClientRect(),n=y.getBoundingClientRect();if("rtl"!==c.dir){let s=n.left-t.left,a=r.left-s,i=e.left-a,o=e.width+i,c=Math.max(o,t.width),u=l(a,[10,Math.max(10,window.innerWidth-10-c)]);d.style.minWidth=o+"px",d.style.left=u+"px"}else{let s=t.right-n.right,a=window.innerWidth-r.right-s,i=window.innerWidth-e.right-a,o=e.width+i,c=Math.max(o,t.width),u=l(a,[10,Math.max(10,window.innerWidth-10-c)]);d.style.minWidth=o+"px",d.style.right=u+"px"}let s=x(),i=window.innerHeight-20,o=v.scrollHeight,u=window.getComputedStyle(h),p=parseInt(u.borderTopWidth,10),f=parseInt(u.paddingTop,10),m=parseInt(u.borderBottomWidth,10),g=p+f+o+parseInt(u.paddingBottom,10)+m,b=Math.min(5*w.offsetHeight,g),S=window.getComputedStyle(v),C=parseInt(S.paddingTop,10),j=parseInt(S.paddingBottom,10),R=e.top+e.height/2-10,T=w.offsetHeight/2,N=p+f+(w.offsetTop+T);if(N<=R){let e=s.length>0&&w===s[s.length-1].ref.current;d.style.bottom="0px";let t=Math.max(i-R,T+(e?j:0)+(h.clientHeight-v.offsetTop-v.offsetHeight)+m);d.style.height=N+t+"px"}else{let e=s.length>0&&w===s[0].ref.current;d.style.top="0px";let t=Math.max(R,p+v.offsetTop+(e?C:0)+T);d.style.height=t+(g-N)+"px",v.scrollTop=N-R+v.offsetTop}d.style.margin="10px 0",d.style.minHeight=b+"px",d.style.maxHeight=i+"px",a?.(),requestAnimationFrame(()=>k.current=!0)}},[x,c.trigger,c.valueNode,d,h,v,w,y,c.dir,a]);(0,P.useLayoutEffect)(()=>C(),[C]);let[j,R]=n.useState();(0,P.useLayoutEffect)(()=>{h&&R(window.getComputedStyle(h).zIndex)},[h]);let T=n.useCallback(e=>{e&&!0===b.current&&(C(),S?.(),b.current=!1)},[C,S]);return(0,r.jsx)(ec,{scope:s,contentWrapper:d,shouldExpandOnScrollRef:k,onScrollButtonChange:T,children:(0,r.jsx)("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:(0,r.jsx)(m.Primitive.div,{...i,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});ei.displayName="SelectItemAlignedPosition";var eo=n.forwardRef((e,t)=>{let{__scopeSelect:n,align:s="start",collisionPadding:l=10,...a}=e,i=F(n);return(0,r.jsx)(T.Content,{...i,...a,ref:t,align:s,collisionPadding:l,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});eo.displayName="SelectPopperPosition";var[ec,eu]=B(et,{}),ed="SelectViewport",ep=n.forwardRef((e,t)=>{let{__scopeSelect:s,nonce:l,...i}=e,c=es(ed,s),u=eu(ed,s),d=(0,o.useComposedRefs)(t,c.onViewportChange),p=n.useRef(0);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),(0,r.jsx)(_.Slot,{scope:s,children:(0,r.jsx)(m.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:(0,a.composeEventHandlers)(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=u;if(n?.current&&r){let e=Math.abs(p.current-t.scrollTop);if(e>0){let n=window.innerHeight-20,s=Math.max(parseFloat(r.style.minHeight),parseFloat(r.style.height));if(s<n){let l=s+e,a=Math.min(n,l),i=l-a;r.style.height=a+"px","0px"===r.style.bottom&&(t.scrollTop=i>0?i:0,r.style.justifyContent="flex-end")}}}p.current=t.scrollTop})})})]})});ep.displayName=ed;var eh="SelectGroup",[ef,em]=B(eh);n.forwardRef((e,t)=>{let{__scopeSelect:n,...s}=e,l=(0,R.useId)();return(0,r.jsx)(ef,{scope:n,id:l,children:(0,r.jsx)(m.Primitive.div,{role:"group","aria-labelledby":l,...s,ref:t})})}).displayName=eh;var eg="SelectLabel",ex=n.forwardRef((e,t)=>{let{__scopeSelect:n,...s}=e,l=em(eg,n);return(0,r.jsx)(m.Primitive.div,{id:l.id,...s,ref:t})});ex.displayName=eg;var ek="SelectItem",[eb,ev]=B(ek),ew=n.forwardRef((e,t)=>{let{__scopeSelect:s,value:l,disabled:i=!1,textValue:c,...u}=e,d=U(ek,s),p=es(ek,s),h=d.value===l,[f,g]=n.useState(c??""),[x,k]=n.useState(!1),b=(0,o.useComposedRefs)(t,e=>p.itemRefCallback?.(e,l,i)),v=(0,R.useId)(),w=n.useRef("touch"),y=()=>{i||(d.onValueChange(l),d.onOpenChange(!1))};if(""===l)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,r.jsx)(eb,{scope:s,value:l,disabled:i,textId:v,isSelected:h,onItemTextChange:n.useCallback(e=>{g(t=>t||(e?.textContent??"").trim())},[]),children:(0,r.jsx)(_.ItemSlot,{scope:s,value:l,disabled:i,textValue:f,children:(0,r.jsx)(m.Primitive.div,{role:"option","aria-labelledby":v,"data-highlighted":x?"":void 0,"aria-selected":h&&x,"data-state":h?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...u,ref:b,onFocus:(0,a.composeEventHandlers)(u.onFocus,()=>k(!0)),onBlur:(0,a.composeEventHandlers)(u.onBlur,()=>k(!1)),onClick:(0,a.composeEventHandlers)(u.onClick,()=>{"mouse"!==w.current&&y()}),onPointerUp:(0,a.composeEventHandlers)(u.onPointerUp,()=>{"mouse"===w.current&&y()}),onPointerDown:(0,a.composeEventHandlers)(u.onPointerDown,e=>{w.current=e.pointerType}),onPointerMove:(0,a.composeEventHandlers)(u.onPointerMove,e=>{w.current=e.pointerType,i?p.onItemLeave?.():"mouse"===w.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,a.composeEventHandlers)(u.onPointerLeave,e=>{e.currentTarget===document.activeElement&&p.onItemLeave?.()}),onKeyDown:(0,a.composeEventHandlers)(u.onKeyDown,e=>{(p.searchRef?.current===""||" "!==e.key)&&(M.includes(e.key)&&y()," "===e.key&&e.preventDefault())})})})})});ew.displayName=ek;var ey="SelectItemText",eS=n.forwardRef((e,t)=>{let{__scopeSelect:l,className:a,style:i,...c}=e,u=U(ey,l),d=es(ey,l),p=ev(ey,l),h=W(ey,l),[f,g]=n.useState(null),x=(0,o.useComposedRefs)(t,e=>g(e),p.onItemTextChange,e=>d.itemTextRefCallback?.(e,p.value,p.disabled)),k=f?.textContent,b=n.useMemo(()=>(0,r.jsx)("option",{value:p.value,disabled:p.disabled,children:k},p.value),[p.disabled,p.value,k]),{onNativeOptionAdd:v,onNativeOptionRemove:w}=h;return(0,P.useLayoutEffect)(()=>(v(b),()=>w(b)),[v,w,b]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m.Primitive.span,{id:p.textId,...c,ref:x}),p.isSelected&&u.valueNode&&!u.valueNodeHasChildren?s.createPortal(c.children,u.valueNode):null]})});eS.displayName=ey;var eC="SelectItemIndicator",ej=n.forwardRef((e,t)=>{let{__scopeSelect:n,...s}=e;return ev(eC,n).isSelected?(0,r.jsx)(m.Primitive.span,{"aria-hidden":!0,...s,ref:t}):null});ej.displayName=eC;var eR="SelectScrollUpButton",eT=n.forwardRef((e,t)=>{let s=es(eR,e.__scopeSelect),l=eu(eR,e.__scopeSelect),[a,i]=n.useState(!1),c=(0,o.useComposedRefs)(t,l.onScrollButtonChange);return(0,P.useLayoutEffect)(()=>{if(s.viewport&&s.isPositioned){let e=function(){i(t.scrollTop>0)},t=s.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[s.viewport,s.isPositioned]),a?(0,r.jsx)(eL,{...e,ref:c,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=s;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});eT.displayName=eR;var eN="SelectScrollDownButton",eE=n.forwardRef((e,t)=>{let s=es(eN,e.__scopeSelect),l=eu(eN,e.__scopeSelect),[a,i]=n.useState(!1),c=(0,o.useComposedRefs)(t,l.onScrollButtonChange);return(0,P.useLayoutEffect)(()=>{if(s.viewport&&s.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;i(Math.ceil(t.scrollTop)<e)},t=s.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[s.viewport,s.isPositioned]),a?(0,r.jsx)(eL,{...e,ref:c,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=s;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});eE.displayName=eN;var eL=n.forwardRef((e,t)=>{let{__scopeSelect:s,onAutoScroll:l,...i}=e,o=es("SelectScrollButton",s),c=n.useRef(null),u=D(s),d=n.useCallback(()=>{null!==c.current&&(window.clearInterval(c.current),c.current=null)},[]);return n.useEffect(()=>()=>d(),[d]),(0,P.useLayoutEffect)(()=>{let e=u().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[u]),(0,r.jsx)(m.Primitive.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:(0,a.composeEventHandlers)(i.onPointerDown,()=>{null===c.current&&(c.current=window.setInterval(l,50))}),onPointerMove:(0,a.composeEventHandlers)(i.onPointerMove,()=>{o.onItemLeave?.(),null===c.current&&(c.current=window.setInterval(l,50))}),onPointerLeave:(0,a.composeEventHandlers)(i.onPointerLeave,()=>{d()})})}),eP=n.forwardRef((e,t)=>{let{__scopeSelect:n,...s}=e;return(0,r.jsx)(m.Primitive.div,{"aria-hidden":!0,...s,ref:t})});eP.displayName="SelectSeparator";var e$="SelectArrow";n.forwardRef((e,t)=>{let{__scopeSelect:n,...s}=e,l=F(n),a=U(e$,n),i=es(e$,n);return a.open&&"popper"===i.position?(0,r.jsx)(T.Arrow,{...l,...s,ref:t}):null}).displayName=e$;var eA=n.forwardRef(({__scopeSelect:e,value:t,...s},l)=>{let a,i=n.useRef(null),c=(0,o.useComposedRefs)(l,i),u=(a=n.useRef({value:t,previous:t}),n.useMemo(()=>(a.current.value!==t&&(a.current.previous=a.current.value,a.current.value=t),a.current.previous),[t]));return n.useEffect(()=>{let e=i.current;if(!e)return;let r=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(u!==t&&r){let n=new Event("change",{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[u,t]),(0,r.jsx)(m.Primitive.select,{...s,style:{...$.VISUALLY_HIDDEN_STYLES,...s.style},ref:c,defaultValue:t})});function eI(e){return""===e||void 0===e}function ez(e){let t=(0,g.useCallbackRef)(e),r=n.useRef(""),s=n.useRef(0),l=n.useCallback(e=>{let n=r.current+e;t(n),function e(t){r.current=t,window.clearTimeout(s.current),""!==t&&(s.current=window.setTimeout(()=>e(""),1e3))}(n)},[t]),a=n.useCallback(()=>{r.current="",window.clearTimeout(s.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(s.current),[]),[r,l,a]}function eM(e,t,r){var n,s;let l=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=r?e.indexOf(r):-1,i=(n=e,s=Math.max(a,0),n.map((e,t)=>n[(s+t)%n.length]));1===l.length&&(i=i.filter(e=>e!==r));let o=i.find(e=>e.textValue.toLowerCase().startsWith(l.toLowerCase()));return o!==r?o:void 0}eA.displayName="SelectBubbleInput";var eH=e.i(613671),e_=e.i(886288);let eD=(0,e_.default)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),eq=(0,e_.default)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var eB=e.i(949245);let eV=n.forwardRef(({className:e,children:t,...n},s)=>(0,r.jsxs)(G,{ref:s,className:(0,eB.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,(0,r.jsx)(J,{asChild:!0,children:(0,r.jsx)(eD,{className:"h-4 w-4 opacity-50"})})]}));eV.displayName=G.displayName;let eF=n.forwardRef(({className:e,...t},n)=>(0,r.jsx)(eT,{ref:n,className:(0,eB.cn)("flex cursor-default items-center justify-center py-1",e),...t,children:(0,r.jsx)(eq,{className:"h-4 w-4"})}));eF.displayName=eT.displayName;let eO=n.forwardRef(({className:e,...t},n)=>(0,r.jsx)(eE,{ref:n,className:(0,eB.cn)("flex cursor-default items-center justify-center py-1",e),...t,children:(0,r.jsx)(eD,{className:"h-4 w-4"})}));eO.displayName=eE.displayName;let eU=n.forwardRef(({className:e,children:t,position:n="popper",...s},l)=>(0,r.jsx)(ee,{children:(0,r.jsxs)(er,{ref:l,className:(0,eB.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...s,children:[(0,r.jsx)(eF,{}),(0,r.jsx)(ep,{className:(0,eB.cn)("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,r.jsx)(eO,{})]})}));eU.displayName=er.displayName,n.forwardRef(({className:e,...t},n)=>(0,r.jsx)(ex,{ref:n,className:(0,eB.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t})).displayName=ex.displayName;let eZ=n.forwardRef(({className:e,children:t,...n},s)=>(0,r.jsxs)(ew,{ref:s,className:(0,eB.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[(0,r.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(ej,{children:(0,r.jsx)(eH.Check,{className:"h-4 w-4"})})}),(0,r.jsx)(eS,{children:t})]}));eZ.displayName=ew.displayName,n.forwardRef(({className:e,...t},n)=>(0,r.jsx)(eP,{ref:n,className:(0,eB.cn)("-mx-1 my-1 h-px bg-muted",e),...t})).displayName=eP.displayName,e.s(["Select",()=>K,"SelectContent",()=>eU,"SelectItem",()=>eZ,"SelectTrigger",()=>eV,"SelectValue",()=>Y],346131)},693144,e=>{"use strict";var t=e.i(349011),r=e.i(610062);function n(){(0,t.c)("[nuqs] Aborting queues"),r.t.abortAll(),r.n.abort().forEach(e=>r.t.queuedQuerySync.emit(e))}var s=e.i(686107),l=e.i(868924);let a=0;function i(){a=0,n()}function o(){--a<=0&&(a=0,queueMicrotask(n))}function c(){return(0,s.useEffect)(()=>(!function(){var e;if(e="next/app","undefined"==typeof history||(history.nuqs?.version&&"2.8.3"!==history.nuqs.version?(console.error((0,t.s)(409),history.nuqs.version,"2.8.3",e),!0):!!history.nuqs?.adapters?.includes(e)))return;let r=history.replaceState,n=history.pushState;history.replaceState=function(e,t,n){return o(),r.call(history,e,t,n)},history.pushState=function(e,t,r){return o(),n.call(history,e,t,r)},history.nuqs=history.nuqs??{version:"2.8.3",adapters:[]},history.nuqs.adapters.push("next/app")}(),window.addEventListener("popstate",i),()=>window.removeEventListener("popstate",i)),[]),null}let u=(0,t.n)(function(){let e=(0,l.useRouter)(),[r,n]=(0,s.useOptimistic)((0,l.useSearchParams)());return{searchParams:r,updateUrl:(0,s.useCallback)((r,l)=>{(0,s.startTransition)(()=>{l.shallow||n(r);let s=function(e){let{origin:r,pathname:n,hash:s}=location;return r+n+(0,t.o)(e)+s}(r);(0,t.c)("[nuqs next/app] Updating url: %s",s);let i="push"===l.history?history.pushState:history.replaceState;a=3,i.call(history,null,"",s),l.scroll&&window.scrollTo(0,0),l.shallow||e.replace(s,{scroll:!1})})},[]),rateLimitFactor:3,autoResetQueueOnUpdate:!1}});function d({children:e,...t}){return(0,s.createElement)(u,{...t,children:[(0,s.createElement)(s.Suspense,{key:"nuqs-adapter-suspense-navspy",children:(0,s.createElement)(c)}),e]})}e.s(["NuqsAdapter",()=>d],693144)},608576,e=>{"use strict";var t=e.i(666426),r=e.i(912738),n=e.i(414576),s=e.i(868924),l=e.i(686107),a=(e,t,r,n,s,l,a,i)=>{let o=document.documentElement,c=["light","dark"];function u(t){var r;(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,n=r&&l?s.map(e=>l[e]||e):s;r?(o.classList.remove(...n),o.classList.add(l&&l[t]?l[t]:t)):o.setAttribute(e,t)}),r=t,i&&c.includes(r)&&(o.style.colorScheme=r)}if(n)u(n);else try{let e=localStorage.getItem(t)||r,n=a&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;u(n)}catch(e){}},i=["light","dark"],o="(prefers-color-scheme: dark)",c="undefined"==typeof window,u=l.createContext(void 0),d={setTheme:e=>{},themes:[]},p=()=>{var e;return null!=(e=l.useContext(u))?e:d},h=e=>l.useContext(u)?l.createElement(l.Fragment,null,e.children):l.createElement(m,{...e}),f=["light","dark"],m=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:r=!0,enableColorScheme:n=!0,storageKey:s="theme",themes:a=f,defaultTheme:c=r?"system":"light",attribute:d="data-theme",value:p,children:h,nonce:m,scriptProps:v})=>{let[w,y]=l.useState(()=>x(s,c)),[S,C]=l.useState(()=>"system"===w?b():w),j=p?Object.values(p):a,R=l.useCallback(e=>{let s=e;if(!s)return;"system"===e&&r&&(s=b());let l=p?p[s]:s,a=t?k(m):null,o=document.documentElement,u=e=>{"class"===e?(o.classList.remove(...j),l&&o.classList.add(l)):e.startsWith("data-")&&(l?o.setAttribute(e,l):o.removeAttribute(e))};if(Array.isArray(d)?d.forEach(u):u(d),n){let e=i.includes(c)?c:null,t=i.includes(s)?s:e;o.style.colorScheme=t}null==a||a()},[m]),T=l.useCallback(e=>{let t="function"==typeof e?e(w):e;y(t);try{localStorage.setItem(s,t)}catch(e){}},[w]),N=l.useCallback(t=>{C(b(t)),"system"===w&&r&&!e&&R("system")},[w,e]);l.useEffect(()=>{let e=window.matchMedia(o);return e.addListener(N),N(e),()=>e.removeListener(N)},[N]),l.useEffect(()=>{let e=e=>{e.key===s&&(e.newValue?y(e.newValue):T(c))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[T]),l.useEffect(()=>{R(null!=e?e:w)},[e,w]);let E=l.useMemo(()=>({theme:w,setTheme:T,forcedTheme:e,resolvedTheme:"system"===w?S:w,themes:r?[...a,"system"]:a,systemTheme:r?S:void 0}),[w,T,e,S,r,a]);return l.createElement(u.Provider,{value:E},l.createElement(g,{forcedTheme:e,storageKey:s,attribute:d,enableSystem:r,enableColorScheme:n,defaultTheme:c,value:p,themes:a,nonce:m,scriptProps:v}),h)},g=l.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:i,value:o,themes:c,nonce:u,scriptProps:d})=>{let p=JSON.stringify([r,t,i,e,c,o,n,s]).slice(1,-1);return l.createElement("script",{...d,suppressHydrationWarning:!0,nonce:"undefined"==typeof window?u:"",dangerouslySetInnerHTML:{__html:`(${a.toString()})(${p})`}})}),x=(e,t)=>{let r;if(!c){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},k=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},b=e=>(e||(e=window.matchMedia(o)),e.matches?"dark":"light"),v=e.i(886288);let w=(0,v.default)("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var y=e.i(638322);function S({config:e}){let{provider:r,parts:n}=((e,t)=>{if("vercel"===e){let e=[];return t.env&&e.push(`env: ${t.env}`),t.project&&e.push(`project: ${t.project}`),t.team&&e.push(`team: ${t.team}`),{provider:"Vercel",parts:e}}if("local"===e){let e=[];return t.dataDir&&e.push(`dir: ${t.dataDir}`),t.port&&e.push(`port: ${t.port}`),{provider:"Local",parts:e}}return{provider:t.backend||"unknown",parts:[]}})(e.backend||"local",e);return(0,t.jsxs)("div",{className:"text-sm text-muted-foreground flex items-center gap-2",children:[(0,t.jsxs)("span",{className:"font-medium",children:["Connected to: ",r]}),(0,t.jsxs)(y.Tooltip,{children:[(0,t.jsx)(y.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(w,{className:"w-4 h-4"})}),(0,t.jsx)(y.TooltipContent,{children:(0,t.jsx)("div",{className:"flex flex-col gap-1",children:n.map(e=>(0,t.jsx)("span",{children:e},e))})})]})]})}let C=(0,v.default)("ExternalLink",[["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"}]]),j=(0,v.default)("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]),R=(0,v.default)("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),T=(0,v.default)("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),N=(0,v.default)("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);var E=e.i(260218),L=e.i(917955),P=e.i(949245);function $({value:e,onValueChange:r,options:n,className:s}){return(0,t.jsx)("div",{className:(0,P.cn)("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",s),children:n.map(n=>(0,t.jsxs)("button",{type:"button",onClick:()=>r(n.value),className:(0,P.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e===n.value?"bg-background text-foreground shadow":"hover:bg-background/50"),children:[n.icon,n.label&&(0,t.jsx)("span",{className:"ml-2",children:n.label})]},n.value))})}var A=e.i(687602);let I=(0,v.default)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var z=e.i(259280),M=e.i(456944);let H=l.forwardRef(({className:e,type:r,...n},s)=>(0,t.jsx)("input",{type:r,className:(0,P.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:s,...n}));H.displayName="Input";var _=e.i(692792),D=l.forwardRef((e,r)=>(0,t.jsx)(_.Primitive.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));D.displayName="Label";let q=(0,e.i(294237).cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),B=l.forwardRef(({className:e,...r},n)=>(0,t.jsx)(D,{ref:n,className:(0,P.cn)(q(),e),...r}));B.displayName=D.displayName;var V=e.i(346131),F=e.i(620486),O=e.i(202311),U=(0,O.createServerReference)("4092d8711f2d282bbab98f4435fd260f49c4d5106a",O.callServer,void 0,O.findSourceMapURL,"validateWorldConfig"),Z=e.i(335468),W=(0,O.createServerReference)("00d3f19c68ddef480c9481b99f05ac7baa954b04d9",O.callServer,void 0,O.findSourceMapURL,"checkWorldsAvailability");function K({open:e,onOpenChange:r}={}){let n,s=(0,F.useQueryParamConfig)(),a=(0,F.useUpdateConfigQueryParams)(),[i,o]=(0,l.useState)(!1),c=r||o,[u,d]=(0,l.useState)(s),[p,h]=(0,l.useState)([]),[f,m]=(0,l.useState)(!1),{data:g=[],isLoading:x}=(0,Z.default)("worlds-availability",W,{revalidateOnFocus:!1}),k=u.backend||"local",b="local"===k,v="postgres"===k;(0,l.useEffect)(()=>{d(s)},[s]);let w=async()=>{m(!0);try{let e=await U(u);h(e),0===e.length&&(a(u),c(!1))}catch(e){console.error("Validation error:",e),h([{field:"general",message:e instanceof Error?e.message:"Unknown error"}])}finally{m(!1)}},y=(e,t)=>{d(r=>({...r,[e]:t})),h(t=>t.filter(t=>t.field!==e))},S=e=>p.find(t=>t.field===e)?.message,C=JSON.stringify(u)!==JSON.stringify(s)||p.length>0;return(0,t.jsxs)(t.Fragment,{children:[void 0===e&&(0,t.jsx)("button",{type:"button",onClick:()=>c(!0),className:"p-2 rounded-full hover:bg-accent transition-colors",title:"Configuration",children:(0,t.jsx)(T,{className:"h-6 w-6"})}),(void 0!==e?e:i)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"fixed inset-0 bg-black/50 z-40 cursor-default",onClick:()=>c(!1),"aria-label":"Close configuration panel"}),(0,t.jsx)("div",{className:"fixed top-0 right-0 h-full w-96 bg-background border-l shadow-lg z-50 overflow-y-auto",children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold",children:"Configuration"}),(0,t.jsx)(E.Button,{type:"button",onClick:()=>c(!1),variant:"outline",size:"icon",children:(0,t.jsx)(z.X,{className:"h-5 w-5"})})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(B,{htmlFor:"backend",children:"Backend"}),(0,t.jsxs)(V.Select,{value:u.backend||"local",onValueChange:e=>y("backend",e),children:[(0,t.jsx)(V.SelectTrigger,{id:"backend",children:(0,t.jsx)(V.SelectValue,{placeholder:"Select backend"})}),(0,t.jsx)(V.SelectContent,{children:x?(0,t.jsx)(V.SelectItem,{value:"loading",disabled:!0,children:"Loading worlds..."}):g.length>0?g.map(e=>(0,t.jsx)(V.SelectItem,{value:e.id,children:e.displayName},e.id)):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(V.SelectItem,{value:"local",children:"Local"}),(0,t.jsx)(V.SelectItem,{value:"vercel",children:"Vercel"}),(0,t.jsx)(V.SelectItem,{value:"postgres",children:"PostgreSQL"})]})})]}),(n=g.find(e=>e.id===k))&&!n.isInstalled?(0,t.jsxs)("div",{className:"flex items-start gap-2 p-2 rounded-md bg-amber-500/10 border border-amber-500/20 text-amber-600 dark:text-amber-400",children:[(0,t.jsx)(I,{className:"h-4 w-4 mt-0.5 shrink-0"}),(0,t.jsxs)("div",{className:"text-xs",children:[(0,t.jsx)("p",{className:"font-medium",children:"Package not installed"}),(0,t.jsxs)("p",{className:"mt-1 text-muted-foreground",children:["Run:"," ",(0,t.jsx)("code",{className:"bg-muted px-1 py-0.5 rounded",children:n.installCommand})]})]})]}):null]}),b&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(B,{htmlFor:"port",children:"Port"}),(0,t.jsx)(H,{id:"port",value:u.port||"",onChange:e=>y("port",e.target.value),placeholder:"3001",className:S("port")?"border-destructive":""}),S("port")&&(0,t.jsx)("p",{className:"text-sm text-destructive break-words",children:S("port")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(B,{htmlFor:"dataDir",children:"Data Directory"}),(0,t.jsx)(H,{id:"dataDir",value:u.dataDir||"",onChange:e=>y("dataDir",e.target.value),placeholder:".workflow-data or .next/workflow-data",className:S("dataDir")?"border-destructive":""}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Path to the workflow data directory. Can be relative or absolute."})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(B,{htmlFor:"manifestPath",children:"Manifest Path"}),(0,t.jsx)(H,{id:"manifestPath",value:u.manifestPath||"",onChange:e=>y("manifestPath",e.target.value),placeholder:"app/.well-known/workflow/v1/manifest.json",className:S("manifestPath")?"border-destructive":""}),S("manifestPath")&&(0,t.jsx)("p",{className:"text-sm text-destructive break-words",children:S("manifestPath")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Path to the workflow manifest file. Leave empty to use default locations."})]})]}),v&&(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(B,{htmlFor:"postgresUrl",children:"Connection URL"}),(0,t.jsx)(H,{id:"postgresUrl",value:u.postgresUrl||"",onChange:e=>y("postgresUrl",e.target.value),placeholder:"postgres://user:pass@host:5432/db",className:S("postgresUrl")?"border-destructive":""}),S("postgresUrl")&&(0,t.jsx)("p",{className:"text-sm text-destructive",children:S("postgresUrl")})]})}),!b&&!v&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(B,{htmlFor:"env",children:"Environment"}),(0,t.jsx)(H,{id:"env",value:u.env||"production",onChange:e=>y("env",e.target.value),placeholder:"production or preview"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(B,{htmlFor:"authToken",children:"Auth Token"}),(0,t.jsx)(H,{id:"authToken",type:"password",value:u.authToken||"",onChange:e=>y("authToken",e.target.value),placeholder:"Vercel auth token"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(B,{htmlFor:"project",children:"Project ID"}),(0,t.jsx)(H,{id:"project",value:u.project||"",onChange:e=>y("project",e.target.value),placeholder:"prj_..."})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(B,{htmlFor:"team",children:"Team ID"}),(0,t.jsx)(H,{id:"team",value:u.team||"",onChange:e=>y("team",e.target.value),placeholder:"team_..."})]})]}),p.length>0&&(0,t.jsxs)(M.Alert,{variant:"destructive",className:"!bg-destructive/10 !border-destructive",children:[(0,t.jsx)(A.AlertCircle,{className:"h-4 w-4"}),(0,t.jsx)(M.AlertTitle,{children:"Configuration Error"}),(0,t.jsx)(M.AlertDescription,{children:(0,t.jsx)("ul",{className:"list-disc list-inside space-y-1",children:p.map((e,r)=>(0,t.jsxs)("li",{className:"break-words",children:["general"!==e.field&&(0,t.jsxs)("strong",{children:[e.field,":"]})," ",e.message]},`error-${r}`))})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 pt-4",children:[(0,t.jsx)(E.Button,{onClick:w,disabled:f||!C||g.some(e=>e.id===k&&!e.isInstalled),className:"w-full",children:f?"Validating...":"Apply Configuration"}),(0,t.jsx)(E.Button,{variant:"outline",onClick:()=>{d(s),h([]),c(!1)},className:"w-full",children:"Cancel"})]})]})]})})]})]})}function Q({open:e,onOpenChange:r}){return(0,t.jsx)(K,{open:e,onOpenChange:r})}function G(){let[e,r]=(0,l.useState)(!1),{theme:n,setTheme:s}=p();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(L.DropdownMenu,{children:[(0,t.jsx)(L.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)(E.Button,{variant:"outline",size:"icon",children:[(0,t.jsx)(T,{className:"h-[1.2rem] w-[1.2rem]"}),(0,t.jsx)("span",{className:"sr-only",children:"Settings"})]})}),(0,t.jsxs)(L.DropdownMenuContent,{align:"end",className:"w-56",children:[(0,t.jsxs)("div",{className:"px-2 py-1.5 flex items-center gap-3",children:[(0,t.jsx)(L.DropdownMenuLabel,{className:"px-0 mb-0",children:"Theme"}),(0,t.jsx)($,{value:n||"system",onValueChange:s,options:[{value:"system",icon:(0,t.jsx)(j,{className:"h-4 w-4"})},{value:"light",icon:(0,t.jsx)(N,{className:"h-4 w-4"})},{value:"dark",icon:(0,t.jsx)(R,{className:"h-4 w-4"})}]})]}),(0,t.jsx)(L.DropdownMenuSeparator,{}),(0,t.jsxs)(L.DropdownMenuItem,{onSelect:()=>r(!0),children:[(0,t.jsx)("span",{children:"Configuration"}),(0,t.jsx)(T,{className:"ml-auto h-4 w-4"})]}),(0,t.jsx)(L.DropdownMenuItem,{asChild:!0,children:(0,t.jsxs)("a",{href:"https://useworkflow.dev/docs/getting-started",target:"_blank",rel:"noopener noreferrer",children:[(0,t.jsx)("span",{children:"Docs"}),(0,t.jsx)(C,{className:"ml-auto h-4 w-4"})]})})]})]}),(0,t.jsx)(Q,{open:e,onOpenChange:r})]})}var X=e.i(806746);let Y=({...e})=>{let{theme:r="system"}=p();return(0,t.jsx)(X.Toaster,{theme:r,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",error:"group-[.toaster]:bg-destructive group-[.toaster]:text-destructive-foreground group-[.toaster]:border-destructive",success:"group-[.toaster]:bg-green-600 group-[.toaster]:text-white group-[.toaster]:border-green-600"}},...e})};function J({className:e}={}){return(0,t.jsxs)("svg",{viewBox:"0 0 1792 240",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e||"h-6 w-auto",role:"img","aria-label":"Workflow Logo",children:[(0,t.jsx)("title",{children:"Workflow Logo"}),(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M753.933 55.627C806.249 55.627 840.685 91.718 840.685 147.345C840.685 202.971 806.249 239.062 753.933 239.062C701.286 239.062 666.851 202.971 666.851 147.345C666.851 91.7181 701.286 55.6271 753.933 55.627ZM753.933 90.0625C726.451 90.0626 710.889 111.254 710.889 147.345C710.889 183.436 726.451 204.627 753.933 204.627C781.084 204.627 796.978 183.436 796.978 147.345C796.978 111.254 781.084 90.0625 753.933 90.0625Z",className:"fill-foreground"}),(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1445.65 55.627C1497.96 55.627 1532.4 91.718 1532.4 147.345C1532.4 202.971 1497.96 239.062 1445.65 239.062C1393 239.062 1358.56 202.971 1358.56 147.345C1358.56 91.718 1393 55.627 1445.65 55.627ZM1445.65 90.0625C1418.16 90.0625 1402.6 111.254 1402.6 147.345C1402.6 183.436 1418.16 204.627 1445.65 204.627C1472.8 204.627 1488.69 183.436 1488.69 147.345C1488.69 111.254 1472.8 90.0626 1445.65 90.0625Z",className:"fill-foreground"}),(0,t.jsx)("path",{d:"M902.473 94.0361C909.095 70.8584 922.34 59.5997 944.855 59.5996H961.079V92.3799H944.524C916.38 92.38 904.128 106.949 904.128 135.094V235.089H861.746V59.5996H901.48L902.473 94.0361Z",className:"fill-foreground"}),(0,t.jsx)("path",{d:"M1019.25 138.735L1091.11 59.5996H1143.09L1074.55 132.113L1146.4 235.089H1098.72L1046.74 157.609L1019.25 187.078V235.089H976.872V0H1019.25V138.735Z",className:"fill-foreground"}),(0,t.jsx)("path",{d:"M1263.63 32.7803H1235.82C1224.89 32.7803 1217.28 41.3893 1217.28 54.9648V59.5996H1260.98V92.3799H1217.28V235.089H1174.56V92.3799H1149.4V59.5996H1174.56V54.9648C1174.56 19.5359 1191.78 0 1230.85 0H1263.63V32.7803Z",className:"fill-foreground"}),(0,t.jsx)("path",{d:"M1322.58 189.396C1322.58 197.673 1327.22 202.309 1335.5 202.31H1348.74V235.089H1324.57C1298.08 235.089 1280.2 218.534 1280.2 191.052V0H1322.58V189.396Z",className:"fill-foreground"}),(0,t.jsx)("path",{d:"M1604.59 186.416L1641.02 59.5996H1677.77L1713.86 186.416L1749.95 59.5996H1791.34L1737.7 235.089H1694.32L1659.56 116.883L1624.79 235.089H1581.42L1527.77 59.5996H1568.83L1604.59 186.416Z",className:"fill-foreground"}),(0,t.jsx)("path",{d:"M472.173 174.847L514.895 0.671875H554.66L598.038 174.847L640.432 0.671875H685.454L623.015 234H575.692L534.942 77.5713L493.863 234H446.869L384.1 0.671875H429.122L472.173 174.847Z",className:"fill-foreground"}),(0,t.jsx)("path",{d:"M125.776 0C120.929 1.64945e-05 117 3.9291 117 8.77539V61.4248C117 66.2711 120.929 70.2002 125.776 70.2002H160.875L161.253 70.2051C169.032 70.4023 175.301 76.6734 175.495 84.4531L175.5 84.8252V143.325C175.5 148.171 179.429 152.101 184.276 152.101H219.375L219.753 152.105C227.53 152.303 233.798 158.571 233.995 166.348L234 166.726V225.225C234 230.071 237.929 234 242.776 234H295.425C300.271 234 304.2 230.071 304.2 225.225V172.575C304.2 167.729 300.271 163.8 295.425 163.8H260.25C252.334 163.76 245.905 157.43 245.705 149.553L245.7 149.176V90.6758C245.7 85.8295 241.771 81.9004 236.925 81.9004H201.825C193.874 81.9004 187.405 75.5551 187.205 67.6523L187.2 67.2754V8.77539C187.2 3.9291 183.271 1.64951e-05 178.425 0H125.776Z",className:"fill-foreground"}),(0,t.jsx)("path",{d:"M67.2755 81.9004C62.4293 81.9004 58.5002 85.8295 58.5002 90.6758V143.325C58.5004 148.171 62.4294 152.101 67.2755 152.101H102.375L102.753 152.105C110.53 152.303 116.798 158.571 116.995 166.348L117 166.726V225.225C117 230.071 120.929 234 125.776 234H178.425C183.271 234 187.2 230.071 187.2 225.225V172.575C187.2 167.729 183.271 163.8 178.425 163.8H143.25C135.334 163.76 128.905 157.43 128.705 149.553L128.7 149.176V90.6758C128.7 85.8295 124.771 81.9004 119.925 81.9004H67.2755Z",className:"fill-foreground"}),(0,t.jsx)("path",{d:"M8.77454 163.8C3.92844 163.8 0.00012207 167.729 0.00012207 172.575V225.225C0.00012207 230.071 3.92844 234 8.77454 234H61.4249C66.2712 234 70.2003 230.071 70.2003 225.225V172.575C70.2003 167.729 66.2712 163.8 61.4249 163.8H8.77454Z",className:"fill-foreground"})]})}function ee({children:e}){let a=(0,s.useRouter)(),i=(0,s.usePathname)(),o=(0,s.useSearchParams)(),c=(0,F.useQueryParamConfig)(),{setTheme:u}=p(),d=o.get("id"),h=o.get("runId"),f=o.get("stepId"),m=o.get("hookId"),g=o.get("resource"),x=o.get("theme"),k=(0,l.useRef)(!1);return(0,l.useEffect)(()=>{x&&("light"===x||"dark"===x||"system"===x)&&u(x)},[x,u]),(0,l.useEffect)(()=>{let e;if("/"===i||!k.current){if(i.startsWith("/run/")){k.current=!0;return}if(!g){if(h){let e;e=f?(0,F.buildUrlWithConfig)(`/run/${h}`,c,{sidebar:"step",stepId:f}):m?(0,F.buildUrlWithConfig)(`/run/${h}`,c,{sidebar:"hook",hookId:m}):(0,F.buildUrlWithConfig)(`/run/${h}`,c),k.current=!0,a.push(e)}return}if(d){if("run"===g)e=(0,F.buildUrlWithConfig)(`/run/${d}`,c);else if("step"===g&&h)e=(0,F.buildUrlWithConfig)(`/run/${h}`,c,{sidebar:"step",stepId:d});else if("stream"===g&&h)e=(0,F.buildUrlWithConfig)(`/run/${h}`,c,{sidebar:"stream",streamId:d});else if("event"===g&&h)e=(0,F.buildUrlWithConfig)(`/run/${h}`,c,{sidebar:"event",eventId:d});else if("hook"===g&&h)e=(0,F.buildUrlWithConfig)(`/run/${h}`,c,{sidebar:"hook",hookId:d});else{if("hook"!==g||h)return void console.warn(`Can't deep-link to ${g} ${d}.`);e=(0,F.buildUrlWithConfig)("/",c,{sidebar:"hook",hookId:d})}k.current=!0,a.push(e)}}},[g,d,h,f,m,a,c,i]),(0,t.jsxs)("div",{className:"min-h-screen flex flex-col",children:[(0,t.jsxs)(r.TooltipProvider,{delayDuration:0,children:[(0,t.jsx)("div",{className:"sticky top-0 z-50 bg-background border-b px-6 py-4",children:(0,t.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,t.jsx)(n.default,{href:(0,F.buildUrlWithConfig)("/",c),children:(0,t.jsx)("h1",{className:"flex items-center gap-2",title:"Workflow Observability",children:(0,t.jsx)(J,{})})}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsx)(S,{config:c}),(0,t.jsx)(G,{})]})]})}),(0,t.jsx)("div",{className:"flex-1 px-6 pt-6",children:e})]}),(0,t.jsx)(Y,{})]})}function et({children:e}){return(0,t.jsx)(h,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"workflow-theme",children:(0,t.jsx)(ee,{children:e})})}e.s(["LayoutClient",()=>et],608576)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,8164,483560,657531,82258,793560,107949,247699,692423,t=>{"use strict";var e={value:()=>{}};function n(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw Error("illegal type: "+t);i[t]=[]}return new r(i)}function r(t){this._=t}function i(t,n,r){for(var i=0,o=t.length;i<o;++i)if(t[i].name===n){t[i]=e,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=r&&t.push({name:n,value:r}),t}function o(){}function a(t){return null==t?o:function(){return this.querySelector(t)}}function u(){return[]}function s(t){return null==t?u:function(){return this.querySelectorAll(t)}}function l(t){return function(){return this.matches(t)}}function c(t){return function(e){return e.matches(t)}}r.prototype=n.prototype={constructor:r,on:function(t,e){var n,r=this._,o=(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw Error("unknown type: "+t);return{type:t,name:e}}),a=-1,u=o.length;if(arguments.length<2){for(;++a<u;)if((n=(t=o[a]).type)&&(n=function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(r[n],t.name)))return n;return}if(null!=e&&"function"!=typeof e)throw Error("invalid callback: "+e);for(;++a<u;)if(n=(t=o[a]).type)r[n]=i(r[n],t.name,e);else if(null==e)for(n in r)r[n]=i(r[n],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new r(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(r=this._[t],o=0,n=r.length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}},t.s(["dispatch",0,n],8164),t.s(["Selection",()=>L,"default",()=>G,"root",()=>H],247699),t.s(["default",0,a],483560),t.s(["default",0,s],657531),t.s(["childMatcher",()=>c,"default",0,l],82258);var f=Array.prototype.find;function h(){return this.firstElementChild}var p=Array.prototype.filter;function d(){return Array.from(this.children)}function v(t){return Array(t.length)}function m(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function y(t,e,n,r,i,o){for(var a,u=0,s=e.length,l=o.length;u<l;++u)(a=e[u])?(a.__data__=o[u],r[u]=a):n[u]=new m(t,o[u]);for(;u<s;++u)(a=e[u])&&(i[u]=a)}function g(t,e,n,r,i,o,a){var u,s,l,c=new Map,f=e.length,h=o.length,p=Array(f);for(u=0;u<f;++u)(s=e[u])&&(p[u]=l=a.call(s,s.__data__,u,e)+"",c.has(l)?i[u]=s:c.set(l,s));for(u=0;u<h;++u)l=a.call(t,o[u],u,o)+"",(s=c.get(l))?(r[u]=s,s.__data__=o[u],c.delete(l)):n[u]=new m(t,o[u]);for(u=0;u<f;++u)(s=e[u])&&c.get(p[u])===s&&(i[u]=s)}function _(t){return t.__data__}function w(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}m.prototype={constructor:m,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var x="http://www.w3.org/1999/xhtml";let b={svg:"http://www.w3.org/2000/svg",xhtml:x,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function k(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),b.hasOwnProperty(e)?{space:b[e],local:t}:t}function A(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function M(t,e,n){return arguments.length>1?this.each((null==e?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof e?function(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}:function(t,e,n){return function(){this.style.setProperty(t,e,n)}})(t,e,null==n?"":n)):N(this.node(),t)}function N(t,e){return t.style.getPropertyValue(e)||A(t).getComputedStyle(t,null).getPropertyValue(e)}function E(t){return t.trim().split(/^|\s+/)}function z(t){return t.classList||new S(t)}function S(t){this._node=t,this._names=E(t.getAttribute("class")||"")}function T(t,e){for(var n=z(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function $(t,e){for(var n=z(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function C(){this.textContent=""}function P(){this.innerHTML=""}function V(){this.nextSibling&&this.parentNode.appendChild(this)}function X(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function q(t){var e=k(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===x&&e.documentElement.namespaceURI===x?e.createElement(t):e.createElementNS(n,t)}})(e)}function R(){return null}function D(){var t=this.parentNode;t&&t.removeChild(this)}function O(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Y(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function I(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)(n=e[r],t.type&&n.type!==t.type||n.name!==t.name)?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function B(t,e,n){return function(){var r,i=this.__on,o=function(t){e.call(this,t,this.__data__)};if(i){for(var a=0,u=i.length;a<u;++a)if((r=i[a]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),r.value=e;return}}this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function j(t,e,n){var r=A(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}t.s(["default",0,k],793560),t.s(["default",0,M,"styleValue",()=>N],107949),S.prototype={add:function(t){0>this._names.indexOf(t)&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var H=[null];function L(t,e){this._groups=t,this._parents=e}function U(){return new L([[document.documentElement]],H)}L.prototype=U.prototype={constructor:L,select:function(t){"function"!=typeof t&&(t=a(t));for(var e=this._groups,n=e.length,r=Array(n),i=0;i<n;++i)for(var o,u,s=e[i],l=s.length,c=r[i]=Array(l),f=0;f<l;++f)(o=s[f])&&(u=t.call(o,o.__data__,f,s))&&("__data__"in o&&(u.__data__=o.__data__),c[f]=u);return new L(r,this._parents)},selectAll:function(t){if("function"==typeof t){var e;e=t,t=function(){var t;return t=e.apply(this,arguments),null==t?[]:Array.isArray(t)?t:Array.from(t)}}else t=s(t);for(var n=this._groups,r=n.length,i=[],o=[],a=0;a<r;++a)for(var u,l=n[a],c=l.length,f=0;f<c;++f)(u=l[f])&&(i.push(t.call(u,u.__data__,f,l)),o.push(u));return new L(i,o)},selectChild:function(t){var e;return this.select(null==t?h:(e="function"==typeof t?t:c(t),function(){return f.call(this.children,e)}))},selectChildren:function(t){var e;return this.selectAll(null==t?d:(e="function"==typeof t?t:c(t),function(){return p.call(this.children,e)}))},filter:function(t){"function"!=typeof t&&(t=l(t));for(var e=this._groups,n=e.length,r=Array(n),i=0;i<n;++i)for(var o,a=e[i],u=a.length,s=r[i]=[],c=0;c<u;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&s.push(o);return new L(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,_);var n=e?g:y,r=this._parents,i=this._groups;"function"!=typeof t&&(x=t,t=function(){return x});for(var o=i.length,a=Array(o),u=Array(o),s=Array(o),l=0;l<o;++l){var c=r[l],f=i[l],h=f.length,p="object"==typeof(w=t.call(c,c&&c.__data__,l,r))&&"length"in w?w:Array.from(w),d=p.length,v=u[l]=Array(d),m=a[l]=Array(d);n(c,f,v,m,s[l]=Array(h),p,e);for(var w,x,b,k,A=0,M=0;A<d;++A)if(b=v[A]){for(A>=M&&(M=A+1);!(k=m[M])&&++M<d;);b._next=k||null}}return(a=new L(a,r))._enter=u,a._exit=s,a},enter:function(){return new L(this._enter||this._groups.map(v),this._parents)},exit:function(){return new L(this._exit||this._groups.map(v),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),u=Array(i),s=0;s<a;++s)for(var l,c=n[s],f=r[s],h=c.length,p=u[s]=Array(h),d=0;d<h;++d)(l=c[d]||f[d])&&(p[d]=l);for(;s<i;++s)u[s]=n[s];return new L(u,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=w);for(var n=this._groups,r=n.length,i=Array(r),o=0;o<r;++o){for(var a,u=n[o],s=u.length,l=i[o]=Array(s),c=0;c<s;++c)(a=u[c])&&(l[c]=a);l.sort(e)}return new L(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let t=0;for(let e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=k(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof e?n.local?function(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}:function(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}:n.local?function(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}:function(t,e){return function(){this.setAttribute(t,e)}})(n,e))},style:M,property:function(t,e){return arguments.length>1?this.each((null==e?function(t){return function(){delete this[t]}}:"function"==typeof e?function(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}:function(t,e){return function(){this[t]=e}})(t,e)):this.node()[t]},classed:function(t,e){var n=E(t+"");if(arguments.length<2){for(var r=z(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?function(t,e){return function(){(e.apply(this,arguments)?T:$)(this,t)}}:e?function(t){return function(){T(this,t)}}:function(t){return function(){$(this,t)}})(n,e))},text:function(t){return arguments.length?this.each(null==t?C:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?P:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(V)},lower:function(){return this.each(X)},append:function(t){var e="function"==typeof t?t:q(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var n="function"==typeof t?t:q(t),r=null==e?R:"function"==typeof e?e:a(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(D)},clone:function(t){return this.select(t?Y:O)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}),a=o.length;if(arguments.length<2){var u=this.node().__on;if(u){for(var s,l=0,c=u.length;l<c;++l)for(r=0,s=u[l];r<a;++r)if((i=o[r]).type===s.type&&i.name===s.name)return s.value}return}for(r=0,u=e?B:I;r<a;++r)this.each(u(o[r],e,n));return this},dispatch:function(t,e){return this.each(("function"==typeof e?function(t,e){return function(){return j(this,t,e.apply(this,arguments))}}:function(t,e){return function(){return j(this,t,e)}})(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};let G=U;t.s(["select",0,function(t){return"string"==typeof t?new L([[document.querySelector(t)]],[document.documentElement]):new L([[t]],H)}],692423)},542550,811975,816947,145850,t=>{"use strict";var e=t.i(692423);let n={capture:!0,passive:!1};function r(t){t.stopImmediatePropagation()}function i(t){t.preventDefault(),t.stopImmediatePropagation()}function o(t){var r=t.document.documentElement,o=(0,e.select)(t).on("dragstart.drag",i,n);"onselectstart"in r?o.on("selectstart.drag",i,n):(r.__noselect=r.style.MozUserSelect,r.style.MozUserSelect="none")}function a(t,r){var o=t.document.documentElement,a=(0,e.select)(t).on("dragstart.drag",null);r&&(a.on("click.drag",i,n),setTimeout(function(){a.on("click.drag",null)},0)),"onselectstart"in o?a.on("selectstart.drag",null):(o.style.MozUserSelect=o.__noselect,delete o.__noselect)}t.s(["default",0,i,"nonpassive",0,{passive:!1},"nonpassivecapture",0,n,"nopropagation",()=>r],811975),t.s(["default",0,o,"yesdrag",()=>a],816947),t.s(["dragDisable",0,o],542550),t.s(["dragEnable",()=>a],145850)},161610,189517,321137,t=>{"use strict";function e(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function n(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function r(){}t.s(["default",0,e,"extend",()=>n],189517);var i="\\s*([+-]?\\d+)\\s*",o="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",a="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",u=/^#([0-9a-f]{3,8})$/,s=RegExp(`^rgb\\(${i},${i},${i}\\)$`),l=RegExp(`^rgb\\(${a},${a},${a}\\)$`),c=RegExp(`^rgba\\(${i},${i},${i},${o}\\)$`),f=RegExp(`^rgba\\(${a},${a},${a},${o}\\)$`),h=RegExp(`^hsl\\(${o},${a},${a}\\)$`),p=RegExp(`^hsla\\(${o},${a},${a},${o}\\)$`),d={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function v(){return this.rgb().formatHex()}function m(){return this.rgb().formatRgb()}function y(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=u.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?g(e):3===n?new b(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?_(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?_(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=s.exec(t))?new b(e[1],e[2],e[3],1):(e=l.exec(t))?new b(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=c.exec(t))?_(e[1],e[2],e[3],e[4]):(e=f.exec(t))?_(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=h.exec(t))?z(e[1],e[2]/100,e[3]/100,1):(e=p.exec(t))?z(e[1],e[2]/100,e[3]/100,e[4]):d.hasOwnProperty(t)?g(d[t]):"transparent"===t?new b(NaN,NaN,NaN,0):null}function g(t){return new b(t>>16&255,t>>8&255,255&t,1)}function _(t,e,n,r){return r<=0&&(t=e=n=NaN),new b(t,e,n,r)}function w(t){return(t instanceof r||(t=y(t)),t)?new b((t=t.rgb()).r,t.g,t.b,t.opacity):new b}function x(t,e,n,r){return 1==arguments.length?w(t):new b(t,e,n,null==r?1:r)}function b(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function k(){return`#${E(this.r)}${E(this.g)}${E(this.b)}`}function A(){let t=M(this.opacity);return`${1===t?"rgb(":"rgba("}${N(this.r)}, ${N(this.g)}, ${N(this.b)}${1===t?")":`, ${t})`}`}function M(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function N(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function E(t){return((t=N(t))<16?"0":"")+t.toString(16)}function z(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new T(t,e,n,r)}function S(t){if(t instanceof T)return new T(t.h,t.s,t.l,t.opacity);if(t instanceof r||(t=y(t)),!t)return new T;if(t instanceof T)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,o=Math.min(e,n,i),a=Math.max(e,n,i),u=NaN,s=a-o,l=(a+o)/2;return s?(u=e===a?(n-i)/s+(n<i)*6:n===a?(i-e)/s+2:(e-n)/s+4,s/=l<.5?a+o:2-a-o,u*=60):s=l>0&&l<1?0:u,new T(u,s,l,t.opacity)}function T(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function $(t){return(t=(t||0)%360)<0?t+360:t}function C(t){return Math.max(0,Math.min(1,t||0))}function P(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}e(r,y,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:v,formatHex:v,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return S(this).formatHsl()},formatRgb:m,toString:m}),e(b,x,n(r,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new b(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new b(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new b(N(this.r),N(this.g),N(this.b),M(this.opacity))},displayable(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:k,formatHex:k,formatHex8:function(){return`#${E(this.r)}${E(this.g)}${E(this.b)}${E((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:A,toString:A})),e(T,function(t,e,n,r){return 1==arguments.length?S(t):new T(t,e,n,null==r?1:r)},n(r,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new T(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new T(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new b(P(t>=240?t-240:t+120,i,r),P(t,i,r),P(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new T($(this.h),C(this.s),C(this.l),M(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=M(this.opacity);return`${1===t?"hsl(":"hsla("}${$(this.h)}, ${100*C(this.s)}%, ${100*C(this.l)}%${1===t?")":`, ${t})`}`}})),t.s(["Color",()=>r,"Rgb",()=>b,"default",()=>y,"rgb",()=>x,"rgbConvert",()=>w],321137),t.s(["color",()=>y],161610)},145665,181503,425902,t=>{"use strict";var e=t.i(321137);function n(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}let r=t=>()=>t;function i(t,e){return function(n){return t+n*e}}function o(t,e){var n=e-t;return n?i(t,n>180||n<-180?n-360*Math.round(n/360):n):r(isNaN(t)?e:t)}function a(t){return 1==(t*=1)?u:function(e,n){var i,o,a;return n-e?(i=e,o=n,i=Math.pow(i,a=t),o=Math.pow(o,a)-i,a=1/a,function(t){return Math.pow(i+t*o,a)}):r(isNaN(e)?n:e)}}function u(t,e){var n=e-t;return n?i(t,n):r(isNaN(t)?e:t)}t.s(["default",0,r],181503),t.s(["default",()=>u,"gamma",()=>a,"hue",()=>o],425902);let s=function t(n){var r=a(n);function i(t,n){var i=r((t=(0,e.rgb)(t)).r,(n=(0,e.rgb)(n)).r),o=r(t.g,n.g),a=r(t.b,n.b),s=u(t.opacity,n.opacity);return function(e){return t.r=i(e),t.g=o(e),t.b=a(e),t.opacity=s(e),t+""}}return i.gamma=t,i}(1);function l(t){return function(n){var r,i,o=n.length,a=Array(o),u=Array(o),s=Array(o);for(r=0;r<o;++r)i=(0,e.rgb)(n[r]),a[r]=i.r||0,u[r]=i.g||0,s[r]=i.b||0;return a=t(a),u=t(u),s=t(s),i.opacity=1,function(t){return i.r=a(t),i.g=u(t),i.b=s(t),i+""}}}l(function(t){var e=t.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),o=t[i],a=t[i+1],u=i>0?t[i-1]:2*o-a,s=i<e-1?t[i+2]:2*a-o;return n((r-i/e)*e,u,o,a,s)}}),l(function(t){var e=t.length;return function(r){var i=Math.floor(((r%=1)<0?++r:r)*e),o=t[(i+e-1)%e],a=t[i%e],u=t[(i+1)%e],s=t[(i+2)%e];return n((r-i/e)*e,o,a,u,s)}}),t.s(["default",0,s],145665)},819505,238816,97376,t=>{"use strict";t.s(["genericArray",()=>r],819505);var e=t.i(213570);function n(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function r(t,n){var r,i=n?n.length:0,o=t?Math.min(i,t.length):0,a=Array(o),u=Array(i);for(r=0;r<o;++r)a[r]=(0,e.default)(t[r],n[r]);for(;r<i;++r)u[r]=n[r];return function(t){for(r=0;r<o;++r)u[r]=a[r](t);return u}}t.s(["default",0,function(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}},"isNumberArray",()=>n],238816),t.s(["default",0,function(t,e){var n=new Date;return t*=1,e*=1,function(r){return n.setTime(t*(1-r)+e*r),n}}],97376)},842541,t=>{"use strict";t.s(["default",0,function(t,e){return t*=1,e*=1,function(n){return t*(1-n)+e*n}}])},905660,t=>{"use strict";t.s(["default",()=>n]);var e=t.i(213570);function n(t,n){var r,i={},o={};for(r in(null===t||"object"!=typeof t)&&(t={}),(null===n||"object"!=typeof n)&&(n={}),n)r in t?i[r]=(0,e.default)(t[r],n[r]):o[r]=n[r];return function(t){for(r in i)o[r]=i[r](t);return o}}},647483,t=>{"use strict";var e=t.i(842541),n=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,r=RegExp(n.source,"g");t.s(["default",0,function(t,i){var o,a,u,s,l,c=n.lastIndex=r.lastIndex=0,f=-1,h=[],p=[];for(t+="",i+="";(u=n.exec(t))&&(s=r.exec(i));)(l=s.index)>c&&(l=i.slice(c,l),h[f]?h[f]+=l:h[++f]=l),(u=u[0])===(s=s[0])?h[f]?h[f]+=s:h[++f]=s:(h[++f]=null,p.push({i:f,x:(0,e.default)(u,s)})),c=r.lastIndex;return c<i.length&&(l=i.slice(c),h[f]?h[f]+=l:h[++f]=l),h.length<2?p[0]?(o=p[0].x,function(t){return o(t)+""}):(a=i,function(){return a}):(i=p.length,function(t){for(var e,n=0;n<i;++n)h[(e=p[n]).i]=e.x(t);return h.join("")})}])},678152,213570,t=>{"use strict";t.s(["default",()=>c],213570);var e=t.i(161610),n=t.i(145665),r=t.i(819505),i=t.i(97376),o=t.i(842541),a=t.i(905660),u=t.i(647483),s=t.i(181503),l=t.i(238816);function c(t,c){var f,h=typeof c;return null==c||"boolean"===h?(0,s.default)(c):("number"===h?o.default:"string"===h?(f=(0,e.color)(c))?(c=f,n.default):u.default:c instanceof e.color?n.default:c instanceof Date?i.default:(0,l.isNumberArray)(c)?l.default:Array.isArray(c)?r.genericArray:"function"!=typeof c.valueOf&&"function"!=typeof c.toString||isNaN(c)?a.default:o.default)(t,c)}t.s(["interpolate",0,c],678152)},954542,t=>{"use strict";t.s(["pointer",0,function(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}],954542)},76257,11905,533091,14021,682776,t=>{"use strict";var e=t.i(247699);t.s(["selection",()=>e.default],76257);var n,r,i=t.i(8164),o=0,a=0,u=0,s=0,l=0,c=0,f="object"==typeof performance&&performance.now?performance:Date,h="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function p(){return l||(h(d),l=f.now()+c)}function d(){l=0}function v(){this._call=this._time=this._next=null}function m(t,e,n){var r=new v;return r.restart(t,e,n),r}function y(){l=(s=f.now())+c,o=a=0;try{p(),++o;for(var t,e=n;e;)(t=l-e._time)>=0&&e._call.call(void 0,t),e=e._next;--o}finally{o=0,function(){for(var t,e,i=n,o=1/0;i;)i._call?(o>i._time&&(o=i._time),t=i,i=i._next):(e=i._next,i._next=null,i=t?t._next=e:n=e);r=t,_(o)}(),l=0}}function g(){var t=f.now(),e=t-s;e>1e3&&(c-=e,s=t)}function _(t){!o&&(a&&(a=clearTimeout(a)),t-l>24?(t<1/0&&(a=setTimeout(y,t-f.now()-c)),u&&(u=clearInterval(u))):(u||(s=f.now(),u=setInterval(g,1e3)),o=1,h(y)))}function w(t,e,n){var r=new v;return e=null==e?0:+e,r.restart(n=>{r.stop(),t(n+e)},e,n),r}v.prototype=m.prototype={constructor:v,restart:function(t,e,i){if("function"!=typeof t)throw TypeError("callback is not a function");i=(null==i?p():+i)+(null==e?0:+e),this._next||r===this||(r?r._next=this:n=this,r=this),this._call=t,this._time=i,_()},stop:function(){this._call&&(this._call=null,this._time=1/0,_())}},t.s(["Timer",()=>v,"now",()=>p,"timer",()=>m],11905);var x=(0,i.dispatch)("start","end","cancel","interrupt"),b=[];function k(t,e){var n=M(t,e);if(n.state>0)throw Error("too late; already scheduled");return n}function A(t,e){var n=M(t,e);if(n.state>3)throw Error("too late; already running");return n}function M(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw Error("transition not found");return n}function N(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o){if((n=o[i]).name!==e){a=!1;continue}r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]}a&&delete t.__transition}}t.s(["ENDED",()=>6,"ENDING",()=>5,"STARTING",()=>2,"default",0,function(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(s){var l,c,f,h;if(1!==n.state)return u();for(l in i)if((h=i[l]).name===n.name){if(3===h.state)return w(o);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[l]):+l<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[l])}if(w(function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(s))}),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(l=0,n.state=3,r=Array(f=n.tween.length),c=-1;l<f;++l)(h=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=h);r.length=c+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(u),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=m(function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)},0,n.time)}(t,n,{name:e,index:r,group:i,on:x,tween:b,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})},"get",()=>M,"init",()=>k,"set",()=>A],533091),t.s(["default",0,N],14021),t.s(["default",0,function(t){return this.each(function(){N(this,t)})}],682776)},425105,588044,320252,t=>{"use strict";var e,n=t.i(842541),r=180/Math.PI,i={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function o(t,e,n,i,o,a){var u,s,l;return(u=Math.sqrt(t*t+e*e))&&(t/=u,e/=u),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(s=Math.sqrt(n*n+i*i))&&(n/=s,i/=s,l/=s),t*i<e*n&&(t=-t,e=-e,l=-l,u=-u),{translateX:o,translateY:a,rotate:Math.atan2(e,t)*r,skewX:Math.atan(l)*r,scaleX:u,scaleY:s}}function a(t,e,r,i){function o(t){return t.length?t.pop()+" ":""}return function(a,u){var s,l,c,f,h=[],p=[];return a=t(a),u=t(u),!function(t,i,o,a,u,s){if(t!==o||i!==a){var l=u.push("translate(",null,e,null,r);s.push({i:l-4,x:(0,n.default)(t,o)},{i:l-2,x:(0,n.default)(i,a)})}else(o||a)&&u.push("translate("+o+e+a+r)}(a.translateX,a.translateY,u.translateX,u.translateY,h,p),s=a.rotate,l=u.rotate,s!==l?(s-l>180?l+=360:l-s>180&&(s+=360),p.push({i:h.push(o(h)+"rotate(",null,i)-2,x:(0,n.default)(s,l)})):l&&h.push(o(h)+"rotate("+l+i),c=a.skewX,f=u.skewX,c!==f?p.push({i:h.push(o(h)+"skewX(",null,i)-2,x:(0,n.default)(c,f)}):f&&h.push(o(h)+"skewX("+f+i),!function(t,e,r,i,a,u){if(t!==r||e!==i){var s=a.push(o(a)+"scale(",null,",",null,")");u.push({i:s-4,x:(0,n.default)(t,r)},{i:s-2,x:(0,n.default)(e,i)})}else(1!==r||1!==i)&&a.push(o(a)+"scale("+r+","+i+")")}(a.scaleX,a.scaleY,u.scaleX,u.scaleY,h,p),a=u=null,function(t){for(var e,n=-1,r=p.length;++n<r;)h[(e=p[n]).i]=e.x(t);return h.join("")}}}var u=a(function(t){let e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?i:o(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),s=a(function(t){return null==t?i:(e||(e=document.createElementNS("http://www.w3.org/2000/svg","g")),e.setAttribute("transform",t),t=e.transform.baseVal.consolidate())?o((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):i},", ",")",")");t.s(["interpolateTransformCss",()=>u,"interpolateTransformSvg",()=>s],425105);var l=t.i(793560);t.s(["namespace",()=>l.default],588044);var c=t.i(533091);function f(t,e,n){var r=t._id;return t.each(function(){var t=(0,c.set)(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return(0,c.get)(t,r).value[e]}}t.s(["default",0,function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=(0,c.get)(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?function(t,e){var n,r;return function(){var i=(0,c.set)(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,u=r.length;a<u;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}}i.tween=r}}:function(t,e,n){var r,i;if("function"!=typeof n)throw Error();return function(){var o=(0,c.set)(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:e,value:n},s=0,l=i.length;s<l;++s)if(i[s].name===e){i[s]=u;break}s===l&&i.push(u)}o.tween=i}})(n,t,e))},"tweenValue",()=>f],320252)},77075,t=>{"use strict";var e=t.i(842541);t.s(["interpolateNumber",()=>e.default])},891219,t=>{"use strict";var e=t.i(145665);t.s(["interpolateRgb",()=>e.default])},183502,603760,t=>{"use strict";var e=t.i(76257),n=t.i(682776),r=t.i(425105),i=t.i(588044),o=t.i(320252),a=t.i(161610),u=t.i(77075),s=t.i(891219),l=t.i(647483),l=l;function c(t,e){var n;return("number"==typeof e?u.interpolateNumber:e instanceof a.color?s.interpolateRgb:(n=(0,a.color)(e))?(e=n,s.interpolateRgb):l.default)(t,e)}var f=t.i(533091),h=t.i(82258),h=h,p=t.i(483560),p=p,d=t.i(657531),d=d,v=e.selection.prototype.constructor,m=t.i(107949),m=m;function y(t){return function(){this.style.removeProperty(t)}}var g=0;function _(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}var w=e.selection.prototype;_.prototype=(function(t){return(0,e.selection)().transition(t)}).prototype={constructor:_,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=(0,p.default)(t));for(var r=this._groups,i=r.length,o=Array(i),a=0;a<i;++a)for(var u,s,l=r[a],c=l.length,h=o[a]=Array(c),d=0;d<c;++d)(u=l[d])&&(s=t.call(u,u.__data__,d,l))&&("__data__"in u&&(s.__data__=u.__data__),h[d]=s,(0,f.default)(h[d],e,n,d,h,(0,f.get)(u,n)));return new _(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=(0,d.default)(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var s,l=r[u],c=l.length,h=0;h<c;++h)if(s=l[h]){for(var p,v=t.call(s,s.__data__,h,l),m=(0,f.get)(s,n),y=0,g=v.length;y<g;++y)(p=v[y])&&(0,f.default)(p,e,n,y,v,m);o.push(v),a.push(s)}return new _(o,a,e,n)},selectChild:w.selectChild,selectChildren:w.selectChildren,filter:function(t){"function"!=typeof t&&(t=(0,h.default)(t));for(var e=this._groups,n=e.length,r=Array(n),i=0;i<n;++i)for(var o,a=e[i],u=a.length,s=r[i]=[],l=0;l<u;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&s.push(o);return new _(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw Error();for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=Array(r),u=0;u<o;++u)for(var s,l=e[u],c=n[u],f=l.length,h=a[u]=Array(f),p=0;p<f;++p)(s=l[p]||c[p])&&(h[p]=s);for(;u<r;++u)a[u]=e[u];return new _(a,this._parents,this._name,this._id)},selection:function(){return new v(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=++g,r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],s=u.length,l=0;l<s;++l)if(a=u[l]){var c=(0,f.get)(a,e);(0,f.default)(a,t,n,l,u,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new _(r,this._parents,t,n)},call:w.call,nodes:w.nodes,node:w.node,size:w.size,empty:w.empty,each:w.each,on:function(t,e){var n,r,i,o,a,u,s=this._id;return arguments.length<2?(0,f.get)(this.node(),s).on.on(t):this.each((n=s,r=t,i=e,u=(r+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})?f.init:f.set,function(){var t=u(this,n),e=t.on;e!==o&&(a=(o=e).copy()).on(r,i),t.on=a}))},attr:function(t,e){var n=(0,i.namespace)(t),a="transform"===n?r.interpolateTransformSvg:c;return this.attrTween(t,"function"==typeof e?(n.local?function(t,e,n){var r,i,o;return function(){var a,u,s=n(this);return null==s?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local))===(u=s+"")?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}:function(t,e,n){var r,i,o;return function(){var a,u,s=n(this);return null==s?void this.removeAttribute(t):(a=this.getAttribute(t))===(u=s+"")?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}})(n,a,(0,o.tweenValue)(this,"attr."+t,e)):null==e?(n.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(n):(n.local?function(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}:function(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}})(n,a,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw Error();var r=(0,i.namespace)(t);return this.tween(n,(r.local?function(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(e){this.setAttributeNS(t.space,t.local,i.call(this,e))}),n}return i._value=e,i}:function(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(e){this.setAttribute(t,i.call(this,e))}),n}return i._value=e,i})(r,e))},style:function(t,e,n){var i,a,u,s,l,h,p,d,v,g,_,w,x,b,k,A,M,N,E,z,S,T="transform"==(t+="")?r.interpolateTransformCss:c;return null==e?this.styleTween(t,(i=t,function(){var t=(0,m.styleValue)(this,i),e=(this.style.removeProperty(i),(0,m.styleValue)(this,i));return t===e?null:t===a&&e===u?s:s=T(a=t,u=e)})).on("end.style."+t,y(t)):"function"==typeof e?this.styleTween(t,(l=t,h=(0,o.tweenValue)(this,"style."+t,e),function(){var t=(0,m.styleValue)(this,l),e=h(this),n=e+"";return null==e&&(this.style.removeProperty(l),n=e=(0,m.styleValue)(this,l)),t===n?null:t===p&&n===d?v:(d=n,v=T(p=t,e))})).each((g=this._id,M="end."+(A="style."+(_=t)),function(){var t=(0,f.set)(this,g),e=t.on,n=null==t.value[A]?k||(k=y(_)):void 0;(e!==w||b!==n)&&(x=(w=e).copy()).on(M,b=n),t.on=x})):this.styleTween(t,(N=t,S=e+"",function(){var t=(0,m.styleValue)(this,N);return t===S?null:t===E?z:z=T(E=t,e)}),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw Error();return this.tween(r,function(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(e){this.style.setProperty(t,o.call(this,e),n)}),r}return o._value=e,o}(t,e,null==n?"":n))},text:function(t){var e,n;return this.tween("text","function"==typeof t?(e=(0,o.tweenValue)(this,"text",t),function(){var t=e(this);this.textContent=null==t?"":t}):(n=null==t?"":t+"",function(){this.textContent=n}))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw Error();return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){this.textContent=r.call(this,t)}),e}return r._value=t,r}(t))},remove:function(){var t;return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}))},tween:o.default,delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){(0,f.init)(this,t).delay=+e.apply(this,arguments)}}:function(t,e){return e*=1,function(){(0,f.init)(this,t).delay=e}})(e,t)):(0,f.get)(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){(0,f.set)(this,t).duration=+e.apply(this,arguments)}}:function(t,e){return e*=1,function(){(0,f.set)(this,t).duration=e}})(e,t)):(0,f.get)(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw Error();return function(){(0,f.set)(this,t).ease=e}}(e,t)):(0,f.get)(this.node(),e).ease},easeVarying:function(t){var e;if("function"!=typeof t)throw Error();return this.each((e=this._id,function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw Error();(0,f.set)(this,e).ease=n}))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var u={value:a},s={value:function(){0==--i&&o()}};n.each(function(){var n=(0,f.set)(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(u),e._.interrupt.push(u),e._.end.push(s)),n.on=e}),0===i&&o()})},[Symbol.iterator]:w[Symbol.iterator]};var x=t.i(11905),b={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};e.selection.prototype.interrupt=n.default,e.selection.prototype.transition=function(t){var e,n;t instanceof _?(e=t._id,t=t._name):(e=++g,(n=b).time=(0,x.now)(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],s=u.length,l=0;l<s;++l)(a=u[l])&&(0,f.default)(a,t,e,l,u,n||function(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw Error(`transition ${e} not found`);return n}(a,e));return new _(r,this._parents,t,e)},t.s([],183502);var k=t.i(14021);t.s(["interrupt",()=>k.default],603760)},274017,t=>{"use strict";function e(t){return((t=Math.exp(t))+1/t)/2}let n=function t(n,r,i){function o(t,o){var a,u,s=t[0],l=t[1],c=t[2],f=o[0],h=o[1],p=o[2],d=f-s,v=h-l,m=d*d+v*v;if(m<1e-12)u=Math.log(p/c)/n,a=function(t){return[s+t*d,l+t*v,c*Math.exp(n*t*u)]};else{var y=Math.sqrt(m),g=(p*p-c*c+i*m)/(2*c*r*y),_=(p*p-c*c-i*m)/(2*p*r*y),w=Math.log(Math.sqrt(g*g+1)-g);u=(Math.log(Math.sqrt(_*_+1)-_)-w)/n,a=function(t){var i,o,a=t*u,f=e(w),h=c/(r*y)*(f*(((i=Math.exp(2*(i=n*a+w)))-1)/(i+1))-((o=Math.exp(o=w))-1/o)/2);return[s+h*d,l+h*v,c*f/e(n*a+w)]}}return a.duration=1e3*u*n/Math.SQRT2,a}return o.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},o}(Math.SQRT2,2,4);t.s(["interpolateZoom",0,n],274017)},250149,644200,953752,t=>{"use strict";var e=t.i(8164),n=t.i(542550),r=t.i(145850),i=t.i(274017),o=t.i(692423),a=t.i(954542);t.i(183502);var u=t.i(603760);let s=t=>()=>t;function l(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function c(t,e,n){this.k=t,this.x=e,this.y=n}c.prototype={constructor:c,scale:function(t){return 1===t?this:new c(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new c(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var f=new c(1,0,0);function h(t){for(;!t.__zoom;)if(!(t=t.parentNode))return f;return t.__zoom}function p(t){t.stopImmediatePropagation()}function d(t){t.preventDefault(),t.stopImmediatePropagation()}function v(t){return(!t.ctrlKey||"wheel"===t.type)&&!t.button}function m(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function y(){return this.__zoom||f}function g(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function _(){return navigator.maxTouchPoints||"ontouchstart"in this}function w(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}h.prototype=c.prototype,t.s(["Transform",()=>c,"default",()=>h,"identity",()=>f],644200),t.s(["default",0,function(){var t,h,x,b=v,k=m,A=w,M=g,N=_,E=[0,1/0],z=[[-1/0,-1/0],[1/0,1/0]],S=250,T=i.interpolateZoom,$=(0,e.dispatch)("start","zoom","end"),C=0,P=10;function V(t){t.property("__zoom",y).on("wheel.zoom",I,{passive:!1}).on("mousedown.zoom",B).on("dblclick.zoom",j).filter(N).on("touchstart.zoom",H).on("touchmove.zoom",L).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function X(t,e){return(e=Math.max(E[0],Math.min(E[1],e)))===t.k?t:new c(e,t.x,t.y)}function q(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new c(t.k,r,i)}function R(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function D(t,e,n,r){t.on("start.zoom",function(){O(this,arguments).event(r).start()}).on("interrupt.zoom end.zoom",function(){O(this,arguments).event(r).end()}).tween("zoom",function(){var t=arguments,i=O(this,t).event(r),o=k.apply(this,t),a=null==n?R(o):"function"==typeof n?n.apply(this,t):n,u=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),s=this.__zoom,l="function"==typeof e?e.apply(this,t):e,f=T(s.invert(a).concat(u/s.k),l.invert(a).concat(u/l.k));return function(t){if(1===t)t=l;else{var e=f(t),n=u/e[2];t=new c(n,a[0]-e[0]*n,a[1]-e[1]*n)}i.zoom(null,t)}})}function O(t,e,n){return!n&&t.__zooming||new Y(t,e)}function Y(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=k.apply(t,e),this.taps=0}function I(t,...e){if(b.apply(this,arguments)){var n=O(this,e).event(t),r=this.__zoom,i=Math.max(E[0],Math.min(E[1],r.k*Math.pow(2,M.apply(this,arguments)))),o=(0,a.pointer)(t);if(n.wheel)(n.mouse[0][0]!==o[0]||n.mouse[0][1]!==o[1])&&(n.mouse[1]=r.invert(n.mouse[0]=o)),clearTimeout(n.wheel);else{if(r.k===i)return;n.mouse=[o,r.invert(o)],(0,u.interrupt)(this),n.start()}d(t),n.wheel=setTimeout(function(){n.wheel=null,n.end()},150),n.zoom("mouse",A(q(X(r,i),n.mouse[0],n.mouse[1]),n.extent,z))}}function B(t,...e){if(!x&&b.apply(this,arguments)){var i=t.currentTarget,s=O(this,e,!0).event(t),l=(0,o.select)(t.view).on("mousemove.zoom",function(t){if(d(t),!s.moved){var e=t.clientX-f,n=t.clientY-h;s.moved=e*e+n*n>C}s.event(t).zoom("mouse",A(q(s.that.__zoom,s.mouse[0]=(0,a.pointer)(t,i),s.mouse[1]),s.extent,z))},!0).on("mouseup.zoom",function(t){l.on("mousemove.zoom mouseup.zoom",null),(0,r.dragEnable)(t.view,s.moved),d(t),s.event(t).end()},!0),c=(0,a.pointer)(t,i),f=t.clientX,h=t.clientY;(0,n.dragDisable)(t.view),p(t),s.mouse=[c,this.__zoom.invert(c)],(0,u.interrupt)(this),s.start()}}function j(t,...e){if(b.apply(this,arguments)){var n=this.__zoom,r=(0,a.pointer)(t.changedTouches?t.changedTouches[0]:t,this),i=n.invert(r),u=n.k*(t.shiftKey?.5:2),s=A(q(X(n,u),r,i),k.apply(this,e),z);d(t),S>0?(0,o.select)(this).transition().duration(S).call(D,s,r,t):(0,o.select)(this).call(V.transform,s,r,t)}}function H(e,...n){if(b.apply(this,arguments)){var r,i,o,s,l=e.touches,c=l.length,f=O(this,n,e.changedTouches.length===c).event(e);for(p(e),i=0;i<c;++i)o=l[i],s=[s=(0,a.pointer)(o,this),this.__zoom.invert(s),o.identifier],f.touch0?f.touch1||f.touch0[2]===s[2]||(f.touch1=s,f.taps=0):(f.touch0=s,r=!0,f.taps=1+!!t);t&&(t=clearTimeout(t)),r&&(f.taps<2&&(h=s[0],t=setTimeout(function(){t=null},500)),(0,u.interrupt)(this),f.start())}}function L(t,...e){if(this.__zooming){var n,r,i,o,u=O(this,e).event(t),s=t.changedTouches,l=s.length;for(d(t),n=0;n<l;++n)r=s[n],i=(0,a.pointer)(r,this),u.touch0&&u.touch0[2]===r.identifier?u.touch0[0]=i:u.touch1&&u.touch1[2]===r.identifier&&(u.touch1[0]=i);if(r=u.that.__zoom,u.touch1){var c=u.touch0[0],f=u.touch0[1],h=u.touch1[0],p=u.touch1[1],v=(v=h[0]-c[0])*v+(v=h[1]-c[1])*v,m=(m=p[0]-f[0])*m+(m=p[1]-f[1])*m;r=X(r,Math.sqrt(v/m)),i=[(c[0]+h[0])/2,(c[1]+h[1])/2],o=[(f[0]+p[0])/2,(f[1]+p[1])/2]}else{if(!u.touch0)return;i=u.touch0[0],o=u.touch0[1]}u.zoom("touch",A(q(r,i,o),u.extent,z))}}function U(t,...e){if(this.__zooming){var n,r,i=O(this,e).event(t),u=t.changedTouches,s=u.length;for(p(t),x&&clearTimeout(x),x=setTimeout(function(){x=null},500),n=0;n<s;++n)r=u[n],i.touch0&&i.touch0[2]===r.identifier?delete i.touch0:i.touch1&&i.touch1[2]===r.identifier&&delete i.touch1;if(i.touch1&&!i.touch0&&(i.touch0=i.touch1,delete i.touch1),i.touch0)i.touch0[1]=this.__zoom.invert(i.touch0[0]);else if(i.end(),2===i.taps&&(r=(0,a.pointer)(r,this),Math.hypot(h[0]-r[0],h[1]-r[1])<P)){var l=(0,o.select)(this).on("dblclick.zoom");l&&l.apply(this,arguments)}}}return V.transform=function(t,e,n,r){var i=t.selection?t.selection():t;i.property("__zoom",y),t!==i?D(t,e,n,r):i.interrupt().each(function(){O(this,arguments).event(r).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()})},V.scaleBy=function(t,e,n,r){V.scaleTo(t,function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n},n,r)},V.scaleTo=function(t,e,n,r){V.transform(t,function(){var t=k.apply(this,arguments),r=this.__zoom,i=null==n?R(t):"function"==typeof n?n.apply(this,arguments):n,o=r.invert(i),a="function"==typeof e?e.apply(this,arguments):e;return A(q(X(r,a),i,o),t,z)},n,r)},V.translateBy=function(t,e,n,r){V.transform(t,function(){return A(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),k.apply(this,arguments),z)},null,r)},V.translateTo=function(t,e,n,r,i){V.transform(t,function(){var t=k.apply(this,arguments),i=this.__zoom,o=null==r?R(t):"function"==typeof r?r.apply(this,arguments):r;return A(f.translate(o[0],o[1]).scale(i.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,z)},r,i)},Y.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=(0,o.select)(this.that).datum();$.call(t,this.that,new l(t,{sourceEvent:this.sourceEvent,target:V,type:t,transform:this.that.__zoom,dispatch:$}),e)}},V.wheelDelta=function(t){return arguments.length?(M="function"==typeof t?t:s(+t),V):M},V.filter=function(t){return arguments.length?(b="function"==typeof t?t:s(!!t),V):b},V.touchable=function(t){return arguments.length?(N="function"==typeof t?t:s(!!t),V):N},V.extent=function(t){return arguments.length?(k="function"==typeof t?t:s([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),V):k},V.scaleExtent=function(t){return arguments.length?(E[0]=+t[0],E[1]=+t[1],V):[E[0],E[1]]},V.translateExtent=function(t){return arguments.length?(z[0][0]=+t[0][0],z[1][0]=+t[1][0],z[0][1]=+t[0][1],z[1][1]=+t[1][1],V):[[z[0][0],z[0][1]],[z[1][0],z[1][1]]]},V.constrain=function(t){return arguments.length?(A=t,V):A},V.duration=function(t){return arguments.length?(S=+t,V):S},V.interpolate=function(t){return arguments.length?(T=t,V):T},V.on=function(){var t=$.on.apply($,arguments);return t===$?V:t},V.clickDistance=function(t){return arguments.length?(C=(t*=1)*t,V):Math.sqrt(C)},V.tapDistance=function(t){return arguments.length?(P=+t,V):P},V}],953752),t.s([],250149)}]);
@@ -0,0 +1,5 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,330997,e=>{"use strict";var s=e.i(666426);e.i(169764);var t=e.i(545030),r=e.i(868924),a=e.i(531875),o=e.i(932671),l=e.i(504295),n=e.i(687602),i=e.i(886288);let d=(0,i.default)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var c=e.i(524914),u=e.i(495566);let h=(0,i.default)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);var m=e.i(846220),x=e.i(811735),f=e.i(686107),p=e.i(806746),g=e.i(456944),j=e.i(260218),w=e.i(949245);let b=f.forwardRef(({className:e,...t},r)=>(0,s.jsx)("div",{ref:r,className:(0,w.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));b.displayName="Card",f.forwardRef(({className:e,...t},r)=>(0,s.jsx)("div",{ref:r,className:(0,w.cn)("flex flex-col space-y-1.5 p-6",e),...t})).displayName="CardHeader",f.forwardRef(({className:e,...t},r)=>(0,s.jsx)("div",{ref:r,className:(0,w.cn)("text-2xl font-semibold leading-none tracking-tight",e),...t})).displayName="CardTitle",f.forwardRef(({className:e,...t},r)=>(0,s.jsx)("div",{ref:r,className:(0,w.cn)("text-sm text-muted-foreground",e),...t})).displayName="CardDescription";let k=f.forwardRef(({className:e,...t},r)=>(0,s.jsx)("div",{ref:r,className:(0,w.cn)("p-6 pt-0",e),...t}));k.displayName="CardContent",f.forwardRef(({className:e,...t},r)=>(0,s.jsx)("div",{ref:r,className:(0,w.cn)("flex items-center p-6 pt-0",e),...t})).displayName="CardFooter";var N=e.i(414576);let v=f.forwardRef(({className:e,href:t,children:r,...a},o)=>{let l=t.startsWith("http")?t:`https://useworkflow.dev/docs/${t.replace(/^\//,"")}`;return(0,s.jsx)(N.default,{href:l,className:(0,w.cn)("font-medium underline underline-offset-4 transition-colors",e),style:{color:"var(--ds-blue-600)"},target:"_blank",rel:"noopener noreferrer",ref:o,...a,children:r})});v.displayName="DocsLink";var y=e.i(917955);let C=f.forwardRef(({className:e,...t},r)=>(0,s.jsx)("div",{className:"relative w-full overflow-auto",children:(0,s.jsx)("table",{ref:r,className:(0,w.cn)("w-full caption-bottom text-sm",e),...t})}));C.displayName="Table";let S=f.forwardRef(({className:e,...t},r)=>(0,s.jsx)("thead",{ref:r,className:(0,w.cn)("[&_tr]:border-b",e),...t}));S.displayName="TableHeader";let R=f.forwardRef(({className:e,...t},r)=>(0,s.jsx)("tbody",{ref:r,className:(0,w.cn)("[&_tr:last-child]:border-0",e),...t}));R.displayName="TableBody",f.forwardRef(({className:e,...t},r)=>(0,s.jsx)("tfoot",{ref:r,className:(0,w.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})).displayName="TableFooter";let T=f.forwardRef(({className:e,...t},r)=>(0,s.jsx)("tr",{ref:r,className:(0,w.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));T.displayName="TableRow";let I=f.forwardRef(({className:e,...t},r)=>(0,s.jsx)("th",{ref:r,className:(0,w.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));I.displayName="TableHead";let D=f.forwardRef(({className:e,...t},r)=>(0,s.jsx)("td",{ref:r,className:(0,w.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));D.displayName="TableCell",f.forwardRef(({className:e,...t},r)=>(0,s.jsx)("caption",{ref:r,className:(0,w.cn)("mt-4 text-sm text-muted-foreground",e),...t})).displayName="TableCaption";var M=e.i(638322),A=e.i(620486),P=e.i(241245),E=e.i(719402),_=e.i(613087);function F({rows:e=w.DEFAULT_PAGE_SIZE,variant:t="runs"}){return(0,s.jsx)(b,{className:"overflow-hidden mt-4 bg-background",children:(0,s.jsxs)(k,{className:"p-0",children:[(()=>{switch(t){case"runs":return(0,s.jsxs)("div",{className:"grid grid-cols-[1fr_1.5fr_0.8fr_1fr_1fr_40px] items-center gap-4 py-3 px-4 border-b",children:[(0,s.jsx)(_.Skeleton,{className:"h-4 w-20"}),(0,s.jsx)(_.Skeleton,{className:"h-4 w-14"}),(0,s.jsx)(_.Skeleton,{className:"h-4 w-12"}),(0,s.jsx)(_.Skeleton,{className:"h-4 w-14"}),(0,s.jsx)(_.Skeleton,{className:"h-4 w-20"}),(0,s.jsx)("div",{className:"w-6"})]});case"hooks":return(0,s.jsxs)("div",{className:"grid grid-cols-[1.2fr_1.2fr_0.8fr_1fr_0.5fr_40px] items-center gap-4 py-3 px-4 border-b",children:[(0,s.jsx)(_.Skeleton,{className:"h-4 w-16"}),(0,s.jsx)(_.Skeleton,{className:"h-4 w-14"}),(0,s.jsx)(_.Skeleton,{className:"h-4 w-12"}),(0,s.jsx)(_.Skeleton,{className:"h-4 w-14"}),(0,s.jsx)(_.Skeleton,{className:"h-4 w-20"}),(0,s.jsx)("div",{className:"w-6"})]});case"workflows":return(0,s.jsxs)("div",{className:"grid grid-cols-[1fr_1.5fr_0.5fr] items-center gap-4 py-3 px-4 border-b",children:[(0,s.jsx)(_.Skeleton,{className:"h-4 w-20"}),(0,s.jsx)(_.Skeleton,{className:"h-4 w-10"}),(0,s.jsx)(_.Skeleton,{className:"h-4 w-12 mx-auto"})]});default:return null}})(),Array.from({length:e},(e,r)=>(e=>{switch(t){case"runs":return(0,s.jsxs)("div",{className:"grid grid-cols-[1fr_1.5fr_0.8fr_1fr_1fr_40px] items-center gap-4 py-3 px-4",children:[(0,s.jsx)(_.Skeleton,{className:"h-4 w-3/4"}),(0,s.jsx)(_.Skeleton,{className:"h-4 w-4/5"}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)(_.Skeleton,{className:"h-3 w-14"}),(0,s.jsx)(_.Skeleton,{className:"h-2 w-8"})]}),(0,s.jsx)(_.Skeleton,{className:"h-3 w-3/4"}),(0,s.jsx)(_.Skeleton,{className:"h-3 w-3/4"}),(0,s.jsx)(_.Skeleton,{className:"h-6 w-6 rounded"})]},`skeleton-row-${e}`);case"hooks":return(0,s.jsxs)("div",{className:"grid grid-cols-[1.2fr_1.2fr_0.8fr_1fr_0.5fr_40px] items-center gap-4 py-3 px-4",children:[(0,s.jsx)(_.Skeleton,{className:"h-4 w-4/5"}),(0,s.jsx)(_.Skeleton,{className:"h-4 w-4/5"}),(0,s.jsx)(_.Skeleton,{className:"h-4 w-3/4"}),(0,s.jsx)(_.Skeleton,{className:"h-3 w-3/4"}),(0,s.jsx)(_.Skeleton,{className:"h-4 w-8"}),(0,s.jsx)(_.Skeleton,{className:"h-6 w-6 rounded"})]},`skeleton-row-${e}`);case"workflows":return(0,s.jsxs)("div",{className:"grid grid-cols-[1fr_1.5fr_0.5fr] items-center gap-4 py-3 px-4",children:[(0,s.jsx)(_.Skeleton,{className:"h-4 w-3/4"}),(0,s.jsx)(_.Skeleton,{className:"h-4 w-4/5"}),(0,s.jsx)(_.Skeleton,{className:"h-5 w-16 rounded-full mx-auto"})]},`skeleton-row-${e}`);default:return null}})(r))]})})}function z({config:e,runId:t,onHookClick:r,selectedHookId:i}){let[w,N]=(0,f.useState)(()=>new Date),_=(0,f.useMemo)(()=>(0,A.worldConfigToEnvMap)(e),[e]),{data:z,error:O,nextPage:W,previousPage:B,hasNextPage:H,hasPreviousPage:$,reload:L,pageInfo:U}=(0,a.useWorkflowHooks)(_,{runId:t,sortOrder:"desc"}),V=(0,o.useHookActions)({env:_,callbacks:{onSuccess:L}}),G=z.isLoading,K=z.data??[],[Z,q]=(0,f.useState)(new Map);return(0,f.useEffect)(()=>{K.length&&(async()=>{let e=new Map;for(let s of K)e.set(s.hookId,{count:0,hasMore:!1,loading:!0});q(e);let s=await Promise.allSettled(K.map(async e=>{try{let s=await (0,l.fetchEventsByCorrelationId)(_,e.hookId,{sortOrder:"asc",limit:100});if(!s.success)return{hookId:e.hookId,count:Error(s.error?.message||"Failed to fetch events"),hasMore:!1};let t=s.data,r=t.data.filter(e=>"hook_received"===e.eventType).length;return{hookId:e.hookId,count:r,hasMore:t.hasMore}}catch(s){return{hookId:e.hookId,count:s,hasMore:!1}}}));q(e=>{let t=new Map(e);for(let e=0;e<s.length;e++){let r=s[e],a=K[e].hookId;"fulfilled"===r.status?t.set(r.value.hookId,{count:r.value.count,hasMore:r.value.hasMore,loading:!1}):t.set(a,{count:0,hasMore:!1,loading:!1})}return t})})()},[K,_]),(0,s.jsxs)("div",{children:[(0,s.jsx)(o.HookResolveModalWrapper,{hookActions:V}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-end gap-2",children:[(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Last refreshed"}),w&&(0,s.jsx)(E.RelativeTime,{date:w,className:"text-sm text-muted-foreground",type:"distance"})]}),(0,s.jsx)("div",{className:"flex items-center gap-4",children:(0,s.jsxs)(M.Tooltip,{children:[(0,s.jsx)(M.TooltipTrigger,{asChild:!0,children:(0,s.jsxs)(j.Button,{variant:"outline",size:"sm",onClick:()=>{N(()=>new Date),L()},disabled:G,children:[(0,s.jsx)(h,{className:G?"animate-spin":""}),"Refresh"]})}),(0,s.jsx)(M.TooltipContent,{children:"Note that this resets pages"})]})})]}),O?(0,s.jsxs)(g.Alert,{variant:"destructive",children:[(0,s.jsx)(n.AlertCircle,{className:"h-4 w-4"}),(0,s.jsx)(g.AlertTitle,{children:"Error loading hooks"}),(0,s.jsx)(g.AlertDescription,{children:(0,a.getErrorMessage)(O)})]}):G||K&&0!==K.length?G&&!z?.data?(0,s.jsx)(F,{variant:"hooks"}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(b,{className:"overflow-hidden mt-4 bg-background",children:(0,s.jsx)(k,{className:"p-0 max-h-[calc(100vh-280px)] overflow-auto",children:(0,s.jsxs)(C,{children:[(0,s.jsx)(S,{children:(0,s.jsxs)(T,{children:[(0,s.jsx)(I,{className:"sticky top-0 bg-background z-10 border-b shadow-sm h-10",children:"Hook ID"}),(0,s.jsx)(I,{className:"sticky top-0 bg-background z-10 border-b shadow-sm h-10",children:"Run ID"}),(0,s.jsx)(I,{className:"sticky top-0 bg-background z-10 border-b shadow-sm h-10",children:"Token"}),(0,s.jsx)(I,{className:"sticky top-0 bg-background z-10 border-b shadow-sm h-10",children:"Created"}),(0,s.jsx)(I,{className:"sticky top-0 bg-background z-10 border-b shadow-sm h-10",children:"Invocations"}),(0,s.jsx)(I,{className:"sticky top-0 bg-background z-10 border-b shadow-sm h-10 w-10"})]})}),(0,s.jsx)(R,{children:K.map(e=>(0,s.jsxs)(T,{className:"cursor-pointer group relative",onClick:()=>r(e.hookId,e.runId),"data-selected":e.hookId===i,children:[(0,s.jsx)(D,{className:"font-mono text-xs py-2",children:(0,s.jsx)(P.CopyableText,{text:e.hookId,overlay:!0,children:e.hookId})}),(0,s.jsx)(D,{className:"font-mono text-xs py-2",children:(0,s.jsx)(P.CopyableText,{text:e.runId,overlay:!0,children:e.runId})}),(0,s.jsx)(D,{className:"font-mono text-xs py-2",children:(0,s.jsx)(P.CopyableText,{text:e.token,overlay:!0,children:(0,s.jsx)("span",{className:"text-muted-foreground",children:"••••••••••••"})})}),(0,s.jsx)(D,{className:"py-2 text-muted-foreground text-xs",children:e.createdAt?(0,s.jsx)(E.RelativeTime,{date:e.createdAt}):"-"}),(0,s.jsx)(D,{className:"py-2",children:(e=>{let t=Z.get(e.hookId);if(!t||t.loading)return(0,s.jsx)("span",{className:"text-muted-foreground text-xs",children:"..."});if(t.count instanceof Error)return(0,s.jsx)("span",{className:"text-muted-foreground",children:"Error"});if(0===t.count)return(0,s.jsx)("span",{className:"text-muted-foreground",children:"0"});let r=t.hasMore?`${t.count}+`:`${t.count}`;return t.hasMore?(0,s.jsxs)(M.Tooltip,{children:[(0,s.jsx)(M.TooltipTrigger,{asChild:!0,children:(0,s.jsx)("span",{className:"font-semibold cursor-help",children:r})}),(0,s.jsx)(M.TooltipContent,{className:"max-w-xs",children:(0,s.jsx)("div",{className:"text-xs",children:"Showing first 100 invocations. There may be more."})})]}):(0,s.jsx)("span",{className:"font-semibold",children:r})})(e)}),(0,s.jsx)(D,{className:"py-2",children:(0,s.jsxs)(y.DropdownMenu,{children:[(0,s.jsx)(y.DropdownMenuTrigger,{asChild:!0,children:(0,s.jsx)(j.Button,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(u.MoreHorizontal,{className:"h-4 w-4"})})}),(0,s.jsxs)(y.DropdownMenuContent,{align:"end",children:[(0,s.jsx)(o.ResolveHookDropdownItem,{hook:e,stopPropagation:!0,onResolveClick:V.openResolveModal,DropdownMenuItem:y.DropdownMenuItem}),(0,s.jsxs)(y.DropdownMenuItem,{onClick:async s=>{s.stopPropagation();try{let s=await (0,a.recreateRun)(_,e.runId);p.toast.success("New run started",{description:`Run ID: ${s}`}),L()}catch(e){p.toast.error("Failed to re-run",{description:e instanceof Error?e.message:"Unknown error"})}},children:[(0,s.jsx)(m.RotateCw,{className:"h-4 w-4 mr-2"}),"Replay Run"]}),(0,s.jsxs)(y.DropdownMenuItem,{onClick:async s=>{s.stopPropagation();try{await (0,a.cancelRun)(_,e.runId),p.toast.success("Run cancelled"),L()}catch(e){p.toast.error("Failed to cancel",{description:e instanceof Error?e.message:"Unknown error"})}},children:[(0,s.jsx)(x.XCircle,{className:"h-4 w-4 mr-2"}),"Cancel"]})]})]})})]},e.hookId))})]})})}),(0,s.jsxs)("div",{className:"flex items-center justify-between mt-4",children:[(0,s.jsx)("div",{className:"text-sm text-muted-foreground",children:U}),(0,s.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,s.jsxs)(j.Button,{variant:"outline",size:"sm",onClick:B,disabled:!$,children:[(0,s.jsx)(d,{}),"Previous"]}),(0,s.jsxs)(j.Button,{variant:"outline",size:"sm",onClick:W,disabled:!H,children:["Next",(0,s.jsx)(c.ChevronRight,{})]})]})]})]}):(0,s.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:["No active hooks found. ",(0,s.jsx)("br",{}),(0,s.jsx)(v,{href:"https://useworkflow.dev/docs/api-reference/workflow/create-hook",children:"Learn how to create a hook"})]})]})}var O=e.i(360088),W=e.i(413862),B=e.i(384405);let H=(0,i.default)("ArrowDownAZ",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M20 8h-5",key:"1vsyxs"}],["path",{d:"M15 10V6.5a2.5 2.5 0 0 1 5 0V10",key:"ag13bf"}],["path",{d:"M15 14h5l-5 6h5",key:"ur5jdg"}]]),$=(0,i.default)("ArrowUpAZ",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M20 8h-5",key:"1vsyxs"}],["path",{d:"M15 10V6.5a2.5 2.5 0 0 1 5 0V10",key:"ag13bf"}],["path",{d:"M15 14h5l-5 6h5",key:"ur5jdg"}]]);var L=e.i(346131),U=e.i(451675),V=e.i(708341);function G({env:e,runId:t,runStatus:r,onSuccess:a,showDebugActions:o}){let[l,n]=(0,f.useState)(void 0),[i,d]=(0,f.useState)(!0),[c,u]=(0,f.useState)(void 0),h=c?.status||r;return(0,f.useEffect)(()=>{d(!0),Promise.all([(0,B.fetchRun)(e,t,"none"),(0,W.fetchEvents)(e,t,{limit:1e3,sortOrder:"desc"})]).then(([e,s])=>{e.success&&u(e.data),s.success&&n(s.data.data)}).catch(e=>{console.error("Failed to fetch run or events:",e)}).finally(()=>{d(!1)})},[e,t]),(0,s.jsx)(V.RunActionsDropdownItems,{env:e,runId:t,runStatus:h,events:l,eventsLoading:i,stopPropagation:!0,callbacks:{onSuccess:a},showDebugActions:o})}function K({env:e,runId:t,runStatus:r,onSuccess:a,showDebugActions:o}){let[l,n]=(0,f.useState)(!1);return(0,s.jsxs)(y.DropdownMenu,{open:l,onOpenChange:n,children:[(0,s.jsx)(y.DropdownMenuTrigger,{asChild:!0,children:(0,s.jsx)(j.Button,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(u.MoreHorizontal,{className:"h-4 w-4"})})}),l&&(0,s.jsx)(y.DropdownMenuContent,{align:"end",children:(0,s.jsx)(G,{env:e,runId:t,runStatus:r,onSuccess:a,showDebugActions:o})})]})}let Z={pending:{label:"Pending",color:"bg-neutral-600 dark:bg-neutral-400"},running:{label:"Running",color:"bg-blue-600 dark:bg-blue-400"},completed:{label:"Completed",color:"bg-green-600 dark:bg-green-400"},failed:{label:"Failed",color:"bg-red-600 dark:bg-red-400"},paused:{label:"Paused",color:"bg-yellow-600 dark:bg-yellow-400"},cancelled:{label:"Cancelled",color:"bg-gray-600 dark:bg-gray-400"}};function q({workflowNameFilter:e,status:t,seenWorkflowNames:r,sortOrder:a,loading:o,statusFilterRequiresWorkflowNameFilter:l,onWorkflowChange:n,onStatusChange:i,onSortToggle:d,onRefresh:c,lastRefreshTime:u}){return(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-end gap-2",children:[(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Last refreshed"}),u&&(0,s.jsx)(E.RelativeTime,{date:u,className:"text-sm text-muted-foreground",type:"distance"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsxs)(L.Select,{value:e??"all",onValueChange:n,disabled:o,children:[(0,s.jsx)(L.SelectTrigger,{className:"w-[180px] h-9",children:(0,s.jsx)(L.SelectValue,{placeholder:"Filter by workflow"})}),(0,s.jsxs)(L.SelectContent,{children:[(0,s.jsx)(L.SelectItem,{value:"all",children:"All Workflows"}),Array.from(r).sort().map(e=>(0,s.jsx)(L.SelectItem,{value:e,children:(0,O.parseWorkflowName)(e)?.shortName||e},e))]})]}),(0,s.jsxs)(M.Tooltip,{children:[(0,s.jsx)(M.TooltipTrigger,{asChild:!0,children:(0,s.jsx)("div",{children:(0,s.jsxs)(L.Select,{value:t||"all",onValueChange:i,disabled:o||l&&!e,children:[(0,s.jsx)(L.SelectTrigger,{className:"w-[140px] h-9",children:(0,s.jsx)(L.SelectValue,{placeholder:"Filter by status"})}),(0,s.jsxs)(L.SelectContent,{children:[(0,s.jsx)(L.SelectItem,{value:"all",children:"Any status"}),Object.entries(Z).map(([e,{label:t,color:r}])=>(0,s.jsx)(L.SelectItem,{value:e,children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("span",{className:`${r} size-1.5 rounded-full mr-2`}),t]})},e))]})]})})}),(0,s.jsx)(M.TooltipContent,{children:l&&"all"===e?"Select a workflow first to filter by status":"Filter runs by status"})]}),(0,s.jsxs)(M.Tooltip,{children:[(0,s.jsx)(M.TooltipTrigger,{asChild:!0,children:(0,s.jsxs)(j.Button,{variant:"outline",size:"sm",onClick:d,disabled:o,children:["desc"===a?(0,s.jsx)(H,{className:"h-4 w-4"}):(0,s.jsx)($,{className:"h-4 w-4"}),"desc"===a?"Newest":"Oldest"]})}),(0,s.jsx)(M.TooltipContent,{children:"desc"===a?"Showing newest first":"Showing oldest first"})]}),(0,s.jsxs)(M.Tooltip,{children:[(0,s.jsx)(M.TooltipTrigger,{asChild:!0,children:(0,s.jsxs)(j.Button,{variant:"outline",size:"sm",onClick:c,disabled:o,children:[(0,s.jsx)(h,{className:o?"animate-spin":""}),"Refresh"]})}),(0,s.jsx)(M.TooltipContent,{children:"Note that this resets pages"})]})]})]})}function Q({config:e,onRunClick:t}){let o,l,i,u,h,m,x=(0,r.useSearchParams)(),p=(o=(0,r.useRouter)(),l=(0,r.usePathname)(),i=(0,r.useSearchParams)(),(0,f.useCallback)(e=>{let s=new URLSearchParams(i.toString());"all"===e?(s.delete("workflow"),s.delete("status")):s.set("workflow",e),o.push(`${l}?${s.toString()}`)},[o,l,i])),w=(u=(0,r.useRouter)(),h=(0,r.usePathname)(),m=(0,r.useSearchParams)(),(0,f.useCallback)(e=>{let s=new URLSearchParams(m.toString());"all"===e?s.delete("status"):s.set("status",e),u.push(`${h}?${s.toString()}`)},[u,h,m])),N=x.get("status"),y=Object.keys(Z),M="all"===N||N&&y.includes(N)?N:void 0,_=x.get("workflow"),z="1"===x.get("debug"),[W,B]=(0,f.useState)("desc"),[H,$]=(0,f.useState)(()=>new Date),L=(0,f.useMemo)(()=>(0,A.worldConfigToEnvMap)(e),[e]),V=e.backend?.includes("vercel")||!1,[G,Q]=(0,f.useState)(new Set),{data:X,error:J,nextPage:Y,previousPage:ee,hasNextPage:es,hasPreviousPage:et,reload:er,pageInfo:ea}=(0,a.useWorkflowRuns)(L,{sortOrder:W,workflowName:"all"===_?void 0:_,status:"all"===M?void 0:M});(0,f.useEffect)(()=>{if(X.data&&X.data.length>0){let e=new Set(X.data.map(e=>e.workflowName));Q(s=>{let t=new Set(s);for(let s of e)t.add(s);return t})}},[X.data]);let eo=X.isLoading;return(0,s.jsxs)("div",{children:[(0,s.jsx)(q,{workflowNameFilter:_,status:M,seenWorkflowNames:G,sortOrder:W,loading:eo,statusFilterRequiresWorkflowNameFilter:V,onWorkflowChange:p,onStatusChange:w,onSortToggle:()=>{B(e=>"desc"===e?"asc":"desc")},onRefresh:()=>{$(()=>new Date),er()},lastRefreshTime:H}),J?(0,s.jsxs)(g.Alert,{variant:"destructive",children:[(0,s.jsx)(n.AlertCircle,{className:"h-4 w-4"}),(0,s.jsx)(g.AlertTitle,{children:"Error loading runs"}),(0,s.jsx)(g.AlertDescription,{children:(0,a.getErrorMessage)(J)})]}):eo&&!X?.data?(0,s.jsx)(F,{}):eo||X.data&&0!==X.data.length?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(b,{className:"overflow-hidden mt-4 bg-background",children:(0,s.jsx)(k,{className:"p-0 max-h-[calc(100vh-280px)] overflow-auto",children:(0,s.jsxs)(C,{children:[(0,s.jsx)(S,{children:(0,s.jsxs)(T,{children:[(0,s.jsx)(I,{className:"sticky top-0 bg-background z-10 border-b shadow-sm h-10",children:"Workflow"}),(0,s.jsx)(I,{className:"sticky top-0 bg-background z-10 border-b shadow-sm h-10",children:"Run ID"}),(0,s.jsx)(I,{className:"sticky top-0 bg-background z-10 border-b shadow-sm h-10",children:"Status"}),(0,s.jsx)(I,{className:"sticky top-0 bg-background z-10 border-b shadow-sm h-10",children:"Started"}),(0,s.jsx)(I,{className:"sticky top-0 bg-background z-10 border-b shadow-sm h-10",children:"Completed"}),(0,s.jsx)(I,{className:"sticky top-0 bg-background z-10 border-b shadow-sm h-10 w-10"})]})}),(0,s.jsx)(R,{children:X.data?.map(e=>(0,s.jsxs)(T,{className:"cursor-pointer group relative",onClick:()=>t(e.runId),children:[(0,s.jsx)(D,{className:"py-2",children:(0,s.jsx)(P.CopyableText,{text:e.workflowName,overlay:!0,children:(0,O.parseWorkflowName)(e.workflowName)?.shortName||"?"})}),(0,s.jsx)(D,{className:"font-mono text-xs py-2",children:(0,s.jsx)(P.CopyableText,{text:e.runId,overlay:!0,children:e.runId})}),(0,s.jsx)(D,{className:"py-2",children:(0,s.jsx)(U.StatusBadge,{status:e.status,context:e,durationMs:e.startedAt?(e.completedAt?new Date(e.completedAt).getTime():Date.now())-new Date(e.startedAt).getTime():void 0})}),(0,s.jsx)(D,{className:"py-2 text-muted-foreground text-xs",children:e.startedAt?(0,s.jsx)(E.RelativeTime,{date:e.startedAt}):"-"}),(0,s.jsx)(D,{className:"py-2 text-muted-foreground text-xs",children:e.completedAt?(0,s.jsx)(E.RelativeTime,{date:e.completedAt}):"-"}),(0,s.jsx)(D,{className:"py-2",children:(0,s.jsx)(K,{env:L,runId:e.runId,runStatus:e.status,onSuccess:er,showDebugActions:z})})]},e.runId))})]})})}),(0,s.jsxs)("div",{className:"flex items-center justify-between mt-4",children:[(0,s.jsx)("div",{className:"text-sm text-muted-foreground",children:ea}),(0,s.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,s.jsxs)(j.Button,{variant:"outline",size:"sm",onClick:ee,disabled:!et,children:[(0,s.jsx)(d,{}),"Previous"]}),(0,s.jsxs)(j.Button,{variant:"outline",size:"sm",onClick:Y,disabled:!es,children:["Next",(0,s.jsx)(c.ChevronRight,{})]})]})]})]}):(0,s.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:["No workflow runs found. ",(0,s.jsx)("br",{}),(0,s.jsx)(v,{href:"https://useworkflow.dev/docs/foundations/workflows-and-steps",children:"Learn how to create a workflow"})]})]})}var X=e.i(889840),J=e.i(400138);let Y=(0,i.default)("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);var ee=e.i(93698),es=e.i(562918),et=e.i(291967),er=e.i(221588),ea=e.i(810096),eo=e.i(244107),el=e.i(802313),en=e.i(975287),ei=e.i(376268),ed=e.i(153840),ec=e.i(110515),eu=e.i(692792),eh=e.i(345594),em=e.i(891246),ex=e.i(73772),ef=e.i(545136),ep="Dialog",[eg,ej]=(0,ea.createContextScope)(ep),[ew,eb]=eg(ep),ek=e=>{let{__scopeDialog:t,children:r,open:a,defaultOpen:o,onOpenChange:l,modal:n=!0}=e,i=f.useRef(null),d=f.useRef(null),[c,u]=(0,el.useControllableState)({prop:a,defaultProp:o??!1,onChange:l,caller:ep});return(0,s.jsx)(ew,{scope:t,triggerRef:i,contentRef:d,contentId:(0,eo.useId)(),titleId:(0,eo.useId)(),descriptionId:(0,eo.useId)(),open:c,onOpenChange:u,onOpenToggle:f.useCallback(()=>u(e=>!e),[u]),modal:n,children:r})};ek.displayName=ep;var eN="DialogTrigger";f.forwardRef((e,t)=>{let{__scopeDialog:r,...a}=e,o=eb(eN,r),l=(0,er.useComposedRefs)(t,o.triggerRef);return(0,s.jsx)(eu.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":e$(o.open),...a,ref:l,onClick:(0,et.composeEventHandlers)(e.onClick,o.onOpenToggle)})}).displayName=eN;var ev="DialogPortal",[ey,eC]=eg(ev,{forceMount:void 0}),eS=e=>{let{__scopeDialog:t,forceMount:r,children:a,container:o}=e,l=eb(ev,t);return(0,s.jsx)(ey,{scope:t,forceMount:r,children:f.Children.map(a,e=>(0,s.jsx)(ec.Presence,{present:r||l.open,children:(0,s.jsx)(ed.Portal,{asChild:!0,container:o,children:e})}))})};eS.displayName=ev;var eR="DialogOverlay",eT=f.forwardRef((e,t)=>{let r=eC(eR,e.__scopeDialog),{forceMount:a=r.forceMount,...o}=e,l=eb(eR,e.__scopeDialog);return l.modal?(0,s.jsx)(ec.Presence,{present:a||l.open,children:(0,s.jsx)(eD,{...o,ref:t})}):null});eT.displayName=eR;var eI=(0,ef.createSlot)("DialogOverlay.RemoveScroll"),eD=f.forwardRef((e,t)=>{let{__scopeDialog:r,...a}=e,o=eb(eR,r);return(0,s.jsx)(em.RemoveScroll,{as:eI,allowPinchZoom:!0,shards:[o.contentRef],children:(0,s.jsx)(eu.Primitive.div,{"data-state":e$(o.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),eM="DialogContent",eA=f.forwardRef((e,t)=>{let r=eC(eM,e.__scopeDialog),{forceMount:a=r.forceMount,...o}=e,l=eb(eM,e.__scopeDialog);return(0,s.jsx)(ec.Presence,{present:a||l.open,children:l.modal?(0,s.jsx)(eP,{...o,ref:t}):(0,s.jsx)(eE,{...o,ref:t})})});eA.displayName=eM;var eP=f.forwardRef((e,t)=>{let r=eb(eM,e.__scopeDialog),a=f.useRef(null),o=(0,er.useComposedRefs)(t,r.contentRef,a);return f.useEffect(()=>{let e=a.current;if(e)return(0,ex.hideOthers)(e)},[]),(0,s.jsx)(e_,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,et.composeEventHandlers)(e.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:(0,et.composeEventHandlers)(e.onPointerDownOutside,e=>{let s=e.detail.originalEvent,t=0===s.button&&!0===s.ctrlKey;(2===s.button||t)&&e.preventDefault()}),onFocusOutside:(0,et.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault())})}),eE=f.forwardRef((e,t)=>{let r=eb(eM,e.__scopeDialog),a=f.useRef(!1),o=f.useRef(!1);return(0,s.jsx)(e_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(a.current||r.triggerRef.current?.focus(),s.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(a.current=!0,"pointerdown"===s.detail.originalEvent.type&&(o.current=!0));let t=s.target;r.triggerRef.current?.contains(t)&&s.preventDefault(),"focusin"===s.detail.originalEvent.type&&o.current&&s.preventDefault()}})}),e_=f.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:l,...n}=e,i=eb(eM,r),d=f.useRef(null),c=(0,er.useComposedRefs)(t,d);return(0,eh.useFocusGuards)(),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ei.FocusScope,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:l,children:(0,s.jsx)(en.DismissableLayer,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":e$(i.open),...n,ref:c,onDismiss:()=>i.onOpenChange(!1)})}),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eG,{titleId:i.titleId}),(0,s.jsx)(eK,{contentRef:d,descriptionId:i.descriptionId})]})]})}),eF="DialogTitle",ez=f.forwardRef((e,t)=>{let{__scopeDialog:r,...a}=e,o=eb(eF,r);return(0,s.jsx)(eu.Primitive.h2,{id:o.titleId,...a,ref:t})});ez.displayName=eF;var eO="DialogDescription",eW=f.forwardRef((e,t)=>{let{__scopeDialog:r,...a}=e,o=eb(eO,r);return(0,s.jsx)(eu.Primitive.p,{id:o.descriptionId,...a,ref:t})});eW.displayName=eO;var eB="DialogClose",eH=f.forwardRef((e,t)=>{let{__scopeDialog:r,...a}=e,o=eb(eB,r);return(0,s.jsx)(eu.Primitive.button,{type:"button",...a,ref:t,onClick:(0,et.composeEventHandlers)(e.onClick,()=>o.onOpenChange(!1))})});function e$(e){return e?"open":"closed"}eH.displayName=eB;var eL="DialogTitleWarning",[eU,eV]=(0,ea.createContext)(eL,{contentName:eM,titleName:eF,docsSlug:"dialog"}),eG=({titleId:e})=>{let s=eV(eL),t=`\`${s.contentName}\` requires a \`${s.titleName}\` for the component to be accessible for screen reader users.
2
+
3
+ If you want to hide the \`${s.titleName}\`, you can wrap it with our VisuallyHidden component.
4
+
5
+ For more information, see https://radix-ui.com/primitives/docs/components/${s.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(t))},[t,e]),null},eK=({contentRef:e,descriptionId:s})=>{let t=eV("DialogDescriptionWarning"),r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${t.contentName}}.`;return f.useEffect(()=>{let t=e.current?.getAttribute("aria-describedby");s&&t&&(document.getElementById(s)||console.warn(r))},[r,e,s]),null},eZ=e.i(897884),eZ=eZ;function eq({...e}){return(0,s.jsx)(ek,{"data-slot":"sheet",...e})}function eQ({...e}){return(0,s.jsx)(eS,{"data-slot":"sheet-portal",...e})}function eX({className:e,...t}){return(0,s.jsx)(eT,{"data-slot":"sheet-overlay",className:(0,w.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function eJ({className:e,children:t,side:r="right",...a}){return(0,s.jsxs)(eQ,{children:[(0,s.jsx)(eX,{}),(0,s.jsxs)(eA,{"data-slot":"sheet-content",className:(0,w.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500","right"===r&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm","left"===r&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm","top"===r&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b","bottom"===r&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...a,children:[t,(0,s.jsxs)(eH,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[(0,s.jsx)(eZ.default,{className:"size-4"}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function eY({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"sheet-header",className:(0,w.cn)("flex flex-col gap-1.5 p-4",e),...t})}function e0({className:e,...t}){return(0,s.jsx)(ez,{"data-slot":"sheet-title",className:(0,w.cn)("text-foreground font-semibold",e),...t})}function e1({className:e,...t}){return(0,s.jsx)(eW,{"data-slot":"sheet-description",className:(0,w.cn)("text-muted-foreground text-sm",e),...t})}var e4=e.i(479823);function e2({config:e,onWorkflowSelect:t}){let[r,a]=(0,f.useState)(!1),[o,l]=(0,f.useState)(null),{manifest:i,loading:d,error:c}=(0,e4.useWorkflowGraphManifest)(e),u=i?Object.values(i.workflows):[],h=(0,f.useMemo)(()=>[...u].sort((e,s)=>e.workflowName.localeCompare(s.workflowName)),[u]);return d?(0,s.jsx)(F,{variant:"workflows",rows:6}):c?(0,s.jsxs)(g.Alert,{variant:"destructive",children:[(0,s.jsx)(n.AlertCircle,{className:"h-4 w-4"}),(0,s.jsx)(g.AlertTitle,{children:"Error Loading Workflows"}),(0,s.jsx)(g.AlertDescription,{children:c.message})]}):0===u.length?(0,s.jsx)(b,{children:(0,s.jsxs)(k,{className:"p-12 text-center",children:[(0,s.jsx)(Y,{className:"mx-auto h-12 w-12 text-muted-foreground mb-4"}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No Workflows Found"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"No workflow definitions were found in the graph manifest."})]})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(b,{className:"overflow-hidden bg-background",children:(0,s.jsx)(k,{className:"p-0 max-h-[calc(100vh-200px)] overflow-auto",children:(0,s.jsxs)(C,{children:[(0,s.jsx)(S,{children:(0,s.jsxs)(T,{children:[(0,s.jsx)(I,{className:"sticky top-0 bg-background z-10 border-b shadow-sm h-10",children:"Workflow"}),(0,s.jsx)(I,{className:"sticky top-0 bg-background z-10 border-b shadow-sm h-10",children:"File"}),(0,s.jsx)(I,{className:"text-center sticky top-0 bg-background z-10 border-b shadow-sm h-10",children:"Steps"})]})}),(0,s.jsx)(R,{children:h.map(e=>{let r=e.nodes.filter(e=>"step"===e.data.nodeKind).length;return(0,s.jsxs)(T,{className:"cursor-pointer",onClick:()=>{l(e),a(!0),t?.(e.workflowName)},children:[(0,s.jsx)(D,{className:"py-2",children:(0,s.jsx)("span",{className:"font-medium",children:e.workflowName})}),(0,s.jsx)(D,{className:"py-2",children:(0,s.jsx)("code",{className:"text-xs text-muted-foreground",children:e.filePath})}),(0,s.jsx)(D,{className:"text-center py-2",children:(0,s.jsxs)(es.Badge,{variant:"secondary",className:"gap-1",children:[(0,s.jsx)(J.GitBranch,{className:"h-3 w-3"}),r," ",1===r?"step":"steps"]})})]},e.workflowId)})})]})})}),(0,s.jsx)(eq,{open:r,onOpenChange:a,children:(0,s.jsxs)(eJ,{side:"right",className:"w-[75vw] max-w-[75vw] sm:max-w-[75vw]",children:[(0,s.jsxs)(eY,{children:[(0,s.jsxs)(e0,{className:"flex items-center gap-2",children:[(0,s.jsx)(Y,{className:"h-5 w-5"}),o?.workflowName]}),o&&(0,s.jsx)(e1,{asChild:!0,children:(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("code",{className:"text-xs",children:o.filePath}),(0,s.jsx)("div",{children:(0,s.jsxs)(es.Badge,{variant:"outline",className:"gap-1",children:[(0,s.jsx)(J.GitBranch,{className:"h-3 w-3"}),o.nodes.filter(e=>"step"===e.data.nodeKind).length," ",1===o.nodes.filter(e=>"step"===e.data.nodeKind).length?"step":"steps"]})})]})})]}),(0,s.jsx)("div",{className:"mt-6 h-[calc(100vh-180px)]",children:o&&(0,s.jsx)(ee.WorkflowGraphViewer,{workflow:o})})]})})]})}var e5=e.i(480462);function e6(){let e=(0,r.useRouter)(),a=(0,A.useQueryParamConfig)(),[o]=(0,e5.useSidebarState)(),[l]=(0,e5.useHookIdState)(),[n,i]=(0,e5.useTabState)(),d="local"===a.backend;return(0,s.jsx)("div",{className:"max-w-7xl mx-auto px-4",children:(0,s.jsxs)(X.Tabs,{value:n,onValueChange:i,className:"w-full",children:[(0,s.jsxs)(X.TabsList,{className:"mb-4",children:[(0,s.jsx)(X.TabsTrigger,{value:"runs",children:"Runs"}),(0,s.jsx)(X.TabsTrigger,{value:"hooks",children:"Hooks"}),d&&(0,s.jsx)(X.TabsTrigger,{value:"workflows",children:"Workflows"})]}),(0,s.jsx)(X.TabsContent,{value:"runs",children:(0,s.jsx)(t.ErrorBoundary,{title:"Runs Error",description:"Failed to load workflow runs. Please try refreshing the page.",children:(0,s.jsx)(Q,{config:a,onRunClick:(s,t)=>{t?e.push((0,A.buildUrlWithConfig)(`/run/${s}/streams/${t}`,a)):e.push((0,A.buildUrlWithConfig)(`/run/${s}`,a))}})})}),(0,s.jsx)(X.TabsContent,{value:"hooks",children:(0,s.jsx)(t.ErrorBoundary,{title:"Hooks Error",description:"Failed to load hooks. Please try refreshing the page.",children:(0,s.jsx)(z,{config:a,onHookClick:(s,t)=>{s?e.push((0,A.buildUrlWithConfig)(`/run/${t}`,a,{sidebar:"hook",hookId:s})):e.push((0,A.buildUrlWithConfig)(`/run/${t}`,a))},selectedHookId:"hook"===o&&l?l:void 0})})}),d&&(0,s.jsx)(X.TabsContent,{value:"workflows",children:(0,s.jsx)(t.ErrorBoundary,{title:"Workflows Error",description:"Failed to load workflow graph data. Please try refreshing the page.",children:(0,s.jsx)(e2,{config:a})})})]})})}e.s(["default",()=>e6],330997)}]);