@peeekpage/viewer 0.4.7 → 0.4.9

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/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { jsxs as y, jsx as o, Fragment as Qe } from "react/jsx-runtime";
1
+ import { jsxs as y, jsx as r, Fragment as Qe } from "react/jsx-runtime";
2
2
  import { useState as v, useRef as E, useEffect as C, useCallback as L, useMemo as et } from "react";
3
3
  const tt = /* @__PURE__ */ new Set(["http:", "https:"]);
4
4
  function G(t) {
@@ -20,13 +20,13 @@ function de(t) {
20
20
  const e = t.trim();
21
21
  return nt.test(e) || at.test(e) ? e : null;
22
22
  }
23
- const ot = /url\(|image\(|image-set\(|element\(|expression|@|\/\*|;|\{|\}|<|>|\\/i, rt = /^(repeating-)?(linear|radial|conic)-gradient\([a-z0-9#.,%()\/\s-]*\)$/i, lt = /^hsla?\([a-z0-9.,%\/\s-]*\)$/i;
23
+ const rt = /url\(|image\(|image-set\(|element\(|expression|@|\/\*|;|\{|\}|<|>|\\/i, ot = /^(repeating-)?(linear|radial|conic)-gradient\([a-z0-9#.,%()\/\s-]*\)$/i, lt = /^hsla?\([a-z0-9.,%\/\s-]*\)$/i;
24
24
  function it(t) {
25
25
  if (typeof t != "string") return null;
26
26
  const e = t.trim();
27
- if (e === "" || ot.test(e)) return null;
27
+ if (e === "" || rt.test(e)) return null;
28
28
  const n = de(e);
29
- return n !== null ? n : lt.test(e) || rt.test(e) ? e : null;
29
+ return n !== null ? n : lt.test(e) || ot.test(e) ? e : null;
30
30
  }
31
31
  const st = ["en", "pt-BR"], Ne = {
32
32
  prev: "Previous page",
@@ -137,21 +137,21 @@ function mt(t) {
137
137
  const i = [];
138
138
  for (const g of e.pages) {
139
139
  if (g === null || typeof g != "object") continue;
140
- const c = G(g.url);
141
- c && i.push(c);
140
+ const u = G(g.url);
141
+ u && i.push(u);
142
142
  }
143
143
  if (i.length === 0)
144
144
  return { ok: !1, error: "manifest has no usable pages" };
145
- const d = e.status === "wip" ? "wip" : "done", _ = e.metadata && typeof e.metadata == "object" ? e.metadata : {}, h = {
146
- fileId: Q(_.file_id),
147
- filename: Q(_.filename),
148
- creationDate: Q(_.creation_date),
149
- fileSize: Q(_.file_size),
150
- mimeType: Q(_.mime_type)
145
+ const d = e.status === "wip" ? "wip" : "done", h = e.metadata && typeof e.metadata == "object" ? e.metadata : {}, k = {
146
+ fileId: Q(h.file_id),
147
+ filename: Q(h.filename),
148
+ creationDate: Q(h.creation_date),
149
+ fileSize: Q(h.file_size),
150
+ mimeType: Q(h.mime_type)
151
151
  };
152
152
  return {
153
153
  ok: !0,
154
- value: { status: d, totalPages: a, pages: i, metadata: h }
154
+ value: { status: d, totalPages: a, pages: i, metadata: k }
155
155
  };
156
156
  }
157
157
  function pt(t, e) {
@@ -175,35 +175,35 @@ function pt(t, e) {
175
175
  };
176
176
  }
177
177
  function bt(t, e) {
178
- const [n, a] = v("loading"), [i, d] = v(null), [_, h] = v(null), g = E(null);
178
+ const [n, a] = v("loading"), [i, d] = v(null), [h, k] = v(null), g = E(null);
179
179
  return C(() => {
180
- let c = !1;
181
- if (a("loading"), d(null), h(null), !t) return;
180
+ let u = !1;
181
+ if (a("loading"), d(null), k(null), !t) return;
182
182
  const w = () => {
183
183
  g.current !== null && (clearTimeout(g.current), g.current = null);
184
- }, k = async () => {
184
+ }, _ = async () => {
185
185
  let f;
186
186
  try {
187
187
  const l = await fetch(t);
188
188
  if (!l.ok) throw new Error(`HTTP ${l.status}`);
189
189
  f = await l.json();
190
190
  } catch (l) {
191
- if (c) return;
192
- h(l instanceof Error ? l.message : "fetch failed"), a("error");
191
+ if (u) return;
192
+ k(l instanceof Error ? l.message : "fetch failed"), a("error");
193
193
  return;
194
194
  }
195
- if (c) return;
196
- const u = mt(f);
197
- if (!u.ok) {
198
- h(u.error), a("error");
195
+ if (u) return;
196
+ const s = mt(f);
197
+ if (!s.ok) {
198
+ k(s.error), a("error");
199
199
  return;
200
200
  }
201
- d(u.value), a("ready"), u.value.status === "wip" && (g.current = setTimeout(k, e));
201
+ d(s.value), a("ready"), s.value.status === "wip" && (g.current = setTimeout(_, e));
202
202
  };
203
- return k(), () => {
204
- c = !0, w();
203
+ return _(), () => {
204
+ u = !0, w();
205
205
  };
206
- }, [t, e]), { state: n, manifest: i, error: _ };
206
+ }, [t, e]), { state: n, manifest: i, error: h };
207
207
  }
208
208
  function ht(t) {
209
209
  const [e, n] = v(!1);
@@ -272,23 +272,23 @@ function Ie(t, e) {
272
272
  const a = Number(n);
273
273
  return Number.isFinite(a) ? Math.max(1, Math.min(e, a)) - 1 : null;
274
274
  }
275
- const _t = 640;
276
- function kt(t, e) {
275
+ const kt = 640;
276
+ function _t(t, e) {
277
277
  const [n, a] = v("auto"), [i, d] = v(null);
278
278
  C(() => {
279
- const c = t.current;
280
- if (!c || (c.clientWidth > 0 && d(c.clientWidth), typeof ResizeObserver > "u")) return;
281
- const w = new ResizeObserver((k) => {
282
- var u;
283
- const f = (u = k[0]) == null ? void 0 : u.contentRect.width;
279
+ const u = t.current;
280
+ if (!u || (u.clientWidth > 0 && d(u.clientWidth), typeof ResizeObserver > "u")) return;
281
+ const w = new ResizeObserver((_) => {
282
+ var s;
283
+ const f = (s = _[0]) == null ? void 0 : s.contentRect.width;
284
284
  typeof f == "number" && f > 0 && d(f);
285
285
  });
286
- return w.observe(c), () => w.disconnect();
286
+ return w.observe(u), () => w.disconnect();
287
287
  }, [t]);
288
- const _ = i != null && i < _t ? "single" : e, h = n === "auto" ? _ : n, g = L(() => {
289
- a(h === "single" ? "double" : "single");
290
- }, [h]);
291
- return { layout: h, toggle: g };
288
+ const h = i != null && i < kt ? "single" : e, k = n === "auto" ? h : n, g = L(() => {
289
+ a(k === "single" ? "double" : "single");
290
+ }, [k]);
291
+ return { layout: k, toggle: g };
292
292
  }
293
293
  function me(t, e) {
294
294
  return t <= 0 ? 0 : e === "single" ? t : 1 + Math.ceil((t - 1) / 2);
@@ -296,7 +296,7 @@ function me(t, e) {
296
296
  function yt(t, e) {
297
297
  return e === "single" ? t : t <= 0 ? 0 : Math.floor((t - 1) / 2) + 1;
298
298
  }
299
- function oe(t, e, n) {
299
+ function re(t, e, n) {
300
300
  if (e <= 0) return { left: -1, right: -1 };
301
301
  if (n === "single")
302
302
  return { left: -1, right: t >= 0 && t < e ? t : -1 };
@@ -306,7 +306,7 @@ function oe(t, e, n) {
306
306
  return { left: a < e ? a : -1, right: i < e ? i : -1 };
307
307
  }
308
308
  function ge(t, e, n) {
309
- const { left: a, right: i } = oe(t, e, n), d = [];
309
+ const { left: a, right: i } = re(t, e, n), d = [];
310
310
  return a >= 0 && d.push(a), i >= 0 && d.push(i), d;
311
311
  }
312
312
  function ne(t, e, n) {
@@ -320,14 +320,14 @@ function vt(t) {
320
320
  progress: a,
321
321
  zoom: i,
322
322
  minZoom: d,
323
- maxZoom: _,
324
- total: h,
323
+ maxZoom: h,
324
+ total: k,
325
325
  currentPage: g,
326
- layout: c,
326
+ layout: u,
327
327
  thumbsOpen: w,
328
- isFullscreen: k,
328
+ isFullscreen: _,
329
329
  downloadUrl: f,
330
- show: u,
330
+ show: s,
331
331
  onZoomIn: l,
332
332
  onZoomOut: D,
333
333
  onZoomSet: O,
@@ -337,20 +337,20 @@ function vt(t) {
337
337
  onToggleThumbs: A,
338
338
  onToggleFullscreen: Z,
339
339
  onAbout: j
340
- } = t, [M, $] = v(String(g));
341
- C(() => $(String(g)), [g]);
340
+ } = t, [M, z] = v(String(g));
341
+ C(() => z(String(g)), [g]);
342
342
  const B = () => {
343
- const P = Ie(M, h);
343
+ const P = Ie(M, k);
344
344
  if (P === null) {
345
- $(String(g));
345
+ z(String(g));
346
346
  return;
347
347
  }
348
- F(P), $(String(P + 1));
348
+ F(P), z(String(P + 1));
349
349
  };
350
350
  return /* @__PURE__ */ y("div", { className: "peeek__toolbar", children: [
351
- /* @__PURE__ */ o("span", { className: "peeek__label", children: n }),
352
- u.bar && /* @__PURE__ */ o("div", { className: "peeek__scrubber", "aria-hidden": !0, children: /* @__PURE__ */ o("div", { className: "peeek__scrubber-fill", style: { width: `${a}%` } }) }),
353
- u.goto && /* @__PURE__ */ o(
351
+ !s.goto && /* @__PURE__ */ r("span", { className: "peeek__label", children: n }),
352
+ s.bar && /* @__PURE__ */ r("div", { className: "peeek__scrubber", "aria-hidden": !0, children: /* @__PURE__ */ r("div", { className: "peeek__scrubber-fill", style: { width: `${a}%` } }) }),
353
+ s.goto && /* @__PURE__ */ r(
354
354
  "input",
355
355
  {
356
356
  className: "peeek__goto",
@@ -358,14 +358,14 @@ function vt(t) {
358
358
  inputMode: "numeric",
359
359
  "aria-label": e.goToPage,
360
360
  value: M,
361
- onChange: (P) => $(P.target.value),
361
+ onChange: (P) => z(P.target.value),
362
362
  onBlur: B,
363
363
  onKeyDown: (P) => {
364
364
  P.key === "Enter" && (P.preventDefault(), B());
365
365
  }
366
366
  }
367
367
  ),
368
- /* @__PURE__ */ o(
368
+ /* @__PURE__ */ r(
369
369
  "button",
370
370
  {
371
371
  type: "button",
@@ -376,30 +376,30 @@ function vt(t) {
376
376
  children: "−"
377
377
  }
378
378
  ),
379
- /* @__PURE__ */ o(
379
+ /* @__PURE__ */ r(
380
380
  "input",
381
381
  {
382
382
  type: "range",
383
383
  "aria-label": e.zoom,
384
384
  min: d,
385
- max: _,
385
+ max: h,
386
386
  step: 0.25,
387
387
  value: i,
388
388
  onChange: (P) => O(Number(P.target.value))
389
389
  }
390
390
  ),
391
- /* @__PURE__ */ o(
391
+ /* @__PURE__ */ r(
392
392
  "button",
393
393
  {
394
394
  type: "button",
395
395
  className: "peeek__btn",
396
396
  "aria-label": e.zoomIn,
397
- disabled: i >= _,
397
+ disabled: i >= h,
398
398
  onClick: l,
399
399
  children: "+"
400
400
  }
401
401
  ),
402
- u.rotate && /* @__PURE__ */ o(
402
+ s.rotate && /* @__PURE__ */ r(
403
403
  "button",
404
404
  {
405
405
  type: "button",
@@ -409,18 +409,18 @@ function vt(t) {
409
409
  children: "⟳"
410
410
  }
411
411
  ),
412
- u.layoutToggle && /* @__PURE__ */ o(
412
+ s.layoutToggle && /* @__PURE__ */ r(
413
413
  "button",
414
414
  {
415
415
  type: "button",
416
416
  className: "peeek__btn",
417
- "aria-label": c === "single" ? e.doublePage : e.singlePage,
418
- "aria-pressed": c === "double",
417
+ "aria-label": u === "single" ? e.doublePage : e.singlePage,
418
+ "aria-pressed": u === "double",
419
419
  onClick: x,
420
- children: c === "single" ? "▭" : "▥"
420
+ children: u === "single" ? "▭" : "▥"
421
421
  }
422
422
  ),
423
- u.thumbnails && /* @__PURE__ */ o(
423
+ s.thumbnails && /* @__PURE__ */ r(
424
424
  "button",
425
425
  {
426
426
  type: "button",
@@ -431,7 +431,7 @@ function vt(t) {
431
431
  children: "▦"
432
432
  }
433
433
  ),
434
- f && /* @__PURE__ */ o(
434
+ f && /* @__PURE__ */ r(
435
435
  "a",
436
436
  {
437
437
  className: "peeek__btn",
@@ -443,18 +443,18 @@ function vt(t) {
443
443
  children: "↓"
444
444
  }
445
445
  ),
446
- u.fullscreen && /* @__PURE__ */ o(
446
+ s.fullscreen && /* @__PURE__ */ r(
447
447
  "button",
448
448
  {
449
449
  type: "button",
450
- className: `peeek__btn${k ? " peeek__btn--active" : ""}`,
450
+ className: `peeek__btn${_ ? " peeek__btn--active" : ""}`,
451
451
  "aria-label": e.fullscreen,
452
- "aria-pressed": k,
452
+ "aria-pressed": _,
453
453
  onClick: Z,
454
454
  children: "⛶"
455
455
  }
456
456
  ),
457
- u.about && /* @__PURE__ */ o(
457
+ s.about && /* @__PURE__ */ r(
458
458
  "button",
459
459
  {
460
460
  type: "button",
@@ -467,27 +467,27 @@ function vt(t) {
467
467
  ] });
468
468
  }
469
469
  function wt({ pages: t, layout: e, rtl: n, activePages: a, onJump: i }) {
470
- const d = t.length, _ = new Set(a), h = me(d, e);
471
- return /* @__PURE__ */ o("div", { className: "peeek__thumbs", role: "group", "aria-label": "Pages", children: Array.from({ length: h }, (g, c) => {
472
- const w = ge(c, d, e), k = w.length === 2;
470
+ const d = t.length, h = new Set(a), k = me(d, e);
471
+ return /* @__PURE__ */ r("div", { className: "peeek__thumbs", role: "group", "aria-label": "Pages", children: Array.from({ length: k }, (g, u) => {
472
+ const w = ge(u, d, e), _ = w.length === 2;
473
473
  return /* @__PURE__ */ y("div", { className: "peeek__thumb-group", children: [
474
- w.map((f, u) => {
474
+ w.map((f, s) => {
475
475
  let l = "";
476
- return k && (l = (n ? u === 1 : u === 0) ? " peeek__thumb--flat-right" : " peeek__thumb--flat-left"), /* @__PURE__ */ o(
476
+ return _ && (l = (n ? s === 1 : s === 0) ? " peeek__thumb--flat-right" : " peeek__thumb--flat-left"), /* @__PURE__ */ r(
477
477
  "button",
478
478
  {
479
479
  type: "button",
480
480
  "aria-label": `Go to page ${f + 1}`,
481
- "aria-current": _.has(f),
482
- className: `peeek__thumb${_.has(f) ? " peeek__thumb--active" : ""}${l}`,
481
+ "aria-current": h.has(f),
482
+ className: `peeek__thumb${h.has(f) ? " peeek__thumb--active" : ""}${l}`,
483
483
  onClick: () => i(f),
484
- children: /* @__PURE__ */ o("img", { src: t[f], alt: "", loading: "lazy", referrerPolicy: "no-referrer" })
484
+ children: /* @__PURE__ */ r("img", { src: t[f], alt: "", loading: "lazy", referrerPolicy: "no-referrer" })
485
485
  },
486
486
  f
487
487
  );
488
488
  }),
489
- /* @__PURE__ */ o("span", { className: "peeek__thumb-badge", "aria-hidden": !0, children: w.map((f) => f + 1).join("-") })
490
- ] }, c);
489
+ /* @__PURE__ */ r("span", { className: "peeek__thumb-badge", "aria-hidden": !0, children: w.map((f) => f + 1).join("-") })
490
+ ] }, u);
491
491
  }) });
492
492
  }
493
493
  const ee = 1, ae = 4, Te = 0.5;
@@ -498,100 +498,100 @@ function Tt(t) {
498
498
  layout: a,
499
499
  rtl: i,
500
500
  pageShadows: d,
501
- animateInteractions: _,
502
- autoTransition: h,
501
+ animateInteractions: h,
502
+ autoTransition: k,
503
503
  autoTransitionInterval: g,
504
- show: c,
504
+ show: u,
505
505
  downloadUrl: w,
506
- isFullscreen: k,
506
+ isFullscreen: _,
507
507
  onToggleFullscreen: f,
508
- onAbout: u
509
- } = t, l = e.length, O = Ce() || !_, [F, R] = v(0), [x, A] = v(1), [Z, j] = v(!1), [M, $] = v({ x: 0, y: 0 }), [B, P] = v(!1), [X, m] = v(0), p = E(null), S = E(null), { layout: b, toggle: K } = kt(S, a), re = me(l, b), [T, le] = v(null), [xe, pe] = v(!1), ie = E(null), [be, Se] = v(0.707);
508
+ onAbout: s
509
+ } = t, l = e.length, O = Ce() || !h, [F, R] = v(0), [x, A] = v(1), [Z, j] = v(!1), [M, z] = v({ x: 0, y: 0 }), [B, P] = v(!1), [X, m] = v(0), p = E(null), S = E(null), { layout: b, toggle: K } = _t(S, a), oe = me(l, b), [T, le] = v(null), [xe, pe] = v(!1), ie = E(null), [be, Se] = v(0.707);
510
510
  C(() => {
511
511
  if (!e[0]) return;
512
- const r = new globalThis.Image();
513
- r.onload = () => {
514
- r.naturalWidth && r.naturalHeight && Se(r.naturalWidth / r.naturalHeight);
515
- }, r.src = e[0];
512
+ const o = new globalThis.Image();
513
+ o.onload = () => {
514
+ o.naturalWidth && o.naturalHeight && Se(o.naturalWidth / o.naturalHeight);
515
+ }, o.src = e[0];
516
516
  }, [e]);
517
- const z = ne(F, l, b), ze = z <= 0, se = z >= re - 1, he = E(/* @__PURE__ */ new Set());
517
+ const $ = ne(F, l, b), $e = $ <= 0, se = $ >= oe - 1, he = E(/* @__PURE__ */ new Set());
518
518
  C(() => {
519
- const r = [z - 1, z + 1, z + 2].map((s) => ne(s, l, b)).flatMap((s) => ge(s, l, b)).filter((s) => s >= 0);
520
- for (const s of r) {
521
- const N = e[s];
519
+ const o = [$ - 1, $ + 1, $ + 2].map((c) => ne(c, l, b)).flatMap((c) => ge(c, l, b)).filter((c) => c >= 0);
520
+ for (const c of o) {
521
+ const N = e[c];
522
522
  if (!N || he.current.has(N)) continue;
523
523
  he.current.add(N);
524
524
  const q = new globalThis.Image();
525
525
  q.src = N;
526
526
  }
527
- }, [z, l, b, e]);
527
+ }, [$, l, b, e]);
528
528
  const W = L(
529
- (r) => {
530
- T || R((s) => {
531
- const N = ne(s + r, l, b);
532
- return N === s ? s : O ? N : (le({ dir: r, to: N }), s);
529
+ (o) => {
530
+ T || R((c) => {
531
+ const N = ne(c + o, l, b);
532
+ return N === c ? c : O ? N : (le({ dir: o, to: N }), c);
533
533
  });
534
534
  },
535
535
  [l, b, O, T]
536
- ), $e = L((r) => {
537
- r.target === ie.current && (r.propertyName && r.propertyName !== "transform" || le((s) => s && (R(s.to), pe(!0), requestAnimationFrame(
536
+ ), ze = L((o) => {
537
+ o.target === ie.current && (o.propertyName && o.propertyName !== "transform" || le((c) => c && (R(c.to), pe(!0), requestAnimationFrame(
538
538
  () => requestAnimationFrame(() => {
539
539
  le(null), pe(!1);
540
540
  })
541
- ), s)));
541
+ ), c)));
542
542
  }, []);
543
543
  C(() => {
544
544
  if (!T) return;
545
- const r = ie.current;
546
- if (!r) return;
547
- r.style.transform = "rotateY(0deg)";
548
- let s = 0;
545
+ const o = ie.current;
546
+ if (!o) return;
547
+ o.style.transform = "rotateY(0deg)";
548
+ let c = 0;
549
549
  const N = requestAnimationFrame(() => {
550
- s = requestAnimationFrame(() => {
551
- r.style.transform = `rotateY(${T.dir === 1 ? -180 : 180}deg)`;
550
+ c = requestAnimationFrame(() => {
551
+ o.style.transform = `rotateY(${T.dir === 1 ? -180 : 180}deg)`;
552
552
  });
553
553
  });
554
554
  return () => {
555
- cancelAnimationFrame(N), cancelAnimationFrame(s);
555
+ cancelAnimationFrame(N), cancelAnimationFrame(c);
556
556
  };
557
557
  }, [T]);
558
558
  const ce = L(
559
- (r) => {
560
- R(ne(yt(r, b), l, b));
559
+ (o) => {
560
+ R(ne(yt(o, b), l, b));
561
561
  },
562
562
  [l, b]
563
563
  ), { onKeyDown: Ae } = Pe({ go: W, jump: ce, total: l, rtl: i });
564
564
  C(() => {
565
- if (!h || se) return;
566
- const r = setTimeout(() => W(1), g);
567
- return () => clearTimeout(r);
568
- }, [h, g, se, z, W]);
569
- const Fe = () => A((r) => Math.min(ae, r + Te)), Me = () => A((r) => Math.max(ee, r - Te)), Ee = () => {
570
- T || A((r) => r > ee ? ee : ae);
571
- }, Le = () => m((r) => (r + 90) % 360), De = X === 90 || X === 270 ? be : 1, ue = L((r, s, N) => {
565
+ if (!k || se) return;
566
+ const o = setTimeout(() => W(1), g);
567
+ return () => clearTimeout(o);
568
+ }, [k, g, se, $, W]);
569
+ const Fe = () => A((o) => Math.min(ae, o + Te)), Me = () => A((o) => Math.max(ee, o - Te)), Ee = () => {
570
+ T || A((o) => o > ee ? ee : ae);
571
+ }, Le = () => m((o) => (o + 90) % 360), De = X === 90 || X === 270 ? be : 1, ue = L((o, c, N) => {
572
572
  const q = S.current;
573
573
  if (!q || N <= 1) return { x: 0, y: 0 };
574
574
  const ye = (N - 1) * q.clientWidth / 2, ve = (N - 1) * q.clientHeight / 2;
575
- return { x: Math.max(-ye, Math.min(ye, r)), y: Math.max(-ve, Math.min(ve, s)) };
575
+ return { x: Math.max(-ye, Math.min(ye, o)), y: Math.max(-ve, Math.min(ve, c)) };
576
576
  }, []);
577
- C(() => $((r) => ue(r.x, r.y, x)), [x, ue]), C(() => $({ x: 0, y: 0 }), [z]);
578
- const Oe = (r) => {
579
- var s, N;
580
- x <= 1 || (p.current = { x: r.clientX, y: r.clientY, px: M.x, py: M.y }, P(!0), (N = (s = r.currentTarget).setPointerCapture) == null || N.call(s, r.pointerId));
581
- }, Re = (r) => {
582
- const s = p.current;
583
- s && $(ue(s.px + (r.clientX - s.x), s.py + (r.clientY - s.y), x));
584
- }, _e = (r) => {
577
+ C(() => z((o) => ue(o.x, o.y, x)), [x, ue]), C(() => z({ x: 0, y: 0 }), [$]);
578
+ const Oe = (o) => {
579
+ var c, N;
580
+ x <= 1 || (p.current = { x: o.clientX, y: o.clientY, px: M.x, py: M.y }, P(!0), (N = (c = o.currentTarget).setPointerCapture) == null || N.call(c, o.pointerId));
581
+ }, Re = (o) => {
582
+ const c = p.current;
583
+ c && z(ue(c.px + (o.clientX - c.x), c.py + (o.clientY - c.y), x));
584
+ }, ke = (o) => {
585
585
  if (p.current) {
586
586
  p.current = null, P(!1);
587
587
  try {
588
- r.currentTarget.releasePointerCapture(r.pointerId);
588
+ o.currentTarget.releasePointerCapture(o.pointerId);
589
589
  } catch {
590
590
  }
591
591
  }
592
- }, Y = ge(z, l, b), te = Y[0] ?? 0, Be = b === "double" && Y.length === 2 ? `${Y[0] + 1} - ${Y[1] + 1} / ${l}` : `${te + 1} / ${l}`, Ue = re <= 1 ? 100 : z / (re - 1) * 100, Ze = n.prev, He = n.next, Ge = T ? T.to : z, H = oe(Ge, l, b), je = H.left < 0 && H.right >= 0, Ve = H.left >= 0 && H.right < 0, Xe = H.left >= 0 && H.right >= 0, Ke = je ? "-25%" : Ve ? "25%" : "0%", U = oe(z, l, b), V = T ? oe(T.to, l, b) : U, We = T ? T.dir === 1 ? U.right >= 0 ? U.right : U.left : U.left >= 0 ? U.left : U.right : te, Ye = T ? T.dir === 1 ? V.left >= 0 ? V.left : V.right : V.right >= 0 ? V.right : V.left : te, qe = T ? T.dir === 1 ? "left" : "right" : null, ke = (r) => r === qe && !xe ? U[r] : H[r], Je = [
593
- ["left", ke("left")],
594
- ["right", ke("right")]
592
+ }, Y = ge($, l, b), te = Y[0] ?? 0, Be = b === "double" && Y.length === 2 ? `${Y[0] + 1} - ${Y[1] + 1} / ${l}` : `${te + 1} / ${l}`, Ue = oe <= 1 ? 100 : $ / (oe - 1) * 100, Ze = n.prev, He = n.next, Ge = T ? T.to : $, H = re(Ge, l, b), je = H.left < 0 && H.right >= 0, Ve = H.left >= 0 && H.right < 0, Xe = H.left >= 0 && H.right >= 0, Ke = je ? "-25%" : Ve ? "25%" : "0%", U = re($, l, b), V = T ? re(T.to, l, b) : U, We = T ? T.dir === 1 ? U.right >= 0 ? U.right : U.left : U.left >= 0 ? U.left : U.right : te, Ye = T ? T.dir === 1 ? V.left >= 0 ? V.left : V.right : V.right >= 0 ? V.right : V.left : te, qe = T ? T.dir === 1 ? "left" : "right" : null, _e = (o) => o === qe && !xe ? U[o] : H[o], Je = [
593
+ ["left", _e("left")],
594
+ ["right", _e("right")]
595
595
  ];
596
596
  return /* @__PURE__ */ y(Qe, { children: [
597
597
  /* @__PURE__ */ y(
@@ -604,18 +604,18 @@ function Tt(t) {
604
604
  onKeyDown: Ae,
605
605
  style: { "--peeek-aspect": `${be}` },
606
606
  children: [
607
- c.arrows && /* @__PURE__ */ o(
607
+ u.arrows && /* @__PURE__ */ r(
608
608
  "button",
609
609
  {
610
610
  type: "button",
611
611
  className: "peeek__arrow peeek__arrow--prev",
612
612
  "aria-label": Ze,
613
- disabled: ze,
613
+ disabled: $e,
614
614
  onClick: () => W(-1),
615
615
  children: "‹"
616
616
  }
617
617
  ),
618
- /* @__PURE__ */ o(
618
+ /* @__PURE__ */ r(
619
619
  "div",
620
620
  {
621
621
  className: `peeek__zoom${x > 1 ? " peeek__zoom--pannable" : ""}`,
@@ -626,32 +626,32 @@ function Tt(t) {
626
626
  onDoubleClick: Ee,
627
627
  onPointerDown: Oe,
628
628
  onPointerMove: Re,
629
- onPointerUp: _e,
630
- onPointerCancel: _e,
629
+ onPointerUp: ke,
630
+ onPointerCancel: ke,
631
631
  children: /* @__PURE__ */ y(
632
632
  "div",
633
633
  {
634
634
  className: `peeek__spread${d ? " peeek--shadows" : ""}${Xe ? " peeek__spread--pair" : ""}`,
635
635
  style: { transform: `translateX(${Ke})` },
636
636
  children: [
637
- Je.map(([r, s]) => {
638
- const N = s >= 0 && c.fullscreen && !k && !T && x === 1;
639
- return /* @__PURE__ */ o(
637
+ Je.map(([o, c]) => {
638
+ const N = c >= 0 && u.fullscreen && !_ && !T && x === 1;
639
+ return /* @__PURE__ */ r(
640
640
  "div",
641
641
  {
642
- className: `peeek__page peeek__page--${r}${s < 0 ? " peeek__page--empty" : ""}`,
643
- children: s >= 0 && (N ? /* @__PURE__ */ o(
642
+ className: `peeek__page peeek__page--${o}${c < 0 ? " peeek__page--empty" : ""}`,
643
+ children: c >= 0 && (N ? /* @__PURE__ */ r(
644
644
  "button",
645
645
  {
646
646
  type: "button",
647
647
  className: "peeek__page-btn",
648
648
  "aria-label": n.openFullscreen,
649
649
  onClick: f,
650
- children: /* @__PURE__ */ o("img", { src: e[s], alt: `Page ${s + 1}`, referrerPolicy: "no-referrer" })
650
+ children: /* @__PURE__ */ r("img", { src: e[c], alt: `Page ${c + 1}`, referrerPolicy: "no-referrer" })
651
651
  }
652
- ) : /* @__PURE__ */ o("img", { src: e[s], alt: `Page ${s + 1}`, referrerPolicy: "no-referrer" }))
652
+ ) : /* @__PURE__ */ r("img", { src: e[c], alt: `Page ${c + 1}`, referrerPolicy: "no-referrer" }))
653
653
  },
654
- r
654
+ o
655
655
  );
656
656
  }),
657
657
  T && /* @__PURE__ */ y(
@@ -659,10 +659,10 @@ function Tt(t) {
659
659
  {
660
660
  ref: ie,
661
661
  className: `peeek__leaf peeek__leaf--${T.dir === 1 ? "fwd" : "back"}`,
662
- onTransitionEnd: $e,
662
+ onTransitionEnd: ze,
663
663
  children: [
664
- /* @__PURE__ */ o("div", { className: "peeek__leaf-face peeek__leaf-face--front", children: /* @__PURE__ */ o("img", { src: e[We], alt: "", referrerPolicy: "no-referrer" }) }),
665
- /* @__PURE__ */ o("div", { className: "peeek__leaf-face peeek__leaf-face--back", children: /* @__PURE__ */ o("img", { src: e[Ye], alt: "", referrerPolicy: "no-referrer" }) })
664
+ /* @__PURE__ */ r("div", { className: "peeek__leaf-face peeek__leaf-face--front", children: /* @__PURE__ */ r("img", { src: e[We], alt: "", referrerPolicy: "no-referrer" }) }),
665
+ /* @__PURE__ */ r("div", { className: "peeek__leaf-face peeek__leaf-face--back", children: /* @__PURE__ */ r("img", { src: e[Ye], alt: "", referrerPolicy: "no-referrer" }) })
666
666
  ]
667
667
  }
668
668
  )
@@ -671,7 +671,7 @@ function Tt(t) {
671
671
  )
672
672
  }
673
673
  ),
674
- c.arrows && /* @__PURE__ */ o(
674
+ u.arrows && /* @__PURE__ */ r(
675
675
  "button",
676
676
  {
677
677
  type: "button",
@@ -685,7 +685,7 @@ function Tt(t) {
685
685
  ]
686
686
  }
687
687
  ),
688
- c.toolbar && /* @__PURE__ */ o(
688
+ u.toolbar && /* @__PURE__ */ r(
689
689
  vt,
690
690
  {
691
691
  strings: n,
@@ -698,29 +698,29 @@ function Tt(t) {
698
698
  currentPage: te + 1,
699
699
  layout: b,
700
700
  thumbsOpen: Z,
701
- isFullscreen: k,
701
+ isFullscreen: _,
702
702
  downloadUrl: w,
703
703
  show: {
704
- bar: c.bar,
705
- fullscreen: c.fullscreen,
706
- thumbnails: c.thumbnails && c.overview,
707
- about: c.about,
708
- goto: c.goto,
709
- rotate: c.rotate,
710
- layoutToggle: c.layoutToggle
704
+ bar: u.bar,
705
+ fullscreen: u.fullscreen,
706
+ thumbnails: u.thumbnails && u.overview,
707
+ about: u.about,
708
+ goto: u.goto,
709
+ rotate: u.rotate,
710
+ layoutToggle: u.layoutToggle
711
711
  },
712
712
  onZoomIn: Fe,
713
713
  onZoomOut: Me,
714
- onZoomSet: (r) => A(Math.min(ae, Math.max(ee, r))),
714
+ onZoomSet: (o) => A(Math.min(ae, Math.max(ee, o))),
715
715
  onJump: ce,
716
716
  onRotate: Le,
717
717
  onToggleLayout: K,
718
- onToggleThumbs: () => j((r) => !r),
718
+ onToggleThumbs: () => j((o) => !o),
719
719
  onToggleFullscreen: f,
720
- onAbout: u
720
+ onAbout: s
721
721
  }
722
722
  ),
723
- c.overview && Z && /* @__PURE__ */ o(wt, { pages: e, layout: b, rtl: i, activePages: Y, onJump: ce })
723
+ u.overview && Z && /* @__PURE__ */ r(wt, { pages: e, layout: b, rtl: i, activePages: Y, onJump: ce })
724
724
  ] });
725
725
  }
726
726
  function Nt(t, e) {
@@ -747,42 +747,42 @@ function Pt(t) {
747
747
  filename: a,
748
748
  mimeType: i,
749
749
  rtl: d,
750
- autoTransition: _,
751
- autoTransitionInterval: h,
750
+ autoTransition: h,
751
+ autoTransitionInterval: k,
752
752
  downloadUrl: g,
753
- isFullscreen: c,
753
+ isFullscreen: u,
754
754
  onToggleFullscreen: w,
755
- onAbout: k,
755
+ onAbout: _,
756
756
  show: f
757
- } = t, u = e.length, [l, D] = v(0), O = Ce(), F = L(
758
- (m) => D((p) => Math.max(0, Math.min(u - 1, p + m))),
759
- [u]
757
+ } = t, s = e.length, [l, D] = v(0), O = Ce(), F = L(
758
+ (m) => D((p) => Math.max(0, Math.min(s - 1, p + m))),
759
+ [s]
760
760
  ), R = L(
761
- (m) => D(Math.max(0, Math.min(u - 1, m))),
762
- [u]
763
- ), x = l <= 0, A = l >= u - 1, Z = E(/* @__PURE__ */ new Set());
761
+ (m) => D(Math.max(0, Math.min(s - 1, m))),
762
+ [s]
763
+ ), x = l <= 0, A = l >= s - 1, Z = E(/* @__PURE__ */ new Set());
764
764
  C(() => {
765
765
  for (const m of [l - 2, l - 1, l + 1, l + 2]) {
766
- const p = m >= 0 && m < u ? e[m] : void 0;
766
+ const p = m >= 0 && m < s ? e[m] : void 0;
767
767
  if (!p || Z.current.has(p)) continue;
768
768
  Z.current.add(p);
769
769
  const S = new globalThis.Image();
770
770
  S.src = p;
771
771
  }
772
- }, [l, u, e]);
772
+ }, [l, s, e]);
773
773
  const j = E([]);
774
774
  C(() => {
775
775
  var m, p;
776
776
  (p = (m = j.current[l]) == null ? void 0 : m.scrollIntoView) == null || p.call(m, { behavior: "smooth", inline: "center", block: "nearest" });
777
777
  }, [l]), C(() => {
778
- if (!_ || O || A) return;
779
- const m = setTimeout(() => F(1), h);
778
+ if (!h || O || A) return;
779
+ const m = setTimeout(() => F(1), k);
780
780
  return () => clearTimeout(m);
781
- }, [_, h, O, A, l, F]);
782
- const { onKeyDown: M } = Pe({ go: F, jump: R, total: u, rtl: d }), [$, B] = v(String(l + 1));
781
+ }, [h, k, O, A, l, F]);
782
+ const { onKeyDown: M } = Pe({ go: F, jump: R, total: s, rtl: d }), [z, B] = v(String(l + 1));
783
783
  C(() => B(String(l + 1)), [l]);
784
784
  const P = () => {
785
- const m = Ie($, u);
785
+ const m = Ie(z, s);
786
786
  if (m === null) {
787
787
  B(String(l + 1));
788
788
  return;
@@ -791,28 +791,28 @@ function Pt(t) {
791
791
  }, X = Nt(a, i);
792
792
  return /* @__PURE__ */ y("div", { className: "peeek__cf", children: [
793
793
  /* @__PURE__ */ y("div", { className: "peeek__cf-header", children: [
794
- /* @__PURE__ */ o("span", { className: "peeek__cf-badge", children: X }),
794
+ /* @__PURE__ */ r("span", { className: "peeek__cf-badge", children: X }),
795
795
  /* @__PURE__ */ y("div", { className: "peeek__cf-meta", children: [
796
- /* @__PURE__ */ o("span", { className: "peeek__cf-name", children: a }),
796
+ /* @__PURE__ */ r("span", { className: "peeek__cf-name", children: a }),
797
797
  /* @__PURE__ */ y("span", { className: "peeek__cf-count", children: [
798
- u,
798
+ s,
799
799
  " ",
800
- u === 1 ? n.page : n.pages
800
+ s === 1 ? n.page : n.pages
801
801
  ] })
802
802
  ] }),
803
803
  /* @__PURE__ */ y("span", { className: "peeek__cf-indicator", children: [
804
804
  l + 1,
805
805
  " / ",
806
- u
806
+ s
807
807
  ] }),
808
- f.goto && /* @__PURE__ */ o(
808
+ f.goto && /* @__PURE__ */ r(
809
809
  "input",
810
810
  {
811
811
  className: "peeek__goto",
812
812
  type: "text",
813
813
  inputMode: "numeric",
814
814
  "aria-label": n.goToPage,
815
- value: $,
815
+ value: z,
816
816
  onChange: (m) => B(m.target.value),
817
817
  onBlur: P,
818
818
  onKeyDown: (m) => {
@@ -820,7 +820,7 @@ function Pt(t) {
820
820
  }
821
821
  }
822
822
  ),
823
- g && /* @__PURE__ */ o(
823
+ g && /* @__PURE__ */ r(
824
824
  "a",
825
825
  {
826
826
  className: "peeek__btn",
@@ -832,24 +832,24 @@ function Pt(t) {
832
832
  children: "↓"
833
833
  }
834
834
  ),
835
- f.fullscreen && /* @__PURE__ */ o(
835
+ f.fullscreen && /* @__PURE__ */ r(
836
836
  "button",
837
837
  {
838
838
  type: "button",
839
- className: `peeek__btn${c ? " peeek__btn--active" : ""}`,
839
+ className: `peeek__btn${u ? " peeek__btn--active" : ""}`,
840
840
  "aria-label": n.fullscreen,
841
- "aria-pressed": c,
841
+ "aria-pressed": u,
842
842
  onClick: w,
843
843
  children: "⛶"
844
844
  }
845
845
  ),
846
- f.about && /* @__PURE__ */ o(
846
+ f.about && /* @__PURE__ */ r(
847
847
  "button",
848
848
  {
849
849
  type: "button",
850
850
  className: "peeek__btn",
851
851
  "aria-label": n.about,
852
- onClick: k,
852
+ onClick: _,
853
853
  children: "?"
854
854
  }
855
855
  )
@@ -861,7 +861,7 @@ function Pt(t) {
861
861
  tabIndex: 0,
862
862
  onKeyDown: M,
863
863
  children: [
864
- f.arrows && /* @__PURE__ */ o(
864
+ f.arrows && /* @__PURE__ */ r(
865
865
  "button",
866
866
  {
867
867
  type: "button",
@@ -876,7 +876,7 @@ function Pt(t) {
876
876
  const S = p - l;
877
877
  if (Math.abs(S) > 1) return null;
878
878
  const b = S === 0, K = b && f.fullscreen;
879
- return /* @__PURE__ */ o(
879
+ return /* @__PURE__ */ r(
880
880
  "button",
881
881
  {
882
882
  type: "button",
@@ -885,12 +885,12 @@ function Pt(t) {
885
885
  tabIndex: b ? 0 : -1,
886
886
  "aria-label": K ? n.openFullscreen : `Go to page ${p + 1}`,
887
887
  onClick: () => K ? w() : D(p),
888
- children: /* @__PURE__ */ o("img", { src: m, alt: b ? `Page ${p + 1}` : "", referrerPolicy: "no-referrer" })
888
+ children: /* @__PURE__ */ r("img", { src: m, alt: b ? `Page ${p + 1}` : "", referrerPolicy: "no-referrer" })
889
889
  },
890
890
  p
891
891
  );
892
892
  }),
893
- f.arrows && /* @__PURE__ */ o(
893
+ f.arrows && /* @__PURE__ */ r(
894
894
  "button",
895
895
  {
896
896
  type: "button",
@@ -904,7 +904,7 @@ function Pt(t) {
904
904
  ]
905
905
  }
906
906
  ),
907
- f.thumbnails && /* @__PURE__ */ o("div", { className: "peeek__cf-thumbs", role: "group", "aria-label": "Pages", children: e.map((m, p) => {
907
+ f.thumbnails && /* @__PURE__ */ r("div", { className: "peeek__cf-thumbs", role: "group", "aria-label": "Pages", children: e.map((m, p) => {
908
908
  const S = p === l;
909
909
  return /* @__PURE__ */ y(
910
910
  "button",
@@ -918,8 +918,8 @@ function Pt(t) {
918
918
  "aria-current": S ? "page" : void 0,
919
919
  onClick: () => D(p),
920
920
  children: [
921
- /* @__PURE__ */ o("img", { src: m, alt: "", loading: "lazy", referrerPolicy: "no-referrer" }),
922
- /* @__PURE__ */ o("span", { className: "peeek__cf-thumb-num", children: String(p + 1).padStart(2, "0") })
921
+ /* @__PURE__ */ r("img", { src: m, alt: "", loading: "lazy", referrerPolicy: "no-referrer" }),
922
+ /* @__PURE__ */ r("span", { className: "peeek__cf-thumb-num", children: String(p + 1).padStart(2, "0") })
923
923
  ]
924
924
  },
925
925
  p
@@ -929,8 +929,8 @@ function Pt(t) {
929
929
  }
930
930
  function It({ logo: t, logoLink: e }) {
931
931
  if (!t) return null;
932
- const n = /* @__PURE__ */ o("img", { src: t, alt: "Logo", loading: "lazy", referrerPolicy: "no-referrer" });
933
- return /* @__PURE__ */ o("div", { className: "peeek__branding", children: e ? /* @__PURE__ */ o("a", { href: e, target: "_blank", rel: "noopener noreferrer", children: n }) : n });
932
+ const n = /* @__PURE__ */ r("img", { src: t, alt: "Logo", loading: "lazy", referrerPolicy: "no-referrer" });
933
+ return /* @__PURE__ */ r("div", { className: "peeek__branding", children: e ? /* @__PURE__ */ r("a", { href: e, target: "_blank", rel: "noopener noreferrer", children: n }) : n });
934
934
  }
935
935
  const xt = [
936
936
  { top: "12%", left: "10%", size: 3, v: "A", dur: 13, delay: 0 },
@@ -956,7 +956,7 @@ function St({ strings: t, onClose: e }) {
956
956
  i.key === "Escape" && e();
957
957
  };
958
958
  return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
959
- }, [e]), /* @__PURE__ */ o("div", { className: "peeek__about-backdrop", onClick: e, children: /* @__PURE__ */ y(
959
+ }, [e]), /* @__PURE__ */ r("div", { className: "peeek__about-backdrop", onClick: e, children: /* @__PURE__ */ y(
960
960
  "div",
961
961
  {
962
962
  role: "dialog",
@@ -965,7 +965,7 @@ function St({ strings: t, onClose: e }) {
965
965
  className: "peeek__about",
966
966
  onClick: (a) => a.stopPropagation(),
967
967
  children: [
968
- /* @__PURE__ */ o("span", { className: "peeek__about-particles", "aria-hidden": "true", children: xt.map((a, i) => /* @__PURE__ */ o(
968
+ /* @__PURE__ */ r("span", { className: "peeek__about-particles", "aria-hidden": "true", children: xt.map((a, i) => /* @__PURE__ */ r(
969
969
  "span",
970
970
  {
971
971
  className: "peeek__about-particle",
@@ -979,7 +979,7 @@ function St({ strings: t, onClose: e }) {
979
979
  },
980
980
  i
981
981
  )) }),
982
- /* @__PURE__ */ o(
982
+ /* @__PURE__ */ r(
983
983
  "button",
984
984
  {
985
985
  ref: n,
@@ -992,7 +992,7 @@ function St({ strings: t, onClose: e }) {
992
992
  ),
993
993
  /* @__PURE__ */ y("div", { className: "peeek__about-content", children: [
994
994
  /* @__PURE__ */ y("div", { className: "peeek__about-orbwrap", children: [
995
- /* @__PURE__ */ o("span", { className: "peeek__about-ring", "aria-hidden": "true" }),
995
+ /* @__PURE__ */ r("span", { className: "peeek__about-ring", "aria-hidden": "true" }),
996
996
  /* @__PURE__ */ y(
997
997
  "svg",
998
998
  {
@@ -1002,13 +1002,13 @@ function St({ strings: t, onClose: e }) {
1002
1002
  viewBox: "0 0 256 256",
1003
1003
  "aria-hidden": "true",
1004
1004
  children: [
1005
- /* @__PURE__ */ o("defs", { children: /* @__PURE__ */ y("radialGradient", { id: "peeek-about-orb", cx: "38%", cy: "30%", r: "80%", children: [
1006
- /* @__PURE__ */ o("stop", { offset: "0%", stopColor: "#9aa2e6" }),
1007
- /* @__PURE__ */ o("stop", { offset: "55%", stopColor: "#6E79D6" }),
1008
- /* @__PURE__ */ o("stop", { offset: "100%", stopColor: "#535cc0" })
1005
+ /* @__PURE__ */ r("defs", { children: /* @__PURE__ */ y("radialGradient", { id: "peeek-about-orb", cx: "38%", cy: "30%", r: "80%", children: [
1006
+ /* @__PURE__ */ r("stop", { offset: "0%", stopColor: "#9aa2e6" }),
1007
+ /* @__PURE__ */ r("stop", { offset: "55%", stopColor: "#6E79D6" }),
1008
+ /* @__PURE__ */ r("stop", { offset: "100%", stopColor: "#535cc0" })
1009
1009
  ] }) }),
1010
- /* @__PURE__ */ o("circle", { cx: "128", cy: "128", r: "128", fill: "url(#peeek-about-orb)" }),
1011
- /* @__PURE__ */ o(
1010
+ /* @__PURE__ */ r("circle", { cx: "128", cy: "128", r: "128", fill: "url(#peeek-about-orb)" }),
1011
+ /* @__PURE__ */ r(
1012
1012
  "path",
1013
1013
  {
1014
1014
  d: "M90 196 V70 H140 A38 38 0 0 1 140 146 H90",
@@ -1023,26 +1023,36 @@ function St({ strings: t, onClose: e }) {
1023
1023
  }
1024
1024
  )
1025
1025
  ] }),
1026
- /* @__PURE__ */ o("div", { className: "peeek__about-name", children: "Peeek Viewer" }),
1027
- /* @__PURE__ */ o("div", { className: "peeek__about-tagline", children: t.aboutTagline }),
1026
+ /* @__PURE__ */ r("div", { className: "peeek__about-name", children: "Peeek Viewer" }),
1027
+ /* @__PURE__ */ r("div", { className: "peeek__about-tagline", children: t.aboutTagline }),
1028
1028
  /* @__PURE__ */ y("div", { className: "peeek__about-version", children: [
1029
1029
  "v",
1030
- "0.4.7"
1030
+ "0.4.9"
1031
1031
  ] }),
1032
- /* @__PURE__ */ o("p", { className: "peeek__about-desc", children: t.aboutDescription })
1032
+ /* @__PURE__ */ r("p", { className: "peeek__about-desc", children: t.aboutDescription }),
1033
+ /* @__PURE__ */ r(
1034
+ "a",
1035
+ {
1036
+ className: "peeek__about-link",
1037
+ href: "https://peeek.page",
1038
+ target: "_blank",
1039
+ rel: "noopener noreferrer",
1040
+ children: "peeek.page"
1041
+ }
1042
+ )
1033
1043
  ] })
1034
1044
  ]
1035
1045
  }
1036
1046
  ) });
1037
1047
  }
1038
1048
  function Ft(t) {
1039
- const e = gt(t), n = dt(e.language), a = E(null), { isFullscreen: i, toggle: d } = ht(a), [_, h] = v(!1), g = t.pages !== void 0, c = et(
1049
+ const e = gt(t), n = dt(e.language), a = E(null), { isFullscreen: i, toggle: d } = ht(a), [h, k] = v(!1), g = t.pages !== void 0, u = et(
1040
1050
  () => g ? pt(t.pages, { filename: t.filename, mimeType: t.mimeType }) : null,
1041
1051
  [g, t.pages, t.filename, t.mimeType]
1042
- ), w = bt(g ? null : e.src, e.pollInterval), k = g ? c : w.manifest, f = g ? c ? "ready" : "loading" : w.state, u = {
1052
+ ), w = bt(g ? null : e.src, e.pollInterval), _ = g ? u : w.manifest, f = g ? u ? "ready" : "loading" : w.state, s = {
1043
1053
  "--peeek-accent": e.accentColor
1044
1054
  };
1045
- e.background === "transparent" ? u["--peeek-bg"] = "transparent" : e.background === "color" && e.backgroundColor ? u["--peeek-bg"] = e.backgroundColor : e.background === "image" && e.backgroundImage && (u["--peeek-bg"] = `center / cover no-repeat url("${e.backgroundImage}")`);
1055
+ e.background === "transparent" ? s["--peeek-bg"] = "transparent" : e.background === "color" && e.backgroundColor ? s["--peeek-bg"] = e.backgroundColor : e.background === "image" && e.backgroundImage && (s["--peeek-bg"] = `center / cover no-repeat url("${e.backgroundImage}")`);
1046
1056
  const l = {
1047
1057
  toolbar: e.navigationControls,
1048
1058
  bar: e.navigationBar,
@@ -1059,39 +1069,39 @@ function Ft(t) {
1059
1069
  "div",
1060
1070
  {
1061
1071
  ref: a,
1062
- className: `peeek${e.fillHeight ? " peeek--fill-height" : ""}${e.className ? " " + e.className : ""}`,
1072
+ className: `peeek${e.fillHeight ? " peeek--fill-height" : ""}${h ? " peeek--about-open" : ""}${e.className ? " " + e.className : ""}`,
1063
1073
  "data-skin": e.skin,
1064
1074
  "data-layout": e.layout,
1065
1075
  dir: e.rtl ? "rtl" : void 0,
1066
- style: u,
1076
+ style: s,
1067
1077
  children: [
1068
- /* @__PURE__ */ o(It, { logo: e.logo, logoLink: e.logoLink }),
1078
+ /* @__PURE__ */ r(It, { logo: e.logo, logoLink: e.logoLink }),
1069
1079
  f === "loading" && /* @__PURE__ */ y("div", { className: "peeek__state", style: e.loadingColor ? { color: e.loadingColor } : void 0, children: [
1070
- e.loadingImage && /* @__PURE__ */ o("img", { className: "peeek__state-img", src: e.loadingImage, alt: "", referrerPolicy: "no-referrer" }),
1071
- /* @__PURE__ */ o("span", { children: e.loadingCaption ?? n.loading })
1080
+ e.loadingImage && /* @__PURE__ */ r("img", { className: "peeek__state-img", src: e.loadingImage, alt: "", referrerPolicy: "no-referrer" }),
1081
+ /* @__PURE__ */ r("span", { children: e.loadingCaption ?? n.loading })
1072
1082
  ] }),
1073
- f === "error" && /* @__PURE__ */ o("div", { className: "peeek__state", children: n.error }),
1074
- f === "ready" && k && e.mode === "coverflow" && /* @__PURE__ */ o(
1083
+ f === "error" && /* @__PURE__ */ r("div", { className: "peeek__state", children: n.error }),
1084
+ f === "ready" && _ && e.mode === "coverflow" && /* @__PURE__ */ r(
1075
1085
  Pt,
1076
1086
  {
1077
- pages: k.pages,
1087
+ pages: _.pages,
1078
1088
  strings: n,
1079
- filename: k.metadata.filename,
1080
- mimeType: k.metadata.mimeType,
1089
+ filename: _.metadata.filename,
1090
+ mimeType: _.metadata.mimeType,
1081
1091
  rtl: e.rtl,
1082
1092
  autoTransition: e.autoTransition,
1083
1093
  autoTransitionInterval: e.autoTransitionInterval,
1084
1094
  downloadUrl: e.downloadUrl,
1085
1095
  isFullscreen: i,
1086
1096
  onToggleFullscreen: d,
1087
- onAbout: () => h(!0),
1097
+ onAbout: () => k(!0),
1088
1098
  show: { arrows: e.arrows, thumbnails: e.pagesOverview, fullscreen: e.fullscreen, about: e.aboutButton, goto: e.goToPage }
1089
1099
  }
1090
1100
  ),
1091
- f === "ready" && k && e.mode === "flip" && /* @__PURE__ */ o(
1101
+ f === "ready" && _ && e.mode === "flip" && /* @__PURE__ */ r(
1092
1102
  Tt,
1093
1103
  {
1094
- pages: k.pages,
1104
+ pages: _.pages,
1095
1105
  strings: n,
1096
1106
  layout: e.layout,
1097
1107
  rtl: e.rtl,
@@ -1103,10 +1113,10 @@ function Ft(t) {
1103
1113
  downloadUrl: e.downloadUrl,
1104
1114
  isFullscreen: i,
1105
1115
  onToggleFullscreen: d,
1106
- onAbout: () => h(!0)
1116
+ onAbout: () => k(!0)
1107
1117
  }
1108
1118
  ),
1109
- _ && /* @__PURE__ */ o(St, { strings: n, onClose: () => h(!1) })
1119
+ h && /* @__PURE__ */ r(St, { strings: n, onClose: () => k(!1) })
1110
1120
  ]
1111
1121
  }
1112
1122
  );
@@ -1 +1 @@
1
- .peeek{--peeek-accent: #6E79D6;--peeek-bg: #0b0b10;--peeek-surface: rgba(255, 255, 255, .06);--peeek-text: #f5f5fa;--peeek-radius: 16px;position:relative;display:flex;flex-direction:column;width:100%;color:var(--peeek-text);background:var(--peeek-bg);border-radius:var(--peeek-radius);overflow:hidden;font-family:ui-sans-serif,system-ui,sans-serif;container-type:inline-size}.peeek__stage{position:relative;display:flex;align-items:center;justify-content:center;flex:1;min-height:24rem;padding:1.75rem 3rem;overflow:hidden;perspective:2000px}.peeek__zoom{display:flex;align-items:center;justify-content:center;width:100%;height:100%;transform-origin:center center}.peeek__zoom--pannable{cursor:grab;touch-action:none}.peeek__zoom--pannable:active{cursor:grabbing}.peeek__zoom--pannable img{pointer-events:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.peeek__spread{position:relative;display:flex;width:100%;transition:transform .5s cubic-bezier(.6,.05,.3,.95);transform-style:preserve-3d}.peeek__page{position:relative;width:50%;aspect-ratio:var(--peeek-aspect, .707);background:#fff;overflow:hidden}.peeek__page--empty{background:transparent;box-shadow:none}.peeek__page--left{border-top-left-radius:8px;border-bottom-left-radius:8px}.peeek__page--right{border-top-right-radius:8px;border-bottom-right-radius:8px}.peeek__spread:not(.peeek__spread--pair) .peeek__page{border-radius:8px}.peeek__page img{display:block;width:100%;height:100%;object-fit:contain}.peeek__page-btn{all:unset;display:block;width:100%;height:100%;cursor:zoom-in}.peeek--shadows .peeek__spread{box-shadow:0 24px 60px -24px #000000b3}.peeek--shadows.peeek__spread--pair{--peeek-spine-x: clamp(7px, 1.6cqi, 30px);--peeek-spine-blur: clamp(10px, 1.9cqi, 36px);--peeek-spine-spread: clamp(6px, 1.2cqi, 22px);--peeek-spine-grad: clamp(4px, .8cqi, 14px)}.peeek--shadows.peeek__spread--pair .peeek__page--left{box-shadow:inset calc(-1 * var(--peeek-spine-x)) 0 var(--peeek-spine-blur) calc(-1 * var(--peeek-spine-spread)) #0009}.peeek--shadows.peeek__spread--pair .peeek__page--right{box-shadow:inset var(--peeek-spine-x) 0 var(--peeek-spine-blur) calc(-1 * var(--peeek-spine-spread)) #0009}.peeek--shadows.peeek__spread--pair .peeek__page--left:after,.peeek--shadows.peeek__spread--pair .peeek__page--right:after{content:"";position:absolute;top:0;bottom:0;width:var(--peeek-spine-grad);pointer-events:none}.peeek--shadows.peeek__spread--pair .peeek__page--left:after{right:0;background:linear-gradient(to right,#0000,#00000047)}.peeek--shadows.peeek__spread--pair .peeek__page--right:after{left:0;background:linear-gradient(to left,#0000,#00000047)}.peeek__leaf{position:absolute;top:0;width:50%;height:100%;z-index:3;transform-style:preserve-3d;transition:transform .62s cubic-bezier(.55,.06,.3,.98);will-change:transform}.peeek__leaf--fwd{left:50%;transform-origin:left center}.peeek__leaf--back{right:50%;transform-origin:right center}.peeek__leaf-face{position:absolute;top:0;right:0;bottom:0;left:0;backface-visibility:hidden;background:#fff;overflow:hidden}.peeek__leaf-face img{display:block;width:100%;height:100%;object-fit:contain}.peeek__leaf-face--back{transform:rotateY(180deg)}.peeek__leaf-face:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;opacity:.15;animation:peeek-curl .62s cubic-bezier(.55,.06,.3,.98) forwards;background:linear-gradient(var(--peeek-curl-dir, to right),rgba(0,0,0,.34),rgba(0,0,0,0) 58%,rgba(255,255,255,.05))}.peeek__leaf--fwd .peeek__leaf-face:after{--peeek-curl-dir: to right}.peeek__leaf--back .peeek__leaf-face:after{--peeek-curl-dir: to left}.peeek__leaf-face--back:after{transform:scaleX(-1)}@keyframes peeek-curl{0%{opacity:.15}45%{opacity:1}to{opacity:.55}}.peeek__arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:2;display:flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;border:none;border-radius:9999px;background:#00000059;color:#fff;cursor:pointer}.peeek__arrow:disabled{opacity:.3;cursor:default}.peeek__arrow--prev{left:.75rem}.peeek__arrow--next{right:.75rem}.peeek__toolbar{display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;border-top:1px solid rgba(255,255,255,.08);font-size:14px}.peeek__scrubber{flex:1;height:2px;background:#ffffff26;border-radius:9999px;overflow:hidden}.peeek__scrubber-fill{height:100%;background:var(--peeek-accent)}.peeek__btn{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:none;border-radius:8px;background:transparent;color:var(--peeek-text);cursor:pointer}.peeek__btn:disabled{opacity:.3;cursor:default}.peeek__btn--active{color:var(--peeek-accent)}.peeek__goto{width:3rem;height:2rem;padding:0 .4rem;text-align:center;border:1px solid rgba(255,255,255,.18);border-radius:8px;background:transparent;color:var(--peeek-text);font:inherit}.peeek__goto:focus-visible{outline:2px solid var(--peeek-accent);outline-offset:1px}.peeek__thumbs{display:flex;gap:.4rem;overflow-x:auto;padding:.75rem 1rem;border-top:1px solid rgba(255,255,255,.08)}.peeek__thumb-group{flex:0 0 auto;display:flex;gap:2px;position:relative}.peeek__thumb{flex:0 0 auto;width:4rem;height:5rem;padding:0;border:2px solid transparent;border-radius:6px;background:#fff;cursor:pointer;overflow:hidden}.peeek__thumb img{width:100%;height:100%;object-fit:contain}.peeek__thumb--active{border-color:var(--peeek-accent)}.peeek__thumb--flat-right{border-top-right-radius:0;border-bottom-right-radius:0}.peeek__thumb--flat-left{border-top-left-radius:0;border-bottom-left-radius:0}.peeek__branding{display:flex;align-items:center;gap:.5rem;padding:.5rem 1rem}.peeek__branding img{height:1.5rem;width:auto}.peeek__state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem;min-height:24rem;font-size:16px;color:var(--peeek-text)}.peeek__state-img{max-width:8rem;max-height:8rem;object-fit:contain}@container (max-width: 480px){.peeek__toolbar{gap:.4rem;padding:.5rem .6rem}.peeek__toolbar input[type=range],.peeek__scrubber{display:none}}.peeek[data-skin=minimal] .peeek__toolbar,.peeek[data-skin=minimal] .peeek__thumbs{border-top:none;background:#00000040}.peeek[data-skin=minimal] .peeek__arrow{background:#0003}.peeek[dir=rtl] .peeek__leaf{transform-origin:right center}.peeek__cf{display:flex;flex:1;flex-direction:column;min-height:0}.peeek__cf-header{display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;border-bottom:1px solid rgba(255,255,255,.08);font-size:14px}.peeek__cf-badge{display:flex;align-items:center;justify-content:center;width:2.5rem;height:2.75rem;flex:0 0 auto;border-radius:6px;background:var(--peeek-accent);color:#fff;font-size:13px;font-weight:700}.peeek__cf-meta{display:flex;min-width:0;flex:1;flex-direction:column}.peeek__cf-name{overflow:hidden;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.peeek__cf-count{font-size:14px;opacity:.6}.peeek__cf-indicator{padding:.25rem .75rem;border:1px solid rgba(255,255,255,.1);border-radius:8px;font-family:ui-monospace,monospace;font-size:14px}.peeek__cf-stage{position:relative;display:flex;flex:1;align-items:center;justify-content:center;min-height:20rem;overflow:hidden;perspective:1400px}.peeek__cf-card{position:absolute;display:flex;max-width:55%;align-items:center;justify-content:center;padding:0;border:none;background:transparent;cursor:pointer;transition:transform .3s ease-out,opacity .3s ease-out}.peeek__cf-card--center{max-width:70%}.peeek__cf-card--zoom{cursor:zoom-in}.peeek__cf-card img{max-width:100%;max-height:19rem;border-radius:8px;background:#fff;object-fit:contain;box-shadow:0 18px 40px -12px #0009}.peeek__cf-thumbs{display:flex;gap:.5rem;overflow-x:auto;padding:.75rem 1rem;border-top:1px solid rgba(255,255,255,.08);scrollbar-width:none}.peeek__cf-thumbs::-webkit-scrollbar{display:none}.peeek__cf-thumb{display:flex;flex:0 0 auto;flex-direction:column;align-items:center;gap:.25rem;padding:.25rem;border:2px solid transparent;border-radius:8px;background:transparent;cursor:pointer}.peeek__cf-thumb img{width:3rem;height:4rem;border-radius:4px;background:#fff;object-fit:cover;opacity:.8}.peeek__cf-thumb--active{border-color:var(--peeek-accent);background:#ffffff0f}.peeek__cf-thumb--active img{opacity:1}.peeek__cf-thumb-num{font-family:ui-monospace,monospace;font-size:14px;opacity:.6}.peeek__cf-thumb--active .peeek__cf-thumb-num{color:var(--peeek-accent);opacity:1}.peeek:fullscreen .peeek__cf-card img{max-height:78vh}.peeek:fullscreen .peeek__spread{width:auto;height:100%}.peeek:fullscreen .peeek__page{width:auto;height:100%}.peeek[data-skin=minimal] .peeek__cf-header,.peeek[data-skin=minimal] .peeek__cf-thumbs{border-color:transparent;background:#00000040}.peeek[data-skin=showcase] .peeek__label{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:14px}.peeek[data-skin=showcase] .peeek__scrubber{height:2px}.peeek[data-skin=showcase] .peeek__scrubber-fill{background:var(--peeek-accent)}.peeek[data-skin=showcase] .peeek__arrow{width:2.5rem;height:2.5rem;border-radius:9999px;background:#0000004d;color:#fff;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.peeek[data-skin=showcase] .peeek__arrow:hover{background:#00000080}.peeek__thumb-badge{position:absolute;right:2px;bottom:2px;padding:0 4px;border-radius:4px;background:#000000b3;color:#fff;font-size:14px;font-weight:500;pointer-events:none}.peeek--fill-height{height:100%}.peeek--fill-height .peeek__stage{min-height:0}.peeek--fill-height .peeek__spread,.peeek--fill-height .peeek__page{width:auto;height:100%}.peeek__stage[data-layout=double] .peeek__spread:not(.peeek__spread--pair) .peeek__page--right{border-radius:0 8px 8px 0}.peeek__stage[data-layout=double] .peeek__spread:not(.peeek__spread--pair) .peeek__page--left{border-radius:8px 0 0 8px}.peeek__stage[data-layout=double] .peeek__leaf--fwd .peeek__leaf-face--front{border-top-right-radius:8px;border-bottom-right-radius:8px}.peeek__stage[data-layout=double] .peeek__leaf--fwd .peeek__leaf-face--back,.peeek__stage[data-layout=double] .peeek__leaf--back .peeek__leaf-face--front{border-top-left-radius:8px;border-bottom-left-radius:8px}.peeek__stage[data-layout=double] .peeek__leaf--back .peeek__leaf-face--back{border-top-right-radius:8px;border-bottom-right-radius:8px}.peeek__stage[data-layout=single] .peeek__leaf-face{border-radius:8px}.peeek__about-backdrop{position:absolute;top:0;right:0;bottom:0;left:0;z-index:100;display:flex;align-items:center;align-items:safe center;justify-content:center;overflow-y:auto;padding:1rem;background:#06060c9e;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}.peeek__about{position:relative;width:100%;max-width:360px;box-sizing:border-box;padding:1.75rem 1.5rem 1.25rem;text-align:center;color:var(--peeek-text);background:#16161f;border:1px solid rgba(255,255,255,.1);border-radius:var(--peeek-radius);box-shadow:0 24px 60px #00000080;overflow:hidden;-webkit-user-select:none;user-select:none}.peeek__about-particles{position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;pointer-events:none;overflow:hidden}.peeek__about-particle{position:absolute;border-radius:9999px;background:#6e79d673;box-shadow:0 0 9px #6e79d659}@keyframes peeekAboutDriftA{0%,to{transform:translate(0)}50%{transform:translate(6px,-8px)}}@keyframes peeekAboutDriftB{0%,to{transform:translate(0)}50%{transform:translate(-7px,6px)}}@keyframes peeekAboutDriftC{0%,to{transform:translate(0)}50%{transform:translate(5px,7px)}}.peeek__about-content{position:relative;z-index:1}.peeek__about-orbwrap{position:relative;width:48px;height:48px;margin-inline:auto;border-radius:9999px;animation:peeekAboutPulse 3.2s ease-in-out infinite}.peeek__about-ring{position:absolute;top:-5px;right:-5px;bottom:-5px;left:-5px;border-radius:9999px;background:conic-gradient(from 0deg,transparent 0 66%,#828ce0 86%,transparent 100%);-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 3px));mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 3px));animation:peeekAboutSpin 2.6s linear infinite}@keyframes peeekAboutSpin{to{transform:rotate(360deg)}}@keyframes peeekAboutPulse{0%,to{box-shadow:0 0 26px -8px #6e79d699}50%{box-shadow:0 0 40px -4px #6e79d6e6}}@media (prefers-reduced-motion: reduce){.peeek__about-particle,.peeek__about-ring,.peeek__about-orbwrap{animation:none}}.peeek__about-close{position:absolute;top:.5rem;right:.5rem;display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;border:none;border-radius:8px;background:transparent;color:var(--peeek-text);font-size:20px;line-height:1;cursor:pointer}.peeek__about-close:hover{background:#ffffff14}.peeek__about-mark{display:block;margin-inline:auto;color:var(--peeek-accent)}.peeek__about-name{margin-top:.5rem;font-size:20px;font-weight:700;letter-spacing:.01em}.peeek__about-tagline{margin-top:.25rem;font-size:14px;color:#f5f5fab3}.peeek__about-version{display:inline-block;margin-top:.75rem;padding:.15rem .6rem;font-size:14px;font-weight:600;color:var(--peeek-accent);background:#6e79d629;border-radius:9999px}.peeek__about-desc{margin:.9rem 0 0;font-size:14px;line-height:1.5;color:#f5f5fad1}
1
+ .peeek{--peeek-accent: #6E79D6;--peeek-bg: #0b0b10;--peeek-surface: rgba(255, 255, 255, .06);--peeek-text: #f5f5fa;--peeek-radius: 16px;position:relative;display:flex;flex-direction:column;width:100%;color:var(--peeek-text);background:var(--peeek-bg);border-radius:var(--peeek-radius);overflow:hidden;font-family:ui-sans-serif,system-ui,sans-serif;container-type:inline-size}.peeek__stage{position:relative;display:flex;align-items:center;justify-content:center;flex:1;min-height:24rem;padding:1.75rem 3rem;overflow:hidden;perspective:2000px}.peeek__zoom{display:flex;align-items:center;justify-content:center;width:100%;height:100%;transform-origin:center center}.peeek__zoom--pannable{cursor:grab;touch-action:none}.peeek__zoom--pannable:active{cursor:grabbing}.peeek__zoom--pannable img{pointer-events:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.peeek__spread{position:relative;display:flex;width:100%;transition:transform .5s cubic-bezier(.6,.05,.3,.95);transform-style:preserve-3d}.peeek__page{position:relative;width:50%;aspect-ratio:var(--peeek-aspect, .707);background:#fff;overflow:hidden}.peeek__page--empty{background:transparent;box-shadow:none}.peeek__page--left{border-top-left-radius:8px;border-bottom-left-radius:8px}.peeek__page--right{border-top-right-radius:8px;border-bottom-right-radius:8px}.peeek__spread:not(.peeek__spread--pair) .peeek__page{border-radius:8px}.peeek__page img{display:block;width:100%;height:100%;object-fit:contain}.peeek__page-btn{all:unset;display:block;width:100%;height:100%;cursor:zoom-in}.peeek--shadows .peeek__spread{box-shadow:0 24px 60px -24px #000000b3}.peeek--shadows.peeek__spread--pair{--peeek-spine-x: clamp(7px, 1.6cqi, 30px);--peeek-spine-blur: clamp(10px, 1.9cqi, 36px);--peeek-spine-spread: clamp(6px, 1.2cqi, 22px);--peeek-spine-grad: clamp(4px, .8cqi, 14px)}.peeek--shadows.peeek__spread--pair .peeek__page--left{box-shadow:inset calc(-1 * var(--peeek-spine-x)) 0 var(--peeek-spine-blur) calc(-1 * var(--peeek-spine-spread)) #0009}.peeek--shadows.peeek__spread--pair .peeek__page--right{box-shadow:inset var(--peeek-spine-x) 0 var(--peeek-spine-blur) calc(-1 * var(--peeek-spine-spread)) #0009}.peeek--shadows.peeek__spread--pair .peeek__page--left:after,.peeek--shadows.peeek__spread--pair .peeek__page--right:after{content:"";position:absolute;top:0;bottom:0;width:var(--peeek-spine-grad);pointer-events:none}.peeek--shadows.peeek__spread--pair .peeek__page--left:after{right:0;background:linear-gradient(to right,#0000,#00000047)}.peeek--shadows.peeek__spread--pair .peeek__page--right:after{left:0;background:linear-gradient(to left,#0000,#00000047)}.peeek__leaf{position:absolute;top:0;width:50%;height:100%;z-index:3;transform-style:preserve-3d;transition:transform .62s cubic-bezier(.55,.06,.3,.98);will-change:transform}.peeek__leaf--fwd{left:50%;transform-origin:left center}.peeek__leaf--back{right:50%;transform-origin:right center}.peeek__leaf-face{position:absolute;top:0;right:0;bottom:0;left:0;backface-visibility:hidden;background:#fff;overflow:hidden}.peeek__leaf-face img{display:block;width:100%;height:100%;object-fit:contain}.peeek__leaf-face--back{transform:rotateY(180deg)}.peeek__leaf-face:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;opacity:.15;animation:peeek-curl .62s cubic-bezier(.55,.06,.3,.98) forwards;background:linear-gradient(var(--peeek-curl-dir, to right),rgba(0,0,0,.34),rgba(0,0,0,0) 58%,rgba(255,255,255,.05))}.peeek__leaf--fwd .peeek__leaf-face:after{--peeek-curl-dir: to right}.peeek__leaf--back .peeek__leaf-face:after{--peeek-curl-dir: to left}.peeek__leaf-face--back:after{transform:scaleX(-1)}@keyframes peeek-curl{0%{opacity:.15}45%{opacity:1}to{opacity:.55}}.peeek__arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:2;display:flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;border:none;border-radius:9999px;background:#00000059;color:#fff;cursor:pointer}.peeek__arrow:disabled{opacity:.3;cursor:default}.peeek__arrow--prev{left:.75rem}.peeek__arrow--next{right:.75rem}.peeek__toolbar{display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;border-top:1px solid rgba(255,255,255,.08);font-size:14px}.peeek__scrubber{flex:1;height:2px;background:#ffffff26;border-radius:9999px;overflow:hidden}.peeek__scrubber-fill{height:100%;background:var(--peeek-accent)}.peeek__btn{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:none;border-radius:8px;background:transparent;color:var(--peeek-text);cursor:pointer}.peeek__btn:disabled{opacity:.3;cursor:default}.peeek__btn--active{color:var(--peeek-accent)}.peeek__goto{width:3rem;height:2rem;padding:0 .4rem;text-align:center;border:1px solid rgba(255,255,255,.18);border-radius:8px;background:transparent;color:var(--peeek-text);font:inherit}.peeek__goto:focus-visible{outline:2px solid var(--peeek-accent);outline-offset:1px}.peeek__thumbs{display:flex;gap:.4rem;overflow-x:auto;padding:.75rem 1rem;border-top:1px solid rgba(255,255,255,.08)}.peeek__thumb-group{flex:0 0 auto;display:flex;gap:2px;position:relative}.peeek__thumb{flex:0 0 auto;width:4rem;height:5rem;padding:0;border:2px solid transparent;border-radius:6px;background:#fff;cursor:pointer;overflow:hidden}.peeek__thumb img{width:100%;height:100%;object-fit:contain}.peeek__thumb--active{border-color:var(--peeek-accent)}.peeek__thumb--flat-right{border-top-right-radius:0;border-bottom-right-radius:0}.peeek__thumb--flat-left{border-top-left-radius:0;border-bottom-left-radius:0}.peeek__branding{display:flex;align-items:center;gap:.5rem;padding:.5rem 1rem}.peeek__branding img{height:1.5rem;width:auto}.peeek__state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem;min-height:24rem;font-size:16px;color:var(--peeek-text)}.peeek__state-img{max-width:8rem;max-height:8rem;object-fit:contain}@container (max-width: 480px){.peeek__toolbar{gap:.4rem;padding:.5rem .6rem}.peeek__toolbar input[type=range],.peeek__scrubber{display:none}}.peeek[data-skin=minimal] .peeek__toolbar,.peeek[data-skin=minimal] .peeek__thumbs{border-top:none;background:#00000040}.peeek[data-skin=minimal] .peeek__arrow{background:#0003}.peeek[dir=rtl] .peeek__leaf{transform-origin:right center}.peeek__cf{display:flex;flex:1;flex-direction:column;min-height:0}.peeek__cf-header{display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;border-bottom:1px solid rgba(255,255,255,.08);font-size:14px}.peeek__cf-badge{display:flex;align-items:center;justify-content:center;width:2.5rem;height:2.75rem;flex:0 0 auto;border-radius:6px;background:var(--peeek-accent);color:#fff;font-size:13px;font-weight:700}.peeek__cf-meta{display:flex;min-width:0;flex:1;flex-direction:column}.peeek__cf-name{overflow:hidden;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.peeek__cf-count{font-size:14px;opacity:.6}.peeek__cf-indicator{padding:.25rem .75rem;border:1px solid rgba(255,255,255,.1);border-radius:8px;font-family:ui-monospace,monospace;font-size:14px}.peeek__cf-stage{position:relative;display:flex;flex:1;align-items:center;justify-content:center;min-height:20rem;overflow:hidden;perspective:1400px}.peeek__cf-card{position:absolute;display:flex;max-width:55%;align-items:center;justify-content:center;padding:0;border:none;background:transparent;cursor:pointer;transition:transform .3s ease-out,opacity .3s ease-out}.peeek__cf-card--center{max-width:70%}.peeek__cf-card--zoom{cursor:zoom-in}.peeek__cf-card img{max-width:100%;max-height:19rem;border-radius:8px;background:#fff;object-fit:contain;box-shadow:0 18px 40px -12px #0009}.peeek__cf-thumbs{display:flex;gap:.5rem;overflow-x:auto;padding:.75rem 1rem;border-top:1px solid rgba(255,255,255,.08);scrollbar-width:none}.peeek__cf-thumbs::-webkit-scrollbar{display:none}.peeek__cf-thumb{display:flex;flex:0 0 auto;flex-direction:column;align-items:center;gap:.25rem;padding:.25rem;border:2px solid transparent;border-radius:8px;background:transparent;cursor:pointer}.peeek__cf-thumb img{width:3rem;height:4rem;border-radius:4px;background:#fff;object-fit:cover;opacity:.8}.peeek__cf-thumb--active{border-color:var(--peeek-accent);background:#ffffff0f}.peeek__cf-thumb--active img{opacity:1}.peeek__cf-thumb-num{font-family:ui-monospace,monospace;font-size:14px;opacity:.6}.peeek__cf-thumb--active .peeek__cf-thumb-num{color:var(--peeek-accent);opacity:1}.peeek:fullscreen .peeek__cf-card img{max-height:78vh}.peeek:fullscreen .peeek__spread{width:auto;height:100%}.peeek:fullscreen .peeek__page{width:auto;height:100%}.peeek[data-skin=minimal] .peeek__cf-header,.peeek[data-skin=minimal] .peeek__cf-thumbs{border-color:transparent;background:#00000040}.peeek[data-skin=showcase] .peeek__label{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:14px}.peeek[data-skin=showcase] .peeek__scrubber{height:2px}.peeek[data-skin=showcase] .peeek__scrubber-fill{background:var(--peeek-accent)}.peeek[data-skin=showcase] .peeek__arrow{width:2.5rem;height:2.5rem;border-radius:9999px;background:#0000004d;color:#fff;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.peeek[data-skin=showcase] .peeek__arrow:hover{background:#00000080}.peeek__thumb-badge{position:absolute;right:2px;bottom:2px;padding:0 4px;border-radius:4px;background:#000000b3;color:#fff;font-size:14px;font-weight:500;pointer-events:none}.peeek--fill-height{height:100%}.peeek--fill-height .peeek__stage{min-height:0}.peeek--fill-height .peeek__spread,.peeek--fill-height .peeek__page{width:auto;height:100%}.peeek__stage[data-layout=double] .peeek__spread:not(.peeek__spread--pair) .peeek__page--right{border-radius:0 8px 8px 0}.peeek__stage[data-layout=double] .peeek__spread:not(.peeek__spread--pair) .peeek__page--left{border-radius:8px 0 0 8px}.peeek__stage[data-layout=double] .peeek__leaf--fwd .peeek__leaf-face--front{border-top-right-radius:8px;border-bottom-right-radius:8px}.peeek__stage[data-layout=double] .peeek__leaf--fwd .peeek__leaf-face--back,.peeek__stage[data-layout=double] .peeek__leaf--back .peeek__leaf-face--front{border-top-left-radius:8px;border-bottom-left-radius:8px}.peeek__stage[data-layout=double] .peeek__leaf--back .peeek__leaf-face--back{border-top-right-radius:8px;border-bottom-right-radius:8px}.peeek__stage[data-layout=single] .peeek__leaf-face{border-radius:8px}.peeek__about-backdrop{position:absolute;top:0;right:0;bottom:0;left:0;z-index:100;display:flex;align-items:center;align-items:safe center;justify-content:center;overflow-y:auto;padding:1rem;background:#06060c9e;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}.peeek__about{position:relative;width:100%;max-width:360px;box-sizing:border-box;padding:1.75rem 1.5rem 1.25rem;text-align:center;color:var(--peeek-text);background:#16161f;border:1px solid rgba(255,255,255,.1);border-radius:var(--peeek-radius);box-shadow:0 24px 60px #00000080;overflow:hidden;-webkit-user-select:none;user-select:none}.peeek__about-particles{position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;pointer-events:none;overflow:hidden}.peeek__about-particle{position:absolute;border-radius:9999px;background:#6e79d673;box-shadow:0 0 9px #6e79d659}@keyframes peeekAboutDriftA{0%,to{transform:translate(0)}50%{transform:translate(6px,-8px)}}@keyframes peeekAboutDriftB{0%,to{transform:translate(0)}50%{transform:translate(-7px,6px)}}@keyframes peeekAboutDriftC{0%,to{transform:translate(0)}50%{transform:translate(5px,7px)}}.peeek__about-content{position:relative;z-index:1}.peeek__about-orbwrap{position:relative;width:48px;height:48px;margin-inline:auto;border-radius:9999px;animation:peeekAboutPulse 3.2s ease-in-out infinite}.peeek__about-ring{position:absolute;top:-5px;right:-5px;bottom:-5px;left:-5px;border-radius:9999px;background:conic-gradient(from 0deg,transparent 0 66%,#828ce0 86%,transparent 100%);-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 3px));mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 3px));animation:peeekAboutSpin 2.6s linear infinite}@keyframes peeekAboutSpin{to{transform:rotate(360deg)}}@keyframes peeekAboutPulse{0%,to{box-shadow:0 0 26px -8px #6e79d699}50%{box-shadow:0 0 40px -4px #6e79d6e6}}@media (prefers-reduced-motion: reduce){.peeek__about-particle,.peeek__about-ring,.peeek__about-orbwrap{animation:none}}.peeek__about-close{position:absolute;top:.5rem;right:.5rem;display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;border:none;border-radius:8px;background:transparent;color:var(--peeek-text);font-size:20px;line-height:1;cursor:pointer}.peeek__about-close:hover{background:#ffffff14}.peeek__about-mark{display:block;margin-inline:auto;color:var(--peeek-accent)}.peeek__about-name{margin-top:.5rem;font-size:20px;font-weight:700;letter-spacing:.01em}.peeek__about-tagline{margin-top:.25rem;font-size:14px;color:#f5f5fab3}.peeek__about-version{display:inline-block;margin-top:.75rem;padding:.15rem .6rem;font-size:14px;font-weight:600;color:var(--peeek-accent);background:#6e79d629;border-radius:9999px}.peeek__about-desc{margin:.9rem 0 0;font-size:14px;line-height:1.5;color:#f5f5fad1}.peeek__about-link{display:inline-block;margin:.9rem 0 0;font-size:14px;font-weight:600;color:var(--peeek-accent, #6E79D6);text-decoration:none}.peeek__about-link:hover{text-decoration:underline}.peeek--about-open .peeek__stage,.peeek--about-open .peeek__toolbar{filter:blur(4px);transition:filter .2s ease-out}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peeekpage/viewer",
3
- "version": "0.4.7",
3
+ "version": "0.4.9",
4
4
  "description": "PeeekViewer: embeddable document viewer (flip and coverflow) for peeek.page.",
5
5
  "type": "module",
6
6
  "license": "MIT",