opencami 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/client/assets/{CSPContext-CrlIQW7-.js → CSPContext-CxrBvJ99.js} +1 -1
  2. package/dist/client/assets/{DirectionContext-X-0CRn1O.js → DirectionContext-BOL0P_1j.js} +1 -1
  3. package/dist/client/assets/_sessionKey-CTtu2ipR.js +25 -0
  4. package/dist/client/assets/agents-D7JS19Lo.js +2 -0
  5. package/dist/client/assets/{agents-screen-BhOVp_S6.js → agents-screen-CqdzZKaR.js} +1 -1
  6. package/dist/client/assets/bots-DAInzfLx.js +2 -0
  7. package/dist/client/assets/{bots-screen-DLFd0ydi.js → bots-screen-RYovD6cu.js} +1 -1
  8. package/dist/client/assets/{button-D0n2Qsd_.js → button-Bv-7bwZZ.js} +1 -1
  9. package/dist/client/assets/{composite-GtKwZKbV.js → composite-DwQIZFe9.js} +1 -1
  10. package/dist/client/assets/{connect-vQWL0_11.js → connect-DZSrhhNT.js} +1 -1
  11. package/dist/client/assets/{dashboard-Knwc61i1.js → dashboard-y8KVUVF-.js} +1 -1
  12. package/dist/client/assets/{event-CHpdjYFR.js → event-Cnr9OETn.js} +1 -1
  13. package/dist/client/assets/{file-explorer-screen-FoYNs9zK.js → file-explorer-screen-C_mYUJsr.js} +1 -1
  14. package/dist/client/assets/files-CG0jFYdO.js +2 -0
  15. package/dist/client/assets/follow-up-suggestions-C6RzpstA.js +2 -0
  16. package/dist/client/assets/{index-CNPHef4O.js → index-3-ASY4Cl.js} +1 -1
  17. package/dist/client/assets/index-BZxJSF4T.js +3 -0
  18. package/dist/client/assets/{keyboard-shortcuts-dialog-DP8ptQ7N.js → keyboard-shortcuts-dialog-jm4-DftO.js} +1 -1
  19. package/dist/client/assets/{main-xPlWrMhO.js → main-CbISK-pm.js} +2 -2
  20. package/dist/client/assets/{markdown-3Js_RbUp.js → markdown-UD7RzskQ.js} +1 -1
  21. package/dist/client/assets/memory-BYRJ1l_4.js +2 -0
  22. package/dist/client/assets/{memory-screen-nzRra2Qi.js → memory-screen-BRsm-Q8A.js} +1 -1
  23. package/dist/client/assets/{menu-BnSEqetd.js → menu-DRjoHFvG.js} +1 -1
  24. package/dist/client/assets/{opencami-logo-B_hLbomw.js → opencami-logo-D2mv84sX.js} +1 -1
  25. package/dist/client/assets/{proxy-BnlGpgC1.js → proxy-DtxqfBHY.js} +1 -1
  26. package/dist/client/assets/{react-BgjQyJHw.js → react-C_7UlEtd.js} +1 -1
  27. package/dist/client/assets/{search-dialog-Bib2QY9u.js → search-dialog-lsT8JUtT.js} +1 -1
  28. package/dist/client/assets/{search-sources-badge-COHcYFRB.js → search-sources-badge-BnqKxoia.js} +1 -1
  29. package/dist/client/assets/{session-export-dialog-ooPnfHh_.js → session-export-dialog-DHHpvwI8.js} +1 -1
  30. package/dist/client/assets/settings-dialog-vrd0eJGw.js +1 -0
  31. package/dist/client/assets/skills-Svd-7oxQ.js +2 -0
  32. package/dist/client/assets/{skills-panel-D2uMdCHp.js → skills-panel-Dkuo0yyD.js} +1 -1
  33. package/dist/client/assets/{switch-BUQ0qH6r.js → switch-BYFBYPmi.js} +1 -1
  34. package/dist/client/assets/{tabs-BEyU6TjN.js → tabs-1jrPkdUE.js} +1 -1
  35. package/dist/client/assets/{thinking-CA48yhOE.js → thinking-D9BBn5kK.js} +1 -1
  36. package/dist/client/assets/{tooltip-CcIdgcV0.js → tooltip-DzFgDY86.js} +1 -1
  37. package/dist/client/assets/{use-file-explorer-state-CN_IJGcd.js → use-file-explorer-state-Dwhw6Mpg.js} +1 -1
  38. package/dist/client/assets/{useBaseUiId-ClbEYEil.js → useBaseUiId-BdQC9KF3.js} +1 -1
  39. package/dist/client/assets/{useCompositeItem-B_OxfJee.js → useCompositeItem-BI09zNFD.js} +1 -1
  40. package/dist/client/assets/{useControlled-CyT-lqbs.js → useControlled-Bc2Emhlx.js} +1 -1
  41. package/dist/client/assets/{useMutation-eQUrsn-X.js → useMutation-CMp81lDO.js} +1 -1
  42. package/dist/client/assets/{useOnFirstRender-CR_o2MK_.js → useOnFirstRender-DpB3w0o4.js} +1 -1
  43. package/dist/client/assets/{useQuery-k6EMRoMD.js → useQuery-_BEWdUe1.js} +1 -1
  44. package/dist/server/assets/{_sessionKey-CaFqmyhU.js → _sessionKey-COz7RLKC.js} +121 -23
  45. package/dist/server/assets/_tanstack-start-manifest_v-D0f-0Utn.js +4 -0
  46. package/dist/server/assets/{connect-CTVBm0Vc.js → connect-sd_NDvQN.js} +1 -1
  47. package/dist/server/assets/follow-up-suggestions-DRQqO8_S.js +183 -0
  48. package/dist/server/assets/{index-B_F4DTUu.js → index-197lqzv2.js} +2 -0
  49. package/dist/server/assets/{index-C7lmufwX.js → index-sXe2QC5V.js} +1 -1
  50. package/dist/server/assets/{markdown-CFdYXCRQ.js → markdown-Dk1YdosA.js} +1 -1
  51. package/dist/server/assets/{memory-screen-vqXczcVo.js → memory-screen-DA_o-N1Z.js} +2 -2
  52. package/dist/server/assets/{memory-rBB015W-.js → memory-woPzJFfs.js} +1 -1
  53. package/dist/server/assets/{router-X2L0PDPI.js → router-CZhxPkYW.js} +305 -150
  54. package/dist/server/assets/{search-dialog-CXhofdoP.js → search-dialog-DlvWfq1e.js} +5 -5
  55. package/dist/server/assets/{settings-dialog-CPdftvjz.js → settings-dialog-BGtrS2RJ.js} +62 -1
  56. package/dist/server/assets/{thinking-YkRSlXtf.js → thinking-fzwT_aVT.js} +5 -5
  57. package/dist/server/server.js +2 -2
  58. package/package.json +1 -1
  59. package/dist/client/assets/_sessionKey-yNQ57svB.js +0 -23
  60. package/dist/client/assets/agents-WqWjsymD.js +0 -2
  61. package/dist/client/assets/bots-DNqiFT7w.js +0 -2
  62. package/dist/client/assets/files-BtR_gArr.js +0 -2
  63. package/dist/client/assets/follow-up-suggestions-DVXNLqga.js +0 -5
  64. package/dist/client/assets/index-CTT0Y1ya.js +0 -3
  65. package/dist/client/assets/memory-BRGPq5t6.js +0 -2
  66. package/dist/client/assets/settings-dialog-B8mz99u-.js +0 -1
  67. package/dist/client/assets/skills-DA9J_tsC.js +0 -2
  68. package/dist/server/assets/_tanstack-start-manifest_v-P3skSR3R.js +0 -4
  69. package/dist/server/assets/follow-up-suggestions-DHv2_XzB.js +0 -275
