| 4360 | return (f.sort(Qt), [Me(f, r / 2), Me(f, 1 - r / 2)]); |
| 4361 | } |
| 4362 | function os(t, e, n, r) { |
| 4363 | r = r || ((t) => t); |
| 4364 | const i = t.length, |
| 4365 | o = new Float64Array(i); |
| 4366 | let a, |
| 4367 | s = 0, |
| 4368 | u = 1, |
| 4369 | l = r(t[0]), |
| 4370 | c = l, |
| 4371 | f = l + e; |
| 4372 | for (; u < i; ++u) { |
| 4373 | if (((a = r(t[u])), a >= f)) { |
| 4374 | for (c = (l + c) / 2; s < u; ++s) o[s] = c; |
| 4375 | ((f = a + e), (l = a)); |
| 4376 | } |
| 4377 | c = a; |
| 4378 | } |
| 4379 | for (c = (l + c) / 2; s < u; ++s) o[s] = c; |
| 4380 | return n |
| 4381 | ? (function (t, e) { |
| 4382 | const n = t.length; |
| 4383 | let r, |
| 4384 | i, |
| 4385 | o = 0, |
| 4386 | a = 1; |
| 4387 | for (; t[o] === t[a]; ) ++a; |
| 4388 | for (; a < n; ) { |
| 4389 | for (r = a + 1; t[a] === t[r]; ) ++r; |
| 4390 | if (t[a] - t[a - 1] < e) { |
| 4391 | for (i = a + ((o + r - a - a) >> 1); i < a; ) t[i++] = t[a]; |
| 4392 | for (; i > a; ) t[i--] = t[o]; |
| 4393 | } |
| 4394 | ((o = a), (a = r)); |
| 4395 | } |
| 4396 | return t; |
| 4397 | })(o, e + e / 4) |
| 4398 | : o; |
| 4399 | } |
| 4400 | t.random = Math.random; |
| 4401 | const as = Math.sqrt(2 * Math.PI), |
| 4402 | ss = Math.SQRT2; |