neogrok 0.0.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.
Files changed (216) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +88 -0
  3. package/build/client/_app/immutable/assets/0.5df5b886.css +1 -0
  4. package/build/client/_app/immutable/assets/0.5df5b886.css.br +0 -0
  5. package/build/client/_app/immutable/assets/0.5df5b886.css.gz +0 -0
  6. package/build/client/_app/immutable/assets/_layout.bb9a93e0.css +1 -0
  7. package/build/client/_app/immutable/assets/_layout.bb9a93e0.css.br +0 -0
  8. package/build/client/_app/immutable/assets/_layout.bb9a93e0.css.gz +0 -0
  9. package/build/client/_app/immutable/chunks/5.4ed993c7.js +1 -0
  10. package/build/client/_app/immutable/chunks/5.4ed993c7.js.br +0 -0
  11. package/build/client/_app/immutable/chunks/5.4ed993c7.js.gz +0 -0
  12. package/build/client/_app/immutable/chunks/each.ece37974.js +1 -0
  13. package/build/client/_app/immutable/chunks/each.ece37974.js.br +0 -0
  14. package/build/client/_app/immutable/chunks/each.ece37974.js.gz +0 -0
  15. package/build/client/_app/immutable/chunks/example-query.ac8ef50a.js +1 -0
  16. package/build/client/_app/immutable/chunks/example-query.ac8ef50a.js.br +0 -0
  17. package/build/client/_app/immutable/chunks/example-query.ac8ef50a.js.gz +0 -0
  18. package/build/client/_app/immutable/chunks/index.81a0017d.js +1 -0
  19. package/build/client/_app/immutable/chunks/index.81a0017d.js.br +0 -0
  20. package/build/client/_app/immutable/chunks/index.81a0017d.js.gz +0 -0
  21. package/build/client/_app/immutable/chunks/index.d0e6da70.js +1 -0
  22. package/build/client/_app/immutable/chunks/index.d0e6da70.js.br +0 -0
  23. package/build/client/_app/immutable/chunks/index.d0e6da70.js.gz +0 -0
  24. package/build/client/_app/immutable/chunks/input-colors.e7674f0c.js +1 -0
  25. package/build/client/_app/immutable/chunks/input-colors.e7674f0c.js.br +0 -0
  26. package/build/client/_app/immutable/chunks/input-colors.e7674f0c.js.gz +0 -0
  27. package/build/client/_app/immutable/chunks/integer-input.e86d05ad.js +1 -0
  28. package/build/client/_app/immutable/chunks/integer-input.e86d05ad.js.br +0 -0
  29. package/build/client/_app/immutable/chunks/integer-input.e86d05ad.js.gz +0 -0
  30. package/build/client/_app/immutable/chunks/link.70630bff.js +1 -0
  31. package/build/client/_app/immutable/chunks/link.70630bff.js.br +0 -0
  32. package/build/client/_app/immutable/chunks/link.70630bff.js.gz +0 -0
  33. package/build/client/_app/immutable/chunks/preferences.e389d16d.js +1 -0
  34. package/build/client/_app/immutable/chunks/preferences.e389d16d.js.br +0 -0
  35. package/build/client/_app/immutable/chunks/preferences.e389d16d.js.gz +0 -0
  36. package/build/client/_app/immutable/chunks/regexp.50bc0e87.js +1 -0
  37. package/build/client/_app/immutable/chunks/regexp.50bc0e87.js.br +2 -0
  38. package/build/client/_app/immutable/chunks/regexp.50bc0e87.js.gz +0 -0
  39. package/build/client/_app/immutable/chunks/scheduler.80902d3b.js +1 -0
  40. package/build/client/_app/immutable/chunks/scheduler.80902d3b.js.br +0 -0
  41. package/build/client/_app/immutable/chunks/scheduler.80902d3b.js.gz +0 -0
  42. package/build/client/_app/immutable/chunks/singletons.a17b5cab.js +1 -0
  43. package/build/client/_app/immutable/chunks/singletons.a17b5cab.js.br +0 -0
  44. package/build/client/_app/immutable/chunks/singletons.a17b5cab.js.gz +0 -0
  45. package/build/client/_app/immutable/chunks/stores.a4da01c2.js +1 -0
  46. package/build/client/_app/immutable/chunks/stores.a4da01c2.js.br +0 -0
  47. package/build/client/_app/immutable/chunks/stores.a4da01c2.js.gz +0 -0
  48. package/build/client/_app/immutable/chunks/toggle-search-type.f1a3061d.js +1 -0
  49. package/build/client/_app/immutable/chunks/toggle-search-type.f1a3061d.js.br +0 -0
  50. package/build/client/_app/immutable/chunks/toggle-search-type.f1a3061d.js.gz +0 -0
  51. package/build/client/_app/immutable/entry/app.4673b9f2.js +1 -0
  52. package/build/client/_app/immutable/entry/app.4673b9f2.js.br +0 -0
  53. package/build/client/_app/immutable/entry/app.4673b9f2.js.gz +0 -0
  54. package/build/client/_app/immutable/entry/start.6bed40d3.js +3 -0
  55. package/build/client/_app/immutable/entry/start.6bed40d3.js.br +0 -0
  56. package/build/client/_app/immutable/entry/start.6bed40d3.js.gz +0 -0
  57. package/build/client/_app/immutable/nodes/0.529467ca.js +1 -0
  58. package/build/client/_app/immutable/nodes/0.529467ca.js.br +0 -0
  59. package/build/client/_app/immutable/nodes/0.529467ca.js.gz +0 -0
  60. package/build/client/_app/immutable/nodes/1.abd8d795.js +1 -0
  61. package/build/client/_app/immutable/nodes/1.abd8d795.js.br +5 -0
  62. package/build/client/_app/immutable/nodes/1.abd8d795.js.gz +0 -0
  63. package/build/client/_app/immutable/nodes/10.28836ccc.js +9 -0
  64. package/build/client/_app/immutable/nodes/10.28836ccc.js.br +0 -0
  65. package/build/client/_app/immutable/nodes/10.28836ccc.js.gz +0 -0
  66. package/build/client/_app/immutable/nodes/11.93ac6006.js +25 -0
  67. package/build/client/_app/immutable/nodes/11.93ac6006.js.br +0 -0
  68. package/build/client/_app/immutable/nodes/11.93ac6006.js.gz +0 -0
  69. package/build/client/_app/immutable/nodes/12.67089c6b.js +11 -0
  70. package/build/client/_app/immutable/nodes/12.67089c6b.js.br +0 -0
  71. package/build/client/_app/immutable/nodes/12.67089c6b.js.gz +0 -0
  72. package/build/client/_app/immutable/nodes/13.418c6178.js +5 -0
  73. package/build/client/_app/immutable/nodes/13.418c6178.js.br +0 -0
  74. package/build/client/_app/immutable/nodes/13.418c6178.js.gz +0 -0
  75. package/build/client/_app/immutable/nodes/14.40bc0592.js +161 -0
  76. package/build/client/_app/immutable/nodes/14.40bc0592.js.br +0 -0
  77. package/build/client/_app/immutable/nodes/14.40bc0592.js.gz +0 -0
  78. package/build/client/_app/immutable/nodes/2.08d89d34.js +9 -0
  79. package/build/client/_app/immutable/nodes/2.08d89d34.js.br +0 -0
  80. package/build/client/_app/immutable/nodes/2.08d89d34.js.gz +0 -0
  81. package/build/client/_app/immutable/nodes/3.a382d3d5.js +8 -0
  82. package/build/client/_app/immutable/nodes/3.a382d3d5.js.br +0 -0
  83. package/build/client/_app/immutable/nodes/3.a382d3d5.js.gz +0 -0
  84. package/build/client/_app/immutable/nodes/4.37e53904.js +8 -0
  85. package/build/client/_app/immutable/nodes/4.37e53904.js.br +0 -0
  86. package/build/client/_app/immutable/nodes/4.37e53904.js.gz +0 -0
  87. package/build/client/_app/immutable/nodes/6.6cd1e711.js +14 -0
  88. package/build/client/_app/immutable/nodes/6.6cd1e711.js.br +0 -0
  89. package/build/client/_app/immutable/nodes/6.6cd1e711.js.gz +0 -0
  90. package/build/client/_app/immutable/nodes/7.b6576b19.js +8 -0
  91. package/build/client/_app/immutable/nodes/7.b6576b19.js.br +0 -0
  92. package/build/client/_app/immutable/nodes/7.b6576b19.js.gz +0 -0
  93. package/build/client/_app/immutable/nodes/8.b18d1c14.js +7 -0
  94. package/build/client/_app/immutable/nodes/8.b18d1c14.js.br +0 -0
  95. package/build/client/_app/immutable/nodes/8.b18d1c14.js.gz +0 -0
  96. package/build/client/_app/immutable/nodes/9.b3dcb728.js +12 -0
  97. package/build/client/_app/immutable/nodes/9.b3dcb728.js.br +0 -0
  98. package/build/client/_app/immutable/nodes/9.b3dcb728.js.gz +0 -0
  99. package/build/client/_app/version.json +1 -0
  100. package/build/client/_app/version.json.br +0 -0
  101. package/build/client/_app/version.json.gz +0 -0
  102. package/build/client/android-chrome-192x192.png +0 -0
  103. package/build/client/android-chrome-512x512.png +0 -0
  104. package/build/client/apple-touch-icon.png +0 -0
  105. package/build/client/favicon-16x16.png +0 -0
  106. package/build/client/favicon-32x32.png +0 -0
  107. package/build/client/favicon.ico +0 -0
  108. package/build/client/site.webmanifest +19 -0
  109. package/build/env.js +37 -0
  110. package/build/handler.js +1307 -0
  111. package/build/index.js +225 -0
  112. package/build/server/chunks/0-040b7d6d.js +27 -0
  113. package/build/server/chunks/0-040b7d6d.js.map +1 -0
  114. package/build/server/chunks/1-5c251174.js +9 -0
  115. package/build/server/chunks/1-5c251174.js.map +1 -0
  116. package/build/server/chunks/10-f6f67083.js +133 -0
  117. package/build/server/chunks/10-f6f67083.js.map +1 -0
  118. package/build/server/chunks/11-1055c6c2.js +9 -0
  119. package/build/server/chunks/11-1055c6c2.js.map +1 -0
  120. package/build/server/chunks/12-fb53c717.js +9 -0
  121. package/build/server/chunks/12-fb53c717.js.map +1 -0
  122. package/build/server/chunks/13-7237c6c6.js +85 -0
  123. package/build/server/chunks/13-7237c6c6.js.map +1 -0
  124. package/build/server/chunks/14-6241604d.js +9 -0
  125. package/build/server/chunks/14-6241604d.js.map +1 -0
  126. package/build/server/chunks/2-bd870b05.js +9 -0
  127. package/build/server/chunks/2-bd870b05.js.map +1 -0
  128. package/build/server/chunks/3-255408ab.js +57 -0
  129. package/build/server/chunks/3-255408ab.js.map +1 -0
  130. package/build/server/chunks/4-99742ef4.js +57 -0
  131. package/build/server/chunks/4-99742ef4.js.map +1 -0
  132. package/build/server/chunks/5-369c06ab.js +19 -0
  133. package/build/server/chunks/5-369c06ab.js.map +1 -0
  134. package/build/server/chunks/6-fc810a9f.js +57 -0
  135. package/build/server/chunks/6-fc810a9f.js.map +1 -0
  136. package/build/server/chunks/7-992dd8b0.js +57 -0
  137. package/build/server/chunks/7-992dd8b0.js.map +1 -0
  138. package/build/server/chunks/8-a92e2ef7.js +454 -0
  139. package/build/server/chunks/8-a92e2ef7.js.map +1 -0
  140. package/build/server/chunks/9-55cb67b6.js +59 -0
  141. package/build/server/chunks/9-55cb67b6.js.map +1 -0
  142. package/build/server/chunks/_error.svelte-dd890063.js +13 -0
  143. package/build/server/chunks/_error.svelte-dd890063.js.map +1 -0
  144. package/build/server/chunks/_layout.svelte-9a1c428f.js +37 -0
  145. package/build/server/chunks/_layout.svelte-9a1c428f.js.map +1 -0
  146. package/build/server/chunks/_layout.svelte-bed2b2d4.js +39 -0
  147. package/build/server/chunks/_layout.svelte-bed2b2d4.js.map +1 -0
  148. package/build/server/chunks/_page.svelte-2f290f09.js +30 -0
  149. package/build/server/chunks/_page.svelte-2f290f09.js.map +1 -0
  150. package/build/server/chunks/_page.svelte-33789d2d.js +36 -0
  151. package/build/server/chunks/_page.svelte-33789d2d.js.map +1 -0
  152. package/build/server/chunks/_page.svelte-5bb56058.js +41 -0
  153. package/build/server/chunks/_page.svelte-5bb56058.js.map +1 -0
  154. package/build/server/chunks/_page.svelte-701b9558.js +284 -0
  155. package/build/server/chunks/_page.svelte-701b9558.js.map +1 -0
  156. package/build/server/chunks/_page.svelte-7848979a.js +396 -0
  157. package/build/server/chunks/_page.svelte-7848979a.js.map +1 -0
  158. package/build/server/chunks/_page.svelte-7a8514c3.js +37 -0
  159. package/build/server/chunks/_page.svelte-7a8514c3.js.map +1 -0
  160. package/build/server/chunks/_page.svelte-9ea0ef4c.js +120 -0
  161. package/build/server/chunks/_page.svelte-9ea0ef4c.js.map +1 -0
  162. package/build/server/chunks/_page.svelte-a1e80515.js +30 -0
  163. package/build/server/chunks/_page.svelte-a1e80515.js.map +1 -0
  164. package/build/server/chunks/_page.svelte-cf45c2db.js +124 -0
  165. package/build/server/chunks/_page.svelte-cf45c2db.js.map +1 -0
  166. package/build/server/chunks/_page.svelte-dcbbe643.js +56 -0
  167. package/build/server/chunks/_page.svelte-dcbbe643.js.map +1 -0
  168. package/build/server/chunks/_page.svelte-f4064b9c.js +30 -0
  169. package/build/server/chunks/_page.svelte-f4064b9c.js.map +1 -0
  170. package/build/server/chunks/_server.ts-93a1fbab.js +354 -0
  171. package/build/server/chunks/_server.ts-93a1fbab.js.map +1 -0
  172. package/build/server/chunks/_server.ts-dec04c7b.js +12 -0
  173. package/build/server/chunks/_server.ts-dec04c7b.js.map +1 -0
  174. package/build/server/chunks/configuration-d033c4d1.js +48 -0
  175. package/build/server/chunks/configuration-d033c4d1.js.map +1 -0
  176. package/build/server/chunks/example-query-99034259.js +39 -0
  177. package/build/server/chunks/example-query-99034259.js.map +1 -0
  178. package/build/server/chunks/hooks.server-cb019385.js +32 -0
  179. package/build/server/chunks/hooks.server-cb019385.js.map +1 -0
  180. package/build/server/chunks/index-64aa7a5e.js +84 -0
  181. package/build/server/chunks/index-64aa7a5e.js.map +1 -0
  182. package/build/server/chunks/index2-7c17b4da.js +100 -0
  183. package/build/server/chunks/index2-7c17b4da.js.map +1 -0
  184. package/build/server/chunks/input-colors-c9063ebd.js +15 -0
  185. package/build/server/chunks/input-colors-c9063ebd.js.map +1 -0
  186. package/build/server/chunks/integer-input-9f57bf61.js +40 -0
  187. package/build/server/chunks/integer-input-9f57bf61.js.map +1 -0
  188. package/build/server/chunks/lifecycle-cbdd95e4.js +84 -0
  189. package/build/server/chunks/lifecycle-cbdd95e4.js.map +1 -0
  190. package/build/server/chunks/link-fded4b17.js +11 -0
  191. package/build/server/chunks/link-fded4b17.js.map +1 -0
  192. package/build/server/chunks/metrics-a6a74309.js +43 -0
  193. package/build/server/chunks/metrics-a6a74309.js.map +1 -0
  194. package/build/server/chunks/navigation-a410b94d.js +22 -0
  195. package/build/server/chunks/navigation-a410b94d.js.map +1 -0
  196. package/build/server/chunks/preferences-304b2e02.js +84 -0
  197. package/build/server/chunks/preferences-304b2e02.js.map +1 -0
  198. package/build/server/chunks/regexp-5017d573.js +4 -0
  199. package/build/server/chunks/regexp-5017d573.js.map +1 -0
  200. package/build/server/chunks/ssr-0f259a0f.js +195 -0
  201. package/build/server/chunks/ssr-0f259a0f.js.map +1 -0
  202. package/build/server/chunks/stores-2f0685cf.js +32 -0
  203. package/build/server/chunks/stores-2f0685cf.js.map +1 -0
  204. package/build/server/chunks/toggle-search-type-6ced5306.js +106 -0
  205. package/build/server/chunks/toggle-search-type-6ced5306.js.map +1 -0
  206. package/build/server/chunks/zoekt-client-dec73ec9.js +26 -0
  207. package/build/server/chunks/zoekt-client-dec73ec9.js.map +1 -0
  208. package/build/server/chunks/zoekt-list-repositories-773bcddb.js +100 -0
  209. package/build/server/chunks/zoekt-list-repositories-773bcddb.js.map +1 -0
  210. package/build/server/index.js +4070 -0
  211. package/build/server/index.js.map +1 -0
  212. package/build/server/manifest.js +142 -0
  213. package/build/server/manifest.js.map +1 -0
  214. package/build/shims.js +0 -0
  215. package/main.js +91 -0
  216. package/package.json +64 -0
