diff --git a/static/dist/jbot.css b/static/dist/jbot.css index d8cf870..ae572ab 100644 --- a/static/dist/jbot.css +++ b/static/dist/jbot.css @@ -1 +1 @@ -*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}body{background:#f1f5f9;color:#0f172a;font-family:system-ui,Segoe UI,sans-serif;-webkit-font-smoothing:antialiased}#jbot-root{height:100dvh;height:-webkit-fill-available;display:flex;flex-direction:column}:root{--bg: #F1F5F9;--surface: #FFFFFF;--border: #E2E8F0;--text: #0F172A;--text2: #475569;--text3: #94A3B8;--accent: #0EA5E9;--accent-bg: #E0F7FE;--face-bg: #080C14}.app{height:100dvh;height:-webkit-fill-available;display:flex;flex-direction:column;background:var(--bg);color:var(--text);overflow:hidden}.hdr{flex:0 0 auto;display:flex;align-items:center;gap:12px;padding:10px 20px;background:var(--surface);border-bottom:1px solid var(--border)}.hdr h1{font-size:1.5rem;font-weight:800;letter-spacing:.1em;color:var(--text);margin:0}.accent{color:var(--accent)}.subtitle{font-size:.72rem;color:var(--text3);letter-spacing:.05em}.hdr-nav{margin-left:auto;display:flex;gap:8px}.hdr-link{background:none;border:1px solid var(--border);border-radius:6px;color:var(--text2);font-size:.78rem;padding:4px 10px;cursor:pointer;transition:background .15s,color .15s}.hdr-link:hover{background:var(--bg);color:var(--accent)}.hdr-home{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:6px;font-size:1rem;text-decoration:none;transition:background .15s;flex-shrink:0}.hdr-home:hover{background:var(--bg)}.page-body{flex:1;min-height:0;display:flex;overflow:hidden}.left-col{flex:0 0 auto;width:296px;display:flex;flex-direction:column;overflow-y:auto;scrollbar-width:none;background:var(--surface);border-right:1px solid var(--border);padding:10px 14px 14px;gap:10px}.left-col::-webkit-scrollbar{display:none}.right-col{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden;background:var(--bg)}.screen-wrap{display:flex;flex-direction:column;align-items:center;gap:8px}.bezel{background:var(--face-bg);border-radius:18px;padding:12px;box-shadow:0 4px 28px #00000038,0 0 0 1px #ffffff0f}.expr-label{font-size:.85rem;color:var(--text2);height:1.4em;text-align:center}.scale-controls{display:flex;gap:6px}.scale-btn{background:var(--bg);border:1px solid var(--border);border-radius:6px;color:var(--text2);padding:3px 12px;font-size:.78rem;cursor:pointer;transition:all .15s}.scale-btn:hover{border-color:var(--accent);color:var(--accent)}.scale-btn.active{background:var(--accent-bg);border-color:var(--accent);color:var(--accent);font-weight:600}.panel{display:flex;flex-direction:column;gap:8px}.panel-section h3{font-size:.67rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--text3);margin:0 0 5px}.key-hint{font-weight:400;opacity:.7}.btn-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:5px}.btn-grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}.btn-grid-4 .ebtn{font-size:.62rem;padding:5px 3px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ebtn{background:var(--bg);border:1px solid var(--border);border-radius:7px;color:var(--text2);padding:6px 9px;font-size:.78rem;cursor:pointer;transition:all .15s;text-align:left}.ebtn:hover{border-color:var(--c);color:var(--c);background:color-mix(in srgb,var(--c) 6%,var(--surface))}.ebtn.active{background:color-mix(in srgb,var(--c) 12%,var(--surface));border-color:var(--c);color:var(--c);font-weight:600}.toggle{display:flex;align-items:center;gap:7px;font-size:.8rem;color:var(--text2);cursor:pointer;-webkit-user-select:none;user-select:none}.toggle input[type=checkbox]{accent-color:var(--accent);width:14px;height:14px}.switch-interval{display:flex;flex-direction:column;gap:5px}.switch-interval-label{display:flex;justify-content:space-between;font-size:.75rem;color:var(--text2)}.interval-val{color:var(--accent);font-weight:700}.switch-interval input[type=range]{width:100%;accent-color:var(--accent);cursor:pointer}.interval-ticks{display:flex;justify-content:space-between;font-size:.65rem;color:var(--text3)}.hint{font-size:.72rem;color:var(--text3);line-height:1.7}kbd{background:var(--bg);border:1px solid var(--border);border-radius:4px;padding:1px 5px;font-size:.68rem;font-family:inherit;color:var(--text2)}.hist-inline-link{background:none;border:none;color:var(--accent);font-size:.72rem;padding:0;cursor:pointer;text-decoration:underline}.chat-panel{display:flex;flex-direction:column;flex:1;min-height:0;padding:14px 18px;gap:10px;overflow:hidden;background:transparent}.chat-header{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding-bottom:8px;border-bottom:1px solid var(--border)}.chat-title{font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--text3)}.history-link{background:none;border:none;color:var(--accent);font-size:.75rem;cursor:pointer;padding:0}.history-link:hover{text-decoration:underline}.voice-status{flex:0 0 auto;font-size:.8rem;letter-spacing:.04em;padding:6px 12px;border-radius:8px;width:fit-content}.voice-status-listening{color:#0369a1;background:#e0f2fe;animation:pulse .9s ease-in-out infinite}.voice-status-thinking{color:#92400e;background:#fef3c7;animation:pulse 1.2s ease-in-out infinite}.voice-status-speaking{color:#065f46;background:#d1fae5}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.chat-messages{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:10px;padding:4px 2px;scrollbar-width:thin;scrollbar-color:var(--border) transparent}.chat-messages::-webkit-scrollbar{width:4px}.chat-messages::-webkit-scrollbar-thumb{background:var(--border);border-radius:2px}.chat-empty{font-size:.82rem;color:var(--text3);text-align:center;padding:40px 0;margin:auto}.bubble{display:flex;flex-direction:column;gap:3px;max-width:82%}.bubble-user{align-self:flex-end;align-items:flex-end}.bubble-bot{align-self:flex-start;align-items:flex-start}.bubble-label{font-size:.62rem;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--text3)}.bubble-text{border-radius:12px;padding:9px 13px;font-size:.9rem;line-height:1.55}.bubble-user .bubble-text{background:#dbeafe;color:#1e3a8a;border-bottom-right-radius:3px}.bubble-bot .bubble-text{background:var(--surface);border:1px solid var(--border);color:var(--text);border-bottom-left-radius:3px}.audio-btn{width:100%;max-width:220px;height:28px;margin-top:3px;border-radius:6px;opacity:.8}.audio-btn:hover{opacity:1}.tool-calls{width:100%;margin-bottom:4px;background:var(--bg);border:1px solid var(--border);border-radius:6px;overflow:hidden;font-size:.75rem}.tool-calls-summary{padding:5px 10px;cursor:pointer;color:var(--text2);-webkit-user-select:none;user-select:none;list-style:none}.tool-calls-summary::-webkit-details-marker{display:none}.tool-calls-summary::marker{display:none}.tool-calls-summary:hover{color:var(--text)}.tool-calls-list{margin:0;padding:4px 10px 6px;list-style:none;display:flex;flex-direction:column;gap:3px;border-top:1px solid var(--border)}.tool-calls-item{display:flex;align-items:baseline;gap:5px;color:var(--text2)}.tool-calls-icon{font-size:.7rem}.tool-calls-name{font-weight:600;color:var(--accent);min-width:80px}.tool-calls-preview{font-size:.68rem;color:var(--text3);background:var(--bg);border:1px solid var(--border);border-radius:3px;padding:1px 4px;white-space:pre;overflow:hidden;text-overflow:ellipsis;max-width:200px}.hist-page{min-height:100vh;background:var(--bg)}.hist-toolbar{display:flex;align-items:center;justify-content:space-between;padding:12px 24px;border-bottom:1px solid var(--border);position:sticky;top:0;background:var(--surface);z-index:10}.hist-heading{font-size:1rem;font-weight:700;color:var(--text);margin:0}.hist-back{background:none;border:1px solid var(--border);border-radius:6px;color:var(--text2);padding:5px 12px;font-size:.78rem;cursor:pointer}.hist-back:hover{border-color:var(--accent);color:var(--accent)}.hist-clear{background:none;border:1px solid #FECACA;border-radius:6px;color:#dc2626;padding:5px 12px;font-size:.78rem;cursor:pointer}.hist-clear:hover:not(:disabled){border-color:#dc2626}.hist-clear:disabled{opacity:.3;cursor:default}.hist-empty{text-align:center;color:var(--text3);padding:64px 32px;font-size:.9rem}.hist-list{display:flex;flex-direction:column;max-width:680px;margin:0 auto;padding:16px 24px}.hist-entry{border:1px solid var(--border);border-radius:12px;padding:14px 16px;margin-bottom:12px;background:var(--surface)}.hist-meta{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.hist-time{font-size:.68rem;color:var(--text3)}.hist-del{background:none;border:none;color:var(--text3);cursor:pointer;font-size:.8rem;padding:0 4px}.hist-del:hover{color:#dc2626}.hist-row{display:flex;gap:10px;margin-bottom:8px}.hist-role{font-size:.62rem;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--text3);min-width:36px;padding-top:2px}.hist-row-user .hist-role{color:#2563eb}.hist-row-bot .hist-role{color:#059669}.hist-body{flex:1}.hist-text{font-size:.86rem;color:var(--text);line-height:1.5;margin:0 0 6px}.hist-audio{width:100%;max-width:260px;height:26px;opacity:.75;border-radius:6px}.hist-audio:hover{opacity:1}@media(max-width:700px){.app{height:100dvh;height:-webkit-fill-available}.hdr{padding:8px 14px}.hdr h1{font-size:1.2rem}.subtitle{display:none}.page-body{flex-direction:column}.left-col{width:100%;flex:0 0 auto;border-right:none;border-bottom:1px solid var(--border);padding:10px 12px;gap:8px;flex-direction:row;align-items:flex-start;overflow-x:hidden;overflow-y:visible}.screen-wrap{flex:0 0 auto}.bezel{padding:8px}.panel{flex:1;min-width:0;gap:8px;overflow-y:auto;max-height:272px}.btn-grid{grid-template-columns:repeat(2,1fr);gap:4px}.btn-grid-4{grid-template-columns:repeat(4,1fr);gap:3px}.ebtn{font-size:.7rem;padding:5px 6px}.btn-grid-4 .ebtn{font-size:.58rem;padding:4px 2px}.scale-controls{display:none}.right-col{flex:1;min-height:0}.chat-panel{padding:10px 12px}}.memory-panel{flex:0 0 auto;border-bottom:1px solid var(--border);overflow:hidden}.hermes-mode-badge{flex:0 0 auto;padding:6px 14px;font-size:.72rem;color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,transparent);border-bottom:1px solid color-mix(in srgb,var(--accent) 30%,transparent)}.memory-toggle{width:100%;display:flex;align-items:center;gap:6px;padding:7px 10px;background:var(--bg);border:none;cursor:pointer;font-size:.78rem;color:var(--text2);text-align:left}.memory-toggle:hover{background:#e8eef6}.memory-badge{margin-left:auto;background:var(--accent-bg);color:var(--accent);border-radius:10px;font-size:.65rem;font-weight:700;padding:1px 6px;min-width:18px;text-align:center}.memory-arrow{font-size:.6rem;color:var(--text3)}.memory-body{padding:8px 10px;background:var(--surface);border-top:1px solid var(--border)}.memory-empty{font-size:.72rem;color:var(--text3);text-align:center;padding:6px 0;margin:0}.memory-list{list-style:none;display:flex;flex-direction:column;gap:5px;margin:0 0 8px;padding:0;max-height:160px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--border) transparent}.memory-item{display:flex;align-items:flex-start;gap:6px;font-size:.75rem;color:var(--text2);line-height:1.4}.memory-text{flex:1}.memory-del{flex:0 0 auto;background:none;border:none;color:var(--text3);cursor:pointer;font-size:.9rem;line-height:1;padding:0 2px}.memory-del:hover{color:#dc2626}.memory-clear{width:100%;background:none;border:1px solid #FECACA;border-radius:5px;color:#dc2626;font-size:.72rem;padding:4px 0;cursor:pointer}.memory-clear:hover{background:#fef2f2}.voice-hint{margin-top:4px;display:flex;align-items:center;gap:4px;flex-wrap:wrap}.settings-page{min-height:100dvh;background:var(--bg);color:var(--text)}.settings-toolbar{display:flex;align-items:center;gap:14px;padding:12px 20px;background:var(--surface);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:10}.settings-back{background:none;border:1px solid var(--border);border-radius:6px;color:var(--text2);font-size:.85rem;padding:5px 12px;cursor:pointer;transition:background .15s}.settings-back:hover{background:var(--bg);color:var(--accent)}.settings-heading{font-size:1.1rem;font-weight:700;margin:0;flex:1}.settings-save{background:var(--accent);border:none;border-radius:7px;color:#fff;font-size:.85rem;font-weight:600;padding:6px 16px;cursor:pointer;transition:opacity .15s}.settings-save:hover{opacity:.85}.settings-body{max-width:600px;margin:0 auto;padding:20px 18px 40px;display:flex;flex-direction:column;gap:20px}.settings-section{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:16px;display:flex;flex-direction:column;gap:12px}.settings-section-title{font-size:.85rem;font-weight:700;color:var(--text2);margin:0 0 4px;letter-spacing:.02em}.settings-label{display:flex;flex-direction:column;gap:5px;font-size:.82rem;font-weight:600;color:var(--text2)}.settings-label-mt{margin-top:6px}.settings-hint{font-size:.73rem;font-weight:400;color:var(--text3);margin-left:4px}.settings-hint-block{font-size:.75rem;color:var(--text3);margin:0}.settings-hint-block a{color:var(--accent)}.settings-input{border:1px solid var(--border);border-radius:6px;padding:7px 10px;font-size:.85rem;color:var(--text);background:var(--bg);outline:none;transition:border-color .15s;font-family:inherit}.settings-input:focus{border-color:var(--accent)}.settings-textarea{border:1px solid var(--border);border-radius:6px;padding:7px 10px;font-size:.85rem;color:var(--text);background:var(--bg);outline:none;resize:vertical;min-height:60px;transition:border-color .15s;font-family:inherit;line-height:1.5}.settings-textarea:focus{border-color:var(--accent)}.settings-radio-group{display:flex;flex-direction:column;gap:8px}.settings-radio-label{display:flex;align-items:center;gap:8px;font-size:.85rem;color:var(--text2);cursor:pointer}.settings-radio-label input{accent-color:var(--accent)}.settings-voice-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px}.settings-voice-btn{display:flex;flex-direction:column;gap:3px;padding:10px 10px 8px;background:var(--bg);border:1.5px solid var(--border);border-radius:8px;cursor:pointer;text-align:left;transition:border-color .15s,background .15s}.settings-voice-btn:hover,.settings-voice-btn.active{border-color:var(--accent);background:var(--accent-bg)}.voice-btn-label{font-size:.88rem;font-weight:700;color:var(--text)}.voice-btn-meta{font-size:.68rem;color:var(--text3);line-height:1.3}.settings-section-danger{border-color:#fecaca}.settings-reset-btn{background:none;border:1px solid #FECACA;border-radius:6px;color:#dc2626;font-size:.82rem;padding:7px 14px;cursor:pointer;transition:background .15s}.settings-reset-btn:hover{background:#fef2f2}.settings-secret-row{display:flex;gap:.5rem;align-items:stretch}.settings-secret-row .settings-input{flex:1}.settings-show-btn{padding:.45rem .75rem;font-size:.78rem;background:#e2e8f0;border:1px solid #cbd5e1;border-radius:6px;cursor:pointer;white-space:nowrap;color:#475569}.settings-show-btn:hover{background:#cbd5e1}.vbtn-wrap{flex:0 0 auto;display:flex;justify-content:center;padding:8px 16px 14px;background:var(--surface);border-top:1px solid var(--border)}.vbtn{position:relative;width:100%;max-width:380px;height:52px;border:none;border-radius:26px;font-size:1rem;font-weight:700;letter-spacing:.03em;cursor:pointer;user-select:none;-webkit-user-select:none;touch-action:none;background:var(--accent);color:#fff;box-shadow:0 4px 14px #0ea5e959;transition:background .15s,box-shadow .15s,transform .1s}.vbtn:active:not(:disabled){transform:scale(.96)}.vbtn--acquiring{background:#f59e0b;box-shadow:0 0 #f59e0b80;animation:vbtn-pulse-amber .7s ease-out infinite}@keyframes vbtn-pulse-amber{0%{box-shadow:0 0 #f59e0b8c}70%{box-shadow:0 0 0 16px #f59e0b00}to{box-shadow:0 0 #f59e0b00}}.vbtn--recording{background:#ef4444;box-shadow:0 0 #ef444480;animation:vbtn-pulse-red .9s ease-out infinite}@keyframes vbtn-pulse-red{0%{box-shadow:0 0 #ef44448c}70%{box-shadow:0 0 0 20px #ef444400}to{box-shadow:0 0 #ef444400}}.vbtn--busy{background:#94a3b8;box-shadow:none;cursor:not-allowed}.vbtn-cancel{flex:0 0 auto;width:52px;height:52px;margin-left:10px;border:none;border-radius:50%;background:#ef4444;color:#fff;font-size:1.1rem;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 3px 10px #ef444473;transition:transform .1s,box-shadow .1s;touch-action:manipulation}.vbtn-cancel:active{transform:scale(.93);box-shadow:none}@media(max-width:700px){.vbtn-wrap{position:fixed;bottom:0;left:0;right:0;padding:10px 20px calc(10px + env(safe-area-inset-bottom));background:#fffffff5;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-top:1px solid var(--border);z-index:100}.vbtn{height:60px;font-size:1.08rem}.right-col{padding-bottom:100px}}.settings-slider-row{display:flex;align-items:center;gap:10px;margin-top:4px}.settings-slider{flex:1;accent-color:var(--accent);cursor:pointer}.settings-slider-val{font-size:.82rem;font-weight:700;color:var(--accent);min-width:36px;text-align:right} +*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}body{background:#f1f5f9;color:#0f172a;font-family:system-ui,Segoe UI,sans-serif;-webkit-font-smoothing:antialiased}#jbot-root{height:100dvh;height:-webkit-fill-available;display:flex;flex-direction:column}:root{--bg: #F1F5F9;--surface: #FFFFFF;--border: #E2E8F0;--text: #0F172A;--text2: #475569;--text3: #94A3B8;--accent: #0EA5E9;--accent-bg: #E0F7FE;--face-bg: #080C14}.app{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;background:var(--bg);color:var(--text);overflow:hidden}.hdr{flex:0 0 auto;display:flex;align-items:center;gap:12px;padding:10px 20px;background:var(--surface);border-bottom:1px solid var(--border)}.hdr h1{font-size:1.5rem;font-weight:800;letter-spacing:.1em;color:var(--text);margin:0}.accent{color:var(--accent)}.subtitle{font-size:.72rem;color:var(--text3);letter-spacing:.05em}.hdr-nav{margin-left:auto;display:flex;gap:8px}.hdr-link{background:none;border:1px solid var(--border);border-radius:6px;color:var(--text2);font-size:.78rem;padding:4px 10px;cursor:pointer;transition:background .15s,color .15s}.hdr-link:hover{background:var(--bg);color:var(--accent)}.hdr-home{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:6px;font-size:1rem;text-decoration:none;transition:background .15s;flex-shrink:0}.hdr-home:hover{background:var(--bg)}.page-body{flex:1;min-height:0;display:flex;overflow:hidden}.left-col{flex:0 0 auto;width:296px;display:flex;flex-direction:column;overflow-y:auto;scrollbar-width:none;background:var(--surface);border-right:1px solid var(--border);padding:10px 14px 14px;gap:10px}.left-col::-webkit-scrollbar{display:none}.right-col{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden;background:var(--bg)}.screen-wrap{display:flex;flex-direction:column;align-items:center;gap:8px}.bezel{background:var(--face-bg);border-radius:18px;padding:12px;box-shadow:0 4px 28px #00000038,0 0 0 1px #ffffff0f}.expr-label{font-size:.85rem;color:var(--text2);height:1.4em;text-align:center}.scale-controls{display:flex;gap:6px}.scale-btn{background:var(--bg);border:1px solid var(--border);border-radius:6px;color:var(--text2);padding:3px 12px;font-size:.78rem;cursor:pointer;transition:all .15s}.scale-btn:hover{border-color:var(--accent);color:var(--accent)}.scale-btn.active{background:var(--accent-bg);border-color:var(--accent);color:var(--accent);font-weight:600}.panel{display:flex;flex-direction:column;gap:8px}.panel-section h3{font-size:.67rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--text3);margin:0 0 5px}.key-hint{font-weight:400;opacity:.7}.btn-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:5px}.btn-grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}.btn-grid-4 .ebtn{font-size:.62rem;padding:5px 3px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ebtn{background:var(--bg);border:1px solid var(--border);border-radius:7px;color:var(--text2);padding:6px 9px;font-size:.78rem;cursor:pointer;transition:all .15s;text-align:left}.ebtn:hover{border-color:var(--c);color:var(--c);background:color-mix(in srgb,var(--c) 6%,var(--surface))}.ebtn.active{background:color-mix(in srgb,var(--c) 12%,var(--surface));border-color:var(--c);color:var(--c);font-weight:600}.toggle{display:flex;align-items:center;gap:7px;font-size:.8rem;color:var(--text2);cursor:pointer;-webkit-user-select:none;user-select:none}.toggle input[type=checkbox]{accent-color:var(--accent);width:14px;height:14px}.switch-interval{display:flex;flex-direction:column;gap:5px}.switch-interval-label{display:flex;justify-content:space-between;font-size:.75rem;color:var(--text2)}.interval-val{color:var(--accent);font-weight:700}.switch-interval input[type=range]{width:100%;accent-color:var(--accent);cursor:pointer}.interval-ticks{display:flex;justify-content:space-between;font-size:.65rem;color:var(--text3)}.hint{font-size:.72rem;color:var(--text3);line-height:1.7}kbd{background:var(--bg);border:1px solid var(--border);border-radius:4px;padding:1px 5px;font-size:.68rem;font-family:inherit;color:var(--text2)}.hist-inline-link{background:none;border:none;color:var(--accent);font-size:.72rem;padding:0;cursor:pointer;text-decoration:underline}.chat-panel{display:flex;flex-direction:column;flex:1;min-height:0;padding:14px 18px;gap:10px;overflow:hidden;background:transparent}.chat-header{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding-bottom:8px;border-bottom:1px solid var(--border)}.chat-title{font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--text3)}.history-link{background:none;border:none;color:var(--accent);font-size:.75rem;cursor:pointer;padding:0}.history-link:hover{text-decoration:underline}.voice-status{flex:0 0 auto;font-size:.8rem;letter-spacing:.04em;padding:6px 12px;border-radius:8px;width:fit-content}.voice-status-listening{color:#0369a1;background:#e0f2fe;animation:pulse .9s ease-in-out infinite}.voice-status-thinking{color:#92400e;background:#fef3c7;animation:pulse 1.2s ease-in-out infinite}.voice-status-tts{color:#1d4ed8;background:#dbeafe;animation:pulse 1s ease-in-out infinite}.voice-status-speaking{color:#065f46;background:#d1fae5}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.chat-messages{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:10px;padding:4px 2px;scrollbar-width:thin;scrollbar-color:var(--border) transparent}.chat-messages::-webkit-scrollbar{width:4px}.chat-messages::-webkit-scrollbar-thumb{background:var(--border);border-radius:2px}.chat-empty{font-size:.82rem;color:var(--text3);text-align:center;padding:40px 0;margin:auto}.bubble{display:flex;flex-direction:column;gap:3px;max-width:82%}.bubble-user{align-self:flex-end;align-items:flex-end}.bubble-bot{align-self:flex-start;align-items:flex-start}.bubble-label{font-size:.62rem;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--text3)}.bubble-text{border-radius:12px;padding:9px 13px;font-size:.9rem;line-height:1.55}.bubble-markdown{display:flex;flex-direction:column;gap:6px}.bubble-paragraph{margin:0}.bubble-heading{margin:0;font-weight:700;line-height:1.3}.bubble-heading-1{font-size:1.05rem}.bubble-heading-2{font-size:.98rem}.bubble-heading-3{font-size:.94rem}.bubble-list{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:4px}.bubble-list li{margin:0}.bubble-code{margin:0;padding:8px 10px;border-radius:8px;background:#0f172a0f;overflow-x:auto;white-space:pre-wrap;font-size:.84rem}.bubble-markdown code{padding:0 4px;border-radius:4px;background:#0f172a0f;font-size:.86em}.bubble-markdown a{color:var(--accent);word-break:break-word}.bubble-user .bubble-text{background:#dbeafe;color:#1e3a8a;border-bottom-right-radius:3px}.bubble-bot .bubble-text{background:var(--surface);border:1px solid var(--border);color:var(--text);border-bottom-left-radius:3px}.audio-btn{width:100%;max-width:220px;height:28px;margin-top:3px;border-radius:6px;opacity:.8}.audio-btn:hover{opacity:1}.tool-calls{width:100%;margin-bottom:4px;background:var(--bg);border:1px solid var(--border);border-radius:6px;overflow:hidden;font-size:.75rem}.tool-calls-summary{padding:5px 10px;cursor:pointer;color:var(--text2);-webkit-user-select:none;user-select:none;list-style:none}.tool-calls-summary::-webkit-details-marker{display:none}.tool-calls-summary::marker{display:none}.tool-calls-summary:hover{color:var(--text)}.tool-calls-list{margin:0;padding:4px 10px 6px;list-style:none;display:flex;flex-direction:column;gap:3px;border-top:1px solid var(--border)}.tool-calls-item{display:flex;align-items:baseline;gap:5px;color:var(--text2)}.tool-calls-icon{font-size:.7rem}.tool-calls-name{font-weight:600;color:var(--accent);min-width:80px}.tool-calls-preview{font-size:.68rem;color:var(--text3);background:var(--bg);border:1px solid var(--border);border-radius:3px;padding:1px 4px;white-space:pre;overflow:hidden;text-overflow:ellipsis;max-width:200px}.hist-page{min-height:100vh;background:var(--bg)}.hist-toolbar{display:flex;align-items:center;justify-content:space-between;padding:12px 24px;border-bottom:1px solid var(--border);position:sticky;top:0;background:var(--surface);z-index:10}.hist-heading{font-size:1rem;font-weight:700;color:var(--text);margin:0}.hist-back{background:none;border:1px solid var(--border);border-radius:6px;color:var(--text2);padding:5px 12px;font-size:.78rem;cursor:pointer}.hist-back:hover{border-color:var(--accent);color:var(--accent)}.hist-clear{background:none;border:1px solid #FECACA;border-radius:6px;color:#dc2626;padding:5px 12px;font-size:.78rem;cursor:pointer}.hist-clear:hover:not(:disabled){border-color:#dc2626}.hist-clear:disabled{opacity:.3;cursor:default}.hist-empty{text-align:center;color:var(--text3);padding:64px 32px;font-size:.9rem}.hist-list{display:flex;flex-direction:column;max-width:680px;margin:0 auto;padding:16px 24px}.hist-entry{border:1px solid var(--border);border-radius:12px;padding:14px 16px;margin-bottom:12px;background:var(--surface)}.hist-meta{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.hist-time{font-size:.68rem;color:var(--text3)}.hist-del{background:none;border:none;color:var(--text3);cursor:pointer;font-size:.8rem;padding:0 4px}.hist-del:hover{color:#dc2626}.hist-row{display:flex;gap:10px;margin-bottom:8px}.hist-role{font-size:.62rem;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--text3);min-width:36px;padding-top:2px}.hist-row-user .hist-role{color:#2563eb}.hist-row-bot .hist-role{color:#059669}.hist-body{flex:1}.hist-text{font-size:.86rem;color:var(--text);line-height:1.5;margin:0 0 6px}.hist-audio{width:100%;max-width:260px;height:26px;opacity:.75;border-radius:6px}.hist-audio:hover{opacity:1}@media(max-width:700px){.app{height:100dvh;height:-webkit-fill-available}.hdr{padding:8px 14px}.hdr h1{font-size:1.2rem}.subtitle{display:none}.page-body{flex-direction:column}.left-col{width:100%;flex:0 0 auto;border-right:none;border-bottom:1px solid var(--border);padding:10px 12px;gap:8px;flex-direction:row;align-items:flex-start;overflow-x:hidden;overflow-y:visible}.screen-wrap{flex:0 0 auto}.bezel{padding:8px}.panel{flex:1;min-width:0;gap:8px;overflow-y:auto;max-height:272px}.btn-grid{grid-template-columns:repeat(2,1fr);gap:4px}.btn-grid-4{grid-template-columns:repeat(4,1fr);gap:3px}.ebtn{font-size:.7rem;padding:5px 6px}.btn-grid-4 .ebtn{font-size:.58rem;padding:4px 2px}.scale-controls{display:none}.right-col{flex:1;min-height:0}.chat-panel{padding:10px 12px}}.memory-panel{flex:0 0 auto;border-bottom:1px solid var(--border);overflow:hidden}.hermes-mode-badge{flex:0 0 auto;padding:6px 14px;font-size:.72rem;color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,transparent);border-bottom:1px solid color-mix(in srgb,var(--accent) 30%,transparent)}.memory-toggle{width:100%;display:flex;align-items:center;gap:6px;padding:7px 10px;background:var(--bg);border:none;cursor:pointer;font-size:.78rem;color:var(--text2);text-align:left}.memory-toggle:hover{background:#e8eef6}.memory-badge{margin-left:auto;background:var(--accent-bg);color:var(--accent);border-radius:10px;font-size:.65rem;font-weight:700;padding:1px 6px;min-width:18px;text-align:center}.memory-arrow{font-size:.6rem;color:var(--text3)}.memory-body{padding:8px 10px;background:var(--surface);border-top:1px solid var(--border)}.memory-empty{font-size:.72rem;color:var(--text3);text-align:center;padding:6px 0;margin:0}.memory-list{list-style:none;display:flex;flex-direction:column;gap:5px;margin:0 0 8px;padding:0;max-height:160px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--border) transparent}.memory-item{display:flex;align-items:flex-start;gap:6px;font-size:.75rem;color:var(--text2);line-height:1.4}.memory-text{flex:1}.memory-del{flex:0 0 auto;background:none;border:none;color:var(--text3);cursor:pointer;font-size:.9rem;line-height:1;padding:0 2px}.memory-del:hover{color:#dc2626}.memory-clear{width:100%;background:none;border:1px solid #FECACA;border-radius:5px;color:#dc2626;font-size:.72rem;padding:4px 0;cursor:pointer}.memory-clear:hover{background:#fef2f2}.voice-hint{margin-top:4px;display:flex;align-items:center;gap:4px;flex-wrap:wrap}.settings-page{min-height:100dvh;background:var(--bg);color:var(--text)}.settings-toolbar{display:flex;align-items:center;gap:14px;padding:12px 20px;background:var(--surface);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:10}.settings-back{background:none;border:1px solid var(--border);border-radius:6px;color:var(--text2);font-size:.85rem;padding:5px 12px;cursor:pointer;transition:background .15s}.settings-back:hover{background:var(--bg);color:var(--accent)}.settings-heading{font-size:1.1rem;font-weight:700;margin:0;flex:1}.settings-save{background:var(--accent);border:none;border-radius:7px;color:#fff;font-size:.85rem;font-weight:600;padding:6px 16px;cursor:pointer;transition:opacity .15s}.settings-save:hover{opacity:.85}.settings-body{max-width:600px;margin:0 auto;padding:20px 18px 40px;display:flex;flex-direction:column;gap:20px}.settings-section{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:16px;display:flex;flex-direction:column;gap:12px}.settings-section-title{font-size:.85rem;font-weight:700;color:var(--text2);margin:0 0 4px;letter-spacing:.02em}.settings-label{display:flex;flex-direction:column;gap:5px;font-size:.82rem;font-weight:600;color:var(--text2)}.settings-label-mt{margin-top:6px}.settings-hint{font-size:.73rem;font-weight:400;color:var(--text3);margin-left:4px}.settings-hint-block{font-size:.75rem;color:var(--text3);margin:0}.settings-hint-block a{color:var(--accent)}.settings-input{border:1px solid var(--border);border-radius:6px;padding:7px 10px;font-size:.85rem;color:var(--text);background:var(--bg);outline:none;transition:border-color .15s;font-family:inherit}.settings-input:focus{border-color:var(--accent)}.settings-textarea{border:1px solid var(--border);border-radius:6px;padding:7px 10px;font-size:.85rem;color:var(--text);background:var(--bg);outline:none;resize:vertical;min-height:60px;transition:border-color .15s;font-family:inherit;line-height:1.5}.settings-textarea:focus{border-color:var(--accent)}.settings-radio-group{display:flex;flex-direction:column;gap:8px}.settings-radio-label{display:flex;align-items:center;gap:8px;font-size:.85rem;color:var(--text2);cursor:pointer}.settings-radio-label input{accent-color:var(--accent)}.settings-voice-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px}.settings-voice-btn{display:flex;flex-direction:column;gap:3px;padding:10px 10px 8px;background:var(--bg);border:1.5px solid var(--border);border-radius:8px;cursor:pointer;text-align:left;transition:border-color .15s,background .15s}.settings-voice-btn:hover,.settings-voice-btn.active{border-color:var(--accent);background:var(--accent-bg)}.voice-btn-label{font-size:.88rem;font-weight:700;color:var(--text)}.voice-btn-meta{font-size:.68rem;color:var(--text3);line-height:1.3}.settings-section-danger{border-color:#fecaca}.settings-reset-btn{background:none;border:1px solid #FECACA;border-radius:6px;color:#dc2626;font-size:.82rem;padding:7px 14px;cursor:pointer;transition:background .15s}.settings-reset-btn:hover{background:#fef2f2}.settings-secret-row{display:flex;gap:.5rem;align-items:stretch}.settings-secret-row .settings-input{flex:1}.settings-show-btn{padding:.45rem .75rem;font-size:.78rem;background:#e2e8f0;border:1px solid #cbd5e1;border-radius:6px;cursor:pointer;white-space:nowrap;color:#475569}.settings-show-btn:hover{background:#cbd5e1}.vbtn-wrap{flex:0 0 auto;display:flex;justify-content:center;padding:8px 16px 14px;background:var(--surface);border-top:1px solid var(--border)}.vbtn{position:relative;width:100%;max-width:380px;height:52px;border:none;border-radius:26px;font-size:1rem;font-weight:700;letter-spacing:.03em;cursor:pointer;user-select:none;-webkit-user-select:none;touch-action:none;background:var(--accent);color:#fff;box-shadow:0 4px 14px #0ea5e959;transition:background .15s,box-shadow .15s,transform .1s}.vbtn:active:not(:disabled){transform:scale(.96)}.vbtn--acquiring{background:#f59e0b;box-shadow:0 0 #f59e0b80;animation:vbtn-pulse-amber .7s ease-out infinite}@keyframes vbtn-pulse-amber{0%{box-shadow:0 0 #f59e0b8c}70%{box-shadow:0 0 0 16px #f59e0b00}to{box-shadow:0 0 #f59e0b00}}.vbtn--recording{background:#ef4444;box-shadow:0 0 #ef444480;animation:vbtn-pulse-red .9s ease-out infinite}@keyframes vbtn-pulse-red{0%{box-shadow:0 0 #ef44448c}70%{box-shadow:0 0 0 20px #ef444400}to{box-shadow:0 0 #ef444400}}.vbtn--busy{background:#94a3b8;box-shadow:none;cursor:not-allowed}.vbtn-cancel{flex:0 0 auto;width:52px;height:52px;margin-left:10px;border:none;border-radius:50%;background:#ef4444;color:#fff;font-size:1.1rem;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 3px 10px #ef444473;transition:transform .1s,box-shadow .1s;touch-action:manipulation}.vbtn-cancel:active{transform:scale(.93);box-shadow:none}@media(max-width:700px){.vbtn-wrap{position:fixed;bottom:0;left:0;right:0;padding:10px 20px calc(10px + env(safe-area-inset-bottom));background:#fffffff5;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-top:1px solid var(--border);z-index:100}.vbtn{height:60px;font-size:1.08rem}.right-col{padding-bottom:100px}}.settings-slider-row{display:flex;align-items:center;gap:10px;margin-top:4px}.settings-slider{flex:1;accent-color:var(--accent);cursor:pointer}.settings-slider-val{font-size:.82rem;font-weight:700;color:var(--accent);min-width:36px;text-align:right} diff --git a/static/dist/jbot.js b/static/dist/jbot.js index a504f21..da56be5 100644 --- a/static/dist/jbot.js +++ b/static/dist/jbot.js @@ -1,4 +1,4 @@ -import{r as l,j as i,c as on}from"./client-DS0SU7Jy.js";/** +import{r as l,j as i,c as cn}from"./client-DS0SU7Jy.js";/** * react-router v7.15.1 * * Copyright (c) Remix Software Inc. @@ -7,6 +7,12 @@ import{r as l,j as i,c as on}from"./client-DS0SU7Jy.js";/** * LICENSE.md file in the root directory of this source tree. * * @license MIT - */var wt="popstate";function xt(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function ln(e={}){function t(r,a){var d;let s=(d=a.state)==null?void 0:d.masked,{pathname:o,search:u,hash:c}=s||r.location;return Ze("",{pathname:o,search:u,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default",s?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:Ee(a)}return un(t,n,null,e)}function M(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function q(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function cn(){return Math.random().toString(36).substring(2,10)}function Et(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Ze(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?he(t):t,state:n,key:t&&t.key||r||cn(),mask:a}}function Ee({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 he(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 un(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:s=!1}=r,o=a.history,u="POP",c=null,d=f();d==null&&(d=0,o.replaceState({...o.state,idx:d},""));function f(){return(o.state||{idx:null}).idx}function h(){u="POP";let m=f(),g=m==null?null:m-d;d=m,c&&c({action:u,location:b.location,delta:g})}function p(m,g){u="PUSH";let x=xt(m)?m:Ze(b.location,m,g);d=f()+1;let w=Et(x,d),P=b.createHref(x.mask||x);try{o.pushState(w,"",P)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;a.location.assign(P)}s&&c&&c({action:u,location:b.location,delta:1})}function v(m,g){u="REPLACE";let x=xt(m)?m:Ze(b.location,m,g);d=f();let w=Et(x,d),P=b.createHref(x.mask||x);o.replaceState(w,"",P),s&&c&&c({action:u,location:b.location,delta:0})}function y(m){return dn(m)}let b={get action(){return u},get location(){return e(a,o)},listen(m){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(wt,h),c=m,()=>{a.removeEventListener(wt,h),c=null}},createHref(m){return t(a,m)},createURL:y,encodeLocation(m){let g=y(m);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:p,replace:v,go(m){return o.go(m)}};return b}function dn(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),M(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Ee(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function Lt(e,t,n="/"){return hn(e,t,n,!1)}function hn(e,t,n,r,a){let s=typeof t=="string"?he(t):t,o=te(s.pathname||"/",n);if(o==null)return null;let u=fn(e),c=null,d=kn(o);for(let f=0;c==null&&f{let f={relativePath:d===void 0?o.path||"":d,caseSensitive:o.caseSensitive===!0,childrenIndex:u,route:o};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(r)&&c)return;M(f.relativePath.startsWith(r),`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(r.length)}let h=V([r,f.relativePath]),p=n.concat(f);o.children&&o.children.length>0&&(M(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),_t(o.children,t,p,h,c)),!(o.path==null&&!o.index)&&t.push({path:h,score:xn(h,o.index),routesMeta:p})};return e.forEach((o,u)=>{var c;if(o.path===""||!((c=o.path)!=null&&c.includes("?")))s(o,u);else for(let d of $t(o.path))s(o,u,!0,d)}),t}function $t(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return a?[s,""]:[s];let o=$t(r.join("/")),u=[];return u.push(...o.map(c=>c===""?s:[s,c].join("/"))),a&&u.push(...o),u.map(c=>e.startsWith("/")&&c===""?"/":c)}function mn(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:En(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var pn=/^:[\w-]+$/,gn=3,yn=2,vn=1,bn=10,wn=-2,Rt=e=>e==="*";function xn(e,t){let n=e.split("/"),r=n.length;return n.some(Rt)&&(r+=wn),t&&(r+=yn),n.filter(a=>!Rt(a)).reduce((a,s)=>a+(pn.test(s)?gn:s===""?vn:bn),r)}function En(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function Rn(e,t,n=!1){let{routesMeta:r}=e,a={},s="/",o=[];for(let u=0;u{if(f==="*"){let y=u[p]||"";o=s.slice(0,s.length-y.length).replace(/(.)\/+$/,"$1")}const v=u[p];return h&&!v?d[f]=void 0:d[f]=(v||"").replace(/%2F/g,"/"),d},{}),pathname:s,pathnameBase:o,pattern:e}}function Sn(e,t=!1,n=!0){q(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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,u,c,d,f)=>{if(r.push({paramName:u,isOptional:c!=null}),c){let h=f.charAt(d+o.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function kn(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return q(!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 te(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 Cn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Nn(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?he(e):e,s;return n?(n=Ft(n),n.startsWith("/")?s=St(n.substring(1),"/"):s=St(n,t)):s=t,{pathname:s,search:Mn(r),hash:An(a)}}function St(e,t){let n=Oe(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Ge(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 and the router will parse it for you.`}function jn(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Bt(e){let t=jn(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function st(e,t,n,r=!1){let a;typeof e=="string"?a=he(e):(a={...e},M(!a.pathname||!a.pathname.includes("?"),Ge("?","pathname","search",a)),M(!a.pathname||!a.pathname.includes("#"),Ge("#","pathname","hash",a)),M(!a.search||!a.search.includes("#"),Ge("#","search","hash",a)));let s=e===""||a.pathname==="",o=s?"/":a.pathname,u;if(o==null)u=n;else{let h=t.length-1;if(!r&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),h-=1;a.pathname=p.join("/")}u=h>=0?t[h]:"/"}let c=Nn(a,u),d=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||f)&&(c.pathname+="/"),c}var Ft=e=>e.replace(/\/\/+/g,"/"),V=e=>Ft(e.join("/")),Oe=e=>e.replace(/\/+$/,""),Tn=e=>Oe(e).replace(/^\/*/,"/"),Mn=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,An=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Pn=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 In(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Ln(e){let t=e.map(n=>n.route.path).filter(Boolean);return V(t)||"/"}var Ot=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Dt(e,t){let n=e;if(typeof n!="string"||!Cn.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(Ot)try{let s=new URL(window.location.href),o=n.startsWith("//")?new URL(s.protocol+n):new URL(n),u=te(o.pathname,t);o.origin===s.origin&&u!=null?n=u+o.search+o.hash:a=!0}catch{q(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ut=["POST","PUT","PATCH","DELETE"];new Set(Ut);var _n=["GET",...Ut];new Set(_n);var fe=l.createContext(null);fe.displayName="DataRouter";var Ue=l.createContext(null);Ue.displayName="DataRouterState";var Ht=l.createContext(!1);function $n(){return l.useContext(Ht)}var zt=l.createContext({isTransitioning:!1});zt.displayName="ViewTransition";var Bn=l.createContext(new Map);Bn.displayName="Fetchers";var Fn=l.createContext(null);Fn.displayName="Await";var z=l.createContext(null);z.displayName="Navigation";var Se=l.createContext(null);Se.displayName="Location";var ne=l.createContext({outlet:null,matches:[],isDataRoute:!1});ne.displayName="Route";var ot=l.createContext(null);ot.displayName="RouteError";var Wt="REACT_ROUTER_ERROR",On="REDIRECT",Dn="ROUTE_ERROR_RESPONSE";function Un(e){if(e.startsWith(`${Wt}:${On}:{`))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 Hn(e){if(e.startsWith(`${Wt}:${Dn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Pn(t.status,t.statusText,t.data)}catch{}}function zn(e,{relative:t}={}){M(ke(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=l.useContext(z),{hash:a,pathname:s,search:o}=Ne(e,{relative:t}),u=s;return n!=="/"&&(u=s==="/"?n:V([n,s])),r.createHref({pathname:u,search:o,hash:a})}function ke(){return l.useContext(Se)!=null}function re(){return M(ke(),"useLocation() may be used only in the context of a component."),l.useContext(Se).location}var Vt="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Kt(e){l.useContext(z).static||l.useLayoutEffect(e)}function Ce(){let{isDataRoute:e}=l.useContext(ne);return e?nr():Wn()}function Wn(){M(ke(),"useNavigate() may be used only in the context of a component.");let e=l.useContext(fe),{basename:t,navigator:n}=l.useContext(z),{matches:r}=l.useContext(ne),{pathname:a}=re(),s=JSON.stringify(Bt(r)),o=l.useRef(!1);return Kt(()=>{o.current=!0}),l.useCallback((c,d={})=>{if(q(o.current,Vt),!o.current)return;if(typeof c=="number"){n.go(c);return}let f=st(c,JSON.parse(s),a,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:V([t,f.pathname])),(d.replace?n.replace:n.push)(f,d.state,d)},[t,n,s,a,e])}l.createContext(null);function Ne(e,{relative:t}={}){let{matches:n}=l.useContext(ne),{pathname:r}=re(),a=JSON.stringify(Bt(n));return l.useMemo(()=>st(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function Vn(e,t){return Jt(e,t)}function Jt(e,t,n){var m;M(ke(),"useRoutes() may be used only in the context of a component.");let{navigator:r}=l.useContext(z),{matches:a}=l.useContext(ne),s=a[a.length-1],o=s?s.params:{},u=s?s.pathname:"/",c=s?s.pathnameBase:"/",d=s&&s.route;{let g=d&&d.path||"";Gt(u,!d||g.endsWith("*")||g.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${u}" (under ) 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. + */var Et="popstate";function Rt(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function un(e={}){function t(r,a){var u;let s=(u=a.state)==null?void 0:u.masked,{pathname:o,search:c,hash:d}=s||r.location;return et("",{pathname:o,search:c,hash:d},a.state&&a.state.usr||null,a.state&&a.state.key||"default",s?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:Ee(a)}return hn(t,n,null,e)}function M(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function q(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function dn(){return Math.random().toString(36).substring(2,10)}function kt(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function et(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?he(t):t,state:n,key:t&&t.key||r||dn(),mask:a}}function Ee({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 he(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 hn(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:s=!1}=r,o=a.history,c="POP",d=null,u=f();u==null&&(u=0,o.replaceState({...o.state,idx:u},""));function f(){return(o.state||{idx:null}).idx}function h(){c="POP";let m=f(),g=m==null?null:m-u;u=m,d&&d({action:c,location:v.location,delta:g})}function p(m,g){c="PUSH";let x=Rt(m)?m:et(v.location,m,g);u=f()+1;let w=kt(x,u),A=v.createHref(x.mask||x);try{o.pushState(w,"",A)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;a.location.assign(A)}s&&d&&d({action:c,location:v.location,delta:1})}function b(m,g){c="REPLACE";let x=Rt(m)?m:et(v.location,m,g);u=f();let w=kt(x,u),A=v.createHref(x.mask||x);o.replaceState(w,"",A),s&&d&&d({action:c,location:v.location,delta:0})}function y(m){return fn(m)}let v={get action(){return c},get location(){return e(a,o)},listen(m){if(d)throw new Error("A history only accepts one active listener");return a.addEventListener(Et,h),d=m,()=>{a.removeEventListener(Et,h),d=null}},createHref(m){return t(a,m)},createURL:y,encodeLocation(m){let g=y(m);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:p,replace:b,go(m){return o.go(m)}};return v}function fn(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),M(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Ee(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function Lt(e,t,n="/"){return mn(e,t,n,!1)}function mn(e,t,n,r,a){let s=typeof t=="string"?he(t):t,o=te(s.pathname||"/",n);if(o==null)return null;let c=pn(e),d=null,u=Nn(o);for(let f=0;d==null&&f{let f={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:c,route:o};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(r)&&d)return;M(f.relativePath.startsWith(r),`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(r.length)}let h=W([r,f.relativePath]),p=n.concat(f);o.children&&o.children.length>0&&(M(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),Bt(o.children,t,p,h,d)),!(o.path==null&&!o.index)&&t.push({path:h,score:Rn(h,o.index),routesMeta:p})};return e.forEach((o,c)=>{var d;if(o.path===""||!((d=o.path)!=null&&d.includes("?")))s(o,c);else for(let u of Ft(o.path))s(o,c,!0,u)}),t}function Ft(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return a?[s,""]:[s];let o=Ft(r.join("/")),c=[];return c.push(...o.map(d=>d===""?s:[s,d].join("/"))),a&&c.push(...o),c.map(d=>e.startsWith("/")&&d===""?"/":d)}function gn(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:kn(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var yn=/^:[\w-]+$/,bn=3,vn=2,wn=1,xn=10,En=-2,St=e=>e==="*";function Rn(e,t){let n=e.split("/"),r=n.length;return n.some(St)&&(r+=En),t&&(r+=vn),n.filter(a=>!St(a)).reduce((a,s)=>a+(yn.test(s)?bn:s===""?wn:xn),r)}function kn(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function Sn(e,t,n=!1){let{routesMeta:r}=e,a={},s="/",o=[];for(let c=0;c{if(f==="*"){let y=c[p]||"";o=s.slice(0,s.length-y.length).replace(/(.)\/+$/,"$1")}const b=c[p];return h&&!b?u[f]=void 0:u[f]=(b||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function jn(e,t=!1,n=!0){q(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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,c,d,u,f)=>{if(r.push({paramName:c,isOptional:d!=null}),d){let h=f.charAt(u+o.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function Nn(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return q(!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 te(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 Cn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Tn(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?he(e):e,s;return n?(n=Dt(n),n.startsWith("/")?s=jt(n.substring(1),"/"):s=jt(n,t)):s=t,{pathname:s,search:An(r),hash:_n(a)}}function jt(e,t){let n=De(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Ye(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 and the router will parse it for you.`}function Mn(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ot(e){let t=Mn(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function ot(e,t,n,r=!1){let a;typeof e=="string"?a=he(e):(a={...e},M(!a.pathname||!a.pathname.includes("?"),Ye("?","pathname","search",a)),M(!a.pathname||!a.pathname.includes("#"),Ye("#","pathname","hash",a)),M(!a.search||!a.search.includes("#"),Ye("#","search","hash",a)));let s=e===""||a.pathname==="",o=s?"/":a.pathname,c;if(o==null)c=n;else{let h=t.length-1;if(!r&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),h-=1;a.pathname=p.join("/")}c=h>=0?t[h]:"/"}let d=Tn(a,c),u=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(u||f)&&(d.pathname+="/"),d}var Dt=e=>e.replace(/\/\/+/g,"/"),W=e=>Dt(e.join("/")),De=e=>e.replace(/\/+$/,""),$n=e=>De(e).replace(/^\/*/,"/"),An=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,_n=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,In=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 Pn(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Ln(e){let t=e.map(n=>n.route.path).filter(Boolean);return W(t)||"/"}var Ut=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ht(e,t){let n=e;if(typeof n!="string"||!Cn.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(Ut)try{let s=new URL(window.location.href),o=n.startsWith("//")?new URL(s.protocol+n):new URL(n),c=te(o.pathname,t);o.origin===s.origin&&c!=null?n=c+o.search+o.hash:a=!0}catch{q(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var zt=["POST","PUT","PATCH","DELETE"];new Set(zt);var Bn=["GET",...zt];new Set(Bn);var fe=l.createContext(null);fe.displayName="DataRouter";var He=l.createContext(null);He.displayName="DataRouterState";var Wt=l.createContext(!1);function Fn(){return l.useContext(Wt)}var Vt=l.createContext({isTransitioning:!1});Vt.displayName="ViewTransition";var On=l.createContext(new Map);On.displayName="Fetchers";var Dn=l.createContext(null);Dn.displayName="Await";var z=l.createContext(null);z.displayName="Navigation";var ke=l.createContext(null);ke.displayName="Location";var ne=l.createContext({outlet:null,matches:[],isDataRoute:!1});ne.displayName="Route";var it=l.createContext(null);it.displayName="RouteError";var Kt="REACT_ROUTER_ERROR",Un="REDIRECT",Hn="ROUTE_ERROR_RESPONSE";function zn(e){if(e.startsWith(`${Kt}:${Un}:{`))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 Wn(e){if(e.startsWith(`${Kt}:${Hn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new In(t.status,t.statusText,t.data)}catch{}}function Vn(e,{relative:t}={}){M(Se(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=l.useContext(z),{hash:a,pathname:s,search:o}=Ne(e,{relative:t}),c=s;return n!=="/"&&(c=s==="/"?n:W([n,s])),r.createHref({pathname:c,search:o,hash:a})}function Se(){return l.useContext(ke)!=null}function re(){return M(Se(),"useLocation() may be used only in the context of a component."),l.useContext(ke).location}var Jt="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function qt(e){l.useContext(z).static||l.useLayoutEffect(e)}function je(){let{isDataRoute:e}=l.useContext(ne);return e?ar():Kn()}function Kn(){M(Se(),"useNavigate() may be used only in the context of a component.");let e=l.useContext(fe),{basename:t,navigator:n}=l.useContext(z),{matches:r}=l.useContext(ne),{pathname:a}=re(),s=JSON.stringify(Ot(r)),o=l.useRef(!1);return qt(()=>{o.current=!0}),l.useCallback((d,u={})=>{if(q(o.current,Jt),!o.current)return;if(typeof d=="number"){n.go(d);return}let f=ot(d,JSON.parse(s),a,u.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:W([t,f.pathname])),(u.replace?n.replace:n.push)(f,u.state,u)},[t,n,s,a,e])}l.createContext(null);function Ne(e,{relative:t}={}){let{matches:n}=l.useContext(ne),{pathname:r}=re(),a=JSON.stringify(Ot(n));return l.useMemo(()=>ot(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function Jn(e,t){return Gt(e,t)}function Gt(e,t,n){var m;M(Se(),"useRoutes() may be used only in the context of a component.");let{navigator:r}=l.useContext(z),{matches:a}=l.useContext(ne),s=a[a.length-1],o=s?s.params:{},c=s?s.pathname:"/",d=s?s.pathnameBase:"/",u=s&&s.route;{let g=u&&u.path||"";Xt(c,!u||g.endsWith("*")||g.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${c}" (under ) 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. -Please change the parent to .`)}let f=re(),h;if(t){let g=typeof t=="string"?he(t):t;M(c==="/"||((m=g.pathname)==null?void 0:m.startsWith(c)),`When overriding the location using \`\` 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 "${c}" but pathname "${g.pathname}" was given in the \`location\` prop.`),h=g}else h=f;let p=h.pathname||"/",v=p;if(c!=="/"){let g=c.replace(/^\//,"").split("/");v="/"+p.replace(/^\//,"").split("/").slice(g.length).join("/")}let y=n&&n.state.matches.length?n.state.matches.map(g=>Object.assign(g,{route:n.manifest[g.route.id]||g.route})):Lt(e,{pathname:v});q(d||y!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),q(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let b=Yn(y&&y.map(g=>Object.assign({},g,{params:Object.assign({},o,g.params),pathname:V([c,r.encodeLocation?r.encodeLocation(g.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?c:V([c,r.encodeLocation?r.encodeLocation(g.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathnameBase])})),a,n);return t&&b?l.createElement(Se.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...h},navigationType:"POP"}},b):b}function Kn(){let e=tr(),t=In(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)",a={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=l.createElement(l.Fragment,null,l.createElement("p",null,"💿 Hey developer 👋"),l.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",l.createElement("code",{style:s},"ErrorBoundary")," or"," ",l.createElement("code",{style:s},"errorElement")," prop on your route.")),l.createElement(l.Fragment,null,l.createElement("h2",null,"Unexpected Application Error!"),l.createElement("h3",{style:{fontStyle:"italic"}},t),n?l.createElement("pre",{style:a},n):null,o)}var Jn=l.createElement(Kn,null),qt=class extends l.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?e.error:t.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"){const n=Hn(e.digest);n&&(e=n)}let t=e!==void 0?l.createElement(ne.Provider,{value:this.props.routeContext},l.createElement(ot.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?l.createElement(qn,{error:e},t):t}};qt.contextType=Ht;var Ye=new WeakMap;function qn({children:e,error:t}){let{basename:n}=l.useContext(z);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=Un(t.digest);if(r){let a=Ye.get(t);if(a)throw a;let s=Dt(r.location,n);if(Ot&&!Ye.get(t))if(s.isExternal||r.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw Ye.set(t,o),o}return l.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return e}function Gn({routeContext:e,match:t,children:n}){let r=l.useContext(fe);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),l.createElement(ne.Provider,{value:e},n)}function Yn(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,s=r==null?void 0:r.errors;if(s!=null){let f=a.findIndex(h=>h.route.id&&(s==null?void 0:s[h.route.id])!==void 0);M(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,f+1))}let o=!1,u=-1;if(n&&r){o=r.renderFallback;for(let f=0;f=0?a=a.slice(0,u+1):a=[a[0]];break}}}}let c=n==null?void 0:n.onError,d=r&&c?(f,h)=>{var p,v;c(f,{location:r.location,params:((v=(p=r.matches)==null?void 0:p[0])==null?void 0:v.params)??{},pattern:Ln(r.matches),errorInfo:h})}:void 0;return a.reduceRight((f,h,p)=>{let v,y=!1,b=null,m=null;r&&(v=s&&h.route.id?s[h.route.id]:void 0,b=h.route.errorElement||Jn,o&&(u<0&&p===0?(Gt("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,m=null):u===p&&(y=!0,m=h.route.hydrateFallbackElement||null)));let g=t.concat(a.slice(0,p+1)),x=()=>{let w;return v?w=b:y?w=m:h.route.Component?w=l.createElement(h.route.Component,null):h.route.element?w=h.route.element:w=f,l.createElement(Gn,{match:h,routeContext:{outlet:f,matches:g,isDataRoute:r!=null},children:w})};return r&&(h.route.ErrorBoundary||h.route.errorElement||p===0)?l.createElement(qt,{location:r.location,revalidation:r.revalidation,component:b,error:v,children:x(),routeContext:{outlet:null,matches:g,isDataRoute:!0},onError:d}):x()},null)}function it(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Xn(e){let t=l.useContext(fe);return M(t,it(e)),t}function Qn(e){let t=l.useContext(Ue);return M(t,it(e)),t}function Zn(e){let t=l.useContext(ne);return M(t,it(e)),t}function lt(e){let t=Zn(e),n=t.matches[t.matches.length-1];return M(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function er(){return lt("useRouteId")}function tr(){var r;let e=l.useContext(ot),t=Qn("useRouteError"),n=lt("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function nr(){let{router:e}=Xn("useNavigate"),t=lt("useNavigate"),n=l.useRef(!1);return Kt(()=>{n.current=!0}),l.useCallback(async(a,s={})=>{q(n.current,Vt),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...s}))},[e,t])}var kt={};function Gt(e,t,n){!t&&!kt[e]&&(kt[e]=!0,q(!1,n))}l.memo(rr);function rr({routes:e,manifest:t,future:n,state:r,isStatic:a,onError:s}){return Jt(e,void 0,{manifest:t,state:r,isStatic:a,onError:s})}function _e(e){M(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function ar({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:s=!1,useTransitions:o}){M(!ke(),"You cannot render a inside another . You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),c=l.useMemo(()=>({basename:u,navigator:a,static:s,useTransitions:o,future:{}}),[u,a,s,o]);typeof n=="string"&&(n=he(n));let{pathname:d="/",search:f="",hash:h="",state:p=null,key:v="default",mask:y}=n,b=l.useMemo(()=>{let m=te(d,u);return m==null?null:{location:{pathname:m,search:f,hash:h,state:p,key:v,mask:y},navigationType:r}},[u,d,f,h,p,v,r,y]);return q(b!=null,` is not able to match the URL "${d}${f}${h}" because it does not start with the basename, so the won't render anything.`),b==null?null:l.createElement(z.Provider,{value:c},l.createElement(Se.Provider,{children:t,value:b}))}function sr({children:e,location:t}){return Vn(et(e),t)}function et(e,t=[]){let n=[];return l.Children.forEach(e,(r,a)=>{if(!l.isValidElement(r))return;let s=[...t,a];if(r.type===l.Fragment){n.push.apply(n,et(r.props.children,s));return}M(r.type===_e,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),M(!r.props.index||!r.props.children,"An index route cannot have child routes.");let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=et(r.props.children,s)),n.push(o)}),n}var $e="get",Be="application/x-www-form-urlencoded";function He(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function or(e){return He(e)&&e.tagName.toLowerCase()==="button"}function ir(e){return He(e)&&e.tagName.toLowerCase()==="form"}function lr(e){return He(e)&&e.tagName.toLowerCase()==="input"}function cr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ur(e,t){return e.button===0&&(!t||t==="_self")&&!cr(e)}var Pe=null;function dr(){if(Pe===null)try{new FormData(document.createElement("form"),0),Pe=!1}catch{Pe=!0}return Pe}var hr=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Xe(e){return e!=null&&!hr.has(e)?(q(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${Be}"`),null):e}function fr(e,t){let n,r,a,s,o;if(ir(e)){let u=e.getAttribute("action");r=u?te(u,t):null,n=e.getAttribute("method")||$e,a=Xe(e.getAttribute("enctype"))||Be,s=new FormData(e)}else if(or(e)||lr(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a