@nextclaw/ui 0.15.2 → 0.15.3

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 (109) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/assets/{api-B7Qigvtm.js → api-iNBpppzj.js} +2 -2
  3. package/dist/assets/{appearance-settings-page-CuE0Iiqj.js → appearance-settings-page-DMffQFR3.js} +1 -1
  4. package/dist/assets/{book-open-Ba2f7YiG.js → book-open-C3mJGwiy.js} +1 -1
  5. package/dist/assets/{channels-list-page-CTsM6TcP.js → channels-list-page-CCtp0BRS.js} +1 -1
  6. package/dist/assets/chat-page-H5a0dWvO.js +1 -0
  7. package/dist/assets/{config-split-page-Fbb4PtTf.js → config-split-page-CrOJgB-Y.js} +1 -1
  8. package/dist/assets/{confirm-dialog-D2EG3nqE.js → confirm-dialog-Chv50USy.js} +2 -2
  9. package/dist/assets/{desktop-update-config-BGR3HUi1.js → desktop-update-config-KzTuXRf_.js} +1 -1
  10. package/dist/assets/{dist-7JTjycxE.js → dist-BunzmC4B.js} +1 -1
  11. package/dist/assets/{dist-wXLhk4hl.js → dist-ChmGwvtK.js} +1 -1
  12. package/dist/assets/doc-browser-DNRL4Zvd.js +1 -0
  13. package/dist/assets/doc-browser-Dg0pmkOg.js +1 -0
  14. package/dist/assets/{doc-browser-context-CYAGm5d5.js → doc-browser-context-BHY-0FSD.js} +1 -1
  15. package/dist/assets/{es2015-j1SRCIX5.js → es2015-DQZ5JWwK.js} +1 -1
  16. package/dist/assets/{external-link-DxuPaDoK.js → external-link-CU0kzzIP.js} +1 -1
  17. package/dist/assets/{form-actions-BztL7P_T.js → form-actions-BvCp_0lS.js} +1 -1
  18. package/dist/assets/{i18n-provider-B4oMxOFx.js → i18n-provider-Cu8XyZb_.js} +1 -1
  19. package/dist/assets/index-CzfBdvK1.css +1 -0
  20. package/dist/assets/index-DGqHne1Q.js +104 -0
  21. package/dist/assets/loader-circle-CDSFuzmk.js +1 -0
  22. package/dist/assets/mcp-marketplace-page-BeEQK0DL.js +9 -0
  23. package/dist/assets/mcp-marketplace-page-D6idOTLp.js +1 -0
  24. package/dist/assets/{model-config-page-DeKk9gvE.js → model-config-page-bNNo-XyG.js} +1 -1
  25. package/dist/assets/plus-D4DsdLN-.js +1 -0
  26. package/dist/assets/{provider-scoped-model-input-DsH2LF1q.js → provider-scoped-model-input-IlgQCsoT.js} +1 -1
  27. package/dist/assets/{providers-config-page-BFnGp68F.js → providers-config-page-wLo6CAJw.js} +1 -1
  28. package/dist/assets/{react-UirzUuST.js → react-BPIsQIlO.js} +1 -1
  29. package/dist/assets/{refresh-cw-eT8BF-8B.js → refresh-cw-CILd1vAP.js} +1 -1
  30. package/dist/assets/remote-uKEYp7AR.js +1 -0
  31. package/dist/assets/rotate-cw-wPFPg1kH.js +1 -0
  32. package/dist/assets/{runtime-config-page-BelAqiNG.js → runtime-config-page-DDn1sP4G.js} +1 -1
  33. package/dist/assets/{save-Cb2g0BOi.js → save-ByJqcPTP.js} +1 -1
  34. package/dist/assets/{search-BcHjwdsb.js → search-DVIV6pfD.js} +1 -1
  35. package/dist/assets/{search-config-page-zPm6--Ig.js → search-config-page-B-Cf4iiB.js} +1 -1
  36. package/dist/assets/{secrets-config-page-Cxyp-KuQ.js → secrets-config-page-DPKsY8Iw.js} +1 -1
  37. package/dist/assets/security-config-e9SSBlKr.js +1 -0
  38. package/dist/assets/{select-CdSEOwVM.js → select-BdgczSNw.js} +1 -1
  39. package/dist/assets/{setting-row-CTAtGexr.js → setting-row-BkTVUTKx.js} +1 -1
  40. package/dist/assets/{settings-2-2DWauOjY.js → settings-2-CH5shGg_.js} +1 -1
  41. package/dist/assets/{side-dock-DPvakJ0a.js → side-dock-BsBvcJ9i.js} +2 -2
  42. package/dist/assets/{skeleton-P5oM14E1.js → skeleton-DeX1FKw7.js} +1 -1
  43. package/dist/assets/switch-Cv8Ekb3x.js +1 -0
  44. package/dist/assets/{tag-chip-D-WsKoT1.js → tag-chip-RB9uKcoC.js} +1 -1
  45. package/dist/assets/{tooltip-CjkOaHW7.js → tooltip-oQlEN-l6.js} +1 -1
  46. package/dist/assets/{use-config--hx5oxQn.js → use-config-l3W7y8Qz.js} +1 -1
  47. package/dist/assets/{use-confirm-dialog-CD9a_SK1.js → use-confirm-dialog-BAxaVOJI.js} +1 -1
  48. package/dist/assets/x-BBMffEN0.js +1 -0
  49. package/dist/index.html +26 -26
  50. package/package.json +9 -9
  51. package/src/app/components/layout/sidebar-items.tsx +3 -3
  52. package/src/app/components/layout/sidebar-rail.styles.ts +2 -2
  53. package/src/app/components/layout/sidebar.tsx +1 -1
  54. package/src/app/styles/design-system.css +17 -4
  55. package/src/features/chat/components/layout/chat-sidebar-utility-menu.tsx +1 -1
  56. package/src/features/chat/features/conversation/components/session-queued-input-rows.tsx +1 -1
  57. package/src/features/chat/features/message/components/__tests__/chat-message-list.container.test.tsx +62 -1
  58. package/src/features/chat/features/message/components/chat-message-list.container.tsx +47 -1
  59. package/src/features/chat/features/message/utils/__tests__/chat-message-process-summary.utils.test.ts +11 -1
  60. package/src/features/chat/features/message/utils/__tests__/chat-message-texts.utils.test.ts +23 -0
  61. package/src/features/chat/features/message/utils/chat-message-process-summary.utils.ts +5 -0
  62. package/src/features/chat/features/message/utils/chat-message-texts.utils.ts +138 -0
  63. package/src/features/chat/features/session/components/chat-sidebar-project-groups.tsx +1 -1
  64. package/src/features/chat/features/session/components/session-header/chat-session-title-switcher.tsx +2 -2
  65. package/src/features/chat/features/welcome/components/chat-welcome-project-picker.tsx +1 -1
  66. package/src/features/chat/features/welcome/components/chat-welcome-session-type-picker.tsx +1 -1
  67. package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-file-preview.test.tsx +67 -0
  68. package/src/features/chat/features/workspace/components/chat-session-workspace-directory-browser.tsx +1 -1
  69. package/src/features/chat/features/workspace/components/chat-session-workspace-file-breadcrumb-browser.tsx +2 -2
  70. package/src/features/chat/features/workspace/components/chat-session-workspace-file-breadcrumbs.tsx +1 -1
  71. package/src/features/chat/features/workspace/components/chat-session-workspace-file-preview.tsx +174 -22
  72. package/src/features/chat/features/workspace/utils/chat-workspace-file-tab-persistence.utils.ts +4 -0
  73. package/src/features/chat/managers/chat-thread.manager.ts +2 -0
  74. package/src/features/chat/stores/chat-thread.store.ts +3 -0
  75. package/src/features/cron/components/cron-config.tsx +63 -80
  76. package/src/features/marketplace/components/detail-doc/__tests__/marketplace-detail-doc.test.tsx +44 -6
  77. package/src/features/marketplace/components/marketplace-detail-doc.tsx +8 -4
  78. package/src/features/marketplace/components/marketplace-page-parts.tsx +1 -1
  79. package/src/features/marketplace/hooks/use-marketplace-detail-doc-entry.ts +84 -0
  80. package/src/features/panel-apps/components/panel-apps-list.tsx +2 -2
  81. package/src/features/right-panel-resources/components/right-panel-resource-home-page.tsx +1 -1
  82. package/src/features/side-dock/components/side-dock.tsx +3 -3
  83. package/src/index.css +239 -13
  84. package/src/shared/components/actions/action-link.tsx +1 -1
  85. package/src/shared/components/doc-browser/doc-browser-panel-parts.tsx +1 -1
  86. package/src/shared/components/ui/actions/icon-action-button.tsx +1 -1
  87. package/src/shared/components/ui/button.tsx +1 -1
  88. package/src/shared/components/ui/dialog.tsx +1 -1
  89. package/src/shared/components/ui/input.tsx +1 -1
  90. package/src/shared/components/ui/select.tsx +1 -1
  91. package/src/shared/components/ui/switch.tsx +1 -1
  92. package/src/shared/components/ui/tabs.tsx +1 -1
  93. package/src/shared/components/ui/textarea.tsx +1 -1
  94. package/src/shared/lib/i18n/locales/en-US/chat.json +83 -0
  95. package/src/shared/lib/i18n/locales/zh-CN/chat.json +83 -0
  96. package/dist/assets/chat-page-C_5dcuE3.js +0 -1
  97. package/dist/assets/doc-browser-bHyXnxlj.js +0 -1
  98. package/dist/assets/doc-browser-gTrQ3jCF.js +0 -1
  99. package/dist/assets/index-CvrvblgX.css +0 -1
  100. package/dist/assets/index-Obd4JYU2.js +0 -104
  101. package/dist/assets/loader-circle-CdzgK4eH.js +0 -1
  102. package/dist/assets/mcp-marketplace-page-Bt7CuOoq.js +0 -9
  103. package/dist/assets/mcp-marketplace-page-Ck3t78_n.js +0 -1
  104. package/dist/assets/plus-Bx7wQbhG.js +0 -1
  105. package/dist/assets/remote-CDkHZtA8.js +0 -1
  106. package/dist/assets/rotate-cw-1JqxHTuw.js +0 -1
  107. package/dist/assets/security-config-B_gCq9fn.js +0 -1
  108. package/dist/assets/switch-BU_UEULb.js +0 -1
  109. package/dist/assets/x-DT5x45JU.js +0 -1