package/build/index.js ADDED
@@ -0,0 +1,225 @@
1
+ import { handler } from './handler.js';
2
+ import { env } from './env.js';
3
+ import http from 'http';
4
+ import * as qs from 'querystring';
5
+
6
+ function parse$1 (str, loose) {
7
+ if (str instanceof RegExp) return { keys:false, pattern:str };
8
+ var c, o, tmp, ext, keys=[], pattern='', arr = str.split('/');
9
+ arr[0] || arr.shift();
10
+
11
+ while (tmp = arr.shift()) {
12
+ c = tmp[0];
13
+ if (c === '*') {
14
+ keys.push('wild');
15
+ pattern += '/(.*)';
16
+ } else if (c === ':') {
17
+ o = tmp.indexOf('?', 1);
18
+ ext = tmp.indexOf('.', 1);
19
+ keys.push( tmp.substring(1, !!~o ? o : !!~ext ? ext : tmp.length) );
20
+ pattern += !!~o && !~ext ? '(?:/([^/]+?))?' : '/([^/]+?)';
21
+ if (!!~ext) pattern += (!!~o ? '?' : '') + '\\' + tmp.substring(ext);
22
+ } else {
23
+ pattern += '/' + tmp;
24
+ }
25
+ }
26
+
27
+ return {
28
+ keys: keys,
29
+ pattern: new RegExp('^' + pattern + (loose ? '(?=$|\/)' : '\/?$'), 'i')
30
+ };
31
+ }
32
+
33
+ class Trouter {
34
+ constructor() {
35
+ this.routes = [];
36
+
37
+ this.all = this.add.bind(this, '');
38
+ this.get = this.add.bind(this, 'GET');
39
+ this.head = this.add.bind(this, 'HEAD');
40
+ this.patch = this.add.bind(this, 'PATCH');
41
+ this.options = this.add.bind(this, 'OPTIONS');
42
+ this.connect = this.add.bind(this, 'CONNECT');
43
+ this.delete = this.add.bind(this, 'DELETE');
44
+ this.trace = this.add.bind(this, 'TRACE');
45
+ this.post = this.add.bind(this, 'POST');
46
+ this.put = this.add.bind(this, 'PUT');
47
+ }
48
+
49
+ use(route, ...fns) {
50
+ let handlers = [].concat.apply([], fns);
51
+ let { keys, pattern } = parse$1(route, true);
52
+ this.routes.push({ keys, pattern, method:'', handlers });
53
+ return this;
54
+ }
55
+
56
+ add(method, route, ...fns) {
57
+ let { keys, pattern } = parse$1(route);
58
+ let handlers = [].concat.apply([], fns);
59
+ this.routes.push({ keys, pattern, method, handlers });
60
+ return this;
61
+ }
62
+
63
+ find(method, url) {
64
+ let isHEAD=(method === 'HEAD');
65
+ let i=0, j=0, k, tmp, arr=this.routes;
66
+ let matches=[], params={}, handlers=[];
67
+ for (; i < arr.length; i++) {
68
+ tmp = arr[i];
69
+ if (tmp.method.length === 0 || tmp.method === method || isHEAD && tmp.method === 'GET') {
70
+ if (tmp.keys === false) {
71
+ matches = tmp.pattern.exec(url);
72
+ if (matches === null) continue;
73
+ if (matches.groups !== void 0) for (k in matches.groups) params[k]=matches.groups[k];
74
+ tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]);
75
+ } else if (tmp.keys.length > 0) {
76
+ matches = tmp.pattern.exec(url);
77
+ if (matches === null) continue;
78
+ for (j=0; j < tmp.keys.length;) params[tmp.keys[j]]=matches[++j];
79
+ tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]);
80
+ } else if (tmp.pattern.test(url)) {
81
+ tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]);
82
+ }
83
+ } // else not a match
84
+ }
85
+
86
+ return { params, handlers };
87
+ }
88
+ }
89
+
90
+ /**
91
+ * @typedef ParsedURL
92
+ * @type {import('.').ParsedURL}
93
+ */
94
+
95
+ /**
96
+ * @typedef Request
97
+ * @property {string} url
98
+ * @property {ParsedURL} _parsedUrl
99
+ */
100
+
101
+ /**
102
+ * @param {Request} req
103
+ * @returns {ParsedURL|void}
104
+ */
105
+ function parse(req) {
106
+ let raw = req.url;
107
+ if (raw == null) return;
108
+
109
+ let prev = req._parsedUrl;
110
+ if (prev && prev.raw === raw) return prev;
111
+
112
+ let pathname=raw, search='', query;
113
+
114
+ if (raw.length > 1) {
115
+ let idx = raw.indexOf('?', 1);
116
+
117
+ if (idx !== -1) {
118
+ search = raw.substring(idx);
119
+ pathname = raw.substring(0, idx);
120
+ if (search.length > 1) {
121
+ query = qs.parse(search.substring(1));
122
+ }
123
+ }
124
+ }
125
+
126
+ return req._parsedUrl = { pathname, search, query, raw };
127
+ }
128
+
129
+ function onError(err, req, res) {
130
+ let code = typeof err.status === 'number' && err.status;
131
+ code = res.statusCode = (code && code >= 100 ? code : 500);
132
+ if (typeof err === 'string' || Buffer.isBuffer(err)) res.end(err);
133
+ else res.end(err.message || http.STATUS_CODES[code]);
134
+ }
135
+
136
+ const mount = fn => fn instanceof Polka ? fn.attach : fn;
137
+
138
+ class Polka extends Trouter {
139
+ constructor(opts={}) {
140
+ super();
141
+ this.parse = parse;
142
+ this.server = opts.server;
143
+ this.handler = this.handler.bind(this);
144
+ this.onError = opts.onError || onError; // catch-all handler
145
+ this.onNoMatch = opts.onNoMatch || this.onError.bind(null, { status: 404 });
146
+ this.attach = (req, res) => setImmediate(this.handler, req, res);
147
+ }
148
+
149
+ use(base, ...fns) {
150
+ if (base === '/') {
151
+ super.use(base, fns.map(mount));
152
+ } else if (typeof base === 'function' || base instanceof Polka) {
153
+ super.use('/', [base, ...fns].map(mount));
154
+ } else {
155
+ super.use(base,
156
+ (req, _, next) => {
157
+ if (typeof base === 'string') {
158
+ let len = base.length;
159
+ base.startsWith('/') || len++;
160
+ req.url = req.url.substring(len) || '/';
161
+ req.path = req.path.substring(len) || '/';
162
+ } else {
163
+ req.url = req.url.replace(base, '') || '/';
164
+ req.path = req.path.replace(base, '') || '/';
165
+ }
166
+ if (req.url.charAt(0) !== '/') {
167
+ req.url = '/' + req.url;
168
+ }
169
+ next();
170
+ },
171
+ fns.map(mount),
172
+ (req, _, next) => {
173
+ req.path = req._parsedUrl.pathname;
174
+ req.url = req.path + req._parsedUrl.search;
175
+ next();
176
+ }
177
+ );
178
+ }
179
+ return this; // chainable
180
+ }
181
+
182
+ listen() {
183
+ (this.server = this.server || http.createServer()).on('request', this.attach);
184
+ this.server.listen.apply(this.server, arguments);
185
+ return this;
186
+ }
187
+
188
+ handler(req, res, next) {
189
+ let info = this.parse(req), path = info.pathname;
190
+ let obj = this.find(req.method, req.path=path);
191
+
192
+ req.url = path + info.search;
193
+ req.originalUrl = req.originalUrl || req.url;
194
+ req.query = info.query || {};
195
+ req.search = info.search;
196
+ req.params = obj.params;
197
+
198
+ if (path.length > 1 && path.indexOf('%', 1) !== -1) {
199
+ for (let k in req.params) {
200
+ try { req.params[k] = decodeURIComponent(req.params[k]); }
201
+ catch (e) { /* malform uri segment */ }
202
+ }
203
+ }
204
+
205
+ let i=0, arr=obj.handlers.concat(this.onNoMatch), len=arr.length;
206
+ let loop = async () => res.finished || (i < len) && arr[i++](req, res, next);
207
+ (next = next || (err => err ? this.onError(err, req, res, next) : loop().catch(next)))(); // init
208
+ }
209
+ }
210
+
211
+ function polka (opts) {
212
+ return new Polka(opts);
213
+ }
214
+
215
+ const path = env('SOCKET_PATH', false);
216
+ const host = env('HOST', '0.0.0.0');
217
+ const port = env('PORT', !path && '3000');
218
+
219
+ const server = polka().use(handler);
220
+
221
+ server.listen({ path, host, port }, () => {
222
+ console.log(`Listening on ${path ? path : host + ':' + port}`);
223
+ });
224
+
225
+ export { host, path, port, server };
@@ -0,0 +1,27 @@
1
+ import { l as loadPreferences } from './preferences-304b2e02.js';
2
+ import './lifecycle-cbdd95e4.js';
3
+ import './index2-7c17b4da.js';
4
+
5
+ const load = ({ cookies }) => {
6
+ return {
7
+ // While not all pages need preferences, most do. It's easiest to just make
8
+ // them ubiquitously available.
9
+ preferences: loadPreferences(cookies)
10
+ };
11
+ };
12
+
13
+ var _layout_server_ts = /*#__PURE__*/Object.freeze({
14
+ __proto__: null,
15
+ load: load
16
+ });
17
+
18
+ const index = 0;
19
+ let component_cache;
20
+ const component = async () => component_cache ??= (await import('./_layout.svelte-9a1c428f.js')).default;
21
+ const server_id = "src/routes/+layout.server.ts";
22
+ const imports = ["_app/immutable/nodes/0.529467ca.js","_app/immutable/chunks/scheduler.80902d3b.js","_app/immutable/chunks/index.d0e6da70.js","_app/immutable/chunks/each.ece37974.js","_app/immutable/chunks/stores.a4da01c2.js","_app/immutable/chunks/singletons.a17b5cab.js","_app/immutable/chunks/index.81a0017d.js","_app/immutable/chunks/preferences.e389d16d.js"];
23
+ const stylesheets = ["_app/immutable/assets/0.5df5b886.css"];
24
+ const fonts = [];
25
+
26
+ export { component, fonts, imports, index, _layout_server_ts as server, server_id, stylesheets };
27
+ //# sourceMappingURL=0-040b7d6d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"0-040b7d6d.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/_layout.server.ts.js","../../../.svelte-kit/adapter-node/nodes/0.js"],"sourcesContent":["import { l as loadPreferences } from \"../../chunks/preferences.js\";\nconst load = ({ cookies }) => {\n return {\n // While not all pages need preferences, most do. It's easiest to just make\n // them ubiquitously available.\n preferences: loadPreferences(cookies)\n };\n};\nexport {\n load\n};\n","import * as server from '../entries/pages/_layout.server.ts.js';\n\nexport const index = 0;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/_layout.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/+layout.server.ts\";\nexport const imports = [\"_app/immutable/nodes/0.529467ca.js\",\"_app/immutable/chunks/scheduler.80902d3b.js\",\"_app/immutable/chunks/index.d0e6da70.js\",\"_app/immutable/chunks/each.ece37974.js\",\"_app/immutable/chunks/stores.a4da01c2.js\",\"_app/immutable/chunks/singletons.a17b5cab.js\",\"_app/immutable/chunks/index.81a0017d.js\",\"_app/immutable/chunks/preferences.e389d16d.js\"];\nexport const stylesheets = [\"_app/immutable/assets/0.5df5b886.css\"];\nexport const fonts = [];\n"],"names":[],"mappings":";;;;AACA,MAAM,IAAI,GAAG,CAAC,EAAE,OAAO,EAAE,KAAK;AAC9B,EAAE,OAAO;AACT;AACA;AACA,IAAI,WAAW,EAAE,eAAe,CAAC,OAAO,CAAC;AACzC,GAAG,CAAC;AACJ,CAAC;;;;;;;ACLW,MAAC,KAAK,GAAG,EAAE;AACvB,IAAI,eAAe,CAAC;AACR,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,8BAAoC,CAAC,EAAE,QAAQ;AAE1G,MAAC,SAAS,GAAG,+BAA+B;AAC5C,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,6CAA6C,CAAC,yCAAyC,CAAC,wCAAwC,CAAC,0CAA0C,CAAC,8CAA8C,CAAC,yCAAyC,CAAC,+CAA+C,EAAE;AACvW,MAAC,WAAW,GAAG,CAAC,sCAAsC,EAAE;AACxD,MAAC,KAAK,GAAG;;;;"}
@@ -0,0 +1,9 @@
1
+ const index = 1;
2
+ let component_cache;
3
+ const component = async () => component_cache ??= (await import('./_error.svelte-dd890063.js')).default;
4
+ const imports = ["_app/immutable/nodes/1.abd8d795.js","_app/immutable/chunks/scheduler.80902d3b.js","_app/immutable/chunks/index.d0e6da70.js","_app/immutable/chunks/stores.a4da01c2.js","_app/immutable/chunks/singletons.a17b5cab.js","_app/immutable/chunks/index.81a0017d.js"];
5
+ const stylesheets = [];
6
+ const fonts = [];
7
+
8
+ export { component, fonts, imports, index, stylesheets };
9
+ //# sourceMappingURL=1-5c251174.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1-5c251174.js","sources":["../../../.svelte-kit/adapter-node/nodes/1.js"],"sourcesContent":["\n\nexport const index = 1;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/_error.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/1.abd8d795.js\",\"_app/immutable/chunks/scheduler.80902d3b.js\",\"_app/immutable/chunks/index.d0e6da70.js\",\"_app/immutable/chunks/stores.a4da01c2.js\",\"_app/immutable/chunks/singletons.a17b5cab.js\",\"_app/immutable/chunks/index.81a0017d.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG,EAAE;AACvB,IAAI,eAAe,CAAC;AACR,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,6BAAmC,CAAC,EAAE,QAAQ;AACzG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,6CAA6C,CAAC,yCAAyC,CAAC,0CAA0C,CAAC,8CAA8C,CAAC,yCAAyC,EAAE;AAC9Q,MAAC,WAAW,GAAG,GAAG;AAClB,MAAC,KAAK,GAAG;;;;"}
@@ -0,0 +1,133 @@
1
+ import { d as derived } from './index2-7c17b4da.js';
2
+ import { p as page, n as navigating } from './stores-2f0685cf.js';
3
+ import { g as goto } from './navigation-a410b94d.js';
4
+ import { g as get_store_value } from './lifecycle-cbdd95e4.js';
5
+
6
+ const defaultQueryOptions = Object.freeze({
7
+ contextLines: 1,
8
+ files: 20,
9
+ matches: 500
10
+ });
11
+ const parseSearchParams = (searchParams) => {
12
+ const parsedContextLines = Number.parseInt(
13
+ searchParams.get("contextLines") ?? "",
14
+ 10
15
+ );
16
+ const parsedFiles = Number.parseInt(searchParams.get("files") ?? "", 10);
17
+ const parsedMatches = Number.parseInt(searchParams.get("matches") ?? "", 10);
18
+ const query = searchParams.get("q") || void 0;
19
+ const contextLines = parsedContextLines >= 0 ? parsedContextLines : defaultQueryOptions.contextLines;
20
+ const files = parsedFiles > 0 ? parsedFiles : defaultQueryOptions.files;
21
+ const matches = parsedMatches >= 0 ? parsedMatches : defaultQueryOptions.matches;
22
+ return {
23
+ query,
24
+ contextLines,
25
+ files,
26
+ matches
27
+ };
28
+ };
29
+ const routeSearchQuery = derived(
30
+ page,
31
+ (p) => parseSearchParams(p.url.searchParams)
32
+ );
33
+ let lastNavigateTime = 0;
34
+ const updateRouteSearchQuery = ({
35
+ query,
36
+ contextLines,
37
+ files,
38
+ matches,
39
+ searchType
40
+ }) => {
41
+ const baselineUrl = get_store_value(navigating)?.to?.url ?? get_store_value(page).url;
42
+ const searchQuery = parseSearchParams(baselineUrl.searchParams);
43
+ const queryChanged = query !== void 0 && (query || void 0) !== searchQuery.query;
44
+ const contextLinesChanged = contextLines !== void 0 && contextLines >= 0 && contextLines !== searchQuery.contextLines;
45
+ const filesChanged = files !== void 0 && files >= 0 && files !== searchQuery.files;
46
+ const matchesChanged = matches !== void 0 && matches >= 0 && matches !== searchQuery.matches;
47
+ if (queryChanged || contextLinesChanged || filesChanged || matchesChanged) {
48
+ const now = Date.now();
49
+ const next = new URL(baselineUrl);
50
+ if (queryChanged && query) {
51
+ next.searchParams.set("q", query);
52
+ } else if (queryChanged) {
53
+ next.searchParams.delete("q");
54
+ }
55
+ if (contextLinesChanged && contextLines === defaultQueryOptions.contextLines) {
56
+ next.searchParams.delete("contextLines");
57
+ } else if (contextLinesChanged) {
58
+ next.searchParams.set("contextLines", contextLines.toString());
59
+ }
60
+ if (filesChanged && files === defaultQueryOptions.files) {
61
+ next.searchParams.delete("files");
62
+ } else if (filesChanged) {
63
+ next.searchParams.set("files", files.toString());
64
+ }
65
+ if (matchesChanged && matches === defaultQueryOptions.matches) {
66
+ next.searchParams.delete("matches");
67
+ } else if (matchesChanged) {
68
+ next.searchParams.set("matches", matches.toString());
69
+ }
70
+ goto(next, {
71
+ replaceState: searchType === "live" && now - lastNavigateTime < 2e3,
72
+ keepFocus: true,
73
+ noScroll: true
74
+ });
75
+ lastNavigateTime = now;
76
+ }
77
+ };
78
+
79
+ const load = async ({ url, fetch }) => ({
80
+ searchOutcome: await executeSearch(url, fetch)
81
+ });
82
+ const executeSearch = async (url, f) => {
83
+ const { query, ...rest } = parseSearchParams(new URL(url).searchParams);
84
+ if (query === void 0) {
85
+ return { kind: "none" };
86
+ }
87
+ try {
88
+ const response = await f("/api/search", {
89
+ method: "POST",
90
+ body: JSON.stringify({ query, ...rest }),
91
+ headers: { "content-type": "application/json" }
92
+ });
93
+ const searchResponse = await response.json();
94
+ if (searchResponse.kind === "success") {
95
+ return {
96
+ kind: "success",
97
+ results: searchResponse.results
98
+ };
99
+ } else {
100
+ return searchResponse;
101
+ }
102
+ } catch (error) {
103
+ console.error("Search failed", error);
104
+ return { kind: "error", error: String(error) };
105
+ }
106
+ };
107
+
108
+ var _page_ts = /*#__PURE__*/Object.freeze({
109
+ __proto__: null,
110
+ load: load
111
+ });
112
+
113
+ const index = 10;
114
+ let component_cache;
115
+ const component = async () => component_cache ??= (await import('./_page.svelte-7848979a.js')).default;
116
+ const universal_id = "src/routes/(search-page)/+page.ts";
117
+ const imports = ["_app/immutable/nodes/10.28836ccc.js","_app/immutable/chunks/index.81a0017d.js","_app/immutable/chunks/scheduler.80902d3b.js","_app/immutable/chunks/stores.a4da01c2.js","_app/immutable/chunks/singletons.a17b5cab.js","_app/immutable/chunks/toggle-search-type.f1a3061d.js","_app/immutable/chunks/index.d0e6da70.js","_app/immutable/chunks/preferences.e389d16d.js","_app/immutable/chunks/each.ece37974.js","_app/immutable/chunks/integer-input.e86d05ad.js","_app/immutable/chunks/input-colors.e7674f0c.js","_app/immutable/chunks/link.70630bff.js","_app/immutable/chunks/example-query.ac8ef50a.js"];
118
+ const stylesheets = [];
119
+ const fonts = [];
120
+
121
+ var _10 = /*#__PURE__*/Object.freeze({
122
+ __proto__: null,
123
+ component: component,
124
+ fonts: fonts,
125
+ imports: imports,
126
+ index: index,
127
+ stylesheets: stylesheets,
128
+ universal: _page_ts,
129
+ universal_id: universal_id
130
+ });
131
+
132
+ export { _10 as _, routeSearchQuery as r, updateRouteSearchQuery as u };
133
+ //# sourceMappingURL=10-f6f67083.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"10-f6f67083.js","sources":["../../../.svelte-kit/adapter-node/chunks/route-search-query.js","../../../.svelte-kit/adapter-node/entries/pages/(search-page)/_page.ts.js","../../../.svelte-kit/adapter-node/nodes/10.js"],"sourcesContent":["import { d as derived } from \"./index2.js\";\nimport { p as page, n as navigating } from \"./stores.js\";\nimport { g as goto } from \"./navigation.js\";\nimport { g as get_store_value } from \"./lifecycle.js\";\nconst defaultQueryOptions = Object.freeze({\n contextLines: 1,\n files: 20,\n matches: 500\n});\nconst parseSearchParams = (searchParams) => {\n const parsedContextLines = Number.parseInt(\n searchParams.get(\"contextLines\") ?? \"\",\n 10\n );\n const parsedFiles = Number.parseInt(searchParams.get(\"files\") ?? \"\", 10);\n const parsedMatches = Number.parseInt(searchParams.get(\"matches\") ?? \"\", 10);\n const query = searchParams.get(\"q\") || void 0;\n const contextLines = parsedContextLines >= 0 ? parsedContextLines : defaultQueryOptions.contextLines;\n const files = parsedFiles > 0 ? parsedFiles : defaultQueryOptions.files;\n const matches = parsedMatches >= 0 ? parsedMatches : defaultQueryOptions.matches;\n return {\n query,\n contextLines,\n files,\n matches\n };\n};\nconst routeSearchQuery = derived(\n page,\n (p) => parseSearchParams(p.url.searchParams)\n);\nlet lastNavigateTime = 0;\nconst updateRouteSearchQuery = ({\n query,\n contextLines,\n files,\n matches,\n searchType\n}) => {\n const baselineUrl = get_store_value(navigating)?.to?.url ?? get_store_value(page).url;\n const searchQuery = parseSearchParams(baselineUrl.searchParams);\n const queryChanged = query !== void 0 && (query || void 0) !== searchQuery.query;\n const contextLinesChanged = contextLines !== void 0 && contextLines >= 0 && contextLines !== searchQuery.contextLines;\n const filesChanged = files !== void 0 && files >= 0 && files !== searchQuery.files;\n const matchesChanged = matches !== void 0 && matches >= 0 && matches !== searchQuery.matches;\n if (queryChanged || contextLinesChanged || filesChanged || matchesChanged) {\n const now = Date.now();\n const next = new URL(baselineUrl);\n if (queryChanged && query) {\n next.searchParams.set(\"q\", query);\n } else if (queryChanged) {\n next.searchParams.delete(\"q\");\n }\n if (contextLinesChanged && contextLines === defaultQueryOptions.contextLines) {\n next.searchParams.delete(\"contextLines\");\n } else if (contextLinesChanged) {\n next.searchParams.set(\"contextLines\", contextLines.toString());\n }\n if (filesChanged && files === defaultQueryOptions.files) {\n next.searchParams.delete(\"files\");\n } else if (filesChanged) {\n next.searchParams.set(\"files\", files.toString());\n }\n if (matchesChanged && matches === defaultQueryOptions.matches) {\n next.searchParams.delete(\"matches\");\n } else if (matchesChanged) {\n next.searchParams.set(\"matches\", matches.toString());\n }\n goto(next, {\n replaceState: searchType === \"live\" && now - lastNavigateTime < 2e3,\n keepFocus: true,\n noScroll: true\n });\n lastNavigateTime = now;\n }\n};\nexport {\n parseSearchParams as p,\n routeSearchQuery as r,\n updateRouteSearchQuery as u\n};\n","import { p as parseSearchParams } from \"../../../chunks/route-search-query.js\";\nconst load = async ({ url, fetch }) => ({\n searchOutcome: await executeSearch(url, fetch)\n});\nconst executeSearch = async (url, f) => {\n const { query, ...rest } = parseSearchParams(new URL(url).searchParams);\n if (query === void 0) {\n return { kind: \"none\" };\n }\n try {\n const response = await f(\"/api/search\", {\n method: \"POST\",\n body: JSON.stringify({ query, ...rest }),\n headers: { \"content-type\": \"application/json\" }\n });\n const searchResponse = await response.json();\n if (searchResponse.kind === \"success\") {\n return {\n kind: \"success\",\n results: searchResponse.results\n };\n } else {\n return searchResponse;\n }\n } catch (error) {\n console.error(\"Search failed\", error);\n return { kind: \"error\", error: String(error) };\n }\n};\nexport {\n load\n};\n","import * as universal from '../entries/pages/(search-page)/_page.ts.js';\n\nexport const index = 10;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/(search-page)/_page.svelte.js')).default;\nexport { universal };\nexport const universal_id = \"src/routes/(search-page)/+page.ts\";\nexport const imports = [\"_app/immutable/nodes/10.28836ccc.js\",\"_app/immutable/chunks/index.81a0017d.js\",\"_app/immutable/chunks/scheduler.80902d3b.js\",\"_app/immutable/chunks/stores.a4da01c2.js\",\"_app/immutable/chunks/singletons.a17b5cab.js\",\"_app/immutable/chunks/toggle-search-type.f1a3061d.js\",\"_app/immutable/chunks/index.d0e6da70.js\",\"_app/immutable/chunks/preferences.e389d16d.js\",\"_app/immutable/chunks/each.ece37974.js\",\"_app/immutable/chunks/integer-input.e86d05ad.js\",\"_app/immutable/chunks/input-colors.e7674f0c.js\",\"_app/immutable/chunks/link.70630bff.js\",\"_app/immutable/chunks/example-query.ac8ef50a.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":";;;;;AAIA,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC;AAC1C,EAAE,YAAY,EAAE,CAAC;AACjB,EAAE,KAAK,EAAE,EAAE;AACX,EAAE,OAAO,EAAE,GAAG;AACd,CAAC,CAAC,CAAC;AACH,MAAM,iBAAiB,GAAG,CAAC,YAAY,KAAK;AAC5C,EAAE,MAAM,kBAAkB,GAAG,MAAM,CAAC,QAAQ;AAC5C,IAAI,YAAY,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,EAAE;AAC1C,IAAI,EAAE;AACN,GAAG,CAAC;AACJ,EAAE,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;AAC3E,EAAE,MAAM,aAAa,GAAG,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;AAC/E,EAAE,MAAM,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC;AAChD,EAAE,MAAM,YAAY,GAAG,kBAAkB,IAAI,CAAC,GAAG,kBAAkB,GAAG,mBAAmB,CAAC,YAAY,CAAC;AACvG,EAAE,MAAM,KAAK,GAAG,WAAW,GAAG,CAAC,GAAG,WAAW,GAAG,mBAAmB,CAAC,KAAK,CAAC;AAC1E,EAAE,MAAM,OAAO,GAAG,aAAa,IAAI,CAAC,GAAG,aAAa,GAAG,mBAAmB,CAAC,OAAO,CAAC;AACnF,EAAE,OAAO;AACT,IAAI,KAAK;AACT,IAAI,YAAY;AAChB,IAAI,KAAK;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AAE,KAAK,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AACnD,GAAG;AACH,CAAC;;;;;;;AC1BM,MAAM,KAAK,GAAG,EAAE,CAAC;AACxB,IAAI,eAAe,CAAC;AACb,MAAM,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAgD,CAAC,EAAE,OAAO,CAAC;AAE3H,MAAM,YAAY,GAAG,mCAAmC,CAAC;AACzD,MAAM,OAAO,GAAG,CAAC,qCAAqC,CAAC,yCAAyC,CAAC,6CAA6C,CAAC,0CAA0C,CAAC,8CAA8C,CAAC,sDAAsD,CAAC,yCAAyC,CAAC,+CAA+C,CAAC,wCAAwC,CAAC,iDAAiD,CAAC,gDAAgD,CAAC,wCAAwC,CAAC,iDAAiD,CAAC,CAAC;AAClmB,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,MAAM,KAAK,GAAG,EAAE;;;;;;;;;;;;;;;"}
@@ -0,0 +1,9 @@
1
+ const index = 11;
2
+ let component_cache;
3
+ const component = async () => component_cache ??= (await import('./_page.svelte-5bb56058.js')).default;
4
+ const imports = ["_app/immutable/nodes/11.93ac6006.js","_app/immutable/chunks/scheduler.80902d3b.js","_app/immutable/chunks/index.d0e6da70.js","_app/immutable/chunks/link.70630bff.js"];
5
+ const stylesheets = [];
6
+ const fonts = [];
7
+
8
+ export { component, fonts, imports, index, stylesheets };
9
+ //# sourceMappingURL=11-1055c6c2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"11-1055c6c2.js","sources":["../../../.svelte-kit/adapter-node/nodes/11.js"],"sourcesContent":["\n\nexport const index = 11;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/about/_page.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/11.93ac6006.js\",\"_app/immutable/chunks/scheduler.80902d3b.js\",\"_app/immutable/chunks/index.d0e6da70.js\",\"_app/immutable/chunks/link.70630bff.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG,GAAG;AACxB,IAAI,eAAe,CAAC;AACR,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAwC,CAAC,EAAE,QAAQ;AAC9G,MAAC,OAAO,GAAG,CAAC,qCAAqC,CAAC,6CAA6C,CAAC,yCAAyC,CAAC,wCAAwC,EAAE;AACpL,MAAC,WAAW,GAAG,GAAG;AAClB,MAAC,KAAK,GAAG;;;;"}
@@ -0,0 +1,9 @@
1
+ const index = 12;
2
+ let component_cache;
3
+ const component = async () => component_cache ??= (await import('./_page.svelte-dcbbe643.js')).default;
4
+ const imports = ["_app/immutable/nodes/12.67089c6b.js","_app/immutable/chunks/scheduler.80902d3b.js","_app/immutable/chunks/index.d0e6da70.js","_app/immutable/chunks/preferences.e389d16d.js","_app/immutable/chunks/index.81a0017d.js","_app/immutable/chunks/integer-input.e86d05ad.js","_app/immutable/chunks/input-colors.e7674f0c.js"];
5
+ const stylesheets = [];
6
+ const fonts = [];
7
+
8
+ export { component, fonts, imports, index, stylesheets };
9
+ //# sourceMappingURL=12-fb53c717.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"12-fb53c717.js","sources":["../../../.svelte-kit/adapter-node/nodes/12.js"],"sourcesContent":["\n\nexport const index = 12;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/preferences/_page.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/12.67089c6b.js\",\"_app/immutable/chunks/scheduler.80902d3b.js\",\"_app/immutable/chunks/index.d0e6da70.js\",\"_app/immutable/chunks/preferences.e389d16d.js\",\"_app/immutable/chunks/index.81a0017d.js\",\"_app/immutable/chunks/integer-input.e86d05ad.js\",\"_app/immutable/chunks/input-colors.e7674f0c.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG,GAAG;AACxB,IAAI,eAAe,CAAC;AACR,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAA8C,CAAC,EAAE,QAAQ;AACpH,MAAC,OAAO,GAAG,CAAC,qCAAqC,CAAC,6CAA6C,CAAC,yCAAyC,CAAC,+CAA+C,CAAC,yCAAyC,CAAC,iDAAiD,CAAC,gDAAgD,EAAE;AACxU,MAAC,WAAW,GAAG,GAAG;AAClB,MAAC,KAAK,GAAG;;;;"}
@@ -0,0 +1,85 @@
1
+ import { l as listRepositories } from './zoekt-list-repositories-773bcddb.js';
2
+ import { g as goto } from './navigation-a410b94d.js';
3
+ import { p as page, n as navigating } from './stores-2f0685cf.js';
4
+ import { d as derived } from './index2-7c17b4da.js';
5
+ import { g as get_store_value } from './lifecycle-cbdd95e4.js';
6
+
7
+ const parseSearchParams = (searchParams) => ({
8
+ // coerce the empty string to undefined
9
+ query: searchParams.get("q") || void 0
10
+ });
11
+ const routeListQuery = derived(
12
+ page,
13
+ (p) => parseSearchParams(p.url.searchParams)
14
+ );
15
+ let lastNavigateTime = 0;
16
+ const updateRouteListQuery = ({
17
+ query,
18
+ searchType
19
+ }) => {
20
+ const baselineUrl = get_store_value(navigating)?.to?.url ?? get_store_value(page).url;
21
+ const listQuery = parseSearchParams(baselineUrl.searchParams);
22
+ const queryChanged = (query || void 0) !== listQuery.query;
23
+ if (queryChanged) {
24
+ const now = Date.now();
25
+ const next = new URL(baselineUrl);
26
+ if (query) {
27
+ next.searchParams.set("q", query);
28
+ } else {
29
+ next.searchParams.delete("q");
30
+ }
31
+ goto(next, {
32
+ replaceState: searchType === "live" && now - lastNavigateTime < 2e3,
33
+ keepFocus: true,
34
+ noScroll: true
35
+ });
36
+ lastNavigateTime = now;
37
+ }
38
+ };
39
+
40
+ const load = async ({
41
+ url,
42
+ fetch
43
+ }) => {
44
+ return {
45
+ listOutcome: await executeList(url, fetch)
46
+ };
47
+ };
48
+ const executeList = async (url, f) => {
49
+ const { query } = parseSearchParams(url.searchParams);
50
+ try {
51
+ return await listRepositories({ query }, f);
52
+ } catch (error) {
53
+ if (!(error && typeof error === "object" && "name" in error && error.name === "AbortError")) {
54
+ console.error("List repositories failed", error);
55
+ }
56
+ return { kind: "error", error: String(error) };
57
+ }
58
+ };
59
+
60
+ var _page_server_ts = /*#__PURE__*/Object.freeze({
61
+ __proto__: null,
62
+ load: load
63
+ });
64
+
65
+ const index = 13;
66
+ let component_cache;
67
+ const component = async () => component_cache ??= (await import('./_page.svelte-cf45c2db.js')).default;
68
+ const server_id = "src/routes/repositories/+page.server.ts";
69
+ const imports = ["_app/immutable/nodes/13.418c6178.js","_app/immutable/chunks/scheduler.80902d3b.js","_app/immutable/chunks/index.d0e6da70.js","_app/immutable/chunks/stores.a4da01c2.js","_app/immutable/chunks/singletons.a17b5cab.js","_app/immutable/chunks/index.81a0017d.js","_app/immutable/chunks/preferences.e389d16d.js","_app/immutable/chunks/input-colors.e7674f0c.js","_app/immutable/chunks/toggle-search-type.f1a3061d.js","_app/immutable/chunks/each.ece37974.js","_app/immutable/chunks/link.70630bff.js"];
70
+ const stylesheets = [];
71
+ const fonts = [];
72
+
73
+ var _13 = /*#__PURE__*/Object.freeze({
74
+ __proto__: null,
75
+ component: component,
76
+ fonts: fonts,
77
+ imports: imports,
78
+ index: index,
79
+ server: _page_server_ts,
80
+ server_id: server_id,
81
+ stylesheets: stylesheets
82
+ });
83
+
84
+ export { _13 as _, routeListQuery as r, updateRouteListQuery as u };
85
+ //# sourceMappingURL=13-7237c6c6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"13-7237c6c6.js","sources":["../../../.svelte-kit/adapter-node/chunks/route-list-query.js","../../../.svelte-kit/adapter-node/entries/pages/repositories/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/13.js"],"sourcesContent":["import { g as goto } from \"./navigation.js\";\nimport { p as page, n as navigating } from \"./stores.js\";\nimport { d as derived } from \"./index2.js\";\nimport { g as get_store_value } from \"./lifecycle.js\";\nconst parseSearchParams = (searchParams) => ({\n // coerce the empty string to undefined\n query: searchParams.get(\"q\") || void 0\n});\nconst routeListQuery = derived(\n page,\n (p) => parseSearchParams(p.url.searchParams)\n);\nlet lastNavigateTime = 0;\nconst updateRouteListQuery = ({\n query,\n searchType\n}) => {\n const baselineUrl = get_store_value(navigating)?.to?.url ?? get_store_value(page).url;\n const listQuery = parseSearchParams(baselineUrl.searchParams);\n const queryChanged = (query || void 0) !== listQuery.query;\n if (queryChanged) {\n const now = Date.now();\n const next = new URL(baselineUrl);\n if (query) {\n next.searchParams.set(\"q\", query);\n } else {\n next.searchParams.delete(\"q\");\n }\n goto(next, {\n replaceState: searchType === \"live\" && now - lastNavigateTime < 2e3,\n keepFocus: true,\n noScroll: true\n });\n lastNavigateTime = now;\n }\n};\nexport {\n parseSearchParams as p,\n routeListQuery as r,\n updateRouteListQuery as u\n};\n","import { l as listRepositories } from \"../../../chunks/zoekt-list-repositories.js\";\nimport { p as parseSearchParams } from \"../../../chunks/route-list-query.js\";\nconst load = async ({\n url,\n fetch\n}) => {\n return {\n listOutcome: await executeList(url, fetch)\n };\n};\nconst executeList = async (url, f) => {\n const { query } = parseSearchParams(url.searchParams);\n try {\n return await listRepositories({ query }, f);\n } catch (error) {\n if (!(error && typeof error === \"object\" && \"name\" in error && error.name === \"AbortError\")) {\n console.error(\"List repositories failed\", error);\n }\n return { kind: \"error\", error: String(error) };\n }\n};\nexport {\n load\n};\n","import * as server from '../entries/pages/repositories/_page.server.ts.js';\n\nexport const index = 13;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/repositories/_page.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/repositories/+page.server.ts\";\nexport const imports = [\"_app/immutable/nodes/13.418c6178.js\",\"_app/immutable/chunks/scheduler.80902d3b.js\",\"_app/immutable/chunks/index.d0e6da70.js\",\"_app/immutable/chunks/stores.a4da01c2.js\",\"_app/immutable/chunks/singletons.a17b5cab.js\",\"_app/immutable/chunks/index.81a0017d.js\",\"_app/immutable/chunks/preferences.e389d16d.js\",\"_app/immutable/chunks/input-colors.e7674f0c.js\",\"_app/immutable/chunks/toggle-search-type.f1a3061d.js\",\"_app/immutable/chunks/each.ece37974.js\",\"_app/immutable/chunks/link.70630bff.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":";;;;;;AAIA,MAAM,iBAAiB,GAAG,CAAC,YAAY,MAAM;AAC7C;AACA,EAAE,KAAK,EAAE,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC;AACxC,CAAC,CAAC,CAAC;AACE,MAAC,cAAc,GAAG,OAAO;AAC9B,EAAE,IAAI;AACN,EAAE,CAAC,CAAC,KAAK,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC;AAC9C,EAAE;AACF,IAAI,gBAAgB,GAAG,CAAC,CAAC;AACpB,MAAC,oBAAoB,GAAG,CAAC;AAC9B,EAAE,KAAK;AACP,EAAE,UAAU;AACZ,CAAC,KAAK;AACN,EAAE,MAAM,WAAW,GAAG,eAAe,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC;AACxF,EAAE,MAAM,SAAS,GAAG,iBAAiB,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;AAChE,EAAE,MAAM,YAAY,GAAG,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,SAAS,CAAC,KAAK,CAAC;AAC7D,EAAE,IAAI,YAAY,EAAE;AACpB,IAAI,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;AAC3B,IAAI,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,CAAC;AACtC,IAAI,IAAI,KAAK,EAAE;AACf,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AACxC,KAAK,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AAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAA+C,CAAC,EAAE,OAAO,CAAC;AAE1H,MAAM,SAAS,GAAG,yCAAyC,CAAC;AAC5D,MAAM,OAAO,GAAG,CAAC,qCAAqC,CAAC,6CAA6C,CAAC,yCAAyC,CAAC,0CAA0C,CAAC,8CAA8C,CAAC,yCAAyC,CAAC,+CAA+C,CAAC,gDAAgD,CAAC,sDAAsD,CAAC,wCAAwC,CAAC,wCAAwC,CAAC,CAAC;AAC9f,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,MAAM,KAAK,GAAG,EAAE;;;;;;;;;;;;;;;"}
@@ -0,0 +1,9 @@
1
+ const index = 14;
2
+ let component_cache;
3
+ const component = async () => component_cache ??= (await import('./_page.svelte-701b9558.js')).default;
4
+ const imports = ["_app/immutable/nodes/14.40bc0592.js","_app/immutable/chunks/scheduler.80902d3b.js","_app/immutable/chunks/index.d0e6da70.js","_app/immutable/chunks/link.70630bff.js","_app/immutable/chunks/example-query.ac8ef50a.js"];
5
+ const stylesheets = [];
6
+ const fonts = [];
7
+
8
+ export { component, fonts, imports, index, stylesheets };
9
+ //# sourceMappingURL=14-6241604d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"14-6241604d.js","sources":["../../../.svelte-kit/adapter-node/nodes/14.js"],"sourcesContent":["\n\nexport const index = 14;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/syntax/_page.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/14.40bc0592.js\",\"_app/immutable/chunks/scheduler.80902d3b.js\",\"_app/immutable/chunks/index.d0e6da70.js\",\"_app/immutable/chunks/link.70630bff.js\",\"_app/immutable/chunks/example-query.ac8ef50a.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG,GAAG;AACxB,IAAI,eAAe,CAAC;AACR,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAyC,CAAC,EAAE,QAAQ;AAC/G,MAAC,OAAO,GAAG,CAAC,qCAAqC,CAAC,6CAA6C,CAAC,yCAAyC,CAAC,wCAAwC,CAAC,iDAAiD,EAAE;AACtO,MAAC,WAAW,GAAG,GAAG;AAClB,MAAC,KAAK,GAAG;;;;"}
@@ -0,0 +1,9 @@
1
+ const index = 2;
2
+ let component_cache;
3
+ const component = async () => component_cache ??= (await import('./_layout.svelte-bed2b2d4.js')).default;
4
+ const imports = ["_app/immutable/nodes/2.08d89d34.js","_app/immutable/chunks/scheduler.80902d3b.js","_app/immutable/chunks/index.d0e6da70.js","_app/immutable/chunks/link.70630bff.js","_app/immutable/chunks/preferences.e389d16d.js","_app/immutable/chunks/index.81a0017d.js"];
5
+ const stylesheets = [];
6
+ const fonts = [];
7
+
8
+ export { component, fonts, imports, index, stylesheets };
9
+ //# sourceMappingURL=2-bd870b05.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"2-bd870b05.js","sources":["../../../.svelte-kit/adapter-node/nodes/2.js"],"sourcesContent":["\n\nexport const index = 2;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/(opengrok-compat)/_layout.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/2.08d89d34.js\",\"_app/immutable/chunks/scheduler.80902d3b.js\",\"_app/immutable/chunks/index.d0e6da70.js\",\"_app/immutable/chunks/link.70630bff.js\",\"_app/immutable/chunks/preferences.e389d16d.js\",\"_app/immutable/chunks/index.81a0017d.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG,EAAE;AACvB,IAAI,eAAe,CAAC;AACR,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,8BAAsD,CAAC,EAAE,QAAQ;AAC5H,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,6CAA6C,CAAC,yCAAyC,CAAC,wCAAwC,CAAC,+CAA+C,CAAC,yCAAyC,EAAE;AAC7Q,MAAC,WAAW,GAAG,GAAG;AAClB,MAAC,KAAK,GAAG;;;;"}
@@ -0,0 +1,57 @@
1
+ import { e as escapeRegExp } from './regexp-5017d573.js';
2
+ import { c as configuration } from './configuration-d033c4d1.js';
3
+ import { l as listRepositories } from './zoekt-list-repositories-773bcddb.js';
4
+ import { e as error, r as redirect } from './index-64aa7a5e.js';
5
+ import '@badrap/valita';
6
+ import 'node:fs';
7
+ import './zoekt-client-dec73ec9.js';
8
+ import './metrics-a6a74309.js';
9
+ import 'prom-client';
10
+
11
+ const load = async ({
12
+ url,
13
+ params: { file, project },
14
+ parent,
15
+ setHeaders,
16
+ fetch
17
+ }) => {
18
+ if (!file) {
19
+ throw error(404);
20
+ }
21
+ const revision = url.searchParams.get("r");
22
+ const convertedRepo = configuration.openGrokProjectMappings.get(project);
23
+ const result = await listRepositories(
24
+ {
25
+ query: `repo:^${escapeRegExp(convertedRepo ?? project)}$`
26
+ },
27
+ fetch
28
+ );
29
+ if (result.kind === "error") {
30
+ throw new Error(`Failed to list repositories: ${result.error}`);
31
+ }
32
+ const repo = result.results.repositories[0];
33
+ const fileUrl = repo?.fileUrlTemplate.replaceAll("{{.Version}}", revision ?? repo.branches[0].name).replaceAll("{{.Path}}", file);
34
+ setHeaders({
35
+ "cache-control": "no-store,must-revalidate"
36
+ });
37
+ if (fileUrl && (await parent()).preferences.openGrokInstantRedirect) {
38
+ throw redirect(301, fileUrl);
39
+ }
40
+ return { file, fileUrl };
41
+ };
42
+
43
+ var _page_server_ts = /*#__PURE__*/Object.freeze({
44
+ __proto__: null,
45
+ load: load
46
+ });
47
+
48
+ const index = 3;
49
+ let component_cache;
50
+ const component = async () => component_cache ??= (await import('./_page.svelte-f4064b9c.js')).default;
51
+ const server_id = "src/routes/(opengrok-compat)/diff/[project]/[...file]/+page.server.ts";
52
+ const imports = ["_app/immutable/nodes/3.a382d3d5.js","_app/immutable/chunks/scheduler.80902d3b.js","_app/immutable/chunks/index.d0e6da70.js","_app/immutable/chunks/example-query.ac8ef50a.js","_app/immutable/chunks/link.70630bff.js","_app/immutable/chunks/regexp.50bc0e87.js"];
53
+ const stylesheets = [];
54
+ const fonts = [];
55
+
56
+ export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
57
+ //# sourceMappingURL=3-255408ab.js.map