@readerseye2/cr_viewer 1.0.22 → 1.0.23

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
@@ -3496,10 +3496,10 @@ const wl = /* @__PURE__ */ xe(
3496
3496
  return yl(so(bt, Vt, J));
3497
3497
  }
3498
3498
  const Ne = ki(Oe, Te, le);
3499
- let Le, $e;
3500
- re ? K === 0 && ne === 0 && se > 0 ? (Le = 0, $e = se - 1) : (Le = Ne * Sn((K + we) / (me + we)), $e = Ne * oo((ne + we) / (me + we)) - 1, $e = Vn(z - 1, Kt($e, Ne - 1)), Le = Vn($e, Kt(0, Le))) : (Le = 0, $e = -1);
3501
- const ut = so(Le, $e, J), { bottom: Qe, top: He } = lo(V, H, oe, ut), ot = oo(z / Ne), Je = ot * me + (ot - 1) * we - Qe;
3502
- return { bottom: Qe, itemHeight: me, items: ut, itemWidth: Te, offsetBottom: Je, offsetTop: He, top: He };
3499
+ let Ae, $e;
3500
+ re ? K === 0 && ne === 0 && se > 0 ? (Ae = 0, $e = se - 1) : (Ae = Ne * Sn((K + we) / (me + we)), $e = Ne * oo((ne + we) / (me + we)) - 1, $e = Vn(z - 1, Kt($e, Ne - 1)), Ae = Vn($e, Kt(0, Ae))) : (Ae = 0, $e = -1);
3501
+ const ut = so(Ae, $e, J), { bottom: Qe, top: Ge } = lo(V, H, oe, ut), ot = oo(z / Ne), Je = ot * me + (ot - 1) * we - Qe;
3502
+ return { bottom: Qe, itemHeight: me, items: ut, itemWidth: Te, offsetBottom: Je, offsetTop: Ge, top: Ge };
3503
3503
  }
3504
3504
  )
3505
3505
  ),
