@nite07/dsh-search 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +46 -2
- package/README.zh.md +47 -0
- package/cordis.patch.yml +4 -0
- package/dist/client.js +996 -0
- package/dist/index.js +968 -0
- package/dist/index.js.map +7 -0
- package/docs/BACKENDS.md +269 -0
- package/docs/PLAN.md +166 -0
- package/docs/VERIFICATION.md +73 -0
- package/icon.svg +1 -0
- package/locale/en.json +223 -0
- package/locale/zh.json +223 -0
- package/package.json +82 -4
package/dist/client.js
ADDED
|
@@ -0,0 +1,996 @@
|
|
|
1
|
+
window.__ModuleLoader__.load({id:'@nite07/dsh-search',factory(require){
|
|
2
|
+
"use strict";
|
|
3
|
+
var NiteSearchClient = (() => {
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
|
|
22
|
+
// src/client.tsx
|
|
23
|
+
var client_exports = {};
|
|
24
|
+
__export(client_exports, {
|
|
25
|
+
createClient: () => createClient
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// src/client.css
|
|
29
|
+
var client_default = ".ns-page{max-width:1120px;margin:0 auto;padding:24px;color:var(--dsw-alias-label-primary);font:inherit;line-height:1.55;overflow-wrap:anywhere}.ns-page *{box-sizing:border-box}.ns-page h2,.ns-page h3,.ns-page h4,.ns-page h5,.ns-page p{margin:0 0 12px}.ns-page h2{font-size:24px;line-height:1.3}.ns-page h3{font-size:17px}.ns-page h4{font-size:15px}.ns-page h5{font-size:14px}.ns-header{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin-bottom:16px}.ns-header p,.ns-muted,.ns-page small{color:var(--dsw-alias-label-secondary)}.ns-eyebrow{font-size:12px;font-weight:600;letter-spacing:.08em}.ns-card{margin:16px 0;padding:20px;border:1px solid var(--dsw-alias-border-l1);border-radius:12px;background:var(--dsw-alias-bg-layer-1)}.ns-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 24px}.ns-field{display:flex;min-width:0;flex-direction:column;gap:6px}.ns-field label,.ns-credential label{font-size:13px;font-weight:600}.ns-field small{font-size:12px;line-height:1.5}.ns-page input:not([type=checkbox]),.ns-page select,.ns-page textarea{width:100%;min-height:40px;padding:8px 10px;border:1px solid var(--dsw-alias-border-l2);border-radius:6px;background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px}.ns-page textarea{resize:vertical}.ns-check{display:grid;grid-template-columns:1fr auto;align-content:start;align-items:center}.ns-check small{grid-column:1/-1}.ns-page input[type=checkbox]{width:18px;height:18px;accent-color:var(--dsw-alias-brand-primary)}.ns-page button{min-height:40px;padding:8px 14px;border:1px solid var(--dsw-alias-border-l2);border-radius:6px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;cursor:pointer}.ns-page button:hover:not(:disabled){border-color:var(--dsw-alias-brand-primary)}.ns-page button:disabled,.ns-page input:disabled,.ns-page select:disabled{opacity:.55;cursor:not-allowed}.ns-page :is(button,input,select,textarea,a,summary):focus-visible,.ns-summary:focus{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:3px;scroll-margin-block:100px}.ns-page a{color:var(--dsw-alias-brand-primary);text-underline-offset:3px}.ns-status{display:flex;justify-content:space-between;gap:12px;min-height:44px;padding:10px 14px;background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);border-radius:8px;font-size:13px}.ns-summary{margin:16px 0;padding:16px;border:1px solid var(--dsw-alias-state-error-primary);border-radius:8px}.ns-summary h3{margin:0}.ns-summary ul{padding-left:20px}.ns-error{color:var(--dsw-alias-state-error-primary)!important}.ns-success{color:var(--dsw-alias-state-success-primary)}.ns-warning{color:var(--dsw-alias-state-warn-primary)}.ns-backends{margin-top:28px}.ns-tier{margin-top:24px}.ns-tier>h4{color:var(--dsw-alias-label-secondary)}.ns-backend{padding:0}.ns-backend > summary{display:flex;gap:16px;align-items:center;justify-content:space-between;padding:16px 20px;cursor:pointer;list-style:revert;font-weight:600}.ns-backend > summary::before{content:'\u203A';font-size:20px}.ns-backend[open] > summary::before{transform:rotate(90deg)}.ns-backend summary>span:first-of-type{flex:1}.ns-badge{padding:3px 8px;border:1px solid var(--dsw-alias-border-l1);border-radius:5px;font-size:11px;font-weight:500;color:var(--dsw-alias-label-secondary)}.ns-backend-body{padding:0 20px 20px}.ns-quota{padding:12px;background:var(--dsw-alias-bg-layer-2);border-radius:6px;font-size:12px}.ns-credential{margin:20px 0;padding-top:16px;border-top:1px solid var(--dsw-alias-border-l1)}.ns-credential p{font-size:12px;color:var(--dsw-alias-label-secondary)}.ns-credential input{margin:6px 0 12px}.ns-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.ns-table-wrap{overflow:auto;margin-top:16px}.ns-page table{width:100%;border-collapse:collapse;font-size:12px;text-align:left}.ns-page th,.ns-page td{padding:10px;border-bottom:1px solid var(--dsw-alias-border-l1);white-space:nowrap}.ns-page th{color:var(--dsw-alias-label-secondary);font-weight:500}.ns-result pre{max-height:320px;overflow:auto;padding:12px;background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l1);white-space:pre-wrap;font-size:12px}.ns-footer{position:sticky;bottom:0;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px;margin-top:24px;border:1px solid var(--dsw-alias-border-l2);border-radius:10px;background:var(--dsw-alias-bg-layer-1);font-size:12px}.ns-page .ns-primary{border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-brand-primary);font-weight:600}.ns-page [aria-invalid=true]{border-color:var(--dsw-alias-state-error-primary)!important}.ns-card>.ns-field{margin-top:16px}@media(max-width:640px){.ns-page{padding:16px 12px}.ns-header{gap:12px}.ns-grid{grid-template-columns:1fr;gap:16px}.ns-card{padding:16px}.ns-backend{padding:0}.ns-backend-body{padding:0 16px 16px}.ns-backend > summary{padding:16px}.ns-footer{position:static;align-items:flex-start;flex-direction:column}.ns-header h2{font-size:21px}}@media(prefers-reduced-motion:reduce){.ns-page *{scroll-behavior:auto!important;transition:none!important}}\n";
|
|
30
|
+
|
|
31
|
+
// src/client.overrides.css
|
|
32
|
+
var client_overrides_default = '.ns-backends:focus{outline:none}.ns-backends h3{display:flex;flex-wrap:wrap;gap:8px;align-items:baseline}\n.ns-toolbar{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:16px;margin:12px 0 4px}\n.ns-backend > summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;list-style:none;min-height:28px}\n.ns-backend > summary::-webkit-details-marker{display:none}\n.ns-backend > summary::before{content:"\u25B8";color:var(--dsw-alias-label-secondary);font-size:11px}\n.ns-backend[open] > summary::before{content:"\u25BE"}\n.ns-backend-title{flex:1 1 auto;font-weight:600;font-size:14px}\n.ns-chips{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}\n.ns-chip{font-size:11px;line-height:1;padding:4px 7px;border-radius:999px;border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-secondary);white-space:nowrap}\n.ns-chip--ok{border-color:var(--dsw-alias-state-success-primary);color:var(--dsw-alias-state-success-primary)}\n.ns-chip--warn{border-color:var(--dsw-alias-state-warn-primary);color:var(--dsw-alias-state-warn-primary)}\n.ns-chip--risk{border-color:var(--dsw-alias-state-error-primary);color:var(--dsw-alias-state-error-primary)}\n.ns-chip--off{border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-state-idle-primary)}\n.ns-dot{width:8px;height:8px;border-radius:50%;flex:0 0 auto}\n.ns-dot.is-on{background:var(--dsw-alias-state-success-primary)}\n.ns-dot.is-off{background:var(--dsw-alias-state-idle-primary);opacity:.6}\n.ns-badge.is-on{border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-brand-primary)}\n.ns-advanced{margin:12px 0;border-top:1px solid var(--dsw-alias-border-l1);padding-top:10px}\n.ns-advanced summary{cursor:pointer;font-size:13px;font-weight:600;color:var(--dsw-alias-label-secondary);margin-bottom:10px}\n.ns-blockers{margin:16px 0;padding:16px 20px;border:1px solid var(--dsw-alias-state-warn-primary);border-radius:12px;background:var(--dsw-alias-bg-layer-1)}\n.ns-blockers h3{font-size:14px;margin-bottom:8px;color:var(--dsw-alias-state-warn-primary)}\n.ns-blockers ul{margin:0;padding-left:18px}\n.ns-blockers li{margin:4px 0}\n.ns-statuses{display:flex;flex-wrap:wrap;gap:8px 16px}\n.ns-status-choice{display:inline-flex;align-items:center;gap:6px;font-size:13px;padding:6px 4px;cursor:pointer}\n.ns-status-choice input{width:18px;height:18px;accent-color:var(--dsw-alias-brand-primary)}\n.ns-sources{margin:8px 0;padding-left:20px}\n.ns-sources li{margin:10px 0}\n.ns-sources p{margin:2px 0;font-size:12px}\n.ns-failure{margin-top:12px;padding:12px 14px;border:1px solid var(--dsw-alias-state-error-primary);border-radius:8px}\n.ns-failure h5{color:var(--dsw-alias-state-error-primary)}\n.ns-failure dl{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 14px;margin:0;font-size:12px}\n.ns-failure dt{color:var(--dsw-alias-label-secondary)}\n.ns-failure dd{margin:0;overflow-wrap:anywhere}\n.ns-confirm{margin:10px 0;padding:12px 14px;border:1px solid var(--dsw-alias-state-error-primary);border-radius:8px;background:var(--dsw-alias-bg-layer-2)}\n.ns-confirm p{margin:0 0 10px;font-size:13px}\n.ns-danger{border-color:var(--dsw-alias-state-error-primary)!important;color:var(--dsw-alias-state-error-primary)}\n.ns-link{background:none;border:none;padding:0;margin-left:6px;min-height:0;font-size:12px;color:var(--dsw-alias-brand-primary);text-decoration:underline;cursor:pointer}\n.ns-link:hover{background:none;border:none}\n.ns-cell-message{max-width:320px;overflow-wrap:anywhere;font-size:12px;color:var(--dsw-alias-label-secondary)}\n.ns-footer{position:sticky;bottom:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:16px -4px 0;padding:12px 16px;border:1px solid var(--dsw-alias-border-l1);border-radius:12px;background:var(--dsw-alias-bg-layer-1);box-shadow:0 -2px 12px rgba(0,0,0,.06)}\n.ns-footer>span{font-size:13px;color:var(--dsw-alias-label-secondary)}\n@media (max-width:720px){.ns-toolbar{grid-template-columns:minmax(0,1fr)}.ns-chips{justify-content:flex-start}.ns-footer>span{width:100%}}\n\n.ns-advanced summary{display:inline-flex;align-items:center;gap:6px;width:auto;min-height:32px;padding:0 2px;color:var(--dsw-alias-brand-primary);font-weight:600}\n.ns-advanced summary::marker{font-size:10px}\n.ns-advanced[open] summary{margin-bottom:12px}\n.ns-tabs{display:flex;flex-wrap:wrap;gap:4px;margin:18px 0 14px;padding:4px;border:1px solid var(--dsw-alias-border-l1);border-radius:10px;background:var(--dsw-alias-bg-layer-1)}\n.ns-tab{display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:6px 14px;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:13px;cursor:pointer}\n.ns-tab:hover:not(.is-active){background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary)}\n.ns-tab.is-active{border-color:var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-primary);font-weight:600}\n.ns-tab-count{font-size:11px;font-weight:600;padding:2px 6px;border-radius:999px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary)}\n[role=tabpanel]{outline:none}\n.ns-test-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:16px}\n.ns-test-actions small{color:var(--dsw-alias-label-secondary)}\n@media (max-width:720px){.ns-tabs{gap:2px}.ns-tab{padding:6px 10px}}\n.ns-header{margin-bottom:8px}\n\n.ns-backend-body{padding:0 20px 20px}\n.ns-backend-body .ns-muted{font-size:12.5px;line-height:1.6;margin:10px 0}\n.ns-meta{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px;margin:14px 0 0;padding-top:12px;border-top:1px solid var(--dsw-alias-border-l1);font-size:12px;line-height:1.5;color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums}\n.ns-meta strong{font-weight:600;color:var(--dsw-alias-label-primary)}\n.ns-blockers--info{border-color:var(--dsw-alias-border-l2)}.ns-blockers--info h3{color:var(--dsw-alias-label-primary)}\n';
|
|
33
|
+
|
|
34
|
+
// locale/en.json
|
|
35
|
+
var en_default = {
|
|
36
|
+
meta: {
|
|
37
|
+
title: "Web search",
|
|
38
|
+
description: "Multi-backend search with explicit anonymous or key access, cost tiers, bounded retries and complete Web settings. Backends start disabled; account-backed requests may incur charges."
|
|
39
|
+
},
|
|
40
|
+
title: "Web search",
|
|
41
|
+
intro: "{{enabled}} of {{total}} backends enabled. Choose explicit access modes, control request budgets, and inspect search activity.",
|
|
42
|
+
loading: "Loading saved settings\u2026",
|
|
43
|
+
loadFailed: "Could not load settings. Reload to try again.",
|
|
44
|
+
reload: "Reload settings",
|
|
45
|
+
pending: "In progress\u2026",
|
|
46
|
+
unsaved: "You have unsaved changes.",
|
|
47
|
+
upToDate: "All changes saved.",
|
|
48
|
+
unsavedWithErrors: "Unsaved changes \xB7 {{errors}} validation problem(s)",
|
|
49
|
+
saving: "Saving and confirming\u2026",
|
|
50
|
+
saved: "Settings saved and verified.",
|
|
51
|
+
working: "Processing\u2026",
|
|
52
|
+
done: "Operation completed.",
|
|
53
|
+
saveUnconfirmed: "Save could not be confirmed. Reload settings before saving again; do not assume the operation failed.",
|
|
54
|
+
conflict: "Saved configuration differs from your draft. Review the latest state before saving again.",
|
|
55
|
+
actionFailed: "The operation could not be confirmed. Search tests are never automatically replayed.",
|
|
56
|
+
validationTitle: "Review these settings",
|
|
57
|
+
invalidField: "Enter a valid value within the documented limits.",
|
|
58
|
+
expectedRange: "Enter a whole number between {{min}} and {{max}}.",
|
|
59
|
+
showField: "Show field",
|
|
60
|
+
blockersTitle: "This configuration will not search yet",
|
|
61
|
+
blockNoBackends: "No backend is enabled, so every search fails immediately.",
|
|
62
|
+
blockSingleDisabled: "Single-backend mode points at {{backend}}, which is disabled.",
|
|
63
|
+
blockMissingCredential: "Key mode without a stored credential: {{list}}.",
|
|
64
|
+
fixIt: "Fix",
|
|
65
|
+
general: "Search behavior",
|
|
66
|
+
backends: "Search backends",
|
|
67
|
+
enabledSummary: "{{enabled}}/{{total}} enabled",
|
|
68
|
+
backendIntro: "Cost groups reflect the selected access mode. Modes are explicit: no automatic key selection, paid upgrade, or fallback.",
|
|
69
|
+
searchBackends: "Find a backend",
|
|
70
|
+
searchBackendsPlaceholder: "Name or id",
|
|
71
|
+
filterBackends: "Show",
|
|
72
|
+
"filter.all": "All backends",
|
|
73
|
+
"filter.enabled": "Enabled only",
|
|
74
|
+
"filter.configured": "Credential stored",
|
|
75
|
+
noMatch: "No backend matches this filter.",
|
|
76
|
+
resilience: "Retries and circuit breaker",
|
|
77
|
+
storage: "Cache and diagnostics",
|
|
78
|
+
advancedOptions: "Advanced options",
|
|
79
|
+
enabled: "Enabled",
|
|
80
|
+
disabled: "Disabled",
|
|
81
|
+
unverified: "Not verified",
|
|
82
|
+
unverifiedHelp: "This backend has no verified API contract and cannot be enabled. An endpoint or credential does not make it supported.",
|
|
83
|
+
anonymousNoCredential: "Anonymous mode sends no credential; stored keys are not read.",
|
|
84
|
+
source: "Pricing and limits source",
|
|
85
|
+
verifiedAt: "Checked",
|
|
86
|
+
notVerified: "Not verified",
|
|
87
|
+
noData: "No data",
|
|
88
|
+
attemptsToday: "Attempts today",
|
|
89
|
+
"tier.free": "Free \xB7 no key",
|
|
90
|
+
"tier.allowance": "Free allowance \xB7 key required",
|
|
91
|
+
"tier.trial": "Trial credits",
|
|
92
|
+
"tier.paid": "Paid usage",
|
|
93
|
+
"tier.self-hosted": "Self-hosted",
|
|
94
|
+
"tier.unverified": "Contract unverified \xB7 cannot enable",
|
|
95
|
+
credentialTitle: "Credential storage",
|
|
96
|
+
credentialConfigured: "Credential configured",
|
|
97
|
+
credentialMissing: "No credential configured",
|
|
98
|
+
credentialHelp: "Secrets are write-only and are never returned to this page. Some references are read-only.",
|
|
99
|
+
credentialValue: "New credential value",
|
|
100
|
+
replaceCredential: "Replace credential",
|
|
101
|
+
deleteCredential: "Delete credential",
|
|
102
|
+
deleteCredentialConfirm: "Delete this saved credential? This cannot be undone.",
|
|
103
|
+
saveBeforeCredential: "Save the configuration before changing credentials.",
|
|
104
|
+
credentialSaved: "Credential change confirmed.",
|
|
105
|
+
credentialFailed: "Credential change could not be confirmed. The input has been cleared; inspect the current state before trying again.",
|
|
106
|
+
testTitle: "Test a saved backend",
|
|
107
|
+
testHelp: "Each click sends one explicit test request using saved settings. Usage may be billed. Save changes first; failed tests are not automatically replayed by this page.",
|
|
108
|
+
testBackend: "Backend",
|
|
109
|
+
testQuery: "Search query",
|
|
110
|
+
chooseBackend: "Choose an enabled backend",
|
|
111
|
+
runTest: "Run search test",
|
|
112
|
+
testNeedsBackend: "Save an enabled backend first; tests only use saved configuration.",
|
|
113
|
+
testResult: "Test response",
|
|
114
|
+
testFailure: "This backend failed",
|
|
115
|
+
noSources: "No sources returned.",
|
|
116
|
+
diagnosticsTitle: "Diagnostics",
|
|
117
|
+
diagnosticsHelp: "Recent request outcomes. Clearing diagnostics does not reset daily attempt budgets.",
|
|
118
|
+
clearCache: "Clear cache",
|
|
119
|
+
clearDiagnostics: "Clear diagnostics",
|
|
120
|
+
clearDiagnosticsConfirm: "Clear recent diagnostic records?",
|
|
121
|
+
refreshDiagnostics: "Refresh diagnostics",
|
|
122
|
+
noDiagnostics: "No recent search activity.",
|
|
123
|
+
ok: "Succeeded",
|
|
124
|
+
hasWarnings: "Has warnings",
|
|
125
|
+
milliseconds: "ms",
|
|
126
|
+
"diagnostic.time": "Time",
|
|
127
|
+
"diagnostic.backend": "Backend",
|
|
128
|
+
"diagnostic.mode": "Access",
|
|
129
|
+
"diagnostic.result": "Outcome",
|
|
130
|
+
"diagnostic.attempts": "Attempts",
|
|
131
|
+
"diagnostic.duration": "Duration",
|
|
132
|
+
"diagnostic.reason": "Reason",
|
|
133
|
+
"diagnostic.message": "Detail",
|
|
134
|
+
transferTitle: "Import, export and defaults",
|
|
135
|
+
transferHelp: "Export removes endpoint query strings and sensitive option values. Credential references are retained, but saved secrets are never included. Review imported endpoints and references before saving.",
|
|
136
|
+
export: "Export redacted JSON",
|
|
137
|
+
import: "Import JSON",
|
|
138
|
+
importLabel: "Configuration JSON",
|
|
139
|
+
applyImport: "Validate and load draft",
|
|
140
|
+
imported: "Imported into the draft. Review and save to apply.",
|
|
141
|
+
importFailed: "Invalid JSON. Your current draft was kept.",
|
|
142
|
+
restoreDefaults: "Restore defaults",
|
|
143
|
+
defaultsConfirm: "Replace your draft with defaults? Nothing is saved until you choose Save.",
|
|
144
|
+
defaultsRestored: "Defaults loaded into the draft. Save to apply.",
|
|
145
|
+
discardConfirm: "Discard unsaved changes?",
|
|
146
|
+
discard: "Discard draft",
|
|
147
|
+
save: "Save settings",
|
|
148
|
+
confirmYes: "Yes, continue",
|
|
149
|
+
confirmCancel: "Cancel",
|
|
150
|
+
"choice.single": "Single backend",
|
|
151
|
+
"choice.parallel": "Parallel backends",
|
|
152
|
+
"choice.anonymous": "Anonymous",
|
|
153
|
+
"choice.key": "API key",
|
|
154
|
+
"choice.any": "Any time",
|
|
155
|
+
"choice.day": "Past day",
|
|
156
|
+
"choice.week": "Past week",
|
|
157
|
+
"choice.month": "Past month",
|
|
158
|
+
"choice.year": "Past year",
|
|
159
|
+
"choice.url": "URL",
|
|
160
|
+
"choice.url-title": "URL and title",
|
|
161
|
+
"choice.rrf": "Reciprocal rank fusion",
|
|
162
|
+
"choice.ordered": "Backend order",
|
|
163
|
+
"field.mode": "Search mode",
|
|
164
|
+
"help.mode": "Run a single selected backend or the explicitly enabled backends in parallel.",
|
|
165
|
+
"field.singleBackend": "Single backend",
|
|
166
|
+
"help.singleBackend": "Used only in single-backend mode; it must also be enabled.",
|
|
167
|
+
"field.maxResults": "Maximum results",
|
|
168
|
+
"help.maxResults": "Maximum merged sources returned to the caller.",
|
|
169
|
+
"field.concurrency": "Parallel concurrency",
|
|
170
|
+
"help.concurrency": "Maximum simultaneous backend requests.",
|
|
171
|
+
"field.overallTimeoutMs": "Overall timeout (ms)",
|
|
172
|
+
"help.overallTimeoutMs": "Deadline for the entire search, including retries.",
|
|
173
|
+
"field.language": "Language",
|
|
174
|
+
"help.language": "Chosen from a fixed list. Each backend receives its own spelling (Brave zh-hans, Serper zh-cn, SearXNG zh-CN); backends that ignore the field say so.",
|
|
175
|
+
"field.region": "Region",
|
|
176
|
+
"help.region": "Chosen from a fixed list of two-letter regions. Only backends that declare region support receive it, in their own format.",
|
|
177
|
+
"field.recency": "Publication recency",
|
|
178
|
+
"help.recency": "Applied where supported by the selected API.",
|
|
179
|
+
"field.safeSearch": "Safe search",
|
|
180
|
+
"help.safeSearch": "Request safer results where the backend supports it.",
|
|
181
|
+
"field.includeDomains": "Included domains",
|
|
182
|
+
"help.includeDomains": "Comma-separated domains; leave empty for no allowlist.",
|
|
183
|
+
"field.excludeDomains": "Excluded domains",
|
|
184
|
+
"help.excludeDomains": "Comma-separated domains to omit.",
|
|
185
|
+
"field.dedup": "Deduplication",
|
|
186
|
+
"help.dedup": "Merge duplicates by normalized URL, or URL and title.",
|
|
187
|
+
"field.fusion": "Result fusion",
|
|
188
|
+
"help.fusion": "Combine ranking by reciprocal rank or preserve backend order.",
|
|
189
|
+
"field.retry.enabled": "Enable configured retries",
|
|
190
|
+
"help.retry.enabled": "Configured HTTP retries can incur repeated charges. This page never replays a test action automatically.",
|
|
191
|
+
"field.retry.statuses": "Retry HTTP statuses",
|
|
192
|
+
"help.retry.statuses": "Only these response codes are retried, on the same backend and access mode.",
|
|
193
|
+
"field.retry.maxRetries": "Maximum retries",
|
|
194
|
+
"help.retry.maxRetries": "Additional attempts after the initial request.",
|
|
195
|
+
"field.retry.initialDelayMs": "Initial retry delay (ms)",
|
|
196
|
+
"help.retry.initialDelayMs": "Initial backoff delay.",
|
|
197
|
+
"field.retry.maxDelayMs": "Maximum retry delay (ms)",
|
|
198
|
+
"help.retry.maxDelayMs": "Upper bound on retry backoff.",
|
|
199
|
+
"field.retry.networkErrors": "Retry network errors",
|
|
200
|
+
"help.retry.networkErrors": "A failed response may still have incurred usage.",
|
|
201
|
+
"field.retry.timeouts": "Retry timeouts",
|
|
202
|
+
"help.retry.timeouts": "A timed-out request may still have incurred usage.",
|
|
203
|
+
"field.breaker.enabled": "Enable circuit breaker",
|
|
204
|
+
"help.breaker.enabled": "Temporarily pause a backend after repeated failures.",
|
|
205
|
+
"field.breaker.threshold": "Failure threshold",
|
|
206
|
+
"help.breaker.threshold": "Failures required to open the circuit.",
|
|
207
|
+
"field.breaker.cooldownMs": "Circuit cooldown (ms)",
|
|
208
|
+
"help.breaker.cooldownMs": "Time before a backend can be attempted again.",
|
|
209
|
+
"field.cache.enabled": "Enable result cache",
|
|
210
|
+
"help.cache.enabled": "Reuse matching search results within the configured lifetime.",
|
|
211
|
+
"field.cache.ttlSeconds": "Cache lifetime (seconds)",
|
|
212
|
+
"help.cache.ttlSeconds": "Maximum age of cached results.",
|
|
213
|
+
"field.cache.maxEntries": "Maximum cache entries",
|
|
214
|
+
"help.cache.maxEntries": "Bound the in-memory cache size.",
|
|
215
|
+
"field.diagnostics.enabled": "Enable diagnostics",
|
|
216
|
+
"help.diagnostics.enabled": "Keep bounded request outcome records.",
|
|
217
|
+
"field.diagnostics.maxEntries": "Maximum diagnostic records",
|
|
218
|
+
"help.diagnostics.maxEntries": "Limit the number of retained diagnostic records.",
|
|
219
|
+
"field.backend.enabled": "Enable backend",
|
|
220
|
+
"help.backend.enabled": "Only explicitly enabled, verified backends can execute searches.",
|
|
221
|
+
"field.backend.mode": "Access mode",
|
|
222
|
+
"help.backend.mode": "Choose a fixed anonymous or key mode. No automatic switching.",
|
|
223
|
+
"field.backend.endpoint": "Endpoint URL",
|
|
224
|
+
"help.backend.endpoint": "Use a trusted HTTPS endpoint, or a trusted local self-hosted endpoint. Never put secrets in the URL.",
|
|
225
|
+
"field.backend.credentialRef": "Credential reference",
|
|
226
|
+
"help.backend.credentialRef": "Reference only, not the secret value. Save this reference before managing its credential.",
|
|
227
|
+
"field.backend.timeoutMs": "Request timeout (ms)",
|
|
228
|
+
"help.backend.timeoutMs": "Deadline for each backend request.",
|
|
229
|
+
"field.backend.rateLimitPerMinute": "Attempts per minute",
|
|
230
|
+
"help.backend.rateLimitPerMinute": "Local attempt guard, not a provider billing guarantee.",
|
|
231
|
+
"field.backend.dailyAttemptLimit": "Daily attempt limit",
|
|
232
|
+
"help.backend.dailyAttemptLimit": "Local daily attempt budget; retries also consume attempts.",
|
|
233
|
+
"failure.configuration": "Invalid configuration",
|
|
234
|
+
"failure.authentication": "Authentication failed",
|
|
235
|
+
"failure.quota": "Provider quota exhausted",
|
|
236
|
+
"failure.rate-limit": "Rate limited",
|
|
237
|
+
"failure.http": "HTTP failure",
|
|
238
|
+
"failure.network": "Network failure",
|
|
239
|
+
"failure.timeout": "Timed out",
|
|
240
|
+
"failure.cancelled": "Cancelled",
|
|
241
|
+
"failure.protocol": "Unexpected response",
|
|
242
|
+
"failure.budget": "Local budget exhausted",
|
|
243
|
+
"failure.circuit-open": "Circuit open",
|
|
244
|
+
"failure.unverified": "Unverified backend",
|
|
245
|
+
liveVerified: "Live-tested",
|
|
246
|
+
tabsLabel: "Search settings sections",
|
|
247
|
+
"tab.behavior": "Search behavior",
|
|
248
|
+
"tab.reliability": "Reliability",
|
|
249
|
+
"tab.diagnostics": "Test & diagnostics",
|
|
250
|
+
"tab.backends": "Backends",
|
|
251
|
+
testQueryPlaceholder: "What should this backend look for?",
|
|
252
|
+
saveBeforeTest: "Save your changes before testing.",
|
|
253
|
+
notSpecified: "Not specified",
|
|
254
|
+
activeTitle: "This plugin is not the active search provider",
|
|
255
|
+
activeOther: "The web seam currently selects \u201C{{provider}}\u201D. Searches keep going there until this plugin is selected.",
|
|
256
|
+
activateSelf: "Use this plugin for web search"
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
// locale/zh.json
|
|
260
|
+
var zh_default = {
|
|
261
|
+
meta: {
|
|
262
|
+
title: "\u7F51\u9875\u641C\u7D22",
|
|
263
|
+
description: "\u591A\u540E\u7AEF\u641C\u7D22\uFF0C\u56FA\u5B9A\u9009\u62E9\u533F\u540D\u6216\u5BC6\u94A5\u6A21\u5F0F\uFF0C\u63D0\u4F9B\u8D39\u7528\u5206\u6863\u3001\u6709\u9650\u91CD\u8BD5\u548C\u5B8C\u6574 Web \u8BBE\u7F6E\u3002\u540E\u7AEF\u9ED8\u8BA4\u5173\u95ED\uFF0C\u8D26\u6237\u8C03\u7528\u53EF\u80FD\u4EA7\u751F\u8D39\u7528\u3002"
|
|
264
|
+
},
|
|
265
|
+
title: "\u7F51\u9875\u641C\u7D22",
|
|
266
|
+
intro: "\u5DF2\u542F\u7528 {{enabled}}/{{total}} \u4E2A\u540E\u7AEF\u3002\u660E\u786E\u9009\u62E9\u8BBF\u95EE\u6A21\u5F0F\uFF0C\u63A7\u5236\u8BF7\u6C42\u989D\u5EA6\uFF0C\u67E5\u770B\u641C\u7D22\u8FD0\u884C\u60C5\u51B5\u3002",
|
|
267
|
+
loading: "\u6B63\u5728\u8BFB\u53D6\u5DF2\u4FDD\u5B58\u8BBE\u7F6E\u2026",
|
|
268
|
+
loadFailed: "\u8BFB\u53D6\u8BBE\u7F6E\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u52A0\u8F7D\u3002",
|
|
269
|
+
reload: "\u91CD\u65B0\u52A0\u8F7D\u8BBE\u7F6E",
|
|
270
|
+
pending: "\u5904\u7406\u4E2D\u2026",
|
|
271
|
+
unsaved: "\u6709\u672A\u4FDD\u5B58\u7684\u66F4\u6539\u3002",
|
|
272
|
+
upToDate: "\u6240\u6709\u66F4\u6539\u5DF2\u4FDD\u5B58\u3002",
|
|
273
|
+
unsavedWithErrors: "\u6709\u672A\u4FDD\u5B58\u7684\u66F4\u6539 \xB7 {{errors}} \u5904\u6821\u9A8C\u95EE\u9898",
|
|
274
|
+
saving: "\u6B63\u5728\u4FDD\u5B58\u5E76\u56DE\u8BFB\u786E\u8BA4\u2026",
|
|
275
|
+
saved: "\u8BBE\u7F6E\u5DF2\u4FDD\u5B58\u5E76\u786E\u8BA4\u3002",
|
|
276
|
+
working: "\u6B63\u5728\u5904\u7406\u2026",
|
|
277
|
+
done: "\u64CD\u4F5C\u5DF2\u5B8C\u6210\u3002",
|
|
278
|
+
saveUnconfirmed: "\u6682\u65F6\u65E0\u6CD5\u786E\u8BA4\u4FDD\u5B58\u7ED3\u679C\u3002\u518D\u6B21\u4FDD\u5B58\u524D\u8BF7\u91CD\u65B0\u52A0\u8F7D\u8BBE\u7F6E\uFF0C\u4E0D\u8981\u76F4\u63A5\u8BA4\u5B9A\u64CD\u4F5C\u5931\u8D25\u3002",
|
|
279
|
+
conflict: "\u5F53\u524D\u4FDD\u5B58\u5185\u5BB9\u4E0E\u8349\u7A3F\u4E0D\u540C\uFF0C\u8BF7\u6838\u5BF9\u6700\u65B0\u72B6\u6001\u540E\u518D\u4FDD\u5B58\u3002",
|
|
280
|
+
actionFailed: "\u65E0\u6CD5\u786E\u8BA4\u64CD\u4F5C\u7ED3\u679C\u3002\u9875\u9762\u4E0D\u4F1A\u81EA\u52A8\u91CD\u65B0\u6267\u884C\u8BD5\u641C\u3002",
|
|
281
|
+
validationTitle: "\u8BF7\u68C0\u67E5\u4EE5\u4E0B\u8BBE\u7F6E",
|
|
282
|
+
invalidField: "\u8BF7\u6309\u7167\u8BF4\u660E\u586B\u5199\u6709\u6548\u503C\u3002",
|
|
283
|
+
expectedRange: "\u8BF7\u586B\u5199 {{min}} \u5230 {{max}} \u4E4B\u95F4\u7684\u6574\u6570\u3002",
|
|
284
|
+
showField: "\u5B9A\u4F4D\u5230\u8BE5\u5B57\u6BB5",
|
|
285
|
+
blockersTitle: "\u8FD9\u4EFD\u914D\u7F6E\u76EE\u524D\u65E0\u6CD5\u641C\u7D22",
|
|
286
|
+
blockNoBackends: "\u6CA1\u6709\u542F\u7528\u4EFB\u4F55\u540E\u7AEF\uFF0C\u4EFB\u4F55\u641C\u7D22\u90FD\u4F1A\u7ACB\u5373\u5931\u8D25\u3002",
|
|
287
|
+
blockSingleDisabled: "\u5355\u540E\u7AEF\u6A21\u5F0F\u6307\u5411\u7684\u300C{{backend}}\u300D\u5C1A\u672A\u542F\u7528\u3002",
|
|
288
|
+
blockMissingCredential: "\u4EE5\u4E0B\u540E\u7AEF\u9009\u4E86\u5BC6\u94A5\u6A21\u5F0F\u4F46\u6CA1\u6709\u4FDD\u5B58\u51ED\u8BC1\uFF1A{{list}}\u3002",
|
|
289
|
+
fixIt: "\u53BB\u5904\u7406",
|
|
290
|
+
general: "\u641C\u7D22\u884C\u4E3A",
|
|
291
|
+
backends: "\u641C\u7D22\u540E\u7AEF",
|
|
292
|
+
enabledSummary: "\u5DF2\u542F\u7528 {{enabled}}/{{total}}",
|
|
293
|
+
backendIntro: "\u8D39\u7528\u5206\u7EC4\u968F\u6240\u9009\u8BBF\u95EE\u6A21\u5F0F\u53D8\u5316\u3002\u533F\u540D\u548C\u5BC6\u94A5\u6A21\u5F0F\u56FA\u5B9A\u9009\u62E9\uFF0C\u4E0D\u81EA\u52A8\u9009\u5BC6\u94A5\u3001\u4E0D\u81EA\u52A8\u8F6C\u4ED8\u8D39\uFF0C\u4E5F\u4E0D\u56DE\u9000\u5230\u5176\u4ED6\u540E\u7AEF\u3002",
|
|
294
|
+
searchBackends: "\u67E5\u627E\u540E\u7AEF",
|
|
295
|
+
searchBackendsPlaceholder: "\u540D\u79F0\u6216 id",
|
|
296
|
+
filterBackends: "\u663E\u793A\u8303\u56F4",
|
|
297
|
+
"filter.all": "\u5168\u90E8\u540E\u7AEF",
|
|
298
|
+
"filter.enabled": "\u4EC5\u5DF2\u542F\u7528",
|
|
299
|
+
"filter.configured": "\u5DF2\u5B58\u51ED\u8BC1",
|
|
300
|
+
noMatch: "\u6CA1\u6709\u7B26\u5408\u7B5B\u9009\u6761\u4EF6\u7684\u540E\u7AEF\u3002",
|
|
301
|
+
resilience: "\u91CD\u8BD5\u4E0E\u7194\u65AD",
|
|
302
|
+
storage: "\u7F13\u5B58\u4E0E\u8BCA\u65AD",
|
|
303
|
+
advancedOptions: "\u9AD8\u7EA7\u9009\u9879",
|
|
304
|
+
enabled: "\u5DF2\u542F\u7528",
|
|
305
|
+
disabled: "\u672A\u542F\u7528",
|
|
306
|
+
unverified: "\u672A\u6838\u5B9E",
|
|
307
|
+
unverifiedHelp: "\u5C1A\u672A\u6838\u5B9E\u6B64\u540E\u7AEF\u7684 API \u5951\u7EA6\uFF0C\u56E0\u6B64\u65E0\u6CD5\u542F\u7528\u3002\u4EC5\u586B\u5199\u7AEF\u70B9\u6216\u51ED\u8BC1\u5E76\u4E0D\u4EE3\u8868\u5DF2\u7ECF\u652F\u6301\u3002",
|
|
308
|
+
anonymousNoCredential: "\u533F\u540D\u6A21\u5F0F\u4E0D\u53D1\u9001\u51ED\u8BC1\uFF0C\u4E5F\u4E0D\u4F1A\u8BFB\u53D6\u5DF2\u4FDD\u5B58\u7684\u5BC6\u94A5\u3002",
|
|
309
|
+
source: "\u4EF7\u683C\u4E0E\u989D\u5EA6\u6765\u6E90",
|
|
310
|
+
verifiedAt: "\u6838\u5B9E\u65E5\u671F",
|
|
311
|
+
notVerified: "\u672A\u6838\u5B9E",
|
|
312
|
+
noData: "\u6682\u65E0\u6570\u636E",
|
|
313
|
+
attemptsToday: "\u4ECA\u65E5\u5C1D\u8BD5\u6B21\u6570",
|
|
314
|
+
"tier.free": "\u514D\u8D39 \xB7 \u65E0\u9700\u5BC6\u94A5",
|
|
315
|
+
"tier.allowance": "\u514D\u8D39\u989D\u5EA6 \xB7 \u9700\u8981\u5BC6\u94A5",
|
|
316
|
+
"tier.trial": "\u8BD5\u7528\u989D\u5EA6",
|
|
317
|
+
"tier.paid": "\u4ED8\u8D39\u7528\u91CF",
|
|
318
|
+
"tier.self-hosted": "\u81EA\u6258\u7BA1",
|
|
319
|
+
"tier.unverified": "\u534F\u8BAE\u672A\u6838\u5B9E \xB7 \u4E0D\u53EF\u542F\u7528",
|
|
320
|
+
credentialTitle: "\u51ED\u8BC1\u5B58\u50A8",
|
|
321
|
+
credentialConfigured: "\u5DF2\u914D\u7F6E\u51ED\u8BC1",
|
|
322
|
+
credentialMissing: "\u672A\u914D\u7F6E\u51ED\u8BC1",
|
|
323
|
+
credentialHelp: "\u51ED\u8BC1\u4EC5\u53EF\u5199\u5165\uFF0C\u4E0D\u4F1A\u56DE\u663E\u3002\u90E8\u5206\u51ED\u8BC1\u5F15\u7528\u53EA\u5141\u8BB8\u8BFB\u53D6\u3002",
|
|
324
|
+
credentialValue: "\u65B0\u7684\u51ED\u8BC1\u503C",
|
|
325
|
+
replaceCredential: "\u66FF\u6362\u51ED\u8BC1",
|
|
326
|
+
deleteCredential: "\u5220\u9664\u51ED\u8BC1",
|
|
327
|
+
deleteCredentialConfirm: "\u786E\u5B9A\u5220\u9664\u5DF2\u4FDD\u5B58\u7684\u51ED\u8BC1\uFF1F\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002",
|
|
328
|
+
saveBeforeCredential: "\u8BF7\u5148\u4FDD\u5B58\u914D\u7F6E\uFF0C\u518D\u4FEE\u6539\u51ED\u8BC1\u3002",
|
|
329
|
+
credentialSaved: "\u51ED\u8BC1\u66F4\u6539\u5DF2\u786E\u8BA4\u3002",
|
|
330
|
+
credentialFailed: "\u65E0\u6CD5\u786E\u8BA4\u51ED\u8BC1\u66F4\u6539\u7ED3\u679C\uFF0C\u8F93\u5165\u5185\u5BB9\u5DF2\u6E05\u7A7A\u3002\u8BF7\u5148\u6838\u5BF9\u5F53\u524D\u72B6\u6001\uFF0C\u518D\u51B3\u5B9A\u662F\u5426\u91CD\u65B0\u64CD\u4F5C\u3002",
|
|
331
|
+
testTitle: "\u6D4B\u8BD5\u5DF2\u4FDD\u5B58\u7684\u540E\u7AEF",
|
|
332
|
+
testHelp: "\u6BCF\u6B21\u70B9\u51FB\u660E\u786E\u53D1\u8D77\u4E00\u6B21\u8BD5\u641C\uFF0C\u4F7F\u7528\u5DF2\u4FDD\u5B58\u7684\u914D\u7F6E\uFF0C\u53EF\u80FD\u4EA7\u751F\u8D39\u7528\u3002\u8BF7\u5148\u4FDD\u5B58\u66F4\u6539\uFF1B\u9875\u9762\u4E0D\u4F1A\u81EA\u52A8\u91CD\u65B0\u6267\u884C\u5931\u8D25\u7684\u8BD5\u641C\u3002",
|
|
333
|
+
testBackend: "\u641C\u7D22\u540E\u7AEF",
|
|
334
|
+
testQuery: "\u641C\u7D22\u8BCD",
|
|
335
|
+
chooseBackend: "\u9009\u62E9\u5DF2\u542F\u7528\u7684\u540E\u7AEF",
|
|
336
|
+
runTest: "\u6267\u884C\u8BD5\u641C",
|
|
337
|
+
testNeedsBackend: "\u8BF7\u5148\u4FDD\u5B58\u5E76\u542F\u7528\u4E00\u4E2A\u540E\u7AEF\uFF1B\u8BD5\u641C\u53EA\u4F7F\u7528\u5DF2\u4FDD\u5B58\u7684\u914D\u7F6E\u3002",
|
|
338
|
+
testResult: "\u8BD5\u641C\u7ED3\u679C",
|
|
339
|
+
testFailure: "\u6B64\u540E\u7AEF\u8C03\u7528\u5931\u8D25",
|
|
340
|
+
noSources: "\u6CA1\u6709\u8FD4\u56DE\u4EFB\u4F55\u6765\u6E90\u3002",
|
|
341
|
+
diagnosticsTitle: "\u8BCA\u65AD",
|
|
342
|
+
diagnosticsHelp: "\u67E5\u770B\u8FD1\u671F\u8BF7\u6C42\u7ED3\u679C\u3002\u6E05\u9664\u8BCA\u65AD\u4E0D\u4F1A\u91CD\u7F6E\u6BCF\u65E5\u5C1D\u8BD5\u989D\u5EA6\u3002",
|
|
343
|
+
clearCache: "\u6E05\u9664\u7F13\u5B58",
|
|
344
|
+
clearDiagnostics: "\u6E05\u9664\u8BCA\u65AD",
|
|
345
|
+
clearDiagnosticsConfirm: "\u786E\u5B9A\u6E05\u9664\u8FD1\u671F\u8BCA\u65AD\u8BB0\u5F55\uFF1F",
|
|
346
|
+
refreshDiagnostics: "\u5237\u65B0\u8BCA\u65AD",
|
|
347
|
+
noDiagnostics: "\u6682\u65E0\u8FD1\u671F\u641C\u7D22\u8BB0\u5F55\u3002",
|
|
348
|
+
ok: "\u6210\u529F",
|
|
349
|
+
hasWarnings: "\u6709\u8B66\u544A",
|
|
350
|
+
milliseconds: "\u6BEB\u79D2",
|
|
351
|
+
"diagnostic.time": "\u65F6\u95F4",
|
|
352
|
+
"diagnostic.backend": "\u540E\u7AEF",
|
|
353
|
+
"diagnostic.mode": "\u8BBF\u95EE\u6A21\u5F0F",
|
|
354
|
+
"diagnostic.result": "\u7ED3\u679C",
|
|
355
|
+
"diagnostic.attempts": "\u5C1D\u8BD5\u6B21\u6570",
|
|
356
|
+
"diagnostic.duration": "\u8017\u65F6",
|
|
357
|
+
"diagnostic.reason": "\u539F\u56E0",
|
|
358
|
+
"diagnostic.message": "\u8BE6\u60C5",
|
|
359
|
+
transferTitle: "\u5BFC\u5165\u3001\u5BFC\u51FA\u4E0E\u9ED8\u8BA4\u503C",
|
|
360
|
+
transferHelp: "\u5BFC\u51FA\u4F1A\u79FB\u9664\u7AEF\u70B9\u67E5\u8BE2\u53C2\u6570\u548C\u654F\u611F\u9009\u9879\u503C\uFF0C\u4FDD\u7559\u51ED\u8BC1\u5F15\u7528\uFF0C\u4F46\u4E0D\u5305\u542B\u5DF2\u4FDD\u5B58\u7684\u5BC6\u94A5\u3002\u4FDD\u5B58\u5BFC\u5165\u5185\u5BB9\u524D\uFF0C\u8BF7\u68C0\u67E5\u7AEF\u70B9\u4E0E\u51ED\u8BC1\u5F15\u7528\u3002",
|
|
361
|
+
export: "\u5BFC\u51FA\u8131\u654F JSON",
|
|
362
|
+
import: "\u5BFC\u5165 JSON",
|
|
363
|
+
importLabel: "\u914D\u7F6E JSON",
|
|
364
|
+
applyImport: "\u6821\u9A8C\u5E76\u8F7D\u5165\u8349\u7A3F",
|
|
365
|
+
imported: "\u5DF2\u5BFC\u5165\u8349\u7A3F\uFF0C\u8BF7\u68C0\u67E5\u540E\u4FDD\u5B58\u3002",
|
|
366
|
+
importFailed: "JSON \u683C\u5F0F\u65E0\u6548\uFF0C\u5F53\u524D\u8349\u7A3F\u672A\u66F4\u6539\u3002",
|
|
367
|
+
restoreDefaults: "\u6062\u590D\u9ED8\u8BA4\u503C",
|
|
368
|
+
defaultsConfirm: "\u5C06\u8349\u7A3F\u66FF\u6362\u4E3A\u9ED8\u8BA4\u503C\uFF1F\u70B9\u51FB\u4FDD\u5B58\u524D\u4E0D\u4F1A\u751F\u6548\u3002",
|
|
369
|
+
defaultsRestored: "\u9ED8\u8BA4\u503C\u5DF2\u8F7D\u5165\u8349\u7A3F\uFF0C\u4FDD\u5B58\u540E\u751F\u6548\u3002",
|
|
370
|
+
discardConfirm: "\u786E\u5B9A\u653E\u5F03\u672A\u4FDD\u5B58\u7684\u66F4\u6539\uFF1F",
|
|
371
|
+
discard: "\u653E\u5F03\u8349\u7A3F",
|
|
372
|
+
save: "\u4FDD\u5B58\u8BBE\u7F6E",
|
|
373
|
+
confirmYes: "\u786E\u5B9A\u7EE7\u7EED",
|
|
374
|
+
confirmCancel: "\u53D6\u6D88",
|
|
375
|
+
"choice.single": "\u5355\u540E\u7AEF",
|
|
376
|
+
"choice.parallel": "\u5E76\u884C\u540E\u7AEF",
|
|
377
|
+
"choice.anonymous": "\u533F\u540D",
|
|
378
|
+
"choice.key": "API \u5BC6\u94A5",
|
|
379
|
+
"choice.any": "\u4E0D\u9650\u65F6\u95F4",
|
|
380
|
+
"choice.day": "\u6700\u8FD1\u4E00\u5929",
|
|
381
|
+
"choice.week": "\u6700\u8FD1\u4E00\u5468",
|
|
382
|
+
"choice.month": "\u6700\u8FD1\u4E00\u4E2A\u6708",
|
|
383
|
+
"choice.year": "\u6700\u8FD1\u4E00\u5E74",
|
|
384
|
+
"choice.url": "\u6309 URL",
|
|
385
|
+
"choice.url-title": "\u6309 URL \u548C\u6807\u9898",
|
|
386
|
+
"choice.rrf": "\u5012\u6570\u6392\u540D\u878D\u5408",
|
|
387
|
+
"choice.ordered": "\u540E\u7AEF\u987A\u5E8F",
|
|
388
|
+
"field.mode": "\u641C\u7D22\u6A21\u5F0F",
|
|
389
|
+
"help.mode": "\u53EA\u8BF7\u6C42\u6240\u9009\u7684\u5355\u4E2A\u540E\u7AEF\uFF0C\u6216\u5E76\u884C\u8BF7\u6C42\u660E\u786E\u542F\u7528\u7684\u540E\u7AEF\u3002",
|
|
390
|
+
"field.singleBackend": "\u5355\u540E\u7AEF\u9009\u62E9",
|
|
391
|
+
"help.singleBackend": "\u4EC5\u7528\u4E8E\u5355\u540E\u7AEF\u6A21\u5F0F\uFF0C\u6240\u9009\u540E\u7AEF\u4E5F\u5FC5\u987B\u542F\u7528\u3002",
|
|
392
|
+
"field.maxResults": "\u6700\u5927\u7ED3\u679C\u6570",
|
|
393
|
+
"help.maxResults": "\u5408\u5E76\u540E\u8FD4\u56DE\u7684\u6765\u6E90\u6570\u91CF\u4E0A\u9650\u3002",
|
|
394
|
+
"field.concurrency": "\u5E76\u884C\u6570\u91CF",
|
|
395
|
+
"help.concurrency": "\u5141\u8BB8\u540C\u65F6\u8BF7\u6C42\u7684\u540E\u7AEF\u6570\u91CF\u4E0A\u9650\u3002",
|
|
396
|
+
"field.overallTimeoutMs": "\u603B\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09",
|
|
397
|
+
"help.overallTimeoutMs": "\u5305\u542B\u91CD\u8BD5\u5728\u5185\u7684\u6574\u6B21\u641C\u7D22\u65F6\u95F4\u4E0A\u9650\u3002",
|
|
398
|
+
"field.language": "\u8BED\u8A00",
|
|
399
|
+
"help.language": "\u4ECE\u56FA\u5B9A\u5217\u8868\u4E2D\u9009\u62E9\u3002\u5404\u540E\u7AEF\u4F1A\u6536\u5230\u81EA\u5DF1\u8981\u6C42\u7684\u5199\u6CD5\uFF08Brave \u7528 zh-hans\u3001Serper \u7528 zh-cn\u3001SearXNG \u7528 zh-CN\uFF09\uFF1B\u4E0D\u652F\u6301\u8BE5\u53C2\u6570\u7684\u540E\u7AEF\u4F1A\u7ED9\u51FA\u63D0\u793A\u3002",
|
|
400
|
+
"field.region": "\u5730\u533A",
|
|
401
|
+
"help.region": "\u4ECE\u56FA\u5B9A\u7684\u4E24\u4F4D\u5730\u533A\u5217\u8868\u4E2D\u9009\u62E9\u3002\u53EA\u6709\u58F0\u660E\u652F\u6301\u5730\u533A\u7684\u540E\u7AEF\u624D\u4F1A\u6536\u5230\uFF0C\u5E76\u6309\u5176\u8981\u6C42\u7684\u5927\u5C0F\u5199\u8F6C\u6362\u3002",
|
|
402
|
+
"field.recency": "\u53D1\u5E03\u65F6\u95F4\u8303\u56F4",
|
|
403
|
+
"help.recency": "\u6240\u9009 API \u652F\u6301\u65F6\u624D\u4F1A\u5E94\u7528\u3002",
|
|
404
|
+
"field.safeSearch": "\u5B89\u5168\u641C\u7D22",
|
|
405
|
+
"help.safeSearch": "\u540E\u7AEF\u652F\u6301\u65F6\uFF0C\u8BF7\u6C42\u8FC7\u6EE4\u654F\u611F\u5185\u5BB9\u3002",
|
|
406
|
+
"field.includeDomains": "\u5305\u542B\u7684\u57DF\u540D",
|
|
407
|
+
"help.includeDomains": "\u7528\u82F1\u6587\u9017\u53F7\u5206\u9694\uFF0C\u7559\u7A7A\u8868\u793A\u4E0D\u8BBE\u5141\u8BB8\u5217\u8868\u3002",
|
|
408
|
+
"field.excludeDomains": "\u6392\u9664\u7684\u57DF\u540D",
|
|
409
|
+
"help.excludeDomains": "\u7528\u82F1\u6587\u9017\u53F7\u5206\u9694\u4E0D\u5E0C\u671B\u51FA\u73B0\u7684\u57DF\u540D\u3002",
|
|
410
|
+
"field.dedup": "\u7ED3\u679C\u53BB\u91CD",
|
|
411
|
+
"help.dedup": "\u6309\u89C4\u8303\u5316 URL\uFF0C\u6216\u6309 URL \u548C\u6807\u9898\u5408\u5E76\u91CD\u590D\u7ED3\u679C\u3002",
|
|
412
|
+
"field.fusion": "\u7ED3\u679C\u878D\u5408",
|
|
413
|
+
"help.fusion": "\u6309\u5012\u6570\u6392\u540D\u5408\u5E76\uFF0C\u6216\u4FDD\u7559\u540E\u7AEF\u987A\u5E8F\u3002",
|
|
414
|
+
"field.retry.enabled": "\u542F\u7528\u914D\u7F6E\u7684\u91CD\u8BD5",
|
|
415
|
+
"help.retry.enabled": "\u914D\u7F6E\u7684 HTTP \u91CD\u8BD5\u53EF\u80FD\u5BFC\u81F4\u91CD\u590D\u8BA1\u8D39\u3002\u9875\u9762\u4E0D\u4F1A\u81EA\u52A8\u91CD\u65B0\u6267\u884C\u8BD5\u641C\u64CD\u4F5C\u3002",
|
|
416
|
+
"field.retry.statuses": "\u5141\u8BB8\u91CD\u8BD5\u7684 HTTP \u72B6\u6001\u7801",
|
|
417
|
+
"help.retry.statuses": "\u53EA\u6709\u8FD9\u4E9B\u54CD\u5E94\u7801\u4F1A\u5728\u540C\u4E00\u4E2A\u540E\u7AEF\u3001\u540C\u4E00\u4E2A\u8BBF\u95EE\u6A21\u5F0F\u4E0B\u91CD\u8BD5\u3002",
|
|
418
|
+
"field.retry.maxRetries": "\u6700\u5927\u91CD\u8BD5\u6B21\u6570",
|
|
419
|
+
"help.retry.maxRetries": "\u9996\u6B21\u8BF7\u6C42\u4E4B\u5916\u7684\u989D\u5916\u5C1D\u8BD5\u6B21\u6570\u3002",
|
|
420
|
+
"field.retry.initialDelayMs": "\u521D\u59CB\u91CD\u8BD5\u5EF6\u8FDF\uFF08\u6BEB\u79D2\uFF09",
|
|
421
|
+
"help.retry.initialDelayMs": "\u9000\u907F\u7B49\u5F85\u7684\u521D\u59CB\u65F6\u957F\u3002",
|
|
422
|
+
"field.retry.maxDelayMs": "\u6700\u5927\u91CD\u8BD5\u5EF6\u8FDF\uFF08\u6BEB\u79D2\uFF09",
|
|
423
|
+
"help.retry.maxDelayMs": "\u9000\u907F\u7B49\u5F85\u7684\u65F6\u957F\u4E0A\u9650\u3002",
|
|
424
|
+
"field.retry.networkErrors": "\u91CD\u8BD5\u7F51\u7EDC\u9519\u8BEF",
|
|
425
|
+
"help.retry.networkErrors": "\u6CA1\u6709\u6536\u5230\u54CD\u5E94\u7684\u8BF7\u6C42\u4ECD\u53EF\u80FD\u4EA7\u751F\u8D39\u7528\u3002",
|
|
426
|
+
"field.retry.timeouts": "\u91CD\u8BD5\u8D85\u65F6\u8BF7\u6C42",
|
|
427
|
+
"help.retry.timeouts": "\u8D85\u65F6\u7684\u8BF7\u6C42\u4ECD\u53EF\u80FD\u4EA7\u751F\u8D39\u7528\u3002",
|
|
428
|
+
"field.breaker.enabled": "\u542F\u7528\u7194\u65AD",
|
|
429
|
+
"help.breaker.enabled": "\u540E\u7AEF\u8FDE\u7EED\u5931\u8D25\u540E\u6682\u65F6\u505C\u6B62\u8BF7\u6C42\u3002",
|
|
430
|
+
"field.breaker.threshold": "\u5931\u8D25\u9608\u503C",
|
|
431
|
+
"help.breaker.threshold": "\u89E6\u53D1\u7194\u65AD\u6240\u9700\u7684\u5931\u8D25\u6B21\u6570\u3002",
|
|
432
|
+
"field.breaker.cooldownMs": "\u7194\u65AD\u51B7\u5374\uFF08\u6BEB\u79D2\uFF09",
|
|
433
|
+
"help.breaker.cooldownMs": "\u518D\u6B21\u5141\u8BB8\u8BF7\u6C42\u8BE5\u540E\u7AEF\u524D\u7684\u7B49\u5F85\u65F6\u95F4\u3002",
|
|
434
|
+
"field.cache.enabled": "\u542F\u7528\u7ED3\u679C\u7F13\u5B58",
|
|
435
|
+
"help.cache.enabled": "\u5728\u6709\u6548\u671F\u5185\u590D\u7528\u76F8\u540C\u641C\u7D22\u7684\u7ED3\u679C\u3002",
|
|
436
|
+
"field.cache.ttlSeconds": "\u7F13\u5B58\u6709\u6548\u671F\uFF08\u79D2\uFF09",
|
|
437
|
+
"help.cache.ttlSeconds": "\u7F13\u5B58\u7ED3\u679C\u5141\u8BB8\u4FDD\u7559\u7684\u6700\u957F\u65F6\u95F4\u3002",
|
|
438
|
+
"field.cache.maxEntries": "\u6700\u5927\u7F13\u5B58\u6761\u6570",
|
|
439
|
+
"help.cache.maxEntries": "\u9650\u5236\u5185\u5B58\u7F13\u5B58\u7684\u6761\u76EE\u6570\u91CF\u3002",
|
|
440
|
+
"field.diagnostics.enabled": "\u542F\u7528\u8BCA\u65AD",
|
|
441
|
+
"help.diagnostics.enabled": "\u4FDD\u7559\u6570\u91CF\u53D7\u9650\u7684\u8BF7\u6C42\u7ED3\u679C\u8BB0\u5F55\u3002",
|
|
442
|
+
"field.diagnostics.maxEntries": "\u6700\u5927\u8BCA\u65AD\u6761\u6570",
|
|
443
|
+
"help.diagnostics.maxEntries": "\u9650\u5236\u4FDD\u7559\u7684\u8BCA\u65AD\u8BB0\u5F55\u6570\u91CF\u3002",
|
|
444
|
+
"field.backend.enabled": "\u542F\u7528\u540E\u7AEF",
|
|
445
|
+
"help.backend.enabled": "\u53EA\u6709\u660E\u786E\u542F\u7528\u4E14\u5DF2\u6838\u5B9E\u7684\u540E\u7AEF\u624D\u80FD\u6267\u884C\u641C\u7D22\u3002",
|
|
446
|
+
"field.backend.mode": "\u8BBF\u95EE\u6A21\u5F0F",
|
|
447
|
+
"help.backend.mode": "\u56FA\u5B9A\u4F7F\u7528\u533F\u540D\u6216\u5BC6\u94A5\u6A21\u5F0F\uFF0C\u4E0D\u81EA\u52A8\u5207\u6362\u3002",
|
|
448
|
+
"field.backend.endpoint": "\u7AEF\u70B9 URL",
|
|
449
|
+
"help.backend.endpoint": "\u4EC5\u4F7F\u7528\u53EF\u4FE1\u7684 HTTPS \u6216\u672C\u5730\u81EA\u6258\u7BA1\u7AEF\u70B9\uFF0C\u4E0D\u8981\u5728 URL \u4E2D\u586B\u5199\u5BC6\u94A5\u3002",
|
|
450
|
+
"field.backend.credentialRef": "\u51ED\u8BC1\u5F15\u7528",
|
|
451
|
+
"help.backend.credentialRef": "\u586B\u5199\u5F15\u7528\u800C\u975E\u5BC6\u94A5\u672C\u8EAB\u3002\u8BF7\u5148\u4FDD\u5B58\u5F15\u7528\uFF0C\u518D\u7BA1\u7406\u5BF9\u5E94\u7684\u51ED\u8BC1\u3002",
|
|
452
|
+
"field.backend.timeoutMs": "\u8BF7\u6C42\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09",
|
|
453
|
+
"help.backend.timeoutMs": "\u6BCF\u6B21\u540E\u7AEF\u8BF7\u6C42\u7684\u65F6\u95F4\u4E0A\u9650\u3002",
|
|
454
|
+
"field.backend.rateLimitPerMinute": "\u6BCF\u5206\u949F\u5C1D\u8BD5\u4E0A\u9650",
|
|
455
|
+
"help.backend.rateLimitPerMinute": "\u672C\u5730\u8BF7\u6C42\u4FDD\u62A4\uFF0C\u4E0D\u4EE3\u8868\u670D\u52A1\u5546\u8D26\u5355\u4E0A\u9650\u3002",
|
|
456
|
+
"field.backend.dailyAttemptLimit": "\u6BCF\u65E5\u5C1D\u8BD5\u4E0A\u9650",
|
|
457
|
+
"help.backend.dailyAttemptLimit": "\u672C\u5730\u6BCF\u65E5\u5C1D\u8BD5\u989D\u5EA6\uFF0C\u91CD\u8BD5\u4E5F\u4F1A\u6D88\u8017\u6B21\u6570\u3002",
|
|
458
|
+
"failure.configuration": "\u914D\u7F6E\u65E0\u6548",
|
|
459
|
+
"failure.authentication": "\u8BA4\u8BC1\u5931\u8D25",
|
|
460
|
+
"failure.quota": "\u670D\u52A1\u5546\u989D\u5EA6\u8017\u5C3D",
|
|
461
|
+
"failure.rate-limit": "\u8BF7\u6C42\u9650\u6D41",
|
|
462
|
+
"failure.http": "HTTP \u9519\u8BEF",
|
|
463
|
+
"failure.network": "\u7F51\u7EDC\u9519\u8BEF",
|
|
464
|
+
"failure.timeout": "\u8BF7\u6C42\u8D85\u65F6",
|
|
465
|
+
"failure.cancelled": "\u5DF2\u53D6\u6D88",
|
|
466
|
+
"failure.protocol": "\u54CD\u5E94\u5F02\u5E38",
|
|
467
|
+
"failure.budget": "\u672C\u5730\u989D\u5EA6\u8017\u5C3D",
|
|
468
|
+
"failure.circuit-open": "\u7194\u65AD\u4E2D",
|
|
469
|
+
"failure.unverified": "\u540E\u7AEF\u672A\u6838\u5B9E",
|
|
470
|
+
liveVerified: "\u5DF2\u5B9E\u6D4B",
|
|
471
|
+
tabsLabel: "\u641C\u7D22\u8BBE\u7F6E\u5206\u533A",
|
|
472
|
+
"tab.behavior": "\u641C\u7D22\u884C\u4E3A",
|
|
473
|
+
"tab.reliability": "\u7A33\u5B9A\u6027",
|
|
474
|
+
"tab.diagnostics": "\u8BD5\u641C\u4E0E\u8BCA\u65AD",
|
|
475
|
+
"tab.backends": "\u641C\u7D22\u540E\u7AEF",
|
|
476
|
+
testQueryPlaceholder: "\u60F3\u8BA9\u8FD9\u4E2A\u540E\u7AEF\u641C\u4EC0\u4E48\uFF1F",
|
|
477
|
+
saveBeforeTest: "\u8BF7\u5148\u4FDD\u5B58\u66F4\u6539\u518D\u8BD5\u641C\u3002",
|
|
478
|
+
notSpecified: "\u4E0D\u6307\u5B9A",
|
|
479
|
+
activeTitle: "\u5F53\u524D\u672A\u542F\u7528\u672C\u63D2\u4EF6\u4F5C\u4E3A\u641C\u7D22\u6E90",
|
|
480
|
+
activeOther: "\u5185\u7F6E\u641C\u7D22\u5F53\u524D\u9009\u62E9\u7684\u662F\u300C{{provider}}\u300D\u3002\u5728\u9009\u4E2D\u672C\u63D2\u4EF6\u4E4B\u524D\uFF0C\u641C\u7D22\u4ECD\u4F1A\u8D70\u5B83\u3002",
|
|
481
|
+
activateSelf: "\u8BBE\u4E3A\u7F51\u9875\u641C\u7D22\u6765\u6E90"
|
|
482
|
+
};
|
|
483
|
+
|
|
484
|
+
// src/catalog.ts
|
|
485
|
+
var text = (en, zh) => ({ en, zh });
|
|
486
|
+
var option = (key, label, zh, value, choices) => ({ key, type: choices ? "select" : typeof value, label: text(label, zh), help: text(`Native ${key} parameter. See the backend documentation.`, `\u539F\u751F ${key} \u53C2\u6570\uFF0C\u8BE6\u89C1\u540E\u7AEF\u6587\u6863\u3002`), default: value, ...choices ? { choices } : {} });
|
|
487
|
+
var mode = (access, endpoint, tier, en, zh, pricingUrl) => ({ mode: access, endpoint, tier, limits: text(en, zh), pricingUrl });
|
|
488
|
+
var backend = (id, title, docs, modes, options = [], capabilities = [], status = "documented", evidence = "documented") => ({ id, title, docs, modes, options, capabilities, status, evidence, verifiedAt: "2026-11-17" });
|
|
489
|
+
var catalog = [
|
|
490
|
+
backend("keenable", "Keenable", "https://docs.keenable.ai/api-reference/search.md", [mode("anonymous", "https://api.keenable.ai/v1/search/public", "free", "1,000 requests/hour and 10/second per IP/endpoint; public title header required.", "\u6BCF IP\uFF0F\u7AEF\u70B9 1000 \u6B21/\u5C0F\u65F6\u300110 \u6B21/\u79D2\uFF1B\u9700\u8981\u516C\u5F00\u8C03\u7528\u6807\u8BC6\u3002", "https://docs.keenable.ai/pricing.md"), mode("key", "https://api.keenable.ai/v1/search", "allowance", "100,000 searches/month free; then $4/1,000. Confirm current account terms.", "\u6BCF\u6708 10 \u4E07\u6B21\u514D\u8D39\uFF0C\u5176\u540E $4/\u5343\u6B21\uFF1B\u4EE5\u8D26\u6237\u5F53\u524D\u6761\u6B3E\u4E3A\u51C6\u3002", "https://docs.keenable.ai/pricing.md")], [option("clientTitle", "Client title", "\u8C03\u7528\u65B9\u540D\u79F0", "dsh-search"), option("snippet_max_length", "Snippet maximum length", "\u6458\u8981\u6700\u5927\u957F\u5EA6", 2e3)], ["includeDomains"], "documented", "live"),
|
|
491
|
+
backend("anysearch", "AnySearch", "https://anysearch.com/docs/api-endpoints/v1-search.md", [mode("anonymous", "https://api.anysearch.com/v1/search", "free", "Anonymous access needs no key, metered per IP with lower rate limits and a daily free reset (UTC). No account or credential is created automatically.", "\u533F\u540D\u8BBF\u95EE\u65E0\u9700\u5BC6\u94A5\uFF0C\u6309 IP \u8BA1\u91CF\u3001\u9650\u6D41\u66F4\u4F4E\u3001\u6BCF\u65E5\uFF08UTC\uFF09\u91CD\u7F6E\uFF1B\u4E0D\u4F1A\u81EA\u52A8\u521B\u5EFA\u8D26\u6237\u6216\u5BC6\u94A5\u3002", "https://anysearch.com/pricing.md"), mode("key", "https://api.anysearch.com/v1/search", "allowance", "Free plan: 1,000/day, 10 QPS; Pro calls have separate pricing.", "\u514D\u8D39\u6863 1000 \u6B21/\u5929\u300110 QPS\uFF1BPro \u8C03\u7528\u53E6\u884C\u8BA1\u8D39\u3002", "https://anysearch.com/pricing.md")], [option("zone", "Zone", "\u641C\u7D22\u533A\u57DF", "intl", ["intl", "cn"])], ["language"], "documented", "live"),
|
|
492
|
+
backend("linkup", "Linkup", "https://docs.linkup.so/pages/documentation/endpoints/search/reference.md", [mode("key", "https://api.linkup.so/v1/search", "allowance", "Eligible professional email accounts may receive $20/month. Raw search: $0.005/call; deep $0.05/call.", "\u7B26\u5408\u8D44\u683C\u7684\u4E13\u4E1A\u90AE\u7BB1\u8D26\u6237\u53EF\u80FD\u4EAB\u6709\u6BCF\u6708 $20\uFF1B\u666E\u901A\u641C\u7D22 $0.005/\u6B21\uFF0Cdeep $0.05/\u6B21\u3002", "https://docs.linkup.so/pages/documentation/platform/pricing.md")], [option("depth", "Search depth", "\u641C\u7D22\u6DF1\u5EA6", "standard", ["flash", "fast", "standard", "deep"])]),
|
|
493
|
+
backend("tavily", "Tavily", "https://docs.tavily.com/documentation/api-reference/endpoint/search", [mode("key", "https://api.tavily.com/search", "allowance", "1,000 free credits/month; basic 1 credit, advanced 2. PAYG $0.008/credit.", "\u6BCF\u6708\u514D\u8D39 1000 credits\uFF1Bbasic 1 credit\uFF0Cadvanced 2\uFF1B\u6309\u91CF $0.008/credit\u3002", "https://www.tavily.com/pricing")], [option("search_depth", "Search depth", "\u641C\u7D22\u6DF1\u5EA6", "basic", ["basic", "advanced"]), option("topic", "Topic", "\u4E3B\u9898", "general", ["general", "news", "finance"]), option("include_answer", "Include answer", "\u5305\u542B\u7B54\u6848", false)], ["includeDomains", "excludeDomains", "recency"]),
|
|
494
|
+
backend("exa", "Exa", "https://docs.exa.ai/reference/search", [mode("anonymous", "https://mcp.exa.ai/mcp", "free", "Official free keyless MCP: no API key or sign-in, search and fetch at a free rate limit (no published number). Keyless needs a direct IPv4 connection; proxied or IPv6 paths get 403. Result quality and latency were the best of the free tiers in local testing.", "\u5B98\u65B9\u514D\u8D39\u65E0 Key MCP\uFF1A\u65E0\u9700\u5BC6\u94A5\u6216\u767B\u5F55\uFF0C\u641C\u7D22\u4E0E\u6293\u53D6\u6309\u514D\u8D39\u9650\u6D41\uFF08\u672A\u516C\u5E03\u6570\u503C\uFF09\u3002\u65E0 Key \u9700\u8981\u76F4\u8FDE IPv4\uFF0C\u4EE3\u7406\u6216 IPv6 \u8DEF\u5F84\u4F1A\u8FD4\u56DE 403\u3002\u672C\u673A\u5B9E\u6D4B\u4E2D\u5176\u8D28\u91CF\u4E0E\u5EF6\u8FDF\u5728\u514D\u8D39\u6863\u91CC\u6700\u597D\u3002", "https://exa.ai/docs/get-started/exa-mcp"), mode("key", "https://api.exa.ai/search", "allowance", "$10 balance reset monthly; auto search $7/1,000 up to 10 results, extra results cost more.", "\u6BCF\u6708\u4F59\u989D\u91CD\u7F6E\u4E3A $10\uFF1Bauto \u641C\u7D22 $7/\u5343\u6B21\uFF08\u6700\u591A 10 \u7ED3\u679C\uFF09\uFF0C\u989D\u5916\u7ED3\u679C\u53E6\u8BA1\u8D39\u3002", "https://exa.ai/pricing")], [option("type", "Search type", "\u641C\u7D22\u7C7B\u578B", "auto", ["auto", "neural", "fast"]), option("textMaxCharacters", "Text maximum characters", "\u6B63\u6587\u6700\u5927\u5B57\u7B26\u6570", 2e3)], ["includeDomains", "excludeDomains", "recency"], "documented", "live"),
|
|
495
|
+
backend("parallel", "Parallel", "https://docs.parallel.ai/search/search-quickstart", [mode("anonymous", "https://mcp.parallel.ai/mcp", "free", "Free anonymous MCP with lower rate limits; numeric quota is not published.", "\u514D\u8D39\u533F\u540D MCP\uFF0C\u9650\u6D41\u66F4\u4F4E\uFF1B\u6570\u503C\u989D\u5EA6\u672A\u516C\u5E03\u3002", "https://parallel.ai/pricing"), mode("key", "https://api.parallel.ai/v1/search", "paid", "API usage is billed under account pricing; credits are not guaranteed.", "API \u6309\u8D26\u6237\u4EF7\u683C\u8BA1\u8D39\uFF0C\u4E0D\u4FDD\u8BC1\u8D60\u9001\u989D\u5EA6\u3002", "https://parallel.ai/pricing")], [option("mode", "Search mode", "\u641C\u7D22\u6A21\u5F0F", "fast", ["fast", "turbo", "basic", "advanced"]), option("maxCharactersPerResult", "Maximum characters per result", "\u6BCF\u6761\u7ED3\u679C\u6700\u5927\u5B57\u7B26\u6570", 2e3)], [], "documented", "live"),
|
|
496
|
+
backend("brave", "Brave Search", "https://api-dashboard.search.brave.com/app/documentation/web-search/get-started", [mode("key", "https://api.search.brave.com/res/v1/web/search", "allowance", "$5 monthly credits; $5/1,000 searches, 50 QPS. Check card/activation requirements.", "\u6BCF\u6708 $5 credits\uFF1B$5/\u5343\u6B21\u641C\u7D22\u300150 QPS\uFF1B\u9700\u6838\u5BF9\u7ED1\u5361\u4E0E\u6FC0\u6D3B\u8981\u6C42\u3002", "https://brave.com/search/api/")], [], ["language", "region", "recency", "safeSearch"]),
|
|
497
|
+
backend("searxng", "SearXNG", "https://docs.searxng.org/dev/search_api.html", [mode("anonymous", "http://127.0.0.1:8385/search", "self-hosted", "No vendor per-call fee; infrastructure costs and instance rate limits apply. JSON output must be enabled.", "\u65E0\u5382\u5546\u8C03\u7528\u8D39\uFF0C\u6709\u81EA\u5EFA\u8FD0\u884C\u6210\u672C\u53CA\u5B9E\u4F8B\u9650\u6D41\uFF1B\u9700\u5F00\u542F JSON \u8F93\u51FA\u3002", "https://docs.searxng.org/"), mode("key", "http://127.0.0.1:8385/search", "self-hosted", "For an instance explicitly protected by a Bearer-auth gateway; not a native SearXNG API-key feature.", "\u4EC5\u9002\u7528\u4E8E\u81EA\u884C\u914D\u7F6E Bearer \u9274\u6743\u7F51\u5173\u7684\u5B9E\u4F8B\uFF1B\u4E0D\u662F SearXNG \u539F\u751F Key \u529F\u80FD\u3002", "https://docs.searxng.org/")], [option("engines", "Engines", "\u5F15\u64CE\u5217\u8868", ""), option("categories", "Categories", "\u5206\u7C7B", "general")], ["language", "recency", "safeSearch"], "documented", "live"),
|
|
498
|
+
backend("ddg", "DuckDuckGo", "https://duckduckgo.com/duckduckgo-help-pages/results/syndication/", [mode("anonymous", "https://html.duckduckgo.com/html/", "free", "HTML discovery, no SLA or guaranteed quota; blocking/challenges may occur.", "HTML \u641C\u7D22\uFF0C\u65E0 SLA \u6216\u4FDD\u8BC1\u989D\u5EA6\uFF1B\u53EF\u80FD\u9650\u6D41\u6216\u51FA\u73B0\u9A8C\u8BC1\u7801\u3002", "https://duckduckgo.com/")]),
|
|
499
|
+
backend("mojeek", "Mojeek", "https://www.mojeek.com/services/search/web-search-api/", [mode("key", "https://api.mojeek.com/search", "paid", "API plan pricing applies. Do not assume a perpetual free quota.", "\u6309 API \u5957\u9910\u8BA1\u8D39\uFF0C\u4E0D\u627F\u8BFA\u957F\u671F\u514D\u8D39\u989D\u5EA6\u3002", "https://www.mojeek.com/services/search/web-search-api/")], [], []),
|
|
500
|
+
backend("anthropic", "Anthropic", "https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool", [mode("key", "https://api.anthropic.com/v1/messages", "paid", "Web search fees plus model input/output tokens.", "\u641C\u7D22\u5DE5\u5177\u8D39\u7528\u52A0\u6A21\u578B\u8F93\u5165\uFF0F\u8F93\u51FA token \u8D39\u7528\u3002", "https://platform.claude.com/docs/en/about-claude/pricing")], [option("model", "Model", "\u6A21\u578B", "claude-sonnet-4-6"), option("maxTokens", "Maximum output tokens", "\u6700\u5927\u8F93\u51FA tokens", 2048), option("maxUses", "Maximum search uses", "\u6700\u591A\u641C\u7D22\u6B21\u6570", 1)], ["includeDomains", "excludeDomains"]),
|
|
501
|
+
backend("openai", "OpenAI", "https://platform.openai.com/docs/guides/tools-web-search", [mode("key", "https://api.openai.com/v1/responses", "paid", "Web search/tool charges plus model tokens; account terms apply.", "\u641C\u7D22\u5DE5\u5177\u4E0E\u6A21\u578B token \u5206\u522B\u8BA1\u8D39\uFF0C\u4EE5\u8D26\u6237\u6761\u6B3E\u4E3A\u51C6\u3002", "https://openai.com/api/pricing/")], [option("model", "Model", "\u6A21\u578B", "gpt-4.1"), option("maxOutputTokens", "Maximum output tokens", "\u6700\u5927\u8F93\u51FA tokens", 2048)]),
|
|
502
|
+
backend("zhihu-web", "Zhihu global search", "https://developer.zhihu.com/docs?key=global_search", [mode("key", "https://developer.zhihu.com/api/v1/content/global_search", "allowance", "Limited-time daily free allowance shown in account console; then \xA55/1,000. Resets at 00:00 Asia/Shanghai.", "\u9650\u65F6\u6BCF\u65E5\u989D\u5EA6\u4EE5\u63A7\u5236\u53F0\u4E3A\u51C6\uFF0C\u5176\u540E \xA55/\u5343\u6B21\uFF1B\u5317\u4EAC\u65F6\u95F4\u96F6\u70B9\u91CD\u7F6E\u3002", "https://developer.zhihu.com/docs?key=billing_price")], [option("SearchDB", "Search database", "\u641C\u7D22\u6570\u636E\u5E93", "all", ["all", "realtime", "static"]), option("Filter", "Native filter expression", "\u539F\u751F\u7B5B\u9009\u8868\u8FBE\u5F0F", "")]),
|
|
503
|
+
backend("zhihu-site", "Zhihu site search", "https://developer.zhihu.com/docs?key=zhihu_search", [mode("key", "https://developer.zhihu.com/api/v1/content/zhihu_search", "allowance", "Limited-time daily allowance shown in account console; then \xA520/1,000. Shared across account secrets.", "\u9650\u65F6\u6BCF\u65E5\u989D\u5EA6\u4EE5\u63A7\u5236\u53F0\u4E3A\u51C6\uFF0C\u5176\u540E \xA520/\u5343\u6B21\uFF1B\u540C\u8D26\u6237\u5BC6\u94A5\u5171\u4EAB\u989D\u5EA6\u3002", "https://developer.zhihu.com/docs?key=billing_price")]),
|
|
504
|
+
backend("deepseek", "DeepSeek", "https://api-docs.deepseek.com/guides/search/", [mode("key", "https://api.deepseek.com/v1/tools/search", "paid", "$0.75/1,000 successful nonempty requests; 100 QPS/account.", "$0.75/\u5343\u6B21\u6210\u529F\u4E14\u975E\u7A7A\u8BF7\u6C42\uFF1B\u6BCF\u8D26\u6237 100 QPS\u3002", "https://api-docs.deepseek.com/guides/search/")], [option("need_content", "Retrieve content", "\u83B7\u53D6\u6B63\u6587", false)]),
|
|
505
|
+
backend("you", "You.com", "https://you.com/docs/api-reference/search/v1-search.md", [mode("anonymous", "https://api.you.com/mcp", "free", "Free MCP profile: 100 queries/day; shared rate limits may apply.", "\u514D\u8D39 MCP profile\uFF1A100 \u6B21/\u5929\uFF0C\u53EF\u80FD\u5B58\u5728\u5171\u4EAB\u9650\u6D41\u3002", "https://you.com/docs/agents/mcp-server.md"), mode("key", "https://ydc-index.io/v1/search", "paid", "$5/1,000 searches; optional full-page retrieval costs extra.", "$5/\u5343\u6B21\u641C\u7D22\uFF1B\u53EF\u9009\u5168\u6587\u83B7\u53D6\u53E6\u5916\u8BA1\u8D39\u3002", "https://you.com/docs/administration/billing.md")], [], ["language", "region", "recency"], "documented", "live"),
|
|
506
|
+
backend("baidu", "Baidu Qianfan", "https://cloud.baidu.cn/doc/qianfan/s/nmweljpt3", [mode("key", "https://qianfan.baidubce.com/v2/ai_search/web_search", "allowance", "1,500/month free, default 3 QPS; domestic standard \xA50.036/request, higher editions cost more.", "\u6BCF\u6708 1500 \u6B21\u514D\u8D39\uFF0C\u9ED8\u8BA4 3 QPS\uFF1B\u56FD\u5185 standard \xA50.036/\u6B21\uFF0C\u66F4\u9AD8\u7248\u672C\u4EF7\u683C\u66F4\u9AD8\u3002", "https://cloud.baidu.cn/doc/qianfan/s/nmweljpt3")], [option("edition", "Edition", "\u7248\u672C", "standard", ["standard", "enhanced", "flagship"])]),
|
|
507
|
+
backend("doubao", "Volcengine Doubao", "https://docs.volcengine.com/docs/networked-search/networked-search?lang=zh", [mode("key", "https://open.feedcoopapi.com/search_api/web_search", "allowance", "500/month shared free allowance, 10 QPS; usage-based web \xA50.020/request. Subscription keys have independent limits.", "\u6BCF\u6708\u5171\u4EAB 500 \u6B21\u514D\u8D39\uFF0C10 QPS\uFF1B\u6309\u91CF web \xA50.020/\u6B21\uFF1B\u8BA2\u9605 Key \u6709\u72EC\u7ACB\u9650\u5236\u3002", "https://docs.volcengine.com/docs/networked-search/online-search-product-billing?lang=zh")], [option("queryRewrite", "Provider query rewrite", "\u4F9B\u5E94\u5546\u6539\u5199\u67E5\u8BE2", false)]),
|
|
508
|
+
backend("open-websearch", "open-websearch", "https://github.com/Aas-ee/open-webSearch", [mode("anonymous", "http://127.0.0.1:3210/search", "self-hosted", "Self-hosted daemon; no guaranteed quota, engine blocking and infrastructure costs apply. Project personal-use restrictions apply.", "\u81EA\u5EFA daemon\uFF0C\u65E0\u4FDD\u8BC1\u989D\u5EA6\uFF1B\u6709\u5F15\u64CE\u9650\u6D41\u53CA\u8FD0\u884C\u6210\u672C\uFF0C\u6CE8\u610F\u9879\u76EE\u4E2A\u4EBA\u4F7F\u7528\u9650\u5236\u3002", "https://github.com/Aas-ee/open-webSearch")], [option("engine", "Fixed upstream engine", "\u56FA\u5B9A\u4E0A\u6E38\u5F15\u64CE", "duckduckgo"), option("searchMode", "Request strategy", "\u8BF7\u6C42\u65B9\u5F0F", "request", ["request", "playwright"])]),
|
|
509
|
+
backend("serpex", "Serpex", "https://serpex.dev/docs/api/search", [mode("key", "https://api.serpex.dev/api/search", "trial", "200 one-time credits; paid top-ups start around $0.80/1,000. Vendor routes internally; no fixed upstream engine.", "\u4E00\u6B21\u6027 200 credits\uFF1B\u5145\u503C\u7EA6 $0.80/\u5343\u6B21\u8D77\uFF1B\u4F9B\u5E94\u5546\u5185\u90E8\u8DEF\u7531\uFF0C\u4E0D\u80FD\u56FA\u5B9A\u5176\u4E0A\u6E38\u5F15\u64CE\u3002", "https://serpex.dev/docs/getting-started/pricing")]),
|
|
510
|
+
backend("tencent-wsa", "Tencent Cloud WSA", "https://cloud.tencent.com/document/product/1806/121811", [mode("key", "https://wsa.tencentcloudapi.com/", "paid", "\xA514/\xA520/\xA526 per 1,000 by tier. Store a JSON credential {secretId,secretKey}; no free allowance verified.", "\u5206\u6863 \xA514\uFF0F\xA520\uFF0F\xA526 \u6BCF\u5343\u6B21\u3002\u51ED\u8BC1\u586B\u5199 JSON {secretId,secretKey}\uFF1B\u514D\u8D39\u989D\u5EA6\u672A\u6838\u5B9E\u3002", "https://cloud.tencent.com/product/wsa")], [{ ...option("Mode", "Search mode", "\u641C\u7D22\u6A21\u5F0F", 0), min: 0, max: 2 }])
|
|
511
|
+
];
|
|
512
|
+
|
|
513
|
+
// src/locale-map.ts
|
|
514
|
+
var LANGUAGES = ["", "en", "zh-Hans", "zh-Hant", "ja", "ko", "fr", "de", "es", "pt", "ru", "it", "ar", "nl", "pl", "tr", "vi", "th", "id"];
|
|
515
|
+
var REGIONS = ["", "US", "GB", "CN", "HK", "TW", "JP", "KR", "SG", "IN", "AU", "CA", "DE", "FR", "ES", "IT", "NL", "BR", "MX", "RU", "TR", "SA"];
|
|
516
|
+
|
|
517
|
+
// src/config.ts
|
|
518
|
+
function defaultConfig() {
|
|
519
|
+
return {
|
|
520
|
+
mode: "parallel",
|
|
521
|
+
singleBackend: "keenable",
|
|
522
|
+
maxResults: 8,
|
|
523
|
+
concurrency: 4,
|
|
524
|
+
overallTimeoutMs: 3e4,
|
|
525
|
+
language: "",
|
|
526
|
+
region: "",
|
|
527
|
+
recency: "any",
|
|
528
|
+
safeSearch: true,
|
|
529
|
+
includeDomains: [],
|
|
530
|
+
excludeDomains: [],
|
|
531
|
+
dedup: "url",
|
|
532
|
+
fusion: "rrf",
|
|
533
|
+
retry: { enabled: true, statuses: [408, 429, 500, 502, 503, 504], maxRetries: 2, initialDelayMs: 500, maxDelayMs: 5e3, networkErrors: false, timeouts: false },
|
|
534
|
+
cache: { enabled: true, ttlSeconds: 900, maxEntries: 100 },
|
|
535
|
+
breaker: { enabled: false, threshold: 3, cooldownMs: 6e4 },
|
|
536
|
+
diagnostics: { enabled: true, maxEntries: 50 },
|
|
537
|
+
backends: Object.fromEntries(catalog.map((d) => [d.id, { enabled: false, mode: d.modes[0].mode, endpoint: d.modes[0].endpoint, credentialRef: `DSH_SEARCH_${d.id.replaceAll("-", "_").toUpperCase()}_KEY`, timeoutMs: 15e3, rateLimitPerMinute: 0, dailyAttemptLimit: 0, options: Object.fromEntries(d.options.map((o) => [o.key, o.default])) }]))
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
function validateConfig(value) {
|
|
541
|
+
const issues = [];
|
|
542
|
+
const fail = (path, message) => issues.push({ path, message });
|
|
543
|
+
const object = (v) => !!v && typeof v === "object" && !Array.isArray(v);
|
|
544
|
+
if (!object(value)) return [{ path: "config", message: "Expected a configuration object." }];
|
|
545
|
+
function shape(v, exemplar, path) {
|
|
546
|
+
if (Array.isArray(exemplar)) {
|
|
547
|
+
if (!Array.isArray(v)) {
|
|
548
|
+
fail(path, "Expected an array.");
|
|
549
|
+
return;
|
|
550
|
+
}
|
|
551
|
+
if (v.length > 200) fail(path, "Too many entries.");
|
|
552
|
+
if (path === "retry.statuses") {
|
|
553
|
+
if (v.some((n) => !Number.isInteger(n) || n < 400 || n > 599)) fail(path, "Expected HTTP error status codes (400\u2013599).");
|
|
554
|
+
} else if (v.some((x) => typeof x !== "string" || x.length > 253 || !/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/.test(x))) fail(path, "Expected domain names without scheme, path, or wildcards.");
|
|
555
|
+
} else if (object(exemplar)) {
|
|
556
|
+
if (!object(v)) {
|
|
557
|
+
fail(path, "Expected an object.");
|
|
558
|
+
return;
|
|
559
|
+
}
|
|
560
|
+
for (const k of Object.keys(v)) if (!(k in exemplar) && path !== "backends") fail(path ? `${path}.${k}` : k, "Unknown configuration field.");
|
|
561
|
+
for (const [k, e] of Object.entries(exemplar)) shape(v[k], e, path ? `${path}.${k}` : k);
|
|
562
|
+
} else if (typeof v !== typeof exemplar || typeof v === "number" && !Number.isFinite(v)) fail(path, `Expected ${typeof exemplar}.`);
|
|
563
|
+
else if (typeof v === "string" && v.length > 4096) fail(path, "Value is too long.");
|
|
564
|
+
}
|
|
565
|
+
shape(value, defaultConfig(), "");
|
|
566
|
+
if (issues.length) return issues;
|
|
567
|
+
const c = value;
|
|
568
|
+
const choice = (v, allowed, p) => {
|
|
569
|
+
if (!allowed.includes(v)) fail(p, "Unsupported selection.");
|
|
570
|
+
};
|
|
571
|
+
const num = (v, min, max, p) => {
|
|
572
|
+
if (!Number.isInteger(v) || v < min || v > max) fail(p, `Expected an integer between ${min} and ${max}.`);
|
|
573
|
+
};
|
|
574
|
+
if (c.language && !LANGUAGES.includes(c.language)) fail("language", "Unsupported language code.");
|
|
575
|
+
if (c.region && !REGIONS.includes(c.region)) fail("region", "Unsupported region code.");
|
|
576
|
+
choice(c.mode, ["single", "parallel"], "mode");
|
|
577
|
+
choice(c.singleBackend, catalog.map((x) => x.id), "singleBackend");
|
|
578
|
+
choice(c.recency, ["any", "day", "week", "month", "year"], "recency");
|
|
579
|
+
choice(c.dedup, ["url", "url-title"], "dedup");
|
|
580
|
+
choice(c.fusion, ["rrf", "ordered"], "fusion");
|
|
581
|
+
num(c.maxResults, 1, 50, "maxResults");
|
|
582
|
+
num(c.concurrency, 1, 20, "concurrency");
|
|
583
|
+
num(c.overallTimeoutMs, 1e3, 18e4, "overallTimeoutMs");
|
|
584
|
+
num(c.retry.maxRetries, 0, 5, "retry.maxRetries");
|
|
585
|
+
num(c.retry.initialDelayMs, 0, 6e4, "retry.initialDelayMs");
|
|
586
|
+
num(c.retry.maxDelayMs, 0, 12e4, "retry.maxDelayMs");
|
|
587
|
+
if (c.retry.initialDelayMs > c.retry.maxDelayMs) fail("retry.maxDelayMs", "Maximum delay must not be shorter than initial delay.");
|
|
588
|
+
num(c.cache.ttlSeconds, 1, 86400, "cache.ttlSeconds");
|
|
589
|
+
num(c.cache.maxEntries, 1, 1e3, "cache.maxEntries");
|
|
590
|
+
num(c.breaker.threshold, 1, 100, "breaker.threshold");
|
|
591
|
+
num(c.breaker.cooldownMs, 1e3, 36e5, "breaker.cooldownMs");
|
|
592
|
+
num(c.diagnostics.maxEntries, 1, 500, "diagnostics.maxEntries");
|
|
593
|
+
for (const d of catalog) {
|
|
594
|
+
const b = c.backends[d.id];
|
|
595
|
+
const p = `backends.${d.id}`;
|
|
596
|
+
choice(b.mode, d.modes.map((m) => m.mode), `${p}.mode`);
|
|
597
|
+
if (b.enabled && d.status === "unverified") fail(`${p}.enabled`, "Backend protocol is not verified.");
|
|
598
|
+
if (b.endpoint) {
|
|
599
|
+
try {
|
|
600
|
+
const url = new URL(b.endpoint);
|
|
601
|
+
if (!["http:", "https:"].includes(url.protocol) || url.username || url.password || url.hash || url.search) throw 0;
|
|
602
|
+
const local = url.hostname === "localhost" || url.hostname === "127.0.0.1" || url.hostname === "[::1]";
|
|
603
|
+
if (url.protocol === "http:" && !local) throw 0;
|
|
604
|
+
} catch {
|
|
605
|
+
fail(`${p}.endpoint`, "Use an HTTPS endpoint without credentials, query, or fragment; HTTP is allowed only on loopback.");
|
|
606
|
+
}
|
|
607
|
+
} else if (b.enabled) fail(`${p}.endpoint`, "An endpoint is required.");
|
|
608
|
+
if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(b.credentialRef)) fail(`${p}.credentialRef`, "Expected an environment-style credential reference.");
|
|
609
|
+
num(b.timeoutMs, 1e3, 12e4, `${p}.timeoutMs`);
|
|
610
|
+
num(b.rateLimitPerMinute, 0, 1e5, `${p}.rateLimitPerMinute`);
|
|
611
|
+
num(b.dailyAttemptLimit, 0, 1e6, `${p}.dailyAttemptLimit`);
|
|
612
|
+
for (const o of d.options) {
|
|
613
|
+
const v = b.options[o.key];
|
|
614
|
+
if (o.choices && !o.choices.includes(String(v))) fail(`${p}.options.${o.key}`, "Unsupported option.");
|
|
615
|
+
if (typeof v === "number") num(v, o.min ?? 1, o.max ?? 1e5, `${p}.options.${o.key}`);
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
return issues;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
// src/visibility.ts
|
|
622
|
+
function visible(path, draft) {
|
|
623
|
+
if (path === "singleBackend") return draft.mode === "single";
|
|
624
|
+
if (path.startsWith("retry.") && path !== "retry.enabled") return draft.retry.enabled;
|
|
625
|
+
if (path.startsWith("breaker.") && path !== "breaker.enabled") return draft.breaker.enabled;
|
|
626
|
+
if (path === "cache.ttlSeconds" || path === "cache.maxEntries") return draft.cache.enabled;
|
|
627
|
+
if (path === "diagnostics.maxEntries") return draft.diagnostics.enabled;
|
|
628
|
+
return true;
|
|
629
|
+
}
|
|
630
|
+
function blockersOf(draft, ids, credentialConfigured, nameOf = (id) => id) {
|
|
631
|
+
const blockers = [];
|
|
632
|
+
const enabled = ids.filter((id) => draft.backends[id]?.enabled);
|
|
633
|
+
if (!enabled.length) blockers.push({ key: "blockNoBackends", vars: {}, jump: "sec-backends" });
|
|
634
|
+
if (draft.mode === "single" && !draft.backends[draft.singleBackend]?.enabled) blockers.push({ key: "blockSingleDisabled", vars: { backend: nameOf(draft.singleBackend) }, jump: "singleBackend" });
|
|
635
|
+
const missing = enabled.filter((id) => draft.backends[id]?.mode === "key" && !credentialConfigured(id));
|
|
636
|
+
if (missing.length) blockers.push({ key: "blockMissingCredential", vars: { list: missing.map(nameOf).join(", ") }, jump: "sec-backends" });
|
|
637
|
+
return blockers;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
// src/client.tsx
|
|
641
|
+
var API = "/api/nite-search";
|
|
642
|
+
var clone = (value) => JSON.parse(JSON.stringify(value));
|
|
643
|
+
var same = (a, b) => JSON.stringify(a) === JSON.stringify(b);
|
|
644
|
+
var ranges = { maxResults: [1, 50], concurrency: [1, 20], overallTimeoutMs: [1e3, 18e4], "retry.maxRetries": [0, 5], "retry.initialDelayMs": [0, 6e4], "retry.maxDelayMs": [0, 12e4], "cache.ttlSeconds": [1, 86400], "cache.maxEntries": [1, 1e3], "breaker.threshold": [1, 100], "breaker.cooldownMs": [1e3, 36e5], "diagnostics.maxEntries": [1, 500], "backend.timeoutMs": [1e3, 12e4], "backend.rateLimitPerMinute": [0, 1e5], "backend.dailyAttemptLimit": [0, 1e6] };
|
|
645
|
+
var RETRY_STATUSES = [408, 429, 500, 502, 503, 504];
|
|
646
|
+
var fieldId = (path) => `nite-search-${path.replace(/[^a-z0-9-]/gi, "-")}`;
|
|
647
|
+
function get(value, path) {
|
|
648
|
+
return path.split(".").reduce((v, k) => v?.[k], value);
|
|
649
|
+
}
|
|
650
|
+
function set(value, path, next) {
|
|
651
|
+
const result = clone(value);
|
|
652
|
+
const keys = path.split(".");
|
|
653
|
+
const last = keys.pop();
|
|
654
|
+
let target = result;
|
|
655
|
+
for (const key of keys) target = target[key];
|
|
656
|
+
target[last] = next;
|
|
657
|
+
return result;
|
|
658
|
+
}
|
|
659
|
+
function redact(config) {
|
|
660
|
+
const output = clone(config);
|
|
661
|
+
for (const backend2 of Object.values(output.backends)) {
|
|
662
|
+
try {
|
|
663
|
+
const url = new URL(backend2.endpoint);
|
|
664
|
+
url.username = "";
|
|
665
|
+
url.password = "";
|
|
666
|
+
url.search = "";
|
|
667
|
+
url.hash = "";
|
|
668
|
+
backend2.endpoint = url.toString();
|
|
669
|
+
} catch {
|
|
670
|
+
backend2.endpoint = "";
|
|
671
|
+
}
|
|
672
|
+
for (const key of Object.keys(backend2.options)) if (/key|token|secret|password|auth/i.test(key)) backend2.options[key] = "";
|
|
673
|
+
}
|
|
674
|
+
return output;
|
|
675
|
+
}
|
|
676
|
+
async function request(path, body) {
|
|
677
|
+
const response = await fetch(`${API}/${path}`, { credentials: "same-origin", cache: "no-store", ...body === void 0 ? {} : { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(body) } });
|
|
678
|
+
if (!response.ok) throw new Error(`HTTP ${response.status}`);
|
|
679
|
+
return response.json();
|
|
680
|
+
}
|
|
681
|
+
function createClient(React) {
|
|
682
|
+
function ListInput({ value, onCommit, numeric, ...props }) {
|
|
683
|
+
const formatted = value.join(", ");
|
|
684
|
+
const [text2, setText] = React.useState(formatted);
|
|
685
|
+
React.useEffect(() => setText(formatted), [formatted]);
|
|
686
|
+
return /* @__PURE__ */ React.createElement("input", { ...props, type: "text", value: text2, onChange: (event) => setText(event.target.value), onBlur: () => onCommit(text2.trim() ? text2.split(",").map((part) => numeric ? Number(part.trim()) : part.trim()).filter((part) => numeric || part) : []) });
|
|
687
|
+
}
|
|
688
|
+
return {
|
|
689
|
+
inject: ["slots", "locale"],
|
|
690
|
+
apply(ctx) {
|
|
691
|
+
const { meta: _enMeta, ...enUi } = en_default;
|
|
692
|
+
const { meta: _zhMeta, ...zhUi } = zh_default;
|
|
693
|
+
ctx.effect(() => ctx.locale.register("nite.search", "en", enUi));
|
|
694
|
+
ctx.effect(() => ctx.locale.register("nite.search", "zh", zhUi));
|
|
695
|
+
const t = ctx.locale.bind("nite.search");
|
|
696
|
+
const tr = (key, vars) => String(t(key)).replace(/\{\{(\w+)\}\}/g, (_m, name) => String(vars[name] ?? ""));
|
|
697
|
+
function Page() {
|
|
698
|
+
const locale = React.useSyncExternalStore((fn) => ctx.locale.subscribe(fn), () => ctx.locale.getSnapshot());
|
|
699
|
+
const lang = locale.active.startsWith("zh") ? "zh" : "en";
|
|
700
|
+
const [snapshot, setSnapshot] = React.useState(null);
|
|
701
|
+
const [draft, setDraft] = React.useState(defaultConfig());
|
|
702
|
+
const [issues, setIssues] = React.useState([]);
|
|
703
|
+
const [pending, setPending] = React.useState("");
|
|
704
|
+
const [notice, setNotice] = React.useState("");
|
|
705
|
+
const [failed, setFailed] = React.useState(false);
|
|
706
|
+
const [secrets, setSecrets] = React.useState({});
|
|
707
|
+
const [query, setQuery] = React.useState("");
|
|
708
|
+
const [testBackend, setTestBackend] = React.useState("");
|
|
709
|
+
const [testResult, setTestResult] = React.useState(null);
|
|
710
|
+
const [importText, setImportText] = React.useState("");
|
|
711
|
+
const [showTransfer, setShowTransfer] = React.useState(false);
|
|
712
|
+
const [backendQuery, setBackendQuery] = React.useState("");
|
|
713
|
+
const [backendFilter, setBackendFilter] = React.useState("all");
|
|
714
|
+
const [confirming, setConfirming] = React.useState(null);
|
|
715
|
+
const [tab, setTab] = React.useState("behavior");
|
|
716
|
+
const [pendingFocus, setPendingFocus] = React.useState("");
|
|
717
|
+
const summary = React.useRef(null);
|
|
718
|
+
const dirty = !!snapshot && !same(draft, snapshot.config);
|
|
719
|
+
const definitions = snapshot?.catalog || catalog;
|
|
720
|
+
const enabledSaved = definitions.filter((def) => def.status === "documented" && snapshot?.config.backends[def.id]?.enabled);
|
|
721
|
+
React.useEffect(() => {
|
|
722
|
+
let live = true;
|
|
723
|
+
request("settings").then((value) => {
|
|
724
|
+
if (live) {
|
|
725
|
+
setSnapshot(value);
|
|
726
|
+
setDraft(clone(value.config));
|
|
727
|
+
}
|
|
728
|
+
}).catch(() => {
|
|
729
|
+
if (live) {
|
|
730
|
+
setNotice("loadFailed");
|
|
731
|
+
setFailed(true);
|
|
732
|
+
}
|
|
733
|
+
});
|
|
734
|
+
return () => {
|
|
735
|
+
live = false;
|
|
736
|
+
};
|
|
737
|
+
}, []);
|
|
738
|
+
React.useEffect(() => {
|
|
739
|
+
if (!dirty) return;
|
|
740
|
+
const warn = (event) => {
|
|
741
|
+
event.preventDefault();
|
|
742
|
+
event.returnValue = "";
|
|
743
|
+
};
|
|
744
|
+
window.addEventListener("beforeunload", warn);
|
|
745
|
+
return () => window.removeEventListener("beforeunload", warn);
|
|
746
|
+
}, [dirty]);
|
|
747
|
+
React.useEffect(() => {
|
|
748
|
+
if (issues.length) summary.current?.focus();
|
|
749
|
+
}, [issues]);
|
|
750
|
+
function update(path, value) {
|
|
751
|
+
setDraft((previous) => {
|
|
752
|
+
let next = set(previous, path, value);
|
|
753
|
+
const match = /^backends\.([^.]+)\.mode$/.exec(path);
|
|
754
|
+
if (match) {
|
|
755
|
+
const endpoint = definitions.find((def) => def.id === match[1])?.modes.find((mode2) => mode2.mode === value)?.endpoint;
|
|
756
|
+
if (endpoint) next = set(next, `backends.${match[1]}.endpoint`, endpoint);
|
|
757
|
+
}
|
|
758
|
+
return next;
|
|
759
|
+
});
|
|
760
|
+
setNotice("");
|
|
761
|
+
}
|
|
762
|
+
function label(path) {
|
|
763
|
+
const option2 = /^backends\.([^.]+)\.options\.(.+)$/.exec(path);
|
|
764
|
+
if (option2) return definitions.find((def) => def.id === option2[1])?.options.find((field2) => field2.key === option2[2])?.label[lang] || t("invalidField");
|
|
765
|
+
return t(`field.${path.replace(/^backends\.[^.]+\./, "backend.")}`);
|
|
766
|
+
}
|
|
767
|
+
function focusPath(path) {
|
|
768
|
+
if (path === "backends" || path === "sec-backends") {
|
|
769
|
+
setTab("backends");
|
|
770
|
+
setPendingFocus("sec-backends");
|
|
771
|
+
return;
|
|
772
|
+
}
|
|
773
|
+
const reliability = path.startsWith("retry.") || path.startsWith("breaker.") || path.startsWith("cache.") || path === "diagnostics.enabled" || path === "diagnostics.maxEntries";
|
|
774
|
+
setTab(path.startsWith("backends.") ? "backends" : reliability ? "reliability" : "behavior");
|
|
775
|
+
setPendingFocus(path);
|
|
776
|
+
}
|
|
777
|
+
React.useEffect(() => {
|
|
778
|
+
if (!pendingFocus) return;
|
|
779
|
+
const target = document.getElementById(fieldId(pendingFocus)) || document.getElementById(pendingFocus);
|
|
780
|
+
if (target) {
|
|
781
|
+
let node = target;
|
|
782
|
+
while (node) {
|
|
783
|
+
const wrapper = node.closest("details");
|
|
784
|
+
if (!wrapper) break;
|
|
785
|
+
wrapper.open = true;
|
|
786
|
+
node = wrapper.parentElement;
|
|
787
|
+
}
|
|
788
|
+
target.scrollIntoView({ block: "center" });
|
|
789
|
+
target.focus();
|
|
790
|
+
}
|
|
791
|
+
setPendingFocus("");
|
|
792
|
+
}, [pendingFocus, tab]);
|
|
793
|
+
React.useEffect(() => {
|
|
794
|
+
if (!enabledSaved.length) {
|
|
795
|
+
if (testBackend) setTestBackend("");
|
|
796
|
+
return;
|
|
797
|
+
}
|
|
798
|
+
if (!enabledSaved.some((def) => def.id === testBackend)) setTestBackend(enabledSaved[0].id);
|
|
799
|
+
}, [snapshot]);
|
|
800
|
+
function field(path, options = {}) {
|
|
801
|
+
const { type = "text", choices, help, customLabel, disabled = false } = options;
|
|
802
|
+
const value = get(draft, path);
|
|
803
|
+
const id = fieldId(path);
|
|
804
|
+
const errors = issues.filter((issue) => issue.path === path);
|
|
805
|
+
const range = ranges[path.replace(/^backends\.[^.]+\./, "backend.")];
|
|
806
|
+
const min = options.min ?? range?.[0];
|
|
807
|
+
const max = options.max ?? range?.[1];
|
|
808
|
+
const props = { id, disabled: !!pending || disabled, "aria-invalid": errors.length > 0, "aria-describedby": `${id}-help${errors.length ? ` ${id}-error` : ""}` };
|
|
809
|
+
return /* @__PURE__ */ React.createElement("div", { className: `ns-field ${type === "checkbox" ? "ns-check" : ""}`, key: path }, /* @__PURE__ */ React.createElement("label", { htmlFor: id }, customLabel || label(path)), type === "checkbox" ? /* @__PURE__ */ React.createElement("input", { ...props, type: "checkbox", checked: !!value, onChange: (event) => update(path, event.target.checked) }) : choices ? /* @__PURE__ */ React.createElement("select", { ...props, value, onChange: (event) => update(path, event.target.value) }, choices.map((choice) => /* @__PURE__ */ React.createElement("option", { key: choice, value: choice }, path === "singleBackend" ? definitions.find((def) => def.id === choice)?.title || choice : path === "language" || path === "region" ? choice === "" ? t("notSpecified") : choice : path.includes(".options.") ? choice : t(`choice.${choice}`)))) : type === "list" || type === "numbers" ? /* @__PURE__ */ React.createElement(ListInput, { ...props, value, numeric: type === "numbers", onCommit: (next) => update(path, next) }) : /* @__PURE__ */ React.createElement("input", { ...props, type, min, max, value: value ?? "", onChange: (event) => {
|
|
810
|
+
const raw = event.target.value;
|
|
811
|
+
update(path, type === "number" ? raw === "" ? "" : Number(raw) : raw);
|
|
812
|
+
} }), /* @__PURE__ */ React.createElement("small", { id: `${id}-help` }, help || t(`help.${path.replace(/^backends\.[^.]+\./, "backend.")}`), type === "number" && min !== void 0 && max !== void 0 ? ` (${min}\u2013${max})` : ""), !!errors.length && /* @__PURE__ */ React.createElement("small", { className: "ns-error", id: `${id}-error` }, type === "number" && min !== void 0 && max !== void 0 ? tr("expectedRange", { min, max }) : t("invalidField"), /* @__PURE__ */ React.createElement("button", { type: "button", className: "ns-link", onClick: () => focusPath(path) }, t("showField"))));
|
|
813
|
+
}
|
|
814
|
+
function fields(paths, options = {}) {
|
|
815
|
+
return paths.filter((path) => visible(path, draft)).map((path) => field(path, options[path] || {}));
|
|
816
|
+
}
|
|
817
|
+
function section(title, ids, paths, options = {}) {
|
|
818
|
+
const shown = fields(paths, options);
|
|
819
|
+
return shown.length ? /* @__PURE__ */ React.createElement("section", { className: "ns-card", "aria-labelledby": ids[0] }, /* @__PURE__ */ React.createElement("h3", { id: ids[0] }, t(title)), /* @__PURE__ */ React.createElement("div", { className: "ns-grid" }, shown)) : null;
|
|
820
|
+
}
|
|
821
|
+
async function refresh() {
|
|
822
|
+
const next = await request("settings");
|
|
823
|
+
setSnapshot(next);
|
|
824
|
+
return next;
|
|
825
|
+
}
|
|
826
|
+
async function save() {
|
|
827
|
+
const errors = validateConfig(draft);
|
|
828
|
+
setIssues(errors);
|
|
829
|
+
if (errors.length || !snapshot) return;
|
|
830
|
+
const intended = clone(draft);
|
|
831
|
+
const revision = snapshot.revision;
|
|
832
|
+
setPending("save");
|
|
833
|
+
setNotice("saving");
|
|
834
|
+
setFailed(false);
|
|
835
|
+
try {
|
|
836
|
+
try {
|
|
837
|
+
await request("settings", { config: intended, expectedRevision: revision });
|
|
838
|
+
} catch {
|
|
839
|
+
}
|
|
840
|
+
const next = await refresh();
|
|
841
|
+
if (!same(next.config, intended)) {
|
|
842
|
+
setFailed(true);
|
|
843
|
+
setNotice(next.revision !== revision ? "conflict" : "saveUnconfirmed");
|
|
844
|
+
} else {
|
|
845
|
+
setDraft(clone(next.config));
|
|
846
|
+
setNotice("saved");
|
|
847
|
+
}
|
|
848
|
+
} catch {
|
|
849
|
+
setFailed(true);
|
|
850
|
+
setNotice("saveUnconfirmed");
|
|
851
|
+
} finally {
|
|
852
|
+
setPending("");
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
async function action(actionName, extra = {}) {
|
|
856
|
+
setPending(actionName);
|
|
857
|
+
setFailed(false);
|
|
858
|
+
setNotice("working");
|
|
859
|
+
try {
|
|
860
|
+
const result = await request("action", { action: actionName, ...extra });
|
|
861
|
+
if (actionName === "test") setTestResult(result);
|
|
862
|
+
await refresh();
|
|
863
|
+
setNotice("done");
|
|
864
|
+
} catch {
|
|
865
|
+
setFailed(true);
|
|
866
|
+
setNotice("actionFailed");
|
|
867
|
+
} finally {
|
|
868
|
+
setPending("");
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
async function credential(id, remove) {
|
|
872
|
+
if (!snapshot || dirty) return;
|
|
873
|
+
const backend2 = snapshot.config.backends[id];
|
|
874
|
+
setPending(`credential-${id}`);
|
|
875
|
+
setFailed(false);
|
|
876
|
+
setNotice("working");
|
|
877
|
+
try {
|
|
878
|
+
await request("credential", { backendId: id, ref: backend2.credentialRef, ...remove ? { remove: true } : { value: secrets[id] } });
|
|
879
|
+
setSecrets((previous) => ({ ...previous, [id]: "" }));
|
|
880
|
+
await refresh();
|
|
881
|
+
setNotice("credentialSaved");
|
|
882
|
+
} catch {
|
|
883
|
+
setSecrets((previous) => ({ ...previous, [id]: "" }));
|
|
884
|
+
setFailed(true);
|
|
885
|
+
setNotice("credentialFailed");
|
|
886
|
+
} finally {
|
|
887
|
+
setPending("");
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
function importConfig() {
|
|
891
|
+
try {
|
|
892
|
+
const parsed = JSON.parse(importText);
|
|
893
|
+
const errors = validateConfig(parsed);
|
|
894
|
+
setIssues(errors);
|
|
895
|
+
if (errors.length) return;
|
|
896
|
+
setDraft(clone(parsed));
|
|
897
|
+
setImportText("");
|
|
898
|
+
setNotice("imported");
|
|
899
|
+
setFailed(false);
|
|
900
|
+
} catch {
|
|
901
|
+
setNotice("importFailed");
|
|
902
|
+
setFailed(true);
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
function exportConfig() {
|
|
906
|
+
const blob = new Blob([JSON.stringify(redact(draft), null, 2)], { type: "application/json" });
|
|
907
|
+
const url = URL.createObjectURL(blob);
|
|
908
|
+
const link = document.createElement("a");
|
|
909
|
+
link.href = url;
|
|
910
|
+
link.download = "nite-search.redacted.json";
|
|
911
|
+
link.click();
|
|
912
|
+
URL.revokeObjectURL(url);
|
|
913
|
+
}
|
|
914
|
+
function confirmRow(kind, text2, run, backendId) {
|
|
915
|
+
if (confirming?.kind !== kind) return null;
|
|
916
|
+
return /* @__PURE__ */ React.createElement("div", { className: "ns-confirm", role: "alert" }, /* @__PURE__ */ React.createElement("p", null, t(text2)), /* @__PURE__ */ React.createElement("div", { className: "ns-actions" }, /* @__PURE__ */ React.createElement("button", { type: "button", className: "ns-danger", onClick: () => {
|
|
917
|
+
setConfirming(null);
|
|
918
|
+
run();
|
|
919
|
+
} }, t("confirmYes")), /* @__PURE__ */ React.createElement("button", { type: "button", onClick: () => setConfirming(null) }, t("confirmCancel"))));
|
|
920
|
+
}
|
|
921
|
+
const enabledCount = definitions.filter((def) => draft.backends[def.id]?.enabled).length;
|
|
922
|
+
const blockers = snapshot ? blockersOf(draft, definitions.filter((def) => def.status === "documented").map((def) => def.id), (id) => !!snapshot.credentials[id]?.configured, (id) => definitions.find((def) => def.id === id)?.title || id) : [];
|
|
923
|
+
const normalizedQuery = backendQuery.trim().toLowerCase();
|
|
924
|
+
const matches = (def) => {
|
|
925
|
+
if (normalizedQuery && !def.title.toLowerCase().includes(normalizedQuery) && !def.id.includes(normalizedQuery)) return false;
|
|
926
|
+
if (backendFilter === "enabled" && !draft.backends[def.id]?.enabled) return false;
|
|
927
|
+
if (backendFilter === "configured" && !snapshot?.credentials[def.id]?.configured) return false;
|
|
928
|
+
return true;
|
|
929
|
+
};
|
|
930
|
+
const tierOf = (def) => def.status === "unverified" ? "unverified" : def.modes.find((mode2) => mode2.mode === draft.backends[def.id]?.mode)?.tier || "unverified";
|
|
931
|
+
const tierRisk = (tier) => tier === "paid" || tier === "trial" ? "ns-chip--risk" : tier === "unverified" ? "ns-chip--off" : tier === "allowance" ? "ns-chip--warn" : "ns-chip--ok";
|
|
932
|
+
const TABS = ["behavior", "reliability", "diagnostics", "backends"];
|
|
933
|
+
return /* @__PURE__ */ React.createElement("div", { className: "ns-page", "aria-busy": !!pending }, /* @__PURE__ */ React.createElement("style", null, client_default, client_overrides_default), /* @__PURE__ */ React.createElement("header", { className: "ns-header" }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("h2", null, t("title")), /* @__PURE__ */ React.createElement("p", null, tr("intro", { enabled: enabledCount, total: definitions.length })))), /* @__PURE__ */ React.createElement("div", { className: "ns-status", role: "status", "aria-live": "polite" }, /* @__PURE__ */ React.createElement("span", { className: failed ? "ns-error" : "" }, notice ? t(notice) : !snapshot ? t("loading") : dirty ? t("unsaved") : t("upToDate")), !!pending && /* @__PURE__ */ React.createElement("span", null, t("pending"))), !!issues.length && /* @__PURE__ */ React.createElement("div", { className: "ns-summary", role: "alert", tabIndex: -1, ref: summary }, /* @__PURE__ */ React.createElement("h3", null, t("validationTitle")), /* @__PURE__ */ React.createElement("ul", null, issues.map((issue, index) => /* @__PURE__ */ React.createElement("li", { key: `${issue.path}-${index}` }, /* @__PURE__ */ React.createElement("a", { href: `#${fieldId(issue.path)}`, onClick: (event) => {
|
|
934
|
+
event.preventDefault();
|
|
935
|
+
focusPath(issue.path);
|
|
936
|
+
} }, label(issue.path), " ", /* @__PURE__ */ React.createElement("code", null, issue.path), " \u2014 ", t("invalidField")))))), snapshot && !snapshot.active.isSelf && /* @__PURE__ */ React.createElement("div", { className: "ns-blockers ns-blockers--info", role: "status" }, /* @__PURE__ */ React.createElement("h3", null, t("activeTitle")), /* @__PURE__ */ React.createElement("p", null, tr("activeOther", { provider: snapshot.active.searchProvider || t("notSpecified") })), /* @__PURE__ */ React.createElement("button", { type: "button", disabled: !!pending, onClick: () => action("activate") }, t("activateSelf"))), !!blockers.length && /* @__PURE__ */ React.createElement("div", { className: "ns-blockers", role: "status", "aria-live": "polite" }, /* @__PURE__ */ React.createElement("h3", null, t("blockersTitle")), /* @__PURE__ */ React.createElement("ul", null, blockers.map((blocker) => /* @__PURE__ */ React.createElement("li", { key: blocker.key }, tr(blocker.key, blocker.vars), " ", /* @__PURE__ */ React.createElement("button", { type: "button", className: "ns-link", onClick: () => focusPath(blocker.jump) }, t("fixIt")))))), !snapshot ? /* @__PURE__ */ React.createElement("button", { disabled: !!pending, onClick: async () => {
|
|
937
|
+
setPending("load");
|
|
938
|
+
try {
|
|
939
|
+
const next = await refresh();
|
|
940
|
+
setDraft(clone(next.config));
|
|
941
|
+
setNotice("");
|
|
942
|
+
setFailed(false);
|
|
943
|
+
} catch {
|
|
944
|
+
setFailed(true);
|
|
945
|
+
setNotice("loadFailed");
|
|
946
|
+
} finally {
|
|
947
|
+
setPending("");
|
|
948
|
+
}
|
|
949
|
+
} }, t("reload")) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "ns-tabs", role: "tablist", "aria-label": t("tabsLabel") }, TABS.map((id) => /* @__PURE__ */ React.createElement("button", { key: id, role: "tab", type: "button", id: `tab-${id}`, "aria-selected": tab === id, "aria-controls": `panel-${id}`, className: `ns-tab ${tab === id ? "is-active" : ""}`, onClick: () => setTab(id) }, t(`tab.${id}`), id === "backends" && /* @__PURE__ */ React.createElement("span", { className: "ns-tab-count" }, enabledCount, "/", definitions.length)))), tab === "behavior" && /* @__PURE__ */ React.createElement("div", { role: "tabpanel", id: "panel-behavior", "aria-labelledby": "tab-behavior" }, /* @__PURE__ */ React.createElement("section", { className: "ns-card", "aria-labelledby": "sec-behavior" }, /* @__PURE__ */ React.createElement("h3", { id: "sec-behavior" }, t("general")), /* @__PURE__ */ React.createElement("div", { className: "ns-grid" }, fields(["mode", "singleBackend", "maxResults", "concurrency", "overallTimeoutMs", "language", "region", "recency", "safeSearch", "includeDomains", "excludeDomains", "dedup", "fusion"], { mode: { choices: ["single", "parallel"] }, singleBackend: { choices: definitions.map((def) => def.id) }, maxResults: { type: "number" }, concurrency: { type: "number" }, overallTimeoutMs: { type: "number" }, language: { choices: [...LANGUAGES] }, region: { choices: [...REGIONS] }, recency: { choices: ["any", "day", "week", "month", "year"] }, safeSearch: { type: "checkbox" }, includeDomains: { type: "list" }, excludeDomains: { type: "list" }, dedup: { choices: ["url", "url-title"] }, fusion: { choices: ["rrf", "ordered"] } })))), tab === "reliability" && /* @__PURE__ */ React.createElement("div", { role: "tabpanel", id: "panel-reliability", "aria-labelledby": "tab-reliability" }, section("resilience", ["sec-resilience"], ["retry.enabled", "retry.maxRetries", "retry.initialDelayMs", "retry.maxDelayMs", "retry.networkErrors", "retry.timeouts", "breaker.enabled", "breaker.threshold", "breaker.cooldownMs"], { "retry.enabled": { type: "checkbox" }, "retry.maxRetries": { type: "number" }, "retry.initialDelayMs": { type: "number" }, "retry.maxDelayMs": { type: "number" }, "retry.networkErrors": { type: "checkbox" }, "retry.timeouts": { type: "checkbox" }, "breaker.enabled": { type: "checkbox" }, "breaker.threshold": { type: "number" }, "breaker.cooldownMs": { type: "number" } }), draft.retry.enabled && /* @__PURE__ */ React.createElement("section", { className: "ns-card", "aria-labelledby": "sec-retry-statuses" }, /* @__PURE__ */ React.createElement("h3", { id: "sec-retry-statuses" }, t("field.retry.statuses")), /* @__PURE__ */ React.createElement("p", { className: "ns-muted" }, t("help.retry.statuses")), /* @__PURE__ */ React.createElement("div", { className: "ns-statuses" }, RETRY_STATUSES.map((code) => /* @__PURE__ */ React.createElement("label", { key: code, className: "ns-status-choice" }, /* @__PURE__ */ React.createElement("input", { type: "checkbox", checked: draft.retry.statuses.includes(code), disabled: !!pending, onChange: (event) => update("retry.statuses", event.target.checked ? [...draft.retry.statuses, code].sort((a, b) => a - b) : draft.retry.statuses.filter((item) => item !== code)) }), /* @__PURE__ */ React.createElement("span", null, code)))), !!issues.filter((issue) => issue.path === "retry.statuses").length && /* @__PURE__ */ React.createElement("p", { className: "ns-error", role: "alert" }, t("invalidField"))), section("storage", ["sec-storage"], ["cache.enabled", "cache.ttlSeconds", "cache.maxEntries", "diagnostics.enabled", "diagnostics.maxEntries"], { "cache.enabled": { type: "checkbox" }, "cache.ttlSeconds": { type: "number" }, "cache.maxEntries": { type: "number" }, "diagnostics.enabled": { type: "checkbox" }, "diagnostics.maxEntries": { type: "number" } })), tab === "diagnostics" && /* @__PURE__ */ React.createElement("div", { role: "tabpanel", id: "panel-diagnostics", "aria-labelledby": "tab-diagnostics" }, /* @__PURE__ */ React.createElement("section", { className: "ns-card", "aria-labelledby": "sec-test" }, /* @__PURE__ */ React.createElement("h3", { id: "sec-test" }, t("testTitle")), /* @__PURE__ */ React.createElement("p", null, t("testHelp")), enabledSaved.length === 0 ? /* @__PURE__ */ React.createElement("p", { className: "ns-muted" }, t("testNeedsBackend")) : /* @__PURE__ */ React.createElement("div", { className: "ns-grid" }, /* @__PURE__ */ React.createElement("div", { className: "ns-field" }, /* @__PURE__ */ React.createElement("label", { htmlFor: "ns-test-backend" }, t("testBackend")), /* @__PURE__ */ React.createElement("select", { id: "ns-test-backend", disabled: !!pending || dirty, value: testBackend, onChange: (event) => setTestBackend(event.target.value) }, enabledSaved.map((def) => /* @__PURE__ */ React.createElement("option", { value: def.id, key: def.id }, def.title)))), /* @__PURE__ */ React.createElement("div", { className: "ns-field" }, /* @__PURE__ */ React.createElement("label", { htmlFor: "ns-test-query" }, t("testQuery")), /* @__PURE__ */ React.createElement("input", { id: "ns-test-query", value: query, disabled: !!pending || dirty, onChange: (event) => setQuery(event.target.value), placeholder: t("testQueryPlaceholder") }))), enabledSaved.length > 0 && /* @__PURE__ */ React.createElement("div", { className: "ns-test-actions" }, /* @__PURE__ */ React.createElement("button", { className: "ns-primary", disabled: !!pending || dirty || !query.trim() || !enabledSaved.some((def) => def.id === testBackend), onClick: () => action("test", { backendId: testBackend, query }) }, t("runTest")), dirty && /* @__PURE__ */ React.createElement("small", null, t("saveBeforeTest"))), testResult && /* @__PURE__ */ React.createElement("div", { className: "ns-result" }, /* @__PURE__ */ React.createElement("h4", null, t("testResult")), testResult.sources?.length ? /* @__PURE__ */ React.createElement("ol", { className: "ns-sources" }, testResult.sources.map((source, index) => /* @__PURE__ */ React.createElement("li", { key: `${source.url}-${index}` }, /* @__PURE__ */ React.createElement("a", { href: source.url, target: "_blank", rel: "noreferrer" }, source.title || source.url), /* @__PURE__ */ React.createElement("p", { className: "ns-muted" }, source.url), source.snippet && /* @__PURE__ */ React.createElement("p", null, source.snippet)))) : /* @__PURE__ */ React.createElement("p", { className: "ns-muted" }, t("noSources")), (testResult.outcomes || []).filter((outcome) => !outcome.ok).map((outcome) => /* @__PURE__ */ React.createElement("div", { className: "ns-failure", key: outcome.backend }, /* @__PURE__ */ React.createElement("h5", null, t("testFailure")), /* @__PURE__ */ React.createElement("dl", null, /* @__PURE__ */ React.createElement("dt", null, t("diagnostic.backend")), /* @__PURE__ */ React.createElement("dd", null, outcome.backend), /* @__PURE__ */ React.createElement("dt", null, t("diagnostic.mode")), /* @__PURE__ */ React.createElement("dd", null, t(`choice.${outcome.mode}`)), /* @__PURE__ */ React.createElement("dt", null, t("diagnostic.attempts")), /* @__PURE__ */ React.createElement("dd", null, outcome.attempts), /* @__PURE__ */ React.createElement("dt", null, t("diagnostic.reason")), /* @__PURE__ */ React.createElement("dd", null, t(`failure.${outcome.error?.kind || "protocol"}`), outcome.error?.status ? ` \xB7 HTTP ${outcome.error.status}` : ""), /* @__PURE__ */ React.createElement("dt", null, t("diagnostic.message")), /* @__PURE__ */ React.createElement("dd", null, outcome.error?.message)))), (testResult.outcomes || []).flatMap((outcome) => outcome.warnings.map((warning) => /* @__PURE__ */ React.createElement("p", { className: "ns-muted", key: `${outcome.backend}-${warning}` }, "[", outcome.backend, "] ", warning))))), /* @__PURE__ */ React.createElement("section", { className: "ns-card", "aria-labelledby": "sec-diagnostics" }, /* @__PURE__ */ React.createElement("h3", { id: "sec-diagnostics" }, t("diagnosticsTitle")), /* @__PURE__ */ React.createElement("p", null, t("diagnosticsHelp")), /* @__PURE__ */ React.createElement("div", { className: "ns-actions" }, /* @__PURE__ */ React.createElement("button", { disabled: !!pending, onClick: () => action("clear-cache") }, t("clearCache")), /* @__PURE__ */ React.createElement("button", { disabled: !!pending, onClick: () => setConfirming({ kind: "clear-diagnostics" }) }, t("clearDiagnostics")), /* @__PURE__ */ React.createElement("button", { disabled: !!pending, onClick: async () => {
|
|
950
|
+
setPending("refresh");
|
|
951
|
+
try {
|
|
952
|
+
await refresh();
|
|
953
|
+
setNotice("done");
|
|
954
|
+
setFailed(false);
|
|
955
|
+
} catch {
|
|
956
|
+
setFailed(true);
|
|
957
|
+
setNotice("actionFailed");
|
|
958
|
+
} finally {
|
|
959
|
+
setPending("");
|
|
960
|
+
}
|
|
961
|
+
} }, t("refreshDiagnostics"))), confirmRow("clear-diagnostics", "clearDiagnosticsConfirm", () => {
|
|
962
|
+
void action("clear-diagnostics");
|
|
963
|
+
}), snapshot.diagnostics.length ? /* @__PURE__ */ React.createElement("div", { className: "ns-table-wrap" }, /* @__PURE__ */ React.createElement("table", null, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, ["time", "backend", "mode", "result", "attempts", "message"].map((key) => /* @__PURE__ */ React.createElement("th", { key }, t(`diagnostic.${key}`))))), /* @__PURE__ */ React.createElement("tbody", null, [...snapshot.diagnostics].reverse().map((item, index) => /* @__PURE__ */ React.createElement("tr", { key: `${item.backend}-${index}` }, /* @__PURE__ */ React.createElement("td", null, item.at ? new Date(item.at).toLocaleTimeString(locale.active) : "\u2014"), /* @__PURE__ */ React.createElement("td", null, item.backend), /* @__PURE__ */ React.createElement("td", null, t(`choice.${item.mode}`)), /* @__PURE__ */ React.createElement("td", { className: item.ok ? "ns-success" : "ns-error" }, item.ok ? t("ok") : t(`failure.${item.error?.kind || "protocol"}`)), /* @__PURE__ */ React.createElement("td", null, item.attempts), /* @__PURE__ */ React.createElement("td", { className: "ns-cell-message" }, item.ok ? item.warnings[0] ? t("hasWarnings") : "" : item.error?.message || "")))))) : /* @__PURE__ */ React.createElement("p", { className: "ns-muted" }, t("noDiagnostics"))), /* @__PURE__ */ React.createElement("section", { className: "ns-card", "aria-labelledby": "sec-transfer" }, /* @__PURE__ */ React.createElement("h3", { id: "sec-transfer" }, t("transferTitle")), /* @__PURE__ */ React.createElement("p", null, t("transferHelp")), /* @__PURE__ */ React.createElement("div", { className: "ns-actions" }, /* @__PURE__ */ React.createElement("button", { disabled: !!pending, onClick: exportConfig }, t("export")), /* @__PURE__ */ React.createElement("button", { disabled: !!pending, "aria-expanded": showTransfer, onClick: () => setShowTransfer(!showTransfer) }, t("import")), /* @__PURE__ */ React.createElement("button", { disabled: !!pending, onClick: () => setConfirming({ kind: "restore-defaults" }) }, t("restoreDefaults"))), confirmRow("restore-defaults", "defaultsConfirm", () => {
|
|
964
|
+
setDraft(clone(snapshot.defaults));
|
|
965
|
+
setIssues([]);
|
|
966
|
+
setNotice("defaultsRestored");
|
|
967
|
+
}), showTransfer && /* @__PURE__ */ React.createElement("div", { className: "ns-field" }, /* @__PURE__ */ React.createElement("label", { htmlFor: "ns-import" }, t("importLabel")), /* @__PURE__ */ React.createElement("textarea", { id: "ns-import", value: importText, disabled: !!pending, onChange: (event) => setImportText(event.target.value), rows: 8 }), /* @__PURE__ */ React.createElement("button", { disabled: !!pending || !importText.trim(), onClick: importConfig }, t("applyImport"))))), tab === "backends" && /* @__PURE__ */ React.createElement("div", { role: "tabpanel", id: "panel-backends", "aria-labelledby": "tab-backends" }, /* @__PURE__ */ React.createElement("section", { className: "ns-backends", id: "sec-backends", tabIndex: -1, "aria-labelledby": "sec-backends-title" }, /* @__PURE__ */ React.createElement("h3", { id: "sec-backends-title" }, t("backends"), " ", /* @__PURE__ */ React.createElement("span", { className: "ns-muted" }, tr("enabledSummary", { enabled: enabledCount, total: definitions.length }))), /* @__PURE__ */ React.createElement("p", { className: "ns-muted" }, t("backendIntro")), /* @__PURE__ */ React.createElement("div", { className: "ns-toolbar" }, /* @__PURE__ */ React.createElement("div", { className: "ns-field" }, /* @__PURE__ */ React.createElement("label", { htmlFor: "ns-backend-search" }, t("searchBackends")), /* @__PURE__ */ React.createElement("input", { id: "ns-backend-search", type: "search", value: backendQuery, onChange: (event) => setBackendQuery(event.target.value), placeholder: t("searchBackendsPlaceholder") })), /* @__PURE__ */ React.createElement("div", { className: "ns-field" }, /* @__PURE__ */ React.createElement("label", { htmlFor: "ns-backend-filter" }, t("filterBackends")), /* @__PURE__ */ React.createElement("select", { id: "ns-backend-filter", value: backendFilter, onChange: (event) => setBackendFilter(event.target.value) }, ["all", "enabled", "configured"].map((value) => /* @__PURE__ */ React.createElement("option", { key: value, value }, t(`filter.${value}`)))))), ["free", "allowance", "trial", "paid", "self-hosted", "unverified"].map((tier) => {
|
|
968
|
+
const members = definitions.filter((def) => tierOf(def) === tier && matches(def));
|
|
969
|
+
const total = definitions.filter((def) => tierOf(def) === tier).length;
|
|
970
|
+
return members.length ? /* @__PURE__ */ React.createElement("div", { className: "ns-tier", key: tier }, /* @__PURE__ */ React.createElement("h4", null, t(`tier.${tier}`), " ", /* @__PURE__ */ React.createElement("span", { className: "ns-muted" }, "(", members.length, "/", total, ")")), members.map((def) => {
|
|
971
|
+
const backend2 = draft.backends[def.id];
|
|
972
|
+
if (!backend2) return null;
|
|
973
|
+
const mode2 = def.modes.find((item) => item.mode === backend2.mode);
|
|
974
|
+
const base = `backends.${def.id}`;
|
|
975
|
+
const credentialState = snapshot.credentials[def.id];
|
|
976
|
+
const locked = def.status !== "documented";
|
|
977
|
+
const anonymous = backend2.mode === "anonymous";
|
|
978
|
+
return /* @__PURE__ */ React.createElement("details", { className: "ns-card ns-backend", key: def.id }, /* @__PURE__ */ React.createElement("summary", null, /* @__PURE__ */ React.createElement("span", { className: "ns-backend-title" }, def.title), /* @__PURE__ */ React.createElement("span", { className: "ns-chips" }, /* @__PURE__ */ React.createElement("span", { className: `ns-chip ${locked ? "ns-chip--off" : tierRisk(tier)}` }, locked ? t("unverified") : t(`tier.${tier}`)), /* @__PURE__ */ React.createElement("span", { className: "ns-chip" }, t(`choice.${backend2.mode}`)), def.evidence === "live" && /* @__PURE__ */ React.createElement("span", { className: "ns-chip ns-chip--ok" }, t("liveVerified")), /* @__PURE__ */ React.createElement("span", { className: `ns-dot ${credentialState?.configured ? "is-on" : "is-off"}`, "aria-hidden": "true" }), /* @__PURE__ */ React.createElement("span", { className: `ns-badge ${backend2.enabled ? "is-on" : ""}` }, backend2.enabled ? t("enabled") : t("disabled")))), /* @__PURE__ */ React.createElement("div", { className: "ns-backend-body" }, locked && /* @__PURE__ */ React.createElement("p", { className: "ns-warning" }, t("unverifiedHelp")), /* @__PURE__ */ React.createElement("p", { className: "ns-quota" }, mode2?.limits[lang], " ", /* @__PURE__ */ React.createElement("a", { href: mode2?.pricingUrl || def.docs, target: "_blank", rel: "noreferrer" }, t("source")), " \xB7 ", t("verifiedAt"), " ", def.verifiedAt || t("notVerified")), /* @__PURE__ */ React.createElement("div", { className: "ns-grid" }, fields([`${base}.enabled`, `${base}.mode`, `${base}.endpoint`, `${base}.credentialRef`, `${base}.timeoutMs`, `${base}.rateLimitPerMinute`, `${base}.dailyAttemptLimit`], { [`${base}.enabled`]: { type: "checkbox", disabled: locked }, [`${base}.mode`]: { choices: def.modes.map((item) => item.mode), disabled: locked }, [`${base}.timeoutMs`]: { type: "number" }, [`${base}.rateLimitPerMinute`]: { type: "number" }, [`${base}.dailyAttemptLimit`]: { type: "number" } }).filter((node) => !(anonymous && node.key === `${base}.credentialRef`))), anonymous && !locked && /* @__PURE__ */ React.createElement("p", { className: "ns-muted" }, t("anonymousNoCredential")), def.options.length > 0 && /* @__PURE__ */ React.createElement("details", { className: "ns-advanced" }, /* @__PURE__ */ React.createElement("summary", null, t("advancedOptions")), /* @__PURE__ */ React.createElement("div", { className: "ns-grid" }, def.options.map((option2) => field(`${base}.options.${option2.key}`, { type: option2.type === "boolean" ? "checkbox" : option2.type === "number" ? "number" : "text", choices: option2.choices, help: option2.help[lang], customLabel: option2.label[lang], disabled: locked, min: option2.min, max: option2.max })))), !anonymous && !locked && /* @__PURE__ */ React.createElement("div", { className: "ns-credential" }, /* @__PURE__ */ React.createElement("h5", null, t("credentialTitle")), /* @__PURE__ */ React.createElement("p", null, t(credentialState?.configured ? "credentialConfigured" : "credentialMissing"), " \xB7 ", t("credentialHelp")), /* @__PURE__ */ React.createElement("label", { htmlFor: `secret-${def.id}` }, t("credentialValue")), /* @__PURE__ */ React.createElement("input", { id: `secret-${def.id}`, type: "password", autoComplete: "new-password", value: secrets[def.id] || "", disabled: !!pending || dirty || !credentialState?.writable || !backend2.credentialRef, onChange: (event) => setSecrets((previous) => ({ ...previous, [def.id]: event.target.value })) }), dirty && /* @__PURE__ */ React.createElement("small", { id: `secret-${def.id}-why` }, t("saveBeforeCredential")), /* @__PURE__ */ React.createElement("div", { className: "ns-actions" }, /* @__PURE__ */ React.createElement("button", { disabled: !!pending || dirty || !credentialState?.writable || !secrets[def.id], onClick: () => credential(def.id, false) }, t("replaceCredential")), /* @__PURE__ */ React.createElement("button", { disabled: !!pending || dirty || !credentialState?.writable || !credentialState?.configured, onClick: () => setConfirming({ kind: `delete-credential-${def.id}`, backendId: def.id }) }, t("deleteCredential"))), confirmRow(`delete-credential-${def.id}`, "deleteCredentialConfirm", () => {
|
|
979
|
+
void credential(def.id, true);
|
|
980
|
+
})), /* @__PURE__ */ React.createElement("p", { className: "ns-meta" }, /* @__PURE__ */ React.createElement("span", null, t("attemptsToday"), " ", /* @__PURE__ */ React.createElement("strong", null, snapshot.counters[def.id]?.attempts ?? 0)), /* @__PURE__ */ React.createElement("span", { "aria-hidden": "true" }, "\xB7"), /* @__PURE__ */ React.createElement("span", null, snapshot.counters[def.id]?.day ?? t("noData")))));
|
|
981
|
+
})) : null;
|
|
982
|
+
}), !definitions.some(matches) && /* @__PURE__ */ React.createElement("p", { className: "ns-muted" }, t("noMatch")))), /* @__PURE__ */ React.createElement("footer", { className: "ns-footer" }, /* @__PURE__ */ React.createElement("span", { "aria-live": "polite" }, dirty ? tr("unsavedWithErrors", { errors: issues.length }) : t("upToDate")), /* @__PURE__ */ React.createElement("div", { className: "ns-actions" }, /* @__PURE__ */ React.createElement("button", { disabled: !!pending || !dirty, onClick: () => setConfirming({ kind: "discard" }) }, t("discard")), /* @__PURE__ */ React.createElement("button", { className: "ns-primary", disabled: !!pending || !dirty, onClick: save }, t(pending === "save" ? "saving" : "save"))), confirmRow("discard", "discardConfirm", () => {
|
|
983
|
+
setDraft(clone(snapshot.config));
|
|
984
|
+
setIssues([]);
|
|
985
|
+
setNotice("");
|
|
986
|
+
}))));
|
|
987
|
+
}
|
|
988
|
+
ctx.slots.inject("settings.section", () => ctx.slots.register({ name: "settings.section", id: "nite-search", order: 16, label: () => t("title") }, Page));
|
|
989
|
+
}
|
|
990
|
+
};
|
|
991
|
+
}
|
|
992
|
+
return __toCommonJS(client_exports);
|
|
993
|
+
})();
|
|
994
|
+
|
|
995
|
+
return NiteSearchClient.createClient(require('react'));
|
|
996
|
+
}});
|