tsondb 0.20.3 → 0.20.4

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.
@@ -1,422 +0,0 @@
1
- import { preact_module_l, Q as preact_module_Q, preact_module_k, preact_module_ } from "./488.js";
2
- var index_module_n = /[\s\n\\/='"\0<>]/, index_module_o = /^(xlink|xmlns|xml)([A-Z])/, index_module_i = /^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/, index_module_a = /^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/, index_module_c = new Set([
3
- "draggable",
4
- "spellcheck"
5
- ]), index_module_s = /["&<]/;
6
- function index_module_l(e) {
7
- if (0 === e.length || !1 === index_module_s.test(e)) return e;
8
- for(var t = 0, r = 0, n = "", o = ""; r < e.length; r++){
9
- switch(e.charCodeAt(r)){
10
- case 34:
11
- o = "&quot;";
12
- break;
13
- case 38:
14
- o = "&amp;";
15
- break;
16
- case 60:
17
- o = "&lt;";
18
- break;
19
- default:
20
- continue;
21
- }
22
- r !== t && (n += e.slice(t, r)), n += o, t = r + 1;
23
- }
24
- return r !== t && (n += e.slice(t, r)), n;
25
- }
26
- var index_module_u = {}, index_module_f = new Set([
27
- "animation-iteration-count",
28
- "border-image-outset",
29
- "border-image-slice",
30
- "border-image-width",
31
- "box-flex",
32
- "box-flex-group",
33
- "box-ordinal-group",
34
- "column-count",
35
- "fill-opacity",
36
- "flex",
37
- "flex-grow",
38
- "flex-negative",
39
- "flex-order",
40
- "flex-positive",
41
- "flex-shrink",
42
- "flood-opacity",
43
- "font-weight",
44
- "grid-column",
45
- "grid-row",
46
- "line-clamp",
47
- "line-height",
48
- "opacity",
49
- "order",
50
- "orphans",
51
- "stop-opacity",
52
- "stroke-dasharray",
53
- "stroke-dashoffset",
54
- "stroke-miterlimit",
55
- "stroke-opacity",
56
- "stroke-width",
57
- "tab-size",
58
- "widows",
59
- "z-index",
60
- "zoom"
61
- ]), index_module_p = /[A-Z]/g;
62
- function h(e) {
63
- var t = "";
64
- for(var r in e){
65
- var n = e[r];
66
- if (null != n && "" !== n) {
67
- var o = "-" == r[0] ? r : index_module_u[r] || (index_module_u[r] = r.replace(index_module_p, "-$&").toLowerCase()), i = ";";
68
- "number" != typeof n || o.startsWith("--") || index_module_f.has(o) || (i = "px;"), t = t + o + ":" + n + i;
69
- }
70
- }
71
- return t || void 0;
72
- }
73
- function index_module_d() {
74
- this.__d = !0;
75
- }
76
- function v(e, t) {
77
- return {
78
- __v: e,
79
- context: t,
80
- props: e.props,
81
- setState: index_module_d,
82
- forceUpdate: index_module_d,
83
- __d: !0,
84
- __h: new Array(0)
85
- };
86
- }
87
- function index_module_(e, t, r) {
88
- if (!e.s) {
89
- if (r instanceof index_module_m) {
90
- if (!r.s) return void (r.o = index_module_.bind(null, e, t));
91
- 1 & t && (t = r.s), r = r.v;
92
- }
93
- if (r && r.then) return void r.then(index_module_.bind(null, e, t), index_module_.bind(null, e, 2));
94
- e.s = t, e.v = r;
95
- const n = e.o;
96
- n && n(e);
97
- }
98
- }
99
- var index_module_m = /*#__PURE__*/ function() {
100
- function e() {}
101
- return e.prototype.then = function(t, r) {
102
- var n = new e, o = this.s;
103
- if (o) {
104
- var i = 1 & o ? t : r;
105
- if (i) {
106
- try {
107
- index_module_(n, 1, i(this.v));
108
- } catch (e) {
109
- index_module_(n, 2, e);
110
- }
111
- return n;
112
- }
113
- return this;
114
- }
115
- return this.o = function(e) {
116
- try {
117
- var o = e.v;
118
- 1 & e.s ? index_module_(n, 1, t ? t(o) : o) : r ? index_module_(n, 1, r(o)) : index_module_(n, 2, o);
119
- } catch (e) {
120
- index_module_(n, 2, e);
121
- }
122
- }, n;
123
- }, e;
124
- }();
125
- function index_module_y(e) {
126
- return e instanceof index_module_m && 1 & e.s;
127
- }
128
- function index_module_g(e, t, r) {
129
- for(var n;;){
130
- var o = e();
131
- if (index_module_y(o) && (o = o.v), !o) return i;
132
- if (o.then) {
133
- n = 0;
134
- break;
135
- }
136
- var i = r();
137
- if (i && i.then) {
138
- if (!index_module_y(i)) {
139
- n = 1;
140
- break;
141
- }
142
- i = i.s;
143
- }
144
- if (t) {
145
- var a = t();
146
- if (a && a.then && !index_module_y(a)) {
147
- n = 2;
148
- break;
149
- }
150
- }
151
- }
152
- var c = new index_module_m, s = index_module_.bind(null, c, 2);
153
- return (0 === n ? o.then(u) : 1 === n ? i.then(l) : a.then(f)).then(void 0, s), c;
154
- function l(n) {
155
- i = n;
156
- do {
157
- if (t && (a = t()) && a.then && !index_module_y(a)) return void a.then(f).then(void 0, s);
158
- if (!(o = e()) || index_module_y(o) && !o.v) return void index_module_(c, 1, i);
159
- if (o.then) return void o.then(u).then(void 0, s);
160
- index_module_y(i = r()) && (i = i.v);
161
- }while (!i || !i.then)
162
- i.then(l).then(void 0, s);
163
- }
164
- function u(e) {
165
- e ? (i = r()) && i.then ? i.then(l).then(void 0, s) : l(i) : index_module_(c, 1, i);
166
- }
167
- function f() {
168
- (o = e()) ? o.then ? o.then(u).then(void 0, s) : u(o) : index_module_(c, 1, i);
169
- }
170
- }
171
- function index_module_b(e, t) {
172
- try {
173
- var r = e();
174
- } catch (e) {
175
- return t(!0, e);
176
- }
177
- return r && r.then ? r.then(t.bind(null, !1), t.bind(null, !0)) : t(!1, r);
178
- }
179
- var k, w, x, C, index_module_A = function(n, o) {
180
- try {
181
- var i = preact_module_l.__s;
182
- preact_module_l.__s = !0, k = preact_module_l.__b, w = preact_module_l.diffed, x = preact_module_l.__r, C = preact_module_l.unmount;
183
- var a = preact_module_(preact_module_k, null);
184
- return a.__k = [
185
- n
186
- ], Promise.resolve(index_module_b(function() {
187
- return Promise.resolve(U(n, o || S, !1, void 0, a, !0, void 0)).then(function(e) {
188
- var t, r = function() {
189
- if (E(e)) {
190
- var r = function() {
191
- var e = o.join(j);
192
- return t = 1, e;
193
- }, n = 0, o = e, i = index_module_g(function() {
194
- return !!o.some(function(e) {
195
- return e && "function" == typeof e.then;
196
- }) && n++ < 25;
197
- }, void 0, function() {
198
- return Promise.resolve(Promise.all(o)).then(function(e) {
199
- o = e.flat();
200
- });
201
- });
202
- return i && i.then ? i.then(r) : r();
203
- }
204
- }();
205
- return r && r.then ? r.then(function(r) {
206
- return t ? r : e;
207
- }) : t ? r : e;
208
- });
209
- }, function(t, r) {
210
- if (preact_module_l.__c && preact_module_l.__c(n, index_module_L), preact_module_l.__s = i, index_module_L.length = 0, t) throw r;
211
- return r;
212
- }));
213
- } catch (e) {
214
- return Promise.reject(e);
215
- }
216
- }, S = {}, index_module_L = [], E = Array.isArray, T = Object.assign, j = "";
217
- function P(e, t) {
218
- var r, n = e.type, o = !0;
219
- return e.__c ? (o = !1, (r = e.__c).state = r.__s) : r = new n(e.props, t), e.__c = r, r.__v = e, r.props = e.props, r.context = t, r.__d = !0, null == r.state && (r.state = S), null == r.__s && (r.__s = r.state), n.getDerivedStateFromProps ? r.state = T({}, r.state, n.getDerivedStateFromProps(r.props, r.state)) : o && r.componentWillMount ? (r.componentWillMount(), r.state = r.__s !== r.state ? r.__s : r.state) : !o && r.componentWillUpdate && r.componentWillUpdate(), x && x(e), r.render(r.props, r.state, t);
220
- }
221
- function U(t, s, u, f, p, d, _) {
222
- if (null == t || !0 === t || !1 === t || t === j) return j;
223
- var m = typeof t;
224
- if ("object" != m) return "function" == m ? j : "string" == m ? index_module_l(t) : t + j;
225
- if (E(t)) {
226
- var y, g = j;
227
- p.__k = t;
228
- for(var b = t.length, A = 0; A < b; A++){
229
- var L = t[A];
230
- if (null != L && "boolean" != typeof L) {
231
- var D, F = U(L, s, u, f, p, d, _);
232
- "string" == typeof F ? g += F : (y || (y = new Array(b)), g && y.push(g), g = j, E(F) ? (D = y).push.apply(D, F) : y.push(F));
233
- }
234
- }
235
- return y ? (g && y.push(g), y) : g;
236
- }
237
- if (void 0 !== t.constructor) return j;
238
- t.__ = p, k && k(t);
239
- var M = t.type, W = t.props;
240
- if ("function" == typeof M) {
241
- var $, z, H, N = s;
242
- if (M === preact_module_k) {
243
- if ("tpl" in W) {
244
- for(var q = j, B = 0; B < W.tpl.length; B++)if (q += W.tpl[B], W.exprs && B < W.exprs.length) {
245
- var I = W.exprs[B];
246
- if (null == I) continue;
247
- "object" == typeof I && (void 0 === I.constructor || E(I)) ? q += U(I, s, u, f, t, d, _) : q += I;
248
- }
249
- return q;
250
- }
251
- if ("UNSTABLE_comment" in W) return "\x3c!--" + index_module_l(W.UNSTABLE_comment) + "--\x3e";
252
- z = W.children;
253
- } else {
254
- if (null != ($ = M.contextType)) {
255
- var O = s[$.__c];
256
- N = O ? O.props.value : $.__;
257
- }
258
- var R = M.prototype && "function" == typeof M.prototype.render;
259
- if (R) z = P(t, N), H = t.__c;
260
- else {
261
- t.__c = H = v(t, N);
262
- for(var V = 0; H.__d && V++ < 25;)H.__d = !1, x && x(t), z = M.call(H, W, N);
263
- H.__d = !0;
264
- }
265
- if (null != H.getChildContext && (s = T({}, s, H.getChildContext())), R && preact_module_l.errorBoundaries && (M.getDerivedStateFromError || H.componentDidCatch)) {
266
- z = null != z && z.type === preact_module_k && null == z.key && null == z.props.tpl ? z.props.children : z;
267
- try {
268
- return U(z, s, u, f, t, d, _);
269
- } catch (e) {
270
- return M.getDerivedStateFromError && (H.__s = M.getDerivedStateFromError(e)), H.componentDidCatch && H.componentDidCatch(e, S), H.__d ? (z = P(t, s), null != (H = t.__c).getChildContext && (s = T({}, s, H.getChildContext())), U(z = null != z && z.type === preact_module_k && null == z.key && null == z.props.tpl ? z.props.children : z, s, u, f, t, d, _)) : j;
271
- } finally{
272
- w && w(t), C && C(t);
273
- }
274
- }
275
- }
276
- z = null != z && z.type === preact_module_k && null == z.key && null == z.props.tpl ? z.props.children : z;
277
- try {
278
- var K = U(z, s, u, f, t, d, _);
279
- return w && w(t), preact_module_l.unmount && preact_module_l.unmount(t), K;
280
- } catch (r) {
281
- if (!d && _ && _.onError) {
282
- var G = _.onError(r, t, function(e, t) {
283
- return U(e, s, u, f, t, d, _);
284
- });
285
- if (void 0 !== G) return G;
286
- var J = preact_module_l.__e;
287
- return J && J(r, t), j;
288
- }
289
- if (!d) throw r;
290
- if (!r || "function" != typeof r.then) throw r;
291
- return r.then(function e() {
292
- try {
293
- return U(z, s, u, f, t, d, _);
294
- } catch (r) {
295
- if (!r || "function" != typeof r.then) throw r;
296
- return r.then(function() {
297
- return U(z, s, u, f, t, d, _);
298
- }, e);
299
- }
300
- });
301
- }
302
- }
303
- var Q, X = "<" + M, Y = j;
304
- for(var ee in W){
305
- var te = W[ee];
306
- if ("function" != typeof te || "class" === ee || "className" === ee) {
307
- switch(ee){
308
- case "children":
309
- Q = te;
310
- continue;
311
- case "key":
312
- case "ref":
313
- case "__self":
314
- case "__source":
315
- continue;
316
- case "htmlFor":
317
- if ("for" in W) continue;
318
- ee = "for";
319
- break;
320
- case "className":
321
- if ("class" in W) continue;
322
- ee = "class";
323
- break;
324
- case "defaultChecked":
325
- ee = "checked";
326
- break;
327
- case "defaultSelected":
328
- ee = "selected";
329
- break;
330
- case "defaultValue":
331
- case "value":
332
- switch(ee = "value", M){
333
- case "textarea":
334
- Q = te;
335
- continue;
336
- case "select":
337
- f = te;
338
- continue;
339
- case "option":
340
- f != te || "selected" in W || (X += " selected");
341
- }
342
- break;
343
- case "dangerouslySetInnerHTML":
344
- Y = te && te.__html;
345
- continue;
346
- case "style":
347
- "object" == typeof te && (te = h(te));
348
- break;
349
- case "acceptCharset":
350
- ee = "accept-charset";
351
- break;
352
- case "httpEquiv":
353
- ee = "http-equiv";
354
- break;
355
- default:
356
- if (index_module_o.test(ee)) ee = ee.replace(index_module_o, "$1:$2").toLowerCase();
357
- else {
358
- if (index_module_n.test(ee)) continue;
359
- ("-" === ee[4] || index_module_c.has(ee)) && null != te ? te += j : u ? index_module_a.test(ee) && (ee = "panose1" === ee ? "panose-1" : ee.replace(/([A-Z])/g, "-$1").toLowerCase()) : index_module_i.test(ee) && (ee = ee.toLowerCase());
360
- }
361
- }
362
- null != te && !1 !== te && (X = !0 === te || te === j ? X + " " + ee : X + " " + ee + '="' + ("string" == typeof te ? index_module_l(te) : te + j) + '"');
363
- }
364
- }
365
- if (index_module_n.test(M)) throw new Error(M + " is not a valid HTML tag name in " + X + ">");
366
- if (Y || ("string" == typeof Q ? Y = index_module_l(Q) : null != Q && !1 !== Q && !0 !== Q && (Y = U(Q, s, "svg" === M || "foreignObject" !== M && u, f, t, d, _))), w && w(t), C && C(t), !Y && Z.has(M)) return X + "/>";
367
- var re = "</" + M + ">", ne = X + ">";
368
- return E(Y) ? [
369
- ne
370
- ].concat(Y, [
371
- re
372
- ]) : "string" != typeof Y ? [
373
- ne,
374
- Y,
375
- re
376
- ] : ne + Y + re;
377
- }
378
- var Z = new Set([
379
- "area",
380
- "base",
381
- "br",
382
- "col",
383
- "command",
384
- "embed",
385
- "hr",
386
- "img",
387
- "input",
388
- "keygen",
389
- "link",
390
- "meta",
391
- "param",
392
- "source",
393
- "track",
394
- "wbr"
395
- ]);
396
- let vnodeHook;
397
- const old = preact_module_l.vnode;
398
- preact_module_l.vnode = (vnode)=>{
399
- if (old) old(vnode);
400
- if (vnodeHook) vnodeHook(vnode);
401
- };
402
- async function prerender(vnode, options) {
403
- options = options || {};
404
- const props = options.props;
405
- if ('function' == typeof vnode) vnode = preact_module_(vnode, props);
406
- else if (props) vnode = preact_module_Q(vnode, props);
407
- let links = new Set();
408
- vnodeHook = ({ type, props })=>{
409
- if ('a' === type && props && props.href && (!props.target || '_self' === props.target)) links.add(props.href);
410
- };
411
- try {
412
- let html = await index_module_A(vnode);
413
- html += '<script type="isodata"><\/script>';
414
- return {
415
- html,
416
- links
417
- };
418
- } finally{
419
- vnodeHook = null;
420
- }
421
- }
422
- export default prerender;