@@ -1,3 +1,3 @@
1
- import{h as e,p as t,r as n,t as r,u as i,v as a}from"./react-UirzUuST.js";import{c as o}from"./dist-7JTjycxE.js";import{t as s}from"./book-open-Ba2f7YiG.js";import{i as c,n as l,r as u,t as d,u as f}from"./tooltip-CjkOaHW7.js";import{t as p}from"./plus-Bx7wQbhG.js";import{t as m}from"./x-DT5x45JU.js";import{t as h}from"./host-capabilities-9bB_998Z.js";import{n as g,t as _}from"./middleware-BILWbJE4.js";import{t as v}from"./use-confirm-dialog-CD9a_SK1.js";import{f as y,h as b,m as x,n as S,p as ee,u as C}from"./doc-browser-context-CYAGm5d5.js";var te=`modulepreload`,ne=function(e){return`/`+e},re={},ie=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=ne(t,n),t in re)return;re[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:te,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},w=a(e(),1),ae=`popstate`;function oe(e={}){let{initialEntries:t=[`/`],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((e,t)=>u(e,typeof e==`string`?null:e.state,t===0?`default`:void 0));let a=c(n??i.length-1),o=`POP`,s=null;function c(e){return Math.min(Math.max(e,0),i.length-1)}function l(){return i[a]}function u(e,t=null,n){let r=D(i?l().pathname:`/`,e,t,n);return E(r.pathname.charAt(0)===`/`,`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),r}function d(e){return typeof e==`string`?e:O(e)}return{get index(){return a},get action(){return o},get location(){return l()},createHref:d,createURL(e){return new URL(d(e),`http://localhost`)},encodeLocation(e){let t=typeof e==`string`?k(e):e;return{pathname:t.pathname||``,search:t.search||``,hash:t.hash||``}},push(e,t){o=`PUSH`;let n=u(e,t);a+=1,i.splice(a,i.length,n),r&&s&&s({action:o,location:n,delta:1})},replace(e,t){o=`REPLACE`;let n=u(e,t);i[a]=n,r&&s&&s({action:o,location:n,delta:0})},go(e){o=`POP`;let t=c(a+e),n=i[t];a=t,s&&s({action:o,location:n,delta:e})},listen(e){return s=e,()=>{s=null}}}}function se(e={}){function t(e,t){let{pathname:n,search:r,hash:i}=e.location;return D(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){return typeof t==`string`?t:O(t)}return ue(t,n,null,e)}function T(e,t){if(e===!1||e==null)throw Error(t)}function E(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function ce(){return Math.random().toString(36).substring(2,10)}function le(e,t){return{usr:e.state,key:e.key,idx:t}}function D(e,t,n=null,r){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?k(t):t,state:n,key:t&&t.key||r||ce()}}function O({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function k(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ue(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=D(h.location,e,t);n&&n(r,e),l=u()+1;let d=le(r,l),f=h.createHref(r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=D(h.location,e,t);n&&n(r,e),l=u();let i=le(r,l),d=h.createHref(r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return de(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(ae,d),c=e,()=>{i.removeEventListener(ae,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function de(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),T(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:O(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function fe(e,t,n=`/`){return pe(e,t,n,!1)}function pe(e,t,n,r){let i=A((typeof t==`string`?k(t):t).pathname||`/`,n);if(i==null)return null;let a=he(e);_e(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=Ae(i);o=De(a[e],t,r)}return o}function me(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function he(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;T(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=j([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(T(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),he(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:Te(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ge(e.path))a(e,t,!0,n)}),t}function ge(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ge(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function _e(e){e.sort((e,t)=>e.score===t.score?Ee(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ve=/^:[\w-]+$/,ye=3,be=2,xe=1,Se=10,Ce=-2,we=e=>e===`*`;function Te(e,t){let n=e.split(`/`),r=n.length;return n.some(we)&&(r+=Ce),t&&(r+=be),n.filter(e=>!we(e)).reduce((e,t)=>e+(ve.test(t)?ye:t===``?xe:Se),r)}function Ee(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function De(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=Oe({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=Oe({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:j([a,u.pathname]),pathnameBase:Re(j([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=j([a,u.pathnameBase]))}return o}function Oe(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ke(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function ke(e,t=!1,n=!0){E(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:n!=null}),n?`/?([^\\/]+)?`:`/([^\\/]+)`)).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Ae(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return E(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function A(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var je=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Me(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?k(e):e,a;return n?(n=n.replace(/\/\/+/g,`/`),a=n.startsWith(`/`)?Ne(n.substring(1),`/`):Ne(n,t)):a=t,{pathname:a,search:ze(r),hash:Be(i)}}function Ne(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Pe(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Fe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ie(e){let t=Fe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Le(e,t,n,r=!1){let i;typeof e==`string`?i=k(e):(i={...e},T(!i.pathname||!i.pathname.includes(`?`),Pe(`?`,`pathname`,`search`,i)),T(!i.pathname||!i.pathname.includes(`#`),Pe(`#`,`pathname`,`hash`,i)),T(!i.search||!i.search.includes(`#`),Pe(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Me(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var j=e=>e.join(`/`).replace(/\/\/+/g,`/`),Re=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),ze=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Be=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Ve=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function He(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ue(e){return e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\/\/*/g,`/`)||`/`}var We=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ge(e,t){let n=e;if(typeof n!=`string`||!je.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(We)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=A(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{E(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ke=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Ke);var qe=[`GET`,...Ke];new Set(qe);var M=w.createContext(null);M.displayName=`DataRouter`;var N=w.createContext(null);N.displayName=`DataRouterState`;var Je=w.createContext(!1),Ye=w.createContext({isTransitioning:!1});Ye.displayName=`ViewTransition`;var Xe=w.createContext(new Map);Xe.displayName=`Fetchers`;var Ze=w.createContext(null);Ze.displayName=`Await`;var P=w.createContext(null);P.displayName=`Navigation`;var F=w.createContext(null);F.displayName=`Location`;var I=w.createContext({outlet:null,matches:[],isDataRoute:!1});I.displayName=`Route`;var Qe=w.createContext(null);Qe.displayName=`RouteError`;var $e=`REACT_ROUTER_ERROR`,et=`REDIRECT`,tt=`ROUTE_ERROR_RESPONSE`;function nt(e){if(e.startsWith(`${$e}:${et}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function rt(e){if(e.startsWith(`${$e}:${tt}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Ve(t.status,t.statusText,t.data)}catch{}}function it(e,{relative:t}={}){T(L(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=w.useContext(P),{hash:i,pathname:a,search:o}=B(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:j([n,a])),r.createHref({pathname:s,search:o,hash:i})}function L(){return w.useContext(F)!=null}function R(){return T(L(),`useLocation() may be used only in the context of a <Router> component.`),w.useContext(F).location}var at=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function ot(e){w.useContext(P).static||w.useLayoutEffect(e)}function z(){let{isDataRoute:e}=w.useContext(I);return e?Dt():st()}function st(){T(L(),`useNavigate() may be used only in the context of a <Router> component.`);let e=w.useContext(M),{basename:t,navigator:n}=w.useContext(P),{matches:r}=w.useContext(I),{pathname:i}=R(),a=JSON.stringify(Ie(r)),o=w.useRef(!1);return ot(()=>{o.current=!0}),w.useCallback((r,s={})=>{if(E(o.current,at),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Le(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:j([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}w.createContext(null);function ct(){let{matches:e}=w.useContext(I),t=e[e.length-1];return t?t.params:{}}function B(e,{relative:t}={}){let{matches:n}=w.useContext(I),{pathname:r}=R(),i=JSON.stringify(Ie(n));return w.useMemo(()=>Le(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function lt(e,t){return ut(e,t)}function ut(e,t,n,r,i){T(L(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:a}=w.useContext(P),{matches:o}=w.useContext(I),s=o[o.length-1],c=s?s.params:{},l=s?s.pathname:`/`,u=s?s.pathnameBase:`/`,d=s&&s.route;{let e=d&&d.path||``;kt(l,!d||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
1
+ import{h as e,p as t,r as n,t as r,u as i,v as a}from"./react-BPIsQIlO.js";import{c as o}from"./dist-BunzmC4B.js";import{t as s}from"./book-open-C3mJGwiy.js";import{i as c,n as l,r as u,t as d,u as f}from"./tooltip-oQlEN-l6.js";import{t as p}from"./plus-D4DsdLN-.js";import{t as m}from"./x-BBMffEN0.js";import{t as h}from"./host-capabilities-9bB_998Z.js";import{n as g,t as _}from"./middleware-BILWbJE4.js";import{t as v}from"./use-confirm-dialog-BAxaVOJI.js";import{f as y,h as b,m as x,n as S,p as ee,u as C}from"./doc-browser-context-BHY-0FSD.js";var te=`modulepreload`,ne=function(e){return`/`+e},re={},ie=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=ne(t,n),t in re)return;re[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:te,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},w=a(e(),1),ae=`popstate`;function oe(e={}){let{initialEntries:t=[`/`],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((e,t)=>u(e,typeof e==`string`?null:e.state,t===0?`default`:void 0));let a=c(n??i.length-1),o=`POP`,s=null;function c(e){return Math.min(Math.max(e,0),i.length-1)}function l(){return i[a]}function u(e,t=null,n){let r=D(i?l().pathname:`/`,e,t,n);return E(r.pathname.charAt(0)===`/`,`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),r}function d(e){return typeof e==`string`?e:O(e)}return{get index(){return a},get action(){return o},get location(){return l()},createHref:d,createURL(e){return new URL(d(e),`http://localhost`)},encodeLocation(e){let t=typeof e==`string`?k(e):e;return{pathname:t.pathname||``,search:t.search||``,hash:t.hash||``}},push(e,t){o=`PUSH`;let n=u(e,t);a+=1,i.splice(a,i.length,n),r&&s&&s({action:o,location:n,delta:1})},replace(e,t){o=`REPLACE`;let n=u(e,t);i[a]=n,r&&s&&s({action:o,location:n,delta:0})},go(e){o=`POP`;let t=c(a+e),n=i[t];a=t,s&&s({action:o,location:n,delta:e})},listen(e){return s=e,()=>{s=null}}}}function se(e={}){function t(e,t){let{pathname:n,search:r,hash:i}=e.location;return D(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){return typeof t==`string`?t:O(t)}return ue(t,n,null,e)}function T(e,t){if(e===!1||e==null)throw Error(t)}function E(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function ce(){return Math.random().toString(36).substring(2,10)}function le(e,t){return{usr:e.state,key:e.key,idx:t}}function D(e,t,n=null,r){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?k(t):t,state:n,key:t&&t.key||r||ce()}}function O({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function k(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ue(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=D(h.location,e,t);n&&n(r,e),l=u()+1;let d=le(r,l),f=h.createHref(r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=D(h.location,e,t);n&&n(r,e),l=u();let i=le(r,l),d=h.createHref(r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return de(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(ae,d),c=e,()=>{i.removeEventListener(ae,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function de(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),T(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:O(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function fe(e,t,n=`/`){return pe(e,t,n,!1)}function pe(e,t,n,r){let i=A((typeof t==`string`?k(t):t).pathname||`/`,n);if(i==null)return null;let a=he(e);_e(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=Ae(i);o=De(a[e],t,r)}return o}function me(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function he(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;T(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=j([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(T(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),he(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:Te(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ge(e.path))a(e,t,!0,n)}),t}function ge(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ge(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function _e(e){e.sort((e,t)=>e.score===t.score?Ee(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ve=/^:[\w-]+$/,ye=3,be=2,xe=1,Se=10,Ce=-2,we=e=>e===`*`;function Te(e,t){let n=e.split(`/`),r=n.length;return n.some(we)&&(r+=Ce),t&&(r+=be),n.filter(e=>!we(e)).reduce((e,t)=>e+(ve.test(t)?ye:t===``?xe:Se),r)}function Ee(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function De(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=Oe({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=Oe({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:j([a,u.pathname]),pathnameBase:Re(j([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=j([a,u.pathnameBase]))}return o}function Oe(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ke(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function ke(e,t=!1,n=!0){E(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:n!=null}),n?`/?([^\\/]+)?`:`/([^\\/]+)`)).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Ae(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return E(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function A(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var je=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Me(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?k(e):e,a;return n?(n=n.replace(/\/\/+/g,`/`),a=n.startsWith(`/`)?Ne(n.substring(1),`/`):Ne(n,t)):a=t,{pathname:a,search:ze(r),hash:Be(i)}}function Ne(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Pe(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Fe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ie(e){let t=Fe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Le(e,t,n,r=!1){let i;typeof e==`string`?i=k(e):(i={...e},T(!i.pathname||!i.pathname.includes(`?`),Pe(`?`,`pathname`,`search`,i)),T(!i.pathname||!i.pathname.includes(`#`),Pe(`#`,`pathname`,`hash`,i)),T(!i.search||!i.search.includes(`#`),Pe(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Me(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var j=e=>e.join(`/`).replace(/\/\/+/g,`/`),Re=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),ze=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Be=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Ve=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function He(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ue(e){return e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\/\/*/g,`/`)||`/`}var We=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ge(e,t){let n=e;if(typeof n!=`string`||!je.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(We)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=A(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{E(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ke=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Ke);var qe=[`GET`,...Ke];new Set(qe);var M=w.createContext(null);M.displayName=`DataRouter`;var N=w.createContext(null);N.displayName=`DataRouterState`;var Je=w.createContext(!1),Ye=w.createContext({isTransitioning:!1});Ye.displayName=`ViewTransition`;var Xe=w.createContext(new Map);Xe.displayName=`Fetchers`;var Ze=w.createContext(null);Ze.displayName=`Await`;var P=w.createContext(null);P.displayName=`Navigation`;var F=w.createContext(null);F.displayName=`Location`;var I=w.createContext({outlet:null,matches:[],isDataRoute:!1});I.displayName=`Route`;var Qe=w.createContext(null);Qe.displayName=`RouteError`;var $e=`REACT_ROUTER_ERROR`,et=`REDIRECT`,tt=`ROUTE_ERROR_RESPONSE`;function nt(e){if(e.startsWith(`${$e}:${et}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function rt(e){if(e.startsWith(`${$e}:${tt}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Ve(t.status,t.statusText,t.data)}catch{}}function it(e,{relative:t}={}){T(L(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=w.useContext(P),{hash:i,pathname:a,search:o}=B(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:j([n,a])),r.createHref({pathname:s,search:o,hash:i})}function L(){return w.useContext(F)!=null}function R(){return T(L(),`useLocation() may be used only in the context of a <Router> component.`),w.useContext(F).location}var at=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function ot(e){w.useContext(P).static||w.useLayoutEffect(e)}function z(){let{isDataRoute:e}=w.useContext(I);return e?Dt():st()}function st(){T(L(),`useNavigate() may be used only in the context of a <Router> component.`);let e=w.useContext(M),{basename:t,navigator:n}=w.useContext(P),{matches:r}=w.useContext(I),{pathname:i}=R(),a=JSON.stringify(Ie(r)),o=w.useRef(!1);return ot(()=>{o.current=!0}),w.useCallback((r,s={})=>{if(E(o.current,at),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Le(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:j([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}w.createContext(null);function ct(){let{matches:e}=w.useContext(I),t=e[e.length-1];return t?t.params:{}}function B(e,{relative:t}={}){let{matches:n}=w.useContext(I),{pathname:r}=R(),i=JSON.stringify(Ie(n));return w.useMemo(()=>Le(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function lt(e,t){return ut(e,t)}function ut(e,t,n,r,i){T(L(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:a}=w.useContext(P),{matches:o}=w.useContext(I),s=o[o.length-1],c=s?s.params:{},l=s?s.pathname:`/`,u=s?s.pathnameBase:`/`,d=s&&s.route;{let e=d&&d.path||``;kt(l,!d||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
2
2
 
3
- Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let f=R(),p;if(t){let e=typeof t==`string`?k(t):t;T(u===`/`||e.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${e.pathname}" was given in the \`location\` prop.`),p=e}else p=f;let m=p.pathname||`/`,h=m;if(u!==`/`){let e=u.replace(/^\//,``).split(`/`);h=`/`+m.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let g=fe(e,{pathname:h});E(d||g!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),E(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let _=_t(g&&g.map(e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:j([u,a.encodeLocation?a.encodeLocation(e.pathname.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?u:j([u,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),o,n,r,i);return t&&_?w.createElement(F.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,...p},navigationType:`POP`}},_):_}function dt(){let e=Et(),t=He(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=w.createElement(w.Fragment,null,w.createElement(`p`,null,`💿 Hey developer 👋`),w.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,w.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,w.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),w.createElement(w.Fragment,null,w.createElement(`h2`,null,`Unexpected Application Error!`),w.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?w.createElement(`pre`,{style:i},n):null,o)}var ft=w.createElement(dt,null),pt=class extends w.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=rt(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:w.createElement(I.Provider,{value:this.props.routeContext},w.createElement(Qe.Provider,{value:e,children:this.props.component}));return this.context?w.createElement(ht,{error:e},t):t}};pt.contextType=Je;var mt=new WeakMap;function ht({children:e,error:t}){let{basename:n}=w.useContext(P);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=nt(t.digest);if(e){let r=mt.get(t);if(r)throw r;let i=Ge(e.location,n);if(We&&!mt.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw mt.set(t,n),n}return w.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function gt({routeContext:e,match:t,children:n}){let r=w.useContext(M);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),w.createElement(I.Provider,{value:e},n)}function _t(e,t=[],n=null,r=null,i=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n?.errors;if(o!=null){let e=a.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);T(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(`,`)}`),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,c=-1;if(n)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:r}=n,i=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||r[t.route.id]===void 0);if(t.route.lazy||i){s=!0,a=c>=0?a.slice(0,c+1):[a[0]];break}}}let l=n&&r?(e,t)=>{r(e,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Ue(n.matches),errorInfo:t})}:void 0;return a.reduceRight((e,r,i)=>{let u,d=!1,f=null,p=null;n&&(u=o&&r.route.id?o[r.route.id]:void 0,f=r.route.errorElement||ft,s&&(c<0&&i===0?(kt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):c===i&&(d=!0,p=r.route.hydrateFallbackElement||null)));let m=t.concat(a.slice(0,i+1)),h=()=>{let t;return t=u?f:d?p:r.route.Component?w.createElement(r.route.Component,null):r.route.element?r.route.element:e,w.createElement(gt,{match:r,routeContext:{outlet:e,matches:m,isDataRoute:n!=null},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||i===0)?w.createElement(pt,{location:n.location,revalidation:n.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function vt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yt(e){let t=w.useContext(M);return T(t,vt(e)),t}function bt(e){let t=w.useContext(N);return T(t,vt(e)),t}function xt(e){let t=w.useContext(I);return T(t,vt(e)),t}function St(e){let t=xt(e),n=t.matches[t.matches.length-1];return T(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Ct(){return St(`useRouteId`)}function wt(){return bt(`useNavigation`).navigation}function Tt(){let{matches:e,loaderData:t}=bt(`useMatches`);return w.useMemo(()=>e.map(e=>me(e,t)),[e,t])}function Et(){let e=w.useContext(Qe),t=bt(`useRouteError`),n=St(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Dt(){let{router:e}=yt(`useNavigate`),t=St(`useNavigate`),n=w.useRef(!1);return ot(()=>{n.current=!0}),w.useCallback(async(r,i={})=>{E(n.current,at),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Ot={};function kt(e,t,n){!t&&!Ot[e]&&(Ot[e]=!0,E(!1,n))}w.useOptimistic,w.memo(At);function At({routes:e,future:t,state:n,onError:r}){return ut(e,void 0,n,r,t)}function jt({basename:e,children:t,initialEntries:n,initialIndex:r,unstable_useTransitions:i}){let a=w.useRef();a.current??=oe({initialEntries:n,initialIndex:r,v5Compat:!0});let o=a.current,[s,c]=w.useState({action:o.action,location:o.location}),l=w.useCallback(e=>{i===!1?c(e):w.startTransition(()=>c(e))},[i]);return w.useLayoutEffect(()=>o.listen(l),[o,l]),w.createElement(Pt,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:o,unstable_useTransitions:i})}function Mt({to:e,replace:t,state:n,relative:r}){T(L(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=w.useContext(P);E(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=w.useContext(I),{pathname:o}=R(),s=z(),c=Le(e,Ie(a),o,r===`path`),l=JSON.stringify(c);return w.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function Nt(e){T(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Pt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){T(!L(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=w.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=k(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`}=n,m=w.useMemo(()=>{let e=A(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p},navigationType:r}},[s,l,u,d,f,p,r]);return E(m!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:w.createElement(P.Provider,{value:c},w.createElement(F.Provider,{children:t,value:m}))}function Ft({children:e,location:t}){return lt(It(e),t)}w.Component;function It(e,t=[]){let n=[];return w.Children.forEach(e,(e,r)=>{if(!w.isValidElement(e))return;let i=[...t,r];if(e.type===w.Fragment){n.push.apply(n,It(e.props.children,i));return}T(e.type===Nt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),T(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=It(e.props.children,i)),n.push(a)}),n}var V=`get`,H=`application/x-www-form-urlencoded`;function U(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Lt(e){return U(e)&&e.tagName.toLowerCase()===`button`}function Rt(e){return U(e)&&e.tagName.toLowerCase()===`form`}function zt(e){return U(e)&&e.tagName.toLowerCase()===`input`}function Bt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Vt(e,t){return e.button===0&&(!t||t===`_self`)&&!Bt(e)}var Ht=null;function Ut(){if(Ht===null)try{new FormData(document.createElement(`form`),0),Ht=!1}catch{Ht=!0}return Ht}var Wt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Gt(e){return e!=null&&!Wt.has(e)?(E(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${H}"`),null):e}function Kt(e,t){let n,r,i,a,o;if(Rt(e)){let o=e.getAttribute(`action`);r=o?A(o,t):null,n=e.getAttribute(`method`)||V,i=Gt(e.getAttribute(`enctype`))||H,a=new FormData(e)}else if(Lt(e)||zt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?A(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||V,i=Gt(e.getAttribute(`formenctype`))||Gt(o.getAttribute(`enctype`))||H,a=new FormData(o,e),!Ut()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(U(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=V,r=null,i=H,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var qt={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Jt=/[&><\u2028\u2029]/g;function Yt(e){return e.replace(Jt,e=>qt[e])}function Xt(e,t){if(e===!1||e==null)throw Error(t)}function Zt(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&A(i.pathname,t)===`/`?i.pathname=`${t.replace(/\/$/,``)}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,``)}.${r}`,i}async function Qt(e,t){if(e.id in t)return t[e.id];try{let n=await ie(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function $t(e){return e!=null&&typeof e.page==`string`}function en(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function tn(e,t,n){return sn((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Qt(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(en).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function nn(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function rn(e,t,{includeHydrateFallback:n}={}){return an(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function an(e){return[...new Set(e)]}function on(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function sn(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!$t(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(on(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function cn(){let e=w.useContext(M);return Xt(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function ln(){let e=w.useContext(N);return Xt(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var un=w.createContext(void 0);un.displayName=`FrameworkContext`;function dn(){let e=w.useContext(un);return Xt(e,`You must render this element inside a <HydratedRouter> element`),e}function fn(e,t){let n=w.useContext(un),[r,i]=w.useState(!1),[a,o]=w.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=w.useRef(null);w.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),w.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:W(s,p),onBlur:W(c,m),onMouseEnter:W(l,p),onMouseLeave:W(u,m),onTouchStart:W(d,p)}]:[a,f,{}]:[!1,f,{}]}function W(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function pn({page:e,...t}){let{router:n}=cn(),r=w.useMemo(()=>fe(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?w.createElement(hn,{page:e,matches:r,...t}):null}function mn(e){let{manifest:t,routeModules:n}=dn(),[r,i]=w.useState([]);return w.useEffect(()=>{let r=!1;return tn(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function hn({page:e,matches:t,...n}){let r=R(),{future:i,manifest:a,routeModules:o}=dn(),{basename:s}=cn(),{loaderData:c,matches:l}=ln(),u=w.useMemo(()=>nn(e,t,l,a,r,`data`),[e,t,l,a,r]),d=w.useMemo(()=>nn(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=w.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=Zt(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=w.useMemo(()=>rn(d,a),[d,a]),m=mn(d);return w.createElement(w.Fragment,null,f.map(e=>w.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>w.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>w.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function gn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}w.Component;var _n=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{_n&&(window.__reactRouterVersion=`7.13.0`)}catch{}function vn({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=w.useRef();i.current??=se({window:r,v5Compat:!0});let a=i.current,[o,s]=w.useState({action:a.action,location:a.location}),c=w.useCallback(e=>{n===!1?s(e):w.startTransition(()=>s(e))},[n]);return w.useLayoutEffect(()=>a.listen(c),[a,c]),w.createElement(Pt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:n})}function yn({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=w.useState({action:n.action,location:n.location}),o=w.useCallback(e=>{r===!1?a(e):w.startTransition(()=>a(e))},[r]);return w.useLayoutEffect(()=>n.listen(o),[n,o]),w.createElement(Pt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}yn.displayName=`unstable_HistoryRouter`;var bn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xn=w.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,state:o,target:s,to:c,preventScrollReset:l,viewTransition:u,unstable_defaultShouldRevalidate:d,...f},p){let{basename:m,unstable_useTransitions:h}=w.useContext(P),g=typeof c==`string`&&bn.test(c),_=Ge(c,m);c=_.to;let v=it(c,{relative:r}),[y,b,x]=fn(n,f),S=On(c,{replace:a,state:o,target:s,preventScrollReset:l,relative:r,viewTransition:u,unstable_defaultShouldRevalidate:d,unstable_useTransitions:h});function ee(t){e&&e(t),t.defaultPrevented||S(t)}let C=w.createElement(`a`,{...f,...x,href:_.absoluteURL||v,onClick:_.isExternal||i?e:ee,ref:gn(p,b),target:s,"data-discover":!g&&t===`render`?`true`:void 0});return y&&!g?w.createElement(w.Fragment,null,C,w.createElement(pn,{page:v})):C});xn.displayName=`Link`;var Sn=w.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=B(a,{relative:c.relative}),d=R(),f=w.useContext(N),{navigator:p,basename:m}=w.useContext(P),h=f!=null&&Rn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=A(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),S={isActive:b,isPending:x,isTransitioning:h},ee=b?e:void 0,C;C=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let te=typeof i==`function`?i(S):i;return w.createElement(xn,{...c,"aria-current":ee,className:C,ref:l,style:te,to:a,viewTransition:o},typeof s==`function`?s(S):s)});Sn.displayName=`NavLink`;var Cn=w.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=V,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:h}=w.useContext(P),g=jn(),_=Mn(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&bn.test(s);return w.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f});h&&n!==!1?w.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});Cn.displayName=`Form`;function wn({getKey:e,storageKey:t,...n}){let r=w.useContext(un),{basename:i}=w.useContext(P),a=R(),o=Tt();In({getKey:e,storageKey:t});let s=w.useMemo(()=>{if(!r||!e)return null;let t=Fn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return w.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Yt(JSON.stringify(t||Nn))}, ${Yt(JSON.stringify(s))})`}})}wn.displayName=`ScrollRestoration`;function Tn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function En(e){let t=w.useContext(M);return T(t,Tn(e)),t}function Dn(e){let t=w.useContext(N);return T(t,Tn(e)),t}function On(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:a,viewTransition:o,unstable_defaultShouldRevalidate:s,unstable_useTransitions:c}={}){let l=z(),u=R(),d=B(e,{relative:a});return w.useCallback(f=>{if(Vt(f,t)){f.preventDefault();let t=n===void 0?O(u)===O(d):n,p=()=>l(e,{replace:t,state:r,preventScrollReset:i,relative:a,viewTransition:o,unstable_defaultShouldRevalidate:s});c?w.startTransition(()=>p()):p()}},[u,l,d,n,r,t,e,i,a,o,s,c])}var kn=0,An=()=>`__${String(++kn)}__`;function jn(){let{router:e}=En(`useSubmit`),{basename:t}=w.useContext(P),n=Ct(),r=e.fetch,i=e.navigate;return w.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Kt(e,t);a.navigate===!1?await r(a.fetcherKey||An(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Mn(e,{relative:t}={}){let{basename:n}=w.useContext(P),r=w.useContext(I);T(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...B(e||`.`,{relative:t})},o=R();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:j([n,a.pathname])),O(a)}var Nn=`react-router-scroll-positions`,Pn={};function Fn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:A(e.pathname,n)||e.pathname},t)),i??=e.key,i}function In({getKey:e,storageKey:t}={}){let{router:n}=En(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Dn(`useScrollRestoration`),{basename:a}=w.useContext(P),o=R(),s=Tt(),c=wt();w.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Ln(w.useCallback(()=>{if(c.state===`idle`){let t=Fn(o,s,a,e);Pn[t]=window.scrollY}try{sessionStorage.setItem(t||Nn,JSON.stringify(Pn))}catch(e){E(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(w.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Nn);e&&(Pn=JSON.parse(e))}catch{}},[t]),w.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Pn,()=>window.scrollY,e?(t,n)=>Fn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),w.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{E(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Ln(e,t){let{capture:n}=t||{};w.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Rn(e,{relative:t}={}){let n=w.useContext(Ye);T(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=En(`useViewTransitionState`),i=B(e,{relative:t});if(!n.isTransitioning)return!1;let a=A(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=A(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Oe(i.pathname,o)!=null||Oe(i.pathname,a)!=null}var zn=o(`AppWindow`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),Bn=o(`BrainCircuit`,[[`path`,{d:`M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`,key:`l5xja`}],[`path`,{d:`M9 13a4.5 4.5 0 0 0 3-4`,key:`10igwf`}],[`path`,{d:`M6.003 5.125A3 3 0 0 0 6.401 6.5`,key:`105sqy`}],[`path`,{d:`M3.477 10.896a4 4 0 0 1 .585-.396`,key:`ql3yin`}],[`path`,{d:`M6 18a4 4 0 0 1-1.967-.516`,key:`2e4loj`}],[`path`,{d:`M12 13h4`,key:`1ku699`}],[`path`,{d:`M12 18h6a2 2 0 0 1 2 2v1`,key:`105ag5`}],[`path`,{d:`M12 8h8`,key:`1lhi5i`}],[`path`,{d:`M16 8V5a2 2 0 0 1 2-2`,key:`u6izg6`}],[`circle`,{cx:`16`,cy:`13`,r:`.5`,key:`ry7gng`}],[`circle`,{cx:`18`,cy:`3`,r:`.5`,key:`1aiba7`}],[`circle`,{cx:`20`,cy:`21`,r:`.5`,key:`yhc1fs`}],[`circle`,{cx:`20`,cy:`8`,r:`.5`,key:`1e43v0`}]]),Vn=o(`Github`,[[`path`,{d:`M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4`,key:`tonef`}],[`path`,{d:`M9 18c-4.51 2-5-2-7-2`,key:`9comsn`}]]),Hn=o(`Grid3x3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M3 15h18`,key:`5xshup`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),Un=o(`Palette`,[[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`path`,{d:`M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z`,key:`12rzf8`}]]),Wn=o(`PanelRightClose`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]);function Gn(e){return e.split(`/`).map(e=>e.trim()).filter(e=>e.length>0)}function G(e){let t=e.trim();try{let e=new URL(t);return{authority:e.hostname,pathSegments:Gn(e.pathname),pathname:e.pathname,raw:t,scheme:e.protocol.replace(/:$/,``).toLowerCase(),searchParams:e.searchParams}}catch{return{authority:``,pathSegments:Gn(t),pathname:t,raw:t,scheme:``,searchParams:new URLSearchParams}}}var Kn=class{constructor(e,t){this.routeDefinitions=e,this.options=t,this.resolve=e=>{let t=G(e);return this.findDefinition(t).resolve(t)},this.normalize=e=>this.options.getNormalizedUri(this.resolve(e)),this.areEquivalent=(e,t)=>this.findDefinition(G(e)).areEquivalent?.(e,t)??this.normalize(e)===this.normalize(t),this.findDefinition=e=>{let t=this.routeDefinitions.find(t=>t.match(e));if(!t)throw Error(`Unsupported resource URI: ${e.raw}`);return t}}},qn=`home`,K=`nextclaw://new-tab`,Jn=`apps`,q=`nextclaw://apps`,Yn=`${q}?tab=service-apps`,Xn=`panel-app`,Zn=`panel-apps`;function Qn(e){return e===`panel-apps`||e===`service-apps`}function $n(e=Zn){return e===Zn?q:Yn}function er(e){try{let t=new URL(e).searchParams.get(`tab`);return Qn(t)?t:Zn}catch{return Zn}}function tr(e){return $n(er(e))}function nr(e){return`nextclaw://panel-app/${encodeURIComponent(e)}`}function rr(e){return e.startsWith(`data:image/`)||e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`/`)}function ir(e){let t=e.icon?.trim();if(t)return rr(t)?{type:`url`,url:t}:{type:`text`,value:t}}function ar(e){return{dedupeKey:`panel-app:${e.id}`,dockIcon:ir(e),historyPolicy:`managed`,kind:Xn,resourceUri:nr(e.id),title:e.title,url:e.contentPath}}function or(e,t){return e===t||e.startsWith(`${t}?`)||e.startsWith(`${t}/`)}function sr(e){let t=e.pathSegments.join(`/`);return b(t?`/${t}`:`/`,`docs`)}function cr(e){let t=e.filter(e=>e.trim().length>0).map(e=>encodeURIComponent(decodeURIComponent(e))).join(`/`);return t?`nextclaw://docs/${t}`:`nextclaw://docs`}function lr(e){let t=x(e),n=t.startsWith(`/`)?t:(()=>{try{return new URL(e).pathname}catch{return``}})();return n?cr(n.split(`/`)):`nextclaw://docs`}function J(e){if(e.scheme===`nextclaw`&&e.authority===`panel-app`)return e.pathSegments[0]??``;let[t,n,r,i]=e.pathSegments;return t===`api`&&n===`panel-apps`&&r!==void 0&&r.length>0&&i===`content`?r:``}function ur(e){return J(e).length>0}function dr(e){let t=J(e);return t?`/api/panel-apps/${encodeURIComponent(decodeURIComponent(t))}/content`:`nextclaw://panel-app`}function fr(e){let t=J(e);return t?`nextclaw://panel-app/${encodeURIComponent(decodeURIComponent(t))}`:`nextclaw://panel-app`}function pr(e,t){let n=G(e),r=G(t),i=J(n),a=J(r);return i.length>0&&a.length>0?decodeURIComponent(i)===decodeURIComponent(a):e===t}var Y=[{defaultUrl:()=>K,id:`home`,kind:qn,match:e=>e.raw===K,resolve:()=>({historyPolicy:`managed`,kind:qn,resourceUri:K,title:n(`docBrowserHomeTitle`),url:K}),areEquivalent:(e,t)=>e===t},{defaultUrl:C,id:`docs-url`,kind:`docs`,match:e=>ee(e.raw),resolve:e=>{let t=b(e.raw,`docs`);return{historyPolicy:`managed`,kind:`docs`,resourceUri:lr(t),title:n(`docBrowserHelp`),url:t}},areEquivalent:(e,t)=>x(e)===x(t)},{defaultUrl:C,id:`nextclaw-docs`,kind:`docs`,match:e=>e.scheme===`nextclaw`&&e.authority===`docs`,resolve:e=>{let t=sr(e);return{historyPolicy:`managed`,kind:`docs`,resourceUri:cr(e.pathSegments),title:n(`docBrowserHelp`),url:t}},areEquivalent:(e,t)=>x(e)===x(t)},{defaultUrl:()=>q,id:`apps`,kind:Jn,match:e=>or(e.raw,q),resolve:e=>{let t=tr(e.raw);return{dedupeKey:`apps`,historyPolicy:`managed`,kind:Jn,resourceUri:t,title:n(t===`nextclaw://apps`?`appsTitle`:`serviceAppsTitle`),url:t}},areEquivalent:(e,t)=>tr(e)===tr(t)},{defaultUrl:()=>`nextclaw://panel-app`,id:`panel-app`,kind:Xn,match:e=>e.scheme===`nextclaw`&&e.authority===`panel-app`||ur(e),resolve:e=>{let t=dr(e),r=J(e);return{dedupeKey:r?`panel-app:${decodeURIComponent(r)}`:void 0,historyPolicy:`managed`,kind:Xn,resourceUri:fr(e),title:n(`panelAppsTitle`),url:t}},areEquivalent:pr},{defaultUrl:()=>`about:blank`,id:`content`,kind:`content`,match:()=>!0,resolve:e=>({historyPolicy:`managed`,kind:`content`,resourceUri:e.raw||`about:blank`,title:y(e.raw,`content`,`Detail`),url:e.raw||`about:blank`}),areEquivalent:(e,t)=>e===t}],mr=Y.map(e=>({areEquivalent:e.areEquivalent,id:e.id,match:e.match,resolve:e.resolve}));function hr(){return[{id:`apps`,label:n(`appsTitle`),target:{type:`right-panel-resource`,uri:q}},{id:`service-apps`,label:n(`serviceAppsTitle`),target:{type:`right-panel-resource`,uri:Yn}},{id:`docs`,label:n(`docBrowserHelp`),target:{options:{newTab:!0},type:`right-panel-resource`,uri:C()}},{id:`skill-marketplace`,label:n(`marketplaceSkillsPageTitle`),target:{path:`/marketplace/skills`,type:`app-route`}}]}var X=t(),gr={apps:{accentClassName:`bg-emerald-50 text-emerald-700`,hoverAccentClassName:`group-hover:bg-emerald-100`,icon:(0,X.jsx)(f,{className:`h-5 w-5`})},"service-apps":{accentClassName:`bg-sky-50 text-sky-700`,hoverAccentClassName:`group-hover:bg-sky-100`,icon:(0,X.jsx)(Hn,{className:`h-5 w-5`})},docs:{accentClassName:`bg-amber-50 text-amber-700`,hoverAccentClassName:`group-hover:bg-amber-100`,icon:(0,X.jsx)(s,{className:`h-5 w-5`})},"skill-marketplace":{accentClassName:`bg-rose-50 text-rose-700`,hoverAccentClassName:`group-hover:bg-rose-100`,icon:(0,X.jsx)(Bn,{className:`h-5 w-5`})}};function _r(e){return gr[e.id]??{accentClassName:`bg-gray-50 text-gray-700`,hoverAccentClassName:`group-hover:bg-gray-100`,icon:(0,X.jsx)(f,{className:`h-5 w-5`})}}function vr({open:e}){let t=z(),n=hr(),r=n=>{if(n.type===`app-route`){t(n.path);return}e(n.uri,n.options)};return(0,X.jsx)(`div`,{className:`h-full overflow-auto bg-background px-4 py-5`,children:(0,X.jsx)(`div`,{className:`mx-auto w-full max-w-[520px]`,children:(0,X.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fit,minmax(76px,1fr))] gap-x-2 gap-y-4`,children:n.map(e=>{let t=_r(e);return(0,X.jsxs)(`button`,{type:`button`,onClick:()=>r(e.target),className:`group flex min-h-[68px] flex-col items-center gap-1.5 rounded-md px-1.5 py-1.5 text-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:[(0,X.jsx)(`span`,{className:i(`flex h-10 w-10 shrink-0 items-center justify-center rounded-md transition-colors`,t.accentClassName,t.hoverAccentClassName),children:t.icon}),(0,X.jsx)(`span`,{className:`line-clamp-2 min-w-0 max-w-full text-xs font-medium leading-snug text-gray-700 transition-colors group-hover:text-gray-900`,children:e.label})]},e.id)})})})})}function yr(e){return e&&ee(e)?`docs`:`content`}var br=class{constructor(){this.resourceUriResolver=new Kn(mr,{getNormalizedUri:e=>e.resourceUri??e.url}),this.resolve=e=>this.resourceUriResolver.resolve(e),this.normalize=e=>this.resourceUriResolver.normalize(e),this.areEquivalent=(e,t)=>this.resourceUriResolver.areEquivalent(e,t),this.resolveOpenTarget=e=>{let{activeTab:t,kind:n,url:r}=e,i=this.resolveRouteDefinition(r,n,t),a=r?.trim()||(!n&&t&&t.kind!==`docs`?t.currentUrl:i.defaultUrl());return i.resolve(G(a))},this.areUrlsEquivalent=(e,t,n,r)=>n===r?this.resolveRouteDefinition(e,n).areEquivalent?.(e,t)??this.areEquivalent(e,t):!1,this.usesManagedHistory=e=>this.resolveRouteDefinition(e.currentUrl,e.kind).resolve(G(e.currentUrl)).historyPolicy===`managed`,this.resolveRouteDefinition=(e,t,n)=>{let r=t??(e?void 0:n?.kind),i=r?Y.find(e=>e.kind===r):void 0;if(i)return i;let a=e?G(e):null,o=a?Y.find(e=>e.match(a)):void 0;if(o)return o;let s=t??n?.kind??yr(e);return Y.find(e=>e.kind===s)??Y[Y.length-1]}}},xr=`nextclaw://docs`,Sr=`github-project`,Cr=`https://github.com/Peiiii/nextclaw`;function wr(){return[{builtIn:!0,icon:{type:`builtin`,name:`apps`},id:`apps`,label:n(`appsTitle`),removable:!1,target:{type:`right-panel-resource`,uri:q}},{builtIn:!0,icon:{type:`builtin`,name:`service-apps`},id:`service-apps`,label:n(`serviceAppsTitle`),removable:!1,target:{type:`right-panel-resource`,uri:Yn}},{builtIn:!0,icon:{type:`builtin`,name:`docs`},id:`docs`,label:n(`docBrowserHelp`),removable:!1,target:{type:`right-panel-resource`,uri:xr}},{builtIn:!0,icon:{type:`builtin`,name:`new-tab`},id:`new-tab`,label:n(`docBrowserHomeTitle`),removable:!1,target:{type:`right-panel-resource`,uri:K}},{builtIn:!0,icon:{type:`builtin`,name:`github`},id:Sr,label:n(`sideDockGitHubProject`),removable:!1,target:{type:`external-url`,url:Cr}}]}var Tr=[`apps`,`docs`,`github`,`new-tab`,`panel-app`,`service-apps`];function Er(e){return!!e&&typeof e==`object`}function Dr(e){return Tr.includes(e)}function Or(e){return!Er(e)||typeof e.type!=`string`?null:e.type===`builtin`&&Dr(e.name)?{type:`builtin`,name:e.name}:e.type===`url`&&typeof e.url==`string`&&e.url.trim().length>0?{type:`url`,url:e.url.trim()}:e.type===`text`&&typeof e.value==`string`&&e.value.trim().length>0?{type:`text`,value:e.value.trim()}:null}function kr(e){if(!Er(e)||typeof e.id!=`string`||e.id.trim().length===0||typeof e.label!=`string`||e.label.trim().length===0||typeof e.createdAt!=`string`||e.createdAt.trim().length===0||!Er(e.target)||e.target.type!==`right-panel-resource`||typeof e.target.uri!=`string`||e.target.uri.trim().length===0)return null;let t=Or(e.icon);return t?{createdAt:e.createdAt,icon:t,id:e.id.trim(),label:e.label.trim(),target:{type:`right-panel-resource`,uri:e.target.uri.trim()}}:null}function Ar(e){if(!Array.isArray(e))return[];let t=new Map;return e.forEach(e=>{let n=kr(e);n&&t.set(n.id,n)}),Array.from(t.values())}function jr(e,t){return{createdAt:t,icon:e.icon,id:e.id,label:e.label,target:e.target}}function Mr(e){return e.target.type===`right-panel-resource`?e.target.uri:null}function Nr(e){return{builtIn:!1,icon:e.icon,id:e.id,label:e.label,removable:!0,target:e.target}}function Pr(e,t){let n=new Set(e.map(e=>e.id)),r=new Set(e.map(Mr).filter(e=>e!==null)),i=t.filter(e=>!n.has(e.id)&&!r.has(e.target.uri)).map(Nr);return[...e,...i]}var Fr=`nextclaw.side-dock.state`,Ir=1;function Lr(e){return!!e&&typeof e==`object`}var Z=r()(g(e=>({isVisible:!0,pinnedItems:[],setVisible:t=>e({isVisible:t}),setPinnedItems:t=>e({pinnedItems:Ar(t)})}),{name:Fr,version:Ir,storage:_(()=>window.localStorage),partialize:e=>({isVisible:e.isVisible,pinnedItems:e.pinnedItems}),merge:(e,t)=>{let n=Lr(e)?Ar(e.pinnedItems):[],r=Lr(e)&&typeof e.isVisible==`boolean`?e.isVisible:!0;return{...t,isVisible:r,pinnedItems:n}}})),Rr={apps:f,docs:s,github:Vn,"new-tab":p,"panel-app":zn,"service-apps":zn},zr=new Set([Sr]),Br=/^\p{Extended_Pictographic}(?:\uFE0F|\uFE0E)?(?:\u200D\p{Extended_Pictographic}(?:\uFE0F|\uFE0E)?)*$/u;function Vr(e){return Br.test(e.trim())}function Hr({icon:e}){if(e.type===`url`)return(0,X.jsx)(`img`,{src:e.url,alt:``,className:`h-5 w-5 rounded object-cover`});if(e.type===`text`)return Vr(e.value)?(0,X.jsx)(`span`,{className:`flex h-7 w-7 items-center justify-center text-[20px] leading-none`,"aria-hidden":`true`,children:e.value}):(0,X.jsx)(`span`,{className:`max-w-7 truncate text-center text-[13px] font-semibold leading-none`,"aria-hidden":`true`,children:e.value});let t=Rr[e.name];return(0,X.jsx)(t,{className:`h-5 w-5`,"aria-hidden":`true`})}function Ur({active:e,item:t,onOpen:r,onUnpin:a}){let{label:o}=t;return(0,X.jsxs)(d,{children:[(0,X.jsxs)(`div`,{className:`group relative`,children:[(0,X.jsx)(c,{asChild:!0,children:(0,X.jsx)(`button`,{type:`button`,"aria-label":o,title:o,"data-side-dock-item-id":t.id,onClick:()=>r(t),className:i(`flex h-10 w-10 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors`,`hover:bg-primary/10 hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,e?`bg-primary/10 text-primary`:`bg-transparent`),children:(0,X.jsx)(Hr,{icon:t.icon})})}),t.removable?(0,X.jsx)(`button`,{type:`button`,"aria-label":n(`sideDockUnpinItem`),title:n(`sideDockUnpinItem`),onClick:e=>{e.stopPropagation(),a(t)},className:`absolute -right-1 -top-1 hidden h-4 w-4 items-center justify-center rounded-full bg-background text-muted-foreground shadow-sm ring-1 ring-border/70 transition-colors hover:bg-muted hover:text-foreground group-hover:flex focus-visible:flex focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:(0,X.jsx)(m,{className:`h-3 w-3`,"aria-hidden":`true`})}):null]}),(0,X.jsx)(l,{side:`left`,children:o})]})}function Wr({icon:e,label:t,onClick:n}){return(0,X.jsxs)(d,{children:[(0,X.jsx)(c,{asChild:!0,children:(0,X.jsx)(`button`,{type:`button`,"aria-label":t,title:t,"data-side-dock-action":`hide`,onClick:n,className:i(`flex h-10 w-10 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors`,`hover:bg-primary/10 hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`),children:(0,X.jsx)(e,{className:`h-5 w-5`,"aria-hidden":`true`})})}),(0,X.jsx)(l,{side:`left`,children:t})]})}function Q(e){return e?.trim()??``}function Gr(e){return e.target.type===`right-panel-resource`?e.target.uri:null}function Kr(e,t,n,r=!1){if(!t||!n)return!1;let i=Q(Gr(e)??void 0);if(!i)return!1;let a=Q(n.resourceUri);return a&&a===i||Q(n.currentUrl)===i?!0:r?!1:e.id===`docs`&&n.kind===`docs`}function qr(e,t){if(!t)return!1;let n=Q(t.resourceUri),r=Q(t.currentUrl);return e.some(e=>{let t=Q(Gr(e)??void 0);return t===n||t===r})}function Jr(e){return zr.has(e.id)}function Yr({manager:e}){let t=Z(e=>e.pinnedItems),r=Z(e=>e.setVisible),{currentTab:i,isOpen:a}=S(),{confirm:o,ConfirmDialog:s}=v(),c=Pr(wr(),t),l=c.filter(e=>!Jr(e)),d=c.filter(Jr),f=qr(c,i),p=async()=>{await o({title:n(`sideDockHideConfirmTitle`),description:n(`sideDockHideConfirmDescription`),confirmLabel:n(`sideDockHideConfirmAction`),cancelLabel:n(`cancel`)})&&r(!1)};return(0,X.jsx)(u,{delayDuration:250,children:(0,X.jsxs)(`aside`,{"data-testid":`side-dock`,className:`z-30 flex h-full w-14 shrink-0 flex-col items-center gap-1 border-l border-border/60 bg-background/95 px-2 py-3`,children:[(0,X.jsx)(`div`,{className:`flex w-full flex-col items-center gap-1`,children:l.map(t=>(0,X.jsx)(Ur,{active:Kr(t,a,i,f),item:t,onOpen:e.openItem,onUnpin:t=>e.unpinItem(t.id)},t.id))}),d.length>0?(0,X.jsxs)(`div`,{"data-testid":`side-dock-utility`,className:`mt-auto flex w-full flex-col items-center gap-1`,children:[d.map(t=>(0,X.jsx)(Ur,{active:Kr(t,a,i,f),item:t,onOpen:e.openItem,onUnpin:t=>e.unpinItem(t.id)},t.id)),(0,X.jsx)(Wr,{icon:Wn,label:n(`sideDockHide`),onClick:()=>{p()}})]}):null,(0,X.jsx)(s,{})]})})}var Xr=`pinned`,Zr=new Set([`apps`,`docs`,`github`,`new-tab`,`panel-app`,`service-apps`]);function $(e){return e.trim()}function Qr(e){let t=0;return Array.from($(e)).forEach(e=>{t=t*31+e.charCodeAt(0)>>>0}),`${Xr}-${$(e).replace(/[^a-zA-Z0-9]+/g,`-`).replace(/^-+|-+$/g,``).toLowerCase()||`resource`}-${t.toString(36)}`}function $r(e){return e?.type===`builtin`&&Zr.has(e.name)?{type:`builtin`,name:e.name}:e?.type===`url`&&e.url.trim().length>0?{type:`url`,url:e.url.trim()}:e?.type===`text`&&e.value.trim().length>0?{type:`text`,value:e.value.trim()}:null}function ei(e){return e.kind===`docs`?`docs`:e.kind===`home`?`new-tab`:e.kind===`apps`?e.resourceUri?.includes(`service-apps`)?`service-apps`:`apps`:e.kind===`panel-app`?`panel-app`:`apps`}var ti=class{constructor(e){this.docBrowserManager=e,this.getItems=()=>Pr(wr(),Z.getState().pinnedItems),this.openItem=async e=>{if(e.target.type===`right-panel-resource`){this.docBrowserManager.open(e.target.uri,{dockIcon:e.icon,title:e.label});return}e.target.type===`external-url`&&await h.openExternalUrl(e.target.url)},this.getDockState=e=>{let t=this.getTabResourceUri(e);if(!t)return{canDock:!1,isDocked:!1,removable:!1};let n=this.findItemByUri(t);return{canDock:!0,isDocked:!!n,removable:n?.removable===!0}},this.pinTab=(e,t=new Date().toISOString())=>{let n=this.getTabResourceUri(e);!e||!n||this.findItemByUri(n)||this.pinItem({builtIn:!1,icon:$r(e.dockIcon)??{type:`builtin`,name:ei(e)},id:Qr(n),label:e.title.trim()||n,removable:!0,target:{type:`right-panel-resource`,uri:n}},t)},this.unpinTab=e=>{let t=this.getTabResourceUri(e),n=t?this.findItemByUri(t):void 0;n?.removable&&this.unpinItem(n.id)},this.pinItem=(e,t=new Date().toISOString())=>{if(!e.removable||e.target.type!==`right-panel-resource`)return;let n=$(e.target.uri),r={...e,target:{type:`right-panel-resource`,uri:n}};this.setPinnedItems(i=>i.some(t=>t.id===e.id||$(t.target.uri)===n)?i:[...i,jr(r,t)])},this.unpinItem=e=>{this.setPinnedItems(t=>t.filter(t=>t.id!==e))},this.reorderPinnedItems=e=>{this.setPinnedItems(t=>{let n=new Map(t.map(e=>[e.id,e])),r=e.map(e=>n.get(e)).filter(e=>e!==void 0),i=new Set(r.map(e=>e.id)),a=t.filter(e=>!i.has(e.id));return[...r,...a]})},this.setPinnedItems=e=>{let{pinnedItems:t,setPinnedItems:n}=Z.getState();n(e(t))},this.getTabResourceUri=e=>{let t=e?.resourceUri??e?.currentUrl,n=t?$(t):``;return n.length>0?n:null},this.findItemByUri=e=>{let t=$(e);return this.getItems().find(e=>e.target.type===`right-panel-resource`&&$(e.target.uri)===t)}}};export{R as C,ie as E,Ft as S,ct as T,xn as _,vr as a,Mt as b,qn as c,nr as d,ar as f,vn as g,zn as h,br as i,Xn as l,Bn as m,Yr as n,Jn as o,Un as p,Z as r,q as s,ti as t,Yn as u,jt as v,z as w,Nt as x,Sn as y};
3
+ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let f=R(),p;if(t){let e=typeof t==`string`?k(t):t;T(u===`/`||e.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${e.pathname}" was given in the \`location\` prop.`),p=e}else p=f;let m=p.pathname||`/`,h=m;if(u!==`/`){let e=u.replace(/^\//,``).split(`/`);h=`/`+m.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let g=fe(e,{pathname:h});E(d||g!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),E(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let _=_t(g&&g.map(e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:j([u,a.encodeLocation?a.encodeLocation(e.pathname.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?u:j([u,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),o,n,r,i);return t&&_?w.createElement(F.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,...p},navigationType:`POP`}},_):_}function dt(){let e=Et(),t=He(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=w.createElement(w.Fragment,null,w.createElement(`p`,null,`💿 Hey developer 👋`),w.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,w.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,w.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),w.createElement(w.Fragment,null,w.createElement(`h2`,null,`Unexpected Application Error!`),w.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?w.createElement(`pre`,{style:i},n):null,o)}var ft=w.createElement(dt,null),pt=class extends w.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=rt(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:w.createElement(I.Provider,{value:this.props.routeContext},w.createElement(Qe.Provider,{value:e,children:this.props.component}));return this.context?w.createElement(ht,{error:e},t):t}};pt.contextType=Je;var mt=new WeakMap;function ht({children:e,error:t}){let{basename:n}=w.useContext(P);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=nt(t.digest);if(e){let r=mt.get(t);if(r)throw r;let i=Ge(e.location,n);if(We&&!mt.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw mt.set(t,n),n}return w.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function gt({routeContext:e,match:t,children:n}){let r=w.useContext(M);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),w.createElement(I.Provider,{value:e},n)}function _t(e,t=[],n=null,r=null,i=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n?.errors;if(o!=null){let e=a.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);T(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(`,`)}`),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,c=-1;if(n)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:r}=n,i=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||r[t.route.id]===void 0);if(t.route.lazy||i){s=!0,a=c>=0?a.slice(0,c+1):[a[0]];break}}}let l=n&&r?(e,t)=>{r(e,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Ue(n.matches),errorInfo:t})}:void 0;return a.reduceRight((e,r,i)=>{let u,d=!1,f=null,p=null;n&&(u=o&&r.route.id?o[r.route.id]:void 0,f=r.route.errorElement||ft,s&&(c<0&&i===0?(kt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):c===i&&(d=!0,p=r.route.hydrateFallbackElement||null)));let m=t.concat(a.slice(0,i+1)),h=()=>{let t;return t=u?f:d?p:r.route.Component?w.createElement(r.route.Component,null):r.route.element?r.route.element:e,w.createElement(gt,{match:r,routeContext:{outlet:e,matches:m,isDataRoute:n!=null},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||i===0)?w.createElement(pt,{location:n.location,revalidation:n.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function vt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yt(e){let t=w.useContext(M);return T(t,vt(e)),t}function bt(e){let t=w.useContext(N);return T(t,vt(e)),t}function xt(e){let t=w.useContext(I);return T(t,vt(e)),t}function St(e){let t=xt(e),n=t.matches[t.matches.length-1];return T(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Ct(){return St(`useRouteId`)}function wt(){return bt(`useNavigation`).navigation}function Tt(){let{matches:e,loaderData:t}=bt(`useMatches`);return w.useMemo(()=>e.map(e=>me(e,t)),[e,t])}function Et(){let e=w.useContext(Qe),t=bt(`useRouteError`),n=St(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Dt(){let{router:e}=yt(`useNavigate`),t=St(`useNavigate`),n=w.useRef(!1);return ot(()=>{n.current=!0}),w.useCallback(async(r,i={})=>{E(n.current,at),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Ot={};function kt(e,t,n){!t&&!Ot[e]&&(Ot[e]=!0,E(!1,n))}w.useOptimistic,w.memo(At);function At({routes:e,future:t,state:n,onError:r}){return ut(e,void 0,n,r,t)}function jt({basename:e,children:t,initialEntries:n,initialIndex:r,unstable_useTransitions:i}){let a=w.useRef();a.current??=oe({initialEntries:n,initialIndex:r,v5Compat:!0});let o=a.current,[s,c]=w.useState({action:o.action,location:o.location}),l=w.useCallback(e=>{i===!1?c(e):w.startTransition(()=>c(e))},[i]);return w.useLayoutEffect(()=>o.listen(l),[o,l]),w.createElement(Pt,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:o,unstable_useTransitions:i})}function Mt({to:e,replace:t,state:n,relative:r}){T(L(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=w.useContext(P);E(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=w.useContext(I),{pathname:o}=R(),s=z(),c=Le(e,Ie(a),o,r===`path`),l=JSON.stringify(c);return w.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function Nt(e){T(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Pt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){T(!L(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=w.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=k(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`}=n,m=w.useMemo(()=>{let e=A(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p},navigationType:r}},[s,l,u,d,f,p,r]);return E(m!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:w.createElement(P.Provider,{value:c},w.createElement(F.Provider,{children:t,value:m}))}function Ft({children:e,location:t}){return lt(It(e),t)}w.Component;function It(e,t=[]){let n=[];return w.Children.forEach(e,(e,r)=>{if(!w.isValidElement(e))return;let i=[...t,r];if(e.type===w.Fragment){n.push.apply(n,It(e.props.children,i));return}T(e.type===Nt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),T(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=It(e.props.children,i)),n.push(a)}),n}var V=`get`,H=`application/x-www-form-urlencoded`;function U(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Lt(e){return U(e)&&e.tagName.toLowerCase()===`button`}function Rt(e){return U(e)&&e.tagName.toLowerCase()===`form`}function zt(e){return U(e)&&e.tagName.toLowerCase()===`input`}function Bt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Vt(e,t){return e.button===0&&(!t||t===`_self`)&&!Bt(e)}var Ht=null;function Ut(){if(Ht===null)try{new FormData(document.createElement(`form`),0),Ht=!1}catch{Ht=!0}return Ht}var Wt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Gt(e){return e!=null&&!Wt.has(e)?(E(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${H}"`),null):e}function Kt(e,t){let n,r,i,a,o;if(Rt(e)){let o=e.getAttribute(`action`);r=o?A(o,t):null,n=e.getAttribute(`method`)||V,i=Gt(e.getAttribute(`enctype`))||H,a=new FormData(e)}else if(Lt(e)||zt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?A(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||V,i=Gt(e.getAttribute(`formenctype`))||Gt(o.getAttribute(`enctype`))||H,a=new FormData(o,e),!Ut()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(U(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=V,r=null,i=H,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var qt={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Jt=/[&><\u2028\u2029]/g;function Yt(e){return e.replace(Jt,e=>qt[e])}function Xt(e,t){if(e===!1||e==null)throw Error(t)}function Zt(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&A(i.pathname,t)===`/`?i.pathname=`${t.replace(/\/$/,``)}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,``)}.${r}`,i}async function Qt(e,t){if(e.id in t)return t[e.id];try{let n=await ie(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function $t(e){return e!=null&&typeof e.page==`string`}function en(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function tn(e,t,n){return sn((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Qt(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(en).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function nn(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function rn(e,t,{includeHydrateFallback:n}={}){return an(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function an(e){return[...new Set(e)]}function on(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function sn(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!$t(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(on(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function cn(){let e=w.useContext(M);return Xt(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function ln(){let e=w.useContext(N);return Xt(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var un=w.createContext(void 0);un.displayName=`FrameworkContext`;function dn(){let e=w.useContext(un);return Xt(e,`You must render this element inside a <HydratedRouter> element`),e}function fn(e,t){let n=w.useContext(un),[r,i]=w.useState(!1),[a,o]=w.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=w.useRef(null);w.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),w.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:W(s,p),onBlur:W(c,m),onMouseEnter:W(l,p),onMouseLeave:W(u,m),onTouchStart:W(d,p)}]:[a,f,{}]:[!1,f,{}]}function W(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function pn({page:e,...t}){let{router:n}=cn(),r=w.useMemo(()=>fe(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?w.createElement(hn,{page:e,matches:r,...t}):null}function mn(e){let{manifest:t,routeModules:n}=dn(),[r,i]=w.useState([]);return w.useEffect(()=>{let r=!1;return tn(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function hn({page:e,matches:t,...n}){let r=R(),{future:i,manifest:a,routeModules:o}=dn(),{basename:s}=cn(),{loaderData:c,matches:l}=ln(),u=w.useMemo(()=>nn(e,t,l,a,r,`data`),[e,t,l,a,r]),d=w.useMemo(()=>nn(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=w.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=Zt(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=w.useMemo(()=>rn(d,a),[d,a]),m=mn(d);return w.createElement(w.Fragment,null,f.map(e=>w.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>w.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>w.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function gn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}w.Component;var _n=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{_n&&(window.__reactRouterVersion=`7.13.0`)}catch{}function vn({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=w.useRef();i.current??=se({window:r,v5Compat:!0});let a=i.current,[o,s]=w.useState({action:a.action,location:a.location}),c=w.useCallback(e=>{n===!1?s(e):w.startTransition(()=>s(e))},[n]);return w.useLayoutEffect(()=>a.listen(c),[a,c]),w.createElement(Pt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:n})}function yn({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=w.useState({action:n.action,location:n.location}),o=w.useCallback(e=>{r===!1?a(e):w.startTransition(()=>a(e))},[r]);return w.useLayoutEffect(()=>n.listen(o),[n,o]),w.createElement(Pt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}yn.displayName=`unstable_HistoryRouter`;var bn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xn=w.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,state:o,target:s,to:c,preventScrollReset:l,viewTransition:u,unstable_defaultShouldRevalidate:d,...f},p){let{basename:m,unstable_useTransitions:h}=w.useContext(P),g=typeof c==`string`&&bn.test(c),_=Ge(c,m);c=_.to;let v=it(c,{relative:r}),[y,b,x]=fn(n,f),S=On(c,{replace:a,state:o,target:s,preventScrollReset:l,relative:r,viewTransition:u,unstable_defaultShouldRevalidate:d,unstable_useTransitions:h});function ee(t){e&&e(t),t.defaultPrevented||S(t)}let C=w.createElement(`a`,{...f,...x,href:_.absoluteURL||v,onClick:_.isExternal||i?e:ee,ref:gn(p,b),target:s,"data-discover":!g&&t===`render`?`true`:void 0});return y&&!g?w.createElement(w.Fragment,null,C,w.createElement(pn,{page:v})):C});xn.displayName=`Link`;var Sn=w.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=B(a,{relative:c.relative}),d=R(),f=w.useContext(N),{navigator:p,basename:m}=w.useContext(P),h=f!=null&&Rn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=A(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),S={isActive:b,isPending:x,isTransitioning:h},ee=b?e:void 0,C;C=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let te=typeof i==`function`?i(S):i;return w.createElement(xn,{...c,"aria-current":ee,className:C,ref:l,style:te,to:a,viewTransition:o},typeof s==`function`?s(S):s)});Sn.displayName=`NavLink`;var Cn=w.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=V,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:h}=w.useContext(P),g=jn(),_=Mn(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&bn.test(s);return w.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f});h&&n!==!1?w.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});Cn.displayName=`Form`;function wn({getKey:e,storageKey:t,...n}){let r=w.useContext(un),{basename:i}=w.useContext(P),a=R(),o=Tt();In({getKey:e,storageKey:t});let s=w.useMemo(()=>{if(!r||!e)return null;let t=Fn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return w.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Yt(JSON.stringify(t||Nn))}, ${Yt(JSON.stringify(s))})`}})}wn.displayName=`ScrollRestoration`;function Tn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function En(e){let t=w.useContext(M);return T(t,Tn(e)),t}function Dn(e){let t=w.useContext(N);return T(t,Tn(e)),t}function On(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:a,viewTransition:o,unstable_defaultShouldRevalidate:s,unstable_useTransitions:c}={}){let l=z(),u=R(),d=B(e,{relative:a});return w.useCallback(f=>{if(Vt(f,t)){f.preventDefault();let t=n===void 0?O(u)===O(d):n,p=()=>l(e,{replace:t,state:r,preventScrollReset:i,relative:a,viewTransition:o,unstable_defaultShouldRevalidate:s});c?w.startTransition(()=>p()):p()}},[u,l,d,n,r,t,e,i,a,o,s,c])}var kn=0,An=()=>`__${String(++kn)}__`;function jn(){let{router:e}=En(`useSubmit`),{basename:t}=w.useContext(P),n=Ct(),r=e.fetch,i=e.navigate;return w.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Kt(e,t);a.navigate===!1?await r(a.fetcherKey||An(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Mn(e,{relative:t}={}){let{basename:n}=w.useContext(P),r=w.useContext(I);T(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...B(e||`.`,{relative:t})},o=R();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:j([n,a.pathname])),O(a)}var Nn=`react-router-scroll-positions`,Pn={};function Fn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:A(e.pathname,n)||e.pathname},t)),i??=e.key,i}function In({getKey:e,storageKey:t}={}){let{router:n}=En(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Dn(`useScrollRestoration`),{basename:a}=w.useContext(P),o=R(),s=Tt(),c=wt();w.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Ln(w.useCallback(()=>{if(c.state===`idle`){let t=Fn(o,s,a,e);Pn[t]=window.scrollY}try{sessionStorage.setItem(t||Nn,JSON.stringify(Pn))}catch(e){E(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(w.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Nn);e&&(Pn=JSON.parse(e))}catch{}},[t]),w.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Pn,()=>window.scrollY,e?(t,n)=>Fn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),w.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{E(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Ln(e,t){let{capture:n}=t||{};w.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Rn(e,{relative:t}={}){let n=w.useContext(Ye);T(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=En(`useViewTransitionState`),i=B(e,{relative:t});if(!n.isTransitioning)return!1;let a=A(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=A(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Oe(i.pathname,o)!=null||Oe(i.pathname,a)!=null}var zn=o(`AppWindow`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),Bn=o(`BrainCircuit`,[[`path`,{d:`M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`,key:`l5xja`}],[`path`,{d:`M9 13a4.5 4.5 0 0 0 3-4`,key:`10igwf`}],[`path`,{d:`M6.003 5.125A3 3 0 0 0 6.401 6.5`,key:`105sqy`}],[`path`,{d:`M3.477 10.896a4 4 0 0 1 .585-.396`,key:`ql3yin`}],[`path`,{d:`M6 18a4 4 0 0 1-1.967-.516`,key:`2e4loj`}],[`path`,{d:`M12 13h4`,key:`1ku699`}],[`path`,{d:`M12 18h6a2 2 0 0 1 2 2v1`,key:`105ag5`}],[`path`,{d:`M12 8h8`,key:`1lhi5i`}],[`path`,{d:`M16 8V5a2 2 0 0 1 2-2`,key:`u6izg6`}],[`circle`,{cx:`16`,cy:`13`,r:`.5`,key:`ry7gng`}],[`circle`,{cx:`18`,cy:`3`,r:`.5`,key:`1aiba7`}],[`circle`,{cx:`20`,cy:`21`,r:`.5`,key:`yhc1fs`}],[`circle`,{cx:`20`,cy:`8`,r:`.5`,key:`1e43v0`}]]),Vn=o(`Github`,[[`path`,{d:`M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4`,key:`tonef`}],[`path`,{d:`M9 18c-4.51 2-5-2-7-2`,key:`9comsn`}]]),Hn=o(`Grid3x3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M3 15h18`,key:`5xshup`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),Un=o(`Palette`,[[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`path`,{d:`M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z`,key:`12rzf8`}]]),Wn=o(`PanelRightClose`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]);function Gn(e){return e.split(`/`).map(e=>e.trim()).filter(e=>e.length>0)}function G(e){let t=e.trim();try{let e=new URL(t);return{authority:e.hostname,pathSegments:Gn(e.pathname),pathname:e.pathname,raw:t,scheme:e.protocol.replace(/:$/,``).toLowerCase(),searchParams:e.searchParams}}catch{return{authority:``,pathSegments:Gn(t),pathname:t,raw:t,scheme:``,searchParams:new URLSearchParams}}}var Kn=class{constructor(e,t){this.routeDefinitions=e,this.options=t,this.resolve=e=>{let t=G(e);return this.findDefinition(t).resolve(t)},this.normalize=e=>this.options.getNormalizedUri(this.resolve(e)),this.areEquivalent=(e,t)=>this.findDefinition(G(e)).areEquivalent?.(e,t)??this.normalize(e)===this.normalize(t),this.findDefinition=e=>{let t=this.routeDefinitions.find(t=>t.match(e));if(!t)throw Error(`Unsupported resource URI: ${e.raw}`);return t}}},qn=`home`,K=`nextclaw://new-tab`,Jn=`apps`,q=`nextclaw://apps`,Yn=`${q}?tab=service-apps`,Xn=`panel-app`,Zn=`panel-apps`;function Qn(e){return e===`panel-apps`||e===`service-apps`}function $n(e=Zn){return e===Zn?q:Yn}function er(e){try{let t=new URL(e).searchParams.get(`tab`);return Qn(t)?t:Zn}catch{return Zn}}function tr(e){return $n(er(e))}function nr(e){return`nextclaw://panel-app/${encodeURIComponent(e)}`}function rr(e){return e.startsWith(`data:image/`)||e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`/`)}function ir(e){let t=e.icon?.trim();if(t)return rr(t)?{type:`url`,url:t}:{type:`text`,value:t}}function ar(e){return{dedupeKey:`panel-app:${e.id}`,dockIcon:ir(e),historyPolicy:`managed`,kind:Xn,resourceUri:nr(e.id),title:e.title,url:e.contentPath}}function or(e,t){return e===t||e.startsWith(`${t}?`)||e.startsWith(`${t}/`)}function sr(e){let t=e.pathSegments.join(`/`);return b(t?`/${t}`:`/`,`docs`)}function cr(e){let t=e.filter(e=>e.trim().length>0).map(e=>encodeURIComponent(decodeURIComponent(e))).join(`/`);return t?`nextclaw://docs/${t}`:`nextclaw://docs`}function lr(e){let t=x(e),n=t.startsWith(`/`)?t:(()=>{try{return new URL(e).pathname}catch{return``}})();return n?cr(n.split(`/`)):`nextclaw://docs`}function J(e){if(e.scheme===`nextclaw`&&e.authority===`panel-app`)return e.pathSegments[0]??``;let[t,n,r,i]=e.pathSegments;return t===`api`&&n===`panel-apps`&&r!==void 0&&r.length>0&&i===`content`?r:``}function ur(e){return J(e).length>0}function dr(e){let t=J(e);return t?`/api/panel-apps/${encodeURIComponent(decodeURIComponent(t))}/content`:`nextclaw://panel-app`}function fr(e){let t=J(e);return t?`nextclaw://panel-app/${encodeURIComponent(decodeURIComponent(t))}`:`nextclaw://panel-app`}function pr(e,t){let n=G(e),r=G(t),i=J(n),a=J(r);return i.length>0&&a.length>0?decodeURIComponent(i)===decodeURIComponent(a):e===t}var Y=[{defaultUrl:()=>K,id:`home`,kind:qn,match:e=>e.raw===K,resolve:()=>({historyPolicy:`managed`,kind:qn,resourceUri:K,title:n(`docBrowserHomeTitle`),url:K}),areEquivalent:(e,t)=>e===t},{defaultUrl:C,id:`docs-url`,kind:`docs`,match:e=>ee(e.raw),resolve:e=>{let t=b(e.raw,`docs`);return{historyPolicy:`managed`,kind:`docs`,resourceUri:lr(t),title:n(`docBrowserHelp`),url:t}},areEquivalent:(e,t)=>x(e)===x(t)},{defaultUrl:C,id:`nextclaw-docs`,kind:`docs`,match:e=>e.scheme===`nextclaw`&&e.authority===`docs`,resolve:e=>{let t=sr(e);return{historyPolicy:`managed`,kind:`docs`,resourceUri:cr(e.pathSegments),title:n(`docBrowserHelp`),url:t}},areEquivalent:(e,t)=>x(e)===x(t)},{defaultUrl:()=>q,id:`apps`,kind:Jn,match:e=>or(e.raw,q),resolve:e=>{let t=tr(e.raw);return{dedupeKey:`apps`,historyPolicy:`managed`,kind:Jn,resourceUri:t,title:n(t===`nextclaw://apps`?`appsTitle`:`serviceAppsTitle`),url:t}},areEquivalent:(e,t)=>tr(e)===tr(t)},{defaultUrl:()=>`nextclaw://panel-app`,id:`panel-app`,kind:Xn,match:e=>e.scheme===`nextclaw`&&e.authority===`panel-app`||ur(e),resolve:e=>{let t=dr(e),r=J(e);return{dedupeKey:r?`panel-app:${decodeURIComponent(r)}`:void 0,historyPolicy:`managed`,kind:Xn,resourceUri:fr(e),title:n(`panelAppsTitle`),url:t}},areEquivalent:pr},{defaultUrl:()=>`about:blank`,id:`content`,kind:`content`,match:()=>!0,resolve:e=>({historyPolicy:`managed`,kind:`content`,resourceUri:e.raw||`about:blank`,title:y(e.raw,`content`,`Detail`),url:e.raw||`about:blank`}),areEquivalent:(e,t)=>e===t}],mr=Y.map(e=>({areEquivalent:e.areEquivalent,id:e.id,match:e.match,resolve:e.resolve}));function hr(){return[{id:`apps`,label:n(`appsTitle`),target:{type:`right-panel-resource`,uri:q}},{id:`service-apps`,label:n(`serviceAppsTitle`),target:{type:`right-panel-resource`,uri:Yn}},{id:`docs`,label:n(`docBrowserHelp`),target:{options:{newTab:!0},type:`right-panel-resource`,uri:C()}},{id:`skill-marketplace`,label:n(`marketplaceSkillsPageTitle`),target:{path:`/marketplace/skills`,type:`app-route`}}]}var X=t(),gr={apps:{accentClassName:`bg-emerald-50 text-emerald-700`,hoverAccentClassName:`group-hover:bg-emerald-100`,icon:(0,X.jsx)(f,{className:`h-5 w-5`})},"service-apps":{accentClassName:`bg-sky-50 text-sky-700`,hoverAccentClassName:`group-hover:bg-sky-100`,icon:(0,X.jsx)(Hn,{className:`h-5 w-5`})},docs:{accentClassName:`bg-amber-50 text-amber-700`,hoverAccentClassName:`group-hover:bg-amber-100`,icon:(0,X.jsx)(s,{className:`h-5 w-5`})},"skill-marketplace":{accentClassName:`bg-rose-50 text-rose-700`,hoverAccentClassName:`group-hover:bg-rose-100`,icon:(0,X.jsx)(Bn,{className:`h-5 w-5`})}};function _r(e){return gr[e.id]??{accentClassName:`bg-gray-50 text-gray-700`,hoverAccentClassName:`group-hover:bg-gray-100`,icon:(0,X.jsx)(f,{className:`h-5 w-5`})}}function vr({open:e}){let t=z(),n=hr(),r=n=>{if(n.type===`app-route`){t(n.path);return}e(n.uri,n.options)};return(0,X.jsx)(`div`,{className:`h-full overflow-auto bg-background px-4 py-5`,children:(0,X.jsx)(`div`,{className:`mx-auto w-full max-w-[520px]`,children:(0,X.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fit,minmax(76px,1fr))] gap-x-2 gap-y-4`,children:n.map(e=>{let t=_r(e);return(0,X.jsxs)(`button`,{type:`button`,onClick:()=>r(e.target),className:`group flex min-h-[68px] flex-col items-center gap-1.5 rounded-md px-1.5 py-1.5 text-center focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,children:[(0,X.jsx)(`span`,{className:i(`flex h-10 w-10 shrink-0 items-center justify-center rounded-md transition-colors`,t.accentClassName,t.hoverAccentClassName),children:t.icon}),(0,X.jsx)(`span`,{className:`line-clamp-2 min-w-0 max-w-full text-xs font-medium leading-snug text-gray-700 transition-colors group-hover:text-gray-900`,children:e.label})]},e.id)})})})})}function yr(e){return e&&ee(e)?`docs`:`content`}var br=class{constructor(){this.resourceUriResolver=new Kn(mr,{getNormalizedUri:e=>e.resourceUri??e.url}),this.resolve=e=>this.resourceUriResolver.resolve(e),this.normalize=e=>this.resourceUriResolver.normalize(e),this.areEquivalent=(e,t)=>this.resourceUriResolver.areEquivalent(e,t),this.resolveOpenTarget=e=>{let{activeTab:t,kind:n,url:r}=e,i=this.resolveRouteDefinition(r,n,t),a=r?.trim()||(!n&&t&&t.kind!==`docs`?t.currentUrl:i.defaultUrl());return i.resolve(G(a))},this.areUrlsEquivalent=(e,t,n,r)=>n===r?this.resolveRouteDefinition(e,n).areEquivalent?.(e,t)??this.areEquivalent(e,t):!1,this.usesManagedHistory=e=>this.resolveRouteDefinition(e.currentUrl,e.kind).resolve(G(e.currentUrl)).historyPolicy===`managed`,this.resolveRouteDefinition=(e,t,n)=>{let r=t??(e?void 0:n?.kind),i=r?Y.find(e=>e.kind===r):void 0;if(i)return i;let a=e?G(e):null,o=a?Y.find(e=>e.match(a)):void 0;if(o)return o;let s=t??n?.kind??yr(e);return Y.find(e=>e.kind===s)??Y[Y.length-1]}}},xr=`nextclaw://docs`,Sr=`github-project`,Cr=`https://github.com/Peiiii/nextclaw`;function wr(){return[{builtIn:!0,icon:{type:`builtin`,name:`apps`},id:`apps`,label:n(`appsTitle`),removable:!1,target:{type:`right-panel-resource`,uri:q}},{builtIn:!0,icon:{type:`builtin`,name:`service-apps`},id:`service-apps`,label:n(`serviceAppsTitle`),removable:!1,target:{type:`right-panel-resource`,uri:Yn}},{builtIn:!0,icon:{type:`builtin`,name:`docs`},id:`docs`,label:n(`docBrowserHelp`),removable:!1,target:{type:`right-panel-resource`,uri:xr}},{builtIn:!0,icon:{type:`builtin`,name:`new-tab`},id:`new-tab`,label:n(`docBrowserHomeTitle`),removable:!1,target:{type:`right-panel-resource`,uri:K}},{builtIn:!0,icon:{type:`builtin`,name:`github`},id:Sr,label:n(`sideDockGitHubProject`),removable:!1,target:{type:`external-url`,url:Cr}}]}var Tr=[`apps`,`docs`,`github`,`new-tab`,`panel-app`,`service-apps`];function Er(e){return!!e&&typeof e==`object`}function Dr(e){return Tr.includes(e)}function Or(e){return!Er(e)||typeof e.type!=`string`?null:e.type===`builtin`&&Dr(e.name)?{type:`builtin`,name:e.name}:e.type===`url`&&typeof e.url==`string`&&e.url.trim().length>0?{type:`url`,url:e.url.trim()}:e.type===`text`&&typeof e.value==`string`&&e.value.trim().length>0?{type:`text`,value:e.value.trim()}:null}function kr(e){if(!Er(e)||typeof e.id!=`string`||e.id.trim().length===0||typeof e.label!=`string`||e.label.trim().length===0||typeof e.createdAt!=`string`||e.createdAt.trim().length===0||!Er(e.target)||e.target.type!==`right-panel-resource`||typeof e.target.uri!=`string`||e.target.uri.trim().length===0)return null;let t=Or(e.icon);return t?{createdAt:e.createdAt,icon:t,id:e.id.trim(),label:e.label.trim(),target:{type:`right-panel-resource`,uri:e.target.uri.trim()}}:null}function Ar(e){if(!Array.isArray(e))return[];let t=new Map;return e.forEach(e=>{let n=kr(e);n&&t.set(n.id,n)}),Array.from(t.values())}function jr(e,t){return{createdAt:t,icon:e.icon,id:e.id,label:e.label,target:e.target}}function Mr(e){return e.target.type===`right-panel-resource`?e.target.uri:null}function Nr(e){return{builtIn:!1,icon:e.icon,id:e.id,label:e.label,removable:!0,target:e.target}}function Pr(e,t){let n=new Set(e.map(e=>e.id)),r=new Set(e.map(Mr).filter(e=>e!==null)),i=t.filter(e=>!n.has(e.id)&&!r.has(e.target.uri)).map(Nr);return[...e,...i]}var Fr=`nextclaw.side-dock.state`,Ir=1;function Lr(e){return!!e&&typeof e==`object`}var Z=r()(g(e=>({isVisible:!0,pinnedItems:[],setVisible:t=>e({isVisible:t}),setPinnedItems:t=>e({pinnedItems:Ar(t)})}),{name:Fr,version:Ir,storage:_(()=>window.localStorage),partialize:e=>({isVisible:e.isVisible,pinnedItems:e.pinnedItems}),merge:(e,t)=>{let n=Lr(e)?Ar(e.pinnedItems):[],r=Lr(e)&&typeof e.isVisible==`boolean`?e.isVisible:!0;return{...t,isVisible:r,pinnedItems:n}}})),Rr={apps:f,docs:s,github:Vn,"new-tab":p,"panel-app":zn,"service-apps":zn},zr=new Set([Sr]),Br=/^\p{Extended_Pictographic}(?:\uFE0F|\uFE0E)?(?:\u200D\p{Extended_Pictographic}(?:\uFE0F|\uFE0E)?)*$/u;function Vr(e){return Br.test(e.trim())}function Hr({icon:e}){if(e.type===`url`)return(0,X.jsx)(`img`,{src:e.url,alt:``,className:`h-5 w-5 rounded object-cover`});if(e.type===`text`)return Vr(e.value)?(0,X.jsx)(`span`,{className:`flex h-7 w-7 items-center justify-center text-[20px] leading-none`,"aria-hidden":`true`,children:e.value}):(0,X.jsx)(`span`,{className:`max-w-7 truncate text-center text-[13px] font-semibold leading-none`,"aria-hidden":`true`,children:e.value});let t=Rr[e.name];return(0,X.jsx)(t,{className:`h-5 w-5`,"aria-hidden":`true`})}function Ur({active:e,item:t,onOpen:r,onUnpin:a}){let{label:o}=t;return(0,X.jsxs)(d,{children:[(0,X.jsxs)(`div`,{className:`group relative`,children:[(0,X.jsx)(c,{asChild:!0,children:(0,X.jsx)(`button`,{type:`button`,"aria-label":o,title:o,"data-side-dock-item-id":t.id,onClick:()=>r(t),className:i(`flex h-10 w-10 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors`,`hover:bg-primary/10 hover:text-primary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,e?`bg-primary/10 text-primary`:`bg-transparent`),children:(0,X.jsx)(Hr,{icon:t.icon})})}),t.removable?(0,X.jsx)(`button`,{type:`button`,"aria-label":n(`sideDockUnpinItem`),title:n(`sideDockUnpinItem`),onClick:e=>{e.stopPropagation(),a(t)},className:`absolute -right-1 -top-1 hidden h-4 w-4 items-center justify-center rounded-full bg-background text-muted-foreground shadow-sm ring-1 ring-border/70 transition-colors hover:bg-muted hover:text-foreground group-hover:flex focus-visible:flex focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,children:(0,X.jsx)(m,{className:`h-3 w-3`,"aria-hidden":`true`})}):null]}),(0,X.jsx)(l,{side:`left`,children:o})]})}function Wr({icon:e,label:t,onClick:n}){return(0,X.jsxs)(d,{children:[(0,X.jsx)(c,{asChild:!0,children:(0,X.jsx)(`button`,{type:`button`,"aria-label":t,title:t,"data-side-dock-action":`hide`,onClick:n,className:i(`flex h-10 w-10 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors`,`hover:bg-primary/10 hover:text-primary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`),children:(0,X.jsx)(e,{className:`h-5 w-5`,"aria-hidden":`true`})})}),(0,X.jsx)(l,{side:`left`,children:t})]})}function Q(e){return e?.trim()??``}function Gr(e){return e.target.type===`right-panel-resource`?e.target.uri:null}function Kr(e,t,n,r=!1){if(!t||!n)return!1;let i=Q(Gr(e)??void 0);if(!i)return!1;let a=Q(n.resourceUri);return a&&a===i||Q(n.currentUrl)===i?!0:r?!1:e.id===`docs`&&n.kind===`docs`}function qr(e,t){if(!t)return!1;let n=Q(t.resourceUri),r=Q(t.currentUrl);return e.some(e=>{let t=Q(Gr(e)??void 0);return t===n||t===r})}function Jr(e){return zr.has(e.id)}function Yr({manager:e}){let t=Z(e=>e.pinnedItems),r=Z(e=>e.setVisible),{currentTab:i,isOpen:a}=S(),{confirm:o,ConfirmDialog:s}=v(),c=Pr(wr(),t),l=c.filter(e=>!Jr(e)),d=c.filter(Jr),f=qr(c,i),p=async()=>{await o({title:n(`sideDockHideConfirmTitle`),description:n(`sideDockHideConfirmDescription`),confirmLabel:n(`sideDockHideConfirmAction`),cancelLabel:n(`cancel`)})&&r(!1)};return(0,X.jsx)(u,{delayDuration:250,children:(0,X.jsxs)(`aside`,{"data-testid":`side-dock`,className:`z-30 flex h-full w-14 shrink-0 flex-col items-center gap-1 border-l border-border/60 bg-background/95 px-2 py-3`,children:[(0,X.jsx)(`div`,{className:`flex w-full flex-col items-center gap-1`,children:l.map(t=>(0,X.jsx)(Ur,{active:Kr(t,a,i,f),item:t,onOpen:e.openItem,onUnpin:t=>e.unpinItem(t.id)},t.id))}),d.length>0?(0,X.jsxs)(`div`,{"data-testid":`side-dock-utility`,className:`mt-auto flex w-full flex-col items-center gap-1`,children:[d.map(t=>(0,X.jsx)(Ur,{active:Kr(t,a,i,f),item:t,onOpen:e.openItem,onUnpin:t=>e.unpinItem(t.id)},t.id)),(0,X.jsx)(Wr,{icon:Wn,label:n(`sideDockHide`),onClick:()=>{p()}})]}):null,(0,X.jsx)(s,{})]})})}var Xr=`pinned`,Zr=new Set([`apps`,`docs`,`github`,`new-tab`,`panel-app`,`service-apps`]);function $(e){return e.trim()}function Qr(e){let t=0;return Array.from($(e)).forEach(e=>{t=t*31+e.charCodeAt(0)>>>0}),`${Xr}-${$(e).replace(/[^a-zA-Z0-9]+/g,`-`).replace(/^-+|-+$/g,``).toLowerCase()||`resource`}-${t.toString(36)}`}function $r(e){return e?.type===`builtin`&&Zr.has(e.name)?{type:`builtin`,name:e.name}:e?.type===`url`&&e.url.trim().length>0?{type:`url`,url:e.url.trim()}:e?.type===`text`&&e.value.trim().length>0?{type:`text`,value:e.value.trim()}:null}function ei(e){return e.kind===`docs`?`docs`:e.kind===`home`?`new-tab`:e.kind===`apps`?e.resourceUri?.includes(`service-apps`)?`service-apps`:`apps`:e.kind===`panel-app`?`panel-app`:`apps`}var ti=class{constructor(e){this.docBrowserManager=e,this.getItems=()=>Pr(wr(),Z.getState().pinnedItems),this.openItem=async e=>{if(e.target.type===`right-panel-resource`){this.docBrowserManager.open(e.target.uri,{dockIcon:e.icon,title:e.label});return}e.target.type===`external-url`&&await h.openExternalUrl(e.target.url)},this.getDockState=e=>{let t=this.getTabResourceUri(e);if(!t)return{canDock:!1,isDocked:!1,removable:!1};let n=this.findItemByUri(t);return{canDock:!0,isDocked:!!n,removable:n?.removable===!0}},this.pinTab=(e,t=new Date().toISOString())=>{let n=this.getTabResourceUri(e);!e||!n||this.findItemByUri(n)||this.pinItem({builtIn:!1,icon:$r(e.dockIcon)??{type:`builtin`,name:ei(e)},id:Qr(n),label:e.title.trim()||n,removable:!0,target:{type:`right-panel-resource`,uri:n}},t)},this.unpinTab=e=>{let t=this.getTabResourceUri(e),n=t?this.findItemByUri(t):void 0;n?.removable&&this.unpinItem(n.id)},this.pinItem=(e,t=new Date().toISOString())=>{if(!e.removable||e.target.type!==`right-panel-resource`)return;let n=$(e.target.uri),r={...e,target:{type:`right-panel-resource`,uri:n}};this.setPinnedItems(i=>i.some(t=>t.id===e.id||$(t.target.uri)===n)?i:[...i,jr(r,t)])},this.unpinItem=e=>{this.setPinnedItems(t=>t.filter(t=>t.id!==e))},this.reorderPinnedItems=e=>{this.setPinnedItems(t=>{let n=new Map(t.map(e=>[e.id,e])),r=e.map(e=>n.get(e)).filter(e=>e!==void 0),i=new Set(r.map(e=>e.id)),a=t.filter(e=>!i.has(e.id));return[...r,...a]})},this.setPinnedItems=e=>{let{pinnedItems:t,setPinnedItems:n}=Z.getState();n(e(t))},this.getTabResourceUri=e=>{let t=e?.resourceUri??e?.currentUrl,n=t?$(t):``;return n.length>0?n:null},this.findItemByUri=e=>{let t=$(e);return this.getItems().find(e=>e.target.type===`right-panel-resource`&&$(e.target.uri)===t)}}};export{R as C,ie as E,Ft as S,ct as T,xn as _,vr as a,Mt as b,qn as c,nr as d,ar as f,vn as g,zn as h,br as i,Xn as l,Bn as m,Yr as n,Jn as o,Un as p,Z as r,q as s,ti as t,Yn as u,jt as v,z as w,Nt as x,Sn as y};
@@ -1 +1 @@
1
- import{p as e,u as t}from"./react-UirzUuST.js";import{c as n}from"./dist-7JTjycxE.js";var r=n(`Sparkles`,[[`path`,{d:`M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z`,key:`4pj2yx`}],[`path`,{d:`M20 3v4`,key:`1olli1`}],[`path`,{d:`M22 5h-4`,key:`1gvqau`}],[`path`,{d:`M4 17v2`,key:`vumght`}],[`path`,{d:`M5 18H3`,key:`zchphs`}]]),i=e();function a({className:e,...n}){return(0,i.jsx)(`div`,{className:t(`animate-pulse rounded-md bg-slate-200`,e),...n})}export{r as n,a as t};
1
+ import{p as e,u as t}from"./react-BPIsQIlO.js";import{c as n}from"./dist-BunzmC4B.js";var r=n(`Sparkles`,[[`path`,{d:`M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z`,key:`4pj2yx`}],[`path`,{d:`M20 3v4`,key:`1olli1`}],[`path`,{d:`M22 5h-4`,key:`1gvqau`}],[`path`,{d:`M4 17v2`,key:`vumght`}],[`path`,{d:`M5 18H3`,key:`zchphs`}]]),i=e();function a({className:e,...n}){return(0,i.jsx)(`div`,{className:t(`animate-pulse rounded-md bg-slate-200`,e),...n})}export{r as n,a as t};
@@ -0,0 +1 @@
1
+ import{f as e,h as t,p as n,u as r,v as i}from"./react-BPIsQIlO.js";var a=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,o=e,s=(e,t)=>n=>{if(t?.variants==null)return o(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,s=Object.keys(r).map(e=>{let t=n?.[e],o=i?.[e];if(t===null)return null;let s=a(t)||a(o);return r[e][s]}),c=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return o(e,s,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...c}[t]):{...i,...c}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},c=i(t(),1),l=n(),u=s(`inline-flex items-center justify-center whitespace-nowrap rounded-full text-sm font-medium ring-offset-background transition-colors duration-fast focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary-600 active:bg-primary-700 shadow-sm`,destructive:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,outline:`border border-border bg-card text-muted-foreground hover:bg-accent hover:text-accent-foreground`,secondary:`bg-muted text-foreground hover:bg-accent hover:text-accent-foreground`,ghost:`text-muted-foreground hover:bg-accent hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`,primary:`bg-primary text-primary-foreground hover:bg-primary-600 active:bg-primary-700 shadow-sm`,subtle:`bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground`,"primary-outline":`border border-primary/30 text-primary hover:bg-primary hover:text-primary-foreground`},size:{default:`h-9 px-4 py-2`,sm:`h-8 px-3 text-xs`,lg:`h-11 px-5 text-[14px]`,xl:`h-12 px-6 text-[15px]`,icon:`h-9 w-9`}},defaultVariants:{variant:`default`,size:`default`}}),d=c.forwardRef(({className:e,variant:t,size:n,...i},a)=>(0,l.jsx)(`button`,{className:r(u({variant:t,size:n,className:e})),ref:a,...i}));d.displayName=`Button`;function f({children:e,fullHeight:t=!1,className:n}){return(0,l.jsx)(`div`,{className:r(`animate-fade-in`,t?`h-[calc(100vh-80px)] w-full flex flex-col`:`pb-16`,n),children:e})}function p({title:e,description:t,actions:n,className:i}){return(0,l.jsxs)(`div`,{className:r(`flex items-center justify-between mb-6 shrink-0`,i),children:[(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`h2`,{className:`text-xl font-semibold text-foreground`,children:e}),t&&(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:t})]}),n&&(0,l.jsx)(`div`,{className:`flex items-center gap-2 shrink-0`,children:n})]})}var m=c.forwardRef(({className:e,hover:t=!0,surface:n=`raised`,...i},a)=>(0,l.jsx)(`div`,{ref:a,className:r(`rounded-2xl border bg-card text-card-foreground transition-colors duration-base`,n===`raised`?`border-border shadow-card`:`border-border/75 shadow-none`,t&&n===`raised`&&`hover:border-primary/25 hover:shadow-card-hover`,t&&n===`flat`&&`hover:bg-muted/40`,e),...i}));m.displayName=`Card`;var h=c.forwardRef(({className:e,...t},n)=>(0,l.jsx)(`div`,{ref:n,className:r(`flex flex-col space-y-1.5 p-6`,e),...t}));h.displayName=`CardHeader`;var g=c.forwardRef(({className:e,...t},n)=>(0,l.jsx)(`h3`,{ref:n,className:r(`text-[15px] font-semibold leading-tight tracking-tight text-foreground`,e),...t}));g.displayName=`CardTitle`;var _=c.forwardRef(({className:e,...t},n)=>(0,l.jsx)(`p`,{ref:n,className:r(`text-[13px] text-muted-foreground leading-relaxed`,e),...t}));_.displayName=`CardDescription`;var v=c.forwardRef(({className:e,...t},n)=>(0,l.jsx)(`div`,{ref:n,className:r(`p-6 pt-0`,e),...t}));v.displayName=`CardContent`;var y=c.forwardRef(({className:e,...t},n)=>(0,l.jsx)(`div`,{ref:n,className:r(`flex items-center justify-between p-6 pt-0`,e),...t}));y.displayName=`CardFooter`;var b=c.forwardRef(({className:e,checked:t=!1,onCheckedChange:n,thumbClassName:i,...a},o)=>(0,l.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":t,"data-state":t?`checked`:`unchecked`,ref:o,className:r(`switch-track peer inline-flex h-[22px] w-10 shrink-0 cursor-pointer items-center rounded-full border-2 transition-colors duration-fast focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border disabled:cursor-not-allowed disabled:opacity-50`,t?`border-primary/70 bg-primary`:`border-border/60 bg-muted hover:bg-accent`,e),onClick:()=>n?.(!t),...a,children:(0,l.jsx)(`span`,{"data-state":t?`checked`:`unchecked`,className:r(`switch-thumb pointer-events-none block h-5 w-5 rounded-full bg-card shadow-md ring-1 ring-border/50 transition-transform duration-fast`,t?`translate-x-5`:`translate-x-0`,i)})}));b.displayName=`Switch`;export{h as a,f as c,_ as i,d as l,m as n,g as o,v as r,p as s,b as t,s as u};
@@ -1 +1 @@
1
- import{h as e,p as t,u as n,v as r}from"./react-UirzUuST.js";import{u as i}from"./switch-BU_UEULb.js";var a=r(e(),1),o=t(),s=i(`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] font-medium`,{variants:{tone:{subtle:`border-gray-200 bg-gray-50 text-gray-600`,neutral:`border-gray-200 bg-white text-gray-600`,success:`border-emerald-200 bg-emerald-50 text-emerald-700`,warning:`border-amber-200 bg-amber-50 text-amber-800`,danger:`border-rose-200 bg-rose-50 text-rose-600`,info:`border-primary/20 bg-primary/10 text-primary`}},defaultVariants:{tone:`subtle`}}),c=a.forwardRef(({className:e,tone:t,...r},i)=>(0,o.jsx)(`span`,{ref:i,className:n(s({tone:t}),e),...r}));c.displayName=`TagChip`;export{c as t};
1
+ import{h as e,p as t,u as n,v as r}from"./react-BPIsQIlO.js";import{u as i}from"./switch-Cv8Ekb3x.js";var a=r(e(),1),o=t(),s=i(`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] font-medium`,{variants:{tone:{subtle:`border-gray-200 bg-gray-50 text-gray-600`,neutral:`border-gray-200 bg-white text-gray-600`,success:`border-emerald-200 bg-emerald-50 text-emerald-700`,warning:`border-amber-200 bg-amber-50 text-amber-800`,danger:`border-rose-200 bg-rose-50 text-rose-600`,info:`border-primary/20 bg-primary/10 text-primary`}},defaultVariants:{tone:`subtle`}}),c=a.forwardRef(({className:e,tone:t,...r},i)=>(0,o.jsx)(`span`,{ref:i,className:n(s({tone:t}),e),...r}));c.displayName=`TagChip`;export{c as t};
@@ -1 +1 @@
1
- import{h as e,p as t,u as n,v as r}from"./react-UirzUuST.js";import{a as i,b as a,c as o,f as s,g as c,h as l,i as u,l as d,m as f,o as p,r as m,s as h,t as g,u as _,x as v,y}from"./dist-7JTjycxE.js";import{t as b}from"./dist-wXLhk4hl.js";var x=o(`Boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),S=r(e(),1),C=t(),[w,T]=y(`Tooltip`,[h]),E=h(),D=`TooltipProvider`,O=700,k=`tooltip.open`,[A,j]=w(D),M=e=>{let{__scopeTooltip:t,delayDuration:n=O,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=S.useRef(!0),s=S.useRef(!1),c=S.useRef(0);return S.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,C.jsx)(A,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:S.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:S.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};M.displayName=D;var N=`Tooltip`,[ee,P]=w(N),F=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,u=j(N,e.__scopeTooltip),d=E(t),[f,m]=S.useState(null),h=c(),g=S.useRef(0),_=o??u.disableHoverableContent,v=s??u.delayDuration,y=S.useRef(!1),[b,x]=l({prop:r,defaultProp:i??!1,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(k))):u.onClose(),a?.(e)},caller:N}),w=S.useMemo(()=>b?y.current?`delayed-open`:`instant-open`:`closed`,[b]),T=S.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y.current=!1,x(!0)},[x]),D=S.useCallback(()=>{window.clearTimeout(g.current),g.current=0,x(!1)},[x]),O=S.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{y.current=!0,x(!0),g.current=0},v)},[v,x]);return S.useEffect(()=>()=>{g.current&&=(window.clearTimeout(g.current),0)},[]),(0,C.jsx)(p,{...d,children:(0,C.jsx)(ee,{scope:t,contentId:h,open:b,stateAttribute:w,trigger:f,onTriggerChange:m,onTriggerEnter:S.useCallback(()=>{u.isOpenDelayedRef.current?O():T()},[u.isOpenDelayedRef,O,T]),onTriggerLeave:S.useCallback(()=>{_?D():(window.clearTimeout(g.current),g.current=0)},[D,_]),onOpen:T,onClose:D,disableHoverableContent:_,children:n})})};F.displayName=N;var I=`TooltipTrigger`,L=S.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=P(I,n),o=j(I,n),c=E(n),l=a(t,S.useRef(null),i.onTriggerChange),u=S.useRef(!1),d=S.useRef(!1),f=S.useCallback(()=>u.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener(`pointerup`,f),[f]),(0,C.jsx)(m,{asChild:!0,...c,children:(0,C.jsx)(s.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:v(e.onPointerMove,e=>{e.pointerType!==`touch`&&!d.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:v(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:v(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener(`pointerup`,f,{once:!0})}),onFocus:v(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:v(e.onBlur,i.onClose),onClick:v(e.onClick,i.onClose)})})});L.displayName=I;var R=`TooltipPortal`,[z,B]=w(R,{forceMount:void 0}),V=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=P(R,t);return(0,C.jsx)(z,{scope:t,forceMount:n,children:(0,C.jsx)(b,{present:n||a.open,children:(0,C.jsx)(d,{asChild:!0,container:i,children:r})})})};V.displayName=R;var H=`TooltipContent`,U=S.forwardRef((e,t)=>{let n=B(H,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=P(H,e.__scopeTooltip);return(0,C.jsx)(b,{present:r||o.open,children:o.disableHoverableContent?(0,C.jsx)(K,{side:i,...a,ref:t}):(0,C.jsx)(W,{side:i,...a,ref:t})})}),W=S.forwardRef((e,t)=>{let n=P(H,e.__scopeTooltip),r=j(H,e.__scopeTooltip),i=S.useRef(null),o=a(t,i),[s,c]=S.useState(null),{trigger:l,onClose:u}=n,d=i.current,{onPointerInTransitChange:f}=r,p=S.useCallback(()=>{c(null),f(!1)},[f]),m=S.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=ae(r,ie(r,n.getBoundingClientRect())),a=oe(t.getBoundingClientRect());c(ce([...i,...a])),f(!0)},[f]);return S.useEffect(()=>()=>p(),[p]),S.useEffect(()=>{if(l&&d){let e=e=>m(e,d),t=e=>m(e,l);return l.addEventListener(`pointerleave`,e),d.addEventListener(`pointerleave`,t),()=>{l.removeEventListener(`pointerleave`,e),d.removeEventListener(`pointerleave`,t)}}},[l,d,m,p]),S.useEffect(()=>{if(s){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=l?.contains(t)||d?.contains(t),i=!se(n,s);r?p():i&&(p(),u())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[l,d,s,u,p]),(0,C.jsx)(K,{...e,ref:o})}),[G,te]=w(N,{isInside:!1}),ne=f(`TooltipContent`),K=S.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=P(H,n),u=E(n),{onClose:d}=l;return S.useEffect(()=>(document.addEventListener(k,d),()=>document.removeEventListener(k,d)),[d]),S.useEffect(()=>{if(l.trigger){let e=e=>{e.target?.contains(l.trigger)&&d()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,d]),(0,C.jsx)(_,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,C.jsxs)(i,{"data-state":l.stateAttribute,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,C.jsx)(ne,{children:r}),(0,C.jsx)(G,{scope:n,isInside:!0,children:(0,C.jsx)(g,{id:l.contentId,role:`tooltip`,children:a||r})})]})})});U.displayName=H;var q=`TooltipArrow`,re=S.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=E(n);return te(q,n).isInside?null:(0,C.jsx)(u,{...i,...r,ref:t})});re.displayName=q;function ie(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function ae(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function oe(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function se(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function ce(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),le(t)}function le(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var J=M,Y=F,X=L,Z=V,Q=U,ue=J,de=Y,fe=X,$=S.forwardRef(({className:e,sideOffset:t=4,...r},i)=>(0,C.jsx)(Z,{children:(0,C.jsx)(Q,{ref:i,sideOffset:t,className:n(`z-[var(--z-tooltip,10150)] overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...r})}));$.displayName=Q.displayName;export{Q as a,Y as c,fe as i,X as l,$ as n,Z as o,ue as r,J as s,de as t,x as u};
1
+ import{h as e,p as t,u as n,v as r}from"./react-BPIsQIlO.js";import{a as i,b as a,c as o,f as s,g as c,h as l,i as u,l as d,m as f,o as p,r as m,s as h,t as g,u as _,x as v,y}from"./dist-BunzmC4B.js";import{t as b}from"./dist-ChmGwvtK.js";var x=o(`Boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),S=r(e(),1),C=t(),[w,T]=y(`Tooltip`,[h]),E=h(),D=`TooltipProvider`,O=700,k=`tooltip.open`,[A,j]=w(D),M=e=>{let{__scopeTooltip:t,delayDuration:n=O,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=S.useRef(!0),s=S.useRef(!1),c=S.useRef(0);return S.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,C.jsx)(A,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:S.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:S.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};M.displayName=D;var N=`Tooltip`,[ee,P]=w(N),F=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,u=j(N,e.__scopeTooltip),d=E(t),[f,m]=S.useState(null),h=c(),g=S.useRef(0),_=o??u.disableHoverableContent,v=s??u.delayDuration,y=S.useRef(!1),[b,x]=l({prop:r,defaultProp:i??!1,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(k))):u.onClose(),a?.(e)},caller:N}),w=S.useMemo(()=>b?y.current?`delayed-open`:`instant-open`:`closed`,[b]),T=S.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y.current=!1,x(!0)},[x]),D=S.useCallback(()=>{window.clearTimeout(g.current),g.current=0,x(!1)},[x]),O=S.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{y.current=!0,x(!0),g.current=0},v)},[v,x]);return S.useEffect(()=>()=>{g.current&&=(window.clearTimeout(g.current),0)},[]),(0,C.jsx)(p,{...d,children:(0,C.jsx)(ee,{scope:t,contentId:h,open:b,stateAttribute:w,trigger:f,onTriggerChange:m,onTriggerEnter:S.useCallback(()=>{u.isOpenDelayedRef.current?O():T()},[u.isOpenDelayedRef,O,T]),onTriggerLeave:S.useCallback(()=>{_?D():(window.clearTimeout(g.current),g.current=0)},[D,_]),onOpen:T,onClose:D,disableHoverableContent:_,children:n})})};F.displayName=N;var I=`TooltipTrigger`,L=S.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=P(I,n),o=j(I,n),c=E(n),l=a(t,S.useRef(null),i.onTriggerChange),u=S.useRef(!1),d=S.useRef(!1),f=S.useCallback(()=>u.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener(`pointerup`,f),[f]),(0,C.jsx)(m,{asChild:!0,...c,children:(0,C.jsx)(s.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:v(e.onPointerMove,e=>{e.pointerType!==`touch`&&!d.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:v(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:v(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener(`pointerup`,f,{once:!0})}),onFocus:v(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:v(e.onBlur,i.onClose),onClick:v(e.onClick,i.onClose)})})});L.displayName=I;var R=`TooltipPortal`,[z,B]=w(R,{forceMount:void 0}),V=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=P(R,t);return(0,C.jsx)(z,{scope:t,forceMount:n,children:(0,C.jsx)(b,{present:n||a.open,children:(0,C.jsx)(d,{asChild:!0,container:i,children:r})})})};V.displayName=R;var H=`TooltipContent`,U=S.forwardRef((e,t)=>{let n=B(H,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=P(H,e.__scopeTooltip);return(0,C.jsx)(b,{present:r||o.open,children:o.disableHoverableContent?(0,C.jsx)(K,{side:i,...a,ref:t}):(0,C.jsx)(W,{side:i,...a,ref:t})})}),W=S.forwardRef((e,t)=>{let n=P(H,e.__scopeTooltip),r=j(H,e.__scopeTooltip),i=S.useRef(null),o=a(t,i),[s,c]=S.useState(null),{trigger:l,onClose:u}=n,d=i.current,{onPointerInTransitChange:f}=r,p=S.useCallback(()=>{c(null),f(!1)},[f]),m=S.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=ae(r,ie(r,n.getBoundingClientRect())),a=oe(t.getBoundingClientRect());c(ce([...i,...a])),f(!0)},[f]);return S.useEffect(()=>()=>p(),[p]),S.useEffect(()=>{if(l&&d){let e=e=>m(e,d),t=e=>m(e,l);return l.addEventListener(`pointerleave`,e),d.addEventListener(`pointerleave`,t),()=>{l.removeEventListener(`pointerleave`,e),d.removeEventListener(`pointerleave`,t)}}},[l,d,m,p]),S.useEffect(()=>{if(s){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=l?.contains(t)||d?.contains(t),i=!se(n,s);r?p():i&&(p(),u())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[l,d,s,u,p]),(0,C.jsx)(K,{...e,ref:o})}),[G,te]=w(N,{isInside:!1}),ne=f(`TooltipContent`),K=S.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=P(H,n),u=E(n),{onClose:d}=l;return S.useEffect(()=>(document.addEventListener(k,d),()=>document.removeEventListener(k,d)),[d]),S.useEffect(()=>{if(l.trigger){let e=e=>{e.target?.contains(l.trigger)&&d()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,d]),(0,C.jsx)(_,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,C.jsxs)(i,{"data-state":l.stateAttribute,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,C.jsx)(ne,{children:r}),(0,C.jsx)(G,{scope:n,isInside:!0,children:(0,C.jsx)(g,{id:l.contentId,role:`tooltip`,children:a||r})})]})})});U.displayName=H;var q=`TooltipArrow`,re=S.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=E(n);return te(q,n).isInside?null:(0,C.jsx)(u,{...i,...r,ref:t})});re.displayName=q;function ie(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function ae(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function oe(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function se(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function ce(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),le(t)}function le(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var J=M,Y=F,X=L,Z=V,Q=U,ue=J,de=Y,fe=X,$=S.forwardRef(({className:e,sideOffset:t=4,...r},i)=>(0,C.jsx)(Z,{children:(0,C.jsx)(Q,{ref:i,sideOffset:t,className:n(`z-[var(--z-tooltip,10150)] overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...r})}));$.displayName=Q.displayName;export{Q as a,Y as c,fe as i,X as l,$ as n,Z as o,ue as r,J as s,de as t,x as u};
@@ -1 +1 @@
1
- import{r as e}from"./react-UirzUuST.js";import{$ as t,H as n,I as r,It as i,J as a,K as o,Lt as s,Q as c,R as l,Rt as u,U as d,V as f,Y as p,Yt as m,at as h,et as g,it as _,nt as v,q as y,rt as b,tt as x,z as S}from"./api-B7Qigvtm.js";function C(){return u({queryKey:[`config`],queryFn:f,staleTime:3e4,refetchOnWindowFocus:!0})}function w(){return u({queryKey:[`config-meta`],queryFn:n,staleTime:1/0})}function T(){return u({queryKey:[`providers`],queryFn:y,staleTime:3e4,refetchOnWindowFocus:!0})}function E(){return u({queryKey:[`provider-templates`],queryFn:o,staleTime:1/0})}function D(){return u({queryKey:[`config-schema`],queryFn:d,staleTime:1/0})}function O(){let t=m();return s({mutationFn:x,onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),i.success(e(`configSaved`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function k(){let t=m();return s({mutationFn:({data:e})=>_(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),i.success(e(`configSavedApplied`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function A(){let t=m();return s({mutationFn:({provider:e,data:t})=>v(e,t),onSuccess:(n,r)=>{t.invalidateQueries({queryKey:[`providers`]}),t.invalidateQueries({queryKey:[`config`]}),r.silentSuccess||i.success(e(`configSaved`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function j(){let t=m();return s({mutationFn:({data:e})=>r(e??{}),onSuccess:()=>{t.invalidateQueries({queryKey:[`providers`]}),t.invalidateQueries({queryKey:[`config`]}),i.success(e(`configSaved`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function M(){let t=m();return s({mutationFn:({provider:e})=>l(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`providers`]}),t.invalidateQueries({queryKey:[`config`]}),i.success(e(`configSaved`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function N(){return s({mutationFn:({provider:e,data:n})=>t(e,n)})}function P(){return s({mutationFn:({provider:e,data:t})=>c(e,t)})}function F(){return s({mutationFn:({provider:e,data:t})=>p(e,t)})}function I(){return s({mutationFn:({provider:e})=>a(e)})}function L(){let t=m();return s({mutationFn:({channel:e,data:t})=>g(e,t),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),i.success(e(`configSavedApplying`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function R(){let t=m();return s({mutationFn:({data:e})=>b(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),i.success(e(`configSavedApplied`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function z(){let t=m();return s({mutationFn:({data:e})=>h(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),i.success(e(`configSavedApplied`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function B(){return s({mutationFn:({actionId:e,data:t})=>S(e,t),onError:t=>{i.error(e(`error`)+`: `+t.message)}})}export{k as _,M as a,F as c,P as d,N as f,R as g,A as h,j as i,E as l,O as m,w as n,B as o,L as p,D as r,I as s,C as t,T as u,z as v};
1
+ import{r as e}from"./react-BPIsQIlO.js";import{$ as t,H as n,I as r,It as i,J as a,K as o,Lt as s,Q as c,R as l,Rt as u,U as d,V as f,Y as p,Yt as m,at as h,et as g,it as _,nt as v,q as y,rt as b,tt as x,z as S}from"./api-iNBpppzj.js";function C(){return u({queryKey:[`config`],queryFn:f,staleTime:3e4,refetchOnWindowFocus:!0})}function w(){return u({queryKey:[`config-meta`],queryFn:n,staleTime:1/0})}function T(){return u({queryKey:[`providers`],queryFn:y,staleTime:3e4,refetchOnWindowFocus:!0})}function E(){return u({queryKey:[`provider-templates`],queryFn:o,staleTime:1/0})}function D(){return u({queryKey:[`config-schema`],queryFn:d,staleTime:1/0})}function O(){let t=m();return s({mutationFn:x,onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),i.success(e(`configSaved`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function k(){let t=m();return s({mutationFn:({data:e})=>_(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),i.success(e(`configSavedApplied`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function A(){let t=m();return s({mutationFn:({provider:e,data:t})=>v(e,t),onSuccess:(n,r)=>{t.invalidateQueries({queryKey:[`providers`]}),t.invalidateQueries({queryKey:[`config`]}),r.silentSuccess||i.success(e(`configSaved`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function j(){let t=m();return s({mutationFn:({data:e})=>r(e??{}),onSuccess:()=>{t.invalidateQueries({queryKey:[`providers`]}),t.invalidateQueries({queryKey:[`config`]}),i.success(e(`configSaved`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function M(){let t=m();return s({mutationFn:({provider:e})=>l(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`providers`]}),t.invalidateQueries({queryKey:[`config`]}),i.success(e(`configSaved`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function N(){return s({mutationFn:({provider:e,data:n})=>t(e,n)})}function P(){return s({mutationFn:({provider:e,data:t})=>c(e,t)})}function F(){return s({mutationFn:({provider:e,data:t})=>p(e,t)})}function I(){return s({mutationFn:({provider:e})=>a(e)})}function L(){let t=m();return s({mutationFn:({channel:e,data:t})=>g(e,t),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),i.success(e(`configSavedApplying`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function R(){let t=m();return s({mutationFn:({data:e})=>b(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),i.success(e(`configSavedApplied`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function z(){let t=m();return s({mutationFn:({data:e})=>h(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),i.success(e(`configSavedApplied`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function B(){return s({mutationFn:({actionId:e,data:t})=>S(e,t),onError:t=>{i.error(e(`error`)+`: `+t.message)}})}export{k as _,M as a,F as c,P as d,N as f,R as g,A as h,j as i,E as l,O as m,w as n,B as o,L as p,D as r,I as s,C as t,T as u,z as v};
@@ -1 +1 @@
1
- import{h as e,p as t,r as n,v as r}from"./react-UirzUuST.js";import{t as i}from"./confirm-dialog-D2EG3nqE.js";var a=r(e(),1),o=t(),s={open:!1,title:``,description:``,confirmLabel:n(`confirm`),cancelLabel:n(`cancel`),variant:`default`,resolve:null};function c(){let[e,t]=(0,a.useState)(s),r=(0,a.useCallback)(e=>new Promise(r=>{t({open:!0,title:e.title,description:e.description??``,confirmLabel:e.confirmLabel??n(`confirm`),cancelLabel:e.cancelLabel??n(`cancel`),variant:e.variant??`default`,resolve:e=>{r(e),t(e=>({...e,open:!1,resolve:null}))}})}),[]),c=(0,a.useCallback)(e=>{t(t=>(!e&&t.resolve&&t.resolve(!1),{...t,open:e,resolve:e?t.resolve:null}))},[]);return{confirm:r,ConfirmDialog:(0,a.useCallback)(()=>(0,o.jsx)(i,{open:e.open,onOpenChange:c,title:e.title,description:e.description||void 0,confirmLabel:e.confirmLabel,cancelLabel:e.cancelLabel,variant:e.variant,onConfirm:()=>e.resolve?.(!0),onCancel:()=>e.resolve?.(!1)}),[e,c])}}export{c as t};
1
+ import{h as e,p as t,r as n,v as r}from"./react-BPIsQIlO.js";import{t as i}from"./confirm-dialog-Chv50USy.js";var a=r(e(),1),o=t(),s={open:!1,title:``,description:``,confirmLabel:n(`confirm`),cancelLabel:n(`cancel`),variant:`default`,resolve:null};function c(){let[e,t]=(0,a.useState)(s),r=(0,a.useCallback)(e=>new Promise(r=>{t({open:!0,title:e.title,description:e.description??``,confirmLabel:e.confirmLabel??n(`confirm`),cancelLabel:e.cancelLabel??n(`cancel`),variant:e.variant??`default`,resolve:e=>{r(e),t(e=>({...e,open:!1,resolve:null}))}})}),[]),c=(0,a.useCallback)(e=>{t(t=>(!e&&t.resolve&&t.resolve(!1),{...t,open:e,resolve:e?t.resolve:null}))},[]);return{confirm:r,ConfirmDialog:(0,a.useCallback)(()=>(0,o.jsx)(i,{open:e.open,onOpenChange:c,title:e.title,description:e.description||void 0,confirmLabel:e.confirmLabel,cancelLabel:e.cancelLabel,variant:e.variant,onConfirm:()=>e.resolve?.(!0),onCancel:()=>e.resolve?.(!1)}),[e,c])}}export{c as t};
@@ -0,0 +1 @@
1
+ import{c as e}from"./dist-BunzmC4B.js";var t=e(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);export{t};
package/dist/index.html CHANGED
@@ -186,34 +186,34 @@
186
186
  })();
187
187
  </script>
188
188
  <title>NextClaw</title>
189
- <script type="module" crossorigin src="/assets/index-Obd4JYU2.js"></script>
190
- <link rel="modulepreload" crossorigin href="/assets/react-UirzUuST.js">
191
- <link rel="modulepreload" crossorigin href="/assets/dist-7JTjycxE.js">
192
- <link rel="modulepreload" crossorigin href="/assets/dist-wXLhk4hl.js">
193
- <link rel="modulepreload" crossorigin href="/assets/tooltip-CjkOaHW7.js">
194
- <link rel="modulepreload" crossorigin href="/assets/book-open-Ba2f7YiG.js">
195
- <link rel="modulepreload" crossorigin href="/assets/plus-Bx7wQbhG.js">
196
- <link rel="modulepreload" crossorigin href="/assets/x-DT5x45JU.js">
189
+ <script type="module" crossorigin src="/assets/index-DGqHne1Q.js"></script>
190
+ <link rel="modulepreload" crossorigin href="/assets/react-BPIsQIlO.js">
191
+ <link rel="modulepreload" crossorigin href="/assets/dist-BunzmC4B.js">
192
+ <link rel="modulepreload" crossorigin href="/assets/dist-ChmGwvtK.js">
193
+ <link rel="modulepreload" crossorigin href="/assets/tooltip-oQlEN-l6.js">
194
+ <link rel="modulepreload" crossorigin href="/assets/book-open-C3mJGwiy.js">
195
+ <link rel="modulepreload" crossorigin href="/assets/plus-D4DsdLN-.js">
196
+ <link rel="modulepreload" crossorigin href="/assets/x-BBMffEN0.js">
197
197
  <link rel="modulepreload" crossorigin href="/assets/middleware-BILWbJE4.js">
198
- <link rel="modulepreload" crossorigin href="/assets/doc-browser-context-CYAGm5d5.js">
199
- <link rel="modulepreload" crossorigin href="/assets/es2015-j1SRCIX5.js">
200
- <link rel="modulepreload" crossorigin href="/assets/switch-BU_UEULb.js">
201
- <link rel="modulepreload" crossorigin href="/assets/confirm-dialog-D2EG3nqE.js">
202
- <link rel="modulepreload" crossorigin href="/assets/use-confirm-dialog-CD9a_SK1.js">
198
+ <link rel="modulepreload" crossorigin href="/assets/doc-browser-context-BHY-0FSD.js">
199
+ <link rel="modulepreload" crossorigin href="/assets/es2015-DQZ5JWwK.js">
200
+ <link rel="modulepreload" crossorigin href="/assets/switch-Cv8Ekb3x.js">
201
+ <link rel="modulepreload" crossorigin href="/assets/confirm-dialog-Chv50USy.js">
202
+ <link rel="modulepreload" crossorigin href="/assets/use-confirm-dialog-BAxaVOJI.js">
203
203
  <link rel="modulepreload" crossorigin href="/assets/host-capabilities-9bB_998Z.js">
204
- <link rel="modulepreload" crossorigin href="/assets/side-dock-DPvakJ0a.js">
205
- <link rel="modulepreload" crossorigin href="/assets/select-CdSEOwVM.js">
206
- <link rel="modulepreload" crossorigin href="/assets/api-B7Qigvtm.js">
207
- <link rel="modulepreload" crossorigin href="/assets/search-BcHjwdsb.js">
208
- <link rel="modulepreload" crossorigin href="/assets/external-link-DxuPaDoK.js">
209
- <link rel="modulepreload" crossorigin href="/assets/refresh-cw-eT8BF-8B.js">
210
- <link rel="modulepreload" crossorigin href="/assets/doc-browser-bHyXnxlj.js">
211
- <link rel="modulepreload" crossorigin href="/assets/i18n-provider-B4oMxOFx.js">
212
- <link rel="modulepreload" crossorigin href="/assets/loader-circle-CdzgK4eH.js">
213
- <link rel="modulepreload" crossorigin href="/assets/skeleton-P5oM14E1.js">
214
- <link rel="modulepreload" crossorigin href="/assets/tag-chip-D-WsKoT1.js">
215
- <link rel="modulepreload" crossorigin href="/assets/mcp-marketplace-page-Bt7CuOoq.js">
216
- <link rel="stylesheet" crossorigin href="/assets/index-CvrvblgX.css">
204
+ <link rel="modulepreload" crossorigin href="/assets/side-dock-BsBvcJ9i.js">
205
+ <link rel="modulepreload" crossorigin href="/assets/select-BdgczSNw.js">
206
+ <link rel="modulepreload" crossorigin href="/assets/api-iNBpppzj.js">
207
+ <link rel="modulepreload" crossorigin href="/assets/search-DVIV6pfD.js">
208
+ <link rel="modulepreload" crossorigin href="/assets/external-link-CU0kzzIP.js">
209
+ <link rel="modulepreload" crossorigin href="/assets/refresh-cw-CILd1vAP.js">
210
+ <link rel="modulepreload" crossorigin href="/assets/doc-browser-Dg0pmkOg.js">
211
+ <link rel="modulepreload" crossorigin href="/assets/i18n-provider-Cu8XyZb_.js">
212
+ <link rel="modulepreload" crossorigin href="/assets/loader-circle-CDSFuzmk.js">
213
+ <link rel="modulepreload" crossorigin href="/assets/skeleton-DeX1FKw7.js">
214
+ <link rel="modulepreload" crossorigin href="/assets/tag-chip-RB9uKcoC.js">
215
+ <link rel="modulepreload" crossorigin href="/assets/mcp-marketplace-page-BeEQK0DL.js">
216
+ <link rel="stylesheet" crossorigin href="/assets/index-CzfBdvK1.css">
217
217
  </head>
218
218
 
219
219
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextclaw/ui",
3
- "version": "0.15.2",
3
+ "version": "0.15.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -28,14 +28,14 @@
28
28
  "tailwind-merge": "^2.5.4",
29
29
  "zod": "^3.23.8",
30
30
  "zustand": "^5.0.2",
31
- "@nextclaw/client-sdk": "0.5.2",
32
- "@nextclaw/ncp": "0.7.2",
33
- "@nextclaw/ncp-http-agent-client": "0.4.2",
34
- "@nextclaw/ncp-toolkit": "0.6.2",
35
- "@nextclaw/shared": "0.4.2",
36
- "@nextclaw/agent-chat": "0.3.1",
37
- "@nextclaw/agent-chat-ui": "0.6.2",
38
- "@nextclaw/ncp-react": "0.5.2"
31
+ "@nextclaw/agent-chat-ui": "0.6.3",
32
+ "@nextclaw/client-sdk": "0.5.3",
33
+ "@nextclaw/ncp-http-agent-client": "0.4.3",
34
+ "@nextclaw/ncp": "0.7.3",
35
+ "@nextclaw/ncp-toolkit": "0.6.3",
36
+ "@nextclaw/shared": "0.4.3",
37
+ "@nextclaw/agent-chat": "0.3.2",
38
+ "@nextclaw/ncp-react": "0.5.3"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@testing-library/react": "^16.3.0",
@@ -110,7 +110,7 @@ export function SidebarNavLinkItem({
110
110
  aria-label={label}
111
111
  aria-current={isActive ? "page" : undefined}
112
112
  className={cn(
113
- "group flex w-full items-center rounded-xl font-medium transition-colors duration-base focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35",
113
+ "group flex w-full items-center rounded-xl font-medium transition-colors duration-base focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border",
114
114
  collapsed
115
115
  ? cn(SIDEBAR_RAIL_CONTROL_CLASS, "justify-center px-0 py-0")
116
116
  : tone.row,
@@ -213,7 +213,7 @@ export function SidebarActionItem({
213
213
  onClick={onClick}
214
214
  aria-label={label}
215
215
  className={cn(
216
- "group flex w-full items-center rounded-xl font-medium text-muted-foreground transition-colors duration-base hover:bg-gray-200/60 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35",
216
+ "group flex w-full items-center rounded-xl font-medium text-muted-foreground transition-colors duration-base hover:bg-gray-200/60 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border",
217
217
  collapsed
218
218
  ? cn(
219
219
  SIDEBAR_RAIL_CONTROL_CLASS,
@@ -287,7 +287,7 @@ export function SidebarSelectItem({
287
287
  <SelectTrigger
288
288
  aria-label={label}
289
289
  className={cn(
290
- "group h-auto w-full rounded-xl border-0 bg-transparent font-medium text-muted-foreground shadow-none hover:bg-gray-200/60 hover:text-gray-900 focus:ring-0 focus-visible:ring-2 focus-visible:ring-primary/35",
290
+ "group h-auto w-full rounded-xl border-0 bg-transparent font-medium text-muted-foreground shadow-none hover:bg-gray-200/60 hover:text-gray-900 focus:ring-0 focus-visible:ring-1 focus-visible:ring-border",
291
291
  collapsed
292
292
  ? cn(
293
293
  SIDEBAR_RAIL_CONTROL_CLASS,
@@ -9,9 +9,9 @@ export const SIDEBAR_SCROLL_EDGE_FADE_CLASS =
9
9
  "[mask-image:linear-gradient(to_bottom,black_calc(100%_-_28px),transparent)] [-webkit-mask-image:linear-gradient(to_bottom,black_calc(100%_-_28px),transparent)]";
10
10
 
11
11
  export const SIDEBAR_RAIL_SURFACE_CLASS =
12
- "text-muted-foreground transition-colors duration-base hover:bg-gray-200/60 hover:text-gray-900 active:bg-gray-200/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35";
12
+ "text-muted-foreground transition-colors duration-base hover:bg-gray-200/60 hover:text-gray-900 active:bg-gray-200/80 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border";
13
13
 
14
14
  export const SIDEBAR_RAIL_ACTIVE_SURFACE_CLASS = "bg-gray-200/80 text-gray-900";
15
15
 
16
16
  export const SIDEBAR_RAIL_PRIMARY_SURFACE_CLASS =
17
- "bg-primary/10 text-primary transition-colors duration-base hover:bg-primary/15 hover:text-primary-700 active:bg-primary/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35";
17
+ "bg-primary/10 text-primary transition-colors duration-base hover:bg-primary/15 hover:text-primary-700 active:bg-primary/20 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border";
@@ -133,7 +133,7 @@ function SettingsSidebarHeader({
133
133
  to="/chat"
134
134
  aria-label={t("backToMain")}
135
135
  className={cn(
136
- "group inline-flex min-w-0 items-center rounded-lg text-[12px] font-medium text-muted-foreground transition-colors hover:bg-gray-200/60 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35",
136
+ "group inline-flex min-w-0 items-center rounded-lg text-[12px] font-medium text-muted-foreground transition-colors hover:bg-gray-200/60 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border",
137
137
  isCollapsed
138
138
  ? cn(
139
139
  SIDEBAR_RAIL_CONTROL_CLASS,
@@ -364,6 +364,19 @@
364
364
  color: hsl(var(--gray-800));
365
365
  }
366
366
 
367
+ /* User bubble is light in work theme; keep clickable skill tokens as link-colored text. */
368
+ :root[data-theme="work"] .nextclaw-chat-message-user .nextclaw-chat-inline-token {
369
+ border-color: transparent;
370
+ background-color: transparent;
371
+ color: var(--md-link, #1f73c9);
372
+ box-shadow: none;
373
+ }
374
+
375
+ :root[data-theme="work"] .nextclaw-chat-message-user .nextclaw-chat-inline-token > span:first-child {
376
+ color: currentColor;
377
+ opacity: 0.8;
378
+ }
379
+
367
380
  }
368
381
 
369
382
  @layer base {
@@ -894,10 +907,10 @@
894
907
  -webkit-backdrop-filter: blur(12px);
895
908
  }
896
909
 
897
- /* Focus Ring */
910
+ /* Focus Ring — light inset-style ring, no offset box */
898
911
  .focus-ring {
899
- @apply focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2;
900
- --tw-ring-color: hsl(var(--ring));
901
- --tw-ring-offset-color: hsl(var(--ring-offset));
912
+ @apply focus:outline-none focus-visible:ring-1 focus-visible:ring-offset-0;
913
+ --tw-ring-color: hsl(var(--border));
914
+ --tw-ring-offset-color: transparent;
902
915
  }
903
916
  }