@@ -5076,7 +5076,7 @@ function Ma(e) {
5076
5076
  function Ea(e) {
5077
5077
  return rt({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z", opacity: ".87" }, child: [] }, { tag: "path", attr: { d: "M17.51 3.87 15.73 2.1 5.84 12l9.9 9.9 1.77-1.77L9.38 12l8.13-8.13z" }, child: [] }] })(e);
5078
5078
  }
5079
- const Oa = "_wrap_1hfub_4", Pa = "_visible_1hfub_25", Ba = "_compact_1hfub_31", za = "_row2_1hfub_34", Aa = "_controls_1hfub_44", La = "_row1_1hfub_52", Ga = "_groupExpand_1hfub_80", Ha = "_groupPlayback_1hfub_81", Na = "_groupSpeed_1hfub_82", Fa = "_groupFeatures_1hfub_83", Wa = "_groupNav_1hfub_84", Da = "_btn_1hfub_116", $a = "_btnForbidden_1hfub_141", Va = "_btnActive_1hfub_147", qa = "_label_1hfub_158", ja = "_compactBtn_1hfub_168", Ge = {
5079
+ const Oa = "_wrap_1hfub_4", Pa = "_visible_1hfub_25", Ba = "_compact_1hfub_31", za = "_row2_1hfub_34", Aa = "_controls_1hfub_44", La = "_row1_1hfub_52", Ga = "_groupExpand_1hfub_80", Ha = "_groupPlayback_1hfub_81", Na = "_groupSpeed_1hfub_82", Fa = "_groupFeatures_1hfub_83", Wa = "_groupNav_1hfub_84", Da = "_btn_1hfub_116", $a = "_btnForbidden_1hfub_141", Va = "_btnActive_1hfub_147", qa = "_label_1hfub_158", ja = "_compactBtn_1hfub_168", Le = {
5080
5080
  wrap: Oa,
5081
5081
  visible: Pa,
5082
5082
  compact: Ba,
@@ -5540,7 +5540,7 @@ function Ic() {
5540
5540
  return /* @__PURE__ */ X(
5541
5541
  "div",
5542
5542
  {
5543
- className: `${Ge.wrap} ${e ? Ge.visible : ""} ${d ? Ge.compact : ""}`,
5543
+ className: `${Le.wrap} ${e ? Le.visible : ""} ${d ? Le.compact : ""}`,
5544
5544
  onClick: (C) => {
5545
5545
  C.stopPropagation();
5546
5546
  },
@@ -5550,21 +5550,21 @@ function Ic() {
5550
5550
  children: [
5551
5551
  !d && /* @__PURE__ */ x(nc, {}),
5552
5552
  /* @__PURE__ */ x("div", { style: d ? { display: "none" } : void 0, children: r && !o ? /* @__PURE__ */ x(Ka, {}) : /* @__PURE__ */ x(oc, {}) }),
5553
- /* @__PURE__ */ X("div", { className: Ge.controls, children: [
5554
- /* @__PURE__ */ X("div", { className: Ge.row1, children: [
5555
- /* @__PURE__ */ x("div", { className: Ge.groupExpand, children: /* @__PURE__ */ x(
5553
+ /* @__PURE__ */ X("div", { className: Le.controls, children: [
5554
+ /* @__PURE__ */ X("div", { className: Le.row1, children: [
5555
+ /* @__PURE__ */ x("div", { className: Le.groupExpand, children: /* @__PURE__ */ x(
5556
5556
  "button",
5557
5557
  {
5558
5558
  type: "button",
5559
5559
  onClick: (C) => {
5560
5560
  C.stopPropagation(), v();
5561
5561
  },
5562
- className: Ge.compactBtn,
5562
+ className: Le.compactBtn,
5563
5563
  title: d ? "오버레이 확대" : "오버레이 축소",
5564
5564
  children: d ? /* @__PURE__ */ x(wc, { size: 24 }) : /* @__PURE__ */ x(xc, { size: 24 })
5565
5565
  }
5566
5566
  ) }),
5567
- /* @__PURE__ */ X("div", { className: Ge.groupPlayback, children: [
5567
+ /* @__PURE__ */ X("div", { className: Le.groupPlayback, children: [
5568
5568
  /* @__PURE__ */ x(xo, { direction: "left" }),
5569
5569
  /* @__PURE__ */ x(
5570
5570
  yc,
@@ -5577,10 +5577,10 @@ function Ic() {
5577
5577
  ),
5578
5578
  /* @__PURE__ */ x(xo, { direction: "right" })
5579
5579
  ] }),
5580
- /* @__PURE__ */ x("div", { className: Ge.groupSpeed, children: /* @__PURE__ */ x(pc, {}) })
5580
+ /* @__PURE__ */ x("div", { className: Le.groupSpeed, children: /* @__PURE__ */ x(pc, {}) })
5581
5581
  ] }),
5582
- /* @__PURE__ */ X("div", { className: Ge.row2, children: [
5583
- /* @__PURE__ */ X("div", { className: Ge.groupFeatures, children: [
5582
+ /* @__PURE__ */ X("div", { className: Le.row2, children: [
5583
+ /* @__PURE__ */ X("div", { className: Le.groupFeatures, children: [
5584
5584
  r && /* @__PURE__ */ X(
5585
5585
  "button",
5586
5586
  {
@@ -5588,11 +5588,11 @@ function Ic() {
5588
5588
  onClick: (C) => {
5589
5589
  C.stopPropagation(), c();
5590
5590
  },
5591
- className: `${Ge.btn} ${o ? "" : Ge.btnActive}`,
5591
+ className: `${Le.btn} ${o ? "" : Le.btnActive}`,
5592
5592
  title: "오디오북 음소거 전환",
5593
5593
  children: [
5594
5594
  o ? /* @__PURE__ */ x(ka, { size: 18 }) : /* @__PURE__ */ x(Ra, { size: 18 }),
5595
- /* @__PURE__ */ x("span", { className: Ge.label, children: "오디오북" })
5595
+ /* @__PURE__ */ x("span", { className: Le.label, children: "오디오북" })
5596
5596
  ]
5597
5597
  }
5598
5598
  ),
@@ -5603,11 +5603,11 @@ function Ic() {
5603
5603
  onClick: (C) => {
5604
5604
  C.stopPropagation(), l();
5605
5605
  },
5606
- className: `${Ge.btn} ${i ? Ge.btnActive : ""}`,
5606
+ className: `${Le.btn} ${i ? Le.btnActive : ""}`,
5607
5607
  title: "포인터 표시",
5608
5608
  children: [
5609
5609
  /* @__PURE__ */ x(_a, { size: 18 }),
5610
- /* @__PURE__ */ x("span", { className: Ge.label, children: "포인터" })
5610
+ /* @__PURE__ */ x("span", { className: Le.label, children: "포인터" })
5611
5611
  ]
5612
5612
  }
5613
5613
  ),
@@ -5619,16 +5619,16 @@ function Ic() {
5619
5619
  C.stopPropagation(), a();
5620
5620
  },
5621
5621
  disabled: !n,
5622
- className: `${Ge.btn} ${s ? Ge.btnActive : ""} ${n ? "" : Ge.btnForbidden}`,
5622
+ className: `${Le.btn} ${s ? Le.btnActive : ""} ${n ? "" : Le.btnForbidden}`,
5623
5623
  title: "끊어읽기 표시",
5624
5624
  children: [
5625
5625
  /* @__PURE__ */ x(Ma, { size: 18 }),
5626
- /* @__PURE__ */ x("span", { className: Ge.label, children: "끊어읽기" })
5626
+ /* @__PURE__ */ x("span", { className: Le.label, children: "끊어읽기" })
5627
5627
  ]
5628
5628
  }
5629
5629
  )
5630
5630
  ] }),
5631
- /* @__PURE__ */ X("div", { className: Ge.groupNav, children: [
5631
+ /* @__PURE__ */ X("div", { className: Le.groupNav, children: [
5632
5632
  /* @__PURE__ */ x(xa, {}),
5633
5633
  /* @__PURE__ */ x(Cn, {})
5634
5634
  ] })
@@ -5671,7 +5671,7 @@ function Pc() {
5671
5671
  )
5672
5672
  ] }) });
5673
5673
  }
5674
- const Bc = N.memo(Pc), zc = "_wrap_62su0_7", Ac = "_wrapHidden_62su0_29", Lc = "_wrapVisible_62su0_35", Gc = "_scrollArea_62su0_71", Hc = "_row_62su0_81", Nc = "_label_62su0_89", Fc = "_btn_62su0_95", Wc = "_btnActive_62su0_106", Dc = "_btnSmall_62su0_110", $c = "_pill_62su0_122", Vc = "_themeCircle_62su0_133", qc = "_themeCircleActive_62su0_146", jc = "_stepRow_62su0_151", Uc = "_stepLabel_62su0_159", Kc = "_levelBox_62su0_172", Qc = "_inlineFlex_62su0_177", Ae = {
5674
+ const Bc = N.memo(Pc), zc = "_wrap_62su0_7", Ac = "_wrapHidden_62su0_29", Lc = "_wrapVisible_62su0_35", Gc = "_scrollArea_62su0_71", Hc = "_row_62su0_81", Nc = "_label_62su0_89", Fc = "_btn_62su0_95", Wc = "_btnActive_62su0_106", Dc = "_btnSmall_62su0_110", $c = "_pill_62su0_122", Vc = "_themeCircle_62su0_133", qc = "_themeCircleActive_62su0_146", jc = "_stepRow_62su0_151", Uc = "_stepLabel_62su0_159", Kc = "_levelBox_62su0_172", Qc = "_inlineFlex_62su0_177", ze = {
5675
5675
  wrap: zc,
5676
5676
  wrapHidden: Ac,
5677
5677
  wrapVisible: Lc,
@@ -5690,21 +5690,21 @@ const Bc = N.memo(Pc), zc = "_wrap_62su0_7", Ac = "_wrapHidden_62su0_29", Lc = "
5690
5690
  inlineFlex: Qc
5691
5691
  };
5692
5692
  function Yc({ visible: e }) {
5693
- const t = Y((h) => h.mode), n = Y((h) => h.setMode), r = Y((h) => h.theme), o = Y((h) => h.setTheme), i = Y((h) => h.fontFamily), s = Y((h) => h.setFontFamily), c = Y((h) => h.resetToDefaults), l = Y((h) => h.getFontLevel()), a = Y((h) => h.getLineLevel()), d = Y((h) => h.getMarginLevel()), v = Y((h) => h.setFontLevel), g = Y((h) => h.setLineLevel), b = Y((h) => h.setMarginLevel), m = Y((h) => h.pointerStyle), y = Y((h) => h.setPointerStyle), p = Y((h) => h.pointerColor), f = Y((h) => h.setPointerColor), u = Y((h) => h.breakMarks), T = Y((h) => h.toggleBreakMark), k = Y((h) => h.getBreakGapLevel()), R = Y((h) => h.setBreakGapLevel), C = `${Ae.wrap} ${e ? Ae.wrapVisible : Ae.wrapHidden}`;
5693
+ const t = Y((h) => h.mode), n = Y((h) => h.setMode), r = Y((h) => h.theme), o = Y((h) => h.setTheme), i = Y((h) => h.fontFamily), s = Y((h) => h.setFontFamily), c = Y((h) => h.resetToDefaults), l = Y((h) => h.getFontLevel()), a = Y((h) => h.getLineLevel()), d = Y((h) => h.getMarginLevel()), v = Y((h) => h.setFontLevel), g = Y((h) => h.setLineLevel), b = Y((h) => h.setMarginLevel), m = Y((h) => h.pointerStyle), y = Y((h) => h.setPointerStyle), p = Y((h) => h.pointerColor), f = Y((h) => h.setPointerColor), u = Y((h) => h.breakMarks), T = Y((h) => h.toggleBreakMark), k = Y((h) => h.getBreakGapLevel()), R = Y((h) => h.setBreakGapLevel), C = `${ze.wrap} ${e ? ze.wrapVisible : ze.wrapHidden}`;
5694
5694
  return /* @__PURE__ */ X("div", { className: C, role: "dialog", "aria-modal": "true", "aria-label": "뷰어 설정", children: [
5695
- /* @__PURE__ */ X("div", { className: Ae.scrollArea, children: [
5696
- /* @__PURE__ */ x(jt, { label: "열람방식", children: /* @__PURE__ */ X("div", { className: Ae.inlineFlex, children: [
5695
+ /* @__PURE__ */ X("div", { className: ze.scrollArea, children: [
5696
+ /* @__PURE__ */ x(jt, { label: "열람방식", children: /* @__PURE__ */ X("div", { className: ze.inlineFlex, children: [
5697
5697
  /* @__PURE__ */ x(Lt, { active: t === "page", onClick: () => n("page"), children: "페이지" }),
5698
5698
  /* @__PURE__ */ x(Lt, { active: t === "scroll", onClick: () => n("scroll"), children: "스크롤" })
5699
5699
  ] }) }),
5700
- /* @__PURE__ */ x(jt, { label: "테마", children: /* @__PURE__ */ x("div", { className: Ae.inlineFlex, children: Object.keys(bn).map((h) => {
5700
+ /* @__PURE__ */ x(jt, { label: "테마", children: /* @__PURE__ */ x("div", { className: ze.inlineFlex, children: Object.keys(bn).map((h) => {
5701
5701
  const S = h, I = bn[S];
5702
5702
  return /* @__PURE__ */ x(
5703
5703
  "button",
5704
5704
  {
5705
5705
  type: "button",
5706
5706
  onClick: () => o(S),
5707
- className: `${Ae.themeCircle} ${r === h ? Ae.themeCircleActive : ""}`,
5707
+ className: `${ze.themeCircle} ${r === h ? ze.themeCircleActive : ""}`,
5708
5708
  style: { background: I.bg, color: I.fg, fontFamily: i },
5709
5709
  title: String(h),
5710
5710
  "aria-label": `테마: ${String(h)}`,
@@ -5713,7 +5713,7 @@ function Yc({ visible: e }) {
5713
5713
  `${h}_tc_button`
5714
5714
  );
5715
5715
  }) }) }),
5716
- /* @__PURE__ */ x(jt, { label: "글꼴", children: /* @__PURE__ */ x("div", { className: Ae.inlineFlex, children: Ko.map((h) => /* @__PURE__ */ x(
5716
+ /* @__PURE__ */ x(jt, { label: "글꼴", children: /* @__PURE__ */ x("div", { className: ze.inlineFlex, children: Ko.map((h) => /* @__PURE__ */ x(
5717
5717
  Lt,
5718
5718
  {
5719
5719
  active: i === h.value,
@@ -5756,7 +5756,7 @@ function Yc({ visible: e }) {
5756
5756
  onInc: () => b(Math.min(5, d + 1))
5757
5757
  }
5758
5758
  ),
5759
- /* @__PURE__ */ x(jt, { label: "포인터", children: /* @__PURE__ */ X("div", { className: Ae.inlineFlex, children: [
5759
+ /* @__PURE__ */ x(jt, { label: "포인터", children: /* @__PURE__ */ X("div", { className: ze.inlineFlex, children: [
5760
5760
  /* @__PURE__ */ x(Lt, { active: m === "highlight", onClick: () => y("highlight"), children: "형광펜" }),
5761
5761
  /* @__PURE__ */ x(Lt, { active: m === "underline", onClick: () => y("underline"), children: "밑줄" }),
5762
5762
  /* @__PURE__ */ x(
@@ -5776,7 +5776,7 @@ function Yc({ visible: e }) {
5776
5776
  }
5777
5777
  )
5778
5778
  ] }) }),
5779
- /* @__PURE__ */ x(jt, { label: "끊기표시", children: /* @__PURE__ */ x("div", { className: Ae.inlineFlex, children: /* @__PURE__ */ x(Lt, { active: u.slash, onClick: () => T("slash"), children: "슬래쉬" }) }) }),
5779
+ /* @__PURE__ */ x(jt, { label: "끊기표시", children: /* @__PURE__ */ x("div", { className: ze.inlineFlex, children: /* @__PURE__ */ x(Lt, { active: u.slash, onClick: () => T("slash"), children: "슬래쉬" }) }) }),
5780
5780
  /* @__PURE__ */ x(
5781
5781
  pn,
5782
5782
  {
@@ -5789,12 +5789,12 @@ function Yc({ visible: e }) {
5789
5789
  }
5790
5790
  )
5791
5791
  ] }),
5792
- /* @__PURE__ */ x("div", { className: Ae.inlineFlex, style: { justifyContent: "center" }, children: /* @__PURE__ */ x("button", { type: "button", onClick: c, className: Ae.pill, children: "보기 설정 초기화" }) })
5792
+ /* @__PURE__ */ x("div", { className: ze.inlineFlex, style: { justifyContent: "center" }, children: /* @__PURE__ */ x("button", { type: "button", onClick: c, className: ze.pill, children: "보기 설정 초기화" }) })
5793
5793
  ] });
5794
5794
  }
5795
5795
  function jt({ label: e, children: t }) {
5796
- return /* @__PURE__ */ X("div", { className: Ae.row, children: [
5797
- /* @__PURE__ */ x("label", { className: Ae.label, children: e }),
5796
+ return /* @__PURE__ */ X("div", { className: ze.row, children: [
5797
+ /* @__PURE__ */ x("label", { className: ze.label, children: e }),
5798
5798
  t
5799
5799
  ] });
5800
5800
  }
@@ -5810,7 +5810,7 @@ function Lt({
5810
5810
  type: "button",
5811
5811
  onClick: t,
5812
5812
  title: n,
5813
- className: `${Ae.btn} ${e ? Ae.btnActive : ""}`,
5813
+ className: `${ze.btn} ${e ? ze.btnActive : ""}`,
5814
5814
  children: r
5815
5815
  }
5816
5816
  );
@@ -5824,28 +5824,28 @@ function pn({
5824
5824
  onInc: i
5825
5825
  }) {
5826
5826
  const s = t <= n, c = t >= r;
5827
- return /* @__PURE__ */ X("div", { className: Ae.stepRow, children: [
5828
- /* @__PURE__ */ x("label", { className: Ae.stepLabel, children: e }),
5829
- /* @__PURE__ */ X("div", { className: Ae.inlineFlex, children: [
5827
+ return /* @__PURE__ */ X("div", { className: ze.stepRow, children: [
5828
+ /* @__PURE__ */ x("label", { className: ze.stepLabel, children: e }),
5829
+ /* @__PURE__ */ X("div", { className: ze.inlineFlex, children: [
5830
5830
  /* @__PURE__ */ x(
5831
5831
  "button",
5832
5832
  {
5833
5833
  type: "button",
5834
5834
  onClick: o,
5835
5835
  disabled: s,
5836
- className: Ae.btnSmall,
5836
+ className: ze.btnSmall,
5837
5837
  "aria-label": "감소",
5838
5838
  children: "−"
5839
5839
  }
5840
5840
  ),
5841
- /* @__PURE__ */ x("div", { className: Ae.levelBox, children: t }),
5841
+ /* @__PURE__ */ x("div", { className: ze.levelBox, children: t }),
5842
5842
  /* @__PURE__ */ x(
5843
5843
  "button",
5844
5844
  {
5845
5845
  type: "button",
5846
5846
  onClick: i,
5847
5847
  disabled: c,
5848
- className: Ae.btnSmall,
5848
+ className: ze.btnSmall,
5849
5849
  "aria-label": "증가",
5850
5850
  children: "+"
5851
5851
  }
@@ -7180,8 +7180,8 @@ async function Ou({
7180
7180
  if (M.dataset.block = String(H), M.innerHTML = "", oe.kind === "image") {
7181
7181
  const Te = oe.block, Oe = ke(Te);
7182
7182
  M.appendChild(Oe);
7183
- const Ne = Oe.getBoundingClientRect(), { mt: Le, mb: $e } = sr(Oe);
7184
- F[H] = { contentH: Math.ceil(Ne.height), mt: Le, mb: $e }, await D(24);
7183
+ const Ne = Oe.getBoundingClientRect(), { mt: Ae, mb: $e } = sr(Oe);
7184
+ F[H] = { contentH: Math.ceil(Ne.height), mt: Ae, mb: $e }, await D(24);
7185
7185
  continue;
7186
7186
  }
7187
7187
  const V = oe.block, J = V.list ? (V.list.level ?? 0) * 24 : 0, se = oe.paraIndex ?? 0, re = g[se] ?? (((f = V.list) == null ? void 0 : f.kind) === "bullet" ? ((u = V.list) == null ? void 0 : u.glyph) ?? "•" : void 0);
@@ -7192,15 +7192,15 @@ async function Ou({
7192
7192
  Oe.dataset.variant = "no";
7193
7193
  const Ne = document.createElement("span");
7194
7194
  Ne.textContent = `${re} `, Ne.style.minWidth = "16px", Ne.style.display = "inline-block", Ne.style.whiteSpace = "nowrap", Ne.style.userSelect = "none", Te.appendChild(Ne), ue(Te, V.runs), ue(Oe, V.runs);
7195
- const Le = document.createDocumentFragment();
7196
- Le.appendChild(Te), Le.appendChild(Oe), M.appendChild(Le);
7195
+ const Ae = document.createDocumentFragment();
7196
+ Ae.appendChild(Te), Ae.appendChild(Oe), M.appendChild(Ae);
7197
7197
  } else {
7198
7198
  const Te = q(V, J);
7199
7199
  Te.dataset.variant = "with", ue(Te, V.runs), M.appendChild(Te);
7200
7200
  }
7201
7201
  const le = M.querySelector('p[data-variant="with"]'), we = M.querySelector('p[data-variant="no"]'), me = we ?? le;
7202
7202
  if (le && me) {
7203
- const Te = Ho(le), Oe = Ho(me), { mt: Ne, mb: Le } = sr(le), { mt: $e, mb: ut } = sr(me), Qe = ((T = V.runs) == null ? void 0 : T.length) ?? 0, He = we ? Oe : Te, ot = we ? $e : Ne, Je = we ? ut : Le;
7203
+ const Te = Ho(le), Oe = Ho(me), { mt: Ne, mb: Ae } = sr(le), { mt: $e, mb: ut } = sr(me), Qe = ((T = V.runs) == null ? void 0 : T.length) ?? 0, Ge = we ? Oe : Te, ot = we ? $e : Ne, Je = we ? ut : Ae;
7204
7204
  if (H < 3) {
7205
7205
  const bt = le.getBoundingClientRect().height;
7206
7206
  console.log(
@@ -7210,9 +7210,9 @@ async function Ou({
7210
7210
  B.set(H, {
7211
7211
  runsLen: Qe,
7212
7212
  lastBottomWith: Te,
7213
- lastBottomNo: He,
7213
+ lastBottomNo: Ge,
7214
7214
  mtWith: Ne,
7215
- mbWith: Le,
7215
+ mbWith: Ae,
7216
7216
  mtNo: ot,
7217
7217
  mbNo: Je
7218
7218
  });
@@ -7234,9 +7234,9 @@ async function Ou({
7234
7234
  let se = -1, re;
7235
7235
  for (; Q < r.length; ) {
7236
7236
  if (lt(p, y), r[Q].kind === "image") {
7237
- const He = F[Q] ?? { contentH: 0, mt: 0, mb: 0 }, Je = (oe === 0 ? He.mt : V + He.mt) + He.contentH;
7237
+ const Ge = F[Q] ?? { contentH: 0, mt: 0, mb: 0 }, Je = (oe === 0 ? Ge.mt : V + Ge.mt) + Ge.contentH;
7238
7238
  if (_(Je, oe)) {
7239
- oe += Je, se = Q, re = void 0, V = He.mb, Q += 1, z = void 0, K = null, ne = null;
7239
+ oe += Je, se = Q, re = void 0, V = Ge.mb, Q += 1, z = void 0, K = null, ne = null;
7240
7240
  continue;
7241
7241
  }
7242
7242
  if (oe === 0) {
@@ -7255,16 +7255,16 @@ async function Ou({
7255
7255
  Q += 1, z = void 0, K = null, ne = null;
7256
7256
  continue;
7257
7257
  }
7258
- const Te = me > 0, Oe = Re(le, me, we - 1, Te), Le = (oe === 0 ? Oe.top : V + Oe.top) + Oe.content;
7259
- if (_(Le, oe)) {
7260
- oe += Le, se = Q, re = we - 1, V = Oe.mb, Q += 1, z = void 0, K = null, ne = null;
7258
+ const Te = me > 0, Oe = Re(le, me, we - 1, Te), Ae = (oe === 0 ? Oe.top : V + Oe.top) + Oe.content;
7259
+ if (_(Ae, oe)) {
7260
+ oe += Ae, se = Q, re = we - 1, V = Oe.mb, Q += 1, z = void 0, K = null, ne = null;
7261
7261
  continue;
7262
7262
  }
7263
7263
  let $e = me, ut = we - 1, Qe = me - 1;
7264
7264
  for (; $e <= ut; ) {
7265
7265
  lt(p, y);
7266
- const He = $e + ut >> 1, ot = Re(le, me, He, Te), Je = (oe === 0 ? ot.top : V + ot.top) + ot.content;
7267
- _(Je, oe) ? (Qe = He, $e = He + 1) : ut = He - 1;
7266
+ const Ge = $e + ut >> 1, ot = Re(le, me, Ge, Te), Je = (oe === 0 ? ot.top : V + ot.top) + ot.content;
7267
+ _(Je, oe) ? (Qe = Ge, $e = Ge + 1) : ut = Ge - 1;
7268
7268
  }
7269
7269
  if (Qe >= me) {
7270
7270
  ee.push({
@@ -7284,13 +7284,13 @@ async function Ou({
7284
7284
  }), V = 0;
7285
7285
  break;
7286
7286
  } else {
7287
- const He = me;
7287
+ const Ge = me;
7288
7288
  ee.push({
7289
7289
  startBlock: H,
7290
7290
  endBlock: Q,
7291
7291
  ...J != null ? { startOffsetInBlock: J } : {},
7292
- endOffsetInBlock: He
7293
- }), z = He + 1, K = Q, ne = He, V = 0;
7292
+ endOffsetInBlock: Ge
7293
+ }), z = Ge + 1, K = Q, ne = Ge, V = 0;
7294
7294
  break;
7295
7295
  }
7296
7296
  }
@@ -7366,11 +7366,11 @@ function Lu() {
7366
7366
  var $;
7367
7367
  return Au((($ = t == null ? void 0 : t.ast) == null ? void 0 : $.blocks) ?? []);
7368
7368
  }, [t]), f = ve(() => {
7369
- const $ = [], ze = Or();
7369
+ const $ = [], He = Or();
7370
7370
  return p.forEach((We) => {
7371
7371
  if (We.kind === "paragraph") {
7372
7372
  const Ct = We.paraIndex;
7373
- $[Ct] = Pr(We.block, ze);
7373
+ $[Ct] = Pr(We.block, He);
7374
7374
  }
7375
7375
  }), $;
7376
7376
  }, [p]), [u, T] = et({
@@ -7400,11 +7400,11 @@ function Lu() {
7400
7400
  slash: M
7401
7401
  } = Y(
7402
7402
  nn(($) => {
7403
- var ze;
7403
+ var He;
7404
7404
  return {
7405
7405
  showSplit: $.showSplit,
7406
7406
  breakGapPx: $.breakGapPx ?? 0,
7407
- slash: ((ze = $.breakMarks) == null ? void 0 : ze.slash) ?? !1
7407
+ slash: ((He = $.breakMarks) == null ? void 0 : He.slash) ?? !1
7408
7408
  };
7409
7409
  })
7410
7410
  ), B = Rt();
@@ -7416,8 +7416,8 @@ function Lu() {
7416
7416
  }, [u, B]);
7417
7417
  const F = Z(() => {
7418
7418
  console.log("@@@@@@recalc호출");
7419
- const $ = y.current, ze = le.current, We = we.current;
7420
- if (console.log("showSplit", A), !$ || !ze || !We || p.length === 0) {
7419
+ const $ = y.current, He = le.current, We = we.current;
7420
+ if (console.log("showSplit", A), !$ || !He || !We || p.length === 0) {
7421
7421
  T({ pages: [], pageByRunIndex: null }), R(0);
7422
7422
  return;
7423
7423
  }
@@ -7426,7 +7426,7 @@ function Lu() {
7426
7426
  try {
7427
7427
  const it = s.getState().playbackScale, { pages: Bt, pageByRunIndex: Di } = await Ou({
7428
7428
  viewHost: $,
7429
- measureRoot: ze,
7429
+ measureRoot: He,
7430
7430
  contentArea: We,
7431
7431
  items: p,
7432
7432
  cfgMaxWidth: m,
@@ -7469,12 +7469,12 @@ function Lu() {
7469
7469
  b,
7470
7470
  e
7471
7471
  ]), D = j(($) => $.setCurrentGlobalRunIndex), q = j(($) => {
7472
- var ze;
7473
- return ((ze = $.layout) == null ? void 0 : ze.prefix) ?? [];
7472
+ var He;
7473
+ return ((He = $.layout) == null ? void 0 : He.prefix) ?? [];
7474
7474
  }), ue = _e(($) => $.syncToGI), de = Z(
7475
7475
  ($) => {
7476
- const ze = u.pages.length + 1, We = k + $;
7477
- if (We < 0 || We >= ze) return;
7476
+ const He = u.pages.length + 1, We = k + $;
7477
+ if (We < 0 || We >= He) return;
7478
7478
  const Ct = k === u.pages.length;
7479
7479
  if (We === u.pages.length) {
7480
7480
  R(We);
@@ -7494,14 +7494,14 @@ function Lu() {
7494
7494
  }, [S, de]), Re = Z(() => {
7495
7495
  S || C.current !== 0 ? (O("next"), I(!1)) : de(1);
7496
7496
  }, [S, de]), ee = kn(), Q = Z(() => {
7497
- const { isSettingsOpen: $, setSettingsOpen: ze, toggleOverlays: We } = ee.getState();
7498
- $ ? ze(!1) : We();
7497
+ const { isSettingsOpen: $, setSettingsOpen: He, toggleOverlays: We } = ee.getState();
7498
+ $ ? He(!1) : We();
7499
7499
  }, [ee]), z = u.pages.length + 1, K = ((zr = y.current) == null ? void 0 : zr.clientWidth) || 400, ne = Z(($) => {
7500
7500
  var it;
7501
- const ze = h.current;
7502
- if (!ze) return;
7501
+ const He = h.current;
7502
+ if (!He) return;
7503
7503
  const We = ((it = y.current) == null ? void 0 : it.clientWidth) || 1, Ct = $ / We * 33.333;
7504
- ze.style.transform = `translate3d(${-33.333 + Ct}%, 0, 0)`;
7504
+ He.style.transform = `translate3d(${-33.333 + Ct}%, 0, 0)`;
7505
7505
  }, []), H = Z(
7506
7506
  ($) => {
7507
7507
  k === 0 && $ > 0 || k >= z - 1 && $ < 0 || (C.current = $, ne($), S || I(!0));
@@ -7514,8 +7514,8 @@ function Lu() {
7514
7514
  }, []), V = Z(
7515
7515
  ($) => {
7516
7516
  if ($.target !== $.currentTarget || $.propertyName !== "transform") return;
7517
- const ze = _;
7518
- w(!0), O(null), C.current = 0, ze === "prev" ? de(-1) : ze === "next" && de(1);
7517
+ const He = _;
7518
+ w(!0), O(null), C.current = 0, He === "prev" ? de(-1) : He === "next" && de(1);
7519
7519
  },
7520
7520
  [_, de]
7521
7521
  );
@@ -7530,10 +7530,7 @@ function Lu() {
7530
7530
  ($) => i || zu($) ? !0 : Bu($),
7531
7531
  [i]
7532
7532
  ), re = Z(
7533
- ($) => {
7534
- const ze = J.getState().status;
7535
- return ze === "playing" || ze === "loading" ? !0 : se($);
7536
- },
7533
+ ($) => J.getState().status === "playing" ? !0 : se($),
7537
7534
  [J, se]
7538
7535
  ), pe = hu({
7539
7536
  onPrev: ke,
@@ -7582,8 +7579,8 @@ function Lu() {
7582
7579
  b,
7583
7580
  t == null ? void 0 : t.section_id
7584
7581
  ]), pu([y], Oe);
7585
- const Le = j(($) => $.registerSectionScrollApi);
7586
- Se(() => (Le({
7582
+ const Ae = j(($) => $.registerSectionScrollApi);
7583
+ Se(() => (Ae({
7587
7584
  // 페이지 모드에서는 GI 기반 스크롤 불필요 - 더미 구현
7588
7585
  ensureVisibleGI: () => Promise.resolve(!0),
7589
7586
  scrollToGI: () => Promise.resolve(!0),
@@ -7595,8 +7592,8 @@ function Lu() {
7595
7592
  scrollToGIAtOffset: () => Promise.resolve(),
7596
7593
  // 페이지 이동 구현
7597
7594
  stepPage: de
7598
- }), () => Le(void 0)), [Le, de]);
7599
- const $e = t.quizzes && t.quizzes.length > 0, ut = u.pages.length > 0 && k === u.pages.length, Qe = k > 0 ? k - 1 : null, He = k < z - 1 ? k + 1 : null, ot = ve(() => _ === "prev" ? "translate3d(0%, 0, 0)" : _ === "next" ? "translate3d(-66.666%, 0, 0)" : "translate3d(-33.333%, 0, 0)", [_]), Je = ($) => n ? null : $ === u.pages.length ? /* @__PURE__ */ X(
7595
+ }), () => Ae(void 0)), [Ae, de]);
7596
+ const $e = t.quizzes && t.quizzes.length > 0, ut = u.pages.length > 0 && k === u.pages.length, Qe = k > 0 ? k - 1 : null, Ge = k < z - 1 ? k + 1 : null, ot = ve(() => _ === "prev" ? "translate3d(0%, 0, 0)" : _ === "next" ? "translate3d(-66.666%, 0, 0)" : "translate3d(-33.333%, 0, 0)", [_]), Je = ($) => n ? null : $ === u.pages.length ? /* @__PURE__ */ X(
7600
7597
  "div",
7601
7598
  {
7602
7599
  style: {
@@ -7646,7 +7643,7 @@ function Lu() {
7646
7643
  children: [
7647
7644
  /* @__PURE__ */ x("div", { style: bt, children: Qe !== null && Je(Qe) }),
7648
7645
  /* @__PURE__ */ x("div", { style: bt, children: Je(k) }),
7649
- /* @__PURE__ */ x("div", { style: bt, children: He !== null && Je(He) })
7646
+ /* @__PURE__ */ x("div", { style: bt, children: Ge !== null && Je(Ge) })
7650
7647
  ]
7651
7648
  }
7652
7649
  ),
@@ -8878,7 +8875,9 @@ function zd() {
8878
8875
  // 텍스트 선택 방지
8879
8876
  userSelect: "none",
8880
8877
  WebkitUserSelect: "none",
8881
- WebkitTouchCallout: "none"
8878
+ WebkitTouchCallout: "none",
8879
+ // 모바일 기본 터치 동작 차단 (스와이프 페이지 넘김용)
8880
+ touchAction: "none"
8882
8881
  },
8883
8882
  children: [
8884
8883
  e === "scroll" ? /* @__PURE__ */ x(Ta, {}) : /* @__PURE__ */ x(Lu, {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@readerseye2/cr_viewer",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",