@@ -1,4 +1,4 @@
1
- import{A as Ir,j as _,r as he,d as Xi,L as _n}from"./main-xPlWrMhO.js";import{r as Yi,C as Jt}from"./index-CTT0Y1ya.js";import{u as Ct,D as Ji,a as Ki,b as el,d as tl}from"./use-file-explorer-state-CN_IJGcd.js";import{c as nl,B as Ln}from"./button-D0n2Qsd_.js";import{s as Kt,h as rl,w as il,f as ll,a as sl,b as al,c as Fn}from"./index-T4TOjvD0.js";function en(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ze=en();function Tr(e){ze=e}var Ie={exec:()=>null};function O(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,s)=>{let l=typeof s=="string"?s:s.source;return l=l.replace(J.caret,"$1"),n=n.replace(i,l),r},getRegex:()=>new RegExp(n,t)};return r}var ol=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),J={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,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ 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=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},ul=/^(?:[ \t]*(?:\n|$))+/,cl=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,hl=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Je=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,fl=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,tn=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Ar=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,zr=O(Ar).replace(/bull/g,tn).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(),pl=O(Ar).replace(/bull/g,tn).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(),nn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ml=/^[^\n]+/,rn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,gl=O(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",rn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),dl=O(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,tn).getRegex(),dt="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",ln=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,kl=O("^ {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",ln).replace("tag",dt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Rr=O(nn).replace("hr",Je).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[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",dt).getRegex(),xl=O(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Rr).getRegex(),sn={blockquote:xl,code:cl,def:gl,fences:hl,heading:fl,hr:Je,html:kl,lheading:zr,list:dl,newline:ul,paragraph:Rr,table:Ie,text:ml},Dn=O("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Je).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[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",dt).getRegex(),yl={...sn,lheading:pl,table:Dn,paragraph:O(nn).replace("hr",Je).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Dn).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",dt).getRegex()},bl={...sn,html:O(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ln).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:Ie,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:O(nn).replace("hr",Je).replace("heading",` *#{1,6} *[^
1
+ import{A as Ir,j as _,r as he,d as Xi,L as _n}from"./main-CbISK-pm.js";import{r as Yi,C as Jt}from"./index-BZxJSF4T.js";import{u as Ct,D as Ji,a as Ki,b as el,d as tl}from"./use-file-explorer-state-Dwhw6Mpg.js";import{c as nl,B as Ln}from"./button-Bv-7bwZZ.js";import{s as Kt,h as rl,w as il,f as ll,a as sl,b as al,c as Fn}from"./index-T4TOjvD0.js";function en(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ze=en();function Tr(e){ze=e}var Ie={exec:()=>null};function O(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,s)=>{let l=typeof s=="string"?s:s.source;return l=l.replace(J.caret,"$1"),n=n.replace(i,l),r},getRegex:()=>new RegExp(n,t)};return r}var ol=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),J={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,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ 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=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},ul=/^(?:[ \t]*(?:\n|$))+/,cl=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,hl=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Je=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,fl=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,tn=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Ar=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,zr=O(Ar).replace(/bull/g,tn).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(),pl=O(Ar).replace(/bull/g,tn).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(),nn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ml=/^[^\n]+/,rn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,gl=O(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",rn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),dl=O(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,tn).getRegex(),dt="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",ln=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,kl=O("^ {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",ln).replace("tag",dt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Rr=O(nn).replace("hr",Je).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[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",dt).getRegex(),xl=O(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Rr).getRegex(),sn={blockquote:xl,code:cl,def:gl,fences:hl,heading:fl,hr:Je,html:kl,lheading:zr,list:dl,newline:ul,paragraph:Rr,table:Ie,text:ml},Dn=O("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Je).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[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",dt).getRegex(),yl={...sn,lheading:pl,table:Dn,paragraph:O(nn).replace("hr",Je).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Dn).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",dt).getRegex()},bl={...sn,html:O(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ln).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:Ie,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:O(nn).replace("hr",Je).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",zr).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},wl=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Sl=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Pr=/^( {2,}|\\)\n(?!\s*$)/,Cl=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,kt=/[\p{P}\p{S}]/u,an=/[\s\p{P}\p{S}]/u,_r=/[^\s\p{P}\p{S}]/u,El=O(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,an).getRegex(),Lr=/(?!~)[\p{P}\p{S}]/u,Il=/(?!~)[\s\p{P}\p{S}]/u,Tl=/(?:[^\s\p{P}\p{S}]|~)/u,Fr=/(?![*_])[\p{P}\p{S}]/u,Al=/(?![*_])[\s\p{P}\p{S}]/u,zl=/(?:[^\s\p{P}\p{S}]|[*_])/u,Rl=O(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",ol?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Dr=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Pl=O(Dr,"u").replace(/punct/g,kt).getRegex(),_l=O(Dr,"u").replace(/punct/g,Lr).getRegex(),vr="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ll=O(vr,"gu").replace(/notPunctSpace/g,_r).replace(/punctSpace/g,an).replace(/punct/g,kt).getRegex(),Fl=O(vr,"gu").replace(/notPunctSpace/g,Tl).replace(/punctSpace/g,Il).replace(/punct/g,Lr).getRegex(),Dl=O("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,_r).replace(/punctSpace/g,an).replace(/punct/g,kt).getRegex(),vl=O(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Fr).getRegex(),Nl="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",$l=O(Nl,"gu").replace(/notPunctSpace/g,zl).replace(/punctSpace/g,Al).replace(/punct/g,Fr).getRegex(),Bl=O(/\\(punct)/,"gu").replace(/punct/g,kt).getRegex(),Ol=O(/^<(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(),jl=O(ln).replace("(?:-->|$)","-->").getRegex(),Ml=O("^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",jl).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ot=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,ql=O(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ot).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Nr=O(/^!?\[(label)\]\[(ref)\]/).replace("label",ot).replace("ref",rn).getRegex(),$r=O(/^!?\[(ref)\](?:\[\])?/).replace("ref",rn).getRegex(),Hl=O("reflink|nolink(?!\\()","g").replace("reflink",Nr).replace("nolink",$r).getRegex(),vn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,on={_backpedal:Ie,anyPunctuation:Bl,autolink:Ol,blockSkip:Rl,br:Pr,code:Sl,del:Ie,delLDelim:Ie,delRDelim:Ie,emStrongLDelim:Pl,emStrongRDelimAst:Ll,emStrongRDelimUnd:Dl,escape:wl,link:ql,nolink:$r,punctuation:El,reflink:Nr,reflinkSearch:Hl,tag:Ml,text:Cl,url:Ie},Vl={...on,link:O(/^!?\[(label)\]\((.*?)\)/).replace("label",ot).getRegex(),reflink:O(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ot).getRegex()},Mt={...on,emStrongRDelimAst:Fl,emStrongLDelim:_l,delLDelim:vl,delRDelim:$l,url:O(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",vn).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:O(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",vn).getRegex()},Ul={...Mt,br:O(Pr).replace("{2,}","*").getRegex(),text:O(Mt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},nt={normal:sn,gfm:yl,pedantic:bl},je={normal:on,gfm:Mt,breaks:Ul,pedantic:Vl},Wl={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Nn=e=>Wl[e];function ce(e,t){if(t){if(J.escapeTest.test(e))return e.replace(J.escapeReplace,Nn)}else if(J.escapeTestNoEncode.test(e))return e.replace(J.escapeReplaceNoEncode,Nn);return e}function $n(e){try{e=encodeURI(e).replace(J.percentDecode,"%")}catch{return null}return e}function Bn(e,t){let n=e.replace(J.findPipe,(s,l,a)=>{let o=!1,u=l;for(;--u>=0&&a[u]==="\\";)o=!o;return o?"|":" |"}),r=n.split(J.splitPipe),i=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(;i<r.length;i++)r[i]=r[i].trim().replace(J.slashPipe,"|");return r}function Me(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function Ql(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Zl(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let s=4-n%4;r+=" ".repeat(s),n+=s}else r+=i,n++;return r}function On(e,t,n,r,i){let s=t.href,l=t.title||null,a=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let o={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:s,title:l,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,o}function Gl(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
3
3
  `).map(s=>{let l=s.match(n.other.beginningSpace);if(l===null)return s;let[a]=l;return a.length>=i.length?s.slice(i.length):s}).join(`
4
4
  `)}var ut=class{options;rules;lexer;constructor(e){this.options=e||ze}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 n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Me(n,`
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/memory-screen-BRsm-Q8A.js","assets/main-CbISK-pm.js","assets/useQuery-_BEWdUe1.js","assets/useMutation-CMp81lDO.js","assets/button-Bv-7bwZZ.js","assets/markdown-UD7RzskQ.js","assets/index-BZxJSF4T.js","assets/react-C_7UlEtd.js","assets/use-file-explorer-state-Dwhw6Mpg.js","assets/useOnFirstRender-DpB3w0o4.js","assets/useBaseUiId-BdQC9KF3.js","assets/event-Cnr9OETn.js","assets/visuallyHidden-COI6QeQH.js","assets/composite-DwQIZFe9.js","assets/index-T4TOjvD0.js"])))=>i.map(i=>d[i]);
2
+ import{j as e,r,_ as s}from"./main-CbISK-pm.js";const n=r.lazy(()=>s(()=>import("./memory-screen-BRsm-Q8A.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(t=>({default:t.MemoryScreen})));function a(){return e.jsx(r.Suspense,{fallback:e.jsx("div",{className:"flex h-screen items-center justify-center text-primary-500 text-sm",children:"Loading…"}),children:e.jsx(n,{})})}export{a as component};
@@ -1 +1 @@
1
- import{j as e,r as h,u as N,L as R}from"./main-xPlWrMhO.js";import{u as g}from"./useQuery-k6EMRoMD.js";import{u as S}from"./useMutation-eQUrsn-X.js";import{c as M,B as f,b as k}from"./button-D0n2Qsd_.js";import{M as C}from"./markdown-3Js_RbUp.js";import"./index-CTT0Y1ya.js";import"./react-BgjQyJHw.js";import"./use-file-explorer-state-CN_IJGcd.js";import"./useOnFirstRender-CR_o2MK_.js";import"./useBaseUiId-ClbEYEil.js";import"./event-CHpdjYFR.js";import"./visuallyHidden-COI6QeQH.js";import"./composite-GtKwZKbV.js";import"./index-T4TOjvD0.js";const w=/\/(\d{4}-\d{2}-\d{2})/;function j({path:r,label:n,selected:o,onSelect:m}){return e.jsx("button",{type:"button",onClick:()=>m(r),className:M("w-full text-left px-2.5 py-1.5 rounded-md text-sm transition-colors",o?"text-primary-900":"text-primary-600 hover:text-primary-900 hover:bg-primary-50"),style:o?{backgroundColor:"var(--opencami-accent-light)"}:void 0,children:n})}function b(r){return r==="/MEMORY.md"?"📋 MEMORY.md":r.match(w)?`📅 ${r.replace(/^\/?memory\//,"")}`:`📄 ${r.replace(/^\/?memory\//,"")}`}function F({files:r,selectedPath:n,onSelect:o,loading:m}){const i=r.filter(t=>t==="/MEMORY.md"),s=r.filter(t=>t!=="/MEMORY.md"&&w.test(t)),l=r.filter(t=>t!=="/MEMORY.md"&&!w.test(t));return e.jsxs("aside",{className:"border-r border-primary-200 bg-primary-100 md:w-72 w-full md:h-full h-auto overflow-y-auto",children:[e.jsx("div",{className:"px-4 py-3 border-b border-primary-200",children:e.jsx("h2",{className:"text-sm font-semibold text-primary-800",children:"Memory Files"})}),e.jsx("div",{className:"p-2 space-y-0.5",children:m?e.jsx("div",{className:"px-2 py-2 text-sm text-primary-500",children:"Loading files…"}):r.length===0?e.jsx("div",{className:"px-2 py-2 text-sm text-primary-500",children:"No memory files found."}):e.jsxs(e.Fragment,{children:[i.map(t=>e.jsx(j,{path:t,label:b(t),selected:n===t,onSelect:o},t)),s.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-2.5 pt-3 pb-1 text-xs font-medium text-primary-400 uppercase tracking-wider",children:"Daily"}),s.map(t=>e.jsx(j,{path:t,label:b(t),selected:n===t,onSelect:o},t))]}),l.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-2.5 pt-3 pb-1 text-xs font-medium text-primary-400 uppercase tracking-wider",children:"Notes"}),l.map(t=>e.jsx(j,{path:t,label:b(t),selected:n===t,onSelect:o},t))]})]})})]})}function O({filePath:r,content:n,isLoading:o,onSave:m,onBack:i}){const[s,l]=h.useState(!1),[t,x]=h.useState(n),[u,p]=h.useState(!1);h.useEffect(()=>{x(n),l(!1)},[r,n]);const a=async()=>{p(!0);try{await m(t),l(!1)}finally{p(!1)}};return e.jsxs("section",{className:"flex-1 min-h-0 flex flex-col",children:[e.jsxs("header",{className:"border-b border-primary-100 px-4 py-3 flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[i?e.jsx(f,{size:"sm",variant:"ghost",onClick:i,children:"Back"}):null,e.jsx("h1",{className:"text-sm font-semibold text-primary-800 truncate",children:r})]}),!o&&e.jsx("div",{className:"flex items-center gap-2",children:s?e.jsxs(e.Fragment,{children:[e.jsx(f,{size:"sm",variant:"outline",onClick:()=>l(!1),children:"Cancel"}),e.jsx(f,{size:"sm",onClick:()=>{a()},disabled:u,children:u?"Saving…":"Save"})]}):e.jsx(f,{size:"sm",variant:"outline",onClick:()=>l(!0),children:"Edit"})})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto p-4",children:o?e.jsx("div",{className:"text-sm text-primary-500",children:"Loading content…"}):s?e.jsx("textarea",{value:t,onChange:c=>x(c.target.value),className:"w-full min-h-[60vh] rounded-md border border-primary-200 bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500"}):e.jsx(C,{className:"prose prose-invert max-w-none",children:n||"_Empty file_"})})]})}const Y=/\/(\d{4}-\d{2}-\d{2})/;function z(r){const n=r.includes("/MEMORY.md")?["/MEMORY.md"]:[],o=r.filter(s=>s!=="/MEMORY.md"&&(s.startsWith("memory/")||s.startsWith("/memory/"))&&s.endsWith(".md")),m=[],i=[];for(const s of o)Y.test(s)?m.push(s):i.push(s);return m.sort((s,l)=>l.localeCompare(s)),i.sort((s,l)=>s.localeCompare(l)),[...n,...m,...i]}function J(){const r=N(),[n,o]=h.useState("/MEMORY.md"),m=g({queryKey:["memory","files"],queryFn:async({signal:a})=>{const[c,d]=await Promise.all([fetch("/api/files/read?path=/MEMORY.md",{signal:a}),fetch("/api/files/list?path=/memory",{signal:a})]),y=[];if(c.ok&&y.push("/MEMORY.md"),d.ok){const E=await d.json();for(const v of E.items)!v.isDir&&v.path.endsWith(".md")&&y.push(v.path)}return z(y)},staleTime:3e4}),i=n??m.data?.[0]??null,s=g({queryKey:["memory","content",i],queryFn:async({signal:a})=>{const c=i.startsWith("/")?i:`/${i}`,d=await fetch(`/api/files/read?path=${encodeURIComponent(c)}`,{signal:a});if(!d.ok)throw new Error("Failed to read memory file");return d.json()},enabled:!!i}),l=S({mutationFn:async a=>{const c=a.path.startsWith("/")?a.path:`/${a.path}`,d=await fetch("/api/files/save",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({...a,path:c})});if(!d.ok)throw new Error("Failed to save memory file");return d.json()},onSuccess:async(a,c)=>{await r.invalidateQueries({queryKey:["memory","content",c.path]}),await r.invalidateQueries({queryKey:["memory","files"]})}}),[t,x]=h.useState(()=>typeof window<"u"?window.innerWidth<768:!1);h.useEffect(()=>{if(typeof window>"u")return;const a=()=>x(window.innerWidth<768);return window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]);const u=t&&!i,p=h.useCallback(a=>{o(a)},[]);return e.jsxs("div",{className:"h-screen bg-surface text-primary-900",children:[e.jsxs("div",{className:"h-12 border-b border-primary-100 px-3 flex items-center justify-between",children:[e.jsx("h1",{className:"text-sm font-semibold",children:"Memory Viewer"}),e.jsx(R,{to:"/chat/$sessionKey",params:{sessionKey:"main"},className:M(k({variant:"ghost",size:"sm"})),children:"Back to Chat"})]}),e.jsxs("div",{className:"h-[calc(100vh-48px)] md:grid md:grid-cols-[18rem_1fr]",children:[(!t||u)&&e.jsx(F,{files:m.data??[],selectedPath:i,onSelect:p,loading:m.isLoading}),i&&(!t||!u)?e.jsx(O,{filePath:i,content:s.data?.content??"",isLoading:s.isLoading,onBack:t?()=>o(null):void 0,onSave:async a=>{await l.mutateAsync({path:i,content:a})}}):e.jsx("div",{className:"p-4 text-sm text-primary-500",children:"Select a file to view."})]}),(m.isError||s.isError||l.isError)&&e.jsxs("div",{className:"fixed bottom-4 right-4 rounded-md border border-red-200 bg-red-50 px-3 py-2 text-xs text-red-700",children:["Something went wrong. ",e.jsx(f,{size:"sm",variant:"ghost",onClick:()=>{m.refetch()},children:"Retry"})]})]})}export{J as MemoryScreen};
1
+ import{j as e,r as h,u as N,L as R}from"./main-CbISK-pm.js";import{u as g}from"./useQuery-_BEWdUe1.js";import{u as S}from"./useMutation-CMp81lDO.js";import{c as M,B as f,b as k}from"./button-Bv-7bwZZ.js";import{M as C}from"./markdown-UD7RzskQ.js";import"./index-BZxJSF4T.js";import"./react-C_7UlEtd.js";import"./use-file-explorer-state-Dwhw6Mpg.js";import"./useOnFirstRender-DpB3w0o4.js";import"./useBaseUiId-BdQC9KF3.js";import"./event-Cnr9OETn.js";import"./visuallyHidden-COI6QeQH.js";import"./composite-DwQIZFe9.js";import"./index-T4TOjvD0.js";const w=/\/(\d{4}-\d{2}-\d{2})/;function j({path:r,label:n,selected:o,onSelect:m}){return e.jsx("button",{type:"button",onClick:()=>m(r),className:M("w-full text-left px-2.5 py-1.5 rounded-md text-sm transition-colors",o?"text-primary-900":"text-primary-600 hover:text-primary-900 hover:bg-primary-50"),style:o?{backgroundColor:"var(--opencami-accent-light)"}:void 0,children:n})}function b(r){return r==="/MEMORY.md"?"📋 MEMORY.md":r.match(w)?`📅 ${r.replace(/^\/?memory\//,"")}`:`📄 ${r.replace(/^\/?memory\//,"")}`}function F({files:r,selectedPath:n,onSelect:o,loading:m}){const i=r.filter(t=>t==="/MEMORY.md"),s=r.filter(t=>t!=="/MEMORY.md"&&w.test(t)),l=r.filter(t=>t!=="/MEMORY.md"&&!w.test(t));return e.jsxs("aside",{className:"border-r border-primary-200 bg-primary-100 md:w-72 w-full md:h-full h-auto overflow-y-auto",children:[e.jsx("div",{className:"px-4 py-3 border-b border-primary-200",children:e.jsx("h2",{className:"text-sm font-semibold text-primary-800",children:"Memory Files"})}),e.jsx("div",{className:"p-2 space-y-0.5",children:m?e.jsx("div",{className:"px-2 py-2 text-sm text-primary-500",children:"Loading files…"}):r.length===0?e.jsx("div",{className:"px-2 py-2 text-sm text-primary-500",children:"No memory files found."}):e.jsxs(e.Fragment,{children:[i.map(t=>e.jsx(j,{path:t,label:b(t),selected:n===t,onSelect:o},t)),s.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-2.5 pt-3 pb-1 text-xs font-medium text-primary-400 uppercase tracking-wider",children:"Daily"}),s.map(t=>e.jsx(j,{path:t,label:b(t),selected:n===t,onSelect:o},t))]}),l.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-2.5 pt-3 pb-1 text-xs font-medium text-primary-400 uppercase tracking-wider",children:"Notes"}),l.map(t=>e.jsx(j,{path:t,label:b(t),selected:n===t,onSelect:o},t))]})]})})]})}function O({filePath:r,content:n,isLoading:o,onSave:m,onBack:i}){const[s,l]=h.useState(!1),[t,x]=h.useState(n),[u,p]=h.useState(!1);h.useEffect(()=>{x(n),l(!1)},[r,n]);const a=async()=>{p(!0);try{await m(t),l(!1)}finally{p(!1)}};return e.jsxs("section",{className:"flex-1 min-h-0 flex flex-col",children:[e.jsxs("header",{className:"border-b border-primary-100 px-4 py-3 flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[i?e.jsx(f,{size:"sm",variant:"ghost",onClick:i,children:"Back"}):null,e.jsx("h1",{className:"text-sm font-semibold text-primary-800 truncate",children:r})]}),!o&&e.jsx("div",{className:"flex items-center gap-2",children:s?e.jsxs(e.Fragment,{children:[e.jsx(f,{size:"sm",variant:"outline",onClick:()=>l(!1),children:"Cancel"}),e.jsx(f,{size:"sm",onClick:()=>{a()},disabled:u,children:u?"Saving…":"Save"})]}):e.jsx(f,{size:"sm",variant:"outline",onClick:()=>l(!0),children:"Edit"})})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto p-4",children:o?e.jsx("div",{className:"text-sm text-primary-500",children:"Loading content…"}):s?e.jsx("textarea",{value:t,onChange:c=>x(c.target.value),className:"w-full min-h-[60vh] rounded-md border border-primary-200 bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500"}):e.jsx(C,{className:"prose prose-invert max-w-none",children:n||"_Empty file_"})})]})}const Y=/\/(\d{4}-\d{2}-\d{2})/;function z(r){const n=r.includes("/MEMORY.md")?["/MEMORY.md"]:[],o=r.filter(s=>s!=="/MEMORY.md"&&(s.startsWith("memory/")||s.startsWith("/memory/"))&&s.endsWith(".md")),m=[],i=[];for(const s of o)Y.test(s)?m.push(s):i.push(s);return m.sort((s,l)=>l.localeCompare(s)),i.sort((s,l)=>s.localeCompare(l)),[...n,...m,...i]}function J(){const r=N(),[n,o]=h.useState("/MEMORY.md"),m=g({queryKey:["memory","files"],queryFn:async({signal:a})=>{const[c,d]=await Promise.all([fetch("/api/files/read?path=/MEMORY.md",{signal:a}),fetch("/api/files/list?path=/memory",{signal:a})]),y=[];if(c.ok&&y.push("/MEMORY.md"),d.ok){const E=await d.json();for(const v of E.items)!v.isDir&&v.path.endsWith(".md")&&y.push(v.path)}return z(y)},staleTime:3e4}),i=n??m.data?.[0]??null,s=g({queryKey:["memory","content",i],queryFn:async({signal:a})=>{const c=i.startsWith("/")?i:`/${i}`,d=await fetch(`/api/files/read?path=${encodeURIComponent(c)}`,{signal:a});if(!d.ok)throw new Error("Failed to read memory file");return d.json()},enabled:!!i}),l=S({mutationFn:async a=>{const c=a.path.startsWith("/")?a.path:`/${a.path}`,d=await fetch("/api/files/save",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({...a,path:c})});if(!d.ok)throw new Error("Failed to save memory file");return d.json()},onSuccess:async(a,c)=>{await r.invalidateQueries({queryKey:["memory","content",c.path]}),await r.invalidateQueries({queryKey:["memory","files"]})}}),[t,x]=h.useState(()=>typeof window<"u"?window.innerWidth<768:!1);h.useEffect(()=>{if(typeof window>"u")return;const a=()=>x(window.innerWidth<768);return window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]);const u=t&&!i,p=h.useCallback(a=>{o(a)},[]);return e.jsxs("div",{className:"h-screen bg-surface text-primary-900",children:[e.jsxs("div",{className:"h-12 border-b border-primary-100 px-3 flex items-center justify-between",children:[e.jsx("h1",{className:"text-sm font-semibold",children:"Memory Viewer"}),e.jsx(R,{to:"/chat/$sessionKey",params:{sessionKey:"main"},className:M(k({variant:"ghost",size:"sm"})),children:"Back to Chat"})]}),e.jsxs("div",{className:"h-[calc(100vh-48px)] md:grid md:grid-cols-[18rem_1fr]",children:[(!t||u)&&e.jsx(F,{files:m.data??[],selectedPath:i,onSelect:p,loading:m.isLoading}),i&&(!t||!u)?e.jsx(O,{filePath:i,content:s.data?.content??"",isLoading:s.isLoading,onBack:t?()=>o(null):void 0,onSave:async a=>{await l.mutateAsync({path:i,content:a})}}):e.jsx("div",{className:"p-4 text-sm text-primary-500",children:"Select a file to view."})]}),(m.isError||s.isError||l.isError)&&e.jsxs("div",{className:"fixed bottom-4 right-4 rounded-md border border-red-200 bg-red-50 px-3 py-2 text-xs text-red-700",children:["Something went wrong. ",e.jsx(f,{size:"sm",variant:"ghost",onClick:()=>{m.refetch()},children:"Retry"})]})]})}export{J as MemoryScreen};
@@ -1 +1 @@
1
- import{r as n,j as W,w as ot}from"./main-xPlWrMhO.js";import{a9 as Ee,aa as Pe,ab as qe,t as At,ae as Oe,u as Dt,af as $e,c as Je}from"./button-D0n2Qsd_.js";import{u as Lt,a as Te,b as Me,c as Qe,d as dt,e as Ht,p as pt,t as Kt,F as Ut,D as jt,P as Bt,f as _t,R as Gt,g as Vt,h as Wt,i as gt,j as zt,k as $,l as Yt,m as qt,n as mt,o as $t,q as Xt,r as Jt,s as Qt,T as Zt,v as xt,w as en,x as tn,y as nn,z as on,A as rn,B as sn,C as an,E as rt,G as st,H as cn}from"./useOnFirstRender-CR_o2MK_.js";import{t as ht,g as ne,u as fe,a as me,l as De,i as Xe,j as He,k as yt,f as Rt,e as bt,o as un,m as Ke,s as Le,p as ln,q as it,r as fn,v as dn,w as pn,x as gn,b as mn,y as xn}from"./useBaseUiId-ClbEYEil.js";import{e as at,F as hn,I as yn,i as Rn,f as bn,g as vn,h as Cn}from"./use-file-explorer-state-CN_IJGcd.js";import{u as In}from"./DirectionContext-X-0CRn1O.js";import{i as ct,f as Tn,g as Mn,h as En,j as Pn,d as ut,o as Ue,e as ve,s as he,a as je,b as Se,c as we,k as On,l as Sn,m as wn,A as vt}from"./event-CHpdjYFR.js";import{h as lt,g as We,a as ft,c as kn,i as ze,b as Fn,d as Nn,e as An,f as Fe,j as Dn,C as Ln,u as Hn}from"./useCompositeItem-B_OxfJee.js";import{u as Kn,e as Ct,f as Un,h as jn,i as Bn,j as _n}from"./tooltip-CcIdgcV0.js";import{C as Gn}from"./composite-GtKwZKbV.js";function Vn(e,t={}){const o="rootStore"in e?e.rootStore:e,c=o.context.dataRef,{enabled:d=!0,event:x="click",toggle:T=!0,ignoreMouse:r=!1,stickIfOpen:v=!0,touchOpenDelay:C=0,reason:R=ht}=t,m=n.useRef(void 0),O=Lt(),b=Te(),M=n.useMemo(()=>({onPointerDown(u){m.current=u.pointerType},onMouseDown(u){const p=m.current,h=u.nativeEvent,l=o.select("open");if(u.button!==0||x==="click"||ct(p,!0)&&r)return;const w=c.current.openEvent,I=w?.type,s=o.select("domReferenceElement")!==u.currentTarget,i=l&&s||!(l&&T&&(!(w&&v)||I==="click"||I==="mousedown"));if(Mn(h.target)){const S=ne(R,h,h.target);i&&p==="touch"&&C>0?b.start(C,()=>{o.setOpen(!0,S)}):o.setOpen(i,S);return}const y=u.currentTarget;O.request(()=>{const S=ne(R,h,y);i&&p==="touch"&&C>0?b.start(C,()=>{o.setOpen(!0,S)}):o.setOpen(i,S)})},onClick(u){if(x==="mousedown-only")return;const p=m.current;if(x==="mousedown"&&p){m.current=void 0;return}if(ct(p,!0)&&r)return;const h=o.select("open"),l=c.current.openEvent,w=o.select("domReferenceElement")!==u.currentTarget,I=h&&w||!(h&&T&&(!(l&&v)||Tn(l))),s=ne(R,u.nativeEvent,u.currentTarget);I&&p==="touch"&&C>0?b.start(C,()=>{o.setOpen(!0,s)}):o.setOpen(I,s)},onKeyDown(){m.current=void 0}}),[c,x,r,o,v,T,O,b,C,R]);return n.useMemo(()=>d?{reference:M}:Ee,[d,M])}const Wn="Escape";function Be(e,t,o){switch(e){case"vertical":return t;case"horizontal":return o;default:return t||o}}function Ne(e,t){return Be(t,e===vt||e===je,e===Se||e===we)}function Ye(e,t,o){return Be(t,e===je,o?e===Se:e===we)||e==="Enter"||e===" "||e===""}function zn(e,t,o){return Be(t,o?e===Se:e===we,e===je)}function Yn(e,t,o,c){const d=o?e===we:e===Se,x=e===vt;return t==="both"||t==="horizontal"&&c&&c>1?e===Wn:Be(t,d,x)}function qn(e,t){const o="rootStore"in e?e.rootStore:e,c=o.useState("open"),d=o.useState("floatingElement"),x=o.useState("domReferenceElement"),T=o.context.dataRef,{listRef:r,activeIndex:v,onNavigate:C=()=>{},enabled:R=!0,selectedIndex:m=null,allowEscape:O=!1,loopFocus:b=!1,nested:M=!1,rtl:u=!1,virtual:p=!1,focusItemOnOpen:h="auto",focusItemOnHover:l=!0,openOnArrowKeyDown:w=!0,disabledIndices:I=void 0,orientation:s="vertical",parentOrientation:i,cols:y=1,id:S,resetOnPointerLeave:G=!0,externalTree:H}=t,Y=En(d),B=Me(Y),L=Qe(),N=dt(H);fe(()=>{T.current.orientation=s},[T,s]);const V=Pn(x),q=n.useRef(h),f=n.useRef(m??-1),K=n.useRef(null),X=n.useRef(!0),F=me(a=>{C(f.current===-1?null:f.current,a)}),J=n.useRef(F),Q=n.useRef(!!d),oe=n.useRef(c),P=n.useRef(!1),re=n.useRef(!1),xe=Me(I),ue=Me(c),se=Me(m),le=Me(G),ee=me(()=>{function a(z){p?N?.events.emit("virtualfocus",z):at(z,{sync:P.current,preventScroll:!0})}const k=r.current[f.current],g=re.current;k&&a(k),(P.current?z=>z():requestAnimationFrame)(()=>{const z=r.current[f.current]||k;if(!z)return;k||a(z),A&&(g||!X.current)&&z.scrollIntoView?.({block:"nearest",inline:"nearest"})})});fe(()=>{R&&(c&&d?(f.current=m??-1,q.current&&m!=null&&(re.current=!0,F())):Q.current&&(f.current=-1,J.current()))},[R,c,d,m,F]),fe(()=>{if(R){if(!c){P.current=!1;return}if(d)if(v==null){if(P.current=!1,se.current!=null)return;if(Q.current&&(f.current=-1,ee()),(!oe.current||!Q.current)&&q.current&&(K.current!=null||q.current===!0&&K.current==null)){let a=0;const k=()=>{r.current[0]==null?(a<2&&(a?requestAnimationFrame:queueMicrotask)(k),a+=1):(f.current=K.current==null||Ye(K.current,s,u)||M?We(r):ft(r),K.current=null,F())};k()}}else lt(r,v)||(f.current=v,ee(),re.current=!1)}},[R,c,d,v,se,M,r,s,u,F,ee,xe]),fe(()=>{if(!R||d||!N||p||!Q.current)return;const a=N.nodesRef.current,k=a.find(z=>z.id===L)?.context?.elements.floating,g=ut(Ue(d)),j=a.some(z=>z.context&&ve(z.context.elements.floating,g));k&&!j&&X.current&&k.focus({preventScroll:!0})},[R,d,N,L,p]),fe(()=>{J.current=F,oe.current=c,Q.current=!!d}),fe(()=>{c||(K.current=null,q.current=h)},[c,h]);const _=v!=null,A=n.useMemo(()=>{function a(g){if(!ue.current)return;const j=r.current.indexOf(g.currentTarget);j!==-1&&f.current!==j&&(f.current=j,F(g))}return{onFocus(g){P.current=!0,a(g)},onClick:({currentTarget:g})=>g.focus({preventScroll:!0}),onMouseMove(g){P.current=!0,re.current=!1,l&&a(g)},onPointerLeave(g){if(!ue.current||!X.current||g.pointerType==="touch")return;P.current=!0;const j=g.relatedTarget;!l||r.current.includes(j)||le.current&&(at(null,{sync:!0}),f.current=-1,F(g),p||B.current?.focus({preventScroll:!0}))}}},[ue,B,l,r,F,le,p]),ae=n.useCallback(()=>i??N?.nodesRef.current.find(a=>a.id===L)?.context?.dataRef?.current.orientation,[L,N,i]),de=me(a=>{if(X.current=!1,P.current=!0,a.which===229||!ue.current&&a.currentTarget===B.current)return;if(M&&Yn(a.key,s,u,y)){Ne(a.key,ae())||he(a),o.setOpen(!1,ne(De,a.nativeEvent)),Xe(x)&&(p?N?.events.emit("virtualfocus",x):x.focus());return}const k=f.current,g=We(r,I),j=ft(r,I);if(V||(a.key==="Home"&&(he(a),f.current=g,F(a)),a.key==="End"&&(he(a),f.current=j,F(a))),y>1){const z=Array.from({length:r.current.length},()=>({width:1,height:1})),ie=kn(z,y,!1),ye=ie.findIndex(ge=>ge!=null&&!ze(r,ge,I)),Ie=ie.reduce((ge,be,Ge)=>be!=null&&!ze(r,be,I)?Ge:ge,-1),Re=ie[Fn({current:ie.map(ge=>ge!=null?r.current[ge]:null)},{event:a,orientation:s,loopFocus:b,rtl:u,cols:y,disabledIndices:An([...(typeof I!="function"?I:null)||r.current.map((ge,be)=>ze(r,be,I)?be:void 0),void 0],ie),minIndex:ye,maxIndex:Ie,prevIndex:Nn(f.current>j?g:f.current,z,ie,y,a.key===je?"bl":a.key===(u?Se:we)?"tr":"tl"),stopEvent:!0})];if(Re!=null&&(f.current=Re,F(a)),s==="both")return}if(Ne(a.key,s)){if(he(a),c&&!p&&ut(a.currentTarget.ownerDocument)===a.currentTarget){f.current=Ye(a.key,s,u)?g:j,F(a);return}Ye(a.key,s,u)?b?k>=j?O&&k!==r.current.length?f.current=-1:(P.current=!1,f.current=g):f.current=Fe(r,{startingIndex:k,disabledIndices:I}):f.current=Math.min(j,Fe(r,{startingIndex:k,disabledIndices:I})):b?k<=g?O&&k!==-1?f.current=r.current.length:(P.current=!1,f.current=j):f.current=Fe(r,{startingIndex:k,decrement:!0,disabledIndices:I}):f.current=Math.max(g,Fe(r,{startingIndex:k,decrement:!0,disabledIndices:I})),lt(r,f.current)&&(f.current=-1),F(a)}}),pe=n.useMemo(()=>p&&c&&_&&{"aria-activedescendant":`${S}-${v}`},[p,c,_,S,v]),ce=n.useMemo(()=>({"aria-orientation":s==="both"?void 0:s,...V?{}:pe,onKeyDown(a){if(a.key==="Tab"&&a.shiftKey&&c&&!p){const k=On(a.nativeEvent);if(k&&!ve(B.current,k))return;he(a),o.setOpen(!1,ne(He,a.nativeEvent)),Xe(x)&&x.focus();return}de(a)},onPointerMove(){X.current=!0}}),[pe,de,B,s,V,o,c,p,x]),U=n.useMemo(()=>{function a(g){h==="auto"&&Sn(g.nativeEvent)&&(q.current=!p)}function k(g){q.current=h,h==="auto"&&wn(g.nativeEvent)&&(q.current=!0)}return{onKeyDown(g){const j=o.select("open");X.current=!1;const z=g.key.startsWith("Arrow"),ie=zn(g.key,ae(),u),ye=Ne(g.key,s),Ie=(M?ie:ye)||g.key==="Enter"||g.key.trim()==="";if(p&&j)return de(g);if(!(!j&&!w&&z)){if(Ie){const Re=Ne(g.key,ae());K.current=M&&Re?null:g.key}if(M){ie&&(he(g),j?(f.current=We(r,xe.current),F(g)):o.setOpen(!0,ne(De,g.nativeEvent,g.currentTarget)));return}ye&&(se.current!=null&&(f.current=se.current),he(g),!j&&w?o.setOpen(!0,ne(De,g.nativeEvent,g.currentTarget)):de(g),j&&F(g))}},onFocus(g){o.select("open")&&!p&&(f.current=-1,F(g))},onPointerDown:k,onPointerEnter:k,onMouseDown:a,onClick:a}},[de,xe,h,r,M,F,o,w,s,ae,u,se,p]),Z=n.useMemo(()=>({...pe,...U}),[pe,U]);return n.useMemo(()=>R?{reference:Z,floating:ce,item:A,trigger:U}:{},[R,Z,ce,U,A])}function $n(e,t){const o="rootStore"in e?e.rootStore:e,c=o.context.dataRef,d=o.useState("open"),{listRef:x,activeIndex:T,onMatch:r,onTypingChange:v,enabled:C=!0,resetMs:R=750,selectedIndex:m=null}=t,O=Te(),b=n.useRef(""),M=n.useRef(m??T??-1),u=n.useRef(null);fe(()=>{!d&&m!==null||(O.clear(),u.current=null,b.current!==""&&(b.current=""))},[d,m,O]),fe(()=>{d&&b.current===""&&(M.current=m??T??-1)},[d,m,T]);const p=me(s=>{s?c.current.typing||(c.current.typing=s,v?.(s)):c.current.typing&&(c.current.typing=s,v?.(s))}),h=me(s=>{function i(B,L,N){const V=L.find(q=>q?.toLocaleLowerCase().indexOf(N.toLocaleLowerCase())===0);return V?B.indexOf(V):-1}const y=x.current;if(b.current.length>0&&b.current[0]!==" "&&(i(y,y,b.current)===-1?p(!1):s.key===" "&&he(s)),y==null||s.key.length!==1||s.ctrlKey||s.metaKey||s.altKey)return;d&&s.key!==" "&&(he(s),p(!0));const S=b.current==="";S&&(M.current=m??T??-1),y.every(B=>B?B[0]?.toLocaleLowerCase()!==B[1]?.toLocaleLowerCase():!0)&&b.current===s.key&&(b.current="",M.current=u.current),b.current+=s.key,O.start(R,()=>{b.current="",M.current=u.current,p(!1)});const H=S?m??T??-1:M.current,Y=i(y,[...y.slice((H||0)+1),...y.slice(0,(H||0)+1)],b.current);Y!==-1?(r?.(Y),u.current=Y):s.key!==" "&&(b.current="",p(!1))}),l=me(s=>{const i=s.relatedTarget,y=o.select("domReferenceElement"),S=o.select("floatingElement"),G=ve(y,i),H=ve(S,i);G||H||(O.clear(),b.current="",M.current=u.current,p(!1))}),w=n.useMemo(()=>({onKeyDown:h,onBlur:l}),[h,l]),I=n.useMemo(()=>({onKeyDown:h,onKeyUp(s){s.key===" "&&p(!1)},onBlur:l}),[h,l,p]);return n.useMemo(()=>C?{reference:w,floating:I}:{},[C,w,I])}const It=n.createContext(void 0);function Tt(e){const t=n.useContext(It);if(t===void 0&&!e)throw new Error(Pe(33));return t}const Mt=n.createContext(void 0);function Ce(e){const t=n.useContext(Mt);if(t===void 0&&!e)throw new Error(Pe(36));return t}const Xn=n.createContext(void 0);function _e(e=!0){const t=n.useContext(Xn);if(t===void 0&&!e)throw new Error(Pe(25));return t}function Jn(e){const{closeOnClick:t,highlighted:o,id:c,nodeId:d,store:x,itemRef:T,itemMetadata:r}=e,{events:v}=x.useState("floatingTreeRoot"),C=_e(!0),R=C!==void 0;return n.useMemo(()=>({id:c,role:"menuitem",tabIndex:o?0:-1,onMouseMove(m){d&&v.emit("itemhover",{nodeId:d,target:m.currentTarget})},onClick(m){t&&v.emit("close",{domEvent:m,reason:yt})},onMouseUp(m){if(C){const O=C.initialCursorPointRef.current;if(C.initialCursorPointRef.current=null,R&&O&&Math.abs(m.clientX-O.x)<=1&&Math.abs(m.clientY-O.y)<=1)return}T.current&&x.context.allowMouseUpTriggerRef.current&&(!R||m.button===2)&&(!r||r.type==="regular-item")&&T.current.click()}}),[t,o,c,v,d,x,T,C,R,r])}const Qn={type:"regular-item"};function Zn(e){const{closeOnClick:t,disabled:o=!1,highlighted:c,id:d,store:x,nativeButton:T,itemMetadata:r,nodeId:v}=e,C=n.useRef(null),{getButtonProps:R,buttonRef:m}=Rt({disabled:o,focusableWhenDisabled:!0,native:T}),O=Jn({closeOnClick:t,highlighted:c,id:d,nodeId:v,store:x,itemRef:C,itemMetadata:r}),b=n.useCallback(u=>qe(O,{onMouseEnter(){r.type==="submenu-trigger"&&r.setActive()},onKeyUp(p){p.key===" "&&x.context.typingRef.current&&p.preventBaseUIHandler()}},u,R),[O,R,x,r]),M=At(C,m);return n.useMemo(()=>({getItemProps:b,itemRef:M}),[b,M])}const eo=n.forwardRef(function(t,o){const{render:c,className:d,id:x,label:T,nativeButton:r=!1,disabled:v=!1,closeOnClick:C=!0,...R}=t,m=Dn({label:T}),O=Tt(!0),b=bt(x),{store:M}=Ce(),u=M.useState("isActive",m.index),p=M.useState("itemProps"),{getItemProps:h,itemRef:l}=Zn({closeOnClick:C,disabled:v,highlighted:u,id:b,store:M,nativeButton:r,nodeId:O?.nodeId,itemMetadata:Qn});return Oe("div",t,{state:{disabled:v,highlighted:u},props:[p,R,h],ref:[l,o,m.ref]})}),to=n.createContext(void 0);function no(e){return n.useContext(to)}const oo={...pt,...Kt},ro=n.forwardRef(function(t,o){const{render:c,className:d,finalFocus:x,...T}=t,{store:r}=Ce(),{side:v,align:C}=Tt(),R=no()!=null,m=r.useState("open"),O=r.useState("transitionStatus"),b=r.useState("popupProps"),M=r.useState("mounted"),u=r.useState("instantType"),p=r.useState("activeTriggerElement"),h=r.useState("parent"),l=r.useState("lastOpenChangeReason"),w=r.useState("rootId"),I=r.useState("floatingRootContext"),s=r.useState("floatingTreeRoot"),i=r.useState("closeDelay"),y=r.useState("activeTriggerElement"),S=h.type==="context-menu";Ht({open:m,ref:r.context.popupRef,onComplete(){m&&r.context.onOpenChangeComplete?.(!0)}}),n.useEffect(()=>{function N(V){r.setOpen(!1,ne(V.reason,V.domEvent))}return s.events.on("close",N),()=>{s.events.off("close",N)}},[s.events,r]);const G=r.useState("hoverEnabled"),H=r.useState("disabled");Kn(I,{enabled:G&&!H&&!S&&h.type!=="menubar",closeDelay:i});const Y={transitionStatus:O,side:v,align:C,open:m,nested:h.type==="menu",instant:u},B=Oe("div",t,{state:Y,ref:[o,r.context.popupRef],stateAttributesMapping:oo,props:[b,{onKeyDown(N){R&&Gn.has(N.key)&&N.stopPropagation()}},Ct(O),T,{"data-rootownerid":w}]});let L=h.type===void 0||S;return(p||h.type==="menubar"&&l!==un)&&(L=!0),W.jsx(hn,{context:I,modal:S,disabled:!M,returnFocus:x===void 0?L:x,initialFocus:h.type!=="menu",restoreFocus:!0,externalTree:h.type!=="menubar"?s:void 0,previousFocusableElement:y,nextFocusableElement:h.type===void 0?r.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:h.type===void 0?r.context.beforeContentFocusGuardRef:void 0,children:B})}),Et=n.createContext(void 0);function so(){const e=n.useContext(Et);if(e===void 0)throw new Error(Pe(32));return e}const io=n.forwardRef(function(t,o){const{keepMounted:c=!1,...d}=t,{store:x}=Ce();return x.useState("mounted")||c?W.jsx(Et.Provider,{value:c,children:W.jsx(Ut,{ref:o,...d})}):null}),ao=n.forwardRef(function(t,o){const{anchor:c,positionMethod:d="absolute",className:x,render:T,side:r,align:v,sideOffset:C=0,alignOffset:R=0,collisionBoundary:m="clipping-ancestors",collisionPadding:O=5,arrowPadding:b=5,sticky:M=!1,disableAnchorTracking:u=!1,collisionAvoidance:p=jt,...h}=t,{store:l}=Ce(),w=so(),I=_e(!0),s=l.useState("parent"),i=l.useState("floatingRootContext"),y=l.useState("floatingTreeRoot"),S=l.useState("mounted"),G=l.useState("open"),H=l.useState("modal"),Y=l.useState("activeTriggerElement"),B=l.useState("transitionStatus"),L=l.useState("lastOpenChangeReason"),N=l.useState("floatingNodeId"),V=l.useState("floatingParentNodeId");let q=c,f=C,K=R,X=v,F=p;s.type==="context-menu"&&(q=c??s.context?.anchor,X=X??"start",!r&&X!=="center"&&(K=t.alignOffset??2,f=t.sideOffset??-5));let J=r,Q=X;s.type==="menu"?(J=J??"inline-end",Q=Q??"start",F=t.collisionAvoidance??Bt):s.type==="menubar"&&(J=J??"bottom",Q=Q??"start");const oe=s.type==="context-menu",P=Un({anchor:q,floatingRootContext:i,positionMethod:I?"fixed":d,mounted:S,side:J,sideOffset:f,align:Q,alignOffset:K,arrowPadding:oe?0:b,collisionBoundary:m,collisionPadding:O,sticky:M,nodeId:N,keepMounted:w,disableAnchorTracking:u,collisionAvoidance:F,shiftCrossAxis:oe&&!("side"in F&&F.side==="flip"),externalTree:y}),re=n.useMemo(()=>{const _={};return G||(_.pointerEvents="none"),{role:"presentation",hidden:!S,style:{...P.positionerStyles,..._}}},[G,S,P.positionerStyles]);n.useEffect(()=>{function _(A){A.open&&(A.parentNodeId===N&&l.set("hoverEnabled",!1),A.nodeId!==N&&A.parentNodeId===l.select("floatingParentNodeId")&&l.setOpen(!1,ne(Le)))}return y.events.on("menuopenchange",_),()=>{y.events.off("menuopenchange",_)}},[l,y.events,N]),n.useEffect(()=>{if(l.select("floatingParentNodeId")==null)return;function _(A){if(A.open||A.nodeId!==l.select("floatingParentNodeId"))return;const ae=A.reason??Le;l.setOpen(!1,ne(ae))}return y.events.on("menuopenchange",_),()=>{y.events.off("menuopenchange",_)}},[y.events,l]),n.useEffect(()=>{function _(A){!G||A.nodeId!==l.select("floatingParentNodeId")||A.target&&Y&&Y!==A.target&&l.setOpen(!1,ne(Le))}return y.events.on("itemhover",_),()=>{y.events.off("itemhover",_)}},[y.events,G,Y,l]),n.useEffect(()=>{const _={open:G,nodeId:N,parentNodeId:V,reason:l.select("lastOpenChangeReason")};y.events.emit("menuopenchange",_)},[y.events,G,l,N,V]);const xe={open:G,side:P.side,align:P.align,anchorHidden:P.anchorHidden,nested:s.type==="menu"},ue=n.useMemo(()=>({side:P.side,align:P.align,arrowRef:P.arrowRef,arrowUncentered:P.arrowUncentered,arrowStyles:P.arrowStyles,nodeId:P.context.nodeId}),[P.side,P.align,P.arrowRef,P.arrowUncentered,P.arrowStyles,P.context.nodeId]),se=Oe("div",t,{state:xe,stateAttributesMapping:pt,ref:[o,l.useStateSetter("positionerElement")],props:[re,Ct(B),h]}),le=S&&s.type!=="menu"&&(s.type!=="menubar"&&H&&L!==Ke||s.type==="menubar"&&s.context.modal);let ee=null;return s.type==="menubar"?ee=s.context.contentElement:s.type===void 0&&(ee=Y),W.jsxs(It.Provider,{value:ue,children:[le&&W.jsx(yn,{ref:s.type==="context-menu"||s.type==="nested-context-menu"?s.context.internalBackdropRef:null,inert:Rn(!G),cutout:ee}),W.jsx(_t,{id:N,children:W.jsx(Ln,{elementsRef:l.context.itemDomElements,labelsRef:l.context.itemLabels,children:se})})]})}),co=n.createContext(null);function Pt(e){return n.useContext(co)}const uo={...Wt,disabled:$(e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled),modal:$(e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0)),allowMouseEnter:$(e=>e.allowMouseEnter),stickIfOpen:$(e=>e.stickIfOpen),parent:$(e=>e.parent),rootId:$(e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId),activeIndex:$(e=>e.activeIndex),isActive:$((e,t)=>e.activeIndex===t),hoverEnabled:$(e=>e.hoverEnabled),instantType:$(e=>e.instantType),lastOpenChangeReason:$(e=>e.openChangeReason),floatingTreeRoot:$(e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:$(e=>e.floatingNodeId),floatingParentNodeId:$(e=>e.floatingParentNodeId),itemProps:$(e=>e.itemProps),closeDelay:$(e=>e.closeDelay),keyboardEventRelay:$(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")})};class Ze extends Gt{constructor(t){super({...lo(),...t},{positionerRef:n.createRef(),popupRef:n.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:n.createRef(),beforeContentFocusGuardRef:n.createRef(),onOpenChangeComplete:void 0,triggerElements:new Vt},uo),this.unsubscribeParentListener=this.observe("parent",o=>{if(this.unsubscribeParentListener?.(),o.type==="menu"){this.unsubscribeParentListener=o.store.subscribe(()=>{this.notifyAll()}),this.context.allowMouseUpTriggerRef=o.store.context.allowMouseUpTriggerRef;return}o.type!==void 0&&(this.context.allowMouseUpTriggerRef=o.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(t,o){this.state.floatingRootContext.context.events.emit("setOpen",{open:t,eventDetails:o})}static useStore(t,o){const c=Dt(()=>new Ze(o)).current;return t??c}unsubscribeParentListener=null}function lo(){return{...zt(),disabled:!1,modal:!0,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new gt,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Ee,keyboardEventRelay:void 0,closeDelay:0}}const fo=n.createContext(void 0);function po(){return n.useContext(fo)}const go=Yt(function(t){const{children:o,open:c,onOpenChange:d,onOpenChangeComplete:x,defaultOpen:T=!1,disabled:r=!1,modal:v,loopFocus:C=!0,orientation:R="vertical",actionsRef:m,closeParentOnEsc:O=!1,handle:b,triggerId:M,defaultTriggerId:u=null,highlightItemOnHover:p=!0}=t,h=_e(!0),l=Ce(!0),w=Pt(!0),I=po(),s=n.useMemo(()=>I&&l?{type:"menu",store:l.store}:w?{type:"menubar",context:w}:h&&!l?{type:"context-menu",context:h}:{type:void 0},[h,l,w,I]),i=Ze.useStore(b?.store,{open:T,openProp:c,activeTriggerId:u,triggerIdProp:M,parent:s});qt(()=>{c===void 0&&i.state.open===!1&&T===!0&&i.update({open:!0,activeTriggerId:u})}),i.useControlledProp("openProp",c),i.useControlledProp("triggerIdProp",M),i.useContextCallback("onOpenChangeComplete",x);const y=i.useState("floatingTreeRoot"),S=mt(y),G=Qe();fe(()=>{h&&!l?i.update({parent:{type:"context-menu",context:h},floatingNodeId:S,floatingParentNodeId:G}):l&&i.update({floatingNodeId:S,floatingParentNodeId:G})},[h,l,S,G,i]);const H=i.useState("open"),Y=i.useState("activeTriggerElement"),B=i.useState("positionerElement"),L=i.useState("hoverEnabled"),N=i.useState("modal"),V=i.useState("disabled"),q=i.useState("lastOpenChangeReason"),f=i.useState("parent"),K=i.useState("activeIndex"),X=i.useState("payload"),F=i.useState("floatingParentNodeId"),J=n.useRef(null),Q=F!=null;let oe;i.useSyncedValues({disabled:r,modal:f.type===void 0?v:void 0,rootId:ln()});const{openMethod:P,triggerProps:re,reset:xe}=bn(H);$t(i);const{forceUnmount:ue}=Xt(H,i,()=>{i.update({allowMouseEnter:!1,stickIfOpen:!0}),xe()}),se=n.useRef(f.type!=="context-menu"),le=Te();n.useEffect(()=>{if(H||(J.current=null),f.type==="context-menu"){if(!H){le.clear(),se.current=!1;return}le.start(500,()=>{se.current=!0})}},[le,H,f.type]),vn(H&&N&&q!==Ke&&P!=="touch",B),fe(()=>{!H&&!L&&i.set("hoverEnabled",!0)},[H,L,i]);const ee=n.useRef(!0),_=Te(),A=me((E,D)=>{const te=D.reason;if(H===E&&D.trigger===Y&&q===te||(D.preventUnmountOnClose=()=>{i.set("preventUnmountingOnClose",!0)},!E&&D.trigger==null&&(D.trigger=Y??void 0),d?.(E,D),D.isCanceled))return;const kt={open:E,nativeEvent:D.event,reason:D.reason,nested:Q};oe?.emit("openchange",kt);const ke=D.event;if(E===!1&&ke?.type==="click"&&ke.pointerType==="touch"&&!ee.current)return;if(!E&&K!==null){const Nt=i.context.itemDomElements.current[K];queueMicrotask(()=>{Nt?.setAttribute("tabindex","-1")})}E&&te===it?(ee.current=!1,_.start(300,()=>{ee.current=!0})):(ee.current=!0,_.clear());const tt=(te===ht||te===yt)&&ke.detail===0&&ke?.isTrusted,Ft=!E&&(te===fn||te==null),Ve={open:E,openChangeReason:te};J.current=D.event??null;const nt=D.trigger?.id??null;(nt||E)&&(Ve.activeTriggerId=nt,Ve.activeTriggerElement=D.trigger??null),i.update(Ve),f.type==="menubar"&&(te===it||te===He||te===Ke||te===De||te===Le)?i.set("instantType","group"):tt||Ft?i.set("instantType",tt?"click":"dismiss"):i.set("instantType",void 0)}),ae=n.useCallback(E=>{const D=ne(E);return D.preventUnmountOnClose=()=>{i.set("preventUnmountingOnClose",!0)},D},[i]),de=n.useCallback(()=>{i.setOpen(!1,ae(dn))},[i,ae]);n.useImperativeHandle(m,()=>({unmount:ue,close:de}),[ue,de]);let pe;f.type==="context-menu"&&(pe=f.context),n.useImperativeHandle(pe?.positionerRef,()=>B,[B]),n.useImperativeHandle(pe?.actionsRef,()=>({setOpen:A}),[A]);const ce=Jt({popupStore:i,onOpenChange:A});oe=ce.context.events,n.useEffect(()=>{const E=({open:D,eventDetails:te})=>A(D,te);return oe.on("setOpen",E),()=>{oe?.off("setOpen",E)}},[oe,A]);const U=Qt(ce,{enabled:!V,bubbles:{escapeKey:O&&f.type==="menu"},outsidePress(){return f.type!=="context-menu"||J.current?.type==="contextmenu"?!0:se.current},externalTree:Q?y:void 0}),Z=Cn(ce,{role:"menu"}),a=In(),k=n.useCallback(E=>{i.select("activeIndex")!==E&&i.set("activeIndex",E)},[i]),g=qn(ce,{enabled:!V,listRef:i.context.itemDomElements,activeIndex:K,nested:f.type!==void 0,loopFocus:C,orientation:R,parentOrientation:f.type==="menubar"?f.context.orientation:void 0,rtl:a==="rtl",disabledIndices:$e,onNavigate:k,openOnArrowKeyDown:f.type!=="context-menu",externalTree:Q?y:void 0,focusItemOnHover:p}),j=n.useCallback(E=>{i.context.typingRef.current=E},[i]),z=$n(ce,{listRef:i.context.itemLabels,activeIndex:K,resetMs:Zt,onMatch:E=>{H&&E!==K&&i.set("activeIndex",E)},onTypingChange:j}),{getReferenceProps:ie,getFloatingProps:ye,getItemProps:Ie,getTriggerProps:Re}=xt([U,Z,g,z]),ge=n.useMemo(()=>{const E=qe(ie(),{onMouseMove(){i.set("allowMouseEnter",!0)}},re);return delete E.role,E},[ie,i,re]),be=n.useMemo(()=>{const E=Re();if(!E)return E;const D=qe(E,re);return delete D.role,delete D["aria-controls"],D},[Re,re]),Ge=n.useMemo(()=>ye({onMouseMove(){i.set("allowMouseEnter",!0),f.type==="menu"&&i.set("hoverEnabled",!1)},onClick(){i.select("hoverEnabled")&&i.set("hoverEnabled",!1)},onKeyDown(E){const D=i.select("keyboardEventRelay");D&&!E.isPropagationStopped()&&D(E)}}),[ye,f.type,i]),St=n.useMemo(()=>Ie(),[Ie]);i.useSyncedValues({floatingRootContext:ce,activeTriggerProps:ge,inactiveTriggerProps:be,popupProps:Ge,itemProps:St});const wt=n.useMemo(()=>({store:i,parent:s}),[i,s]),et=W.jsx(Mt.Provider,{value:wt,children:typeof o=="function"?o({payload:X}):o});return f.type===void 0||f.type==="context-menu"?W.jsx(en,{externalTree:y,children:et}):et});function mo(e){const t=e.getBoundingClientRect(),o=window.getComputedStyle(e,"::before"),c=window.getComputedStyle(e,"::after");if(!(o.content!=="none"||c.content!=="none"))return t;const x=parseFloat(o.width)||0,T=parseFloat(o.height)||0,r=parseFloat(c.width)||0,v=parseFloat(c.height)||0,C=Math.max(t.width,x,r),R=Math.max(t.height,T,v),m=C-t.width,O=R-t.height;return{left:t.left-m/2,right:t.right+m/2,top:t.top-O/2,bottom:t.bottom+O/2}}function xo(e){const{render:t,className:o,state:c=Ee,props:d=$e,refs:x=$e,metadata:T,stateAttributesMapping:r,tag:v="div",...C}=e,{compositeProps:R,compositeRef:m}=Hn({metadata:T});return Oe(v,e,{state:c,ref:[...x,m],props:[R,...d,C],stateAttributesMapping:r})}function Ot(e){if(Xe(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid")??void 0;if(!pn(e))return Ot(gn(e))}function ho(e){const{enabled:t=!0,mouseDownAction:o,open:c}=e,d=n.useRef(!1);return n.useMemo(()=>t?{onMouseDown:x=>{(o==="open"&&!c||o==="close"&&c)&&(d.current=!0,Ue(x.currentTarget).addEventListener("click",()=>{d.current=!1},{once:!0}))},onClick:x=>{d.current&&(d.current=!1,x.preventBaseUIHandler())}}:Ee,[t,o,c])}const Ae=2,yo=tn(function(t,o){const{render:c,className:d,disabled:x=!1,nativeButton:T=!0,id:r,openOnHover:v,delay:C=100,closeDelay:R=0,handle:m,payload:O,...b}=t,M=Ce(!0),u=m?.store??M?.store;if(!u)throw new Error(Pe(85));const p=bt(r),h=u.useState("isTriggerActive",p),l=u.useState("floatingRootContext"),w=u.useState("isOpenedByTrigger",p),I=n.useRef(null),s=bo(),i=mn(!0),y=dt(),S=n.useMemo(()=>y??new gt,[y]),G=mt(S),H=Qe(),{registerTrigger:Y,isMountedByThisTrigger:B}=nn(p,I,u,{payload:O,closeDelay:R,parent:s,floatingTreeRoot:S,floatingNodeId:G,floatingParentNodeId:H,keyboardEventRelay:i?.relayKeyboardEvent}),L=s.type==="menubar",N=u.useState("disabled"),V=x||N||L&&s.context.disabled,{getButtonProps:q,buttonRef:f}=Rt({disabled:V,native:T});n.useEffect(()=>{!w&&s.type===void 0&&(u.context.allowMouseUpTriggerRef.current=!1)},[u,w,s.type]);const K=n.useRef(null),X=Te(),F=me(U=>{if(!K.current)return;X.clear(),u.context.allowMouseUpTriggerRef.current=!1;const Z=U.target;if(ve(K.current,Z)||ve(u.select("positionerElement"),Z)||Z===K.current||Z!=null&&Ot(Z)===u.select("rootId"))return;const a=mo(K.current);U.clientX>=a.left-Ae&&U.clientX<=a.right+Ae&&U.clientY>=a.top-Ae&&U.clientY<=a.bottom+Ae||S.events.emit("close",{domEvent:U,reason:xn})});n.useEffect(()=>{w&&u.select("lastOpenChangeReason")===Ke&&Ue(K.current).addEventListener("mouseup",F,{once:!0})},[w,F,u]);const J=L&&s.context.hasSubmenuOpen,oe=jn(l,{enabled:(v??J)&&!V&&s.type!=="context-menu"&&(!L||J&&!B),handleClose:Bn({blockPointerEvents:!L}),mouseOnly:!0,move:!1,restMs:s.type===void 0?C:void 0,delay:{close:R},triggerElementRef:I,externalTree:S,isActiveTrigger:h}),P=Ro(w,u.select("lastOpenChangeReason")),re=Vn(l,{enabled:!V&&s.type!=="context-menu",event:w&&L?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:s.type===void 0?P:!1}),xe=_n(l,{enabled:!V&&J}),ue=ho({open:w,enabled:L,mouseDownAction:"open"}),se=xt([re,xe]),le={disabled:V,open:w},ee=u.useState("triggerProps",B),_=[K,o,f,Y,I],A=[se.getReferenceProps(),oe??Ee,ee,{"aria-haspopup":"menu",id:p,onMouseDown:U=>{if(u.select("open"))return;X.start(200,()=>{u.context.allowMouseUpTriggerRef.current=!0}),Ue(U.currentTarget).addEventListener("mouseup",F,{once:!0})}},L?{role:"menuitem"}:{},ue,b,q],ae=n.useRef(null),de=me(U=>{ot.flushSync(()=>{u.setOpen(!1,ne(He,U.nativeEvent,U.currentTarget))}),on(ae.current)?.focus()}),pe=me(U=>{const Z=u.select("positionerElement");if(Z&&rn(U,Z))u.context.beforeContentFocusGuardRef.current?.focus();else{ot.flushSync(()=>{u.setOpen(!1,ne(He,U.nativeEvent,U.currentTarget))});let a=sn(u.context.triggerFocusTargetRef.current||I.current);for(;a!==null&&ve(Z,a);){const k=a;if(a=an(a),a===k)break}a?.focus()}}),ce=Oe("button",t,{enabled:!L,stateAttributesMapping:rt,state:le,ref:_,props:A});return L?W.jsx(xo,{tag:"button",render:c,className:d,state:le,refs:_,props:A,stateAttributesMapping:rt}):w?W.jsxs(n.Fragment,{children:[W.jsx(st,{ref:ae,onFocus:de},`${p}-pre-focus-guard`),W.jsx(n.Fragment,{children:ce},p),W.jsx(st,{ref:u.context.triggerFocusTargetRef,onFocus:pe},`${p}-post-focus-guard`)]}):W.jsx(n.Fragment,{children:ce},p)});function Ro(e,t){const o=Te(),[c,d]=n.useState(!1);return fe(()=>{e&&t==="trigger-hover"?(d(!0),o.start(cn,()=>{d(!1)})):e||(o.clear(),d(!1))},[e,t,o]),c}function bo(){const e=_e(!0),t=Ce(!0),o=Pt();return n.useMemo(()=>o?{type:"menubar",context:o}:e&&!t?{type:"context-menu",context:e}:{type:void 0},[e,t,o])}function ko({children:e,...t}){return W.jsx(go,{...t,children:e})}function Fo({className:e,...t}){return W.jsx(yo,{className:Je(e),...t})}function No({className:e,side:t="bottom",align:o="end",children:c}){return W.jsx(io,{children:W.jsx(ao,{side:t,align:o,children:W.jsx(ro,{className:Je("min-w-[110px] rounded-lg bg-primary-50 p-1 text-sm text-primary-900 shadow-lg outline outline-primary-900/10",e),children:c})})})}function Ao({className:e,...t}){return W.jsx(eo,{className:Je("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm text-primary-900 hover:bg-primary-100 data-highlighted:bg-primary-100","select-none font-[450]",e),...t})}export{ko as M,Fo as a,No as b,Ao as c};
1
+ import{r as n,j as W,w as ot}from"./main-CbISK-pm.js";import{a9 as Ee,aa as Pe,ab as qe,t as At,ae as Oe,u as Dt,af as $e,c as Je}from"./button-Bv-7bwZZ.js";import{u as Lt,a as Te,b as Me,c as Qe,d as dt,e as Ht,p as pt,t as Kt,F as Ut,D as jt,P as Bt,f as _t,R as Gt,g as Vt,h as Wt,i as gt,j as zt,k as $,l as Yt,m as qt,n as mt,o as $t,q as Xt,r as Jt,s as Qt,T as Zt,v as xt,w as en,x as tn,y as nn,z as on,A as rn,B as sn,C as an,E as rt,G as st,H as cn}from"./useOnFirstRender-DpB3w0o4.js";import{t as ht,g as ne,u as fe,a as me,l as De,i as Xe,j as He,k as yt,f as Rt,e as bt,o as un,m as Ke,s as Le,p as ln,q as it,r as fn,v as dn,w as pn,x as gn,b as mn,y as xn}from"./useBaseUiId-BdQC9KF3.js";import{e as at,F as hn,I as yn,i as Rn,f as bn,g as vn,h as Cn}from"./use-file-explorer-state-Dwhw6Mpg.js";import{u as In}from"./DirectionContext-BOL0P_1j.js";import{i as ct,f as Tn,g as Mn,h as En,j as Pn,d as ut,o as Ue,e as ve,s as he,a as je,b as Se,c as we,k as On,l as Sn,m as wn,A as vt}from"./event-Cnr9OETn.js";import{h as lt,g as We,a as ft,c as kn,i as ze,b as Fn,d as Nn,e as An,f as Fe,j as Dn,C as Ln,u as Hn}from"./useCompositeItem-BI09zNFD.js";import{u as Kn,e as Ct,f as Un,h as jn,i as Bn,j as _n}from"./tooltip-DzFgDY86.js";import{C as Gn}from"./composite-DwQIZFe9.js";function Vn(e,t={}){const o="rootStore"in e?e.rootStore:e,c=o.context.dataRef,{enabled:d=!0,event:x="click",toggle:T=!0,ignoreMouse:r=!1,stickIfOpen:v=!0,touchOpenDelay:C=0,reason:R=ht}=t,m=n.useRef(void 0),O=Lt(),b=Te(),M=n.useMemo(()=>({onPointerDown(u){m.current=u.pointerType},onMouseDown(u){const p=m.current,h=u.nativeEvent,l=o.select("open");if(u.button!==0||x==="click"||ct(p,!0)&&r)return;const w=c.current.openEvent,I=w?.type,s=o.select("domReferenceElement")!==u.currentTarget,i=l&&s||!(l&&T&&(!(w&&v)||I==="click"||I==="mousedown"));if(Mn(h.target)){const S=ne(R,h,h.target);i&&p==="touch"&&C>0?b.start(C,()=>{o.setOpen(!0,S)}):o.setOpen(i,S);return}const y=u.currentTarget;O.request(()=>{const S=ne(R,h,y);i&&p==="touch"&&C>0?b.start(C,()=>{o.setOpen(!0,S)}):o.setOpen(i,S)})},onClick(u){if(x==="mousedown-only")return;const p=m.current;if(x==="mousedown"&&p){m.current=void 0;return}if(ct(p,!0)&&r)return;const h=o.select("open"),l=c.current.openEvent,w=o.select("domReferenceElement")!==u.currentTarget,I=h&&w||!(h&&T&&(!(l&&v)||Tn(l))),s=ne(R,u.nativeEvent,u.currentTarget);I&&p==="touch"&&C>0?b.start(C,()=>{o.setOpen(!0,s)}):o.setOpen(I,s)},onKeyDown(){m.current=void 0}}),[c,x,r,o,v,T,O,b,C,R]);return n.useMemo(()=>d?{reference:M}:Ee,[d,M])}const Wn="Escape";function Be(e,t,o){switch(e){case"vertical":return t;case"horizontal":return o;default:return t||o}}function Ne(e,t){return Be(t,e===vt||e===je,e===Se||e===we)}function Ye(e,t,o){return Be(t,e===je,o?e===Se:e===we)||e==="Enter"||e===" "||e===""}function zn(e,t,o){return Be(t,o?e===Se:e===we,e===je)}function Yn(e,t,o,c){const d=o?e===we:e===Se,x=e===vt;return t==="both"||t==="horizontal"&&c&&c>1?e===Wn:Be(t,d,x)}function qn(e,t){const o="rootStore"in e?e.rootStore:e,c=o.useState("open"),d=o.useState("floatingElement"),x=o.useState("domReferenceElement"),T=o.context.dataRef,{listRef:r,activeIndex:v,onNavigate:C=()=>{},enabled:R=!0,selectedIndex:m=null,allowEscape:O=!1,loopFocus:b=!1,nested:M=!1,rtl:u=!1,virtual:p=!1,focusItemOnOpen:h="auto",focusItemOnHover:l=!0,openOnArrowKeyDown:w=!0,disabledIndices:I=void 0,orientation:s="vertical",parentOrientation:i,cols:y=1,id:S,resetOnPointerLeave:G=!0,externalTree:H}=t,Y=En(d),B=Me(Y),L=Qe(),N=dt(H);fe(()=>{T.current.orientation=s},[T,s]);const V=Pn(x),q=n.useRef(h),f=n.useRef(m??-1),K=n.useRef(null),X=n.useRef(!0),F=me(a=>{C(f.current===-1?null:f.current,a)}),J=n.useRef(F),Q=n.useRef(!!d),oe=n.useRef(c),P=n.useRef(!1),re=n.useRef(!1),xe=Me(I),ue=Me(c),se=Me(m),le=Me(G),ee=me(()=>{function a(z){p?N?.events.emit("virtualfocus",z):at(z,{sync:P.current,preventScroll:!0})}const k=r.current[f.current],g=re.current;k&&a(k),(P.current?z=>z():requestAnimationFrame)(()=>{const z=r.current[f.current]||k;if(!z)return;k||a(z),A&&(g||!X.current)&&z.scrollIntoView?.({block:"nearest",inline:"nearest"})})});fe(()=>{R&&(c&&d?(f.current=m??-1,q.current&&m!=null&&(re.current=!0,F())):Q.current&&(f.current=-1,J.current()))},[R,c,d,m,F]),fe(()=>{if(R){if(!c){P.current=!1;return}if(d)if(v==null){if(P.current=!1,se.current!=null)return;if(Q.current&&(f.current=-1,ee()),(!oe.current||!Q.current)&&q.current&&(K.current!=null||q.current===!0&&K.current==null)){let a=0;const k=()=>{r.current[0]==null?(a<2&&(a?requestAnimationFrame:queueMicrotask)(k),a+=1):(f.current=K.current==null||Ye(K.current,s,u)||M?We(r):ft(r),K.current=null,F())};k()}}else lt(r,v)||(f.current=v,ee(),re.current=!1)}},[R,c,d,v,se,M,r,s,u,F,ee,xe]),fe(()=>{if(!R||d||!N||p||!Q.current)return;const a=N.nodesRef.current,k=a.find(z=>z.id===L)?.context?.elements.floating,g=ut(Ue(d)),j=a.some(z=>z.context&&ve(z.context.elements.floating,g));k&&!j&&X.current&&k.focus({preventScroll:!0})},[R,d,N,L,p]),fe(()=>{J.current=F,oe.current=c,Q.current=!!d}),fe(()=>{c||(K.current=null,q.current=h)},[c,h]);const _=v!=null,A=n.useMemo(()=>{function a(g){if(!ue.current)return;const j=r.current.indexOf(g.currentTarget);j!==-1&&f.current!==j&&(f.current=j,F(g))}return{onFocus(g){P.current=!0,a(g)},onClick:({currentTarget:g})=>g.focus({preventScroll:!0}),onMouseMove(g){P.current=!0,re.current=!1,l&&a(g)},onPointerLeave(g){if(!ue.current||!X.current||g.pointerType==="touch")return;P.current=!0;const j=g.relatedTarget;!l||r.current.includes(j)||le.current&&(at(null,{sync:!0}),f.current=-1,F(g),p||B.current?.focus({preventScroll:!0}))}}},[ue,B,l,r,F,le,p]),ae=n.useCallback(()=>i??N?.nodesRef.current.find(a=>a.id===L)?.context?.dataRef?.current.orientation,[L,N,i]),de=me(a=>{if(X.current=!1,P.current=!0,a.which===229||!ue.current&&a.currentTarget===B.current)return;if(M&&Yn(a.key,s,u,y)){Ne(a.key,ae())||he(a),o.setOpen(!1,ne(De,a.nativeEvent)),Xe(x)&&(p?N?.events.emit("virtualfocus",x):x.focus());return}const k=f.current,g=We(r,I),j=ft(r,I);if(V||(a.key==="Home"&&(he(a),f.current=g,F(a)),a.key==="End"&&(he(a),f.current=j,F(a))),y>1){const z=Array.from({length:r.current.length},()=>({width:1,height:1})),ie=kn(z,y,!1),ye=ie.findIndex(ge=>ge!=null&&!ze(r,ge,I)),Ie=ie.reduce((ge,be,Ge)=>be!=null&&!ze(r,be,I)?Ge:ge,-1),Re=ie[Fn({current:ie.map(ge=>ge!=null?r.current[ge]:null)},{event:a,orientation:s,loopFocus:b,rtl:u,cols:y,disabledIndices:An([...(typeof I!="function"?I:null)||r.current.map((ge,be)=>ze(r,be,I)?be:void 0),void 0],ie),minIndex:ye,maxIndex:Ie,prevIndex:Nn(f.current>j?g:f.current,z,ie,y,a.key===je?"bl":a.key===(u?Se:we)?"tr":"tl"),stopEvent:!0})];if(Re!=null&&(f.current=Re,F(a)),s==="both")return}if(Ne(a.key,s)){if(he(a),c&&!p&&ut(a.currentTarget.ownerDocument)===a.currentTarget){f.current=Ye(a.key,s,u)?g:j,F(a);return}Ye(a.key,s,u)?b?k>=j?O&&k!==r.current.length?f.current=-1:(P.current=!1,f.current=g):f.current=Fe(r,{startingIndex:k,disabledIndices:I}):f.current=Math.min(j,Fe(r,{startingIndex:k,disabledIndices:I})):b?k<=g?O&&k!==-1?f.current=r.current.length:(P.current=!1,f.current=j):f.current=Fe(r,{startingIndex:k,decrement:!0,disabledIndices:I}):f.current=Math.max(g,Fe(r,{startingIndex:k,decrement:!0,disabledIndices:I})),lt(r,f.current)&&(f.current=-1),F(a)}}),pe=n.useMemo(()=>p&&c&&_&&{"aria-activedescendant":`${S}-${v}`},[p,c,_,S,v]),ce=n.useMemo(()=>({"aria-orientation":s==="both"?void 0:s,...V?{}:pe,onKeyDown(a){if(a.key==="Tab"&&a.shiftKey&&c&&!p){const k=On(a.nativeEvent);if(k&&!ve(B.current,k))return;he(a),o.setOpen(!1,ne(He,a.nativeEvent)),Xe(x)&&x.focus();return}de(a)},onPointerMove(){X.current=!0}}),[pe,de,B,s,V,o,c,p,x]),U=n.useMemo(()=>{function a(g){h==="auto"&&Sn(g.nativeEvent)&&(q.current=!p)}function k(g){q.current=h,h==="auto"&&wn(g.nativeEvent)&&(q.current=!0)}return{onKeyDown(g){const j=o.select("open");X.current=!1;const z=g.key.startsWith("Arrow"),ie=zn(g.key,ae(),u),ye=Ne(g.key,s),Ie=(M?ie:ye)||g.key==="Enter"||g.key.trim()==="";if(p&&j)return de(g);if(!(!j&&!w&&z)){if(Ie){const Re=Ne(g.key,ae());K.current=M&&Re?null:g.key}if(M){ie&&(he(g),j?(f.current=We(r,xe.current),F(g)):o.setOpen(!0,ne(De,g.nativeEvent,g.currentTarget)));return}ye&&(se.current!=null&&(f.current=se.current),he(g),!j&&w?o.setOpen(!0,ne(De,g.nativeEvent,g.currentTarget)):de(g),j&&F(g))}},onFocus(g){o.select("open")&&!p&&(f.current=-1,F(g))},onPointerDown:k,onPointerEnter:k,onMouseDown:a,onClick:a}},[de,xe,h,r,M,F,o,w,s,ae,u,se,p]),Z=n.useMemo(()=>({...pe,...U}),[pe,U]);return n.useMemo(()=>R?{reference:Z,floating:ce,item:A,trigger:U}:{},[R,Z,ce,U,A])}function $n(e,t){const o="rootStore"in e?e.rootStore:e,c=o.context.dataRef,d=o.useState("open"),{listRef:x,activeIndex:T,onMatch:r,onTypingChange:v,enabled:C=!0,resetMs:R=750,selectedIndex:m=null}=t,O=Te(),b=n.useRef(""),M=n.useRef(m??T??-1),u=n.useRef(null);fe(()=>{!d&&m!==null||(O.clear(),u.current=null,b.current!==""&&(b.current=""))},[d,m,O]),fe(()=>{d&&b.current===""&&(M.current=m??T??-1)},[d,m,T]);const p=me(s=>{s?c.current.typing||(c.current.typing=s,v?.(s)):c.current.typing&&(c.current.typing=s,v?.(s))}),h=me(s=>{function i(B,L,N){const V=L.find(q=>q?.toLocaleLowerCase().indexOf(N.toLocaleLowerCase())===0);return V?B.indexOf(V):-1}const y=x.current;if(b.current.length>0&&b.current[0]!==" "&&(i(y,y,b.current)===-1?p(!1):s.key===" "&&he(s)),y==null||s.key.length!==1||s.ctrlKey||s.metaKey||s.altKey)return;d&&s.key!==" "&&(he(s),p(!0));const S=b.current==="";S&&(M.current=m??T??-1),y.every(B=>B?B[0]?.toLocaleLowerCase()!==B[1]?.toLocaleLowerCase():!0)&&b.current===s.key&&(b.current="",M.current=u.current),b.current+=s.key,O.start(R,()=>{b.current="",M.current=u.current,p(!1)});const H=S?m??T??-1:M.current,Y=i(y,[...y.slice((H||0)+1),...y.slice(0,(H||0)+1)],b.current);Y!==-1?(r?.(Y),u.current=Y):s.key!==" "&&(b.current="",p(!1))}),l=me(s=>{const i=s.relatedTarget,y=o.select("domReferenceElement"),S=o.select("floatingElement"),G=ve(y,i),H=ve(S,i);G||H||(O.clear(),b.current="",M.current=u.current,p(!1))}),w=n.useMemo(()=>({onKeyDown:h,onBlur:l}),[h,l]),I=n.useMemo(()=>({onKeyDown:h,onKeyUp(s){s.key===" "&&p(!1)},onBlur:l}),[h,l,p]);return n.useMemo(()=>C?{reference:w,floating:I}:{},[C,w,I])}const It=n.createContext(void 0);function Tt(e){const t=n.useContext(It);if(t===void 0&&!e)throw new Error(Pe(33));return t}const Mt=n.createContext(void 0);function Ce(e){const t=n.useContext(Mt);if(t===void 0&&!e)throw new Error(Pe(36));return t}const Xn=n.createContext(void 0);function _e(e=!0){const t=n.useContext(Xn);if(t===void 0&&!e)throw new Error(Pe(25));return t}function Jn(e){const{closeOnClick:t,highlighted:o,id:c,nodeId:d,store:x,itemRef:T,itemMetadata:r}=e,{events:v}=x.useState("floatingTreeRoot"),C=_e(!0),R=C!==void 0;return n.useMemo(()=>({id:c,role:"menuitem",tabIndex:o?0:-1,onMouseMove(m){d&&v.emit("itemhover",{nodeId:d,target:m.currentTarget})},onClick(m){t&&v.emit("close",{domEvent:m,reason:yt})},onMouseUp(m){if(C){const O=C.initialCursorPointRef.current;if(C.initialCursorPointRef.current=null,R&&O&&Math.abs(m.clientX-O.x)<=1&&Math.abs(m.clientY-O.y)<=1)return}T.current&&x.context.allowMouseUpTriggerRef.current&&(!R||m.button===2)&&(!r||r.type==="regular-item")&&T.current.click()}}),[t,o,c,v,d,x,T,C,R,r])}const Qn={type:"regular-item"};function Zn(e){const{closeOnClick:t,disabled:o=!1,highlighted:c,id:d,store:x,nativeButton:T,itemMetadata:r,nodeId:v}=e,C=n.useRef(null),{getButtonProps:R,buttonRef:m}=Rt({disabled:o,focusableWhenDisabled:!0,native:T}),O=Jn({closeOnClick:t,highlighted:c,id:d,nodeId:v,store:x,itemRef:C,itemMetadata:r}),b=n.useCallback(u=>qe(O,{onMouseEnter(){r.type==="submenu-trigger"&&r.setActive()},onKeyUp(p){p.key===" "&&x.context.typingRef.current&&p.preventBaseUIHandler()}},u,R),[O,R,x,r]),M=At(C,m);return n.useMemo(()=>({getItemProps:b,itemRef:M}),[b,M])}const eo=n.forwardRef(function(t,o){const{render:c,className:d,id:x,label:T,nativeButton:r=!1,disabled:v=!1,closeOnClick:C=!0,...R}=t,m=Dn({label:T}),O=Tt(!0),b=bt(x),{store:M}=Ce(),u=M.useState("isActive",m.index),p=M.useState("itemProps"),{getItemProps:h,itemRef:l}=Zn({closeOnClick:C,disabled:v,highlighted:u,id:b,store:M,nativeButton:r,nodeId:O?.nodeId,itemMetadata:Qn});return Oe("div",t,{state:{disabled:v,highlighted:u},props:[p,R,h],ref:[l,o,m.ref]})}),to=n.createContext(void 0);function no(e){return n.useContext(to)}const oo={...pt,...Kt},ro=n.forwardRef(function(t,o){const{render:c,className:d,finalFocus:x,...T}=t,{store:r}=Ce(),{side:v,align:C}=Tt(),R=no()!=null,m=r.useState("open"),O=r.useState("transitionStatus"),b=r.useState("popupProps"),M=r.useState("mounted"),u=r.useState("instantType"),p=r.useState("activeTriggerElement"),h=r.useState("parent"),l=r.useState("lastOpenChangeReason"),w=r.useState("rootId"),I=r.useState("floatingRootContext"),s=r.useState("floatingTreeRoot"),i=r.useState("closeDelay"),y=r.useState("activeTriggerElement"),S=h.type==="context-menu";Ht({open:m,ref:r.context.popupRef,onComplete(){m&&r.context.onOpenChangeComplete?.(!0)}}),n.useEffect(()=>{function N(V){r.setOpen(!1,ne(V.reason,V.domEvent))}return s.events.on("close",N),()=>{s.events.off("close",N)}},[s.events,r]);const G=r.useState("hoverEnabled"),H=r.useState("disabled");Kn(I,{enabled:G&&!H&&!S&&h.type!=="menubar",closeDelay:i});const Y={transitionStatus:O,side:v,align:C,open:m,nested:h.type==="menu",instant:u},B=Oe("div",t,{state:Y,ref:[o,r.context.popupRef],stateAttributesMapping:oo,props:[b,{onKeyDown(N){R&&Gn.has(N.key)&&N.stopPropagation()}},Ct(O),T,{"data-rootownerid":w}]});let L=h.type===void 0||S;return(p||h.type==="menubar"&&l!==un)&&(L=!0),W.jsx(hn,{context:I,modal:S,disabled:!M,returnFocus:x===void 0?L:x,initialFocus:h.type!=="menu",restoreFocus:!0,externalTree:h.type!=="menubar"?s:void 0,previousFocusableElement:y,nextFocusableElement:h.type===void 0?r.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:h.type===void 0?r.context.beforeContentFocusGuardRef:void 0,children:B})}),Et=n.createContext(void 0);function so(){const e=n.useContext(Et);if(e===void 0)throw new Error(Pe(32));return e}const io=n.forwardRef(function(t,o){const{keepMounted:c=!1,...d}=t,{store:x}=Ce();return x.useState("mounted")||c?W.jsx(Et.Provider,{value:c,children:W.jsx(Ut,{ref:o,...d})}):null}),ao=n.forwardRef(function(t,o){const{anchor:c,positionMethod:d="absolute",className:x,render:T,side:r,align:v,sideOffset:C=0,alignOffset:R=0,collisionBoundary:m="clipping-ancestors",collisionPadding:O=5,arrowPadding:b=5,sticky:M=!1,disableAnchorTracking:u=!1,collisionAvoidance:p=jt,...h}=t,{store:l}=Ce(),w=so(),I=_e(!0),s=l.useState("parent"),i=l.useState("floatingRootContext"),y=l.useState("floatingTreeRoot"),S=l.useState("mounted"),G=l.useState("open"),H=l.useState("modal"),Y=l.useState("activeTriggerElement"),B=l.useState("transitionStatus"),L=l.useState("lastOpenChangeReason"),N=l.useState("floatingNodeId"),V=l.useState("floatingParentNodeId");let q=c,f=C,K=R,X=v,F=p;s.type==="context-menu"&&(q=c??s.context?.anchor,X=X??"start",!r&&X!=="center"&&(K=t.alignOffset??2,f=t.sideOffset??-5));let J=r,Q=X;s.type==="menu"?(J=J??"inline-end",Q=Q??"start",F=t.collisionAvoidance??Bt):s.type==="menubar"&&(J=J??"bottom",Q=Q??"start");const oe=s.type==="context-menu",P=Un({anchor:q,floatingRootContext:i,positionMethod:I?"fixed":d,mounted:S,side:J,sideOffset:f,align:Q,alignOffset:K,arrowPadding:oe?0:b,collisionBoundary:m,collisionPadding:O,sticky:M,nodeId:N,keepMounted:w,disableAnchorTracking:u,collisionAvoidance:F,shiftCrossAxis:oe&&!("side"in F&&F.side==="flip"),externalTree:y}),re=n.useMemo(()=>{const _={};return G||(_.pointerEvents="none"),{role:"presentation",hidden:!S,style:{...P.positionerStyles,..._}}},[G,S,P.positionerStyles]);n.useEffect(()=>{function _(A){A.open&&(A.parentNodeId===N&&l.set("hoverEnabled",!1),A.nodeId!==N&&A.parentNodeId===l.select("floatingParentNodeId")&&l.setOpen(!1,ne(Le)))}return y.events.on("menuopenchange",_),()=>{y.events.off("menuopenchange",_)}},[l,y.events,N]),n.useEffect(()=>{if(l.select("floatingParentNodeId")==null)return;function _(A){if(A.open||A.nodeId!==l.select("floatingParentNodeId"))return;const ae=A.reason??Le;l.setOpen(!1,ne(ae))}return y.events.on("menuopenchange",_),()=>{y.events.off("menuopenchange",_)}},[y.events,l]),n.useEffect(()=>{function _(A){!G||A.nodeId!==l.select("floatingParentNodeId")||A.target&&Y&&Y!==A.target&&l.setOpen(!1,ne(Le))}return y.events.on("itemhover",_),()=>{y.events.off("itemhover",_)}},[y.events,G,Y,l]),n.useEffect(()=>{const _={open:G,nodeId:N,parentNodeId:V,reason:l.select("lastOpenChangeReason")};y.events.emit("menuopenchange",_)},[y.events,G,l,N,V]);const xe={open:G,side:P.side,align:P.align,anchorHidden:P.anchorHidden,nested:s.type==="menu"},ue=n.useMemo(()=>({side:P.side,align:P.align,arrowRef:P.arrowRef,arrowUncentered:P.arrowUncentered,arrowStyles:P.arrowStyles,nodeId:P.context.nodeId}),[P.side,P.align,P.arrowRef,P.arrowUncentered,P.arrowStyles,P.context.nodeId]),se=Oe("div",t,{state:xe,stateAttributesMapping:pt,ref:[o,l.useStateSetter("positionerElement")],props:[re,Ct(B),h]}),le=S&&s.type!=="menu"&&(s.type!=="menubar"&&H&&L!==Ke||s.type==="menubar"&&s.context.modal);let ee=null;return s.type==="menubar"?ee=s.context.contentElement:s.type===void 0&&(ee=Y),W.jsxs(It.Provider,{value:ue,children:[le&&W.jsx(yn,{ref:s.type==="context-menu"||s.type==="nested-context-menu"?s.context.internalBackdropRef:null,inert:Rn(!G),cutout:ee}),W.jsx(_t,{id:N,children:W.jsx(Ln,{elementsRef:l.context.itemDomElements,labelsRef:l.context.itemLabels,children:se})})]})}),co=n.createContext(null);function Pt(e){return n.useContext(co)}const uo={...Wt,disabled:$(e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled),modal:$(e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0)),allowMouseEnter:$(e=>e.allowMouseEnter),stickIfOpen:$(e=>e.stickIfOpen),parent:$(e=>e.parent),rootId:$(e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId),activeIndex:$(e=>e.activeIndex),isActive:$((e,t)=>e.activeIndex===t),hoverEnabled:$(e=>e.hoverEnabled),instantType:$(e=>e.instantType),lastOpenChangeReason:$(e=>e.openChangeReason),floatingTreeRoot:$(e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:$(e=>e.floatingNodeId),floatingParentNodeId:$(e=>e.floatingParentNodeId),itemProps:$(e=>e.itemProps),closeDelay:$(e=>e.closeDelay),keyboardEventRelay:$(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")})};class Ze extends Gt{constructor(t){super({...lo(),...t},{positionerRef:n.createRef(),popupRef:n.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:n.createRef(),beforeContentFocusGuardRef:n.createRef(),onOpenChangeComplete:void 0,triggerElements:new Vt},uo),this.unsubscribeParentListener=this.observe("parent",o=>{if(this.unsubscribeParentListener?.(),o.type==="menu"){this.unsubscribeParentListener=o.store.subscribe(()=>{this.notifyAll()}),this.context.allowMouseUpTriggerRef=o.store.context.allowMouseUpTriggerRef;return}o.type!==void 0&&(this.context.allowMouseUpTriggerRef=o.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(t,o){this.state.floatingRootContext.context.events.emit("setOpen",{open:t,eventDetails:o})}static useStore(t,o){const c=Dt(()=>new Ze(o)).current;return t??c}unsubscribeParentListener=null}function lo(){return{...zt(),disabled:!1,modal:!0,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new gt,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Ee,keyboardEventRelay:void 0,closeDelay:0}}const fo=n.createContext(void 0);function po(){return n.useContext(fo)}const go=Yt(function(t){const{children:o,open:c,onOpenChange:d,onOpenChangeComplete:x,defaultOpen:T=!1,disabled:r=!1,modal:v,loopFocus:C=!0,orientation:R="vertical",actionsRef:m,closeParentOnEsc:O=!1,handle:b,triggerId:M,defaultTriggerId:u=null,highlightItemOnHover:p=!0}=t,h=_e(!0),l=Ce(!0),w=Pt(!0),I=po(),s=n.useMemo(()=>I&&l?{type:"menu",store:l.store}:w?{type:"menubar",context:w}:h&&!l?{type:"context-menu",context:h}:{type:void 0},[h,l,w,I]),i=Ze.useStore(b?.store,{open:T,openProp:c,activeTriggerId:u,triggerIdProp:M,parent:s});qt(()=>{c===void 0&&i.state.open===!1&&T===!0&&i.update({open:!0,activeTriggerId:u})}),i.useControlledProp("openProp",c),i.useControlledProp("triggerIdProp",M),i.useContextCallback("onOpenChangeComplete",x);const y=i.useState("floatingTreeRoot"),S=mt(y),G=Qe();fe(()=>{h&&!l?i.update({parent:{type:"context-menu",context:h},floatingNodeId:S,floatingParentNodeId:G}):l&&i.update({floatingNodeId:S,floatingParentNodeId:G})},[h,l,S,G,i]);const H=i.useState("open"),Y=i.useState("activeTriggerElement"),B=i.useState("positionerElement"),L=i.useState("hoverEnabled"),N=i.useState("modal"),V=i.useState("disabled"),q=i.useState("lastOpenChangeReason"),f=i.useState("parent"),K=i.useState("activeIndex"),X=i.useState("payload"),F=i.useState("floatingParentNodeId"),J=n.useRef(null),Q=F!=null;let oe;i.useSyncedValues({disabled:r,modal:f.type===void 0?v:void 0,rootId:ln()});const{openMethod:P,triggerProps:re,reset:xe}=bn(H);$t(i);const{forceUnmount:ue}=Xt(H,i,()=>{i.update({allowMouseEnter:!1,stickIfOpen:!0}),xe()}),se=n.useRef(f.type!=="context-menu"),le=Te();n.useEffect(()=>{if(H||(J.current=null),f.type==="context-menu"){if(!H){le.clear(),se.current=!1;return}le.start(500,()=>{se.current=!0})}},[le,H,f.type]),vn(H&&N&&q!==Ke&&P!=="touch",B),fe(()=>{!H&&!L&&i.set("hoverEnabled",!0)},[H,L,i]);const ee=n.useRef(!0),_=Te(),A=me((E,D)=>{const te=D.reason;if(H===E&&D.trigger===Y&&q===te||(D.preventUnmountOnClose=()=>{i.set("preventUnmountingOnClose",!0)},!E&&D.trigger==null&&(D.trigger=Y??void 0),d?.(E,D),D.isCanceled))return;const kt={open:E,nativeEvent:D.event,reason:D.reason,nested:Q};oe?.emit("openchange",kt);const ke=D.event;if(E===!1&&ke?.type==="click"&&ke.pointerType==="touch"&&!ee.current)return;if(!E&&K!==null){const Nt=i.context.itemDomElements.current[K];queueMicrotask(()=>{Nt?.setAttribute("tabindex","-1")})}E&&te===it?(ee.current=!1,_.start(300,()=>{ee.current=!0})):(ee.current=!0,_.clear());const tt=(te===ht||te===yt)&&ke.detail===0&&ke?.isTrusted,Ft=!E&&(te===fn||te==null),Ve={open:E,openChangeReason:te};J.current=D.event??null;const nt=D.trigger?.id??null;(nt||E)&&(Ve.activeTriggerId=nt,Ve.activeTriggerElement=D.trigger??null),i.update(Ve),f.type==="menubar"&&(te===it||te===He||te===Ke||te===De||te===Le)?i.set("instantType","group"):tt||Ft?i.set("instantType",tt?"click":"dismiss"):i.set("instantType",void 0)}),ae=n.useCallback(E=>{const D=ne(E);return D.preventUnmountOnClose=()=>{i.set("preventUnmountingOnClose",!0)},D},[i]),de=n.useCallback(()=>{i.setOpen(!1,ae(dn))},[i,ae]);n.useImperativeHandle(m,()=>({unmount:ue,close:de}),[ue,de]);let pe;f.type==="context-menu"&&(pe=f.context),n.useImperativeHandle(pe?.positionerRef,()=>B,[B]),n.useImperativeHandle(pe?.actionsRef,()=>({setOpen:A}),[A]);const ce=Jt({popupStore:i,onOpenChange:A});oe=ce.context.events,n.useEffect(()=>{const E=({open:D,eventDetails:te})=>A(D,te);return oe.on("setOpen",E),()=>{oe?.off("setOpen",E)}},[oe,A]);const U=Qt(ce,{enabled:!V,bubbles:{escapeKey:O&&f.type==="menu"},outsidePress(){return f.type!=="context-menu"||J.current?.type==="contextmenu"?!0:se.current},externalTree:Q?y:void 0}),Z=Cn(ce,{role:"menu"}),a=In(),k=n.useCallback(E=>{i.select("activeIndex")!==E&&i.set("activeIndex",E)},[i]),g=qn(ce,{enabled:!V,listRef:i.context.itemDomElements,activeIndex:K,nested:f.type!==void 0,loopFocus:C,orientation:R,parentOrientation:f.type==="menubar"?f.context.orientation:void 0,rtl:a==="rtl",disabledIndices:$e,onNavigate:k,openOnArrowKeyDown:f.type!=="context-menu",externalTree:Q?y:void 0,focusItemOnHover:p}),j=n.useCallback(E=>{i.context.typingRef.current=E},[i]),z=$n(ce,{listRef:i.context.itemLabels,activeIndex:K,resetMs:Zt,onMatch:E=>{H&&E!==K&&i.set("activeIndex",E)},onTypingChange:j}),{getReferenceProps:ie,getFloatingProps:ye,getItemProps:Ie,getTriggerProps:Re}=xt([U,Z,g,z]),ge=n.useMemo(()=>{const E=qe(ie(),{onMouseMove(){i.set("allowMouseEnter",!0)}},re);return delete E.role,E},[ie,i,re]),be=n.useMemo(()=>{const E=Re();if(!E)return E;const D=qe(E,re);return delete D.role,delete D["aria-controls"],D},[Re,re]),Ge=n.useMemo(()=>ye({onMouseMove(){i.set("allowMouseEnter",!0),f.type==="menu"&&i.set("hoverEnabled",!1)},onClick(){i.select("hoverEnabled")&&i.set("hoverEnabled",!1)},onKeyDown(E){const D=i.select("keyboardEventRelay");D&&!E.isPropagationStopped()&&D(E)}}),[ye,f.type,i]),St=n.useMemo(()=>Ie(),[Ie]);i.useSyncedValues({floatingRootContext:ce,activeTriggerProps:ge,inactiveTriggerProps:be,popupProps:Ge,itemProps:St});const wt=n.useMemo(()=>({store:i,parent:s}),[i,s]),et=W.jsx(Mt.Provider,{value:wt,children:typeof o=="function"?o({payload:X}):o});return f.type===void 0||f.type==="context-menu"?W.jsx(en,{externalTree:y,children:et}):et});function mo(e){const t=e.getBoundingClientRect(),o=window.getComputedStyle(e,"::before"),c=window.getComputedStyle(e,"::after");if(!(o.content!=="none"||c.content!=="none"))return t;const x=parseFloat(o.width)||0,T=parseFloat(o.height)||0,r=parseFloat(c.width)||0,v=parseFloat(c.height)||0,C=Math.max(t.width,x,r),R=Math.max(t.height,T,v),m=C-t.width,O=R-t.height;return{left:t.left-m/2,right:t.right+m/2,top:t.top-O/2,bottom:t.bottom+O/2}}function xo(e){const{render:t,className:o,state:c=Ee,props:d=$e,refs:x=$e,metadata:T,stateAttributesMapping:r,tag:v="div",...C}=e,{compositeProps:R,compositeRef:m}=Hn({metadata:T});return Oe(v,e,{state:c,ref:[...x,m],props:[R,...d,C],stateAttributesMapping:r})}function Ot(e){if(Xe(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid")??void 0;if(!pn(e))return Ot(gn(e))}function ho(e){const{enabled:t=!0,mouseDownAction:o,open:c}=e,d=n.useRef(!1);return n.useMemo(()=>t?{onMouseDown:x=>{(o==="open"&&!c||o==="close"&&c)&&(d.current=!0,Ue(x.currentTarget).addEventListener("click",()=>{d.current=!1},{once:!0}))},onClick:x=>{d.current&&(d.current=!1,x.preventBaseUIHandler())}}:Ee,[t,o,c])}const Ae=2,yo=tn(function(t,o){const{render:c,className:d,disabled:x=!1,nativeButton:T=!0,id:r,openOnHover:v,delay:C=100,closeDelay:R=0,handle:m,payload:O,...b}=t,M=Ce(!0),u=m?.store??M?.store;if(!u)throw new Error(Pe(85));const p=bt(r),h=u.useState("isTriggerActive",p),l=u.useState("floatingRootContext"),w=u.useState("isOpenedByTrigger",p),I=n.useRef(null),s=bo(),i=mn(!0),y=dt(),S=n.useMemo(()=>y??new gt,[y]),G=mt(S),H=Qe(),{registerTrigger:Y,isMountedByThisTrigger:B}=nn(p,I,u,{payload:O,closeDelay:R,parent:s,floatingTreeRoot:S,floatingNodeId:G,floatingParentNodeId:H,keyboardEventRelay:i?.relayKeyboardEvent}),L=s.type==="menubar",N=u.useState("disabled"),V=x||N||L&&s.context.disabled,{getButtonProps:q,buttonRef:f}=Rt({disabled:V,native:T});n.useEffect(()=>{!w&&s.type===void 0&&(u.context.allowMouseUpTriggerRef.current=!1)},[u,w,s.type]);const K=n.useRef(null),X=Te(),F=me(U=>{if(!K.current)return;X.clear(),u.context.allowMouseUpTriggerRef.current=!1;const Z=U.target;if(ve(K.current,Z)||ve(u.select("positionerElement"),Z)||Z===K.current||Z!=null&&Ot(Z)===u.select("rootId"))return;const a=mo(K.current);U.clientX>=a.left-Ae&&U.clientX<=a.right+Ae&&U.clientY>=a.top-Ae&&U.clientY<=a.bottom+Ae||S.events.emit("close",{domEvent:U,reason:xn})});n.useEffect(()=>{w&&u.select("lastOpenChangeReason")===Ke&&Ue(K.current).addEventListener("mouseup",F,{once:!0})},[w,F,u]);const J=L&&s.context.hasSubmenuOpen,oe=jn(l,{enabled:(v??J)&&!V&&s.type!=="context-menu"&&(!L||J&&!B),handleClose:Bn({blockPointerEvents:!L}),mouseOnly:!0,move:!1,restMs:s.type===void 0?C:void 0,delay:{close:R},triggerElementRef:I,externalTree:S,isActiveTrigger:h}),P=Ro(w,u.select("lastOpenChangeReason")),re=Vn(l,{enabled:!V&&s.type!=="context-menu",event:w&&L?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:s.type===void 0?P:!1}),xe=_n(l,{enabled:!V&&J}),ue=ho({open:w,enabled:L,mouseDownAction:"open"}),se=xt([re,xe]),le={disabled:V,open:w},ee=u.useState("triggerProps",B),_=[K,o,f,Y,I],A=[se.getReferenceProps(),oe??Ee,ee,{"aria-haspopup":"menu",id:p,onMouseDown:U=>{if(u.select("open"))return;X.start(200,()=>{u.context.allowMouseUpTriggerRef.current=!0}),Ue(U.currentTarget).addEventListener("mouseup",F,{once:!0})}},L?{role:"menuitem"}:{},ue,b,q],ae=n.useRef(null),de=me(U=>{ot.flushSync(()=>{u.setOpen(!1,ne(He,U.nativeEvent,U.currentTarget))}),on(ae.current)?.focus()}),pe=me(U=>{const Z=u.select("positionerElement");if(Z&&rn(U,Z))u.context.beforeContentFocusGuardRef.current?.focus();else{ot.flushSync(()=>{u.setOpen(!1,ne(He,U.nativeEvent,U.currentTarget))});let a=sn(u.context.triggerFocusTargetRef.current||I.current);for(;a!==null&&ve(Z,a);){const k=a;if(a=an(a),a===k)break}a?.focus()}}),ce=Oe("button",t,{enabled:!L,stateAttributesMapping:rt,state:le,ref:_,props:A});return L?W.jsx(xo,{tag:"button",render:c,className:d,state:le,refs:_,props:A,stateAttributesMapping:rt}):w?W.jsxs(n.Fragment,{children:[W.jsx(st,{ref:ae,onFocus:de},`${p}-pre-focus-guard`),W.jsx(n.Fragment,{children:ce},p),W.jsx(st,{ref:u.context.triggerFocusTargetRef,onFocus:pe},`${p}-post-focus-guard`)]}):W.jsx(n.Fragment,{children:ce},p)});function Ro(e,t){const o=Te(),[c,d]=n.useState(!1);return fe(()=>{e&&t==="trigger-hover"?(d(!0),o.start(cn,()=>{d(!1)})):e||(o.clear(),d(!1))},[e,t,o]),c}function bo(){const e=_e(!0),t=Ce(!0),o=Pt();return n.useMemo(()=>o?{type:"menubar",context:o}:e&&!t?{type:"context-menu",context:e}:{type:void 0},[e,t,o])}function ko({children:e,...t}){return W.jsx(go,{...t,children:e})}function Fo({className:e,...t}){return W.jsx(yo,{className:Je(e),...t})}function No({className:e,side:t="bottom",align:o="end",children:c}){return W.jsx(io,{children:W.jsx(ao,{side:t,align:o,children:W.jsx(ro,{className:Je("min-w-[110px] rounded-lg bg-primary-50 p-1 text-sm text-primary-900 shadow-lg outline outline-primary-900/10",e),children:c})})})}function Ao({className:e,...t}){return W.jsx(eo,{className:Je("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm text-primary-900 hover:bg-primary-100 data-highlighted:bg-primary-100","select-none font-[450]",e),...t})}export{ko as M,Fo as a,No as b,Ao as c};
@@ -1 +1 @@
1
- import{j as t}from"./main-xPlWrMhO.js";function a({className:e}){return t.jsx("div",{className:e,children:t.jsx("span",{className:"text-xl",children:"🦎"})})}function i({className:e}){return t.jsx("span",{className:e,style:{background:"linear-gradient(90deg, #10b981, #14b8a6, #06b6d4, #8b5cf6, #ec4899)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",fontWeight:600},children:"OpenCami"})}export{a as O,i as a};
1
+ import{j as t}from"./main-CbISK-pm.js";function a({className:e}){return t.jsx("div",{className:e,children:t.jsx("span",{className:"text-xl",children:"🦎"})})}function i({className:e}){return t.jsx("span",{className:e,style:{background:"linear-gradient(90deg, #10b981, #14b8a6, #06b6d4, #8b5cf6, #ec4899)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",fontWeight:600},children:"OpenCami"})}export{a as O,i as a};